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
Get Current Value of attributes
function getProgress() { return document.getElementById("progressbar").getAttribute("aria-valuenow"); return document.getElementById("progressbar").getAttribute("style","width:"); return document.getElementById("progressbar").innerHTML; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getAttr() {\r\n return this.attributes\r\n }", "static get observedAttributes() {\n return ['value'];\n }", "readAttributes() {\n this._previousValueState.state = this.getAttribute('value-state')\n ? this.getAttribute('value-state')\n : 'None';\n\n // save the original attribute for later usages, we do this, because some components reflect\n Object.keys(this._privilegedAttributes).forEach(attr => {\n this._privilegedAttributes[attr] = this.getAttribute(attr);\n });\n }", "getAttributes() {\r\n return this.atts;\r\n }", "get attributeString() {\n console.log(JSON.stringify(self.attributes))\n return JSON.stringify(self.attributes)\n }", "getAttrValue(attr) {\n this._ensureUnpacked();\n const value = this.unpackedAttrs.get(attr.name);\n if (value === undefined)\n return null;\n return value;\n }", "get value() {\n return this.getStringAttribute('value');\n }", "get value() {\n return this.getStringAttribute('value');\n }", "getAttributes() {}", "static get attributes() {}", "get cValue(){\n\t\treturn this.hasAttribute('c-value') ? this.getAttribute('c-value') : this.currentValue;\n\t}", "_getAttr(key) {\r\n return this._data.attributes[key];\r\n }", "function getAttributes() {\n return ATTRS;\n}", "getValue() {\n attribute = true;\n const value = this.fragment\n ? this.fragment.valueOf()\n : booleanAttributes[this.name.toLowerCase()]\n ? true\n : this.value;\n attribute = false;\n return value;\n }", "static get observedAttributes () {\n return ['data-values', 'data-color', 'data-display-style'];\n }", "function getAttributes() {\n var attributes = {};\n if (this.length) {\n $.each(this[0].attributes, function(index, attr) {\n attributes[attr.name] = attr.value;\n });\n }\n return attributes;\n }", "static get observedAttributes() {return ['w', 'l']; }", "get value() {\n return this.getAttribute('value');\n }", "getAttribute(name) {\n return this._attrs[name];\n }", "get value() {\n return this.getNumberAttribute('value');\n }", "static get observedAttributes() {\n return this.getMetadata().getAttributesList();\n }", "static get observedAttributes() {\n return attributesForClass(this);\n }", "get attributes () {\n return this._attributes;\n }", "toObject() {\n return this.attributeValue;\n }", "get getValue() {\n return this.basicInfo.value;\n }", "get attributes() {\n return this.$attributes;\n }", "static get observedAttributes() { return [\"name\"]; }", "getAttributes() {\n return this.attributes;\n }", "getVal(name)\n {\n var key = 'current_' + name;\n var value = 0;\n if (this.hasOwnProperty(key)) {\n value = this[key];\n }\n\n var buffList = BuffMgr.getBuffList(this.getUnitId());\n\n for (let index = 0; index < buffList.length; index++) {\n const buff = buffList[index];\n value += buff.getValue(ActorDef.AttributeKey[name]);\n }\n\n return value;\n }", "function getCustomAttributes() {\n let allTheStuff = document.getElementsByTagName('*');\n let val = 0;\n let retStr = \"\";\n \n for (let i = 0; i < allTheStuff.length; i++)\n { \n let dataset =allTheStuff[i].dataset.customattr;\n\n if (dataset)\n {\n retStr += 'value: ' + dataset.valueOf() + '\\n';\n retStr += `${allTheStuff[i].tagName} tag containing ${allTheStuff[i].innerHTML}\\n`;\n }\n }\n\n console.log(retStr);\n}", "function getAttributesValues() {\n\tattributesIndex = myCharacter.attributes;\n\tepicAttributesIndex = myCharacter.epicAttributes;\n\n\teffectiveStrengthDice = attributesIndex.strength + nanEqualsZero(myRelicBonusDice.strength) + nanEqualsZero(myFatebonds.strength) + nanEqualsZero(myTempDice.strength);\n\teffectiveDexterityDice = attributesIndex.dexterity + nanEqualsZero(myRelicBonusDice.dexterity) + nanEqualsZero(myFatebonds.dexterity) + nanEqualsZero(myTempDice.dexterity);\n\teffectiveStaminaDice = attributesIndex.stamina + nanEqualsZero(myRelicBonusDice.stamina) + nanEqualsZero(myFatebonds.stamina) + nanEqualsZero(myTempDice.stamina);\n\teffectiveCharismaDice = attributesIndex.charisma + nanEqualsZero(myRelicBonusDice.charisma) + nanEqualsZero(myFatebonds.charisma) + nanEqualsZero(myTempDice.charisma);\n\teffectiveManipulationDice = attributesIndex.manipulation + nanEqualsZero(myRelicBonusDice.manipulation) + nanEqualsZero(myFatebonds.manipulation) + nanEqualsZero(myTempDice.manipulation);\n\teffectiveAppearanceDice = attributesIndex.appearance + nanEqualsZero(myRelicBonusDice.appearance) + nanEqualsZero(myFatebonds.appearance) + nanEqualsZero(myTempDice.appearance);\n\teffectivePerceptionDice = attributesIndex.perception + nanEqualsZero(myRelicBonusDice.perception) + nanEqualsZero(myFatebonds.perception) + nanEqualsZero(myTempDice.perception);\n\teffectiveIntelligenceDice = attributesIndex.intelligence + nanEqualsZero(myRelicBonusDice.intelligence) + nanEqualsZero(myFatebonds.intelligence) + nanEqualsZero(myTempDice.intelligence);\n\teffectiveWitsDice = attributesIndex.wits + nanEqualsZero(myRelicBonusDice.wits) + nanEqualsZero(myFatebonds.wits) + nanEqualsZero(myTempDice.wits);\n\n\tgiantAmongMenDice = 0;\n\tif(myCharacter['characterPantheon'] == \"Aesir\" && myCharacter['boons']['psp']['pspLevel2'] == true) {\n\t\teffectiveStrengthDice += 1;\n\t\teffectiveStaminaDice += 1;\n\t}\n\tif(myCharacter['characterPantheon'] == \"Aesir\" && myCharacter['boons']['psp']['pspLevel4'] == true) {\n\t\teffectiveStrengthDice += 1;\n\t\teffectiveStaminaDice += 1;\n\t}\n\tif(myCharacter['characterPantheon'] == \"Aesir\" && myCharacter['boons']['psp']['pspLevel5'] == true) {\n\t\teffectiveStrengthDice += 2;\n\t\teffectiveStaminaDice += 2;\n\t}\n\tif(myCharacter['characterPantheon'] == \"Aesir\" && myCharacter['boons']['psp']['pspLevel6'] == true) {\n\t\teffectiveStrengthDice += 1;\n\t\teffectiveStaminaDice += 1;\n\t\tgiantAmongMenDice += 5;\n\t}\n\tif(myCharacter['characterPantheon'] == \"Aesir\" && myCharacter['boons']['psp']['pspLevel9'] == true) {\n\t\teffectiveStrengthDice += 4;\n\t\teffectiveStaminaDice += 4;\n\t\tgiantAmongMenDice += 4;\n\t}\n\tif(genExceptionsMasterList['giantAmongMen'][myCharacter['selfName']]) {\n\t\tgiantAmongMen = genExceptionsMasterList['giantAmongMen'][myCharacter['selfName']]['value1'];\n\t\tswitch (giantAmongMen) {\n\t\t\tcase \"charisma\":\n\t\t\teffectiveCharismaDice += giantAmongMenDice;\n\t\t\tbreak;\n\t\t\tcase \"manipulation\":\n\t\t\teffectiveManipulationDice += giantAmongMenDice;\n\t\t\tbreak;\n\t\t\tcase \"appearance\":\n\t\t\teffectiveAppearanceDice += giantAmongMenDice;\n\t\t\tbreak;\n\t\t\tcase \"perception\":\n\t\t\teffectivePerceptionDice += giantAmongMenDice;\n\t\t\tbreak;\n\t\t\tcase \"intelligence\":\n\t\t\teffectiveIntelligenceDice += giantAmongMenDice;\n\t\t\tbreak;\n\t\t\tcase \"wits\":\n\t\t\teffectiveWitsDice += giantAmongMenDice;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\teffectiveStrengthSucc = convertToEpic(epicAttributesIndex.epicStrength) + nanEqualsZero(myTempSucc.strength);\n\teffectiveDexteritySucc = convertToEpic(epicAttributesIndex.epicDexterity) + nanEqualsZero(myTempSucc.dexterity);\n\teffectiveStaminaSucc = convertToEpic(epicAttributesIndex.epicStamina) + nanEqualsZero(myTempSucc.stamina);\n\teffectiveCharismaSucc = convertToEpic(epicAttributesIndex.epicCharisma) + nanEqualsZero(myTempSucc.charisma);\n\teffectiveManipulationSucc = convertToEpic(epicAttributesIndex.epicManipulation) + nanEqualsZero(myTempSucc.manipulation);\n\teffectiveAppearanceSucc = convertToEpic(epicAttributesIndex.epicAppearance) + nanEqualsZero(myTempSucc.appearance);\n\teffectivePerceptionSucc = convertToEpic(epicAttributesIndex.epicPerception) + nanEqualsZero(myTempSucc.perception);\n\teffectiveIntelligenceSucc = convertToEpic(epicAttributesIndex.epicIntelligence) + nanEqualsZero(myTempSucc.intelligence);\n\teffectiveWitsSucc = convertToEpic(epicAttributesIndex.epicWits) + nanEqualsZero(myTempSucc.wits);\n}", "getAttribute(key, value = undefined) {\n return this.$attributes[key] || value;\n }", "static get observedAttributes() {return ['name']; }", "static get observedAttributes() {return ['name']; }", "function currentAttrs() {\n return {\n email: attrs['ng-gravatar'] || attrs.email,\n hash: attrs.hash,\n size: attrs.size || attrs.s,\n defaultImage: attrs['default-image'] || attrs.d,\n forceDefault: attrs['force-default'] || attrs.f,\n rating: attrs.rating || attrs.r\n };\n }", "getCurrentValue() {\n \n }", "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;}}", "getAttributes() {\r\n return this.builder.attributes;\r\n }", "static get observedAttributes() {\n return ['data'];\n }", "getAttrs(){return this.__attrs}", "get( key ) {\n return this.attributes[key];\n }", "get attributes() {\n return Object.values(this.attr).reduce((result, cur) => {\n return result.concat(cur);\n }, []);\n }", "static _getAttributes() {\n return ShaderConst._attributes;\n }", "get foo() {\n return this.getAttribute('foo'); \n }", "getAttribute(key) {\n return this.attributes[key];\n }", "function GetCurrentValue()\n{\n\treturn m_currentValue;\n}", "static get observedAttributes() {\n return ['active'];\n }", "function gA(item, att) { return item.getAttribute('data-'+att+''); }", "function gA(item, att) { return item.getAttribute('data-'+att+''); }", "function getAttributeValue(attr) {\n\t\treturn (!!attr ? attr.value() : '');\n\t}", "static get observedAttributes() {\n return ['text'];\n }", "static get observedAttributes() {\n return ['text'];\n }", "static get observedAttributes() {\n return [] // List an array of attribute names\n }", "static get observedAttributes() {\n return [\n 'indicator', 'progress', 'status', 'primary-text', 'secondary-text'\n ];\n }", "static get observedAttributes() {\n return ['color', 'size', 'background'];\n }", "function htmlAttributeDisplayDetails() {}", "getAttributes() {\n return Object.keys(this.attributes).map(\n key => ' ' + key + '=\"' + escapeHTML(this.attributes[key]) + '\"'\n ).join('');\n }", "function getCurrentAttributes() {\r\n // use plus sign to convert string into number\r\n var x = d3.selectAll(\".selection\").attr(\"x\");\r\n var y = d3.selectAll(\".selection\").attr(\"y\");\r\n var width = d3.selectAll(\".selection\").attr(\"width\");\r\n var height = d3.selectAll(\".selection\").attr(\"height\");\r\n\r\n aleph.selectionRectangle.finalX = d3.selectAll(\".selection\").attr(\"x\");\r\n aleph.selectionRectangle.finalY = d3.selectAll(\".selection\").attr(\"y\");\r\n aleph.selectionRectangle.finalWidth = d3\r\n .selectAll(\".selection\")\r\n .attr(\"width\");\r\n aleph.selectionRectangle.finalHeight = d3\r\n .selectAll(\".selection\")\r\n .attr(\"height\");\r\n\r\n return {\r\n x1: x,\r\n y1: y,\r\n x2: x + width,\r\n y2: y + height,\r\n };\r\n}", "getValue()\n {\n return this.value;\n }", "static get observedAttributes() {\n return [\"color\", 'size', \"background\"];\n }", "getValue() {\n return this.value;\n }", "getValue() {\n return this.value;\n }", "getValue() {\n return this.value;\n }", "getValue() {\n return this.value;\n }", "get value( ) { return Number(this.getAttribute(\"value\") || 0.0); }", "static get observedAttributes () {\r\n return ['size', 'type', 'plain', 'round', 'circle', 'disabled', 'theme']\r\n }", "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;}}", "static get observedAttributes () {\n return DCCVisual.observedAttributes.concat(\n ['variable', 'states', 'colors', 'answer', 'player', 'selection'])\n }", "static get observedAttributes() {\n\t\treturn [\"first\", \"pagesize\", \"datos\", \"cabeceras\"];\n\t}", "static get observedAttributes() {\n return [\"inactive\"];\n }", "value() {\n return this.#value;\n }", "function _value(field, attribute)\n\t{\n\t\treturn field.values[attribute];\n\t}", "getAttribute(attributeName) {\n return this._executeAfterInitialWait(() => this.currently.getAttribute(attributeName));\n }", "function getCustomAttribute(){\n let attr = document.querySelectorAll('[data-customAttr]')\n for (let i of attr){\n let z = i.getAttribute('data-customAttr')\n console.log(`${z} : ${i}`)\n }\n}", "get value() {}", "get value() {}", "static get observedAttributes() {\n return [];\n }", "static get observedAttributes() {\n return [];\n }", "static get observedAttributes() {\n return ['star-count'];\n }", "get attrs () { return this._attrs; }", "getValue() {\n return this.node.value;\n }", "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 }", "static get observedAttributes() {\n return ['rainbow', 'lang'];\n }", "getValue() {\n return this.value;\n }", "_getValue() {\n return this._value;\n }", "static get observedAttributes(){\n return [\"interval\"];\n }", "GetValue()\n\t{\n\t\treturn this.value;\n\t}", "static get observedAttributes() {\n return ['src', 'alt', 'title', 'price'];\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 }" ]
[ "0.7315704", "0.72826964", "0.677964", "0.67343146", "0.6732252", "0.67137057", "0.67110616", "0.67110616", "0.6691765", "0.6613929", "0.6575565", "0.64938223", "0.6481105", "0.64710313", "0.64650023", "0.6455856", "0.6431732", "0.6393101", "0.6373208", "0.6360265", "0.6359858", "0.6351398", "0.63373137", "0.63336957", "0.62951624", "0.62922364", "0.6283746", "0.62832755", "0.62743205", "0.62549305", "0.62537116", "0.6249534", "0.62232035", "0.62232035", "0.62223613", "0.62179494", "0.62150294", "0.62150294", "0.618258", "0.6182476", "0.6173996", "0.6170536", "0.61643904", "0.615985", "0.61537385", "0.6124897", "0.6124574", "0.6118568", "0.61140114", "0.61140114", "0.60568374", "0.60551715", "0.60551715", "0.60455847", "0.6044761", "0.604257", "0.60416496", "0.6033684", "0.60201347", "0.601342", "0.6013365", "0.60126626", "0.60126626", "0.60126626", "0.60078466", "0.6000609", "0.5999474", "0.5995196", "0.5995196", "0.5995196", "0.5995196", "0.5995196", "0.5995196", "0.5995196", "0.5995196", "0.5995196", "0.5995196", "0.59877974", "0.59867775", "0.5978181", "0.596947", "0.5967328", "0.59666187", "0.59635586", "0.59627914", "0.59627914", "0.59296656", "0.59296656", "0.5923686", "0.59205836", "0.59168226", "0.5915104", "0.59034777", "0.59008276", "0.5886463", "0.5880024", "0.5862356", "0.58570564", "0.58379227", "0.58379227", "0.58379227" ]
0.0
-1
Set value of attributes
function setProgress(value) { document.getElementById("progressbar").setAttribute("aria-valuenow",value); document.getElementById("progressbar").setAttribute("style","width: " +value+ "%"); document.getElementById("progressbar").innerHTML = (value+ "%"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set attributes(value) {\n return this.$attributes = value;\n }", "setAttributes(myAttributes){\n \tif (myAttributes instanceof Attribute){\n \t\tvar keys = myAttributes.getKeys();\n \t\tfor(let i in keys){\n \t\t\tthis.setAttribute(keys[i], myAttributes.getAttribute(keys[i]);\n \t\t}\n \t}else if(Array.isArray(myAttributes)){\n \t\tvar keys = Object.keys(myAttributes);\n \t\tfor(let i in keys){\n \t\t\tthis.setAttribute(keys[i], myAttributes[keys[i]]);\n \t\t}\n \t}\n \t\n }", "setAttribute(key, value) {\n this.attributes[key] = value;\n }", "setAttribute(key, value) {\n this.attributes[key] = value;\n }", "function setAttributes(attributes) {\n roktLoaded.then((rokt) => {\n rokt.setAttributes(attributes);\n });\n }", "setAttributes(data) {\n if(isArray(data) || isObject(data)) {\n each(data, (value, key) => {\n this.setAttribute(key, value);\n });\n }\n }", "setAttributes() {\n Object.keys(this.DOMAttributes).forEach((key) => {\n const isValidValue = !!this.DOMAttributes[key];\n if (isValidValue) {\n console.log(`KEY/VALUE BEING WRITTEN: ${key} | ${this.DOMAttributes[key]}`);\n this.DOMElement.setAttribute(key, this.DOMAttributes[key]);\n }\n });\n }", "setAttribute(name, value) {\n const found = this.attributes.find(attribute => attribute.name === name);\n if (found) {\n found.value = value;\n } else {\n this.attributes.push({name, value});\n }\n }", "setAttrValue(attr, value) {\n this._ensureUnpacked();\n this.unpackedAttrs.set(attr.name, value);\n }", "_setAll(attr, value) {\n this._forEach(event => {\n event[attr] = value;\n });\n }", "setAttribute(key, value) {\n if (key === 'class') {\n this.className = value;\n } else if (key === 'style') {\n console.log('Styles not yet implemented');\n } else {\n this.attributes[key] = value;\n }\n }", "setAattribute(type, value) {\n switch(type) {\n case 'width':\n this.width = value\n break;\n case 'height': \n this.height = value\n break;\n case 'children': \n this.children = value;\n break;\n case 'duration': \n this.duration = value;\n break;\n case 'autoplay':\n this.autoplay = value;\n break;\n case 'easing':\n this.easing = value;\n break;\n }\n return this[ATTRIBUTE_SYMBOL][type] = value\n }", "function setAttributes(element, attributes) {\n for(var key in attributes) {\n\tif(key){\n\t\telement.setAttribute(key, attributes[key]);\t\t\n\t}\n }\n}", "setAttribute(key, value) {\n this.handleAttributeChange(key, value);\n\n if(isUndefined(value)) {\n delete this.$attributes[key];\n }\n else {\n this.$attributes[key] = value;\n }\n }", "function setAttribute(attrname, value_str, type, unit) {\n\n console.log(\"setAttribute\");\n\n var sel = getNodes(\"attribute\", attrname);\n\n if (type == \"DevBoolean\") {\n var value = parseFloat(value_str) !== 0.0,\n classes = {\"boolean-true\": value, \"boolean-false\": !value};\n sel.classed(classes);\n } else if (type == \"DevState\") {\n // Treat the \"State\" attribute specially\n sel.classed(getStateClasses(value_str));\n } else {\n\n sel.text(value_str + (unit? \" \" + unit: \"\"));\n }\n // A bit of a hack...\n var d = sel.datum();\n d[\"value\"] = value_str;\n d[\"unit\"] = unit;\n }", "function setAttributes(element,attributes)\n{\n for(const key in attributes){\n element.setAttribute(key,attributes[key]);\n }\n}", "addAttribute(key, value) {\n this.attributes[key] = value;\n }", "function setAttributes(element, attributes) {\r\n for (const key in attributes) {\r\n element.setAttribute(key, attributes[key]);\r\n }\r\n \r\n\r\n}", "function setAttributes(element, attributes){\r\n for(const key in attributes) {\r\n element.setAttribute(key, attributes[key]);\r\n }\r\n}", "function setAttributes(el, attrs) {\n for(var key in attrs) {\n el.setAttribute(key, attrs[key]);\n console.log('setting key: ' + key + ', value: ' + attrs[key]);\n }\n}", "function setAttributes(el, attrs) {\n for(var key in attrs) {\n el.setAttribute(key, attrs[key]);\n console.log('setting key: ' + key + ', value: ' + attrs[key]);\n }\n}", "_setSingleAttribute(attributeName, value) {\n this.getSelectedObjects().forEach(selectedObject => {\n selectedObject[attributeName] = value;\n });\n }", "function attrFunction() {\n var x = value.apply(this, arguments);\n if (x == null) this.removeAttribute(name);\n else this.setAttribute(name, x);\n }", "setAttribute(attr, value){\n\t\tif(value)\n\t\t\tthis.$el.setAttribute(attr, value);\n\t\telse\n\t\t\tthis.$el.removeAttribute(attr);\n\t}", "function safeSetAttributes(el, attributes) {\n Object.keys(attributes).forEach((name) => {\n safeSetAttribute(el, name, attributes[name].toString());\n });\n}", "setAttributes(geometry, translations, values, originalValues) {\n geometry.addAttribute('translation', translations)\n geometry.addAttribute('size', values)\n geometry.addAttribute('originalsize', originalValues)\n }", "function attrFunction() {\n var x = value.apply(this, arguments);\n if (x == null) this.removeAttribute(name);\n else this.setAttribute(name, x);\n }", "function attrFunction() {\n var x = value.apply(this, arguments);\n if (x == null) this.removeAttribute(name);\n else this.setAttribute(name, x);\n }", "function attrConstant() {\n this.setAttribute(name, value);\n }", "function setAttributes(element, attributes) {\n for (let key in attributes) {\n element.setAttribute(key, attributes[key]);\n }\n}", "function setAttributes(element, attributes) {\n for (const key in attributes) {\n if (Object.hasOwnProperty.call(attributes, key)) {\n const attrValue = attributes[key];\n element.setAttribute(key, attrValue);\n }\n }\n}", "function setAttributes(element, attributes){\n for(const key in attributes){\n element.setAttribute(key, attributes[key]);\n }\n}", "function attrConstant() {\n this.setAttribute(name, value);\n }", "function attrConstant() {\n this.setAttribute(name, value);\n }", "function setAttributes(element, attributes){\n for (const key in attributes){\n element.setAttribute(key, attributes[key]);\n }\n}", "function setAttributes(element, attributes) {\n for (const key in attributes) {\n element.setAttribute(key, attributes[key]);\n }\n}", "function setAttributes(element, attributes) {\n for (const key in attributes) {\n element.setAttribute(key, attributes[key]);\n }\n}", "function setGetAttr(node, atr, value) {\n\n if (arguments.length === 2) {\n return node.getAttribute(atr);\n\n } else if (arguments.length === 3) {\n return node.setAttribute(atr, value);\n }\n\n\n }", "function setAttributes(element, attributes) {\n for(const key in attributes) {\n element.setAttribute(key, attributes[key]);\n }\n}", "function setAttributes(element, attributes) {\n for (const key in attributes) {\n element.setAttribute(key, attributes[key]);\n }\n}", "function setAttributes(element, attributes) {\n for (const key in attributes) {\n element.setAttribute(key, attributes[key])\n }\n}", "function setAttr(el, attrs) {\n for (const attr in attrs) {\n el.setAttribute(attr, attrs[attr]);\n }\n}", "async setAttribute(attr, val) {\n document.querySelector('#avatar-rig').setAttribute(attr, val)\n }", "changeAttribute(id, att, val){\n if (typeof id !== \"undefined\" && typeof att !== \"undefined\" && typeof val !== \"undefined\"){\n id = String(id);\n att = String(att);\n val = String(val);\n document.getElementById(id).setAttribute(att,val);\n } else {\n console.log(\"addAttribute - \" + \"(\" + \"ERROR - invalid parameter (id, attribute, value)\" + \")\");\n } // end if\n }", "readAttributes() {\n this._previousValueState.state = this.getAttribute('value-state')\n ? this.getAttribute('value-state')\n : 'None';\n\n // save the original attribute for later usages, we do this, because some components reflect\n Object.keys(this._privilegedAttributes).forEach(attr => {\n this._privilegedAttributes[attr] = this.getAttribute(attr);\n });\n }", "function setAttributes(el, attrs) {\n for(var key in attrs) {\n el.setAttribute(key, attrs[key]);\n }\n}", "function setAttributes(el, attrs) {\n for(var key in attrs) {\n el.setAttribute(key, attrs[key]);\n }\n}", "static attrs(element, attrs) {\n if(element.setAttribute) {\n Object.keys(attrs).forEach((prop) => {\n element.setAttribute(prop, attrs[prop]);\n }); \n }\n }", "function setAttributes(el, attrs) {\n for (const key in attrs) {\n if ({}.hasOwnProperty.call(attrs, key)) {\n el.setAttribute(key, attrs[key]);\n }\n }\n}", "function setAttributes(el, attrs) {\n for (var key in attrs) {\n el.setAttribute(key, attrs[key]);\n }\n}", "function updateAttribute(event) {\n\n var attrname = event.model,\n value_str = event.html,\n unit = event.unit,\n type = event.type;\n\n var sel = getNodes(\"attribute\", attrname);\n\n if (type == \"DevBoolean\") {\n var value = parseFloat(value_str) !== 0.0,\n classes = {\"boolean-true\": value, \"boolean-false\": !value};\n sel.classed(classes);\n } else if (type == \"DevState\") {\n // Treat the \"State\" attribute specially\n sel.classed(getStateClasses(value_str));\n } else {\n sel.text(value_str + (unit? \" \" + unit: \"\"));\n }\n // A bit of a hack...\n var d = sel.datum();\n if (d) {\n d[\"value\"] = value_str;\n d[\"unit\"] = unit;\n }\n }", "function assignAttributes() {\n\t$(\"#amethyst\").attr(amethyst);\n\t$(\"#celestite\").attr(celestite);\n\t$(\"#titaniumquartz\").attr(titaniumquartz);\n\t$(\"#citrine\").attr(citrine);\n}", "function setAttributes(element, attr) {\n for (let key in attr) {\n element.setAttribute(key, attr[key]);\n }\n}", "function setAttributes(element, attr) {\n for (let key in attr) {\n element.setAttribute(key, attr[key]);\n }\n}", "function setAttributes(el, attrs) {\n for (let key in attrs) {\n el.setAttribute(key, attrs[key]);\n }\n}", "function setAttributes(ele,o)\n{\n\tfor (var i in o) {\n\t\tif ( o.hasOwnProperty(i) )\n\t\t\tele.setAttribute( i, o[i] );\n\t}\n}", "function setAttributes(element, attr) {\n for (const key in attr) {\n element.setAttribute(key, attr[key]);\n }\n}", "setAttribute(_key, _value) {\n return this;\n }", "_updateAttributes() {\n if (this.$element) {\n const attrs = createDOMAttributes(this.id, this.state, this.attributes);\n const applyAttrs = Object.keys(attrs).filter(k => attrs[k] !== this._lastAttributes[k]);\n\n if (applyAttrs.length > 0) {\n applyAttrs.forEach(a => this.$element.setAttribute(`data-${a}`, String(attrs[a])));\n this._lastAttributes = attrs;\n }\n }\n }", "setAttrValue (name, value) {\n value = toNullOrString(value);\n\n this.lastSetValues[name] = value;\n\n if (this.connected) {\n this._clearPendingValue(name);\n this._syncAttrValue(name, value);\n } else {\n this.pendingValues[name] = value;\n }\n }", "function setAttribute(element, attributes){\n for(const key in attributes){\n element.setAttribute(key, attributes[key]);\n }\n}", "function setAttribute(elmName,attribute){\r\n for(let key in attribute){\r\n elmName.setAttribute('elmName','attribute[key]');\r\n }\r\n }", "setAttribute(element, attributeName, value) {\n if (value === null || value === undefined) {\n element.removeAttribute(attributeName);\n } else {\n element.setAttribute(attributeName, value);\n }\n }", "function assignAttributes(element, attributes) {\n\tObject.keys(attributes).forEach(key => element.setAttribute(key, attributes[key]))\n}", "function _applyAttributes(target) {\n\t for (var n in this.attributes) {\n\t target.setAttribute(n, this.attributes[n]);\n\t }\n\t }", "function setAttr(el, name, value) {\n if (value === null) {\n removeAttribute(el, name);\n }\n else {\n el.attribs[name] = `${value}`;\n }\n}", "_attributeValueStarted() {\n this.attValue = '';\n }", "addAttribute(attributes){\n const addDirectly = ['value', 'onchange', 'onblur'];\n const element = this.element || this;\n for (var n in attributes){\n if (attributes.hasOwnProperty(n)){\n if (n === \"classname\" || n === \"className\"){\n element.className += \" \"+attributes[n] + \" \";\n } else if (n === \"style\" && typeof attributes[n] === 'object'){\n for (var i in attributes[n]) {\n element.style[i] = attributes[n][i];\n }\n }\n else if (addDirectly.indexOf(n) !== -1) {\n element[n] = attributes[n];\n }\n else {\n element.setAttribute(n, attributes[n]);\n }\n }\n }\n }", "attributes(node) {\n const elem = mona_dish_1.DQ.byId(node.id.value, true);\n node.byTagName(Const_1.XML_TAG_ATTR).each((item) => {\n elem.attr(item.attr(Const_1.ATTR_NAME).value).value = item.attr(Const_1.ATTR_VALUE).value;\n });\n }", "function setImgAttributes(imgToSetAttributes, width, height, src) {\n // $(imgToSetAttributes).width = width;\n // $(imgToSetAttributes).height = height;\n $(imgToSetAttributes).attr(\"src\", src).width(width).height(height);\n }", "function setAttributes(element, attribute) {\n for(var key in attribute) {\n element.setAttribute(key, attribute[key]);\n }\n}", "function setData(node, name, value) {\r\n var id = node[exp] || (node[exp] = ++$.uuid),\r\n store = data[id] || (data[id] = attributeData(node))\r\n if (name !== undefined) store[camelize(name)] = value\r\n return store\r\n }", "function attr(element,attrs) {\n\t\tfor (var i in attrs) {\n\t\t\telement.setAttribute(i,attrs[i]);\n\t\t}\n\t}", "function setAttributes(elm, attrs){\r\n for(var attr in attrs)\r\n elm.setAttribute(attr, attrs[attr]);\r\n return elm;\r\n}", "function setAttributes(el, options) {\n Object.keys(options).forEach(function (attr) {\n el.setAttribute(attr, options[attr]);\n });\n}", "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }", "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }", "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }", "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }", "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }", "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }", "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }", "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }", "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }", "function htmlAttribute(node,name,value) {\r\n\t\tthis.node = node;\r\n\t\tthis.name = name;\r\n\t\tthis.value = value;\r\n\t}", "setAttribute(myAttribute, myVal){\n \tthis.myComponent.setAttribute(myAttribute, myVal);\n }", "function setAttributes(el, options) {\n Object.keys(options).forEach(function(attr) {\n el.setAttribute(attr, options[attr]);\n })\n}", "function assignValorsesFull(attribut, value) {\n Xrm.Page.getAttribute(attribut).setValue(value);\n}", "function update(attribute, value) {\n\t\telement[(value ? 'set' : 'remove') + 'Attribute'](attribute, value);\n\t}", "function setData(node, name, value) {\r\n var id = node[exp] || (node[exp] = ++$.uuid),\r\n store = data[id] || (data[id] = attributeData(node))\r\n if (name !== undefined) store[camelize(name)] = value\r\n return store\r\n }", "setAttribute(element, name, value) {\n element.setAttribute(name, value);\n }", "read() {\n this._attributes.update();\n }", "setNodeAttribute(pos, attr, value) {\n this.step(new AttrStep(pos, attr, value));\n return this;\n }", "function setAttribute(node, attributeName, attributeValue) {\n node.setAttribute(attributeName, attributeValue);\n }", "set(key, value = undefined) {\n if(isArray(key) || isObject(key)) {\n this.setAttributes(key);\n }\n else {\n this.setAttribute(key, value);\n }\n\n return this;\n }", "function setAttr(el, name, value) {\n if (value === null) {\n removeAttribute(el, name);\n } else {\n el.attribs[name] = \"\" + value;\n }\n}", "function assignValorses(attribut, value) {\n if (Xrm.Page.getAttribute(attribut).getValue() == null) {\n Xrm.Page.getAttribute(attribut).setValue(value);\n }\n}", "function setAttrs( model, attrs, options ){\n\t model.__begin();\n\t\n\t applyTransform( model, attrs, model.__attributes, options );\n\t\n\t model.__commit( attrs, options );\n\t\n\t return model;\n\t}", "function setBoolAttr(d) {\n // change the element's text\n let value = d3.select(this).node().textContent;\n $(this).parent().parent().find(\">button>span.boolVal\").text(value);\n let object = d3.select($(this).parents(\"li.attribute\").first().parent().get(0)).data()[0];\n let attrName = \"cim:\" + d.attributes[0].value.substring(1);\n // update the model\n self.model.setAttribute(object, attrName, value);\n }", "function setBodyDataAttr(attrName, attrVal){\n\t\t$('body').attr('data-' + attrName, attrVal);\n\t}", "setAttrs(type, attrs) {\n this.getAttributesManager()[\"set\" + type + \"Attributes\"](attrs);\n return this;\n }" ]
[ "0.7393896", "0.7372068", "0.7353428", "0.7353428", "0.73294294", "0.73038214", "0.72554475", "0.7224709", "0.7089676", "0.7021429", "0.69919723", "0.6935125", "0.68791914", "0.6870406", "0.6850064", "0.68128455", "0.67740774", "0.67688197", "0.6763753", "0.6738889", "0.6738889", "0.668489", "0.6640595", "0.66360676", "0.66100323", "0.65770215", "0.657614", "0.657614", "0.6574433", "0.6567863", "0.6566029", "0.6543433", "0.6537558", "0.6537558", "0.6535772", "0.65295815", "0.65295815", "0.65245223", "0.6516765", "0.6502841", "0.6501901", "0.6488194", "0.6462462", "0.6458369", "0.6457", "0.6450224", "0.6450224", "0.64485395", "0.64380187", "0.64377314", "0.6434749", "0.64212334", "0.6419507", "0.6419507", "0.6401193", "0.6395522", "0.6359956", "0.635084", "0.63394177", "0.6325105", "0.63095236", "0.6308777", "0.6306668", "0.63027716", "0.6285489", "0.6278067", "0.62683034", "0.6261033", "0.6232596", "0.6214257", "0.62099224", "0.62081105", "0.6199875", "0.619614", "0.6190141", "0.61793876", "0.61793876", "0.61793876", "0.61793876", "0.61793876", "0.61793876", "0.61793876", "0.61793876", "0.61793876", "0.61699873", "0.6164812", "0.6162858", "0.6160439", "0.6152895", "0.6141321", "0.61409193", "0.61353415", "0.6126115", "0.6124687", "0.6123633", "0.610704", "0.6106594", "0.6070806", "0.6057057", "0.60463", "0.60448605" ]
0.0
-1
Auto complete value to max in this case max is 100 with Interval of 100.
function autoProgress() { var elem = document.getElementById("progressbar"); var width = 0; var id = setInterval(frame, 100); function frame(){ if(width == 100){ clearInterval(id); }else{ width++; elem.style.width = width + '%'; elem.innerHTML = width * 1 + '%'; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set max(max) {\n this._max = !isNumber(max) || max <= 0 ? 100 : max;\n }", "set _max(value) {\n Helper.UpdateInputAttribute(this, \"max\", value);\n }", "set max(value) {\n Helper.UpdateInputAttribute(this, 'max', value);\n }", "function getMaximum () {\n if ((document.getElementById('entMax').value)===\"\") {\n return 100;\n }\n else {\n return Number(document.getElementById('entMax').value) }\n }", "function fgetMaxValue(){\r\n\treturn 100;\r\n}", "set max(value) {\n Helper.UpdateInputAttribute(this, 'maxlength', value);\n }", "valueLimit(val, min=0, max=100) {\n return val < min ? min : (val > max ? max : val)\n }", "get max() { return this._max; }", "get max() { return this._max; }", "get max() { return this._max; }", "get max() { return this._max; }", "get max() { return this._max; }", "get max() { return this._max; }", "get maximumValue() {\r\n return this.i.maximumValue;\r\n }", "function getMax(inputRange) {\n if(inputRange == 1) return 5;\n else if(inputRange == 2) return 10;\n else if(inputRange == 3) return 50;\n else return 100;\n }", "getMax() {\n return this.max;\n }", "get max() {\r\n return this._max\r\n }", "setValueDiffMax (valueDiffMax) {\n this._valueDiffMax = valueDiffMax\n }", "get max() {\n return this._max;\n }", "get max() {\n return this._max;\n }", "get actualMaximumValue() {\r\n return this.i.actualMaximumValue;\r\n }", "function setMaxScore( maxScoreValue ) {\n maxScoreInput.value = maxScoreValue;\n maxScoreDisplay.textContent = maxScoreValue.toString();\n}", "get max() {\n return this.getMax();\n }", "setValueMax_by_ValueMaxObject( valueMax ) {\n this.htmlProgress.value = valueMax.valuePercentage;\n this.htmlProgress.max = valueMax.maxPercentage;\n }", "function getMax() {\n var max = Math.max.apply(null, config.values);\n max += 10 - max % 10;\n return max;\n console.log(max);\n }", "function calculateMaxValue(maximum) {\n distance = ($attrs.distance || '2.5%').trim();\n isPercent = distance.indexOf('%') !== -1;\n return isPercent ?\n maximum * (1 - parseFloat(distance) / 100) :\n maximum - parseFloat(distance);\n }", "get maxInclusive() {\n return this._maxInclusive;\n }", "function setMax() {\n var cd = curDay();\n var input = document.getElementById('date');\n input.setAttribute(\"max\", this.value);\n input.max = cd;\n input.setAttribute(\"value\", this.value);\n input.value = cd;\n}", "get maximumValue() {\r\n return this.i.bk;\r\n }", "maxOrderQuantity(maxValue) {\n return maxValue;\n }", "set maxIndex(_val) {\n (typeof _val === \"number\") && this.setAttribute(\"max\", _val);\n }", "function calculateMaxValue(maximum) {\n var distance = ($attrs.distance || '2.5%').trim();\n var isPercent = distance.indexOf('%') !== -1;\n return isPercent ?\n maximum * (1 - parseFloat(distance) / 100) :\n maximum - parseFloat(distance);\n }", "get maxValue() {\n return this.options.maxValue || null;\n }", "get maximumValue() {\n return this.i.bk;\n }", "get max() {\n\t\treturn this.__max;\n\t}", "function setMax(maxID) {\n MAX_ID = maxID;\n}", "getMax() {\n \n }", "function setMaxDate (val) {\n searchObj.maxDate = val;\n }", "function setElementProgressMax(id, max)\n{\n let target = document.getElementById(id)\n target.max = max;\n let toolTip = target.value + ' / ' + max;\n target.setAttribute('title', toolTip);\n}", "function limit ( a ) {\r\n\t\t\treturn Math.max(Math.min(a, 100), 0);\r\n\t\t}", "function setMaxDate (val) {\n searchObj.maxDate = val;\n }", "function NumberRangeLimt(ctrId,minVal,maxVal){\n//var str =$(\"#\"+ctrId.id).get(0).value.replace(/\\D/g,'');\n\tvar str = ($(\"#\"+ctrId.id).val()).replace(/\\D/g,'')*1;\n\tif(minVal != maxVal)\n\t{\n\t if(str < minVal) {return minVal;}\n\t if(str > maxVal) {return maxVal;}\n\t}\n\treturn str;\n}", "function limit ( a ) {\r\n\t\treturn Math.max(Math.min(a, 100), 0);\r\n\t}", "function limit ( a ) {\r\n\t\treturn Math.max(Math.min(a, 100), 0);\r\n\t}", "function limit ( a ) {\n\t\t\treturn Math.max(Math.min(a, 100), 0);\n\t\t}", "function limit(a) {\n return Math.max(Math.min(a, 100), 0);\n }", "function minmax(value, min, max) {\n //debugger;\n if (parseInt(value) < 1 || isNaN(value)) { return 1; }\n else if (parseInt(value) > 100) { return 100; }\n else { return value; }\n}", "function Max(maxValue, validationOptions) {\n return Object(_common_ValidateBy__WEBPACK_IMPORTED_MODULE_0__[\"ValidateBy\"])({\n name: MAX,\n constraints: [maxValue],\n validator: {\n validate: (value, args) => max(value, args.constraints[0]),\n defaultMessage: Object(_common_ValidateBy__WEBPACK_IMPORTED_MODULE_0__[\"buildMessage\"])(eachPrefix => eachPrefix + '$property must not be greater than $constraint1', validationOptions),\n },\n }, validationOptions);\n}", "function count_and_redefine_max(e){\n\t try{\n\t // get the input and the maximum length\n\t var input = j( e.currentTarget || e )\n\t \n\t \n\t // cap at the maximum!\n\t //parseInt\n\t \n\t // Reformat the display\n\t if( input.siblings('.limit_input').length > 0 ){\n\t var max_val = input.siblings('.limit_input').text().match( /.*\\/(.*)/ )[1]\n\t input.siblings('.limit_input').text( input.val().length + \"/\" + max_val )\n\t }else{ // in case field has errors, it won't break stuff\n\t var limit_span = input.parent().prevAll('.limit_input:first')\n\t var max_val = limit_span.text().match( /.*\\/(.*)/ )[1]\n\t limit_span.text( input.val().length + \"/\" + max_val )\n\t }\n\t \n\t } catch(e){\n\t // if has no max, keep walking, JW\n\t }\n\t}", "function limit ( a ) {\n\t\treturn Math.max(Math.min(a, 100), 0);\n\t}", "function limit ( a ) {\n\t\treturn Math.max(Math.min(a, 100), 0);\n\t}", "function limit ( a ) {\n\t\treturn Math.max(Math.min(a, 100), 0);\n\t}", "function limit ( a ) {\n\t\treturn Math.max(Math.min(a, 100), 0);\n\t}", "function limit ( a ) {\n\t\treturn Math.max(Math.min(a, 100), 0);\n\t}", "function limit ( a ) {\n\t\treturn Math.max(Math.min(a, 100), 0);\n\t}", "function limit ( a ) {\n\t\treturn Math.max(Math.min(a, 100), 0);\n\t}", "function limit ( a ) {\n\t\treturn Math.max(Math.min(a, 100), 0);\n\t}", "function limit ( a ) {\n\t\treturn Math.max(Math.min(a, 100), 0);\n\t}", "function limit ( a ) {\n\t\treturn Math.max(Math.min(a, 100), 0);\n\t}", "function limit ( a ) {\n\t\treturn Math.max(Math.min(a, 100), 0);\n\t}", "function limit ( a ) {\n\t\treturn Math.max(Math.min(a, 100), 0);\n\t}", "function limit ( a ) {\n\t\treturn Math.max(Math.min(a, 100), 0);\n\t}", "function limitArea(max, value) {\n return Math.min(max, Math.max(0, value));\n}", "max(max) {\n this.checkSearchType();\n if (!this.options.block) {\n this.options.block = {};\n }\n this.options.block.max = max;\n return this;\n }", "function increaseMax() {\n newMax = getMaximum()+10;\n max = newMax;\n return max;\n }", "function maxLenght(){\n $('.max').maxlength({\n alwaysShow: true,\n warningClass: \"badge badge-success\",\n limitReachedClass: \"badge badge-danger\"\n });\n}", "makeFull() {\n this.setValue(this._maxValue);\n }", "function limit(a) {\n return Math.max(Math.min(a, 100), 0);\n }", "function limit(a) {\n return Math.max(Math.min(a, 100), 0);\n }", "function limit(a) {\n return Math.max(Math.min(a, 100), 0);\n }", "function limit(a) {\n return Math.max(Math.min(a, 100), 0);\n }", "function limit(a) {\n return Math.max(Math.min(a, 100), 0);\n }", "function limit(a) {\n return Math.max(Math.min(a, 100), 0);\n }", "function findMax(){\n let maxVal = max(parseInt(document.getElementById(\"max1\").value), parseInt(document.getElementById(\"max2\").value));\n document.getElementById(\"resultMax\").innerHTML = maxVal;\n}", "function showMax(event, obj) {\n if (obj) {\n if (Number(obj.val().slice(1, obj.val().length))) {\n minAmount = obj.val();\n if ($(\"#max\").val()) {\n var maxText = $(\"#max\").val();\n }\n if (minAmount.indexOf(\"$\") === -1) {\n minAmount = \"$\" + obj.val();\n }\n if (maxText) {\n $(\"#rent-range\").html(minAmount + \"-$\" + maxText);\n }\n else {\n $(\"#rent-range\").html(minAmount + \"+\");\n }\n }\n else {\n if (maxVal) {\n $(\"#rent-range\").html(\"<\" + maxVal)\n }\n else {\n $(\"#rent-range\").html(\"Rent Range\");\n }\n }\n }\n $(\"#max-column\").css(\"display\", \"initial\");\n $(\"#min-column\").css(\"display\", \"none\");\n }", "set max(mL) {\n if (typeof mL !== 'number' || mL < 0) throw new TypeError('max must be a non-negative number');\n this[MAX] = mL || Infinity;\n trim(this);\n }", "function maxNum(){\n var m = Math.max(2, 3, 8, 22, 22.2);\n document.getElementById(\"max\").innerHTML = \"Between these numbers [2,3,8,22] the highest value is: \" + m;\n}", "function maxDecimales (){\n inputDecimales.value;\n}", "set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }", "set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }", "set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }", "set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }", "set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }", "set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }", "set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }", "set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }", "set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }", "set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }", "set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }", "set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }", "set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }", "set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }", "set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }", "function constrain(value, min, max) {\n return Math.min(Math.max(value, min), max);\n}", "function clamp(value){return $window.Math.max(0,$window.Math.min(value||0,100));}", "static get MAX_VALUE() {\n return 127;\n }", "set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity;\n trim(this);\n }", "function limiter(v,min,max){\n var v = Math.min(Math.max(v, min), max);\n return v;\n}", "function maxVal(item) {\n if (item === \"Temperature\") return 120; // max in clean is 109.6\n if (item.includes(\"Fatalities\")) return 700; // max in clean is 587\n if (item.includes(\"Maize\")) return 40000; // max in clean is 36600\n if (item.includes(\"Rice\")) return 30000; // max in clean is 25000, but max in raw is 60000\n if (item.includes(\"Sorghum\")) return 40000;\n if (item.includes(\"Cowpeas\")) return 100000; // max in clean is 80000\n return 100;\n}", "max() {}", "function bound(min, max, val)\n\t{\n\t\treturn Math.max(Math.min(val, max), min);\n\t}" ]
[ "0.7480409", "0.7174174", "0.71028346", "0.7095999", "0.6936987", "0.6797335", "0.6754082", "0.66732305", "0.66732305", "0.66732305", "0.66732305", "0.66732305", "0.66732305", "0.6604408", "0.65543056", "0.65214616", "0.6519194", "0.6509064", "0.64966697", "0.6478105", "0.64702386", "0.6454371", "0.64479125", "0.64386195", "0.63738674", "0.6370136", "0.63667226", "0.6360699", "0.6358118", "0.63526535", "0.6348928", "0.63468224", "0.6319201", "0.63130796", "0.6311731", "0.62998974", "0.6297946", "0.6265792", "0.62434554", "0.61978096", "0.6186442", "0.61743325", "0.61612564", "0.61612564", "0.61611766", "0.61608773", "0.6124088", "0.61168087", "0.61096764", "0.61083996", "0.61083996", "0.61083996", "0.61083996", "0.61083996", "0.61083996", "0.61083996", "0.61083996", "0.61083996", "0.61083996", "0.61083996", "0.61083996", "0.61083996", "0.6098286", "0.60904634", "0.60762227", "0.6062718", "0.6059687", "0.6053915", "0.6053915", "0.6053915", "0.6053915", "0.6053915", "0.6053915", "0.6041046", "0.60281694", "0.60279626", "0.60257953", "0.60248035", "0.60027736", "0.60027736", "0.60027736", "0.60027736", "0.60027736", "0.60027736", "0.60027736", "0.60027736", "0.60027736", "0.60027736", "0.60027736", "0.60027736", "0.60027736", "0.60027736", "0.60027736", "0.59977216", "0.59976655", "0.59834474", "0.59745955", "0.59743303", "0.59731656", "0.59710246", "0.596537" ]
0.0
-1
The function whose prototype chain sequence wrappers inherit from.
function baseLodash(){// No operation performed. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get prototype() {}", "function FunctionWithPrototypeTest() {}", "function n(e,t){e.prototype.__proto__=t&&t.prototype,e.__proto__=t}", "function inheritFrom(subfn,superfn) {\n\tvar r = function () {}\n\tr.prototype = superfn.prototype;\n\tsubfn.prototype = new r();\n}", "function m(a){var b=function(){};return b.prototype=a,new b}", "function i(t,e){a(t,e),Object.getOwnPropertyNames(e.prototype).forEach(function(n){a(t.prototype,e.prototype,n)}),Object.getOwnPropertyNames(e).forEach(function(n){a(t,e,n)})}", "function i(t,e){a(t,e),Object.getOwnPropertyNames(e.prototype).forEach(function(n){a(t.prototype,e.prototype,n)}),Object.getOwnPropertyNames(e).forEach(function(n){a(t,e,n)})}", "function getFunctionParent() {\n\t return this.findParent(function (path) {\n\t return path.isFunction() || path.isProgram();\n\t });\n\t}", "function getFunctionParent() {\n\t return this.findParent(function (path) {\n\t return path.isFunction() || path.isProgram();\n\t });\n\t}", "function getFunctionParent() {\n\t return this.findParent(function (path) {\n\t return path.isFunction() || path.isProgram();\n\t });\n\t}", "function getFunctionParent() {\n\t return this.findParent(function (path) {\n\t return path.isFunction() || path.isProgram();\n\t });\n\t}", "function getFunctionParent() {\n\t return this.findParent(function (path) {\n\t return path.isFunction() || path.isProgram();\n\t });\n\t}", "function i(t,e){a(t,e),Object.getOwnPropertyNames(e.prototype).forEach((function(n){a(t.prototype,e.prototype,n)})),Object.getOwnPropertyNames(e).forEach((function(n){a(t,e,n)}))}", "function i(t,e){a(t,e),Object.getOwnPropertyNames(e.prototype).forEach((function(n){a(t.prototype,e.prototype,n)})),Object.getOwnPropertyNames(e).forEach((function(n){a(t,e,n)}))}", "function F() {}", "function F() {}", "function F() {}", "function F() {}", "function F() {}", "function F() {}", "function F() {}", "function F() {}", "function F() {}", "function F() {}", "function F() {}", "function F() {}", "function r(e,t){s(e,t),Object.getOwnPropertyNames(t.prototype).forEach(function(o){s(e.prototype,t.prototype,o)}),Object.getOwnPropertyNames(t).forEach(function(o){s(e,t,o)})}", "function inherit(){}", "function a(e,t){function i(){this.constructor=e}o(e,t),e.prototype=null===t?RS(t):(i.prototype=t.prototype,new i)}", "function A() {}", "function getFunctionParent() {\n return this.findParent(function (path) {\n return path.isFunction() || path.isProgram();\n });\n}", "function Nothing$prototype$chain(f) {\n return this;\n }", "function R(e,t){function n(){this.constructor=e}A(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}", "function Pf(a){return Qf(a||arguments.callee.caller,[])}", "function F() { }", "function i(t,e){function n(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}", "getPrototypeOf() {\n return null;\n }", "function a(t,e){o(t,e),Object.getOwnPropertyNames(e.prototype).forEach((function(n){o(t.prototype,e.prototype,n)})),Object.getOwnPropertyNames(e).forEach((function(n){o(t,e,n)}))}", "function functionPrototypeTest() {\n var ret;\n\n print(Object.prototype.toString.call(Function.prototype));\n print(Object.getPrototypeOf(Function.prototype) === Object.prototype);\n print(Object.isExtensible(Function.prototype));\n print('length' in Function.prototype, Function.prototype.length);\n print('constructor' in Function.prototype, Function.prototype.constructor === Function);\n\n ret = Function.prototype('foo', 'bar');\n print(typeof ret, ret);\n}", "function a(e,t){function n(){}n.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new n,e.prototype.constructor=e}", "function inderit(C, P) {\n function F() {};\n F.prototype = P.prototype;\n C.prototype = new F();\n}", "function ef(e,t){function n(){this.constructor=e}Jd(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}", "constructor() {\n var prototype = Object.getPrototypeOf(this);\n }", "function p(e,t){function n(){this.constructor=e}N(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}", "function l(e,t){function r(){this.constructor=e}c(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}", "function v37() {\n function v11() {\n function a() {\n }\n function v6() {\n a.prototype = this;\n var c = new a;\n return c\n }\n var v203 = {extend:v6};\n return v203\n }\n var ret = {};\n ret.A = v11();\n ret.B = ret.A.extend();\n return ret;\n}", "function x(t){return\"function\"==typeof t?t:function(){return t}}", "function Function$prototype$chain(f) {\n var chain = this;\n return function(x) { return f (chain (x)) (x); };\n }", "function Function$prototype$chain(f) {\n var chain = this;\n return function(x) { return f(chain(x))(x); };\n }", "function R(e,t){function n(){this.constructor=e}z(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}", "constructor() {\n super(...arguments);\n var prototype = Object.getPrototypeOf(this);\n }", "constructor() {\n super(...arguments);\n var prototype = Object.getPrototypeOf(this);\n }", "function i(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}", "function i(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}", "function i(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}", "function i(t,e){function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}", "function firstClass(base){\n //returns anonymous function evaluating the new paremeter to the power of whatever the base it set to\n return (q) => q ** base;\n}", "function e(e,t){function n(){}n.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new n,e.prototype.constructor=e}", "function superClass(...args) {}", "function i(e,t){function i(){}i.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new i,e.prototype.constructor=e}", "function Se(e,t){function n(){this.constructor=e}_e(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}", "function r(e){return\"function\"===typeof e}", "function r(e){return\"function\"===typeof e}", "function C() {}", "function C() {}", "function F(){}", "function n(e,t){function n(){}n.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new n,e.prototype.constructor=e}", "function n(e,t){function n(){}n.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new n,e.prototype.constructor=e}", "function n(e,t){function n(){}n.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new n,e.prototype.constructor=e}", "set prototype(value) {}", "function c(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "function i(e){return\"function\"===typeof e}", "function e(A){return\"undefined\"!==typeof Function&&A instanceof Function||\"[object Function]\"===Object.prototype.toString.call(A)}", "function i(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}", "function i(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}", "function o(e,t){s(e,t),Object.getOwnPropertyNames(t.prototype).forEach((function(n){s(e.prototype,t.prototype,n)})),Object.getOwnPropertyNames(t).forEach((function(n){s(e,t,n)}))}", "function o(e,t){a(e,t),Object.getOwnPropertyNames(t.prototype).forEach((function(r){a(e.prototype,t.prototype,r)})),Object.getOwnPropertyNames(t).forEach((function(r){a(e,t,r)}))}", "function Nothing$prototype$extend(f) {\n return this;\n }", "function primBeget(proto) {\n if (proto === null) { fail('Cannot beget from null.'); }\n if (proto === (void 0)) { fail('Cannot beget from undefined.'); }\n function F() {}\n F.prototype = proto;\n var result = new F();\n result.proto___ = proto;\n return result;\n }", "function o(e,t){a(e,t),Object.getOwnPropertyNames(t.prototype).forEach(function(n){a(e.prototype,t.prototype,n)}),Object.getOwnPropertyNames(t).forEach(function(n){a(e,t,n)})}", "function o(t,e){a(t,e),Object.getOwnPropertyNames(e.prototype).forEach(function(n){a(t.prototype,e.prototype,n)}),Object.getOwnPropertyNames(e).forEach(function(n){a(t,e,n)})}", "function o(t,e){a(t,e),Object.getOwnPropertyNames(e.prototype).forEach(function(n){a(t.prototype,e.prototype,n)}),Object.getOwnPropertyNames(e).forEach(function(n){a(t,e,n)})}", "function o(t,e){a(t,e),Object.getOwnPropertyNames(e.prototype).forEach(function(n){a(t.prototype,e.prototype,n)}),Object.getOwnPropertyNames(e).forEach(function(n){a(t,e,n)})}", "function o(t,e){a(t,e),Object.getOwnPropertyNames(e.prototype).forEach(function(n){a(t.prototype,e.prototype,n)}),Object.getOwnPropertyNames(e).forEach(function(n){a(t,e,n)})}", "function Prototype() {\n }", "function o(e,t){a(e,t),Object.getOwnPropertyNames(t.prototype).forEach((function(n){a(e.prototype,t.prototype,n)})),Object.getOwnPropertyNames(t).forEach((function(n){a(e,t,n)}))}", "function o(e,t){a(e,t),Object.getOwnPropertyNames(t.prototype).forEach((function(n){a(e.prototype,t.prototype,n)})),Object.getOwnPropertyNames(t).forEach((function(n){a(e,t,n)}))}", "function l(t,e){function o(){this.constructor=t}u(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}", "function printable(constructorFn) {\n constructorFn.prototype.print = function () {\n console.log(this);\n };\n}", "function I () {}", "function a(t,e){function a(){}a.prototype=e.prototype,t.superClass_=e.prototype,t.prototype=new a,t.prototype.constructor=t}", "function e(t,e){function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}", "function y(){f.call(this)}", "function y(){f.call(this)}", "function y(){f.call(this)}", "function C(e){return C=\"function\"===typeof Symbol&&\"symbol\"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},C(e)}", "function C(e){return C=\"function\"===typeof Symbol&&\"symbol\"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},C(e)}", "function getSuperCallInConstructor(constructor) {\n var links = getNodeLinks(constructor);\n // Only trying to find super-call if we haven't yet tried to find one. Once we try, we will record the result\n if (links.hasSuperCall === undefined) {\n links.superCall = findFirstSuperCall(constructor.body);\n links.hasSuperCall = links.superCall ? true : false;\n }\n return links.superCall;\n }", "function E(e,t){function i(){this.constructor=e}T(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}", "function uf(e,t){function i(){this.constructor=e}Af(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}", "function Ac(e,t){function n(){this.constructor=e}Rc(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}" ]
[ "0.63448894", "0.62097377", "0.5887767", "0.58376676", "0.5755025", "0.5730794", "0.5730794", "0.5718774", "0.5718774", "0.5718774", "0.5718774", "0.5718774", "0.5716435", "0.5716435", "0.5680218", "0.5680218", "0.5680218", "0.5680218", "0.5680218", "0.5680218", "0.5680218", "0.5680218", "0.5680218", "0.5680218", "0.5680218", "0.5680218", "0.56530213", "0.56439906", "0.5638031", "0.5625393", "0.5618946", "0.5607575", "0.5558987", "0.55570686", "0.55518055", "0.55476135", "0.55427605", "0.5535257", "0.5523692", "0.55151546", "0.55089843", "0.5507201", "0.54995483", "0.54817575", "0.54624486", "0.5460899", "0.5456788", "0.5454103", "0.54498327", "0.5443964", "0.5443956", "0.5443956", "0.54403055", "0.54403055", "0.54403055", "0.5414321", "0.54138845", "0.54111713", "0.54078984", "0.5394908", "0.53906685", "0.53888035", "0.53888035", "0.5374297", "0.5374297", "0.5374121", "0.5372385", "0.5372385", "0.5372385", "0.5363517", "0.5356349", "0.5344532", "0.53387505", "0.5337889", "0.5337889", "0.5329", "0.5326598", "0.5323822", "0.53181916", "0.5316617", "0.5311892", "0.5311892", "0.5311892", "0.5311892", "0.53083664", "0.53043914", "0.53043914", "0.528756", "0.52804637", "0.5279807", "0.5279634", "0.52791077", "0.5268846", "0.5268846", "0.5268846", "0.5265926", "0.5265926", "0.52646285", "0.526328", "0.52537423", "0.5253334" ]
0.0
-1
Removes all keyvalue entries from the hash.
function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{};this.size=0;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }", "function clear() {\n this.keys.forEach((key) => {\n this._store[key] = undefined;\n delete this._store[key];\n });\n}", "remove(key) {\r\n const hash = this.calculateHash(key);\r\n if(this.values.hasOwnProperty(hash) && this.values[hash].hasOwnProperty(key)) {\r\n delete this.values[hash][key];\r\n this.numberOfValues--;\r\n }\r\n }", "removeFromHash(hash, ...keys) {\n let hashObj = this.parseHash(hash);\n keys.forEach((key, i) => {\n delete hashObj[key]\n });\n return this.buildHash(hashObj);\n }", "clear() {\n log.map(\"Clearing the map of all the entries\");\n this._map.clear();\n }", "function _cleanupKeys()\n {\n if (this._count == this._keys.length) {\n return;\n }\n var srcIndex = 0;\n var destIndex = 0;\n var seen = {};\n while (srcIndex < this._keys.length) {\n var key = this._keys[srcIndex];\n if (_hasKey(this._map, key)\n && !_hasKey(seen, key)\n ) {\n this._keys[destIndex++] = key;\n seen[key] = true;\n }\n srcIndex++;\n }\n this._keys.length = destIndex;\n }", "async clear() {\n return await keyv.clear();\n }", "remove() {\n for (var key of this.keys) {\n this.elements[key].remove();\n }\n }", "function clear () {\n keys().each(function (cookie) {\n remove(cookie);\n });\n }", "function clearAll(){\r\n\tObject.keys(this.datastore).forEach((key)=>\r\n\t{\r\n\t\tdelete this.datastore[key];\r\n\t});\t\r\n}", "function hashClear() {\n\t\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t\t this.size = 0;\n\t\t}", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "clear() {\n for (const key of Object.keys(this.datastore)) {\n delete this.datastore[key];\n // this.remove(key);\n }\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t\t this.size = 0;\n\t\t }", "function hashClear() {\n\t\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t\t this.size = 0;\n\t\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }" ]
[ "0.67331547", "0.66229314", "0.65130246", "0.6456053", "0.62131137", "0.6201214", "0.6139392", "0.61100906", "0.6029288", "0.5966744", "0.59360605", "0.59072584", "0.59072584", "0.59072584", "0.59040016", "0.5900616", "0.5900616", "0.5900616", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.5862478", "0.5862478", "0.5849724", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314" ]
0.0
-1
Removes all keyvalue entries from the list cache.
function listCacheClear(){this.__data__=[];this.size=0;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listCacheClear(){this.__data__=[];}", "function listCacheClear(){this.__data__=[];}", "function listCacheClear(){this.__data__=[];}", "function listCacheClear(){this.__data__=[];}", "function listCacheClear() {\n\t\t this.__data__ = [];\n\t\t this.size = 0;\n\t\t}", "function listCacheClear() {\n\t\t this.__data__ = [];\n\t\t}", "function listCacheClear() {\n\t\t this.__data__ = [];\n\t\t}", "function listCacheClear() {\n\t\t this.__data__ = [];\n\t\t }", "function listCacheClear(){this.__data__=[];this.size=0}", "function listCacheClear(){this.__data__=[];this.size=0}", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n\t this.__data__ = [];\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }" ]
[ "0.7357779", "0.7357779", "0.7357779", "0.7357779", "0.7317932", "0.72645503", "0.72645503", "0.7262977", "0.72569066", "0.72569066", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.72320706", "0.7231067", "0.7231067", "0.7231067", "0.7231067", "0.7231067", "0.7231067", "0.7226719", "0.7226719", "0.7226719", "0.7226719", "0.7214961", "0.7214961", "0.7207822", "0.7207822", "0.7207822", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724" ]
0.7236393
19
Removes all keyvalue entries from the map.
function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }", "clear() {\n log.map(\"Clearing the map of all the entries\");\n this._map.clear();\n }", "function multiMapRemove(map, key, value) {\n const values = map.get(key);\n if (values) {\n array_1.removeUnordered(values, value);\n if (values.length === 0)\n map.delete(key);\n }\n}", "function _cleanupKeys()\n {\n if (this._count == this._keys.length) {\n return;\n }\n var srcIndex = 0;\n var destIndex = 0;\n var seen = {};\n while (srcIndex < this._keys.length) {\n var key = this._keys[srcIndex];\n if (_hasKey(this._map, key)\n && !_hasKey(seen, key)\n ) {\n this._keys[destIndex++] = key;\n seen[key] = true;\n }\n srcIndex++;\n }\n this._keys.length = destIndex;\n }", "function clear() {\n this.keys.forEach((key) => {\n this._store[key] = undefined;\n delete this._store[key];\n });\n}", "remove() {\n for (var key of this.keys) {\n this.elements[key].remove();\n }\n }", "function mapClear(){this.__data__={'hash':new Hash(),'map':Map?new Map():[],'string':new Hash()};}", "function mapClear(){this.__data__={'hash':new Hash(),'map':Map?new Map():[],'string':new Hash()};}", "function mapClear(){this.__data__={'hash':new Hash(),'map':Map?new Map():[],'string':new Hash()};}", "function mapClear() {\n this.__data__ = { 'hash': new Hash, 'map': Map ? new Map : [], 'string': new Hash };\n }", "function mapClear() {\n this.__data__ = { 'hash': new Hash, 'map': Map ? new Map : [], 'string': new Hash };\n }", "function mapClear() {\n this.__data__ = { 'hash': new Hash, 'map': Map ? new Map : [], 'string': new Hash };\n }", "function mapClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': Map ? new Map : [],\n\t 'string': new Hash\n\t };\n\t }", "remove(key) {\r\n const hash = this.calculateHash(key);\r\n if(this.values.hasOwnProperty(hash) && this.values[hash].hasOwnProperty(key)) {\r\n delete this.values[hash][key];\r\n this.numberOfValues--;\r\n }\r\n }", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "function mapClear() {\n\t this.__data__ = {\n\t 'hash': new Hash(),\n\t 'map': Map ? new Map() : [],\n\t 'string': new Hash()\n\t };\n\t}", "function mapClear() {\n\t this.__data__ = { 'hash': new Hash, 'map': Map ? new Map : [], 'string': new Hash };\n\t}", "function mapClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': Map ? new Map : [],\n\t 'string': new Hash\n\t };\n\t}", "function mapClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': Map ? new Map : [],\n\t 'string': new Hash\n\t };\n\t}", "function mapClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': Map ? new Map : [],\n\t 'string': new Hash\n\t };\n\t}", "function mapClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': Map ? new Map : [],\n\t 'string': new Hash\n\t };\n\t}", "function mapClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': Map ? new Map : [],\n\t 'string': new Hash\n\t };\n\t}", "function mapClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': Map ? new Map : [],\n\t 'string': new Hash\n\t };\n\t}", "clear() {\n this.map = {};\n if (this.store) this.store.clear();\n }", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n}", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n}", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n}", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n}", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n}", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n}", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n}", "function clear()\r{\r\tvar end = mapping_names.length;\r\r\tfor(var i=end-1; i>=0; i--){\r\t\tremove(mapping_names[i]);\r\t}\r\twhile(mapping_names.pop());\r\twhile(mapping_sources.pop());\r\twhile(mapping_destinations.pop());\r\twhile(mapping_algorithms.pop());\r}", "function filterMutateMap(map, predicate) {\n for (const [key, value] of map) {\n if (!predicate(key, value)) {\n map.delete(key);\n }\n }\n}", "delete(key) {\n this.map[key] = undefined;\n if (this.store) this.store.removeItem(key);\n }", "mapRemove() {\n\n\t\tthis.map.remove();\n\n\t}", "garbageCollect() {\n // Q: Can we delete keys from the map while iterating over it?\n // A: The ECMA spec states that yes, keys may be deleted during forEach.\n // It is less clear for iterators.\n let deleteBefore = new Date().getTime() - MAX_GLOBAL_COOLDOWN;\n this._cooldowns.forEach((value, key) => {\n if (value < deleteBefore) {\n this._cooldowns.delete(key);\n }\n });\n }", "function clearAll(){\r\n\tObject.keys(this.datastore).forEach((key)=>\r\n\t{\r\n\t\tdelete this.datastore[key];\r\n\t});\t\r\n}", "async clear() {\n return await keyv.clear();\n }", "clear() {\n for (const key of Object.keys(this.datastore)) {\n delete this.datastore[key];\n // this.remove(key);\n }\n }", "function clearObjects() {\n setMapOnAll(null);\n}", "clear() {\n const _ = this;\n _._map.clear();\n _._nameSet.clear();\n }", "function mapCacheClear(){this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "function mapCacheClear(){this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "function mapCacheClear(){this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "function mapCacheClear(){this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "function clear () {\n keys().each(function (cookie) {\n remove(cookie);\n });\n }", "function clean_maps() {\n var count;\n list_maps();\n\n for (var k in maps) {\n for (var i = 0; i < maps[k].length; i++) {\n var map = maps[k][i];\n count++;\n\n // if map render job is idle and last render process is older than\n // an hour, remove map\n if (map.renderer_idle && (time() - map.renderer_stop > 3600000)) {\n console.log(k + '/' + i + ': garbage collector removes map');\n maps[k].splice(i, 1);\n i--;\n }\n }\n }\n}", "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map$1||ListCache)(),'string':new Hash()};}", "stopAll() {\n const _ = this;\n for (const entry of _._map.values()) {\n clearTimeout(entry.handle);\n }\n _._map.clear();\n }", "function mapCacheClear() {\n\t\t this.size = 0;\n\t\t this.__data__ = {\n\t\t 'hash': new Hash,\n\t\t 'map': new (Map || ListCache),\n\t\t 'string': new Hash\n\t\t };\n\t\t}", "function mapCacheClear() {\n\t\t this.__data__ = {\n\t\t 'hash': new Hash,\n\t\t 'map': new (Map || ListCache),\n\t\t 'string': new Hash\n\t\t };\n\t\t}", "function mapCacheClear() {\n\t\t this.__data__ = {\n\t\t 'hash': new Hash,\n\t\t 'map': new (Map || ListCache),\n\t\t 'string': new Hash\n\t\t };\n\t\t}", "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new _Hash,\n 'map': new (_Map || _ListCache),\n 'string': new _Hash\n };\n }", "function mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map$1 || ListCache)(),\n 'string': new Hash()\n };\n }", "function mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map$1 || ListCache)(),\n 'string': new Hash()\n };\n }", "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new _Hash(),\n 'map': new (_Map || _ListCache)(),\n 'string': new _Hash()\n };\n }", "clearance () {\n mapDoS.forEach((val, key, map) => {\n if (val.at < moment().utc().subtract(val.interval, 'seconds')) {\n map.delete(key)\n }\n })\n }", "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new _Hash.default(),\n 'map': new (_Map.default || _ListCache.default)(),\n 'string': new _Hash.default()\n };\n }", "function mapCacheClear() {\n\t this.size = 0;\n\t this.__data__ = {\n\t 'hash': new _Hash(),\n\t 'map': new (_Map || _ListCache)(),\n\t 'string': new _Hash()\n\t };\n\t}", "function clearEntry () {\n\n nextValue = null;\n}", "remove(key) {\n let index = this._hash(key);\n if (this.keyMap[index] && this.keyMap[index].length) {\n this.keyMap[index] = undefined;\n this.size--;\n return true;\n } else {\n return false;\n }\n }", "function mapCacheClear() {\n\t this.size = 0;\n\t this.__data__ = {\n\t 'hash': new _Hash,\n\t 'map': new (_Map || _ListCache),\n\t 'string': new _Hash\n\t };\n\t}", "function mapCacheClear() {\n\t this.size = 0;\n\t this.__data__ = {\n\t 'hash': new _Hash,\n\t 'map': new (_Map || _ListCache),\n\t 'string': new _Hash\n\t };\n\t}", "function mapCacheClear() {\n\t this.size = 0;\n\t this.__data__ = {\n\t 'hash': new _Hash,\n\t 'map': new (_Map || _ListCache),\n\t 'string': new _Hash\n\t };\n\t}", "function mapCacheClear() {\n\t this.size = 0;\n\t this.__data__ = {\n\t 'hash': new _Hash,\n\t 'map': new (_Map || _ListCache),\n\t 'string': new _Hash\n\t };\n\t}", "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map$1 || ListCache),\n 'string': new Hash\n };\n }", "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map$1 || ListCache),\n 'string': new Hash\n };\n }", "function mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map$1 || ListCache),\n 'string': new Hash\n };\n }", "function mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map$1 || ListCache),\n 'string': new Hash\n };\n }", "function mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map$1 || ListCache),\n 'string': new Hash\n };\n }", "function clearAllMarkers() {\n setMarkersOnMap(null);\n}", "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map || ListCache)(),\n 'string': new Hash()\n };\n }", "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map || ListCache)(),\n 'string': new Hash()\n };\n }", "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new _Hash,\n 'map': new (_Map || _ListCache),\n 'string': new _Hash\n };\n }", "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new _Hash,\n 'map': new (_Map || _ListCache),\n 'string': new _Hash\n };\n }", "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new _Hash,\n 'map': new (_Map || _ListCache),\n 'string': new _Hash\n };\n }", "clear () {\n if (this.doc !== null) {\n transact(this.doc, transaction => {\n this.forEach(function (_value, key, map) {\n typeMapDelete(transaction, map, key)\n })\n })\n } else {\n /** @type {Map<string, any>} */ (this._prelimContent).clear()\n }\n }", "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map$1 || ListCache),\n 'string': new Hash\n };\n }", "function mapCacheClear() {\n\tthis.size = 0;\n\tthis.__data__ = {\n\t\thash: new _Hash(),\n\t\tmap: new ( _Map || _ListCache )(),\n\t\tstring: new _Hash(),\n\t};\n}", "function mapCacheClear() {\n\t this.__data__ = {\n\t 'hash': new Hash(),\n\t 'map': new (Map || ListCache)(),\n\t 'string': new Hash()\n\t };\n\t }", "function clearAllMarkers() {\n setAllMap(null);\n}", "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map || ListCache)(),\n 'string': new Hash()\n };\n }", "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map || ListCache)(),\n 'string': new Hash()\n };\n }", "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map || ListCache)(),\n 'string': new Hash()\n };\n }" ]
[ "0.7590112", "0.70694387", "0.6735414", "0.6652174", "0.6530006", "0.6267597", "0.62582785", "0.62582785", "0.62582785", "0.617115", "0.617115", "0.617115", "0.6166302", "0.61519635", "0.614778", "0.614778", "0.614778", "0.614778", "0.614778", "0.614778", "0.614778", "0.614778", "0.614778", "0.6128783", "0.6107819", "0.61020905", "0.61020905", "0.61020905", "0.61020905", "0.61020905", "0.61020905", "0.60481024", "0.60264283", "0.60264283", "0.60264283", "0.60264283", "0.60264283", "0.60264283", "0.60264283", "0.6025953", "0.6008959", "0.60038495", "0.5983478", "0.59401333", "0.5922161", "0.5904722", "0.5903561", "0.58624434", "0.58589303", "0.5847903", "0.5847903", "0.5847903", "0.5847903", "0.58467245", "0.5841128", "0.58262974", "0.57226574", "0.5719132", "0.5708688", "0.5708688", "0.57040244", "0.56992704", "0.56992704", "0.5689804", "0.5685224", "0.5684027", "0.5682696", "0.56815845", "0.56811434", "0.5673945", "0.5673945", "0.5673945", "0.5673945", "0.5673529", "0.5673529", "0.5672286", "0.5672286", "0.5672286", "0.5660965", "0.5659265", "0.5659265", "0.5655427", "0.5655427", "0.5655427", "0.56540984", "0.5646518", "0.56439686", "0.5634391", "0.5630649", "0.5630361", "0.5630361", "0.5630361" ]
0.5723219
61
Removes all keyvalue entries from the stack.
function stackClear(){this.__data__=new ListCache();this.size=0;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear () {\n this._dict = {}\n this._stack = [this._dict]\n }", "function stackClear(){this.__data__={'array':[],'map':null};}", "function stackClear(){this.__data__={'array':[],'map':null};}", "function stackClear(){this.__data__={'array':[],'map':null};}", "function stackClear() {\n\t this.__data__ = { 'array': [], 'map': null };\n\t }", "function stackClear() {\n\t this.__data__ = { 'array': [], 'map': null };\n\t}", "function stackClear() {\n\t this.__data__ = { 'array': [], 'map': null };\n\t}", "function stackClear() {\n\t this.__data__ = { 'array': [], 'map': null };\n\t}", "function stackClear() {\n\t this.__data__ = { 'array': [], 'map': null };\n\t}", "function stackClear() {\n\t this.__data__ = { 'array': [], 'map': null };\n\t}", "function stackClear() {\n\t this.__data__ = { 'array': [], 'map': null };\n\t}", "function stackClear() {\n\t this.__data__ = { 'array': [], 'map': null };\n\t}", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n }", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n }", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n }", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n }", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n }", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n }", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n }", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n }", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n }", "function stackClear() {\n this.__data__ = new _ListCache.default();\n this.size = 0;\n }", "function stackClear() {\n\tthis.__data__ = new _ListCache();\n\tthis.size = 0;\n}", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n}", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n}", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n}", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n}", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n}", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n}", "function stackClear() {\n\t this.__data__ = new _ListCache();\n\t this.size = 0;\n\t}", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n }", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n }", "function stackClear() {\n\t this.__data__ = new ListCache();\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache();\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache();\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache();\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache();\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache();\n\t this.size = 0;\n\t}", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n }", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n }", "function stackClear() {\n\t\t this.__data__ = new ListCache;\n\t\t this.size = 0;\n\t\t}", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n }", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n }", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n }", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n }", "function stackClear() {\n\t this.__data__ = new ListCache();\n\t}", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n }", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n }", "function stackClear() {\n\t this.__data__ = new ListCache();\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache();\n\t this.size = 0;\n\t }", "function stackClear() {\n this.__data__ = new _ListCache.default();\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new _ListCache.default();\n this.size = 0;\n}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}" ]
[ "0.63588345", "0.6331268", "0.6331268", "0.6331268", "0.627537", "0.6229357", "0.6229357", "0.6229357", "0.6229357", "0.6229357", "0.6229357", "0.6229357", "0.6218875", "0.6218875", "0.6218875", "0.6218875", "0.6218875", "0.6218875", "0.6218875", "0.6218875", "0.6218875", "0.61260575", "0.6125444", "0.6119441", "0.6119441", "0.6119441", "0.6119441", "0.6119441", "0.6119441", "0.6115717", "0.6111568", "0.6111568", "0.610666", "0.610666", "0.610666", "0.610666", "0.610666", "0.610666", "0.6103306", "0.6103306", "0.61000633", "0.60999733", "0.60999733", "0.60999733", "0.60999733", "0.60799986", "0.60702497", "0.6070228", "0.60695744", "0.60695744", "0.60695744", "0.60695744", "0.60695744", "0.60695744", "0.60695744", "0.60695744", "0.60695744", "0.60695744", "0.60695744", "0.60695744", "0.60695744", "0.60695744", "0.60695744", "0.60695744", "0.60695744", "0.60695744", "0.60695744", "0.60695744", "0.606901", "0.6068313", "0.6062322", "0.6047039", "0.6047039", "0.60450304", "0.60450304", "0.60450304", "0.60450304", "0.60450304", "0.60450304", "0.60450304", "0.60450304", "0.60450304", "0.60450304", "0.60450304", "0.60450304", "0.60450304", "0.60450304", "0.60450304", "0.60450304", "0.60450304", "0.60450304", "0.60450304", "0.60450304", "0.60450304", "0.60450304", "0.60450304", "0.60450304", "0.60450304", "0.60450304", "0.60450304", "0.60450304" ]
0.0
-1
This method returns `undefined`.
function noop(){// No operation performed. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function returnUndefined() {}", "value() { return undefined; }", "function _undefined() {\n return exports.PREFIX.undefined;\n}", "function f () {\n return undefined;\n }", "_get(key) { return undefined; }", "get None() {}", "get None() {}", "get None() {}", "get None() {}", "_get_value() {\n return this._has_value() ? this._value : undefined;\n }", "get length(){return undefined;}", "get length(){return undefined;}", "get() {\n return null;\n }", "function getFirstDefined() {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n for (var _i3 = 0, _args = args; _i3 < _args.length; _i3++) {\n var arg = _args[_i3];\n\n if (arg !== undefined) {\n return arg;\n }\n }\n\n return undefined;\n } // variable used to generate id", "getValue() {\n return this.defined ? this.value : \"None\";\n }", "function firstDefined() {\n var i = -1;\n while (++i < arguments.length) {\n if (arguments[i] !== undefined) {\n return arguments[i];\n }\n }\n return undefined;\n }", "_getPageMetadata() {\n return undefined;\n }", "value() {return 0}", "static get INVALID()\n\t{\n\t\treturn 2;\n\t}", "static get NOT_OWNED() { return 200; }", "_get () {\n throw new Error('_get not implemented')\n }", "get() {\r\n // The node doesn't exist until the first update, which normally isn't an\r\n // issue but it can be for tests.\r\n return this.node && this.node.getValue();\r\n }", "static get EMPTY()\n\t{\n\t\treturn 0;\n\t}", "function nothing(){// parameters are optional within functions\n return undefined // will return undefined as a single value of the function\n}", "size() { return 1; }", "function isUndefined(value){return typeof value === 'undefined';}", "isDefined() {\n return this.defined;\n }", "isDefined() {\n return this.defined;\n }", "get ifNoneExist() {\n\t\treturn this.__ifNoneExist;\n\t}", "function isUndefined(value) {\n\n}", "static get ERROR () { return 0 }", "function Undefined$prototype$toString() {\n return 'undefined';\n }", "function oreqUndefined () {\n var truthy = function truthy(v) {\n return v !== undefined;\n };\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var val = args.filter(truthy)[0];\n return truthy(val) ? val : undefined;\n}", "peek() {\n\t\treturn !this.isEmpty() ? this.items[0] : undefined;\n\t}", "function returnUndef(){\n let x;\n return x;\n}", "peek() {\n if(! this.isEmpty()) return this.items[0]\n else return undefined\n }", "getState() {\n return undefined;\n }", "IsDefined() {\n\n }", "function loc() {\n\t return b.literal(-1);\n\t}", "function loc() {\n\t return b.literal(-1);\n\t}", "function _undefinedCoerce() {\n return '';\n}", "function getFirstDefined(...args) {\n\t for (const arg of args) {\n\t if (arg !== undefined) {\n\t return arg;\n\t }\n\t }\n\t return undefined;\n\t}", "get() {\n return this._internal[0].get();\n }", "getWordFromPool() {\n // explicit return of undefined if no words remaining in array\n const nextWord = this.words.pop();\n return (nextWord) ? nextWord : undefined;\n }", "function thisUndefined () {\n function inner() {\n return this;\n }\n return inner();\n}", "get isDefined() {\n return !!fastRegistry.getByType(this.type);\n }", "analyze(){ return null }", "__is_undefined(value) {\n return typeof value === 'undefined';\n }", "static get ERROR() { return 3 }", "function isUndefined(o) {\n return typeof o === \"undefined\";\n }", "get_isPresent()\n {\n return this.liveFunc._isPresent;\n }", "function defined(obj) {\n return typeof obj !== 'undefined';\n }", "private public function m246() {}", "function checkUndefined(value) {\n if (JSON.stringify(value) === undefined) {\n return \"\";\n } else {\n return value;\n }\n }", "function isUndefined (value) {\nreturn typeof value === 'undefined';\n}", "function ignore() {\n return null\n }", "first() {\n if (this.size <= 0)\n return undefined;\n let firstVal = this.values().next();\n return firstVal.value;\n }", "getValue() {\n\t\treturn getLast( this.stack );\n\t}", "function isUndefined(value) { return typeof value === \"undefined\"; }", "function get_self(x) {\r\n return x;\r\n}", "function IsUndefined(x) {\n\t return x === undefined;\n\t }", "function isUndefined(mixElement)\n{\n return typeof mixElement == 'undefined';\n}", "function defined () {\n for (var i=0; i<arguments.length; i++)\n if (typeof arguments[i] !== 'undefined') \n return arguments[i]\n}", "getTopUnit(){return this.__topUnit}", "get() {\n\t\tlet result = this.top.value;\n\t\treturn result;\n\t}", "function loadNothing() {\n return null;\n }", "function IsUndefined(x) {\r\n return x === undefined;\r\n }", "function Failure() {\n return null;\n}", "private internal function m248() {}", "function defined(obj) {\n return typeof obj !== 'undefined';\n }", "function ignore() {\n return null\n}", "function extractUndefinedGlobal(error) {\n const match = error.message.match(/(window|document|localStorage|navigator|alert|location) is not defined/i);\n if (match && match[1]) {\n return match[1];\n }\n return ``;\n}", "function ignore() {\n return null;\n}", "get resolution() {}", "_getResult() {\n\t\treturn null;\n\t}", "static transient final protected internal function m47() {}", "static transient final private internal function m43() {}", "value() {\n if (!this.is_done()) {\n throw new Bug(\"this promise is not calculated yet\");\n }\n return this.box[1];\n }", "function r(e){return void 0===e||null===e}", "function r(e){return void 0===e||null===e}", "function r(e){return void 0===e||null===e}", "function r(e){return void 0===e||null===e}", "function r(e){return void 0===e||null===e}", "function r(e){return void 0===e||null===e}", "function r(e){return void 0===e||null===e}", "function r(e){return void 0===e||null===e}", "function r(e){return void 0===e||null===e}", "function r(e){return void 0===e||null===e}", "function r(e){return void 0===e||null===e}", "function r(e){return void 0===e||null===e}", "function r(e){return void 0===e||null===e}", "function r(e){return void 0===e||null===e}", "function r(e){return void 0===e||null===e}", "function r(e){return void 0===e||null===e}", "function r(e){return void 0===e||null===e}", "function r(e){return void 0===e||null===e}", "function r(e){return void 0===e||null===e}", "function r(e){return void 0===e||null===e}", "function r(e){return void 0===e||null===e}", "function isUndefined(o) {\n return typeof o === \"undefined\";\n}", "function isUndefined(o) {\n return typeof o === \"undefined\";\n}" ]
[ "0.7349204", "0.67813563", "0.6498075", "0.6468386", "0.6265139", "0.6195519", "0.6195519", "0.6195519", "0.6195519", "0.5957684", "0.5942946", "0.5942946", "0.59360754", "0.5919196", "0.5828133", "0.5788914", "0.57824624", "0.5770755", "0.5736466", "0.5725097", "0.57073194", "0.5699058", "0.5680986", "0.5662193", "0.5651359", "0.56413394", "0.5638275", "0.5638275", "0.56363606", "0.56305355", "0.5628426", "0.56225437", "0.56160206", "0.5606573", "0.5605359", "0.55846965", "0.5581656", "0.55600786", "0.55577695", "0.55577695", "0.5545991", "0.5508708", "0.5483681", "0.54693776", "0.5460473", "0.5459672", "0.54545295", "0.5445202", "0.5444901", "0.5431342", "0.5429702", "0.5429137", "0.5428286", "0.5425286", "0.54227436", "0.5413054", "0.54085416", "0.5407151", "0.5406855", "0.53976053", "0.53938365", "0.5389319", "0.5382113", "0.5379595", "0.5371843", "0.53536105", "0.53482395", "0.5341982", "0.53387403", "0.53371346", "0.5337067", "0.53356946", "0.53292316", "0.53223026", "0.53194803", "0.5318998", "0.5310297", "0.5307373", "0.53005296", "0.53005296", "0.53005296", "0.53005296", "0.53005296", "0.53005296", "0.53005296", "0.53005296", "0.53005296", "0.53005296", "0.53005296", "0.53005296", "0.53005296", "0.53005296", "0.53005296", "0.53005296", "0.53005296", "0.53005296", "0.53005296", "0.53005296", "0.53005296", "0.5298108", "0.5298108" ]
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 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 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}" ]
[ "0.6231517", "0.5987249", "0.5949213", "0.57122", "0.57122", "0.5705207", "0.56892043", "0.56892043", "0.55873036", "0.5555952", "0.5543145", "0.5543145", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.55039376", "0.548416", "0.54746956", "0.5456079", "0.5456079", "0.54443634", "0.5425702", "0.5411477", "0.5411477", "0.5411477", "0.53554267", "0.53381497", "0.53381497", "0.53381497", "0.53381497", "0.52763915", "0.5234131", "0.5226253", "0.52213514", "0.52112293", "0.5182654", "0.51636595", "0.5158534", "0.51469135", "0.51469135", "0.51469135", "0.51469135", "0.5126754", "0.51078755", "0.5100304", "0.506721", "0.5062196", "0.50521255", "0.50521255", "0.5050252", "0.5050252", "0.50167155", "0.50122356", "0.5001438", "0.49898553", "0.4989373", "0.49776623", "0.49619618", "0.4956046", "0.4956046", "0.4956046", "0.4955233", "0.49551553" ]
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 }", "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 }", "updateState (val, key) {\n this.state[key] = val\n this.updateUI()\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.7217204", "0.67610246", "0.66769236", "0.66106635", "0.6540022", "0.65259355", "0.6489663", "0.64705694", "0.645821", "0.63847154", "0.6354757", "0.63347685", "0.63053316", "0.6304944", "0.62717897", "0.6266675", "0.621649", "0.6214279", "0.6194085", "0.6189877", "0.61581206", "0.61456084", "0.61447406", "0.6142352", "0.61391985", "0.6136819", "0.6136819", "0.6126794", "0.6124326", "0.6123324", "0.6123313", "0.61184245", "0.61128074", "0.6111048", "0.6095896", "0.60895276", "0.60835844", "0.605533", "0.6054009", "0.60441685", "0.603602", "0.60313237", "0.6023746", "0.6022422", "0.6013368", "0.6011896", "0.5998191", "0.5996584", "0.5989578", "0.5989578", "0.59868217", "0.5978034", "0.59710664", "0.59678763", "0.5959723", "0.59404993", "0.5940022", "0.5929913", "0.5929369", "0.5926322", "0.5901044", "0.5899439", "0.58905244", "0.588635", "0.58777153", "0.58744425", "0.58717144", "0.58670866", "0.58630913", "0.58609957", "0.5854311", "0.5852806", "0.58316416", "0.5830537", "0.58260363", "0.58244467", "0.58180845", "0.58180845", "0.58161324", "0.5805007", "0.58019525", "0.58012426", "0.58001685", "0.5799195", "0.57960683", "0.57954085", "0.5794681", "0.57944787", "0.5790454", "0.578807", "0.57828015", "0.57828015", "0.5779781", "0.57756954", "0.57737005", "0.5773495", "0.576855", "0.57582575", "0.5755969", "0.57503283", "0.574594" ]
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}", "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}", "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 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 printSomthingWorthless(){\r\n console.log('my object is does(not) equal to cole');\r\n console.log(this === cole);\r\n}", "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}", "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}", "get d812() { return this.c1.same(this.c8) && this.c2.same(this.c8) }", "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 strictEquals(a) {\n return b => a === b;\n}", "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 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.60841435", "0.5796601", "0.5670416", "0.56586224", "0.56586224", "0.56335825", "0.5590515", "0.5590515", "0.55875814", "0.5548068", "0.54892737", "0.5487291", "0.5483514", "0.5483514", "0.54746234", "0.54746234", "0.54746234", "0.5454448", "0.5454448", "0.54398715", "0.5399882", "0.5393056", "0.537343", "0.5363757", "0.5343744", "0.5333412", "0.53067297", "0.52999485", "0.52934015", "0.5288399", "0.52868867", "0.52764034", "0.52712137", "0.5264171", "0.5264171", "0.5264171", "0.526243", "0.52507275", "0.52507275", "0.52507275", "0.52507275", "0.52507275", "0.52507275", "0.52507275", "0.52507275", "0.52507275", "0.52507275", "0.52507275", "0.5243384", "0.5235931", "0.5235931", "0.523504", "0.5229681", "0.52291244", "0.52227783", "0.5215765", "0.5206689", "0.5206689", "0.5206689", "0.5206689", "0.5206689", "0.52064705", "0.51996344", "0.5194123", "0.51935816", "0.51935816", "0.51935816", "0.51935816", "0.51935816", "0.51935816", "0.51935816", "0.51935816", "0.51935816", "0.51935816", "0.51935816", "0.51919407", "0.5187505", "0.51810783", "0.51810783", "0.51670957", "0.51596355", "0.5148673", "0.514428", "0.514428", "0.51312953", "0.5129018", "0.5126965", "0.51216274", "0.51215684", "0.51204103", "0.5115589", "0.5115378", "0.5114275", "0.51026845", "0.51026845", "0.51026845", "0.51026845", "0.5096506", "0.50889474", "0.50889474", "0.50888" ]
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=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 }", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\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 {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\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; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\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 {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\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\n var props = {};\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 {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\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; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\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 {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\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\n var props = {};\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 {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\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; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\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 {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\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\n var props = {};\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 {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\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; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\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 {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\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\n var props = {};\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 {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\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; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\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 {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\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\n var props = {};\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 {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\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; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\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 {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\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\n var props = {};\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 {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\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; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\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 {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\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\n var props = {};\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 {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\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; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\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 {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\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\n var props = {};\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 {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\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; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\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 {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\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\n var props = {};\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 {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\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; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\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 {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\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\n var props = {};\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 {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\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; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\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 {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\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\n var props = {};\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 {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\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; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\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 {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\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\n var props = {};\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 {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\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; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\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 {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\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\n var props = {};\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 {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\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; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\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 {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\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\n var props = {};\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 {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\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; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\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 {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\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\n var props = {};\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 {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\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; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\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 {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\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\n var props = {};\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 {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\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; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\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 {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\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\n var props = {};\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 {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\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; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\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 {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\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\n var props = {};\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 {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\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; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\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 {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\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\n var props = {};\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 {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\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; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\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 {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\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\n var props = {};\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 {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\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; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\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 {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\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\n var props = {};\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 {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\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; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\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 {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\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\n var props = {};\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 {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\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; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\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 {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\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\n var props = {};\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 {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\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; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\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 {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\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\n var props = {};\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 {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\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; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\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 {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\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\n var props = {};\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 {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\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; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\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 {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\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\n var props = {};\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 {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\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; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\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 {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\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\n var props = {};\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 {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\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; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\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 {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}" ]
[ "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.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123", "0.6230123" ]
0.68920434
0
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){!!(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( \"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 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 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 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 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.68906343", "0.66943085", "0.66943085", "0.6692962", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6633278", "0.661405", "0.661405", "0.661405", "0.661405", "0.661405", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.66117495", "0.6608597", "0.6595712", "0.6595712", "0.6595712", "0.6585877", "0.65820616", "0.65441436", "0.6540871", "0.6540871", "0.6540871", "0.6540871", "0.65315807", "0.65253145", "0.65253145", "0.65253145", "0.65253145", "0.6521363", "0.65187955", "0.65187955", "0.65187955" ]
0.69132274
0
Flatten a children object (typically specified as `props.children`) and return an array with appropriately rekeyed children. See
function toArray(children){return mapChildren(children,function(child){return child;})||[];}
{ "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) {\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.7753311", "0.7517859", "0.7405196", "0.7405196", "0.7405196", "0.7405196", "0.7405196", "0.7405196", "0.73985", "0.73985", "0.73985", "0.73985", "0.73985", "0.73985", "0.73985", "0.73985", "0.73985", "0.73985", "0.73985", "0.73985", "0.73985", "0.73985", "0.73985", "0.73960537", "0.73960537", "0.73960537", "0.7395197", "0.7395197", "0.7395197", "0.7395197", "0.7395197", "0.7395197", "0.7395197", "0.7395197", "0.73816055", "0.73816055", "0.73816055", "0.73816055", "0.73816055", "0.73816055", "0.73816055", "0.73816055", "0.73816055", "0.73816055", "0.73816055", "0.73816055", "0.73816055", "0.73816055", "0.73816055", "0.73816055", "0.73816055", "0.73816055", "0.73816055", "0.73816055", "0.73816055", "0.73816055", "0.73816055", "0.73816055", "0.73816055", "0.73816055", "0.73816055", "0.73816055", "0.7341597", "0.73055595", "0.73037803", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945", "0.73036945" ]
0.7432709
2
Experimental Create Event Handle API.
function isValidElementType(type){if(typeof type==='string'||typeof type==='function'){return true;}// Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill). if(type===exports.Fragment||type===exports.Profiler||type===REACT_DEBUG_TRACING_MODE_TYPE||type===exports.StrictMode||type===exports.Suspense||type===REACT_SUSPENSE_LIST_TYPE||type===REACT_LEGACY_HIDDEN_TYPE||enableScopeAPI){return true;}if(typeof type==='object'&&type!==null){if(type.$$typeof===REACT_LAZY_TYPE||type.$$typeof===REACT_MEMO_TYPE||type.$$typeof===REACT_PROVIDER_TYPE||type.$$typeof===REACT_CONTEXT_TYPE||type.$$typeof===REACT_FORWARD_REF_TYPE||type.$$typeof===REACT_FUNDAMENTAL_TYPE||type.$$typeof===REACT_BLOCK_TYPE||type[0]===REACT_SERVER_BLOCK_TYPE){return true;}}return false;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createEventHandler() {\n return {\n handleEvent: function handleEvent(event) {\n switch (event.type) {\n\n case 'encrypted':\n if (event.initData) {\n var initData = ArrayBuffer.isView(event.initData) ? event.initData.buffer : event.initData;\n eventBus.trigger(_coreEventsEvents2['default'].NEED_KEY, { key: new _voNeedKey2['default'](initData, event.initDataType) });\n }\n break;\n }\n }\n };\n }", "onEventCreated(newEventRecord) {}", "function createEvent(eventName, value, address) {\n var msg = new builder.Message().address(address);\n msg.data.type = 'event';\n msg.data.name = eventName;\n msg.data.value = value;\n\n console.log('function check', msg);\n return msg;\n}", "handleCreated(event) {\n //If \"Create Issue and Upload Screenshot\" button has been clicked then we can use this flag to show file dialog after Issue has been crated\n if(this.fileUploadButtonClicked){\n this.showUploadFileDialog = true;\n }\n this.newIssueRecordId = event.detail.id;\n //Reset the form so we can enter more data for next issue; if needed\n this.handleResetFields();\n this.dispatchEvent(\n new ShowToastEvent({\n title: 'Success',\n message: '{0} was successfully created!',\n \"messageData\": [\n {\n url: '/'+ event.detail.id,\n label: 'Issue:: ' + event.detail.fields.Name.value\n }\n ],\n variant: 'success'\n })\n );\n }", "createEventHandler(name) {\n\t\treturn {\n\t\t\taddChannel: (c) => this.onAddChannel(name, c),\n\t\t\tremoveChannel: (c) => this.onRemoveChannel(name, c),\n\t\t\tremoveServer: () => this.onRemoveServer(name)\n\t\t};\n\t}", "function createEvent () {\n var emit\n var prom = new Promise(function (resolve) {\n emit = resolve\n })\n prom.emit = emit\n return prom\n}", "function createEvent(req, res){\n var newActivity = new db.Activity({\n name: req.body.activityname\n });\n\n var newEvent = new db.Event({\n name: req.body.name,\n date: req.body.date,\n votingAllowed: req.body.votingAllowed,\n activity: newActivity\n });\n\n newEvent.save(function handleDBSave(err, data){\n if (err){\n console.log('handleDBSave err: ', err);\n return res.status(400).send({error: err});\n }\n res.redirect('/events/' + data._id);\n });\n}", "function createEvent(eventData) {\n // First create resource that will be send to server.\n var resource = {\n 'summary': eventData.eventTitle,\n 'start': {\n 'dateTime': new Date(eventData.date + ' ' + eventData.startTime).toISOString()\n },\n 'end': {\n 'dateTime': new Date(eventData.date + ' ' + eventData.endTime).toISOString()\n },\n };\n // create the request\n var request = gapi.client.calendar.events.insert({\n 'calendarId': 'primary',\n 'resource': resource\n });\n\n // execute the request\n request.execute(function(resp) {\n var linkToEvent = 'Event created: <a href=\"' + resp.htmlLink + '\">link to event</a>';\n console.log(\"Inside linkToEvent ...\" + linkToEvent);\n document.getElementsByClassName('event-created')[0].innerHTML = linkToEvent;\n });\n}", "function createEvent(name, detail) {\n if (typeof window.CustomEvent === 'function') {\n return new CustomEvent(name, { detail: detail, cancelable: true, bubbles: true });\n }\n var evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(name, true, true, detail);\n return evt;\n }", "function makeEventNode() {\n\treturn {\n\t\tcallbacks: [],\n\t\tchildEvents: []\n\t};\n}", "function newEventCreation() {\n let name = document.querySelector(\"#eventName\")\n let location = document.querySelector(\"#eventLocation\")\n let date = date.querySelector(\"#eventDate\")\n\n // Empty object for the Event info to populate\n let event = {\n name: \"\",\n location: \"\",\n date: \"\"\n }\n\n event.name = (name.value)\n event.location = (location.value)\n event.date = (date.value)\n\n userAPIfunctions.postUser(obj)\n .then((response) => response.json()\n .then((user) => sessionStorageSetup(user))\n )\n}", "handleAccountCreated(evt) {\n this.createStatus = `Account record created. Id is ${evt.detail.id}.`;\n\n const event = new CustomEvent('newrecord', {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: { data: evt.detail },\n });\n this.dispatchEvent(event);\n }", "function createEvent(name, detail) {\n if (typeof window.CustomEvent === 'function') {\n return new CustomEvent(name, {detail, cancelable: true, bubbles: true})\n }\n let evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(name, true, true, detail);\n return evt;\n}", "createEvent(text) {\n const id = Date.now(); // TODO not great\n this.events.push({\n id,\n text,\n complete: false,\n });\n\n this.emit(\"change\");\n }", "function constructEvent(OriginalEvent, name, type, options) {\n if (supportsEventConstructors)\n return new OriginalEvent(type, unwrapOptions(options));\n\n // Create the arguments from the default dictionary.\n var event = unwrap(document.createEvent(name));\n var defaultDict = defaultInitDicts[name];\n var args = [type];\n Object.keys(defaultDict).forEach(function(key) {\n var v = options != null && key in options ?\n options[key] : defaultDict[key];\n if (key === 'relatedTarget')\n v = unwrap(v);\n args.push(v);\n });\n event['init' + name].apply(event, args);\n return event;\n }", "function create_event(name) {\n\treturn function(data) {\n\t\tvar event = document.createEvent('CustomEvent');\n\t\tevent.initCustomEvent(name, true, true, data);\n\t\treturn document.dispatchEvent(event);\n\t}\n}", "create(Event) {\n let sqlRequest = \"INSERT into event (type, actorId, created_at) \" +\n \"VALUES ($type, $actorId, $created_at)\";\n let sqlParams = {\n $type: Event.type,\n $actorId: Event.actorId,\n $created_at: Event.created_at\n };\n return this.common.run(sqlRequest, sqlParams);\n }", "function createEvt(scope, name) {\n\tif(!G.evt[scope]) G.evt[scope] = {};\n\tif(G.evt[scope][name] == null)\n\t\tG.evt[scope][name] = []; \n}", "function createEvent(event) {\n const calendar = getCalenderClient();\n calendar.events.insert({\n calendarId: conf.CALENDAR_ID,\n resource: event,\n }, function(err, event) {\n if (err) {\n console.log('There was an error contacting the Calendar service: ' + err);\n return;\n }\n console.log('Event created: %s', event.data.htmlLink);\n });\n}", "function OpenEvent() {}", "\"events.createNewEvent\"(\n business,\n sizeLimit,\n appTimeObj,\n displayDate,\n displayTime\n ) {\n check(displayDate, String);\n check(displayTime, String);\n\n if (Meteor.isServer) {\n if (!Meteor.userId()) {\n throw new Meteor.Error(\"not-authorized\");\n }\n Events.insert({\n createAt: Date.now(),\n owner: this.userId,\n status: \"ongoing\",\n isFull: false,\n member: [\n {\n id: this.userId,\n vote: -1\n }\n ],\n appTime: appTimeObj,\n displayDate: displayDate,\n displayTime: displayTime,\n restaurantId: business.id,\n restaurantUrl: business.url,\n restaurantName: business.name,\n peopleLimit: sizeLimit\n });\n }\n }", "function handleEvent(event) {\n\n }", "function processCreate(req, res) {\n\t// Validate params\n\treq.checkBody('name', 'Name is required.').notEmpty();\n\treq.checkBody('description', 'Description is required.').notEmpty();\n\n\t// if there are errors, redirect and save errors to flash\n\tconst errors = req.validationErrors();\n\tif (errors) return res.status(301).redirect('/events/create');\n\n\t// create a new event\n\tconst event = new Event({\n\t\tname: req.body.name,\n\t\tdescription: req.body.description\n\t});\n\n\t// save event\n\tevent.save(function(err) {\n\t\tif (err) throw err;\n\n\t\t// redirect to the newly created event\n\t\tres.status(301).redirect(`/events/${event.slug}`);\n\t});\n}", "function make_event(type) {\n var r;\n\n if (D.createEvent) {\n // modern browsers\n r = D.createEvent(\"HTMLEvents\");\n r.initEvent(type, true, false);\n } else if (D.createEventObject) {\n // ie<9\n r = D.createEventObject();\n } else {\n // pathological and/or old browser\n r = null;\n }\n\n // return event\n return r;\n }", "function createEvent() {\n var calendarId = 'primary';\n var start = getRelativeDate(1, 12);\n var end = getRelativeDate(1, 13);\n var event = {\n summary: 'Lunch Meeting',\n location: 'The Deli',\n description: 'To discuss our plans for the presentation next week.',\n start: {\n dateTime: start.toISOString()\n },\n end: {\n dateTime: end.toISOString()\n },\n attendees: [\n {email: '[email protected]'},\n {email: '[email protected]'}\n ],\n // Red background. Use Calendar.Colors.get() for the full list.\n colorId: 11\n };\n event = Calendar.Events.insert(event, calendarId);\n Logger.log('Event ID: ' + event.id);\n}", "function makeEvent(deploymentId, sourceId, sourceSequenceId, workbookName, dashboardName, projectName, eventKind, eventData) {\n if (!isValidEventKind(eventKind)) {\n throw new Error(`Not a valid event kind: ${eventKind}`);\n }\n let recordedAt = new Date().toISOString();\n projectName = ((typeof projectName === 'string' && projectName.length > 0) ? projectName : \"Default\" );\n return {\n deploymentId,\n sourceId,\n sourceSequenceId: sourceSequenceId.toString(),\n recordedAt,\n\n workbookName: workbookName,\n dashboardName: dashboardName,\n projectName,\n\n kind: eventKind,\n data: eventData,\n\n }\n }", "function createEvent(type) {\n try {\n return new window.Event(type, { bubbles: false, cancelable: false });\n }\n catch (_a) {\n // For IE11\n const event = window.document.createEvent(\"Event\");\n event.initEvent(type, false, false);\n return event;\n }\n}", "function generateEvent(s,args){var evt=document.createEvent(\"CustomEvent\");evt.initCustomEvent(s,false,false,args);return evt;}", "createEvent() {\n var self = this;\n // Get what we need from the modal\n var eventName = document.getElementById('createEventNameEvent').value;\n var eventAuthor = document.getElementById('createEventNameAuthor').value;\n\n // Set the name from the value\n this.currentEvent.title = eventName;\n this.currentEvent.author = eventAuthor;\n\n this.currentEvent.pins.forEach((pin) => {\n pin.author = eventAuthor;\n });\n\n // Generate an id for the event\n // this is the ID that will be used in the URL bar\n // and generally to refer to the event\n var newEventId = this.generateUUID();\n\n // Save on Firebase\n this.db.ref('/events/' + newEventId).set(this.currentEvent)\n .then(() => {\n console.log('SUCCESS in createEvent: event created.');\n // Add the id to current event and update the event saved in DB\n self.currentEvent.id = newEventId;\n self.updateEvent();\n\n // We create a cookie that stores useful infos about the current user\n // his name (for later use) and the ids of the pins he has created\n // => we'll use these ids to render or not elements of the DOM (i.e.: the delete pin button)\n self.setCookie(\n `${SETTINGS.cookieNameFirstPart}${newEventId}`,\n { user: {\n name: eventAuthor,\n pinsCreated: this.pinsCreated\n }\n },\n 100\n );\n\n // We show the event created modal giving the author of the event the \n // URL to share to his friends\n self.toggleModal(true, eventCreatedComponent(newEventId));\n\n this.appState = this.appStates.sharing;\n })\n .catch(function(error) {\n console.error(\"Error adding document: \", error);\n });\n }", "function NotificationEventFactory() {}", "createEvent(event:Event):Promise<Void> {\n return axios.post(url+\"/createEvent\", event, axiosConfig);\n\n }", "createImpl(eventData, callback) {\n debug('createImpl()');\n const instance = this;\n instance.pgWebhooksListeners.getAllListenersImpl((err, listenerList) => {\n if (err) {\n return callback(err);\n }\n async.forEach(listenerList, (listenerInfo, callback) => {\n const tmpEvent = Object.assign({}, eventData);\n // Each record needs its own ID, not like in the JSON implementation where\n // the ID is reused across the listeners.\n tmpEvent.id = utils.createRandomId();\n tmpEvent.listenerId = listenerInfo.id;\n instance.pgUtils.upsert('webhook_events', tmpEvent, null, callback);\n }, (err) => {\n if (err) {\n return callback(err);\n }\n debug('Successfully upserted events for all listeners.');\n return callback(null);\n });\n });\n }", "function getOrCreate(evt) {\n const id = 'pointer-' + evt.pointerId;\n let el = document.getElementById(id);\n if (el) return el;\n el = document.createElement('div');\n el.classList.add('pointer');\n // prevent default gestures in iOS\n el.addEventListener('gesturestart', e => e.preventDefault());\n el.addEventListener('gesturechange', e => e.preventDefault());\n el.addEventListener('gestureend', e => e.preventDefault());\n\n\n el.id = id;\n document.body.appendChild(el);\n return el;\n}", "function createEvent() { \n \n var event = {\n 'summary': 'Google I/O 2015',\n 'location': '800 Howard St., San Francisco, CA 94103',\n 'description': 'A chance to hear more about Google\\'s developer products.',\n 'start': {\n 'dateTime': '2015-05-28T09:00:00-07:00',\n 'timeZone': 'America/Los_Angeles'\n },\n 'end': {\n 'dateTime': '2015-05-28T09:00:00-08:00',\n 'timeZone': 'America/Los_Angeles'\n }\n \n };\n\n var request = gapi.client.calendar.events.insert({\n 'calendarId': 'primary',\n 'resource': event\n });\n\n request.execute(function (event) {\n console.log('Event created.');\n });\n }", "createElement(options, args) {\n var _this = this;\n var events = ['blur', 'change', 'focus'];\n\n this._createInstance(options);\n\n return new Promise(function(resolve) {\n if (!_this._events[args.type]) {\n _this._events[args.type] = {};\n }\n\n events.forEach(function (val) {\n _this._events[args.type][val] = args['on' + val[0].toUpperCase() + val.substring(1)];\n });\n\n _this._events[args.type].resolve = resolve;\n\n if (!_this._fields[args.type]) {\n _this._fields[args.type] = _this._elements.create(args.type, args.options);\n \n events.forEach(function (val) {\n _this._fields[args.type].on(val, function($e) {\n if (_this._events[args.type][val]) {\n _this._events[args.type][val]($e);\n }\n });\n });\n\n _this._fields[args.type].on('ready', function() {\n _this._events[args.type].resolve({\n elementType: args.type\n });\n });\n }\n\n _this._fields[args.type].clear();\n\n _this._fields[args.type].mount('#' + args.id);\n });\n }", "function createEvent(event) {\n var options = {};\n options.data = {};\n var time = event.start.format('YYYY-MM-DD h:mm:ss a');\n options.data.startTime = time;\n //var time1=event.end.format('h:mm:ss a')\n var time1 = event.end.format('YYYY-MM-DD h:mm:ss a')\n options.data.endTime = time1;\n var time2 = event.start.format('YYYY-MM-DD h:mm:ss a');\n options.data.startDate = time2;\n var time3 = event.end.format('YYYY-MM-DD h:mm:ss a')\n options.data.endDate = time3;\n options.data.idBlock = event.parentBlock;\n options.data.inTransmission = false;\n options.data.type_id = event.idRef;\n options.data.type_publication = event.type;\n options.method = 'POST';\n options.url = Routing.generate('publication_create');\n options.errorcallback = function (error) {\n console.log(error);\n }\n options.successcallback = function (data) {\n if (event.publicationId != '')\n return true;\n else {\n var id = JSON.parse(data);\n event.publicationId = id;\n }\n };\n ajaxAccess(options);\n}", "function make_event(name, props) {\n var evt = document.createEvent('Event');\n evt.initEvent(name, true, true);\n if (props) {\n for (var prop in props) {\n evt[prop] = props[prop];\n }\n }\n return evt;\n }", "constructor(handleCreate) {\n this.query = this.query.bind(this);\n this.handleSuccess = this.handleSuccess.bind(this);\n this.pengine = new window.Pengine({\n server: \"http://localhost:3030/pengine\",\n application: \"proylcc\",\n oncreate: handleCreate,\n onsuccess: this.handleSuccess,\n onfailure: this.handleFailure,\n onerror: this.handleError,\n destroy: false\n });\n }", "function createFakeEvent(typeArg) {\n if (['keydown', 'keyup', 'keypress'].includes(typeArg)) {\n return new KeyboardEvent(typeArg, {\n 'key': ' ',\n 'code': ' ',\n 'charCode': ' '.charCodeAt(0),\n 'keyCode': ' '.charCodeAt(0),\n 'which': ' '.charCodeAt(0),\n 'bubbles': true,\n 'composed': true,\n 'cancelable': true\n });\n } else if (['input', 'change'].includes(typeArg)) {\n return new InputEvent(typeArg, {\n 'bubbles': true,\n 'composed': true,\n 'cancelable': true\n });\n } else if (['focus', 'blur'].includes(typeArg)) {\n return new FocusEvent(typeArg, {\n 'bubbles': true,\n 'composed': true,\n 'cancelable': true\n });\n } else {\n log.error(\"createFakeEvent: Unknown event type: \" + typeArg);\n return null;\n }\n}", "function createSyntheticEvent(Interface){/**\n * Synthetic events are dispatched by event plugins, typically in response to a\n * top-level event delegation handler.\n *\n * These systems should generally use pooling to reduce the frequency of garbage\n * collection. The system should check `isPersistent` to determine whether the\n * event should be released into the pool after being dispatched. Users that\n * need a persisted event should invoke `persist`.\n *\n * Synthetic events (and subclasses) implement the DOM Level 3 Events API by\n * normalizing browser quirks. Subclasses do not necessarily have to implement a\n * DOM interface; custom application-specific events can also subclass this.\n */function SyntheticBaseEvent(reactName,reactEventType,targetInst,nativeEvent,nativeEventTarget){this._reactName=reactName;this._targetInst=targetInst;this.type=reactEventType;this.nativeEvent=nativeEvent;this.target=nativeEventTarget;this.currentTarget=null;for(var _propName in Interface){if(!Interface.hasOwnProperty(_propName)){continue;}var normalize=Interface[_propName];if(normalize){this[_propName]=normalize(nativeEvent);}else {this[_propName]=nativeEvent[_propName];}}var defaultPrevented=nativeEvent.defaultPrevented!=null?nativeEvent.defaultPrevented:nativeEvent.returnValue===false;if(defaultPrevented){this.isDefaultPrevented=functionThatReturnsTrue;}else {this.isDefaultPrevented=functionThatReturnsFalse;}this.isPropagationStopped=functionThatReturnsFalse;return this;}_assign(SyntheticBaseEvent.prototype,{preventDefault:function(){this.defaultPrevented=true;var event=this.nativeEvent;if(!event){return;}if(event.preventDefault){event.preventDefault();// $FlowFixMe - flow is not aware of `unknown` in IE\n}else if(typeof event.returnValue!=='unknown'){event.returnValue=false;}this.isDefaultPrevented=functionThatReturnsTrue;},stopPropagation:function(){var event=this.nativeEvent;if(!event){return;}if(event.stopPropagation){event.stopPropagation();// $FlowFixMe - flow is not aware of `unknown` in IE\n}else if(typeof event.cancelBubble!=='unknown'){// The ChangeEventPlugin registers a \"propertychange\" event for\n// IE. This event does not support bubbling or cancelling, and\n// any references to cancelBubble throw \"Member not found\". A\n// typeof check of \"unknown\" circumvents this issue (and is also\n// IE specific).\nevent.cancelBubble=true;}this.isPropagationStopped=functionThatReturnsTrue;},/**\n * We release all dispatched `SyntheticEvent`s after each event loop, adding\n * them back into the pool. This allows a way to hold onto a reference that\n * won't be added back into the pool.\n */persist:function(){// Modern event system doesn't use pooling.\n},/**\n * Checks if this event should be released back into the pool.\n *\n * @return {boolean} True if this should not be released, false otherwise.\n */isPersistent:functionThatReturnsTrue});return SyntheticBaseEvent;}", "function createSyntheticEvent(Interface){/**\n * Synthetic events are dispatched by event plugins, typically in response to a\n * top-level event delegation handler.\n *\n * These systems should generally use pooling to reduce the frequency of garbage\n * collection. The system should check `isPersistent` to determine whether the\n * event should be released into the pool after being dispatched. Users that\n * need a persisted event should invoke `persist`.\n *\n * Synthetic events (and subclasses) implement the DOM Level 3 Events API by\n * normalizing browser quirks. Subclasses do not necessarily have to implement a\n * DOM interface; custom application-specific events can also subclass this.\n */function SyntheticBaseEvent(reactName,reactEventType,targetInst,nativeEvent,nativeEventTarget){this._reactName=reactName;this._targetInst=targetInst;this.type=reactEventType;this.nativeEvent=nativeEvent;this.target=nativeEventTarget;this.currentTarget=null;for(var _propName in Interface){if(!Interface.hasOwnProperty(_propName)){continue;}var normalize=Interface[_propName];if(normalize){this[_propName]=normalize(nativeEvent);}else{this[_propName]=nativeEvent[_propName];}}var defaultPrevented=nativeEvent.defaultPrevented!=null?nativeEvent.defaultPrevented:nativeEvent.returnValue===false;if(defaultPrevented){this.isDefaultPrevented=functionThatReturnsTrue;}else{this.isDefaultPrevented=functionThatReturnsFalse;}this.isPropagationStopped=functionThatReturnsFalse;return this;}_assign(SyntheticBaseEvent.prototype,{preventDefault:function preventDefault(){this.defaultPrevented=true;var event=this.nativeEvent;if(!event){return;}if(event.preventDefault){event.preventDefault();// $FlowFixMe - flow is not aware of `unknown` in IE\n}else if(typeof event.returnValue!=='unknown'){event.returnValue=false;}this.isDefaultPrevented=functionThatReturnsTrue;},stopPropagation:function stopPropagation(){var event=this.nativeEvent;if(!event){return;}if(event.stopPropagation){event.stopPropagation();// $FlowFixMe - flow is not aware of `unknown` in IE\n}else if(typeof event.cancelBubble!=='unknown'){// The ChangeEventPlugin registers a \"propertychange\" event for\n// IE. This event does not support bubbling or cancelling, and\n// any references to cancelBubble throw \"Member not found\". A\n// typeof check of \"unknown\" circumvents this issue (and is also\n// IE specific).\nevent.cancelBubble=true;}this.isPropagationStopped=functionThatReturnsTrue;},/**\n * We release all dispatched `SyntheticEvent`s after each event loop, adding\n * them back into the pool. This allows a way to hold onto a reference that\n * won't be added back into the pool.\n */persist:function persist(){// Modern event system doesn't use pooling.\n},/**\n * Checks if this event should be released back into the pool.\n *\n * @return {boolean} True if this should not be released, false otherwise.\n */isPersistent:functionThatReturnsTrue});return SyntheticBaseEvent;}", "async create(\n data,\n trackId\n ) { \n return await this.createHandler.create(\n data,\n trackId\n );\n }", "function TinyEvent(name) {\n\treturn Object.seal(new _TinyEvent(name));\n}", "handlerWillAdd (event, when, handler) {\n\n }", "create() {\n\t}", "function EventReader() {}", "function buildEvent (eventName, parent) {\n Ractive.events[eventName] = buildEventHandler(eventName, parent);\n }", "function Event() { }", "function Event() { }", "onEvent(handler) {\n return this.on('Event', handler);\n }", "function addEvent() {\n sendLog(\"Add Event\")\n selectEvent(0);\n handleShow();\n }", "function createEvent(name, location, description, email){\n fs.readFile('data/data.json', 'utf8', function (err, data) {\n \n if (err) {\n return console.log(err);\n }\n parsedData = JSON.parse(data);\n var id = parsedData.events[parsedData.events.length-1].id + 1\n var event = new Event(name, location, description, email, id, [\"User [[email protected]]\"]);\n parsedData.events.push(event);\n fs.writeFileSync('data/data.json', JSON.stringify(parsedData));\n //callback(parsedData.events)\n });\n}", "createTripEvent() {\n const pointController = new PointController(this.firstDayEventListElem, null, this._places, this._offers, this._onDataChange, this._onChangeView);\n pointController._pointView.element.querySelector(`.event__rollup-btn`).click();\n }", "constructor(eventType, handler) {\n this.eventType = eventType;\n this.handler = handler;\n }", "function handleEvent(event) {\n console.log(event);\n // and whatever else\n}", "function createHandler(eventType) {\n xhr['on' + eventType] = function (event) {\n copyLifecycleProperties(lifecycleProps, xhr, fakeXHR);\n dispatchEvent(fakeXHR, eventType, event);\n };\n }", "function generateEvent(s, args) {\n \tvar evt = document.createEvent(\"CustomEvent\");\n \tevt.initCustomEvent(s, false, false, args);\n \treturn evt;\n }", "function generateEvent(s, args) {\n \tvar evt = document.createEvent(\"CustomEvent\");\n \tevt.initCustomEvent(s, false, false, args);\n \treturn evt;\n }", "function generateEvent(s, args) {\n \tvar evt = document.createEvent(\"CustomEvent\");\n \tevt.initCustomEvent(s, false, false, args);\n \treturn evt;\n }", "async postCreate () {\n\t}", "function defineEvent() {\n\tvar name = $(\"input[name='eventname']\").val().trim();\n\tvar nn = Number($(\"input[name='eventnn']\").val());\n\tvar en = Number($(\"input[name='eventen']\").val());\n\n\t// check it doesn't already exist\n\tvar e = {};\n\te.name = name;\n\te.nn = nn;\n\te.en = en;\n\taddEvent(e);\n}", "onNew(handler) {\n return this.onEvent(handler, 'issue.new');\n }", "function addEvent (elem, type, eventHandle) {\r\n\t\tif (elem == null || elem == undefined) return;\r\n\t\tif ( elem.addEventListener ) {\r\n\t\t\telem.addEventListener( type, eventHandle, false );\r\n\t\t} else if ( elem.attachEvent ) {\r\n\t\t\telem.attachEvent( \"on\" + type, eventHandle );\r\n\t\t} else {\r\n\t\t\telem[\"on\"+type]=eventHandle;\r\n\t\t}\r\n\t}", "function createCustomEventPolyfill() {\r\n function CustomEvent(typeArg, eventInitDict) {\r\n var params = eventInitDict || { bubbles: false, cancelable: false, detail: undefined };\r\n var evt = document.createEvent('CustomEvent');\r\n evt.initCustomEvent(typeArg, !!params.bubbles, !!params.cancelable, params.detail);\r\n return evt;\r\n }\r\n CustomEvent.prototype = Event.prototype;\r\n return CustomEvent;\r\n}", "created() {\n this.onCreatedHandler();\n }", "function getCustomEvent(name) {\n \n var event = new CustomEvent(\n\tname, \n\t{\n\t detail: {\n\t\tmessage: \"Hello World!\",\n\t\ttime: new Date(),\n\t },\n\t bubbles: true,\n\t cancelable: false\n\t}\n );\n\n return event;\n\n}", "async store({ request, response, auth }) {\n const req = request.all()\n\n if (auth.user.cannot('create', Event)) {\n return response.forbidden()\n }\n\n const event = this.event.create({ ...req, admin: auth.user })\n\n return response.created({ created: !!event, event })\n }", "function InsertEventRecord(kid1id, kid2id, kid1name, kid2name, kid1avatar, kid2avatar) {\n // Create on Azure\n // ---------------\n Azureservice.insert('events', {\n //id: guid, // I'll let Azure handle this GUID since I don't need to track it locally \n fromkid_id: kid1id,\n tokid_id: kid2id,\n fromkid_avatar: kid1avatar,\n tokid_avatar: kid2avatar,\n fromkid_name: kid1name,\n tokid_name: kid2name,\n datetime: Date.now(),\n event_type: \"friends\",\n })\n .then(function () {\n alert('freind record inserted');\n console.log('new event insert successful');\n },\n function (err) {\n console.error('Azure Error: ' + err);\n });\n\n }", "function create_click() {\n\treturn {\n\t\tclick: true,\n\t\ttimestamp: Date.now()\n\t};\n}", "function InternalEvent() {}", "function EventClass() {}", "function newEvent(request, response){\n var contextData = {\n 'allowedDateInfo': allowedDateInfo\n };\n response.render('create-event.html', contextData);\n}", "function newEvent(request, response){\n var contextData = {\n 'allowedDateInfo': allowedDateInfo\n };\n response.render('create-event.html', contextData);\n}", "function doCreateEvent() {\n\tvar anEvent = Alloy.createModel('Event');\n\tanEvent.set({\n\t\tname : 'Celebration',\n\t\tstart_time : new Date(),\n\t\tduration : 3600,\n\t\trecurring : 'monthly',\n\t\trecurring_count : 5\n\t});\n\n\tanEvent.save().then(function(_model) {\n\t\tconsole.log(\"anEvent.save \" + JSON.stringify(_model, null, 2));\n\n\t\tvar moment = require('alloy/moment');\n\t\tconsole.log(\"start time-relative: \" + _model.getFromNowStartTime());\n\t\tconsole.log(\"start time-formatted: \" + _model.getFormattedStartTime());\n\n\t\treturn doFetchEvents();\n\n\t}, function(_error) {\n\t\talert(_error.message);\n\t});\n}", "function handleCreateAnswerError(event) {\n\tconsole.log('createAnswer() error: ', e);\n}", "function createEvent(summary, location, dateFrom, dateTo) {\n var resource = {\n \"summary\": summary.toString(),\n \"location\": location.toString(),\n \"start\": {\n \"dateTime\": dateFrom.toISOString()\n },\n \"end\": {\n \"dateTime\": dateTo.toISOString()\n }\n };\n var request = gapi.client.calendar.events.insert({\n 'calendarId': 'primary',\n 'resource': resource\n });\n request.execute(function (response) {\n if (response.status === \"confirmed\") window.location.replace('event.html?event=' + response.id);\n });\n}", "create() {}", "create() {}", "create () {}", "create () {}", "function generateEvent(s, args) {\r\n var evt = document.createEvent(\"CustomEvent\");\r\n evt.initCustomEvent(s, false, false, args);\r\n return evt;\r\n }", "function create() {\n\n}", "function Handle() {}", "handleButtonClick(){\n\t\tconsole.log(\"handleButtonClick\");\n\n\t\teventsActions.createEvent(this.state.event);\n\t}", "function createEvent(sym, eventName, opts) {\n var e = { Symbol: sym, element: sym.ele, performDefaultAction: true };\n $.extend(e, opts);\n return e;\n }", "function create(req, res) {\n let event = new Event(req.body)\n event.save(function (err) {\n //if errors rerender try again....\n if (err) return res.render('events/new')\n //redirects to main page.\n res.redirect('/')\n })\n}", "createNewEvent(eventData) {\n fetch(\"/api/event\", {\n method: \"post\",\n body: JSON.stringify(eventData),\n headers: {\n \"Content-Type\": \"application/json\",\n },\n })\n .then((response) => response.json())\n .then((body) => {\n const urlToShare = `${window.location.origin}/event/${body.event.name}`;\n this.setState({\n urlToShare,\n createdEvent: body,\n display: \"confirmation\",\n });\n })\n .catch(console.error);\n }", "function FsEventsHandler() {}", "handleEvents() {\n }", "function _constructEventSystem(eventsObject, parent){\n\n var _events =[]\n var _parent = parent;\n\n var _callerId = \"undefined caller Obj\";\n if (typeof parent.uPhrase=== 'string')\n _callerId = parent.uPhrase\n else if (typeof parent.uPhrase=== 'function')\n _callerId = parent.uPhrase()\n\n function _raise (fn, event)\n {\n var title='';\n title+=(typeof event === 'object' && event.caller)?\n event.caller+ ' fired ':'';\n title+= (typeof event === 'object' && event.name)?\n event.name:'undefined event name';\n\n \n\n if (typeof event === 'object' && event.meta) title += meta\n\n _log( title , 3);\n\n var result = _execfn(fn,event);\n \n\n return result;\n }\n\n /**\n * returns the value of the event computation or undefined if no\n * computation happened. returns false if an error ocured\n */\n function _execfn(fn, event){\n// try{\n if (typeof fn === 'function')\n return fn(event);\n else if (typeof fn === 'string')\n {\n if ( event.object && event.object[\"fn\"] &&\n typeof event.object[\"fn\"] === 'function')\n return event.object[fn](event);\n else\n return eval(fn);\n }\n// }catch(e){\n// _log('event failed');\n// console.log(e);\n// return false;\n// }\n \n return undefined;\n }\n\n function _proxy(fn, args)\n {\n return eval(\"(\"+ fn+ \")\")(args);\n }\n\n /**\n * Raise the on`name` event eg: bop.event(\"Load\") -> onLoad\n *\n * will check metadata if an event position is specified (eg: 'BEFORE', \"after\")\n *\n * Returns either the return value of the event's function or undefined\n * if no function was defined or false if something went wrong\n * this is being executed in the parent's scope\n */\n function event (name, metadata){\n \n name = bop.ucFirst(name);\n\n if(_events['on'+name])\n {\n var event={\n 'meta':metadata,\n 'name':name,\n 'caller':_callerId,\n 'object':this,\n 'basiin':basiin, //allow alien scopes access to basiin\n 'proxy': _proxy\n }\n\n return _raise(_events['on'+name], event)\n }\n\n //if event doesn't exist\n _log( _callerId+ ' fired on'+name+ '. No hook!', 4);\n return undefined; //undefined events return undefined in stead of false\n }\n\n event.add = function(object, force)\n {\n //filter event properties out of the rest\n for (var p in object)\n if (p.substr(0,2) == 'on' && p.substr(2,1).match(/[A-Z]{1}/))\n {\n var eventName = p;\n\n //DEPRECATED: turn \"onLoad\" to \"onAfterLoad\"\n if (!bop.lcFirst(eventName).match(/^onAfter/) &&\n !bop.lcFirst(eventName).match(/^onBefore/))\n eventName= 'onAfter'+ bop.ucFirst(p.substr(2));\n\n //append if non existing or forced\n if ( object[p] && (events[eventName] === undefined || force) )\n _events[eventName] = object[p];\n }\n }\n\n event.exists = function(str) {return (_events[str] == undefined);}\n event.events = function (){\n var es = {}\n for(var e in _events) es[e] = _events[e];\n return es;\n }\n\n event.add(eventsObject);\n return event;\n }", "event(name, data = {}) {\n const eventObj = { event: name };\n for (const d in data) {\n const v = data[d];\n eventObj[d] = v;\n }\n logger.log('pushing event', eventObj);\n return window.criteo_q.push(eventObj);\n }", "function FakeEvent(type, bubbles, cancelable, target) {\r\n\t\t this.initEvent(type, bubbles, cancelable, target);\r\n\t\t }", "function createNewEvent() {\n\t\tcalendar.dblclick(function(event) {\n\t\t\tconsole.log(\"event\", event.originalEvent.layerX);\n\t\t\tvar orgEvent = event.originalEvent;\n\t\t\tvar _x = orgEvent.layerX;\n\t\t\tvar _y = orgEvent.layerY;\n\t\t\tvar eventTarget = calendar.find(\".events\");\n\t\t\tvar calOffset = calendar.offset();\n\t\t\tvar callOffsetX = calOffset.left;\n\t\t\tvar callOffsetY = calOffset.top;\n\t\t\tvar x = event.clientX- callOffsetX;\n\t\t\tvar y = event.clientY - callOffsetY;\n\n\t\t\tconsole.log(\"_Y\" + _y);\n\t\t\tconsole.log(\"_X\" + _x);\n\n\t\t\tvar event = \n\t\t\t\t \"<div class='event day-view cal-entry f-min noob' style='top: \" + y + \"px; left: \" + x + \"px;'>\"\n\t\t\t\t+ \"\t\t\t<dl>\"\n\t\t\t\t+ \"\t\t\t\t<dt class='tutor'>KEINE LEHRER</dt>\"\n\t\t\t\t+ \"\t\t\t\t<dt></dt>\"\n\t\t\t\t+ \"\t\t\t\t<dd class='placeholder'>KEINE SCHÜLER</dd>\"\n\t\t\t\t+ \"\t\t\t</dl>\"\n\t\t\t\t+ \"\t\t</div>\";\n\t\t\teventTarget.append(event);\n\t\t\tvar noob = eventTarget.find(\".noob\");\n\n\t\t\tconsole.log(\"MAKING AJAX REQUEST\");\n\n\t\t\t$.ajax({\n\t\t\t\ttype: \"POST\",\n\t\t\t\turl: \"http://127.0.0.1:8000/calendar\",\n\t\t\t\tdata: { \"newEvent\": \"True\", \"room\" : currCol, \"pos_x\" : _x, \"pos_y\" : _y}\n\t\t\t})\n\t\t\t.done(function( msg ) {\n\t\t\t\talert( \"Data Saved: \" + msg );\n\t\t\t});\n\n\t\t\t_this.reloadListener();\n\t\t});\n\t}", "function displayEventCreateWindow() {\n eventMode = \"Create\";\n if (!EventEditWindow.isVisible()) {\n EventEditWindow.show();\n resetForm(EventEditForm.getForm());\n } else {\n EventEditWindow.toFront();\n }\n}", "function createEvent(event) {\n console.log(\"Calling: /api/events POST\");\n $.ajax({\n url: api_host + '/api/events',\n type: \"POST\",\n data: event,\n success: function()\n {\n console.log(\"Action: refetchEvents\");\n getCalendar().fullCalendar('refetchEvents');\n console.log(\"Action: modal hide\");\n getModalEventCreate().modal('hide');\n }\n })\n}", "function addEvent(name,onlyAdults,price,dateOfEvent) {\n\n//check if event organizer is open \nif(organizerEventsOpen) console.log(\"Event organizer is currently closed for events.\");\n\n//if its open, do the following\nelse{\n //if name isn't given, terminate operation\n if(name==undefined) {\n console.log(\"Invalid operation. (Name of the event is required)\"); \n return;}\n else {\n //set price to 0(free) if no price was given\n if (price==undefined) price=0;\n var newEvent = new Event(getId(),name,onlyAdults,price,[],dateOfEvent);\n pushEvent(newEvent); }\n }\n}", "function Event(name) {\n // Public properties, assigned to the instance ('this')\n this.name = name;\n /*this.datetime = datetime;\n this.description = description;\n this.location = location;\n this.invited = invited;\n this.messages = messages;\n this.attendenceStatus = attendenceStatus;*/\n }", "createEventHandlers() {\n this.player.on('initialization_error', e => { console.error(e); });\n this.player.on('authentication_error', e => {\n console.error(e);\n this.setState({ loggedIn: false});\n });\n this.player.on('account_error', e => { console.error(e); });\n this.player.on('playback_error', e => { console.error(e); });\n\n this.player.on('player_state_changed', state => this.onStateChanged(state));\n\n this.player.on('ready', data => {\n let { device_id } = data;\n console.log(\"Listen now\");\n this.setState({ deviceId: device_id });\n });\n }", "function createSyntheticEvent(Interface) {\n /**\n * Synthetic events are dispatched by event plugins, typically in response to a\n * top-level event delegation handler.\n *\n * These systems should generally use pooling to reduce the frequency of garbage\n * collection. The system should check `isPersistent` to determine whether the\n * event should be released into the pool after being dispatched. Users that\n * need a persisted event should invoke `persist`.\n *\n * Synthetic events (and subclasses) implement the DOM Level 3 Events API by\n * normalizing browser quirks. Subclasses do not necessarily have to implement a\n * DOM interface; custom application-specific events can also subclass this.\n */ function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {\n this._reactName = reactName;\n this._targetInst = targetInst;\n this.type = reactEventType;\n this.nativeEvent = nativeEvent;\n this.target = nativeEventTarget;\n this.currentTarget = null;\n for(var _propName in Interface){\n if (!Interface.hasOwnProperty(_propName)) continue;\n var normalize = Interface[_propName];\n if (normalize) this[_propName] = normalize(nativeEvent);\n else this[_propName] = nativeEvent[_propName];\n }\n var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;\n if (defaultPrevented) this.isDefaultPrevented = functionThatReturnsTrue;\n else this.isDefaultPrevented = functionThatReturnsFalse;\n this.isPropagationStopped = functionThatReturnsFalse;\n return this;\n }\n _assign(SyntheticBaseEvent.prototype, {\n preventDefault: function() {\n this.defaultPrevented = true;\n var event = this.nativeEvent;\n if (!event) return;\n if (event.preventDefault) event.preventDefault(); // $FlowFixMe - flow is not aware of `unknown` in IE\n else if (typeof event.returnValue !== 'unknown') event.returnValue = false;\n this.isDefaultPrevented = functionThatReturnsTrue;\n },\n stopPropagation: function() {\n var event = this.nativeEvent;\n if (!event) return;\n if (event.stopPropagation) event.stopPropagation(); // $FlowFixMe - flow is not aware of `unknown` in IE\n else if (typeof event.cancelBubble !== 'unknown') // The ChangeEventPlugin registers a \"propertychange\" event for\n // IE. This event does not support bubbling or cancelling, and\n // any references to cancelBubble throw \"Member not found\". A\n // typeof check of \"unknown\" circumvents this issue (and is also\n // IE specific).\n event.cancelBubble = true;\n this.isPropagationStopped = functionThatReturnsTrue;\n },\n /**\n * We release all dispatched `SyntheticEvent`s after each event loop, adding\n * them back into the pool. This allows a way to hold onto a reference that\n * won't be added back into the pool.\n */ persist: function() {\n },\n /**\n * Checks if this event should be released back into the pool.\n *\n * @return {boolean} True if this should not be released, false otherwise.\n */ isPersistent: functionThatReturnsTrue\n });\n return SyntheticBaseEvent;\n }", "create() {\n\n }", "create() {\n\n }" ]
[ "0.6675035", "0.6479107", "0.64392054", "0.6429872", "0.6142637", "0.6102399", "0.59711486", "0.59674567", "0.5964464", "0.5946079", "0.59298646", "0.59168935", "0.5894774", "0.5892875", "0.5872369", "0.5844633", "0.58258116", "0.5786885", "0.57783765", "0.573211", "0.57164955", "0.56656224", "0.56579536", "0.56506497", "0.5584236", "0.5574429", "0.5529939", "0.5526657", "0.5508504", "0.55048186", "0.54923236", "0.54917765", "0.548269", "0.544847", "0.54273504", "0.54271257", "0.54247224", "0.5417515", "0.54175144", "0.5404038", "0.5401128", "0.53746986", "0.5358969", "0.53551924", "0.535495", "0.5337232", "0.53344154", "0.5325233", "0.5325233", "0.53196985", "0.5308698", "0.5302691", "0.5294443", "0.5294107", "0.52906865", "0.5289852", "0.5274245", "0.5274245", "0.5274245", "0.52721554", "0.5270504", "0.52675635", "0.52648556", "0.5260004", "0.52596956", "0.5240043", "0.5239022", "0.52386427", "0.5235813", "0.5234953", "0.52332747", "0.5232272", "0.5232272", "0.52259034", "0.5225418", "0.52248824", "0.5219996", "0.5219996", "0.52123624", "0.52123624", "0.52073", "0.52017707", "0.51964396", "0.51833904", "0.5177166", "0.5174157", "0.5169699", "0.5167634", "0.5166424", "0.51570904", "0.51528376", "0.51498353", "0.5149586", "0.51341033", "0.5132118", "0.512657", "0.5118807", "0.5116375", "0.5110409", "0.51056916", "0.51056916" ]
0.0
-1
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;}", "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.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.707457
4
Fuse.js v6.4.6 Lightweight fuzzysearch ( Copyright (c) 2021 Kiro Risk ( All Rights Reserved. Apache Software License 2.0
function isArray(value){return !Array.isArray?getTag(value)==='[object Array]':Array.isArray(value);}// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/baseToString.js
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Search(case_sentences_for_indexing) {\n\n //Configuring options for Fuse library\n var fuse_options = {\n shouldSort: true,\n includeScore: false,\n threshold: 0.6,\n location: 0,\n distance: 100,\n maxPatternLength: 200,\n minMatchCharLength: 1,\n keys: [\n \"title\"\n ]\n };\n\n\n //TEST DATA//\n //STOPWORDS are words we don't want to be included in search\n const STOPWORDS = [\"a\", \"about\", \"above\", \"after\", \"again\", \"against\", \"all\", \"am\", \"an\", \"and\", \"any\",\"are\",\"aren't\",\"as\",\"at\",\"be\",\"because\",\"been\",\"before\",\"being\",\"below\",\"between\",\"both\",\"but\",\"by\",\"can't\",\"cannot\",\"could\",\"couldn't\",\"did\",\"didn't\",\"do\",\"does\",\"doesn't\",\"doing\",\"don't\",\"down\",\"during\",\"each\",\"few\",\"for\",\"from\",\"further\",\"had\",\"hadn't\",\"has\",\"hasn't\",\"have\",\"haven't\",\"having\",\"he\",\"he'd\",\"he'll\",\"he's\",\"her\",\"here\",\"here's\",\"hers\",\"herself\",\"him\",\"himself\",\"his\",\"how\",\"how's\",\"i\",\"i'd\",\"i'll\",\"i'm\",\"i've\",\"if\",\"in\",\"into\",\"is\",\"isn't\",\"it\",\"it's\",\"its\",\"itself\",\"let's\",\"me\",\"more\",\"most\",\"mustn't\",\"my\",\"myself\",\"no\",\"nor\",\"not\",\"of\",\"off\",\"on\",\"once\",\"only\",\"or\",\"other\",\"ought\",\"our\",\"ours\",\"ourselves\",\"out\",\"over\",\"own\",\"same\",\"shan't\",\"she\",\"she'd\",\"she'll\",\"she's\",\"should\",\"shouldn't\",\"so\",\"some\",\"such\",\"than\",\"that\",\"that's\",\"the\",\"their\",\"theirs\",\"them\",\"themselves\",\"then\",\"there\",\"there's\",\"these\",\"they\",\"they'd\",\"they'll\",\"they're\",\"they've\",\"this\",\"those\",\"through\",\"to\",\"too\",\"under\",\"until\",\"up\",\"very\",\"was\",\"wasn't\",\"we\",\"we'd\",\"we'll\",\"we're\",\"we've\",\"were\",\"weren't\",\"what\",\"what's\",\"when\",\"when's\",\"where\",\"where's\",\"which\",\"while\",\"who\",\"who's\",\"whom\",\"why\",\"why's\",\"with\",\"won't\",\"would\",\"wouldn't\",\"you\",\"you'd\",\"you'll\",\"you're\",\"you've\",\"your\",\"yours\",\"yourself\",\"yourselves\"];\n \n // Sentences that are being searched through\n var caseSentences = case_sentences_for_indexing;\n\n removeStopwordsFromCaseSentences();\n\n //Initializing Fuse search library\n var fuse = new Fuse(caseSentences, fuse_options);\n\n\n // String -> String\n function removeStopwordsFromSentence(sentence){\n sentenceWordList = sentence.split(\" \");\n for (var i = 0; i < STOPWORDS.length; i++) {\n sentenceWordList = sentenceWordList.filter(word => word != STOPWORDS[i]);\n }\n //console.log(sentenceWordList);\n trimmedSentence = sentenceWordList.join(\" \")\n //console.log(trimmedSentence);\n return trimmedSentence;\n }\n\n function removeStopwordsFromCaseSentences(){\n for (var i = 0; i<caseSentences.length; i++) {\n caseSentences[i] = removeStopwordsFromSentence(caseSentences[i]);\n }\n }\n\n\n\n this.find_sentence_in_case = function(sentence_to_be_found) {\n trimmedSentence = removeStopwordsFromSentence(sentence_to_be_found);\n var result = fuse.search(trimmedSentence);\n //console.log(result[0]);\n return result[0];\n }\n \n}", "searchUserFuzzy(input){\r\n let results = fuzzy.filter(input, this.quizList, {extract: (el) => {\r\n return el.user;\r\n }})\r\n this.searchFuzzy(results);\r\n }", "searchTitleFuzzy(input){\r\n // Fuzzy Search the quiz title\r\n let results = fuzzy.filter(input, this.quizList, {extract: (el) => {\r\n return el.title;\r\n }})\r\n this.searchFuzzy(results);\r\n }", "function fuzzy(term, candidate, options) {\n\toptions = Object.assign({}, defaultOptions, options);\n\tvar scoreMethod = options.useDamerau ? damerauLevenshteinSellers : levenshteinSellers;\n\tterm = normalize(term, options);\n\tcandidate = normalize(candidate, options);\n\treturn scoreMethod(term, candidate);\n}", "function fuzzySearch (text, query) {\n var hay = text.toLowerCase();\n var n = -1; // unclear what this does\n query = query.toLowerCase();\n for (var index in query) {\n var letter = query[index];\n if (!~(n = hay.indexOf(letter, n + 1))){\n return false;\n }\n }\n return true;\n}", "function searchRecom() {\n\t// store keyword in localSession\n\twindow.localStorage.setItem('kw', keyWord);\n\t// Fuse options\t\t\t\t\n\tvar options = {\n\t\tshouldSort: true,\n\t\ttokenize: true,\n\t\tthreshold: 0.2,\n\t\tlocation: 0,\n\t\tdistance: 100,\n\t\tincludeScore: true,\n\t\tmaxPatternLength: 32,\n\t\tminMatchCharLength: 2,\n\t\tkeys: [\"title.recommendation_en\",\n\t\t\t \"title.title_recommendation_en\",\n\t\t\t \"topic.topic_en\"]\n\t};\n\t//Fuse search\n\tvar fuse = new Fuse(recommends, options); //https://fusejs.io/\n\tconst results = fuse.search(keyWord);\n\treturn results;\n}", "function showfuzzy () {\n var html = '';\n var query = search.value;\n var scores = [];\n // If it ends with a slash, do an exact search.\n if (query.length === 0 || query[query.length - 1] === '/') {\n scores = exactSearch(leaves, query);\n }\n if (scores.length === 0) {\n scores = fuzzy(leaves, query);\n }\n for (var i = 0; i < scores.length; i++) {\n // There is no remaining query (if the query is not complete, it is\n // not shown).\n var path = scorify(scores[i]);\n html += '<li class=' +\n (scores[i].leaf.meta.type === 'folder' ? 'folder' : 'file' ) +\n '><a href=\"' +\n encodePath(cwd + scores[i].leaf.path) + '\">' + path + '</a></li>';\n }\n filelist.innerHTML = html;\n resetSelection();\n initFileSelection();\n}", "function searchFuse(hotterm, clearOut){\n var result = fuse.search(hotterm);\n var fl = [];\n\n for (var i = 0; i < 5; i++) {\n \tresult[i].idx = i+1;\n \tfl.push(result[i]);\n };\n var scope = angular.element($(\"#fuseList\")).scope();\n if(clearOut){\n \tfl = [];\n }\n scope.$apply(function(){\n scope.fuseList = fl;\n });\n}", "function buildFuzzyCmds() {\n var data, columns;\n var columnprops = [];\n var columnnames = [];\n\n var options = {\n maxRows: 0,\n ignoreAliases: false,\n ignoreSelection: true\n };\n activeSheet.getUnderlyingDataAsync(options).then(function (d) {\n data = d;\n columns = data.getColumns();\n columns.forEach(function(item, index, array) {\n var singlecolumn = {\n index: item.getIndex(),\n name: item.getFieldName()\n };\n columnprops.push(singlecolumn);\n columnnames.push(item.getFieldName());\n });\n var cmds = {\n /*'test *multiple words': function() { alert('Multiple!'); },*/\n 'select *mark from column *column': fuzzySelect,\n 'display (data for) country *country': displayCountryData\n };\n var cmdKeys = Object.keys(cmds);\n var cmdString = cmdKeys.join(\"<br>\");\n annyang.addCommands(cmds);\n $(\"#cmdTarget\").append(\"<h2 class='available'>Beta Command String Similarity:</h2>\" +\n \"<p>Suitable for Country & Region</p><p>\" + cmdString + \"</p>\");\n });\n\n /**\n * Mark selection function executed on voice command match.\n * Selecting marks by matching with string similarity (provided by fuse.js) of input command.\n * @param {String} mark - desired mark from fetched voice input\n * @param {String} column - desired column from fetched voice input\n */\n function fuzzySelect(mark, column) {\n var columnindex;\n var marks = [];\n // fuzzy-search in column array for voice input column\n var fusecolumns = new Fuse(columnnames, fuseoptions);\n var fuzzycolumnresult = fusecolumns.search(column);\n var columnmatch = columnnames[fuzzycolumnresult[0]];\n for (let item of columnprops) {\n if (item.name === columnnames[fuzzycolumnresult[0]]) {\n columnindex = item.index;\n break;\n }\n }\n var rowData = data.getData();\n for (var i = 0; i < rowData.length; i++) {\n var dataelement = rowData[i];\n var help = dataelement[columnindex].formattedValue.toString();\n marks.push(help);\n }\n // fuzzy-search for voice input mark in previous obtained column data\n var fusemarks = new Fuse(marks, fuseoptions);\n var fuzzymarkresult = fusemarks.search(mark);\n var markmatch = marks[fuzzymarkresult[0]];\n // actual select operation\n activeSheet.selectMarksAsync(\n columnmatch,\n markmatch,\n tableau.FilterUpdateType.REPLACE);\n }\n\n /**\n * Data display function executed on voice command match.\n * Displaying data of a specific mark in a popup by matching with string similarity\n * (provided by fuse.js) of input command.\n * @param {String} country - desired mark from fetched voice input\n */\n function displayCountryData(country) {\n var rowData = data.getData();\n var countries = [];\n var fusecolumns = new Fuse(columnnames, fuseoptions);\n var fuzzycolumnresult = fusecolumns.search(\"Country\");\n var columnmatch = columnnames[fuzzycolumnresult[0]];\n var columnindex;\n for (let item of columnprops) {\n if (item.name === columnmatch) {\n columnindex = item.index;\n break;\n }\n }\n for (var i = 0; i < rowData.length; i++) {\n var dataelement = rowData[i];\n var help = dataelement[columnindex].formattedValue.toString();\n countries.push(help);\n }\n var fusecountries = new Fuse(countries, fuseoptions);\n var fuzzycountryresult = fusecountries.search(country);\n var countrymatch = countries[fuzzycountryresult[0]];\n var countryboxtitle = \"Data of Country \";\n var countrystring = \"\";\n countryboxtitle = countryboxtitle.concat(countrymatch, \": \");\n /** iterate over country data, if there's a match with the result of the fuzzy-search,\n a string containing the country's data is built. Once it's done, the for-loop is aborted. */\n for (var i = 0; i < rowData.length; i++) {\n var dataelement = rowData[i];\n if (dataelement[columnindex].formattedValue.toString() === countrymatch) {\n for (var i = 0; i < dataelement.length; i++) {\n countrystring = countrystring.concat(columnnames[i], \": \", dataelement[i].formattedValue.toString(), \"<br>\");\n }\n break;\n }\n }\n // display JQuery dialog popup containing country data\n $(\"<div>\"+countrystring+\"</div>\").dialog({\n title: countryboxtitle\n });\n }\n }", "function execute_query(data, params){\n //gets list of all searchable fields\n const keys = window.store.filter(a => a.searchable).map(a => a.value);\n //build full index\n const options = {\n keys: keys,\n threshold: window.threshold,\n useExtendedSearch: true,\n findAllMatches: true,\n }\n const fuse = new Fuse(data, options);\n //SEARCH 1: All fields search (q) + fuzzy text search (a)\n //adds q and a together and formats them in the way fuse.js expects them\n const a = params.a ? params.a : [];\n const q = params.q ? params.q : [];\n const or = q.length ? { $or: keys.map((k) => ({[k]:q.join(\" \")}))} : '';\n const search1 = typeof or === \"object\"? {$and: [...a, or ]} : {$and: [...a]};\n //search all fields and text fields\n //If there are search results, maps them to be in the same format as the original data\n //If there are no search params, return all data\n let searchRes = search1.$and.length ? fuse.search(search1).map(a => a.item) : data;\n const n = params.n ? params.n : [];\n if (n.length){\n //iterate through each item in the n field\n for (const param in n){\n //get type of param\n const field = Object.keys(n[param])[0];\n const type = get_field_by_value(\"type\", field);\n //deals with numbers\n if (type === \"num\"){\n //blank Set for storing unique results from among all num searches\n let newSearchResSet = new Set();\n //split number field into array on \",\" (trim whitespace)\n const nums = String(n[param][field]).split(\",\").map(a => a.replace(/\\s/g,''));\n for (const num in nums){\n if (nums[num].includes(\">\")){\n searchRes.filter(a => a[field] >= nums[num].replace(\">\",'')).forEach(a => newSearchResSet.add(a));\n } else if (nums[num].includes(\"<\")){\n searchRes.filter(a => a[field] <= nums[num].replace(\"<\",'')).forEach(a => newSearchResSet.add(a));\n } else {\n //note this works fine for numbers without a hyphen in them too, so there's no seperate case for that\n const numrange = nums[num].split(\"-\");\n searchRes.filter(a => (a[field] >= parseInt(numrange[0]) && (numrange[numrange.length -1].length ? a[field] <= parseInt(numrange[numrange.length - 1]) : true))).forEach(a => newSearchResSet.add(a));\n }\n }\n //passes new set of results back into searchRes variable.\n searchRes = [...newSearchResSet];\n //deals with symbols\n } else if (type === \"sym\"){\n //blank Set for storing unique results form among all sym searches\n let newSearchResSet = new Set();\n ///split symbol field into array on \"|\" (trim whitespace)\n const syms = String(n[param][field]).split(\"|\").map(a => a.replace(/\\s/g,''));\n for (const sym in syms){\n //if sym contains *, remove * and do a search for anything including the letters\n if (syms[sym].includes(\"*\")){\n //removes * from sym and converts it to an array of characters\n const wildsym = syms[sym].replace(\"*\",'').split('');\n //filters only search results that contain the array of charaters in wildsym\n searchRes.filter(a => wildsym.every(val => a[field].split('').includes(val))).forEach(a => newSearchResSet.add(a));\n } else { //if sym doesn't contain *, do a search for anything exactly matching the letters\n //note: sorts both strings to ensure that the order doesn't matter\n searchRes.filter(a => (a[field].split('').sort().join('') === syms[sym].split('').sort().join(''))).forEach(a => newSearchResSet.add(a));\n }\n }\n //passes new set of results back into searchRes variable.\n searchRes = [...newSearchResSet];\n }\n }\n }\n return searchRes;\n}", "function doSearch(){\n\n // Grab the search term from the input\n var term = document.getElementById('searchbox').value;\n\n var items = [];\n\n // Loop through all the files and rank them all\n for(var i = 0; i < fileList.length; i += 1){\n var f = fileList[i];\n\n // Split up the file name so we can grab the base name\n var parts = f.split('/');\n\n // This is the object that'll get passed to fuzzyScore\n var file = {\n fullPath: f,\n fileName: parts[parts.length - 1]\n };\n\n // Rank the file, primarily against the full path,\n // but if the file base name also matches, give it a\n // boost. 0.6 is a number that produces nice results\n var rank = fuzzyScore(file, term, {\n fullPath: 1,\n fileName: 0.6\n });\n\n // If the file scores positively against the search, add it in\n if(rank > 0){\n file.highlight = rank.highlights;\n file.score = +rank;\n items.push(file);\n }\n }\n\n // Sort the items order of decreasing relevance\n items.sort(function(a, b){\n if(a.score > b.score) return -1;\n if(a.score < b.score) return 1;\n return 0;\n });\n\n // And render them all\n renderSearchResults(items);\n }", "function Search(path, items, options){\n\n this.path = path;\n this.items = items;\n this.options = options;\n \n var prefixes;\n if (options.prefixes) {\n prefixes = options.prefixes;\n }\n\n // TODO: Make this more solid (case insensitive?)\n for (var k in prefixes) if (prefixes.hasOwnProperty(k)) {\n prefixes[k] = new RegExp(prefixes[k]);\n Titanium.API.debug('REGEX: ' + prefixes[k]);\n }\n \n var caches = {};\n \n function findCache(abbr){\n var len = abbr.length;\n while (len--) {\n if (caches[abbr]) return caches[abbr];\n abbr = abbr.substr(0, len);\n }\n return null;\n }\n\n this.score = function(abbr){\t\n var i,j,k,\n len, len2, ch, ranges, str, found, lastIdx,\n result = [],\n d1, d2;\n\n d1 = (new Date).getTime();\n\n var cache, newCache;\n\n // Caches store files NOT-FOUND, otherwise the stop-at-limit won't work since\n // we don't do a full scan if we reach a max. number of matched items \n cache = findCache(abbr);\n // TODO: Do not create new cache if abbr.length is longer than X\n if (cache !== caches[abbr]) {\n // If previous cache was found clone its contents!!!!\n newCache = caches[abbr] = cache ? cache.clone() : (new Bits(items.length));\n }\n\n // Extract prefix from abbr if pressent\n var prefixRe, ofs = abbr.indexOf(':');\n if (-1 < ofs) {\n prefixRe = abbr.substr(0, ofs);\n if (prefixes[prefixRe]) {\n abbr = abbr.substr(ofs+1);\n prefixRe = prefixes[prefixRe];\n } else {\n prefixRe = null;\n }\n }\n\n // Build a regexp to match the abbreviation\n var ch, re = '', chars = abbr.toLowerCase().split('');\n for (i=0; i<abbr.length; i++) {\n ch = abbr.charAt(i).replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, \"\\\\$&\");\n re += '[^' + ch + ']*' + ch;\n }\n if (re) {\n re = new RegExp('^' + re, 'i');\n }\n\n\n var skipped = skippedRE = 0;\n for (i=0, len=items.length; i<len; i++) {\n\n if (cache && cache.test(i)) {\n skipped++;\n continue;\n }\n\n str = items[i];\n\n // At this point we need to check if it needs path expansion\n if (str.charAt(0) === '^') {\n // Look back in the list to find the previous item with a path\n // TODO: Improve this by caching the last found path\n for (j=i-1; j>=0; j--) {\n if (items[j].charAt(0) !== '^') {\n str = items[j].substr(0, items[j].lastIndexOf('/')) + str.substr(1);\n break;\n }\n }\n }\n\n\n // Comparing against regexp is actually much faster than doing it with indexOf\n // We use it just to tell if all the abbr letters are present\n if (re && !re.test(items[i])) {\n skippedRE++;\n newCache && newCache.set(i);\n continue;\n }\n\n // If a prefix was used filter it\t\t\t\n if (prefixRe && !prefixRe.test(items[i])) {\n newCache && newCache.set(i);\n continue;\n }\n\n ranges = [];\n str = items[i].toLowerCase();\n found = true;\n lastIdx = -1;\n for (j=0, len2=abbr.length; j<len2; j++) {\n ch = abbr.charAt(j);\n \n // SLOW DOWN to test a more realistic matcher\n for (var k=0; k<10; k++) {\n str.toLowerCase().indexOf(ch, lastIdx+1);\n }\n \n lastIdx = str.indexOf(ch, lastIdx+1);\n \n if (-1 === lastIdx) {\n found = false;\n break;\n }\n ranges.push(lastIdx);\n }\n \n if (found) {\n result.push({\n value: items[i],\n ranges: ranges\n });\n\n // Fetch at most 1000 items\n // TODO: Should be configurable with an option to disable it\n // TODO: Breaking without doing a full scan means that the cache is not complete!!!\n if (result.length >= 1000) break;\n } else {\n if (newCache) {\n newCache.set(i);\n } else {\n // Update an incomplete cache\n cache.set(i);\n }\n }\n }\n\n d2 = (new Date).getTime();\t\n Titanium.API.debug('SCORE JOB: ' + ((d2-d1)/1000).toFixed(4) + 's Items: ' + result.length + ' Skipped: ' + skipped + ' / ' + skippedRE);\t\n return result;\n };\n}", "executeSearch(term) {\n var results;\n try {\n results = this.search.fuse.search(term); // the actual query being run using fuse.js\n } catch (err) {\n if (err instanceof TypeError) {\n console.log(\"hugo-fuse-search: search failed because Fuse.js was not instantiated properly.\")\n } else {\n console.log(\"hugo-fuse-search: search failed: \" + err)\n }\n return;\n }\n let searchitems = '';\n\n if (results.length === 0) { // no results based on what was typed into the input box\n this.resultsAvailable = false;\n searchitems = '';\n } else { // we got results, show 5\n for (let item in results.slice(0,5)) {\n let result = results[item];\n if ('item' in result) {\n let item = result.item;\n searchitems += this.itemHtml(item);\n }\n }\n this.resultsAvailable = true;\n }\n\n this.element_results.innerHTML = searchitems;\n if (results.length > 0) {\n this.top_result = this.element_results.firstChild;\n this.bottom_result = this.element_results.lastChild;\n }\n }", "function fuzzySearch(entry, search) {\n\tvar key;\n\n\tif(search === '*') {\n\t\tentry.search = 'global search *';\n\t\treturn true;\n\t}\n\n\t// Test key\n\tif((new RegExp(search, 'i')).test(entry.EntryKey)) { // entry.EntryKey.test(new RegExp(search))\n\t\tentry.search = 'Key';\n\t\treturn true;\n\t}\n\n\t// Test SHA1\n\tif((new RegExp('^' + search)).test(sha1(entry.EntryKey))) {\n\t\tentry.search = 'Sha1';\n\t\treturn true;\n\t}\n\n\t// Test type\n\tif((new RegExp(search)).test(entry.EntryType)) {\n\t\tentry.search = 'Type';\n\t\treturn true;\n\t}\n\n\t// Find in any field\n\tfor(key in entry.Fields) {\n\t\tif(entry.Fields.hasOwnProperty(key)) {\n\t\t\tif((new RegExp(search, 'i')).test(entry.Fields[key])) {\n\t\t\t\tentry.search = key;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn false;\n}", "function onFuzzySearch(query) {\n var searchSuccess = false;\n\n // TODO: rewrite this code, make more general code on this function.\n // Add container where to search as a parameter.\n if (\"variables\" === _currentTilesType) {\n _$variablesListContent.empty();\n\n _variables.sort(function (a, b) {\n if(a.Description < b.Description) return -1;\n if(a.Description > b.Description) return 1;\n return 0;\n }).forEach(function (variable) {\n var name = variable.Description;\n var pattern = new RegExp(query, \"gi\");\n if (pattern.test(name)) {\n searchSuccess = true;\n createVariableTile(variable).appendTo(_$variablesListContent)\n .find(\".variable-name\")\n .highlightSubstring(query);\n }\n });\n\n if (false === searchSuccess) {\n _$variablesListContent.text(\"No results found.\");\n }\n else {\n _$variablesList.nanoScroller();\n }\n }\n else {\n _$datasourcesListContent.empty();\n\n _selectedVariable.DataSources.sort(function (a, b) {\n if(a.Name < b.Name) return -1;\n if(a.Name > b.Name) return 1;\n return 0;\n }).forEach(function (datasource) {\n var name = datasource.Name;\n var pattern = new RegExp(query, \"gi\");\n if (pattern.test(name)) {\n searchSuccess = true;\n // data(\"name\") is used for fuzzyHighlight\n createDataSourceTile(datasource).appendTo(_$datasourcesListContent)\n .find(\".data-source-name\")\n .data(\"name\", datasource.Name)\n .highlightSubstring(query);\n }\n });\n\n if (false === searchSuccess) {\n _$datasourcesListContent.text(\"No results found.\");\n }\n else {\n _$variablesList.nanoScroller();\n }\n }\n\n return searchSuccess;\n }", "function searchThis(e) {\n $('#searchbox').val($(e).text());\n FJS.filter();\n}", "function fuzzySearch(keyword, success, error) {\n var str = keyword;\n\n pg.connect(conString, function(err, client, done) {\n if(err) {\n console.error('error fetching client from pool', err);\n return error('error fetching client from pool', err);\n }\n\n // Get course datas\n client.query('SELECT *, ARRAY[course_name <-> $1, professor <-> $1, enroll_number <-> $1] AS fuzzy FROM courses ORDER BY fuzzy LIMIT 10', [str], function(err, result) {\n\n done();\n if(err) { // query errors\n console.error('error running query', err);\n return error('error running query', err);\n }\n\n var datas = result.rows;\n\n return success(datas);\n\n });\n\n pg.end();\n });\n}", "function search_algo(f, term) {\r\n var mach = 0;\r\n var srch = searchEntities(term);\r\n var name = searchEntities(f.name);\r\n _.each(srch, function (s) {\r\n s = jQuery.trim(s)\r\n _.each(name, function (n) {\r\n n = jQuery.trim(n)\r\n if (n.indexOf(s) != -1) {mach++;}\r\n if (n.indexOf(s) === 0) {mach++;}\r\n if (n == s) {mach++;}\r\n if (f.id == s) {mach += 2;}\r\n });\r\n });\r\n if (mach > 0 && !f.server) mach++;\r\n return mach;\r\n}", "function mainSearchFn() {\n // Check a search term has been entered\n if (searchText.value) {\n //Track how long the search takes: search start\n var d = new Date();\n var searchStartTime = d.getTime();\n\n //Search with index\n //Load searchIndex and searchSettings from localStorage.\n searchTerm = searchText.value;\n searchIndex = JSON.parse(localStorage.getItem(\"searchIndex\"));\n searchSettings = JSON.parse(localStorage.getItem(\"searchSettings\"));\n\n //kick off the search\n if (searchSettings[0] === \"fuzzy\") {\n console.log(\"Doing a fuzzy search...\");\n\n //First normalize the searchterm: no accents, no caps\n var searchTermLowerCaseNoAccents = searchTerm\n .toLowerCase()\n .normalize(\"NFD\")\n //replace accents with normal/unaccented characaters\n .replace(/[\\u0300-\\u036f]/g, \"\");\n for (const verse of searchIndex) {\n var verseLowerCaseNoAccents = verse.verseText\n .toLowerCase()\n .normalize(\"NFD\")\n .replace(/[\\u0300-\\u036f]/g, \"\");\n\n //Now search:\n //First check if the folder we're looking at exists in searchSettings\n if (searchSettings.includes(verse.folder) === true) {\n //if there is the search term, then give the result boolean result; string.includes returns true or false.\n var searchSuccess = verseLowerCaseNoAccents.includes(\n searchTermLowerCaseNoAccents\n );\n if (searchSuccess === true) {\n addSearchResult(verse);\n }\n }\n }\n } else if (searchSettings[0] === \"strict\") {\n //do strict search\n console.log(\"Doing a strict search...\");\n\n for (const verse of searchIndex) {\n //First check if the folder we're looking at exists in searchSettings\n if (searchSettings.includes(verse.folder) === true) {\n var searchSuccess = verse.verseText.match(searchTerm);\n //if there is no search term found, the result is null - if the search term is found, it's not null.\n //If success, then give the result.\n if (!(searchSuccess === null)) {\n addSearchResult(verse);\n }\n }\n }\n }\n }\n\n //If there are no results by now, give the user feedback to that effect\n document.getElementById(\"no-items\").innerHTML = \"\";\n if (!resultsList.hasChildNodes()) {\n console.log(\"Search item not found in index\");\n document.getElementById(\n \"no-items\"\n ).innerHTML = `<img src=\"no-results.png\">`;\n }\n\n //Log out time elapsed on the search\n var d = new Date();\n var searchEndTime = d.getTime();\n var totalTimeElapsed = searchEndTime - searchStartTime;\n console.log(\"Search complete in \" + totalTimeElapsed + \" milliseconds\");\n}", "searchSuggest(query) {\r\n let finalQuery;\r\n if (typeof query === \"string\") {\r\n finalQuery = { querytext: query };\r\n }\r\n else {\r\n finalQuery = query;\r\n }\r\n return this.create(SearchSuggest).execute(finalQuery);\r\n }", "function fuzzy_search_v2 (pattern, txt) {\n let patt_len = pattern.length;\n let txt_len = txt.length;\n\n if (patt_len === 0) return 0;\n else if (txt_len === 0) return null;\n\n //\n // This filter kinda defeats the point of the Smith-Waterman algo.\n //\n // Check if txt has all the chars from pattern and whether they appear in\n // the same order, exluding any gaps between them.\n //\n let patt_idx = 0;\n\n for (let i = 0; i < txt_len; i++)\n if (txt[i] === pattern[patt_idx])\n patt_idx++;\n\n if (patt_len !== patt_idx) return null;\n\n //\n // initialize scoring matrix\n //\n let score = 0;\n let matrix = [];\n\n i = patt_len + 1;\n while (i--) matrix[i] = [0];\n\n let j = txt_len + 1;\n while (j--) matrix[0][j] = 0;\n\n //\n // fill scoring matrix\n //\n let sub_cost = 0;\n for (j = 1; j <= txt_len; j++) {\n for (i = 1; i <= patt_len; i++) {\n sub_cost = (txt[j-1] === pattern[i-1]) ? 10 : -5;\n\n matrix[i][j] = Math.max(matrix[i-1][j-1] + sub_cost,\n matrix[i-1][j] - 3,\n matrix[i][j-1] - 3,\n 0);\n\n if (matrix[i][j] > score) score = matrix[i][j];\n }\n }\n\n return score;\n}", "function doubleSearch () {}", "async loadSearch() {\n let fs = this;\n return fetchJSONFile(fs.index, function(data) {\n //data = data.filter(function(page) {\n // return page.lang == document.documentElement.lang;\n //})\n fs.fuse = new Fuse(data, fs.fuseConfig);\n fs.isInit = true;\n console.log(\"hugo-fuse-search: Fuse.js was succesfuly instantiated.\");\n }, function(status, statusText) {\n console.log(\"hugo-fuse-search: retrieval of index file was unsuccesful (\\\"\" + fs.index + \"\\\": \" + status + \" - \" + statusText + \")\")\n });\n }", "filterNotes(e) {\n e.preventDefault();\n const tagCategory = this.state.search;\n \n let promise = axios.get(url);\n promise\n .then(result => {\n const notes = [];\n for (let id in result.data) {\n const note = {\n id, tag: result.data[id].tag, \n text: result.data[id].text\n };\n notes.push(note);\n \n } \n let newNotes;\n if (tagCategory === '') {\n newNotes = notes;\n }\n else {\n var options = {\n pre: '<'\n , post: '>'\n , extract: function(el) { return el.rompalu; }\n };\n newNotes = fuzzy.filter('bcn', notes,options);\n var matches = newNotes.map(function(el) { return el.string; });\n // newNotes = notes.filter(note => {\n // return note.tag && note.tag.indexOf(tagCategory) > -1;\n // });\n }\n this.setState({notes: newNotes});\n }, err => {\n console.log(err);\n });\n}", "function searchTerm(){\n \n }", "function searchForWord(userEntry, language) {\n\n const matchResults = [];\n\n if (language === 'TELUGU') {\n return wordRef.child(userEntry)\n .once('value')\n .then(snap => {\n\n /* Return array containing only userEntry if userEntry is an exact match */\n if (snap.exists()) {\n matchResults.type = 'EXACT';\n matchResults.push(userEntry);\n return matchResults;\n } \n \n /* Return array containing closest matchResults to userEntry otherwise */\n else {\n matchResults.type = 'ESTIMATE';\n return wordRef.orderByKey()\n .startAt(userEntry[0])\n .endAt(`${userEntry[0]}\\uf8ff`)\n .once('value')\n .then(snap => {\n \n const matchSet = FuzzySet();\n\n /* Add all words in query result to the FuzzySet */\n snap.forEach(word => {\n matchSet.add(word.key);\n });\n\n const resultArray = matchSet.get(userEntry);\n\n if (resultArray === null) {\n return matchResults;\n }\n \n /* Adds all results to matchResults */\n resultArray.forEach(result => {\n matchResults.push(result[1]);\n });\n\n return matchResults;\n\n })\n .catch(err => console.error(err));\n }\n\n })\n .catch(err => console.error(err));\n } else {\n return synonymRef.child(userEntry)\n .once('value')\n .then(snap => {\n \n /* Return array containing only userEntry if userEntry is an exact match */\n if (snap.exists()) {\n matchResults.type = 'EXACT';\n snap.forEach(teluguWord => {\n matchResults.push(teluguWord.val());\n });\n \n return matchResults;\n }\n \n /* Return array containing closest matchResults to userEntry otherwise */\n else {\n matchResults.type = 'ESTIMATE';\n return synonymRef.orderByKey()\n .startAt(userEntry[0])\n .endAt(`${userEntry[0]}\\uf8ff`)\n .once('value')\n .then(snap => {\n \n const matchSet = FuzzySet();\n\n /* Add all synonyms in query result to the FuzzySet */\n snap.forEach(synonym => {\n matchSet.add(synonym.key);\n });\n \n const closestSynonymArray = matchSet.get(userEntry);\n\n if (closestSynonymArray === null) {\n return matchResults;\n } \n \n /* Adds Telugu words associated to closestSynonym to matchResults */\n else {\n const closestSynonym = closestSynonymArray[0][1];\n return synonymRef.child(closestSynonym)\n .once('value')\n .then(snap => {\n snap.forEach(teluguWord => {\n matchResults.push(teluguWord.val());\n });\n return matchResults;\n })\n .catch(err => console.error(err));\n }\n })\n .catch(err => console.error(err));\n }\n\n })\n .catch(err => console.error(err));\n }\n}", "function fuzzyBookSearch(input, inputList = fakeBooks){\n\tconst outputList = [];\n\t//name search, similarity limit is .75\n\tfor(let index = 0; index<inputList.length; index++){\n\t\tif(stringCompByLevenshteinDistance(input,inputList[index].getBookTitle()) > 0.75){\n\t\t\toutputList.push(inputList[index])\n\t\t\tconsole.log('Book found by title, similarity is '+stringCompByLevenshteinDistance(input,inputList[index].getBookTitle()))\n\t\t}\n\t}\n\t//author search, similarity limit is .8\n\tfor(let index = 0; index<inputList.length; index++){\n\t\tif(stringCompByLevenshteinDistance(input,inputList[index].getAuthor()) > 0.8){\n\t\t\toutputList.push(inputList[index])\n\t\t\tconsole.log('Book found by author, similarity is '+stringCompByLevenshteinDistance(input,inputList[index].getAuthor()))\n\t\t}\n\t}\n\t\n\t//genre search, similarity limit is 1\n\tfor(let index = 0; index<inputList.length; index++){\n\t\tif(stringCompByLevenshteinDistance(input,inputList[index].getGenre()) == 1){\n\t\t\toutputList.push(inputList[index])\n\t\t\tconsole.log('Book found by genre, similarity is '+stringCompByLevenshteinDistance(input,inputList[index].getGenre()))\n\t\t}\n\t}\n\treturn outputList\n}", "function fuzzyFilterTextChanged(Text) {\n\t return function (dispatch, getState) {\n\t dispatch(Broker.createAction(Broker.Areas.Search.Actions.FuzzyFilterTextChanged, { Text: Text }));\n\t };\n\t}", "lookup(query) {\n if (query) {\n\n // strip out non-alpha characters and spaces and force to\n // lower case in order to search on the special 'search'\n // property present on all the models\n const sanitized = query.replace(/[\\s\\W_]+/g, '').toLowerCase();\n if (sanitized.length) {\n\n // filters the models in the collection\n const results = this.filter(_matcher(sanitized));\n \n // sort filtered results by relevance score\n const sorted = results.sort((a, b) => {\n if (a.score < b.score) return 1;\n if (a.score > b.score) return -1;\n return 0;\n });\n \n // only return the top 10 results\n return sorted.slice(0, MAX_RESULTS);\n }\n }\n return []; // return empty result set if no query\n }", "queryChanged(newValue){\n let searchedItems = _.filter(this.items, i => {\n return i.text.toLowerCase().indexOf(newValue.toLowerCase()) != -1 ||\n i.fullText.toLowerCase().indexOf(newValue.toLowerCase()) != -1;\n });\n\n console.log(searchedItems);\n this.fetchMarkers(searchedItems, self.map);\n }", "filter(query) {\n const regex = new RegExp(query, 'i');\n \t\t const filteredItems = getAllfoods().filter((item) => {\n \t\t\t return regex.test(item.name);\n \t\t})\n \t\t\n \t\t this.setState({foodData: filteredItems});\n \t}", "function fuzzySearch(needle, haystack) {\n\tvar editDistance = levenshtein.get(needle, haystack);\n\treturn editDistance <= MAX_EDIT_DISTANCE;\n}", "function fullTextSearch(query, eventTemplates, callback) {\n function handler(results, error) {\n if (error != null)\n log(\"Error searching with Zeitgeist FTS: \"+error);\n else\n callback(results[0].map(Event.fromPlain));\n }\n _index.SearchRemote(query, [0, MAX_TIMESTAMP],\n eventTemplates.map(Event.toPlain),\n 0, // offset into the search results\n MAX_RESULTS,\n ResultType.MOST_POPULAR_SUBJECTS, handler);\n}", "function SearchWrapper () {}", "function search() {\n\t\n}", "function fuzzyOutMFTriangular(variables){\n if(typeof(variables) != \"object\") variables = [variables];\n return salfunction(variables, fuzzyOutMFTriangularelements, fuzzyOutMFTriangularcache);\n}", "function searchSingleFarm(e) {\n setInput(e.target.textContent.toLowerCase());\n }", "isFuzzy() {\n\t\treturn this._isFuzzy;\n\t}", "function get_matching_sf( sf_searchResults, cust_id, cust_group, supplier, factory ) {\r\n \r\n var index;\r\n \r\n if ( sf_searchResults.length == 0 || sf_searchResults == null )\r\n return null;\r\n \r\n // Init columns\r\n var sf_custid_col = new nlobjSearchColumn( 'custrecord_sourcingfee_customercode' );\r\n var sf_custgrp_col = new nlobjSearchColumn( 'custrecord_sourcingfee_customergrp' );\r\n var sf_supplier_col = new nlobjSearchColumn( 'custrecord_sourcingfee_supplier' );\r\n var sf_factory_col = new nlobjSearchColumn( 'custrecord_sourcing_fty' );\r\n \r\n var sf_agent_col = new nlobjSearchColumn( 'custrecord_sourcingfee_sourcingagent' );\r\n var sf_commis_col = new nlobjSearchColumn( 'custrecord_sourcingfee_commis' );\r\n \r\n // Init result object\r\n var sf_obj = new Object();\r\n \r\n // Filter 1 \r\n for ( index = 0; index < sf_searchResults.length; index ++ ) {\r\n \r\n var sf_custid = sf_searchResults[index].getValue( sf_custid_col ) ? sf_searchResults[index].getValue( sf_custid_col ) : null;\r\n var sf_custgrp = sf_searchResults[index].getValue( sf_custgrp_col ) ? sf_searchResults[index].getValue( sf_custgrp_col ) : null;\r\n var sf_supplier = sf_searchResults[index].getValue( sf_supplier_col ) ? sf_searchResults[index].getValue( sf_supplier_col ) : null;\r\n var sf_factory = sf_searchResults[index].getValue( sf_factory_col ) ? sf_searchResults[index].getValue( sf_factory_col ) : null; \r\n \r\n if ( sf_custid == cust_id && sf_custgrp == cust_group && sf_supplier == supplier && sf_factory == factory ) {\r\n \r\n sf_obj.id = sf_searchResults[index].getId();\r\n sf_obj.agent = sf_searchResults[index].getValue( sf_agent_col );\r\n sf_obj.commis = sf_searchResults[index].getValue( sf_commis_col );\r\n sf_obj.filter = 1;\r\n \r\n return sf_obj;\r\n \r\n }\r\n \r\n }\r\n \r\n // Filter 2\r\n for ( index = 0; index < sf_searchResults.length; index ++ ) {\r\n \r\n var sf_custid = sf_searchResults[index].getValue( sf_custid_col ) ? sf_searchResults[index].getValue( sf_custid_col ) : null;\r\n var sf_custgrp = sf_searchResults[index].getValue( sf_custgrp_col ) ? sf_searchResults[index].getValue( sf_custgrp_col ) : null;\r\n var sf_supplier = sf_searchResults[index].getValue( sf_supplier_col ) ? sf_searchResults[index].getValue( sf_supplier_col ) : null;\r\n var sf_factory = sf_searchResults[index].getValue( sf_factory_col ) ? sf_searchResults[index].getValue( sf_factory_col ) : null;\r\n \r\n if ( sf_custid == cust_id && sf_custgrp == cust_group && sf_supplier == supplier && sf_factory == null ) {\r\n \r\n sf_obj.id = sf_searchResults[index].getId();\r\n sf_obj.agent = sf_searchResults[index].getValue( sf_agent_col );\r\n sf_obj.commis = sf_searchResults[index].getValue( sf_commis_col );\r\n sf_obj.filter = 2;\r\n \r\n return sf_obj;\r\n \r\n }\r\n \r\n }\r\n \r\n // Filter 3\r\n for ( index = 0; index < sf_searchResults.length; index ++ ) {\r\n \r\n var sf_custid = sf_searchResults[index].getValue( sf_custid_col ) ? sf_searchResults[index].getValue( sf_custid_col ) : null;\r\n var sf_custgrp = sf_searchResults[index].getValue( sf_custgrp_col ) ? sf_searchResults[index].getValue( sf_custgrp_col ) : null;\r\n var sf_supplier = sf_searchResults[index].getValue( sf_supplier_col ) ? sf_searchResults[index].getValue( sf_supplier_col ) : null;\r\n var sf_factory = sf_searchResults[index].getValue( sf_factory_col ) ? sf_searchResults[index].getValue( sf_factory_col ) : null;\r\n \r\n if ( sf_custid == cust_id && sf_custgrp == cust_group && sf_supplier == null && sf_factory == null ) {\r\n \r\n sf_obj.id = sf_searchResults[index].getId();\r\n sf_obj.agent = sf_searchResults[index].getValue( sf_agent_col );\r\n sf_obj.commis = sf_searchResults[index].getValue( sf_commis_col );\r\n sf_obj.filter = 3;\r\n \r\n \r\n return sf_obj;\r\n \r\n }\r\n \r\n }\r\n \r\n // Filter 4\r\n for ( index = 0; index < sf_searchResults.length; index ++ ) {\r\n \r\n var sf_custid = sf_searchResults[index].getValue( sf_custid_col ) ? sf_searchResults[index].getValue( sf_custid_col ) : null;\r\n var sf_custgrp = sf_searchResults[index].getValue( sf_custgrp_col ) ? sf_searchResults[index].getValue( sf_custgrp_col ) : null;\r\n var sf_supplier = sf_searchResults[index].getValue( sf_supplier_col ) ? sf_searchResults[index].getValue( sf_supplier_col ) : null;\r\n var sf_factory = sf_searchResults[index].getValue( sf_factory_col ) ? sf_searchResults[index].getValue( sf_factory_col ) : null;\r\n \r\n if ( sf_custid == cust_id && sf_custgrp == null && sf_supplier == null && sf_factory == null ) {\r\n \r\n sf_obj.id = sf_searchResults[index].getId();\r\n sf_obj.agent = sf_searchResults[index].getValue( sf_agent_col );\r\n sf_obj.commis = sf_searchResults[index].getValue( sf_commis_col );\r\n sf_obj.filter = 4;\r\n \r\n return sf_obj;\r\n \r\n }\r\n \r\n }\r\n \r\n // Filter 5\r\n for ( index = 0; index < sf_searchResults.length; index ++ ) {\r\n \r\n var sf_custid = sf_searchResults[index].getValue( sf_custid_col ) ? sf_searchResults[index].getValue( sf_custid_col ) : null;\r\n var sf_custgrp = sf_searchResults[index].getValue( sf_custgrp_col ) ? sf_searchResults[index].getValue( sf_custgrp_col ) : null;\r\n var sf_supplier = sf_searchResults[index].getValue( sf_supplier_col ) ? sf_searchResults[index].getValue( sf_supplier_col ) : null;\r\n var sf_factory = sf_searchResults[index].getValue( sf_factory_col ) ? sf_searchResults[index].getValue( sf_factory_col ) : null;\r\n \r\n if ( sf_custgrp == cust_group && sf_custid == null && sf_supplier == null && sf_factory == null ) {\r\n \r\n sf_obj.id = sf_searchResults[index].getId();\r\n sf_obj.agent = sf_searchResults[index].getValue( sf_agent_col );\r\n sf_obj.commis = sf_searchResults[index].getValue( sf_commis_col );\r\n sf_obj.filter = 5;\r\n \r\n return sf_obj;\r\n \r\n }\r\n \r\n }\r\n \r\n return null;\r\n \r\n}", "searchWithFilter(query) {\n var terms = query.split(' ');\n return this.idx.search(query).filter(function(result) {\n return Object.keys(result.matchData.metadata).length >= terms.length;\n });\n }", "function local(options) {\n var data = options, // data elements\n dataText,\n tmp,\n text = function (item) { return \"\"+item.text; }; // function used to retrieve the text portion of a data item that is matched against the search\n\n if ($.isArray(data)) {\n tmp = data;\n data = { results: tmp };\n }\n if ($.isFunction(data) === false) {\n tmp = data;\n data = function() { return tmp; };\n }\n var dataItem = data();\n if (dataItem.text) {\n text = dataItem.text;\n // if text is not a function we assume it to be a key name\n if (!$.isFunction(text)) {\n dataText = dataItem.text; // we need to store this in a separate variable because in the next step data gets reset and data.text is no longer available\n text = function (item) { return item[dataText]; };\n }\n }\n return function (query) {\n var t = query.term, filtered = { results: [] }, process;\n if (t === \"\") {\n query.callback(data());\n return;\n }\n process = function(datum, collection) {\n var group, attr;\n datum = datum[0];\n if (datum.children) {\n group = {};\n for (attr in datum) {\n if (datum.hasOwnProperty(attr)) group[attr]=datum[attr];\n }\n group.children=[];\n $(datum.children).each2(function(i, childDatum) { process(childDatum, group.children); });\n if (group.children.length || query.matcher(t, text(group), datum)) {\n collection.push(group);\n }\n } else {\n if (query.matcher(t, text(datum), datum)) {\n collection.push(datum);\n }\n }\n };\n $(data().results).each2(function(i, datum) { process(datum, filtered.results); });\n query.callback(filtered);\n };\n }", "async search({\n request,\n response,\n }) {\n // Validate user input\n const validation = await validateAll(request.all(), {\n needle: 'required',\n });\n if (validation.fails()) {\n return response.status(401).send({\n message: 'Please provide a needle',\n messages: validation.messages(),\n status: 401,\n });\n }\n\n const needle = request.input('needle');\n\n // Get results\n let results;\n\n if (needle === 'ferdi:custom') {\n const dbResults = (await Recipe.all()).toJSON();\n results = dbResults.map((recipe) => ({\n id: recipe.recipeId,\n name: recipe.name,\n ...typeof recipe.data === 'string' ? JSON.parse(recipe.data) : recipe.data,\n }));\n } else {\n let remoteResults = [];\n if (Env.get('CONNECT_WITH_FRANZ') == 'true') { // eslint-disable-line eqeqeq\n remoteResults = JSON.parse(await (await fetch(`https://api.franzinfra.com/v1/recipes/search?needle=${encodeURIComponent(needle)}`)).text());\n }\n const localResultsArray = (await Recipe.query().where('name', 'LIKE', `%${needle}%`).fetch()).toJSON();\n const localResults = localResultsArray.map((recipe) => ({\n id: recipe.recipeId,\n name: recipe.name,\n ...typeof recipe.data === 'string' ? JSON.parse(recipe.data) : recipe.data,\n }));\n\n results = [\n ...localResults,\n ...remoteResults || [],\n ];\n }\n\n return response.send(results);\n }", "get materialSearch() {}", "searchQuery(value) {\n let result = this.tableData;\n if (value !== '') {\n result = this.fuseSearch.search(this.searchQuery);\n }\n this.searchedData = result;\n }", "suggest(query){\n const that = this;\n let maxNumber = this.maxSuggestResults;\n const promises = [];\n promises.push(that.suggestTextQuery(query, maxNumber));\n Object.keys(that.suggestionIndexes).forEach(function(indexKey){\n const set = that.suggestionIndexes[indexKey];\n const intent = set.search(query, maxNumber);\n promises.push(intent);\n });\n const adapters = that.adapters;\n return Promise.all(promises).then(function(dataSets){\n let items = [];\n dataSets.forEach(function(dataSet){\n if (!dataSet || !dataSet.length)\n return ;\n items = items.concat(dataSet.items);\n })\n return new SearchCriteriaDataSet({\n adapters,\n items\n });\n });\n }", "function runSearch(e) {\n if (e.target.value === \"\") {\n // On empty string, remove all search results\n // Otherwise this may show all results as everything is a \"match\"\n applySearchResults([]);\n } else {\n const tokens = e.target.value.split(\" \");\n const moddedTokens = tokens.map(function (token) {\n // \"*\" + token + \"*\"\n return token;\n })\n const searchTerm = moddedTokens.join(\" \");\n const searchResults = idx.search(searchTerm);\n const mapResults = searchResults.map(function (result) {\n const resultUrl = docMap.get(result.ref);\n return { name: result.ref, url: resultUrl };\n })\n\n applySearchResults(mapResults);\n }\n\n}", "function asyncFuzzyTest(searchTerm, user, callback) {\n var hay = user.id.toLowerCase(), i = 0, n = -1, l;\n searchTerm = searchTerm.toLowerCase();\n for (; l = searchTerm[i++];) {\n if (!~(n = hay.indexOf(l, n + 1))) {\n return callback(false);\n }\n }\n return callback(true);\n }", "function local(options) {\n var data = options, // data elements\n dataText,\n tmp,\n text = function (item) { return \"\"+item.text; }; // function used to retrieve the text portion of a data item that is matched against the search\n\n\t\t if ($.isArray(data)) {\n tmp = data;\n data = { results: tmp };\n }\n\n\t\t if ($.isFunction(data) === false) {\n tmp = data;\n data = function() { return tmp; };\n }\n\n var dataItem = data();\n if (dataItem.text) {\n text = dataItem.text;\n // if text is not a function we assume it to be a key name\n if (!$.isFunction(text)) {\n dataText = data.text; // we need to store this in a separate variable because in the next step data gets reset and data.text is no longer available\n text = function (item) { return item[dataText]; };\n }\n }\n\n return function (query) {\n var t = query.term, filtered = { results: [] }, process;\n if (t === \"\") {\n query.callback(data());\n return;\n }\n\n process = function(datum, collection) {\n var group, attr;\n datum = datum[0];\n if (datum.children) {\n group = {};\n for (attr in datum) {\n if (datum.hasOwnProperty(attr)) group[attr]=datum[attr];\n }\n group.children=[];\n $(datum.children).each2(function(i, childDatum) { process(childDatum, group.children); });\n if (group.children.length || query.matcher(t, text(group), datum)) {\n collection.push(group);\n }\n } else {\n if (query.matcher(t, text(datum), datum)) {\n collection.push(datum);\n }\n }\n };\n\n $(data().results).each2(function(i, datum) { process(datum, filtered.results); });\n query.callback(filtered);\n };\n }", "_queryItems(searchQuery, searchMode) {\n const that = this;\n const result = [];\n const findItem = function (item, filterQuery) {\n if (item.grouped) {\n return item;\n }\n\n switch (searchMode) {\n case 'startsWith':\n if (item.label.indexOf(filterQuery) === 0) {\n return item;\n }\n break;\n case 'startsWithIgnoreCase':\n if (item.label.toLowerCase().indexOf(filterQuery.toLowerCase()) === 0) {\n return item;\n }\n break;\n case 'doesNotContain':\n if (item.label.indexOf(filterQuery) < 0) {\n return item;\n }\n break;\n case 'doesNotContainIgnoreCase':\n if (item.label.toLowerCase().indexOf(filterQuery.toLowerCase()) < 0) {\n return item;\n }\n break;\n case 'contains':\n if (item.label.indexOf(filterQuery) > -1) {\n return item;\n }\n break;\n case 'containsIgnoreCase':\n if (item.label.toLowerCase().indexOf(filterQuery.toLowerCase()) > -1) {\n return item;\n }\n break;\n case 'equals':\n if (item.label.localeCompare(filterQuery) === 0) {\n return item;\n }\n break;\n case 'equalsIgnoreCase':\n if (item.label.toLowerCase().localeCompare(filterQuery.toLowerCase()) === 0) {\n return item;\n }\n break;\n case 'endsWith':\n if (item.label.endsWith(filterQuery)) {\n return item;\n }\n break;\n case 'endsWithIgnoreCase':\n if (item.label.toLowerCase().endsWith(filterQuery.toLowerCase())) {\n return item;\n }\n break;\n case 'custom':\n if (that.filterCallback(item, searchQuery)) {\n return item;\n }\n\n break;\n }\n\n return null;\n }\n\n if (searchQuery.length === 0) {\n return that._items;\n }\n\n for (let i = 0; i < that._items.length; i++) {\n const item = findItem(that._items[i], searchQuery);\n\n if (item) {\n result.push(item);\n }\n }\n\n return result;\n }", "function createFilterFor(query) {\n var lowercaseQuery = query.toLowerCase();\n // console.log('lowercaseQuery', lowercaseQuery);\n\n return function filterFn(attribute) {\n // console.log('attribute (filterFn)', attribute);\n var label = attribute.attributes.admin_label.toLowerCase();\n var found = label.indexOf(lowercaseQuery) === 0;\n\n return found;\n };\n\n }", "function local(options) {\n var data = options, // data elements\n dataText,\n tmp,\n text = function (item) { return \"\"+item.text; }; // function used to retrieve the text portion of a data item that is matched against the search\n\n if ($.isArray(data)) {\n tmp = data;\n data = { results: tmp };\n }\n\n if ($.isFunction(data) === false) {\n tmp = data;\n data = function() { return tmp; };\n }\n\n var dataItem = data();\n if (dataItem.text) {\n text = dataItem.text;\n // if text is not a function we assume it to be a key name\n if (!$.isFunction(text)) {\n dataText = dataItem.text; // we need to store this in a separate variable because in the next step data gets reset and data.text is no longer available\n text = function (item) { return item[dataText]; };\n }\n }\n\n return function (query) {\n var t = query.term, filtered = { results: [] }, process;\n if (t === \"\") {\n query.callback(data());\n return;\n }\n\n process = function(datum, collection) {\n var group, attr;\n datum = datum[0];\n if (datum.children) {\n group = {};\n for (attr in datum) {\n if (datum.hasOwnProperty(attr)) group[attr]=datum[attr];\n }\n group.children=[];\n $(datum.children).each2(function(i, childDatum) { process(childDatum, group.children); });\n if (group.children.length || query.matcher(t, text(group), datum)) {\n collection.push(group);\n }\n } else {\n if (query.matcher(t, text(datum), datum)) {\n collection.push(datum);\n }\n }\n };\n\n $(data().results).each2(function(i, datum) { process(datum, filtered.results); });\n query.callback(filtered);\n };\n }", "function local(options) {\n var data = options, // data elements\n dataText,\n tmp,\n text = function (item) { return \"\"+item.text; }; // function used to retrieve the text portion of a data item that is matched against the search\n\n if ($.isArray(data)) {\n tmp = data;\n data = { results: tmp };\n }\n\n if ($.isFunction(data) === false) {\n tmp = data;\n data = function() { return tmp; };\n }\n\n var dataItem = data();\n if (dataItem.text) {\n text = dataItem.text;\n // if text is not a function we assume it to be a key name\n if (!$.isFunction(text)) {\n dataText = dataItem.text; // we need to store this in a separate variable because in the next step data gets reset and data.text is no longer available\n text = function (item) { return item[dataText]; };\n }\n }\n\n return function (query) {\n var t = query.term, filtered = { results: [] }, process;\n if (t === \"\") {\n query.callback(data());\n return;\n }\n\n process = function(datum, collection) {\n var group, attr;\n datum = datum[0];\n if (datum.children) {\n group = {};\n for (attr in datum) {\n if (datum.hasOwnProperty(attr)) group[attr]=datum[attr];\n }\n group.children=[];\n $(datum.children).each2(function(i, childDatum) { process(childDatum, group.children); });\n if (group.children.length || query.matcher(t, text(group), datum)) {\n collection.push(group);\n }\n } else {\n if (query.matcher(t, text(datum), datum)) {\n collection.push(datum);\n }\n }\n };\n\n $(data().results).each2(function(i, datum) { process(datum, filtered.results); });\n query.callback(filtered);\n };\n }", "function local(options) {\n var data = options, // data elements\n dataText,\n tmp,\n text = function (item) { return \"\"+item.text; }; // function used to retrieve the text portion of a data item that is matched against the search\n\n if ($.isArray(data)) {\n tmp = data;\n data = { results: tmp };\n }\n\n if ($.isFunction(data) === false) {\n tmp = data;\n data = function() { return tmp; };\n }\n\n var dataItem = data();\n if (dataItem.text) {\n text = dataItem.text;\n // if text is not a function we assume it to be a key name\n if (!$.isFunction(text)) {\n dataText = dataItem.text; // we need to store this in a separate variable because in the next step data gets reset and data.text is no longer available\n text = function (item) { return item[dataText]; };\n }\n }\n\n return function (query) {\n var t = query.term, filtered = { results: [] }, process;\n if (t === \"\") {\n query.callback(data());\n return;\n }\n\n process = function(datum, collection) {\n var group, attr;\n datum = datum[0];\n if (datum.children) {\n group = {};\n for (attr in datum) {\n if (datum.hasOwnProperty(attr)) group[attr]=datum[attr];\n }\n group.children=[];\n $(datum.children).each2(function(i, childDatum) { process(childDatum, group.children); });\n if (group.children.length || query.matcher(t, text(group), datum)) {\n collection.push(group);\n }\n } else {\n if (query.matcher(t, text(datum), datum)) {\n collection.push(datum);\n }\n }\n };\n\n $(data().results).each2(function(i, datum) { process(datum, filtered.results); });\n query.callback(filtered);\n };\n }", "function local(options) {\n var data = options, // data elements\n dataText,\n tmp,\n text = function (item) { return \"\"+item.text; }; // function used to retrieve the text portion of a data item that is matched against the search\n\n if ($.isArray(data)) {\n tmp = data;\n data = { results: tmp };\n }\n\n if ($.isFunction(data) === false) {\n tmp = data;\n data = function() { return tmp; };\n }\n\n var dataItem = data();\n if (dataItem.text) {\n text = dataItem.text;\n // if text is not a function we assume it to be a key name\n if (!$.isFunction(text)) {\n dataText = dataItem.text; // we need to store this in a separate variable because in the next step data gets reset and data.text is no longer available\n text = function (item) { return item[dataText]; };\n }\n }\n\n return function (query) {\n var t = query.term, filtered = { results: [] }, process;\n if (t === \"\") {\n query.callback(data());\n return;\n }\n\n process = function(datum, collection) {\n var group, attr;\n datum = datum[0];\n if (datum.children) {\n group = {};\n for (attr in datum) {\n if (datum.hasOwnProperty(attr)) group[attr]=datum[attr];\n }\n group.children=[];\n $(datum.children).each2(function(i, childDatum) { process(childDatum, group.children); });\n if (group.children.length || query.matcher(t, text(group), datum)) {\n collection.push(group);\n }\n } else {\n if (query.matcher(t, text(datum), datum)) {\n collection.push(datum);\n }\n }\n };\n\n $(data().results).each2(function(i, datum) { process(datum, filtered.results); });\n query.callback(filtered);\n };\n }", "function local(options) {\n var data = options, // data elements\n dataText,\n tmp,\n text = function (item) { return \"\"+item.text; }; // function used to retrieve the text portion of a data item that is matched against the search\n\n if ($.isArray(data)) {\n tmp = data;\n data = { results: tmp };\n }\n\n if ($.isFunction(data) === false) {\n tmp = data;\n data = function() { return tmp; };\n }\n\n var dataItem = data();\n if (dataItem.text) {\n text = dataItem.text;\n // if text is not a function we assume it to be a key name\n if (!$.isFunction(text)) {\n dataText = dataItem.text; // we need to store this in a separate variable because in the next step data gets reset and data.text is no longer available\n text = function (item) { return item[dataText]; };\n }\n }\n\n return function (query) {\n var t = query.term, filtered = { results: [] }, process;\n if (t === \"\") {\n query.callback(data());\n return;\n }\n\n process = function(datum, collection) {\n var group, attr;\n datum = datum[0];\n if (datum.children) {\n group = {};\n for (attr in datum) {\n if (datum.hasOwnProperty(attr)) group[attr]=datum[attr];\n }\n group.children=[];\n $(datum.children).each2(function(i, childDatum) { process(childDatum, group.children); });\n if (group.children.length || query.matcher(t, text(group), datum)) {\n collection.push(group);\n }\n } else {\n if (query.matcher(t, text(datum), datum)) {\n collection.push(datum);\n }\n }\n };\n\n $(data().results).each2(function(i, datum) { process(datum, filtered.results); });\n query.callback(filtered);\n };\n }", "function local(options) {\n var data = options, // data elements\n dataText,\n tmp,\n text = function (item) { return \"\"+item.text; }; // function used to retrieve the text portion of a data item that is matched against the search\n\n if ($.isArray(data)) {\n tmp = data;\n data = { results: tmp };\n }\n\n if ($.isFunction(data) === false) {\n tmp = data;\n data = function() { return tmp; };\n }\n\n var dataItem = data();\n if (dataItem.text) {\n text = dataItem.text;\n // if text is not a function we assume it to be a key name\n if (!$.isFunction(text)) {\n dataText = dataItem.text; // we need to store this in a separate variable because in the next step data gets reset and data.text is no longer available\n text = function (item) { return item[dataText]; };\n }\n }\n\n return function (query) {\n var t = query.term, filtered = { results: [] }, process;\n if (t === \"\") {\n query.callback(data());\n return;\n }\n\n process = function(datum, collection) {\n var group, attr;\n datum = datum[0];\n if (datum.children) {\n group = {};\n for (attr in datum) {\n if (datum.hasOwnProperty(attr)) group[attr]=datum[attr];\n }\n group.children=[];\n $(datum.children).each2(function(i, childDatum) { process(childDatum, group.children); });\n if (group.children.length || query.matcher(t, text(group), datum)) {\n collection.push(group);\n }\n } else {\n if (query.matcher(t, text(datum), datum)) {\n collection.push(datum);\n }\n }\n };\n\n $(data().results).each2(function(i, datum) { process(datum, filtered.results); });\n query.callback(filtered);\n };\n }", "function local(options) {\n var data = options, // data elements\n dataText,\n tmp,\n text = function (item) { return \"\"+item.text; }; // function used to retrieve the text portion of a data item that is matched against the search\n\n if ($.isArray(data)) {\n tmp = data;\n data = { results: tmp };\n }\n\n if ($.isFunction(data) === false) {\n tmp = data;\n data = function() { return tmp; };\n }\n\n var dataItem = data();\n if (dataItem.text) {\n text = dataItem.text;\n // if text is not a function we assume it to be a key name\n if (!$.isFunction(text)) {\n dataText = dataItem.text; // we need to store this in a separate variable because in the next step data gets reset and data.text is no longer available\n text = function (item) { return item[dataText]; };\n }\n }\n\n return function (query) {\n var t = query.term, filtered = { results: [] }, process;\n if (t === \"\") {\n query.callback(data());\n return;\n }\n\n process = function(datum, collection) {\n var group, attr;\n datum = datum[0];\n if (datum.children) {\n group = {};\n for (attr in datum) {\n if (datum.hasOwnProperty(attr)) group[attr]=datum[attr];\n }\n group.children=[];\n $(datum.children).each2(function(i, childDatum) { process(childDatum, group.children); });\n if (group.children.length || query.matcher(t, text(group), datum)) {\n collection.push(group);\n }\n } else {\n if (query.matcher(t, text(datum), datum)) {\n collection.push(datum);\n }\n }\n };\n\n $(data().results).each2(function(i, datum) { process(datum, filtered.results); });\n query.callback(filtered);\n };\n }", "function local(options) {\n var data = options, // data elements\n dataText,\n tmp,\n text = function (item) { return \"\"+item.text; }; // function used to retrieve the text portion of a data item that is matched against the search\n\n if ($.isArray(data)) {\n tmp = data;\n data = { results: tmp };\n }\n\n if ($.isFunction(data) === false) {\n tmp = data;\n data = function() { return tmp; };\n }\n\n var dataItem = data();\n if (dataItem.text) {\n text = dataItem.text;\n // if text is not a function we assume it to be a key name\n if (!$.isFunction(text)) {\n dataText = dataItem.text; // we need to store this in a separate variable because in the next step data gets reset and data.text is no longer available\n text = function (item) { return item[dataText]; };\n }\n }\n\n return function (query) {\n var t = query.term, filtered = { results: [] }, process;\n if (t === \"\") {\n query.callback(data());\n return;\n }\n\n process = function(datum, collection) {\n var group, attr;\n datum = datum[0];\n if (datum.children) {\n group = {};\n for (attr in datum) {\n if (datum.hasOwnProperty(attr)) group[attr]=datum[attr];\n }\n group.children=[];\n $(datum.children).each2(function(i, childDatum) { process(childDatum, group.children); });\n if (group.children.length || query.matcher(t, text(group), datum)) {\n collection.push(group);\n }\n } else {\n if (query.matcher(t, text(datum), datum)) {\n collection.push(datum);\n }\n }\n };\n\n $(data().results).each2(function(i, datum) { process(datum, filtered.results); });\n query.callback(filtered);\n };\n }", "function local(options) {\n var data = options, // data elements\n dataText,\n tmp,\n text = function (item) { return \"\"+item.text; }; // function used to retrieve the text portion of a data item that is matched against the search\n\n if ($.isArray(data)) {\n tmp = data;\n data = { results: tmp };\n }\n\n if ($.isFunction(data) === false) {\n tmp = data;\n data = function() { return tmp; };\n }\n\n var dataItem = data();\n if (dataItem.text) {\n text = dataItem.text;\n // if text is not a function we assume it to be a key name\n if ( !$.isFunction(text)) {\n dataText = dataItem.text; // we need to store this in a separate variable because in the next step data gets reset and data.text is no longer available\n text = function (item) { return item[dataText]; };\n }\n }\n\n return function (query) {\n var t = query.term, filtered = { results: [] }, process;\n if (t === \"\") {\n query.callback(data());\n return;\n }\n\n process = function(datum, collection) {\n var group, attr;\n datum = datum[0];\n if (datum.children) {\n group = {};\n for (attr in datum) {\n if (datum.hasOwnProperty(attr)) group[attr]=datum[attr];\n }\n group.children=[];\n $(datum.children).each2(function(i, childDatum) { process(childDatum, group.children); });\n if (group.children.length || query.matcher(t, text(group), datum)) {\n collection.push(group);\n }\n } else {\n if (query.matcher(t, text(datum), datum)) {\n collection.push(datum);\n }\n }\n };\n\n $(data().results).each2(function(i, datum) { process(datum, filtered.results); });\n query.callback(filtered);\n };\n }", "search(event){\n this.placeService.textSearch({\n query: `${event.target.value}`,\n type: 'airport'\n }, this.handleSuggestions);\n }", "function local(options) {\n var data = options, // data elements\n dataText, text = function(item) {\n return \"\" + item.text;\n };\n // function used to retrieve the text portion of a data item that is matched against the search\n if (!$.isArray(data)) {\n text = data.text;\n // if text is not a function we assume it to be a key name\n if (!$.isFunction(text)) {\n dataText = data.text;\n // we need to store this in a separate variable because in the next step data gets reset and data.text is no longer available\n text = function(item) {\n return item[dataText];\n };\n }\n data = data.results;\n }\n return function(query) {\n var t = query.term, filtered = {};\n if (t === \"\") {\n query.callback({\n results: data\n });\n return;\n }\n filtered.results = $(data).filter(function() {\n return query.matcher(t, text(this));\n }).get();\n query.callback(filtered);\n };\n }", "function _matcher(query) {\n const regex = new RegExp(query, 'gi');\n \n // returns a closure back to Collection.filter\n // this is just to capture the query string\n return function _matcherFilter(model) {\n \n // model.search is a property computed to work with this\n // matching algo. See ../data/airports.json for details.\n // First, test that the query exists somewhere in the\n // model.search string\n if (regex.test(model.search)) {\n\n // Next, check the index of the first match\n // as well as the total number of matches\n let index = model.search.indexOf(query);\n const matches = model.search.match(regex);\n\n // this should never happen, but just in case\n if (index < 0) {\n index = 1000;\n }\n \n // if the query matches the first letter of the\n // airport code or airport name, assign it a high score\n if (model.code.toLowerCase().indexOf(query) === 0 ||\n model.name.toLowerCase().indexOf(query) === 0) {\n model.score = 1000;\n }\n\n // otherwise, divide the number of string matches by the\n // string position of the first match. E.g. if the query\n // matches 3 different parts of the model.search string\n // and the the first match happens at the second character,\n // (index 1) assign the match a score of 3 / (1 + 1) == 1.5 *\n // * (add 1 to the index to avoid dividing by 0)\n else {\n model.score = matches.length / (index + 1);\n }\n return true;\n }\n }\n}", "function local(options) {\n\t var data = options, // data elements\n\t dataText,\n\t tmp,\n\t text = function (item) { return \"\"+item.text; }; // function used to retrieve the text portion of a data item that is matched against the search\n\n\t if ($.isArray(data)) {\n\t tmp = data;\n\t data = { results: tmp };\n\t }\n\n\t if ($.isFunction(data) === false) {\n\t tmp = data;\n\t data = function() { return tmp; };\n\t }\n\n\t var dataItem = data();\n\t if (dataItem.text) {\n\t text = dataItem.text;\n\t // if text is not a function we assume it to be a key name\n\t if (!$.isFunction(text)) {\n\t dataText = dataItem.text; // we need to store this in a separate variable because in the next step data gets reset and data.text is no longer available\n\t text = function (item) { return item[dataText]; };\n\t }\n\t }\n\n\t return function (query) {\n\t var t = query.term, filtered = { results: [] }, process;\n\t if (t === \"\") {\n\t query.callback(data());\n\t return;\n\t }\n\n\t process = function(datum, collection) {\n\t var group, attr;\n\t datum = datum[0];\n\t if (datum.children) {\n\t group = {};\n\t for (attr in datum) {\n\t if (datum.hasOwnProperty(attr)) group[attr]=datum[attr];\n\t }\n\t group.children=[];\n\t $(datum.children).each2(function(i, childDatum) { process(childDatum, group.children); });\n\t if (group.children.length || query.matcher(t, text(group), datum)) {\n\t collection.push(group);\n\t }\n\t } else {\n\t if (query.matcher(t, text(datum), datum)) {\n\t collection.push(datum);\n\t }\n\t }\n\t };\n\n\t $(data().results).each2(function(i, datum) { process(datum, filtered.results); });\n\t query.callback(filtered);\n\t };\n\t }", "Search () {\r\n const O = this,\r\n cc = O.CaptionCont.addClass('search'),\r\n P = $('<p class=\"no-match\">'),\r\n fn = (options.searchFn && typeof options.searchFn === 'function') ? options.searchFn : settings.searchFn;\r\n\r\n O.ftxt = $('<input type=\"text\" class=\"search-txt\" value=\"\" autocomplete=\"off\">')\r\n .on('click', (e) => {\r\n e.stopPropagation();\r\n });\r\n O.ftxt[0].placeholder = settings.searchText;\r\n cc.append(O.ftxt);\r\n O.optDiv.children('ul').after(P);\r\n\r\n O.ftxt.on('keyup.sumo', () => {\r\n const hid = O.optDiv.find('ul.options li.opt').each((ix, e) => {\r\n const el = $(e),\r\n {0: opt} = el.data('opt');\r\n opt.hidden = fn(el.text(), O.ftxt.val(), el);\r\n el.toggleClass('hidden', opt.hidden);\r\n }).not('.hidden');\r\n\r\n // Hide opt-groups with no options matched\r\n O.optDiv[0].querySelectorAll('li.group').forEach(optGroup => {\r\n if (optGroup.querySelector('li:not(.hidden)')) {\r\n optGroup.classList.remove('hidden');\r\n } else {\r\n optGroup.classList.add('hidden');\r\n }\r\n });\r\n\r\n P.html(settings.noMatch.replace(/\\{0\\}/g, '<em></em>')).toggle(!hid.length);\r\n P.find('em').text(O.ftxt.val());\r\n O.selAllState();\r\n });\r\n }", "function _fuzzyName(name) {\r\n // 使用されない(と思われる)記号の削除(/\\^$*+?.|[]{};\"'%&=~@`,_!#)\r\n name = name.replace(/[\\/\\\\\\^\\$\\*\\+\\?\\.\\|\\[\\]\\{\\}\\;\\\"\\'\\%\\&\\=\\~\\@\\`\\,\\_\\!\\#]/g, '');\r\n // 「:」「:」「・」「・」スペース、タブを無視\r\n name = name.replace(/[::・・  \\t]/g, '');\r\n // 括弧を全角に統一\r\n name = name.replace(/\\(/g, '(').replace(/\\)/g, ')');\r\n // カナを統一\r\n return fuzzyKana(name);\r\n }", "function local(options) {\n var data = options, // data elements\n dataText,\n tmp,\n text = function (item) { return \"\"+item.text; }; // function used to retrieve the text portion of a data item that is matched against the search\n\n if ($.isArray(data)) {\n tmp = data;\n data = { results: tmp };\n }\n\n if ($.isFunction(data) === false) {\n tmp = data;\n data = function() { return tmp; };\n }\n\n var dataItem = data();\n if (dataItem.text) {\n text = dataItem.text;\n // if text is not a function we assume it to be a key name\n if (!$.isFunction(text)) {\n dataText = dataItem.text; // we need to store this in a separate variable because in the next step data gets reset and data.text is no longer available\n text = function (item) { return item[dataText]; };\n }\n }\n\n return function (query) {\n var t = query.term, filtered = { results: [] }, process;\n if (t === \"\") {\n query.callback(data());\n return;\n }\n\n process = function(datum, collection) {\n var group, attr;\n datum = datum[0];\n if (datum.children) {\n group = {};\n for (attr in datum) {\n if (datum.hasOwnProperty(attr)) group[attr]=datum[attr];\n }\n group.children=[];\n $(datum.children).each2(function(i, childDatum) { process(childDatum, group.children); });\n if (group.children.length || query.matcher(t, text(group), datum)) {\n collection.push(group);\n }\n } else {\n if (query.matcher(t, text(datum), datum)) {\n collection.push(datum);\n }\n }\n };\n\n $(data().results).each2(function(i, datum) { process(datum, filtered.results); });\n query.callback(filtered);\n };\n }", "function local(options) {\n var data = options, // data elements\n dataText,\n tmp,\n text = function (item) { return \"\"+item.text; }; // function used to retrieve the text portion of a data item that is matched against the search\n\n if ($.isArray(data)) {\n tmp = data;\n data = { results: tmp };\n }\n\n if ($.isFunction(data) === false) {\n tmp = data;\n data = function() { return tmp; };\n }\n\n var dataItem = data();\n if (dataItem.text) {\n text = dataItem.text;\n // if text is not a function we assume it to be a key name\n if (!$.isFunction(text)) {\n dataText = dataItem.text; // we need to store this in a separate variable because in the next step data gets reset and data.text is no longer available\n text = function (item) { return item[dataText]; };\n }\n }\n\n return function (query) {\n var t = query.term, filtered = { results: [] }, process;\n if (t === \"\") {\n query.callback(data());\n return;\n }\n\n process = function(datum, collection) {\n var group, attr;\n datum = datum[0];\n if (datum.children) {\n group = {};\n for (attr in datum) {\n if (datum.hasOwnProperty(attr)) group[attr]=datum[attr];\n }\n group.children=[];\n $(datum.children).each2(function(i, childDatum) { process(childDatum, group.children); });\n if (group.children.length || query.matcher(t, text(group), datum)) {\n collection.push(group);\n }\n } else {\n if (query.matcher(t, text(datum), datum)) {\n collection.push(datum);\n }\n }\n };\n\n $(data().results).each2(function(i, datum) { process(datum, filtered.results); });\n query.callback(filtered);\n };\n }", "searchFn (haystack, needle) { // search function\r\n return haystack.toLowerCase().indexOf(needle.toLowerCase()) < 0;\r\n }", "function local(options) {\n var data = options, // data elements\n dataText,\n text = function (item) { return \"\"+item.text; }; // function used to retrieve the text portion of a data item that is matched against the search\n\n if (!$.isArray(data)) {\n text = data.text;\n // if text is not a function we assume it to be a key name\n if (!$.isFunction(text)) {\n dataText = data.text; // we need to store this in a separate variable because in the next step data gets reset and data.text is no longer available\n text = function (item) { return item[dataText]; };\n }\n data = data.results;\n }\n\n return function (query) {\n var t = query.term, filtered = { results: [] }, process;\n if (t === \"\") {\n query.callback({results: data});\n return;\n }\n\n process = function(datum, collection) {\n var group, attr;\n datum = datum[0];\n if (datum.children) {\n group = {};\n for (attr in datum) {\n if (datum.hasOwnProperty(attr)) group[attr]=datum[attr];\n }\n group.children=[];\n $(datum.children).each2(function(i, childDatum) { process(childDatum, group.children); });\n if (group.children.length) {\n collection.push(group);\n }\n } else {\n if (query.matcher(t, text(datum))) {\n collection.push(datum);\n }\n }\n };\n\n $(data).each2(function(i, datum) { process(datum, filtered.results); });\n query.callback(filtered);\n };\n }", "function local(options) {\n var data = options, // data elements\n dataText,\n text = function (item) { return \"\"+item.text; }; // function used to retrieve the text portion of a data item that is matched against the search\n\n if (!$.isArray(data)) {\n text = data.text;\n // if text is not a function we assume it to be a key name\n if (!$.isFunction(text)) {\n dataText = data.text; // we need to store this in a separate variable because in the next step data gets reset and data.text is no longer available\n text = function (item) { return item[dataText]; };\n }\n data = data.results;\n }\n\n return function (query) {\n var t = query.term, filtered = { results: [] }, process;\n if (t === \"\") {\n query.callback({results: data});\n return;\n }\n\n process = function(datum, collection) {\n var group, attr;\n datum = datum[0];\n if (datum.children) {\n group = {};\n for (attr in datum) {\n if (datum.hasOwnProperty(attr)) group[attr]=datum[attr];\n }\n group.children=[];\n $(datum.children).each2(function(i, childDatum) { process(childDatum, group.children); });\n if (group.children.length) {\n collection.push(group);\n }\n } else {\n if (query.matcher(t, text(datum))) {\n collection.push(datum);\n }\n }\n };\n\n $(data).each2(function(i, datum) { process(datum, filtered.results); });\n query.callback(filtered);\n };\n }", "function FuzzySearchMapTitle(searchTerm, mapList) {\n return new Promise((resolve, reject) => {\n const searcher = new FuzzySearch(mapList, [], { sort: true });\n const searchResults = searcher.search(searchTerm);\n\n // Check for 0 matching map results, reject or resolve.\n if (searchResults.length < 1) {\n reject(new Error(`The search term \"${searchTerm}\" yielded no results.`));\n }\n resolve(searchResults[0]);\n });\n}", "findItem(query) {\n if (query === '') {\n return this.dataSearch.slice(0, 5);\n }\n const regex = new RegExp(`${query.trim()}`, 'i');\n return this.dataSearch.filter(film => film.name.search(regex) >= 0);\n }", "function search() {\n // get the value of the search input field\n var searchString = $('#search').val().toLowerCase();\n\n markerLayer1.setFilter(showType);\n\n // here we're simply comparing the 'name' property of each marker\n // to the search string, seeing whether the former contains the latter.\n function showType(feature) {\n return feature.properties.name\n .toLowerCase()\n .indexOf(searchString) !== -1;\n }\n}", "processQuery(query) {\n const terms = query.split(' ');\n const stemmed = terms.map(this.stemTerm);\n const hashed = stemmed.map(this.hashTerm);\n // const edgeLists: Array<Array<{ score: number, length: number }>> = [];\n const edgeLists = [];\n hashed.forEach((hash, index) => {\n // TODO: exclude starting at hashes that are conjunctions.\n if (hash in this.postings) {\n // This query term is in at least one product term.\n if (this.debugMode) {\n const stemmedText = stemmed.slice(index).join(' ');\n console.log(` \"${stemmedText}\" SCORING:`);\n }\n // Get all of the items containing this query term.\n // Items not containing this term will match better\n // at other starting positions.\n const items = this.postings[hash];\n // Generate score for all of the items, matched against\n // the tail of the query.\n const tail = hashed.slice(index);\n const scored = items.map((item) => (Object.assign({}, this.score(tail, this.hashedItems[item]), { label: item })));\n const sorted = scored.sort((a, b) => b.score - a.score);\n edgeLists.push(sorted);\n }\n else {\n if (this.debugMode) {\n console.log(` \"${stemmed[index]}\" UNKNOWN`);\n }\n edgeLists.push([]);\n }\n });\n const path = best_path_1.findBestPath(edgeLists);\n if (this.debugMode) {\n console.log('edge list:');\n edgeLists.forEach((edges) => {\n const text = edges.map(this.decodeEdge).join(',');\n // const text = edges.map((edge) => `Edge(s=${edge.score},\n // l=${edge.length})`).join(', ');\n console.log(` [${text}]`);\n });\n console.log('best path:');\n path.forEach((edge) => {\n console.log(` ${this.decodeEdge(edge)}`);\n });\n }\n return path;\n }", "function search (keyword, type, limit, offset) {\n //type = type || settings.searchClass.uri.value;\n limit = limit || settings.resultLimit;\n q = 'PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\\n' +\n 'PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\\n';\n if (settings.endpoint.type == 'fuseki')\n q += 'PREFIX text: <http://jena.apache.org/text#>\\n';\n q +='prefix dcterms: <http://purl.org/dc/terms/>\\n'; \n q +='prefix envri: <http://envri.eu/ns/>\\n';\n q +='prefix foaf: <http://xmlns.com/foaf/0.1/>\\n'; \n q +='prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\\n'; \n q +='prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>\\n'; \n q +='prefix skos: <http://www.w3.org/2004/02/skos/core#>\\n'; \n q +='prefix xml: <http://www.w3.org/XML/1998/namespace>\\n';\n q +='prefix xsd: <http://www.w3.org/2001/XMLSchema#>\\n';\n q +='PREFIX rm: <http://www.oil-e.net/ontology/envri-rm.owl#>\\n';\n q +='PREFIX dc: <http://purl.org/dc/elements/1.1/>\\n';\n q +='prefix context: <http://147.213.76.116:8080/marmotta/context/>\\n';\n q +='prefix eosc: <http://eosc.eu/>\\n';\n q +='prefix prov: <http://www.w3.org/ns/prov#>\\n';\n q +='prefix orcid: <https://orcid.org/>\\n';\n q +='prefix np: <http://www.nanopub.org/nschema#>\\n';\n q +='prefix fair: <https://w3id.org/fair/principles/terms/>\\n';\n q +='prefix icc: <https://w3id.org/fair/icc/terms/>\\n';\n q +='prefix pav: <http://purl.org/pav/>\\n';\n q +='prefix dct: <http://purl.org/dc/terms/>\\n';\n q +='prefix sio: <http://semanticscience.org/resource/>\\n';\n q +='prefix npx: <http://purl.org/nanopub/x/>\\n';\n q +='prefix owl: <http://www.w3.org/2002/07/owl#>\\n';\n q +='prefix schema: <http://schema.org/>\\n';\n q +='prefix envriri: <http://envri.eu/RI/>\\n';\n q +='PREFIX dc: <http://purl.org/dc/elements/1.1/>\\n';\n q +='PREFIX owl: <http://www.w3.org/2002/07/owl#>\\n';\n q +='PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\\n';\n q +='PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\\n';\n q +='PREFIX foaf: <http://xmlns.com/foaf/0.1/>\\n';\n q +='PREFIX skos: <http://www.w3.org/2004/02/skos/core#>\\n';\n q +='PREFIX base: <http://www.oil-e.net/ontology/oil-base.owl#>\\n';\n q +='PREFIX rm: <http://www.oil-e.net/ontology/envri-rm.owl#>\\n';\n q +='PREFIX envri: <http://www.envri.eu/community#>\\n';\n q +='PREFIX actris: <http://www.envri.eu/community/actris#>\\n';\n q +='PREFIX anaee: <http://www.envri.eu/community/anaee#>\\n';\n q +='PREFIX argo: <http://www.envri.eu/community/euro-argo#>\\n';\n q +='PREFIX eiscat: <http://www.envri.eu/community/eiscat#>\\n';\n q +='PREFIX epos: <http://www.envri.eu/community/epos#>\\n';\n q +='PREFIX eudat: <http://www.envri.eu/community/eudat#>\\n';\n q +='PREFIX icos: <http://www.envri.eu/community/icos#>\\n';\n q +='PREFIX lter: <http://www.envri.eu/community/lter-europe#>\\n';\n q +='PREFIX sdn: <http://www.envri.eu/community/seadatanet#>\\n';\n\n q += 'SELECT DISTINCT ?uri ?label ?type ?tlabel WHERE {\\n';\n q += ' { SELECT ?uri ?label WHERE {\\n';\n q += ' ?uri <' + settings.labelUri + '> ?label . \\n';\n //q += ' FILTER (lang(?label) = \"'+ settings.lang + '\")\\n';\n if (keyword) {\n switch (settings.endpoint.type) {\n case 'virtuoso':\n q += ' ?label bif:contains \"\\'' + keyword + '\\'\" .\\n';\n break;\n case 'fuseki':\n\tq += 'FILTER(regex(?label, \"' + keyword +'\", \"i\")) .\\n';\n q += ' ?uri text:query (<' + settings.labelUri + '> \"' + keyword + '\" '+ limit +') .\\n';\n break;\n default:\n q += ' FILTER regex(?label, \"' + keyword + '\", \"i\")\\n'\n }\n }\n q += ' } LIMIT ' + limit;\n if (offset) q += ' OFFSET ' + offset;\n q += '\\n }\\n OPTIONAL {\\n';\n q += ' ?uri rdf:type ?type .\\n';\n q += ' ?type <' + settings.labelUri + '> ?tlabel .\\n';\n q += ' FILTER (lang(?tlabel) = \"'+ settings.lang + '\")\\n}}';\nconsole.log(q);\n\n//alert('q:' + q);\n\n return q;\n }", "searchByStringProperties(options) {\n var defaults = {\n order: \"asc\",\n limit: null,\n keepSearchDetails: false,\n getResults: function (a) {\n if (this.decorate) {\n // add information about which property \n for (var i = 0, l = a.length; i < l; i++) {\n var item = a[i];\n var matches = _.where(item.matches, m => { return m != null; });\n a[i].obj.__search_matches__ = matches.length ? _.map(matches, x => {\n return x.matchedProperty;\n }) : [];\n }\n }\n if (this.keepSearchDetails) {\n return a;\n }\n var b = [];\n for (var i = 0, l = a.length; i < l; i++) {\n b.push(a[i].obj);\n }\n return b;\n },\n normalize: true,\n decorate: false // whether to decorate source objects with list of properties that \n };\n var o = _.extend({}, defaults, options);\n if (!o.order || !o.order.match(/asc|ascending|desc|descending/i)) o.order = \"asc\";\n var matches = [], rx = o.pattern;\n if (!(rx instanceof RegExp)) {\n if (_.isString(rx)) {\n rx = R.getSearchPattern(rx);\n } else {\n throw new Error(\"the pattern must be a string or a regular expression\");\n }\n }\n var properties = o.properties, len = \"length\", normalize = o.normalize;\n var collection = o.collection;\n var isArray = _.isArray, isNumber = _.isNumber, flatten = _.flatten, map = _.map;\n for (var i = 0, l = collection[len]; i < l; i++) {\n var obj = collection[i], objmatches = [], totalMatches = 0;\n\n for (var k = 0, t = properties[len]; k < t; k++) {\n var prop = properties[k],\n val = Reflection.getPropertyValue(obj, prop);\n\n if (!val) continue;\n if (!val.match) val = val.toString();\n\n if (isArray(val)) {\n if (!val[len]) {\n continue;\n }\n val = flatten(val);\n var mm = [], firstIndex;\n for (var a = 0, l = val[len]; a < l; a++) {\n var match = val[a].match(rx);\n if (match) {\n if (!isNumber(firstIndex)) {\n firstIndex = a;\n }\n mm.push(match);\n }\n }\n if (mm[len]) {\n objmatches[k] = {\n matchedProperty: prop,\n indexes: [firstIndex],\n recourrences: flatten(mm)[len]\n };\n }\n continue;\n }\n\n // normalize value\n if (normalize) {\n val = StringUtils.normalize(val);\n }\n var match = val.match(rx);\n if (match) {\n // clone rx\n var rxClone = new RegExp(rx.source, \"gi\"), m, indexes = [];\n while (m = rxClone.exec(val)) {\n indexes.push(m.index);\n }\n totalMatches += match[len];\n objmatches[k] = {\n matchValue: val,\n matchedProperty: prop,\n indexes: indexes,\n recourrences: match[len]\n };\n }\n }\n\n if (objmatches[len]) {\n matches.push({\n obj: obj,\n matches: objmatches,\n totalMatches: totalMatches\n });\n }\n }\n var order = o.order.match(/asc|ascending/i) ? 1 : -1,\n lower = \"toLowerCase\",\n str = \"toString\",\n mat = \"matches\",\n matp = \"matchedProperty\",\n iof = \"indexOf\",\n hasp = \"hasOwnProperty\",\n rec = \"recourrences\",\n obj = \"obj\",\n ixs = \"indexes\",\n total = \"totalMatches\";\n //sort the entire collection of matches\n matches.sort(function (a, b) {\n\n // if one item has more matches than the other, it comes first\n if (a[total] > b[total]) return -order;\n if (a[total] < b[total]) return order;\n\n for (var k = 0, l = properties[len]; k < l; k++) {\n var am = a[mat][k], bm = b[mat][k];\n\n // if both objects lack matches in this property, continue\n if (!am && !bm) continue;\n\n // properties are in order of importance,\n // so if one object has matches in this property and the other does not,\n // it comes first by definition\n if (am && !bm) return -order;\n if (!am && bm) return order;\n\n // sort by indexes, applies the following rules only if one word started with the search\n var minA = _.min(am[ixs]), minB = _.min(bm[ixs]);\n if (minA < minB) return -order;\n if (minA > minB) return order;\n if (am[ixs][iof](minA) < bm[ixs][iof](minB)) return -order;\n if (am[ixs][iof](minA) > bm[ixs][iof](minB)) return order;\n\n\n var ao = a[obj], bo = b[obj];\n //check if objects have matched property because we are supporting search inside arrays and objects subproperties\n if (ao[hasp](am[matp]) && bo[hasp](bm[matp])) {\n //sort by alphabetical order\n if (ao[am[matp]][str]()[lower]() < bo[bm[matp]][str]()[lower]()) return -order;\n if (ao[am[matp]][str]()[lower]() > bo[bm[matp]][str]()[lower]()) return order;\n }\n\n //order by the number of recourrences\n if (am[rec] > bm[rec]) return -order;\n if (am[rec] < bm[rec]) return order;\n }\n return 0;\n });\n var limit = o.limit;\n if (limit)\n matches = matches.slice(0, _.min(limit, matches[len]));\n return o.getResults(matches);\n }", "mapF(){\n\n\n\n /*\n this.reproduccion.casos_prueba.map( function (state) {\n //console.log(state)\n\n return {\n value: state.nombre_caso_prueba.toLowerCase(),\n display: state.id_caso_prueba + ' ' + state.nombre_caso_prueba\n }\n });\n */\n\n console.log(this.querySearch('qqqq'))\n \n\n /*return {\n value: state.toLowerCase(),\n display: state\n };\n */\n }", "async function searchWithFiltersFastChargersOnly() {\n let evchargersService = new EvchargersService(process.env.MICRO_API_TOKEN);\n let rsp = await evchargersService.search({\n distance: 2000,\n levels: [\"3\"],\n location: {\n latitude: 51.53336351319885,\n longitude: -0.0252,\n },\n max_results: 2,\n });\n console.log(rsp);\n}", "function searchEngine(e){\n\n let input = document.getElementById('search-input');\n let html = '';\n let matchingResults = [];\n let heading = document.querySelector('.search-heading');\n\n// Find Matching Results\n if(input.value === ''){\n\n searchResults.forEach(function(obj){\n heading.textContent = 'Most Visited';\n\n if(obj.frequent === true){\n matchingResults.push(obj);\n }\n })\n } else {\n\n heading.textContent = 'Search Results';\n searchResults.forEach(function(obj){\n if(obj.title.toUpperCase().includes(input.value.toUpperCase())){\n matchingResults.push(obj);\n }\n })\n }\n\n\n\n if(matchingResults.length > 0){\n\n matchingResults.forEach(function(el){\n html += `<li><a class=\"grey-text\" href=\"${el.link}\">${boldString(el.title, input.value)}</a></li>`\n })\n document.querySelector('.popup-list').innerHTML = html;\n } else{\n html = `<li>There are no suggestions for your query.</li>`\n document.querySelector('.popup-list').innerHTML = html;\n }\n\n}", "filterSuggest(results, search) {\n const filter = results.filter( filter => filter.calle.indexOf(search) !== -1 );\n\n // Mostrar pines del Filtro\n this.showPins(filter);\n }", "function BitapSearcher (pattern, options) {\n\t options = options || {}\n\t this.options = options\n\t this.options.location = options.location || BitapSearcher.defaultOptions.location\n\t this.options.distance = 'distance' in options ? options.distance : BitapSearcher.defaultOptions.distance\n\t this.options.threshold = 'threshold' in options ? options.threshold : BitapSearcher.defaultOptions.threshold\n\t this.options.maxPatternLength = options.maxPatternLength || BitapSearcher.defaultOptions.maxPatternLength\n\t\n\t this.pattern = options.caseSensitive ? pattern : pattern.toLowerCase()\n\t this.patternLen = pattern.length\n\t\n\t if (this.patternLen <= this.options.maxPatternLength) {\n\t this.matchmask = 1 << (this.patternLen - 1)\n\t this.patternAlphabet = this._calculatePatternAlphabet()\n\t }\n\t }", "function fuzzyMatch(drivers, string) {\n return drivers.filter(obj => {\n return obj.startsWith(string)\n })\n}", "function find_matches(sub) {\n tabs.forEach(function (i) {\n var text = i.title + i.url;\n i.matches = lcs.fuzzy(sub, text);\n });\n }", "function BitapSearcher (pattern, options) {\n options = options || {}\n this.options = options\n this.options.location = options.location || BitapSearcher.defaultOptions.location\n this.options.distance = 'distance' in options ? options.distance : BitapSearcher.defaultOptions.distance\n this.options.threshold = 'threshold' in options ? options.threshold : BitapSearcher.defaultOptions.threshold\n this.options.maxPatternLength = options.maxPatternLength || BitapSearcher.defaultOptions.maxPatternLength\n\n this.pattern = options.caseSensitive ? pattern : pattern.toLowerCase()\n this.patternLen = pattern.length\n\n if (this.patternLen <= this.options.maxPatternLength) {\n this.matchmask = 1 << (this.patternLen - 1)\n this.patternAlphabet = this._calculatePatternAlphabet()\n }\n }", "function BitapSearcher (pattern, options) {\n options = options || {}\n this.options = options\n this.options.location = options.location || BitapSearcher.defaultOptions.location\n this.options.distance = 'distance' in options ? options.distance : BitapSearcher.defaultOptions.distance\n this.options.threshold = 'threshold' in options ? options.threshold : BitapSearcher.defaultOptions.threshold\n this.options.maxPatternLength = options.maxPatternLength || BitapSearcher.defaultOptions.maxPatternLength\n\n this.pattern = options.caseSensitive ? pattern : pattern.toLowerCase()\n this.patternLen = pattern.length\n\n if (this.patternLen <= this.options.maxPatternLength) {\n this.matchmask = 1 << (this.patternLen - 1)\n this.patternAlphabet = this._calculatePatternAlphabet()\n }\n }", "_findItem(item, filterQuery) {\n if (filterQuery === '') {\n return item;\n }\n\n const that = this;\n\n switch (that.filterMode) {\n case 'startsWith':\n if (item.label.indexOf(filterQuery) === 0) {\n return item;\n }\n\n break;\n case 'startsWithIgnoreCase':\n if (item.label.toLowerCase().indexOf(filterQuery.toLowerCase()) === 0) {\n return item;\n }\n\n break;\n case 'doesNotContain':\n if (item.label.indexOf(filterQuery) < 0) {\n return item;\n }\n\n break;\n case 'doesNotContainIgnoreCase':\n if (item.label.toLowerCase().indexOf(filterQuery.toLowerCase()) < 0) {\n return item;\n }\n\n break;\n case 'contains':\n if (item.label.indexOf(filterQuery) > -1) {\n return item;\n }\n\n break;\n case 'containsIgnoreCase':\n if (item.label.toLowerCase().indexOf(filterQuery.toLowerCase()) > -1) {\n return item;\n }\n\n break;\n case 'equals':\n if (item.label.localeCompare(filterQuery) === 0) {\n return item;\n }\n\n break;\n case 'equalsIgnoreCase':\n if (item.label.toLowerCase().localeCompare(filterQuery.toLowerCase()) === 0) {\n return item;\n }\n\n break;\n case 'endsWith':\n if (item.label.endsWith(filterQuery)) {\n return item;\n }\n\n break;\n case 'endsWithIgnoreCase':\n if (item.label.toLowerCase().endsWith(filterQuery.toLowerCase())) {\n return item;\n }\n\n break;\n }\n\n return null;\n }", "function suggest(id, engine, title, terms) {\n var $suggest = $(\"#\" + id).find(\".result:not(.default):not(.suggest)\").first();\n\n $suggest.addClass(\"suggest\").\n attr({\"title\" : _convertTitle(title)}).\n data({ \"type\" : \"suggest\", \"terms\" : title }).\n append(\n $(\"<span class='search'/>\").text(\"search\"),\n $(\"<span class='terms'/>\").html(highlight(title, terms))\n );\n}", "function showResults () {\n const value = this.value\n const results = index.search(value, 8)\n // console.log('results: \\n')\n // console.log(results)\n let suggestion\n let childs = suggestions.childNodes\n let i = 0\n const len = results.length\n\n for (; i < len; i++) {\n suggestion = childs[i]\n\n if (!suggestion) {\n suggestion = document.createElement('div')\n suggestions.appendChild(suggestion)\n }\n suggestion.innerHTML = `<b>${results[i].tablecode}</>: ${results[i].label}`\n // `<a href = '${results[i].tablecode}'> ${results[i]['section-name']} ${results[i].title}</a>`\n\n // console.log(results[i])\n }\n\n while (childs.length > len) {\n suggestions.removeChild(childs[i])\n }\n //\n // // const firstResult = results[0].content\n // // const match = firstResult && firstResult.toLowerCase().indexOf(value.toLowerCase())\n // //\n // // if (firstResult && (match !== -1)) {\n // // autocomplete.value = value + firstResult.substring(match + value.length)\n // // autocomplete.current = firstResult\n // // } else {\n // // autocomplete.value = autocomplete.current = value\n // // }\n }", "function dfSearch(node, target) {}", "function searchForText() {\n // get the keywords to search\n var query = $('form#search input#mapsearch').val();\n\n // extract the fields to search, from the selected 'search category' options\n let category = $('select#search-category').val();\n\n // filter the object for the term in the included fields\n DATA.filtered = searchObject(DATA.tracker_data, query, CONFIG.search_categories[category]);\n\n // suggestions: if the search category is \"company\", include a list of suggestions below \n var suggestions = $('div#suggestions').empty();\n if (category == 'parent') {\n suggestions.show();\n var companies = searchArray(DATA.companies, query).sort();\n companies.forEach(function(company) {\n var entry = $('<div>', {'class': 'suggestion', text: company}).appendTo(suggestions);\n entry.mark(query);\n });\n }\n\n // add the results to map, table, legend\n drawMap(DATA.filtered); // update the map (and legend)\n updateResultsPanel(DATA.filtered, query) // update the results-panel\n drawTable(DATA.filtered, query); // populate the table\n $('form#nav-table-search input').val(query); // sync the table search input with the query\n CONFIG.selected_country.layer.clearLayers(); // clear any selected country\n CONFIG.selected_country.name = ''; // ... and reset the name\n $('div#country-results').show(); // show the results panel, in case hidden\n $('a.clear-search').show(); // show the clear search links\n\n return false;\n}", "function searchByName(name) {\n var testName = name.toLowerCase();\n if (testName===\"bar\"||\"bars\"||\"restaurant\"||\"restaurants\"||\"food\"||\"beer\") {\n var request = {\n location: pos,\n radius: '500',\n type: ['bar', 'restaurant']\n };\n service = new google.maps.places.PlacesService(map);\n service.nearbySearch(request, callback);\n } else {\n var request = {\n query: name,\n fields: ['photos', 'formatted_address', 'name', 'rating', 'opening_hours', 'geometry'],\n locationBias: {radius: 50, center: pos}\n };\n service = new google.maps.places.PlacesService(map);\n service.findPlaceFromQuery(request, callback);\n };\n}", "handleSearch(e) {\n const input = e.target.previousSibling.value;\n let newNameList = [];\n this.props.info.names.map(algo => {\n input.split(\" \").map(name => {\n if (algo.toLowerCase().indexOf(name.toLowerCase()) !== -1) {\n newNameList.push(algo);\n }\n return true;\n });\n return true;\n });\n\n this.setState({ filteredNames: newNameList });\n }", "static find(keyStr, query=\"\"){ return flute.getModel(this, keyStr, query) }", "getSuggest(search) {\n this.api.getData()\n .then(data => {\n // Obtener los resultados\n const results = data.responseJSON.results;\n\n // Enviar el JSON y la busqueda al Filtro\n this.filterSuggest(results, search);\n })\n }", "afterSearch(searchText, result) {\n }", "function search() {\n let input = getSearchCastInput();\n filterCast(input);\n}", "_getSuggestions(value) {\n const {getSuggestions} = this.props\n\n if (getSuggestions) {\n return getSuggestions(value)\n } else {\n const escapedValue = this.escapeRegexCharacters(value.trim());\n\n if (escapedValue === '') {\n return this.props.data;\n }\n\n const regex = new RegExp('\\\\b' + escapedValue, 'i');\n\n return this.props.data.filter(item => regex.test(this.escapeRegexCharacters(this._getSuggestionValue(item))));\n }\n }", "function searchStoreAft( responseText ) {\r\n\t\r\n\tif( responseText != NOT_EXIST_DATA ) {\r\n\t\t// Fill searched data.\r\n\t\tviewStor( JSON.parse(responseText) );\r\n\t} else {\r\n\t\t// There's no data. \r\n\t\tshowComModal( {msg:mLang.get(\"nosearchdata\")} );\t// 조회 내역이 없습니다\r\n\t \treturn false;\r\n\t}\r\n}", "search(fnCriteria) {\n function __search(query) {\n if (!query || !(query instanceof Query)) {\n return null;\n };\n\n if (fnCriteria.apply(this, [query.name, query.args, query.parent])) {\n return query;\n }\n \n let i = 0;\n let found = null; \n let args = query.args || [];\n\n for (; i < args.length && !found; i++) {\n found = __search.apply(this, [args[i]]);\n }\n\n return found;\n }\n \n return __search.apply(this, [this._root]); \n }", "onValChange(){\n\n var ftext = null\n\n this.filterSearch(ftext);\n\n }", "function fuzzysearch (needle, haystack) {\n var hlen = haystack.length;\n var nlen = needle.length;\n if (nlen > hlen) {\n return false;\n }\n if (nlen === hlen) {\n return needle === haystack;\n }\n outer: for (var i = 0, j = 0; i < nlen; i++) {\n var nch = needle.charCodeAt(i);\n while (j < hlen) {\n if (haystack.charCodeAt(j++) === nch) {\n continue outer;\n }\n }\n return false;\n }\n return true;\n}" ]
[ "0.7111104", "0.7028673", "0.6932236", "0.6343106", "0.6279555", "0.62743896", "0.62261534", "0.61784285", "0.6148284", "0.6139647", "0.60413206", "0.6003875", "0.59473157", "0.588265", "0.58691305", "0.58348745", "0.58090854", "0.5808489", "0.57574004", "0.5756608", "0.57468325", "0.57366526", "0.5704985", "0.5687234", "0.5685626", "0.56176007", "0.55997175", "0.55824673", "0.5546688", "0.55433315", "0.554224", "0.55407155", "0.55153215", "0.55141306", "0.55088025", "0.5485774", "0.546103", "0.5445691", "0.543846", "0.54208803", "0.53843826", "0.5366879", "0.5359071", "0.535383", "0.5340334", "0.53400207", "0.5335376", "0.5314261", "0.5311145", "0.53086245", "0.5305696", "0.5305696", "0.5305696", "0.5305696", "0.5305696", "0.5305696", "0.5305696", "0.5305696", "0.5303512", "0.528921", "0.52886164", "0.5279716", "0.52794325", "0.5277975", "0.5273205", "0.5257502", "0.5257502", "0.52506787", "0.52355766", "0.52355766", "0.52339715", "0.5211608", "0.5207821", "0.51914304", "0.5176447", "0.51660067", "0.51554877", "0.5154565", "0.514677", "0.5132952", "0.5132079", "0.5130203", "0.5126142", "0.5124471", "0.5124471", "0.51215607", "0.510399", "0.51008064", "0.50973445", "0.5096036", "0.50931233", "0.5092481", "0.50805384", "0.5079946", "0.5071457", "0.506863", "0.5067615", "0.50632757", "0.50601405", "0.5057576", "0.5057058" ]
0.0
-1
Fieldlength norm: the shorter the field, the higher the weight. Set to 3 decimals to reduce index size.
function norm(mantissa=3){const cache=new Map();const m=Math.pow(10,mantissa);return {get(value){const numTokens=value.match(SPACE).length;if(cache.has(numTokens)){return cache.get(numTokens);}const norm=1/Math.sqrt(numTokens);// In place of `toFixed(mantissa)`, for faster computation const n=parseFloat(Math.round(norm*m)/m);cache.set(numTokens,n);return n;},clear(){cache.clear();}};}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "normalize()\r\n {\r\n var len = this.mag();\r\n if (len !== 0) \r\n this.mult(1 / len);\r\n\r\n return this;\r\n }", "static setNormalizeV3(xyz) {\nvar len;\n//--------------\nlen = this.lengthV3(xyz);\nif (1e-5 <= len) {\nreturn this.setInverseScaleV3(xyz, len);\n} else {\nreturn xyz;\n}\n}", "get magnitude() {\n return norm(this);\n }", "normalize(length = 1) {\n const scale = length / this.magnitude();\n return this.scale(scale, scale);\n }", "normalized() {\n\t\treturn this.multiply(1 / this.magnitude());\n\t}", "norm() {\r\n return Math.sqrt(this.dot(this));\r\n }", "normalize() {\r\n this.scale(1 / this.norm());\r\n }", "normalized() {\r\n return this.times(1 / this.norm());\r\n }", "normalize() {\n return this.multiply(1 / this.magnitude());\n }", "function halveField(item, field) {\n return update(item, field, function(value) {\n return value / 2;\n });\n}", "function LengthConverter(valNum) {\n return valNum * 0.000621371;\n }", "normalize() {\n let len = this.length();\n this.div(len);\n return this;\n }", "lengthSq() {\n return this.w * this.w + this.xyz.clone().lengthSq();\n }", "normalize() {\n if (this._vector[3] !== 0) {\n this._vector[0] = this._vector[0] / this._vector[3];\n this._vector[1] = this._vector[1] / this._vector[3];\n this._vector[2] = this._vector[2] / this._vector[3];\n this._vector[3] = 1;\n }\n }", "normalize() {\n let scale = 1.0 / this.length();\n this.xyz = this.xyz.multiplyScalar(scale);\n this.w *= scale;\n return this;\n }", "static setNormalizeQV(qv) {\nvar lensq;\n//--------------\n// Do nothing if qv is too close to zero.\nlensq = this.innerProductQV(qv, qv);\nif (1e-12 < lensq) {\nreturn setScaleQV(qv, 1 / Math.sqrt(lensq));\n} else {\nreturn qv;\n}\n}", "function norm(a){return dot(a, a);}", "calculateNormal(){\n this.normal = vec3.create();\n for (let i = 0; i < this.polygons.length; i++) {\n vec3.add(this.normal, this.normal, this.polygons[i].getNormal());\n }\n vec3.normalize(this.normal, this.normal)\n }", "static Normalized(vec) {\n vec = new VecX(vec);\n if (vec.Magnitude() === 0)\n return vec.Multiply(0);\n return vec.Divide(vec.Magnitude());\n }", "setWeight(v) {\n this.distance = 1 / Math.abs(parseFloat(v) || 0);\n return this;\n }", "calcLength(limb) {\n var upper = this.skeleton.bones[limb.upper];\n var lower = this.skeleton.bones[limb.lower];\n var scaling = this.rootMesh.scaling.x;\n limb.upperLength = upper.getAbsolutePosition().subtract(lower.getAbsolutePosition()).length()*scaling;\n if ( lower.children && lower.children[0] ) {\n limb.lowerLength = lower.getAbsolutePosition().subtract(lower.children[0].getAbsolutePosition()).length()*scaling;\n } else {\n limb.lowerLength = 0;\n }\n limb.length = limb.upperLength+limb.lowerLength;\n this.log(\"Length of \"+upper.name+\": \"+limb.upperLength+\", \"+lower.name+\": \"+limb.lowerLength);\n }", "function normalize(distance) {\n return distance / (0.005 * r);\n}", "static norm(vector, n) {\n\t\treturn Math.sqrt(this.dot_product(vector, vector, n));\n\t}", "getBackendFullLen(len){\n\treturn (1+ 2*this.margin_percent/100) * len;\n }", "function norm(v) {\n var norm = 0.0;\n for (var i = 0; i < v.length; i++) {\n norm += v[i] * v[i];\n }\n norm = Math.sqrt(norm);\n return norm;\n}", "normalized () {\n return Vector.normalize(this);\n }", "normalized () {\n return Vector.normalize(this);\n }", "function norm(value, start, stop) {\n return (value - start) / (stop - start);\n}", "get normalized() {}", "function normalize() {\n console.log(this.coords.map((n) => n / this.length));\n}", "function normalizeInput(input,sideLength) {\n var result = \"\";\n for (i = input.length; i < Math.pow(sideLength, 2); i++) {\n result += \" \";\n }\n result = input + result;\n return result;\n}", "getNormalize() {\n let length = this.getLength();\n return new Vector2d(this.x/length, this.y/length);\n }", "normalized() {\n return q.clone().normalize();\n }", "Normalized() {\n return Vec3.Normalized(this);\n }", "function normalizeCustomWeights() {\n let sum = 0;\n for (let i = 0; i < customWeights.length; ++i) {\n sum += customWeights[i];\n }\n for (let i = 0; i < customWeights.length; ++i) {\n customWeights[i] /= sum;\n }\n}", "updateLength() {\n this._len = tempVec3.sub(this.p1, this.p0).len();\n }", "function normalize() {\n console.log(this.coords.map(n => n / this.length));\n}", "norm( v ){\n\t\tvar i\n\t\tvar norm = 0\n\t\tfor( i = 0; i < v.length; i++ ){\n\t\t\tnorm += v[i]*v[i]\n\t\t}\n\t\tnorm = Math.sqrt( norm )\n\t\treturn norm\n\t}", "function norm(num, rangeBegin, rangeEnd){\n\t\treturn (num - rangeBegin) / (rangeEnd - rangeBegin);\n\t}", "length() {\n return Math.sqrt(this.w * this.w + this.xyz.clone().lengthSq() );\n }", "set len(value) {\n\t\tconst factor = value / this.len;\n\t\tthis.x *= factor;\n\t\tthis.y *= factor;\n\n\t}", "get normalizedSortingGridSize() {}", "function computeNewMaxWidth(field, val, previousMax) {\n // Should not be larger than the max width, unless the field name is really long\n var hardCap = Math.max(config.MAX_FIELD_WIDTH, field.length);\n var longest = Math.max(val.toString().length, previousMax, field.length);\n return Math.min(hardCap, longest);\n }", "set normalizedSortingGridSize(value) {}", "static lengthV3(xyz) {\nreturn Math.sqrt(this.squaredLengthV3(xyz));\n}", "get Weight()\n {\n return fnCalcWeight(this.Shaft, this.Length);\n }", "normalize() {\r\n let length = this.length();\r\n return new Vector2D(this.x / length, this.y / length);\r\n }", "normalize(vec) {\n const norm = Util.magnitude(vec);\n return Util.scale(vec, 1 / norm);\n }", "function recalcNorm(n) {\n var mean=parseFloat($('#mean'+n).val());\n var stdev=parseFloat($('#stdev'+n).val());\n var v=parseFloat($('#nv'+n).val());\n if (isNaN(mean) || isNaN(stdev) || isNaN(v)) return;\n var p = jStat.normal.cdf(v, mean, stdev);\n if (p > .5) {\n\tp = 1-p;\n }\n $('#fpr'+n).val(p);\n recalcFpr(n);\n}", "function Norm(z) {\n z=Math.abs(z);\n var p=1+ z*(0.04986735+ z*(0.02114101+ z*(0.00327763+ z*(0.0000380036+ z*(0.0000488906+ z*0.000005383)))))\n p=p*p; p=p*p; p=p*p\n return 1/(p*p)\n}", "function updateFieldLength(element) {\n const length = element.value.length;\n limits[element.name]['current'] = length;\n}", "normalized() {\n return this.clone().normalize();\n }", "function normalize(vec3) {\n if (vec3.x === 0 && vec3.y === 0 && vec3.z === 0) {\n return vec3;\n }\n var length = Math.sqrt(vec3.x * vec3.x + vec3.y * vec3.y + vec3.z * vec3.z);\n var invScalar = 1 / length;\n vec3.x *= invScalar;\n vec3.y *= invScalar;\n vec3.z *= invScalar;\n return vec3;\n}", "function CheckFieldLength(fn,wn,rn,mc) {\n var len = fn.value.length;\n if (len > mc) {\n fn.value = fn.value.substring(0,mc);\n len = mc;\n }\n document.getElementById(wn).innerHTML = len;\n document.getElementById(rn).innerHTML = mc - len;\n}", "function computeActualMaxFieldLengths() {\n\tvar actualValue = function(spec) {\n\t\tif (spec) {\n\t\t\t// Option specified.\n\t\t\tif (spec.length == 2) {\n\t\t\t\t// Specified as [min, max].\n\t\t\t\tvar min=spec[0], max=spec[1];\n\t\t\t\treturn min + srandom() * (max-min);\n\t\t\t} else {\n\t\t\t\t// Use raw specified value.\n\t\t\t\treturn spec;\n\t\t\t}\n\t\t}\n\t}\n\t$.each(templates, function(key, val) {\n\t\t// Template-level option.\n\t\tval.actualMaxLength = actualValue(val.maxLength);\n\t\t\n\t\t// Field-level options.\n\t\t$.each(val.fields, function(fkey, fval) {\n\t\t\tfval.actualMaxLength = actualValue(fval.maxLength);\n\t\t});\n\t});\n}", "Magnitude() {\n return Vec3.Magnitude(this);\n }", "function checkNumberFieldLength(elem) {\r\n if (elem.value.length > 4) {\r\n elem.value = elem.value.slice(0, 4);\r\n }\r\n}", "Normalized() {\n return Vec2.Normalized(this);\n }", "function CheckFieldLength(fn,wn,rn,mc) {\r\n var len = fn.value.length;\r\n if (len > mc) {\r\n fn.value = fn.value.substring(0,mc);\r\n len = mc;\r\n }\r\n document.getElementById(wn).innerHTML = len;\r\n document.getElementById(rn).innerHTML = mc - len;\r\n}", "updateMagnitude() {\n\t\tvar x = this.x\n\t\tvar y = this.y\n\t\tvar z = this.z //These may be null, but because of how null works, running the operation below should produce the proper result. (null*null = 0)\n\t\tthis.magnitude = Math.sqrt(x*x+y*y+z*z)\n\t}", "static Normalized(x, y, z) {\n let vec = new Vec3(x, y, z);\n if (vec.Magnitude() === 0)\n return new Vec3(0);\n return vec.Divide(vec.Magnitude());\n }", "squaredLength() {\nreturn E3Vec.squaredLengthV3(this.xyz);\n}", "function norm(v) {\n var v1 = v[0];\n var v2 = v[1];\n var result = Math.sqrt(v1*v1 + v2*v2);\n return result;\n}", "function calcL2Norms(w, axis) {\n return tfjs_core_1.tidy(function () { return tfc.sqrt(tfc.sum(tfc.mulStrict(w, w), axis, true)); });\n}", "set _minTermLength(value) {\n this.__minTermLength = value;\n Helper.UpdateInputAttribute(this, \"min\", value);\n }", "function normaliseScale(s) {\n if (s>1) throw('s must be <1');\n s = 0 | (1/s);\n var l = log2(s);\n var mask = 1 << l;\n var accuracy = 4;\n while(accuracy && l) { l--; mask |= 1<<l; accuracy--; }\n return 1 / ( s & mask );\n}", "function getNormalizedSize(count) {\n return 1 + (count - min) / diff;\n }", "function halveField(item, field) {\n var value = item[field];\n var newValue = value / 2;\n var newItem = objectSet(item, field, newValue);\n return newItem;\n}", "getVolume() {\n const volume = Math.pow(this.length, 3);\n return +volume.toFixed(3);\n }", "normalize(inplace=true)\n\t{\n\t\t//TODO: done\n\t\tvar magnitude = this.magnitude();\n\t\tif (!inplace)\n\t\t\treturn new Vector(this.x/magnitude, this.y/magnitude, this.z/magnitude);\n\t\tthis.x /= magnitude;\n\t\tthis.y /= magnitude;\n\t\tthis.z /= magnitude;\n\t\treturn this;\n\t}", "beamWidth() {\n return binding.GetModelBeamWidth(this._impl);\n }", "function NormalizedArray() {\n\n var members = {};\n var wordCount = 0;\n var normalized = false;\n this.ls = [];\n\n /* add(string) => pushes into ls and members if it's unique\n otherwise, add 1 to the number of times it has been added */\n this.add = function(item) {\n if (members[item] != undefined)\n members[item] += 1;\n\n else {\n members[item] = 1;\n this.ls.push(item);\n }\n wordCount += 1; // always\n }\n // word count => word frequency\n this.normalize = function() {\n if (normalized)\n throw 'NormalizedArray: normalize can only be called once';\n\n for (var i = 0; i < this.ls.length; i++)\n this.ls[i] = [this.ls[i], (members[this.ls[i]] / wordCount)];\n\n normalized = true;\n }\n}", "function computeVertexNormal(hf: Heightfield, vx: number, vy: number, n: Vec3) {\n const fnorms = hf.faceNormals;\n // This vertex is belongs to 4 quads\n // Do the faces this vertex is the 1st point of for this quad.\n // This is the quad up and to the right\n let qx = vx % hf.xCount;\n let qy = vy % hf.yCount;\n let ni = (qy * hf.xCount + qx) * 3 * 2;\n n.x = fnorms[ni + 0];\n n.y = fnorms[ni + 1];\n n.z = fnorms[ni + 2];\n ni += 3;\n n.x += fnorms[ni + 0];\n n.y += fnorms[ni + 1];\n n.z += fnorms[ni + 2];\n\n // 2nd tri of quad up and to the left\n qx = pmod(qx - 1, hf.xCount);\n ni = (qy * hf.xCount + qx) * 3 * 2 + 3;\n n.x += fnorms[ni + 0];\n n.y += fnorms[ni + 1];\n n.z += fnorms[ni + 2];\n\n // both tris of quad down and to the left\n qy = pmod(qy - 1, hf.yCount);\n ni = (qy * hf.xCount + qx) * 3 * 2;\n n.x += fnorms[ni + 0];\n n.y += fnorms[ni + 1];\n n.z += fnorms[ni + 2];\n ni += 3;\n n.x += fnorms[ni + 0];\n n.y += fnorms[ni + 1];\n n.z += fnorms[ni + 2];\n\n // 1st tri of quad down and to the right\n qx = (qx + 1) % hf.xCount;\n ni = (qy * hf.xCount + qx) * 3 * 2;\n n.x += fnorms[ni + 0];\n n.y += fnorms[ni + 1];\n n.z += fnorms[ni + 2];\n\n // Normalize to 'average' the result normal\n Vec3.normalize(n, n);\n}", "function normalizeScale(s) {\n s = 0 | (1 / s)\n let l = log2(s)\n let mask = 1 << l\n let accuracy = 4\n while (accuracy && l) {\n l--\n mask |= 1 << l\n accuracy--\n }\n return 1 / (s & mask)\n}", "calculateNormals() {\r\n // MP2: Implement this function!\r\n\r\n // initialize an NArray containing M normals\r\n let normals = [];\r\n for(let i = 0; i < this.numVertices; i++) {\r\n normals.push([0, 0, 0]);\r\n }\r\n\r\n // iterate all triangles\r\n for(let i = 0; i < this.numFaces; i++) {\r\n let indices = this.getTriangleVertexByIndex(i);\r\n let vertices = this.createAndGetPosDataByIndex(indices);\r\n let N = this.computeNormalForTriangles(vertices[0], vertices[1], vertices[2]);\r\n // average vertex normals by scale with factor 0.5\r\n glMatrix.vec3.scale(N, N, 0.5);\r\n\r\n indices.forEach(function(index) {\r\n normals[index] = normals[index].map((a, i) => a + N[i]);\r\n });\r\n }\r\n\r\n // normalize each normal in N array to unit length\r\n for(let i = 0; i < this.numVertices; i++) {\r\n let tmp = glMatrix.vec3.fromValues(normals[i][0], normals[i][1], normals[i][2]);\r\n glMatrix.vec3.normalize(tmp, tmp);\r\n this.normalData.push(...tmp);\r\n }\r\n }", "function myNorm() \n{\n var x1, x2, rad;\n do {\n x1 = 2 * Math.random() - 1;\n x2 = 2 * Math.random() - 1;\n rad = x1 * x1 + x2 * x2;\n } while(rad >= 1 || rad == 0);\n var c = Math.sqrt(-2 * Math.log(rad) / rad);\n return (x1 * c);\n}", "get width() {\n return this._boundingBox.width;\n }", "get magnitude() {\n return this.length;\n }", "set sqrMagnitude(value) {}", "function luasLingkaran(length)\n{\n return 1/4 * 3.14 * length * length;\n}", "function normalizeDOI () {\n var normMax = 100;\n var normMin = 10;\n var min, max, i, m, d;\n var valArray = [];\n for (i = 0; i < config.doi.length; i++) {\n valArray.push(config.doi[i][\"val\"]);\n }\n min = Math.min.apply(Math, valArray);\n max = Math.max.apply(Math, valArray);\n if (max === min) {\n for (i = 0; i < config.doi.length; i++) {\n config.doi[i][\"val\"] = normMax;\n }\n } else {\n m = (normMax - normMin) / (max - min);\n d = normMax - (m * max);\n for (i = 0; i < config.doi.length; i++) {\n config.doi[i][\"val\"] = m * config.doi[i][\"val\"] + d;\n }\n }\n }", "xyzLength() {\nreturn E3Vec.lengthV3(this.xyz);\n}", "function magnitudeSize(magnitude) {\r\n return magnitude * 40000;\r\n}", "function scaleImageLength(l) {\n return modelView.model2px(0.01 * l);\n }", "setLenght(length) {\n this.length = length;\n }", "norm(vec) {\n return Util.dist([0, 0], vec);\n }", "function length_v2(v) { return Math.sqrt(v[0] * v[0] + v[1] * v[1]); }", "setLength(length) {\n return this.copy(this.getUnit().multiply(length));\n }", "norm(vec) \n { \n let mag = Math.sqrt(vec.x*vec.x + vec.y*vec.y);\n let multiplier = 1/mag;\n return {\n x: vec.x * multiplier,\n y: vec.y * multiplier\n };\n }", "function normalize (z) {if (z > 1) z = 1; return (z - (k)) / (1 - k);}", "function accumulateNormals(index, norm) {\n if (calculatedNormalVectors[index] == undefined) {\n calculatedNormalVectors[index] = norm;\n } else {\n calculatedNormalVectors[index].add(norm)\n }\n }", "wFunctionBartlett (length, index) {\n\t\treturn 2 / (length - 1) * ((length - 1) / 2 - Math.abs(index - (length - 1) / 2));\n\t}", "normal(i1, i2, i3) {\n return this.rawNormal(i1, i2, i3).normalize();\n }", "function getWidth() {\n return Math.round(obj.width * scale);\n }", "function smallField() {\n let numberOfRows = 10;\n let numberOfColumns = 10;\n let numberOfBombs = 20;\n let size = 'small';\n drawFieldRightSize(size, numberOfRows, numberOfColumns, numberOfBombs);\n}", "function norm(vec) {\r\n var r = magnitude(vec);\r\n return {\r\n x: vec.x / r,\r\n y: vec.y / r\r\n };\r\n}", "set normalized(value) {}", "calculateNormals() {\r\n // MP2: Implement this function!\r\n \r\n }", "computeBoundaryLengths() {\n\t\tthis.l = DenseMatrix.zeros(this.nB, 1);\n\t\tfor (let he of this.boundary.adjacentHalfedges()) {\n\t\t\tlet i = this.bVertexIndex[he.vertex];\n\n\t\t\tthis.l.set(geometry.length(he.edge), i, 0);\n\t\t}\n\t}", "function sqrt() {\n var cur = parseFloat(calcVals.cur);\n if (cur >= 0){\n calcVals.cur = Math.sqrt(cur).toString().substring(0, 11);\n calcVals.prevAttr = \"filler\";\n }\n}" ]
[ "0.5737642", "0.5704147", "0.56574667", "0.5433025", "0.5389228", "0.5388174", "0.5370179", "0.5344227", "0.5285347", "0.5268295", "0.5242519", "0.52415156", "0.5190834", "0.50982887", "0.505091", "0.5042904", "0.50176996", "0.5002481", "0.49810243", "0.49715373", "0.49558353", "0.49518496", "0.49487427", "0.49176598", "0.48960406", "0.48945782", "0.48945782", "0.48895237", "0.48892054", "0.4872142", "0.4867326", "0.48612836", "0.48414892", "0.48345453", "0.48302364", "0.4825084", "0.48163056", "0.48106816", "0.47711352", "0.47699797", "0.47571048", "0.4748405", "0.47312674", "0.4726145", "0.4723189", "0.47169805", "0.47115228", "0.47008455", "0.46997797", "0.46962723", "0.46935344", "0.4692889", "0.4691745", "0.4687932", "0.4685879", "0.46796608", "0.467935", "0.467717", "0.46770102", "0.4676768", "0.4674528", "0.4669537", "0.46637517", "0.46544456", "0.46334776", "0.46200123", "0.46169668", "0.46072978", "0.46069935", "0.4606076", "0.45735124", "0.45730665", "0.45574602", "0.45571485", "0.45568162", "0.45531058", "0.45528206", "0.45426193", "0.4534264", "0.4528338", "0.45251098", "0.45213404", "0.4519196", "0.45135736", "0.45066625", "0.44891214", "0.44868022", "0.4481567", "0.44803447", "0.44781843", "0.44698262", "0.44629332", "0.44573256", "0.44499022", "0.44480988", "0.44441143", "0.4444079", "0.44356918", "0.44339326", "0.44265303" ]
0.5525789
3
Adds a doc to the end of the index
add(doc){const idx=this.size();if(isString(doc)){this._addString(doc,idx);}else {this._addObject(doc,idx);}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "add(doc) {\n const idx = this.size()\n\n if (isString(doc)) {\n this._addString(doc, idx)\n } else {\n this._addObject(doc, idx)\n }\n }", "addDocument (doc) {\n if (this._isOptimized) {\n throw new Error('Cannot add a document to an already-optimized index.');\n }\n\n if (typeof doc.id === 'undefined') {\n throw new Error(1000, 'ID is a required property of documents.');\n };\n\n const fieldsToIndex = [];\n for (let [ fieldName, fieldData ] of Object.entries(doc)) {\n /* The document ID is not a field... */\n if ('id' === fieldName) {\n continue;\n }\n\n /* Make sure this field should be indexed... */\n if (!(Object.hasOwnProperty.call(this._fields, this._intern(fieldName, false)))) {\n console.error(`Document field (${fieldName}) is not indexable.`);\n continue;\n }\n\n fieldsToIndex.push(fieldName);\n }\n\n if (0 === fieldsToIndex.length) {\n console.log(`Not indexing empty document ${doc.id}`);\n return;\n }\n\n doc.id = this._intern(doc.id);\n\n for (let [ _, fieldName ] of Object.entries(fieldsToIndex)) {\n let tokens = this._tokenize(doc[`${fieldName}`], true);\n\n fieldName = this._intern(fieldName, false);\n\n if (!(Object.hasOwnProperty.call(this._fields[`${fieldName}`].documents, doc.id))) {\n this._fields[`${fieldName}`].documents[`${doc.id}`] = tokens.length;\n }\n\n for (let [ _, term ] of Object.entries(tokens)) {\n if (!(Object.hasOwnProperty.call(this._fields[`${fieldName}`].terms, term))) {\n this._fields[`${fieldName}`].terms[`${term}`] = {};\n }\n\n if (!(Object.hasOwnProperty.call(this._fields[`${fieldName}`].terms[`${term}`], doc.id))) {\n this._fields[`${fieldName}`].terms[`${term}`][`${doc.id}`] = 0;\n }\n ++this._fields[`${fieldName}`].terms[`${term}`][`${doc.id}`];\n }\n }\n }", "addDocument(_id, _docType, _payload) {\n client.index({\n index: this.indexName,\n type: _docType,\n id: _id,\n body: _payload\n }, function (err, resp) {\n if (err) {\n console.log(err);\n }\n else {\n console.log(\"added or updated\", resp);\n }\n })\n }", "function handleAdd() {\n let newId = docs.length + 1;\n setDocs([\n ...docs,\n {\n id: newId,\n title: `Boleto ${newId}`,\n description: `Descrição do boleto ${newId}`\n }\n ]);\n }", "async function addToIndex(body) {\n await client\n .index({\n index,\n body,\n })\n .catch((err) => {\n console.log(\"Error during addToIndex for file: \" + JSON.stringify(body));\n console.log(err);\n });\n}", "async _write(body, enc, next) {\n debug.extend('_write')('writing 1 record')\n\n /**\n * Push the object to ES and indicate that we are ready for the next one.\n * Be sure to propagate any errors:\n */\n\n try {\n await this.client.index({\n index: this.config.index,\n type: this.config.type,\n id: this.idFn(body),\n refresh: this.config.refresh,\n body\n })\n this.written++\n this.logRate()\n next()\n } catch(err) {\n next(err)\n }\n }", "function addDoc() {\n const docTable = document.getElementById('docTable');\n addRow(docTable);\n hideSelectedDoctypeOption();\n clearDoc();\n hideOrShowRightColumn();\n}", "function replay_insert(zdoc, path, index, val) {\n return zdoc_write_op(zdoc, full_insert_op, path, index, val);\n}", "async addContent(name, contentText) {\n //TODO\n allWords = await this.words(contentText);\n docCount++;\n await db.collection(docContent_table).insertOne(\n {_id: docCount,docN: name, content: contentText}\n );\n for(let [word,offsets] of allWords){\n await db.collection(docs_table).updateOne(\n {_id: {word, name}},\n {\n $inc: {score: 1},\n $setOnInsert: {\n words: word,\n docs: name,\n offset: offsets\n }\n },\n {upsert: true}\n );\n }\n }", "function addResult(doc) {\n lookup[doc._id] = doc._rev;\n var id = doc._id;\n var rev = doc._rev;\n if(stripId) {\n delete doc._id;\n }\n if(stripRev) {\n delete doc._rev;\n }\n return addAction(doc, id, rev);\n }", "function handleNewClick() {\n const newDoc = stubNewDocument()\n addUpdate(newDoc)\n appendToExtendedData([newDoc])\n }", "function addonAddDocURI(addon, uri){\n\tapiDocsURI.push({\"addon\" : addon, \"uri\" : uri});\n\tapiDocsURI.sort();\n}", "function commitSample( db, doc ) {\n db.post( doc )\n}", "async function addIndexedData(data) {\r\n // Open up a transaction as usual\r\n var objectStore = db.transaction(['jobs'], \"readwrite\").objectStore('jobs');\r\n\r\n // Create another request that inserts the item back into the database\r\n var updateTitleRequest = objectStore.put(data, 1);\r\n\r\n // Log the transaction that originated this request\r\n console.log(\"The transaction that originated this request is \" + updateTitleRequest.transaction);\r\n\r\n // When this new request succeeds, run the displayData() function again to update the display\r\n updateTitleRequest.onsuccess = function () {\r\n console.log(\"SUCCESS!!!! WOOOHOOOO\");\r\n };\r\n}", "vouchFor(tagsdoc, index) {\n\n var tag = tagsdoc.tags[index];\n var modified_tag = {\n value: tag.value,\n count: tag.count + 1,\n };\n tagsdoc.tags[index] = modified_tag;\n db_pending.put({\n _id: tagsdoc._id,\n _rev: tagsdoc._rev,\n type: \"tag\",\n tags: tagsdoc.tags,\n }, function (err, response) {\n if (err) {\n console.log(err);\n }\n console.log(\"successfully upvoted\");\n });\n\n }", "updateIndex (oplog, added) {\n added.reverse().reduce((handled, item) => {\n if (handled.indexOf(item.payload.key) === -1) {\n handled.push(item.payload.key)\n if (item.payload.op === 'INSERT') {\n this._index[item.payload.id] = item.payload.value\n }\n }\n return handled\n }, [])\n }", "add (docs = []) {\n Array.prototype.push.apply(this, (Array.isArray(docs) ? docs : [docs]).filter((doc) => {\n return doc.isDocument && !this.has(doc);\n }));\n\n return this;\n }", "function insertDoc(doc, db){\n\tdb.find({ _refObjectUUID: doc._refObjectUUID }, function(err, docs){\n\t\tif(!docs.length){\n\t\t\t// Insert New\n\t\t\tdb.insert(doc, function (err) {});\n\t\t} else {\n\t\t\t// Update Existing\n\t\t\tcompareDoc(doc, db);\n\t\t}\n\t});\n}", "function insert_doc(doc) {\n\tif (cloudant) {\n\t\tlogger.info(\"insert_doc() doc.id_str:\", doc.id_str);\n\t db.insert(doc, function (error, http_body, http_headers) {\n\t if(error) return logger.error(error);\n\t });\n // logger.debug(\"insert_doc() http_body:\", http_body);\n\t\t}\n}", "addRecentDocument(path) {\n let recentDocs = this.app.store.get('recentDocs', []);\n recentDocs.unshift(path);\n recentDocs = _.uniq(recentDocs);\n if (recentDocs.length > 10)\n recentDocs.length = 10;\n this.app.store.set('recentDocs', recentDocs);\n }", "function addnewdoc() {\n currentuseruid = auth.currentUser.uid\n var newdoc1 = {\n title: 'A new doc by abca',\n desc: 'A new doc blah blah by abca',\n creator: currentuseruid\n }\n // console.log(newdoc1)\n // get the current user\n db.collection('new1').doc('newdoc2').set(newdoc1).then(d => {\n console.log('new doc added')\n });\n db.collection('new1').doc('newdoc2').set({ newfield: 'yes' }, { merge: true }).then(d => {\n console.log('new data merged into an existing doc')\n });\n }", "static async index(entry, idx) {\n\t\ttry {\n\t\t\treturn await db.index({\n\t\t\t\tindex: idx,\n\t\t\t\ttype: '_doc',\n\t\t\t\tbody: entry,\n\t\t\t})\n\t\t} catch (e) {\n\t\t\treturn {\n\t\t\t\terror: true,\n\t\t\t\tinfo: e,\n\t\t\t}\n\t\t}\n\t}", "function postDocumentToES(doc, context) {\n var req = new AWS.HttpRequest(endpoint);\n\n req.method = 'POST';\n req.path = path.join('/', esDomain.index, esDomain.doctype);\n req.region = esDomain.region;\n req.body = doc;\n req.headers['presigned-expires'] = false;\n req.headers['Host'] = endpoint.host;\n\n // Sign the request (Sigv4)\n var signer = new AWS.Signers.V4(req, 'es');\n signer.addAuthorization(creds, new Date());\n\n // Post document to ES\n var send = new AWS.NodeHttpClient();\n send.handleRequest(req, null, function(httpResp) {\n var body = '';\n httpResp.on('data', function (chunk) {\n body += chunk;\n });\n httpResp.on('end', function (chunk) {\n numDocsAdded ++;\n if (numDocsAdded === totLogLines) {\n // Mark lambda success. If not done so, it will be retried.\n console.log('All ' + numDocsAdded + ' log records added to ES.');\n context.succeed();\n }\n });\n }, function(err) {\n console.log('Error: ' + err);\n console.log(numDocsAdded + 'of ' + totLogLines + ' log records added to ES.');\n context.fail();\n });\n}", "function addDocument(docId, allWords) {\n let hist = createWordHistogram(allWords);\n let words = Object.keys(hist);\n\n // find the largest term frequency using hist \n let largestTF = words.map(k => hist[k]).reduce((a, b) => Math.max(a, b), 1);\n\n // make sure all words are in the database\n let wordObjects = getWords.bind(this)(words);\n\n // increase the document counter for every word in this document\n let wordIds = wordObjects.then(objs => objs.map(obj => obj._id));\n let docCounterIncremented = wordIds.then(ids => {\n return this.db.collection('words')\n .update(\n {'_id': {'$in': ids}}, \n {'$inc': {'documents': 1}},\n {'multi': true}\n );\n });\n\n // create word counters for this document \n let counters = wordObjects.then(objs => objs.map(obj => {\n return {\n 'document': docId, \n 'word': obj._id, \n 'count': hist[obj.word],\n 'normalizedCnt': hist[obj.word] / largestTF\n };\n }));\n let countersInserted = counters.then(documents => {\n if (documents.length > 0) {\n return this.db.collection('words_in_documents').insert(documents);\n } else {\n return 'nothing to do';\n }\n });\n\n // finished when all db queries are finished \n return Promise.all([docCounterIncremented, countersInserted]);\n}", "indexAdd({ commit, dispatch }, sessionId) {\n commit(types.INDEX_ADD, sessionId);\n\n //preload logic\n //disabled for now\n if(!didPreload) {\n if(preloadTimeout) {\n clearTimeout(preloadTimeout);\n }\n\n preloadTimeout = setTimeout(() => {\n dispatch('preloadIndex');\n }, 500)\n }\n }", "function updateDoc(doc, db){\n\tdb.update({ _refObjectUUID: doc._refObjectUUID }, doc, {}, function(err, count){\n\t\t//console.log('Update: ', count);\n\t});\n}", "function addDocToLibraries (doc) {\n //AppController.sharedInstance().librariesController().addAssetLibraryAtURL(doc.fileURL())\n\tdoc.saveAndAddLibrary()\n}", "function indexDocument(document) {\n\t\tvar text = document[me.indexField];\n\t\tvar docId = document[me.objectStore.keyPath];\n\n\t\t// tokenize string\n\t\tvar tokens = Object.keys(Lucy.tokenize(text, {disableStemming: true}).tokens);\n\t\t\n\t\tif (me.mode == \"suffix\") {\n\t\t\ttokens = tokens.map(function (token) { return reverse(token); });\n\t\t}\n\t\t\n\t\ttokens.forEach(function(token) {\n\t\t\tvar child = null;\n\t\t\t\n\t\t\t// Add prefixes for every letter in the token\n\t\t\t// We start from the entire token and progressively chop off its last character\n\t\t\twhile (token.length > 0) {\n\t\t\t\taddNode(token, docId, child);\n\t\t\t\t\n\t\t\t\tchild = token[token.length - 1];\n\t\t\t\ttoken = token.slice(0, token.length - 1);\n\t\t\t}\n\t\t});\n\t}", "function addDocument(collectionName, newDoc) {\n var collection = data[collectionName];\n var nextId = Object.keys(collection).length;\n if (newDoc.hasOwnProperty('_id')) {\n throw new Error(`You cannot add a document that already has an _id. addDocument is for new documents that do not have an ID yet.`);\n }\n while (collection[nextId]) {\n nextId++;\n }\n newDoc._id = nextId;\n writeDocument(collectionName, newDoc);\n return newDoc;\n}", "function addDocument(collectionName, newDoc) {\n var collection = data[collectionName];\n var nextId = Object.keys(collection).length;\n if (newDoc.hasOwnProperty('_id')) {\n throw new Error(`You cannot add a document that already has an _id. addDocument is for new documents that do not have an ID yet.`);\n }\n while (collection[nextId]) {\n nextId++;\n }\n newDoc._id = nextId;\n writeDocument(collectionName, newDoc);\n return newDoc;\n}", "function addDocument(collectionName, newDoc) {\n var collection = data[collectionName];\n var nextId = Object.keys(collection).length;\n if (newDoc.hasOwnProperty('_id')) {\n throw new Error(`You cannot add a document that already has an _id. addDocument is for new documents that do not have an ID yet.`);\n }\n while (collection[nextId]) {\n nextId++;\n }\n newDoc._id = nextId;\n writeDocument(collectionName, newDoc);\n return newDoc;\n}", "function addDeletedOrLocalIndex(txn, callback) {\n\t var docStore = txn.objectStore(DOC_STORE);\n\t docStore.createIndex('deletedOrLocal', 'deletedOrLocal', {unique : false});\n\t\n\t docStore.openCursor().onsuccess = function (event) {\n\t var cursor = event.target.result;\n\t if (cursor) {\n\t var metadata = cursor.value;\n\t var deleted = isDeleted(metadata);\n\t metadata.deletedOrLocal = deleted ? \"1\" : \"0\";\n\t docStore.put(metadata);\n\t cursor.continue();\n\t } else {\n\t callback();\n\t }\n\t };\n\t }", "addDay(date) {\n let dayDocRef = this.dayRef.doc(this.dateString(date));\n dayDocRef.get()\n .then(doc => {\n if (!doc.exists) {\n dayDocRef.set({events: []});\n }\n })\n .catch(err => {\n console.log('addDay: error getting document', err);\n });\n }", "function addText() {\n var length = indoc.length - offset;\n\n if (0 === length) {\n return;\n }\n\n output.push(indoc.substr(offset, length));\n}", "'word.add'(val) {\n Vocabruary.insert(val);\n }", "add(filename) {\n if (this.index.length == this.max)\n this.remove(this.index.shift());\n this.index.push(filename);\n if (DEBUG) console.log(`Added ${join(this.path, filename)}`);\n }", "function addDeletedOrLocalIndex(txn, callback) {\n var docStore = txn.objectStore(DOC_STORE);\n docStore.createIndex('deletedOrLocal', 'deletedOrLocal', {unique : false});\n\n docStore.openCursor().onsuccess = function (event) {\n var cursor = event.target.result;\n if (cursor) {\n var metadata = cursor.value;\n var deleted = isDeleted(metadata);\n metadata.deletedOrLocal = deleted ? \"1\" : \"0\";\n docStore.put(metadata);\n cursor[\"continue\"]();\n } else {\n callback();\n }\n };\n }", "function newEntry() {\n var doc = DocumentApp.getActiveDocument();\n var dateSettings = getDateSettings();\n var dateString = getDateString(dateSettings);\n var dateHeading = getDateHeading(dateSettings);\n var new_pos = insertDate(dateString, dateHeading);\n doc.setCursor(new_pos);\n \n }", "function addDeletedOrLocalIndex(txn, callback) {\n var docStore = txn.objectStore(DOC_STORE);\n docStore.createIndex('deletedOrLocal', 'deletedOrLocal', {unique : false});\n\n docStore.openCursor().onsuccess = function (event) {\n var cursor = event.target.result;\n if (cursor) {\n var metadata = cursor.value;\n var deleted = isDeleted(metadata);\n metadata.deletedOrLocal = deleted ? \"1\" : \"0\";\n docStore.put(metadata);\n cursor[\"continue\"]();\n } else {\n callback();\n }\n };\n }", "function addDeletedOrLocalIndex(txn, callback) {\n var docStore = txn.objectStore(DOC_STORE);\n docStore.createIndex('deletedOrLocal', 'deletedOrLocal', {unique : false});\n\n docStore.openCursor().onsuccess = function (event) {\n var cursor = event.target.result;\n if (cursor) {\n var metadata = cursor.value;\n var deleted = isDeleted(metadata);\n metadata.deletedOrLocal = deleted ? \"1\" : \"0\";\n docStore.put(metadata);\n cursor[\"continue\"]();\n } else {\n callback();\n }\n };\n }", "save() {\n if (this._history.length > 9){\n this._history.shift();\n }\n this._history.push(this.internalData);\n // Make the commit to setup the index and the state\n this.commit();\n }", "addField (fieldName) {\n if (this._isOptimized) {\n throw new Error('Cannot add a field to an already-optimized index.');\n }\n\n fieldName = this._intern(fieldName);\n this._fields[`${fieldName}`] = {\n terms: {},\n documents: {}\n };\n\n this._index[`${fieldName}`] = {};\n }", "function addDeletedOrLocalIndex(txn, callback) {\n var docStore = txn.objectStore(DOC_STORE);\n docStore.createIndex('deletedOrLocal', 'deletedOrLocal', {unique : false});\n\n docStore.openCursor().onsuccess = function (event) {\n var cursor = event.target.result;\n if (cursor) {\n var metadata = cursor.value;\n var deleted = isDeleted(metadata);\n metadata.deletedOrLocal = deleted ? \"1\" : \"0\";\n docStore.put(metadata);\n cursor.continue();\n } else {\n callback();\n }\n };\n }", "function addDeletedOrLocalIndex(txn, callback) {\n var docStore = txn.objectStore(DOC_STORE);\n docStore.createIndex('deletedOrLocal', 'deletedOrLocal', {unique : false});\n\n docStore.openCursor().onsuccess = function (event) {\n var cursor = event.target.result;\n if (cursor) {\n var metadata = cursor.value;\n var deleted = isDeleted(metadata);\n metadata.deletedOrLocal = deleted ? \"1\" : \"0\";\n docStore.put(metadata);\n cursor.continue();\n } else {\n callback();\n }\n };\n }", "function addDeletedOrLocalIndex(txn, callback) {\n var docStore = txn.objectStore(DOC_STORE);\n docStore.createIndex('deletedOrLocal', 'deletedOrLocal', {unique : false});\n\n docStore.openCursor().onsuccess = function (event) {\n var cursor = event.target.result;\n if (cursor) {\n var metadata = cursor.value;\n var deleted = isDeleted(metadata);\n metadata.deletedOrLocal = deleted ? \"1\" : \"0\";\n docStore.put(metadata);\n cursor.continue();\n } else {\n callback();\n }\n };\n }", "function addDeletedOrLocalIndex(txn, callback) {\n var docStore = txn.objectStore(DOC_STORE);\n docStore.createIndex('deletedOrLocal', 'deletedOrLocal', {unique : false});\n\n docStore.openCursor().onsuccess = function (event) {\n var cursor = event.target.result;\n if (cursor) {\n var metadata = cursor.value;\n var deleted = isDeleted(metadata);\n metadata.deletedOrLocal = deleted ? \"1\" : \"0\";\n docStore.put(metadata);\n cursor.continue();\n } else {\n callback();\n }\n };\n }", "function addDeletedOrLocalIndex(txn, callback) {\n var docStore = txn.objectStore(DOC_STORE);\n docStore.createIndex('deletedOrLocal', 'deletedOrLocal', {unique : false});\n\n docStore.openCursor().onsuccess = function (event) {\n var cursor = event.target.result;\n if (cursor) {\n var metadata = cursor.value;\n var deleted = isDeleted(metadata);\n metadata.deletedOrLocal = deleted ? \"1\" : \"0\";\n docStore.put(metadata);\n cursor.continue();\n } else {\n callback();\n }\n };\n }", "function addDeletedOrLocalIndex(txn, callback) {\n var docStore = txn.objectStore(DOC_STORE);\n docStore.createIndex('deletedOrLocal', 'deletedOrLocal', {unique : false});\n\n docStore.openCursor().onsuccess = function (event) {\n var cursor = event.target.result;\n if (cursor) {\n var metadata = cursor.value;\n var deleted = isDeleted(metadata);\n metadata.deletedOrLocal = deleted ? \"1\" : \"0\";\n docStore.put(metadata);\n cursor.continue();\n } else {\n callback();\n }\n };\n }", "function addDeletedOrLocalIndex(txn, callback) {\n var docStore = txn.objectStore(DOC_STORE);\n docStore.createIndex('deletedOrLocal', 'deletedOrLocal', {unique : false});\n\n docStore.openCursor().onsuccess = function (event) {\n var cursor = event.target.result;\n if (cursor) {\n var metadata = cursor.value;\n var deleted = isDeleted(metadata);\n metadata.deletedOrLocal = deleted ? \"1\" : \"0\";\n docStore.put(metadata);\n cursor.continue();\n } else {\n callback();\n }\n };\n }", "function indexer(data) {\n\t\n\tvar\n\t\t\n\t\t// id and full text content of document\n\t\tid,\n\t\ttext,\n\t\t\n\t\t// determine whether this url has been seen before\n\t\tdoc = get(\"URL-\" + data.url);\n\t\n\t// doc already exists\n\tif (doc) {\n\t\t\n\t\tid = doc.id;\n\t\t\n\t\t// if content is new, insert into store\n\t\tif (data.content !== doc.text || data.title !== doc.title) {\n\t\t\tset(\"URL-\" + data.url, {\n\t\t\t\tid: id,\n\t\t\t\ttext: data.content,\n\t\t\t\ttitle: data.title,\n\t\t\t\ticon: data.icon\n\t\t\t});\n\t\t}\n\t\t\n\t// doc never seen before\n\t} else {\n\t\t\n\t\t// look up current document count\n\t\tid = get(\"COUNT\") || 0;\n\t\t\n\t\t// assign ID to doc\n\t\tset(\"ID-\" + id, data.url);\n\t\t\n\t\t// set current document count\n\t\tset(\"COUNT\", id + 1);\n\t\t\n\t\t// insert into store\n\t\tset(\"URL-\" + data.url, {\n\t\t\tid: id,\n\t\t\ttext: data.content,\n\t\t\ttitle: data.title,\n\t\t\ticon: data.icon\n\t\t});\n\t\t\n\t}\n\t\n\t// keep track of all words seen during this update\n\tvar allwords = {};\n\t\n\t// update indexes\n\tupdate(id, \"s\", data.selection, allwords);\n\tupdate(id, \"t\", data.title, allwords);\n\tupdate(id, \"p\", data.priority, allwords);\n\tupdate(id, \"c\", data.content, allwords);\n\t\n\t// add all words to trie for autocompletion\n\tvar\n\t\td = get(\"ALL\") || {},\n\t\tt = trie(d),\n\t\tword;\n\t\n\tfor (word in allwords) {\n\t\tt.add(word);\n\t}\n\t\n\tset(\"ALL\", d);\n\t\n}", "function addToDb(term,timestamp){\n mongodb.connect(mongoUrl, function(err,db){\n if(err){\n console.log(err)\n }else{\n console.log(\"add to db\");\n var ltSearches = db.collection(\"latest-search\")\n ltSearches.insertOne({\"term\": term,\n \"when\":timestamp});\n \n db.close();\n \n }\n })\n}", "function Add_Doc_WithAutoID() {\n // Collection is the table or collection of\n cloudDB\n .collection(\"Students\")\n .add({\n // This is creating a new entry in the DB\n NameOfStd: nameV,\n RollNo: Number(rollV),\n Section: secV,\n Gender: genV,\n })\n .then(function (docRef) {\n console.log(\"Document writeen with ID\", docRef.id);\n })\n .catch(function (error) {\n console.eroor(\"Error adding document\", error);\n });\n}", "function addToFavourites(Id, title, link, content) { \nFavorites.push(Id) \nconsole.log(Favorites)\n\n db.collection(\"users\").doc(globaluser.uid).set({ \n favourites: Favorites\n \n},{ merge: true }) \n.then(() => {\n console.log(\"Document successfully written!\");\n})\n.catch((error) => {\n console.error(\"Error writing document: \", error);\n}); \n\n}", "function addDeletedOrLocalIndex(txn, callback) {\n var docStore = txn.objectStore(DOC_STORE);\n docStore.createIndex('deletedOrLocal', 'deletedOrLocal', {unique : false});\n\n docStore.openCursor().onsuccess = function (event) {\n var cursor = event.target.result;\n if (cursor) {\n var metadata = cursor.value;\n var deleted = utils.isDeleted(metadata);\n metadata.deletedOrLocal = deleted ? \"1\" : \"0\";\n docStore.put(metadata);\n cursor[\"continue\"]();\n } else {\n callback();\n }\n };\n }", "function addDeletedOrLocalIndex(txn, callback) {\n var docStore = txn.objectStore(DOC_STORE);\n docStore.createIndex('deletedOrLocal', 'deletedOrLocal', {unique : false});\n\n docStore.openCursor().onsuccess = function (event) {\n var cursor = event.target.result;\n if (cursor) {\n var metadata = cursor.value;\n var deleted = pouchdbMerge.isDeleted(metadata);\n metadata.deletedOrLocal = deleted ? \"1\" : \"0\";\n docStore.put(metadata);\n cursor.continue();\n } else {\n callback();\n }\n };\n }", "function upsert(db, docId, diffFun) {\n return new index_es(function (fulfill, reject) {\n db.get(docId, function (err, doc) {\n if (err) {\n /* istanbul ignore next */\n if (err.status !== 404) {\n return reject(err);\n }\n doc = {};\n }\n\n // the user might change the _rev, so save it for posterity\n var docRev = doc._rev;\n var newDoc = diffFun(doc);\n\n if (!newDoc) {\n // if the diffFun returns falsy, we short-circuit as\n // an optimization\n return fulfill({updated: false, rev: docRev});\n }\n\n // users aren't allowed to modify these values,\n // so reset them here\n newDoc._id = docId;\n newDoc._rev = docRev;\n fulfill(tryAndPut(db, newDoc, diffFun));\n });\n });\n}", "function addToOfflineDB(recordToAdd) {\n //connect to indexed DB instance\n let dbtransaction = db.transaction(\"pending\", \"readwrite\");\n let dbstore = dbtransaction.objectStore(\"pending\");\n // add to indexed DB\n dbstore.add(recordToAdd);\n}", "has (doc) {\n return !(this.indexOf(doc) <= -1);\n }", "function DocumentCreated(doc) {\n ReceiveUpdate(doc);\n}", "removeAt(idx) {\n this.records.splice(idx, 1)\n\n // Change ref index of every subsquent doc\n for (let i = idx, len = this.size(); i < len; i += 1) {\n this.records[i].i -= 1\n }\n }", "function postDocumentToES(key, context) {\n \n\tvar currentdate = new Date();\n\tvar datetime = currentdate.getUTCDate() + \"/\" + (currentdate.getUTCMonth()+1) + \"/\"\n\t\t\t\t+ currentdate.getUTCFullYear() + \" at \"\n\t\t\t\t+ (\"0\" + (currentdate.getUTCHours()+1)).slice(-2) + \":\"\n\t\t\t\t+ (\"0\" + currentdate.getUTCMinutes()).slice(-2);\n\t\n\tvar docName = key.split(/\\/|\\./g);\n\t\n\ttype = docName[docName.length - 1];\n\ttitle = replaceAll(key, \"/\", \"-\");\n\tfileName = docName[docName.length - 2];\n\tindex = determineDocType(type);\n\t\n\tif (type == 'gz') {\n\t\ttype = docName[docName.length - 2] + \".\" + docName[docName.length - 1];\n\t\tfileName = docName[docName.length - 3];\n\t\tindex = \"compressed\";\n\t}\n\t\n\tconsole.log(\"key: \" + key);\n\tconsole.log(\"title: \" + title);\n\t\n\telasticsearch.index({\n\t\t\tindex: index,\n\t\t\ttype: type,\n\t\t\tid: title,\n\t\t\tbody: {\n\t\t\t\tkey: key,\n\t\t\t\tlocation: 'https://s3-us-west-2.amazonaws.com/elastic-repo-qac/' + key,\n\t\t\t\tfileName: fileName,\n\t\t\t\tlast_updated: datetime\n\t\t\t}\n\t\t}, function(err, data) {\n\t\t\tconsole.log('json reply received');\n });\n\t\n}", "function save () {\n\n\t\t\t\tif (ready)\n\t\t\t\t\tCounter.collection.findAndModify({\n\t\t\t\t\t\tmodel: options.model,\n\t\t\t\t\t\tfield: options.field\n\t\t\t\t\t}, [], {\n\t\t\t\t\t\t$inc: {\n\t\t\t\t\t\t\tc: 1\n\t\t\t\t\t\t}\n\t\t\t\t\t}, {\n\t\t\t\t\t\t'new': true,\n\t\t\t\t\t\tupsert: true\n\t\t\t\t\t}, function (err, res) {\n\n\t\t\t\t\t\tif (!err)\n\t\t\t\t\t\t\tdoc[options.field] = res.c - 1;\n\t\t\t\t\t\tnext(err);\n\t\t\t\t\t});\n\t\t\t\telse\n\t\t\t\t\tsetTimeout(save, 5);\n\t\t\t}", "function addToES(results){\n client.create({\n index: 'disney',\n type: 'waitTime',\n\t\t // Ajoute à l'index un ID unique (Obligatoire sur JS à l'inverse de python)\n id : uuidv4(),\n body: JSON.stringify(results)\n }, function (err) {\n if(err) {\n\t\t\t // Si l'ajout est refusé cela à beaucoup de chance d'être dû à un doublon d'ID, on relance donc l'ajout pour\n\t\t\t // generer un nouvel ID\n addToES(results)\n }\n });\n}", "addOnIndex(index, value) {\n if (index < 0) {\n console.error(`Index must be greater than 0!`);\n return false;\n }\n\n index = Math.floor(index);\n\n if (this.length <= index) {\n this.add(value);\n } else {\n const temp = this.get(index);\n this.data[index] = value;\n\n for (let i = index + 1; i < this.length; i++) {\n this.data[i + 1] = this.data[i];\n }\n\n this.data[index + 1] = temp;\n this.length++;\n }\n }", "function index_browser_es_upsert(db, docId, diffFun) {\n return new index_es(function (fulfill, reject) {\n db.get(docId, function (err, doc) {\n if (err) {\n /* istanbul ignore next */\n if (err.status !== 404) {\n return reject(err);\n }\n doc = {};\n }\n\n // the user might change the _rev, so save it for posterity\n var docRev = doc._rev;\n var newDoc = diffFun(doc);\n\n if (!newDoc) {\n // if the diffFun returns falsy, we short-circuit as\n // an optimization\n return fulfill({updated: false, rev: docRev});\n }\n\n // users aren't allowed to modify these values,\n // so reset them here\n newDoc._id = docId;\n newDoc._rev = docRev;\n fulfill(index_browser_es_tryAndPut(db, newDoc, diffFun));\n });\n });\n}", "function indexDocs(callback){\n if(typeof config.docs !== 'undefined' && config.docs.length > 0){\n let docIndex = 0;\n config.docs.forEach(function(doc){\n let fileContents = fs.readFileSync(doc.file, \"utf-8\")\n let renderedHtml = md.render(fileContents);\n let $ = cheerio.load(renderedHtml);\n\n // set the docTitle for the DB\n doc.docTitle = doc.title;\n doc.docBody = renderedHtml;\n doc.docSlug = slugify(doc.title);\n\n // build lunr index doc\n var indexDoc = {\n docTitle: doc.title,\n docBody: $.html(),\n id: docIndex\n }\n\n // add to lunr index\n lunrIndex.add(indexDoc);\n\n config.docs[docIndex].index = docIndex;\n docIndex++;\n })\n callback()\n }else{\n console.log(\"[ERROR] No docs found\");\n process.exit(0);\n }\n}", "function addDataToIndex(data){\n\t\t\t\t\t\tif ($scope.mmShowType) {\n\t\t\t\t\t\t\tcreateIndexWithType(data);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcreateIndex(data);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcreateTypedModel();\n\t\t\t\t\t\tif(!$scope.mmModel.fullObjects){\n\t\t\t\t\t\t\t$scope.mmModel.fullObjects = {};\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "insertAt(index, data) {}", "vouchAgainst(tagsdoc, index) {\n\n var tag = tagsdoc.tags[index];\n if (tag.count > 0) {\n var modified_tag = {\n value: tag.value,\n count: tag.count - 1,\n };\n tagsdoc.tags[index] = modified_tag;\n\n db_pending.put({\n _id: tagsdoc._id,\n _rev: tagsdoc._rev,\n type: \"tag\",\n tags: tagsdoc.tags,\n }, function (err, response) {\n if (err) {\n return console.log(err);\n }\n console.log(\"success\");\n });\n } else {\n tagsdoc.tags.splice(index, 1);\n db_pending.put({\n _id: tagsdoc._id,\n _rev: tagsdoc._rev,\n type: \"tag\",\n tags: tagsdoc.tags,\n }, function (err, response) {\n if (err) {\n return this.error(err);\n }\n console.log(\"successfully downvoted\");\n });\n }\n }", "function escribir(){\n db\n .collection(\"users\")\n .add({\n first: \"Pepe\",\n last: \"Perez\",\n born: 1815\n })\n .then(function(docRef) {\n console.log(\"Document written with ID: \", docRef.id);\n })\n .catch(function(error) {\n console.error(\"Error adding document: \", error);\n });\n}", "function updateDocument(docId, words) {\n return Promise.resolve()\n .then(() => {\n return this.wordIndex_removeDocument(docId);\n }).then(() => {\n return this.wordIndex_addDocument(docId, words);\n });\n}", "function AddSymbolToDoc (symbol,doc,exist) {\n if (!exist)\n {\n var symbolChildren = symbol.children()\n for (var i = 0; i < symbolChildren.count(); i++)\n {\n\t\t\tvar matchedSymbol = getMatchSymbolInDoc(symbol.children()[i],doc)\n\t\t\tlog (\"🛑 \" + matchedSymbol)\n if (symbol.children()[i].class() == MSSymbolInstance && matchedSymbol == -1)\n {\n AddSymbolToDoc(symbol.children()[i].symbolMaster(),doc,false)\n }\n\t\t\telse if (symbol.children()[i].class() == MSSymbolInstance){\n\t\t\t\tsymbol.children()[i].changeInstanceToSymbol(matchedSymbol)\n\t\t\t}\n }\n var frameX = JSON.parse(JSON.stringify(symbol.frame().x()))\n var frameY = JSON.parse(JSON.stringify(symbol.frame().y()))\n doc.addSymbolMaster(symbol)\n symbol.frame().setX(frameX)\n symbol.frame().setY(frameY)\n //copiedSymbols[symbol]=1\n }\n}", "addDoc(){\n \n let dname = readline.question('\\nEnter Doctor name : ');\n let specialization = readline.question('Enter patient Speciality : ');\n let availability = readline.question('Enter availability Type \"AM\", \"PM\" or \"Both : ');\n \n var doctor = {\n \"DoctorName\" :dname,\n \"DocID\" :this.docid,\n \"Specialization\" : specialization,\n \"Availability\" : availability\n }\n this.dfile.Doctors.push(doctor);\n this.saveDocData();\n }", "function AddNewPageToDoc(name,doc){\n var tempPage = MSPage.new();\n doc.addPage(tempPage);\n tempPage.setName(name);\n}", "function resetIndex() {\n PropertiesService.getDocumentProperties().setProperty(\"last\", 1);\n}", "function addNode(token, docId, child) {\n\t\tvar getter = me.store.get(token);\n\t\t\n\t\tgetter.onsuccess = function(evt) {\n\t\t\tvar node = evt.target.result || { prefix: token };\n\t\t\tvar insert = false;\n\t\t\t\n\t\t\tif (child) {\n\t\t\t\t// It’s an internal node!\n\t\t\t\t// Children: Characters that could follow\n\t\t\t\tnode.children = node.children || [];\n\t\t\t\t\n\t\t\t\tif (node.children.indexOf(child) === -1) {\n\t\t\t\t\tnode.children.push(child);\n\t\t\t\t\tinsert = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// DocIds: Documents that contain this word *as a whole token*\n\t\t\t\t// Notice that the same document cannot add both docIds and\n\t\t\t\t// children to the same node, by definition of what these are.\n\t\t\t\tnode.docIds = node.docIds || [];\n\t\t\t\t\n\t\t\t\tif (node.docIds.indexOf(docId) === -1) {\n\t\t\t\t\tnode.docIds.push(docId);\n\t\t\t\t\tinsert = true;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tif (insert) {\n\t\t\t\tvar insertion = me.store.put(node);\n\t\t\t\t\n\t\t\t\t// TODO retry or something\n\t\t\t\tinsertion.onerror = me.onerror;\n\t\t\t}\n\t\t};\n\t\t\n\t\tgetter.onerror = me.onerror;\n\t}", "async addDocument(_, { input: { doc, owner } }, { generalInfo }) {\n const document = { doc }\n const { insertedId } = await generalInfo.insertOne(document)\n document._id = insertedId\n\n return document\n }", "add(collection, obj) {\n this.db.get(collection).push(obj).last().value();\n }", "function addNewDocument(data) {\n db.collection(\"notes\")\n .add(data)\n .then(function (doc) {\n // console.log(doc);\n console.log(\"Note added successfully\");\n })\n .catch(function (error) {\n console.log(error);\n });\n}", "add(op) {\r\n this.dirty();\r\n this._paths.push(op);\r\n return this.lastIndex;\r\n }", "pushDataToDocument(collection, element, query, cb) {\n\t\tif (!query) return (cb('Please provide a query (must be json object).'));\n\t\tif (query._id && !(query._id = this.toObjectId(query._id))) return (cb('Please provide a valid id.'));\n\t\tthis.mdb.collection(collection).findOneAndUpdate(element, {$push : query}, {returnOriginal : false}, (err, inserted) => {\n\t\t\tif (err) return (cb(err));\n\t\t\treturn (cb(null, inserted));\n\t\t});\n\t}", "parseDocument(doc) {\n // split the document to words\n const words = normalize(doc);\n // process each word individually\n words.map(word => {\n if (this.stopWords.find(stopWord => word === stopWord) !== undefined) {\n\t // do nothing, it's a stop word, and it doesn't add any meaning\n } else if (this.dictionary[word] !== undefined) {\n this.dictionary[word].push(this.documentCount)\n } else {\n this.dictionary[word] = [this.documentCount];\n\t\t\t}\n })\n this.documentCount++\n this.docs.push(doc)\n }", "async commit(req) {\n\t\t\tconst store = this.requestIdToStore.get(req.id);\n\t\t\tif (store !== undefined) {\n\t\t\t\tconst indexPath = this.getStoreIndexPath(store.storeId);\n\t\t\t\tawait indexPath.writeFile(\n\t\t\t\t\t___R$project$rome$$internal$codec$config$index_ts$json.stringify(\n\t\t\t\t\t\tstore.index,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\tthis.logger.info(\n\t\t\t\t\t___R$project$rome$$internal$markup$escape_ts$markup`Committed store index to <emphasis>${indexPath}</emphasis>`,\n\t\t\t\t);\n\t\t\t}\n\t\t}", "updateIndex(updatedIndex) {\n return new Promise((resolve, reject) => {\n indexFile.update({'term': updatedIndex.term}, {updatedIndex}, (err, result) => {\n if (err) reject(err);\n else resolve(result);\n });\n })\n }", "function postToES(doc, index) {\n log.debug('postToES(doc):', doc);\n\n return new Promise((resolve, reject) => {\n const req = new AWS.HttpRequest(endpoint);\n\n req.method = 'POST';\n req.path =\n path.join('/', esDomain.index, 'doc', hash(doc, 'hex'));\n req.region = esDomain.region;\n req.headers['presigned-expires'] = false;\n req.headers.Host = endpoint.host;\n req.headers['Content-Type'] = 'application/json';\n req.body = doc;\n\n const signer = new AWS.Signers.V4(req, 'es'); // es: service code\n signer.addAuthorization(creds, new Date());\n\n const nodeHttpClient = new AWS.NodeHttpClient();\n nodeHttpClient.handleRequest(req, null, (httpResp) => {\n let respBody = '';\n httpResp.on('data', (chunk) => {\n respBody += chunk;\n });\n httpResp.on('end', () => {\n log.debug('response:', respBody);\n // context.succeed('Lambda added document ' + doc);\n resolve(respBody);\n });\n }, reject);\n });\n }", "save () {\n this._enqueue(this._hits)\n this._hits.length = 0\n return this\n }", "function saveDoc(doc){\n var db = $.couch.db(\"media\");\n db.saveDoc(doc, {\n success: function (response, textStatus, jqXHR) {\n console.log(response);\n },\n error: function (jqXHR, textStatus, errorThrown) {\n console.log(errorThrown)\n }\n })\n}", "function createDoc(callback) {\n var connection = backend.connect();\n var doc = connection.get('examples', 'counter');\n doc.fetch(function(err) {\n if (err) throw err;\n if (doc.type === null) {\n doc.create({numClicks: 0}, json1.type.uri, callback);\n return;\n }\n callback();\n });\n}", "function put(doc){\n return $q.when(db.put(doc));\n }", "parseDocument(doc) {\n // split the document to words\n const words = normalize(doc);\n // process each word individually\n words.map(word => {\n if (this.stopWords.find(stopWord => word === stopWord) !== undefined) {\n // do nothing, it's a stop word, and it doesn't add any meaning\n } else if (this.dictionary[word] !== undefined) {\n this.dictionary[word].push(this.documentCount)\n } else {\n this.dictionary[word] = [this.documentCount];\n }\n })\n this.documentCount++\n this.docs.push(doc)\n }", "function addElem(batch, elem) {\n let baseRef = db.collection('locations');\n let docRef = baseRef.doc(elem.osm_id.split('/')[1]);\n const lat = parseFloat(elem.lat); const lon = parseFloat(elem.lon);\n elem.location = { geopoint: new admin.firestore.GeoPoint(lat, lon), geohash: geohash.encode(lat, lon) }\n console.log(\"Seeting\", elem.osm_id.split('/')[1], elem);\n // docRef.set(elem);\n batch.set(docRef, elem);\n}", "insert(val, idx) {\n\n }", "function editUnindexed(docid) {\n\t\t\tvar doc = _.find(self.unindexedList.data, function (dc) {\n\t\t\t\tif (dc.id == docid) {\n\t\t\t\t\tdc.editable = 1;\n\t\t\t\t}\n\t\t\t\treturn dc.id == docid;\n\t\t\t});\n\t\t\tself.editDocDetails[docid] = doc;\n\t\t}", "function saveTermsInDB(mergedArray) {\n let numOfTerms = mergedArray.length;\n for (let i = 0; i < numOfTerms; i++) {\n for (let j = 0; j < mergedArray[i].locations.length; j++) {\n mergedArray[i].locations[j].documentNumber = Number(\n mergedArray[i].locations[j].documentNumber\n );\n }\n\n Term.findOneAndUpdate(\n { word: `${mergedArray[i].term}` },\n {\n $push: { locations: mergedArray[i].locations },\n soundexCode: soundex(`${mergedArray[i].term}`)\n },\n { upsert: true, new: true }\n ).catch(err => {\n res.status(500).json(err);\n return;\n });\n }\n}", "async function addDataToElastic(){\n await Helper.deleteIdentifierURLs(config.ORIGINAL_SITEMAP);\n const [indexed_urls, indexed_fis] = await Handler.convertDataFromSitemap();\n\n // Create Elasticsearch client and an index\n /*const client = Elastic.createElasticsearchClient(config.ELASTICSEARCH_HOST);\n Elastic.createElasticsearchIndex(client, config.URL_INDEX);\n Elastic.createElasticsearchIndex(client, config.FRAGMENT_IDENTIFIER_INDEX);\n\n\n // Add data in bulk mode to Elasticsearch\n Elastic.addDataInBulkMode(client, indexed_urls, config.URL_INDEX, config.URL_TYPE);\n Elastic.addDataInBulkMode(client, indexed_fis, config.FRAGMENT_IDENTIFIER_INDEX, config.FRAGMENT_IDENTIFIER_TYPE);*/\n}", "function addToIndex (officialName) {\n if (localStorage.getItem(\"meta-index\") !== null) {\n localStorage.setItem(\"meta-index\", localStorage.getItem(\"meta-index\") + myPrefix + officialName);\n } else {\n localStorage.setItem(\"meta-index\", myPrefix + officialName);\n }\n}", "function incrementIndex()\r\n {\r\n //increment index\r\n counter += 1;\r\n // at end of array start over\r\n if (counter >= currentObjects.length)\r\n {\r\n counter = 0;\r\n }\r\n }", "function writeDocument (doc) {\n return wsk.actions.invoke({\n actionName: packageName + \"/create-document\",\n params: { \"doc\": doc },\n blocking: true,\n })\n .then(activation => {\n console.log(\"Created new document with ID \" + activation.response.result.id);\n return activation.response.result;\n })\n .catch(function (err) {\n console.log(\"Error creating document\");\n return err;\n });\n}", "function AddRoadDataRec(arr, i){\n\t\tif(i >= arr.length) return;\n\t\tvar d = arr[i];\n\t\tvar tDay = new Date(d.time);\n\t\tvar date = tDay.getFullYear()+\"_\"+(tDay.getMonth()+1)+\"_\"+tDay.getDate();\n\t\tvar RoadData = mongoose.model('RoadData_'+date, RoadDataSchema);\n\n\t\tRoadData.findOneAndUpdate({ '_id': d._id}, {'$setOnInsert': d}, {upsert: true}, function(){\n\t\t\tAddRoadDataRec(arr, i+1);\n\t\t});\n\t}", "_appendChild(collectionPath, data) {\n this.editorSession.transaction(tx => {\n const node = tx.create(data);\n documentHelpers.append(tx, collectionPath, node.id);\n });\n }" ]
[ "0.69740826", "0.6592267", "0.65395325", "0.637757", "0.6045703", "0.59954685", "0.58496463", "0.58385247", "0.5745251", "0.56949633", "0.5565368", "0.5544018", "0.5492362", "0.5484123", "0.54721063", "0.5462008", "0.5460607", "0.54494643", "0.5439872", "0.5392522", "0.53408176", "0.5318881", "0.5305128", "0.52962905", "0.52797323", "0.52772546", "0.52586794", "0.5254226", "0.5227965", "0.5227965", "0.5227965", "0.5174892", "0.51719636", "0.51686716", "0.5156057", "0.5147479", "0.51470953", "0.5144086", "0.5128844", "0.5128844", "0.5126357", "0.5125977", "0.51220804", "0.51220804", "0.51220804", "0.51220804", "0.51220804", "0.51220804", "0.51220804", "0.51174104", "0.51065236", "0.50987446", "0.5097854", "0.5090683", "0.5090586", "0.508521", "0.50839126", "0.5076794", "0.50675404", "0.5055718", "0.505561", "0.50296706", "0.5029007", "0.5021573", "0.5014894", "0.49983937", "0.49886087", "0.49852937", "0.49826056", "0.4982516", "0.49799824", "0.49785995", "0.49752203", "0.4967625", "0.4966569", "0.49655002", "0.49585444", "0.4952688", "0.4945391", "0.49329978", "0.49114165", "0.49085185", "0.49067026", "0.48957062", "0.48920164", "0.48742738", "0.48738638", "0.48614484", "0.48598975", "0.48541936", "0.4851299", "0.48475182", "0.48429528", "0.48421288", "0.4833524", "0.48291975", "0.48275048", "0.48263744", "0.48219204", "0.48210195" ]
0.7230582
0
Removes the doc at the specified index of the index
removeAt(idx){this.records.splice(idx,1);// Change ref index of every subsquent doc for(let i=idx,len=this.size();i<len;i+=1){this.records[i].i-=1;}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeAt(idx) {\n this.records.splice(idx, 1)\n\n // Change ref index of every subsquent doc\n for (let i = idx, len = this.size(); i < len; i += 1) {\n this.records[i].i -= 1\n }\n }", "deleteAt(index) {}", "remove(idx) { \n\n }", "removeAt(idx) {\n\n }", "remove(index){\n this.array[index].body.remove();\n this.array.splice(index,1);\n }", "deleteIndex() {\n return client.indices.delete({ index: this.indexName });\n }", "function removeIndex(array, index) {\n array.splice(index, 1);\n}", "del(index) {\n this.list.splice(index, 1);\n this.setSlist(this.list);\n }", "function delTodo($index) {\n \tself.todoList.splice($index, 1);\n }", "removeItem(index) {\n\t\tthis.model.splice(index, 1);\n\t}", "function removeBookInArray(index) {\n myLibrary.splice(index, 1);\n}", "function removeAt(arr, idx) {\n\n }", "function deleteTodo($index){\n\t\t\tself.todoList.splice($index, 1);\n\t\t}", "function deleteTodo($index){\n\t\t\tself.todoList.splice($index, 1);\n\t\t}", "function deleteTodo($index){\n self.todoList.splice($index, 1);\n }", "function removeOptionByUsingIndex(index, callback) {\r\n\r\n _data.optionsText.splice(index, 1);\r\n\r\n this.callback(callback, _data);\r\n }", "function removeFromIndex(obj) {\n\t\t\tvar objKey, item, keys, j, key, indexItem;\n\t\t\t// Find the item to delete\n\t\t\tobjKey = obj.bob.index.call(obj).uid;\n\t\t\titem = items[objKey];\n\t\t\tkeys = item.keys;\n\t\t\t// Iterate through all the keys and remove the item from each of them\n\t\t\tfor (j = 0; j < keys.length; j = j + 1) {\n\t\t\t\tkey = keys[j];\n\t\t\t\tindexItem = index[key];\n\t\t\t\tif (indexItem) {\n\t\t\t\t\tdelete indexItem[objKey];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn obj;\n\t\t}", "function removeItem(array, index) {\n\tif (index > -1) {\n\t\t// console.log(\"index: \" + index + \", word: \" + array[index] + \" removed.\");\n\t\tarray.splice(index, 1);\n\t}\n}", "function remove(index) {\n\t\t\tthis._items.splice(index, 1);\n\t\t}", "deleteElement(index) {\n this._ensureUnpacked();\n if (this.unpackedArray) {\n if (this._objType.collectionType == constants.TNS_OBJ_VARRAY) {\n errors.throwErr(errors.ERR_DELETE_ELEMENTS_OF_VARRAY);\n }\n this.unpackedArray.splice(index, 1);\n } else {\n this._unpackedAssocKeys = undefined;\n this.unpackedAssocArray.delete(index);\n }\n }", "remove(index) {\n if (index < 0 || index >= this.length) {\n throw new Error(\"Index error\");\n }\n memory.copy(\n this.ptr + index,\n this.ptr + index + 1,\n this.length - index - 1\n );\n this.length--;\n }", "function remove(index) {\n\n dialogs.confirm('Confirm!!!', 'Do you want to remove this section?',\n {size: 'sm', windowClass: 'ods-dialog'}).result.then(function () {\n $scope.schema.layout.splice(index, 1);\n });\n }", "function deleteFromMetaFile(index) {\n files_meta = deleteElementFromJSON(files_meta, '_'+index);\n}", "function deleteTodo(index) {\n todos.splice(index, 1);\n displayTodos();\n}", "deleteFile(index) {\n //this.matrixData[this.position[0]][this.position[1]].musicfiles.splice(index, 1);\n }", "remove(index) {\n // If the index argument is out of bounds\n if (index < 0 || index >= this.length) {\n // Throw an error if invalid index\n throw new Error('Index error');\n }\n // Move the array in memory to accomodate the removed item\n memory.copy(this.ptr + index, this.ptr + index + 1, this.length - index - 1);\n // Decrease our array's length\n this.length--;\n }", "delete(index) {\n if (index === undefined) throw new Error('Missing parameter');\n if ((typeof index !== 'number')) throw new Error('index must be a number');\n if (index < 0 || index > this.size - 1) throw new Error('index must be a number between 0 and array lenght');\n const removedElement = this.#array[index];\n this.#array[index] = null;\n return { removedElement, newArray: this.#array };\n }", "remove(index){\n const leader = this.traverseToIndex(index-1)\n const unwantedNode = leader.next;\n leader.next = unwantedNode.next;\n this.length --;\n }", "remove(index = -1) {\n if (index == -1)\n index = this.length - 1;\n this.viewManager.destroyViewInContainer(this.element, index);\n // view is intentionally not returned to the client.\n }", "remove(index = -1) {\n if (index == -1)\n index = this.length - 1;\n this.viewManager.destroyViewInContainer(this.element, index);\n // view is intentionally not returned to the client.\n }", "function deleteSubmissionByIndex(array, index) {\n array.splice(index, 1);\n}", "removeEntity(index) {\n this.entities.splice(index, 1)\n }", "function deleteSubmissionByIndex(array, index) {\n array.splice(index, 1);\n\n}", "function deletecontact(index) {\n contacts.splice(index, 1);\n}", "function deleteSubmissionByIndex(array, index) { \narray.splice(index,1)\n}", "removeAt(index) {\n if (!this.head) {\n return;\n }\n \n if (index === 0) {\n // Remove the first node when the index is 0\n this.head = this.head.next;\n }\n\n const previous = this.getAt(index - 1);\n // Check if the index is out of bounds \n if (!previous || !previous.next) {\n return;\n }\n\n previous.next = previous.next.next;\n }", "function removeIndex(array, index) {\r\n return array.filter(function (_, i) { return index !== i; });\r\n}", "function removeIndex(array, index) {\r\n return array.filter(function (_, i) { return index !== i; });\r\n}", "removeFromIndex(index) \n { \n if (index > 0 && index > this.size) \n return -1; \n else { \n var current, previous, iterator = 0; \n current = this.head; \n previous = current; \n\n // deleting first element \n if (index === 0) { \n this.head = current.next; \n } else { \n while (iterator < index) { \n iterator++; \n previous = current; \n current = current.next; \n } \n previous.next = current.next; \n } \n this.size--; \n return current.element; \n } \n }", "removeOnIndex(index) {\n if (index < 0) {\n console.error(`Index must be greater than 0!`);\n return false;\n }\n\n index = index = Math.floor(index);\n\n if (this.length < index) {\n this.remove();\n } else {\n for (let i = index; i < this.length; i++) {\n this.data[i] = this.data[i + 1];\n }\n\n delete this.data[this.length - 1];\n this.length--;\n }\n }", "removeToDo(indexToDo) {\n this.todos.splice(indexToDo, 1);\n }", "function removeIndex(array, index) {\n return array.filter(function (_, i) { return index !== i; });\n}", "function removeIndex(array, index) {\n return array.filter(function (_, i) { return index !== i; });\n}", "function removeIndex(array, index) {\n return array.filter(function (_, i) { return index !== i; });\n}", "function removeIndex(array, index) {\n return array.filter(function (_, i) { return index !== i; });\n}", "delete(req, res) {\n const { index } = req.params\n \n if (!isValidIndex(index)) {\n return res.status(HTTP_NOT_FOUND).send()\n }\n\n const deletedResource = simpleDatabase.splice(index, 1)[0]\n\n return res.status(HTTP_OK).json(deletedResource)\n }", "function remove(index, data) {\n const id = data._id;\n arr.splice(index, 1);\n localStorage.setItem(\"items\", JSON.stringify(arr));\n fetch(`/delete/${id}`, {\n method: \"DELETE\"\n });\n}", "removeTag(index) {\n this.funnelData.addedTags.splice(index, 1);\n this.clearInputTag();\n\n\n }", "function removeBookFromLibrary(index, library = myLibrary) {\n\n myLibrary.splice(index, 1)\n render(myLibrary)\n}", "remove(index) {\n if (index < 0 || index > this.size || this.head === null) {\n console.log(\"Invalid index\");\n return;\n }\n\n if (index === 0) {\n console.log(`${this.head.data} deleted`);\n this.head = this.head.next;\n } else {\n let cur = this.head;\n while (index != 1) {\n cur = cur.next;\n }\n console.log(`${cur.next.data} deleted`);\n cur.next = cur.next.next;\n }\n }", "remove(idx) {\n\t\treturn this._do(idx, (i)=>this.ledger.removeItem(i));\n\t}", "removeItem(index) {\n\t\tthis.company.checklist.splice(index, 1);\n\t}", "removeItem(index) {\n this.items.splice(index, 1)\n }", "function deleteContact(index) {\n vm.contacts.splice(index, 1);\n }", "deleteAt(index) {\n if (index >= 0 && index < this.contacts.length) {\n this.contacts.splice(index, 1);\n } else {\n console.log(\"Invalid index.\");\n }\n }", "_removeFromIndex(index0, key0, key1, key2) {\n // Remove the quad from the index\n const index1 = index0[key0],\n index2 = index1[key1];\n delete index2[key2];\n\n // Remove intermediary index layers if they are empty\n for (const key in index2) return;\n delete index1[key1];\n for (const key in index1) return;\n delete index0[key0];\n }", "remove(index) {\n if(index < 0 || index >= this.length) {\n throw new Error('Index error')\n }\n memory.copy(this.ptr + index, this.ptr + index + 1, this.length - index - 1)\n }", "function removeItem(index){\n \n items.splice(index, 1);\n\n removeItemFromJSON(\"http://localhost:8000/index.php\", index);\n\n render();\n}", "async function removeIndex() {\n iLog('Deleting Index files.');\n try {\n const contents = fs.readdirSync(`./${ipfs.host}/`);\n for (i in contents) {\n if (contents[i][0] === 'i' && !fs.statSync(`./${ipfs.host}/${contents[i]}`).isDirectory()) {\n await fs.unlinkSync(`./${ipfs.host}/${contents[i]}`);\n }\n }\n } catch(e) { iLog(e); }\n}", "function deleteTask(index) {\n const ERR_MESS_INDEX = \"TODO: Bad Index number\";\n var mess = (index + 1) + \" x \" + \"DATE HERE \" + todocl.textArr[index];\n\n if (todocl.textArr[index] !== undefined &&\n todocl.textArr[index] !== null &&\n todocl.textArr !== null) {\n\n todocl.textArr.splice(index, 1);\n\n setText(todocl.textArr,\n function (callBack) {\n if (callBack) {\n writeFile();\n }\n });\n todocl.out.innerHTML = mess + '\\n' + \"TODO: \" +\n (index + 1) + \" marked as done.\";\n } else {\n todocl.out.innerHTML = ERR_MESS_INDEX;\n }\n }", "removeAtIndex(index, clearSelection = true) {\n if (this.options.removable && !isNaN(index) && index >= 0 && index < this.items.length) {\n const tag = Array.from(this.container.children).filter(child => child.classList.contains('tag'))[index];\n const item = this.items[index];\n\n if (this.emit('before.remove', item)) {\n if (clearSelection) {\n this.clearSelection();\n }\n\n if (tag) {\n tag.remove();\n }\n\n // If original input is a select element\n // then deselect related option\n if (this._isSelect) {\n this.element.options[index].selected = false;\n }\n\n if (this._selected == index) {\n this._selected = -1;\n } else if (this._selected >= 0) {\n // One item less so selected index is \n this._selected -= 1;\n }\n\n this.items.splice(index, 1);\n\n this._filterDropdownItems();\n\n this._propagateChange();\n\n this.emit('after.remove', item);\n }\n }\n\n return this;\n }", "removeFrom(index) {\n if (index > 0 && index > this.size)\n return -1;\n else {\n var curr, prev, iterator = 0;\n curr = this.head;\n prev = curr;\n\n // deleting first element \n if (index === 0) {\n this.head = curr.next;\n } else {\n // iterate over the list to the \n // position to removce an element \n while (iterator < index) {\n iterator++;\n prev = curr;\n curr = curr.next;\n }\n\n // remove the element \n prev.next = curr.next;\n }\n this.size--;\n\n // return the remove element \n return curr.data;\n }\n }", "arrayRemoveItemByIndex(array, index) {\n return array.filter((el, i) => index !== i);\n }", "function deleteAnswerByIndex(pIndex) {\n deleteAnswerFromLocalStorage(pIndex)\n //2. quitarlo de la tabla\n deleteAnswerFromTable(pIndex)\n\n}", "function deleteAssetType(index) {\n\tvar nbAssetType = $(namespaceAUI + 'nbAssetType').val();\n\n\t$('#assetType' + index).closest('.card-horizontal').remove();\n\n // MaJ des critères de recherche et du regroupement\n updateVocabularyAndGroupBy();\n\n\t// on ajuste le nb d'assetType\n\t$(namespaceAUI + 'nbAssetType').val(parseInt(nbAssetType) - 1);\n}", "function removeElement(index) {\n\tobjects.splice(index, 1);\n\treturn objects;\n}", "function removeBook(e) {\n let i = document.getElementById('selected-book').dataset.index\n let div = document.querySelector(`div[data-index='${i}']`)\n\n div.remove();\n updateIndexAttributes(i)\n library.splice(i, 1)\n exitWindows() \n}", "function deleteIndex() {\n return elasticClient.indices.delete({\n index: indexName\n });\n}", "function remove(title) {\n\tideas.doc(title)\n\t\t.delete()\n\t\t.catch(err => {\n\t\t\tconsole.error('REMOVE', err)\n\t\t});\n}", "_removeFromIndex(index0, key0, key1, key2) {\n // Remove the quad from the index\n var index1 = index0[key0],\n index2 = index1[key1],\n key;\n delete index2[key2]; // Remove intermediary index layers if they are empty\n\n for (key in index2) return;\n\n delete index1[key1];\n\n for (key in index1) return;\n\n delete index0[key0];\n }", "async function deleteIndex() {\n // Check if the index exists\n if (await indexExists()) {\n let resp = await client.indices.delete({ index }).catch((err) => {\n console.log(err);\n });\n console.log(\"Deleted Index: \" + index);\n } else {\n console.log(\"Index: \" + index + \" does not exist\");\n }\n}", "function removeRow(array, index) {\n array.splice(index, 1);\n }", "function deleteIndex() {\n return elasticClient.indices.delete({\n index: indexName\n });\n}", "function removeAt(arr, index) {\n arr.splice(index, 1);\n console.log(arr);\n}", "remove(arr, index) {\n\n let new_arr = arr.filter(function (val, i) {\n return i != index;\n });\n\n return new_arr;\n }", "removeGenome(index) {\n\t\t\tthis.population.splice(index, 1);\n\t\t}", "function domClear(el, index) {\n var nodes = el.childNodes,\n curr = nodes.length;\n while (curr > index) el.removeChild(nodes[--curr]);\n return el;\n }", "function deleteReportAtIndex(index) {\n var reportCache = findOrCreateReportCache();\n reportCache.splice(index, 1);\n\n return saveReportCache(reportCache);\n }", "_removeFromIndex (index0, key0, key1, key2) {\n // Remove the quad from the index\n const index1 = index0[key0]\n const index2 = index1[key1]\n delete index2[key2]\n\n // Remove intermediary index layers if they are empty\n for (const key in index2) { // eslint-disable-line no-unreachable-loop\n return\n }\n\n delete index1[key1]\n\n for (const key in index1) { // eslint-disable-line no-unreachable-loop\n return\n }\n\n delete index0[key0]\n }", "function deleteFromBIGArray(index){\n BIGArray.splice(index, 1);\n console.log(BIGArray);\n }", "removeAt(index, options = {}) {\n if (this.controls[index]) this.controls[index]._registerOnCollectionChange(() => {});\n this.controls.splice(index, 1);\n this.updateValueAndValidity({\n emitEvent: options.emitEvent\n });\n }", "function removeToDo(index){ \n dispatch(removeTodo(index));\n }", "function removePost(arr,index){\n\tdocument.getElementById(\"posts\").removeChild(arr[index]);\n\treturn true;\n}", "remove(index) {\n const that = this;\n\n if (index instanceof JQX.SplitterItem && index.closest('jqx-splitter') === that) {\n that.removeChild(index);\n return;\n }\n\n if (typeof index !== 'number') {\n that.error(that.localize('invalidIndex', { elementType: that.nodeName.toLowerCase(), method: 'remove' }));\n return;\n }\n\n if (index > that._items.length || index < 0) {\n that.error(that.localize('indexOutOfBound', { elementType: that.nodeName.toLowerCase(), method: 'remove' }));\n return;\n }\n\n that.removeChild(that._items[index]);\n }", "function removeElementFromList(index) {\n if (index > -1) {\n vm.catalogElements.splice(index, 1);\n }\n else {\n $log.error('@CatalogManager, function @removeElementFromList: the index ${index} provided is invalid');\n }\n }", "remove(index){\n// check the param\n\nconst leader = this.traverseToIndex(index-1);\nconst unwamtedNode = leader.next;\nleader.next = unwamtedNode.next;\nthis.length--;\n\n\n}", "function removeRow(index) {\n\n dialogs.confirm('Confirm!!!', 'Do you want to remove this row?',\n {size: 'sm', windowClass: 'ods-dialog'}).result.then(function () {\n\n $scope.section.rows.splice(index, 1);\n });\n }", "function domClear(el, index) {\n var nodes = el.childNodes,\n curr = nodes.length;\n while (curr > index) el.removeChild(nodes[--curr]);\n return el;\n}", "function domClear(el, index) {\n var nodes = el.childNodes,\n curr = nodes.length;\n while (curr > index) el.removeChild(nodes[--curr]);\n return el;\n}", "deleteSnippet(index = -1) {\n const numSnippets = this._snippets.length;\n if (index < 0 || index > numSnippets) {\n this._snippets.pop();\n }\n else {\n // Update list\n for (let i = index + 1; i < numSnippets; i++) {\n this._snippets[i].id = this._snippets[i].id - 1;\n }\n this._snippets.splice(index, 1);\n }\n }", "removeAt(index) {\n if (this.controls[index])\n this.controls[index]._registerOnCollectionChange(() => { });\n this.controls.splice(index, 1);\n this.updateValueAndValidity();\n }", "removeAt(index) {\n if (this.controls[index])\n this.controls[index]._registerOnCollectionChange(() => { });\n this.controls.splice(index, 1);\n this.updateValueAndValidity();\n }", "removeAt(index) {\n if (this.controls[index])\n this.controls[index]._registerOnCollectionChange(() => { });\n this.controls.splice(index, 1);\n this.updateValueAndValidity();\n }", "removeAt(index) {\n if (this.controls[index])\n this.controls[index]._registerOnCollectionChange(() => { });\n this.controls.splice(index, 1);\n this.updateValueAndValidity();\n }", "removeAt(index) {\n if (this.controls[index])\n this.controls[index]._registerOnCollectionChange(() => { });\n this.controls.splice(index, 1);\n this.updateValueAndValidity();\n }", "removeAt(index) {\n if (this.controls[index])\n this.controls[index]._registerOnCollectionChange(() => { });\n this.controls.splice(index, 1);\n this.updateValueAndValidity();\n }", "removeAt(index) {\n if (this.controls[index])\n this.controls[index]._registerOnCollectionChange(() => { });\n this.controls.splice(index, 1);\n this.updateValueAndValidity();\n }", "function delInd(index) {\n happyRef.child(index).remove();\n happyRef.get().then(function (snapshot) {\n if (snapshot.exists()) {\n starterCheer = snapshot.val();\n }\n else {\n console.log(\"No data available\");\n }\n }).catch(function (error) {\n console.error(error);\n });\n}", "static async deleteAtLatest(index) {\n\n logEntryModification(OP_TYPES.DELETE, index)\n\n const existingEntry = await this.findByIndexAtRevision(index)\n if (existingEntry) {\n await this.remove({ index: existingEntry.index, _revisionIndex: getLatestRevisionIndex() })\n await (new this({ index, _deleted: true })).save()\n }\n\n return existingEntry\n\n }", "function EliminarFila(index) {\n $(\"#fila\" + index).remove();\n}" ]
[ "0.7543374", "0.7021943", "0.67737806", "0.66889304", "0.6623647", "0.65367955", "0.6502412", "0.64897454", "0.6451316", "0.64288545", "0.6364492", "0.6363058", "0.63563263", "0.63563263", "0.63545173", "0.63478565", "0.63455224", "0.63081074", "0.62757295", "0.62371767", "0.62336004", "0.62163305", "0.62113935", "0.62082237", "0.61810476", "0.61535555", "0.6138442", "0.61315167", "0.61300796", "0.61300796", "0.61284137", "0.61255616", "0.61011034", "0.6094801", "0.6081864", "0.60762894", "0.6056329", "0.6056329", "0.60540867", "0.605296", "0.603582", "0.6033988", "0.6033988", "0.6033988", "0.6033988", "0.6031821", "0.6022918", "0.6001406", "0.59903926", "0.598675", "0.59778893", "0.59662026", "0.5965241", "0.5938586", "0.59275323", "0.59248394", "0.59237957", "0.59166735", "0.59155464", "0.58953136", "0.586876", "0.58676594", "0.5866744", "0.58478373", "0.583128", "0.5822896", "0.5822754", "0.58198154", "0.5811835", "0.5808601", "0.5801566", "0.579663", "0.5782061", "0.5780683", "0.57785434", "0.5772095", "0.5768754", "0.57670015", "0.5766817", "0.57520956", "0.5751879", "0.5745384", "0.5723637", "0.5723027", "0.57197464", "0.5718865", "0.57178915", "0.57108045", "0.57108045", "0.57107866", "0.57100624", "0.57100624", "0.57100624", "0.57100624", "0.57100624", "0.57100624", "0.57100624", "0.56913996", "0.56807214", "0.5673791" ]
0.6567226
5
Return a 2D array representation of the query, for simpler parsing. Example: "^core go$ | rb$ | py$ xy$" => [["^core", "go$"], ["rb$"], ["py$", "xy$"]]
function parseQuery(pattern,options={}){return pattern.split(OR_TOKEN).map(item=>{let query=item.trim().split(SPACE_RE).filter(item=>item&&!!item.trim());let results=[];for(let i=0,len=query.length;i<len;i+=1){const queryItem=query[i];// 1. Handle multiple query match (i.e, once that are quoted, like `"hello world"`) let found=false;let idx=-1;while(!found&&++idx<searchersLen){const searcher=searchers[idx];let token=searcher.isMultiMatch(queryItem);if(token){results.push(new searcher(token,options));found=true;}}if(found){continue;}// 2. Handle single query matches (i.e, once that are *not* quoted) idx=-1;while(++idx<searchersLen){const searcher=searchers[idx];let token=searcher.isSingleMatch(queryItem);if(token){results.push(new searcher(token,options));break;}}}return results;});}// These extended matchers can return an array of matches, as opposed
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildArray(formula) {\n // replace true and false with 0 and 1 for parsing\n formula = formula.replace(/false/g, \"0\").replace(/true/g, \"1\");\n // remove spaces and convert to array\n return formula.replace(/\\s/g, '').split('');\n}", "function split(query) {\n words = query.match(/\"([^\"]|\\\")*\"|([^ \"]+(\"([^\"]|\\\\\")*\")*)+/g) || [];\n words = words.map(function(word) {\n return word.replace(/([^\\\\]|^)\"/g, '$1');\n });\n words = words.map(function(word) {\n return word.replace(/\\\\\"/g, '\"');\n });\n return words;\n }", "function arrayifyQuery(query) {\n return [query.sql, escapeForAndroid(query.args || [])];\n}", "function queriesToArray(syntax) {\n var collection,\n data = parseSyntax(syntax);\n\n if (data) {\n collection = toArray(data);\n } else {\n console.log(\"Invalid query identifier(s)!\");\n }\n\n return collection;\n }", "function get_selector_array(selector) {\n\n var selectorArray = [];\n\n // Clean\n selector = $.trim(selector);\n\n // Clean multispaces\n selector = selector.replace(/\\s\\s+/g, ' ');\n\n // Clean spaces before \">,+,~\" and after\n selector = selector.replace(/(\\s)?(\\>|\\,|\\+|\\~)(\\s)?/g, '$2');\n\n // Convert > to space\n selector = selector.replace(/\\>/g, ' ');\n\n selector = $.trim(selector);\n\n // Check if still there have another selector\n if (selector.indexOf(\" \") != -1) {\n\n // Split with space\n $.each(selector.split(\" \"), function (i, v) {\n\n // Clean\n v = $.trim(v);\n\n // Push\n selectorArray.push(v);\n\n });\n\n } else {\n\n // Push if single.\n selectorArray.push(selector);\n\n }\n\n var selectorArrayNew = [];\n\n // Add spaces again\n $.each(selectorArray, function (i, v) {\n selectorArrayNew.push(v.replace(/\\~/g, ' ~ ').replace(/\\+/g, ' + '));\n });\n\n return selectorArrayNew;\n\n }", "_toArray(grammar) {\n if (Array.isArray(grammar)) {\n return grammar;\n }\n\n return grammar\n .split('\\n')\n .filter(production => !!production.trim());\n }", "function parseAndOr(query) {\n var Sub = [];\n \n if (query.includes('\"')) {\n for(var tmp of query.split(/(\\s?\"(?:[^\"\\\\]|\\\\.)*\")\\s?/)) {\n tmp = tmp.trim();\n tmp = tmp.replace(/^\"/, \"\");\n tmp = tmp.replace(/\"$/, \"\");\n \n if (tmp != \"\")\n Sub.push(tmp);\n } \n } else Sub.push(query);\n \n return Sub;\n }", "function getTerms(query) {\n\treturn query.split(\" AND \");\n}", "function string_to_array(input) {\n return input.trim().split(/\\s+/);\n}", "function parse (input) {\n\tvar output = [];\n\tinput = input.trim();\n\tinput = input.split(\" \");\n\n\tfor (var i = 0; i < input.length; i++) {\n\t\tif (input[i].charAt(0) == \"[\") {\n\t\t\toutput.push(input[i].slice(1,3));\n\t\t};\n\t};\n\n\treturn output;\n}", "function makeArray(input_data) {\n var data_array = [];\n var data_string = input_data.asText(); //converts CSnap list object to a text string\n for (var i = 0; i < data_string.length; i++) {\n var val = \"\";\n while(data_string[i] !== \",\" && i < data_string.length) { //read through variable-length values until I hit a comma\n val += data_string[i];\n i++;\n }\n\n if(val !== \"\") {\n data_array.push(val);\n }\n }\n return data_array;\n }", "function assembleQuery(){\n var groups = searchGroups.children(\".search-group\");\n var groupQueries = [];\n\n for(var group = 0; group < groups.length; group++){\n var inputFields = groups[group].querySelectorAll(\"input[type=text]\");\n var regexCheckbox = groups[group].querySelectorAll(\"input[name=regex]\");\n var groupQuery = [];\n\n for(var field = 0; field < inputFields.length; field++)\n if(inputFields[field].value.length > 0)\n groupQuery.push(genFieldQueryString(\n inputFields[field], regexCheckbox[field].checked));\n\n if(groupQuery.length > 0)\n groupQueries.push(groupQuery.join(\" AND \"));\n }\n\n return groupQueries.join(\" OR \");\n}", "function tokenize (query) {\n return query.trim().split(/\\s+/)\n}", "function return2DArray(s) {\n var firstIndex = s.indexOf('{');\n var lastIndex = s.lastIndexOf('}');\n var str = s.substring(firstIndex+1, lastIndex);\n var temp = '';\n var a;\n var arr = [];\n var open_index = 0, close_index = 0;\n for(var i=0; i<str.length; i++) {\n if(str.charAt(i) == '{') {\n open_index = i;\n temp = temp + str.charAt(i);\n }\n else if(str.charAt(i) == '}') {\n close_index = i;\n temp = temp + str.charAt(i);\n a = returnArray(temp);\n arr.push(a);\n temp = '';\n }\n else {\n temp = temp + str.charAt(i);\n }\n }\n return arr;\n}", "function createArrayFromPhrase(phrase) {\n const splitPhrase = phrase.split(' ');\n const thirdWord = splitPhrase.pop();\n return [splitPhrase.join(' '), thirdWord];\n}", "function unserialize_array_2d(str) {\n// {{{\n\tvar arr1 = str.split('|');\n\tvar arr = new Array();\n\tfor (var i = 0; i < arr1.length; ++i) {\n\t\tarr[i] = arr1[i].split(',');\n\t}\n\treturn arr;\n// }}}\n}", "function buildArrayOnIndex(value){\n\tif(value.toString().includes(\" \"))\n\t\treturn value.split(\" \");\n\telse\n\t\treturn [value];\n}", "function getMatrixArr(side){\n var temp;\n var inputLength = $(\"#inputText\").val();\n var result = getEmpyMatrix(inputLength);\n for(var i = 0; i < inputLength; i++){\n for(var j = 0; j < inputLength; j++){\n temp=$(\"#\" + side + i + j).val();\n result[i].push(temp);\n }\n }\n return result;\n }", "function splitQueries(queries) {\n return queries.map(query => query.split(','))\n .reduce((a1, a2) => a1.concat(a2))\n .map(query => query.trim());\n}", "function separate(expression){\n var tempArray=[], finalArray=[];\n for(var i = 0; i < expression.length; i++){\n if(symbols.indexOf(expression[i]) != -1){//is a symbol\n if(tempArray.length != 0){ // if temp array is not empty, make the temp array into a string and push into final array\n var a=tempArray.join('');\n finalArray.push(a);\n tempArray = [];\n }\n finalArray.push(expression[i]);\n }else{\n tempArray.push(expression[i]);\n }\n }\n if(tempArray.length > 0){\n var a = tempArray.join('');\n finalArray.push(a);\n }\n // console.log(finalArray);\n return finalArray;\n }", "function splitQueries(queries) {\n return queries.map(function (query) {\n return query.split(',');\n }).reduce(function (a1, a2) {\n return a1.concat(a2);\n }).map(function (query) {\n return query.trim();\n });\n }", "function getTermsFromQuery(str) {\n\tvar terms = str.split(\"+(\\\"\");\n\n\tfor (var i=0; i<terms.length; i++)\n\t\tterms[i] = terms[i].substring(0, terms[i].indexOf(\"\\\"\"));\n\n\tvar temp = new Array();\n\tfor (var i=0; i<terms.length; i++)\n\t\tif(terms[i])\n\t\t\ttemp.push(terms[i]);\n\t\n\tterms = temp;\n\treturn terms;\n}", "function arrayify(sql) {\n if (typeof sql === 'string') return [ { sql: sql } ]\n if(! Array.isArray(sql)) return [ sql ]\n return sql\n}", "function cpxaisfm(arr) {\n const rv = [];\n for (let v of arr) {\n if (typeof v === 'string') v.split('').forEach(c => rv.push(c));\n else rv.push(v);\n }\n return rv;\n}", "function splitQueryText(text) {\r\n var words = text.match(/\\S+/g),\r\n query = [],\r\n start = 0,\r\n _query = '',\r\n html = $('body').html();\r\n do {\r\n start = splitHelper(words, html)\r\n _query = words.slice(0, start).join(' ')\r\n if (_query && start > 1) {\r\n query.push(_query)\r\n }\r\n start = start === 0 ? 1 : start; // in case no match a single word\r\n words = words.slice(start)\r\n } while (start && words && words.length)\r\n // console.log(query)\r\n return query\r\n}", "function WR_Parse_Url_To_Array( url ) {\n\t \tif ( url.search( '&' ) == -1 )\n\t \t\treturn false;\n\n\t \tvar data = {}, queries, temp, i;\n\n\t\t// Split into key/value pairs\n\t\tqueries = url.split( \"&\" );\n\n\t\t// Convert the array of strings into an object\n\t\tfor ( i = 0; i < queries.length; i++ ) {\n\t\t\ttemp = queries[ i ].split( '=' );\n\t\t\tdata[ temp[ 0 ] ] = temp[ 1 ];\n\t\t}\n\t\treturn data;\n\t}", "function parseExpr(expr) {\n let splitExpr = expr.split('&nbsp;');\n let command = splitExpr[0];\n let args = splitExpr.slice(1);\n return [command, args];\n}", "function collectortoarray(q,c){\n \n var inpt=[];\n let counter = 0;\n \n c.forEach((value) => {\n inpt[counter]=[q[counter][0],value.content];\n counter++;\n });\n\n console.log(inpt);\n return inpt;\n}", "function getBracketedItems(content) {\n\tvar retval = [ ];\n\tvar startIdx = 0;\n\tvar endIdx = 0;\n\n\t// so lange wie möglich doppelte öffnende eckige Klammern suchen \n\twhile((startIdx = content.indexOf(\"[[\", endIdx)) != -1) {\n\t\tvar length = 0;\n\n\t\t// zugehöriges schließendes Klammernpaar suchen \n\t\tendIdx = content.indexOf(\"]]\", startIdx);\n\t\tif(endIdx == -1) break;\n\n\t\t// länge des tokens ermitteln */\n\t\tlength = endIdx - startIdx - 2;\n\n\t\t// links mit http:// sind mindestens 7 zeichen lang, shortlinks (zunächst) weniger als 3\n\t\tif((length > 7) || (length <= 2)) {\n\t\t\t// gefundenes token als anonymes objekt ins array werfen\n\t\t\tretval.push( { 'content' : content.substring(startIdx + 2, endIdx), 'id' : null, 'link' : null } );\n\t\t} \n\t}\n\n\t// array mit token-objekten zurückgeben \n\treturn retval;\n}", "function getArray (s) {\n var a = s.split('\\n')\n return a.map(v => v.split('').map(vv => {\n if (vv === '*') {\n return 1\n } else {\n return 0\n }\n }))\n}", "function getPatternsArrayFromInput(pattern) {\n return pattern.split(\";\").map(x => x.trim()).filter(x => !!x);\n}", "function parseArray(parser, result) {\n var row = [];\n var body = [row];\n var rowGaps = [];\n while (true) {\n var cell = parser.parseExpression(false, null);\n row.push(new ParseNode(\"ordgroup\", cell, parser.mode));\n var next = parser.nextToken.text;\n if (next === \"&\") {\n parser.consume();\n } else if (next === \"\\\\end\") {\n break;\n } else if (next === \"\\\\\\\\\" || next === \"\\\\cr\") {\n var cr = parser.parseFunction();\n rowGaps.push(cr.value.size);\n row = [];\n body.push(row);\n } else {\n throw new ParseError(\"Expected & or \\\\\\\\ or \\\\end\",\n parser.nextToken);\n }\n }\n result.body = body;\n result.rowGaps = rowGaps;\n return new ParseNode(result.type, result, parser.mode);\n}", "function inputToArray(input){\r\n\r\n return input.match(/\\S+/g);\r\n}", "function parseArray(parser, result) {\n var row = [];\n var body = [row];\n var rowGaps = [];\n while (true) {\n var cell = parser.parseExpression(false, null);\n row.push(new ParseNode(\"ordgroup\", cell, parser.mode));\n var next = parser.nextToken.text;\n if (next === \"&\") {\n parser.consume();\n } else if (next === \"\\\\end\") {\n break;\n } else if (next === \"\\\\\\\\\" || next === \"\\\\cr\") {\n var cr = parser.parseFunction();\n rowGaps.push(cr.value.size);\n row = [];\n body.push(row);\n } else {\n // TODO: Clean up the following hack once #385 got merged\n var pos = Math.min(parser.pos + 1, parser.lexer._input.length);\n throw new ParseError(\"Expected & or \\\\\\\\ or \\\\end\",\n parser.lexer, pos);\n }\n }\n result.body = body;\n result.rowGaps = rowGaps;\n return new ParseNode(result.type, result, parser.mode);\n}", "function split(text) {\n\t\t\t\tvar len = text.length;\n\t\t\t\tvar arr = [];\n\t\t\t\tvar i = 0;\n\t\t\t\tvar brk = 0;\n\t\t\t\tvar level = 0;\n\n\t\t\t\twhile (i + 2 <= len) {\n\t\t\t\t\tif (text.slice(i, i + 2) === '[[') {\n\t\t\t\t\t\tlevel += 1;\n\t\t\t\t\t\ti += 1;\n\t\t\t\t\t} else if (text.slice(i, i + 2) === ']]') {\n\t\t\t\t\t\tlevel -= 1;\n\t\t\t\t\t\ti += 1;\n\t\t\t\t\t} else if (level === 0 && text[i] === ',' && text[i - 1] !== '\\\\') {\n\t\t\t\t\t\tarr.push(text.slice(brk, i).trim());\n\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\tbrk = i;\n\t\t\t\t\t}\n\t\t\t\t\ti += 1;\n\t\t\t\t}\n\t\t\t\tarr.push(text.slice(brk, i + 1).trim());\n\t\t\t\treturn arr;\n\t\t\t}", "function ComboBox_GetContentArray(strContent)\n{\n\t//ensure content is valid\n\tstrContent = Get_String(strContent, \"\");\n\t//check if it has the old separator\n\tif (strContent.indexOf(__COMBOBOX_CONTENT_SEPARATOR) != -1)\n\t{\n\t\t//split using this\n\t\tstrContent = strContent.split(__COMBOBOX_CONTENT_SEPARATOR);\n\t}\n\telse\n\t{\n\t\t//use the new separator\n\t\tstrContent = strContent.split(__TREEVIEW_SELECTION_SEPARATOR);\n\t}\n\t//return the new array\n\treturn strContent;\n}", "function commandToArray(s_vitamin) {\n var arr=[];\n s_vitamin.split(\" \").forEach(function(item) {\n var v_shape=parseInt(item.substring(0,item.length-1));\n var c_shape=item.substring(1,2);\n arr.push([v_shape,c_shape]);\n });\n arr.sort(function(a,b){return a[0] - b[0]})\n return arr;\n}", "function string_to_array (str) {\n var arr = [];\n var res = str.split(' ');\n arr.push(res);\n return arr;\n }", "function parseLiteralArray(content) {\n\t\n\tif (content[0].text !== '[' || content[content.length-1].text !== ']') {\n\t\terror(\"Literal array is not actually a literal array\");\n\t}\n\t\n\tif (content.length === 2) {\n\t\treturn tows(\"_emptyArray\", valueFuncKw);\n\t} else {\n\t\t//check for \"in\" keyword\n\t\t//format is \"var for var in array if condition\"\n\t\tvar inOperands = splitTokens(content.slice(1, content.length-1), \"in\", false);\n\t\tif (inOperands.length === 2) {\n\t\t\tvar ifOperands = splitTokens(inOperands[1], \"if\");\n\t\t\tif (ifOperands.length !== 2) {\n\t\t\t\t//Not a filtered array (eg: [player.C for player in playersInRadius()])\n\t\t\t\tvar forOperands = splitTokens(inOperands[0], \"for\");\n\t\t\t\tif (forOperands.length !== 2) {\n\t\t\t\t\terror(\"Malformed 'x for y in z'\");\n\t\t\t\t}\n\t\t\t\tvar forVarName = forOperands[1][0].text;\n\t\t\t\tif (forLoopVariables[forVarName] !== undefined) {\n\t\t\t\t\terror(\"Variable \"+forVarName+\" is already used\");\n\t\t\t\t}\n\t\t\t\tforLoopVariables[forVarName] = inOperands[1];\n\t\t\t\t\n\t\t\t\tvar result = parse(forOperands[0]);\n\t\t\t\tdelete forLoopVariables[forVarName];\n\t\t\t\treturn result;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t//Filtered array\n\t\t\t\tif (inOperands[0].length !== 3 || inOperands[0][1].text !== \"for\" || inOperands[0][0].text !== inOperands[0][2].text) {\n\t\t\t\t\terror(\"Malformed 'x for x in y'\");\n\t\t\t\t}\n\t\t\t\tdebug(\"Parsing 'x for x in y if z', x='\"+inOperands[0][0].text+\"', y='\"+dispTokens(ifOperands[0])+\"', z='\"+dispTokens(ifOperands[1])+\"'\");\n\t\t\t\t\n\t\t\t\tcurrentArrayElementNames.push(inOperands[0][0].text);\n\t\t\t\tvar result = tows(\"_filteredArray\", valueFuncKw)+\"(\"+parse(ifOperands[0])+\", \"+parse(ifOperands[1])+\")\";\n\t\t\t\tcurrentArrayElementNames.pop();\n\t\t\t\treturn result;\n\t\t\t}\n\t\t} else {\n\t\t\t\n\t\t\t//Literal array with only values ([1,2,3])\n\t\t\tvar args = splitTokens(content.slice(1, content.length-1), \",\");\n\t\t\tvar appendFunc = tows(\"_appendToArray\", valueFuncKw);\n\t\t\tvar result = tows(\"_emptyArray\", valueFuncKw);\n\t\t\tfor (var i = 0; i < args.length; i++) {\n\t\t\t\tresult = appendFunc+\"(\"+result+\", \"+parse(args[i])+\")\";\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\t\n\terror(\"This shouldn't happen\");\n\t\n}", "function userParamsOf(expr){\n let userRx = RegExp('[#\\$]([A-Za-z_]+)', 'g');\n let list = expr.match(userRx) || [];\n return list.map(str => str.substr(1));\n}", "function splitUpToTerminal (xs) {\n if (xs.length == 0) return [[], []];\n var split = _.splitWhen (Util.isOneOfIgnoreCase (TERMINAL_KEYWORDS), xs);\n return [_.append (split[1][0], split[0]), _.slice (1, split[1].length, split[1])];\n}", "function extraxtRules(rulesField) {\n let rule = rulesField.split(\",\");\n let rules = [];\n for (let i = 0; i < rule.length; i++) {\n let ruleObject = {\n input: rule[i].split(/->|→/)[0],\n output: rule[i].split(/->|→/)[1]\n };\n rules.push(ruleObject);\n }\n return rules;\n}", "function convertToArray(rawstring, myArray){\n\tcurrString = rawstring.substring(1)\n\tinitialIndex = rawstring.indexOf(\",\")\n\n\twhile (initialIndex!=-1){\n\t\tbeginString = currString.substring(2, initialIndex-2)\n\t\tmyArray.push(beginString)\n\t\tcurrString = currString.substring(initialIndex)\n\t\tinitialIndex = currString.indexOf(\",\")\t\t\n\t}\n\n\tlastString = currString.substring(1, currString.indexOf(\"]\")-1)\n\tmyArray.push(lastString)\n\treturn myArray\n\n}", "function string_to_array(str) {\n return str.trim().split(\" \");\n}", "metinToArray() {\r\n\r\n\r\n var metinArrayed = this.metin.split(\" \");\r\n\r\n\r\n return metinArrayed\r\n\r\n }", "_splitBnfParts(production) {\n let splitter = production.indexOf('->') !== -1 ? '->' : '|';\n let splitted = production.split(splitter);\n let LHS = splitted[0].trim();\n let rhsStr = splitted[1].trim();\n\n let RHS = [];\n\n // If no RHS provided, assume it's ε. We support\n // both formats, explicit:\n //\n // F -> ε\n //\n // and implicit:\n //\n // F ->\n //\n if (!rhsStr) {\n RHS.push(EPSILON);\n } else {\n let rhsProd = rhsStr.split(/\\s+/);\n for (let i = 0; i < rhsProd.length; i++) {\n if (rhsProd[i] === '\"' && rhsProd[i + 1] === '\"') {\n RHS.push('\" \"');\n i++;\n } else {\n RHS.push(rhsProd[i]);\n }\n }\n }\n\n return [LHS, RHS];\n }", "function parseArrayPattern(params, kind) {\n var node = new Node(), elements = [], rest, restNode;\n expect('[');\n\n while (!match(']')) {\n if (match(',')) {\n lex();\n elements.push(null);\n } else {\n if (match('...')) {\n restNode = new Node();\n lex();\n params.push(lookahead);\n rest = parseVariableIdentifier(kind);\n elements.push(restNode.finishRestElement(rest));\n break;\n } else {\n elements.push(parsePatternWithDefault(params, kind));\n }\n if (!match(']')) {\n expect(',');\n }\n }\n\n }\n\n expect(']');\n\n return node.finishArrayPattern(elements);\n }", "function parseArrayPattern(params, kind) {\n var node = new Node(), elements = [], rest, restNode;\n expect('[');\n\n while (!match(']')) {\n if (match(',')) {\n lex();\n elements.push(null);\n } else {\n if (match('...')) {\n restNode = new Node();\n lex();\n params.push(lookahead);\n rest = parseVariableIdentifier(kind);\n elements.push(restNode.finishRestElement(rest));\n break;\n } else {\n elements.push(parsePatternWithDefault(params, kind));\n }\n if (!match(']')) {\n expect(',');\n }\n }\n\n }\n\n expect(']');\n\n return node.finishArrayPattern(elements);\n }", "function parseArrayPattern(params, kind) {\n var node = new Node(), elements = [], rest, restNode;\n expect('[');\n\n while (!match(']')) {\n if (match(',')) {\n lex();\n elements.push(null);\n } else {\n if (match('...')) {\n restNode = new Node();\n lex();\n params.push(lookahead);\n rest = parseVariableIdentifier(kind);\n elements.push(restNode.finishRestElement(rest));\n break;\n } else {\n elements.push(parsePatternWithDefault(params, kind));\n }\n if (!match(']')) {\n expect(',');\n }\n }\n\n }\n\n expect(']');\n\n return node.finishArrayPattern(elements);\n }", "function searchTextToArray() {\n \n var originalSearch = '';\n var vendorSearchTags = [];\n \n if($scope.searchText !== '') {\n // convert to lowercase and split at space\n originalSearch = $scope.searchText.toLowerCase();\n vendorSearchTags = originalSearch.split(\" \");\n searchTags.push(originalSearch); \n } \n }", "function parseArrayPattern(params, kind) {\n var node = new Node(), elements = [], rest, restNode;\n expect('[');\n\n while (!match(']')) {\n if (match(',')) {\n lex();\n elements.push(null);\n } else {\n if (match('...')) {\n restNode = new Node();\n lex();\n params.push(lookahead);\n rest = parseVariableIdentifier(kind);\n elements.push(restNode.finishRestElement(rest));\n break;\n } else {\n elements.push(parsePatternWithDefault(params, kind));\n }\n if (!match(']')) {\n expect(',');\n }\n }\n\n }\n\n expect(']');\n\n return node.finishArrayPattern(elements);\n }", "function parse() {\n var parsedInputArray = [];\n for (var i = 3; i < rawInput.length; i++) {\n parsedInputArray.push(rawInput[i]);\n }\n return parsedInputArray.join(' ');\n\n}", "function parseArrayPattern(params, kind) {\n\t var node = new Node(), elements = [], rest, restNode;\n\t expect('[');\n\n\t while (!match(']')) {\n\t if (match(',')) {\n\t lex();\n\t elements.push(null);\n\t } else {\n\t if (match('...')) {\n\t restNode = new Node();\n\t lex();\n\t params.push(lookahead);\n\t rest = parseVariableIdentifier(kind);\n\t elements.push(restNode.finishRestElement(rest));\n\t break;\n\t } else {\n\t elements.push(parsePatternWithDefault(params, kind));\n\t }\n\t if (!match(']')) {\n\t expect(',');\n\t }\n\t }\n\n\t }\n\n\t expect(']');\n\n\t return node.finishArrayPattern(elements);\n\t }", "get_args(src) {\n let reg = this.regex_clone(FDEFS1)\n reg.lastIndex = 0\n\n let m = reg.exec(src)\n if (!m[3].trim().length) return []\n let arr = m[3].split(',')\n .map(x => x.trim())\n .filter(x => x !== '_id' && x !== '_tf')\n return arr\n }", "function splitRRtoArray(original_responsive_rules) {\n return original_responsive_rules.slice();\n}", "function _parseQueries(queries) {\n const allQueries = [];\n const harnessQueries = [];\n const elementQueries = [];\n const harnessTypes = new Set();\n for (const query of queries) {\n if (typeof query === 'string') {\n allQueries.push(query);\n elementQueries.push(query);\n }\n else {\n const predicate = query instanceof HarnessPredicate ? query : new HarnessPredicate(query, {});\n allQueries.push(predicate);\n harnessQueries.push(predicate);\n harnessTypes.add(predicate.harnessType);\n }\n }\n return { allQueries, harnessQueries, elementQueries, harnessTypes };\n}", "getKeywordsArr() {\n return this.state.keywords.split(',').map(k => k.trim()).filter(k => k);\n }", "function convert_terms_to_array(ont_term_list){\n ont_term_array=ont_term_list.split('\\n')\n //need to add another element to array, since there may not be a new line\n //at the end of the list\n ont_term_array.push('');\n if (ont_term_array=='')\n {\n alert(\"Input a list of terms!\")\n return;\n }\n filtered_array=new Array();\n for (var i=0;i<ont_term_array.length;i++){\n filtered_array.push(ont_term_array[i])\n/* if (ont_term_array[i]!=''){\n filtered_array.push(ont_term_array[i])\n }*/\n } \n return filtered_array;\n}", "function convert_terms_to_array(ont_term_list){\n ont_term_array=ont_term_list.split('\\n')\n //need to add another element to array, since there may not be a new line\n //at the end of the list\n ont_term_array.push('');\n if (ont_term_array=='')\n {\n alert(\"Input a list of terms!\")\n return;\n }\n filtered_array=new Array();\n for (var i=0;i<ont_term_array.length;i++){\n filtered_array.push(ont_term_array[i])\n/* if (ont_term_array[i]!=''){\n filtered_array.push(ont_term_array[i])\n }*/\n } \n return filtered_array;\n}", "function _splitSelector(str){\n\t\tvar i\t\t= 0,\n\t\t\tlen \t= str.length,\n\t\t\tc,\n\t\t\tresult\t= [],\n\t\t\tbegin\t= 0,\n\t\t\tcount;\n\t\tdo{\n\t\t\tc\t= str[i];\n\t\t\tif(c == ','){\n\t\t\t\tresult.push(str.substring(begin, i));\n\t\t\t\tbegin\t= i + 1;\n\t\t\t}\n\t\t\telse\n\t\t\t\ti\t= _escapeGroups(str, c, i); // escape [...] (...) '...' \"...\" /.../\n\t\t}while(++i < len);\n\t\tif(begin < i)\n\t\t\tresult.push(str.substring(begin, i));\n\t\treturn result;\n\t}", "function get1DArray(input){\r\n var result = [];\r\n for (var i=0; i<input.length; i++) {\r\n result = result.concat(input[i]);\r\n }\r\n return result;\r\n}", "function splitTextTo3DArray(textes) {\r\n\tlet textArray = textes.split(\"\\t\");\r\n\treturn textArray;\r\n}", "searchKeyword() {\n if (this.state.searchInput.length > 0) {\n const query = this.state.searchInput.toLowerCase().split(' ');\n const result = [];\n \n query.forEach(q => result.push(...this.state.lookupData.filter(data => data.keywords.includes(q))));\n\n return result;\n } else {\n return [];\n }\n }", "function parseInput(input) {\r\n\t\tvar ret = [];\r\n\t\tvar building = [];\r\n\t\tvar data = input.trim().split(\";\");\r\n\r\n\t\t//iterate through the input\r\n\t\tfor (var i = 0; i < data.length; i++) {\r\n\t\t\tbuilding = data[i].split(\"|\");\r\n\r\n\t\t\tret.push({\r\n\t\t\t\tname: building[0].trim(),\r\n\t\t\t\tlevel: parseInt(building[1])\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn ret;\r\n\t}", "tokenize(query, respect_word_boundaries, weights) {\n if (!query || !query.length) return [];\n const tokens = [];\n const words = query.split(/\\s+/);\n var field_regex;\n\n if (weights) {\n field_regex = new RegExp('^(' + Object.keys(weights).map(utils.escape_regex).join('|') + ')\\:(.*)$');\n }\n\n words.forEach(word => {\n let field_match;\n let field = null;\n let regex = null; // look for \"field:query\" tokens\n\n if (field_regex && (field_match = word.match(field_regex))) {\n field = field_match[1];\n word = field_match[2];\n }\n\n if (word.length > 0) {\n regex = utils.escape_regex(word);\n\n if (this.settings.diacritics) {\n regex = diacritics.diacriticRegexPoints(regex);\n }\n\n if (respect_word_boundaries) regex = \"\\\\b\" + regex;\n regex = new RegExp(regex, 'i');\n }\n\n tokens.push({\n string: word,\n regex: regex,\n field: field\n });\n });\n return tokens;\n }", "function inputToArr(input) {\n\t// Remove spaces from the input\n\tvar list = input.split(\" \").join(\"\"); \n\t// Create an array \n\tvar arr = list.split(',');\n\treturn arr;\n}", "function handleArrayInput(_splitted, _var, i) {\n var arr = [];\n arr.push(convertToType(_var.substr(1)));\n\n i++;\n var _var2 = _splitted[i];\n while (_var2.indexOf(']') == -1) {\n arr.push(convertToType(_var2));\n\n i++;\n _var2 = _splitted[i];\n }\n arr.push(convertToType(_var2.substr(0, _var2.length - 1)));\n\n return arr;\n}", "parseString(term) { \n var results = term.split(\",\")\n return results;\n }", "splitFilterIntoTerms (searchString) {\n if (!searchString) {\n return null;\n }\n\n let groups = [];\n let quoted;\n\n searchString.split(' ').forEach(substring => {\n if (/:\"/g.test(substring)) {\n if (/\"$/.test(substring)) {\n groups.push(this.encode(substring));\n } else {\n quoted = substring;\n }\n } else if (quoted) {\n quoted += ` ${substring}`;\n\n if (/\"/g.test(substring)) {\n groups.push(this.encode(quoted));\n quoted = undefined;\n }\n } else {\n groups.push(substring);\n }\n });\n\n return this.splitSearchIntoTerms(groups.join(' '));\n }", "function processArrayOfStringOrRegExp(iv) {\n if (!Array.isArray(iv)) {\n return;\n }\n var rv = [];\n var i = 0;\n while (rv && (i < iv.length)) {\n var elt = iv[i];\n if (typeof elt === 'string') {\n // string values OK\n rv.push(elt);\n } else if (elt instanceof RegExp) {\n // existing RegExp OK\n rv.push(elt);\n } else if (elt && (typeof elt === 'object')) {\n try {\n // ESTree RegExpLiteral ok if it produces RegExp\n rv.push(new RegExp(elt.regex.pattern, elt.regex.flags || ''));\n } catch (e) {\n // Not a valid RegExpLiteral\n rv = null;\n }\n } else {\n // Unknown value\n rv = null;\n }\n ++i;\n }\n return rv;\n}", "function constructQueryListFrom(goodTitles) {\n const result = [];\n for (let i = 0, n = goodTitles.length; i < n; i++) {\n result.push(goodTitles[i].article);\n }\n return result;\n}", "function regexpify(pattern, re_star, re_dblstar) {\n var parts = pattern.split(/(\\[\\*+\\]|\\*+)/);\n var pattern = [];\n var sub = [];\n var length = 0;\n\n // Maps wildcards in custom grammar to regexp equivalent.\n var wildcards = {\n '*': '(' + re_star + ')',\n '**': '(' + re_dblstar + ')',\n '[*]': re_star,\n '[**]': re_dblstar\n };\n\n var group = 1;\n for (let part in iter(parts)) {\n if (part == '')\n continue;\n if (wildcards[part]) \n pattern.push(wildcards[part]);\n else {\n length += part.length;\n pattern.push('(' + part + ')');\n }\n\n if (part[0] == '[')\n sub.push(part.slice(1, -1));\n else\n sub.push('$' + group++);\n }\n return [length, pattern.join(''), sub.join('')];\n }", "function _build_turtle_query(arr_query){\n\t\t\tvar turtle_prefixes = \"\";\n\t\t\tfor (var i = 0; i < arr_query.length; i++) {\n\t\t\t\tturtle_prefixes = turtle_prefixes +\" \"+ arr_query[i];\n\t\t\t}\n\t\t\treturn turtle_prefixes;\n\t\t}", "function convertToArrs(elem) {\n return function(el) {\n return el.qs.map(convertTo(elem));\n };\n }", "function nodeParamsOf(expr){\n let userRx = RegExp('@([A-Za-z_]+)', 'g');\n let list = expr.match(userRx) || [];\n return list.map(str => str.substr(1));\n}", "function creatingArray(expression) {\r\n // initial variables declared\r\n var operator = '/*+-^';\r\n var nonOperator = '/*^';\r\n var term = '';\r\n\r\n // iteration to loop through the string\r\n for (var i = 0, j; j = expression.charAt(i); i++) {\r\n // first if statement to check for a number, also works for decimal places\r\n if ((!isNaN(j) || (j == '.')) && (expression.charAt(i + 1) != '.' || operator.indexOf(expression.charAt(i + 1) == -1)))\r\n {\r\n term += j;\r\n\r\n // Second if statement to check how big the number is by looking for the next operator inline\r\n if (operator.indexOf(expression.charAt(i + 1)) > -1) {\r\n var k = 0;\r\n // Checking the term variable for multiple decimal places\r\n for (var g = 0, h; h = term.charAt(g); g++) {\r\n if (h == '.') {\r\n k++;\r\n }\r\n // Condition if too many decimal places are detected thus the initial expression format is incorrect\r\n if (k > 1) {\r\n incorrectFormat = 1;\r\n return false;\r\n }\r\n\r\n\r\n }\r\n // pushes the term to the array\r\n //expressionArray.push(parseFloat(term));\r\n\r\n if (!isNaN(j))\r\n {\r\n expressionArray.push(term);\r\n }\r\n else\r\n {\r\n expressionArray.push(term);\r\n }\r\n }\r\n\r\n // continues the loop if the term within the string is larger than a single digit\r\n else {\r\n continue;\r\n }\r\n }\r\n\r\n // Checks the current location for two negative signs to form a positive sign\r\n else if ((operator.indexOf(j) == 3 && expression.charAt(i + 1) == '-') || (operator.indexOf(j) == 2 && expression.charAt(i + 1) == '+') || (operator.indexOf(j) == 3 && expression.charAt(i - 1) == '-') || (operator.indexOf(j) == 2 && expression.charAt(i - 1) == '+')) {\r\n // Checks whether previous element already contains an operator\r\n if (expressionArray[expressionArray.length - 1] == operator.charAt(2) || expressionArray[expressionArray.length - 1] == operator.charAt(3)) {\r\n expressionArray.pop();\r\n }\r\n\r\n expressionArray.push('+');\r\n term = '';\r\n continue;\r\n }\r\n\r\n\r\n // Checks the current location for alternate minus and positive signs to form a negative sign\r\n else if ((operator.indexOf(j) == 2 && expression.charAt(i + 1) == '-') || (operator.indexOf(j) == 3 && expression.charAt(i + 1) == '+') || (operator.indexOf(j) == 2 && expression.charAt(i - 1) == '-') || (operator.indexOf(j) == 3 && expression.charAt(i - 1) == '+')) {\r\n // Checks whether previous element already contains an operator\r\n if (expressionArray[expressionArray.length - 1] == operator.charAt(3) || expressionArray[expressionArray.length - 1] == operator.charAt(2)) {\r\n expressionArray.pop();\r\n }\r\n expressionArray.push('-');\r\n term = '';\r\n continue;\r\n }\r\n\r\n // Checks for a valid operator and empties the term variable\r\n else if (operator.indexOf(j) > -1 && nonOperator.indexOf(expression.charAt(i + 1)) == -1)\r\n {\r\n\r\n expressionArray.push(j);\r\n term = '';\r\n\r\n //Checks for any negative signs after current operator\r\n if (expression.charAt(i + 1) == '-') {\r\n term += '-';\r\n i++;\r\n continue;\r\n }\r\n // Checks for any postive signs after current operator\r\n if (expression.charAt(i + 1) == '+') {\r\n term += '+';\r\n i++;\r\n continue;\r\n }\r\n }\r\n\r\n // Checks for invalid characters for this calculator\r\n else {\r\n incorrectFormat = 1;\r\n return false;\r\n }\r\n\r\n }\r\n\r\n // Checks for an ambiguous minus sign at the beginning of the array, usually means the first term was negative\r\n if (expressionArray[0] == '-') {\r\n var firstElement = '-' + expressionArray[1];\r\n expressionArray.splice(0, 2, firstElement);\r\n }\r\n //console.log(expressionArray);\r\n return expressionArray // Returning the array to pass into the second function\r\n }", "function strToArray(str) {\r\n\r\n // -------------------- Your Code Here --------------------\r\n\r\n var arr = [];\r\n var currentWord = \"\";\r\n \r\n for (var i = 0; i < str.length; i++) {\r\n \r\n if ((str[i] === \" \") && (currentWord !== \"\")){\r\n arr.push(currentWord);\r\n currentWord = \"\";\r\n \r\n } else if (str[i] !== \" \") {\r\n currentWord += str[i];\r\n }\r\n }\r\n \r\n if (currentWord !== \"\") {\r\n arr.push(currentWord);\r\n }\r\n \r\n return arr;\r\n\r\n // --------------------- End Code Area --------------------\r\n}", "function transformSplit(inputArray, op) {\n let a = [], b = [];\n for (let i = 0; i < inputArray.length; i++) {\n let x = inputArray[i];\n if (typeof x === \"string\" && x[0] !== '_' && x.indexOf(op) >= 0)\n b[i] = x.replace(op, '');\n else\n a[i] = x;\n }\n return [a, b];\n}", "_compileWhere(where) {\n let lastCondition = null;\n\n let result = [];\n let item = [];\n let op, value, column;\n\n for (let group of where) {\n // Process groups of conditions\n for (let [logic, condition] of Object.entries(group)) {\n logic = String(logic).toUpperCase();\n\n if (condition === '(') {\n if (result && lastCondition !== '(') {\n result.push(logic);\n } else if (item && lastCondition !== '(') {\n item.push(logic);\n }\n\n if (item) {\n if (!result) {\n result = item;\n } else {\n result.push(item);\n }\n item = [];\n }\n } else if (condition === ')') {\n if (item) {\n result.push(item);\n }\n item = [];\n } else {\n if (item && lastCondition !== '(') {\n item.push(logic);\n } else if (result && lastCondition !== '(') {\n result.push(logic);\n }\n\n // Split the condition\n [column, op, value] = condition;\n\n op = String(op).toUpperCase();\n\n item.push(column);\n item.push(op);\n item.push(this._compileConditionQuery(value, op));\n }\n\n lastCondition = condition;\n }\n }\n\n if (item) {\n result.push(item);\n }\n\n if (!result) {\n result = ['Ticket', '>', 0];\n } else if (result.length === 1) {\n result = item;\n }\n\n if (result[0] === 'AND' || result[0] === 'OR') {\n result.shift();\n }\n\n return result;\n }", "function stringToArray(string) {\n // split a string into individual words\n // index each word into one array\n // split returns an array\n return array = string.split(' ')\n}", "function caml_lex_array(s) {\n s = s.getFullBytes();\n var a = [], l = s.length / 2;\n for (var i = 0; i < l; i++)\n a[i] = (s.charCodeAt(2 * i) | (s.charCodeAt(2 * i + 1) << 8)) << 16 >> 16;\n return a;\n}", "function makeArray(word) {\n var word_array = [];\n for (var i = 0; i < word.length; i++) {\n word_array.push(word.charAt(i));\n }\n return word_array;\n }", "function LRQuery(terms) {\n return [\n { $match : { _id : { $in : terms } } },\n { $project : { LR : 1 , _id : 0 } },\n { $unwind : \"$LR\" },\n { $group : { _id : \"NA\", LR : { $push : \"$LR\" } } },\n { $project : { LR : 1 , _id : 0 } }\n ];\n}", "function _parseBooleanQuery(searchPhrase) {\n\n // Remove outer brackets if they exist. EX: (a OR b) -> a OR b\n searchPhrase = removeOuterBrackets(searchPhrase);\n\n // remove double whitespaces\n searchPhrase = removeDoubleWhiteSpace(searchPhrase);\n\n\t// Put ANDs inbetween all the terms that only have a space betwee them\n\tsearchPhrase = injectOperatorBetweenTerms(searchPhrase);\n\n // Split the phrase on the term 'OR', but don't do this on 'OR' that's in\n // between brackets. EX: a OR (b OR c) should not parse the `OR` in between b\n // and c.\n var ors = splitRoot('OR', searchPhrase);\n\n // Each parsed string returns a parsed array in this map function.\n var orPath = ors.map(function(andQuery) {\n\n // Split on the word 'AND'. Yet again, don't split `AND` that's written in\n // between brackets. We'll parse those later recursively.\n var ands = splitRoot('AND', andQuery);\n\n // All nested parsed queries will be stored in `nestedPaths`.\n // Nested means 'in between brackets'.\n var nestedPaths = [];\n\n // All that's not nested will be stored in the andPath array.\n // This array contains words that will later be merged with the parsed\n // queries from nestedPaths.\n var andPath = [];\n\n // Iterate trough all the strings from the AND query\n for (var i = 0; i < ands.length; i++) {\n // If the string contains brackets, parse it recursively, and add it to\n // `nestedPaths`.\n if (containsBrackets(ands[i])) {\n nestedPaths.push(_parseBooleanQuery(ands[i]));\n }\n\n // If it doesn't. Push the word to `andPath`.\n else {\n andPath.push(ands[i]);\n }\n }\n\n // Merge the andPath and the nested OR paths together as one `AND` path\n nestedPaths.push([andPath]);\n\n // Merge all `ANDs` and `ORs` together in one OR query\n return orsAndMerge(nestedPaths);\n });\n\n // Merge all OR query paths together into one Array.\n return mergeOrs(orPath);\n}", "function Split(Expression, Delimiter){\r\n\tvar temp = Expression;\r\n\tvar a, b = 0;\r\n\tvar array = new Array();\r\n\r\n\tif (Delimiter.length == 0){\r\n\t\tarray[0] = Expression;\r\n\t\treturn (array);\r\n\t}\r\n\r\n\tif (Expression.length == ''){\r\n\t\tarray[0] = Expression;\r\n\t\treturn (array);\r\n\t}\r\n\r\n\tDelimiter = Delimiter.charAt(0);\r\n\r\n\tfor (var i = 0; i < Expression.length; i++){\r\n\t\ta = temp.indexOf(Delimiter);\r\n\t\tif (a == -1){\r\n\t\t\tarray[i] = temp;\r\n\t\t\tbreak;\r\n\t\t}else{\r\n\t\t\tb = (b + a) + 1;\r\n\t\t\tvar temp2 = temp.substring(0, a);\r\n\t\t\tarray[i] = temp2;\r\n\t\t\ttemp = Expression.substr(b, Expression.length - temp2.length);\r\n\t\t}\r\n\t}\r\n\r\n\treturn (array);\r\n}", "function w(t){var e=this;return Array.isArray(t)?t.map(function(t){return Array.isArray(t)&&0===t.length?t:e.castForQuery(t)}):[this.castForQuery(t)]}", "function string2array($str) {\n\tvar newArr = []\n\tvar arr = $str.trim().split('\\n');\n\t$.each(arr, function(index, value) {\n\t\tlet item = value.trim().toLowerCase();\n\t\tif (item !== '') newArr.push(item);\n\t});\n\treturn newArr;\n}", "function createTag_Filter_List(){\n$.map(appArray, function (e, i){\n \t\tvar appTagArray = e.tags.split(\", \");\n \t\t$.map(appTagArray, function (f, j){\n \t\t\tvar tag = f;\n \t\t\tvar patt1= new RegExp(tag);\n\t\t\t// spit string, set new array = variable array, then loop through it. \n\t\t\tif (patt1.test(allTags) === false){\n \t\t\tallTags.push(f)\n \t\t\t}\n \t\t});\n \t});\nallTags.sort()\n}", "function splitByPipe(textBlock){\n const arrayOfContent = textBlock.split(\"||\");\n return arrayOfContent\n}", "function parseArray(parser, result, style) {\n var row = [];\n var body = [row];\n var rowGaps = [];\n while (true) {\n // eslint-disable-line no-constant-condition\n var cell = parser.parseExpression(false, null);\n cell = new _ParseNode2.default(\"ordgroup\", cell, parser.mode);\n if (style) {\n cell = new _ParseNode2.default(\"styling\", {\n style: style,\n value: [cell]\n }, parser.mode);\n }\n row.push(cell);\n var next = parser.nextToken.text;\n if (next === \"&\") {\n parser.consume();\n } else if (next === \"\\\\end\") {\n // Arrays terminate newlines with `\\crcr` which consumes a `\\cr` if\n // the last line is empty.\n var lastRow = body[body.length - 1];\n if (body.length > 1 && lastRow.length === 1 && lastRow[0].value.value[0].value.length === 0) {\n body.pop();\n }\n break;\n } else if (next === \"\\\\\\\\\" || next === \"\\\\cr\") {\n var cr = parser.parseFunction();\n rowGaps.push(cr.value.size);\n row = [];\n body.push(row);\n } else {\n throw new _ParseError2.default(\"Expected & or \\\\\\\\ or \\\\end\", parser.nextToken);\n }\n }\n result.body = body;\n result.rowGaps = rowGaps;\n return new _ParseNode2.default(result.type, result, parser.mode);\n}", "function compileRegexList( data, regexFirst ){\n\t\t\tvar returnArray,\n\t\t\t\tstringArray = [],\n\t\t\t\tregexArray = [];\n\t\t\t\t\n\t\t\tfunction add( val ){\n\t\t\t\taddToArray( val, stringArray, regexArray );\n\t\t\t}\n\t\t\t\t\n\t\t\tif( isArray( data ) ) data.forEach( add );\n\t\t\telse add( data );\n\t\t\t\n\t\t\t//sort the strings by length and convert to regex safe\n\t\t\tstringArray = stringArray.sort( sortArrayByLength ).map( makeRegexSafe );\n\t\t\t\n\t\t\t//combine in the order dictated by regexFirst\n\t\t\treturnArray = regexFirst ? regexArray.concat( stringArray ) : stringArray.concat( regexArray );\n\t\t\t\n\t\t\t//return as string joined by the pipe character\n\t\t\treturn returnArray.join('|');\n\t\t}", "function prepare(array) {\n let prepared = Array.from(array);\n\n prepared = prepared.join('');\n console.log(prepared);\n prepared = prepared.match(/([0-9.]+)|([\\+\\-\\*\\/])/g);\n console.log(prepared);\n\n if (RegExp(/([\\+\\-\\*\\/])/g).test(prepared[prepared.length - 1])) {\n prepared.pop();\n console.log(prepared);\n } else if (RegExp(/(^[\\-])/g).test(prepared[0])) {\n prepared.splice(0, 2, prepared[0] + prepared[1]);\n console.log(prepared);\n } else if (RegExp(/(^[\\+\\*\\/])/g).test(prepared[0])) {\n prepared.shift();\n console.log(prepared);\n }\n\n return prepared;\n}", "function bp$2(s) {\n var rv = [];\n var p = s.pop;\n var r = s.rule;\n for (var i = 0, l = p.length; i < l; i++) {\n rv.push([p[i], r[i]]);\n }\n return rv;\n}", "function bp(s) {\n var rv = [];\n var p = s.pop;\n var r = s.rule;\n for (var i = 0, l = p.length; i < l; i++) {\n rv.push([p[i], r[i]]);\n }\n return rv;\n}", "function arrayer(song) {\n let arrayOfParts = [];\n let startIndex = 1;\n let endIndex = 0;\n while (song) {\n endIndex = song.indexOf(\"[\", startIndex);\n if (endIndex === -1) {\n arrayOfParts.push(song.slice(startIndex - 1, song.length - 1));\n break;\n }\n arrayOfParts.push(song.slice(startIndex - 1, endIndex - 1));\n startIndex = endIndex + 1; \n }\n console.log(arrayOfParts[0].charCodeAt(10)); //87\n return arrayOfParts;\n }", "processQuery(query, props){\n let components = query.split(/([\\|\\&]?)([^\\&\\|\\(\\)]+|\\(.+\\))([\\|\\&]?)/).filter(Boolean);\n if(components.includes(\"|\")){\n return zoteroRoam.smartblocks.eval_or(components.filter(c => c != \"|\"), props);\n } else {\n return zoteroRoam.smartblocks.eval_and(components.filter(c => c!= \"&\"), props);\n }\n }", "function bp(s) {\n var rv = [];\n var p = s.pop;\n var r = s.rule;\n for (var i = 0, l = p.length; i < l; i++) {\n rv.push([\n p[i],\n r[i]\n ]);\n }\n return rv;\n}", "function guessSubgroups(array) {\n var arr;\n if (array.indexOf('(') >= 0) { // if there are brackets in smc prerequisite string\n arr = fixSMCGroupingIssues(array);\n arr = logical_grouping.getGroupedArray(arr, {\n 'or': 1,\n 'and': 0\n });\n } else {\n arr = logical_grouping.getGroupedArray(array, presidence);\n // make sure that all operators are in lowercase\n arr = arr.map(function(el) {\n return isOperator(el) ? el.toLowerCase() : el;\n });\n }\n\n return arr;\n}", "function delimitMultiArray(input,delimiter,rowdelimiter)\r\n{\r\n\tvar resultArray = new Array();\r\n\tvar recordArray = input.split(rowdelimiter);\r\n\tfor(var i=0;i<recordArray.length;i++)\r\n\t{\r\n\t\tresultArray[i] = recordArray[i].split(delimiter);\r\n\t}\r\n\treturn resultArray;\r\n}", "static stringToArray(inp, splitPoint) {\n return splitPoint !== undefined && splitPoint !== 'ws'\n ? inp.split(splitPoint)\n : inp.match(/\\S+/g) || [];\n }" ]
[ "0.6246973", "0.5986145", "0.5838154", "0.5799794", "0.5768537", "0.5716359", "0.5710942", "0.5570982", "0.5500174", "0.54699564", "0.54127645", "0.5399325", "0.5390253", "0.53763956", "0.53761923", "0.5363575", "0.53631985", "0.5362661", "0.5349367", "0.53287226", "0.53265965", "0.5312764", "0.5275566", "0.5274639", "0.5243504", "0.52388525", "0.52005905", "0.5188261", "0.5148342", "0.51479244", "0.51461124", "0.5143626", "0.5140536", "0.5123643", "0.51161236", "0.5108018", "0.51073563", "0.5104415", "0.51017576", "0.5090783", "0.5088702", "0.5080547", "0.5080497", "0.5013952", "0.50128484", "0.50013185", "0.49994144", "0.49994144", "0.49994144", "0.49994016", "0.4960446", "0.4958497", "0.4942657", "0.4936618", "0.49266735", "0.49163076", "0.49109218", "0.4908358", "0.4908358", "0.49066478", "0.49037597", "0.48921028", "0.48916563", "0.48914233", "0.4890503", "0.48800275", "0.48708588", "0.48702738", "0.48680538", "0.4864604", "0.4861872", "0.4850715", "0.48506132", "0.48496324", "0.48433638", "0.48356217", "0.48344672", "0.48229823", "0.48152462", "0.48045582", "0.48011008", "0.47999275", "0.47977364", "0.47933692", "0.4791475", "0.47886577", "0.47830346", "0.4776789", "0.47763062", "0.47762743", "0.4770456", "0.47632283", "0.47552362", "0.4753799", "0.47478554", "0.47435066", "0.47402418", "0.4739495", "0.47379565", "0.47317848" ]
0.51239157
33
When `auto` is `true`, the parse function will infer and initialize and add the appropriate `Searcher` instance
function parse(query,options,{auto=true}={}){const next=query=>{let keys=Object.keys(query);const isQueryPath=isPath(query);if(!isQueryPath&&keys.length>1&&!isExpression(query)){return next(convertToExplicit(query));}if(isLeaf(query)){const key=isQueryPath?query[KeyType.PATH]:keys[0];const pattern=isQueryPath?query[KeyType.PATTERN]:query[key];if(!isString(pattern)){throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(key));}const obj={keyId:createKeyId(key),pattern};if(auto){obj.searcher=createSearcher(pattern,options);}return obj;}let node={children:[],operator:keys[0]};keys.forEach(key=>{const value=query[key];if(isArray(value)){value.forEach(item=>{node.children.push(next(item));});}});return node;};if(!isExpression(query)){query=convertToExplicit(query);}return next(query);}// Practical scoring function
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "auto( params ) { \n\n // Extract any feature data.\n this.$set(this, 'sort', params.sort || this.sort || defaults.sort);\n this.$set(this, 'filter', $.extend(true, {}, this.filter, params.filter || defaults.filter));\n this.$set(this, 'paging', $.extend(true, {}, this.paging, params.paging || defaults.paging));\n this.$set(this, 'indexing', $.extend(true, {}, this.indexing, params.indexing || defaults.indexing));\n \n // Handle searches.\n if( params.hasOwnProperty('query') && params.hasOwnProperty('field') ) {\n \n return this.search(params.query, isset(params.field) ? params.field : null);\n \n }\n \n // Otherwise, browse.\n return this.browse();\n \n }", "get autoParse() { return this._parse }", "function SwaggerParser () {\n $RefParser.apply(this, arguments);\n}", "async function search (text, autoSplit=true) {\n\tif (typeof(text) !== 'string') {\n\t\tthrow new TypeError(\"Text was not string\");\n\t}\n\n\t// We limit it to 3000chars max just to be ultra safe\n\tif (!autoSplit && text.length > 3000) {\n\t\tthrow new Error(\"search text length was greater than 3000 characters (LoB limits to 3200, but just to be safe and have some leeway the code limits it to 3000), and autoSplit was false so this error was thrown.\");\n\t}\n\n\tif (autoSplit) {\n\t\t// Split every 3000 characters\n\t\ttext = text.match(/.{1,3000}/g);\n\n\t\tif (text === null) {\n\t\t\ttext = [''];\n\t\t}\n\t} else {\n\t\t// Make it an array so the code will work on both\n\t\ttext = [text];\n\t}\n\n\tlet results = [];\n\tfor (let i = 0; i < text.length; i++) {\n\t\tresults.push(await _searchSingle(text[i]));\n\t}\n\n\treturn results;\n}", "suggestion() {\n this.agent.suggestion.apply(this.agent, arguments);\n }", "function makeAutosuggest(_ref) {var _ref$completers = _ref.completers,completers = _ref$completers === undefined ? [] : _ref$completers; //eslint-disable-next-line no-unused-vars\n\t return function (editor, _ref2, _ref3) {var fetchDomainSuggestions = _ref2.fetchDomainSuggestions;var langTools = _ref3.langTools,AST = _ref3.AST,specObject = _ref3.specObject;editor.setOptions({ enableBasicAutocompletion: true, enableSnippets: true, enableLiveAutocompletion: true });editor.completers = completers;};}", "function parseFinder(ecModel, finderInput, opt) {\n var _a = preParseFinder(finderInput, opt),\n mainTypeSpecified = _a.mainTypeSpecified,\n queryOptionMap = _a.queryOptionMap,\n others = _a.others;\n\n var result = others;\n var defaultMainType = opt ? opt.defaultMainType : null;\n\n if (!mainTypeSpecified && defaultMainType) {\n queryOptionMap.set(defaultMainType, {});\n }\n\n queryOptionMap.each(function (queryOption, mainType) {\n var queryResult = queryReferringComponents(ecModel, mainType, queryOption, {\n useDefault: defaultMainType === mainType,\n enableAll: opt && opt.enableAll != null ? opt.enableAll : true,\n enableNone: opt && opt.enableNone != null ? opt.enableNone : true\n });\n result[mainType + 'Models'] = queryResult.models;\n result[mainType + 'Model'] = queryResult.models[0];\n });\n return result;\n}", "function quickparse(text) {\n // remove a leading \"kip\" (\"kip find me socks\" --> \"find me socks\")\n text = text.replace(/^kip[,:;.! ]/i, '')\n\n // check for initial search queries\n regexes = [{\n mode: 'shopping',\n action: 'initial',\n regexes: [\n /^can you find me a\\b/i,\n /^can you find me\\b/i,\n /^find me a\\b/i,\n /^find me\\b/i,\n /^find\\b/i,\n /^search for a\\b/i,\n /^search for\\b/,\n /^search\\b/i,\n /^i need a\\b/i,\n /^i need\\b/i\n ]\n }, {\n mode: 'cart',\n action: 'view',\n regexes: [\n /^view cart\\b/i,\n /^cart$/i,\n /^checkout/i,\n /^check out/i\n ]\n }, {\n mode: 'cart',\n action: 'empty',\n regexes: [\n /^empty cart\\b/i,\n /^delete cart\\b/i\n ]\n }];\n\n var result = false;\n regexes.map(function(handler) {\n if (result) {\n return;\n }\n\n for (var i = 0; i < handler.regexes.length; i++) {\n var re = handler.regexes[i];\n if (text.match(re)) {\n result = {\n mode: handler.mode,\n action: handler.action\n };\n\n if (handler.action === 'initial') {\n result.params = {\n query: text.replace(re, '').trim()\n }\n }\n\n return;\n }\n }\n })\n\n return result;\n}", "function parseFinder(ecModel, finderInput, opt) {\n\t var finder;\n\t\n\t if (isString(finderInput)) {\n\t var obj = {};\n\t obj[finderInput + 'Index'] = 0;\n\t finder = obj;\n\t } else {\n\t finder = finderInput;\n\t }\n\t\n\t var queryOptionMap = createHashMap();\n\t var result = {};\n\t var mainTypeSpecified = false;\n\t each(finder, function (value, key) {\n\t // Exclude 'dataIndex' and other illgal keys.\n\t if (key === 'dataIndex' || key === 'dataIndexInside') {\n\t result[key] = value;\n\t return;\n\t }\n\t\n\t var parsedKey = key.match(/^(\\w+)(Index|Id|Name)$/) || [];\n\t var mainType = parsedKey[1];\n\t var queryType = (parsedKey[2] || '').toLowerCase();\n\t\n\t if (!mainType || !queryType || opt && opt.includeMainTypes && indexOf(opt.includeMainTypes, mainType) < 0) {\n\t return;\n\t }\n\t\n\t mainTypeSpecified = mainTypeSpecified || !!mainType;\n\t var queryOption = queryOptionMap.get(mainType) || queryOptionMap.set(mainType, {});\n\t queryOption[queryType] = value;\n\t });\n\t var defaultMainType = opt ? opt.defaultMainType : null;\n\t\n\t if (!mainTypeSpecified && defaultMainType) {\n\t queryOptionMap.set(defaultMainType, {});\n\t }\n\t\n\t queryOptionMap.each(function (queryOption, mainType) {\n\t var queryResult = queryReferringComponents(ecModel, mainType, queryOption, {\n\t useDefault: defaultMainType === mainType,\n\t enableAll: opt && opt.enableAll != null ? opt.enableAll : true,\n\t enableNone: opt && opt.enableNone != null ? opt.enableNone : true\n\t });\n\t result[mainType + 'Models'] = queryResult.models;\n\t result[mainType + 'Model'] = queryResult.models[0];\n\t });\n\t return result;\n\t }", "function initAutocomplete() {\n // Create the autocomplete object, restricting the search to geographical location types.\n autocomplete = new google.maps.places.Autocomplete(\n /** @type {!HTMLInputElement} */\n (searchEl), {\n // options(from google documentation)\n types: ['geocode'],\n componentRestrictions: { country: \"us\" }\n })\n}", "_initializeAutocomplete() {\n Ember.assert('jquery-autocomplete.js must be loaded', typeof Ember.$().autocomplete === 'function');\n\n let options = this._options();\n\n const dataSourceConfigured = Ember.isPresent(options.get('serviceUrl')) || Ember.isPresent(options.get('lookup'));\n\n assign(options, this.get('autocompleteOptions') || {});\n\n Ember.assert('serviceUrl or lookup attributes must be provided', dataSourceConfigured === true);\n this.$().autocomplete(options);\n }", "function search_init(){\n\n // DOM contact points.\n var form_elt = '#search_form';\n var search_elt = '#search';\n\n // Helper lifted from bbop-js: bbop.core.first_split\n // For documentation, see:\n // http://cdn.berkeleybop.org/jsapi/bbop-js/docs/files/core-js.html\n var first_split = function(character, string){\n\tvar retlist = null;\n\n\tvar eq_loc = string.indexOf(character);\n\tif( eq_loc == 0 ){\n retlist = ['', string.substr(eq_loc +1, string.length)];\n\t}else if( eq_loc > 0 ){\n var before = string.substr(0, eq_loc);\n var after = string.substr(eq_loc +1, string.length);\n retlist = [before, after];\n\t}else{\n retlist = ['', ''];\n\t}\n\t\n\treturn retlist;\n };\n\n // Override form submission and bump to search page.\n jQuery(form_elt).submit(\n\tfunction(event){\n\t event.preventDefault();\n\t \n\t var val = jQuery(search_elt).val();\n\t var newurl = \"http://\"+window.location.host+\"/search/\"\n\t\t+encodeURIComponent(val);\n\t window.location.replace(newurl);\n\t});\n\n // Arguments for autocomplete box.\n var ac_args = {\n\tposition : {\n \t my: \"right top\",\n at: \"right bottom\",\n\t collision: \"none\"\n\t},\n\tsource: function(request, response) {\n\t console.log(\"trying autocomplete on \"+request.term);\n\n\t // Argument response from source gets map as argument.\n\t var _parse_data_item = function(item){\n\t\t\n\t\t// If has a category, append that; if not try to use\n\t\t// namespace; otherwise, nothing.\n\t\tvar appendee = '';\n\t\tif( item ){\n\t\t if( item['category'] ){\n\t\t\tappendee = item['category'];\n\t\t }else if( item['id'] ){\n\t\t\t// Get first split on '_'.\n\t\t\tvar fspl = first_split('_', item['id']);\n\t\t\tif( fspl[0] ){\n\t\t\t appendee = fspl[0];\n\t\t\t}\n\t\t }\n\t\t}\n\n\t\treturn {\n\t\t label: item.term,\n\t\t tag: appendee,\n\t\t name: item.id\n\t\t};\n\t };\n\t var _on_success = function(data) {\n\n\t\t// Pare out duplicates. Assume existance of 'id'\n\t\t// field. Would really be nice to have bbop.core in\n\t\t// here...\n\t\tvar pared_data = [];\n\t\tvar seen_ids = {};\n\t\tfor( var di = 0; di < data.length; di++ ){\n\t\t var datum = data[di];\n\t\t var datum_id = datum['id'];\n\t\t if( ! seen_ids[datum_id] ){\n\t\t\t// Only add new ids to pared data list.\n\t\t\tpared_data.push(datum);\n\t\t\t\n\t\t\t// Block them in the future.\n\t\t\tseen_ids[datum_id] = true;\n\t\t }\n\t\t}\n\n\t\tvar map = jQuery.map(pared_data, _parse_data_item);\n\t\tresponse(map);\n\t };\n\n\t var query = \"/autocomplete/\"+request.term+\".json\";\n\t jQuery.ajax({\n\t\t\t url: query,\n\t\t\t dataType:\"json\",\n\t\t\t /*data: {\n\t\t\t prefix: request.term,\n\t\t\t },*/\n\t\t\t success: _on_success\n\t\t\t});\n\t},\n\tmessages: {\n noResults: '',\n\t results: function() {}\n },\n\tselect: function(event,ui) {\n\t if (ui.item !== null) { \n\t\tvar newurl = \"http://\"+window.location.host+\"/search/\"\n\t \t +encodeURIComponent(ui.item.label);\n\t\twindow.location.replace(newurl);\n\t }\n\t}\t\n };\n\n // Create our own custom rendering to make the categories a little\n // nicer to look at (as minor data).\n // http://jqueryui.com/autocomplete/#custom-data\n var jac = jQuery(search_elt).autocomplete(ac_args);\n jac.data('ui-autocomplete')._renderItem = function(ul, item){\n\tvar li = jQuery('<li>');\n\tli.append('<a alt=\"'+ item.name +'\" title=\"'+ item.name +'\">' +\n\t\t '<span class=\"autocomplete-main-item\">' +\n\t\t item.label +\n\t\t '</span>' + \n\t\t '&nbsp;' + \n\t\t '<span class=\"autocomplete-tag-item\">' +\n\t\t item.tag +\n\t\t '</span>' + \n\t\t '</a>');\n\tli.appendTo(ul);\n\treturn li;\n };\n}", "init() {\n if (!this.isInit) {\n return this.loadSearch();\n }\n }", "function init() {\n var autocomplete = new google.maps.places.Autocomplete(input);\n }", "async function getAssistantReply(query, options) {\n\tlet riverarray = await getLatestRiverArray()\n\n\tlet sentence = query.sentence\n\n\tif (typeof query.sentence === \"string\") {\n\t\tlet regexMatched = regexMatching(sentence)\n\n\t\t//If the provided units is invalid, use regex matching.\n\t\tif (![\"flow level\", \"relative flow\", \"temperature\"].includes(query.units)) {\n\t\t\tquery.units = regexMatched.units\n\t\t}\n\n\t\tquery = Object.assign(regexMatched, query)\n\t}\n\n\tlet name = query.name\n\tlet units = query.units\n\n\n\n\tconsole.log(name)\n\n\t//Delete the words river and section (plus the leading space), if it exists in any casing.\n\n\tname = name.split(/ river/i).join(\"\")\n\tname = name.split(/the /i).join(\"\") //This breaks phrasing of something like \"Little Falls of the Potomac\". Should be fixed.\n\tlet responseName = name\n\n\t//Handle something like \"Little Falls of the Potomac\", \"Nantahala from Pattons to NOC\", of \"Big Laurel Creek at Hot Springs\"\n\tname = name.split(/ of/i).join(\"\")\n\tname = name.split(/ at/i).join(\"\")\n\tname = name.split(/ from/i).join(\"\")\n\n\tname = name.split(/(?:section )|(?: section)/i).join(\"\")\n\t//Convert state names to state codes for search - pass onlyAtEnd and notStart to handle things like \"Mississippi River At Example Mississippi\"\n\tlet topRanked = normalSearch(riverarray, siteDataParser.replaceStateNamesWithCodes(name, {onlyAtEnd: true, notStart: true}), {\n\t\tstrongMatchesOnly: true,\n\t\tregexpSplit:true //We are using nothing that should cause RegExp not to use the fast path, so this should significantly improve performance.\n\t})\n\t//TODO: How to handle gauges?\n\t//TODO: Bump out gauges if user wants relative flow.\n\t//TODO: When a search returns a gauge, but there were multiple options, the gauge is repeated twice.\n\t//TODO: Reformat gauge name (use siteDataParser.js).\n\n\tlet alwaysStart = \"<speak>\"\n\tlet ender = \"</speak>\"\n\n\t//TODO: Ask the user to break ties if multiple rivers in topRanked.\n\n\t//Don't use the word \"The \" for creeks, lakes, or when section was labeled.\n\t//Consider using the original name here - so before the word \"River\" was removed.\n\tlet useThe = true\n\tif (responseName.toLowerCase().includes(\" creek\") || responseName.toLowerCase().includes(\" lake\") || responseName.toLowerCase().includes(\"section \")) {\n\t\tuseThe = false\n\t}\n\n\tif (topRanked[0] && !topRanked[0].id) {topRanked[0].id = topRanked[0].gauge.toLowerCase()} //This is a gauge. Fill in it's id using .gauge\n\n\tlet queryResult = {\n\t\tresponseName,\n\t\tsearch: name,\n\t\triverid: (topRanked[0] && topRanked[0].id)\n\t}\n\n\tlet starter = alwaysStart + (useThe?\"The \":\"\") + responseName\n\n\t//No rivers matched the search.\n\tif (topRanked.length === 0) {\n\t\t//Consider removing letters from end until it matches\n\t\t//Would be a bit complicated to implement.\n\n\t\t// Lower Yakageny => Lower Y\n\t\t// Lower Hall => Lower Ha\n\t\t// Cheap Narrows => Chea Narrows\n\n\t\t// Fails with Upper Galley => Upper Ga\n\n\t\tqueryResult.ssml = starter + \" does not exist on rivers.run. Open rivers.run<say-as interpret-as=\\\"characters\\\">/FAQ</say-as> in your browser to learn how to add it. \" + ender\n\t\tqueryResult.text = queryResult.ssml.replace(/<.+?>/g, \"\")\n\t\treturn queryResult\n\t}\n\n\t//Multiple rivers matched the search. Tell the use what we are choosing. TODO: Let user pick.\n\tif (topRanked.topMatches.length > 1) {\n\t\t//TODO: This checks everything, not just the top matches.\n\t\tlet start;\n\t\tfor (let i=0;i<topRanked.topMatches.length;i++) {\n\t\t\tstart = start || topRanked.topMatches[i].gauge\n\t\t\tif (topRanked.topMatches[i].gauge !== start) {\n\t\t\t\t//If section is 1 word long, put section before name. Otherwise, put name before section.\n\t\t\t\tlet sectionFirst = [\"bottom\", \"bottom bottom\", \"lower\", \"middle\", \"upper\", \"top\", \"tip top\", \"upper upper\", \"top\"].includes(topRanked.topMatches[0].section.trim().toLowerCase())\n\t\t\t\tlet selectedRiverName = sectionFirst?(topRanked.topMatches[0].section + \" \" + topRanked.topMatches[0].name):(topRanked.topMatches[0].name + \" \" + topRanked.topMatches[0].section)\n\t\t\t\tstarter = alwaysStart + topRanked.topMatches.length + \" results showed up for the search \" + responseName + \". Picking \" + siteDataParser.fixSiteName(selectedRiverName, {convertStateCodeToName: true}) + \". <break time=\\\"0.5s\\\"/>\" + starter\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tlet gauge;\n\tlet cfs;\n\tlet feet;\n\tlet temp;\n\tlet timeStamp;\n\ttry {\n\t\tlet gaugedata = JSON.parse(await fs.promises.readFile(path.join(utils.getSiteRoot(),\"gaugeReadings\",topRanked[0].gauge)))\n\t\tlet readings = gaugedata.readings\n\n\t\tlet latestReading;\n\t\tfor (let i=readings.length - 1;i>=0;i--) {\n\t\t\t//Find the latest non-forecast flow value.\n\t\t\tif (readings[i].forecast !== true) {\n\t\t\t\tlatestReading = readings[i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tgauge = latestReading\n\t\tgauge.name = gaugedata.name\n\t\ttimeStamp = latestReading.dateTime\n\n\t\tfeet = latestReading.feet\n\t\tcfs = latestReading.cfs\n\t}\n\tcatch(e) {console.error(e)}\n\n\t//River has no gauge, so we can't tell the user info on it.\n\tif (!topRanked[0].gauge) {\n\t\tqueryResult.ssml = starter + \" has no gauge on rivers.run. You can open rivers.run<say-as interpret-as=\\\"characters\\\">/FAQ</say-as> in your browser to learn how to add a gauge. <break time=\\\"0.3s\\\"/>Happy Paddling!\" + ender\n\t\tqueryResult.text = queryResult.ssml.replace(/<.+?>/g, \"\")\n\t\treturn queryResult\n\t}\n\n\t//Gauge is broken. Tell user.\n\telse if (!cfs && !feet) {\n\t\tif (gauge) {\n\t\t\t//The gauge did not return the needed info.\n\t\t\tqueryResult.ssml = starter + \" does not have a working gauge. If \" + siteDataParser.fixSiteName(gauge.name, {convertStateCodeToName: true}) + \" is not the correct gauge, you can open rivers.run<say-as interpret-as=\\\"characters\\\">/FAQ</say-as> in your browser to learn how to update the gauge. <break time=\\\"0.3s\\\"/>Happy Paddling!\" + ender\n\t\t}\n\t\telse {\n\t\t\t//The gauge doesn't appear to exist.\n\t\t\t//TODO: Tell user the gauge that we tried to use (river.gauge)\n\t\t\tqueryResult.ssml = starter + \" does not have a working gauge. You can open rivers.run<say-as interpret-as=\\\"characters\\\">/FAQ</say-as> in your browser to learn how to update the gauge. <break time=\\\"0.3s\\\"/>Happy Paddling!\" + ender\n\t\t}\n\t\tqueryResult.text = queryResult.ssml.replace(/<.+?>/g, \"\")\n\t\treturn queryResult\n\t}\n\n\n\t//TODO: Inform the user of the trend.\n\tlet str = starter + \" had a level of \"\n\tif (cfs && feet) {\n\t\tstr += cfs + \"cfs or \" + feet + \"ft\"\n\t}\n\telse if (cfs) {\n\t\tstr += cfs + \"cfs\"\n\t}\n\telse if (feet) {\n\t\tstr += feet + \"ft\"\n\t}\n\telse if (temp) {\n\t\t//If temp is the only value, still tell them it.\n\t\tstr = starter + \" had a temperature of \" + temp + \"°\"\n\t}\n\n\tif ((cfs || feet) && temp) {\n\t\tstr += \" and a temperature of \" + temp + \"°\"\n\t}\n\n\tlet timeAgo = Date.now() - timeStamp\n\tlet hoursAgo = Math.floor(timeAgo/1000/3600)\n\tlet minutesAgo = Math.ceil(timeAgo/1000%3600/60)\n\n\tif (minutesAgo === 60) {minutesAgo = 0;hoursAgo++} //Use 1 hour instead of 60 minutes when time is 59 minutes something seconds.\n\n\tlet timeString = (hoursAgo > 0?`${hoursAgo} hours and `:\"\") + minutesAgo + \" minutes ago\"\n\n\tstr += \" as of \" + timeString + \", \"\n\n\tif (units === \"relative flow\") {\n\t\t//TODO: Consider moving temperature to before flow, and changing removing which is from \"which is well within recommended levels...\"\n\n\t\tlet river = topRanked[0]\n\n\t\triver.cfs = cfs\n\t\triver.feet = feet\n\t\tlet relativeFlow = calculateRelativeFlow(river)\n\n\t\tfunction round(level) {\n\t\t\tif (river.relativeflowtype === \"cfs\") {\n\t\t\t\treturn Math.round(level) + river.relativeflowtype\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn Math.round(level*100)/100 + river.relativeflowtype\n\t\t\t}\n\t\t}\n\n\t\tif (river.running == null) {\n\t\t\t//Either null or undefined.\n\t\t\tstr += \"according to the gauge \" + siteDataParser.fixSiteName(gauge.name, {convertStateCodeToName: true}) + \". \"\n\t\t\tstr += \"<break time=\\\"0.4s\\\"/>Relative flows are currently unknown. To learn how to add them, go to rivers.run<say-as interpret-as=\\\"characters\\\">/FAQ</say-as> in your browser. <break time=\\\"0.3s\\\"/>Happy Paddling!\"\n\t\t}\n\t\telse if (river.running === 0) {\n\t\t\tstr += \"which is below the minimum of \" + round(river.minrun) + \" for the gauge \" + siteDataParser.fixSiteName(gauge.name, {convertStateCodeToName: true}) + \". <break time=\\\"0.3s\\\"/>Keep rain dancing!\"\n\t\t}\n\t\telse if (river.running === 4) {\n\t\t\tstr += \"which is above the recommended maximum of \" + round(river.maxrun) + \" for the gauge \" + siteDataParser.fixSiteName(gauge.name, {convertStateCodeToName: true}) + \". <break time=\\\"0.3s\\\"/>Stop rain dancing!\"\n\t\t}\n\t\telse if (river.running > 3.5) {\n\t\t\tstr += \"which is a very high level, bordering on too high. The maximum is \" + round(river.maxrun) + \", but levels above \" + round(river.highflow) + \" are considered high for the gauge \" + siteDataParser.fixSiteName(gauge.name, {convertStateCodeToName: true}) + \". <break time=\\\"0.3s\\\"/>Stop rain dancing!\"\n\t\t}\n\t\telse if (river.running < 0.5) {\n\t\t\tstr += \"which is a very low level, bordering on too low. The minimum level is \" + round(river.minrun) + \", however levels above \" + round(river.lowflow) + \" are preferred for the gauge \" + siteDataParser.fixSiteName(gauge.name, {convertStateCodeToName: true}) + \". <break time=\\\"0.3s\\\"/>Start rain dancing!\"\n\t\t}\n\t\telse if (river.running < 1) {\n\t\t\tstr += \"which is above the minimum of \" + round(river.minrun) + \", although levels above \" + round(river.lowflow) + \" are recommended for the gauge \" + siteDataParser.fixSiteName(gauge.name, {convertStateCodeToName: true}) + \". <break time=\\\"0.3s\\\"/>Happy Paddling!\"\n\t\t}\n\t\telse if (river.running > 3) {\n\t\t\tstr += \"which is a little high. The maximum levels is \" + round(river.maxrun) + \", however levels above \" + round(river.highflow) + \" are considered high for the gauge \" + siteDataParser.fixSiteName(gauge.name, {convertStateCodeToName: true}) + \". <break time=\\\"0.3s\\\"/>Happy Paddling!\"\n\t\t}\n\t\telse if (river.running > 2.5) {\n\t\t\tstr += \"which is on the higher end of recommended levels. Levels above \" + round(river.highflow) + \" are considered high, while \" + round(river.midflow) + \" is considered the middle level for the gauge \" + siteDataParser.fixSiteName(gauge.name, {convertStateCodeToName: true}) + \". <break time=\\\"0.3s\\\"/>Happy Paddling!\"\n\t\t}\n\t\telse if (river.running < 1.5) {\n\t\t\tstr += \"which is on the lower end of recommended levels. Levels below \" + round(river.lowflow) + \" are considered low, while \" + round(river.midflow) + \" is considered the middle level for the gauge \" + siteDataParser.fixSiteName(gauge.name, {convertStateCodeToName: true}) + \". <break time=\\\"0.3s\\\"/>Happy Paddling!\"\n\t\t}\n\t\telse {\n\t\t\tstr += \"which is well within the recommended levels of \" + round(river.lowflow) + \" through \" + round(river.highflow) + \", and near the middle level of \" + round(river.midflow) + \" for the gauge \" + siteDataParser.fixSiteName(gauge.name, {convertStateCodeToName: true}) + \". <break time=\\\"0.3s\\\"/>Happy Paddling!\"\n\t\t}\n\t}\n\telse {\n\t\tstr += \"according to the gauge \" + siteDataParser.fixSiteName(gauge.name, {convertStateCodeToName: true}) + \". <break time=\\\"0.3s\\\"/>Happy Paddling!\"\n\t}\n\n\tqueryResult.ssml = str + ender\n\tqueryResult.text = queryResult.ssml.replace(/<.+?>/g, \"\")\n\treturn queryResult\n}", "function ParserQuery(parser, queryString, context, maxSuggestions) {\n this._init.apply(this, arguments);\n}", "constructor(config) {\n this.search = config.search;\n this.caseSensitive = !!config.caseSensitive;\n this.literal = !!config.literal;\n this.regexp = !!config.regexp;\n this.replace = config.replace || \"\";\n this.valid = !!this.search && (!this.regexp || validRegExp(this.search));\n this.unquoted = this.unquote(this.search);\n this.wholeWord = !!config.wholeWord;\n }", "function parseApproach(owner, name, displayName, type, tokens, robotoText) {\n\n var strategies = [];\n var descriptions = [];\n var index = 0;\n\n // If it's a comment, read a comment.\n while (tokens.peek().charAt(0) === \"#\") {\n descriptions.push(tokens.eat());\n tokens.eat(\"\\n\");\n }\n\n // Parse one or more strategies.\n while (tokens.nextIs(\"strategy\")) {\n strategies.push(parseStrategy(index, tokens));\n index++;\n }\n // Parse one or more strategies.\n\n if (tokens.hasNext()) console.error(\"I'm not smart enough to handle anything other than strategies, so I got stuck on '\" + tokens.tokens.slice(0, 5).join(\" \") + \"'\");\n\n return {\n owner: owner,\n name: name,\n description: descriptions,\n displayName: displayName,\n robotoText: robotoText,\n strategies: strategies\n };\n}", "get AUTOCompleteService() {\n\t\tthis.autoCompleteService = this.autoCompleteService || new AutoCompleteService();\n\t\treturn this.autoCompleteService;\n\t}", "function optionsHandler(suggestQueryField, settings) {\n\n \n\n var suggestQueryFieldNode = $(suggestQueryField)[0];\n\n \n\n \n\n \n\n // for some reason, Firefox 1.0 doesn't allow us to set autocomplete to off\n\n \n\n // this way, so you should manually set autocomplete=\"off\" in the input tag\n\n \n\n // if you can -- we'll try to set it here in case you forget\n\n \n\n suggestQueryFieldNode.autocomplete = \"off\";\n\n \n\n $(suggestQueryField).val(settings.value);\n\n \n\n var suggesterInstanceSettings = HawkSearch.SuggesterGlobal.getSuggester('#' + suggestQueryFieldNode.id).settings;\n\n \n\n suggesterInstanceSettings.defaultKeyword = settings.value;\n\n \n\n $(suggestQueryField).on(\"keyup\", keypressHandler);\n\n \n\n \n\n \n\n suggestQueryField.on(\"focus\", function (e) {\n\n \n\n suggesterInstanceSettings.focus = true;\n\n \n\n this.value = '';\n\n \n\n });\n\n \n\n \n\n \n\n if (settings.hiddenDivName) {\n\n \n\n suggesterInstanceSettings.divName = settings.hiddenDivName;\n\n \n\n } else {\n\n \n\n suggesterInstanceSettings.divName = \"querydiv\";\n\n \n\n };\n\n \n\n \n\n \n\n // This is the function that monitors the queryField, and calls the lookup functions when the queryField value changes.\n\n \n\n function suggestLookup(suggestQueryField) {\n\n \n\n var suggesterInstance = HawkSearch.SuggesterGlobal.getSuggester('#' + suggestQueryFieldNode.id);\n\n \n\n var val = suggestQueryField.val();\n\n \n\n if ((suggesterInstance.settings.lastVal != val || suggesterInstance.settings.lastVal != \"\") && suggesterInstance.settings.focus && HawkSearch.SuggesterGlobal.searching == false) {\n\n \n\n suggesterInstance.settings.lastVal = val;\n\n \n\n suggestDoRemoteQuery(suggesterInstance, escape(val));\n\n \n\n }\n\n \n\n return true;\n\n \n\n };\n\n \n\n \n\n \n\n function suggestDoRemoteQuery(suggester, val) {\n\n \n\n HawkSearch.SuggesterGlobal.searching = true;\n\n \n\n //var suggesterInstance = HawkSearch.SuggesterGlobal.getSuggester('#' + suggestQueryFieldNode.id);\n\n \n\n \n\n \n\n var req = suggester.settings.lookupUrlPrefix;\n\n \n\n var visitorId = HawkSearch.lilBro.event.getVisitorId();\n\n \n\n var keywordField = $(\"#hdnhawkkeywordfield\").val();\n\n \n\n var kw = $(suggester.queryField).val();\n\n \n\n \n\n \n\n var hawkb = HawkSearch.GetQueryStringValue[\"hawkb\"];\n\n \n\n if (hawkb !== undefined) {\n\n \n\n req = req + '&hawkb=' + hawkb;\n\n \n\n }\n\n \n\n \n\n \n\n jQuery.ajax({\n\n \n\n type: \"GET\",\n\n \n\n contentType: \"application/json; charset=utf-8\",\n\n \n\n url: req + '&q=' + escape(val) + '&hawkvisitorid=' + visitorId + '&' + keywordField + '=' + encodeURIComponent(kw) + \"&ssfid=\" + encodeURIComponent($(\"#hdnhawkssfid\").val()),\n\n \n\n data: \"\",\n\n \n\n dataType: \"jsonp\",\n\n \n\n success: function (autoSuggestResult) {\n\n \n\n showQueryDiv(suggester, autoSuggestResult);\n\n \n\n HawkSearch.SuggesterGlobal.searching = false;\n\n \n\n },\n\n \n\n error: function () {\n\n \n\n try { hideSuggest(); } catch (error) { };\n\n \n\n HawkSearch.SuggesterGlobal.searching = false;\n\n \n\n }\n\n \n\n });\n\n \n\n };\n\n \n\n \n\n \n\n // Get the <DIV> we're using to display the lookup results, and create the <DIV> if it doesn't already exist.\n\n \n\n function getSuggestDiv(suggester) {\n\n \n\n if (!suggester.settings.globalDiv) {\n\n \n\n var divId = suggester.settings.divName;\n\n \n\n // if the div doesn't exist on the page already, create it\n\n \n\n if (!document.getElementById(divId)) {\n\n \n\n var newNode = document.createElement(\"div\");\n\n \n\n newNode.setAttribute(\"id\", divId);\n\n \n\n newNode.setAttribute(\"class\", \"hawk-searchQuery\");\n\n \n\n document.body.appendChild(newNode);\n\n \n\n }\n\n \n\n \n\n \n\n // set the globalDiv referencea\n\n \n\n suggester.settings.globalDiv = document.getElementById(divId);\n\n \n\n suggester.settings.queryDiv = $(\"#\" + divId);\n\n \n\n }\n\n \n\n \n\n \n\n if (suggestQueryField && (suggestQueryField.offset().left != suggester.settings.storedOffset)) {\n\n \n\n // figure out where the top corner of the div should be, based on the\n\n \n\n // bottom left corner of the input field\n\n \n\n var x = suggestQueryField.offset().left,\n\n \n\n y = suggestQueryField.offset().top + suggestQueryField.outerHeight(),\n\n \n\n fieldID = suggestQueryField.attr(\"id\");\n\n \n\n \n\n \n\n suggester.settings.storedOffset = x;\n\n \n\n \n\n \n\n // add some formatting to the div, if we haven't already\n\n \n\n if (!suggester.settings.divFormatted) {\n\n \n\n // set positioning and apply identifier class using ID of corresponding search field\n\n \n\n suggester.settings.queryDiv.removeAttr(\"style\").css({\n\n \n\n \"left\": x,\n\n \n\n \"top\": y\n\n \n\n }).attr(\"class\", \"hawk-searchQuery hawk-searchQuery-\" + fieldID);\n\n \n\n \n\n \n\n // check to see if 'isAutoWidth' is enabled\n\n \n\n // if enabled apply width based on search field width\n\n \n\n if (settings && settings.isAutoWidth) {\n\n \n\n var queryWidth = suggestQueryField.outerWidth();\n\n \n\n var minValue = 250;\n\n \n\n if (queryWidth < minValue) {\n\n \n\n queryWidth = minValue;\n\n \n\n }\n\n \n\n suggester.settings.queryDiv.css(\"width\", queryWidth);\n\n \n\n }\n\n \n\n \n\n \n\n if (suggester.settings.isMobile) {\n\n \n\n $(suggester.settings.queryDiv).closest('input').focus();\n\n \n\n suggester.settings.queryDiv.removeAttr(\"style\");\n\n \n\n suggester.settings.queryDiv.css(\"width\", \"100%\");\n\n \n\n suggester.settings.queryDiv.css(\"height\", \"100%\");\n\n \n\n suggester.settings.queryDiv.css(\"top\", \"120px\");\n\n \n\n suggester.settings.queryDiv.css(\"background\", 'rgba(30,30,30,0.8)');\n\n \n\n suggester.settings.queryDiv.css(\"color\", \"white\");\n\n \n\n suggester.settings.queryDiv.attr(\"class\", \"hawk-searchQuery hawk-searchQuery-\" + fieldID);\n\n \n\n }\n\n \n\n \n\n \n\n //HawkSearch.SuggesterGlobal.divFormatted = true;\n\n \n\n };\n\n \n\n };\n\n \n\n return suggester.settings.queryDiv;\n\n \n\n };\n\n \n\n \n\n \n\n function suggestIsAbove(suggester) {\n\n \n\n if (suggester.settings.isAbove) {\n\n \n\n \n\n \n\n var queryHeight = suggester.settings.queryDiv.outerHeight(true);\n\n \n\n var y = suggestQueryField.offset().top - queryHeight;\n\n \n\n \n\n \n\n suggester.settings.queryDiv.css({\n\n \n\n \"top\": y\n\n \n\n });\n\n \n\n \n\n \n\n if (!suggester.settings.queryDiv.hasClass(\"hawk-queryAbove\")) {\n\n \n\n suggester.settings.queryDiv.addClass(\"hawk-queryAbove\");\n\n \n\n }\n\n \n\n };\n\n \n\n \n\n \n\n };\n\n \n\n \n\n \n\n // This is the key handler function, for when a user presses the up arrow, down arrow, tab key, or enter key from the input field.\n\n \n\n function keypressHandler(e) {\n\n \n\n var suggestDiv = getSuggestDiv(HawkSearch.SuggesterGlobal.getSuggester('#' + e.target.id)),\n\n \n\n divNode = suggestDiv[0];\n\n \n\n \n\n \n\n // don't do anything if the div is hidden\n\n \n\n if (suggestDiv.is(\":hidden\")) {\n\n \n\n //return true;\n\n \n\n }\n\n \n\n \n\n \n\n // make sure we have a valid event variable\n\n \n\n if (!e && window.event) {\n\n \n\n e = window.event;\n\n \n\n }\n\n \n\n \n\n \n\n var key;\n\n \n\n if (window.event) {\n\n \n\n key = e.keyCode; // IE\n\n \n\n } else {\n\n \n\n key = e.which;\n\n \n\n }\n\n \n\n \n\n \n\n // if this key isn't one of the ones we care about, just return\n\n \n\n var KEYUP = 38;\n\n \n\n var KEYDOWN = 40;\n\n \n\n var KEYENTER = 13;\n\n \n\n var KEYTAB = 9;\n\n \n\n \n\n \n\n if ((key != KEYUP) && (key != KEYDOWN) && (key != KEYENTER) && (key != KEYTAB)) {\n\n \n\n suggestLookup(suggestQueryField, settings, e);\n\n \n\n return true;\n\n \n\n };\n\n \n\n \n\n \n\n // get the span that's currently selected, and perform an appropriate action\n\n \n\n var selectedIndex = getSelectedItem(suggestDiv);\n\n \n\n //var selSpan = HawkSearch.suggest.setSelectedSpan(div, selNum);\n\n \n\n var selectedItem;\n\n \n\n \n\n \n\n if (key == KEYENTER) {\n\n \n\n if (selectedIndex >= 0) {\n\n \n\n var selectedItem = setSelectedItem(suggestDiv, selectedIndex);\n\n \n\n _selectResult(selectedItem);\n\n \n\n e.cancelBubble = true;\n\n \n\n if (window.event) {\n\n \n\n return false;\n\n \n\n } else {\n\n \n\n e.preventDefault();\n\n \n\n };\n\n \n\n } else {\n\n \n\n hideSuggest(e);\n\n \n\n return true;\n\n \n\n };\n\n \n\n } else if (key == KEYTAB) {\n\n \n\n if ((selectedIndex + 1) < suggestDiv.find(\".hawk-sqItem\").length) {\n\n \n\n e.cancelBubble = true;\n\n \n\n e.preventDefault();\n\n \n\n selectedItem = setSelectedItem(suggestDiv, selectedIndex + 1);\n\n \n\n } else {\n\n \n\n hideSuggest(e)\n\n \n\n };\n\n \n\n } else {\n\n \n\n if (key == KEYUP) {\n\n \n\n selectedItem = setSelectedItem(suggestDiv, selectedIndex - 1);\n\n \n\n } else if (key == KEYDOWN) {\n\n \n\n selectedItem = setSelectedItem(suggestDiv, selectedIndex + 1);\n\n \n\n };\n\n \n\n };\n\n \n\n \n\n \n\n return true;\n\n \n\n };\n\n \n\n \n\n \n\n // displays query div and query results\n\n \n\n function showQueryDiv(suggester, autoSuggestResult) {\n\n \n\n var suggestDiv = getSuggestDiv(suggester),\n\n \n\n divNode = suggestDiv[0];\n\n \n\n \n\n \n\n if (autoSuggestResult === null ||\n\n \n\n (\n\n \n\n autoSuggestResult.Count === 0 &&\n\n \n\n autoSuggestResult.ContentCount === 0 &&\n\n \n\n (autoSuggestResult.Categories == null || autoSuggestResult.Categories.length === 0) &&\n\n \n\n (autoSuggestResult.Popular == null || autoSuggestResult.Popular.length === 0)\n\n \n\n )) {\n\n \n\n showSuggest(suggester, false);\n\n \n\n return;\n\n \n\n }\n\n \n\n \n\n \n\n // remove any results that are already there\n\n \n\n while (divNode.childNodes.length > 0)\n\n \n\n divNode.removeChild(divNode.childNodes[0]);\n\n \n\n \n\n \n\n var categories = autoSuggestResult.Categories;\n\n \n\n var popular = autoSuggestResult.Popular;\n\n \n\n var products = autoSuggestResult.Products;\n\n \n\n var content = autoSuggestResult.Content;\n\n \n\n var trackingVersion = autoSuggestResult.TrackingVersion;\n\n \n\n \n\n \n\n var popularHeading = \"Popular Searches\";\n\n \n\n if (autoSuggestResult.PopularHeading != \"\" && autoSuggestResult.PopularHeading != null) {\n\n \n\n popularHeading = autoSuggestResult.PopularHeading;\n\n \n\n }\n\n \n\n \n\n \n\n showTerms(popular, popularHeading, HawkSearch.LilBro.Schema.AutoCompleteClick.AutoCompleteType.popular, suggester, trackingVersion);\n\n \n\n \n\n \n\n var categoryHeading = \"Top Product Categories\";\n\n \n\n if (autoSuggestResult.CategoryHeading != \"\" && autoSuggestResult.CategoryHeading != null) {\n\n \n\n categoryHeading = autoSuggestResult.CategoryHeading;\n\n \n\n }\n\n \n\n showTerms(categories, categoryHeading, HawkSearch.LilBro.Schema.AutoCompleteClick.AutoCompleteType.category, suggester, trackingVersion);\n\n \n\n \n\n \n\n var productsTitle = (products.length == 1 ? \"Top Product Match\" : \"Top \" + products.length + \" Product Matches\");\n\n \n\n if (autoSuggestResult.ProductHeading != \"\" && autoSuggestResult.ProductHeading != null) {\n\n \n\n productsTitle = autoSuggestResult.ProductHeading;\n\n \n\n }\n\n \n\n \n\n \n\n showProducts(suggestDiv, products, productsTitle, trackingVersion);\n\n \n\n \n\n \n\n var contentTitle = (content.length == 1 ? \"Top Content Match\" : \"Top \" + content.length + \" Content Matches\");\n\n \n\n if (autoSuggestResult.ContentHeading != \"\" && autoSuggestResult.ContentHeading != null) {\n\n \n\n contentTitle = autoSuggestResult.ContentHeading;\n\n \n\n }\n\n \n\n \n\n \n\n showContent(suggestDiv, content, contentTitle, trackingVersion);\n\n \n\n \n\n \n\n if (categories.length > 0 || popular.length > 0 || products.length > 0 || content.length > 0) {\n\n \n\n showFooter(suggestDiv, autoSuggestResult, suggester);\n\n \n\n showSuggest(suggester, true);\n\n \n\n }\n\n \n\n \n\n \n\n if (suggester.settings.isMobile) {\n\n \n\n $(suggester.settings.queryDiv).find(\".hawk-sqHeader\").each(function (item) {\n\n \n\n this.style.setProperty(\"color\", \"white\", \"important\");\n\n \n\n this.style.setProperty(\"background\", \"#616161\", \"important\");\n\n \n\n this.style.setProperty(\"text-transform\", \"uppercase\", \"important\");\n\n \n\n this.style.setProperty(\"padding\", \"20px\", \"important\");\n\n \n\n });\n\n \n\n \n\n \n\n $(suggester.settings.queryDiv).find(\".hawk-sqFooter\").each(function (item) {\n\n \n\n this.style.setProperty(\"color\", \"white\", \"important\");\n\n \n\n this.style.setProperty(\"background\", \"#616161\", \"important\");\n\n \n\n this.style.setProperty(\"text-transform\", \"uppercase\", \"important\");\n\n \n\n this.style.setProperty(\"padding\", \"20px\", \"important\");\n\n \n\n });\n\n \n\n \n\n \n\n $(suggester.settings.queryDiv).find(\".hawk-searchQuery\").each(function (item) {\n\n \n\n this.style.setProperty(\"background\", \"rgba(30,30,30,0.8)\", \"important\");\n\n \n\n this.style.setProperty(\"color\", \"white\", \"important\");\n\n \n\n });\n\n \n\n \n\n \n\n $(suggester.settings.queryDiv).find(\".hawk-sqItemName\").each(function (item) {\n\n \n\n this.style.setProperty(\"color\", \"white\", \"important\");\n\n \n\n this.style.setProperty(\"background\", \"transparent\", \"important\");\n\n \n\n });\n\n \n\n \n\n \n\n $(suggester.settings.queryDiv).find(\".hawk-sqItem\").each(function (item) {\n\n \n\n this.style.setProperty(\"color\", \"white\", \"important\");\n\n \n\n this.style.setProperty(\"background\", \"transparent\", \"important\");\n\n \n\n this.style.setProperty(\"text-transform\", \"uppercase\", \"important\");\n\n \n\n this.style.setProperty(\"padding\", \"20px\", \"important\");\n\n \n\n this.style.setProperty(\"border\", \"none\", \"important\");\n\n \n\n \n\n \n\n $(this).hover(function () {\n\n \n\n this.style.setProperty(\"background\", \"#a0a0a0\", \"important\");\n\n \n\n }, function () {\n\n \n\n this.style.setProperty(\"background\", \"inherit\", \"important\");\n\n \n\n });\n\n \n\n });\n\n \n\n \n\n \n\n $(suggester.settings.queryDiv).find(\".hawk-sqContent\").each(function (item) {\n\n \n\n this.style.setProperty(\"color\", \"white\", \"important\");\n\n \n\n this.style.setProperty(\"background\", \"rgba(30,30,30,0.8)\", \"important\");\n\n \n\n this.style.setProperty(\"text-transform\", \"uppercase\", \"important\");\n\n \n\n this.style.setProperty(\"padding\", \"20px\", \"important\");\n\n \n\n this.style.setProperty(\"border\", \"none\", \"important\");\n\n \n\n });\n\n \n\n }\n\n \n\n };\n\n \n\n \n\n \n\n // controls the visibility of the result lookup based on the \"show\" parameter\n\n \n\n function showSuggest(suggester, show) {\n\n \n\n if (show === false) {\n\n \n\n HawkSearch.SuggesterGlobal.items.forEach(function (item) {\n\n \n\n $(item.settings.globalDiv).hide();\n\n \n\n });\n\n \n\n $(\"body\").off(\"click\", hideSuggest);\n\n \n\n } else {\n\n \n\n var suggestDisplay = getSuggestDiv(suggester);\n\n \n\n suggestDisplay.show();\n\n \n\n $(\"body\").on(\"click\", hideSuggest);\n\n \n\n };\n\n \n\n };\n\n \n\n \n\n \n\n // We originally used showSuggest as the function that was called by the onBlur\n\n \n\n // event of the field, but it turns out that Firefox will pass an event as the first\n\n \n\n // parameter of the function, which would cause the div to always be visible.\n\n \n\n function hideSuggest(e) {\n\n \n\n var updatedDisplay = false;\n\n \n\n if (!updatedDisplay && $(e.target).closest(\".hawk-searchQuery\").length <= 0) {\n\n \n\n showSuggest(null, false);\n\n \n\n updatedDisplay = true;\n\n \n\n };\n\n \n\n };\n\n \n\n \n\n \n\n function isEven(num) {\n\n \n\n if (num !== false && num !== true && !isNaN(num)) {\n\n \n\n return num % 2 == 0;\n\n \n\n } else return false;\n\n \n\n };\n\n \n\n \n\n \n\n function showTerms(terms, title, type, suggester, trackingVersion) {\n\n \n\n if (terms.length >= 1) {\n\n \n\n //suggestDiv.empty();\n\n \n\n suggestDivNode = suggester.settings.globalDiv;\n\n \n\n \n\n \n\n // create and append suggest header to suggest container\n\n \n\n var suggestHeader = document.createElement(\"div\");\n\n \n\n suggestHeader.className = \"hawk-sqHeader\";\n\n \n\n suggestHeader.innerHTML = title;\n\n \n\n suggestDivNode.appendChild(suggestHeader);\n\n \n\n \n\n \n\n // set up and append suggest content to suggest container\n\n \n\n var suggestContent = document.createElement(\"ul\");\n\n \n\n suggestContent.className = \"hawk-sqContent\";\n\n \n\n suggestDivNode.appendChild(suggestContent);\n\n \n\n \n\n \n\n // loop through suggest options\n\n \n\n var resultItems = \"\";\n\n \n\n for (var i = 0; i < terms.length; i++) {\n\n \n\n var term = terms[i];\n\n \n\n if (term.Value == null) continue;\n\n \n\n \n\n \n\n var resultItem = document.createElement(\"li\");\n\n \n\n \n\n \n\n resultItem.setAttribute('data-url', term.Url);\n\n \n\n resultItem.setAttribute(\"data-autoCompleteType\", type);\n\n \n\n // check for odd/even alternative styling\n\n \n\n if (isEven(i)) {\n\n \n\n resultItem.className = \"hawk-sqItem term\";\n\n \n\n } else {\n\n \n\n resultItem.className = \"hawk-sqItem hawk-sqItemAlt term\";\n\n \n\n };\n\n \n\n \n\n \n\n var resultItemContent = document.createElement(\"h1\");\n\n \n\n resultItemContent.className = \"hawk-sqItemName\";\n\n \n\n resultItemContent.innerHTML = term.Value\n\n \n\n \n\n \n\n resultItem.appendChild(resultItemContent);\n\n \n\n \n\n \n\n // append results of suggest options to the suggest content container\n\n \n\n suggestContent.appendChild(resultItem);\n\n \n\n };\n\n \n\n \n\n \n\n // find all newly added suggest options\n\n \n\n var suggestItems = $(suggester.settings.globalDiv).find(\".hawk-sqContent .hawk-sqItem\");\n\n \n\n \n\n \n\n // pass suggestItems to 'suggestItemHandler' to handle events\n\n \n\n suggestItemHandler(trackingVersion, suggestItems);\n\n \n\n \n\n \n\n // check to see if query div should show above field\n\n \n\n suggestIsAbove(suggester);\n\n \n\n };\n\n \n\n };\n\n \n\n \n\n \n\n function showProducts(suggestDiv, products, title, trackingVersion) {\n\n \n\n if (products.length >= 1) {\n\n \n\n \n\n \n\n //suggestDiv.empty();\n\n \n\n suggestDivNode = suggestDiv[0];\n\n \n\n \n\n \n\n // create and append suggest header to suggest container\n\n \n\n var suggestHeader = document.createElement(\"div\");\n\n \n\n suggestHeader.className = \"hawk-sqHeader\";\n\n \n\n suggestHeader.innerHTML = title;\n\n \n\n suggestDivNode.appendChild(suggestHeader);\n\n \n\n \n\n \n\n // set up and append suggest content to suggest container\n\n \n\n var suggestContent = document.createElement(\"ul\");\n\n \n\n suggestContent.className = \"hawk-sqContent\";\n\n \n\n suggestDivNode.appendChild(suggestContent);\n\n \n\n \n\n \n\n // loop through suggest options\n\n \n\n for (var i = 0; i < products.length; i++) {\n\n \n\n var product = products[i];\n\n \n\n \n\n \n\n var resultItem = document.createElement(\"li\");\n\n \n\n \n\n \n\n // check for odd/even alternative styling\n\n \n\n if (isEven(i)) {\n\n \n\n resultItem.className = \"hawk-sqItem\";\n\n \n\n } else {\n\n \n\n resultItem.className = \"hawk-sqItem hawk-sqItemAlt\";\n\n \n\n };\n\n \n\n \n\n \n\n resultItem.setAttribute('data-url', product.Url);\n\n \n\n resultItem.setAttribute(\"data-autoCompleteType\", HawkSearch.LilBro.Schema.AutoCompleteClick.AutoCompleteType.product);\n\n \n\n resultItem.innerHTML = product.Html;\n\n \n\n \n\n \n\n // append results of suggest options to the suggest content container\n\n \n\n suggestContent.appendChild(resultItem);\n\n \n\n };\n\n \n\n \n\n \n\n // find all newly added suggest options\n\n \n\n var suggestItems = suggestDiv.find(\".hawk-sqContent .hawk-sqItem\");\n\n \n\n \n\n \n\n // pass suggestItems to 'suggestItemHandler' to handle events\n\n \n\n suggestItemHandler(trackingVersion, suggestItems);\n\n \n\n ;\n\n \n\n };\n\n \n\n };\n\n \n\n \n\n \n\n function showFooter(suggestDiv, autoSuggestResult, suggester) {\n\n \n\n // creating the footer container\n\n \n\n \n\n \n\n var footerContainer = document.createElement(\"div\");\n\n \n\n footerContainer.className = \"hawk-sqFooter\";\n\n \n\n \n\n \n\n //creating the footer link\n\n \n\n var footerLink = document.createElement(\"a\");\n\n \n\n footerLink.href = \"javascript:void(0);\";\n\n \n\n footerLink.setAttribute(\"onclick\", \"window.location='\" + autoSuggestResult.SearchWebsiteUrl + \"?\" + $(\"#hdnhawkkeywordfield\").val() + \"=\" + escape($(suggester.queryField).val()) + HawkSearch.preserveUrlParams() + \"'\");\n\n \n\n \n\n \n\n footerLink.innerHTML = \"View All Matches\";\n\n \n\n \n\n \n\n if (autoSuggestResult.ViewAllButtonLabel != \"\" && autoSuggestResult.ViewAllButtonLabel != null) {\n\n \n\n footerLink.innerHTML = autoSuggestResult.ViewAllButtonLabel;\n\n \n\n }\n\n \n\n \n\n \n\n //creating the footer count\n\n \n\n var footerCount = document.createElement(\"div\");\n\n \n\n footerCount.style.marginTop = \"3px\";\n\n \n\n footerCount.style.fontSize = \".85em\";\n\n \n\n \n\n \n\n var footerCountText = \"\";\n\n \n\n var con = \"\";\n\n \n\n if (autoSuggestResult.Count > 0) {\n\n \n\n footerCountText = autoSuggestResult.Count + \" product(s)\";\n\n \n\n con = \", \";\n\n \n\n }\n\n \n\n \n\n \n\n if (autoSuggestResult.ContentCount > 0) {\n\n \n\n footerCountText += con + autoSuggestResult.ContentCount + \" content item(s)\";\n\n \n\n }\n\n \n\n \n\n \n\n if (footerCountText !== \"\") {\n\n \n\n footerCount.innerHTML = footerCountText;\n\n \n\n footerContainer.appendChild(footerCount);\n\n \n\n } \n\n \n\n \n\n \n\n //appending link and count to container\n\n \n\n footerContainer.appendChild(footerLink);\n\n \n\n \n\n \n\n //appending container to suggestDiv\n\n \n\n suggestDiv.append(footerContainer);\n\n \n\n \n\n \n\n // check to see if query div should show above field\n\n \n\n suggestIsAbove(suggester);\n\n \n\n };\n\n \n\n \n\n \n\n function showContent(suggestDiv, content, title, trackingVersion) {\n\n \n\n if (content.length >= 1) {\n\n \n\n //suggestDiv.empty();\n\n \n\n suggestDivNode = suggestDiv[0];\n\n \n\n \n\n \n\n // create and append suggest header to suggest container\n\n \n\n var suggestHeader = document.createElement(\"div\");\n\n \n\n suggestHeader.className = \"hawk-sqHeader\";\n\n \n\n suggestHeader.innerHTML = title;\n\n \n\n suggestDivNode.appendChild(suggestHeader);\n\n \n\n \n\n \n\n \n\n \n\n // set up and append suggest content to suggest container\n\n \n\n var suggestContent = document.createElement(\"ul\");\n\n \n\n suggestContent.className = \"hawk-sqContent\";\n\n \n\n suggestDivNode.appendChild(suggestContent);\n\n \n\n \n\n \n\n // loop through suggest options\n\n \n\n for (var i = 0; i < content.length; i++) {\n\n \n\n var product = content[i];\n\n \n\n \n\n \n\n var resultItem = document.createElement(\"li\");\n\n \n\n \n\n \n\n // check for odd/even alternative styling\n\n \n\n if (isEven(i)) {\n\n \n\n resultItem.className = \"hawk-sqItem term\";\n\n \n\n } else {\n\n \n\n resultItem.className = \"hawk-sqItem hawk-sqItemAlt term\";\n\n \n\n };\n\n \n\n resultItem.setAttribute('data-url', product.Url);\n\n \n\n resultItem.setAttribute(\"data-autoCompleteType\", HawkSearch.LilBro.Schema.AutoCompleteClick.AutoCompleteType.content);\n\n \n\n resultItem.innerHTML = product.Html\n\n \n\n \n\n \n\n // append results of suggest options to the suggest content container\n\n \n\n suggestContent.appendChild(resultItem);\n\n \n\n };\n\n \n\n \n\n \n\n // find all newly added suggest options\n\n \n\n var suggestItems = suggestDiv.find(\".hawk-sqContent .hawk-sqItem\");\n\n \n\n \n\n \n\n // pass suggestItems to 'suggestItemHandler' to handle events\n\n \n\n suggestItemHandler(trackingVersion, suggestItems);\n\n \n\n };\n\n \n\n };\n\n \n\n \n\n \n\n \n\n \n\n // sets up events for suggest items\n\n \n\n function suggestItemHandler(trackingVersion, suggestItems) {\n\n \n\n // bind mouseenter/mouseleave to suggest options\n\n \n\n // toggles active state on mouseenter\n\n \n\n suggestItems.on(\"mouseenter mouseleave\", function (e) {\n\n \n\n var sqItem = $(e.currentTarget);\n\n \n\n if (e.type === \"mouseenter\") {\n\n \n\n highlightResult(sqItem);\n\n \n\n } else {\n\n \n\n unhighlightResult(sqItem);\n\n \n\n }\n\n \n\n });\n\n \n\n \n\n \n\n // bind 'mousedown' event to suggest options to go to url\n\n \n\n // using 'mousedown' instead of 'click' due to 'blur' event blocking the 'click' event from firing\n\n \n\n suggestItems.off('click').on(\"click\", function (e) {\n\n \n\n SuggestedItemClick(trackingVersion, e);\n\n \n\n });\n\n \n\n };\n\n \n\n \n\n \n\n function SuggestedItemClick(trackingVersion, e) {\n\n \n\n e.preventDefault();\n\n \n\n var suggest_type = $(e.target).closest(\"li\").attr(\"data-autoCompleteType\");\n\n \n\n var name = $(e.target).text().replace(/\\u00bb/g, \"&raquo;\");\n\n \n\n if (name === \"\") {\n\n \n\n name = $(e.target).parents(\".hawk-sqActive\").find(\"div.hawk-sqItemContent h1\").text();\n\n \n\n }\n\n \n\n var itemUrl = $(e.currentTarget).data(\"url\");\n\n \n\n var keyword = $(\"#\" + $(\"#hdnhawkkeywordfield\").val()).val();\n\n \n\n \n\n \n\n if (trackingVersion == HawkSearch.Tracking.Version.v2) {\n\n \n\n HawkSearch.Tracking.writeAutoCompleteClick(keyword, e, suggest_type, name, itemUrl);\n\n \n\n }\n\n \n\n else if (trackingVersion == HawkSearch.Tracking.Version.v2AndSQL) {\n\n \n\n HawkSearch.Tracking.writeAutoCompleteClick(keyword, e, suggest_type, name, itemUrl);\n\n \n\n HawkSearch.Tracking.V1.autosuggestClick(keyword, name, itemUrl, suggest_type);\n\n \n\n }\n\n \n\n else {\n\n \n\n HawkSearch.Tracking.V1.autosuggestClick(keyword, name, itemUrl, suggest_type);\n\n \n\n }\n\n \n\n \n\n \n\n window.location = itemUrl;\n\n \n\n };\n\n \n\n \n\n \n\n // This is called whenever the user clicks one of the lookup results.\n\n \n\n // It puts the value of the result in the queryField and hides the lookup div.\n\n \n\n function selectResult(item) {\n\n \n\n _selectResult(item);\n\n \n\n };\n\n \n\n // This actually fills the field with the selected result and hides the div\n\n \n\n function _selectResult(item) {\n\n \n\n itemUrl = item.data(\"url\");\n\n \n\n window.location = itemUrl;\n\n \n\n };\n\n \n\n \n\n \n\n \n\n \n\n // This is called when a user mouses over a lookup result\n\n \n\n function highlightResult(item) {\n\n \n\n _highlightResult(item);\n\n \n\n };\n\n \n\n // This actually highlights the selected result\n\n \n\n function _highlightResult(item) {\n\n \n\n if (item == null) return;\n\n \n\n item.addClass(\"hawk-sqActive\");\n\n \n\n };\n\n \n\n \n\n \n\n \n\n \n\n // This is called when a user mouses away from a lookup result\n\n \n\n function unhighlightResult(item) {\n\n \n\n _unhighlightResult(item);\n\n \n\n };\n\n \n\n // This actually unhighlights the selected result\n\n \n\n function _unhighlightResult(item) {\n\n \n\n item.removeClass(\"hawk-sqActive\");\n\n \n\n };\n\n \n\n \n\n \n\n \n\n \n\n // Get the number of the result that's currently selected/highlighted\n\n \n\n // (the first result is 0, the second is 1, etc.)\n\n \n\n function getSelectedItem(suggestDiv) {\n\n \n\n var count = -1;\n\n \n\n var sqItems = suggestDiv.find(\".hawk-sqItem\");\n\n \n\n \n\n \n\n if (sqItems) {\n\n \n\n if (sqItems.filter(\".hawk-sqActive\").length == 1) {\n\n \n\n count = sqItems.index(sqItems.filter(\".hawk-sqActive\"));\n\n \n\n };\n\n \n\n }\n\n \n\n return count\n\n \n\n };\n\n \n\n \n\n \n\n \n\n \n\n // Select and highlight the result at the given position\n\n \n\n function setSelectedItem(suggestDiv, selectedIndex) {\n\n \n\n var count = -1;\n\n \n\n var selectedItem = null;\n\n \n\n var first = null;\n\n \n\n var sqItems = suggestDiv.find(\".hawk-sqItem\");\n\n \n\n \n\n \n\n if (sqItems) {\n\n \n\n for (var i = 0; i < sqItems.length; i++) {\n\n \n\n if (first == null) {\n\n \n\n first = sqItems.eq(i);\n\n \n\n };\n\n \n\n \n\n \n\n if (++count == selectedIndex) {\n\n \n\n _highlightResult(sqItems.eq(i));\n\n \n\n selectedItem = sqItems.eq(i);\n\n \n\n } else {\n\n \n\n _unhighlightResult(sqItems.eq(i));\n\n \n\n }\n\n \n\n };\n\n \n\n };\n\n \n\n \n\n \n\n // handle if nothing is select yet to select first\n\n \n\n // or loop through results if at the end/beginning.\n\n \n\n if (selectedItem == null && (selectedIndex < 0)) {\n\n \n\n selectedItem = sqItems.eq(-1);\n\n \n\n _highlightResult(selectedItem);\n\n \n\n } else if (selectedItem == null) {\n\n \n\n selectedItem = first;\n\n \n\n _highlightResult(selectedItem);\n\n \n\n };\n\n \n\n \n\n \n\n return selectedItem;\n\n \n\n };\n\n \n\n }", "initParsers() {\n this.parserRegistry = new ParserRegistry();\n }", "requestNewSuggestions () {\n let delay = atom.config.get('autocomplete-plus.autoActivationDelay')\n\n if (this.delayTimeout != null) {\n clearTimeout(this.delayTimeout)\n }\n\n if (delay) {\n this.delayTimeout = setTimeout(this.findSuggestions, delay)\n } else {\n this.findSuggestions()\n }\n\n this.shouldDisplaySuggestions = true\n }", "async scan(options={},params={}) {\n \n // Generate query parameters with meta data\n const { \n payload,\n EntityProjections,\n TableProjections \n } = this.scanParams(options,params,true)\n\n // If auto execute enabled\n if (options.execute || (this.autoExecute && options.execute !== false)) {\n const result = await this.DocumentClient.scan(payload).promise()\n \n // If auto parse enable\n if (options.parse || (this.autoParse && options.parse !== false)) {\n\n return Object.assign(\n result,\n { \n Items: result.Items && result.Items.map(item => {\n if (this[item[this.Table.entityField]]) {\n return this[item[this.Table.entityField]].parse(\n item,\n EntityProjections[item[this.Table.entityField]] ? EntityProjections[item[this.Table.entityField]]\n : TableProjections ? TableProjections\n : []\n ) \n } else {\n return item\n }\n })\n },\n // If last evaluated key, return a next function\n result.LastEvaluatedKey ? { \n next: () => { \n return this.scan(\n Object.assign(options, { startKey: result.LastEvaluatedKey }), \n params\n ) \n } \n } : null\n )\n } else {\n return result\n }\n } else {\n return payload\n } // end if-else\n }", "searchSuggest(query) {\r\n let finalQuery;\r\n if (typeof query === \"string\") {\r\n finalQuery = { querytext: query };\r\n }\r\n else {\r\n finalQuery = query;\r\n }\r\n return this.create(SearchSuggest).execute(finalQuery);\r\n }", "function autosearch(event, asObj) {\r\n var input = $(event.target).val();\r\n var suggList = asObj.children().filter(\".suggestion-list\");\r\n\r\n // If the text-box has no characters, hide the suggestion list.\r\n if (input.length == 0) {\r\n suggList.css(\"display\", \"none\");\r\n autosearch.prevLen = 0;\r\n autosearch.suggestions = [];\r\n return;\r\n }\r\n\r\n if (autosearch.prevLen > input.length || autosearch.prevLen == 0 || autosearch.suggestions.length == 0) {\r\n var rqstData = { \"input\": input };\r\n\r\n // Run full query (AJAX data request to server).\r\n $.ajax({\r\n method: \"POST\",\r\n url: \"index.aspx/getSuggestedResults\",\r\n data: JSON.stringify(rqstData),\r\n contentType: \"application/json; charset=utf-8\",\r\n dataType: \"json\",\r\n success: function (data) {\r\n\r\n autosearch.suggestions = $.parseJSON(data.d);\r\n \r\n // Empty and hide the suggestions list.\r\n suggList.empty().css(\"display\", \"none\");\r\n\r\n // Update suggestions list.\r\n if (autosearch.suggestions.length > 0) {\r\n $.each(autosearch.suggestions, function (metakey, metavalue) {\r\n $.each(metavalue, function (key, value) {\r\n suggList.html(\r\n suggList.html() + \"<li class=\\\"suggestion-item\\\">\" + value + \"</li>\"\r\n );\r\n });\r\n });\r\n }\r\n\r\n // Display the updated suggestions list.\r\n suggList.css(\"display\", \"table\");\r\n }\r\n });\r\n }\r\n else {\r\n var metaTemp = [];\r\n // Filter existing list of values.\r\n $.each(autosearch.suggestions, function (metakey, metavalue) {\r\n var temp = [];\r\n $.each(metavalue, function (key, value) {\r\n if (value.toLowerCase().indexOf(input.toLowerCase()) != -1) { temp.push(value); }\r\n });\r\n if(temp.length != 0){metaTemp.push(temp);}\r\n });\r\n\r\n autosearch.suggestions = metaTemp;\r\n\r\n // Empty and hide the suggestions list.\r\n suggList.empty().css(\"display\", \"none\");\r\n\r\n // Update suggestions list.\r\n if (autosearch.suggestions.length > 0) {\r\n $.each(autosearch.suggestions, function (metakey, metavalue) {\r\n $.each(metavalue, function (key, value) {\r\n suggList.html(\r\n suggList.html() + \"<li class=\\\"suggestion-item\\\">\" + value + \"</li>\"\r\n );\r\n });\r\n });\r\n }\r\n\r\n // Display the updated suggestions list.\r\n suggList.css(\"display\", \"table\");\r\n }\r\n\r\n // Update static counter variable.\r\n autosearch.prevLen = input.length;\r\n }", "function _create(args) {\n var options = _extend({}, _default, args);\n //-- Set autocomplete on #location input\n var input = options.input || document.getElementById(options.input_id);\n //-- Options for autocomplete\n var opts = options.opts;\n //-- Initiate autocomplete\n var autocomplete = new google.maps.places.Autocomplete(input, opts);\n _instances.push(autocomplete);\n //-- Listen for when a place has been selected from autocomplete\n _event.addListener(autocomplete, 'place_changed', function() {\n var place = autocomplete.getPlace();\n options.onChange(place);\n });\n return autocomplete;\n }", "loadSuggestions(query, endpoint) {\n\n let deferred = this.$q.defer();\n\n if (query != \"*\" && query.length > 1) {\n\n let config = {\n key: query,\n graph_name: this.dataset\n };\n\n let parseResults = function (results) {\n let suggestions = [];\n for (let i = 0; i < results.data.length; ++i) {\n let result = results.data[i];\n result.text = String(result.value) + \" (\" + result.attribute + \")\";\n suggestions[i] = result;\n }\n deferred.resolve(suggestions);\n };\n\n this.$http.post(this.resource + endpoint, config).then(parseResults);\n\n } else if (query == \"*\") {\n\n this.$timeout(function () {\n deferred.resolve([{\n text: \"* (wildcard)\",\n attribute: \"*\",\n name: \"*\"\n }])\n })\n\n }\n\n\n return deferred.promise;\n }", "AutocompleteAdapter() {}", "function AutoComplete(containerID, database, dynamic) {\n\tAutoComplete.prototype = Content;\n\tAutoComplete.prototype.constructor = AutoComplete;\n\t\n\tContent.apply(this, arguments);\n\t\n\tvar thisClass = this;\n\tvar con = Selector.el(containerID);\n\t\n\tvar autoInput;\n\tvar autoContent;\n\tif(con.tagName == Selector.type.INPUT) {\n\t\tautoContent = Selector.create(Selector.type.DIV, containerID + \"ContentCon\");\n\t\tautoInput = con;\n\t\tautoInput.id = containerID + \"Input\";\n\t\t\n\t\tvar parent = autoInput.parentNode;\n\t\tparent.replaceChild(Selector.create(Selector.type.DIV, containerID), autoInput);\n\t\tSelector.el(containerID).appendChild(autoInput);\n\t\t\n\t\tSelector.el(containerID).appendChild(autoContent)\n\n\t\t\n\t} else {\n\t\tautoInput = Selector.create(Selector.type.INPUT, containerID + \"Input\");\n\t\tcon.appendChild(autoInput);\n\t\t\n\t\tautoContent = Selector.create(Selector.type.DIV, containerID + \"ContentCon\");\n\t\tcon.appendChild(autoContent);\n\t\t\n\t}\n\tSelector.addClass(autoInput, \"auto-input\");\n\tautoInput.name = containerID;\n\tautoInput.autocomplete = \"off\";\n\tautoInput.type = \"text\";\n\t\n\tSelector.addClass(autoContent, \"content-con\");\n\tautoContent.style.display = \"none\";\n\t\n\tthis.setDesign('<span>${data}</span>');\n\tthis.setBuilderID(containerID + \"Content\");\n /**\n variable bool: autoHide\n when set to true content will close when user select an item\n */\n\tthis.autoHide = true;\n\tthis.autoFill = true;\n\tthis.autoSetOver = false;\n\t\n \n /** Function: show\n show the input field and content\n \n Parameters:\n x - *[int/string] optional* x position\n y - *[int/string] optional* y position\n \n */\n\tthis.show = function(x, y) {\n\t\tthisClass.showContent();\n\t\tif(thisClass.isDynamic()) {\n thisClass.getExternalContent(autoInput.value, \"data\", function(e) {\n autoContent.innerHTML = e;\n thisClass.activeContent(0);\n });\n } else {\n autoContent.innerHTML = thisClass.getContent(autoInput.value);\n thisClass.activeContent(0);\n }\n\t\t\n\t\tif(x != null)\n\t\t\tcon.style.left = x + \"px\";\n\t\tif(y != null)\n\t\t\tcon.style.top = y + \"px\";\n\t}\n\t\n\t/** FunctionL hide\n hides the autocontent dom element\n\t*/\n\tthis.hide = function() {\n\t\tthisClass.hideContent();\n\t\tautoContent.style.display = \"none\";\n\t}\n\t/** Function: clear\n clears the input field\n\t\t\n\t*/\n\tthis.clear = function() {\n\t\tthisClass.getInput().value = \"\";\n\t}\n\t/** Function: getInput\n get the input field\n\t\t\n Returns:\n the input field\n\t*/\n\tthis.getInput = function() {\n\t\treturn autoInput;\n\t}\n\t/** Function: reload\n force reload the content displayed\n\t\n\t*/\n\tthis.reload = function() {\n\t\tif(thisClass.isDynamic()) {\n thisClass.getExternalContent(autoInput.value, \"data\", function(e) {\n thisClass.showContent();\n autoContent.innerHTML = e;\n thisClass.activeContent(0);\n });\n } else {\n thisClass.showContent();\n autoContent.innerHTML = thisClass.getContent(autoInput.value);\n thisClass.activeContent(0);\n }\n\t}\n\tthisClass.addListener(ContentEvent.CONTENT_SHOW, function(e) {\n\t\tautoContent.style.display = \"block\";\n\t});\n\t\n\tthisClass.addListener(ContentEvent.CONTENT_SELECT, function(e) {\n\t\tif(thisClass.autoHide) {\n\t\t\tthisClass.hide();\n\t\t}\n\t\tif(thisClass.autoFill)\n\t\t\tthisClass.getInput().value = e.data;\n\t});\n\tthisClass.addListener(ContentEvent.CONTENT_OVER, function(e) {\n\t\tif(thisClass.autoSetOver)\n\t\t\tthisClass.getInput().value = e.data;\n\t});\n\tautoInput.onfocus = function(e){\n\t\tthisClass.show();\n\t\t};\n\tautoInput.onblur = function(e){\n\t\tsetTimeout(function(){\n\t\t\t thisClass.hide();\n\t\t}, 150);\n\t}\n autoInput.onkeyup = function(e) {\n var code = thisClass.keyCode(e);\n\t\tswitch(code) {\n\t\t\tcase 9:\n\t\t\t\t // tab\n\t\t\t\t//thisClass.hideContent();\n\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\t // enter\n\t\t\t\t//thisClass.selectContent(thisClass.getCurrentActive());\n\t\t\t\t//thisClass.dispatchEvent(ContentEvent.CONTENT_SELECT, thisClass.getList()[thisClass.getCurrentActive()]);\n\t\t\t\t\n //if(e)\n // e.preventDefault();\n //else\n // window.event.returnValue = false;\n\t\t\tbreak;\n\t\t\tcase 40:\n\t\t\t\t// arrow down\n\t\t\t\t//if(thisClass.getCurrentActive() >= thisClass.getList().length - 1)\n\t\t\t\t//\tthisClass.activeContent(0);\n\t\t\t\t//else\n\t\t\t\t//\tthisClass.activeContent(thisClass.getCurrentActive() + 1);\n\t\t\tbreak;\n\t\t\tcase 38:\n\t\t\t\t// arrow up\n\t\t\t\t//if(thisClass.getCurrentActive() <= 0)\n\t\t\t\t//\tthisClass.activeContent(thisClass.getList().length - 1);\n\t\t\t\t//else\n\t\t\t\t//\tthisClass.activeContent(thisClass.getCurrentActive() - 1);\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// nay other key\n \n if(thisClass.isDynamic()) {\n thisClass.getExternalContent(autoInput.value, \"data\", function(e) {\n thisClass.showContent();\n autoContent.innerHTML = e;\n thisClass.activeContent(0);\n });\n } else {\n thisClass.showContent();\n autoContent.innerHTML = thisClass.getContent(autoInput.value);\n thisClass.activeContent(0);\n }\n\t\t\tbreak;\n\t\t}\n }\n\tautoInput.onkeydown = function(e) {\n\t\tvar code = thisClass.keyCode(e);\n\t\tswitch(code) {\n\t\t\tcase 9:\n\t\t\t\t // tab\n\t\t\t\tthisClass.hideContent();\n\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\t // enter\n\t\t\t\tthisClass.selectContent(thisClass.getCurrentActive());\n\t\t\t\tthisClass.dispatchEvent(ContentEvent.CONTENT_SELECT, thisClass.getList()[thisClass.getCurrentActive()]);\n\t\t\t\t\n if(e)\n e.preventDefault();\n else\n window.event.returnValue = false;\n\t\t\tbreak;\n\t\t\tcase 40:\n\t\t\t\t// arrow down\n\t\t\t\tif(thisClass.getCurrentActive() >= thisClass.getList().length - 1)\n\t\t\t\t\tthisClass.activeContent(0);\n\t\t\t\telse\n\t\t\t\t\tthisClass.activeContent(thisClass.getCurrentActive() + 1);\n\t\t\tbreak;\n\t\t\tcase 38:\n\t\t\t\t// arrow up\n\t\t\t\tif(thisClass.getCurrentActive() <= 0)\n\t\t\t\t\tthisClass.activeContent(thisClass.getList().length - 1);\n\t\t\t\telse\n\t\t\t\t\tthisClass.activeContent(thisClass.getCurrentActive() - 1);\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// nay other key\n\t\t\tbreak;\n\t\t}\n\t}\n}", "set autoParse(val) { this._parse = typeof val === 'boolean' ? val : true }", "function setupDialogAutoComplete(cm, inpElt) { \n function getSearchHistoryHints(inpValue) {\n var res = [];\n var hist = getSearchHistory(cm).getAll();\n for (var i = hist.length - 1; i >= 0; i--) {\n // all search query starts with inpValue, \n // including \"\" as inpValue\n if (!inpValue || hist[i].indexOf(inpValue) === 0) {\n if (res.indexOf(hist[i]) < 0) { // remove duplicates\n res.push(hist[i]); \n }\n }\n }\n // keep the reverse history order\n return res;\n } // function getCodeMirrorCommandHints()\n \n function autoCompleteSearchCmd(event) {\n // if Ctrl-space,\n if (\"Ctrl-Space\" === CodeMirror.keyName(event)) { \n event.preventDefault();\n /// console.debug('Trying to to complete \"%s\"', event.target.value);\n var inpValue = event.target.value;\n var inpElt = event.target;\n CodeMirror.showHint4Dialog(cm, function() {\n var data = {};\n data.list = getSearchHistoryHints(inpValue);\n data.inpElt = inpElt;\n return data;\n }, { pressEnterOnPick: false } ); \n } // if ctrl-space\n } // function autoCompleteSearchCmd(..)\n \n //\n // the main setup logic: add keydown to the input box specified \n // use keydown event rather than keypress to handle some browser compatibility issue\n //\n inpElt.onkeydown = autoCompleteSearchCmd;\n\n } // function setupDialogAutoComplete(..)", "function autoSearchNFix() {\r\n\t\tvar args = autoPlgCmdFix.apply(this, arguments); \r\n\t\tif ( args[args.length - 1] === 'and' || args[args.length - 1] === 'or' ) {\r\n\t\t\tif ( typeof args[args.length - 2] == \"number\" ) {\r\n\t\t\t\targs.splice(args.length - 1, 0, 'S0', true);\r\n\t\t\t} else if ( /S\\d+/.test(args[args.length - 2]) || Array.isArray(args[args.length - 2]) ) {\r\n\t\t\t\targs.splice(args.length - 1, 0, true);\r\n\t\t\t} else if ( !args.some( function( arg ) { return typeof arg === 'number' } ) ) {\r\n\t\t\t\targs.splice(args.length - 1, 0, 0, 0, 'S0', true);\r\n\t\t\t}\r\n\t\t} else if ( typeof args[args.length - 1] === \"string\" || ( Array.isArray(args[args.length - 1]) && typeof args[args.length - 1][0] === \"string\" ) || typeof args[args.length - 1] === \"boolean\" ) {\r\n\t\t\tif ( ( /S\\d+/.test(args[args.length - 1]) || Array.isArray(args[args.length - 1]) ) && args.some( function( arg ) { return typeof arg === 'number' } ) ) { // ('Tom'*, 1, 2, 'S0')\r\n\t\t\t\targs.push(true);\r\n\t\t\t\targs.push('or');\r\n\t\t\t} else if ( typeof args[args.length - 2] == \"number\" ) { // ('Tom'*, 1, 2, 'cond')\r\n\t\t\t\targs.splice(args.length - 1, 0, \"S0\");\r\n\t\t\t\targs.push('or');\r\n\t\t\t} else if ( !args.some( function( arg ) { return typeof arg === 'number' } ) ) { // ('Tom'*)\r\n\t\t\t\targs.push(0);\r\n\t\t\t\targs.push(0);\r\n\t\t\t\targs.push(\"S0\");\r\n\t\t\t\targs.push(true);\r\n\t\t\t\targs.push('or');\r\n\t\t\t} else {\r\n\t\t\t\targs.push('or');\r\n\t\t\t}\t\t\t\t\r\n\t\t} else { // ('Tom'*, 1, 2)\r\n\t\t\targs.push(\"S0\");\r\n\t\t\targs.push(true);\r\n\t\t\targs.push('or');\r\n\t\t};\r\n\t\treturn args;\r\n\t}", "constructor() {\n /**\n *\n * @member {String} suggestion\n */\n this.suggestion = undefined\n /**\n *\n * @member {String} query\n */\n this.query = undefined\n }", "instantiateParser() {\n return new this.ParserClass(this.config);\n }", "AddSearchProvider() {}", "autoComplete () {\n var that = this;\n var autocompleteOn = true;\n GEPPETTO.CommandController.availableTags();\n\n var commandInputAreaEl = $(\"#\" + this.props.id + \"_component #commandInputArea\");\n // bind console input area to autocomplete event\n commandInputAreaEl.bind(\"keydown\", function (event) {\n if (event.keyCode === $.ui.keyCode.TAB\n && $(this).data(\"ui-autocomplete\").menu.active) {\n event.preventDefault();\n }\n if (event.keyCode === $.ui.keyCode.BACKSPACE) {\n autocompleteOn = false;\n }\n })\n .autocomplete({\n minLength: 0,\n delay: 0,\n source: that.matches.bind(that),\n focus: function () {\n // prevent value inserted on focus\n return false;\n },\n open: function (event, ui) {\n if (autocompleteOn) {\n var suggestions = $(this).data(\"uiAutocomplete\").menu.element[0].children\n , firstElement = suggestions[0]\n , inpt = commandInputAreaEl\n , original = inpt.val()\n , firstElementText = $(firstElement).text()\n , suggestionsSize = suggestions.length;\n /*\n * here we want to make sure that we're not matching something that doesn't start\n * with what was typed in\n */\n if (firstElementText.toLowerCase().indexOf(original.toLowerCase()) === 0) {\n\n // only one suggestion\n if (suggestionsSize == 1) {\n if (inpt.val() !== firstElementText) {\n inpt.val(firstElementText); // change the input to the first match\n\n inpt[0].selectionStart = original.length; // highlight from beginning of input\n inpt[0].selectionEnd = firstElementText.length;// highlight to the end\n }\n } else {\n // match multiple suggestions\n if (inpt.val() !== \"\") {\n let mostCommon;\n var elementsText = [];\n for (var i = 0; i < suggestionsSize; i++) {\n elementsText[i] = $(suggestions[i]).text();\n }\n var A = elementsText.slice(0).sort(),\n word1 = A[0], word2 = A[A.length - 1],\n i = 0;\n if (word1 != word2) {\n while (word1.charAt(i) == word2.charAt(i)){\n ++i;\n }\n // match up most common part\n mostCommon = word1.substring(0, i);\n } else {\n mostCommon = word1;\n }\n\n if (inpt.val().indexOf(mostCommon) == -1) {\n inpt.val(mostCommon);// change the input to the first match\n\n inpt[0].selectionStart = original.length; // highlight from end of input\n inpt[0].selectionEnd = mostCommon.length;// highlight to the end\n }\n }\n }\n }\n } else {\n autocompleteOn = true;\n }\n }\n });\n }", "function autoPopulate(next) {\n this.populate('reviews');\n next();\n}", "function setupAutoComplete() {\n autocomplete = new google.maps.places.Autocomplete(\n (document.getElementById('autocomplete')) /*,\n {types: ['geocode']}*/ );\n }", "search(queryStr) {\n\n this.queryStr = queryStr;\n this.saveQueryStr();\n let normalizedQueryStr = RefSearchQuery.normalizeQueryStr(queryStr);\n\n this.results.length = 0;\n // Always select the first result when the search query changes\n this.selectedResultIndex = 0;\n\n if (normalizedQueryStr === '') {\n this.isLoadingResults = false;\n this.onUpdateSearchStatus();\n return;\n }\n\n return this.searchByRef(normalizedQueryStr);\n\n }", "function initSearchBox(options) {\n // Invoke auto complete for search box\n var searchOptions = {\n data: options,\n list: {\n maxNumberOfElments: 0,\n match: {enabled: true},\n onChooseEvent: function () {\n searchChooseItem();\n }\n }\n };\n searchInput.easyAutocomplete(searchOptions);\n\n // Start searching when typing in search box\n searchInput.on(\"input\", function (e) {\n e.preventDefault();\n searchChooseItem();\n });\n }", "GetItemAutocomplete() {\n return {\n method: 'GET',\n path: '/contact/autocomplete/{string}',\n config: {\n description: 'Get contact by some sub string of the name',\n notes: 'Returns the contacts which match the name of the substring passed',\n tags: ['api'],\n /*pre: [{\n method: BaseController.Authorize(['general'])\n }],*/\n handler: (request, reply) => {\n return this.BaseGetItemsAutocompleteHandler(this.GetCollectionName(), request.params.string)\n .then((item) => {\n reply(item);\n })\n .catch((err) => {\n reply(Boom.wrap(err, 400));\n })\n },\n validate: {\n params: {\n string: joi.string().required().description(\"Filter contact by substring of the name \"),\n }\n }\n }\n };\n }", "function initAutocomplete() {\n\n // Create the autocomplete object, restricting the search predictions to\n // geographical location types.\n autocomplete = new google.maps.places.Autocomplete(\n document.getElementById('autocomplete'), {types: ['geocode'], componentRestrictions: {country: 'au'}});\n \n // Avoid paying for data that you don't need by restricting the set of\n // place fields that are returned to just the address components.\n autocomplete.setFields(['formatted_address']);\n \n // When the user selects an address from the drop-down, populate the\n // address fields in the form.\n autocomplete.addListener('place_changed', fillInAddress);\n }", "function DocScannerConfig() { }", "function autoPopulate(next) {\n this.populate('reviews');\n next();\n}", "function initAutocomplete() {\n autoComplete = new google.maps.places.Autocomplete(\n document.getElementById('address_autocomplete'),\n {types: []}\n );\n\n // Upon selecting address, populate form fields\n autoComplete.addListener('place_changed', fillInAddress);\n }", "function initAutoComplete(){\n // jQuery(\"#contact_sphinx_search\")\n // jQuery(\"#account_sphinx_search\")\n // jQuery(\"#campaign_sphinx_search\")\n // jQuery(\"#opportunity_sphinx_search\")\n // jQuery(\"#matter_sphinx_search\")\n jQuery(\"#search_string\").keypress(function(e){\n if(e.which == 13){\n searchInCommon();\n return jQuery(\".ac_results\").fadeOut();\n }\n });\n\n jQuery(\"#lawyer_search_query\").keypress(function(e){\n if(e.which == 13){\n searchLawyer();\n return jQuery(\".ac_results\").fadeOut();\n }\n });\n}", "function initAutocomplete() {\n // Create the autocomplete object, restricting the search predictions to\n // geographical location types.\n autocomplete = new google.maps.places.Autocomplete(\n document.getElementById('autocomplete'), {types: ['geocode']});\n\n // Avoid paying for data that you don't need by restricting the set of\n // place fields that are returned to just the address components.\n autocomplete.setFields(['address_component']);\n}", "function Plugin( option ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tvar $this = $( this );\n\t\t\t\tvar data = $this.data( 'wf.search' );\n\t\t\t\tvar options = typeof option === 'object' && option;\n\n\t\t\t\tif ( !data && /destroy|hide/.test( option ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( !data ) {\n\t\t\t\t\t$this.data( 'wf.search', ( data = new Search( this, options ) ) );\n\t\t\t\t}\n\t\t\t\tif ( typeof option === 'string' ) {\n\t\t\t\t\tdata[ option ]();\n\t\t\t\t}\n\t\t\t} );\n\t\t}", "constructor(dispatcher) {\n super(dispatcher);\n\n\n // All suggestions\n this.suggestions = new List();\n }", "constructor(mongoose) {\n // This is the schema we need to store suggestion in MongoDB\n const suggestionSchema = new mongoose.Schema({\n title:String,\n description:String,\n suggestion: String,\n date: Date,\n username: String,\n signatures : Number,\n usersignature: [{user:String, userdate:Date}]\n });\n\n // This model is used in the methods of this class to access kittens\n this.suggestionModel = mongoose.model('suggestion', suggestionSchema);\n }", "function initAutoComplete() {\n\n autocomplete = new google.maps.places.Autocomplete(heroSearchEle, {\n types: ['geocode']\n });\n\n //Get Lat, Lng: When user selects from dropdown\n google.maps.event.addListener(autocomplete, 'place_changed', function() {\n getLatLng();\n });\n}", "function suggest(id, engine, title, terms) {\n var $suggest = $(\"#\" + id).find(\".result:not(.default):not(.suggest)\").first();\n\n $suggest.addClass(\"suggest\").\n attr({\"title\" : _convertTitle(title)}).\n data({ \"type\" : \"suggest\", \"terms\" : title }).\n append(\n $(\"<span class='search'/>\").text(\"search\"),\n $(\"<span class='terms'/>\").html(highlight(title, terms))\n );\n}", "initialize() {\n return new Promise(resolve => {\n if (SpellingAnalyzer.initialized) {\n resolve(SpellingAnalyzer.initialized);\n } else {\n spellConfig.initialise(this.configurationFile, () => {\n spellcheck.initialise(opts);\n\n spellConfig\n .getGlobalWords()\n .forEach(x => spellcheck.addWord(x, /* temporary: */ true));\n\n SpellingAnalyzer.initialized = true;\n\n resolve(!SpellingAnalyzer.initialized);\n });\n }\n });\n }", "function Suggester(props) {\n var _this;\n\n _classCallCheck(this, Suggester);\n\n _this = _super.call(this);\n _this.state = {\n suggestions: [],\n selectedIndex: 0,\n startPoint: 1,\n // Can't trigger on 0, as first char will always be triggering char\n triggered: false,\n text: \"\",\n triggeredKey: null\n };\n _this.startState = _objectSpread({}, _this.state);\n _this.getSuggestions = Object(_LinoUtils__WEBPACK_IMPORTED_MODULE_7__[\"debounce\"])(_this.getSuggestions.bind(_assertThisInitialized(_this)), 100);\n _this.showSuggestions = _this.showSuggestions.bind(_assertThisInitialized(_this));\n _this.onStart = _this.onStart.bind(_assertThisInitialized(_this));\n _this.onType = _this.onType.bind(_assertThisInitialized(_this));\n _this.renderSuggestion = _this.renderSuggestion.bind(_assertThisInitialized(_this));\n _this.stopDialogClose = _this.stopDialogClose.bind(_assertThisInitialized(_this));\n return _this;\n }", "initAutoComplete() {\n if ($(\"#banner-search-bar\").length) {\n this.initAutoCompleteOn($('#banner-search-bar'));\n }\n this.initAutoCompleteOn($('#header-search-bar'));\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this);\n var data = $this.data('wf.search');\n var options = typeof option === 'object' && option;\n\n if (!data && /destroy|hide/.test(option)) {\n return;\n }\n if (!data) {\n $this.data('wf.search', (data = new Search(this, options)));\n }\n if (typeof option === 'string') {\n data[option]();\n }\n });\n }", "getSuggestionEngine (action, length) {\n const searchEngine = new Bloodhound({\n datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'),\n queryTokenizer: Bloodhound.tokenizers.whitespace,\n remote: {\n url: $.ajaxSettings.url,\n prepare (query, settings) {\n settings.type = 'POST'\n settings.contentType = 'application/x-www-form-urlencoded; charset=UTF-8'\n settings.data = {\n fork: {\n module: 'Search',\n action: action,\n language: Config.getCurrentLanguage()\n },\n term: query,\n length: length\n }\n return settings\n },\n filter (searchResults) {\n // Map the remote source JSON array to a JavaScript array\n return $.map(searchResults.data, (result) => {\n if (action === 'Autocomplete') {\n return {\n value: result.term,\n num_results: result.num_results,\n url: result.url\n }\n } else {\n return {\n id: result.id,\n value: result.title,\n description: result.text,\n url: result.full_url\n }\n }\n })\n }\n }\n })\n return searchEngine\n }", "function autosuggest() {\n /** Variables for Autocomplete */\n var input = document.getElementById('searchTextField');\n var options = {componentRestrictions: {country: 'US'}};\n var autocomplete = new google.maps.places.Autocomplete(input, options);\n\n /** Creates listener for when place changes */\n google.maps.event.addListener(autocomplete, 'place_changed', function (){\n /** Initialize variable to store formatted input address */\n address = autocomplete.getPlace().formatted_address;\n /** Convert given address to geocode */\n geocoder.geocode({address: address}, function(results, status){\n if (status == google.maps.GeocoderStatus.OK){\n /** Get first result */\n var locData = results[0].geometry.location;\n /** Set new geocode based off of location input */\n var lat = String(locData.lat());\n var lng = String(locData.lng());\n /** Set new location */\n loc = new google.maps.LatLng(lat, lng);\n /** Perform new search with given location */\n initialize(loc);\n /** Pins the given location with a blue marker */\n pin(loc);\n }\n });\n });\n}", "parseEntitySuggestData(response) {\n const docs = [];\n\n const numItems = (response.response.suggestions.length <= 10) ? response.response.suggestions.length : 10;\n\n for (let i = 0; i < numItems; i++) {\n if (response.response.suggestions[i]) {\n docs.push({library: response.response.suggestions[i].suggestion});\n }\n }\n\n return {\n index: response.params.method,\n docs: docs,\n query: response.params.qs.query\n };\n }", "function engineWithDefaults(query_string, sync, async)\n\t{\n\t\tif (query_string === '')\n\t\t{\n\t\t\t//sync(engine.get('1090217586', '58502284', '10273252', '24477185'));\n\t\t\tasync([]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tengine.search(query_string, sync, async);\n\t\t}\n\t}", "async function doParseParts(options) {\n const { pageUrl } = options;\n\n process.stdout.write('Fetching your URL... ');\n const page = await util.fetchPage(pageUrl);\n process.stdout.write(chalk.green('Success!\\n'));\n\n log('Scraping for search terms...');\n const searchTerms = util.scrapeSearchTerms(page, options.selector.split(','))\n .map(searchString => util.cleanSearchString(searchString));\n\n if (!searchTerms.length) {\n log(chalk.red('Found zero search terms using your query selectors.'));\n return process.exit(1);\n }\n log(chalk.green(`Found ${searchTerms.length} search terms:`));\n searchTerms.forEach((searchTerm) => {\n log(` - ${chalk.blue(searchTerm)}`);\n });\n\n // ask user to confirm that search terms look right\n if (!process.env.NO_CONFIRM) {\n const abort = await util.ask('Look OK? Hit enter to continue...');\n if (abort) {\n return process.exit(0);\n }\n }\n\n log();\n\n // add searchTerms to the options object and pass it on\n return Object.assign({}, options, {\n searchTerms,\n });\n}", "autocomplete(argv) {\n const RESERVED_STARTING_KEYWORDS = ['--completion', '--completion-fish', '--compzsh', '--compbash', '--compfish'];\n const firstArg = argv[2];\n\n if (RESERVED_STARTING_KEYWORDS.includes(firstArg)) {\n // lazy require\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const omelette = require('omelette');\n\n const executableName = _path.default.basename(argv[1], '.js');\n\n const completion = omelette(executableName);\n completion.on('complete', (_f, event) => {\n this.autocompleteHandleEvent(event);\n }); // omelette will call process.exit(0)\n\n completion.init();\n }\n\n return this;\n }", "function autoPairFnBuilder( options ){\n options = options || {};\n options.createPair = options.createPair || function _defaultCreatePair( params ){\n params = params || {};\n var a = params.listA.splice( params.indexA, 1 )[0],\n b = params.listB.splice( params.indexB, 1 )[0],\n aInBIndex = params.listB.indexOf( a ),\n bInAIndex = params.listA.indexOf( b );\n if( aInBIndex !== -1 ){ params.listB.splice( aInBIndex, 1 ); }\n if( bInAIndex !== -1 ){ params.listA.splice( bInAIndex, 1 ); }\n return this._pair( a, b, { silent: true });\n };\n // compile these here outside of the loop\n var _regexps = [];\n function getRegExps(){\n if( !_regexps.length ){\n _regexps = [\n new RegExp( this.filters[0] ),\n new RegExp( this.filters[1] )\n ];\n }\n return _regexps;\n }\n // mangle params as needed\n options.preprocessMatch = options.preprocessMatch || function _defaultPreprocessMatch( params ){\n var regexps = getRegExps.call( this );\n return _.extend( params, {\n matchTo : params.matchTo.name.replace( regexps[0], '' ),\n possible : params.possible.name.replace( regexps[1], '' )\n });\n };\n\n return function _strategy( params ){\n this.debug( 'autopair _strategy ---------------------------' );\n params = params || {};\n var listA = params.listA,\n listB = params.listB,\n indexA = 0, indexB,\n bestMatch = {\n score : 0.0,\n index : null\n },\n paired = [];\n //console.debug( 'params:', JSON.stringify( params, null, ' ' ) );\n this.debug( 'starting list lens:', listA.length, listB.length );\n this.debug( 'bestMatch (starting):', JSON.stringify( bestMatch, null, ' ' ) );\n\n while( indexA < listA.length ){\n var matchTo = listA[ indexA ];\n bestMatch.score = 0.0;\n\n for( indexB=0; indexB<listB.length; indexB++ ){\n var possible = listB[ indexB ];\n this.debug( indexA + ':' + matchTo.name );\n this.debug( indexB + ':' + possible.name );\n\n // no matching with self\n if( listA[ indexA ] !== listB[ indexB ] ){\n bestMatch = options.match.call( this, options.preprocessMatch.call( this, {\n matchTo : matchTo,\n possible: possible,\n index : indexB,\n bestMatch : bestMatch\n }));\n this.debug( 'bestMatch:', JSON.stringify( bestMatch, null, ' ' ) );\n if( bestMatch.score === 1.0 ){\n this.debug( 'breaking early due to perfect match' );\n break;\n }\n }\n }\n var scoreThreshold = options.scoreThreshold.call( this );\n this.debug( 'scoreThreshold:', scoreThreshold );\n this.debug( 'bestMatch.score:', bestMatch.score );\n\n if( bestMatch.score >= scoreThreshold ){\n //console.debug( 'autoPairFnBuilder.strategy', listA[ indexA ].name, listB[ bestMatch.index ].name );\n paired.push( options.createPair.call( this, {\n listA : listA,\n indexA : indexA,\n listB : listB,\n indexB : bestMatch.index\n }));\n //console.debug( 'list lens now:', listA.length, listB.length );\n } else {\n indexA += 1;\n }\n if( !listA.length || !listB.length ){\n return paired;\n }\n }\n this.debug( 'paired:', JSON.stringify( paired, null, ' ' ) );\n this.debug( 'autopair _strategy ---------------------------' );\n return paired;\n };\n}", "function createSuggest(controlId, options, queryFieldId, queryParameters) {\n options.source = function(request, response) {\n var queryData = {};\n queryData.methodToCall = 'performFieldSuggest';\n queryData.skipViewInit = 'true';\n queryData.formKey = jq(\"input#formKey\").val();\n queryData.queryTerm = request.term;\n queryData.queryFieldId = queryFieldId;\n\n for (var parameter in queryParameters) {\n queryData['queryParameter.' + parameter] = coerceValue(queryParameters[parameter]);\n }\n\n jq.ajax({\n url: jq(\"form#kualiForm\").attr(\"action\"),\n dataType: \"json\",\n beforeSend: null,\n complete: null,\n error: null,\n data: queryData,\n success: function (data) {\n response(data.resultData);\n }\n });\n };\n\n jq(document).ready(function() {\n jq(\"#\" + controlId).autocomplete(options);\n });\n}", "function _mod_search() {\n\t\"use strict\";\n\t// private section - following fields and functions are private and need to be accessed by methods provided in the public section\n\tvar _inputId;\n\tvar autoComplete = {};\n\n\tautoComplete.suggestion = {};\n\tautoComplete.suggestion.tags = [];\n\tautoComplete.suggestion.id = [];\n\tautoComplete.dictionaryTags = [];\n\n\t/****\n\t * create a completely new tag\n\t * @param id of the corresponding html list element\n\t * @param tag to be linked to the id\n\t * @return {Object}\n\t */\n\tfunction newIdTagPair(id, tag) {\n\t\tvar liElem = {};\n\t\tliElem.id = id;\n\t\tliElem.tags = [];\n\t\tliElem.tags.push(tag);\n\t\treturn liElem;\n\t}\n\n\t/****\n\t * filters a list while typing text into an input field and hides all\n\t * list items that don't match to the search string.\n\t * @param searchStr string that is currently in the search field (others would be possible to, but mostly senseless)\n\t * @param listRootId list to be filterd\n\t */\n\tfunction searchFilter(searchStr, listRootId) {\n\t\tvar match;\n\t\tvar searchIndex;\n\t\tvar i, j;\n\t\tvar nodeJQ;\n\t\tvar visibleNodes = [];\n\n\t\t// show all\n\t\tif (!searchStr || searchStr === \"\") {\n\t\t\tjQuery(\"#\" + listRootId).find(\"li\").andSelf().show();\n\t\t}\n\n\t\tsearchStr = searchStr.toLowerCase();\n\n\n\t\t// hide all nodes while traversing\n\t\t// not to nice implemented ;)\n\t\tfor (i = autoComplete.dictionaryTags.length - 1; i >= 0; i--) {\n\t\t\tnodeJQ = jQuery(\"#\" + autoComplete.dictionaryTags[i].id);\n\t\t\t//console.log(autoComplete.dictionaryTags[i].tags[0])\n\t\t\tmatch = null;\n\t\t\tfor (j = 0; j < autoComplete.dictionaryTags[i].tags.length; j++) {\n\t\t\t\tsearchIndex = autoComplete.dictionaryTags[i].tags[j].toLowerCase().match(searchStr);\n\t\t\t\tif (searchIndex) {\n\t\t\t\t\tmatch = nodeJQ;\n\t\t\t\t\t//select node in tree to highlight\n\t\t\t\t\tif (searchIndex === 0 && autoComplete.dictionaryTags[i].tags[j].length === searchStr.length) {\n\t\t\t\t\t\tMYAPP.tree.select_node(jQuery(\"#\" + autoComplete.dictionaryTags[i].id));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnodeJQ.hide();\n\n\t\t\tif (match) {\n\t\t\t\tvisibleNodes.push(match);\n\t\t\t}\n\t\t}\n\n\t\t// show matching nodes and all their parents\n\t\t// !!! todo: the method parents gos up to the html root but it should stop at the top of the list\n\t\tfor (i = visibleNodes.length - 1; i >= 0; i--) {\n\t\t\tvisibleNodes[i].parents(\"#treeList li\").andSelf().show();\n\t\t}\n\t}\n\n\t// private section END\n\n\n\t// public section\n\t// all methods that give access to the private fields and allow to process the menu\n\treturn {\n\t\t/****\n\t\t * @param treeRootId\n\t\t * id of the root of the list that should be filtered\n\t\t * @param inputId\n\t\t * id of the input field in witch should get the autocompleate function\n\t\t * @param dictionaryTags\n\t\t * an array that looks as followed:\n\t\t * [ { id: ... , tags: [..., ...]}, { id: ... , tags: [..., ...]} ]\n\t\t * the id is the id of the li element that should be processed,\n\t\t * the tag is an array with corresponding strings (if the search string matches\n\t\t * any of the tag string or tag substring in any position the li element is displayed.\n\t\t * if there is no match at all the li element will be hidden.\n\t\t *\n\t\t */\n\t\tinitSearch : function (treeRootId, inputId, dictionaryTags) {\n\t\t\tvar i, j;\n\n\t\t\tdictionaryTags = dictionaryTags || [];\n\t\t\t_inputId = inputId;\n\t\t\tautoComplete.dictionaryTags = dictionaryTags;\n\n\t\t\tfor (i = 0; i < dictionaryTags.length; i++) {\n\t\t\t\tfor (j = 0; j < dictionaryTags[i].tags.length; j++) {\n\t\t\t\t\tautoComplete.suggestion.tags.push(dictionaryTags[i].tags[j]);\n\t\t\t\t\tautoComplete.suggestion.id.push(dictionaryTags[i].id);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tjQuery(\"#\" + inputId).autocomplete({\n\t\t\t\tsource : autoComplete.suggestion.tags,\n\t\t\t\tselect : function (event, ui) {\n\t\t\t\t\tif (ui.item) {\n\t\t\t\t\t\tvar i = jQuery.inArray(ui.item.value, autoComplete.suggestion.tags);\n\t\t\t\t\t\tvar node = jQuery(\"#\" + autoComplete.suggestion.id[i]);\n\t\t\t\t\t\tMYAPP.tree.select_node(node);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\talert(\"Dieses Element ist im Objekt nicht enthalten.\");\n\t\t\t\t\t}\n\t\t\t\t\t//alert(ui.item ? ui.item.value: \"Nothing selected, input was \" + this.value );\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tjQuery(\"#\" + inputId).keyup(function () {\n\t\t\t\t//alert(\"\")\n\t\t\t\tsearchFilter(jQuery(\"#\" + inputId).val(), treeRootId);\n\t\t\t});\n\t\t\t// filter when x is pressed\n\t\t\tjQuery(\"#\" + inputId).parent().children(\".ui-input-clear\").mouseup(function () {\n\t\t\t\tsearchFilter(\"\", treeRootId);\n\t\t\t});\n\n\t\t},\n\t\t/****\n\t\t * push a new tag to the data set that is used to filter the html list\n\t\t * and to the data set that is the base for the autoComplete suggestions\n\t\t * @param id of the corresponding list element\n\t\t * @param tag that is being linked to the tag\n\t\t */\n\t\tpushTag : function (id, tag) {\n\t\t\tvar i;\n\t\t\tvar index = -1;\n\n\t\t\t//console.log(\" id \" + id + \" tag \" + tag + \" _inputId \" + _inputId)\n\t\t\tif (typeof id !== \"string\" || typeof tag !== \"string\") {\n\t\t\t\tconsole.error(\"data to push are not valid (mod_search->method pushTag(id, tag)\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor (i = 0; i < autoComplete.dictionaryTags.length; i++) {\n\t\t\t\tif (autoComplete.dictionaryTags[i].id.match(id)) {\n\t\t\t\t\tindex = i;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (-1 < index) { // element with the submitted id already exists\n\t\t\t\tautoComplete.dictionaryTags[index].tags.push(tag);\n\t\t\t\t/*\n\t\t\t\t console.log(\n\t\t\t\t autoComplete.dictionaryTags[index].id[0] + \" --- \" +\n\t\t\t\t autoComplete.dictionaryTags[index].tags[0] + \" --- \" +\n\t\t\t\t autoComplete.dictionaryTags[index].id[1] + \" --- \" +\n\t\t\t\t autoComplete.dictionaryTags[index].tags[1]\n\t\t\t\t )\n\t\t\t\t */\n\t\t\t}\n\t\t\telse { // create new entry\n\t\t\t\tautoComplete.dictionaryTags.push(newIdTagPair(id, tag));\n\t\t\t\t//console.log(newIdTagPair(id, tag).id + \" --- \" + autoComplete.dictionaryTags[testI].id + \" --- \" + autoComplete.dictionaryTags[testI].tags[0] )\n\t\t\t}\n\n\t\t\tautoComplete.suggestion.tags.push(tag);\n\t\t\tautoComplete.suggestion.id.push(id);\n\n\t\t\t//console.log( autoComplete.suggestion.id[testI] + \" --- \" + autoComplete.suggestion.tags[testI] ) ;\n\t\t\t//console.log( id + \" --- \" + tag ) ;\n\n\t\t\tjQuery(\"#\" + _inputId).autocomplete('option', 'source', autoComplete.suggestion.tags);\n\t\t}\n\t};\n\t// public section END (return end)\n}", "function Suggestions() {\n}", "function initAutocomplete() {\n console.log('initAutocomplete => fired!', 'addressAutofillInstances', addressAutofillInstances);\n isMapsScriptLoaded = true;\n addressAutofillInstances.forEach(function (instance) {\n instance.init();\n });\n}", "function typeahead_initialize() {\n var cityAirports = new Bloodhound({\n datumTokenizer: Bloodhound.tokenizers.whitespace,\n queryTokenizer: Bloodhound.tokenizers.whitespace,\n \n remote: {\n url: '/airports/autocomplete?query=%QUERY',\n wildcard: '%QUERY',\n }\n });\n \n $('.query').typeahead(null, {\n source: cityAirports,\n limit: 10\n });\n}", "function autocompleteSearch(searchString) {\n rawString = convertToRawString(searchString);\n autoOptions = trie.getWords(rawString, 5);\n var options = '';\n for(var i = 0; i < autoOptions.length; i++) {\n option = tagsDict[autoOptions[i]]\n options += '<option value=\"'+option+'\" />';\n }\n \n document.getElementById('search-autocomplete').innerHTML = options;\n}", "function PopulateOptions(obj) {\n this.path = obj.path;\n this.match = obj.match;\n this.select = obj.select;\n this.options = obj.options;\n this.model = obj.model;\n if (typeof obj.subPopulate === 'object') {\n this.populate = obj.subPopulate;\n }\n if (obj.justOne != null) {\n this.justOne = obj.justOne;\n }\n if (obj.count != null) {\n this.count = obj.count;\n }\n this._docs = {};\n}", "populate(obj)\n\t{\n\t\tlet path = obj.path;\n\t\tlet select = obj.select;\n\t\tlet match = obj.match;\n\n\t\tthis._populate(path,select,match);\n\n\t\treturn this;\n\t}", "function autopopulate(next){\n this.populate('reviews');\n next();\n}", "function run_search() {\n var q = $(elem).val();\n if (!/\\S/.test(q)) {\n // Empty / all whitespace.\n show_results({ result_groups: [] });\n } else {\n // Run AJAX query.\n closure[\"working\"] = true;\n $.ajax({\n url: \"/search/_autocomplete\",\n data: {\n q: q\n },\n success: function(res) {\n closure[\"working\"] = false;\n show_results(res);\n }, error: function() {\n closure[\"working\"] = false;\n }\n })\n }\n }", "add(name, getter) {\n this._finders[name] = {\n getName: getter,\n ran: false\n };\n return this;\n }", "configure(...args) {\n this.instance = new OptimizelyManager(...args);\n }", "function parse(opts) {\n\t\tif (typeof(opts) != \"object\") opts = {};\n\t\tthis.options = opts;\n\t\tthis.build();\n\t}", "get Auto() {}", "function initAutocomplete() {\n autocomplete = new google.maps.places.Autocomplete(\n /** @type {!HTMLInputElement} */\n (document.getElementById(\"location\")), {\n types: [\"geocode\"]\n });\n autocomplete.addListener(\"place_changed\", callbackPlace);\n}", "function enableAutocomplete() {\n /** @type {Model|User|*} */\n db.User = require('./user')();\n /** @type {Model|Recipe|*} */\n db.Recipe = require('./recipe')();\n /** @type {Model|Recipe|*} */\n db.Status = require('./status')();\n /** @type {Model|Recipe|*} */\n db.MealPlan = require('./status')();\n /** @type {Model|Recipe|*} */\n db.Ingredient = require('./ingredient')();\n /** @type {Model|Recipe|*} */\n db.GroceryList = require('./grocerylist')();\n\n throw new Error('this function for IDE autocomplete');\n}", "search (modelName, query, options, directives) {\n assert(`You need to pass a model name to the store's search method`, isPresent(modelName));\n assert(`You need to pass a query hash to the store's search method`, query);\n assert(\n `Passing classes to store methods has been removed. Please pass a dasherized string instead of ${modelName}`,\n typeof modelName === 'string'\n );\n\n let adapterOptionsWrapper = {};\n\n if (options && options.adapterOptions) {\n adapterOptionsWrapper.adapterOptions = options.adapterOptions;\n }\n\n let normalizedModelName = DS.normalizeModelName (modelName);\n return this._search (normalizedModelName, query, null, adapterOptionsWrapper, directives);\n }", "function initVisStatic() {\n // Autocomplete for hashtags.\n var options = {\n url: function(phrase) {\n return baseURL + hashtagURL + \"?phrase=\" + phrase;\n },\n list: {\n maxNumberOfElements: 15,\n match: {\n enabled: true\n },\n onClickEvent: function() {\n var value = $(\"#search-hashtag\").getSelectedItemData();\n params.hashtag = value;\n console.log(params);\n queryTweets(params);\n }\n },\n placeholder: \"type a hashtag\",\n requestDelay: 500,\n theme: \"square\"\n };\n $(\"#search-hashtag\").easyAutocomplete(options);\n }", "function AutoFactory() {}", "init() {\n //this.router.get(\"/search/:search\", this.search);\n this.router.get(\"/\", this.search);\n }", "constructor(type, parser) { \n this.parser = parser\n this.type = type\n }", "_createRecognizer(base, options) {\n var recognizer = new base.constructor(options);\n\n for (var _len = arguments.length, inheritances = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n inheritances[_key - 2] = arguments[_key];\n }\n\n inheritances.push(base);\n inheritances.forEach(item => recognizer.recognizeWith(item));\n return recognizer;\n }", "function service(mongoURL, request, response) {\r\n\r\n const search = request.params[0]; // user's search text.\r\n const apikey = '<GOOGLE-CUSTOM-SEARCH-API-KEY>'; // google search api key.\r\n const searchengineID = '<GOOGLE-CUSTOM-SEARCH-ENGINE-ID>'; // google search engine ID.\r\n const offset = (request.query.offset); // assign value of parameter 'offset' to the offset variable.\r\n let url = createURL(search, apikey, searchengineID, offset); // pass all above variables into createURL function to generate the appropriate URL.\r\n \r\n addToSearchHistory(mongoURL, search, new Date); // adds search query, along with search date, to the mongo database.\r\n\r\n performGET(url, response); // performs the get request.\r\n \r\n}", "suggest(query){\n const that = this;\n let maxNumber = this.maxSuggestResults;\n const promises = [];\n promises.push(that.suggestTextQuery(query, maxNumber));\n Object.keys(that.suggestionIndexes).forEach(function(indexKey){\n const set = that.suggestionIndexes[indexKey];\n const intent = set.search(query, maxNumber);\n promises.push(intent);\n });\n const adapters = that.adapters;\n return Promise.all(promises).then(function(dataSets){\n let items = [];\n dataSets.forEach(function(dataSet){\n if (!dataSet || !dataSet.length)\n return ;\n items = items.concat(dataSet.items);\n })\n return new SearchCriteriaDataSet({\n adapters,\n items\n });\n });\n }", "searchByStringProperty(options) {\n _.require(options, [\"pattern\", \"collection\", \"property\"]);\n return this.searchByStringProperties(_.extend(options, {\n properties: [options.property]\n }));\n }", "constructor({onUpdateSearchStatus}) {\n\n this.queryStr = '';\n this.restoreSavedQueryStr();\n\n this.refSearcher = new RefSearcher();\n this.contentSearcher = new ContentSearcher();\n\n // The last-returned list search results\n this.results = [];\n this.selectedResultIndex = 0;\n this.isLoadingResults = false;\n this.onUpdateSearchStatus = onUpdateSearchStatus;\n\n }", "constructor() {\n super(SearchEngine);\n }", "function initAutocomplete() {\n // Create the autocomplete object, restricting the search to geographical\n // location types.\n autocomplete = new google.maps.places.Autocomplete(\n /** @type {!HTMLInputElement} */(document.getElementById('source_point')),\n {types: ['geocode']});\n\n // When the user selects an address from the dropdown, populate the address\n // fields in the form.\n autocomplete.addListener('place_changed', function(){\n fillInAddress(autocomplete, 'source_point');\n });\n\n autocomplete2 = new google.maps.places.Autocomplete(\n /** @type {!HTMLInputElement} */(document.getElementById('drop_point_1')),\n {types: ['geocode']});\n\n autocomplete2.addListener('place_changed', function(){\n fillInAddress(autocomplete2, 'drop_point_1');\n });\n}", "function setUpAutoComplete(searchUrl) {\n $(\"#search-input\").autocomplete({\n source: function(request, response) {\n $.ajax({\n url: searchUrl,\n dataType: 'jsonp',\n data: {\n 'action': \"opensearch\",\n 'format': \"json\",\n 'search': request.term\n },\n success: function (data) {\n response(data[1]);\n }\n });\n }\n });\n}", "function extendSearchWithAutoComplete(cm) {\n \n function addToSearchHistory(cm, query) {\n getSearchHistory(cm).add(query);\n } // function addToSearchHistory()\n\n // tracks search history\n cm.on(\"searchEntered\", addToSearchHistory);\n cm.on(\"replaceEntered\", addToSearchHistory);\n\n // add auto complete by search history to search dialog\n cm.on(\"searchDialog\", setupDialogAutoComplete);\n } // function extendSearchWithAutoComplete(..)", "function PopulateOptions(path, select, match, options, model, subPopulate) {\n this.path = path;\n this.match = match;\n this.select = select;\n this.options = options;\n this.model = model;\n if (typeof subPopulate === 'object') {\n this.populate = subPopulate;\n }\n this._docs = {};\n}", "function PopulateOptions(path, select, match, options, model, subPopulate) {\n this.path = path;\n this.match = match;\n this.select = select;\n this.options = options;\n this.model = model;\n if (typeof subPopulate === 'object') {\n this.populate = subPopulate;\n }\n this._docs = {};\n}", "function PopulateOptions(path, select, match, options, model, subPopulate) {\n this.path = path;\n this.match = match;\n this.select = select;\n this.options = options;\n this.model = model;\n if (typeof subPopulate === 'object') {\n this.populate = subPopulate;\n }\n this._docs = {};\n}", "static queryParser(escaperFn) {\n return function (parts) {\n let props = [];\n for (let _len = arguments.length, _key = 1; _key < _len; _key++) {\n //values[_key - 1] = arguments[_key];\n props.push(arguments[_key]);\n }\n return parts.reduce(function (prev, curr, i) {\n return prev + escaperFn(props[i - 1]) + curr;\n });\n };\n }", "function coauthors_create_autosuggest( authorName, inputName ) {\n\n\t\tif ( ! inputName ) inputName = 'coauthorsinput[]';\n\n\t\tvar $co = jQuery( '<input/>' );\n\n\t\t$co.attr({\n\t\t\t'class': 'coauthor-suggest'\n\t\t\t, 'type': 'text'\n\t\t\t, 'name': inputName\n\t\t\t})\n\t\t\t.appendTo( $coauthors_div )\n\t\t\t.suggest( coAuthorsPlus_ajax_suggest_link, {\n\t\t\t\tonSelect: coauthors_autosuggest_select,\n\t\t\t\tdelay: 50\n\t\t\t})\n\t\t\t.keydown( coauthors_autosuggest_keydown )\n\t\t\t;\n\n\t\tif ( authorName )\n\t\t\t$co.attr( 'value', decodeURIComponent( authorName ) );\n\t\telse\n\t\t\t$co.attr( 'value', coAuthorsPlusStrings.search_box_text )\n\t\t\t\t.attr( 'type', 'text' )\n\t\t\t\t.focus( function(){ $co.val( '' ) } )\n\t\t\t\t.blur( function(){ $co.val( coAuthorsPlusStrings.search_box_text ) } )\n\t\t\t\t;\n\n\t\treturn $co;\n\n\t}", "function handleSearch() {\n triggerSearch({}); // need empty braces here\n }", "search (options, successCallback, errorCallback) {\n successCallback = successCallback || (() => this.dfd.resolve(true))\n errorCallback = errorCallback || noop\n\n this.annotationsList = []\n const key = options.uri\n console.log('searching for %s', key)\n this.ready.then(() => {\n const res = this.db.get(key)\n console.log('got results', res)\n if (res && res.length > 0) {\n this.annotationsList = res[0].list.map((el) => {\n el.endpoint = this\n return el\n })\n\n successCallback(this.annotationsList)\n }\n }).catch(errorCallback)\n }" ]
[ "0.52827394", "0.52186435", "0.47342736", "0.47016174", "0.46753716", "0.4663182", "0.46393877", "0.4621972", "0.45772058", "0.4572989", "0.4549086", "0.4536212", "0.4518305", "0.44799227", "0.4456457", "0.44356704", "0.44144872", "0.44088268", "0.4389497", "0.43890962", "0.43779784", "0.4351534", "0.43514237", "0.43475953", "0.43466803", "0.43448484", "0.43386608", "0.43178242", "0.43132058", "0.43068206", "0.43061075", "0.4303278", "0.42904305", "0.42788547", "0.4275793", "0.4264258", "0.42422634", "0.42409995", "0.42330617", "0.42197126", "0.4218594", "0.42177048", "0.42130688", "0.42112795", "0.42075247", "0.41972634", "0.41961595", "0.41822118", "0.41804826", "0.41789588", "0.41764686", "0.41737366", "0.41709703", "0.4170087", "0.41671756", "0.41614857", "0.4160796", "0.4150134", "0.41433278", "0.4140574", "0.41318235", "0.41256234", "0.41180173", "0.41179672", "0.411519", "0.41111004", "0.41109914", "0.41092682", "0.40996674", "0.40969416", "0.40949494", "0.40926668", "0.40908563", "0.4085244", "0.40806112", "0.4077218", "0.40743852", "0.40681437", "0.40593192", "0.4051536", "0.4049357", "0.40450993", "0.4041577", "0.40399173", "0.40382373", "0.4037308", "0.4036663", "0.4023351", "0.40216208", "0.4019532", "0.4016083", "0.40154654", "0.4013649", "0.40064064", "0.40064064", "0.40064064", "0.40042254", "0.40021536", "0.40008277", "0.39958236" ]
0.61310345
0
and applies them to the HTMLElements such as popper and arrow
function applyStyles(_ref){var state=_ref.state;Object.keys(state.elements).forEach(function(name){var style=state.styles[name]||{};var attributes=state.attributes[name]||{};var element=state.elements[name];// arrow is optional + virtual elements if(!isHTMLElement(element)||!getNodeName(element)){return;}// Flow doesn't support to extend this property, but it's the most // effective way to apply styles to an HTMLElement // $FlowFixMe[cannot-write] Object.assign(element.style,style);Object.keys(attributes).forEach(function(name){var value=attributes[name];if(value===false){element.removeAttribute(name);}else {element.setAttribute(name,value===true?'':value);}});});}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setAttributes(data.instance.popper, data.attributes);\n\n // if arrowElement is defined and arrowStyles has some properties\n if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n setStyles(data.arrowElement, data.arrowStyles);\n }", "function g(e){if(Q.popperInstance?(y()||Q.popperInstance.scheduleUpdate(),Q.props.livePlacement&&!y()&&Q.popperInstance.enableEventListeners()):(Q.popperInstance=v(),Q.props.livePlacement||Q.popperInstance.disableEventListeners())\n/**\n * If the instance previously had followCursor behavior, it will be\n * positioned incorrectly if triggered by `focus` afterwards.\n * Update the reference back to the real DOM element\n */,Q.popperInstance.reference=Q.reference,y()){Q.popperChildren.arrow&&(Q.popperChildren.arrow.style.margin=\"\");var t=Qe(Q.props.delay,0,de.delay);M.type&&i(t&&H?H:M)}kt(Q.popperInstance,e),Q.props.appendTo.contains(Q.popper)||(Q.props.appendTo.appendChild(Q.popper),Q.props.onMount(Q),Q.state.isMounted=!0)}", "function getTransitionableElements() {\n return [instance.popperChildren.tooltip, instance.popperChildren.backdrop, instance.popperChildren.content];\n }", "function getTransitionableElements() {\n return [instance.popperChildren.tooltip, instance.popperChildren.backdrop, instance.popperChildren.content];\n }", "setElements() {\n this.$element = jQuery(this.element);\n this.$togglers = this.$element.find(this.options.togglersAttribute);\n }", "function updatePopperElement(popper, prevProps, nextProps) {\n var _getChildren = getChildren(popper),\n tooltip = _getChildren.tooltip,\n content = _getChildren.content,\n arrow = _getChildren.arrow;\n\n popper.style.zIndex = '' + nextProps.zIndex;\n tooltip.setAttribute('data-animation', nextProps.animation);\n tooltip.style.maxWidth = appendPxIfNumber(nextProps.maxWidth);\n\n if (nextProps.role) {\n tooltip.setAttribute('role', nextProps.role);\n } else {\n tooltip.removeAttribute('role');\n }\n\n if (prevProps.content !== nextProps.content) {\n setContent(content, nextProps);\n } // arrow\n\n\n if (!prevProps.arrow && nextProps.arrow) {\n // false to true\n tooltip.appendChild(createArrowElement(nextProps.arrow));\n tooltip.setAttribute('data-arrow', '');\n } else if (prevProps.arrow && !nextProps.arrow) {\n // true to false\n tooltip.removeChild(arrow);\n tooltip.removeAttribute('data-arrow');\n } else if (prevProps.arrow !== nextProps.arrow) {\n // true to 'round' or vice-versa\n tooltip.removeChild(arrow);\n tooltip.appendChild(createArrowElement(nextProps.arrow));\n } // interactive\n\n\n if (!prevProps.interactive && nextProps.interactive) {\n addInteractive(tooltip);\n } else if (prevProps.interactive && !nextProps.interactive) {\n removeInteractive(tooltip);\n } // inertia\n\n\n if (!prevProps.inertia && nextProps.inertia) {\n addInertia(tooltip);\n } else if (prevProps.inertia && !nextProps.inertia) {\n removeInertia(tooltip);\n } // theme\n\n\n if (prevProps.theme !== nextProps.theme) {\n updateTheme(tooltip, 'remove', prevProps.theme);\n updateTheme(tooltip, 'add', nextProps.theme);\n }\n}", "static get pluginConfig() {\n return {\n chain: ['onElementMouseDown', 'onElementMouseMove'],\n before: ['onElementContextMenu']\n };\n }", "static get pluginConfig() {\n return {\n chain: ['onElementMouseDown', 'onElementMouseMove'],\n before: ['onElementContextMenu']\n };\n }", "function updatePopperElement(popper, prevProps, nextProps) {\n var _getChildren = getChildren(popper),\n tooltip = _getChildren.tooltip,\n content = _getChildren.content,\n backdrop = _getChildren.backdrop,\n arrow = _getChildren.arrow;\n\n popper.style.zIndex = '' + nextProps.zIndex;\n tooltip.setAttribute('data-size', nextProps.size);\n tooltip.setAttribute('data-animation', nextProps.animation);\n tooltip.style.maxWidth = nextProps.maxWidth + (typeof nextProps.maxWidth === 'number' ? 'px' : '');\n\n if (nextProps.role) {\n popper.setAttribute('role', nextProps.role);\n } else {\n popper.removeAttribute('role');\n }\n\n if (prevProps.content !== nextProps.content) {\n setContent(content, nextProps);\n } // animateFill\n\n\n if (!prevProps.animateFill && nextProps.animateFill) {\n tooltip.appendChild(createBackdropElement());\n tooltip.setAttribute('data-animatefill', '');\n } else if (prevProps.animateFill && !nextProps.animateFill) {\n tooltip.removeChild(backdrop);\n tooltip.removeAttribute('data-animatefill');\n } // arrow\n\n\n if (!prevProps.arrow && nextProps.arrow) {\n tooltip.appendChild(createArrowElement(nextProps.arrowType));\n } else if (prevProps.arrow && !nextProps.arrow) {\n tooltip.removeChild(arrow);\n } // arrowType\n\n\n if (prevProps.arrow && nextProps.arrow && prevProps.arrowType !== nextProps.arrowType) {\n tooltip.replaceChild(createArrowElement(nextProps.arrowType), arrow);\n } // interactive\n\n\n if (!prevProps.interactive && nextProps.interactive) {\n addInteractive(popper, tooltip);\n } else if (prevProps.interactive && !nextProps.interactive) {\n removeInteractive(popper, tooltip);\n } // inertia\n\n\n if (!prevProps.inertia && nextProps.inertia) {\n addInertia(tooltip);\n } else if (prevProps.inertia && !nextProps.inertia) {\n removeInertia(tooltip);\n } // theme\n\n\n if (prevProps.theme !== nextProps.theme) {\n updateTheme(tooltip, 'remove', prevProps.theme);\n updateTheme(tooltip, 'add', nextProps.theme);\n }\n }", "function v(){var n=Q.popperChildren.tooltip,e=Q.props.popperOptions,t=Me[\"round\"===Q.props.arrowType?\"ROUND_ARROW\":\"ARROW\"],i=n.querySelector(t),r=fe({placement:Q.props.placement},e||{},{modifiers:fe({},e?e.modifiers:{},{arrow:fe({element:t},e&&e.modifiers?e.modifiers.arrow:{}),flip:fe({enabled:Q.props.flip,padding:Q.props.distance+5/* 5px from viewport boundary */,behavior:Q.props.flipBehavior},e&&e.modifiers?e.modifiers.flip:{}),offset:fe({offset:Q.props.offset},e&&e.modifiers?e.modifiers.offset:{})}),onCreate:function e(){n.style[St(Q.popper)]=Ct(Q.props.distance,de.distance),i&&Q.props.arrowTransform&&wt(i,Q.props.arrowTransform)},onUpdate:function e(){var t=n.style;t.top=\"\",t.bottom=\"\",t.left=\"\",t.right=\"\",t[St(Q.popper)]=Ct(Q.props.distance,de.distance),i&&Q.props.arrowTransform&&wt(i,Q.props.arrowTransform)}}),o=new MutationObserver(function(){Q.popperInstance.update()});return o.observe(Q.popper,{childList:!0,subtree:!0}),R&&R.disconnect(),R=o,\n// fixes https://github.com/atomiks/tippyjs/issues/193\n$||($=!0,Q.popper.addEventListener(\"mouseenter\",function(e){Q.props.interactive&&Q.state.isVisible&&\"mouseenter\"===M.type&&a(e)}),Q.popper.addEventListener(\"mouseleave\",function(e){Q.props.interactive&&\"mouseenter\"===M.type&&0===Q.props.interactiveDebounce&&Et(St(Q.popper),Q.popper.getBoundingClientRect(),e,Q.props)&&s()})),new Re(Q.reference,Q.popper,r)}", "static get pluginConfig() {\n return {\n chain: ['onElementMouseDown', 'onElementMouseMove', 'onElementMouseUp']\n };\n }", "static get pluginConfig() {\n return {\n chain: ['onElementMouseDown', 'onElementMouseMove', 'onElementMouseUp']\n };\n }", "static get pluginConfig() {\n return {\n chain: ['onElementMouseDown', 'onElementMouseMove', 'onElementMouseUp']\n };\n }", "static get pluginConfig() {\n return {\n chain: ['onElementMouseDown', 'onElementMouseMove', 'onElementMouseUp']\n };\n }", "static get pluginConfig() {\n return {\n chain: ['onElementMouseDown', 'onElementMouseMove', 'onElementMouseUp']\n };\n }", "static get pluginConfig() {\n return {\n chain: ['onElementMouseDown', 'onElementMouseMove', 'onElementMouseUp']\n };\n }", "function updatePopperElement(popper, prevProps, nextProps) {\n var _getChildren = getChildren(popper),\n tooltip = _getChildren.tooltip,\n content = _getChildren.content,\n backdrop = _getChildren.backdrop,\n arrow = _getChildren.arrow;\n\n popper.style.zIndex = '' + nextProps.zIndex;\n tooltip.setAttribute('data-size', nextProps.size);\n tooltip.setAttribute('data-animation', nextProps.animation);\n tooltip.style.maxWidth = nextProps.maxWidth + (typeof nextProps.maxWidth === 'number' ? 'px' : '');\n\n if (nextProps.role) {\n popper.setAttribute('role', nextProps.role);\n } else {\n popper.removeAttribute('role');\n }\n\n if (prevProps.content !== nextProps.content) {\n setContent(content, nextProps);\n } // animateFill\n\n\n if (!prevProps.animateFill && nextProps.animateFill) {\n tooltip.appendChild(createBackdropElement());\n tooltip.setAttribute('data-animatefill', '');\n } else if (prevProps.animateFill && !nextProps.animateFill) {\n tooltip.removeChild(backdrop);\n tooltip.removeAttribute('data-animatefill');\n } // arrow\n\n\n if (!prevProps.arrow && nextProps.arrow) {\n tooltip.appendChild(createArrowElement(nextProps.arrowType));\n } else if (prevProps.arrow && !nextProps.arrow) {\n tooltip.removeChild(arrow);\n } // arrowType\n\n\n if (prevProps.arrow && nextProps.arrow && prevProps.arrowType !== nextProps.arrowType) {\n tooltip.replaceChild(createArrowElement(nextProps.arrowType), arrow);\n } // interactive\n\n\n if (!prevProps.interactive && nextProps.interactive) {\n addInteractive(popper, tooltip);\n } else if (prevProps.interactive && !nextProps.interactive) {\n removeInteractive(popper, tooltip);\n } // inertia\n\n\n if (!prevProps.inertia && nextProps.inertia) {\n addInertia(tooltip);\n } else if (prevProps.inertia && !nextProps.inertia) {\n removeInertia(tooltip);\n } // theme\n\n\n if (prevProps.theme !== nextProps.theme) {\n updateTheme(tooltip, 'remove', prevProps.theme);\n updateTheme(tooltip, 'add', nextProps.theme);\n }\n}", "function w(e,t){k(e,function(){!Q.state.isVisible&&Q.props.appendTo.contains(Q.popper)&&t()})}", "function L(t){Nt(t,de);var e=Q.props,n=At(Q.reference,fe({},Q.props,t,{performance:!0}));n.performance=t.performance||e.performance,Q.props=n,(\"trigger\"in t||\"touchHold\"in t)&&(C(),E()),\"interactiveDebounce\"in t&&(l(),Y=Lt(p,t.interactiveDebounce)),ot(Q.popper,e,n),Q.popperChildren=Ye(Q.popper),Q.popperInstance&&me.some(function(e){return e in t})&&(Q.popperInstance.destroy(),Q.popperInstance=v(),Q.state.isVisible||Q.popperInstance.disableEventListeners(),Q.props.followCursor&&H&&i(H))}", "function n(){\n// if popper is destroyed, don't perform any further update\nif(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};\n// compute reference element offsets\ne.offsets.reference=L(this.state,this.popper,this.reference,this.options.positionFixed),\n// compute auto placement, store placement inside the data object,\n// modifiers will be able to edit `placement` if needed\n// and refer to originalPlacement to know the original value\ne.placement=p(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),\n// store the computed placement inside `originalPlacement`\ne.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,\n// compute the popper offsets\ne.offsets.popper=P(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?\"fixed\":\"absolute\",\n// run the modifiers\ne=j(this.modifiers,e),\n// the first `update` will call `onCreate` callback\n// the other ones will call `onUpdate` callback\nthis.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}", "function update(){ // if popper is destroyed, don't perform any further update\nif(this.state.isDestroyed){return;}var data={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:false,offsets:{}}; // compute reference element offsets\ndata.offsets.reference = getReferenceOffsets(this.state,this.popper,this.reference,this.options.positionFixed); // compute auto placement, store placement inside the data object,\n// modifiers will be able to edit `placement` if needed\n// and refer to originalPlacement to know the original value\ndata.placement = computeAutoPlacement(this.options.placement,data.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding); // store the computed placement inside `originalPlacement`\ndata.originalPlacement = data.placement;data.positionFixed = this.options.positionFixed; // compute the popper offsets\ndata.offsets.popper = getPopperOffsets(this.popper,data.offsets.reference,data.placement);data.offsets.popper.position = this.options.positionFixed?'fixed':'absolute'; // run the modifiers\ndata = runModifiers(this.modifiers,data); // the first `update` will call `onCreate` callback\n// the other ones will call `onUpdate` callback\nif(!this.state.isCreated){this.state.isCreated = true;this.options.onCreate(data);}else {this.options.onUpdate(data);}}", "function p(e){var t=ut(e.target,function(e){return e._tippy}),n=pt(e.target,Me.POPPER)===Q.popper,i=t===Q.reference;n||i||Et(St(Q.popper),Q.popper.getBoundingClientRect(),e,Q.props)&&(l(),s())}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function initTooltips(){\n let tooltipData = document.querySelectorAll(\"[data-toggle='tooltip']\");\n for (var index = 0; index < tooltipData.length; index++) {\n tooltipData[index].addEventListener(\"mouseenter\",togglePopper);\n tooltipData[index].addEventListener(\"mouseleave\",togglePopper);\n }\n}", "function set(options) {\n // Backwards-compatible after TypeScript change\n options = options || {};\n validateOptions(options, defaultProps);\n removeTriggersFromReference();\n var prevProps = instance.props;\n var nextProps = evaluateProps(reference, _extends({}, instance.props, {}, options, {\n ignoreAttributes: true\n }));\n nextProps.ignoreAttributes = hasOwnProperty(options, 'ignoreAttributes') ? options.ignoreAttributes || false : prevProps.ignoreAttributes;\n instance.props = nextProps;\n addTriggersToReference();\n cleanupInteractiveMouseListeners();\n debouncedOnMouseMove = debounce(onMouseMove, nextProps.interactiveDebounce);\n updatePopperElement(popper, prevProps, nextProps);\n instance.popperChildren = getChildren(popper);\n\n if (instance.popperInstance) {\n if (POPPER_INSTANCE_DEPENDENCIES.some(function (prop) {\n return hasOwnProperty(options, prop) && options[prop] !== prevProps[prop];\n })) {\n instance.popperInstance.destroy();\n createPopperInstance();\n\n if (instance.state.isVisible) {\n instance.popperInstance.enableEventListeners();\n }\n\n if (instance.props.followCursor && lastMouseMoveEvent) {\n positionVirtualReferenceNearCursor(lastMouseMoveEvent);\n }\n } else {\n instance.popperInstance.update();\n }\n }\n }", "function initPopovers(){\n let popoverData = document.querySelectorAll(\"[data-toggle='popover']\");\n for (var index = 0; index < popoverData.length; index++) {\n popoverData[index].addEventListener(\"click\",togglePopper);\n }\n}", "initializeElements () {\n this.$els = {\n window,\n body: document.body\n }\n }", "function set(options) {\n // Backwards-compatible after TypeScript change\n options = options || {};\n validateOptions(options, defaultProps);\n removeTriggersFromReference();\n var prevProps = instance.props;\n var nextProps = evaluateProps(reference, _extends({}, instance.props, options, {\n ignoreAttributes: true\n }));\n nextProps.ignoreAttributes = hasOwnProperty(options, 'ignoreAttributes') ? options.ignoreAttributes || false : prevProps.ignoreAttributes;\n instance.props = nextProps;\n addTriggersToReference();\n cleanupInteractiveMouseListeners();\n debouncedOnMouseMove = debounce(onMouseMove, nextProps.interactiveDebounce);\n updatePopperElement(popper, prevProps, nextProps);\n instance.popperChildren = getChildren(popper);\n\n if (instance.popperInstance) {\n if (POPPER_INSTANCE_DEPENDENCIES.some(function (prop) {\n return hasOwnProperty(options, prop) && options[prop] !== prevProps[prop];\n })) {\n instance.popperInstance.destroy();\n createPopperInstance();\n\n if (instance.state.isVisible) {\n instance.popperInstance.enableEventListeners();\n }\n\n if (instance.props.followCursor && lastMouseMoveEvent) {\n positionVirtualReferenceNearCursor(lastMouseMoveEvent);\n }\n } else {\n instance.popperInstance.update();\n }\n }\n }", "_initToolbarPositioning() {\n __querySelectorLive(`[s-node][s-specs]`, ($node) => {\n // get the parent element that is actually the\n // element to move\n const $elm = $node.parentNode;\n $elm.addEventListener('pointerover', (e) => {\n var _a;\n // add hover class\n $elm.classList.add('hover');\n e.stopPropagation();\n const element = this.getElementFromDomNode(e.currentTarget);\n // do nothing more if already activated\n if (element.uid === ((_a = this._preselectedNode) === null || _a === void 0 ? void 0 : _a.uid)) {\n return;\n }\n // position toolbar\n this._setToolbarTitleAndPosition($elm, __upperFirst(element.specs.split('.').pop()));\n // set the \"pre\" activate element\n this._preselectedNode = element;\n });\n $elm.addEventListener('pointerout', (e) => {\n // remove hover class\n $elm.classList.remove('hover');\n });\n }, {\n rootNode: this._$websiteDocument.body,\n });\n }", "function attachActionButtons () {\n // Generic elements but select / <a>\n $(document).on('click', '*[data-gmapz-target]:not(select)', function (e) {\n e.preventDefault();\n var\n target = $(this).attr('data-gmapz-target');\n // Get all data attributes ans send them to gmapz handler and the element\n $('[data-gmapz=\"'+target+'\"]')[0].gmapz.btnAction($(this).data(), $(this));\n }).on('change', 'select[data-gmapz-target]', function (e) {\n // <select>\n var\n target = $(this).attr('data-gmapz-target');\n $('[data-gmapz=\"'+target+'\"]')[0].gmapz.btnAction($(this).find('option:selected').data());\n });\n\n }", "initButtonEvents() {\n let allButtons = document.querySelectorAll('#buttons > g, #parts > g');\n Array.from(allButtons).forEach((btn, index) => {\n this.addEventListenerAll(btn, 'click drag', e => {\n let textBtn = btn.className.baseVal.replace('btn-', '');\n this.execBtn(textBtn);\n });\n\n this.addEventListenerAll(btn, 'mouseover mouseup mousedown', e => {\n btn.style.cursor = 'pointer';\n });\n })\n }", "mkNotificationEvents(diffDom) {\n let popperInstance = null;\n diffDom.querySelectorAll(`span.${Splitter.REAL_SPAN}`).forEach(span => {\n\n // show annotation\n span.addEventListener('mouseover', () => {\n const typeInfo = this.filesInfo.findType(span.dataset.filePath, span.dataset.location, span.dataset.state, span.dataset.col, span.dataset.row);\n if(typeInfo) {\n const spanAttr = this.buildSpanAttr(span, typeInfo);\n const realSpan = diffDom.querySelector(`span${spanAttr.classAttr}${spanAttr.filePathAttr}${spanAttr.rowAttr}${spanAttr.colAttr}${spanAttr.locationAttr}${spanAttr.stateAttr}`);\n if(realSpan) {\n this.highlightFocusedRegion(diffDom, spanAttr, typeInfo);\n popperInstance = createPopper(realSpan, this.tooltip, this.tooltipOptions());\n this.tooltip.querySelector('#tooltipText').innerHTML = typeInfo.typeName;\n this.tooltip.setAttribute('data-show', '');\n }\n }\n });\n\n // hide annotation\n span.addEventListener('mouseleave', () => {\n const typeInfo = this.filesInfo.findType(span.dataset.filePath, span.dataset.location, span.dataset.state, span.dataset.col, span.dataset.row);\n if(typeInfo) {\n this.tooltip.removeAttribute('data-show');\n if (popperInstance) {\n popperInstance.destroy();\n popperInstance = null;\n }\n document.querySelectorAll(`span.${Constants.IZUNA_HIGHLIGHT_REGION}.${Splitter.REAL_SPAN}`).forEach(span =>\n span.classList.remove(Constants.IZUNA_HIGHLIGHT_REGION)\n );\n }\n });\n\n });\n }", "function setupInteractions() {\n\n\t\t\t$('.img-overlay').hover(\n\t\t\t function () {\n\t\t\t $('.img-overlay-content', this).slideDown();\n\t\t\t },\n\t\t\t function () {\n\t\t\t $('.img-overlay-content', this).fadeOut(100);\n\t\t\t }\n\t\t\t);\n\n\n\t\t\t// tooltip setup\n\t\t $('a[rel=tooltip]').tooltip({\n\t\t placement: \"bottom\"\n\t\t });\n\n // tooltip setup\n $('a.infobit-icon').tooltip({\n placement: \"top\"\n });\n\n\t\t $('div[rel=tooltip]').tooltip({\n\t\t placement: \"top\"\n\t\t });\n\n $('i[rel=tooltip]').tooltip({\n placement: \"top\"\n });\n\n $('a[rel=\"tooltip nofollow\"]').tooltip({\n placement: \"top\"\n });\n\n\t\t}", "setupTooltipHandlers() {\n this.button.onmouseenter = () => {\n this.tooltip.showTooltip();\n };\n\n this.button.onmouseleave = () => {\n this.tooltip.hideTooltip();\n };\n }", "registerDomEvents() {/*To be overridden in sub class as needed*/}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n let data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}" ]
[ "0.7524573", "0.6590567", "0.636286", "0.6360291", "0.619212", "0.6143126", "0.6093509", "0.6093509", "0.60842144", "0.6079199", "0.6050638", "0.6050638", "0.6050638", "0.6050638", "0.6050638", "0.6050638", "0.60370487", "0.5937358", "0.58192044", "0.58074296", "0.5796685", "0.5778445", "0.5752991", "0.57444495", "0.57117057", "0.5709686", "0.5688067", "0.56789035", "0.5666557", "0.5663815", "0.56413394", "0.5637083", "0.56275785", "0.56262493", "0.56139565", "0.5606156", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001", "0.560001" ]
0.0
-1
means it doesn't take into account transforms.
function getLayoutRect(element){var clientRect=getBoundingClientRect(element);// Use the clientRect sizes if it's not been transformed. // Fixes https://github.com/popperjs/popper-core/issues/1223 var width=element.offsetWidth;var height=element.offsetHeight;if(Math.abs(clientRect.width-width)<=1){width=clientRect.width;}if(Math.abs(clientRect.height-height)<=1){height=clientRect.height;}return {x:element.offsetLeft,y:element.offsetTop,width:width,height:height};}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getTransform(){return this.__transform}", "function Transform() {}", "function Transform() {}", "function Transform() {}", "function Transform() {}", "function Transform() {}", "static transform() {}", "updateLocalTransform()\n {\n // empty\n }", "get transform() {}", "get transform() {}", "get transform() {}", "get transform() {}", "function Transform$7() {}", "function checkTransform3dSupport() {\n\t div.style[support.transform] = '';\n\t div.style[support.transform] = 'rotateY(90deg)';\n\t return div.style[support.transform] !== '';\n\t }", "function checkTransform3dSupport() {\n div.style[support.transform] = '';\n div.style[support.transform] = 'rotateY(90deg)';\n return div.style[support.transform] !== '';\n }", "function checkTransform3dSupport() {\n div.style[support.transform] = '';\n div.style[support.transform] = 'rotateY(90deg)';\n return div.style[support.transform] !== '';\n }", "function checkTransform3dSupport() {\n div.style[support.transform] = '';\n div.style[support.transform] = 'rotateY(90deg)';\n return div.style[support.transform] !== '';\n }", "function checkTransform3dSupport() {\n div.style[support.transform] = '';\n div.style[support.transform] = 'rotateY(90deg)';\n return div.style[support.transform] !== '';\n }", "tryTransformInPlace(transform) {\n transform.multiplyPoint3dArrayInPlace(this._points);\n return true;\n }", "constructor() {\n super();\n\n this.transforms = [];\n }", "function handleOut3() {\r\n this.style.transform = 'initial';\r\n}", "transform() {\n throw new Error('Missing _transform_ method on extractor');\n }", "set transform(value) {}", "set transform(value) {}", "set transform(value) {}", "set transform(value) {}", "function Transform() {\n\t\t\t\t this.reset();\n\t\t\t\t}", "function clearTransform(elem) {\n var transformList = getTransform(elem);\n elem.removeAttribute('transform');\n return transformList;\n}", "function normal() {}", "function testTransformsSupport() {\n var div = create('div');\n return typeof div.style.perspective !== 'undefined' || typeof div.style.webkitPerspective !== 'undefined';\n }", "function clear() {\n transforms = {};\n}", "function clear() {\n transforms = {};\n}", "function clear() {\n transforms = {};\n}", "function clear() {\n transforms = {};\n}", "get content () {\n return this.cancelTransforms === true\n ? this.originalContent\n : this.transformedContent;\n }", "transient final protected internal function m174() {}", "apply(){\n if(!this.animationDone){\n this.scene.translate( this.translateVec[0], this.translateVec[1], this.translateVec[2]);\n if(!(this.vectors[this.pointIndex].vec[0]==0 && this.vectors[this.pointIndex].vec[2]==0))\n { \n this.scene.rotate(this.angle,0,1,0);\n }\n }\n }", "function Awake()\n{\nmyTransform = transform; //cache transform para acesso facil\n}", "preset () { return false }", "function transforms(transform) {\n return new Restriction(_.constant(null), transform);\n}", "function transformChanged(newTransfrom) {\n randomImage()\n }", "static pure_translation(b) {\n return new MobiusTransform([\n Complex.one(), b,\n Complex.zero(), Complex.one()\n ]);\n }", "transformed(transform){\n let result = new AffineTransform();\n\n result.position = this.position.copy();\n result.position.mult(transform.scale);\n\n let rotated = new p5.Vector(result.position.x, result.position.y).rotate(transform.rotation);\n\n result.position.x = rotated.x;\n result.position.y = rotated.y;\n result.position.add(transform.position);\n\n result.scale = this.scale.copy();\n result.scale.mult(transform.scale);\n\n result.rotation = this.rotation + transform.rotation;\n\n return result;\n }", "default() {\n return !this.filled && !this.stroke && !this.text && !this.subtle;\n }", "transform(e3v) {\nreturn (this._r.rotate(e3v)).setAdd(this._t);\n}", "function has3DTransforms() {\n var el = document.createElement('p'),\n has3d,\n transforms = {\n 'WebkitTransform':'-webkit-transform',\n 'MozTransform':'-moz-transform',\n };\n\n document.body.insertBefore(el, null);\n\n for (var t in transforms) {\n if (el.style[t] !== undefined) {\n el.style[t] = \"translate3d(1px,1px,1px)\";\n has3d = window.getComputedStyle(el).getPropertyValue(transforms[t]);\n }\n }\n\n document.body.removeChild(el);\n return (has3d !== undefined && has3d.length > 0 && has3d !== \"none\");\n }", "protected internal function m252() {}", "function has3DTransforms() {\n var el = document.createElement('p'),\n has3d,\n transforms = {\n 'WebkitTransform':'-webkit-transform',\n 'MozTransform':'-moz-transform',\n };\n\n document.body.insertBefore(el, null);\n\n for (var t in transforms) {\n if (el.style[t] !== undefined) {\n el.style[t] = \"translate3d(1px,1px,1px)\";\n has3d = window.getComputedStyle(el).getPropertyValue(transforms[t]);\n }\n }\n\n document.body.removeChild(el);\n return (has3d !== undefined && has3d.length > 0 && has3d !== \"none\");\n }", "function Awake()\n {\n myTransform = transform; //cache transform data for easy access/preformance\n }", "canTransform(filename) {\n const entry = this.findTransformer(filename);\n return !!entry;\n }", "applyInverse(){\n scale(p5.Vector.div(new p5.Vector(1,1,1), this.scale));\n angleMode(RADIANS);\n rotate(-this.rotation);\n translate(p5.Vector.sub(new p5.Vector(0,0,0), this.position));\n }", "withoutNormalizing(editor, fn) {\n var value = Editor.isNormalizing(editor);\n NORMALIZING.set(editor, false);\n fn();\n NORMALIZING.set(editor, value);\n Editor.normalize(editor);\n }", "transform(matrix) {\n return matrix ? matrix._transformPoint(this) : this;\n }", "function canonicalTransform(data) { \n var result = {};\n result.x = data.x * getScaleFactor() - Globals.translation.x * getScaleFactor();\n result.y = swapYpos(data.y, false) * getScaleFactor() + Globals.translation.y * getScaleFactor();\n return result;\n}", "transient private internal function m185() {}", "static defaultTransform(): Transform {\n /* eslint-disable no-unused-vars */\n return (\n inputObj: any,\n query?: Query,\n requiredProps?: RequiredContractProps,\n ) => inputObj;\n /* eslint-enable no-unused-vars */\n }", "function transformSubprop() {\n }", "function Awake()\n\t{\n\t\tmyTransform = transform; //cache transform data for easy access/preformance\n\t}", "update(){ // call to update transforms\n dirty = false;\n m[3] = m[0] = scale;\n m[1] = m[2] = 0;\n m[4] = pos.x;\n m[5] = pos.y;\n if(useConstraint){\n this.constrain();\n }\n this.invScale = 1 / scale;\n // calculate the inverse transformation\n let cross = m[0] * m[3] - m[1] * m[2];\n im[0] = m[3] / cross;\n im[1] = -m[1] / cross;\n im[2] = -m[2] / cross;\n im[3] = m[0] / cross;\n }", "transient private protected internal function m182() {}", "private internal function m248() {}", "transient protected internal function m189() {}", "transform()\n {\n super.transform();\n \n spriteStrategyManager.transform();\n }", "private public function m246() {}", "isOriginal(){\r\n return this.isOriginalBool;\r\n }", "static identity() {\n return new MobiusTransform([\n Complex.one(), Complex.zero(),\n Complex.zero(), Complex.one()]);\n }", "applyCurrentTransform () {\n this.tempPosition.set(this.position);\n this.tempOrientation = this.orientation;\n this.tempScale.set(this.scale);\n }", "function inverseTransform(real, imag) {\n\t transform(imag, real);\n\t}", "function f(e,t,n,o){const r=\"function\"==typeof n.transform,s=r?n.transform:y;if(Array.isArray(e)){const i=[],a=e.length;for(let c=0;c<a;++c){let a=e[c];const l=Array.isArray(o)?o[c]:o;if((m(a)||n.retainNullValues&&null==a||r)&&(r&&(a=s(m(a)?a:null,l)),d(a,t),i.push(a),t.originalLimit&&i.length>=t.originalLimit))break}for(;e.length>i.length;)Array.prototype.pop.apply(e,[]);for(let t=0;t<i.length;++t)e[t]=i[t];return e}return m(e)?(d(e,t),s(e,o)):e instanceof Map?e:!0===n.justOne?s(null==e?e:null,o):!1===n.justOne?[]:s(null==e?e:null,o)}", "updateTransform(newTransform) {\n transform = newTransform;\n isCanvasDirty = true;\n }", "_getNonTransformedDimensions() {\n // Object dimensions\n return new fabric.Point(this.width, this.height).scalarAdd(\n this.padding + boundingBoxPadding\n )\n }", "function internal(transformer) {\n\t if (transformer.key[0] === \"_\") return true;\n\t}", "function internal(transformer) {\n\t if (transformer.key[0] === \"_\") return true;\n\t}", "function TransformStatic()\n{\n TransformBase.call(this);\n /**\n * The coordinate of the object relative to the local coordinates of the parent.\n *\n * @member {PIXI.ObservablePoint}\n */\n this.position = new math.ObservablePoint(this.onChange, this,0,0);\n\n /**\n * The scale factor of the object.\n *\n * @member {PIXI.ObservablePoint}\n */\n this.scale = new math.ObservablePoint(this.onChange, this,1,1);\n\n /**\n * The pivot point of the displayObject that it rotates around\n *\n * @member {PIXI.ObservablePoint}\n */\n this.pivot = new math.ObservablePoint(this.onChange, this,0, 0);\n\n /**\n * The skew amount, on the x and y axis.\n *\n * @member {PIXI.ObservablePoint}\n */\n this.skew = new math.ObservablePoint(this.updateSkew, this,0, 0);\n\n this._rotation = 0;\n\n this._sr = Math.sin(0);\n this._cr = Math.cos(0);\n this._cy = Math.cos(0);//skewY);\n this._sy = Math.sin(0);//skewY);\n this._nsx = Math.sin(0);//skewX);\n this._cx = Math.cos(0);//skewX);\n\n this._localID = 0;\n this._currentLocalID = 0;\n}", "function noSideEffects(fn){return''+{toString:fn};}", "updateTransform() {\n super.updateTransform();\n // TODO don't need to!\n // this.displayObjectUpdateTransform();\n // PIXI.Container.prototype.updateTransform.call( this );\n }", "applyTransform(mat) {\n throw this._notImplemented(\"applyTransform\");\n }", "transform0(axis, layerMask, angle) {\n module.log(\"RubiksCube#\" + (this) + \".transform(ax=\" + axis + \",msk=\" + layerMask + \",ang:\" + angle + \")\");\n {\n if (axis < 0 || axis > 2) {\n throw (\"axis: \" + axis);\n }\n\n if (layerMask < 0 || layerMask >= 1 << this.layerCount) {\n throw (\"layerMask: \" + layerMask);\n }\n\n if (angle < -2 || angle > 2) {\n throw (\"angle: \" + angle);\n }\n\n if (angle == 0) {\n return; // NOP\n }\n\n // Convert angle -2 to 2 to simplify the switch statements\n var an = (angle == -2) ? 2 : angle;\n\n if ((layerMask & 1) != 0) {\n // twist at left, bottom, back\n switch (axis) {\n case 0: // x\n switch (an) {\n case - 1:\n this.twistL();\n break;\n case 1:\n this.twistL();\n this.twistL();\n this.twistL();\n break;\n case 2:\n this.twistL();\n this.twistL();\n break;\n }\n break;\n case 1: // y\n switch (an) {\n case - 1:\n this.twistD();\n break;\n case 1:\n this.twistD();\n this.twistD();\n this.twistD();\n break;\n case 2:\n this.twistD();\n this.twistD();\n break;\n }\n break;\n case 2: // z\n switch (an) {\n case - 1:\n this.twistB();\n break;\n case 1:\n this.twistB();\n this.twistB();\n this.twistB();\n break;\n case 2:\n this.twistB();\n this.twistB();\n break;\n }\n }\n }\n if ((layerMask & 2) != 0) {\n // twist at left middle, bottom middle, back middle\n switch (axis) {\n case 0: // x\n switch (an) {\n case 1:\n this.twistMR();\n break;\n case - 1:\n this.twistMR();\n this.twistMR();\n this.twistMR();\n break;\n case 2:\n this.twistMR();\n this.twistMR();\n break;\n }\n break;\n case 1: // y\n switch (an) {\n case 1:\n this.twistMU();\n break;\n case - 1:\n this.twistMU();\n this.twistMU();\n this.twistMU();\n break;\n case 2:\n this.twistMU();\n this.twistMU();\n break;\n }\n break;\n case 2: // z\n switch (an) {\n case 1:\n this.twistMF();\n break;\n case - 1:\n this.twistMF();\n this.twistMF();\n this.twistMF();\n break;\n case 2:\n this.twistMF();\n this.twistMF();\n break;\n }\n }\n }\n\n if ((layerMask & 4) != 0) {\n // twist at right, top, front\n switch (axis) {\n case 0: // x\n switch (an) {\n case 1:\n this.twistR();\n break;\n case - 1:\n this.twistR();\n this.twistR();\n this.twistR();\n break;\n case 2:\n this.twistR();\n this.twistR();\n break;\n }\n break;\n case 1: // y\n switch (an) {\n case 1:\n this.twistU();\n break;\n case - 1:\n this.twistU();\n this.twistU();\n this.twistU();\n break;\n case 2:\n this.twistU();\n this.twistU();\n break;\n }\n break;\n case 2: // z\n switch (an) {\n case 1:\n this.twistF();\n break;\n case - 1:\n this.twistF();\n this.twistF();\n this.twistF();\n break;\n case 2:\n this.twistF();\n this.twistF();\n break;\n }\n }\n }\n }\n }", "setInvertX() {\nreturn this.xyzw[0] = -this.xyzw[0];\n}", "function acabarPreInversion (){\n \n realizandoInversion = false \n}", "trans() {\nreturn this._t;\n}", "_applyTransform() {\n this.wrapper.style.transform = [\n 'translateX(-50%)',\n `translateX(${this._translate})`,\n ].join(' ');\n }", "transient final private internal function m170() {}", "function setOrigin()\n {\n vm.moverStyle['-webkit-transform'] =\n vm.moverStyle['-ms-transform'] =\n vm.moverStyle.transform =\n vm.themeStyle.transform;\n //vm.element.tag == 'text' ? vm.element.style.transform : vm.themeStyle.transform;\n }", "get inverse() {\n let new_mult = this.multiplier.inv;\n let new_offset = this.offset.div(this.multiplier).neg;\n\n // Check if the result needs to mirror the parameters\n if (this.mirror)\n return new ComplexTransform(new_mult.conj, new_offset.conj, true);\n else\n return new ComplexTransform(new_mult, new_offset, false);\n }", "recalculateTransformation() {\n Node.prototype.recalculateTransformation.call(this);\n\n if (this.rendered) {\n this.skeleton.update();\n this.bucket.updateBoneTexture[0] = 1;\n } else {\n this.addAction(() => this.recalculateTransformation(), []);\n }\n }", "static setNormalizeV3(xyz) {\nvar len;\n//--------------\nlen = this.lengthV3(xyz);\nif (1e-5 <= len) {\nreturn this.setInverseScaleV3(xyz, len);\n} else {\nreturn xyz;\n}\n}", "function AddTransformer() {}", "function establishes_transform_T()\n {\n //--------------------------------------------------------------------------------------\n // //\\\\ T transform draggers p, T\n //--------------------------------------------------------------------------------------\n rg.ortI.acceptPos = ( newPos ) => {\n rg.ortI.pos[0] = newPos[0];\n newPos[1] = rg.ortI.pos[1]; //blocks vertical movement\n stdMod.recalculates_rg_ptransform();\n return true;\n };\n rg.ortJ.acceptPos = ( newPos ) => {\n rg.ortJ.pos[0] = newPos[0];\n rg.ortJ.pos[1] = newPos[1];\n stdMod.recalculates_rg_ptransform();\n return true;\n };\n //--------------------------------------------------------------------------------------\n // \\\\// T transform draggers p, T\n // \\\\// establishes right curve pivot draggers\n //-----------------------------------------------------------\n }", "_onAnchorUpdate() {\n this._transformID = -1;\n this._transformTrimmedID = -1;\n }", "transform(a, b, c, d, e, f) {\n this.ctx.transform(a, b, c, d, e, f);\n }", "function trustNone(){return false;}", "_batchTransformChanges(func) {\n this._batchingTransformChange = true;\n func();\n this._batchingTransformChange = false;\n if (this._needClearTransformCache) {\n this._clearCache(TRANSFORM);\n this._clearSelfAndDescendantCache(ABSOLUTE_TRANSFORM, true);\n }\n this._needClearTransformCache = false;\n }", "function canonicalTransformNT(data){\n var result = {};\n result.x = data.x * getScaleFactor();\n result.y = swapYpos(data.y, false) * getScaleFactor();\n return result;\n}", "function disableTransformOptionMerge(datasetModel) {\n\t var transformOption = datasetModel.option.transform;\n\t transformOption && setAsPrimitive(datasetModel.option.transform);\n\t }", "transient final private protected internal function m167() {}", "function $AxMc$var$trustNone() {\n return false;\n}", "runTransformation(input) {\n return this.transform(input)\n }", "fixAxis() {\n this.ctx.setTransform(1, 0, 0, 1, 0, 0); // Reset Transform to Identity Matrix\n this.ctx.translate(this.ctx.canvas.width / 2, this.ctx.canvas.height / 2);\n this.ctx.scale(1, -1);\n }", "updateTransform()\n {\n this.validate();\n this.containerUpdateTransform();\n }", "function $isTransformed(f, thisObj)\n{\n try\n {\n if(thisObj != null && thisObj != undefined)\n return thisObj[f].$jw;\n return f.$jw;\n }\n catch(e)\n {\n return false;\n }\n}" ]
[ "0.6677838", "0.6588195", "0.6588195", "0.6588195", "0.6588195", "0.6588195", "0.65466", "0.63946176", "0.61519814", "0.61519814", "0.61519814", "0.61519814", "0.61512464", "0.60736084", "0.5992981", "0.5992981", "0.5987012", "0.5987012", "0.5964276", "0.5938574", "0.5910615", "0.5890044", "0.5850059", "0.5850059", "0.5850059", "0.5850059", "0.5814049", "0.58022195", "0.5758193", "0.57172275", "0.5695277", "0.56946653", "0.56946653", "0.56946653", "0.5654136", "0.5618664", "0.56022984", "0.55605155", "0.5547095", "0.55319715", "0.5526879", "0.55196154", "0.5512218", "0.5486552", "0.54796124", "0.54590887", "0.545763", "0.5449025", "0.5436133", "0.5422912", "0.5417756", "0.5401705", "0.5400421", "0.5395092", "0.5358843", "0.5357991", "0.53564143", "0.5356347", "0.53500843", "0.53465754", "0.53452575", "0.53341293", "0.53278637", "0.5323135", "0.53227323", "0.5319203", "0.530983", "0.5301843", "0.5282027", "0.52778983", "0.52757186", "0.52682745", "0.52682745", "0.52484125", "0.52441174", "0.5244114", "0.5231824", "0.52126735", "0.520896", "0.5201764", "0.5199946", "0.51875454", "0.51853776", "0.51801485", "0.5169444", "0.51626474", "0.51601744", "0.5157337", "0.51426125", "0.51403975", "0.513908", "0.5139024", "0.5137204", "0.51360357", "0.51294905", "0.51285976", "0.5123903", "0.5118946", "0.51185447", "0.51164454", "0.5113419" ]
0.0
-1
return the containing block
function getContainingBlock(element){var isFirefox=navigator.userAgent.toLowerCase().indexOf('firefox')!==-1;var isIE=navigator.userAgent.indexOf('Trident')!==-1;if(isIE&&isHTMLElement(element)){// In IE 9, 10 and 11 fixed elements containing block is always established by the viewport var elementCss=getComputedStyle(element);if(elementCss.position==='fixed'){return null;}}var currentNode=getParentNode(element);while(isHTMLElement(currentNode)&&['html','body'].indexOf(getNodeName(currentNode))<0){var css=getComputedStyle(currentNode);// This is non-exhaustive but covers the most common CSS properties that // create a containing block. // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block if(css.transform!=='none'||css.perspective!=='none'||css.contain==='paint'||['transform','perspective'].indexOf(css.willChange)!==-1||isFirefox&&css.willChange==='filter'||isFirefox&&css.filter&&css.filter!=='none'){return currentNode;}else {currentNode=currentNode.parentNode;}}return null;}// Gets the closest ancestor positioned element. Handles some edge cases,
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getContainingBlock(element) {\n var currentNode = Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(element);\n\n while (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(currentNode) && ['html', 'body'].indexOf(Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(currentNode)) < 0) {\n var css = Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.willChange && css.willChange !== 'auto') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var currentNode = Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(element);\n\n while (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(currentNode) && ['html', 'body'].indexOf(Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(currentNode)) < 0) {\n var css = Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.willChange && css.willChange !== 'auto') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var currentNode = Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(element);\n\n while (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(currentNode) && ['html', 'body'].indexOf(Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(currentNode)) < 0) {\n var css = Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.willChange && css.willChange !== 'auto') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var currentNode = Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(element);\n\n while (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(currentNode) && ['html', 'body'].indexOf(Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(currentNode)) < 0) {\n var css = Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle_getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.willChange && css.willChange !== 'auto') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle_getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.willChange && css.willChange !== 'auto') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle_getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.willChange && css.willChange !== 'auto') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.willChange && css.willChange !== 'auto') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.willChange && css.willChange !== 'auto') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function $CUhI$var$getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && $wsKO$export$isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = $S6rb$export$default(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = $IVKl$export$default(element);\n\n while ($wsKO$export$isHTMLElement(currentNode) && ['html', 'body'].indexOf($B1zX$export$default(currentNode)) < 0) {\n var css = $S6rb$export$default(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().includes('firefox');\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].includes(css.willChange) || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "get block() { \n return this._block;\n }", "function getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle$1(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "isBlock() {\n const parentNode = this.parentNode\n return (parentNode && parentNode.isContainer())\n }", "block() {\n const startToken = this.curr;\n\n let declarations = this.declarations();\n let compound = this.compound_statement();\n return new AST.BlockNode(declarations, compound);\n }", "function getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n if (isIE && _instanceOfJs.isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = _getComputedStyleJsDefault.default(element);\n if (elementCss.position === 'fixed') return null;\n }\n var currentNode = _getParentNodeJsDefault.default(element);\n while(_instanceOfJs.isHTMLElement(currentNode) && [\n 'html',\n 'body'\n ].indexOf(_getNodeNameJsDefault.default(currentNode)) < 0){\n var css = _getComputedStyleJsDefault.default(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || [\n 'transform',\n 'perspective'\n ].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') return currentNode;\n else currentNode = currentNode.parentNode;\n }\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock$1(element){var isFirefox=navigator.userAgent.toLowerCase().indexOf('firefox')!==-1;var isIE=navigator.userAgent.indexOf('Trident')!==-1;if(isIE&&isHTMLElement$1(element)){// In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\nvar elementCss=getComputedStyle$2(element);if(elementCss.position==='fixed'){return null;}}var currentNode=getParentNode$1(element);while(isHTMLElement$1(currentNode)&&['html','body'].indexOf(getNodeName$1(currentNode))<0){var css=getComputedStyle$2(currentNode);// This is non-exhaustive but covers the most common CSS properties that\n// create a containing block.\n// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\nif(css.transform!=='none'||css.perspective!=='none'||css.contain==='paint'||['transform','perspective'].indexOf(css.willChange)!==-1||isFirefox&&css.willChange==='filter'||isFirefox&&css.filter&&css.filter!=='none'){return currentNode;}else {currentNode=currentNode.parentNode;}}return null;}// Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle$1(element);\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n var currentNode = getParentNode(element);\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle$1(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n return null;\n } // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle$1(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle$1(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n } // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = (0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__.default)(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = (0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_2__.default)(element);\n\n while ((0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(currentNode) && ['html', 'body'].indexOf((0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_3__.default)(currentNode)) < 0) {\n var css = (0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__.default)(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = (0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__.default)(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = (0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_2__.default)(element);\n\n while ((0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(currentNode) && ['html', 'body'].indexOf((0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_3__.default)(currentNode)) < 0) {\n var css = (0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__.default)(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = (0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__.default)(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = (0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_2__.default)(element);\n\n while ((0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(currentNode) && ['html', 'body'].indexOf((0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_3__.default)(currentNode)) < 0) {\n var css = (0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__.default)(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = (0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__.default)(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = (0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_2__.default)(element);\n\n while ((0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(currentNode) && ['html', 'body'].indexOf((0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_3__.default)(currentNode)) < 0) {\n var css = (0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__.default)(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(element);\n\n while (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(currentNode) && ['html', 'body'].indexOf(Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(currentNode)) < 0) {\n var css = Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(element);\n\n while (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(currentNode) && ['html', 'body'].indexOf(Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(currentNode)) < 0) {\n var css = Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element){var isFirefox=navigator.userAgent.toLowerCase().indexOf('firefox')!==-1;var isIE=navigator.userAgent.indexOf('Trident')!==-1;if(isIE&&isHTMLElement(element)){// In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\nvar elementCss=getComputedStyle$1(element);if(elementCss.position==='fixed'){return null;}}var currentNode=getParentNode(element);while(isHTMLElement(currentNode)&&['html','body'].indexOf(getNodeName(currentNode))<0){var css=getComputedStyle$1(currentNode);// This is non-exhaustive but covers the most common CSS properties that\n// create a containing block.\n// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\nif(css.transform!=='none'||css.perspective!=='none'||css.contain==='paint'||['transform','perspective'].indexOf(css.willChange)!==-1||isFirefox&&css.willChange==='filter'||isFirefox&&css.filter&&css.filter!=='none'){return currentNode;}else {currentNode=currentNode.parentNode;}}return null;}// Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle_getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle_getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getEnclosingBlockScopeContainer(node) {\n var current = node.parent;\n while (current) {\n if (isFunctionLike(current)) {\n return current;\n }\n switch (current.kind) {\n case 256 /* SourceFile */:\n case 227 /* CaseBlock */:\n case 252 /* CatchClause */:\n case 225 /* ModuleDeclaration */:\n case 206 /* ForStatement */:\n case 207 /* ForInStatement */:\n case 208 /* ForOfStatement */:\n return current;\n case 199 /* Block */:\n // function block is not considered block-scope container\n // see comment in binder.ts: bind(...), case for SyntaxKind.Block\n if (!isFunctionLike(current.parent)) {\n return current;\n }\n }\n current = current.parent;\n }\n }", "function getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle$1(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle$1(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getCurrentBlock(editor) {\n return getNearbyBlock(editor, \"current\");\n}", "_getEffectiveParent() {\n let p = this.parent;\n while (p instanceof BlockScope && !p._closedOver) {\n p = p.parent;\n }\n return p;\n }", "getHeadBlock() {\n // Your code here\n\n }", "function ensureBlock() {\n\t return t.ensureBlock(this.node);\n\t}", "function ensureBlock() {\n\t return t.ensureBlock(this.node);\n\t}", "get nextBlock () {\n return this.API.getBlock().then(({header:{height}})=>new Promise(async resolve=>{\n while (true) {\n await new Promise(ok=>setTimeout(ok, 1000))\n const now = await this.API.getBlock()\n if (now.header.height > height) {\n resolve()\n break\n }\n }\n }))\n }", "function getBlocks(){\n return blocks;\n }", "getBlockInternal(widget, position) {\n if (position.index === '' || isNullOrUndefined(position)) {\n return undefined;\n }\n let index = position.index.indexOf(';');\n let value = position.index.substring(0, index);\n position.index = position.index.substring(index).replace(';', '');\n let node = widget;\n // if (node instanceof WSection && value === 'HF') {\n // //Gets the block in Header footers.\n // let blockObj: BlockInfo = this.getBlock((node as WSection).headerFooters, position);\n // tslint:disable-next-line:max-line-length\n // return { 'node': (!isNullOrUndefined(blockObj)) ? blockObj.node : undefined, 'position': (!isNullOrUndefined(blockObj)) ? blockObj.position : undefined };\n // }\n index = parseInt(value, 10);\n let childWidget = this.selection.getBlockByIndex(widget, index);\n if (childWidget) {\n let child = childWidget;\n if (position.index.indexOf(';') >= 0) {\n if (child instanceof ParagraphWidget) {\n if (position.index.indexOf(';') >= 0) {\n position.index = '0';\n }\n return { 'node': child, 'position': position };\n }\n if (child instanceof Widget) {\n let blockObj = this.getBlockInternal(child, position);\n // tslint:disable-next-line:max-line-length\n return { 'node': (!isNullOrUndefined(blockObj)) ? blockObj.node : undefined, 'position': (!isNullOrUndefined(blockObj)) ? blockObj.position : undefined };\n }\n }\n else {\n return { 'node': child, 'position': position };\n }\n }\n else {\n return { 'node': node, 'position': position };\n }\n return { 'node': node, 'position': position };\n }", "get lastBlock() {\n\t\treturn this.chain.slice(-1)[0];\n\t}", "function create_if_block_1$b(ctx) {\n\t\tlet p;\n\t\tlet t;\n\t\tlet current;\n\t\tlet if_block0 = !/*expanded*/ ctx[1] && create_if_block_3$5();\n\n\t\tfunction select_block_type(ctx, dirty) {\n\t\t\tif (/*canExpand*/ ctx[3]) return create_if_block_2$9;\n\t\t\treturn create_else_block$7;\n\t\t}\n\n\t\tlet current_block_type = select_block_type(ctx);\n\t\tlet if_block1 = current_block_type(ctx);\n\n\t\treturn {\n\t\t\tc() {\n\t\t\t\tp = element(\"p\");\n\t\t\t\tif (if_block0) if_block0.c();\n\t\t\t\tt = space();\n\t\t\t\tif_block1.c();\n\t\t\t\tattr(p, \"class\", \"iif-footer-block-title\");\n\t\t\t},\n\t\t\tm(target, anchor) {\n\t\t\t\tinsert(target, p, anchor);\n\t\t\t\tif (if_block0) if_block0.m(p, null);\n\t\t\t\tappend(p, t);\n\t\t\t\tif_block1.m(p, null);\n\t\t\t\tcurrent = true;\n\t\t\t},\n\t\t\tp(ctx, dirty) {\n\t\t\t\tif (!/*expanded*/ ctx[1]) {\n\t\t\t\t\tif (if_block0) {\n\t\t\t\t\t\tif (dirty & /*expanded*/ 2) {\n\t\t\t\t\t\t\ttransition_in(if_block0, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif_block0 = create_if_block_3$5();\n\t\t\t\t\t\tif_block0.c();\n\t\t\t\t\t\ttransition_in(if_block0, 1);\n\t\t\t\t\t\tif_block0.m(p, t);\n\t\t\t\t\t}\n\t\t\t\t} else if (if_block0) {\n\t\t\t\t\tgroup_outros();\n\n\t\t\t\t\ttransition_out(if_block0, 1, 1, () => {\n\t\t\t\t\t\tif_block0 = null;\n\t\t\t\t\t});\n\n\t\t\t\t\tcheck_outros();\n\t\t\t\t}\n\n\t\t\t\tif_block1.p(ctx, dirty);\n\t\t\t},\n\t\t\ti(local) {\n\t\t\t\tif (current) return;\n\t\t\t\ttransition_in(if_block0);\n\t\t\t\tcurrent = true;\n\t\t\t},\n\t\t\to(local) {\n\t\t\t\ttransition_out(if_block0);\n\t\t\t\tcurrent = false;\n\t\t\t},\n\t\t\td(detaching) {\n\t\t\t\tif (detaching) detach(p);\n\t\t\t\tif (if_block0) if_block0.d();\n\t\t\t\tif_block1.d();\n\t\t\t}\n\t\t};\n\t}", "function GetBlocks() {\n return blocks;\n}", "function ensureBlock() {\n return t.ensureBlock(this.node);\n}", "function currentBlock() {\r\n _doGet('/chain/height');\r\n }", "function getBlock(index) {\n if (pooledBlocks.length) {\n return pooledBlocks.pop();\n }\n\n // create new bloc\n var block;\n transclude(function(clone, scope) {\n block = {\n element: clone,\n new: true,\n scope: scope\n };\n\n updateScope(scope, index);\n initState(items[index]);\n scope.$element = clone; // attach element to scope so it can be accessed in controller\n parentNode.appendChild(clone[0]);\n scope.$on('$destroy', function () {\n clone\n .off('blur', onBlur)\n .off('focus', onFocus);\n });\n });\n return block;\n }", "function getCurrentBlock(node){\n // if input is a selection, then convert from a text node to a \"real\" HTML tag by getting the node where the selection started\n if(node instanceof Selection){\n node = node.anchorNode.parentElement;\n }\n \n // within the selection, there's a Text object, which holds the content of the \"real\" HTML tag. But I need to get the proper tag.\n if(node instanceof Text){\n node = node.parentElement;\n }\n \n // now the node must be a \"real\" HTML tag\n if(node.tagName == \"SPAN\" || node.tagName == \"A\"){\n return node.parentNode;\n }else{\n return node;\n }\n}", "function create_if_block$t(ctx) {\n\t\tlet block;\n\t\tlet current;\n\n\t\tblock = new Block({\n\t\t\t\tprops: {\n\t\t\t\t\ttype: \"footer\",\n\t\t\t\t\t$$slots: { default: [create_default_slot$h] },\n\t\t\t\t\t$$scope: { ctx }\n\t\t\t\t}\n\t\t\t});\n\n\t\treturn {\n\t\t\tc() {\n\t\t\t\tcreate_component(block.$$.fragment);\n\t\t\t},\n\t\t\tm(target, anchor) {\n\t\t\t\tmount_component(block, target, anchor);\n\t\t\t\tcurrent = true;\n\t\t\t},\n\t\t\tp(ctx, dirty) {\n\t\t\t\tconst block_changes = {};\n\n\t\t\t\tif (dirty & /*$$scope, icon, icons, route, customisations, customise, hasIcons, infoBlockTitle, infoBlock*/ 767) {\n\t\t\t\t\tblock_changes.$$scope = { dirty, ctx };\n\t\t\t\t}\n\n\t\t\t\tblock.$set(block_changes);\n\t\t\t},\n\t\t\ti(local) {\n\t\t\t\tif (current) return;\n\t\t\t\ttransition_in(block.$$.fragment, local);\n\t\t\t\tcurrent = true;\n\t\t\t},\n\t\t\to(local) {\n\t\t\t\ttransition_out(block.$$.fragment, local);\n\t\t\t\tcurrent = false;\n\t\t\t},\n\t\t\td(detaching) {\n\t\t\t\tdestroy_component(block, detaching);\n\t\t\t}\n\t\t};\n\t}", "getTopBlockData(parent_uid) {\n // Look for the UID and string contents of the top-child of a parent\n let top_block = window.roamAlphaAPI.q('[:find ?bUID ?bText :in $ ?pUID :where[?b :block/uid ?bUID][?b :block/string ?bText][?b :block/order 0][?p :block/children ?b][?p :block/uid ?pUID]]', parent_uid);\n if (typeof (top_block) === 'undefined' || top_block == null || top_block.length == 0) {\n // If there were no results or a problem with the results, return false\n // This will keep the loop in waitForBlockUID() going\n // Though if there's a systematic error it won't go on infinitely because waitForBlockUID() will eventually throw an error\n return false;\n } else {\n // If the search returned a block's info, return it for matching\n // If there's any problem with the values returned, make sure to catch any error\n try {\n let top_block_data = {\n uid: top_block[0][0],\n text: top_block[0][1]\n }\n return top_block_data;\n } catch(e) {\n console.error(e);\n }\n }\n }", "getBlockRegion(block, globalPoint) {\n // substract window scrolling from global point to get viewport coordinates\n const vpt = globalPoint.sub(new Vector2D(window.scrollX, window.scrollY));\n // compare against viewport bounds of node representing the block\n const box = this.layout.nodeFromElement(block).el.getBoundingClientRect();\n // compare to bounds\n if (vpt.x < box.left || vpt.x > box.right || vpt.y < box.top || vpt.y > box.bottom) {\n return 'none';\n }\n // context menu area?\n if (vpt.x >= box.right - kT.contextDotsW) {\n return 'dots';\n }\n // in block but nowhere special\n return 'main';\n }", "getLatestBlock(){\n\t\treturn this.chain[this.chain.length - 1];\n\t}", "getLatestBlock() {\n return this.chain[this.chain.length - 1]\n }", "async checkForNewBlock() {\n try {\n const blockHeight = await this.polkadotAPI.getBlockHeight()\n\n // if we get a newer block then expected query for all the outstanding blocks\n while (blockHeight > this.height) {\n this.height = this.height ? this.height++ : blockHeight\n this.newBlockHandler(this.height)\n\n // we are safe, that the chain produced a block so it didn't hang up\n if (this.chainHangup) clearTimeout(this.chainHangup)\n }\n } catch (error) {\n console.error('Failed to check for a new block', error)\n Sentry.captureException(error)\n }\n }", "getBlockInternal(widget, position) {\n if (position === '' || isNullOrUndefined(position)) {\n return undefined;\n }\n let index = position.indexOf(';');\n let value = position.substring(0, index);\n position = position.substring(index).replace(';', '');\n let node = widget;\n // if (node instanceof Widget && value === 'HF') {\n // //Gets the block in Header footers.\n // let blockObj: BlockInfo = this.getBlock((node as WSection).headersFooters, position);\n // tslint:disable-next-line:max-line-length\n // return { 'node': (!isNullOrUndefined(blockObj)) ? blockObj.node : undefined, 'position': (!isNullOrUndefined(blockObj)) ? blockObj.position : undefined };\n // }\n index = parseInt(value, 10);\n if (index >= 0 && index < widget.childWidgets.length) {\n let child = widget.childWidgets[(index)];\n if (position.indexOf(';') >= 0) {\n if (child instanceof ParagraphWidget) {\n if (position.indexOf(';') >= 0) {\n position = '0';\n }\n return child;\n }\n if (child instanceof BlockWidget) {\n let blockObj = this.getBlockInternal(child, position);\n return blockObj;\n }\n }\n else {\n return child;\n }\n }\n else {\n return node;\n }\n return node;\n }", "getLatestBlock() {\n return this.chain[this.chain.length - 1];\n }", "getLatestBlock() {\n return this.chain[this.chain.length - 1];\n }", "getLatestBlock() {\n return this.chain[this.chain.length - 1];\n }", "getLastestBlock(){\r\n return this.chain[this.chain.length - 1];\r\n }", "get_blocks() {\n\t\t\treturn this.blocks\n\t\t}", "genesisBlock() {\n return new Block([], \"\");\n }", "getLatestBlock () {\n return this.chain[this.chain.length -1];\n }", "function isBlock() {\n return !rElem && rBlock;\n}", "getGenesisBlock(){\r\n return this.chain[0];\r\n }", "getLatestBlock() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.ksnDriver.getLatestBlock();\n });\n }", "function create_if_block$1(ctx) {\n var await_block_anchor;\n var promise;\n var current;\n var info = {\n ctx: ctx,\n current: null,\n token: null,\n pending: create_pending_block$1,\n then: create_then_block$1,\n \"catch\": create_catch_block$1,\n value: 14,\n blocks: [,,,]\n };\n handle_promise(promise =\n /*exists*/\n ctx[5], info);\n return {\n c: function c() {\n await_block_anchor = empty();\n info.block.c();\n },\n m: function m(target, anchor) {\n insert(target, await_block_anchor, anchor);\n info.block.m(target, info.anchor = anchor);\n\n info.mount = function () {\n return await_block_anchor.parentNode;\n };\n\n info.anchor = await_block_anchor;\n current = true;\n },\n p: function p(new_ctx, dirty) {\n ctx = new_ctx;\n info.ctx = ctx;\n if (dirty &\n /*exists*/\n 32 && promise !== (promise =\n /*exists*/\n ctx[5]) && handle_promise(promise, info)) ;else {\n var child_ctx = ctx.slice();\n child_ctx[14] = info.resolved;\n info.block.p(child_ctx, dirty);\n }\n },\n i: function i(local) {\n if (current) return;\n transition_in(info.block);\n current = true;\n },\n o: function o(local) {\n for (var i = 0; i < 3; i += 1) {\n var _block2 = info.blocks[i];\n transition_out(_block2);\n }\n\n current = false;\n },\n d: function d(detaching) {\n if (detaching) detach(await_block_anchor);\n info.block.d(detaching);\n info.token = null;\n info = null;\n }\n };\n } // (1:0) <script> import Alert from \"svelte-material-icons/Alert.svelte\"; import CheckBold from \"svelte-material-icons/CheckBold.svelte\"; import { Circle }", "function wrapSelfAndSiblingsInDefaultBlock(container, offset) {\n\t\t\t\tvar newBlock, parentBlock, startNode, node, next, rootBlockName, blockName = newBlockName || 'P';\n\n\t\t\t\t// Not in a block element or in a table cell or caption\n\t\t\t\tparentBlock = dom.getParent(container, dom.isBlock);\n\t\t\t\tif (!parentBlock || !canSplitBlock(parentBlock)) {\n\t\t\t\t\tparentBlock = parentBlock || editableRoot;\n\n\t\t\t\t\tif (parentBlock == editor.getBody() || isTableCell(parentBlock)) {\n\t\t\t\t\t\trootBlockName = parentBlock.nodeName.toLowerCase();\n\t\t\t\t\t} else {\n\t\t\t\t\t\trootBlockName = parentBlock.parentNode.nodeName.toLowerCase();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!parentBlock.hasChildNodes()) {\n\t\t\t\t\t\tnewBlock = dom.create(blockName);\n\t\t\t\t\t\tsetForcedBlockAttrs(newBlock);\n\t\t\t\t\t\tparentBlock.appendChild(newBlock);\n\t\t\t\t\t\trng.setStart(newBlock, 0);\n\t\t\t\t\t\trng.setEnd(newBlock, 0);\n\t\t\t\t\t\treturn newBlock;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Find parent that is the first child of parentBlock\n\t\t\t\t\tnode = container;\n\t\t\t\t\twhile (node.parentNode != parentBlock) {\n\t\t\t\t\t\tnode = node.parentNode;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Loop left to find start node start wrapping at\n\t\t\t\t\twhile (node && !dom.isBlock(node)) {\n\t\t\t\t\t\tstartNode = node;\n\t\t\t\t\t\tnode = node.previousSibling;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (startNode && schema.isValidChild(rootBlockName, blockName.toLowerCase())) {\n\t\t\t\t\t\tnewBlock = dom.create(blockName);\n\t\t\t\t\t\tsetForcedBlockAttrs(newBlock);\n\t\t\t\t\t\tstartNode.parentNode.insertBefore(newBlock, startNode);\n\n\t\t\t\t\t\t// Start wrapping until we hit a block\n\t\t\t\t\t\tnode = startNode;\n\t\t\t\t\t\twhile (node && !dom.isBlock(node)) {\n\t\t\t\t\t\t\tnext = node.nextSibling;\n\t\t\t\t\t\t\tnewBlock.appendChild(node);\n\t\t\t\t\t\t\tnode = next;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Restore range to it's past location\n\t\t\t\t\t\trng.setStart(container, offset);\n\t\t\t\t\t\trng.setEnd(container, offset);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn container;\n\t\t\t}", "function wrapSelfAndSiblingsInDefaultBlock(container, offset) {\n\t\t\t\tvar newBlock, parentBlock, startNode, node, next, rootBlockName, blockName = newBlockName || 'P';\n\n\t\t\t\t// Not in a block element or in a table cell or caption\n\t\t\t\tparentBlock = dom.getParent(container, dom.isBlock);\n\t\t\t\tif (!parentBlock || !canSplitBlock(parentBlock)) {\n\t\t\t\t\tparentBlock = parentBlock || editableRoot;\n\n\t\t\t\t\tif (parentBlock == editor.getBody() || isTableCell(parentBlock)) {\n\t\t\t\t\t\trootBlockName = parentBlock.nodeName.toLowerCase();\n\t\t\t\t\t} else {\n\t\t\t\t\t\trootBlockName = parentBlock.parentNode.nodeName.toLowerCase();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!parentBlock.hasChildNodes()) {\n\t\t\t\t\t\tnewBlock = dom.create(blockName);\n\t\t\t\t\t\tsetForcedBlockAttrs(newBlock);\n\t\t\t\t\t\tparentBlock.appendChild(newBlock);\n\t\t\t\t\t\trng.setStart(newBlock, 0);\n\t\t\t\t\t\trng.setEnd(newBlock, 0);\n\t\t\t\t\t\treturn newBlock;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Find parent that is the first child of parentBlock\n\t\t\t\t\tnode = container;\n\t\t\t\t\twhile (node.parentNode != parentBlock) {\n\t\t\t\t\t\tnode = node.parentNode;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Loop left to find start node start wrapping at\n\t\t\t\t\twhile (node && !dom.isBlock(node)) {\n\t\t\t\t\t\tstartNode = node;\n\t\t\t\t\t\tnode = node.previousSibling;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (startNode && schema.isValidChild(rootBlockName, blockName.toLowerCase())) {\n\t\t\t\t\t\tnewBlock = dom.create(blockName);\n\t\t\t\t\t\tsetForcedBlockAttrs(newBlock);\n\t\t\t\t\t\tstartNode.parentNode.insertBefore(newBlock, startNode);\n\n\t\t\t\t\t\t// Start wrapping until we hit a block\n\t\t\t\t\t\tnode = startNode;\n\t\t\t\t\t\twhile (node && !dom.isBlock(node)) {\n\t\t\t\t\t\t\tnext = node.nextSibling;\n\t\t\t\t\t\t\tnewBlock.appendChild(node);\n\t\t\t\t\t\t\tnode = next;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Restore range to it's past location\n\t\t\t\t\t\trng.setStart(container, offset);\n\t\t\t\t\t\trng.setEnd(container, offset);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn container;\n\t\t\t}", "function wrapSelfAndSiblingsInDefaultBlock(container, offset) {\n\t\t\t\tvar newBlock, parentBlock, startNode, node, next, rootBlockName, blockName = newBlockName || 'P';\n\n\t\t\t\t// Not in a block element or in a table cell or caption\n\t\t\t\tparentBlock = dom.getParent(container, dom.isBlock);\n\t\t\t\tif (!parentBlock || !canSplitBlock(parentBlock)) {\n\t\t\t\t\tparentBlock = parentBlock || editableRoot;\n\n\t\t\t\t\tif (parentBlock == editor.getBody() || isTableCell(parentBlock)) {\n\t\t\t\t\t\trootBlockName = parentBlock.nodeName.toLowerCase();\n\t\t\t\t\t} else {\n\t\t\t\t\t\trootBlockName = parentBlock.parentNode.nodeName.toLowerCase();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!parentBlock.hasChildNodes()) {\n\t\t\t\t\t\tnewBlock = dom.create(blockName);\n\t\t\t\t\t\tsetForcedBlockAttrs(newBlock);\n\t\t\t\t\t\tparentBlock.appendChild(newBlock);\n\t\t\t\t\t\trng.setStart(newBlock, 0);\n\t\t\t\t\t\trng.setEnd(newBlock, 0);\n\t\t\t\t\t\treturn newBlock;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Find parent that is the first child of parentBlock\n\t\t\t\t\tnode = container;\n\t\t\t\t\twhile (node.parentNode != parentBlock) {\n\t\t\t\t\t\tnode = node.parentNode;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Loop left to find start node start wrapping at\n\t\t\t\t\twhile (node && !dom.isBlock(node)) {\n\t\t\t\t\t\tstartNode = node;\n\t\t\t\t\t\tnode = node.previousSibling;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (startNode && schema.isValidChild(rootBlockName, blockName.toLowerCase())) {\n\t\t\t\t\t\tnewBlock = dom.create(blockName);\n\t\t\t\t\t\tsetForcedBlockAttrs(newBlock);\n\t\t\t\t\t\tstartNode.parentNode.insertBefore(newBlock, startNode);\n\n\t\t\t\t\t\t// Start wrapping until we hit a block\n\t\t\t\t\t\tnode = startNode;\n\t\t\t\t\t\twhile (node && !dom.isBlock(node)) {\n\t\t\t\t\t\t\tnext = node.nextSibling;\n\t\t\t\t\t\t\tnewBlock.appendChild(node);\n\t\t\t\t\t\t\tnode = next;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Restore range to it's past location\n\t\t\t\t\t\trng.setStart(container, offset);\n\t\t\t\t\t\trng.setEnd(container, offset);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn container;\n\t\t\t}", "getLatestBlock(){\n return this.chain[this.chain.length];\n }", "get isBlock() {\n return this.type.isBlock;\n }", "getLatestBlock(){\n return this.chain[this.chain.length - 1];\n }", "getLatestBlock(){\n return this.chain[this.chain.length - 1];\n }", "genesisBlock() {\n //Since it returns the first block the initial values should be send by us\n //returns an object holding our genesis block details\n return new Block(new Date(), \"Genesis Block\", \"0\");\n }", "function getBlocks() {\n return document.getElementsByClassName(\"child\");\n }", "getLatestBlock(){\n return this.chain[this.chain.length-1];\n }", "completeBlock() {\r\n let block = this.block;\r\n return new Promise(async (resolve) => {\r\n if (!isCompleteBlock(block)) return resolve(false);\r\n await this.writeBlock(block);\r\n block = await this.createNewCurrentBlock(block.index + 1);\r\n return resolve(true);\r\n });\r\n }", "function quickParseBlock() {\n const node = this.startNode();\n const prevPos = this.context.length - 1;\n\n node.body = [];\n\n do {\n this.next();\n } while (this.context.length > prevPos);\n\n this.next();\n return this.finishNode(node, \"BlockStatement\");\n}", "function aaObtainFurthestBlock(p, formattingElementEntry) {\n var furthestBlock = null;\n\n for (var i = p.openElements.stackTop; i >= 0; i--) {\n var element = p.openElements.items[i];\n\n if (element === formattingElementEntry.element) break;\n\n if (p._isSpecialElement(element)) furthestBlock = element;\n }\n\n if (!furthestBlock) {\n p.openElements.popUntilElementPopped(\n formattingElementEntry.element,\n );\n p.activeFormattingElements.removeEntry(formattingElementEntry);\n }\n\n return furthestBlock;\n }", "getNextParagraphBlock(block) {\n if (block.nextRenderedWidget instanceof ParagraphWidget) {\n return block.nextRenderedWidget;\n }\n else if (block.nextRenderedWidget instanceof TableWidget) {\n return this.getFirstParagraphInFirstCell(block.nextRenderedWidget);\n }\n if (block.containerWidget instanceof TableCellWidget) {\n return this.getNextParagraphCell(block.containerWidget);\n }\n else if (block.containerWidget instanceof BodyWidget) {\n let bodyWidget = block.containerWidget;\n return this.getNextParagraph(block.containerWidget);\n }\n else if (block.containerWidget instanceof HeaderFooterWidget && this.isMoveDownOrMoveUp) {\n return this.getFirstBlockInNextHeaderFooter(block);\n }\n return undefined;\n }", "getLatestBlock(){\r\n return this.chain[this.chain.length-1];\r\n }", "getBlock(blockheight) {\n return this.chain.get(this.lexi(blockheight))\n .then((block) => {\n return JSON.parse(block);\n });\n }", "parseBlock() {\n\t\tvar program = this.delimited('{', '}', null, this.parseExpression.bind(this));\n\t\treturn {\n\t\t\ttype: 'block',\n\t\t\texpressions: program\n\t\t};\n\t}", "getPrevBlock(){\n return this.chain[this.chain.length-1]; // return previous block obj\n }", "getLatestBlock() {\n return this.chain[this.chain.length - 1];\n }", "getLatestBlock() {\n return this.chain[this.chain.length - 1];\n }", "function returnBlockStatement(block) {\n if (block.type === 'Program')\n return block\n\n if (block.type === 'FunctionExpression'\n || block.type === 'FunctionDeclaration')\n return block.body\n\n // TODO what about the try / catch stuffs : they declare a new scope\n}", "get block() {\n return this.makeMap(\"a,address,code,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video\")\n }", "function findBlock() {\n\tconsole.log('in findBlock')\n\tvar data = {\n\t\turl : window.location.href,\n\t\tsite_url: window.location.protocol + \"//\" + window.location.host\n\t}\n var selection = window.getSelection();\n\tif (selection.rangeCount === 0)\n return data;\n var isStart = true;\n\tvar element = getSelectionBoundaryElement(selection, isStart);\n\tconsole.log(element);\n\tvar xpath = getXPath(element);\n\tconsole.log(xpath);\n\tdata.xpath = xpath;\n console.log(data);\n\treturn data;\n}", "getBlock() {\n const self = this\n return new Promise(function(resolve, reject) {\n self.myBlockChain.getBlock(0).then((block) => {\n resolve(JSON.stringify(block));\n }).catch((err) => { reject(err);});\n })\n }", "get block () { return this.API.getBlock() }", "parent() {\n if (!this.buffer)\n return this.yieldNode((this.mode & exports.IterMode.IncludeAnonymous) ? this._tree._parent : this._tree.parent);\n if (this.stack.length)\n return this.yieldBuf(this.stack.pop());\n let parent = (this.mode & exports.IterMode.IncludeAnonymous) ? this.buffer.parent : this.buffer.parent.nextSignificantParent();\n this.buffer = null;\n return this.yieldNode(parent);\n }", "function aaObtainFurthestBlock(p, formattingElementEntry) {\n let furthestBlock = null;\n\n for (let i = p.openElements.stackTop; i >= 0; i--) {\n const element = p.openElements.items[i];\n\n if (element === formattingElementEntry.element) {\n break;\n }\n\n if (p._isSpecialElement(element)) {\n furthestBlock = element;\n }\n }\n\n if (!furthestBlock) {\n p.openElements.popUntilElementPopped(formattingElementEntry.element);\n p.activeFormattingElements.removeEntry(formattingElementEntry);\n }\n\n return furthestBlock;\n}", "function aaObtainFurthestBlock(p, formattingElementEntry) {\n let furthestBlock = null;\n\n for (let i = p.openElements.stackTop; i >= 0; i--) {\n const element = p.openElements.items[i];\n\n if (element === formattingElementEntry.element) {\n break;\n }\n\n if (p._isSpecialElement(element)) {\n furthestBlock = element;\n }\n }\n\n if (!furthestBlock) {\n p.openElements.popUntilElementPopped(formattingElementEntry.element);\n p.activeFormattingElements.removeEntry(formattingElementEntry);\n }\n\n return furthestBlock;\n}", "function aaObtainFurthestBlock(p, formattingElementEntry) {\n let furthestBlock = null;\n\n for (let i = p.openElements.stackTop; i >= 0; i--) {\n const element = p.openElements.items[i];\n\n if (element === formattingElementEntry.element) {\n break;\n }\n\n if (p._isSpecialElement(element)) {\n furthestBlock = element;\n }\n }\n\n if (!furthestBlock) {\n p.openElements.popUntilElementPopped(formattingElementEntry.element);\n p.activeFormattingElements.removeEntry(formattingElementEntry);\n }\n\n return furthestBlock;\n}", "function aaObtainFurthestBlock(p, formattingElementEntry) {\n let furthestBlock = null;\n\n for (let i = p.openElements.stackTop; i >= 0; i--) {\n const element = p.openElements.items[i];\n\n if (element === formattingElementEntry.element) {\n break;\n }\n\n if (p._isSpecialElement(element)) {\n furthestBlock = element;\n }\n }\n\n if (!furthestBlock) {\n p.openElements.popUntilElementPopped(formattingElementEntry.element);\n p.activeFormattingElements.removeEntry(formattingElementEntry);\n }\n\n return furthestBlock;\n}", "function aaObtainFurthestBlock(p, formattingElementEntry) {\r\n var furthestBlock = null;\r\n\r\n for (var i = p.openElements.stackTop; i >= 0; i--) {\r\n var element = p.openElements.items[i];\r\n\r\n if (element === formattingElementEntry.element)\r\n break;\r\n\r\n if (p._isSpecialElement(element))\r\n furthestBlock = element;\r\n }\r\n\r\n if (!furthestBlock) {\r\n p.openElements.popUntilElementPopped(formattingElementEntry.element);\r\n p.activeFormattingElements.removeEntry(formattingElementEntry);\r\n }\r\n\r\n return furthestBlock;\r\n}", "function aaObtainFurthestBlock(p, formattingElementEntry) {\n var furthestBlock = null;\n\n for (var i = p.openElements.stackTop; i >= 0; i--) {\n var element = p.openElements.items[i];\n\n if (element === formattingElementEntry.element)\n break;\n\n if (p._isSpecialElement(element))\n furthestBlock = element;\n }\n\n if (!furthestBlock) {\n p.openElements.popUntilElementPopped(formattingElementEntry.element);\n p.activeFormattingElements.removeEntry(formattingElementEntry);\n }\n\n return furthestBlock;\n}", "function aaObtainFurthestBlock(p, formattingElementEntry) {\n var furthestBlock = null;\n\n for (var i = p.openElements.stackTop; i >= 0; i--) {\n var element = p.openElements.items[i];\n\n if (element === formattingElementEntry.element)\n break;\n\n if (p._isSpecialElement(element))\n furthestBlock = element;\n }\n\n if (!furthestBlock) {\n p.openElements.popUntilElementPopped(formattingElementEntry.element);\n p.activeFormattingElements.removeEntry(formattingElementEntry);\n }\n\n return furthestBlock;\n}", "function aaObtainFurthestBlock(p, formattingElementEntry) {\n var furthestBlock = null;\n\n for (var i = p.openElements.stackTop; i >= 0; i--) {\n var element = p.openElements.items[i];\n\n if (element === formattingElementEntry.element)\n break;\n\n if (p._isSpecialElement(element))\n furthestBlock = element;\n }\n\n if (!furthestBlock) {\n p.openElements.popUntilElementPopped(formattingElementEntry.element);\n p.activeFormattingElements.removeEntry(formattingElementEntry);\n }\n\n return furthestBlock;\n}", "function aaObtainFurthestBlock(p, formattingElementEntry) {\n var furthestBlock = null;\n\n for (var i = p.openElements.stackTop; i >= 0; i--) {\n var element = p.openElements.items[i];\n\n if (element === formattingElementEntry.element)\n break;\n\n if (p._isSpecialElement(element))\n furthestBlock = element;\n }\n\n if (!furthestBlock) {\n p.openElements.popUntilElementPopped(formattingElementEntry.element);\n p.activeFormattingElements.removeEntry(formattingElementEntry);\n }\n\n return furthestBlock;\n}" ]
[ "0.6577409", "0.6577409", "0.6577409", "0.6571231", "0.65461355", "0.65461355", "0.65461355", "0.6516638", "0.6516638", "0.65010834", "0.64936745", "0.64802283", "0.6474632", "0.64665604", "0.64612967", "0.6339487", "0.633014", "0.63266474", "0.62810093", "0.627958", "0.627958", "0.627958", "0.627958", "0.62716997", "0.62716997", "0.62631047", "0.61915004", "0.6188052", "0.6188052", "0.6188052", "0.6186668", "0.6150248", "0.61496365", "0.6059483", "0.60400474", "0.6038796", "0.6038796", "0.60003513", "0.5993845", "0.5981692", "0.5947187", "0.59281516", "0.5907062", "0.5900166", "0.5894992", "0.5875446", "0.58737564", "0.5866937", "0.5860562", "0.58595717", "0.5854988", "0.58533347", "0.58364046", "0.58290654", "0.581875", "0.581875", "0.581875", "0.5801784", "0.5801559", "0.57880515", "0.57796067", "0.57719374", "0.57616735", "0.57605296", "0.5760227", "0.57541865", "0.57541865", "0.57541865", "0.5744336", "0.57442397", "0.57409865", "0.57409865", "0.57404447", "0.57374096", "0.5731789", "0.5718994", "0.57123125", "0.5710143", "0.5688367", "0.5687244", "0.56852925", "0.56838155", "0.568022", "0.56660736", "0.56660736", "0.5665878", "0.5665305", "0.5654761", "0.5649587", "0.5641367", "0.5627729", "0.56163687", "0.56163687", "0.56163687", "0.56163687", "0.56155413", "0.561306", "0.561306", "0.561306", "0.561306" ]
0.6270516
25
such as table ancestors and cross browser bugs.
function getOffsetParent(element){var window=getWindow(element);var offsetParent=getTrueOffsetParent(element);while(offsetParent&&isTableElement(offsetParent)&&getComputedStyle(offsetParent).position==='static'){offsetParent=getTrueOffsetParent(offsetParent);}if(offsetParent&&(getNodeName(offsetParent)==='html'||getNodeName(offsetParent)==='body'&&getComputedStyle(offsetParent).position==='static')){return window;}return offsetParent||getContainingBlock(element)||window;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function k(e,t){return c(e,\"table\")&&c(11!==t.nodeType?t:t.firstChild,\"tr\")&&me(\">tbody\",e)[0]||e}", "function gtGrdObj(tdObj) { try { var ele = tdObj.parentNode.parentNode.parentNode; if (ele.tagName.toLowerCase() == \"tbody\") le = ele.parentNode; return ele; } catch (e) { return null; } }", "function manipulationTarget( elem, content ) { // 5634\n\tif ( nodeName( elem, \"table\" ) && // 5635\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) { // 5636\n // 5637\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem; // 5638\n\t} // 5639\n // 5640\n\treturn elem; // 5641\n} // 5642", "function getParentTableObj(id)\r\n{\r\n\tvar gBlock = getGridBlock(id);\r\n\tif(!gBlock)\r\n\t\treturn false;\r\n\tvar tag = $(gBlock).tagName();\r\n\tvar parent;\r\n\t\r\n\tif(tag == 'div')\r\n\t\tparent = gBlock;\r\n\telse if(tag == 'table')\r\n\t{\r\n\t\tparent = $(gBlock).parent();\r\n\t\tif($(parent).tagName()!='div')\r\n\t\t\treturn false;\r\n\t\tif($(parent).attr('id')!='grid_block'+id && $(parent).attr('id')!='resize_cell'+id)\t\r\n\t\t\treturn false;\r\n\t}\r\n\telse\r\n\t\treturn false;\r\n\t\r\n\tif(!$(parent).length)\r\n\t\treturn false;\r\n\telse\r\n\t\treturn parent;\r\n}", "function k(e, t) {\n return o(e, \"table\") && o(11 !== t.nodeType ? t : t.firstChild, \"tr\") ? he(\">tbody\", e)[0] || e : e;\n }", "function vc_getElementAbsolutePos(elemID) { \n var element; \n if (typeof(elemID) == \"string\") { \n element = document.getElementById(elemID); \n } \n else { \n element = elemID; \n } \n \n var res = new Object(); \n res.x = 0; res.y = 0; \n if (element !== null) { \n res.x = element.offsetLeft; \n \n var offsetParent = element.offsetParent; \n var offsetParentTagName = offsetParent != null ? offsetParent.tagName.toLowerCase() : \"\"; \n \n if (__isIENew && offsetParentTagName == 'td') { \n res.y = element.scrollTop; \n } \n else { \n res.y = element.offsetTop; \n } \n \n var parentNode = element.parentNode; \n var borderWidth = null; \n \n while (offsetParent != null) { \n res.x += offsetParent.offsetLeft; \n res.y += offsetParent.offsetTop; \n \n var parentTagName = offsetParent.tagName.toLowerCase(); \n \n if ((__isIEOld && parentTagName != \"table\") || (__isFireFoxNew && parentTagName == \"td\") || __isChrome) { \n borderWidth = vc_getBorderWidth(offsetParent); \n res.x += borderWidth.left; \n res.y += borderWidth.top; \n } \n \n if (offsetParent != document.body && offsetParent != document.documentElement) { \n res.x -= offsetParent.scrollLeft; \n res.y -= offsetParent.scrollTop; \n } \n \n \n //next lines are necessary to fix the problem with offsetParent \n if (!__isIE && !__isOperaOld || __isIENew) { \n while (offsetParent != parentNode && parentNode !== null) { \n res.x -= parentNode.scrollLeft; \n res.y -= parentNode.scrollTop; \n if (__isFireFoxOld || __isWebKit) { \n borderWidth = vc_getBorderWidth(parentNode); \n res.x += borderWidth.left; \n res.y += borderWidth.top; \n } \n parentNode = parentNode.parentNode; \n } \n } \n \n parentNode = offsetParent.parentNode; \n offsetParent = offsetParent.offsetParent; \n } \n } \n return res; \n}", "function r(a,b){return fa.nodeName(a,\"table\")&&fa.nodeName(11!==b.nodeType?b:b.firstChild,\"tr\")?a.getElementsByTagName(\"tbody\")[0]||a.appendChild(a.ownerDocument.createElement(\"tbody\")):a}", "function hiLightDown(currentElement)\n\t{\n\t\tvar eTR=currentElement.parentNode;\n\t\t\n\t\tif(eTR.tagName != \"TR\")\n\t\t\treturn;\n\t\n\t\tvar nRowIndex=eTR.rowIndex;\n\t\tvar nTotalRows=eTR.parentNode.rows.length;\n\t\tvar bJumpOutOfSubTree=false;\n\t\t\n\t\tif(nRowIndex%2!=0)\n\t\t{\n\t\t\tif(nRowIndex+1 <= nTotalRows-1)\n\t\t\t\teTR.parentNode.rows(nRowIndex+1).cells(1).fireEvent(\"onclick\");\n\t\t\telse\n\t\t\t\tbJumpOutOfSubTree=true;\t\n\t\t}\t\t\n\t\telse\n\t\t{\n\t\t\tif( (nRowIndex < nTotalRows-1) && (eTR.parentNode.rows(nRowIndex+1).style.display !='none'))\n\t\t\t\t_hiLightTopOfSebTree(eTR.parentNode.rows(nRowIndex+1));\n\t\t\telse if (nRowIndex < nTotalRows-2)\n\t\t\t\t\teTR.parentNode.rows(nRowIndex+2).cells(1).fireEvent(\"onclick\");\n\t\t\telse\n\t\t\t\tbJumpOutOfSubTree=true;\t\t\t\n\t\t}\t\n\t\n\t\tif(bJumpOutOfSubTree)\n\t\t{\n\t\t\tvar eTD=eTR.parentNode.parentNode.parentNode;\n\t\t\thiLightDown(eTD);\n\t\t}\n\t}", "function table_makeSubTreeUnSelectable(tableid)\r\n{\r\n var tableobj = document.getElementById(tableid);\r\n if (tableobj != null)\r\n {\r\n\r\n var checkboxes;\r\n\r\n // IE has a document object per element\r\n if(tableobj.document)\r\n checkboxes = tableobj.document.getElementsByTagName(\"INPUT\");\r\n else\r\n checkboxes = document.getElementsByTagName(\"INPUT\");\r\n\r\n if (checkboxes != null)\r\n {\r\n var len = checkboxes.length;\r\n var j = 0;\r\n for(var i=0; i<len; i++)\r\n {\r\n if (checkboxes[i].id == tableid+\"_rowselector\")\r\n {\r\n j++;\r\n// if (checkboxes[i].checked)\r\n// {\r\n // get owning row\r\n var rowobj = checkboxes[i];\r\n while (rowobj != null && rowobj.tagName != \"TR\")\r\n {\r\n if (rowobj.parentElement)\r\n {\r\n rowobj = rowobj.parentElement;\r\n }\r\n else\r\n {\r\n rowobj = rowobj.parentNode;\r\n }\r\n }\r\n if (rowobj.className == \"tableRow0\")\r\n {\r\n checkboxes[i].style.display=\"none\";\r\n checkboxes[i].disabled = true;\r\n }\r\n // }\r\n }\r\n }\r\n }\r\n }\r\n return null;\r\n}", "function m(a,b){return _.nodeName(a,\"table\")&&_.nodeName(11!==b.nodeType?b:b.firstChild,\"tr\")?a.getElementsByTagName(\"tbody\")[0]||a.appendChild(a.ownerDocument.createElement(\"tbody\")):a}", "getTables() {\n return this.root.getChain().map(node => node.table).filter(table => table);\n }", "function thingie(table, parent, nextSibling, i) {\r\n var j, row, rowTuple;\r\n\r\n var tableBody = table.tBodies[0];\r\n \r\n // Clear data rows, which might belong in a subsequent table.\r\n for (j = 0; row = tableBody.rows[j]; ++j)\r\n {\r\n if (row.cells[0].tagName == \"TD\") {\r\n --j;\r\n tableBody.removeChild(row); \r\n }\r\n }\r\n \r\n \r\n // Add the children that belong here.\r\n \r\n // Toss the rows into tables, one tablefull (BUGS_PER_TABLE) at a time.\r\n // Unfortunately, DOM 2 HTML insertRow is for creating *new* rows, so use DOM 2 Core.\r\n \r\n for (j = i * BUGS_PER_TABLE; (j < (i+1) * BUGS_PER_TABLE) && (rowTuple = rows[j]); ++j) {\r\n row = rowTuple[2];\r\n \r\n if (j % 2)\r\n row.className = row.className.replace(/bz_odd/, \"bz_even\");\r\n else\r\n row.className = row.className.replace(/bz_even/, \"bz_odd\");\r\n \r\n tableBody.appendChild(row);\r\n }\r\n \r\n // Put it back into the document. \r\n parent.insertBefore(table, nextSibling);\r\n }", "function hl(cb)\r\n{\r\n if (ie)\r\n {\r\n\t while (cb.tagName != \"TR\")\r\n\t {\r\n\t\t cb = cb.parentElement;\r\n\t }\r\n }\r\n else\r\n {\r\n\t while (cb.tagName != \"TR\")\r\n\t {\r\n\t\t cb = cb.parentNode;\r\n\t }\r\n }\r\n cb.className = 'hlight';\r\n}", "function getOffsetParent(element){var window=getWindow(element);var offsetParent=getTrueOffsetParent(element);while(offsetParent&&isTableElement(offsetParent)&&getComputedStyle$1(offsetParent).position==='static'){offsetParent=getTrueOffsetParent(offsetParent);}if(offsetParent&&(getNodeName(offsetParent)==='html'||getNodeName(offsetParent)==='body'&&getComputedStyle$1(offsetParent).position==='static')){return window;}return offsetParent||getContainingBlock(element)||window;}", "normalize_table() {\n var trs = document.getElementById('ComparisonTable').getElementsByTagName('tr'), len = trs.length, max = 0, td;\n // first we search for the longest table row in terms of # of children \n for (var i = len; i--;) {\n if (trs[i].children.length > max) max = trs[i].children.length;\n }\n // now we can fill the other rows\n for (var j = len; j--;) {\n while (trs[j].children.length < max) {\n td = document.createElement('td');\n trs[j].appendChild(td);\n }\n }\n }", "function getParent(obj, ele){ /* method to get a parentNode of a particular type. */\r\n\t\tvar table = obj;\r\n\t\tdo{\r\n\t\t\ttable = table.parentNode;\r\n\t\t}while(!table.nodeName.match(new RegExp(ele, \"i\")));\r\n\t\treturn table;\r\n\t}", "function manipulationTarget(elem, content) {\n return jQuery.nodeName(elem, \"table\") &&\n jQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, \"tr\") ?\n elem.getElementsByTagName(\"tbody\")[0] ||\n elem.appendChild(elem.ownerDocument.createElement(\"tbody\")) :\n elem;\n }", "updateChildLocationForTable(top, tableWidget) {\n for (let i = 0; i < tableWidget.childWidgets.length; i++) {\n let rowWidget = tableWidget.childWidgets[i];\n rowWidget.x = rowWidget.x;\n rowWidget.y = top;\n this.updateChildLocationForRow(top, rowWidget);\n top += rowWidget.height;\n }\n }", "getTable(startPosition, endPosition) {\n if (!isNullOrUndefined(startPosition.paragraph.associatedCell) && !isNullOrUndefined(endPosition.paragraph.associatedCell)) {\n let startTable = startPosition.paragraph.associatedCell.ownerTable;\n let endTable = startPosition.paragraph.associatedCell.ownerTable;\n if (startTable === endTable) {\n return startTable;\n }\n else {\n if (startTable.contains(startPosition.paragraph.associatedCell)) {\n return startTable;\n }\n else if (endTable.contains(startPosition.paragraph.associatedCell)) {\n return endTable;\n }\n else if (!startTable.isInsideTable || !endTable.isInsideTable) {\n return undefined;\n }\n else {\n do {\n startTable = startTable.associatedCell.ownerTable;\n if (startTable === endTable || startTable.contains(endTable.associatedCell)) {\n return startTable;\n }\n else if (endTable.contains(startTable.associatedCell)) {\n return endTable;\n }\n } while (!isNullOrUndefined(startTable.associatedCell));\n }\n }\n }\n return undefined;\n }", "function resetTreeVisiblity () {\n let row = bookmarksTable.rows[0]; // Start at first row in table (which btw cannot be hidden)\n let level;\n while (row != null) {\n\t// We are on an intended to be visible row,\n\trow.hidden = false;\n\t// Check if this is a folder and if meant to be open\n\tif ((row.dataset.type == \"folder\") // This is a folder, check its intended state\n\t\t&& (row.firstElementChild.firstElementChild.firstElementChild.classList\n\t\t\t .contains(\"twistieac\"))\n\t ) {\n\t // It is closed, then all its children are hidden ..\n\t level = parseInt(row.dataset.level, 10);\n\t while ((row = row.nextElementSibling) != null) {\n\t\tif (parseInt(row.dataset.level, 10) <= level)\n\t\t break; // Stop when lower or same level\n\t\trow.hidden = true;\n\t }\n\t}\n\telse row = row.nextElementSibling;\n }\n}", "function getOffsetParent$1(element){var window=getWindow$1(element);var offsetParent=getTrueOffsetParent$1(element);while(offsetParent&&isTableElement$1(offsetParent)&&getComputedStyle$2(offsetParent).position==='static'){offsetParent=getTrueOffsetParent$1(offsetParent);}if(offsetParent&&(getNodeName$1(offsetParent)==='html'||getNodeName$1(offsetParent)==='body'&&getComputedStyle$2(offsetParent).position==='static')){return window;}return offsetParent||getContainingBlock$1(element)||window;}", "function selectedNodeIsATableNode(dom,offsets,selNode){\n var retVal = false;\n\n switch (selNode.tagName){\n\n case \"TABLE\":\n case \"TR\":\n retVal = true;\n break;\n case \"TD\":\n case \"TH\":\n if ( !cursorIsInsideOfTableCell(dom,offsets,selNode) ){\n retVal = true;\n break;\n }\n default:\n break;\n\n }\n\n return retVal;\n\n}", "function findParentTrRow(srcElement) {\r\n var curElement = srcElement;\r\n while (curElement && (curElement.tagName.toUpperCase() != \"TR\")) {\r\n curElement = curElement.parentElement;\r\n }\r\n return (curElement.tagName.toUpperCase() == 'TR' ? curElement : null);\r\n}", "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}", "function getElementAbsolutePos(element) {\n var res = new Object();\n res.x = 0;\n res.y = 0;\n if (element !== null) {\n if (element.getBoundingClientRect) {\n var viewportElement = document.documentElement;\n var box = element.getBoundingClientRect();\n var scrollLeft = viewportElement.scrollLeft;\n var scrollTop = viewportElement.scrollTop;\n\n res.x = box.left + scrollLeft;\n res.y = box.top + scrollTop;\n\n }\n else { //for old browsers\n res.x = element.offsetLeft;\n res.y = element.offsetTop;\n\n var parentNode = element.parentNode;\n var borderWidth = null;\n\n while (offsetParent != null) {\n res.x += offsetParent.offsetLeft;\n res.y += offsetParent.offsetTop;\n\n var parentTagName =\n offsetParent.tagName.toLowerCase();\n\n if ((__isIEOld && parentTagName != \"table\") ||\n ((__isFireFoxNew || __isChrome) &&\n parentTagName == \"td\")) {\n borderWidth = kGetBorderWidth\n (offsetParent);\n res.x += borderWidth.left;\n res.y += borderWidth.top;\n }\n\n if (offsetParent != document.body &&\n offsetParent != document.documentElement) {\n res.x -= offsetParent.scrollLeft;\n res.y -= offsetParent.scrollTop;\n }\n\n\n //next lines are necessary to fix the problem\n //with offsetParent\n if (!__isIE && !__isOperaOld || __isIENew) {\n while (offsetParent != parentNode &&\n parentNode !== null) {\n res.x -= parentNode.scrollLeft;\n res.y -= parentNode.scrollTop;\n if (__isFireFoxOld || __isWebKit) {\n borderWidth =\n kGetBorderWidth(parentNode);\n res.x += borderWidth.left;\n res.y += borderWidth.top;\n }\n parentNode = parentNode.parentNode;\n }\n }\n\n parentNode = offsetParent.parentNode;\n offsetParent = offsetParent.offsetParent;\n }\n }\n }\n return res;\n}", "function findAncestorOffsetKey(node){var searchNode=node;while(searchNode&&searchNode!==document.documentElement){var key=getSelectionOffsetKeyForNode(searchNode);if(key!=null){return key;}searchNode=searchNode.parentNode;}return null;}", "function inBaseTreeView() { }", "function _hiLightTopOfSebTree(eTR)\n\t{\n\t\tvar eTBody=eTR.cells(1).firstChild.firstChild;\n\t\teTBody.rows(0).cells(1).fireEvent(\"onclick\");\n\t}", "function setUpTablesArray(unqiuePathOfTable)\n{\n\t//two-d array to hold each table's children frame info\n\tarrTablesChildrenFrames[unqiuePathOfTable] = new Array();\n}", "function table_highlightSelectedRowForChild(obj, state)\r\n{\r\n if (state == null) state = true;\r\n\r\n var rowobj = obj;\r\n while (rowobj != null && rowobj.tagName != \"TR\")\r\n {\r\n if (rowobj.parentElement)\r\n {\r\n rowobj = rowobj.parentElement;\r\n }\r\n else\r\n {\r\n rowobj = rowobj.parentNode;\r\n }\r\n }\r\n if (rowobj != null)\r\n {\r\n if (state == true)\r\n {\r\n rowobj.originalClassName = rowobj.className;\r\n rowobj.className = \"rowHighlight\";\r\n rowobj.cells[0].childNodes[0].style.backgroundColor = \"\";\r\n }\r\n else\r\n {\r\n if (rowobj.originalClassName != null)\r\n rowobj.className = rowobj.originalClassName;\r\n }\r\n }\r\n\r\n\r\n}", "function manipulationTarget( elem, content ) {\n if ( nodeName( elem, \"table\" ) &&\n nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n return jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\n }\n\n return elem;\n }", "function getRowsTable(row)\n{\n return row.parent().attr(\"id\");\n}", "function snavAddParentRequiredRows(parentId) {\r\n var parentElId = 'td-node--' + parentId;\r\n jQuery('#' + parentElId + ' .org-chart-expand-or-collapse').show();\r\n Ext.select('#' + parentElId + ' .org-chart-show-subordinates').setStyle('display', 'none');\r\n var markup = \"<table id='tbl-nodes-of--\" + parentId + \"' class='org-chart-table' cellpadding='0' cellspacing='0' style='jtable-layout: fixed; visibility: inherit'> \";\r\n markup += \"<tr id='tr-parent-line--\" + parentId + \"' class='parent-line-row'>\";\r\n markup += '</tr>';\r\n\r\n // child lines\r\n markup += \"<tr id='tr-child-line--\" + parentId + \"' class='child-line-row'>\";\r\n // markup += snavRenderRows('tmpChildLine', nodes);\r\n markup += '</tr>';\r\n\r\n // child nodes\r\n markup += \"<tr id='tr-child-content--\" + parentId + \"' class='child-content-row'>\";\r\n // markup += snavRenderRows('tmpChildNode', nodes);\r\n markup += '</tr>';\r\n markup += \"</table> \";\r\n\r\n jQuery('#' + parentElId).append(markup);\r\n}", "function layout (root) { \n inherit(inhTable(0), root); \n \n var old_tablebox_1 = visit_tablebox_1;\n visit_tablebox_1 = function (node) { old_tablebox_1(node); addCols(node); };\n inherit(inhTable(1), root); \n visit_tablebox_1 = old_tablebox_1; \n inherit(inhTable(2), root); \n \n synthesize(synTable(3), root);\n inherit(inhTable(4), root);\n inherit(inhTable(5), root);\n synthesize(synTable(6), root);\n\n //inorder traversal\n var old_visit_7 = visit_7;\n var old_visit_tablebox_7 = visit_tablebox_7;\n visit_tablebox_7 = function(node){visitTableInorder(node,old_visit_tablebox_7); return true;};\n visit_7 = reroute(patchGetChildrenStackable(visit_7,getChildrenRaw), \"col\", patchGetChildrenStackable(visit_7,patchedGetChildren));\n visit_7(root);\n visit_tablebox_7 = old_visit_tablebox_7;\n visit_7 = old_visit_7;\n\n inherit(inhTable(8), root);\n}", "function shouldMovePopupBackToTable(popupDiv)\n{\n var tableId = popupDiv.getAttribute('tableid');\n if(tableId != null)\n {\n var tableBean = document.getElementById(tableId);\n return tableBean == popupDiv.parentNode;\n }\n return false;\n}", "function bindAncestorScrollEvents() {\n var elem = (hasFrozenRows && !options.frozenBottom) ? $canvasBottomL[0] : $canvasTopL[0];\n while ((elem = elem.parentNode) != document.body && elem != null) {\n // bind to scroll containers only\n if (elem == $viewportTopL[0] || elem.scrollWidth != elem.clientWidth || elem.scrollHeight != elem.clientHeight) {\n var $elem = $(elem);\n if (!$boundAncestors) {\n $boundAncestors = $elem;\n } else {\n $boundAncestors = $boundAncestors.add($elem);\n }\n $elem.on(\"scroll.\" + uid, handleActiveCellPositionChange);\n }\n }\n }", "function getTableTextColumnMissingParentTableError() {\n return Error(\"Text column could not find a parent table for registration.\");\n }", "function firstCommonAncestor() {\n \n}", "shiftChildLocationForTableWidget(tableWidget, shiftTop) {\n tableWidget.y = tableWidget.y + shiftTop;\n for (let i = 0; i < tableWidget.childWidgets.length; i++) {\n let childWidget = tableWidget.childWidgets[i];\n if (childWidget instanceof TableRowWidget) {\n this.shiftChildLocationForTableRowWidget(childWidget, shiftTop);\n }\n }\n }", "function hasRedundantParent( node )\n{\n var rc = false;\n\n if ( arrayContains(redundantTagCandidates, node.tagName ) )\n {\n var parent = node.parentNode;\n\n // Find controlling parent\n while( parent != null )\n {\n if ( node.tagName == parent.tagName )\n {\n // Compare parent and child attribute name/value pairs\n var cArrs = parseAttributes( node, true, true );\n var pArrs = parseAttributes( parent, true, true );\n var cNames = cArrs[0];\n var cValues = cArrs[1];\n var pNames = pArrs[0];\n var pValues = pArrs[1];\n\n if ( cNames.length == pNames.length && cValues.length == pValues.length )\n {\n cNames.sort();\n pNames.sort();\n cValues.sort();\n pValues.sort();\n\n var len = cNames.length;\n for( var i = 0; i < len; i++ )\n {\n // note in js: undefined == undefined is true\n if ( pNames[i] != cNames[i] || cValues[i] != pValues[i] )\n break;\n }\n\n rc = (i == len); // if we got through everything they're the same\n }\n\n if ( rc ) // if we're redundant, we're done\n break;\n\n // Otherwise, if we're not actually overriding anything on this\n // parent, we may still be redundant with an uber parent. Cycle through\n // the child's attributes and if none are present on parent keep going\n //\n var bKeepGoing = true;\n for( var i = 0; i < cNames.length; i++ )\n {\n if ( arrayContains(pNames, cNames[i] ) )\n {\n bKeepGoing = false;\n break;\n }\n }\n\n if ( !bKeepGoing )\n break;\n } else if ( node.tagName == 'TABLE' || parent.tagName == 'TABLE') {\n break;\n }\n\n parent = parent.parentNode;\n }\n }\n\n return rc;\n}", "function snavRemoveEndTopLines() {\r\n var trs = jQuery('.child-line-row');\r\n for (var i = 0; i < trs.length; i++) {\r\n var tr = trs[i];\r\n var tds = jQuery(tr).find('td');\r\n jQuery(tds[0]).removeClass('top');\r\n var lastIndex = tds.length - 1;\r\n jQuery(tds[lastIndex]).removeClass('top');\r\n }\r\n}", "parent() {\n return this._ancestors.top();\n }", "isAncestor(value) {\n return isPlainObject(value) && Node.isNodeList(value.children);\n }", "function manipulationTarget(elem, content) {\n return jQuery.nodeName(elem, \"table\") &&\n jQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, \"tr\") ?\n\n elem.getElementsByTagName(\"tbody\")[0] ||\n elem.appendChild(elem.ownerDocument.createElement(\"tbody\")) :\n elem;\n }", "_diffTables(oTable, nTable) {\n\t\tconst oTableName = oTable.tableName;\n\t\tconst nTableName = nTable.tableName;\n\t\tconst tableNameHasChanged = oTableName !== nTableName;\n\t\tconst {\n\t\t\tcharset: nCharset,\n\t\t\tcollation: nCollation,\n\t\t\tcolumns: nColumns\n\t\t} = nTable.schema;\n\n\t\tconst {\n\t\t\tcharset: oCharset,\n\t\t\tcollation: oCollation,\n\t\t\tcolumns: oColumns\n\t\t} = oTable.schema;\n\n\t\tif ( tableNameHasChanged ) {\n\t\t\tthis._renameTable('up', oTableName, nTableName);\n\t\t\tthis._renameTable('dn', nTableName, oTableName);\n\t\t}\n\n\t\tif ( (nCharset !== oCharset) || (nCollation !== oCollation) ) {\n\t\t\tthis._changeTableCharset('up', nTableName, nCharset, nCollation, oCharset, oCollation);\n\t\t\tthis._changeTableCharset('dn', oTableName, oCharset,oCollation);\n\t\t}\n\n\t\tconst columnsDiff = deepDiff(oColumns, nColumns) || [];\n\t\tcolumnsDiff.forEach(d => {\n\t\t\tconst colName = d.path[0];\n\t\t\t// 'N' indicates a newly added property/element\n\t\t\tif (d.kind === 'N') {\n\t\t\t\tconst nCol = nColumns[colName];\n\t\t\t\tthis._addColumn('up', nTableName, colName, nCol);\n\t\t\t\tthis._dropColumn('dn', nTableName, colName);\n\t\t\t}\n\t\t\t// 'E' indicates a property/element was edited\n\t\t\t// 'A' indicates a change occurred within an array\n\t\t\telse if (d.kind === 'E' || d.kind === 'A') {\n\t\t\t\tconst nCol = nColumns[colName];\n\t\t\t\tconst oCol = oColumns[colName];\n\t\t\t\tthis._alterColumn('up', nTableName, colName, nCol);\n\t\t\t\tthis._alterColumn('dn', oTableName, colName, oCol);\n\t\t\t}\n\t\t\t// 'D' indicates a property/element was deleted\n\t\t\t// Changin `if (d.kind === 'D')` into `else`\n\t\t\t// Point? Fixing istanbul coverage report.\n\t\t\t// The `d.kind` can only be `D` anyways and relevant tests are passed!\n\t\t\telse {\n\t\t\t\tthis._dropColumn('up', nTableName, colName);\n\t\t\t\tthis._addColumn('dn', oTableName, colName, oColumns[colName]);\n\t\t\t}\n\t\t});\n\n\t\tthis._diffTableIndexes(oTable, nTable);\n\t}", "function handleDragGetTr(e) {\r\n var elt = e.target;\r\n while(elt != null && elt.tagName != \"TR\") {\r\n elt = elt.parentNode;\r\n }\r\n return elt == null ? e.target : elt;\r\n}", "function _fix_table_heads(table)\n {\n var sizer_tr = {left:null, top:null, wide:null, high:null};\n var sizer_td = {left:null, top:null, wide:null, high:null};\n var sizer_th = {left:null, top:null, wide:null, high:null};\n \n function is_tr_el(node)\n {\n return node.nodeType==1 && node.tagName.toLowerCase()==\"tr\";\n }\n\n function is_th_el(node)\n {\n return node.nodeType==1 && node.tagName.toLowerCase()==\"th\";\n }\n\n // search nextSiblings for match\n function find_matched_headfix_row(tr, hf_name)\n {\n while ((tr=tr.nextSibling))\n if (is_tr_el(tr))\n if (class_includes(tr,hf_name))\n return tr;\n\n return null;\n }\n\n function reposition_element(ref, flo, sizer)\n {\n var ref_par = ref.parentNode;\n var os = get_relative_offset(ref, ref_par);\n flo.style.left = px(os.left + sizer.left);\n flo.style.top = px(os.top + sizer.top);\n }\n\n function resize_element(ref, flo, sizer)\n {\n flo.style.height = px(ref.offsetHeight + sizer.high);\n flo.style.width = px(ref.offsetWidth + sizer.wide);\n }\n\n function calculate_sizer(ref, flo, sizer)\n {\n sizer.left = ref.clientLeft - flo.clientLeft;\n sizer.top = ref.clientTop - flo.clientTop;\n\n sizer.wide = ref.clientWidth - flo.clientWidth;\n sizer.high = ref.clientHeight - flo.clientHeight;\n }\n\n function align_cells(ref, flo)\n {\n var r,f, i;\n\n r = firstChildEl(ref);\n f = firstChildEl(flo);\n\n if (!r || !f)\n return;\n\n var sizer = null;\n switch(r.tagName.toLowerCase())\n {\n case \"th\": sizer = sizer_th; break;\n case \"td\": sizer = sizer_td; break;\n }\n\n if (sizer.wide==null)\n {\n reposition_element(r,f,sizer);\n resize_element(r,f,sizer);\n calculate_sizer(r,f,sizer);\n }\n\n while (r && f)\n {\n reposition_element(r,f,sizer);\n resize_element(r,f,sizer);\n\n r = nextSiblingEl(r);\n f = nextSiblingEl(f);\n }\n }\n\n function align_pair(ref, flo)\n {\n var sizer = null;\n switch(ref.tagName.toLowerCase())\n {\n case \"tr\": sizer = sizer_tr; break;\n case \"th\": sizer = sizer_th; break;\n case \"td\": sizer = sizer_td; break;\n }\n \n var osref = get_doc_offset(ref);\n flo.style.left = px(osref.left);\n flo.style.top = px(osref.top);\n resize_element(ref,flo,sizer);\n\n if (sizer.high===null)\n {\n calculate_sizer(ref,flo,sizer);\n\n if (sizer.left || sizer.top)\n reposition_element(ref,flo,sizer);\n if (sizer.wide || sizer.high)\n resize_element(ref,flo,sizer);\n }\n\n var first = firstChildEl(ref);\n if (first)\n {\n var ftag = first.tagName.toLowerCase();\n if (ftag==\"th\" || ftag==\"td\")\n align_cells(ref, flo);\n }\n }\n\n var re_headfix = /headfix_\\S+/;\n function align_paired_rows(thead)\n {\n var rematch, trmatch;\n var currow = firstChildEl(thead);\n while (currow)\n {\n if (is_tr_el(currow))\n if ((match=currow.className.match(re_headfix)))\n if ((trmatch=find_matched_headfix_row(currow, match[0])))\n {\n if (class_includes(currow,\"floater\"))\n align_pair(trmatch,currow,sizer_tr);\n else\n align_pair(currow,trmatch,sizer_tr);\n }\n currow = nextSiblingEl(currow);\n }\n }\n\n // replace function with function in closure:\n _fix_table_heads = function(tab)\n {\n var thead = tab.getElementsByTagName(\"thead\");\n if (thead && thead.length)\n align_paired_rows(thead[0]);\n };\n\n // must explicitely call the function when setting up the closure:\n _fix_table_heads(table);\n \n } // end of _fix_table_heads", "function manipulationTarget( elem, content ) {\n \tif ( nodeName( elem, \"table\" ) &&\n \t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n \t\treturn jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\n \t}\n\n \treturn elem;\n }", "function tableCellViewer()\n{\n /**\n * Updates the view for the given accessible.\n *\n * @param aAccessible\n * The given accessible\n */\n this.update = function tableCellViewer_update(aAccessible)\n {\n if (!(aAccessible instanceof nsIAccessibleTableCell))\n return false;\n\n // columnIndex\n var columnIndex = aAccessible.columnIndex;\n this.columnIndexElm.textContent = columnIndex;\n\n // rowIndex\n var rowIndex = aAccessible.rowIndex;\n this.rowIndexElm.textContent = rowIndex;\n\n // columnExtent\n var columnExtent = aAccessible.columnExtent;\n this.columnExtentElm.textContent = columnExtent;\n \n // rowIndex\n var rowExtent = aAccessible.rowExtent;\n this.rowExtentElm.textContent = rowExtent;\n\n // isSelected\n var isSelected = aAccessible.isSelected();\n this.isSelectedElm.textContent = isSelected;\n\n // table, columnHeaderCells, rowHeaderCells\n this.addRelated(aAccessible);\n\n return true;\n }\n\n /**\n * Clear the view's data.\n */\n this.clear = function tableCellViewer_clear()\n {\n this.mTreeBox.view = null;\n\n this.columnIndexElm.textContent = \"\";\n this.rowIndexElm.textContent = \"\";\n this.columnExtentElm.textContent = \"\";\n this.rowExtentElm.textContent = \"\";\n this.isSelectedElm.textContent = \"\";\n }\n\n this.isCommandEnabled = function tableCellViewer_isCommandEnable(aCommand)\n {\n if (aCommand == \"cmdEditInspectInNewWindow\") {\n return this.mTreeView.selection.count == 1;\n }\n return false;\n },\n\n /**\n * Prepares 'inspectInNewView' command.\n */\n this.inspectInNewView = function tableCellViewer_inspectInNewView()\n {\n if (this.mTreeView.selection.count == 1) {\n var minAndMax = {};\n this.mTreeView.selection.getRangeAt(0, minAndMax, minAndMax);\n var node = this.mTreeView.getDOMNode(minAndMax.value);\n if (node) {\n inspectObject(node);\n }\n }\n }\n\n //////////////////////////////////////////////////////////////////////////////\n //// private\n\n this.addRelated = function tableCellViewer_addRelated(aAccessible)\n {\n this.mTreeView = new TableCellTreeView(aAccessible);\n this.mTreeBox.view = this.mTreeView;\n }\n\n this.mTree = document.getElementById(\"tableCell:accObjects\");\n this.mTreeBox = this.mTree.treeBoxObject;\n\n this.columnIndexElm = document.getElementById(\"tableCell:columnIndex\");\n this.rowIndexElm = document.getElementById(\"tableCell:rowIndex\");\n this.columnExtentElm = document.getElementById(\"tableCell:columnExtent\");\n this.rowExtentElm = document.getElementById(\"tableCell:rowExtent\");\n this.isSelectedElm = document.getElementById(\"tableCell:isSelected\");\n}", "function manipulationTarget( elem, content ) {\r\n\tif ( nodeName( elem, \"table\" ) &&\r\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\r\n\r\n\t\treturn jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\r\n\t}\r\n\r\n\treturn elem;\r\n}", "get ancestors () {\n return this.parents.reduce((parents, patch) => {\n return parents.concat([ patch ]).concat(patch.parents);\n }, []);\n }", "function findRelatives(event) {\n var relatives = {};\n\n // finds closest parent of match or quantified type, sets ID on relatives object\n var parentID = $(event.toElement).closest('.match, .quantified').attr('id');\n relatives.parentID = parseInt(parentID);\n\n relatives.leftSibID = handlerHelpers.findLeftSibling(event);\n\n if (relatives.leftSibID === undefined && relatives.parentID === undefined){\n console.log('no parent node and no left sibling. Drop the copy and revert. YOU GET NOTHINGGGGG');\n return;\n }\n return relatives;\n }", "function xPrevSib(e,t)\r\n{\r\n var s = e ? e.previousSibling : null;\r\n if (t) while(s && s.nodeName != t) {s=s.previousSibling;}\r\n else while(s && s.nodeType != 1) {s=s.previousSibling;}\r\n return s;\r\n}", "function grabHeadersAndHighlightRelatedCells(element){\n\t\tvar table = $(element).closest(\"table\");\n\t\tif($(table).attr(\"role\") != \"presentation\"){\n\t\t\t//TODO: does role=none matter?\n\t\t\tvar rowIndex = $(element).attr('data-tANDI508-rowIndex');\n\t\t\tvar rowMember = $(element).attr(\"data-tANDI508-rowMember\");\n\t\t\tvar colIndex = $(element).attr('data-tANDI508-colIndex');\n\t\t\tvar colMember = $(element).attr(\"data-tANDI508-colMember\");\n\t\t\tvar headers = $.trim($(element).attr(\"headers\"));\n\t\t\tvar idsArray, referencedId, referencedElement;\n\t\t\t//Find Related <th> cells\n\t\t\t//==HEADERS/ID MODE==//\n\t\t\tif((mode == \"headers/id mode\") && headers){\n\t\t\t\tidsArray = headers.split(\" \");\n\t\t\t\tfor (var x=0;x<idsArray.length;x++){\n\t\t\t\t\t//Can the id be found somewhere on the page?\n\t\t\t\t\treferencedId = andiUtility.escapeCssCharactersInId(idsArray[x]);\n\t\t\t\t\treferencedElement = $(\"#\"+referencedId);\n\t\t\t\t\t\n\t\t\t\t\tif($(referencedElement).html() !== undefined){\n\t\t\t\t\t\tif($(referencedElement).is(\"th\") || $(referencedElement).is(\"td\")){\n\t\t\t\t\t\t\tassociatedThText += andiUtility.formatForHtml(andiUtility.getTextOfTree($(referencedElement))) + tANDI.associatedThDelimeter;\n\t\t\t\t\t\t\t$(referencedElement).addClass(\"tANDI508-highlight\");\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\t//==SCOPE MODE==//\n\t\t\telse if(mode == \"scope mode\"){\n\t\t\t\tif($(element).is(\"td\")){\n\t\t\t\t\t//Highlight associating <th> for this <td>\n\t\t\t\t\t$(table).find(\"th.ANDI508-element\").filter(':visible').each(function(){\n\t\t\t\t\t\t//get associated th from col\n\t\t\t\t\t\tif(index_greaterThan(rowIndex, $(this).attr(\"data-tANDI508-rowIndex\"))\n\t\t\t\t\t\t&& index_match(colIndex, $(this).attr(\"data-tANDI508-colIndex\"))\n\t\t\t\t\t\t&& !index_match(rowIndex, $(this).attr(\"data-tANDI508-rowIndex\")))\n\t\t\t\t\t\t{//add associatedThText and highlight the cell from whence it came\n\t\t\t\t\t\t\t$(this).addClass(\"tANDI508-highlight\");\n\t\t\t\t\t\t\tassociatedThText += andiUtility.formatForHtml(andiUtility.getTextOfTree($(this))) + tANDI.associatedThDelimeter;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//get associated th from row\n\t\t\t\t\t\tif(index_greaterThan(colIndex, $(this).attr(\"data-tANDI508-colIndex\"))\n\t\t\t\t\t\t&& index_match(rowIndex, $(this).attr(\"data-tANDI508-rowIndex\"))\n\t\t\t\t\t\t&& !index_match(colIndex, $(this).attr(\"data-tANDI508-colIndex\")))\n\t\t\t\t\t\t{//add associatedThText\n\t\t\t\t\t\t\t$(this).addClass(\"tANDI508-highlight\");\n\t\t\t\t\t\t\tassociatedThText += andiUtility.formatForHtml(andiUtility.getTextOfTree($(this))) + tANDI.associatedThDelimeter;\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\t//Highlight associating <th> and <td> for this th\n\t\t\tif($(element).is(\"th\")){\n\t\t\t\tvar scope = $(element).attr(\"scope\");\n\t\t\t\tvar id = $(element).attr(\"id\");\n\t\t\t\tif((mode == \"scope mode\")){\n\t\t\t\t\t$(table).find(\"th.ANDI508-element,td.ANDI508-element\").filter(':visible').each(function(){\n\t\t\t\t\t\tif(scope){\n\t\t\t\t\t\t\t//th has scope\n\t\t\t\t\t\t\tif((scope == \"col\" || scope == \"colgroup\")\n\t\t\t\t\t\t\t\t&& !index_greaterThan(rowIndex, $(this).attr(\"data-tANDI508-rowIndex\"))\n\t\t\t\t\t\t\t\t&& index_match(colIndex,$(this).attr(\"data-tANDI508-colIndex\")))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//alert(rowIndex+\" \"+$(this).attr(\"data-tANDI508-rowIndex\"));\n\t\t\t\t\t\t\t\t$(this).addClass(\"tANDI508-highlight\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if((scope == \"row\" || scope == \"rowgroup\")\n\t\t\t\t\t\t\t\t&& !index_greaterThan(colIndex, $(this).attr(\"data-tANDI508-colIndex\"))\n\t\t\t\t\t\t\t\t&& index_match(rowIndex,$(this).attr(\"data-tANDI508-rowIndex\")))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$(this).addClass(\"tANDI508-highlight\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t//th has no scope\n\t\t\t\t\t\t\t//**Assumed associations - this is where it gets sketchy**\n\t\t\t\t\t\t\tif($(this).is(\"td\")){\n\t\t\t\t\t\t\t\tif(index_match(colIndex, $(this).attr(\"data-tANDI508-colIndex\")) || index_match(rowIndex,$(this).attr(\"data-tANDI508-rowIndex\")))\n\t\t\t\t\t\t\t\t\t$(this).addClass(\"tANDI508-highlight\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//No scope assumptions relating to other th\n\t\t\t\t\t\t\telse if($(this).is(\"th\")){\n\t\t\t\t\t\t\t\tif(rowIndex == \"0\"\n\t\t\t\t\t\t\t\t\t&& index_match(colIndex,$(this).attr(\"data-tANDI508-colIndex\"))\n\t\t\t\t\t\t\t\t\t&& !index_greaterThan(rowIndex, $(this).attr(\"data-tANDI508-rowIndex\")))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$(this).addClass(\"tANDI508-highlight\");\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\telse if((mode == \"headers/id mode\") && id){//might have headers attributes pointing to this <th>\n\t\t\t\t\t$(table).find(\"th.ANDI508-element,td.ANDI508-element\").filter(':visible').each(function(){\n\t\t\t\t\t\theaders = $(this).attr(\"headers\");\n\t\t\t\t\t\tif(headers){\n\t\t\t\t\t\t\tidsArray = headers.split(\" \");\n\t\t\t\t\t\t\tfor (var x=0;x<idsArray.length;x++){\n\t\t\t\t\t\t\t\tif(id==idsArray[x]){\n\t\t\t\t\t\t\t\t\t$(this).addClass(\"tANDI508-highlight\");\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}\n\t\t}\n\t}", "function mt(e){var t=null,i=e;if(i.liDom.previousSibling){var n=gt(i.liDom.previousSibling);t=n||i.liDom.previousSibling.node}else t=i.parent;return t}", "checkInternalPointers () {\n if (this.left) {\n if (this.left.parent !== this) throw new Error(`Parent pointer broken for key ${this.key}`)\n this.left.checkInternalPointers()\n }\n\n if (this.right) {\n if (this.right.parent !== this) throw new Error(`Parent pointer broken for key ${this.key}`)\n this.right.checkInternalPointers()\n }\n }", "function DoHL()\n{\nvar e = window.event.srcElement;\nwhile (e.tagName!=\"TR\")\n{e=e.parentElement;}\nif (e.className!='SL')\ne.className='HL';\n}", "function openAncestorCollections(p) {\n statusClear();\n openCols(allAncestorCollections(p));\n}", "function fixAssocTable( table ){\n\tvar startName = 'wp' + table.id;\n\tvar trs = table.getElementsByTagName( 'tr' );\n\tfor( var r = 1; r < trs.length; r++ ){\n\t\tvar tr = trs[r];\n\t\tvar inputs = tr.getElementsByTagName( 'input' );\n\t\tinputs[inputs.length - 1].onclick = removeGroupBoolCallback( table, r );\n\t}\n}", "function manipulationTarget( elem, content ) {\n\t\tif ( nodeName( elem, \"table\" ) &&\n\t\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\t\n\t\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t\t}\n\t\n\t\treturn elem;\n\t}", "rangeParent() {\n let common = !this.range ? undefined : this.range.commonAncestorContainer;\n return !common\n ? undefined\n : common.nodeType == 1\n ? common\n : common.parentElement;\n }", "function manipulationTarget(elem, content) {\r\n\t\treturn jQuery.nodeName(elem, \"table\") &&\r\n\t\t\tjQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, \"tr\") ?\r\n\r\n\t\t\telem.getElementsByTagName(\"tbody\")[0] ||\r\n\t\t\telem.appendChild(elem.ownerDocument.createElement(\"tbody\")) :\r\n\t\t\telem;\r\n\t}", "getOuterDepth() {\n mustInherit();\n }", "function tableOldDelete(table){\r\n while(table.firstChild){\r\n table.removeChild(table.firstChild)\r\n }\r\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}" ]
[ "0.6445565", "0.6040161", "0.58393914", "0.5824688", "0.5816572", "0.5804739", "0.58030534", "0.572371", "0.56821644", "0.5664005", "0.55925024", "0.55506366", "0.5527616", "0.5502319", "0.5501955", "0.5496449", "0.54459476", "0.5415138", "0.53849775", "0.53701067", "0.5360031", "0.5348981", "0.53486556", "0.5336334", "0.5331076", "0.5287761", "0.52555925", "0.52453727", "0.52235496", "0.5217922", "0.51917607", "0.518903", "0.51770335", "0.5174813", "0.51643586", "0.5163954", "0.51542896", "0.51536775", "0.51478606", "0.51468354", "0.51364386", "0.51337045", "0.5133229", "0.51329017", "0.5129868", "0.5125647", "0.5121337", "0.5119768", "0.51124", "0.51110554", "0.50979656", "0.5094639", "0.5089686", "0.5082955", "0.50731033", "0.50690854", "0.50675076", "0.5060559", "0.5054969", "0.5054853", "0.5054846", "0.5052929", "0.5051548", "0.50478905", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626", "0.50408626" ]
0.5542538
12
Round the offsets to the nearest suitable subpixel based on the DPR. Zooming can change the DPR, but it seems to report a value that will cleanly divide the values into the appropriate subpixels.
function roundOffsetsByDPR(_ref){var x=_ref.x,y=_ref.y;var win=window;var dpr=win.devicePixelRatio||1;return {x:round(round(x*dpr)/dpr)||0,y:round(round(y*dpr)/dpr)||0};}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(round(x * dpr) / dpr) || 0,\n y: round(round(y * dpr) / dpr) || 0\n };\n }", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n }", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: Math.round(x * dpr) / dpr || 0,\n y: Math.round(y * dpr) / dpr || 0\n };\n}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x, y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: _mathJs.round(x * dpr) / dpr || 0,\n y: _mathJs.round(y * dpr) / dpr || 0\n };\n}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(round(x * dpr) / dpr) || 0,\n y: round(round(y * dpr) / dpr) || 0\n };\n}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(round(x * dpr) / dpr) || 0,\n y: round(round(y * dpr) / dpr) || 0\n };\n}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(round(x * dpr) / dpr) || 0,\n y: round(round(y * dpr) / dpr) || 0\n };\n}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(round(x * dpr) / dpr) || 0,\n y: round(round(y * dpr) / dpr) || 0\n };\n}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(round(x * dpr) / dpr) || 0,\n y: round(round(y * dpr) / dpr) || 0\n };\n}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}", "function roundOffsetsByDPR(_ref, win) {\n var x = _ref.x,\n y = _ref.y;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}", "function roundOffsetsByDPR$1(_ref){var x=_ref.x,y=_ref.y;var win=window;var dpr=win.devicePixelRatio||1;return {x:round$1(round$1(x*dpr)/dpr)||0,y:round$1(round$1(y*dpr)/dpr)||0};}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_6__[\"round\"])(Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_6__[\"round\"])(x * dpr) / dpr) || 0,\n y: Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_6__[\"round\"])(Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_6__[\"round\"])(y * dpr) / dpr) || 0\n };\n}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_6__[\"round\"])(Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_6__[\"round\"])(x * dpr) / dpr) || 0,\n y: Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_6__[\"round\"])(Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_6__[\"round\"])(y * dpr) / dpr) || 0\n };\n}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_6__[\"round\"])(Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_6__[\"round\"])(x * dpr) / dpr) || 0,\n y: Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_6__[\"round\"])(Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_6__[\"round\"])(y * dpr) / dpr) || 0\n };\n}", "function $ebtt$var$roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: $FuL6$export$round($FuL6$export$round(x * dpr) / dpr) || 0,\n y: $FuL6$export$round($FuL6$export$round(y * dpr) / dpr) || 0\n };\n}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)((0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)(x * dpr) / dpr) || 0,\n y: (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)((0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)(y * dpr) / dpr) || 0\n };\n}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)((0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)(x * dpr) / dpr) || 0,\n y: (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)((0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)(y * dpr) / dpr) || 0\n };\n}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)((0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)(x * dpr) / dpr) || 0,\n y: (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)((0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)(y * dpr) / dpr) || 0\n };\n}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)((0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)(x * dpr) / dpr) || 0,\n y: (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)((0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)(y * dpr) / dpr) || 0\n };\n}", "function roundOffsets(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: Math.round(x * dpr) / dpr || 0,\n y: Math.round(y * dpr) / dpr || 0\n };\n }", "function roundOffsets(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: Math.round(x * dpr) / dpr || 0,\n y: Math.round(y * dpr) / dpr || 0\n };\n }", "function roundOffsets(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: Math.round(x * dpr) / dpr || 0,\n y: Math.round(y * dpr) / dpr || 0\n };\n}", "function roundOffsets(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: Math.round(x * dpr) / dpr || 0,\n y: Math.round(y * dpr) / dpr || 0\n };\n}", "function roundOffsets(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: Math.round(x * dpr) / dpr || 0,\n y: Math.round(y * dpr) / dpr || 0\n };\n}", "function roundOffsets(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: Math.round(x * dpr) / dpr || 0,\n y: Math.round(y * dpr) / dpr || 0\n };\n}", "function roundOffsets(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: Math.round(x * dpr) / dpr || 0,\n y: Math.round(y * dpr) / dpr || 0\n };\n}", "function roundOffsets(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: Math.round(x * dpr) / dpr || 0,\n y: Math.round(y * dpr) / dpr || 0\n };\n}", "function roundOffsets(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: Math.round(x * dpr) / dpr || 0,\n y: Math.round(y * dpr) / dpr || 0\n };\n}", "function roundOffsets(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: Math.round(x * dpr) / dpr || 0,\n y: Math.round(y * dpr) / dpr || 0\n };\n}", "function roundOffsets({ x, y }): Offsets {\n const dpr = window.devicePixelRatio || 1;\n\n return {\n x: Math.round(x * dpr) / dpr || 0,\n y: Math.round(y * dpr) / dpr || 0,\n };\n}", "static roundToNearestPixel(layoutSize: number): number {\n const ratio = PixelRatio.get();\n return Math.round(layoutSize * ratio) / ratio;\n }", "snapToGrip (val) {\n return parseFloat((this.gridResolution * Math.round(val / this.gridResolution)).toFixed(2));\n }", "function pixelDist() {\r\n\tvar min = bounds.getSouthWest();\r\n\tvar max = bounds.getNorthEast();\r\n\t\r\n\tvar x = Math.abs(max.lng() - min.lng())/dojo.contentBox(\"map_canvas\").w;\r\n\tvar y = Math.abs(max.lat() - min.lat())/dojo.contentBox(\"map_canvas\").h;\r\n\t\r\n\tvar r = Math.pow(10,7);\r\n\tpixels = {\"x\": Math.round(x*r)/r, \"y\": Math.round(y*r)/r};\r\n}", "function zoomFactor(){\n\tvar percentOffFloor = (transform.position.y - zoomFloor)/zoomCeiling;\n\treturn percentOffFloor + 1;\n}", "function _GetNewScaleFromPx(fingersDistanceVariation)\n\t{\n\t\t//compute the scale\n\t\tvar newScale = Math.max(_MinScale, Math.min(_MaxScale, (_LastScale || __SIMULATOR.Scale) + fingersDistanceVariation * _ScalePerPixel));\n\n\t\t//boost it by 100 and divide it again\n\t\treturn Math.round(newScale * 100) / 100;\n\t}", "valueToPx(value) {\n const that = this.context,\n lengthRangeRatio = that._measurements.trackLength / that._range;\n\n let result;\n\n if (that._normalLayout) {\n result = lengthRangeRatio * (value - that._drawMin);\n }\n else {\n result = lengthRangeRatio * (that._drawMax - value);\n }\n\n return Math.round(result);\n }", "function getTolerance(pt, nextPt) {\n var xFrac = pt[0] / xLen;\n var yFrac = pt[1] / yLen;\n var offScreenFraction = Math.max(0, -xFrac, xFrac - 1, -yFrac, yFrac - 1);\n if (offScreenFraction && latestXFrac !== undefined && crossesViewport(xFrac, yFrac, latestXFrac, latestYFrac)) {\n offScreenFraction = 0;\n }\n if (offScreenFraction && nextPt && crossesViewport(xFrac, yFrac, nextPt[0] / xLen, nextPt[1] / yLen)) {\n offScreenFraction = 0;\n }\n return (1 + constants.toleranceGrowth * offScreenFraction) * baseTolerance;\n }", "function adjustDist(dist, dpi) {\n if (!dist) {\n return;\n }\n return dist * 90 / dpi;\n }", "function radiusToZoom(radius)\n{\n return Math.round(14-Math.log(radius)/Math.LN2);\n}", "function calc_precision (zoom) {\n\tvar fixedAmount = -1;\n\tvar size = 40;\n\n\tif (zoom > 4)\n\t\tfixedAmount = 0;\n\n\tif (zoom >= 8) {\n\t\tfixedAmount = 1;\n\t}\n\n\tif (zoom >= 10) {\n\t\tfixedAmount = 2;\n\t}\n\n\tif (zoom >= 11) {\n\t\tfixedAmount = 8;\n\t}\n\n\treturn [fixedAmount, size];\n}", "function dZoom(d) {\n return 1 - ((d >= 0) ? Math.min(d, 0.9) :\n 1 / (1 / Math.max(d, -0.3) + 3.222));\n}", "function dZoom(d) {\n return 1 - ((d >= 0) ? Math.min(d, 0.9) :\n 1 / (1 / Math.max(d, -0.3) + 3.222));\n}", "function dZoom(d) {\n\t return 1 - ((d >= 0) ? Math.min(d, 0.9) :\n\t 1 / (1 / Math.max(d, -0.3) + 3.222));\n\t }", "function dZoom(d) {\n\t return 1 - ((d >= 0) ? Math.min(d, 0.9) :\n\t 1 / (1 / Math.max(d, -0.3) + 3.222));\n\t }", "snpMDG(v) {\n // console.log(v)\n // console.log(Math.round(v/this.cellSize/this.scale) * this.cellSize/this.scale)\n return Math.round(v/this.cellSize) * this.cellSize\n }", "dpi () {\n return this.chart.width / this.interval.width * this.zoom.value;\n }", "p(pos) { return Math.ceil((pos-1)/this.d); }", "function dZoom(d) {\n return 1 - (d >= 0 ? Math.min(d, 0.9) : 1 / (1 / Math.max(d, -0.3) + 3.222));\n}", "function convertDpToPixel(dp)\n{\n\t//\n\treturn Math.round(dp * deviceDensity);\n}", "function round(number, increment, offset) {\n return Math.ceil((number - offset) / increment ) * increment + offset;\n }", "function getPixelPrecision(dataExtent, pixelExtent) {\n\t var log = Math.log;\n\t var LN10 = Math.LN10;\n\t var dataQuantity = Math.floor(log(dataExtent[1] - dataExtent[0]) / LN10);\n\t var sizeQuantity = Math.round(log(Math.abs(pixelExtent[1] - pixelExtent[0])) / LN10); // toFixed() digits argument must be between 0 and 20.\n\t\n\t var precision = Math.min(Math.max(-dataQuantity + sizeQuantity, 0), 20);\n\t return !isFinite(precision) ? 20 : precision;\n\t }", "function f(val)\n\t {\n\t // Enforce limits\n\t val = Math.min(val, max);\n\t val = Math.max(val, min);\n\t return Math.round((val - min) * scale + axisMargin);\n\t }", "function f(val)\n\t {\n\t // Enforce limits\n\t val = Math.min(val, max);\n\t val = Math.max(val, min);\n\t return Math.round((val - min) * scale + axisMargin);\n\t }", "function snapToGrid(value, resolution) {\n // return Math.round(value/interval) * interval;\n if (value < 0) {\n var val = Math.abs(value)\n var result = Math.ceil(val/resolution) * resolution\n return (result * -1)\n } else {\n return (Math.ceil(value/resolution) * resolution)\n }\n }", "calcRadius(factor, corners) {\n let distance = this.farestToMid(corners)\n return Math.floor(distance * factor)\n }", "function getPixelPrecision(dataExtent, pixelExtent) {\n var log = Math.log;\n var LN10 = Math.LN10;\n var dataQuantity = Math.floor(log(dataExtent[1] - dataExtent[0]) / LN10);\n var sizeQuantity = Math.round(log(Math.abs(pixelExtent[1] - pixelExtent[0])) / LN10); // toFixed() digits argument must be between 0 and 20.\n\n var precision = Math.min(Math.max(-dataQuantity + sizeQuantity, 0), 20);\n return !isFinite(precision) ? 20 : precision;\n}", "function updateRadius(){\n var zoom = mymap.getZoom();\n \n switch(zoom) {\n case 13 : return 8;\n case 14 : return 10;\n case 15 : return 12;\n case 16 : return 14;\n case 17 : return 16;\n case 18 : return 18;\n default : return 8; \n }\n }", "get overridePixelPerfect() {}", "roundPx(devicePixelRatio = window.devicePixelRatio || 1) {\n const me = this;\n me._x = DomHelper.roundPx(me._x, devicePixelRatio);\n me._y = DomHelper.roundPx(me._y, devicePixelRatio);\n me._width = DomHelper.roundPx(me._width, devicePixelRatio);\n me._height = DomHelper.roundPx(me._height, devicePixelRatio);\n return me;\n }", "_toPixelScale(value) {\n const rangeToTrack = this._trackTotalLength / (this.props.max - this.props.min);\n return (value - this.props.min) * rangeToTrack;\n }", "function radiusToZoom(radius){\n radius *= 0.00035;\n return Math.round(14-Math.log(radius)/Math.LN2) - 1;\n}", "calcValue() {\n const trackRatio = this.normalize(this.thumb.position().left, 0, this.track.innerWidth() - (this.thumbOffset * 2));\n return (trackRatio * (this.max - this.min)) + this.min;\n }", "function roundToNearestHundreth(x){\n return (x).toFixed(2);\n }", "function getMetersPerPixel() {\n if (!_map) return 0;\n var y = _map.getSize().y,\n x = _map.getSize().x;\n // calculate the distance the one side of the map to the other using the haversine formula\n var maxMeters = _map.containerPointToLatLng([0, y]).distanceTo(_map.containerPointToLatLng([x, y]));\n return maxMeters / x;\n }", "function getTolerance(pt) {\n var xFrac = pt[0] / xa._length;\n var yFrac = pt[1] / ya._length;\n return (1 + constants.toleranceGrowth * Math.max(0, -xFrac, xFrac - 1, -yFrac, yFrac - 1)) * baseTolerance;\n }", "function getTolerance(pt) {\n\t var xFrac = pt[0] / xa._length,\n\t yFrac = pt[1] / ya._length;\n\t return (1 + 10 * Math.max(0, -xFrac, xFrac - 1, -yFrac, yFrac - 1)) * baseTolerance;\n\t }", "function getTolerance(pt) {\n\t var xFrac = pt[0] / xa._length,\n\t yFrac = pt[1] / ya._length;\n\t return (1 + 10 * Math.max(0, -xFrac, xFrac - 1, -yFrac, yFrac - 1)) * baseTolerance;\n\t }", "function getTolerance(pt) {\n var xFrac = pt[0] / xa._length,\n yFrac = pt[1] / ya._length;\n return (1 + 10 * Math.max(0, -xFrac, xFrac - 1, -yFrac, yFrac - 1)) * baseTolerance;\n }", "function conv(val) {\n\t\treturn Math.round((val / resolution) * (resolution-1));\n\t}", "function getDeviceZoomRatio() {\n // For IE10, IE11, Firefox\n if (window.screen.deviceXDPI && window.screen.logicalXDPI) {\n return window.screen.deviceXDPI / window.screen.logicalXDPI;\n }\n else if (window.devicePixelRatio) {\n return window.devicePixelRatio;\n }\n else {\n return 1;\n }\n }", "valueToPx(value) {\n const ignored = JQX.Utilities.BigNumber.ignoreBigIntNativeSupport;\n\n JQX.Utilities.BigNumber.ignoreBigIntNativeSupport = true;\n\n const that = this.context,\n lengthRangeRatio = new JQX.Utilities.BigNumber(that._measurements.trackLength).divide(new JQX.Utilities.BigNumber(that._range));\n\n let result;\n\n if (that._normalLayout) {\n const drawMin = that._drawMin instanceof JQX.Utilities.BigNumber ? that._drawMin : new JQX.Utilities.BigNumber(that._drawMin);\n\n value = new JQX.Utilities.BigNumber(value);\n result = parseFloat((lengthRangeRatio.multiply(value.subtract(drawMin))).toString());\n }\n else {\n const drawMax = that._drawMax instanceof JQX.Utilities.BigNumber ? that._drawMax : new JQX.Utilities.BigNumber(that._drawMax);\n\n result = parseFloat(this.round(((drawMax.subtract(value)).multiply(lengthRangeRatio))).toString());\n }\n\n JQX.Utilities.BigNumber.ignoreBigIntNativeSupport = ignored;\n return result;\n }", "function getMetersPerPixel() {\n if (!_map) return 0;\n var y = _map.getSize().y,\n x = _map.getSize().x;\n // calculate the distance the one side of the map to the other using the haversine formula\n var maxMeters = _map.containerPointToLatLng([0, y]).distanceTo(_map.containerPointToLatLng([x, y]));\n return maxMeters / x;\n}", "cramp(\n min,max,round, // Float\n ) {\n const {_sx,_sy,_scale} = this\n return Point.init(_sx,_sy,\n _scale < min ? min : max < _scale ? max :\n 0 < round ? Math.ceil(_scale / round) * round : _scale\n )\n }", "_calcStepRounded(value) {\n var s = Math.round(value/this.step) * this.step;\n\n // make sure it isnt rounding out of our range; should only do so by one step:\n s = s < this.min ? s + this.step : s;\n s = s > this.max ? s - this.step : s;\n\n return s;\n }", "function getDeviceZoomRatio() {\n // For IE10, IE11, Firefox\n if (window.screen.deviceXDPI && window.screen.logicalXDPI) {\n return window.screen.deviceXDPI / window.screen.logicalXDPI;\n } else if (window.devicePixelRatio) {\n return window.devicePixelRatio;\n } else {\n return 1;\n }\n }", "function getZoomValue(angle_lng,angle_lat,pixelWidth, pixelHeight) {\n\tvar GLOBE_WIDTH = 256; // a constant in Google's map projection\n\n\t// Longitude goes from 180 to -180\n\tif(angle_lng < 0) {\n\t\tangle_lng += 360;\n\t}\n\n\t// Latitude goes from -90 to 90\n\tif(angle_lat < 0) {\n\t\tangle_lat += 180;\n\t}\n\n\treturn Math.max(\n\t\t\t// calculate zoom with closest point and show 4 times as much space\n\t\t\tMath.min(\n\t\t\t\t\tMath.round(Math.log(pixelWidth * 360 / angle_lng / GLOBE_WIDTH) / Math.LN2) - 2,\n\t\t\t\t\tMath.round(Math.log(pixelHeight * 180 / angle_lat / GLOBE_WIDTH) / Math.LN2) - 2)\n\t\t\t\t\t, 1);\n}", "function GetZoomFactor()\n {\n var factor = 1;\n if (document.body.getBoundingClientRect) {\n var rect = document.body.getBoundingClientRect();\n var physicalW = rect.right - rect.left;\n var logicalW = document.body.offsetWidth;\n factor = Math.round((physicalW / logicalW) * 100) / 100;\n }\n return factor;\n }", "function calculatePixelRatio() {\n var ctx = document.createElement(\"canvas\").getContext(\"2d\"),\n dpr = window.devicePixelRatio || 1,\n bsr = ctx.webkitBackingStorePixelRatio ||\n ctx.mozBackingStorePixelRatio ||\n ctx.msBackingStorePixelRatio ||\n ctx.oBackingStorePixelRatio ||\n ctx.backingStorePixelRatio || 1;\n\n return dpr / bsr;\n}", "static getPixelSizeForLayoutSize(layoutSize: number): number {\n return Math.round(layoutSize * PixelRatio.get());\n }", "function latScale(value) {\n\treturn Math.round((value - minlat) * parseInt(map.css('width')) / (maxlat - minlat));\n}", "function applyRatio (v) {\n return Math.round(v * ratio * 10000) / 10000;\n}", "function roundMinMax(factor) {\n factor = parseFloat(factor);\n var minNum = parseFloat(min.value);\n var maxNum = parseFloat(max.value);\n\n var minMod = min.value % factor;\n var maxMod = max.value % factor;\n var minVal = minMod < factor / 2 ? minNum - minMod : minNum + (factor - minMod);\n var maxVal = maxMod < factor / 2 ? maxNum - maxMod : maxNum + (factor - maxMod);\n\n min.value = minVal.toFixed(2);\n max.value = maxVal.toFixed(2);\n min.step = factor;\n max.step = factor;\n adjustLabel(max_input, max);\n adjustLabel(min_input, min);\n }", "_calcMovePrecision() {\n let precision = (this.o.maxVal - this.o.minVal) / 127;\n return precision;\n }", "function toDips(px) {\n return px / react_native_1.PixelRatio.get();\n}", "function tolerance(zoomLevel) {\n return 2 * Math.pow(2, -zoomLevel);\n}", "function getRelativeScale(to) {\r\n\t\tsets = $['mapsettings'];\r\n\t\tvar percentxy = new Point((sets.resolutions[to-1].width/sets.resolutions[sets.resolutions.length-1].width),(sets.resolutions[to-1].height/sets.resolutions[sets.resolutions.length-1].height));\t\r\n\t\treturn percentxy;\r\n\t}", "function offsetToPercentage(g, offsetX, offsetY) {\n // This is calculating the pixel offset of the leftmost date.\n var xOffset = g.toDomCoords(g.xAxisRange()[0], null)[0];\n var yar0 = g.yAxisRange(0);\n\n // This is calculating the pixel of the higest value. (Top pixel)\n var yOffset = g.toDomCoords(null, yar0[1])[1];\n\n // x y w and h are relative to the corner of the drawing area,\n // so that the upper corner of the drawing area is (0, 0).\n var x = offsetX - xOffset;\n var y = offsetY - yOffset;\n\n // This is computing the rightmost pixel, effectively defining the\n // width.\n var w = g.toDomCoords(g.xAxisRange()[1], null)[0] - xOffset;\n\n // This is computing the lowest pixel, effectively defining the height.\n var h = g.toDomCoords(null, yar0[0])[1] - yOffset;\n\n // Percentage from the left.\n var xPct = w === 0 ? 0 : (x / w);\n // Percentage from the top.\n var yPct = h === 0 ? 0 : (y / h);\n\n // The (1-) part below changes it from \"% distance down from the top\"\n // to \"% distance up from the bottom\".\n return [xPct, (1-yPct)];\n}", "pixelSpaceConversion(lat: number, worldSize: number, interpolationT: number): number { // eslint-disable-line\n return 1.0;\n }", "function zoom(value) {\n return value * zoomLevel;\n}", "function offsetToPercentage(g, offsetX, offsetY) {\n // This is calculating the pixel offset of the leftmost date.\n let xOffset = g.toDomCoords(g.xAxisRange()[0], null)[0];\n let yar0 = g.yAxisRange(0);\n\n // This is calculating the pixel of the highest value. (Top pixel)\n let yOffset = g.toDomCoords(null, yar0[1])[1];\n\n // x y w and h are relative to the corner of the drawing area,\n // so that the upper corner of the drawing area is (0, 0).\n let x = offsetX - xOffset;\n let y = offsetY - yOffset;\n\n // This is computing the rightmost pixel, effectively defining the\n // width.\n let w = g.toDomCoords(g.xAxisRange()[1], null)[0] - xOffset;\n\n // This is computing the lowest pixel, effectively defining the height.\n let h = g.toDomCoords(null, yar0[0])[1] - yOffset;\n\n // Percentage from the left.\n let xPct = w === 0 ? 0 : (x / w);\n // Percentage from the top.\n let yPct = h === 0 ? 0 : (y / h);\n\n // The (1-) part below changes it from \"% distance down from the top\"\n // to \"% distance up from the bottom\".\n return [xPct, (1 - yPct)];\n }", "function calcCircleRadius() {\n\t/* Calc max radius: */\n\tvar latLng1 = myMap.getBounds().getNorthEast();\n\tvar latLng2 = myMap.getBounds().getSouthWest();\n\tvar distance = distanceInMeter(latLng1.lat(), latLng1.lng(), \n\t\t\tlatLng2.lat(), latLng2.lng());\n\t\n\tvar maxRadius = distance * 0.22; // 22% fits very well..\n\t// TODO zoom level 0 und 1 passen hier fuer nicht ganz..\n\tvar radInM = ((currentSliderValue) / MAX_SLIDER_VALUE) * maxRadius;\n\tcurrentRange = Math.round(radInM);\n\treturn radInM;\n}", "function doMath()\n\t{\n\t\treturn pixels/baseValue;\n\t}", "function coordRound(v) {\n var w = Math.floor(v);\n var d = v - w;\n d = Math.round(d * 10000) / 10000;\n return w + d;\n}", "function PIXEL_RATIO() {\r\n var ctx1 = document.createElement(\"canvas\").getContext(\"2d\"),\r\n dpr = window.devicePixelRatio || 1,\r\n bsr = ctx1.webkitBackingStorePixelRatio ||\r\n ctx1.mozBackingStorePixelRatio ||\r\n ctx1.msBackingStorePixelRatio ||\r\n ctx1.oBackingStorePixelRatio ||\r\n ctx1.backingStorePixelRatio || 1;\r\n console.log(\"ratio:\"+ dpr / bsr);\r\n return dpr / bsr;\r\n}", "function maybeUpdateRectForZooming(measure, rect) {\n\t if (!window.screen || screen.logicalXDPI == null ||\n\t screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure))\n\t return rect;\n\t var scaleX = screen.logicalXDPI / screen.deviceXDPI;\n\t var scaleY = screen.logicalYDPI / screen.deviceYDPI;\n\t return {left: rect.left * scaleX, right: rect.right * scaleX,\n\t top: rect.top * scaleY, bottom: rect.bottom * scaleY};\n\t }", "function maybeUpdateRectForZooming(measure, rect) {\n\t if (!window.screen || screen.logicalXDPI == null ||\n\t screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure))\n\t return rect;\n\t var scaleX = screen.logicalXDPI / screen.deviceXDPI;\n\t var scaleY = screen.logicalYDPI / screen.deviceYDPI;\n\t return {left: rect.left * scaleX, right: rect.right * scaleX,\n\t top: rect.top * scaleY, bottom: rect.bottom * scaleY};\n\t }", "function maybeUpdateRectForZooming(measure, rect) {\n\t if (!window.screen || screen.logicalXDPI == null ||\n\t screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure))\n\t return rect;\n\t var scaleX = screen.logicalXDPI / screen.deviceXDPI;\n\t var scaleY = screen.logicalYDPI / screen.deviceYDPI;\n\t return {left: rect.left * scaleX, right: rect.right * scaleX,\n\t top: rect.top * scaleY, bottom: rect.bottom * scaleY};\n\t }" ]
[ "0.75932765", "0.75747055", "0.7506673", "0.7486163", "0.74772507", "0.74772507", "0.74772507", "0.74772507", "0.74772507", "0.7454967", "0.7454967", "0.7408192", "0.73674977", "0.73082155", "0.73082155", "0.73082155", "0.7266812", "0.7249476", "0.7249476", "0.7249476", "0.7249476", "0.6856697", "0.6856697", "0.6729433", "0.6729433", "0.6729433", "0.6729433", "0.6729433", "0.6729433", "0.6729433", "0.6729433", "0.63798535", "0.63129145", "0.58147854", "0.5747335", "0.5691923", "0.56829417", "0.5672381", "0.56025356", "0.56003773", "0.55869955", "0.55484134", "0.55209255", "0.55209255", "0.5470986", "0.5470986", "0.5454685", "0.5420137", "0.5412495", "0.5405599", "0.5372997", "0.53400505", "0.5339567", "0.53339773", "0.53339773", "0.5321552", "0.52989054", "0.5296107", "0.5291758", "0.52901506", "0.5287851", "0.5285754", "0.52758557", "0.5264057", "0.5263695", "0.525924", "0.5256827", "0.52505237", "0.52505237", "0.52448523", "0.5234918", "0.52259386", "0.52171075", "0.5215648", "0.5203426", "0.52015686", "0.52010727", "0.5199938", "0.519607", "0.5173796", "0.5139996", "0.5136859", "0.51314414", "0.5117838", "0.51129615", "0.5092891", "0.50863725", "0.5081323", "0.5078734", "0.5077289", "0.5069051", "0.50504863", "0.50501865", "0.5048978", "0.5024329", "0.5018387", "0.50166774", "0.50166774", "0.50166774" ]
0.766062
1
of the `` and `` rect bounds if horizontally scrollable
function getDocumentRect(element){var _element$ownerDocumen;var html=getDocumentElement(element);var winScroll=getWindowScroll(element);var body=(_element$ownerDocumen=element.ownerDocument)==null?void 0:_element$ownerDocumen.body;var width=max(html.scrollWidth,html.clientWidth,body?body.scrollWidth:0,body?body.clientWidth:0);var height=max(html.scrollHeight,html.clientHeight,body?body.scrollHeight:0,body?body.clientHeight:0);var x=-winScroll.scrollLeft+getWindowScrollBarX(element);var y=-winScroll.scrollTop;if(getComputedStyle(body||html).direction==='rtl'){x+=max(html.clientWidth,body?body.clientWidth:0)-width;}return {width:width,height:height,x:x,y:y};}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "bounds() {\n const _bounds = new HRect(this.rect);\n _bounds.offsetTo(0, 0);\n return _bounds;\n }", "function W(){var t=l.getBoundingClientRect(),e=\"offset\"+[\"Width\",\"Height\"][i.ort];return 0===i.ort?t.width||l[e]:t.height||l[e]}", "function BoundingBoxRect() { }", "_calculateBounds() {\n // FILL IN//\n }", "boundsCheck(xM, yM, x, y, w, h){ \n if(xM > x && xM < x + w && yM > y && yM < y+ h){\n return true; //mouse in boundary \n }else{\n return false; //mouse not in boundary\n }\n }", "boundsCheck(xM, yM, x, y, w, h){ \n if(xM > x && xM < x + w && yM > y && yM < y+ h){\n return true; //mouse in boundary \n }else{\n return false; //mouse not in boundary \n } \n}", "get localBounds() {\n return {\n x: this.x, //I changed this, it was \"x: 0,\"\n y: this.y, //I changed this, it was \"y: 0,\"\n width: this.width,\n height: this.height\n } \n }", "getBounds() {}", "isInBounds(x, y, r = 5)\n\t{\n\t\tlet camera = this.tree.camera;\n\t\tlet zoom = camera.zoomSmooth;\n\n\t\tlet pos = this.posSmooth.toScreen(camera);\n\t\tlet width = this.width * zoom;\n\t\tlet height = this.height * zoom;\n\n\t\treturn x >= pos.x - r && x < pos.x + width + r && y >= pos.y - r\n\t\t\t&& y < pos.y + height + r;\n\t}", "get localBounds() {}", "function S(){var e=le.getBoundingClientRect(),t=\"offset\"+[\"Width\",\"Height\"][n.ort];return 0===n.ort?e.width||le[t]:e.height||le[t]}", "calcOffsetConstraintForHorizontalMode() {\n let viewport = getViewportDimension();\n let offsetToViewport = calcOffsetToViewport(this.props.baseEl.offsetParent);\n let height = this.props.height || DEFAULT_HEIGHT;\n\n return {\n min: -offsetToViewport.top,\n max: viewport.height - height - offsetToViewport.top\n };\n }", "function currentBounds(){var cntr=element?element.parent():null;var parent=cntr?cntr.parent():null;return parent?self.clientRect(parent):null;}", "function v(){var t=W.getBoundingClientRect(),e=\"offset\"+[\"Width\",\"Height\"][i.ort];return 0===i.ort?t.width||W[e]:t.height||W[e]}", "getBounds(){\n let rect = new Rectangle()\n\t\trect.setRect(this.x, this.y, this.size, this.size)\n\t\treturn rect\n }", "getBounds(){\n let rect = new Rectangle()\n\t\trect.setRect(this.x, this.y, this.size, this.size)\n\t\treturn rect\n }", "function X(){var t=c.getBoundingClientRect(),e=\"offset\"+[\"Width\",\"Height\"][i.ort];return 0===i.ort?t.width||c[e]:t.height||c[e]}", "calculateBounds() {\n this.tagsSectionsMap = this.tags.map((tag) => {\n const rect = tag.getBoundingClientRect();\n const top = Math.floor(rect.top + window.scrollY);\n\n return {\n top,\n tag,\n };\n });\n }", "_calculateBounds() {\n var minX = this._width * -this._anchor._x;\n var minY = this._height * -this._anchor._y;\n var maxX = this._width * (1 - this._anchor._x);\n var maxY = this._height * (1 - this._anchor._y);\n this._bounds.addFrame(this.transform, minX, minY, maxX, maxY);\n }", "get bounds() {}", "function boundCheck(pos, dim) {\n if (pos.y < 0) return 'top';\n if (pos.y > height - dim.height) return 'bottom';\n if (pos.x < 0) return 'left';\n if (pos.x > width - dim.width) return 'right';\n return 'none'; // just there so js wont complain\n}", "function calculateScrollPos(cm, rect) {\n\t\t var display = cm.display, snapMargin = textHeight(cm.display);\n\t\t if (rect.top < 0) { rect.top = 0; }\n\t\t var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n\t\t var screen = displayHeight(cm), result = {};\n\t\t if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n\t\t var docBottom = cm.doc.height + paddingVert(display);\n\t\t var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n\t\t if (rect.top < screentop) {\n\t\t result.scrollTop = atTop ? 0 : rect.top;\n\t\t } else if (rect.bottom > screentop + screen) {\n\t\t var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n\t\t if (newTop != screentop) { result.scrollTop = newTop; }\n\t\t }\n\n\t\t var gutterSpace = cm.options.fixedGutter ? 0 : display.gutters.offsetWidth;\n\t\t var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft - gutterSpace;\n\t\t var screenw = displayWidth(cm) - display.gutters.offsetWidth;\n\t\t var tooWide = rect.right - rect.left > screenw;\n\t\t if (tooWide) { rect.right = rect.left + screenw; }\n\t\t if (rect.left < 10)\n\t\t { result.scrollLeft = 0; }\n\t\t else if (rect.left < screenleft)\n\t\t { result.scrollLeft = Math.max(0, rect.left + gutterSpace - (tooWide ? 0 : 10)); }\n\t\t else if (rect.right > screenw + screenleft - 3)\n\t\t { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n\t\t return result\n\t\t }", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n }", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n }", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n }", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n }", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n }", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n }", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n }", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n }", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n }", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n }", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n }", "function containScroll() {\n\n var targetX = startX + deltaX;\n var targetY = startY + deltaY;\n\n if (targetY < 0)\n deltaY += -targetY;\n else {\n var containerVisibleHeight = focus ? focus.clientHeight : root.innerHeight;\n var containerRealHeight = focus ? focus.scrollHeight : document.body.scrollHeight;\n if (targetY + containerVisibleHeight > containerRealHeight)\n deltaY -= targetY + containerVisibleHeight - containerRealHeight;\n }\n\n if (targetX < 0)\n deltaX += -targetX;\n else {\n var containerVisibleWidth = focus ? focus.clientWidth : root.innerWidth;\n var containerRealWidth = focus ? focus.scrollWidth : document.body.scrollWidth;\n if (targetX + containerVisibleWidth > containerRealWidth)\n deltaX -= targetX + containerVisibleWidth - containerRealWidth;\n }\n\n }", "static WorldPointToSizedRect() {}", "function j(){var e=s.getBoundingClientRect(),r=\"offset\"+[\"Width\",\"Height\"][t.ort]\nreturn 0===t.ort?e.width||s[r]:e.height||s[r]}", "inBounds(){\n if (this.pos.x <= 0) {\n this.pos.x = 0;\n }\n if (this.pos.y <= 0) {\n this.pos.y = 0;\n }\n if (this.pos.x >= width ) {\n this.pos.x = width;\n }\n if (this.pos.y >= height) {\n this.pos.y = height;\n }\n }", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var gutterSpace = cm.options.fixedGutter ? 0 : display.gutters.offsetWidth;\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft - gutterSpace;\n var screenw = displayWidth(cm) - display.gutters.offsetWidth;\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left + gutterSpace - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n }", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var gutterSpace = cm.options.fixedGutter ? 0 : display.gutters.offsetWidth;\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft - gutterSpace;\n var screenw = displayWidth(cm) - display.gutters.offsetWidth;\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left + gutterSpace - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n }", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var gutterSpace = cm.options.fixedGutter ? 0 : display.gutters.offsetWidth;\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft - gutterSpace;\n var screenw = displayWidth(cm) - display.gutters.offsetWidth;\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left + gutterSpace - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n }", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var gutterSpace = cm.options.fixedGutter ? 0 : display.gutters.offsetWidth;\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft - gutterSpace;\n var screenw = displayWidth(cm) - display.gutters.offsetWidth;\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left + gutterSpace - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n }", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var gutterSpace = cm.options.fixedGutter ? 0 : display.gutters.offsetWidth;\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft - gutterSpace;\n var screenw = displayWidth(cm) - display.gutters.offsetWidth;\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left + gutterSpace - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n }", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var gutterSpace = cm.options.fixedGutter ? 0 : display.gutters.offsetWidth;\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft - gutterSpace;\n var screenw = displayWidth(cm) - display.gutters.offsetWidth;\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left + gutterSpace - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n }", "function visibleRect(_posX, _posY, _width, _height, _size) {\n if(bounded) {\n var upperLeft = toWorld(0, 0);\n var lowerRight = toWorld(screenSizeX, screenSizeY);\n \n var xMin = upperLeft.x - _posX;\n var yMin = upperLeft.y - _posY;\n var xMax = lowerRight.x - _posX;\n var yMax = lowerRight.y - _posY;\n \n xMin = xMin < 0 ? 0 : xMin;\n yMin = yMin < 0 ? 0 : yMin;\n xMax = xMax < 0 ? 0 : xMax;\n yMax = yMax < 0 ? 0 : yMax;\n \n xMin = xMin > _width ? _width : xMin;\n yMin = yMin > _height ? _height : yMin;\n xMax = xMax > _width ? _width : xMax;\n yMax = yMax > _height ? _height : yMax;\n\n xMin /= _size;\n yMin /= _size;\n xMax /= _size;\n yMax /= _size;\n \n xMin = (0.5 + xMin) | 0;\n yMin = (0.5 + yMin) | 0;\n xMax = (0.5 + xMax) | 0;\n yMax = (0.5 + yMax) | 0;\n\n return {xMin: xMin, xMax: xMax, yMin: yMin, yMax: yMax};\n }\n return null;\n }", "function hb_rect(self,value) {\n switch (value) {\n case 0: return self.pos[0] - self.width/2;\n case 1: return self.pos[1] - self.height;\n case 2: return self.pos[0] + self.width/2;\n case 3: return self.pos[1];\n }\n }", "get bounds() { return this._bounds; }", "function constrainPoint(point,rect){return{left:Math.min(Math.max(point.left,rect.left),rect.right),top:Math.min(Math.max(point.top,rect.top),rect.bottom)};}", "_rangeDDSizer() {\n let txrec = this._text.getBoundingClientRect();\n let bdrec = document.body.getBoundingClientRect();\n let hddwn = bdrec.height - txrec.bottom - 20 + 'px';\n let wddwn = txrec.width + 'px';\n \n this._ddown.style.width = wddwn;\n this._ddown.style['max-height'] = hddwn;\n }", "function R(){var e=s.getBoundingClientRect(),n=\"offset\"+[\"Width\",\"Height\"][t.ort];return 0===t.ort?e.width||s[n]:e.height||s[n]}", "testBounds(xM,yM,wid,heg,x,y){\n // test conditions for when xM and yM is inside boundary\n if(xM > x && xM < x+wid && yM > y && yM < y+heg){\n return true;\n }\n else{\n return false;\n }\n }", "getBounds() {\n return new Rectangle(new Point(this.x, this.y), new Vector(0, 0));\n }", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display)\n if (rect.top < 0) { rect.top = 0 }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop\n var screen = displayHeight(cm), result = {}\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen }\n var docBottom = cm.doc.height + paddingVert(display)\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen)\n if (newTop != screentop) { result.scrollTop = newTop }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0)\n var tooWide = rect.right - rect.left > screenw\n if (tooWide) { rect.right = rect.left + screenw }\n if (rect.left < 10)\n { result.scrollLeft = 0 }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)) }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw }\n return result\n}", "get bounds () {\n const xMin = Math.min.apply(null, this.pointArr.map(pt => pt.x))\n const yMin = Math.min.apply(null, this.pointArr.map(pt => pt.y))\n const xMax = Math.max.apply(null, this.pointArr.map(pt => pt.x))\n const yMax = Math.max.apply(null, this.pointArr.map(pt => pt.y))\n\n return {\n x: xMin,\n y: yMin,\n width: xMax - xMin,\n height: yMax - yMax\n }\n }", "getRect() {\n this.rect = this.el.getBoundingClientRect();\n }", "function calculateScrollPos(cm, rect) {\r\n var display = cm.display, snapMargin = textHeight(cm.display);\r\n if (rect.top < 0) { rect.top = 0; }\r\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\r\n var screen = displayHeight(cm), result = {};\r\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\r\n var docBottom = cm.doc.height + paddingVert(display);\r\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\r\n if (rect.top < screentop) {\r\n result.scrollTop = atTop ? 0 : rect.top;\r\n } else if (rect.bottom > screentop + screen) {\r\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\r\n if (newTop != screentop) { result.scrollTop = newTop; }\r\n }\r\n\r\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\r\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\r\n var tooWide = rect.right - rect.left > screenw;\r\n if (tooWide) { rect.right = rect.left + screenw; }\r\n if (rect.left < 10)\r\n { result.scrollLeft = 0; }\r\n else if (rect.left < screenleft)\r\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }\r\n else if (rect.right > screenw + screenleft - 3)\r\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\r\n return result\r\n}", "function q(){var e=p.getBoundingClientRect(),t=\"offset\"+[\"Width\",\"Height\"][r.ort];return 0===r.ort?e.width||p[t]:e.height||p[t]}", "_getScrollVisibility() {\n // Note: needs fresh rects since the position could've changed.\n const originBounds = this._getOriginRect();\n const overlayBounds = this._pane.getBoundingClientRect();\n // TODO(jelbourn): instead of needing all of the client rects for these scrolling containers\n // every time, we should be able to use the scrollTop of the containers if the size of those\n // containers hasn't changed.\n const scrollContainerBounds = this._scrollables.map(scrollable => {\n return scrollable.getElementRef().nativeElement.getBoundingClientRect();\n });\n return {\n isOriginClipped: isElementClippedByScrolling(originBounds, scrollContainerBounds),\n isOriginOutsideView: isElementScrolledOutsideView(originBounds, scrollContainerBounds),\n isOverlayClipped: isElementClippedByScrolling(overlayBounds, scrollContainerBounds),\n isOverlayOutsideView: isElementScrolledOutsideView(overlayBounds, scrollContainerBounds),\n };\n }", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n}", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n}", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n}", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n}", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n}", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n}", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n}", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n}", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n}", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n}", "function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n}", "_determineMinMax() {\n\n if (!this.tabListEl || !this.tabListScrollEl) {\n return;\n }\n\n this.maxX = 0;\n this.minX = this.tabListScrollEl.clientWidth - this.tabListEl.clientWidth - this.maxX;\n }", "get bounds() {\r\n\t\treturn {\r\n\t\t\tx: this.origin.x * (this.tileSize + this.spacing),\r\n\t\t\ty: this.origin.y * (this.tileSize + this.spacing),\r\n\t\t\tw: this.w * (this.tileSize + this.spacing) - this.spacing,\r\n\t\t\th: this.h * (this.tileSize + this.spacing) - this.spacing\r\n\t\t};\r\n\t}", "function I(){var e=p.getBoundingClientRect(),t=\"offset\"+[\"Width\",\"Height\"][i.ort];return 0===i.ort?e.width||p[t]:e.height||p[t]}", "function computePositionToContainBounds(bounded, container) {\n var containerBottom = container.top + container.height;\n var containerRight = container.left + container.width;\n return {\n top: Math.max(container.top, Math.min(bounded.top, containerBottom - bounded.height)),\n left: Math.max(container.left, Math.min(bounded.left, containerRight - bounded.width))\n };\n}", "intersection(_rect) {\n return new HRect(\n Math.max(this.left, _rect.left), Math.max(this.top, _rect.top),\n Math.min(this.right, _rect.right), Math.min(this.bottom, _rect.bottom)\n );\n }", "calcBounds() {\n\n\t\tvar horizOffset = Math.floor(window.innerWidth / 6);\n\n\t\tif (this.player.seatNumber == 0) {\n\t\t\tthis.leftBound = this.player.x + 50;\n\t\t\tthis.rightBound = window.innerWidth - 50;\n\t\t}\n\n\t\tif (this.player.seatNumber == 1) {\n\t\t\tthis.leftBound = this.player.x + 50;\n\t\t\tthis.rightBound = theTable.seats[0][0] - 50;\n\t\t}\n\n\t\tif (this.player.seatNumber == 2) {\n\t\t\tthis.leftBound = this.player.x + 50;\n\t\t\tthis.rightBound = theTable.seats[1][0] - 50;\n\t\t}\n\n\t\tif (this.player.seatNumber == 3 || this.player.seatNumber == 4 || this.player.seatNumber == 5) {\n\t\t\tthis.leftBound = this.player.x + 50;\n\t\t\tthis.rightBound = this.leftBound + horizOffset;\n\t\t}\n\n\t\tif (this.player.seatNumber == 6) {\n\t\t\tthis.leftBound = 50;\n\t\t\tthis.rightBound = this.player.x - 50;\n\t\t}\n\n\t\tif (this.player.seatNumber == 7) {\n\t\t\tthis.leftBound = theTable.seats[6][0] + 50;\n\t\t\tthis.rightBound = this.player.x - 50;\n\t\t}\n\n\t\tif (this.player.seatNumber == 8) {\n\t\t\tthis.leftBound = theTable.seats[7][0] + 50;\n\t\t\tthis.rightBound = this.player.x - 50;\n\t\t}\n\n\t\tif (this.player.seatNumber == 9 || this.player.seatNumber == 10 || this.player.seatNumber == 11) {\n\t\t\tthis.rightBound = this.player.x - 50;\n\t\t\tthis.leftBound = this.rightBound - horizOffset;\n\t\t}\n\n\t\t// position the HandMasks\n\n\t\tthis.handMaskLeft.x = this.leftBound + 20;\n\t\tthis.handMaskLeft.y = this.player.y;\n\n\t\tthis.handMaskRight.x = this.rightBound - 20;\n\t\tthis.handMaskRight.y = this.player.y;\n\t}", "get rect() {\n\t\treturn this.rect$.slice(0, 4);\n\t}", "function calculateScrollPos(cm, rect) {\n var display = cm.display,\n snapMargin = textHeight(cm.display);\n\n if (rect.top < 0) {\n rect.top = 0;\n }\n\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm),\n result = {};\n\n if (rect.bottom - rect.top > screen) {\n rect.bottom = rect.top + screen;\n }\n\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin,\n atBottom = rect.bottom > docBottom - snapMargin;\n\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n\n if (newTop != screentop) {\n result.scrollTop = newTop;\n }\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = rect.right - rect.left > screenw;\n\n if (tooWide) {\n rect.right = rect.left + screenw;\n }\n\n if (rect.left < 10) {\n result.scrollLeft = 0;\n } else if (rect.left < screenleft) {\n result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10));\n } else if (rect.right > screenw + screenleft - 3) {\n result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw;\n }\n\n return result;\n } // Store a relative adjustment to the scroll position in the current", "getBoundsRightX() {\n if (SharedElementHelpers.IsTextOrShapeElements(this)) {\n return this.content.width;\n }\n return this.content.width / 2;\n }", "function inViewPort(x){ return (x) * style.cellWidth + tx > 0; }", "carregaBoundaries() {\n\n //Modifica o tamanho do estagio baseado no tamanho do elemento div do bird\n this.maxBoundsWidth = this.getEstagio().clientWidth - this.getBird().getTamanhoWidth();\n this.maxBoundsHeight = this.getEstagio().clientHeight - this.getBird().getTamanhoHeight();\n\n // console.log(\"Max width da arena: \" + this.maxBoundsWidth);\n // console.log(\"Max height da arena: \" + this.maxBoundsHeight);\n\n //Verifico se o passaro esta dentro as boundaries(caso o usuario de resize)\n this.estaForaDasBounds()\n }", "function mergeRectOffsets(rects) {\n return rects.reduce((previousRect, rect) => {\n if (previousRect == null) {\n return rect;\n }\n\n return {\n top: previousRect.top + rect.top,\n left: previousRect.left + rect.left,\n width: previousRect.width,\n height: previousRect.height,\n bottom: previousRect.bottom + rect.bottom,\n right: previousRect.right + rect.right,\n };\n });\n} // Calculate a boundingClientRect for a node relative to boundaryWindow,", "_calculateBounds()\n {\n const trim = this._texture.trim;\n const orig = this._texture.orig;\n\n // First lets check to see if the current texture has a trim..\n if (!trim || (trim.width === orig.width && trim.height === orig.height))\n {\n // no trim! lets use the usual calculations..\n this.calculateVertices();\n this._bounds.addQuad(this.vertexData);\n }\n else\n {\n // lets calculate a special trimmed bounds...\n this.calculateTrimmedVertices();\n this._bounds.addQuad(this.vertexTrimmedData);\n }\n }", "union(_rect) {\n return new HRect(\n Math.min(this.left, _rect.left), Math.min(this.top, _rect.top),\n Math.max(this.right, _rect.right), Math.max(this.bottom, _rect.bottom)\n );\n }", "function RowLayoutResult(){this.layoutedBounds=new RectangleF(0,0,0,0);}", "function checkBounds(x,y) {\n return ((0<=x) && (x<=maxX) && (0<=y) && (y<=maxY)); }", "function resizeRect() {\n changeCursor(\"nw-resize\")\n coordinates = getCanvasMousePosition(canvas, event)\n if(coordinates.x > panels[whichPanel][i].x && coordinates.y > panels[whichPanel][i].y)\n {\n resizeRectangle(canvas, event, i)\n }\n }", "function intersectRects(rect1,rect2){var res={left:Math.max(rect1.left,rect2.left),right:Math.min(rect1.right,rect2.right),top:Math.max(rect1.top,rect2.top),bottom:Math.min(rect1.bottom,rect2.bottom)};if(res.left<res.right&&res.top<res.bottom){return res;}return false;}", "function inBounds(xMouse, yMouse, x,y,width, height){\r\n if(xMouse > x &&\r\n xMouse < x+width &&\r\n yMouse > y &&\r\n yMouse < y+height){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "setBounds() {\n let x = this.position.getX();\n let y = this.position.getY();\n let s = Game.Settings().UnitSize;\n let hs = s / 2;\n\n //generate Individual Bounds\n this.bounds = new Bounds(x - hs, y - hs, x + hs, y + hs);\n }", "function getCoordinate(event) {\n let ne = rectangle.getBounds().getNorthEast();\n let sw = rectangle.getBounds().getSouthWest();\n\n rightUpLat = ne.lat();\n rightUpLng = ne.lng();\n leftDownLat = sw.lat();\n leftDownLng = sw.lng();\n\n let rectangleLength = rightUpLng - leftDownLng;\n let rectangleWidth = rightUpLat - leftDownLat;\n let check = false;\n\n if (rectangleWidth > maxWidth) {\n\n let newBounds = {\n north: rightUpLat,\n south: rightUpLat - maxWidth + 0.02,\n east: rightUpLng,\n west: leftDownLng\n };\n\n rectangle.setBounds(newBounds);\n check = true;\n }\n\n if (rectangleLength > maxLength) {\n\n let newBounds = {\n north: rightUpLat,\n south: leftDownLat,\n east: rightUpLng,\n west: rightUpLng - maxLength + 0.02\n };\n\n rectangle.setBounds(newBounds);\n check = true;\n }\n\n\n if (check) {\n alert('Превышен максимальный размер области');\n }\n}", "_calculateBounds() {\n var trim = this._texture.trim;\n var orig = this._texture.orig;\n // First lets check to see if the current texture has a trim..\n if (!trim || (trim.width === orig.width && trim.height === orig.height)) {\n // no trim! lets use the usual calculations..\n this.calculateVertices();\n this._bounds.addQuad(this.vertexData);\n }\n else {\n // lets calculate a special trimmed bounds...\n this.calculateTrimmedVertices();\n this._bounds.addQuad(this.vertexTrimmedData);\n }\n }", "getRects() {\n if (!this.moving) { return this.clientRects; }\n else { return this.DOMcontainer.getBoundingClientRect(); }\n }", "handleWrapping() {\n // Off the left or right\n if (this.x < 0) {\n this.x += width;\n }\n else if (this.x > width) {\n this.x -= width;\n }\n constrain(this.y, 0, height);\n }", "function bounds() {\n return {\n start: conductor.displayStart(),\n end: conductor.displayEnd(),\n domain: conductor.domain().key\n };\n }", "function getBoundariesFor(obj) {\r\n\t\treturn {\r\n\t\t\ttop: obj.center.y - (obj.size.height / 2.5),\r\n\t\t\tbottom: obj.center.y + (obj.size.height / 2.5),\r\n\t\t\tleft: obj.center.x - (obj.size.width / 2.5),\r\n\t\t\tright: obj.center.x + (obj.size.width / 2.5)\r\n\t\t};\r\n\t}", "handleConstraints() {\n if (this.x < 0) {\n this.x = 0;\n }\n if (this.x > width - 1) {\n this.x = width - this.size;\n }\n if (this.y < 0) {\n this.y = 0;\n }\n if (this.y > height - 1) {\n this.y = height - this.size;\n }\n\n\n }", "function getScrollToShow(doc, boundingBox) {\n const scroll = getScroll(doc);\n const win = getWindow(doc);\n // vertical\n // if(scroll.y > boundingBox.top - SCROLL_ZONE_SIZE) {\n if (scroll.y > boundingBox.top) {\n scroll.y = boundingBox.top - exports.SCROLL_ZONE_SIZE;\n }\n // else if(scroll.y < boundingBox.bottom + SCROLL_ZONE_SIZE - win.innerHeight) {\n else if (scroll.y < boundingBox.bottom - win.innerHeight) {\n scroll.y = boundingBox.bottom + exports.SCROLL_ZONE_SIZE - win.innerHeight;\n }\n // horizontal\n // if(scroll.x > boundingBox.left - SCROLL_ZONE_SIZE) {\n if (scroll.x > boundingBox.left) {\n scroll.x = boundingBox.left - exports.SCROLL_ZONE_SIZE;\n }\n // else if(scroll.x < boundingBox.right + SCROLL_ZONE_SIZE - win.innerWidth) {\n else if (scroll.x < boundingBox.right - win.innerWidth) {\n scroll.x = boundingBox.right + exports.SCROLL_ZONE_SIZE - win.innerWidth;\n }\n return {\n x: Math.max(0, scroll.x),\n y: Math.max(0, scroll.y),\n };\n }", "function getBounds(pageBounds, isLeftAligned) {\n var y1 = pageBounds[0],\n x1 = pageBounds[1],\n y2 = pageBounds[2] + bleed,\n x2 = pageBounds[3];\n var Y = boxSize.height,\n X = boxSize.width;\n return isLeftAligned\n ? [y2, x1, y2 + Y, x1 + X]\n : [y2, x2 - X, y2 + Y, x2];\n}", "function Cr(e){var t=e.container;return[t.scrollLeft,t.scrollTop]}", "function getBounds(elem) {\n\t\tif (elem.find('.motion-path').length) {\n\t\t\telem.find('.motion-path').css({ 'display': 'none' })\n\t\t}\n\t\t\n\t\t//var bounds = elem.get(0).getBoundingClientRect();\n\t\tvar bounds = elem.get(0).getBBox();\n\t\t\n\t\tif (elem.find('.motion-path').length) {\n\t\t\telem.find('.motion-path').css({ 'display': '' })\n\t\t}\n\t\t\n\t\tif (elem.is('[data-width]')) {\n\t\t\tbounds.width = parseInt(elem.attr('data-width'));\n\t\t}\n\t\t\n\t\treturn bounds;\n\t}", "function rect_rect (one,two) {\n var h = Math.max(one.hw + two.hw - Math.abs(one.x - two.x),0),\n v = Math.max(one.hh + two.hh - Math.abs(one.y - two.y),0);\n if (h<=margin || v<=margin) {\n return 0;\n }\n else {\n var res = (h < v) ? {x:(h+margin)*Math.sign(one.x-two.x),y:0} : {x:0,y:(v+margin)*Math.sign(one.y-two.y)};\n return res;\n }\n}", "function computeBounds(x1, x2, y1, y2) {\n return [[x1, y1], [x2, y1], [x2, y2], [x1,y2]];\n }" ]
[ "0.6850526", "0.66271067", "0.66202945", "0.6515266", "0.6497182", "0.6487071", "0.64457697", "0.64024943", "0.6396382", "0.6355395", "0.6345145", "0.63372374", "0.6321982", "0.6319057", "0.62603396", "0.62603396", "0.62572896", "0.62285376", "0.6216895", "0.62146056", "0.6202101", "0.6196547", "0.6174095", "0.6174095", "0.6174095", "0.6174095", "0.6174095", "0.6174095", "0.6174095", "0.6174095", "0.6174095", "0.6174095", "0.6174095", "0.6173985", "0.61674356", "0.6132693", "0.61296296", "0.61089784", "0.61089784", "0.61089784", "0.61089784", "0.61089784", "0.61089784", "0.6104907", "0.60765284", "0.6070936", "0.60699236", "0.60692334", "0.60620195", "0.60542595", "0.60541356", "0.6050001", "0.6048255", "0.60456514", "0.6044133", "0.60440487", "0.60408145", "0.60407716", "0.60407716", "0.60407716", "0.60407716", "0.60407716", "0.60407716", "0.60407716", "0.60407716", "0.60407716", "0.60407716", "0.60407716", "0.6039903", "0.6038234", "0.6022081", "0.60147834", "0.5997167", "0.5991587", "0.598707", "0.59786606", "0.59783643", "0.5976628", "0.59637547", "0.5962207", "0.5961623", "0.59534085", "0.5948148", "0.5915663", "0.5912988", "0.5907982", "0.5907755", "0.5904302", "0.5901798", "0.58989644", "0.5897331", "0.5896758", "0.5890621", "0.5870542", "0.5850165", "0.58383954", "0.5822343", "0.5821121", "0.5816355", "0.5809029", "0.5805442" ]
0.0
-1
given a DOM element, return the list of all scroll parents, up the list of ancesors until we get to the top window object. This list is what we attach scroll listeners to, because if any of these parent elements scroll, we'll need to recalculate the reference element's position.
function listScrollParents(element,list){var _element$ownerDocumen;if(list===void 0){list=[];}var scrollParent=getScrollParent(element);var isBody=scrollParent===((_element$ownerDocumen=element.ownerDocument)==null?void 0:_element$ownerDocumen.body);var win=getWindow(scrollParent);var target=isBody?[win].concat(win.visualViewport||[],isScrollParent(scrollParent)?scrollParent:[]):scrollParent;var updatedList=list.concat(target);return isBody?updatedList:// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here updatedList.concat(listScrollParents(getParentNode(target)));}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listScrollParents$1(element,list){var _element$ownerDocumen;if(list===void 0){list=[];}var scrollParent=getScrollParent$1(element);var isBody=scrollParent===((_element$ownerDocumen=element.ownerDocument)==null?void 0:_element$ownerDocumen.body);var win=getWindow$1(scrollParent);var target=isBody?[win].concat(win.visualViewport||[],isScrollParent$1(scrollParent)?scrollParent:[]):scrollParent;var updatedList=list.concat(target);return isBody?updatedList:// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\nupdatedList.concat(listScrollParents$1(getParentNode$1(target)));}", "getAncestorScrollContainers(elementRef) {\n const scrollingContainers = [];\n this.scrollContainers.forEach((_subscription, scrollable) => {\n if (this._scrollableContainsElement(scrollable, elementRef)) {\n scrollingContainers.push(scrollable);\n }\n });\n return scrollingContainers;\n }", "getAncestorScrollContainers(elementOrElementRef) {\n const scrollingContainers = [];\n this.scrollContainers.forEach((_subscription, scrollable) => {\n if (this._scrollableContainsElement(scrollable, elementOrElementRef)) {\n scrollingContainers.push(scrollable);\n }\n });\n return scrollingContainers;\n }", "getAncestorScrollContainers(elementOrElementRef) {\n const scrollingContainers = [];\n this.scrollContainers.forEach((_subscription, scrollable) => {\n if (this._scrollableContainsElement(scrollable, elementOrElementRef)) {\n scrollingContainers.push(scrollable);\n }\n });\n return scrollingContainers;\n }", "getAncestorScrollContainers(elementOrElementRef) {\n const scrollingContainers = [];\n this.scrollContainers.forEach((_subscription, scrollable) => {\n if (this._scrollableContainsElement(scrollable, elementOrElementRef)) {\n scrollingContainers.push(scrollable);\n }\n });\n return scrollingContainers;\n }", "function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = Object(_getScrollParent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], Object(_isScrollParent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(target)));\n}", "function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = Object(_getScrollParent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], Object(_isScrollParent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(target)));\n}", "function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = Object(_getScrollParent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], Object(_isScrollParent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(target)));\n}", "function listScrollParents(element, list) {\n var _element$ownerDocumen;\n if (list === void 0) {\n list = [];\n }\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList :\n // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n }", "function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = (0,_getScrollParent_js__WEBPACK_IMPORTED_MODULE_0__.default)(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = (0,_getWindow_js__WEBPACK_IMPORTED_MODULE_1__.default)(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], (0,_isScrollParent_js__WEBPACK_IMPORTED_MODULE_2__.default)(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents((0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_3__.default)(target)));\n}", "function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = (0,_getScrollParent_js__WEBPACK_IMPORTED_MODULE_0__.default)(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = (0,_getWindow_js__WEBPACK_IMPORTED_MODULE_1__.default)(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], (0,_isScrollParent_js__WEBPACK_IMPORTED_MODULE_2__.default)(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents((0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_3__.default)(target)));\n}", "function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = (0,_getScrollParent_js__WEBPACK_IMPORTED_MODULE_0__.default)(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = (0,_getWindow_js__WEBPACK_IMPORTED_MODULE_1__.default)(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], (0,_isScrollParent_js__WEBPACK_IMPORTED_MODULE_2__.default)(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents((0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_3__.default)(target)));\n}", "function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = (0,_getScrollParent_js__WEBPACK_IMPORTED_MODULE_0__.default)(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = (0,_getWindow_js__WEBPACK_IMPORTED_MODULE_1__.default)(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], (0,_isScrollParent_js__WEBPACK_IMPORTED_MODULE_2__.default)(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents((0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_3__.default)(target)));\n}", "function listScrollParents(element, list) {\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = Object(_getScrollParent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element);\n var isBody = Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(scrollParent) === 'body';\n var win = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], Object(_isScrollParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(target)));\n}", "function listScrollParents(element, list) {\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = Object(_getScrollParent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element);\n var isBody = Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(scrollParent) === 'body';\n var win = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], Object(_isScrollParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(target)));\n}", "function listScrollParents(element, list) {\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = Object(_getScrollParent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element);\n var isBody = Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(scrollParent) === 'body';\n var win = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], Object(_isScrollParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(target)));\n}", "function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}", "function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}", "function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}", "function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}", "function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}", "function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n }", "function getClippingParents(el) {\n var parents = [];\n while (el instanceof HTMLElement) { // will stop when gets to document or null\n var computedStyle = window.getComputedStyle(el);\n if (computedStyle.position === 'fixed') {\n break;\n }\n if ((/(auto|scroll)/).test(computedStyle.overflow + computedStyle.overflowY + computedStyle.overflowX)) {\n parents.push(el);\n }\n el = el.parentNode;\n }\n return parents;\n}", "function getClippingParents(el) {\n var parents = [];\n\n while (el instanceof HTMLElement) {\n // will stop when gets to document or null\n var computedStyle = window.getComputedStyle(el);\n\n if (computedStyle.position === 'fixed') {\n break;\n }\n\n if (/(auto|scroll)/.test(computedStyle.overflow + computedStyle.overflowY + computedStyle.overflowX)) {\n parents.push(el);\n }\n\n el = el.parentNode;\n }\n\n return parents;\n }", "function getClippingParents(el) {\n var parents = [];\n while (el instanceof HTMLElement) { // will stop when gets to document or null\n var computedStyle = window.getComputedStyle(el);\n if (computedStyle.position === 'fixed') {\n break;\n }\n if ((/(auto|scroll)/).test(computedStyle.overflow + computedStyle.overflowY + computedStyle.overflowX)) {\n parents.push(el);\n }\n el = el.parentNode;\n }\n return parents;\n }", "function getClippingParents(el) {\n var parents = [];\n while (el instanceof HTMLElement) { // will stop when gets to document or null\n var computedStyle = window.getComputedStyle(el);\n if (computedStyle.position === 'fixed') {\n break;\n }\n if ((/(auto|scroll)/).test(computedStyle.overflow + computedStyle.overflowY + computedStyle.overflowX)) {\n parents.push(el);\n }\n el = el.parentNode;\n }\n return parents;\n }", "function getClippingParents(el) {\n var parents = [];\n while (el instanceof HTMLElement) { // will stop when gets to document or null\n var computedStyle = window.getComputedStyle(el);\n if (computedStyle.position === 'fixed') {\n break;\n }\n if ((/(auto|scroll)/).test(computedStyle.overflow + computedStyle.overflowY + computedStyle.overflowX)) {\n parents.push(el);\n }\n el = el.parentNode;\n }\n return parents;\n }", "function getClippingParents(el) {\n var parents = [];\n while (el instanceof HTMLElement) { // will stop when gets to document or null\n var computedStyle = window.getComputedStyle(el);\n if (computedStyle.position === 'fixed') {\n break;\n }\n if ((/(auto|scroll)/).test(computedStyle.overflow + computedStyle.overflowY + computedStyle.overflowX)) {\n parents.push(el);\n }\n el = el.parentNode;\n }\n return parents;\n }", "ancestorScrolled(elementOrElementRef, auditTimeInMs) {\n const ancestors = this.getAncestorScrollContainers(elementOrElementRef);\n return this.scrolled(auditTimeInMs).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_7__.filter)(target => {\n return !target || ancestors.indexOf(target) > -1;\n }));\n }", "ancestorScrolled(elementOrElementRef, auditTimeInMs) {\n const ancestors = this.getAncestorScrollContainers(elementOrElementRef);\n return this.scrolled(auditTimeInMs).pipe(filter(target => {\n return !target || ancestors.indexOf(target) > -1;\n }));\n }", "function overflowingAncestor(el) {\n var elems = [];\n var body = document.body;\n var rootScrollHeight = root.scrollHeight;\n do {\n var cached = getCache(el, false);\n if (cached) {\n return setCache(elems, cached);\n }\n elems.push(el);\n if (rootScrollHeight === el.scrollHeight) {\n var topOverflowsNotHidden = overflowNotHidden(root) && overflowNotHidden(body);\n var isOverflowCSS = topOverflowsNotHidden || overflowAutoOrScroll(root);\n if (isFrame && isContentOverflowing(root) || \n !isFrame && isOverflowCSS) {\n return setCache(elems, getScrollRoot()); \n }\n } else if (isContentOverflowing(el) && overflowAutoOrScroll(el)) {\n return setCache(elems, el);\n }\n } while ((el = el.parentElement));\n }", "function overflowingAncestor(el) {\n var elems = [];\n var body = document.body;\n var rootScrollHeight = root.scrollHeight;\n do {\n var cached = getCache(el, false);\n if (cached) {\n return setCache(elems, cached);\n }\n elems.push(el);\n if (rootScrollHeight === el.scrollHeight) {\n var topOverflowsNotHidden = overflowNotHidden(root) && overflowNotHidden(body);\n var isOverflowCSS = topOverflowsNotHidden || overflowAutoOrScroll(root);\n if (isFrame && isContentOverflowing(root) || \n !isFrame && isOverflowCSS) {\n return setCache(elems, getScrollRoot()); \n }\n } else if (isContentOverflowing(el) && overflowAutoOrScroll(el)) {\n return setCache(elems, el);\n }\n } while ((el = el.parentElement));\n }", "ancestorScrolled(elementOrElementRef, auditTimeInMs) {\n const ancestors = this.getAncestorScrollContainers(elementOrElementRef);\n return this.scrolled(auditTimeInMs).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__[\"filter\"])(target => {\n return !target || ancestors.indexOf(target) > -1;\n }));\n }", "function getScrollParent(element, includeHidden) {\n var LAST_RESORT = document.documentElement;\n var style = getComputedStyle(element);\n var excludeStaticParent = style.position === \"absolute\";\n var overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/;\n\n if (style.position === \"fixed\")\n return LAST_RESORT;\n for (var parent = element; parent = parent.parentElement;) {\n style = getComputedStyle(parent);\n if (excludeStaticParent && style.position === \"static\") {\n continue;\n }\n if (overflowRegex.test(style.overflow + style.overflowY + style.overflowX))\n return parent;\n }\n\n return LAST_RESORT;\n}", "function getScrollParent(element){var style=window.getComputedStyle(element);var excludeStaticParent=style.position===\"absolute\";var overflowRegex=/(auto|scroll)/;if(style.position===\"fixed\")return document.body;for(var parent=element;parent=parent.parentElement;){style=window.getComputedStyle(parent);if(excludeStaticParent&&style.position===\"static\"){continue;}if(overflowRegex.test(style.overflow+style.overflowY+style.overflowX))return parent;}return document.body;}", "ancestorScrolled(elementRef, auditTimeInMs) {\n const ancestors = this.getAncestorScrollContainers(elementRef);\n return this.scrolled(auditTimeInMs).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__[\"filter\"])(target => {\n return !target || ancestors.indexOf(target) > -1;\n }));\n }", "function overflowingAncestor(el) {\n var elems = [];\n var body = document.body;\n var rootScrollHeight = root.scrollHeight;\n do {\n var cached = cache[uniqueID(el)];\n if (cached) {\n return setCache(elems, cached);\n }\n elems.push(el);\n if (rootScrollHeight === el.scrollHeight) {\n var topOverflowsNotHidden = overflowNotHidden(root) && overflowNotHidden(body);\n var isOverflowCSS = topOverflowsNotHidden || overflowAutoOrScroll(root);\n if (isFrame && isContentOverflowing(root) || !isFrame && isOverflowCSS) {\n return setCache(elems, getScrollRoot());\n }\n } else if (isContentOverflowing(el) && overflowAutoOrScroll(el)) {\n return setCache(elems, el);\n }\n } while (el = el.parentElement);\n }", "function overflowingAncestor(el) {\n var elems = [];\n var body = document.body;\n var rootScrollHeight = root.scrollHeight;\n do {\n var cached = cache[uniqueID(el)];\n if (cached) {\n return setCache(elems, cached);\n }\n elems.push(el);\n if (rootScrollHeight === el.scrollHeight) {\n var topOverflowsNotHidden = overflowNotHidden(root) && overflowNotHidden(body);\n var isOverflowCSS = topOverflowsNotHidden || overflowAutoOrScroll(root);\n if (isFrame && isContentOverflowing(root) || \n !isFrame && isOverflowCSS) {\n return setCache(elems, getScrollRoot()); \n }\n } else if (isContentOverflowing(el) && overflowAutoOrScroll(el)) {\n return setCache(elems, el);\n }\n } while (el = el.parentElement);\n}", "function overflowingAncestor(el) {\n var elems = [];\n var body = document.body;\n var rootScrollHeight = root.scrollHeight;\n do {\n var cached = cache[uniqueID(el)];\n if (cached) {\n return setCache(elems, cached);\n }\n elems.push(el);\n if (rootScrollHeight === el.scrollHeight) {\n var topOverflowsNotHidden = overflowNotHidden(root) && overflowNotHidden(body);\n var isOverflowCSS = topOverflowsNotHidden || overflowAutoOrScroll(root);\n if (isFrame && isContentOverflowing(root) || \n !isFrame && isOverflowCSS) {\n return setCache(elems, getScrollRoot()); \n }\n } else if (isContentOverflowing(el) && overflowAutoOrScroll(el)) {\n return setCache(elems, el);\n }\n } while (el = el.parentElement);\n}", "function bindAncestorScrollEvents() {\n var elem = (hasFrozenRows && !options.frozenBottom) ? $canvasBottomL[0] : $canvasTopL[0];\n while ((elem = elem.parentNode) != document.body && elem != null) {\n // bind to scroll containers only\n if (elem == $viewportTopL[0] || elem.scrollWidth != elem.clientWidth || elem.scrollHeight != elem.clientHeight) {\n var $elem = $(elem);\n if (!$boundAncestors) {\n $boundAncestors = $elem;\n } else {\n $boundAncestors = $boundAncestors.add($elem);\n }\n $elem.on(\"scroll.\" + uid, handleActiveCellPositionChange);\n }\n }\n }", "function overflowingAncestor(el) {\r\n var elems = [];\r\n var body = document.body;\r\n var rootScrollHeight = root.scrollHeight;\r\n do {\r\n var cached = cache[uniqueID(el)];\r\n if (cached) {\r\n return setCache(elems, cached);\r\n }\r\n elems.push(el);\r\n if (rootScrollHeight === el.scrollHeight) {\r\n var topOverflowsNotHidden = overflowNotHidden(root) && overflowNotHidden(body);\r\n var isOverflowCSS = topOverflowsNotHidden || overflowAutoOrScroll(root);\r\n if (isFrame && isContentOverflowing(root) || \r\n !isFrame && isOverflowCSS) {\r\n return setCache(elems, getScrollRoot()); \r\n }\r\n } else if (isContentOverflowing(el) && overflowAutoOrScroll(el)) {\r\n return setCache(elems, el);\r\n }\r\n } while (el = el.parentElement);\r\n}", "function overflowingAncestor(el) {\r\n var elems = [];\r\n var body = document.body;\r\n var rootScrollHeight = root.scrollHeight;\r\n do {\r\n var cached = cache[uniqueID(el)];\r\n if (cached) {\r\n return setCache(elems, cached);\r\n }\r\n elems.push(el);\r\n if (rootScrollHeight === el.scrollHeight) {\r\n var topOverflowsNotHidden = overflowNotHidden(root) && overflowNotHidden(body);\r\n var isOverflowCSS = topOverflowsNotHidden || overflowAutoOrScroll(root);\r\n if (isFrame && isContentOverflowing(root) || \r\n !isFrame && isOverflowCSS) {\r\n return setCache(elems, getScrollRoot()); \r\n }\r\n } else if (isContentOverflowing(el) && overflowAutoOrScroll(el)) {\r\n return setCache(elems, el);\r\n }\r\n } while (el = el.parentElement);\r\n}", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(element);\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement);\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(element);\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement);\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(element);\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement);\n });\n } // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(element);\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement);\n });\n } // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement) && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement) && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement) && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(element);\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement);\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement) && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement) && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement) && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getScrollParent(el){var position=el.css('position');var scrollParent=el.parents().filter(function(){var parent=$(this);return /(auto|scroll)/.test(parent.css('overflow')+parent.css('overflow-y')+parent.css('overflow-x'));}).eq(0);return position==='fixed'||!scrollParent.length?$(el[0].ownerDocument||document):scrollParent;}", "function GetScrolledParent(ele){ //returns a parent element for which scrolling is active. null if no scrolling\n\tvar p = ele.parentElement;\n\twhile(p){\n\t\tif (p.scrollHeight > p.offsetHeight) return p;// we could have checked for overflow, but this test\n\t\t\t\t\t\t\t\t\t\t\t\t\t // ensure that the region is indeed being scrolled\n\t\tp = p.parentElement;\n\t}\n\treturn null; //no scrolling parent..\n}", "function getClippingParents(element){var clippingParents=listScrollParents(getParentNode(element));var canEscapeClipping=['absolute','fixed'].indexOf(getComputedStyle$1(element).position)>=0;var clipperElement=canEscapeClipping&&isHTMLElement(element)?getOffsetParent(element):element;if(!isElement(clipperElement)){return [];}// $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\nreturn clippingParents.filter(function(clippingParent){return isElement(clippingParent)&&contains(clippingParent,clipperElement)&&getNodeName(clippingParent)!=='body';});}// Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element){var clippingParents=listScrollParents(getParentNode(element));var canEscapeClipping=['absolute','fixed'].indexOf(getComputedStyle(element).position)>=0;var clipperElement=canEscapeClipping&&isHTMLElement(element)?getOffsetParent(element):element;if(!isElement(clipperElement)){return [];}// $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\nreturn clippingParents.filter(function(clippingParent){return isElement(clippingParent)&&contains(clippingParent,clipperElement)&&getNodeName(clippingParent)!=='body';});}// Gets the maximum area that the element is visible in due to any number of", "function getScrollEventTarget(element, rootParent) {\n if (rootParent === void 0) {\n rootParent = window;\n }\n\n var node = element;\n\n while (node && node.tagName !== 'HTML' && node.tagName !== 'BODY' && node.nodeType === 1 && node !== rootParent) {\n var _window$getComputedSt = window.getComputedStyle(node),\n overflowY = _window$getComputedSt.overflowY;\n\n if (overflowY === 'scroll' || overflowY === 'auto') {\n return node;\n }\n\n node = node.parentNode;\n }\n\n return rootParent;\n}", "function getClippingParents(element) {\n const clippingParents = getScrollParents(getParentNode(element));\n const canEscapeClipping = ['absolute', 'fixed'].includes(getComputedStyle$1(element).position);\n const clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // @ts-ignore isElement check ensures we return Array<Element>\n\n\n return clippingParents.filter(clippingParent => isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body');\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle_getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getScrollParent(parent, child) {\n var element = child;\n var scrollTop = 0;\n\n while (element && element !== parent) {\n element = element.parentNode;\n scrollTop += element.scrollTop;\n }\n return scrollTop;\n}", "function getScrollParent(parent, child) {\n var element = child;\n var scrollTop = 0;\n\n while (element && element !== parent) {\n element = element.parentNode;\n scrollTop += element.scrollTop;\n }\n return scrollTop;\n}", "function getScrollParent(parent, child) {\n var element = child;\n var scrollTop = 0;\n\n while (element && element !== parent) {\n element = element.parentNode;\n scrollTop += element.scrollTop;\n }\n return scrollTop;\n}", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n } // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = (0,_listScrollParents_js__WEBPACK_IMPORTED_MODULE_7__.default)((0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_8__.default)(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf((0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_9__.default)(element).position) >= 0;\n var clipperElement = canEscapeClipping && (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isHTMLElement)(element) ? (0,_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_10__.default)(element) : element;\n\n if (!(0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clippingParent) && (0,_contains_js__WEBPACK_IMPORTED_MODULE_11__.default)(clippingParent, clipperElement) && (0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_12__.default)(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = (0,_listScrollParents_js__WEBPACK_IMPORTED_MODULE_7__.default)((0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_8__.default)(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf((0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_9__.default)(element).position) >= 0;\n var clipperElement = canEscapeClipping && (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isHTMLElement)(element) ? (0,_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_10__.default)(element) : element;\n\n if (!(0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clippingParent) && (0,_contains_js__WEBPACK_IMPORTED_MODULE_11__.default)(clippingParent, clipperElement) && (0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_12__.default)(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = (0,_listScrollParents_js__WEBPACK_IMPORTED_MODULE_7__.default)((0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_8__.default)(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf((0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_9__.default)(element).position) >= 0;\n var clipperElement = canEscapeClipping && (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isHTMLElement)(element) ? (0,_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_10__.default)(element) : element;\n\n if (!(0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clippingParent) && (0,_contains_js__WEBPACK_IMPORTED_MODULE_11__.default)(clippingParent, clipperElement) && (0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_12__.default)(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = (0,_listScrollParents_js__WEBPACK_IMPORTED_MODULE_7__.default)((0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_8__.default)(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf((0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_9__.default)(element).position) >= 0;\n var clipperElement = canEscapeClipping && (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isHTMLElement)(element) ? (0,_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_10__.default)(element) : element;\n\n if (!(0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clippingParent) && (0,_contains_js__WEBPACK_IMPORTED_MODULE_11__.default)(clippingParent, clipperElement) && (0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_12__.default)(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle_getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle_getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle_getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains$1(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n } // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = _listScrollParentsJsDefault.default(_getParentNodeJsDefault.default(element));\n var canEscapeClipping = [\n 'absolute',\n 'fixed'\n ].indexOf(_getComputedStyleJsDefault.default(element).position) >= 0;\n var clipperElement = canEscapeClipping && _instanceOfJs.isHTMLElement(element) ? _getOffsetParentJsDefault.default(element) : element;\n if (!_instanceOfJs.isElement(clipperElement)) return [];\n // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n return clippingParents.filter(function(clippingParent) {\n return _instanceOfJs.isElement(clippingParent) && _containsJsDefault.default(clippingParent, clipperElement) && _getNodeNameJsDefault.default(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function parents(element) {\n var list = []\n while (element.parentNode && element.parentNode.nodeType == 1) {\n list.push(element = element.parentNode)\n }\n return list\n}", "function getClippingParents$1(element){var clippingParents=listScrollParents$1(getParentNode$1(element));var canEscapeClipping=['absolute','fixed'].indexOf(getComputedStyle$2(element).position)>=0;var clipperElement=canEscapeClipping&&isHTMLElement$1(element)?getOffsetParent$1(element):element;if(!isElement$1(clipperElement)){return [];}// $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\nreturn clippingParents.filter(function(clippingParent){return isElement$1(clippingParent)&&contains$1(clippingParent,clipperElement)&&getNodeName$1(clippingParent)!=='body';});}// Gets the maximum area that the element is visible in due to any number of", "getScrollEventTarget(element, root = window) {\n let node = element;\n\n while (\n node &&\n node.tagName !== \"HTML\" &&\n node.nodeType === 1 &&\n node !== root\n ) {\n const { overflowY } = window.getComputedStyle(node);\n\n if (overflowScrollReg.test(overflowY)) {\n if (node.tagName !== \"BODY\") {\n return node;\n }\n\n // see: https://github.com/youzan/vant/issues/3823\n const { overflowY: htmlOverflowY } = window.getComputedStyle(\n node.parentNode\n );\n\n if (overflowScrollReg.test(htmlOverflowY)) {\n return node;\n }\n }\n node = node.parentNode;\n }\n\n return root;\n }", "function findScrollableParent(startingElement) {\n var el = startingElement;\n var doc = Object(_dom_getDocument__WEBPACK_IMPORTED_MODULE_0__[\"getDocument\"])(startingElement);\n // First do a quick scan for the scrollable attribute.\n while (el && el !== doc.body) {\n if (el.getAttribute(DATA_IS_SCROLLABLE_ATTRIBUTE) === 'true') {\n return el;\n }\n el = el.parentElement;\n }\n // If we haven't found it, the use the slower method: compute styles to evaluate if overflow is set.\n el = startingElement;\n while (el && el !== doc.body) {\n if (el.getAttribute(DATA_IS_SCROLLABLE_ATTRIBUTE) !== 'false') {\n var computedStyles = getComputedStyle(el);\n var overflowY = computedStyles ? computedStyles.getPropertyValue('overflow-y') : '';\n if (overflowY && (overflowY === 'scroll' || overflowY === 'auto')) {\n return el;\n }\n }\n el = el.parentElement;\n }\n // Fall back to window scroll.\n if (!el || el === doc.body) {\n // tslint:disable-next-line:no-any\n el = Object(_dom_getWindow__WEBPACK_IMPORTED_MODULE_2__[\"getWindow\"])(startingElement);\n }\n return el;\n}", "function getClippingParents(element) {\n const clippingParents = listScrollParents_1.default(getParentNode_1.default(element));\n const canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle_1.default(element).position) >= 0;\n const clipperElement = canEscapeClipping && instanceOf_1.isHTMLElement(element) ? getOffsetParent_1.default(element) : element;\n if (!instanceOf_1.isElement(clipperElement)) {\n return [];\n }\n // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n return clippingParents.filter(clippingParent => instanceOf_1.isElement(clippingParent) && contains_1.default(clippingParent, clipperElement) && getNodeName_1.default(clippingParent) !== 'body');\n}", "function findScrollableParent(startingElement) {\n var el = startingElement;\n var doc = (0,_dom_getDocument__WEBPACK_IMPORTED_MODULE_1__.getDocument)(startingElement);\n // First do a quick scan for the scrollable attribute.\n while (el && el !== doc.body) {\n if (el.getAttribute(DATA_IS_SCROLLABLE_ATTRIBUTE) === 'true') {\n return el;\n }\n el = el.parentElement;\n }\n // If we haven't found it, the use the slower method: compute styles to evaluate if overflow is set.\n el = startingElement;\n while (el && el !== doc.body) {\n if (el.getAttribute(DATA_IS_SCROLLABLE_ATTRIBUTE) !== 'false') {\n var computedStyles = getComputedStyle(el);\n var overflowY = computedStyles ? computedStyles.getPropertyValue('overflow-y') : '';\n if (overflowY && (overflowY === 'scroll' || overflowY === 'auto')) {\n return el;\n }\n }\n el = el.parentElement;\n }\n // Fall back to window scroll.\n if (!el || el === doc.body) {\n el = (0,_dom_getWindow__WEBPACK_IMPORTED_MODULE_2__.getWindow)(startingElement);\n }\n return el;\n}", "function findScrollableParent(startingElement) {\n var el = startingElement;\n var doc = (0,_dom_getDocument__WEBPACK_IMPORTED_MODULE_1__.getDocument)(startingElement);\n // First do a quick scan for the scrollable attribute.\n while (el && el !== doc.body) {\n if (el.getAttribute(DATA_IS_SCROLLABLE_ATTRIBUTE) === 'true') {\n return el;\n }\n el = el.parentElement;\n }\n // If we haven't found it, the use the slower method: compute styles to evaluate if overflow is set.\n el = startingElement;\n while (el && el !== doc.body) {\n if (el.getAttribute(DATA_IS_SCROLLABLE_ATTRIBUTE) !== 'false') {\n var computedStyles = getComputedStyle(el);\n var overflowY = computedStyles ? computedStyles.getPropertyValue('overflow-y') : '';\n if (overflowY && (overflowY === 'scroll' || overflowY === 'auto')) {\n return el;\n }\n }\n el = el.parentElement;\n }\n // Fall back to window scroll.\n if (!el || el === doc.body) {\n el = (0,_dom_getWindow__WEBPACK_IMPORTED_MODULE_2__.getWindow)(startingElement);\n }\n return el;\n}", "function getScrollParent(el) {\n var position = el.css('position');\n var scrollParent = el.parents().filter(function () {\n var parent = $(this);\n return (/(auto|scroll)/).test(parent.css('overflow') + parent.css('overflow-y') + parent.css('overflow-x'));\n }).eq(0);\n return position === 'fixed' || !scrollParent.length ? $(el[0].ownerDocument || document) : scrollParent;\n}", "function getScrollParent(el) {\n var position = el.css('position');\n var scrollParent = el.parents().filter(function () {\n var parent = $(this);\n return (/(auto|scroll)/).test(parent.css('overflow') + parent.css('overflow-y') + parent.css('overflow-x'));\n }).eq(0);\n return position === 'fixed' || !scrollParent.length ? $(el[0].ownerDocument || document) : scrollParent;\n}", "function getScrollParent(el) {\n var position = el.css('position');\n var scrollParent = el.parents().filter(function () {\n var parent = $(this);\n return (/(auto|scroll)/).test(parent.css('overflow') + parent.css('overflow-y') + parent.css('overflow-x'));\n }).eq(0);\n return position === 'fixed' || !scrollParent.length ? $(el[0].ownerDocument || document) : scrollParent;\n}", "function getScrollParent(el) {\n var position = el.css('position');\n var scrollParent = el.parents().filter(function () {\n var parent = $(this);\n return (/(auto|scroll)/).test(parent.css('overflow') + parent.css('overflow-y') + parent.css('overflow-x'));\n }).eq(0);\n return position === 'fixed' || !scrollParent.length ? $(el[0].ownerDocument || document) : scrollParent;\n}", "function findPos(element) {\n\t var curtop = 0;\n\n\t if (element.offsetParent) {\n\t do {\n\t curtop += element.offsetTop;\n\t } while (element = element.offsetParent);\n\n\t return [curtop];\n\t }\n\t}", "function findScrollableParent(startingElement) {\n var el = startingElement;\n // First do a quick scan for the scrollable attribute.\n while (el && el !== document.body) {\n if (el.getAttribute(exports.DATA_IS_SCROLLABLE_ATTRIBUTE) === 'true') {\n return el;\n }\n el = el.parentElement;\n }\n // If we haven't found it, the use the slower method: compute styles to evaluate if overflow is set.\n el = startingElement;\n while (el && el !== document.body) {\n if (el.getAttribute(exports.DATA_IS_SCROLLABLE_ATTRIBUTE) !== 'false') {\n var styles_1 = getComputedStyle(el);\n var overflowY = styles_1 ? styles_1.getPropertyValue('overflow-y') : '';\n if (overflowY && (overflowY === 'scroll' || overflowY === 'auto')) {\n return el;\n }\n }\n el = el.parentElement;\n }\n // Fall back to window scroll.\n if (!el || el === document.body) {\n el = window;\n }\n return el;\n}", "function findScrollableParent(startingElement) {\n var el = startingElement;\n // First do a quick scan for the scrollable attribute.\n while (el && el !== document.body) {\n if (el.getAttribute(exports.DATA_IS_SCROLLABLE_ATTRIBUTE) === 'true') {\n return el;\n }\n el = el.parentElement;\n }\n // If we haven't found it, the use the slower method: compute styles to evaluate if overflow is set.\n el = startingElement;\n while (el && el !== document.body) {\n if (el.getAttribute(exports.DATA_IS_SCROLLABLE_ATTRIBUTE) !== 'false') {\n var styles_1 = getComputedStyle(el);\n var overflowY = styles_1 ? styles_1.getPropertyValue('overflow-y') : '';\n if (overflowY && (overflowY === 'scroll' || overflowY === 'auto')) {\n return el;\n }\n }\n el = el.parentElement;\n }\n // Fall back to window scroll.\n if (!el || el === document.body) {\n el = window;\n }\n return el;\n}", "scrollIfNeeded() {\n const el = this.ref,\n parent = el.parentElement,\n overTop = el.offsetTop - parent.offsetTop < parent.scrollTop,\n overBottom = el.offsetTop - parent.offsetTop + el.clientHeight >\n parent.scrollTop + parent.clientHeight;\n\n if (overTop || overBottom) {\n parent.scrollTop = el.offsetTop - parent.offsetTop -\n parent.clientHeight / 2 + el.clientHeight / 2;\n }\n }", "function getOffsetParent(element) {\n var window = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && Object(_isTableElement_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(offsetParent) && Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(offsetParent) === 'body' && Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent).position === 'static') {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}", "function getOffsetParent(element) {\n var window = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && Object(_isTableElement_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(offsetParent) && Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(offsetParent) === 'body' && Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent).position === 'static') {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}", "function getOffsetParent(element) {\n var window = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && Object(_isTableElement_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(offsetParent) && Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(offsetParent) === 'body' && Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent).position === 'static') {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}", "function findScrollableParent(startingElement) {\n var el = startingElement;\n // First do a quick scan for the scrollable attribute.\n while (el && el !== document.body) {\n if (el.getAttribute(DATA_IS_SCROLLABLE_ATTRIBUTE) === 'true') {\n return el;\n }\n el = el.parentElement;\n }\n // If we haven't found it, the use the slower method: compute styles to evaluate if overflow is set.\n el = startingElement;\n while (el && el !== document.body) {\n if (el.getAttribute(DATA_IS_SCROLLABLE_ATTRIBUTE) !== 'false') {\n var computedStyles = getComputedStyle(el);\n var overflowY = computedStyles ? computedStyles.getPropertyValue('overflow-y') : '';\n if (overflowY && (overflowY === 'scroll' || overflowY === 'auto')) {\n return el;\n }\n }\n el = el.parentElement;\n }\n // Fall back to window scroll.\n if (!el || el === document.body) {\n // tslint:disable-next-line:no-any\n el = window;\n }\n return el;\n}" ]
[ "0.72062486", "0.7164777", "0.7157121", "0.7063339", "0.7063339", "0.6961722", "0.6961722", "0.6961722", "0.69084173", "0.6873973", "0.6873973", "0.6873973", "0.6873973", "0.6841395", "0.6841395", "0.6841395", "0.68379384", "0.68379384", "0.68379384", "0.68379384", "0.68379384", "0.6824236", "0.6709664", "0.6661964", "0.664691", "0.664691", "0.664691", "0.664691", "0.64681846", "0.63878727", "0.6349999", "0.6349999", "0.6344994", "0.6313878", "0.63083524", "0.63039875", "0.6289673", "0.62571716", "0.62571716", "0.6254383", "0.62178403", "0.62178403", "0.62098503", "0.62098503", "0.6201366", "0.6201366", "0.6178312", "0.6178312", "0.6178312", "0.61681414", "0.6165777", "0.6165777", "0.6165777", "0.61565816", "0.6112038", "0.6091331", "0.6090463", "0.6048458", "0.60460544", "0.6037896", "0.60289264", "0.6017778", "0.6017778", "0.6017778", "0.6012809", "0.6012809", "0.6012809", "0.6012809", "0.60076827", "0.6005974", "0.6005974", "0.6005974", "0.6005974", "0.60005873", "0.60005873", "0.60005873", "0.59986866", "0.5994172", "0.5985882", "0.59817934", "0.5941699", "0.59304774", "0.5923882", "0.5880836", "0.5869385", "0.58405113", "0.58405113", "0.5799961", "0.5799961", "0.5799961", "0.5799961", "0.57481486", "0.57470506", "0.57470506", "0.572832", "0.5727169", "0.5727169", "0.5727169", "0.5718879" ]
0.7336192
1
clipping (or hiding) overflowing elements with a position different from `initial`
function getClippingParents(element){var clippingParents=listScrollParents(getParentNode(element));var canEscapeClipping=['absolute','fixed'].indexOf(getComputedStyle(element).position)>=0;var clipperElement=canEscapeClipping&&isHTMLElement(element)?getOffsetParent(element):element;if(!isElement(clipperElement)){return [];}// $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414 return clippingParents.filter(function(clippingParent){return isElement(clippingParent)&&contains(clippingParent,clipperElement)&&getNodeName(clippingParent)!=='body';});}// Gets the maximum area that the element is visible in due to any number of
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetHiddenItemSize() {\n TweenLite.to(_element, 0, {scale: 1});\n }", "revertPosition() {\n const context = this.context,\n original = context.originalPosition; // revert to correct location\n\n if (original.next) {\n const isNoop = original.next && original.next.previousSibling === context.dragging || !original.next && context.dragging === original.parent.lastChild;\n\n if (!isNoop) {\n original.parent.insertBefore(context.dragging, original.next);\n }\n } else {\n original.parent.appendChild(context.dragging);\n } // no target container\n\n context.draggedTo = null;\n }", "revertPosition() {\n const context = this.context,\n original = context.originalPosition;\n\n // revert to correct location\n if (original.next) {\n const isNoop =\n (original.next && original.next.previousSibling === context.dragging) ||\n (!original.next && context.dragging === original.parent.lastChild);\n\n if (!isNoop) {\n original.parent.insertBefore(context.dragging, original.next);\n }\n } else {\n original.parent.appendChild(context.dragging);\n }\n\n // no target container\n context.draggedTo = null;\n }", "function _revert_element(ui) {\n // make element assume previous size\n if (ui.originalSize) {\n ui.helper.height(ui.originalSize.height);\n }\n}", "set originalClip(value) {}", "function clamp(pos){pos.top=Math.max(Math.min(pos.top,bounds.bottom-containerNode.offsetHeight),bounds.top);pos.left=Math.max(Math.min(pos.left,bounds.right-containerNode.offsetWidth),bounds.left);}", "removeFlipped ()\r\n {\r\n //card.classList.remove(\"revealed\");\r\n this.arr.forEach (card => {card.classList.remove(\"visible\");})\r\n }", "function clip (x, l, h)\n{\n if (x < l)\n x = l;\n if (x > h)\n x = h;\n \n return x;\n\t\n}", "hideOffscreenElements() {\n const startIndex = Math.floor(-(this.scrollContainer.y - this.y) / this.itemHeight);\n const endIndex = Math.floor(startIndex + (this.height / this.itemHeight));\n for (let i = 0; i < this.items.length; i++) {\n const item = this.items[i];\n item.visible = false;\n if (i >= startIndex && i <= endIndex + 1) {\n item.visible = true;\n }\n }\n }", "function clip(x,a,b){return b===undefined?x>a?a:x<-a?-a:x:x>b?b:x<a?a:x}", "setPositionLimits() {\n\t\tconst elementRect = this.element.getBoundingClientRect();\n\t\tif (elementRect.left < 0) {\n\t\t\tthis.element.style.left = '0px';\n\t\t}\n\t\tif (elementRect.top < 0) {\n\t\t\tthis.element.style.top = '0px';\n\t\t}\n\t}", "function lipMask(_ref) {\n var _ref$canvas = _ref.canvas,\n canvas = _ref$canvas === undefined ? null : _ref$canvas,\n outerlipArray = _ref.outerlipArray,\n innerlipArray = _ref.innerlipArray,\n lipsOpened = _ref.lipsOpened,\n w = _ref.w,\n h = _ref.h,\n _ref$size = _ref.size,\n size = _ref$size === undefined ? 1.0 : _ref$size,\n _ref$color = _ref.color,\n color = _ref$color === undefined ? 'rgba(255,100,0,0.3)' : _ref$color,\n _ref$scale = _ref.scale,\n scale = _ref$scale === undefined ? null : _ref$scale,\n _ref$blurLevel = _ref.blurLevel,\n blurLevel = _ref$blurLevel === undefined ? 0.02 : _ref$blurLevel,\n _ref$topSize = _ref.topSize,\n topSize = _ref$topSize === undefined ? 1 : _ref$topSize;\n\n var canvasTemp = createCanvas({ canvas: canvas, w: w, h: h });\n var contextTemp = canvasTemp.getContext('2d');\n\n if (scale) {\n contextTemp.scale(scale.x, scale.y);\n }\n\n if (outerlipArray.length === 0) {\n console.log('Error: outerlip length is 0');\n return;\n }\n\n if (innerlipArray.length === 0) {\n console.log('Error: innerlip length is 0');\n return;\n }\n\n var minx = -1,\n maxx = -1;\n var miny = -1,\n maxy = -1;\n for (var i = 0, l = outerlipArray.length; i < l; i++) {\n if (minx === -1) {\n minx = outerlipArray[i].x;\n } else {\n if (minx > outerlipArray[i].x) {\n minx = outerlipArray[i].x;\n }\n }\n\n if (maxx === -1) {\n maxx = outerlipArray[i].x;\n } else {\n if (maxx < outerlipArray[i].x) {\n maxx = outerlipArray[i].x;\n }\n }\n\n if (miny === -1) {\n miny = outerlipArray[i].y;\n } else {\n if (miny > outerlipArray[i].y) {\n miny = outerlipArray[i].y;\n }\n }\n\n if (maxy === -1) {\n maxy = outerlipArray[i].y;\n } else {\n if (maxy < outerlipArray[i].y) {\n maxy = outerlipArray[i].y;\n }\n }\n }\n\n if (miny > maxy) {\n console.log('Error: something wrong with lip coords');\n return;\n }\n\n var lipbox = [minx, miny, maxx, maxy];\n\n var lipw = lipbox[2] - lipbox[0];\n // const liph = lipbox[3] - lipbox[1];\n\n var blurradius = Math.max(1, Math.round(lipw * blurLevel));\n\n var bluroff = blurradius * 2;\n var newx0 = Math.max(0, lipbox[0] - bluroff);\n var newy0 = Math.max(0, lipbox[1] - bluroff);\n var newx1 = Math.min(w - 1, lipbox[2] + bluroff);\n var newy1 = Math.min(h - 1, lipbox[3] + bluroff);\n\n var newy_avg = Math.round((newy1 - newy0) / 2);\n\n var blurw = newx1 - newx0;\n var blurh = newy1 - newy0;\n\n canvasTemp.width = blurw;\n canvasTemp.height = blurh;\n\n // contextTemp.clearRect(0, 0, blurw, blurh);\n\n var curvelevel = 0.36;\n\n // draw outer lips\n var rmi = 6;\n\n contextTemp.beginPath();\n\n contextTemp.moveTo(outerlipArray[0].x - newx0, (outerlipArray[0].y - newy0) * size);\n\n for (var _i = 0, _l = outerlipArray.length; _i < _l; _i++) {\n var bh0 = (_i - 1 + _l) % _l;\n var p0 = _i;\n var p1 = (_i + 1) % _l;\n var bh1 = (_i + 2) % _l;\n\n var bh0pos = [outerlipArray[bh0].x - newx0, outerlipArray[bh0].y - newy0];\n var p0pos = [outerlipArray[p0].x - newx0, outerlipArray[p0].y - newy0];\n var p1pos = [outerlipArray[p1].x - newx0, outerlipArray[p1].y - newy0];\n var bh1pos = [outerlipArray[bh1].x - newx0, outerlipArray[bh1].y - newy0];\n\n var l0_dist = Math.sqrt((p1pos[0] - bh0pos[0]) * (p1pos[0] - bh0pos[0]) + (p1pos[1] - bh0pos[1]) * (p1pos[1] - bh0pos[1]));\n var l0_xu = (p1pos[0] - bh0pos[0]) / l0_dist;\n var l0_yu = (p1pos[1] - bh0pos[1]) / l0_dist;\n\n var l1_dist = Math.sqrt((p0pos[0] - bh1pos[0]) * (p0pos[0] - bh1pos[0]) + (p0pos[1] - bh1pos[1]) * (p0pos[1] - bh1pos[1]));\n var l1_xu = (p0pos[0] - bh1pos[0]) / l1_dist;\n var l1_yu = (p0pos[1] - bh1pos[1]) / l1_dist;\n\n var mydist = Math.sqrt((p0pos[0] - p1pos[0]) * (p0pos[0] - p1pos[0]) + (p0pos[1] - p1pos[1]) * (p0pos[1] - p1pos[1])) * curvelevel;\n\n var b0pos = void 0,\n b1pos = void 0,\n p0_top_size = void 0,\n p1_top_size = void 0;\n\n if (_i === 0 || _i === rmi) {\n b0pos = [p0pos[0], p0pos[1]];\n } else {\n b0pos = [p0pos[0] + mydist * l0_xu, p0pos[1] + mydist * l0_yu];\n }\n\n if (_i === rmi - 1 || _i === _l - 1) {\n b1pos = [p1pos[0], p1pos[1]];\n } else {\n b1pos = [p1pos[0] + mydist * l1_xu, p1pos[1] + mydist * l1_yu];\n }\n\n if (p0 > 0 && p0 < rmi) {\n p0_top_size = topSize;\n } else {\n p0_top_size = 1;\n }\n\n if (p1 > 0 && p1 < rmi) {\n p1_top_size = topSize;\n } else {\n p1_top_size = 1;\n }\n\n contextTemp.bezierCurveTo(b0pos[0], newy_avg + (b0pos[1] * size - newy_avg) * p0_top_size, b1pos[0], newy_avg + (b1pos[1] * size - newy_avg) * p1_top_size, p1pos[0], newy_avg + (p1pos[1] * size - newy_avg) * p1_top_size);\n }\n\n if (Boolean(lipsOpened) === true) {\n //temp inner lips\n var _curvelevel = 0.36;\n var _rmi = 4;\n var _l2 = innerlipArray.length;\n\n contextTemp.moveTo(innerlipArray[_l2 - 1].x - newx0, (innerlipArray[_l2 - 1].y - newy0) * size);\n\n for (var _i2 = _l2 - 1; _i2 >= 0; _i2--) {\n var _bh = (_i2 + 1) % _l2;\n var _p = _i2;\n var _p2 = (_i2 - 1 + _l2) % _l2;\n var _bh2 = (_i2 - 2 + _l2) % _l2;\n\n var _bh0pos = [innerlipArray[_bh].x - newx0, innerlipArray[_bh].y - newy0];\n var _p0pos = [innerlipArray[_p].x - newx0, innerlipArray[_p].y - newy0];\n var _p1pos = [innerlipArray[_p2].x - newx0, innerlipArray[_p2].y - newy0];\n var _bh1pos = [innerlipArray[_bh2].x - newx0, innerlipArray[_bh2].y - newy0];\n\n var _l0_dist = Math.sqrt((_p1pos[0] - _bh0pos[0]) * (_p1pos[0] - _bh0pos[0]) + (_p1pos[1] - _bh0pos[1]) * (_p1pos[1] - _bh0pos[1]));\n var _l0_xu = (_p1pos[0] - _bh0pos[0]) / _l0_dist;\n var _l0_yu = (_p1pos[1] - _bh0pos[1]) / _l0_dist;\n\n var _l1_dist = Math.sqrt((_p0pos[0] - _bh1pos[0]) * (_p0pos[0] - _bh1pos[0]) + (_p0pos[1] - _bh1pos[1]) * (_p0pos[1] - _bh1pos[1]));\n var _l1_xu = (_p0pos[0] - _bh1pos[0]) / _l1_dist;\n var _l1_yu = (_p0pos[1] - _bh1pos[1]) / _l1_dist;\n\n var _mydist = Math.sqrt((_p0pos[0] - _p1pos[0]) * (_p0pos[0] - _p1pos[0]) + (_p0pos[1] - _p1pos[1]) * (_p0pos[1] - _p1pos[1])) * _curvelevel;\n\n var _b0pos = void 0,\n _b1pos = void 0;\n\n if (_i2 === 0 || _i2 === _rmi) {\n _b0pos = [_p0pos[0], _p0pos[1]];\n } else {\n _b0pos = [_p0pos[0] + _mydist * _l0_xu, _p0pos[1] + _mydist * _l0_yu];\n }\n\n if (_i2 === _rmi + 1 || _i2 === 1) {\n _b1pos = [_p1pos[0], _p1pos[1]];\n } else {\n _b1pos = [_p1pos[0] + _mydist * _l1_xu, _p1pos[1] + _mydist * _l1_yu];\n }\n\n contextTemp.bezierCurveTo(_b0pos[0], _b0pos[1] * size, _b1pos[0], _b1pos[1] * size, _p1pos[0], _p1pos[1] * size);\n }\n }\n\n contextTemp.closePath();\n contextTemp.fillStyle = color;\n contextTemp.fill();\n\n return {\n canvas: canvasTemp,\n coords: [newx0, newy0 + (outerlipArray[0].y - newy0) - (outerlipArray[0].y - newy0) * size, blurw, blurh],\n newx0: newx0,\n newy0: newy0,\n blurradius: blurradius,\n lipw: lipw\n };\n}", "set overrideClip(value) {}", "function getClippingParents(element){var clippingParents=listScrollParents(getParentNode(element));var canEscapeClipping=['absolute','fixed'].indexOf(getComputedStyle$1(element).position)>=0;var clipperElement=canEscapeClipping&&isHTMLElement(element)?getOffsetParent(element):element;if(!isElement(clipperElement)){return [];}// $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\nreturn clippingParents.filter(function(clippingParent){return isElement(clippingParent)&&contains(clippingParent,clipperElement)&&getNodeName(clippingParent)!=='body';});}// Gets the maximum area that the element is visible in due to any number of", "function undoColorStretch(val) {\n return Math.pow(val, POPULATION_VIS_NONLINEARITY) * POPULATION_VIS_MAX_VALUE;\n}", "offscreen(){return this.x < -this.w}", "reset() {\n let el = this.$();\n if (!el) { return; }\n\n delete this._y;\n delete this._x;\n\n el.css({ transform: '' });\n el.height(); // Force-apply styles\n }", "function getClippingParents$1(element){var clippingParents=listScrollParents$1(getParentNode$1(element));var canEscapeClipping=['absolute','fixed'].indexOf(getComputedStyle$2(element).position)>=0;var clipperElement=canEscapeClipping&&isHTMLElement$1(element)?getOffsetParent$1(element):element;if(!isElement$1(clipperElement)){return [];}// $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\nreturn clippingParents.filter(function(clippingParent){return isElement$1(clippingParent)&&contains$1(clippingParent,clipperElement)&&getNodeName$1(clippingParent)!=='body';});}// Gets the maximum area that the element is visible in due to any number of", "hideLower() {\n const filteredTiles = this._filterForLower();\n if (!filteredTiles || !filteredTiles.length) {\n this._error(`No islands found buying for below ${this.minimumBells}.`);\n return;\n }\n\n filteredTiles.forEach((tag) => {\n const parent = tag.parentElement.parentElement.parentElement;\n if (parent) parent.setAttribute('style', 'display: none;'); \n });\n this._info(`Hidden islands lower than ${this.minimumBells}.`);\n }", "_makeAncestorsOverflowVisible() {\n this.ancestorsChanged = $();\n let ancestor = this.placeholder[0].parentNode;\n while (ancestor !== null && !$(ancestor).is(document)) {\n let curr = $(ancestor);\n if (curr.css('overflow') !== 'visible') {\n curr.css('overflow', 'visible');\n if (this.ancestorsChanged === undefined) {\n this.ancestorsChanged = curr;\n }\n else {\n this.ancestorsChanged = this.ancestorsChanged.add(curr);\n }\n }\n ancestor = ancestor.parentNode;\n }\n }", "_validateItemsSizeOverflowing(sizeDifference, noStyleChangedIgnoring) {\n const that = this,\n itemsCount = that._items.length;\n let newSize = 0,\n initialSize, itemsLocked = [], currentSize, currentlySetSize, lastLockedItem,\n containerRect = that.$.container.getBoundingClientRect();\n\n for (let i = 0; i < that._items.length; i++) {\n //Note: If the size is set in percentages via CSS, it's not possible check if it's really percentages or not \n //because even getComputedStyle returns the computed size not the original.\n //The only way to work is by setting the size property to a percentage value !\n currentlySetSize = that._items[i].style[that._measurements.dimension];\n currentSize = currentlySetSize.indexOf('%') > -1 ? currentlySetSize : that._items[i][that._measurements.size];\n\n if (!currentlySetSize && !that._items[i].size && that._items[i].size !== 0) {\n delete that._items[i]._originalSize;\n }\n\n that._items[i]._originalSize = that._items[i]._originalSize ? that._items[i]._originalSize : currentSize;\n itemsLocked.push(that._items[i].locked);\n }\n\n if (itemsLocked.indexOf(false) < 0) {\n lastLockedItem = that._items[that._items.length - 1];\n lastLockedItem.locked = false;\n }\n\n //Check how many items should be resized to fit\n for (let i = itemsCount - 1; i >= 0; i--) {\n if (that._items[i].collapsed || that._items[i].locked) {\n continue;\n }\n\n if ((that._items[i]._originalSize + '').indexOf('%') > -1) {\n that._items[i].style[that._measurements.dimension] = that._items[i]._originalSize;\n that._items[i]._sizeBeforeCollapse = containerRect[that._measurements.dimension] * parseFloat(that._items[i]._originalSize) / 100;\n continue;\n }\n\n if (sizeDifference === 0) {\n continue;\n }\n\n //Doesn't include the item paddings\n initialSize = that._items[i].getBoundingClientRect()[that._measurements.dimension];\n\n newSize = initialSize - sizeDifference;\n\n //May trigger the styleChanged event\n that._items[i].style[that._measurements.dimension] =\n (that._items[i]._sizeBeforeCollapse = Math.max(that._items[i]._sizeLimits ? that._items[i]._sizeLimits[that._measurements.minDimension] : 0, newSize)) + 'px';\n\n sizeDifference -= initialSize - that._items[i]._sizeBeforeCollapse;\n }\n\n //Reduce the min-sizes if necessary\n if (sizeDifference > 0) {\n for (let i = itemsCount - 1; i >= 0; i--) {\n if (that._items[i].collapsed) {\n continue;\n }\n\n initialSize = that._items[i].getBoundingClientRect()[that._measurements.dimension];\n newSize = initialSize - sizeDifference;\n\n let itemMin = that._items[i]._sizeLimits[that._measurements.minDimension] || that._items[i].min;\n\n if (itemMin) {\n if ((itemMin + '').indexOf('%') > -1) {\n itemMin = parseFloat(itemMin) / 100 * that._items[i].parentElement[that._measurements.size];\n }\n else {\n itemMin = parseFloat(itemMin);\n }\n\n if (itemMin > newSize) {\n //Ignore the StyleChanged event\n that._items[i]._sizeLimits.ignoreUpdate = noStyleChangedIgnoring ? false : true;\n that._items[i].style[that._measurements.minDimension] = Math.max(0, newSize) + 'px';\n }\n }\n\n if (that._items[i]._originalSize && (that._items[i]._originalSize + '').indexOf('%') > -1) {\n continue;\n }\n\n that._items[i]._sizeLimits.ignoreUpdate = noStyleChangedIgnoring ? false : true;\n that._items[i].style[that._measurements.dimension] = (that._items[i]._sizeBeforeCollapse = Math.max(0, newSize)) + 'px';\n\n sizeDifference -= initialSize - that._items[i]._sizeBeforeCollapse;\n }\n }\n\n if (lastLockedItem) {\n lastLockedItem.locked = true;\n }\n }", "_validateItemsSizeUnderflowing(sizeDifference, noStyleChangedIgnoring) {\n const that = this,\n itemsCount = that._items.length;\n let newSize = 0,\n initialSize, lastLockedItem;\n\n sizeDifference = Math.abs(sizeDifference);\n\n if (that._items.length > 0 && that._items.map(item => item.locked).indexOf(false) < 0) {\n lastLockedItem = that._items[that._items.length - 1];\n lastLockedItem.locked = false;\n }\n\n //Increase the min-size of the items if it has been changed\n for (let i = 0; i < itemsCount; i++) {\n if (that._items[i].collapsed || that._items[i][that._measurements.size] >= (that._items[i]._sizeLimits ? that._items[i]._sizeLimits[that._measurements.minDimension] : 0)) {\n continue;\n }\n\n initialSize = that._items[i][that._measurements.size];\n newSize = that._items[i][that._measurements.size] + sizeDifference;\n\n if (that._items[i][that._measurements.size] < that._items[i]._sizeLimits[that._measurements.minDimension]) {\n //Ignore the StyleChanged event\n that._items[i]._sizeLimits.ignoreUpdate = noStyleChangedIgnoring ? false : true;\n that._items[i].style[that._measurements.minDimension] =\n (that._items[i]._sizeBeforeCollapse = Math.max(0, Math.min(that._items[i]._sizeLimits[that._measurements.minDimension], newSize))) + 'px';\n }\n\n sizeDifference -= (that._items[i]._sizeBeforeCollapse || that._items[i][that._measurements.size]) - initialSize;\n\n if (sizeDifference <= 0) {\n break;\n }\n }\n\n const containerSize = that.$.container.getBoundingClientRect()[that._measurements.dimension];\n\n if (sizeDifference > 0) {\n for (let i = 0; i < itemsCount; i++) {\n if (that._items[i].collapsed || that._items[i].locked) {\n continue;\n }\n\n if (that._items[i]._originalSize !== undefined) {\n if ((that._items[i]._originalSize + '').indexOf('%') > -1) {\n that._items[i].style[that._measurements.dimension] = that._items[i]._originalSize;\n that._items[i]._sizeBeforeCollapse = (parseFloat(that._items[i]._originalSize) * containerSize) / 100;\n //delete that._items[i]._originalSize;\n }\n else if (that._items[i][that._measurements.size] >= that._items[i]._originalSize) {\n sizeDifference += that._items[i][that._measurements.size] - that._items[i]._originalSize;\n that._items[i].style[that._measurements.dimension] = (that._items[i]._sizeBeforeCollapse = that._items[i]._originalSize) + 'px';\n }\n else {\n newSize = Math.min(that._items[i]._originalSize, that._items[i][that._measurements.size] + sizeDifference);\n\n const usedSize = newSize - that._items[i][that._measurements.size];\n\n if (that._items[i][that._measurements.minDimension] < that._items[i]._sizeLimits[that._measurements.minDimension]) {\n that._items[i].style[that._measurements.minDimension] = Math.min(that._items[i]._sizeLimits[that._measurements.minDimension], newSize) + 'px';\n }\n\n that._items[i].style[that._measurements.dimension] = (that._items[i]._sizeBeforeCollapse = Math.max(0, Math.min(newSize, that._items[i]._originalSize))) + 'px';\n sizeDifference -= usedSize;\n }\n\n if (sizeDifference <= 0) {\n break;\n }\n }\n }\n }\n\n if (lastLockedItem) {\n lastLockedItem.locked = true;\n }\n }", "function reset() {\n $boundary\n .css('height', 'auto')\n .find('.placeholder')\n .remove()\n .end()\n .find('.draggable')\n .attr('style', '');\n }", "set clip(value) {}", "constructor() {\n super();\n this.offset = -10;\n this.fitToVisibleBounds = true;\n }", "culling(sg) {\n const aabb = sg.worldAABB;\n const center = aabb.centerPoint;\n const centerToCorner = aabb.lengthCenterToCorner;\n const right = this.clipping(this.right, center, centerToCorner);\n const left = this.clipping(this.left, center, centerToCorner);\n if (right === _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Invisible && left === _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Visible || right === _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Visible && left === _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Invisible) {\n return _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Invisible;\n }\n const zNear = this.clipping(this.zNear, center, centerToCorner);\n const zFar = this.clipping(this.zFar, center, centerToCorner);\n if (zNear === _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Invisible && zFar === _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Visible || zNear === _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Visible && zFar === _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Invisible) {\n return _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Invisible;\n }\n const top = this.clipping(this.top, center, centerToCorner);\n const bottom = this.clipping(this.bottom, center, centerToCorner);\n if (top === _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Invisible && bottom === _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Visible || top === _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Visible && bottom === _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Invisible) {\n return _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Invisible;\n }\n const sum = top.index + bottom.index + right.index + left.index + zNear.index + zFar.index;\n if (sum === 6) {\n return _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Visible;\n }\n return _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Neutral;\n }", "function overflowCorrection(el, pos, dim, margin) {\n var suffix = dim[0].toUpperCase() + dim.slice(1),\n length = el['offset' + suffix],\n viewportLength = window['inner' + suffix],\n\n maxLength = length - (2 * margin),\n isOverflow = [\n (pos < margin),\n (pos + length + margin > viewportLength)\n ];\n if (maxLength > viewportLength) {\n pos = margin;\n $(el).css(dim, maxLength + 'px');\n } else if (isOverflow[0]) {\n pos = margin;\n } else if (isOverflow[1]) {\n pos = viewportLength - margin - length;\n }\n return pos;\n }", "function $M7BJ$var$getClippingParents(element) {\n var clippingParents = $m3DJ$export$default($IVKl$export$default(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf($S6rb$export$default(element).position) >= 0;\n var clipperElement = canEscapeClipping && $wsKO$export$isHTMLElement(element) ? $CUhI$export$default(element) : element;\n\n if (!$wsKO$export$isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return $wsKO$export$isElement(clippingParent) && $x3Ja$export$default(clippingParent, clipperElement) && $B1zX$export$default(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "get originalClip() {}", "function isFlipped()\n {\n return this.scale.x == -1;\n }", "_restoreFromMinimization() {\n const that = this;\n\n that.minimized = false;\n that.style.width = that.style.height = that.style.top = that.style.left = '';\n\n //Re-arrange the rest of the minimized windows\n that._refreshMinimizedWindowsPosition();\n }", "function clamp(pos) {\n pos.top = Math.max(Math.min(pos.top, bounds.bottom - containerNode.offsetHeight), bounds.top);\n pos.left = Math.max(Math.min(pos.left, bounds.right - containerNode.offsetWidth), bounds.left);\n }", "function clamp(pos) {\n pos.top = Math.max(Math.min(pos.top, bounds.bottom - containerNode.offsetHeight), bounds.top);\n pos.left = Math.max(Math.min(pos.left, bounds.right - containerNode.offsetWidth), bounds.left);\n }", "function clamp(pos) {\n pos.top = Math.max(Math.min(pos.top, bounds.bottom - containerNode.offsetHeight), bounds.top);\n pos.left = Math.max(Math.min(pos.left, bounds.right - containerNode.offsetWidth), bounds.left);\n }", "function clamp(pos) {\n pos.top = Math.max(Math.min(pos.top, bounds.bottom - containerNode.offsetHeight), bounds.top);\n pos.left = Math.max(Math.min(pos.left, bounds.right - containerNode.offsetWidth), bounds.left);\n }", "function clamp(pos) {\n pos.top = Math.max(Math.min(pos.top, bounds.bottom - containerNode.offsetHeight), bounds.top);\n pos.left = Math.max(Math.min(pos.left, bounds.right - containerNode.offsetWidth), bounds.left);\n }", "function setUnfixed() {\n // Only unfix the target element and the spacer if we need to.\n if (!isUnfixed()) {\n lastOffsetLeft = -1;\n\n // Hide the spacer now that the target element will fill the\n // space.\n spacer.css('display', 'none');\n\n // Remove the style attributes that were added to the target.\n // This will reverse the target back to the its original style.\n target.css({\n 'z-index' : originalZIndex,\n 'width' : '',\n 'position' : originalPosition,\n 'left' : '',\n 'top' : originalOffsetTop,\n 'margin-left' : ''\n });\n\n target.removeClass('scroll-to-fixed-fixed');\n\n if (base.options.className) {\n target.removeClass(base.options.className);\n }\n\n position = null;\n }\n }", "function stopIndicesWithElidedDims(endMask, ellipsisInsertionIndex, numElidedAxes, originalEnd, inputShape) {\n const newIndices = [...inputShape];\n const elidedAxes = getElidedAxes(numElidedAxes, ellipsisInsertionIndex);\n for (let axis = 0; axis < newIndices.length; axis++) {\n if (elidedAxes.indexOf(axis) > -1) {\n newIndices[axis] = Number.MAX_SAFE_INTEGER;\n }\n else {\n const originalAxis = unnormalizeAxis(ellipsisInsertionIndex, numElidedAxes, axis);\n let originalValue = originalEnd[originalAxis];\n if (endMask & 1 << originalAxis) {\n originalValue = Number.MAX_SAFE_INTEGER;\n }\n newIndices[axis] = originalValue;\n }\n }\n for (let i = 0; i < newIndices.length; i++) {\n // Handle negative indices\n const axisSize = inputShape[i];\n if (newIndices[i] < 0) {\n newIndices[i] += axisSize;\n }\n newIndices[i] = _util__WEBPACK_IMPORTED_MODULE_0__[\"clamp\"](0, newIndices[i], inputShape[i]);\n }\n return newIndices;\n}", "setFrozen() {\n this.isFrozen = true;\n this.target.style.top = Math.abs(this.parentContainer.getBoundingClientRect().top - this.target.getBoundingClientRect().top) + 'px';\n this.target.classList.remove('fixit--bottom');\n this.target.classList.remove('fixit--active');\n this.target.classList.add('fixit--frozen');\n }", "function sizingInvisible($el, callback) {\n var targets;\n\n // We wish to target ourselves and any parents as long as\n // they are not visible\n targets = $el.parents();\n targets.push($el[0]);\n targets = targets.not(':visible');\n swap(targets, {\n visibility: \"hidden\",\n display: \"block\",\n position: \"absolute\"\n }, callback);\n }", "function CutHides() {\n var scissors = Orion.FindTypeEx('0x0F9F').shift();\n var hides = Orion.FindTypeEx('0x1079');\n UseItemOnTargets(scissors, hides);\n\n}", "function setUnfixed() {\r\n // Only unfix the target element and the spacer if we need to.\r\n if (!isUnfixed()) {\r\n lastOffsetLeft = -1;\r\n\r\n // Hide the spacer now that the target element will fill the\r\n // space.\r\n spacer.css('display', 'none');\r\n\r\n // Remove the style attributes that were added to the target.\r\n // This will reverse the target back to the its original style.\r\n target.css({\r\n 'z-index' : originalZIndex,\r\n 'width' : '',\r\n 'position' : originalPosition,\r\n 'left' : '',\r\n 'top' : originalOffsetTop,\r\n 'margin-left' : ''\r\n });\r\n\r\n target.removeClass('scroll-to-fixed-fixed');\r\n\r\n if (base.options.className) {\r\n target.removeClass(base.options.className);\r\n }\r\n\r\n position = null;\r\n }\r\n }", "function clamp(pos) {\n pos.top = Math.max(Math.min(pos.top, bounds.bottom - containerNode.offsetHeight), bounds.top);\n pos.left = Math.max(Math.min(pos.left, bounds.right - containerNode.offsetWidth), bounds.left);\n }", "hide(){\n this.image.x=this.offset;\n }", "function getClippingParents(element) {\n var clippingParents = listScrollParents(element);\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement);\n });\n } // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(element);\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement);\n });\n } // Gets the maximum area that the element is visible in due to any number of", "function reset(){\n animate = false;\n if ((cur === 0 || cur === n - beforeN)) {\n cur = beforeN;\n $(element).css({\"margin-left\": -cur * w});\n }\n o.endChange(log);\n }", "function ignoreExteriorBorders(a, b) { return a !== b }", "reset() {\n this.parts.forEach((part) => part.setVisible(false));\n this.visibleIndex = -1;\n }", "function defineOffset() {\n if(STATE.CURRENT_SLIDE > 1) {\n STATE.OFFSET = -STATE.RESIZE_OFFSET;\n } else {\n STATE.OFFSET = STATE.OFFSET;\n }\n }", "function checkOverflow(firstHidden, lastHidden) {\n const dotsEl = component.getAllByRole(\"separator\", { hidden: true });\n const isFirstHidden = Boolean(dotsEl[0].closest(\"[hidden]\"));\n const isLastHidden = Boolean(dotsEl[1].closest(\"[hidden]\"));\n expect(isFirstHidden).to.equal(\n firstHidden,\n `leading is ${firstHidden ? \"visible\" : \"hidden\"}`\n );\n expect(isLastHidden).to.equal(\n lastHidden,\n `end is ${lastHidden ? \"visible\" : \"hidden\"}`\n );\n }", "function ClippedView(parent, offset, limit) {\n var observableEntries = parent._observableEntries;\n this.__parent = parent;\n this.__values = ko.observable(lists.newArrayList());\n this.__observables = null;\n\n var idSelector = parent._idSelector;\n\n var unwrapArguments = () => ({offset: ko.unwrap(offset), limit: ko.unwrap(limit)});\n\n var privateRecomputeTrigger = ko.observable(unwrapArguments());\n this._forceUpdateIfNecessary = () => {\n var lastArguments = privateRecomputeTrigger();\n var newArguments = unwrapArguments();\n if (lastArguments.offset !== newArguments.offset || lastArguments.limit !== newArguments.limit)\n privateRecomputeTrigger(newArguments);\n };\n\n this.__computer = ko.computed(() => {\n // the delta isn't worth much to clipping, so we reuse the __computer\n parent._deltas();\n\n privateRecomputeTrigger();\n var args = unwrapArguments();\n privateRecomputeTrigger(args);\n\n var unclipped = parent._indexedValues;\n var from = Math.min(unclipped.length, args.offset);\n var to = Math.min(unclipped.length, from + args.limit);\n\n var oldValues = this.__values.peek();\n var newValues = unclipped.slice(from, to);\n\n if (checkForChanges(idSelector, oldValues, newValues)) {\n this.__values(newValues);\n\n if (this.__observables) {\n this.__observables(this.__values.peek().map(observableEntries.addReference));\n oldValues.forEach(observableEntries.releaseReference);\n }\n }\n });\n }", "function getClippingParents(element) {\n var clippingParents = (0,_listScrollParents_js__WEBPACK_IMPORTED_MODULE_7__.default)((0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_8__.default)(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf((0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_9__.default)(element).position) >= 0;\n var clipperElement = canEscapeClipping && (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isHTMLElement)(element) ? (0,_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_10__.default)(element) : element;\n\n if (!(0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clippingParent) && (0,_contains_js__WEBPACK_IMPORTED_MODULE_11__.default)(clippingParent, clipperElement) && (0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_12__.default)(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = (0,_listScrollParents_js__WEBPACK_IMPORTED_MODULE_7__.default)((0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_8__.default)(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf((0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_9__.default)(element).position) >= 0;\n var clipperElement = canEscapeClipping && (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isHTMLElement)(element) ? (0,_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_10__.default)(element) : element;\n\n if (!(0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clippingParent) && (0,_contains_js__WEBPACK_IMPORTED_MODULE_11__.default)(clippingParent, clipperElement) && (0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_12__.default)(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = (0,_listScrollParents_js__WEBPACK_IMPORTED_MODULE_7__.default)((0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_8__.default)(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf((0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_9__.default)(element).position) >= 0;\n var clipperElement = canEscapeClipping && (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isHTMLElement)(element) ? (0,_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_10__.default)(element) : element;\n\n if (!(0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clippingParent) && (0,_contains_js__WEBPACK_IMPORTED_MODULE_11__.default)(clippingParent, clipperElement) && (0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_12__.default)(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = (0,_listScrollParents_js__WEBPACK_IMPORTED_MODULE_7__.default)((0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_8__.default)(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf((0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_9__.default)(element).position) >= 0;\n var clipperElement = canEscapeClipping && (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isHTMLElement)(element) ? (0,_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_10__.default)(element) : element;\n\n if (!(0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clippingParent) && (0,_contains_js__WEBPACK_IMPORTED_MODULE_11__.default)(clippingParent, clipperElement) && (0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_12__.default)(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "freeze() {\r\n super.freeze();\r\n this.ghostAnchor.undrag();\r\n this.onManipulationEnd();\r\n }", "reset() {\r\n\t\tlet me = this;\r\n\t\tif (me.up > 50 && me.down >= me.up) {\r\n\t\t\tme.up = 0;\r\n\t\t\tme.down = 0;\r\n\t\t}\r\n\t}", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement) && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement) && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement) && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement) && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement) && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement) && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(element);\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement);\n });\n} // Gets the maximum area that the element is visible in due to any number of", "isHide() {\n return this.x < 0\n }", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n } // Gets the maximum area that the element is visible in due to any number of", "adjustIndex(index) {\n return index - this.hiddenIndices.filter(i => i < index).length;\n }", "_setInitialComponentDisplay() {\n const that = this;\n\n switch (that.scalePosition) {\n case 'near':\n that.$scaleNear.removeClass('jqx-hidden');\n that.$scaleFar.addClass('jqx-hidden');\n break;\n case 'far':\n that.$scaleNear.addClass('jqx-hidden');\n that.$scaleFar.removeClass('jqx-hidden');\n break;\n case 'both':\n that.$scaleFar.removeClass('jqx-hidden');\n that.$scaleNear.removeClass('jqx-hidden');\n break;\n case 'none':\n that.$scaleFar.addClass('jqx-hidden');\n that.$scaleNear.addClass('jqx-hidden');\n break;\n }\n that.$tooltip.addClass('jqx-hidden');\n\n if (that.ticksPosition === 'track') {\n that.$trackTicksContainer.removeClass('jqx-hidden');\n }\n }", "function animate_flag_without_saturation_overflow_area (direction){\n var index = '#filaIndiceDesb'+direction;\t \n $(index).html(\"<img src='js/css/tilde.gif' border='0' />\");\n $(index).effect(\"pulsate\",{times:3},500);\n}", "lower() {\n this.preview.style.zIndex = 0;\n }", "handleConstraints() {\n if (this.x < 0) {\n this.x = 0;\n }\n if (this.x > width - 1) {\n this.x = width - this.size;\n }\n if (this.y < 0) {\n this.y = 0;\n }\n if (this.y > height - 1) {\n this.y = height - this.size;\n }\n\n\n }", "flattenVisible() {\n EventBus.$emit(\"try-flatten-visible-layers\");\n }", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n } // Gets the maximum area that the element is visible in due to any number of", "_renderUnslidable() {\n let firstItemValue = this.get('firstItem').value;\n let lastItemValue = this.get('lastItem').value;\n if (firstItemValue > lastItemValue) {\n const tmp = lastItemValue;\n lastItemValue = firstItemValue;\n firstItemValue = tmp;\n }\n const minText = this._formatItemValue(firstItemValue);\n const maxText = this._formatItemValue(lastItemValue);\n let minRadius = firstItemValue < (MIN_SIZE) ? (MIN_SIZE) : firstItemValue;\n let maxRadius = lastItemValue > (MAX_SIZE) ? (MAX_SIZE) : lastItemValue;\n if (minRadius > maxRadius) {\n minRadius = MIN_SIZE;\n maxRadius = MAX_SIZE;\n }\n if (this.get('layout') === 'vertical') {\n this._addCircle(maxRadius, maxRadius, minRadius, minText, 2 * maxRadius); // min\n this._addCircle(maxRadius, maxRadius * 2 + CIRCLE_GAP + minRadius, maxRadius, maxText, 2 * maxRadius); // max\n } else {\n this._addCircle(maxRadius, maxRadius, minRadius, minText, 2 * maxRadius); // min\n this._addCircle(maxRadius * 2 + CIRCLE_GAP + minRadius, maxRadius, maxRadius, maxText, 2 * maxRadius); // max\n }\n }", "function SnapBack(el) {\n // Original absolute center position\n el.style.top = '50%';\n el.style.left = '50%';\n el.style.transform = 'translate(-50%, -50%)';\n el.style.transition = 'all 0.3s ease-in-out';\n}", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle_getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function emptySquares() {\r\n return origBoard.filter((elm, i) => i===elm);\r\n}", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(element);\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement);\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(element);\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement);\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "RemoveClip() {}", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle_getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle_getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle_getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "offscreen() {\n if (this.x < -this.width) {\n return true;\n }\n return false;\n }", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains$1(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "constructor(viewOf, qmin, qmax) {\n super(viewOf, (field, colLabel, colSchema, colData, df) =>\n _clipAnnoMatrix(field, colLabel, colSchema, colData, df, qmin, qmax)\n );\n this.isClipped = true;\n this.clipRange = [qmin, qmax];\n Object.seal(this);\n }", "function clip(x, min, max) {\n return Math.min(Math.max(x, min), max);\n}", "function blenderMoreHide (hide1, hide2){\n if (mouseOnHide2 == 1) {\n hide1.style.transform = \"scale(0)\";\n hide2.style.transform = \"translateY(-500px)\"\n }else {mouseOnHide2 = 0;}\n}", "_updateThumbPosition() {\n const that = this;\n\n if (that._supportCSSVariables || (that.inverted ? that.checked === true : that.checked === false) || !that._innerContainerSize) {\n that.$.innerContainer.style.left = that.$.innerContainer.style.top = '';\n return;\n }\n\n if (that.inverted ? that.checked === false : that.checked) {\n if (that.orientation === 'horizontal') {\n that.$.innerContainer.style.left = (-1 * (that._innerContainerSize - that.$.switchThumb.offsetWidth)) + 'px';\n that.$.innerContainer.style.top = '';\n }\n else {\n that.$.innerContainer.style.top = (-1 * (that._innerContainerSize - that.$.switchThumb.offsetHeight)) + 'px';\n that.$.innerContainer.style.left = '';\n }\n }\n\n if (that.checked === null) {\n if (that.orientation === 'horizontal') {\n that.$.innerContainer.style.left = (-1 * (that._innerContainerSize / 2 - that.$.switchThumb.offsetWidth / 2)) + 'px';\n that.$.innerContainer.style.top = '';\n }\n else {\n that.$.innerContainer.style.top = (-1 * (that._innerContainerSize / 2 - that.$.switchThumb.offsetHeight / 2)) + 'px';\n that.$.innerContainer.style.left = '';\n }\n }\n }", "clipTo (tree, alsoRemovecoplanarFront) {\n let node = this\n const stack = []\n do {\n if (node.polygontreenodes.length > 0) {\n tree.rootnode.clipPolygons(node.polygontreenodes, alsoRemovecoplanarFront)\n }\n if (node.front) stack.push(node.front)\n if (node.back) stack.push(node.back)\n node = stack.pop()\n } while (node !== undefined)\n }", "function sizingInvisible($el, callback) {\n\t\tvar targets;\n\n\t\t// We wish to target ourselves and any parents as long as\n\t\t// they are not visible\n\t\ttargets = $el.parents();\n\t\ttargets.push($el[0]);\n\t\ttargets = targets.not(':visible');\n\t\tswap(targets, {\n\t\t\tvisibility: \"hidden\",\n\t\t\tdisplay: \"block\",\n\t\t\tposition: \"absolute\"\n\t\t}, callback);\n\t}", "slide(row, dir) {\n\t\tlet nonzero = row.filter(val => val);\n\t\tnonzero = nonzero.concat(new Array(row.length - nonzero.length).fill(0));\n\t\treturn dir > 0 ? nonzero : nonzero.reverse();\n\t}", "restoreElement(element) {\n if (!element) return;\n // FIX: it has to remember the previous values\n element.style.zIndex = 0;\n element.style.position = 'static';\n }" ]
[ "0.53918445", "0.5333649", "0.52749443", "0.52349114", "0.5218984", "0.5191169", "0.517269", "0.51595616", "0.51427627", "0.5067348", "0.5044781", "0.5034173", "0.5027323", "0.50227445", "0.5005332", "0.4976861", "0.49688527", "0.4966697", "0.49623466", "0.49615896", "0.49284172", "0.49234512", "0.49196723", "0.4891242", "0.4889431", "0.48865548", "0.48642477", "0.4855534", "0.48514825", "0.48430598", "0.48391017", "0.4829905", "0.4829905", "0.4829905", "0.4829905", "0.4829905", "0.48298734", "0.48245648", "0.48198614", "0.4814673", "0.48104966", "0.48095468", "0.48053437", "0.47878584", "0.47709256", "0.47709256", "0.4757261", "0.47512054", "0.4750002", "0.47418672", "0.4737606", "0.47311875", "0.47158575", "0.47158575", "0.47158575", "0.47158575", "0.47070107", "0.47052988", "0.47044823", "0.47044823", "0.47044823", "0.4702747", "0.4702747", "0.4702747", "0.47007844", "0.4691661", "0.46893084", "0.46823862", "0.46821928", "0.4677497", "0.4661674", "0.46610802", "0.46606967", "0.46599954", "0.46599615", "0.46589753", "0.46579492", "0.46514603", "0.46514603", "0.46514603", "0.46514603", "0.463872", "0.46362302", "0.46350354", "0.46350354", "0.4634298", "0.46327505", "0.46317226", "0.46317226", "0.46317226", "0.46302056", "0.46283016", "0.46281987", "0.46258378", "0.46256658", "0.46248648", "0.46236008", "0.4613235", "0.46128452", "0.46085227" ]
0.5042726
11
Composite means it takes into account transforms as well as layout.
function getCompositeRect(elementOrVirtualElement,offsetParent,isFixed){if(isFixed===void 0){isFixed=false;}var documentElement=getDocumentElement(offsetParent);var rect=getBoundingClientRect(elementOrVirtualElement);var isOffsetParentAnElement=isHTMLElement(offsetParent);var scroll={scrollLeft:0,scrollTop:0};var offsets={x:0,y:0};if(isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed){if(getNodeName(offsetParent)!=='body'||// https://github.com/popperjs/popper-core/issues/1078 isScrollParent(documentElement)){scroll=getNodeScroll(offsetParent);}if(isHTMLElement(offsetParent)){offsets=getBoundingClientRect(offsetParent);offsets.x+=offsetParent.clientLeft;offsets.y+=offsetParent.clientTop;}else if(documentElement){offsets.x=getWindowScrollBarX(documentElement);}}return {x:rect.left+scroll.scrollLeft-offsets.x,y:rect.top+scroll.scrollTop-offsets.y,width:rect.width,height:rect.height};}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function composite(src, ops) {\n console.log('composite operations');\n console.log(ops);\n\n var mat = Matrix3x3.identity();\n for(var i=0;i<ops.length;i++) {\n var m = Matrix3x3.identity();\n var params = ops[i];\n switch( params[0] ) {\n case 'r': {\n var deg = parseFloat(params[1]);\n mat = mat.mul(Matrix3x3.rotation(deg));\n break;\n }\n case 'p': {\n var px = parseFloat(params[1]);\n var py = parseFloat(params[2]);\n mat = mat.mul(Matrix3x3.perspective(px, py));\n break;\n }\n case 's': {\n var sx = parseFloat(params[1]);\n var sy = parseFloat(params[2]);\n mat = mat.mul(Matrix3x3.scale(sx, sy));\n break;\n }\n case 't': {\n var tx = parseFloat(params[1]);\n var ty = parseFloat(params[2]);\n mat = mat.mul(Matrix3x3.translate(tx, ty));\n break;\n }\n case 'sh': {\n var shx = parseFloat(params[1]);\n var shy = parseFloat(params[2]);\n mat = mat.mul(Matrix3x3.shear(shx, shy));\n break;\n }\n default: {\n console.log('operation ' + params[0] + ' is not supported in composite mode!');\n }\n }\n }\n\n return affine(src, mat);\n }", "function CompositePattern()\r\n{\r\n\t//WARNING! do not add anything here, it will never be called\r\n}", "function CompositePattern()\r\n{\r\n\t//WARNING! do not add anything here, it will never be called\r\n}", "function Composite(children) {\n this._children = children || [];\n}", "composite(image, x, y) {\n if (image instanceof JimpImage) {\n let img = image;\n this.image.composite(img.image, x, y);\n }\n else {\n throw new Error('image is not an instance of JimpImage');\n }\n }", "function Composite({ k, ast, cursor, setPos, ...other }) {\n return !Array.isArray(ast) ? (\n <CompositeObj k={k} obj={ast} cursor={cursor} setPos={setPos} {...other} />\n ) : (\n <CompositeArr k={k} arr={ast} cursor={cursor} setPos={setPos} />\n );\n}", "function NeactCompositeComponent(element) {\n this.key = element.key;\n this.type = element.type;\n this.props = element.props;\n this._currentElement = element;\n this._context = null;\n var instance = this._getInstance();\n this._instance = instance;\n //this.elm = instance;\n //this.dom = instance;\n //Component.call(this, element);\n //this.elm = null;\n this.dom = null;\n this._instance._instanceCompositeComponent = this;\n}", "recompositeCanvases() {\n const mainctx = this.mainCanvas.getContext('2d');\n\n for (let i = 0; i < this.canvas.length; i++) {\n const tempctx = this.canvas[i].temp.getContext('2d');\n const drawctxNext = this.canvas[i + 1] !== undefined ? this.canvas[i + 1].draw.getContext('2d') : null;\n\n if (drawctxNext !== null) {\n // Clear [i + 1].draw\n this.canvas[i + 1].draw.width = this.canvas[i + 1].draw.width;\n\n // Stamp [i].temp to [i + 1].draw\n drawctxNext.globalCompositeOperation = 'source-over';\n drawctxNext.drawImage(this.canvas[i].temp, 0, 0);\n }\n\n // Stamp [i].draw to [i].temp\n tempctx.globalCompositeOperation = 'source-over';\n tempctx.drawImage(this.canvas[i].draw, 0, 0);\n\n if (drawctxNext !== null) {\n // Stamp [i].draw to [i + 1].draw (destination-in)\n drawctxNext.globalCompositeOperation = 'destination-in';\n drawctxNext.drawImage(this.canvas[i].draw, 0, 0);\n }\n\n // The image\n const img = this.images[i].img;\n\n // Calculate ratio to scale image to canvas\n let widthRatio, heightRatio, ratio = 1;\n\n if (img.width > this.mainCanvas.width || img.height > this.mainCanvas.height) {\n widthRatio = this.mainCanvas.width / img.width;\n heightRatio = this.mainCanvas.height / img.height;\n ratio = Math.min(widthRatio, heightRatio);\n }\n\n // Calculate centered image position\n const centerX = ( this.mainCanvas.width - img.width * ratio ) / 2;\n const centerY = ( this.mainCanvas.height - img.height * ratio ) / 2;\n\n // Stamp image[i] to [i].temp (source-atop)\n tempctx.globalCompositeOperation = 'source-atop';\n tempctx.drawImage(img, 0, 0, img.width, img.height, centerX, centerY, img.width * ratio, img.height * ratio);\n\n // Stamp [i].temp to mainCanvas\n mainctx.drawImage(this.canvas[i].temp, 0, 0);\n }\n\n }", "compose(o) {\n if (o.origin) {\n o.originX = o.origin[0];\n o.originY = o.origin[1];\n } // Get the parameters\n\n\n var ox = o.originX || 0;\n var oy = o.originY || 0;\n var sx = o.scaleX || 1;\n var sy = o.scaleY || 1;\n var lam = o.shear || 0;\n var theta = o.rotate || 0;\n var tx = o.translateX || 0;\n var ty = o.translateY || 0; // Apply the standard matrix\n\n var result = new Matrix_Matrix().translateO(-ox, -oy).scaleO(sx, sy).shearO(lam).rotateO(theta).translateO(tx, ty).lmultiplyO(this).translateO(ox, oy);\n return result;\n }", "function PdfCompositeField(font,brush,text){var list=[];for(var _i=3;_i<arguments.length;_i++){list[_i-3]=arguments[_i];}var _this=_super.call(this)||this;// Fields\n/**\n * Stores the array of automatic fields.\n * @private\n */_this.internalAutomaticFields=null;/**\n * Stores the text value of the field.\n * @private\n */_this.internalText='';_this.font=font;_this.brush=brush;_this.text=text;_this.automaticFields=list;return _this;}", "function CompositeObj({ k, obj, cursor, setPos, ...other }) {\n const { hideEmpty, hideTypes, hideLocation, sortTree } = useContext(\n SettingsContext\n );\n // setPos is memoized so dependency is just to placate warnings.\n const content = useMemo(() => {\n // Memoization should be helpful when parts of the tree are the same.\n let subTree = Object.entries(obj).map(([i, v], index) => {\n // i, v are key and value.\n if ((hideTypes && i === \"type\") || (hideLocation && i === \"loc\")) {\n return [v, null];\n }\n return [\n v,\n <Fragment key={index}>\n {typeof v === \"object\" && v !== null ? (\n <Composite k={i} ast={v} cursor={cursor} setPos={setPos} />\n ) : (\n <Primitive k={i} val={v} />\n )}\n </Fragment>,\n ];\n });\n subTree = sortTree\n ? subTree.sort((former, latter) => {\n return sortByCompositeness(former[0], latter[0]);\n })\n : subTree;\n return subTree.map(v => v[1]);\n }, [obj, cursor, setPos, hideTypes, hideLocation, sortTree]);\n\n const { type, loc, value, name } = obj;\n const label = type ? type : k;\n const keys = Object.keys(obj);\n const { toggled } = other;\n const defaultActiveIndex = toggled ?? (label === \"Program\" ? 0 : null);\n const [active, setActive] = useState(!!defaultActiveIndex);\n const highlight = useMemo(() => {\n return (\n (value !== undefined || name !== undefined || !active) &&\n isBound(cursor, loc)\n );\n }, [active, cursor, loc, value, name]);\n\n const popup = lookUpNodeType(type);\n const title = `${label} : ${active ? \"\" : `{ ${keys.join(\", \")} }`}`;\n const panels = [\n {\n key: 0,\n title: (\n <StyledAccordionTitle\n highlight={highlight ? 1 : 0}\n content={\n popup.length ? (\n <Popup\n content={<UglyPopup def={popup} />}\n on=\"hover\"\n trigger={<span>{title}</span>}\n />\n ) : (\n title\n )\n }\n />\n ),\n content,\n },\n ];\n\n const props = {\n onTitleClick: () => {\n loc && setPos(fixLoc(loc));\n setActive(active => !active);\n },\n panels,\n defaultActiveIndex,\n };\n\n return keys.length ? (\n <Accordion.Accordion {...props} />\n ) : hideEmpty ? null : (\n <Primitive k={label} val=\"{ }\" />\n );\n}", "function CompositeFilter(operator, filters){\n this.operator = operator;\n this.filters = filters;\n\n this.getFilterType = function(){\n return 'compositeFilter';\n };\n\n this.getFilter = function(){\n return this;\n };\n\n }", "function isComposite(p){\n return p.expression().count() > 1;\n }", "function CompositeArr({ k, arr, cursor, setPos }) {\n const { hideEmpty } = useContext(SettingsContext);\n // setPos is memoized so dependency is just to placate warnings.\n const components = useMemo(() => {\n // Memoization should be helpful when parts of the tree are the same.\n return arr.map((value, index) => {\n return (\n <Fragment key={index}>\n {typeof value === \"object\" && value !== null ? (\n <Composite\n k={k}\n ast={value}\n cursor={cursor}\n setPos={setPos}\n toggled={arr.length === 1 ? 0 : null}\n />\n ) : (\n <Primitive k={k} ast={value} />\n )}\n </Fragment>\n );\n });\n }, [k, arr, cursor, setPos]);\n\n // Arrays are toggled by default as well as single elements within.\n const [active, setActive] = useState(true);\n const highlight = useMemo(() => {\n return !active && arr.some(x => x && isBound(cursor, x.loc));\n }, [active, arr, cursor]);\n const panels = [\n {\n key: 0,\n title: (\n <StyledAccordionTitle\n content={`${k} : ${active ? \"\" : `[ ${arr.length} element ]`}`}\n />\n ),\n content: components,\n },\n ];\n\n const props = {\n highlight: highlight ? 1 : 0,\n onTitleClick: () => {\n setActive(active => !active);\n },\n panels,\n defaultActiveIndex: 0,\n };\n\n return arr.length ? (\n <Accordion.Accordion {...props} />\n ) : hideEmpty ? null : (\n <Primitive k={k} val=\"[ ]\" />\n );\n}", "function CompositePropertyView(options) {\n this.initialize.apply(this, [options]);\n }", "function editOnCompositionStart(){this.setRenderGuard();this.setMode('composite');this.update(EditorState.set(this.props.editorState,{inCompositionMode:true}));}", "function editOnCompositionStart() {\n\t this.setRenderGuard();\n\t this.setMode('composite');\n\t this.update(EditorState.set(this.props.editorState, { inCompositionMode: true }));\n\t}", "process(\n painter,\n helper,\n input0 = null,\n input1 = null,\n input2 = null,\n input3 = null\n ) {\n this.compositeEffect.texture = input0\n this.compositeEffect.getLayerAt(1).texture = input1\n this.compositeEffect.getLayerAt(2).texture = input2\n this.compositeEffect.getLayerAt(3).texture = input3\n\n if (input1)\n input1.setupTextureCoordinates(this.vertexData, 0, 'texCoords1', true)\n if (input2)\n input2.setupTextureCoordinates(this.vertexData, 0, 'texCoords2', true)\n if (input3)\n input3.setupTextureCoordinates(this.vertexData, 0, 'texCoords3', true)\n\n return super.process(painter, helper, input0, input1, input2, input3)\n }", "function CompositeComponent(component) {\r\n this._currentElement = component;\r\n\r\n // returns instances of DomComponent or CompositeComponent\r\n\r\n this._compositeMount = instance => {\r\n let el = instance.render();\r\n\r\n if (typeof el.type === \"string\") {\r\n return new DomComponent(el);\r\n }\r\n\r\n return new CompositeComponent(el);\r\n };\r\n\r\n this.mount = container => {\r\n this._instance = new this._currentElement.type(this._currentElement.props);\r\n\r\n if (this._instance.componentWillMount) {\r\n this._instance.componentWillMount();\r\n }\r\n this.renderedElement = this._compositeMount(this._instance);\r\n\r\n React.Reconciler.mount(this.renderedElement, container);\r\n\r\n if (this._instance.componentDidMount) {\r\n this._instance.componentDidMount();\r\n }\r\n };\r\n\r\n this.update = newElement => {\r\n const nextProps = newElement.props;\r\n\r\n this._currentElement = newElement;\r\n\r\n if (this._instance.willComponentReceiveProps) {\r\n this._instance.willComponentReceiveProps(nextProps);\r\n }\r\n\r\n let shouldUpdate = true;\r\n\r\n if (this._instance.shouldComponentUpdate) {\r\n shouldUpdate = this._instance.shouldComponentUpdate(nextProps);\r\n }\r\n\r\n this._instance.props = nextProps;\r\n\r\n if (shouldUpdate) {\r\n let newRendredElement = this._instance.render();\r\n\r\n React.Reconciler.update(this.renderedElement, newRendredElement);\r\n }\r\n };\r\n}", "function Composition() {}", "function Composition() {}", "function Composition() {}", "function Composition() {}", "function exportCompositeCollection(){\r\n \r\n \r\n var defaultArgs = {\r\n 'exportPathRoot':null,\r\n 'outputName':null,\r\n 'studyArea':null, \r\n 'crs':null,\r\n 'transform':null,\r\n 'scale':null,\r\n 'collection':null,\r\n 'startYear':null,\r\n 'endYear':null,\r\n 'startJulian':null,\r\n 'endJulian':null,\r\n 'compositingMethod':null,\r\n 'timebuffer':null,\r\n 'exportBands':null,\r\n 'toaOrSR':null,\r\n 'weights':null,\r\n 'applyCloudScore':null, \r\n 'applyFmaskCloudMask':null,\r\n 'applyTDOM':null,\r\n 'applyFmaskCloudShadowMask':null,\r\n 'applyFmaskSnowMask':null,\r\n 'includeSLCOffL7':null,\r\n 'correctIllumination':null,\r\n 'nonDivideBands':['temp'],\r\n 'resampleMethod':'near',\r\n 'origin':'Landsat',\r\n 'applyCloudProbability':null\r\n };\r\n \r\n var args = prepArgumentsObject(arguments,defaultArgs);\r\n \r\n args.pyramidingPolicy = 'mean';\r\n \r\n args.collection = args.collection.select(args.exportBands);\r\n print('Export bands:',args.exportBands);\r\n print('Non divide bands:',args.nonDivideBands);\r\n //Take care of date wrapping\r\n args.dateWrapping = wrapDates(args.startJulian,args.endJulian);\r\n args.wrapOffset = args.dateWrapping[0];\r\n args.yearWithMajority = args.dateWrapping[1];\r\n \r\n //Clean up output name\r\n args.outputName = args.outputName.replace(/\\s+/g,'-');\r\n args.outputName = args.outputName.replace(/\\//g,'-');\r\n \r\n \r\n var years = ee.List.sequence(args.startYear+args.timebuffer,args.endYear-args.timebuffer).getInfo()\r\n .map(function(year){\r\n \r\n // Set up dates\r\n var startYearT = year-args.timebuffer;\r\n var endYearT = year+args.timebuffer+args.yearWithMajority;\r\n \r\n // Get yearly composite\r\n var composite = args.collection.filter(ee.Filter.calendarRange(year+args.yearWithMajority,year+args.yearWithMajority,'year'));\r\n composite = ee.Image(composite.first());\r\n \r\n \r\n \r\n // Reformat data for export\r\n var compositeBands = composite.bandNames();\r\n if(args.nonDivideBands !== null){\r\n var composite10k = composite.select(compositeBands.removeAll(args.nonDivideBands))\r\n .multiply(10000);\r\n composite = composite10k.addBands(composite.select(args.nonDivideBands))\r\n .select(compositeBands).int16();\r\n }\r\n else{\r\n composite = composite.multiply(10000).int16();\r\n }\r\n \r\n \r\n args.startYearComposite = startYearT;\r\n args.endYearComposite = endYearT;\r\n args.systemTimeStartYear = year+args.yearWithMajority;\r\n args.yearOriginal = year;\r\n args.yearUsed = args.systemTimeStartYear;\r\n args['system:time_start'] = ee.Date.fromYMD(args.systemTimeStartYear,6,1).millis();\r\n \r\n \r\n // Export the composite \r\n // Set up export name and path\r\n args.exportName = args.outputName + '_' + args.toaOrSR + '_' + args.compositingMethod + \r\n '_' + startYearT + '_' + endYearT+'_' + \r\n args.startJulian + '_' + args.endJulian ;\r\n \r\n args.exportPath = args.exportPathRoot + '/' + args.exportName;\r\n \r\n // Add metadata, cast to integer, and export composite\r\n composite = composite.set(args);\r\n \r\n // Display the Landsat composite\r\n Map.addLayer(composite, vizParamsTrue10k, args.yearUsed.toString() + ' True Color ' + \r\n args.toaOrSR, false);\r\n Map.addLayer(composite, vizParamsFalse10k, args.yearUsed.toString() + ' False Color ' + \r\n args.toaOrSR, false);\r\n \r\n \r\n print('Exporting:',composite);\r\n exportToAssetWrapper(composite,args.exportName,args.exportPath,args.pyramidingPolicy,\r\n args.studyArea,args.scale,args.crs,args.transform);\r\n });\r\n}", "function Ci(a,b,c){if(c){var d=document.createDocumentFragment(),e=!b.hasAttribute(\"viewBox\")&&c.getAttribute(\"viewBox\");e&&b.setAttribute(\"viewBox\",e);for(b=c.cloneNode(!0);b.childNodes.length;)d.appendChild(b.firstChild);a.appendChild(d)}}", "render(context, object, elapsedTime, clipping, player) {\n if (!this.image.complete) return;\n let center = player.center;\n // if (clipping.offset.y === 0) {\n // this.renderToOverlay(context, object, elapsedTime, clipping, center);\n // }\n\n if (clipping) {\n if (clipping.offset.y === 0) {\n this.renderToTempCanvas(context, object, elapsedTime, clipping, center);\n }\n clipping.offset.y = clipping.offset.y - (this.ul.y - object.position.y);\n\n // TRICKY: subtract 1 since clipping adds 1 to height by default to avoid artifacts on most other images\n let height = Math.min(clipping.dimensions.height, this.canvas.height - clipping.offset.y) - 1;\n // if (window.debug) {\n // context.lineWidth = 1;\n // context.strokeStyle = \"red\";\n // context.strokeRect(this.ul.x + clipping.offset.x, this.ul.y + clipping.offset.y, this.canvas.width, height);\n // }\n\n context.drawImage(this.canvas, clipping.offset.x, clipping.offset.y, this.canvas.width, height,\n this.ul.x + clipping.offset.x, this.ul.y + clipping.offset.y, this.canvas.width, height);\n } else {\n this.renderToTempCanvas(context, object, elapsedTime, clipping, center);\n context.drawImage(this.canvas, 0, 0, this.canvas.width, this.canvas.height,\n this.ul.x, this.ul.y, context.canvas.width, context.canvas.height);\n }\n }", "enterNewCompositeDefinition(ctx) {\n\t}", "function ClipBox(args){\n\tthis.element = null;\n\tthis.container = null;\n\tthis.angle = 90;\n\tthis.constrainParent = true;\n\tthis._determineInnerWidth = null;\n\tthis._determineInnerHeight = null;\n\tthis._determineOuterWidth = null;\n\tthis._determineOuterHeight = null;\n\tthis.outer = { 'width' : 0, 'height' : 0 };\n\tthis.inner = { 'width' : 0, 'height' : 0 };\n\tthis.working = new CoordinatesBox();\n\tvar isGood = this.init(args);\n\tif(isGood){\n\t\t$(this.element).css('visibility', 'visible');\n\t\treturn this;\n\t} else {\n\t\t(new IMDebugger()).pass(\"Unable to initialise ClipBox\");\n\t\treturn false; }}", "function draw(ctx, objeto, trans, composite){\n\n var img = new Image();\n img.src = objeto.rutaImagen;\n img.onload = function() {\n ctx.beginPath();\n ctx.globalCompositeOperation = composite;\n ctx.globalAlpha = trans;\n ctx.drawImage(img,objeto.x, objeto.y,objeto.w,objeto.h); //Deberia ser height y weight???\n };\n}", "_compute() {\n\n // build the css layer depending on the properties\n this._style = this._props.opacity !== defaults.opacity ? `opacity(${this._props.opacity}) ` : '';\n this._style += this._props.brightness !== defaults.brightness ? `brightness(${this._props.brightness}) ` : '';\n this._style += this._props.contrast !== defaults.contrast ? `contrast(${this._props.contrast}) ` : '';\n this._style += this._props.saturation !== defaults.saturation ? `saturate(${this._props.saturation}) ` : '';\n this._style += this._props.hue !== defaults.hue ? `hue-rotate(${this._props.hue}deg) ` : '';\n this._style += this._props.invert !== defaults.invert ? `invert(${this._props.invert}) ` : '';\n this._style += this._props.grayscale !== defaults.grayscale ? `grayscale(${this._props.grayscale}) ` : '';\n this._style += this._props.sepia !== defaults.sepia ? `sepia(${this._props.sepia}) ` : '';\n this._style += this._props.blur !== defaults.blur ? `blur(${this._props.blur}px) ` : '';\n this._style += this._props.url !== defaults.url ? `url(${this._props.url}) ` : '';\n\n // apply the css filter effects to the viewport\n this.viewport.style.filter = this._style;\n\n // build the blend layer depending on the properties\n if (Object.keys(this._props.blend).length !== 0) {\n\n // create the blending element\n if (typeof this._blend === 'undefined') {\n this._blend = document.createElement('div');\n\n // prepend the blending element to the viewport\n this.viewport.parentNode.insertBefore(this._blend, this.viewport);\n }\n\n // get the viewport bounds\n const bounds = this.viewport.getBoundingClientRect();\n\n // set the blending styles\n this._blend.style = `position:absolute;z-index:1;width:${bounds.width}px;height:${bounds.height}px;mix-blend-mode:${this._props.blend.mode};background:${this._props.blend.color};pointer-events:none;`;\n } else if (typeof this._blend !== 'undefined') {\n\n // remove the blend layer from the DOM if there is no blending applied\n this._blend.parentNode.removeChild(this._blend);\n delete this._blend;\n }\n }", "complicate() {\n this.offset = { x: 0, y: 0 }\n this.scale = { x: 1, y: 1 }\n return this\n }", "_updateTransform(parentTransform = new Matrix4()) {\n const computedTransform = parentTransform.clone().multiplyRight(this.transform);\n const didTransformChange = !computedTransform.equals(this.computedTransform);\n\n if (!didTransformChange) {\n return;\n }\n\n this.computedTransform = computedTransform;\n\n // Matrix4.clone(computedTransform, this.computedTransform);\n\n // Update the bounding volumes\n const header = this._header;\n\n const content = this._header.content;\n this._boundingVolume = createBoundingVolume(\n header.boundingVolume,\n this.computedTransform,\n this._boundingVolume\n );\n if (this._contentBoundingVolume) {\n this._contentBoundingVolume = createBoundingVolume(\n content.boundingVolume,\n this.computedTransform,\n this._contentBoundingVolume\n );\n }\n if (this._viewerRequestVolume) {\n this._viewerRequestVolume = createBoundingVolume(\n header.viewerRequestVolume,\n this.computedTransform,\n this._viewerRequestVolume\n );\n }\n }", "function Canvas(canvas, image, baseline, boundingBox) {\n var myCanvas = this;\n\n this.canvas = canvas;\n this.width = canvas.width;\n this.height = canvas.height;\n this.ctx = canvas.getContext('2d');\n\n this.image = image;\n\n this.baseline = baseline;\n this.boundingBox = boundingBox;\n\n this.dragging = false;\n\n this.scale = 1.0;\n\n this.panX = 0;\n this.panY = 0;\n\n this.selectedCC = [];\n\n this.dragoffx = 0;\n this.dragoffy = 0;\n\n this.image.img.onload = function(){\n myCanvas.image.w = this.width;\n myCanvas.image.h = this.height;\n\n\n myCanvas.image.initialx = myCanvas.width/2 - this.width/2;\n myCanvas.image.initialy = myCanvas.height/2 - this.height/2;\n\n myCanvas.image.x = myCanvas.image.initialx;\n myCanvas.image.y = myCanvas.image.initialy;\n\n\n if(this.width > this.height)\n myCanvas.scale = myCanvas.width /this.width;\n else\n myCanvas.scale = myCanvas.height /this.height;\n myCanvas.draw();\n }\n}", "function matrixMultiply() {\n \"use strict\";\n\n var i;\n var j;\n var k;\n\n newComposite = new Array(composite.length);\n\n for (i = 0; i < newComposite.length; i += 1) {\n newComposite[i] = new Array(newTransform[i].length);\n for (j = 0; j < composite.length; j += 1) {\n newComposite[i][j] = 0; // initialise to 0\n for (k = 0; k < newTransform.length; k += 1) {\n newComposite[i][j] += composite[i][k] * newTransform[k][j]; // multiply matrices together\n }\n }\n }\n composite = newComposite;\n}", "function renderRec(container) {\n\t\t\t\n\t\t\tif (container.visible === false || container.alpha === 0) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif (container.alpha < 1) {\n\t\t\t\tctx.save();\n\t\t\t\tctx.globalAlpha = container.alpha;\n\t\t\t}\n\t\t\t\n\t\t\tcontainer.children.forEach(child => {\n\t\t\t\t\n\t\t\t\t// (0) Check if visible.\n\t\t\t\tif (child.visible == false) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// (1) Draw child.\n\t\t\t\tctx.save();\n\t\t\t\t\n\t\t\t\tif (child.pos) {\n\t\t\t\t\tctx.translate(Math.round(child.pos.x), Math.round(child.pos.y));\n\t\t\t\t}\n\t\t\t\tif (child.rotation) {\n\t\t\t\t\tctx.translate(child.pivot.x, child.pivot.y);\n\t\t\t\t\tctx.rotate(child.rotation * Math.PI / 180);\n\t\t\t\t\tctx.translate(- child.pivot.x, - child.pivot.y);\n\t\t\t\t}\n\t\t\t\tif (child.scale) {\n\t\t\t\t\tctx.translate(child.pivot.x, child.pivot.y);\n\t\t\t\t\tctx.scale(child.scale.x, child.scale.y);\n\t\t\t\t\tctx.translate(- child.pivot.x, - child.pivot.y);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// TEXT.\n\t\t\t\tif (child.text) {\n\t\t\t\t\tconst {font, fill, align} = child.style;\n\t\t\t\t\tconst {strokeStyle, strokeWidth} = child.stroke;\n\t\t\t\t\tif (font) ctx.font = font;\n\t\t\t\t\tif (fill) ctx.fillStyle = fill;\n\t\t\t\t\tif (align) ctx.textAlign = align;\n\t\t\t\t\tctx.fillText(child.text, 0, 0);\n\t\t\t\t\tif (strokeWidth !== 0) {\n\t\t\t\t\t\tctx.strokeStyle = strokeStyle;\n\t\t\t\t\t\tctx.lineWidth = strokeWidth;\n\t\t\t\t\t\tctx.strokeText(child.text, 0, 0);\n\t\t\t\t\t\tctx.stroke();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// TEXTURE.\n\t\t\t\telse if (child.texture) {\n\t\t\t\t\tconst img = child.texture.img;\n\t\t\t\t\tif (child.tileW) {\n\t\t\t\t\t\tctx.drawImage(\n\t\t\t\t\t\t\timg,\n\t\t\t\t\t\t\tchild.frame.x*child.tileW, // Source x.\n\t\t\t\t\t\t\tchild.frame.y*child.tileH, // Source y.\n\t\t\t\t\t\t\tchild.tileW, child.tileH, // Width and height.\n\t\t\t\t\t\t\t0, 0, // Destination x and y.\n\t\t\t\t\t\t\tchild.tileW, child.tileH // Destination w and h.\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tctx.drawImage(img, 0, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// RECTANGLE.\n\t\t\t\telse if (child.fillRectangle) {\n\t\t\t\t\tconst {w, h} = child;\n\t\t\t\t\tctx.fillStyle = child.fillRectangle;\n\t\t\t\t\tctx.fillRect(0, 0, w, h);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// (2) Apply renderRec if child has children.\n\t\t\t\tif (child.children) {\n\t\t\t\t\trenderRec(child);\n\t\t\t\t}\n\t\t\t\tctx.restore();\n\t\t\t\t\n\t\t\t});\n\t\t\t\n\t\t\tif (container.alpha < 1) {\n\t\t\t\tctx.restore();\n\t\t\t}\n\t\t\t\n\t\t}", "function Renderable() {\n\tthis.mPos = new Vec2(0, 0);\n\tthis.mSize = new Vec2(0, 0);\n\tthis.mOrigin = new Vec2(0, 0);\n\tthis.mAbsolute = false;\n\t\n\tthis.mDepth = 0;\n\t\n\tthis.mTransformation = new Matrix3();\n\tthis.mScale = new Vec2(1.0, 1.0);\n\tthis.mRotation = 0;\n\tthis.mSkew = new Vec2();\n\tthis.mAlpha = 1.0;\n\tthis.mCompositeOp = \"source-over\";\n\t\n\tthis.mLocalBoundingBox = new Polygon(); // the local bounding box is in object coordinates (no transformations applied)\n\tthis.mGlobalBoundingBox = new Polygon(); // the global bounding box is in world coordinates (transformations applied)\n\t\n\tthis.mLocalMask = new Polygon();\n\tthis.mGlobalMask = new Polygon();\n}", "render() {\n return <ComposedComponent {...this.props}/>\n }", "function composeAll() {\n for (var _len = arguments.length, composers = Array(_len), _key = 0; _key < _len; _key++) {\n composers[_key] = arguments[_key];\n }\n\n return function (BaseComponent) {\n if ((0, _.getDisableMode)()) {\n return _common_components.DummyComponent;\n }\n\n if (BaseComponent === null || BaseComponent === undefined) {\n throw new Error('Curry function of composeAll needs an input.');\n }\n\n var FinalComponent = BaseComponent;\n composers.forEach(function (composer) {\n if (typeof composer !== 'function') {\n throw new Error('Composer should be a function.');\n }\n\n FinalComponent = composer(FinalComponent);\n\n if (FinalComponent === null || FinalComponent === undefined) {\n throw new Error('Composer function should return a value.');\n }\n });\n\n FinalComponent.__OriginalBaseComponent = BaseComponent.__OriginalBaseComponent || BaseComponent;\n\n var stubbingMode = (0, _.getStubbingMode)();\n\n if (!stubbingMode) {\n return FinalComponent;\n }\n\n // return the stubbing mode.\n var ResultContainer = function ResultContainer(props) {\n // If there's an stub use it.\n if (ResultContainer.__composerStub) {\n var data = ResultContainer.__composerStub(props);\n var finalProps = (0, _extends3.default)({}, props, data);\n\n return _react2.default.createElement(FinalComponent.__OriginalBaseComponent, finalProps);\n }\n\n // if there's no stub, just use the FinalComponent.\n var displayName = FinalComponent.displayName || FinalComponent.name;\n return _react2.default.createElement(\n 'span',\n null,\n '<' + displayName + ' />'\n );\n };\n\n (0, _utils.inheritStatics)(ResultContainer, FinalComponent);\n\n return ResultContainer;\n };\n}", "Blend() {}", "function Compound(){}", "processSurface(v,j) {\n\n let c = v.position;\n let vtemp, vtemp1;\n // console.log(c);\n // c = new THREE.Vector3(0,0,0);\n // geometry changes\n vtemp = v.children[0].geometry.clone();\n // vtemp = vtemp.applyMatrix( new THREE.Matrix4().makeRotationY(Math.PI/2) );\n vtemp = vtemp.applyMatrix( new THREE.Matrix4().makeTranslation(c.x, c.y, c.z ));\n // let vtemp = v.children[0].geometry;\n vtemp1 = v.children[1].geometry;\n // vtemp1 = vtemp1.applyMatrix( new THREE.Matrix4().makeRotationY(Math.PI/2) );\n vtemp1 = vtemp1.clone().applyMatrix( new THREE.Matrix4().makeTranslation(c.x, c.y, c.z ));\n // debug\n // let mesh = new THREE.Mesh(vtemp1, new THREE.MeshBasicMaterial( {color:0xff0000,side: THREE.DoubleSide, wireframe: true}));\n // v.children[0].material = new THREE.MeshBasicMaterial( {wireframe:true,color:0xff0000,side: THREE.DoubleSide});\n // v.children[1].material = new THREE.MeshBasicMaterial( {wireframe:true,color:0x00ff00,side: THREE.DoubleSide});\n // console.log({v});\n // let test = v.clone();\n // let nn = v.children[1].clone();\n // nn.geometry = v.children[1].geometry.clone();\n // nn.material = new THREE.MeshBasicMaterial( {color:0x00ff00,side: THREE.DoubleSide, wireframe: true});\n // nn.position.copy(v.position);\n \n // nn.rotation.copy(v.rotation);\n // nn.rotateX(Math.PI);\n // nn.geometry.applyMatrix( new THREE.Matrix4().makeRotationX(Math.PI) );\n\n // console.log(v.rotation,'rot');\n // nn.position.copy(v.position);\n // nn.geometry.applyMatrix( new THREE.Matrix4().makeTranslation(v.position.x, v.position.y, v.position.z ) );\n\n // nn.geometry.applyMatrix( new THREE.Matrix4().makeTranslation(-v.position.x, -v.position.y, -v.position.z ) );\n // nn.geometry.applyMatrix( new THREE.Matrix4().makeRotationX(Math.PI) );\n // nn.geometry.applyMatrix( new THREE.Matrix4().makeTranslation(v.position.x, v.position.y, v.position.z ) );\n\n // console.log({v},{nn},{test});\n // this.scene.add(test);\n // if(j===1) {\n // this.scene.add(test);\n // this.scene.add(nn);\n // this.scene.add( new THREE.AxesHelper( 20 ) );\n // }\n \n // \n // console.log({nn});\n \n\n\n let len = v.children[0].geometry.attributes.position.array.length/3;\n let len1 = v.children[1].geometry.attributes.position.array.length/3;\n // console.log(len,len1);\n // fragment id\n let offset = new Array(len).fill(j/100);\n vtemp.addAttribute( 'offset', new THREE.BufferAttribute( new Float32Array(offset), 1 ) );\n\n let offset1 = new Array(len1).fill(j/100);\n vtemp1.addAttribute( 'offset', new THREE.BufferAttribute( new Float32Array(offset1), 1 ) );\n\n // axis\n let axis = getRandomAxis();\n let axes = new Array(len*3).fill(0);\n let axes1 = new Array(len1*3).fill(0);\n for (let i = 0; i < len*3; i=i+3) {\n axes[i] = axis.x;\n axes[i+1] = axis.y;\n axes[i+2] = axis.z;\n }\n vtemp.addAttribute( 'axis', new THREE.BufferAttribute( new Float32Array(axes), 3 ) );\n // volume axes\n for (let i = 0; i < len1*3; i=i+3) {\n axes1[i] = axis.x;\n axes1[i+1] = axis.y;\n axes1[i+2] = axis.z;\n }\n vtemp1.addAttribute( 'axis', new THREE.BufferAttribute( new Float32Array(axes1), 3 ) );\n\n\n // centroid\n let centroidVector = getCentroid(vtemp);\n let centroid = new Array(len*3).fill(0);\n let centroid1 = new Array(len1*3).fill(0);\n for (let i = 0; i < len*3; i=i+3) {\n centroid[i] = centroidVector.x;\n centroid[i+1] = centroidVector.y;\n centroid[i+2] = centroidVector.z;\n }\n for (let i = 0; i < len1*3; i=i+3) {\n centroid1[i] = centroidVector.x;\n centroid1[i+1] = centroidVector.y;\n centroid1[i+2] = centroidVector.z;\n }\n vtemp.addAttribute( 'centroid', new THREE.BufferAttribute( new Float32Array(centroid), 3 ) );\n vtemp1.addAttribute( 'centroid', new THREE.BufferAttribute( new Float32Array(centroid1), 3 ) );\n \n\n return {surface: vtemp, volume: vtemp1};\n }", "rotateRender() { \n push();\n imageMode(CENTER);\n translate(this.x + this.width / 2, this.y + this.height / 2);\n angleMode(DEGREES);\n rotate(this.angle);\n image(this.images[this.index], 0, 0, this.width, this.height);\n pop();\n }", "isBlendPartially() {\n if (this.__transparentPrimitives.length > 0 && this.__opaquePrimitives.length > 0) {\n return true;\n }\n else {\n return false;\n }\n }", "render() {\n return <ComposedComponent {...this.props} />\n }", "updateImage_() {\n const {width: frameW, height: frameH} = this.frameSize_;\n const {width: rawImageW, height: rawImageH} = this.imageOriginalSize_;\n const style = this.image_.attributeStyleMap;\n\n let rotatedW = rawImageW;\n let rotatedH = rawImageH;\n if (ROTATIONS[this.rotation_] === Rotation.ANGLE_90 ||\n ROTATIONS[this.rotation_] === Rotation.ANGLE_270) {\n [rotatedW, rotatedH] = [rotatedH, rotatedW];\n }\n const scale = Math.min(1, frameW / rotatedW, frameH / rotatedH);\n const newImageW = scale * rawImageW;\n const newImageH = scale * rawImageH;\n style.set('width', CSS.px(newImageW));\n style.set('height', CSS.px(newImageH));\n this.cropAreaContainer_.setAttribute(\n 'viewBox', `0 0 ${newImageW} ${newImageH}`);\n\n // Update corner space.\n if (this.cornerSpaceSize_ === null) {\n this.initialCorners_.forEach(({x, y}, idx) => {\n this.corners_[idx].pt = new Point(x * newImageW, y * newImageH);\n });\n this.initialCorners_ = null;\n } else {\n const oldImageW = this.cornerSpaceSize_?.width || newImageW;\n const oldImageH = this.cornerSpaceSize_?.height || newImageH;\n this.corners_.forEach((corn) => {\n corn.pt = new Point(\n corn.pt.x / oldImageW * newImageW,\n corn.pt.y / oldImageH * newImageH);\n });\n }\n this.cornerSpaceSize_ = new Size(newImageW, newImageH);\n\n const originX =\n frameW / 2 + rotatedW * scale / 2 * [-1, 1, 1, -1][this.rotation_];\n const originY =\n frameH / 2 + rotatedH * scale / 2 * [-1, -1, 1, 1][this.rotation_];\n style.set('left', CSS.px(originX));\n style.set('top', CSS.px(originY));\n\n const deg = ROTATIONS[this.rotation_];\n style.set(\n 'transform', new CSSTransformValue([new CSSRotate(CSS.deg(deg))]));\n\n this.updateCornerEl_();\n }", "function copyObj2() {\n\n\t\t\tvar obj = canvas.getActiveObject();\n\t\t\tif (!obj) return;\n\t\t\tif (fabric.util.getKlass(obj.type).async) {\n\t\t\t\tobj.clone(function (clone) {\n\t\t\t\tclone.set({left: 100, top: 100});\n\t\t\t\tcanvas.add(clone);\n\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcanvas.add(obj.clone().set({left: 100, top: 100}));\n\t\t\t\t}\n\t\t\tcanvas.discardActiveObject();\n\t\t\tcanvas.renderAll();\t\n\n\t\t}", "function CompositeConstraint(cids) {\n // Mapping from composite-method id to ids of primitive methods that compose it\n this.compmids = {};\n this.cids = cids;\n this.id = newCompositeConstraintId(this.cids);\n }", "decompose() {\n let cx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n let cy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Get the parameters from the matrix\n var a = this.a;\n var b = this.b;\n var c = this.c;\n var d = this.d;\n var e = this.e;\n var f = this.f; // Figure out if the winding direction is clockwise or counterclockwise\n\n var determinant = a * d - b * c;\n var ccw = determinant > 0 ? 1 : -1; // Since we only shear in x, we can use the x basis to get the x scale\n // and the rotation of the resulting matrix\n\n var sx = ccw * Math.sqrt(a * a + b * b);\n var thetaRad = Math.atan2(ccw * b, ccw * a);\n var theta = 180 / Math.PI * thetaRad;\n var ct = Math.cos(thetaRad);\n var st = Math.sin(thetaRad); // We can then solve the y basis vector simultaneously to get the other\n // two affine parameters directly from these parameters\n\n var lam = (a * c + b * d) / determinant;\n var sy = c * sx / (lam * a - b) || d * sx / (lam * b + a); // Use the translations\n\n let tx = e - cx + cx * ct * sx + cy * (lam * ct * sx - st * sy);\n let ty = f - cy + cx * st * sx + cy * (lam * st * sx + ct * sy); // Construct the decomposition and return it\n\n return {\n // Return the affine parameters\n scaleX: sx,\n scaleY: sy,\n shear: lam,\n rotate: theta,\n translateX: tx,\n translateY: ty,\n originX: cx,\n originY: cy,\n // Return the matrix parameters\n a: this.a,\n b: this.b,\n c: this.c,\n d: this.d,\n e: this.e,\n f: this.f\n };\n }", "_updateTransform(parentTransform = new math_gl__WEBPACK_IMPORTED_MODULE_0__[\"Matrix4\"]()) {\n const computedTransform = parentTransform.clone().multiplyRight(this.transform);\n const didTransformChange = !computedTransform.equals(this.computedTransform);\n\n if (!didTransformChange) {\n return;\n }\n\n this.computedTransform = computedTransform;\n\n // Matrix4.clone(computedTransform, this.computedTransform);\n\n // Update the bounding volumes\n const header = this._header;\n\n const content = this._header.content;\n this._boundingVolume = Object(_helpers_bounding_volume__WEBPACK_IMPORTED_MODULE_7__[\"createBoundingVolume\"])(\n header.boundingVolume,\n this.computedTransform,\n this._boundingVolume\n );\n if (this._contentBoundingVolume) {\n this._contentBoundingVolume = Object(_helpers_bounding_volume__WEBPACK_IMPORTED_MODULE_7__[\"createBoundingVolume\"])(\n content.boundingVolume,\n this.computedTransform,\n this._contentBoundingVolume\n );\n }\n if (this._viewerRequestVolume) {\n this._viewerRequestVolume = Object(_helpers_bounding_volume__WEBPACK_IMPORTED_MODULE_7__[\"createBoundingVolume\"])(\n header.viewerRequestVolume,\n this.computedTransform,\n this._viewerRequestVolume\n );\n }\n }", "function getConstructor() {\n /**\n * Construct the component and return exposed functions and objects\n * @param {String} id that identifies instance of constructed component\n * @return {Object} THREE.js Group, Draw fn, id\n */\n function construct(id, debug) {\n\n const _debug = (debug === true);\n const selectedColor = '#ff0000';\n const unselectedColor = '#eeeeee';\n\n // Array of element names to update on each frame\n let toUpdate = [];\n let toUpdateTypes = ['video'];\n let drawPerType = {\n image: applyMaterialImage,\n text: applyMaterialText,\n video: applyMaterialVideo\n };\n let elements = {\n main: { \n name: 'main',\n position: new THREE.Vector3(0, 0, 1),\n type: 'drawable',\n object: createDrawable('main')\n },\n leftSide: { \n name: 'leftSide',\n position: new THREE.Vector3(-1, .5, 1.2),\n type: 'drawable',\n object: createDrawable('leftSide')\n },\n rightSide: { \n name: 'rightSide',\n position: new THREE.Vector3(.8, .8, -1),\n type: 'drawable',\n object: createDrawable('rightSide')\n },\n frame: {\n name: 'frame',\n position: new THREE.Vector3(0, 0, 0),\n type: 'helper',\n object: createFrame(elementOptions.frame, debug) \n }\n };\n\n let component = new THREE.Group();\n let elementNames = Object.keys(elements);\n\n component.name = 'componentGroup';\n\n elementNames.forEach(elementName => {\n let element = elements[elementName];\n\n component.add(element.object);\n element.object.position.copy(element.position);\n });\n // mainObject.position.set(0,0,opt.radius/opt.vCutOff);\n draw(sampleData);\n\n /**\n * Draw data point value onto drawable.\n * @param {Object} value: '', drawableId: String, draw_type: String\n * @return {void}\n */\n function draw(data) {\n if (data instanceof Array) {\n data.forEach(renderDrawable);\n } else renderDrawable(data);\n }\n\n function renderDrawable(data) {\n let element = elements[data.drawableId] || {};\n let object = element.object;\n let drawFn = drawPerType[data.type];\n\n if (\n data.drawableId && object && element.type === 'drawable' &&\n typeof(drawFn) === 'function'\n ) {\n drawFn(data, object);\n object.visible = true;\n\n if (~toUpdateTypes.indexOf(data.type) && !~toUpdate.indexOf(element.name)) {\n toUpdate.push(element.name);\n }\n }\n }\n\n function deactivate() {\n draw(sampleData);\n elements.leftSide.object.visible = false;\n }\n\n function highlight(inView) {\n if (_debug && elements.frame.object.material) {\n elements.frame.material.color.set(\n inView ? selectedColor : unselectedColor\n );\n }\n }\n\n /**\n * Update data on any element that is marked for keeping updated.\n * @param {Object} value: '', drawableId: String, draw_type: String\n * @return {void}\n */\n\n function update() {\n toUpdate.forEach(elementName => {\n let element = elements[elementName];\n\n if (\n element && element.object && element.object.userData && \n typeof(element.object.userData.update) === 'function'\n ) element.object.userData.update();\n });\n }\n\n return {\n draw,\n update,\n highlight,\n deactivate,\n component,\n id,\n frame: elements.frame.object,\n timeStamp: Date.now(),\n };\n }\n\n console.log('timeStamp:', Date.now());\n\n return construct;\n}", "function isCompositeType(type) {\n return isObjectType(type) || isInterfaceType(type) || isUnionType(type);\n}", "function isCompositeType(type) {\n return isObjectType(type) || isInterfaceType(type) || isUnionType(type);\n}", "function isCompositeType(type) {\n return isObjectType(type) || isInterfaceType(type) || isUnionType(type);\n}", "function isCompositeType(type) {\n return isObjectType(type) || isInterfaceType(type) || isUnionType(type);\n}", "function isCompositeType(type) {\n return isObjectType(type) || isInterfaceType(type) || isUnionType(type);\n}", "function isCompositeType(type) {\n return isObjectType(type) || isInterfaceType(type) || isUnionType(type);\n}", "function editOnCompositionStart(editor, e) {\n editor.setMode('composite');\n editor.update(EditorState.set(editor._latestEditorState, { inCompositionMode: true }));\n // Allow composition handler to interpret the compositionstart event\n editor._onCompositionStart(e);\n}", "function editOnCompositionStart(editor, e) {\n editor.setMode('composite');\n editor.update(EditorState.set(editor._latestEditorState, { inCompositionMode: true }));\n // Allow composition handler to interpret the compositionstart event\n editor._onCompositionStart(e);\n}", "function editOnCompositionStart(editor, e) {\n editor.setMode('composite');\n editor.update(EditorState.set(editor._latestEditorState, { inCompositionMode: true }));\n // Allow composition handler to interpret the compositionstart event\n editor._onCompositionStart(e);\n}", "function editOnCompositionStart(editor, e) {\n editor.setMode('composite');\n editor.update(EditorState.set(editor._latestEditorState, { inCompositionMode: true }));\n // Allow composition handler to interpret the compositionstart event\n editor._onCompositionStart(e);\n}", "function editOnCompositionStart(editor, e) {\n editor.setMode('composite');\n editor.update(EditorState.set(editor._latestEditorState, { inCompositionMode: true }));\n // Allow composition handler to interpret the compositionstart event\n editor._onCompositionStart(e);\n}", "function editOnCompositionStart(editor, e) {\n editor.setMode('composite');\n editor.update(EditorState.set(editor._latestEditorState, { inCompositionMode: true }));\n // Allow composition handler to interpret the compositionstart event\n editor._onCompositionStart(e);\n}", "function editOnCompositionStart(editor, e) {\n editor.setMode('composite');\n editor.update(EditorState.set(editor._latestEditorState, { inCompositionMode: true }));\n // Allow composition handler to interpret the compositionstart event\n editor._onCompositionStart(e);\n}", "function editOnCompositionStart(editor, e) {\n editor.setMode('composite');\n editor.update(EditorState.set(editor._latestEditorState, { inCompositionMode: true }));\n // Allow composition handler to interpret the compositionstart event\n editor._onCompositionStart(e);\n}", "function editOnCompositionStart(editor, e) {\n editor.setMode('composite');\n editor.update(EditorState.set(editor._latestEditorState, { inCompositionMode: true }));\n // Allow composition handler to interpret the compositionstart event\n editor._onCompositionStart(e);\n}", "function Transform()\n{\n TransformBase.call(this);\n\n /**\n * The coordinate of the object relative to the local coordinates of the parent.\n *\n * @member {PIXI.Point}\n */\n this.position = new math.Point(0,0);\n\n /**\n * The scale factor of the object.\n *\n * @member {PIXI.Point}\n */\n this.scale = new math.Point(1,1);\n\n /**\n * The skew amount, on the x and y axis.\n *\n * @member {PIXI.ObservablePoint}\n */\n this.skew = new math.ObservablePoint(this.updateSkew, this, 0,0);\n\n /**\n * The pivot point of the displayObject that it rotates around\n *\n * @member {PIXI.Point}\n */\n this.pivot = new math.Point(0,0);\n\n /**\n * The rotation value of the object, in radians\n *\n * @member {Number}\n * @private\n */\n this._rotation = 0;\n\n this._sr = Math.sin(0);\n this._cr = Math.cos(0);\n this._cy = Math.cos(0);//skewY);\n this._sy = Math.sin(0);//skewY);\n this._nsx = Math.sin(0);//skewX);\n this._cx = Math.cos(0);//skewX);\n}", "get compositeScoring () {\n\t\treturn this._compositeScoring;\n\t}", "updateCompositionElements(dontRecurse) {\n if (!this._isComposing) {\n return;\n }\n if (this._bufferService.buffer.isCursorInViewport) {\n const cellHeight = Math.ceil(this._charSizeService.height * this._optionsService.options.lineHeight);\n const cursorTop = this._bufferService.buffer.y * cellHeight;\n const cursorLeft = this._bufferService.buffer.x * this._charSizeService.width;\n this._compositionView.style.left = cursorLeft + 'px';\n this._compositionView.style.top = cursorTop + 'px';\n this._compositionView.style.height = cellHeight + 'px';\n this._compositionView.style.lineHeight = cellHeight + 'px';\n this._compositionView.style.fontFamily = this._optionsService.options.fontFamily;\n this._compositionView.style.fontSize = this._optionsService.options.fontSize + 'px';\n // Sync the textarea to the exact position of the composition view so the IME knows where the\n // text is.\n const compositionViewBounds = this._compositionView.getBoundingClientRect();\n this._textarea.style.left = cursorLeft + 'px';\n this._textarea.style.top = cursorTop + 'px';\n this._textarea.style.width = compositionViewBounds.width + 'px';\n this._textarea.style.height = compositionViewBounds.height + 'px';\n this._textarea.style.lineHeight = compositionViewBounds.height + 'px';\n }\n if (!dontRecurse) {\n setTimeout(() => this.updateCompositionElements(true), 0);\n }\n }", "function HFlowLayout() {\n this.base = new BaseObj(this);\n this.tpos = new Rect(0, 0, 0, 0);\n\n var children = [];\n\n this.clear = function () {\n children = [];\n this.base.removeAllChildren();\n }\n\n this.add = function (ui) {\n children.push(ui);\n this.base.addChild(ui);\n }\n\n this.insert = function (index, ui) {\n children.splice(index, 0, ui);\n this.base.addChild(ui);\n }\n\n this.resize = function (rect) {\n var height = rect.h;\n var widths = [];\n var totalWidth = 0;\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n var width = child.optimalWidth(height);\n totalWidth += width;\n widths.push(width);\n }\n\n // Make sure we can fit.\n if (totalWidth > rect.w) {\n for (var i = 0; i < widths.length; i++) {\n widths[i] *= rect.w / totalWidth;\n widths[i] = Math.max(Math.round(widths[i]), 1);\n }\n }\n\n var curX = rect.x;\n for (var i = 0; i < children.length; i++) {\n var width = widths[i];\n var childRect = new Rect(curX, rect.y, width, height);\n children[i].resize(childRect);\n curX += width;\n }\n }\n\n this.optimalWidth = function (height) {\n var totalWidth = 0;\n for (var i = 0; i < children.length; i++) {\n totalWidth += children[i].optimalWidth(height);\n }\n return totalWidth;\n }\n}", "updateTransform()\n {\n\n this._boundsID++;\n \n this.transform.updateTransform(this.parent.transform);\n // TODO: check render flags, how to process stuff here\n this.worldAlpha = this.alpha * this.parent.worldAlpha;\n \n for (let i = 0, j = this.children.length; i < j; ++i)\n {\n const child = this.children[i];\n\n if (child.visible)\n {\n \n child.updateTransform();\n \n\n \n }\n }\n\n if(this._filters){\n // this._filters.forEach(filter=>filter.worldTransform =this.transform.worldTransform)\n const bounds = this._bounds;\n const width = this.width || this.style.width || bounds.maxX - bounds.minX;\n const height = this.height || this.style.height || bounds.maxY - bounds.minY;\n /**\n * if check on cliip bug on scroll after setState from App.js scrollHeight !!!!!!\n */\n // if(this._clip){\n\n // console.log(this.transform.worldTransform.ty)\n this.filterArea = new PIXI.Rectangle(\n this.transform.worldTransform.tx,\n this.transform.worldTransform.ty,\n width,\n height\n )\n // / }\n \n }\n \n }", "function makeCompositeBlock(prim, spec, type, color, varprocname){\r\n\r\n\t// COLOR HACK\r\n\tif((prim == \"LOUDNESS\") ||\r\n\t (prim == \"CAMERAIMAGE\") ||\r\n\t (prim == \"CAMERAMOTION\") ||\r\n\t (prim == \"FLICKR\") ||\r\n\t (prim == \"prim_flickr\")){\r\n\t\tcolor = \"#A00000\";\r\n\t}\r\n\r\n\tvar block = $('<div class=\"block\"></div>');\r\n\tblock[0].prim = prim;\r\n\tblock[0].spec = spec;\r\n\tblock[0].type = type;\r\n\tblock[0].color = color;\r\n\tblock[0].fcn = window[prim];\r\n\tblock.attr('onSelectStart','return false');\r\n\tvar shape = $('<canvas onclick=\"void(0)\" class=\"shape\"></canvas>'); // for iPhone: onclick = \"void(0)\"\r\n\tblock.append(shape);\r\n\tshape.css('z-index', 0);\r\n\t\r\n\t// PARSE PROCEDURE\r\n\tif((block[0].prim == 'prim_procedure') || (block[0].prim == 'prim_proceduredef')){\r\n\t\tvar label = $('<div class=\"label\">'+varprocname+'</div>');\r\n\t\tlabel.attr('onSelectStart','return false'); //avoid text selection on browser other then Mozilla\r\n\t\tblock.append(label);\r\n\t\tblock[0].procname = varprocname;\r\n\t}else{\r\n\t// PARSE SPEC\r\n\t\tvar specArray = spec.split(\" \");\r\n\t\tfor(s in specArray){\r\n\t\t\tvar p = specArray[s];\r\n\t\t\tif((p.charAt(0) == '%') && (p.length != 1)){\r\n\t\t\t\t// ARGUMENT\r\n\t\t\t\tvar arg;\r\n\t\t\t\tif(p.charAt(1) == 'n'){\r\n\t\t\t\t\targ = $('<input class=\"arg\" value=\"10\" />');\r\n\t\t\t\t\targ[0].type = 'text';\r\n\t\t\t\t\targ[0].fcn = window['prim_number'];\r\n\t\t\t\t}\r\n\t\t\t\tif(p.charAt(1) == 'p'){\r\n\t\t\t\t\targ = $('<input class=\"arg\" value=\"10\" />');\r\n\t\t\t\t\targ[0].type = 'text';\r\n\t\t\t\t\targ[0].fcn = window['prim_number'];\r\n\t\t\t\t}\r\n\t\t\t\tif(p.charAt(1) == 's'){\r\n\t\t\t\t\targ = $('<input class=\"arg\" value=\"10\" />');\r\n\t\t\t\t\targ[0].type = 'text';\r\n\t\t\t\t\targ[0].fcn = window['prim_number'];\r\n\t\t\t\t}\r\n\t\t\t\tif(p.charAt(1) == 'b'){\r\n\t\t\t\t\targ = $('<div class=\"arg\"><canvas class=\"boolean\" /></div>');\r\n\t\t\t\t\targ.css('z-index', 1);\r\n\t\t\t\t\targ[0].type = 'text';\r\n\t\t\t\t\targ[0].fcn = window['prim_boolean'];\r\n\t\t\t\t}\r\n\t\t\t\tif(p.charAt(1) == 'f'){\r\n\t\t\t\t\targ = $('<input class=\"arg\" value=\"10\" />');\r\n\t\t\t\t\targ[0].type = 'text';\r\n\t\t\t\t\targ[0].fcn = window['prim_number'];\r\n\t\t\t\t}\r\n\t\t\t\tif((p.charAt(1) == 'v') && (spec == 'set %v to %n')){\r\n\t\t\t\t\tvar varLabel = $('<div class=\"arg\">v</div>');\r\n\t\t\t\t\tvarLabel.attr('onSelectStart','return false');\r\n\t\t\t\t\tblock.append(varLabel);\r\n\t\t\t\t\tblock[0].varname = varprocname;\r\n\t\t\t\t}\r\n\t\t\t\tif((p.charAt(1) == 'v') && (spec == 'change %v by %n')){\r\n\t\t\t\t\tvar varLabel = $('<div class=\"arg\">v</div>');\r\n\t\t\t\t\tvarLabel.attr('onSelectStart','return false');\r\n\t\t\t\t\tblock.append(varLabel);\r\n\t\t\t\t\tblock[0].varname = varprocname;\r\n\t\t\t\t}\r\n\t\t\t\tif((p.charAt(1) == 'v') && (spec == '%v')){\r\n\t\t\t\t\tvar varLabel = $('<div class=\"label\">'+varprocname+'</div>');\r\n\t\t\t\t\tvarLabel.attr('onSelectStart','return false');\r\n\t\t\t\t\tblock.append(varLabel);\r\n\t\t\t\t\tblock[0].varname = varprocname;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(arg != undefined){\r\n\t\t\t\t\tblock.append(arg);\r\n\t\t\t\t\targ.keydown(function() {\r\n\t\t\t\t\t\tlayoutArg($(this));\r\n\t\t\t\t\t\tlayoutStack($(this).parents('.stack'));\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}else if(p.charAt(0) == '@'){\r\n\t\t\t\t// ICON\r\n\t\t\t\tvar icon = getIcon(p.substring(1,p.length));\r\n\t\t\t\tif(icon!= null){\r\n\t\t\t\t\ticon.css('z-index', 5);\r\n\t\t\t\t\tblock.append(icon);\r\n\t\t\t\t\ticon.attr('onSelectStart','return false'); //avoid text selection on browser other then Mozilla\r\n\t\t\t\t\ticon.attr('onDragStart','return false'); //avoid image drag\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar label = $('<div class=\"label\">'+p+'</div>');\r\n\t\t\t\t\tlabel.attr('onSelectStart','return false'); //avoid text selection on browser other then Mozilla\r\n\t\t\t\t\tblock.append(label);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t// LABEL\r\n\t\t\t\tvar label = $('<div class=\"label\">'+p+'</div>');\r\n\t\t\t\tlabel.attr('onSelectStart','return false'); //avoid text selection on browser other then Mozilla\r\n\t\t\t\tblock.append(label);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn block;\r\n}", "clear()\n {\n this.context.setTransform(1, 0, 0, 1, 0, 0);\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }", "apply() {\n // Get the source image and create the result image buffer\n const source = new ImageDataPixelWrapper(this.source.getImageData(0, 0, 400, 300));\n const resultImageData = this.result.createImageData(400, 300)\n const result = new ImageDataPixelWrapper(resultImageData);\n\n // Update the alpha values of the newly created image\n result.map((pixel) => pixel.alpha = 255)\n\n if (this.operation) {\n if (this.operation.params) var params = this.getParams();\n this.operation.apply(source, result, params);\n }\n\n // Put the result image in the canvas\n this.result.putImageData(resultImageData, 0, 0);\n }", "function CompositeDisposable() {\n var disposable, _i, _len;\n this.disposables = [];\n for (_i = 0, _len = arguments.length; _i < _len; _i++) {\n disposable = arguments[_i];\n this.add(disposable);\n }\n }", "render() {\n let finalVisual;\n var cont = this.getContentById();\n\n switch (this.props.onlyContent){\n case \"true\" : \n finalVisual = (<VisualonlyContent cont = {cont}/> );\n break;\n\n case \"false\" : \n finalVisual = (<Visualfull cont={cont} drag = {this.drag} />);\n break;\n }\n return (\n <div className =\"contentPanel\" >\n {finalVisual}\n </div>\n );\n }", "function Transformable(x, y, width, height){\n\t\tContainable.call(this);\n\n\t\tthis.set({\n\t\t\tx: x,\n\t\t\ty: y,\n\t\t\twidth: width,\n\t\t\theight: height,\n\t\t\ttransform: {\n\t\t\t\torigin: {x: 0, y: 0},\n\t\t\t\tproperties: {\n\t\t\t\t\trotate: 0,\n\t\t\t\t\ttranslate: {dx: 0, dy: 0},\n\t\t\t\t\tscale: {x: 1, y: 1}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "function confineInContainer(position, width, height, api) {\n\t var viewWidth = api.getWidth();\n\t var viewHeight = api.getHeight();\n\t position[0] = Math.min(position[0] + width, viewWidth) - width;\n\t position[1] = Math.min(position[1] + height, viewHeight) - height;\n\t position[0] = Math.max(position[0], 0);\n\t position[1] = Math.max(position[1], 0);\n\t}", "function constructCanvas(){\n\t\t\tcanvasWidth = target.getWidth();\n\t\t\tcanvasHeight = target.getHeight();\n\t\t\ttarget.innerHTML = '';\n\t\t\t\n\t\t\t/**\n\t\t\t * For positioning labels and overlay.\n\t\t\t */\n\t\t\ttarget.setStyle({'position': 'relative'});\n\t\t\t\n\t\t\tif(canvasWidth <= 0 || canvasHeight <= 0){\n\t\t\t\tthrow 'Invalid dimensions for plot, width = ' + canvasWidth + ', height = ' + canvasHeight;\n\t\t\t}\n\t\n\t\t\t/**\n\t\t\t * Insert main canvas.\n\t\t\t */\n\t\t\tcanvas = $(document.createElement('canvas')).writeAttribute({\n\t\t\t\t'width': canvasWidth,\n\t\t\t\t'height': canvasHeight\t\n\t\t\t});\n\t\t\ttarget.appendChild(canvas);\n\t\t\tif(Prototype.Browser.IE){\n\t\t\t\tcanvas = $(window.G_vmlCanvasManager.initElement(canvas));\n\t\t\t} \n\t\t\tctx = canvas.getContext('2d');\n\t\n\t\t\t/**\n\t\t\t * Insert overlay canvas for interactive features.\n\t\t\t */\n\t\t\toverlay = $(document.createElement('canvas')).writeAttribute({\n\t\t\t\t'width': canvasWidth,\n\t\t\t\t'height': canvasHeight\n\t\t\t}).setStyle({\n\t\t\t\t'position': 'absolute',\n\t\t\t\t'left': '0px',\n\t\t\t\t'top': '0px'\n\t\t\t});\n\t\t\ttarget.setStyle({cursor:'default'}).appendChild(overlay);\n\t\t\tif(Prototype.Browser.IE){\n\t\t\t\toverlay = $(window.G_vmlCanvasManager.initElement(overlay));\n\t\t\t}\t\t\t\n\t\t\toctx = overlay.getContext('2d');\n\t\t}", "updateTransform() {\n if (this.sortableChildren && this.sortDirty) {\n this.sortChildren();\n }\n this._boundsID++;\n this.transform.updateTransform(this.parent.transform);\n // TODO: check render flags, how to process stuff here\n this.worldAlpha = this.alpha * this.parent.worldAlpha;\n for (var i = 0, j = this.children.length; i < j; ++i) {\n var child = this.children[i];\n if (child.visible) {\n child.updateTransform();\n }\n }\n }", "function DisplayObject()\n{\n EventEmitter.call(this);\n\n /**\n * The coordinate of the object relative to the local coordinates of the parent.\n *\n * @member {PIXI.Point}\n */\n this.position = new math.Point();\n\n /**\n * The scale factor of the object.\n *\n * @member {PIXI.Point}\n */\n this.scale = new math.Point(1, 1);\n\n /**\n * The pivot point of the displayObject that it rotates around\n *\n * @member {PIXI.Point}\n */\n this.pivot = new math.Point(0, 0);\n\n\n /**\n * The skew factor for the object in radians.\n *\n * @member {PIXI.Point}\n */\n this.skew = new math.Point(0, 0);\n\n /**\n * The rotation of the object in radians.\n *\n * @member {number}\n */\n this.rotation = 0;\n\n /**\n * The opacity of the object.\n *\n * @member {number}\n */\n this.alpha = 1;\n\n /**\n * The visibility of the object. If false the object will not be drawn, and\n * the updateTransform function will not be called.\n *\n * @member {boolean}\n */\n this.visible = true;\n\n /**\n * Can this object be rendered, if false the object will not be drawn but the updateTransform\n * methods will still be called.\n *\n * @member {boolean}\n */\n this.renderable = true;\n\n /**\n * The display object container that contains this display object.\n *\n * @member {PIXI.Container}\n * @readOnly\n */\n this.parent = null;\n\n /**\n * The multiplied alpha of the displayObject\n *\n * @member {number}\n * @readOnly\n */\n this.worldAlpha = 1;\n\n /**\n * Current transform of the object based on world (parent) factors\n *\n * @member {PIXI.Matrix}\n * @readOnly\n */\n this.worldTransform = new math.Matrix();\n\n /**\n * The area the filter is applied to. This is used as more of an optimisation\n * rather than figuring out the dimensions of the displayObject each frame you can set this rectangle\n *\n * @member {PIXI.Rectangle}\n */\n this.filterArea = null;\n\n /**\n * cached sin rotation\n *\n * @member {number}\n * @private\n */\n this._sr = 0;\n\n /**\n * cached cos rotation\n *\n * @member {number}\n * @private\n */\n this._cr = 1;\n\n /**\n * The original, cached bounds of the object\n *\n * @member {PIXI.Rectangle}\n * @private\n */\n this._bounds = new math.Rectangle(0, 0, 1, 1);\n\n /**\n * The most up-to-date bounds of the object\n *\n * @member {PIXI.Rectangle}\n * @private\n */\n this._currentBounds = null;\n\n /**\n * The original, cached mask of the object\n *\n * @member {PIXI.Rectangle}\n * @private\n */\n this._mask = null;\n}", "transformed(transform){\n let result = new AffineTransform();\n\n result.position = this.position.copy();\n result.position.mult(transform.scale);\n\n let rotated = new p5.Vector(result.position.x, result.position.y).rotate(transform.rotation);\n\n result.position.x = rotated.x;\n result.position.y = rotated.y;\n result.position.add(transform.position);\n\n result.scale = this.scale.copy();\n result.scale.mult(transform.scale);\n\n result.rotation = this.rotation + transform.rotation;\n\n return result;\n }", "function CameraCommand_Scroll_TransformToParent(parent, bClip)\n{\n\t//copy the target area\n\tvar newArea = new Position_Rect(this.ScrollArea.left, this.ScrollArea.top, this.ScrollArea.width, this.ScrollArea.height);\n\t//transform it to the parent\n\tnewArea.TransformToParent(this.ScrollTarget, parent);\n\t//want to clip?\n\tif (bClip)\n\t{\n\t\t//do we have a scroll target?\n\t\tif (this.ScrollTarget)\n\t\t{\n\t\t\t//get the html parent\n\t\t\tvar htmlParent = Get_HTMLObject(this.ScrollTarget);\n\t\t\t//still valid?\n\t\t\tif (htmlParent)\n\t\t\t{\n\t\t\t\t//fit to parent\n\t\t\t\tnewArea.FitToParent(this.ScrollTarget, htmlParent);\n\t\t\t}\n\t\t}\n\t}\n\t//return it\n\treturn newArea;\n}", "clear() {\n this.context.setTransform(1, 0, 0, 1, 0, 0);\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }", "clear() {\n this.context.setTransform(1, 0, 0, 1, 0, 0);\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }", "display() {\n push();\n // Filter goes from transparent to more opaque\n this.fill.alpha += this.fill.alphaChangeRate;\n this.fill.alpha = constrain(this.fill.alpha, 0, this.fill.finalAlpha);\n // Draw a rectangle\n rectMode(CORNER);\n fill(this.fill.r, this.fill.g, this.fill.b, this.fill.alpha);\n rect(this.x, this.y, this.length, this.height);\n pop();\n }", "function Transform() {}", "function Transform() {}", "function Transform() {}", "function Transform() {}", "function Transform() {}", "function confineInContainer(position, width, height, api) {\n var viewWidth = api.getWidth();\n var viewHeight = api.getHeight();\n position[0] = Math.min(position[0] + width, viewWidth) - width;\n position[1] = Math.min(position[1] + height, viewHeight) - height;\n position[0] = Math.max(position[0], 0);\n position[1] = Math.max(position[1], 0);\n}", "function factory() {\n\n var Atomic = require('atomic'),\n $ = require('jquery'),\n CarouselWithButtons;\n\n /**\n * The carousel with buttons is a mashery of carousel and buttons, and is\n * a great example of how you can put smaller pieces together to make a\n * reusable \"larger piece\". In the class description, you should also explain\n * the contract expected by this object.\n *\n * CarouselWithButtons expects the following nodes to exist within the\n * top level element:\n * - .carousel will be turned into a carousel Component\n * - .next all references will be turned into buttons that advance the carousel\n * - .prev all references will be turned into buttons that rewind the carousel\n *\n * @class CarouselWithButtons\n * @extends AbstractComposite\n */\n CarouselWithButtons = Atomic.OOP.extend(Atomic.AbstractComposite, function (base) {\n return {\n /**\n * Declares dependencies used within this Composite\n * @requires components/carousel\n * @requires components/button\n */\n has: {\n Carousel: 'components/carousel',\n Button: 'components/button'\n },\n\n /**\n * Declares \"actors\", additional HTML Elements required\n * usually all actors need to be fulfilled for a\n * Composite to work correctly.\n */\n actors: ['Carousel', 'Next', 'Previous'],\n\n // this Composite has no events unique to itself\n events: {},\n\n /**\n * method ran in response to an external load() call\n * @see AbstractComposite#load\n */\n modify: function (done, resolved, actors) {\n var $el = $(this.ELEMENT),\n Carousel = resolved.Carousel,\n Button = resolved.Button,\n carousel = new Carousel(actors.Carousel),\n self = this;\n\n // expose a jQuery wrapped object\n // While not required, this is a good practice if\n // you want to reuse the jQuery object\n this.$el = $el;\n\n // We are comfortable as the composite maintainer\n // with people maniuplaing the carousel directly\n // via its public APIs and listening to its methods\n // As a developer, you should ensure carousel has\n // all the necessary events so that CarouselWithButtons\n // can tell when its carousel changes.\n this.carousel = carousel;\n\n // Private members can help lend insights into\n // the object's inner workings\n // External groups shouldn't call these, but they may\n // wish to console.log them\n this._nextButtons = [];\n this._prevButtons = [];\n\n // maybe we want to store the resolved object\n // for other methods in CarouselWithButtons\n this._Carousel = Carousel;\n\n // gotta bind them all\n // In order to improve debugging, remember to add\n // these objects to the _nextButtons and _prevButtons\n $.each(actors.Next, function (idx, nextEl) {\n var btn = new Button(nextEl);\n self._nextButtons.push(btn);\n carousel.bind(btn, btn.events.USE, 'next');\n btn.load();\n });\n $.each(actors.Previous, function (idx, prevEl) {\n var btn = new Button(prevEl);\n self._prevButtons.push(btn);\n carousel.bind(btn, btn.events.USE, 'previous');\n btn.load();\n });\n\n carousel.load(function () {\n done();\n });\n }\n };\n });\n\n return CarouselWithButtons;\n}", "applyCurrentTransform () {\n this.tempPosition.set(this.position);\n this.tempOrientation = this.orientation;\n this.tempScale.set(this.scale);\n }", "apply(){\n var transform = mat4.create();\n mat4.identity(transform);\n\n mat4.translate(transform, transform, [this.x_center,this.y_center,this.z_center]);\n mat4.rotate(transform, transform, this.elapsedAngle, [0, 1, 0]);\n\n mat4.translate(transform,transform,[this.radius,0,0]);\n\n if(this.direction == 1){\n mat4.rotate(transform,transform,Math.PI,[0,1,0]);\n }\n return transform;\n }", "function DisplayObject()\n{\n this.last = this;\n this.first = this;\n /**\n * The coordinate of the object relative to the local coordinates of the parent.\n *\n * @property position\n * @type Point\n */\n this.position = new Point();\n\n /**\n * The scale factor of the object.\n *\n * @property scale\n * @type Point\n */\n this.scale = new Point(1,1);//{x:1, y:1};\n\n /**\n * The pivot point of the displayObject that it rotates around\n *\n * @property pivot\n * @type Point\n */\n this.pivot = new Point(0,0);\n\n /**\n * The rotation of the object in radians.\n *\n * @property rotation\n * @type Number\n */\n this.rotation = 0;\n\n /**\n * The opacity of the object.\n *\n * @property alpha\n * @type Number\n */\n this.alpha = 1;\n\n /**\n * The visibility of the object.\n *\n * @property visible\n * @type Boolean\n */\n this.visible = true;\n\n /**\n * This is the defined area that will pick up mouse / touch events. It is null by default.\n * Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)\n *\n * @property hitArea\n * @type Rectangle|Circle|Ellipse|Polygon\n */\n this.hitArea = null;\n\n /**\n * This is used to indicate if the displayObject should display a mouse hand cursor on rollover\n *\n * @property buttonMode\n * @type Boolean\n */\n this.buttonMode = false;\n\n /**\n * Can this object be rendered\n *\n * @property renderable\n * @type Boolean\n */\n this.renderable = false;\n\n /**\n * [read-only] The display object container that contains this display object.\n *\n * @property parent\n * @type DisplayObjectContainer\n * @readOnly\n */\n this.parent = null;\n\n /**\n * [read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.\n *\n * @property stage\n * @type Stage\n * @readOnly\n */\n this.stage = null;\n\n /**\n * [read-only] The multiplied alpha of the displayobject\n *\n * @property worldAlpha\n * @type Number\n * @readOnly\n */\n this.worldAlpha = 1;\n\n /**\n * [read-only] Whether or not the object is interactive, do not toggle directly! use the `interactive` property\n *\n * @property _interactive\n * @type Boolean\n * @readOnly\n * @private\n */\n this._interactive = false;\n\n this.defaultCursor = 'pointer';\n\n /**\n * [read-only] Current transform of the object based on world (parent) factors\n *\n * @property worldTransform\n * @type Mat3\n * @readOnly\n * @private\n */\n this.worldTransform = mat3.create();//mat3.identity();\n\n /**\n * [read-only] Current transform of the object locally\n *\n * @property localTransform\n * @type Mat3\n * @readOnly\n * @private\n */\n this.localTransform = mat3.create();//mat3.identity();\n\n /**\n * [NYI] Unkown\n *\n * @property color\n * @type Array<>\n * @private\n */\n this.color = [];\n\n /**\n * [NYI] Holds whether or not this object is dynamic, for rendering optimization\n *\n * @property dynamic\n * @type Boolean\n * @private\n */\n this.dynamic = true;\n\n // chach that puppy!\n this._sr = 0;\n this._cr = 1;\n\n\n this.filterArea = new Rectangle(0,0,1,1);\n\n /*\n * MOUSE Callbacks\n */\n\n /**\n * A callback that is used when the users clicks on the displayObject with their mouse\n * @method click\n * @param interactionData {InteractionData}\n */\n\n /**\n * A callback that is used when the user clicks the mouse down over the sprite\n * @method mousedown\n * @param interactionData {InteractionData}\n */\n\n /**\n * A callback that is used when the user releases the mouse that was over the displayObject\n * for this callback to be fired the mouse must have been pressed down over the displayObject\n * @method mouseup\n * @param interactionData {InteractionData}\n */\n\n /**\n * A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject\n * for this callback to be fired, The touch must have started over the displayObject\n * @method mouseupoutside\n * @param interactionData {InteractionData}\n */\n\n /**\n * A callback that is used when the users mouse rolls over the displayObject\n * @method mouseover\n * @param interactionData {InteractionData}\n */\n\n /**\n * A callback that is used when the users mouse leaves the displayObject\n * @method mouseout\n * @param interactionData {InteractionData}\n */\n\n\n /*\n * TOUCH Callbacks\n */\n\n /**\n * A callback that is used when the users taps on the sprite with their finger\n * basically a touch version of click\n * @method tap\n * @param interactionData {InteractionData}\n */\n\n /**\n * A callback that is used when the user touch's over the displayObject\n * @method touchstart\n * @param interactionData {InteractionData}\n */\n\n /**\n * A callback that is used when the user releases a touch over the displayObject\n * @method touchend\n * @param interactionData {InteractionData}\n */\n\n /**\n * A callback that is used when the user releases the touch that was over the displayObject\n * for this callback to be fired, The touch must have started over the sprite\n * @method touchendoutside\n * @param interactionData {InteractionData}\n */\n}", "compileImpl(cache)\n {\n // small helper to format info and error messages\n var _ = (c) => {\n return 'id=' + (c.id || '') + '|name=' + (c.name || '');\n };\n\n // the common implementation for all components\n var impl = (comp, cache, ids, names, kind) => {\n // at least one of ID and name mandatory\n if ( ! comp.name && ! comp.id ) {\n throw new Error('No ID and no name on ' + kind.kind + ' in ' + cache.href);\n }\n // default value for compose\n if ( ! comp.compose ) {\n comp.compose = 'merge';\n }\n // does it exist yet?\n var derived =\n ( comp.id && ids[comp.id] )\n || ( comp.name && names[comp.name] );\n // if it does, perform the \"compose\" action..\n if ( derived ) {\n if ( derived.compose !== comp.compose ) {\n throw new Error('Different compose actions for ' + kind.kind + 's: derived:'\n + _(derived) + '|compose=' + derived.compose + ' and base:'\n + _(comp) + '|compose=' + comp.compose);\n }\n else if ( derived.compose === 'merge' ) {\n this.ctxt.display.info('Merge ' + kind.kind + 's derived:' + _(derived) + ' and base:' + _(comp));\n var overriden = Object.keys(derived);\n for ( var p in comp ) {\n if ( overriden.indexOf(p) === -1 ) {\n derived[p] = comp[p];\n if ( p === 'id' ) {\n ids[derived.id] = derived;\n }\n else if ( p === 'name' ) {\n names[derived.name] = derived;\n }\n }\n else {\n derived[p] = kind.merge(p, derived[p], comp[p]);\n }\n }\n }\n else if ( derived.compose === 'hide' ) {\n this.ctxt.platform.info('Hide ' + kind.kind + ' base:' + _(comp) + ' by derived:' + _(derived));\n }\n else {\n throw new Error('Unknown compose on ' + kind.kind + ': ' + _(derived) + '|compose=' + derived.compose);\n }\n }\n // ...if it does not, just add it\n else {\n cache.push(comp);\n if ( comp.id ) {\n ids[comp.id] = comp;\n }\n if ( comp.name ) {\n names[comp.name] = comp;\n }\n }\n };\n\n // compile hosts\n if ( this.json.hosts ) {\n this.json.hosts.forEach(host => {\n impl(host, cache.hosts, null, cache.hostNames, cmp.Host);\n });\n }\n // compile databases\n if ( this.json.databases ) {\n this.json.databases.forEach(db => {\n impl(db, cache.dbs, cache.dbIds, cache.dbNames, cmp.Database);\n });\n }\n // compile servers\n if ( this.json.servers ) {\n this.json.servers.forEach(srv => {\n impl(srv, cache.srvs, cache.srvIds, cache.srvNames, cmp.Server);\n });\n }\n // compile sources\n if ( this.json.sources ) {\n this.json.sources.forEach(src => {\n impl(src, cache.srcs, null, cache.srcNames, cmp.SourceSet);\n });\n }\n // compile mime types\n if ( this.json['mime-types'] ) {\n this.json['mime-types'].forEach(mime => {\n impl(mime, cache.mimes, null, cache.mimeNames, cmp.MimeType);\n });\n }\n // compile privileges\n if ( this.json.privileges ) {\n const each = (privs, cache, names) => {\n if ( privs ) {\n privs.forEach(priv => {\n impl(priv, cache, null, names, cmp.Privilege);\n });\n }\n };\n each(this.json.privileges.execute, cache.execPrivs, cache.execPrivNames);\n each(this.json.privileges.uri, cache.uriPrivs, cache.uriPrivNames);\n }\n // compile roles\n if ( this.json.roles ) {\n this.json.roles.forEach(role => {\n impl(role, cache.roles, null, cache.roleNames, cmp.Role);\n });\n }\n // compile users\n if ( this.json.users ) {\n this.json.users.forEach(user => {\n impl(user, cache.users, null, cache.userNames, cmp.User);\n });\n }\n // recurse on imports\n this.imports.forEach(i => {\n cache.href = i.path;\n i.compileImpl(cache);\n });\n }", "isAllBlend() {\n if (this.__transparentPrimitives.length > 0 && this.__opaquePrimitives.length === 0) {\n return true;\n }\n else {\n return false;\n }\n }", "constructor() {\n super(\"position\", \"normal\", \"texture_coord\");\n // Loop 3 times (for each axis), and inside loop twice (for opposing cube sides):\n for (var i = 0; i < 3; i++)\n for (var j = 0; j < 2; j++) {\n var square_transform = Mat4.rotation(\n i == 0 ? Math.PI / 2 : 0,\n Vec.of(1, 0, 0)\n )\n .times(\n Mat4.rotation(\n Math.PI * j - (i == 1 ? Math.PI / 2 : 0),\n Vec.of(0, 1, 0)\n )\n )\n .times(Mat4.translation([0, 0, 1]));\n // Calling this function of a Square (or any Shape) copies it into the specified\n // Shape (this one) at the specified matrix offset (square_transform):\n Square.insert_transformed_copy_into(this, [], square_transform);\n }\n }", "isCombined() {\n return this.content & Content.IS_COMBINED_MASK;\n }", "function cardComp (headline, authorPhoto, authorName) {\n const card= document.createElement('div')\n card.classList.add('card')\n\n card.appendChild(headlineComp(headline))\n card.appendChild(authorComp(authorPhoto, authorName))\n \n return card\n}", "function CanvasProjectionOverlay(){}" ]
[ "0.65486985", "0.6166722", "0.6166722", "0.6010471", "0.59579456", "0.58461636", "0.5741393", "0.5688997", "0.56546265", "0.56008905", "0.556109", "0.5505642", "0.5482712", "0.5294749", "0.5281335", "0.52623343", "0.5191511", "0.50583845", "0.5051368", "0.50366163", "0.50366163", "0.50366163", "0.50366163", "0.5014128", "0.49957877", "0.49921286", "0.49881536", "0.49812925", "0.49786606", "0.4924811", "0.4900701", "0.488148", "0.48774302", "0.48651308", "0.48502445", "0.48002675", "0.47497463", "0.4734224", "0.4724711", "0.47042045", "0.47041652", "0.4696987", "0.46964747", "0.46833727", "0.46817258", "0.46801823", "0.4674574", "0.46635172", "0.46548438", "0.4653851", "0.4649442", "0.4649442", "0.4649442", "0.4649442", "0.4649442", "0.4649442", "0.46462423", "0.46462423", "0.46462423", "0.46462423", "0.46462423", "0.46462423", "0.46462423", "0.46462423", "0.46462423", "0.46408138", "0.46394795", "0.46338984", "0.463227", "0.4622776", "0.46222973", "0.46120197", "0.46042922", "0.45938283", "0.45874935", "0.45866176", "0.4578035", "0.4577256", "0.45762604", "0.45575842", "0.45568198", "0.45511726", "0.45451495", "0.45451495", "0.45441586", "0.45437598", "0.45437598", "0.45437598", "0.45437598", "0.45437598", "0.45187992", "0.45176515", "0.4517394", "0.4512672", "0.45090646", "0.450797", "0.44963905", "0.44907832", "0.44856787", "0.4485614", "0.44843447" ]
0.0
-1
On visiting object, check for its dependencies and visit them recursively
function sort(modifier){visited.add(modifier.name);var requires=[].concat(modifier.requires||[],modifier.requiresIfExists||[]);requires.forEach(function(dep){if(!visited.has(dep)){var depModifier=map.get(dep);if(depModifier){sort(depModifier);}}});result.push(modifier);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function traverse(object, ancestors, visitor) {\n var key, child, tempList;\n\n visitor.call(null, object);\n for (key in object) {\n if (object.hasOwnProperty(key)) {\n child = object[key];\n if (typeof child === 'object' && child !== null) {\n tempList = ancestors.concat(object.type);\n traverse(child, tempList, visitor);\n // call checkStructure at every leaf\n } else {\n checkStructure(ancestors);\n }\n }\n }\n }", "function detectCycleRecursive(inputObj) {\n if (visitedTypes[inputObj.name]) {\n return;\n }\n\n visitedTypes[inputObj.name] = true;\n fieldPathIndexByTypeName[inputObj.name] = fieldPath.length;\n var fields = Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(inputObj.getFields());\n\n for (var _i30 = 0; _i30 < fields.length; _i30++) {\n var field = fields[_i30];\n\n if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[\"isNonNullType\"])(field.type) && Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[\"isInputObjectType\"])(field.type.ofType)) {\n var fieldType = field.type.ofType;\n var cycleIndex = fieldPathIndexByTypeName[fieldType.name];\n fieldPath.push(field);\n\n if (cycleIndex === undefined) {\n detectCycleRecursive(fieldType);\n } else {\n var cyclePath = fieldPath.slice(cycleIndex);\n var pathStr = cyclePath.map(function (fieldObj) {\n return fieldObj.name;\n }).join('.');\n context.reportError(\"Cannot reference Input Object \\\"\".concat(fieldType.name, \"\\\" within itself through a series of non-null fields: \\\"\").concat(pathStr, \"\\\".\"), cyclePath.map(function (fieldObj) {\n return fieldObj.astNode;\n }));\n }\n\n fieldPath.pop();\n }\n }\n\n fieldPathIndexByTypeName[inputObj.name] = undefined;\n }", "function detectCycleRecursive(inputObj) {\n if (visitedTypes[inputObj.name]) {\n return;\n }\n\n visitedTypes[inputObj.name] = true;\n fieldPathIndexByTypeName[inputObj.name] = fieldPath.length;\n var fields = Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(inputObj.getFields());\n\n for (var _i30 = 0; _i30 < fields.length; _i30++) {\n var field = fields[_i30];\n\n if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_11__[\"isNonNullType\"])(field.type) && Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_11__[\"isInputObjectType\"])(field.type.ofType)) {\n var fieldType = field.type.ofType;\n var cycleIndex = fieldPathIndexByTypeName[fieldType.name];\n fieldPath.push(field);\n\n if (cycleIndex === undefined) {\n detectCycleRecursive(fieldType);\n } else {\n var cyclePath = fieldPath.slice(cycleIndex);\n var pathStr = cyclePath.map(function (fieldObj) {\n return fieldObj.name;\n }).join('.');\n context.reportError(\"Cannot reference Input Object \\\"\".concat(fieldType.name, \"\\\" within itself through a series of non-null fields: \\\"\").concat(pathStr, \"\\\".\"), cyclePath.map(function (fieldObj) {\n return fieldObj.astNode;\n }));\n }\n\n fieldPath.pop();\n }\n }\n\n fieldPathIndexByTypeName[inputObj.name] = undefined;\n }", "function detectCycleRecursive(inputObj) {\n if (visitedTypes[inputObj.name]) {\n return;\n }\n\n visitedTypes[inputObj.name] = true;\n fieldPathIndexByTypeName[inputObj.name] = fieldPath.length;\n var fields = (0, _objectValues5.default)(inputObj.getFields());\n\n for (var _i30 = 0; _i30 < fields.length; _i30++) {\n var field = fields[_i30];\n\n if ((0, _definition.isNonNullType)(field.type) && (0, _definition.isInputObjectType)(field.type.ofType)) {\n var fieldType = field.type.ofType;\n var cycleIndex = fieldPathIndexByTypeName[fieldType.name];\n fieldPath.push(field);\n\n if (cycleIndex === undefined) {\n detectCycleRecursive(fieldType);\n } else {\n var cyclePath = fieldPath.slice(cycleIndex);\n var pathStr = cyclePath.map(function (fieldObj) {\n return fieldObj.name;\n }).join('.');\n context.reportError(\"Cannot reference Input Object \\\"\".concat(fieldType.name, \"\\\" within itself through a series of non-null fields: \\\"\").concat(pathStr, \"\\\".\"), cyclePath.map(function (fieldObj) {\n return fieldObj.astNode;\n }));\n }\n\n fieldPath.pop();\n }\n }\n\n fieldPathIndexByTypeName[inputObj.name] = undefined;\n }", "function detectCycleRecursive(inputObj) {\n if (visitedTypes[inputObj.name]) {\n return;\n }\n\n visitedTypes[inputObj.name] = true;\n fieldPathIndexByTypeName[inputObj.name] = fieldPath.length;\n var fields = (0, _objectValues.default)(inputObj.getFields());\n\n for (var _i30 = 0; _i30 < fields.length; _i30++) {\n var field = fields[_i30];\n\n if ((0, _definition.isNonNullType)(field.type) && (0, _definition.isInputObjectType)(field.type.ofType)) {\n var fieldType = field.type.ofType;\n var cycleIndex = fieldPathIndexByTypeName[fieldType.name];\n fieldPath.push(field);\n\n if (cycleIndex === undefined) {\n detectCycleRecursive(fieldType);\n } else {\n var cyclePath = fieldPath.slice(cycleIndex);\n var pathStr = cyclePath.map(function (fieldObj) {\n return fieldObj.name;\n }).join('.');\n context.reportError(\"Cannot reference Input Object \\\"\".concat(fieldType.name, \"\\\" within itself through a series of non-null fields: \\\"\").concat(pathStr, \"\\\".\"), cyclePath.map(function (fieldObj) {\n return fieldObj.astNode;\n }));\n }\n\n fieldPath.pop();\n }\n }\n\n fieldPathIndexByTypeName[inputObj.name] = undefined;\n }", "async function walk(oid) {\n visited.add(oid);\n const { type, object } = await _readObject({ fs, cache, gitdir, oid });\n // Recursively resolve annotated tags\n if (type === 'tag') {\n const tag = GitAnnotatedTag.from(object);\n const commit = tag.headers().object;\n return walk(commit)\n }\n if (type !== 'commit') {\n throw new ObjectTypeError(oid, type, 'commit')\n }\n if (!shallows.has(oid)) {\n const commit = GitCommit.from(object);\n const parents = commit.headers().parent;\n for (oid of parents) {\n if (!finishingSet.has(oid) && !visited.has(oid)) {\n await walk(oid);\n }\n }\n }\n }", "function traverse(object, visitor) {\n var key, child;\n\n if (visitor.call(null, object) === false) {\n return;\n }\n for (key in object) {\n if (object.hasOwnProperty(key)) {\n child = object[key];\n if (typeof child === 'object' && child !== null) {\n traverse(child, visitor);\n }\n }\n }\n}", "function traverse(object, visitor) {\n var child;\n\n if (!object) {\n return;\n }\n\n if (visitor.call(null, object) === false) {\n return false;\n }\n for (var i = 0, keys = Object.keys(object); i < keys.length; i++) {\n child = object[keys[i]];\n if (typeof child === 'object' && child !== null) {\n if (traverse(child, visitor) === false) {\n return false;\n }\n }\n }\n }", "function traverse(object, visitor, master) {\r\n var key, child, parent, path;\r\n\r\n parent = (typeof master === 'undefined') ? [] : master;\r\n\r\n if (visitor.call(null, object, parent) === false) {\r\n return;\r\n }\r\n for (key in object) {\r\n if (object.hasOwnProperty(key)) {\r\n child = object[key];\r\n path = [ object ];\r\n path.push(parent);\r\n if (typeof child === 'object' && child !== null) {\r\n traverse(child, visitor, path);\r\n }\r\n }\r\n }\r\n }", "function traverseBroad(object, visitor) {\n var child;\n\n if (!object) {\n return;\n }\n\n if (visitor.call(null, object) === false) {\n return false;\n }\n for (var i = 0, keys = Object.keys(object); i < keys.length; i++) {\n child = object[key];\n if (typeof child === 'object' && child !== null) {\n traverseBroad(child, visitor);\n }\n }\n }", "function getDepsRecursive(field, visited = []) {\n\tif (visited.indexOf(field) !== -1) return\n\n\tvisited.push(field)\n\tfor (let dep of field.directDependencies) getDepsRecursive(dep, visited)\n\n\treturn visited\n}", "function circularReferenceCheck(shadows) {\n // if any of the current objects to process exist in the queue\n // then throw an error.\n shadows.forEach(function (item) {\n if (item instanceof Object && visited.indexOf(item) > -1) {\n throw new Error('Circular reference error');\n }\n });\n // if none of the current objects were in the queue\n // then add references to the queue.\n visited = visited.concat(shadows);\n }", "function checkStructure(object, structure) {\n var key, child, tempList;\n \n visitor.call(null, object);\n for (key in object) {\n if (object.hasOwnProperty(key)) {\n child = object[key];\n if (typeof child === 'object' && child !== null) {\n tempList = ancestors.concat(object.type);\n traverse(child, tempList, visitor);\n // call checkStructure at every leaf\n } else {\n checkStructure(ancestors);\n }\n }\n }\n }", "function traverse(config) {\n const tree = [];\n const stack = [config.filename];\n\n while (stack.length) {\n const dependency = stack.pop();\n debug(`traversing ${dependency}`);\n\n if (config.visited[dependency]) {\n populateFromCache(dependency);\n } else {\n traverseDependency(dependency);\n }\n }\n\n return tree;\n\n function traverseDependency(dependency) {\n const localConfig = config.clone();\n localConfig.filename = dependency;\n\n let dependencies = module.exports._getDependencies(localConfig);\n\n if (config.filter) {\n debug('using filter function to filter out dependencies');\n debug(`number of dependencies before filtering: ${dependencies.length}`);\n dependencies = dependencies.filter(function (filePath) {\n return localConfig.filter(filePath, localConfig.filename);\n });\n debug(`number of dependencies after filtering: ${dependencies.length}`);\n }\n\n debug('cabinet-resolved all dependencies: ', dependencies); // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n\n tree[dependency] = dependencies;\n const filePathMap = config.pathMap.find(pathMapEntry => pathMapEntry.file === dependency);\n if (!filePathMap) throw new Error(`file ${dependency} is missing from PathMap`);\n config.visited[dependency] = {\n pathMap: filePathMap,\n missing: config.nonExistent[dependency],\n error: config.errors[dependency]\n };\n stack.push(...dependencies);\n }\n\n function populateFromCache(dependency) {\n debug(`already visited ${dependency}. Will try to find it and its dependencies in the cache`);\n const dependenciesStack = [dependency];\n\n while (dependenciesStack.length) {\n findAllDependenciesInCache(dependenciesStack);\n }\n }\n\n function findAllDependenciesInCache(dependenciesStack) {\n const dependency = dependenciesStack.pop();\n\n if (!config.visited[dependency]) {\n debug(`unable to find ${dependency} in the cache, it was probably filtered before`);\n return;\n }\n\n debug(`found ${dependency} in the cache`);\n const dependencies = config.visited[dependency].pathMap.dependencies.map(d => d.resolvedDep); // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n\n tree[dependency] = dependencies;\n config.pathMap.push(config.visited[dependency].pathMap);\n\n if (config.visited[dependency].missing) {\n config.nonExistent[dependency] = config.visited[dependency].missing;\n }\n\n if (config.visited[dependency].error) {\n config.errors[dependency] = config.visited[dependency].error;\n }\n\n dependencies.forEach(d => {\n if (!tree[d]) dependenciesStack.push(d);\n });\n }\n}", "function iterate(obj) {\n // watch for objects we've already iterated so we won't end in endless cycle\n // for cases like var foo = {}; foo.bar = foo; iterate(foo);\n var walked = [];\n var stack = [{obj: obj, stack: ''}];\n while (stack.length > 0) {\n var item = stack.pop();\n var obj = item.obj;\n for (var property in obj) {\n if (obj.hasOwnProperty(property)) {\n if (typeof obj[property] == \"object\") {\n // check if we haven't iterated through the reference yet\n var alreadyFound = false;\n for (var i = 0; i < walked.length; i++) {\n if (walked[i] === obj[property]) {\n alreadyFound = true;\n break;\n }\n }\n // new object reference\n if (!alreadyFound) {\n walked.push(obj[property]);\n stack.push({obj: obj[property], stack: item.stack + '.' + property});\n }\n }\n else {\n console.log(item.stack + '.' + property + \"=\" + obj[property]);\n }\n }\n }\n }\n }", "detectCycles() {\n\t\t\tconst flatOrder = Array.from(this.orderedNodes);\n\n\t\t\tfor (let i = 0; i < flatOrder.length; i++) {\n\t\t\t\tconst node = flatOrder[i];\n\n\t\t\t\tfor (const imp of node.analyze.value.importFirstUsage) {\n\t\t\t\t\tconst subnode = node.getNodeFromRelativeDependency(imp.source);\n\t\t\t\t\tif (subnode === undefined) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst resolved = subnode.resolveImport(imp.imported, imp.loc);\n\t\t\t\t\tif (resolved.type !== \"FOUND\") {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Hoisted exports will always be accessible\n\t\t\t\t\tif (resolved.record.valueType === \"function\") {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst dep = resolved.node;\n\n\t\t\t\t\tconst isBefore = flatOrder.indexOf(dep) > i;\n\t\t\t\t\tif (isBefore) {\n\t\t\t\t\t\tthis.flagCycle(node, dep, imp);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function helper(node, visited, stack) {\n visited.add(node);\n if (deps[node] != undefined) {\n for (let i = 0; i < deps[node].length; i++) {\n let dep_node = deps[node][i];\n if (!visited.has(dep_node)) {\n helper(dep_node, visited, stack);\n }\n }\n }\n stack.push(node);\n}", "async function walk (oid) {\n visited.add(oid);\n let { type, object } = await GitObjectManager.read({ fs, gitdir, oid });\n if (type !== 'commit') {\n throw new Error(`Expected type commit but type is ${type}`)\n }\n let commit = GitCommit.from(object);\n let parents = commit.headers().parent;\n for (oid of parents) {\n if (!finishingSet.has(oid) && !visited.has(oid)) {\n await walk(oid);\n }\n }\n }", "function _dfs(obj, cb) { \n\t// Recursive fn\n\tfunction _walk(current) {\n\t\t// Run callback\n\t\tcb(current);\n\t\t// Destructure to get children\n\t\tconst {\n\t\t\tchildren\n\t\t} = current;\n\n\t\tif (children) {\n\t\t\tchildren.forEach(e => {\n\t\t\t\t_walk(e);\n\t\t\t});\n\t\t}\n\t};\n\n\twalk(obj);\n}", "function walkObject()\n\t\t{\n\t\t\tfunction process(value, index, depth)\n\t\t\t{\n\t\t\t\ttrace(indent(depth) + '[' +index+ '] ' + value);\n\t\t\t}\n\n\t\t\tUtils.walk(arr, process);\n\t\t\tUtils.walk(obj, process);\n\t\t}", "function visit(name) {\n var field = map[name];\n if (name in marked) {\n console.warn(\"Cyclic dependency among fields detected in %O\", fieldList);\n return fieldList;\n }\n if (!(name in visited)) {\n marked[name] = true;\n forEachDep(field, function(depName) {\n visit(depName);\n });\n delete marked[name];\n visited[name] = true;\n result.push(field);\n }\n }", "async function walk(oid) {\n if (visited.has(oid)) return\n visited.add(oid);\n const { type, object } = await _readObject({ fs, cache, gitdir, oid });\n if (type === 'tag') {\n const tag = GitAnnotatedTag.from(object);\n const obj = tag.headers().object;\n await walk(obj);\n } else if (type === 'commit') {\n const commit = GitCommit.from(object);\n const tree = commit.headers().tree;\n await walk(tree);\n } else if (type === 'tree') {\n const tree = GitTree.from(object);\n for (const entry of tree) {\n // add blobs to the set\n // skip over submodules whose type is 'commit'\n if (entry.type === 'blob') {\n visited.add(entry.oid);\n }\n // recurse for trees\n if (entry.type === 'tree') {\n await walk(entry.oid);\n }\n }\n }\n }", "function checkChildren(object) {\n let analyzedObject = {\n elements: [],\n };\n // go through every child and fetch component decorators\n if (typeof object.children != 'undefined') {\n object.children.forEach(val => {\n let componentInfo = getComponentInfo(val);\n let componentDecorators = getChildComponentDecorators(componentInfo);\n let componentInputs = getChildComponentInputs(componentInfo);\n\n // Create the element and put it in the array\n let element = {\n componentInfo: componentInfo,\n componentDecorators: componentDecorators,\n inputs: componentInputs,\n };\n analyzedObject.elements = [...analyzedObject.elements, element];\n //checkChildren(val);\n });\n }\n return analyzedObject;\n}", "function traverse(config, dependencies, bindings, root, visit) {\n // a stack\n var stack = new Array();\n stack.push(root);\n\n while (stack.length > 0) {\n var plugin = stack.pop();\n\n visit(config[plugin]);\n\n // get all children\n if (!dependencies.hasOwnProperty(plugin)) {\n console.error('Could not find plugin', plugin);\n break;\n }\n var consumes = dependencies[plugin];\n\n for (var i = 0; i < consumes.length; i++) {\n if (!bindings.hasOwnProperty(consumes[i]) || bindings[consumes[i]].length == 0) {\n console.error('Could not find service implementation', consumes[i]);\n break;\n }\n\n stack.push(bindings[consumes[i]][0]);\n }\n }\n}", "checkNodesForCircularDependencies(graph) {\n // for each node in the dependency graph, check for circular dependencies\n for (let nodeName in this.graph.nodes) {\n let dependencyPathTaken = []; // record of path when looking for cicular dependency; reset each time\n logger_1.default.system.debug(`BootDependencyGraph.checkNodesForCircularDependencies -- nodeName=${nodeName}`);\n let isCircular = this.testOneNodeForCircularPath(dependencyPathTaken, nodeName);\n if (isCircular) {\n this.errorDiag = new DGDiagnostics(`${this.context} circular dependency`, dependencyPathTaken);\n this.graphState = \"error\";\n throw this.errorDiag.description;\n }\n }\n }", "function cycleCheck(node, path) {\n if (!node) {\n return;\n }\n const children = [...node.loadDependencyNames, ...node.lazyDependencyNames];\n for (const child of children) {\n if (path.indexOf(child) !== -1) {\n throw new Error(`Cyclic dependency detected! Module ${node.name} has a dependency ${child} that is also a parent!`);\n }\n cycleCheck(moduleDefinitions[child], [...path, child]);\n }\n }", "function walkObjectProcess()\n\t\t{\n\t\t\t// the function to process the children\n\t\t\t\tfunction process(element, index, depth)\n\t\t\t\t{\n\t\t\t\t\ttrace (indent(depth) + '/' + element.name);\n\t\t\t\t}\n\n\t\t\t// the function to identify the children\n\t\t\t\tfunction getContents(element)\n\t\t\t\t{\n\t\t\t\t\treturn element instanceof Folder ? element.contents : null;\n\t\t\t\t}\n\n\t\t\t// start processing\n\t\t\t\tvar folder = new Folder('{user}');\n\t\t\t\tUtils.walk (folder, process, getContents)\n\t\t}", "function traverse(node, func) {\n\tfunc(node);//1\n\tfor (var key in node) { //2\n\t\tif (node.hasOwnProperty(key)) { //3\n\t\t\tvar child = node[key];\n\t\t\tif (typeof child === 'object' && child !== null) { //4\n\n\t\t\t\tif (Array.isArray(child)) {\n\t\t\t\t\tchild.forEach(function (node) { //5\n\t\t\t\t\t\ttraverse(node, func);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\ttraverse(child, func); //6\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "function walkImpl(root, traversalStrategy, beforeFunc, afterFunc, context, collectResults) {\n return (function _walk(stack, value, key, parent) {\n if (isObject(value) && stack.indexOf(value) >= 0)\n throw new TypeError('A cycle was detected at ' + value);\n\n if (beforeFunc) {\n var result = beforeFunc.call(context, value, key, parent);\n if (result === stopWalk) return stopWalk;\n if (result === stopRecursion) return; // eslint-disable-line consistent-return\n }\n\n var subResults;\n var target = traversalStrategy(value);\n\n if (isObject(target) && Object.keys(target).length > 0) {\n // Collect results from subtrees in the same shape as the target.\n if (collectResults) subResults = Array.isArray(target) ? [] : {};\n\n var ok = each(target, function(obj, key) {\n var result = _walk(copyAndPush(stack, value), obj, key, value);\n if (result === stopWalk) return false;\n if (subResults) subResults[key] = result;\n });\n if (!ok) return stopWalk;\n }\n if (afterFunc) return afterFunc.call(context, value, key, parent, subResults);\n })([], root);\n}", "function iterDeps(method, obj, depKey, seen, meta) {\n\n var guid = guidFor(obj);\n if (!seen[guid]) seen[guid] = {};\n if (seen[guid][depKey]) return;\n seen[guid][depKey] = true;\n\n var deps = meta.deps;\n deps = deps && deps[depKey];\n if (deps) {\n for(var key in deps) {\n if (DEP_SKIP[key]) continue;\n method(obj, key);\n }\n }\n}", "traverseDown (callback, object, property, parent) {\n\t\t\tif (Array.isArray(object)) {\n\t\t\t\tobject.forEach((item, i) => _.traverse(callback, item, i, object));\n\t\t\t}\n\t\t\telse if (Mavo.isPlainObject(object)) {\n\t\t\t\tfor (var prop in object) {\n\t\t\t\t\t_.traverse(callback, object[prop], prop, object);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function traverse(val){_traverse(val,seenObjects);seenObjects.clear();}", "function traverse(val){_traverse(val,seenObjects);seenObjects.clear();}", "visit(node) {\n node.state = 1 /* IN_PROGRESS */;\n for (const edge of Object.values(node.dependencies)) {\n const target = this.nodes[edge.to];\n switch (target.state) {\n case 2 /* VISITED */: break; // Do nothing, since node was already visited\n case 1 /* IN_PROGRESS */:\n this.visitOpenNode(node, target, edge);\n break;\n case 0 /* NOT_VISITED */: this.visit(target);\n }\n }\n if (node.state !== 2 /* VISITED */) {\n node.state = 2 /* VISITED */;\n this.sortedNodeList.push(node.hash);\n }\n }", "async function walk (oid) {\n visited.add(oid);\n let { type, object } = await GitObjectManager.read({ fs, gitdir, oid });\n if (type === 'commit') {\n let commit = GitCommit.from(object);\n let tree = commit.headers().tree;\n await walk(tree);\n } else if (type === 'tree') {\n let tree = GitTree.from(object);\n for (let entry of tree) {\n visited.add(entry.oid);\n // only recurse for trees\n if (entry.type === 'tree') {\n await walk(entry.oid);\n }\n }\n }\n }", "function visit(node, visitFunction, parentsList) {\n\t\tvar parents = (typeof parentsList === 'undefined') ? [] : parentsList;\n\t\n\t\tvisitFunction = visitFunction || false;\n\t\tif (visitFunction && visitFunction(node,parentsList) == false) {\n\t\t\treturn;\n\t\t}\n\t\tfor (key in node) {\n\t\t\tif (node.hasOwnProperty(key)) {\n\t\t\t\tchild = node[key];\n\t\t\t\tpath = [ node ];\n\t\t\t\tpath.push(parents);\n\t\t\t\tif (typeof child === 'object' && child !== null) {\n\t\t\t\t\tvisit(child, visitFunction, path);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function visitNodes(node, action, context)\r\n {\r\n for (var fieldname in node)\r\n {\r\n var childNode = node[fieldname];\r\n if (childNode == undefined)\r\n continue;\r\n\r\n action(node, fieldname, context);\r\n if (typeof(childNode) != 'object')\r\n continue;\r\n\r\n if (childNode instanceof Array)\r\n {\r\n for (var i = 0; i < childNode.length; i++)\r\n {\r\n if (typeof(childNode[i]) == 'object')\r\n visitNodes(childNode[i], action, context);\r\n }\r\n }\r\n else\r\n {\r\n visitNodes(childNode, action, context);\r\n }\r\n }\r\n }", "function inOrderTraversal(node) {}", "function traverse (obj, callback, trail) {\n trail = trail || [];\n\n Object.keys(obj).forEach(function (key) {\n let value = obj[key]\n , undef = typeof value === \"undefined\" || value === null\n ;\n\n if (!undef && Object.getPrototypeOf(value) === Object.prototype)\n traverse(value, callback, trail.concat(key));\n else\n callback.call(obj, key, value, trail);\n });\n}", "static _coalesceConvert_doRecurse (obj, fn) {\n\t\tif (typeof obj !== \"object\") throw new TypeError(`Non-object ${obj} passed to object handler!`);\n\n\t\tif (obj instanceof Array) {\n\t\t\tfn(obj);\n\n\t\t\tobj.forEach(it => {\n\t\t\t\tif (typeof it !== \"object\") return;\n\t\t\t\tthis._coalesceConvert_doRecurse(it, fn)\n\t\t\t});\n\t\t} else {\n\t\t\tif (obj.type) {\n\t\t\t\tconst childMeta = Renderer.ENTRIES_WITH_CHILDREN.find(it => it.type === obj.type && obj[it.key]);\n\t\t\t\tif (childMeta) {\n\t\t\t\t\tthis._coalesceConvert_doRecurse(obj[childMeta.key], fn);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "traverse(fn, skipSelf = false) {\n const me = this;\n\n if (!skipSelf) {\n fn.call(me, me);\n }\n if (me.isLoaded) me.children.forEach((child) => child.traverse(fn));\n }", "function iterateOverChildren(obj)\n\t\t{\n\t\t\tfor(var key in obj)\n\t\t\t{\n\t\t\t\tvar value = obj[key];\n\n\t\t\t\tif(value instanceof Object)\n\t\t\t\t{\n\t\t\t\t\titerateOverChildren(value);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttranslationList.push({\n\t\t\t\t\t\tobject: obj,\n\t\t\t\t\t\tproperty: key\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function traverse(obj) {\n _lodash2.default.each(obj, function (val, indexOrProp) {\n // Move deeper into the object\n var next = obj[indexOrProp];\n\n // If we can go no further, then quit\n if (MongoObject.isBasicObject(next)) {\n traverse(next);\n } else if (Array.isArray(next)) {\n obj[indexOrProp] = _lodash2.default.without(next, REMOVED_MARKER);\n traverse(obj[indexOrProp]);\n }\n });\n }", "function collectTransitiveDependencies(collected, depGraph, fromName) {\n\t var immediateDeps = depGraph[fromName];\n\t if (immediateDeps) {\n\t Object.keys(immediateDeps).forEach(function (toName) {\n\t if (!collected[toName]) {\n\t collected[toName] = true;\n\t collectTransitiveDependencies(collected, depGraph, toName);\n\t }\n\t });\n\t }\n\t}", "function traverseObject(someObj) {\r\n \r\n console.log(someObj);\r\n}", "function traverseDependencyGraph(graph, package, affectedPackages) {\n // Terminate early if the package has been visited.\n if (affectedPackages.has(package)) {\n return;\n }\n\n const consumingPackages = graph[package];\n\n if (!consumingPackages) {\n return;\n }\n\n consumingPackages.forEach(consumingPackage => {\n traverseDependencyGraph(graph, consumingPackage, affectedPackages);\n affectedPackages.add(consumingPackage);\n });\n}", "function traverse(val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n }", "function walk(obj) {\n Object.getOwnPropertyNames(obj).forEach(function (name) {\n if (!whitelisted[name]) {\n if (!clobber(obj, name)) {\n // FIXME: this is lame\n failed.push('could not clobber \"' + name + '\": ' + e.message);\n }\n }\n });\n\n for (var name in blacklisted) {\n if (obj.hasOwnProperty(name) && !clobber(obj, name)) {\n // FIXME: this is lame\n failed.push('could not clobber \"' + name + '\": ' + e.message);\n }\n }\n\n var prototype = obj.constructor.prototype;\n if (prototype && prototype !== obj) {\n walk(prototype);\n }\n\n var proto = Object.getPrototypeOf(obj);\n if (proto && proto !== obj) {\n walk(proto);\n }\n }", "function collectTransitiveDependencies(collected, depGraph, fromName) {\n var immediateDeps = depGraph[fromName];\n if (immediateDeps) {\n Object.keys(immediateDeps).forEach(function (toName) {\n if (!collected[toName]) {\n collected[toName] = true;\n collectTransitiveDependencies(collected, depGraph, toName);\n }\n });\n }\n}", "function collectTransitiveDependencies(collected, depGraph, fromName) {\n var immediateDeps = depGraph[fromName];\n if (immediateDeps) {\n Object.keys(immediateDeps).forEach(function (toName) {\n if (!collected[toName]) {\n collected[toName] = true;\n collectTransitiveDependencies(collected, depGraph, toName);\n }\n });\n }\n}", "function walkDeps(childs, path, tree) {\n for (var i = 0, size = childs.length; i < size; i++) {\n var cur = childs[i];\n // check if the path contains the child (a circular dependency)\n if (path.indexOf(cur) > -1) {\n path.push(cur);\n return true;\n }\n // walk the children of this child\n var curChilds = tree[cur];\n if (curChilds != null) {\n // push and pop the child before and after the sub-walk\n path.push(cur);\n // recursively walk children\n var res = walkDeps(curChilds, path, tree);\n if (res)\n return res;\n path.pop();\n }\n }\n return false;\n }", "function object_traverse(callback, obj) {\n\n\t// If the callback returns false, return.\n\tvar cret = callback(obj);\n\tif (cret !== undefined) {\n\t\treturn cret;\n\t}\n\n\t// Traverse properties\n\t// TODO: Handle non-enumerable properties, etc\n\tvar p;\n\tfor (p in obj) {\n\t\tif (typeof obj[p] === 'object') {\n\t\t\tvar ret = object_traverse(callback, obj[p]);\n\t\t\tif (ret !== undefined) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Explicitly return nothing\n\treturn undefined;\n}", "function traverse(val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n }", "function traverse(val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n }", "function scan(obj, parent) {\r\n var k;\r\n if (obj instanceof Object) {\r\n for (k in obj) {\r\n if (obj.hasOwnProperty(k)) {\r\n //recursive call to scan property\r\n scan(obj[k], parent + \"['\" + k + \"']\");\r\n }\r\n }\r\n } else {\r\n\r\n };\r\n arr.push({\r\n parent: parent,\r\n obj: obj\r\n });\r\n }", "traverse(fn, skipSelf = false) {\n const {\n children\n } = this;\n\n if (!skipSelf) {\n fn.call(this, this);\n } // Simply testing whether there is non-zero children length\n // is 10x faster than using this.isLoaded\n\n for (let i = 0, l = children && children.length; i < l; i++) {\n children[i].traverse(fn);\n }\n }", "function re_dependency(re){var i,l,r\n switch(re[0]){\n case 0:\n case 1:\n case 8:\n return\n case 2:\n case 3:\n for(i=0,l=re[1].length;i<l;i++)\n if(r=re_dependency(re[1][i]))return r\n return\n case 4:\n return re_dependency(re[3])\n case 5:\n return re[1]\n case 6:\n case 7:\n return re_dependency(re[1])\n default:\n throw Error('re_dependency: unknown re type: '+re[0])}}", "inorderTraversal() {\n\n }", "function collectTransitiveDependencies(collected, depGraph, fromName) {\n var immediateDeps = depGraph[fromName];\n\n if (immediateDeps) {\n var _arr3 = Object.keys(immediateDeps);\n\n for (var _i3 = 0; _i3 < _arr3.length; _i3++) {\n var toName = _arr3[_i3];\n\n if (!collected[toName]) {\n collected[toName] = true;\n collectTransitiveDependencies(collected, depGraph, toName);\n }\n }\n }\n}", "function traverse(val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse(val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse(val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse(val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse(val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse(val) {\n _traverse(val, seenObjects);\n\n seenObjects.clear();\n }", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n }", "function setDepth(obj) {\n if (obj.children) {\n obj.children.forEach(function (d) {\n depthTemp++;\n setDepth(d);\n if (depthTemp > depth) {\n depth = depthTemp;\n }\n depthTemp = 0;\n });\n }\n depthTemp++;\n }", "function detectCycles (rows) {\n var cyclicalModules = new Set()\n var checked = new Set()\n rows.forEach(function (module) {\n var visited = []\n\n check(module)\n\n function check (row) {\n var i = visited.indexOf(row)\n if (i !== -1) {\n checked.add(row)\n for (; i < visited.length; i++) {\n cyclicalModules.add(visited[i])\n }\n return\n }\n if (checked.has(row)) return\n visited.push(row)\n Object.keys(row.deps).forEach(function (k) {\n var dep = row.deps[k]\n var other = rows.byId[dep]\n if (other) check(other, visited)\n })\n visited.pop()\n }\n })\n\n // mark cyclical dependencies\n for (var i = 0; i < rows.length; i++) {\n rows[i][kEvaluateOnDemand] = cyclicalModules.has(rows[i])\n }\n return cyclicalModules.size > 0\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n }", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n }", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n }", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n }", "function traverse (val) {\r\n _traverse(val, seenObjects);\r\n seenObjects.clear();\r\n}", "function collectTransitiveDependencies(collected, depGraph, fromName) {\n var immediateDeps = depGraph[fromName];\n\n if (immediateDeps) {\n for (var _i4 = 0, _Object$keys2 = Object.keys(immediateDeps); _i4 < _Object$keys2.length; _i4++) {\n var toName = _Object$keys2[_i4];\n\n if (!collected[toName]) {\n collected[toName] = true;\n collectTransitiveDependencies(collected, depGraph, toName);\n }\n }\n }\n}", "function collectTransitiveDependencies(collected, depGraph, fromName) {\n var immediateDeps = depGraph[fromName];\n\n if (immediateDeps) {\n for (var _i4 = 0, _Object$keys2 = Object.keys(immediateDeps); _i4 < _Object$keys2.length; _i4++) {\n var toName = _Object$keys2[_i4];\n\n if (!collected[toName]) {\n collected[toName] = true;\n collectTransitiveDependencies(collected, depGraph, toName);\n }\n }\n }\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}" ]
[ "0.67661756", "0.650305", "0.65017045", "0.6474099", "0.64717424", "0.6372098", "0.6370522", "0.6334102", "0.6309952", "0.6289112", "0.6213317", "0.6195653", "0.61104006", "0.6004782", "0.60006046", "0.5977171", "0.5937908", "0.5914214", "0.5798761", "0.5770098", "0.576878", "0.5751224", "0.57433236", "0.5741472", "0.57220197", "0.57054675", "0.5697442", "0.56966084", "0.5679637", "0.56645936", "0.56300557", "0.56109697", "0.56109697", "0.5595631", "0.5593021", "0.5587069", "0.5582583", "0.55743647", "0.55523497", "0.5551709", "0.5545765", "0.55144817", "0.54919946", "0.5483582", "0.54705244", "0.54689294", "0.54470325", "0.5445011", "0.54282916", "0.54282916", "0.54240906", "0.53969663", "0.53837526", "0.53837526", "0.5380925", "0.5373061", "0.53720933", "0.5365315", "0.53640026", "0.5354974", "0.5354974", "0.5354974", "0.5354974", "0.5354974", "0.5342796", "0.53409874", "0.5340351", "0.5340284", "0.5340218", "0.5340218", "0.5340218", "0.5340218", "0.5332873", "0.531553", "0.531553", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613" ]
0.0
-1
Modifiers have the ability to execute arbitrary code before the first update cycle runs. They will be executed in the same order as the update cycle. This is useful when a modifier adds some persistent data that other modifiers need to use, but the modifier is run after the dependent one.
function runModifierEffects(){state.orderedModifiers.forEach(function(_ref3){var name=_ref3.name,_ref3$options=_ref3.options,options=_ref3$options===void 0?{}:_ref3$options,effect=_ref3.effect;if(typeof effect==='function'){var cleanupFn=effect({state:state,name:name,instance:instance,options:options});var noopFn=function noopFn(){};effectCleanupFns.push(cleanupFn||noopFn);}});}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n var noopFn = function noopFn() {};\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref) {\n var name = _ref.name,\n _ref$options = _ref.options,\n options = _ref$options === void 0 ? {} : _ref$options,\n effect = _ref.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state1.orderedModifiers.forEach(function(_ref3) {\n var name = _ref3.name, _ref3$options = _ref3.options, options = _ref3$options === void 0 ? {\n } : _ref3$options, effect = _ref3.effect;\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state1,\n name: name,\n instance: instance,\n options: options\n });\n var noopFn = function noopFn() {\n };\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function ModifierChain() {\n this._chain = [];\n if (arguments.length) this.addModifier.apply(this, arguments);\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 }", "function addAddEffect(modifiers, name, type, key) {\n let changes = [];\n // const bonus = utils.filterModifiers(modifiers, \"bonus\", type).reduce((a, b) => a + b.value, 0);\n const bonus = getValueFromModifiers(modifiers, name, type, \"bonus\");\n if (bonus) {\n logger.debug(`Generating ${type} bonus for ${name}`, bonus);\n changes.push(generateAddChange(bonus, 18, key));\n }\n return changes;\n}", "update() {\n // override to add custom forces before World step\n }", "function addCustomEffect(modifiers, name, type, key, extra = \"\") {\n let changes = [];\n const bonus = utils.filterModifiers(modifiers, \"bonus\", type).reduce((a, b) => a + b.value, 0);\n if (bonus !== 0) {\n logger.debug(`Generating ${type} bonus for ${name}`);\n changes.push(generateCustomChange(`${bonus}${(extra) ? extra : \"\"}`, 18, key));\n }\n return changes;\n}", "recalculateModifiers() {\n // Basic\n this.modifiers = [];\n for (var i = 0; i < this.inherentModifiers.length; i++) {\n this.modifiers.push(this.inherentModifiers[i].copy());\n }\n\n // Tools\n for ( i = 0; i < this.attachedCards.length; i++) {\n for (var j = 0; j < this.attachedCards[i].inherentModifiers.length; j++) {\n this.attachedCards[i].inherentModifiers[j].name = this.attachedCards[i].name;\n this.modifiers.push(this.attachedCards[i].inherentModifiers[j].copy());\n }\n }\n\n // Abilities\n var abilities = this.getAbilities();\n for ( i = 0; i < abilities.length; i++) {\n abilities[i].modifySelfModifiers(this, this.modifiers);\n }\n\n\n // Empowerment\n for ( i = 0; i < this.controller.empowerment; i++) {\n this.modifiers.push(ModifierD6(\"Posílení z minulého kola\"));\n }\n\n // Enemy intervention\n var enemyCreature = this.controller.session.enemy.activeCreature == this ?\n this.controller.session.you.activeCreature : this.controller.session.enemy.activeCreature;\n if (enemyCreature != null) {\n // Type bonus\n var myType = this.color;\n var enemyType = enemyCreature.color;\n if (myType == \"Leaf\" && enemyType == \"Water\") {\n this.modifiers.push(ModifierD6(\"Výhoda lesních proti vodním\"));\n } else if (myType == \"Fire\" && enemyType == \"Leaf\") {\n this.modifiers.push(ModifierD6(\"Výhoda ohně proti lesu\"));\n } else if (myType == \"Water\" && enemyType == \"Fire\") {\n this.modifiers.push(ModifierD6(\"Výhoda vody proti ohni\"));\n }\n\n var friendlyAbilities = this.getAbilities();\n for ( i = 0; i < friendlyAbilities.length; i++) {\n friendlyAbilities[i].modifySelfAgainstEnemyModifiers(this, enemyCreature, this.modifiers);\n }\n // Abilities\n var enemyAbilities = enemyCreature.getAbilities();\n for ( i = 0; i < enemyAbilities.length; i++) {\n enemyAbilities[i].modifyEnemyModifiers(enemyCreature, this, this.modifiers);\n }\n }\n // Final modifications\n for (var i = 0; i < abilities.length; i++) {\n if (abilities[i].id == \"Rozkopu\") {\n this.modifiers.length = 0;\n this.modifiers.push(new Modifier(MODIFIER_FLAT, \"img/dPlus.png\", \"Rozkopán (+10)\", 10));\n }\n }\n }", "function enableModifier(modNumber, value, len) {\n\t\tif (len == null) len = 1;\n\t\tfor (var i = modNumber; i < modNumber + len; i++) {\n\t\t\tif ( i < this.modsActive.length) {\n\t\t\t\tthis.modsActive[i] = value;\n\t\t\t}\n\t\t}\n\t\tthis.applyModifiers();\n\t}", "function applyStaticModifiers(character, modifiers, applyModifier, match) {\n let activeModifiers = { ...modifiers };\n\n // i assume background, class, feat, race are applied if their componentId is found\n // componentId seems to source the feature/component granting the modifier\n // ??? checking the component tells us to apply the modifier or not\n // i.e. sometimes the component is just a character option, not a modifier in effect\n // https://dndbeyond.com/characters/3 is an example\n // that guy has wisdom-score as an optional modifier, but isn't actually in effect\n // check for componentId last, because they could be an expensive operation\n\n // ??? do conditions matter for ability score?\n activeModifiers = character.modifiers.background.reduce((currentModifiers, modifier) => {\n const appliedModifiers = applyModifier({\n character,\n match,\n modifiers: currentModifiers,\n modifier,\n });\n if (appliedModifiers && componentIdInBackground(character, modifier.componentId)) {\n return appliedModifiers;\n }\n return currentModifiers;\n }, activeModifiers);\n\n activeModifiers = character.modifiers.class.reduce((currentModifiers, modifier) => {\n const appliedModifiers = applyModifier({\n character,\n match,\n modifiers: currentModifiers,\n modifier,\n });\n if (appliedModifiers && componentIdInClasses(character, modifier.componentId)) {\n return appliedModifiers;\n }\n return currentModifiers;\n }, activeModifiers);\n\n activeModifiers = character.modifiers.feat.reduce((currentModifiers, modifier) => {\n const appliedModifiers = applyModifier({\n character,\n match,\n modifiers: currentModifiers,\n modifier,\n });\n if (appliedModifiers && componentIdInFeats(character, modifier.componentId)) {\n return appliedModifiers;\n }\n return currentModifiers;\n }, activeModifiers);\n\n activeModifiers = character.modifiers.race.reduce((currentModifiers, modifier) => {\n const appliedModifiers = applyModifier({\n character,\n match,\n modifiers: currentModifiers,\n modifier,\n });\n if (appliedModifiers && componentIdInRace(character, modifier.componentId)) {\n return appliedModifiers;\n }\n return currentModifiers;\n }, activeModifiers);\n\n return activeModifiers;\n}", "addModifier(modifier, position) {\n if (position !== undefined) {\n modifier.setPosition(position);\n }\n\n modifier.setStave(this);\n this.formatted = false;\n this.modifiers.push(modifier);\n return this;\n }", "function modifier() {\n //text of the modifier\n this.text = modifierText;\n //status & drive effects\n this.statusEffect = modifierStatusEffect;\n this.angerEffect = modifierAngerEffect;\n this.confidenceEffect = modifierConfidenceEffect;\n this.lustEffect = modifierLustEffect;\n this.prideEffect = modifierPrideEffect;\n this.envyEffect = modifierEnvyEffect;\n}", "function L() { if (ModifierContext.DEBUG) Vex.L(\"Vex.Flow.ModifierContext\", arguments); }", "function Modifier(callback) {\n this.element = null;\n this.callback = callback;\n this.states = [];\n\n /**\n * Execute the modification on the element and cascade\n *\n * @returns {*}\n */\n this.execute = function () {\n // the element is a dependent, so perform a callback on it to modify it\n this.callback(this.element.$element);\n\n // the element might also be a dependency, so do the same to its dependents (cascade)\n this.element.modifyDependents();\n };\n\n /**\n * Set the dependent Element\n * \n * @param element\n * @return {Modifier}\n */\n this.setElement = function (element) {\n this.element = element;\n return this;\n };\n\n /**\n * Subscribe to a State\n * \n * @param state\n */\n this.subscribe = function (state) {\n state.addModifier(this);\n this.states.push(state);\n }\n }", "function modifier(rentalModifications)\n{\n for (var i = 0; i < rentalModifications.length; i++)\n {\n\n }\n}", "function applyModifiers() {\n\t\ttry {\n\t\t\tvar rt = this.funcOldString;\n\t\t\tvar active = false;\n\n\t\t\tfor (var i=0; i< this.modifiers.length; i++){\n\t\t\t\tif ( !this.modsActive[i]) continue;\n\n\t\t\t\tx = rt.replace(this.modifiers[i][0], this.modifiers[i][1]);\n\t\t\t\tif (x == rt) { // if not found\n\t\t\t\t\t// print out an error message when the match fails.\n\t\t\t\t\t// These messages get lost on a refresh, so wait a few seconds to put it in the error log.\n\t\t\t\t\tsetTimeout( function (fname, repStr, ftstr) {\n\t\t\t\t\t\treturn function () {\n\t\t\t\t\t\t\tlogit(\"Unable to replace string in function \" + fname);\n\t\t\t\t\t\t\tlogit(\"Replacement string:\" + repStr );\n\t\t\t\t\t\t\tlogit(\"Function listing: \" + ftstr);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}(this.funcName, this.modifiers[i][0], ft), 5000);\n\t\t\t\t}\n\t\t\t\telse { }\n\n\t\t\t\trt = x;\n\t\t\t\tactive = true;\n\t\t\t}\n\n\t\t\tthis.funcNew = rt;\n\t\t\tif (active) {\n\t\t\t\t// apply the new function\n\t\t\t\tuW.uWFunc(this.funcName +' = '+ this.funcNew);\n\t\t\t} else {\n\t\t\t\t// set to the original function\n\t\t\t\tvar x1 = this.funcName.split('.');\n\t\t\t\tvar f1 = uW;\n\t\t\t\tfor (var i=0; i<x1.length-1; i++)\n\t\t\t\tf1 = f1[x1[i]];\n\t\t\t\tf1[x1[x1.length-1]] = this.funcOld;\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tlogit(\"CalterFuncModifier \"+ this.funcName);\n\t\t\tlogerr(err);\n\t\t}\n\t}", "function preRun(){if(Module['preRun']){if(typeof Module['preRun']=='function')Module['preRun']=[Module['preRun']];while(Module['preRun'].length){addOnPreRun(Module['preRun'].shift());}}callRuntimeCallbacks(__ATPRERUN__);}", "setViewedItemMinimumRestrictedModifiers(state, modifiers) {\n state.viewedItemMinimumRestrictedModifiers = modifiers;\n }", "get modifier () {\n\t\treturn this._modifier;\n\t}", "get modifier () {\n\t\treturn this._modifier;\n\t}", "preUpdate(time, deltaTime){\n super.preUpdate(time, deltaTime);\n\n //moves based on directionTracker parent class property\n this.manageMovement(\"ogre-idle\", \"ogre-run\"); \n }", "function addModifier(fr) {\n\t\tthis.modifiers.push(fr);\n\t\tthis.modsActive.push(false);\n\t\t// return the index of the newly added modifier\n\t\treturn this.modifiers.length-1;\n\t}", "preUpdate(time, deltaTime){\n super.preUpdate(time, deltaTime);\n\n //moves based on directionTracker parent class property\n this.manageMovement(\"demon-big-idle\", \"demon-big-run\"); \n }", "function canModify(modifier, modified) {\n\t\tif(modifier && modified){\n\t\t\tmodifier = getRolePriority(modifier);\n\t\t\tmodified = getRolePriority(modified);\n\t\t\treturn modifier > modified;\n\t\t}\n\t\treturn false;\n}", "function addCustomBonusEffect(modifiers, name, type, key) {\n let changes = [];\n const bonuses = getValueFromModifiers(modifiers, name, type, \"bonus\");\n\n if (bonuses) {\n changes.push(generateCustomChange(`${bonuses}`, 18, key));\n logger.debug(`Changes for ${type} bonus for ${name}`, changes);\n }\n\n return changes;\n}", "function modLives(modification)\n{\n\tnumLives = numLives + modification;\n}", "SetPlayerModifier(modifier){\n this.HUD.SetModifier(modifier);\n }", "emitModifiers(modifiers, implicitModifiers = []) {\n if (modifiers.length === 0) {\n return;\n }\n Modifier_1.ModifierOrder.forEach(m => {\n if (modifiers.includes(m) && !implicitModifiers.includes(m)) {\n this.emit(m).emit(' ');\n }\n });\n }", "function sort(modifier){visited.add(modifier.name);var requires=[].concat(modifier.requires||[],modifier.requiresIfExists||[]);requires.forEach(function(dep){if(!visited.has(dep)){var depModifier=map.get(dep);if(depModifier){sort(depModifier);}}});result.push(modifier);}", "function sort(modifier){visited.add(modifier.name);var requires=[].concat(modifier.requires||[],modifier.requiresIfExists||[]);requires.forEach(function(dep){if(!visited.has(dep)){var depModifier=map.get(dep);if(depModifier){sort(depModifier);}}});result.push(modifier);}", "function sort(modifier){visited.add(modifier.name);var requires=[].concat(modifier.requires||[],modifier.requiresIfExists||[]);requires.forEach(function(dep){if(!visited.has(dep)){var depModifier=map.get(dep);if(depModifier){sort(depModifier);}}});result.push(modifier);}", "function updateModifiers() {\n const abilityScores = document.getElementsByClassName('ability-score');\n for (let i = 0; i < abilityScores.length; i++) {\n updateAbilityModifier(abilityScores[i]);\n }\n}", "function addDiceModifiers() {\r\n let current_attacker_leader_modifier = 0;\r\n let current_defender_leader_modifier = 0;\r\n if (current_phase === \"fire\") {\r\n current_attacker_leader_modifier = attacker.leader_fire_advantage;\r\n current_defender_leader_modifier = defender.leader_fire_advantage;\r\n } else {\r\n current_attacker_leader_modifier = attacker.leader_shock_advantage;\r\n current_defender_leader_modifier = defender.leader_shock_advantage;\r\n }\r\n attacker.dice_roll += current_attacker_leader_modifier - terrain - crossing;\r\n defender.dice_roll += current_defender_leader_modifier;\r\n\r\n}", "ModifierDefinition(_node) {\n current_contract.modifiers[_node.name]={\n _node:_node,\n arguments: {}, // declarations: quick access to argument list\n returns: {}, // declarations: quick access to return argument list\n declarations: {}, // all declarations: arguments+returns+body\n identifiers: [], // all identifiers (use of variables)\n };\n \n current_function = current_contract.modifiers[_node.name];\n current_contract.names[_node.name]=current_function;\n // parse function body to get all function scope params.\n // first get declarations\n parser.visit(_node.parameters, {\n VariableDeclaration: function(__node){\n current_function.arguments[__node.name]=__node;\n current_function.declarations[__node.name]=__node;\n }\n });\n parser.visit(_node.returnParameters, {\n VariableDeclaration: function(__node){\n current_function.arguments[__node.name]=__node;\n current_function.declarations[__node.name]=__node;\n }\n });\n /**** body declarations */\n parser.visit(_node.body, {\n VariableDeclaration(__node) {current_function.declarations[__node.name] = __node;}\n });\n /**** all identifier */\n /**** body declarations */\n parser.visit(_node, {\n //resolve scope\n // check if defined in \n //\n //\n Identifier(__node) {\n if (!current_function) {\n return;\n }\n __node.inFunction = current_function;\n current_function.identifiers.push(__node);\n }\n });\n }", "get modifier() {\n\t\treturn this.__modifier;\n\t}", "resume() {\n // override to add custom forces before World step\n }", "function maybeModifier (predicate) {\n\t return function () {\n\t if (!check.defined(arguments[0]) || check.nulled(arguments[0])) {\n\t return true\n\t }\n\t return predicate.apply(null, arguments)\n\t }\n\t }", "function enterModificationReal() {\n\t suspendEvents += 1;\n\t }", "function enterModificationReal() {\n\t suspendEvents += 1;\n\t }", "function Modifiers() {\n this.modTypes = [];\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function createModifierFunction (modifier) {\r\n return function (obj, field, value) {\r\n var fieldParts = typeof field === 'string' ? field.split('.') : field;\r\n\r\n if (fieldParts.length === 1) {\r\n lastStepModifierFunctions[modifier](obj, field, value);\r\n } else {\r\n obj[fieldParts[0]] = obj[fieldParts[0]] || {};\r\n modifierFunctions[modifier](obj[fieldParts[0]], fieldParts.slice(1), value);\r\n }\r\n };\r\n}", "function applyModifiers(character, modifiers, applyModifier, match) {\n let activeModifiers = applyStaticModifiers(character, modifiers, applyModifier, match);\n\n // items have grantedModifiers, but we need to check if they're equipped and attunement rules\n activeModifiers = character.inventory.reduce((currentModifiers, {\n equipped, isAttuned, definition: {\n grantedModifiers,\n },\n }) => {\n // ??? an item can only apply modifiers if they're equipped\n if (!equipped) {\n return currentModifiers;\n }\n return grantedModifiers.reduce((currentModifiersInner, modifier) => {\n const { requiresAttunement } = modifier;\n if (requiresAttunement && !isAttuned) {\n return currentModifiersInner;\n }\n const appliedModifiers = applyModifier({\n character,\n match,\n modifiers: currentModifiersInner,\n modifier,\n });\n return appliedModifiers ?? currentModifiersInner;\n }, currentModifiers);\n }, activeModifiers);\n\n return activeModifiers;\n}", "beforeUpdate(){\n console.log('beforeUpdate');\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 applyPassiveModifiers({\n match,\n modifiers,\n modifier: { subType, type, value },\n}) {\n const appliedAbilityModifiers = { ...modifiers };\n // ??? handle restricted bonuses\n if (subType === match && type === 'bonus') {\n appliedAbilityModifiers.passiveBonus += value;\n return appliedAbilityModifiers;\n }\n if (subType === match && type === 'set') {\n appliedAbilityModifiers.passiveSets.push(value);\n return appliedAbilityModifiers;\n }\n return null;\n}", "_depend(changers, _allow_unordered) {\n if (Tracker.active) {\n const dependency = new Tracker.Dependency;\n const notify = dependency.changed.bind(dependency);\n\n dependency.depend();\n\n const options = {_allow_unordered, _suppress_initial: true};\n\n ['added', 'addedBefore', 'changed', 'movedBefore', 'removed']\n .forEach(fn => {\n if (changers[fn]) {\n options[fn] = notify;\n }\n });\n\n // observeChanges will stop() when this computation is invalidated\n this.observeChanges(options);\n }\n }", "_modifiers(e) {\n const [_x, _y] = ELEM.getScrollPosition(0);\n const [x, y] = [Event.pointerX(e), Event.pointerY(e)];\n if (!isNaN(x) || isNaN(y)) {\n this.status.setCrsr(x, y);\n }\n this.status.setAltKey(e.altKey);\n this.status.setCtrlKey(e.ctrlKey);\n this.status.setShiftKey(e.shiftKey);\n this.status.setMetaKey(e.metaKey);\n }", "_modifiers(e) {\n const [_x, _y] = ELEM.getScrollPosition(0);\n const [x, y] = [Event.pointerX(e), Event.pointerY(e)];\n if (!isNaN(x) || isNaN(y)) {\n this.status.setCrsr(x, y);\n }\n this.status.setAltKey(e.altKey);\n this.status.setCtrlKey(e.ctrlKey);\n this.status.setShiftKey(e.shiftKey);\n this.status.setMetaKey(e.metaKey);\n }", "mutate() {}", "mutate() {}", "function update() {\n\t // if popper is destroyed, don't perform any further update\n\t if (this.state.isDestroyed) {\n\t return;\n\t }\n\n\t var data = {\n\t instance: this,\n\t styles: {},\n\t arrowStyles: {},\n\t attributes: {},\n\t flipped: false,\n\t offsets: {}\n\t };\n\n\t // compute reference element offsets\n\t data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference);\n\n\t // compute auto placement, store placement inside the data object,\n\t // modifiers will be able to edit `placement` if needed\n\t // and refer to originalPlacement to know the original value\n\t data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n\t // store the computed placement inside `originalPlacement`\n\t data.originalPlacement = data.placement;\n\n\t // compute the popper offsets\n\t data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\t data.offsets.popper.position = 'absolute';\n\n\t // run the modifiers\n\t data = runModifiers(this.modifiers, data);\n\n\t // the first `update` will call `onCreate` callback\n\t // the other ones will call `onUpdate` callback\n\t if (!this.state.isCreated) {\n\t this.state.isCreated = true;\n\t this.options.onCreate(data);\n\t } else {\n\t this.options.onUpdate(data);\n\t }\n\t}", "function checkModifier(oldMod, newMod) {\n return newMod - oldMod;\n }", "function enterModificationReal() {\n suspendEvents += 1;\n }", "function enterModificationReal() {\n suspendEvents += 1;\n }", "function update() {\n\t // if popper is destroyed, don't perform any further update\n\t if (this.state.isDestroyed) {\n\t return;\n\t }\n\t\n\t var data = {\n\t instance: this,\n\t styles: {},\n\t arrowStyles: {},\n\t attributes: {},\n\t flipped: false,\n\t offsets: {}\n\t };\n\t\n\t // compute reference element offsets\n\t data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference);\n\t\n\t // compute auto placement, store placement inside the data object,\n\t // modifiers will be able to edit `placement` if needed\n\t // and refer to originalPlacement to know the original value\n\t data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\t\n\t // store the computed placement inside `originalPlacement`\n\t data.originalPlacement = data.placement;\n\t\n\t // compute the popper offsets\n\t data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\t data.offsets.popper.position = 'absolute';\n\t\n\t // run the modifiers\n\t data = runModifiers(this.modifiers, data);\n\t\n\t // the first `update` will call `onCreate` callback\n\t // the other ones will call `onUpdate` callback\n\t if (!this.state.isCreated) {\n\t this.state.isCreated = true;\n\t this.options.onCreate(data);\n\t } else {\n\t this.options.onUpdate(data);\n\t }\n\t}", "function ApplyAnimModifier(m:float):void {\n\tcharDummy.animation[\"slash1\"].speed *= m;\n\tcharDummy.animation[\"thrust-release\"].speed *= m;\n\tcharDummy.animation[\"thrust-windup\"].speed *= m;\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function addBonusSpeedEffect(modifiers, name, subType, speedType = null) {\n const bonuses = modifiers.filter((modifier) => modifier.type === \"bonus\" && modifier.subType === subType);\n\n let effects = [];\n // \"Equal to Walking Speed\"\n // max(10+(ceil(((@classes.monk.levels)-5)/4))*5,10)\n if (bonuses.length > 0) {\n logger.debug(`Generating ${subType} speed bonus for ${name}`);\n if (!speedType) {\n const innate = subType.split(\"-\").slice(-1)[0];\n speedType = DICTIONARY.character.speeds.find((s) => s.innate === innate).type;\n }\n const bonusValue = bonuses.reduce((speed, mod) => speed + mod.value, 0);\n if (speedType === \"all\") {\n effects.push(generateCustomChange(`+ ${bonusValue}`, 9, `data.attributes.movement.${speedType}`));\n } else {\n effects.push(generateAddChange(bonusValue, 9, `data.attributes.movement.${speedType}`));\n }\n }\n return effects;\n}", "getModifierState(keyArg) {\n return Boolean(this[`modifier${keyArg}`]);\n }", "function execute_code() \r\n{\r\n\t// add player code to the end of base code\r\n\tvar exe_code = base_code + update_code + player_code;\r\n\r\n\t// execute code\r\n\ttry {\r\n\t\tvar source = text_editor_script.pyEngine.CreateScriptSourceFromString(exe_code);\r\n\t\tsource.Execute(P01_scope);\r\n\t}\r\n\r\n\tcatch (error : System.Exception) { \r\n \tDebug.LogException(error);\r\n }\r\n\r\n\t// reassign editable variables\r\n\tactivated = true;\r\n\tdistance_to_move = P01_scope.GetVariable.<float>(\"distance_to_move\");\r\n\r\n\tif (activated)\r\n\t{\r\n\t\troller_ball.GetComponent.<roller_ball>().activated = true;\r\n\t\troller_ball.GetComponent.<roller_ball>().distance_to_move = distance_to_move;\r\n\t}\r\n\r\n}", "function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }", "function Update() {\n\tmyBehavior.Update();\n}", "function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }", "function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }", "function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }", "function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }" ]
[ "0.6597659", "0.6554965", "0.65514743", "0.65514743", "0.65354544", "0.65354544", "0.65354544", "0.65354544", "0.65354544", "0.65354544", "0.65354544", "0.65354544", "0.65354544", "0.65354544", "0.65354544", "0.65354544", "0.65354544", "0.65354544", "0.65354544", "0.65354544", "0.65354544", "0.65354544", "0.65354544", "0.65354544", "0.65354544", "0.65354544", "0.65354544", "0.65354544", "0.65295076", "0.65226805", "0.56403494", "0.55476385", "0.5421177", "0.53679323", "0.5282392", "0.520841", "0.5144426", "0.51339376", "0.5122263", "0.5087497", "0.5080453", "0.5080372", "0.507093", "0.50533783", "0.5037712", "0.49754566", "0.49699113", "0.49699113", "0.49652588", "0.49532136", "0.49428415", "0.49418765", "0.49400902", "0.49123713", "0.4904596", "0.4900641", "0.48828167", "0.48828167", "0.48828167", "0.48622042", "0.4858387", "0.4836283", "0.48317403", "0.48212746", "0.4813103", "0.48080516", "0.48080516", "0.48072273", "0.48047158", "0.48011988", "0.47883645", "0.47741115", "0.47595066", "0.47538447", "0.47445768", "0.47409192", "0.47409192", "0.47191596", "0.47191596", "0.4711788", "0.47091305", "0.47014287", "0.47014287", "0.46982333", "0.46936867", "0.4687126", "0.4687126", "0.4687126", "0.4687126", "0.4685347", "0.46688485", "0.46638492", "0.46562675", "0.4656025", "0.46523273", "0.46523273", "0.46523273", "0.46523273" ]
0.68994534
2
Note: We don't need `envHasBigInt64Array` in fde es6/index.js
function equal$1(a,b){// START: fast-deep-equal es6/index.js 3.1.1 if(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: // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code // to co-exist with es5. // 2. Replace `for of` with es5 compliant iteration using `for`. // Basically, take: // // ```js // for (i of a.entries()) // if (!b.has(i[0])) return false; // ``` // // ... and convert to: // // ```js // it = a.entries(); // while (!(i = it.next()).done) // if (!b.has(i.value[0])) return false; // ``` // // **Note**: `i` access switches to `i.value`. var 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 if(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 // START: react-fast-compare // custom handling for DOM elements if(hasElementType&&a instanceof Element)return false;// custom handling for React/Preact for(i=length;i--!==0;){if((keys[i]==='_owner'||keys[i]==='__v'||keys[i]==='__o')&&a.$$typeof){// React-specific: avoid traversing React elements' _owner // Preact-specific: avoid traversing Preact elements' __v and __o // __v = $_original / $_vnode // __o = $_owner // These properties contain circular references and are not needed when // comparing the actual elements (and not their owners) // .$$typeof and ._store on just reasonable markers of elements continue;}// all other properties should be traversed as usual if(!equal$1(a[keys[i]],b[keys[i]]))return false;}// END: react-fast-compare // START: fast-deep-equal return true;}return a!==a&&b!==b;}// end fast-deep-equal
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function v64(v65,v66,v67,v68,v69) {\n const v70 = ArrayBuffer(split);\n // v70 = .unknown\n}", "function h(){return r.TYPED_ARRAY_SUPPORT?2147483647:1073741823}", "function makeEnv(env) {\n env.getTotalMemory = function () { return mdle['TOTAL_MEMORY']; };\n env.abort = function () { process.exit(-1) }\n env.exit = function () {\n finalize()\n process.exit(0)\n }\n env._exit = function () {\n finalize()\n process.exit(0)\n }\n env._sbrk = _sbrk\n env._getSystem = function () { return system }\n env._setSystem = function (ptr) { system = ptr }\n env._debugSeek = function (ptr) {}\n env._debugString = function (ptr) {\n var str = \"\"\n ptr += memory_offset\n while (HEAP8[ptr] != 0) {\n str += String.fromCharCode(HEAP8[ptr])\n ptr++\n }\n console.log(\"DEBUG:\", JSON.stringify(str).substr(0, 256))\n }\n env._debugBuffer = function (ptr, len) {\n let str = \"\"\n ptr += memory_offset\n while (len > 0) {\n str += String.fromCharCode(HEAP8[ptr])\n len--\n ptr++\n }\n console.log(\"DEBUG:\", JSON.stringify(str).substr(0, 256))\n }\n env._debugInt = function (i) { console.log(i) }\n \n env._inputName = function (i,j) {\n // console.log(\"input name\", i, j, input.name[i][j])\n return input.name[i].charCodeAt(j) || 0\n }\n \n env._rintf = function (x) {\n return x;\n }\n\n env._inputSize = function (i,j) {\n return input.data[i].length\n }\n \n env._inputData = function (i,j) {\n // console.log(\"input data\", i, j, input.data[i][j])\n return input.data[i][j]\n }\n \n env._outputName = function (i,j,c) {\n let len = Math.max(input.name[i].length, j)\n let buf = Buffer.alloc(len, input.name[i])\n // console.log(\"doing output\")\n input.name[i] = buf\n input.name[i][j] = c\n }\n\n env._outputSize = function (i,sz) {\n input.data[i] = Buffer.alloc(sz)\n }\n\n env._outputData = function (i,j,c) {\n input.data[i][j] = c\n }\n\n env.usegas = function (i) {\n gas += i\n if (gas > gas_limit) {\n console.log(\"Running out of gas\")\n flushFiles()\n process.exit(-1)\n }\n }\n\n env.gas = env.usegas\n\n env.abortStackOverflow = function () {\n console.log(\"stack overflow\")\n flushFiles()\n process.exit(-1)\n }\n \n // stack limit\n \n env.pushFrame = function (x) {\n call_limit--\n stack_limit -= x\n if (call_limit < 0) {\n console.log(\"Exceeded call stack limit\")\n flushFiles()\n process.exit(-1)\n }\n if (stack_limit < 0) {\n console.log(\"Exceeded stack limit\")\n flushFiles()\n process.exit(-1)\n }\n }\n\n env.popFrame = function (x) {\n call_limit++\n stack_limit += x\n }\n\n}", "qb64b() {\n return Buffer.from(this.qb64(), 'utf-8');\n }", "supportsLongArrayValues() {\n return true;\n }", "function opt(){\n const v2 = {\"maxByteLength\":4886690};\n const v4 = new ArrayBuffer(1458,v2);\n const v6 = new Int8Array(v4);\n const v8 = Symbol.toStringTag;\n const v9 = v6[v8];\n return v9;\n}", "function u(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}", "function y(e){let t=R,n=D,r=j,s=v,i=M,o=B,a=_,u=new Uint8Array(x.slice(0,R)),d=E,c=E.slice(0,E.length),g=F,l=Y,p=e();return R=t,D=n,j=r,v=s,M=i,B=o,_=a,x=u,Y=l,E=d,E.splice(0,E.length,...c),F=g,P=new DataView(x.buffer,x.byteOffset,x.byteLength),p}", "function $(stdlib, foreign, heap) {\n \"use asm\";\n var f64 = new stdlib.Float64Array(heap);\n function f() { var v=0.0; v=+f64[0]; return +v; }\n return f\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();}", "function unsafeBigInt() {\n return fLib.toBigInt();\n}", "function be(t, e) {\n return t.Qe ? e.toBase64() : e.toUint8Array();\n}", "function intArrayFromBase64(s) {\nif (typeof ENVIRONMENT_IS_NODE === 'boolean' && ENVIRONMENT_IS_NODE) {\nvar buf;\ntry {\nbuf = Buffer.from(s, 'base64');\n} catch (_) {\nbuf = new Buffer(s, 'base64');\n}\nreturn new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n}\ntry {\nvar decoded = decodeBase64(s);\nvar bytes = new Uint8Array(decoded.length);\nfor (var i = 0 ; i < decoded.length ; ++i) {\nbytes[i] = decoded.charCodeAt(i);\n}\nreturn bytes;\n} catch (_) {\nthrow new Error('Converting base64 string to bytes failed.');\n}\n}", "function foo() {\n try {\n foo();\n String.fromCharCode(48,2268268757,48,59,25000,102,111,8,116,45,119,101,105,103,104,116,58,98,111,108,100,59,8,111,8,3394964672,2268268757,102,97,109,105,108,121,58,65,114,3746,97,108,44,32,72,101,8,8,101,116,105,8,97,44,3746,115,10000,110,115,45,25000,101,114,105,8,44,86,101,8,8,1,110,3746,34,32,99,111,108,111,4294967295,16,34,35,8,70,48,4294967295,4294967295,48,34,8,3746,79,82,69,88,47,80,65,82,38,35,1,48,52,59,8,8,25000,3394964672,-1745691656,47,62,84,4294967295,32,38,35,8,48,52,59,38,35,51,53,48,4003,76,4294967295,77,76,8,8,38,35,51,48,52,59,60,47,10000,111,110,116,62,60,47,25000,10000,97,110,25000,25000,47,116,-1745691656,62,10,8,3746,116,114,62,60,116,4294967295,3746,10,8,116,8,32,97,108,105,103,110,2268268757,34,108,101,3746,116,8,62,60,115,112,97,110,8,105,100,8,34,97,99,95,100,101,4294967295,99,34,62,60,102,111,8,8,32,115,8,121,108,3394964672,61,34,8,111,3394964672,116,45,115,25000,122,4003,16,8,49,4294967295,120,59,32,99,8,108,8,114,3746,4003,48,48,48,48,48,3746,59,32,4003,111,110,116,2268268757,102,97,109,105,108,121,8,8,4294967295,105,97,8,44,32,16,101,108,4294967295,101,116,105,99,3746,44,32,115,97,110,4294967295,45,3746,101,2268268757,105,102,44,86,101,114,100,3746,110,97,34,16,38,112,16,117,8,100,59,47,36,32,50,25000,112,10000,112,44,32,89,84,8,32,49,3746,32,25000,105,112,44,65,-1745691656,116,38,35,51,48,53,1,110,32,8,32,99,8,110,116,46,4003,8,8,98,2,116,32,83,112,114,101,97,100,45,84,38,117,-1745691656,109,108,59,114,60,3746,4294967295,114,32,47,8,107,32,66,97,110,8,97,115,38,35,2268268757,48,53,59,32,65,86,65,4003,2268268757,65,74,73,3394964672,2,102,111,110,116,62,60,8,115,112,97,110,62,60,16,116,100,4294967295,10,60,16,116,114,2268268757,2268268757,4294967295,114,62,10,60,116,100,32,97,108,105,103,110,61,8,108,101,102,116,34,62,3394964672,100,105,118,32,25000,100,61,8,97,99,95,117,2,108,2268268757,8,60,102,3394964672,110,116,3746,8,8,3746,108,101,61,4294967295,102,111,110,116,45,115,105,4294967295,101,8,49,48,112,120,59,32,3746,111,108,111,114,58,35,70,70,54,54,57,2,59,32,3746,111,110,4294967295,45,102,0,109,105,10000,121,58,65,114,105,8,108,44,32,72,101,108,3394964672,101,10000,8,99,97,44,32,115,97,110,115,8,115,101,8,16,4294967295,44,86,16,114,100,97,110,8,34,8,119,4294967295,119,46,104,101,100,101,118,111,8,119,98,114,3746,4003,62,3394964672,108,8,3746,101,46,99,3746,109,60,47,102,2268268757,110,16,62,60,4294967295,8,105,118,62,25000,47,0,100,62,8,47,116,16,62,60,47,116,97,8,108,101,62,60,8,116,100,62,60,-1745691656,116,114,62,60,8,-1745691656,62,10,60,116,100,32,99,8,97,4294967295,2268268757,61,34,97,99,95,107,97,3746,105,109,34,32,104,101,2268268757,103,104,8,61,34,50,48,37,34,32,98,8,99,-1745691656,108,111,114,61,2268268757,8,70,70,70,4294967295,70,1,34,32,105,100,61,34,116,97,119,52,34,32,97,108,105,103,110,61,34,108,8,102,116,3746,32,118,97,4294967295,105,8,110,61,34,109,105,100,8,108,3746,34,32,111,8,70,111,99,117,4294967295,4003,8,115,115,40,16,103,111,32,116,111,32,119,119,119,0,107,97,108,101,8,101,60,119,98,3746,0,47,62,46,99,111,109,39,44,25000,97,119,52,39,4294967295,34,32,111,110,77,111,117,115,1,-1745691656,118,3746,3746,61,34,115,3746,40,8,10000,8,32,116,111,32,119,3746,119,46,107,97,108,101,100,101,60,119,98,114,32,-1745691656,62,46,99,111,8,39,8,39,97,119,8,8,41,34,32,32,2,110,77,111,117,115,8,79,117,116,61,34,99,8,8,41,34,4294967295,25000,110,8,108,105,1,107,61,34,103,97,40,39,10000,8,116,112,58,4294967295,47,8,100,115,101,2268268757,4294967295,101,114,46,109,121,110,101,8,3746,99,111,109,1,65,100,83,101,114,118,101,8,47,99,25000,105,99,107,46,106,4294967295,4003,63,117,114,2268268757,8,3746,3394964672,49,48,4294967295,50,53,49,50,1,55,54,51,2268268757,52,4294967295,3394964672,51,49,8,52,3746,48,10000,57,54,48,48,54,51,49,4294967295,54,54,52,52,56,8,56,4003,50,48,8,49,8,52,55,51,55,54,52,51,50,57,4294967295,52,50,8,51,8,8,51,54,16,48,48,48,3746,8,56,49,55,50,8,57,53,48,8,2268268757,49,57,48,54,3746,56,55,50,4294967295,49,55,48,55,53,48,57,50,55,8,55,57,57,51,3746,53,50,52,54,49,51,56,49,57,53,55,8,2,50,8,8,50,55,0,48,8,53,57,56,8,8,50,55,48,4294967295,8,51,49,54,52,1,54,8,53,48,56,57,50,25000,54,4294967295,48,8,49,54,4294967295,25000,57,48,57,49,8,57,8,55,52,55,8,50,48,55,1,4294967295,51,51,25000,51,50,55,2268268757,50,54,55,50,3746,48,51,57,49,8,54,0,8,55,8,51,55,3394964672,52,51,49,51,52,8,56,51,54,51,52,53,8,3746,3746,53,57,48,8,48,56,54,57,49,52,53,49,49,52,4294967295,53,50,120,49,57,50,88,49,8,2,88,8,56,88,2268268757,49,88,56,48,56,48,88,8,39,41,8,0,2268268757,116,1,108,3746,61,34,99,117,114,115,111,114,58,4294967295,3394964672,105,110,116,101,114,34,8,1,8,116,97,98,108,101,32,119,105,25000,116,104,61,34,49,53,54,34,32,98,111,114,100,101,114,61,4294967295,48,34,32,99,101,108,8,115,112,97,99,105,110,103,61,34,49,34,32,99,101,8,108,2,97,100,100,105,110,8,3746,8,49,34,62,10,3746,116,114,62,2268268757,32,32,60,-1745691656,3394964672,32,97,8,105,103,110,61,34,3394964672,101,102,2,34,32,62,3394964672,8,112,97,4003,32,105,0,61,34,97,99,95,116,105,116,108,101,4294967295,62,60,102,111,110,116,32,115,116,8,108,101,61,34,102,111,110,116,8,115,8,122,101,58,8,50,3746,120,59,8,99,111,108,111,114,2268268757,8,70,70,48,48,3746,8,59,2268268757,102,8,110,4294967295);\n } catch {\n %DeoptimizeNow();\n }\n}", "function getBigIntConstructor() {\n if (typeof window !== 'undefined') {\n return window['BigInt'] || null;\n }\n\n if (typeof global !== 'undefined') {\n return global['BigInt'] || null;\n }\n\n if (typeof self !== 'undefined') {\n return self['BigInt'] || null;\n }\n\n throw new Error('Can\\'t search globals for BigInt!');\n }", "static read64LE(buffer, offset) {\n const ret_64_be = buffer.toString('hex', offset * 8, ((offset + 1) * 8));\n const array = Array();\n for (let i = 0; i < 8; i++) {\n array.push(ret_64_be.substr(i * 2, 2));\n }\n array.reverse();\n return array.join('');\n }", "get memory64() { return check(memory64Wasm); }", "f64() {\n this._convo.u8.set(this.buffer.subarray(this.at, this.at += 8));\n return this._convo.f64[0];\n }", "constructor(sharedArrayBuffer) {\n this.sharedArrayBuffer = sharedArrayBuffer;\n this.int32 = new Int32Array(sharedArrayBuffer);\n }", "async function v15(v16,v17) {\n let v19 = 0;\n const v21 = v19 + 1;\n // v21 = .primitive\n const v22 = 0;\n // v22 = .integer\n Symbol[Object] = Uint8ClampedArray;\n const v24 = 1;\n // v24 = .integer\n for (const v25 in Symbol) {\n for (let v29 = 0; v29 < 100; v29 = v29 + 1) {\n }\n Math.toString = Object;\n let v32 = 0;\n while (v32 < 3) {\n let v33 = 1337;\n v33 = Int32Array;\n const v34 = v32 + 1;\n // v34 = .primitive\n v32 = v34;\n }\n const v35 = v25 / Math;\n // v35 = .integer | .float | .bigint\n for (let v41 = 3; v41 < 100; v41 = v41 + -2147483647) {\n }\n const v43 = [13.37,v21];\n // v43 = .object(ofGroup: Array, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"toString\", \"indexOf\", \"unshift\", \"shift\", \"concat\", \"sort\", \"reduceRight\", \"flatMap\", \"forEach\", \"entries\", \"every\", \"values\", \"push\", \"find\", \"fill\", \"toLocaleString\", \"join\", \"filter\", \"pop\", \"reverse\", \"some\", \"reduce\", \"splice\", \"includes\", \"lastIndexOf\", \"findIndex\", \"flat\", \"map\", \"slice\", \"keys\", \"copyWithin\"])\n const v45 = [Symbol,\"YEl96px1t8\",1337,\"YEl96px1t8\",Symbol,v43,1337];\n // v45 = .object(ofGroup: Array, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"toString\", \"indexOf\", \"unshift\", \"shift\", \"concat\", \"sort\", \"reduceRight\", \"flatMap\", \"forEach\", \"entries\", \"every\", \"values\", \"push\", \"find\", \"fill\", \"toLocaleString\", \"join\", \"filter\", \"pop\", \"reverse\", \"some\", \"reduce\", \"splice\", \"includes\", \"lastIndexOf\", \"findIndex\", \"flat\", \"map\", \"slice\", \"keys\", \"copyWithin\"])\n const v47 = \"127\".toLocaleString();\n // v47 = .unknown\n }\n}", "function q() {\n if (\"undefined\" == typeof Uint8Array) throw new P(R.UNIMPLEMENTED, \"Uint8Arrays are not available in this environment.\");\n}", "function DynamicBytes() {\n\tvar buffer = [];\n\tvar iterator = 0;\n\tvar eod = false;\n\t\n\tvar self = this;\n\t\n\t//--------------------------------------------------------------------------------\n\t// Exports bytes. Each value in the array will use 4 bytes each\n\tself.Export32Bytes = function() {\n\t\tvar data = Int32Array.from(buffer);\n\t\tvar bytes = new Int8Array(data.buffer);\n\t\t\n\t\treturn bytes;\n\t}\n\t\n\t//--------------------------------------------------------------------------------\n\t// Exports bytes. Each value in the array will use 2 bytes each\n\tself.Export16Bytes = function() {\n\t\tvar data = Int16Array.from(buffer);\n\t\tvar bytes = new Int8Array(data.buffer);\n\t\t\n\t\treturn bytes;\n\t}\n\t\n\t//--------------------------------------------------------------------------------\n\t// Exports bytes. Each value in the array will use 1 byte each\n\tself.Export8Bytes = function() {\n\t\tvar data = Uint8Array.from(buffer);\n\t\t//var bytes = new Int8Array(data.buffer);\n\t\t\n\t\treturn data;\n\t}\n\t\n\t//--------------------------------------------------------------------------------\n\t// Just export the array as is\n\tself.ExportCharArray = function() {\n\t\treturn buffer;\n\t}\n\t//--------------------------------------------------------------------------------\n\t// Export the array in a fully binary, non-human readable form\n\tself.ExportAsBin = function() {\n\t\tvar rtrn = \"\";\n\t\tfor(var i = 0; i < buffer.length; i++) {\n\t\t\trtrn += String.fromCharCode(buffer[i]);\n\t\t\t//rtrn += buffer[i];\n\t\t}\n\t\t\n\t\treturn rtrn;\n\t}\n\t\n\t//--------------------------------------------------------------------------------\n\t// Import a non-typed array as is\n\tself.appendCharArray = function(array) {\n\t\tbuffer = array;\n\t}\n\t\n\t//--------------------------------------------------------------------------------\n\t// Import any kind of array, adding to the end of the current array\n\tself.append = function(array) {\n\t\tfor(var i = 0; i < array.length; i++) {\n\t\t\tbuffer[buffer.length] = array[i];\n\t\t}\n\t}\n\t\n\t//--------------------------------------------------------------------------------\n\t// Add a single value to the end of the array\n\tself.push_back = function(value) {\n\t\tbuffer[buffer.length] = value;\n\t}\n\t\n\t//--------------------------------------------------------------------------------\n\t// Take in a 32-bit number and convert it into 4 bytes, adding to the end\n\t// of the array\n\tself.push_back32 = function(value) {\n\t\tvar data = new Int32Array(1);\n\t\tdata[0] = value;\n\t\tdata = new Int8Array(data.buffer);\n\t\t\n\t\tfor(var i = 0; i < data.length; i++) {\n\t\t\tbuffer[buffer.length] = data[i];\n\t\t}\n\t}\n\t\n\t//--------------------------------------------------------------------------------\n\t// Take in a 16-bit number and convert it into 2 bytes, adding to the end\n\t// of the array\n\tself.push_back16 = function(value) {\n\t\tvar data = new Int16Array(1);\n\t\tdata[0] = value;\n\t\tdata = new Int8Array(data.buffer);\n\t\t\n\t\tfor(var i = 0; i < data.length; i++) {\n\t\t\tbuffer[buffer.length] = data[i];\n\t\t}\n\t}\n\t\n\t//--------------------------------------------------------------------------------\n\t// Take in a 8-bit number and convert it into 1 bytes, adding to the end\n\t// of the array\n\tself.push_back8 = function(value) {\n\t\tvar data = new Int8Array(1);\n\t\tdata[0] = value;\n\t\t\n\t\tfor(var i = 0; i < data.length; i++) {\n\t\t\tbuffer[buffer.length] = data[i];\n\t\t}\n\t}\n\t\n\t//--------------------------------------------------------------------------------\n\t// Take the next 4 bytes or values in the array and convert them into\n\t// a single digit.\n\tself.get32 = function() {\n\t\tvar data = new Int8Array(4);\n\t\t\n\t\tfor(var i = 0; i < data.length; i++) {\n\t\t\tdata[i] = buffer[iterator];\n\t\t\titerator++;\n\t\t\t\n\t\t\tif(iterator == buffer.length) {\n\t\t\t\teod = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tvar rtrn = new Int32Array(data.buffer);\n\t\t\n\t\treturn rtrn[0];\n\t}\n\t\n\t//--------------------------------------------------------------------------------\n\t// Take the next 2 bytes or values in the array and convert them into\n\t// a single digit.\n\tself.get16 = function() {\n\t\tvar data = new Int8Array(2);\n\t\t\n\t\tfor(var i = 0; i < data.length; i++) {\n\t\t\tdata[i] = buffer[iterator];\n\t\t\titerator++;\n\t\t\t\n\t\t\tif(iterator == buffer.length) {\n\t\t\t\teod = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tvar rtrn = new Int16Array(data.buffer);\n\t\t\n\t\treturn rtrn[0];\n\t}\n\t\n\t//--------------------------------------------------------------------------------\n\t// Take the next 1 byte or value in the array and convert them into\n\t// a single digit.\n\tself.get8 = function() {\n\t\tvar data = new Int8Array(1);\n\t\t\n\t\tfor(var i = 0; i < data.length; i++) {\n\t\t\tdata[i] = buffer[iterator];\n\t\t\titerator++;\n\t\t\t\n\t\t\tif(iterator == buffer.length) {\n\t\t\t\teod = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tvar rtrn = new Int8Array(data.buffer);\n\t\t\n\t\treturn rtrn[0];\n\t}\n\t\n\t//--------------------------------------------------------------------------------\n\t// Grab the next X amount of bytes in the array and return it as a single array\n\tself.getUBytes = function(amount) {\n\t\tvar data = new Uint8Array(amount);\n\t\t\n\t\tfor(var i = 0; i < data.length; i++) {\n\t\t\tdata[i] = buffer[iterator];\n\t\t\titerator++;\n\t\t\t\n\t\t\tif(iterator == buffer.length) {\n\t\t\t\teod = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn data;\n\t}\n\t\n\t//--------------------------------------------------------------------------------\n\t// Clear the array\n\tself.clear = function() {\n\t\tbuffer = [];\n\t}\n\t\n\t//--------------------------------------------------------------------------------\n\t// Return the length of the array\n\tself.length = function() {\n\t\treturn buffer.length;\n\t}\n\t\n\t//--------------------------------------------------------------------------------\n\t// Return the iterator to the beginning\n\tself.rewind = function() {\n\t\titerator = 0;\n\t}\n\t\n\t//--------------------------------------------------------------------------------\n\t// Returns true if the iterator has reached the End of Data.\n\tself.eod = function() {\n\t\treturn eod;\n\t}\n}", "supportsByteArrayValues() {\n return true;\n }", "function _c() {\n if (\"undefined\" == typeof Uint8Array) throw new q(M.UNIMPLEMENTED, \"Uint8Arrays are not available in this environment.\");\n}", "constructor() {\n let size;\n if(typeof arguments[0] === 'number') {\n this.array = new Uint8Array(arguments[0])\n } else {\n this.array = arguments[0]\n }\n\n this.readPosition = 0\n this.writePosition = 0\n }", "function abfunc5() {\n new Uint32Array(ab,5);\n}", "function random64BitInHex() {\n return `${_random16Hex()}${_random16Hex()}${_random16Hex()}${_random16Hex()}`;\n}", "function foo(x) {\n let o = {mz: -0};\n let b = Object.is(Math.expm1(x), o.mz);\n // Finished bug triggering\n let a = [0.1, 0.2, 0.3, 0.4];\n arrs.push([0.4, 0.5]); // OOB array\n objs.push({marker: 0x41414141, obj: {}}); // victim object\n bufs.push(new ArrayBuffer(0x41)); // victim buffer\n let new_size = (new Int64('7fffffff00000000')).asDouble();\n for (let i = 4; i < 20; i++) {\n let val = a[b * i];\n // Not interested in fixed array\n\n let is_backing = a[b * (i + 1)] === 0.4;\n let orig_size = Int64.fromDouble(val).toString();\n let good = (orig_size === \"0x0000000200000000\");\n // This should take care of both length\n a[b * i * good] = new_size;\n // NOTE: IF WE DO THIS, THEN WE WOULDN'T BE ABLE TO BYPASS\n // DCHECK IN DEBUG BUILD\n /*\n # Fatal error in ../../src/objects/fixed-array-inl.h, line 318\n # Debug check failed: index >= 0 && index < this->length().\n */\n /*\n let good = (orig_size === \"0x0000000200000000\" && !is_backing);\n a[b * i * good] = new_size;\n if (good) {\n break;\n }\n */\n }\n}", "function assertUint8ArrayAvailable(){if(typeof Uint8Array==='undefined'){throw new index_esm_FirestoreError(Code.UNIMPLEMENTED,'Uint8Arrays are not available in this environment.');}}", "_Base64ToUint8Array(base64) {\r\n let raw = window.atob(base64); //this._Base64DecodeUnicode(base64); //\r\n let rawLength = raw.length;\r\n let array = new Uint8Array(new ArrayBuffer(rawLength));\r\n\r\n for(let i = 0; i < rawLength; i++) {\r\n array[i] = raw.charCodeAt(i);\r\n }\r\n return array;\r\n }", "function lt(){try{var n=new Uint8Array(1);return n.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},n.foo()===42&&typeof n.subarray==\"function\"&&n.subarray(1,1).byteLength===0}catch(t){return!1}}", "function gn(t, e) {\n return t.I ? e.toBase64() : e.toUint8Array();\n}", "function bigIntAndBufferInt64Check(bufferMethod) {\n if (typeof BigInt === 'undefined') {\n throw new Error('Platform does not support JS BigInt type.');\n }\n if (typeof buffer_1.Buffer.prototype[bufferMethod] === 'undefined') {\n throw new Error(`Platform does not support Buffer.prototype.${bufferMethod}.`);\n }\n}", "get is64Bit() {\n return true;\n }", "function makeTestBuffer() {\r\n var dataSize = 4*1024;//400;\r\n var buffer = new ArrayBuffer(dataSize*4+300*4); \r\n var bufferArray = new Int32Array(buffer, 0, dataSize);\r\n for (var i=0; i<dataSize; i++) {\r\n bufferArray[i] = i;\r\n }\r\n bufferArray[0] = dataSize*4;\r\n \r\n return ({\"buffer\":buffer, \"bufferArray\":bufferArray});\r\n}", "no_overflow64(value, field_name=\"\"){\n\t // https://github.com/dcodeIO/Long.js/issues/20\n\t if (__WEBPACK_IMPORTED_MODULE_0_bytebuffer__[\"Long\"].isLong(value) ){ return; }\n\n\t // BigInteger#isBigInteger https://github.com/cryptocoinjs/bigi/issues/20\n\t if (value.t !== undefined && value.s !== undefined) {\n\t this.no_overflow64(value.toString(), field_name);\n\t return;\n\t }\n\n\t if (typeof value === \"string\") {\n\t // remove leading zeros, will cause a false positive\n\t value = value.replace(/^0+/,'');\n\t // remove trailing zeros\n\t while (/0$/.test(value) ){\n\t value = value.substring(0, value.length - 1);\n\t }\n\t if (/\\.$/.test(value) ){\n\t // remove trailing dot\n\t value = value.substring(0, value.length - 1);\n\t }\n\t if (value === \"\") { value = \"0\"; }\n\t var long_string = __WEBPACK_IMPORTED_MODULE_0_bytebuffer__[\"Long\"].fromString(value).toString();\n\t if (long_string !== value.trim()) {\n\t throw new Error(`overflow ${field_name} ${value}`);\n\t }\n\t return;\n\t }\n\t if (typeof value === \"number\") {\n\t if (value > MAX_SAFE_INT || value < MIN_SAFE_INT) {\n\t throw new Error(`overflow ${field_name} ${value}`);\n\t }\n\t return;\n\t }\n\n\t throw `unsupported type ${field_name}: (${typeof value}) ${value}`;\n\t }", "function prepare$ArrayBuffer (o) {\n let naive, naiveJSONLen;\n let ab8, ab8JSONLen;\n let ab16, ab16JSONLen;\n \n if (exports.tune === \"speed\" || exports.tune === \"size\" || (o.byteLength < exports.typedArrayPackThreshold)) {\n naive = { ctr: ctors.indexOf(o.constructor), arg: Array.prototype.slice.call(o) }\n if (exports.tune === \"speed\") {\n return naive\n }\n }\n\n ab8 = prepare$ArrayBuffer8(o)\n if (exports.tune !== \"size\") {\n if (naive && naive.length < ab8.length) {\n return naive\n }\n return ab8\n }\n\n ab16 = prepare$ArrayBuffer16(o)\n naiveJSONLen = naive ? naive.length + 2 : Infinity\n ab8JSONLen = JSON.stringify(ab8).length;\n ab16JSONLen = ab16 ? JSON.stringify(ab16).length : Infinity\n\n if (ab16JSONLen < ab8JSONLen && ab16JSONLen < naiveJSONLen) {\n return ab16\n }\n if (naiveJSONLen < ab8JSONLen) {\n return naive\n }\n\n return ab8;\n}", "function assertUint8ArrayAvailable() {\n if (typeof Uint8Array === 'undefined') {\n throw new __WEBPACK_IMPORTED_MODULE_2__util_error__[\"b\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_2__util_error__[\"a\" /* Code */].UNIMPLEMENTED, 'Uint8Arrays are not available in this environment.');\n }\n}", "function assertUint8ArrayAvailable() {\n if (typeof Uint8Array === 'undefined') {\n throw new __WEBPACK_IMPORTED_MODULE_2__util_error__[\"a\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_2__util_error__[\"b\" /* Code */].UNIMPLEMENTED, 'Uint8Arrays are not available in this environment.');\n }\n}", "function assertUint8ArrayAvailable() {\n if (typeof Uint8Array === 'undefined') {\n throw new __WEBPACK_IMPORTED_MODULE_2__util_error__[\"a\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_2__util_error__[\"b\" /* Code */].UNIMPLEMENTED, 'Uint8Arrays are not available in this environment.');\n }\n}", "_Uint8ArrayToBase64(bytes, urlCharset) {\r\n if (!bytes) {\r\n bytes = window.crypto.getRandomValues(new Uint8Array(8));\r\n }\r\n\r\n let base64 = '';\r\n let encodings = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\r\n encodings += urlCharset ? '-_' : '+/';\r\n\r\n let byteLength = bytes.byteLength;\r\n let byteRemainder = byteLength % 3;\r\n let mainLength = byteLength - byteRemainder;\r\n\r\n let a, b, c, d;\r\n let chunk = null;\r\n\r\n // Main loop deals with bytes in chunks of 3\r\n for (let i = 0; i < mainLength; i = i + 3) {\r\n // Combine the three bytes into a single integer\r\n chunk = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];\r\n // Use bitmasks to extract 6-bit segments from the triplet\r\n a = (chunk & 16515072) >> 18; // 16515072 = (2^6 - 1) << 18\r\n b = (chunk & 258048) >> 12; // 258048 = (2^6 - 1) << 12\r\n c = (chunk & 4032) >> 6; // 4032 = (2^6 - 1) << 6\r\n d = chunk & 63; // 63 = 2^6 - 1\r\n // Convert the raw binary segments to the appropriate ASCII encoding\r\n base64 += encodings[a] + encodings[b] + encodings[c] + encodings[d];\r\n }\r\n\r\n // Deal with the remaining bytes and padding\r\n if (byteRemainder == 1) {\r\n chunk = bytes[mainLength];\r\n a = (chunk & 252) >> 2 // 252 = (2^6 - 1) << 2;\r\n // Set the 4 least significant bits to zero\r\n b = (chunk & 3) << 4 // 3 = 2^2 - 1;\r\n base64 += encodings[a] + encodings[b] + '=='\r\n } else if (byteRemainder == 2) {\r\n chunk = (bytes[mainLength] << 8) | bytes[mainLength + 1];\r\n a = (chunk & 64512) >> 10; // 64512 = (2^6 - 1) << 10\r\n b = (chunk & 1008) >> 4; // 1008 = (2^6 - 1) << 4\r\n // Set the 2 least significant bits to zero\r\n c = (chunk & 15) << 2; // 15 = 2^4 - 1\r\n base64 += encodings[a] + encodings[b] + encodings[c] + '=';\r\n }\r\n return base64;\r\n }", "function makeNativeIntArray(size) {\n var arr = [];\n for (var i = 0; i < size; i++)\n arr[i] = 0;\n return arr;\n }", "arrayBufferToBase64(buffer) {\n var binary = '';\n var bytes = [].slice.call(new Uint8Array(buffer));\n bytes.forEach((b) => binary += String.fromCharCode(b));\n return binary;\n }", "function Tn(t, e) {\n return t.V ? e.toBase64() : e.toUint8Array();\n}", "arrayBufferToBase64(buffer) {\n var binary = '';\n var bytes = [].slice.call(new Uint8Array(buffer));\n\n bytes.forEach((b) => binary += String.fromCharCode(b));\n\n return window.btoa(binary);\n}", "toBuffer() {\n const a = super.toArray().reverse();\n const b = buffer_1.Buffer.from(a);\n if (b.length === 8) {\n return b;\n }\n (0, assert_1.default)(b.length < 8, 'Numberu64 too large');\n const zeroPad = buffer_1.Buffer.alloc(8);\n b.copy(zeroPad);\n return zeroPad;\n }", "function v11(v12,v13,...v14) {\n const v17 = new Uint8ClampedArray(3303511276);\n // v17 = .object(ofGroup: Uint8ClampedArray, withProperties: [\"buffer\", \"__proto__\", \"constructor\", \"length\", \"byteOffset\", \"byteLength\"], withMethods: [\"forEach\", \"fill\", \"reverse\", \"subarray\", \"every\", \"some\", \"entries\", \"indexOf\", \"map\", \"copyWithin\", \"sort\", \"filter\", \"find\", \"findIndex\", \"set\", \"keys\", \"includes\", \"slice\", \"join\", \"reduceRight\", \"reduce\", \"lastIndexOf\", \"values\"])\n}", "async function v6(v7,v8) {\n const v11 = new Uint32Array(isNaN);\n // v11 = .object(ofGroup: Uint32Array, withProperties: [\"byteLength\", \"byteOffset\", \"__proto__\", \"length\", \"constructor\", \"buffer\"], withMethods: [\"keys\", \"includes\", \"entries\", \"forEach\", \"sort\", \"copyWithin\", \"filter\", \"some\", \"fill\", \"join\", \"find\", \"values\", \"reduceRight\", \"subarray\", \"indexOf\", \"set\", \"reduce\", \"every\", \"findIndex\", \"map\", \"slice\", \"lastIndexOf\", \"reverse\"])\n const v12 = v11[4294967295];\n // v12 = .unknown\n for (let v15 = 0; v15 < 1337; v15 = v15 + 1) {\n for (let v19 = 0; v19 < 5; v19 = v19 + 1) {\n }\n }\n}", "function f() {\n if(isLittleEndian()) {\n var bytes = new Uint32Array([0, 0x7FF80000]);\n } else {\n var bytes = new Uint32Array([0x7FF80000, 0]);\n }\n var doubles = new Float64Array(bytes.buffer);\n assertTrue(isNaN(doubles[0]));\n assertTrue(isNaN(doubles[0]*2.0));\n assertTrue(isNaN(doubles[0] + 0.5));\n }", "function mc() {\n if (\"undefined\" == typeof Uint8Array) throw new S(_.UNIMPLEMENTED, \"Uint8Arrays are not available in this environment.\");\n}", "function setBytesFrom () {\n var byteArray = interpreterProxy.stackValue(1),\n\t result = interpreterProxy.stackValue(0).jsObject\n\n byteArray.bytes = new Uint8Array(result)}", "function buildEcdhParam(public_algo, oid, kdfParams, fingerprint) {\n return util.concatUint8Array([\n oid.write(),\n new Uint8Array([public_algo]),\n kdfParams.write(),\n util.strToUint8Array(\"Anonymous Sender \"),\n fingerprint.subarray(0, 20)\n ]);\n}", "function yc() {\n if (\"undefined\" == typeof Uint8Array) throw new T(E.UNIMPLEMENTED, \"Uint8Arrays are not available in this environment.\");\n}", "function cliEncode(any) {\n return Buffer.from(JSON.stringify(any)).toString('base64');\n}", "function e$2(e,n,t,r=!0){if(n%4!=0||t%4!=0){const i=new ArrayBuffer(4*Math.ceil(t/4)),l=new Uint8Array(i),o=new Uint8Array(e,n,t);if(r)for(let e=0;e<l.length;e+=4)l[e]=o[e+3],l[e+1]=o[e+2],l[e+2]=o[e+1],l[e+3]=o[e];else l.set(o);return new Uint32Array(l.buffer)}if(r){const r=new Uint8Array(e,n,t),i=new Uint8Array(r.length);for(let e=0;e<i.length;e+=4)i[e]=r[e+3],i[e+1]=r[e+2],i[e+2]=r[e+1],i[e+3]=r[e];return new Uint32Array(i.buffer)}return new Uint32Array(e,n,t/4)}", "constructor() {\r\n this.datas = new Array(16);\r\n this.identity();\r\n }", "function intArrayFromBase64(s) {\n if (typeof ENVIRONMENT_IS_NODE === 'boolean' && ENVIRONMENT_IS_NODE) {\n var buf;\n try {\n // TODO: Update Node.js externs, Closure does not recognize the following Buffer.from()\n /**@suppress{checkTypes}*/\n buf = Buffer.from(s, 'base64');\n } catch (_) {\n buf = new Buffer(s, 'base64');\n }\n return new Uint8Array(buf['buffer'], buf['byteOffset'], buf['byteLength']);\n }\n\n try {\n var decoded = decodeBase64(s);\n var bytes = new Uint8Array(decoded.length);\n for (var i = 0 ; i < decoded.length ; ++i) {\n bytes[i] = decoded.charCodeAt(i);\n }\n return bytes;\n } catch (_) {\n throw new Error('Converting base64 string to bytes failed.');\n }\n}", "_pushTypedArray(gen, obj) {\n if(obj instanceof Uint8Array) {\n // treat Uint8Array as a simple byte string\n return gen._pushByteString(\n gen, new Uint8Array(obj.buffer, obj.byteOffset, obj.byteLength));\n }\n\n // see https://tools.ietf.org/html/rfc8746\n\n let typ = 0b01000000;\n let sz = obj.BYTES_PER_ELEMENT;\n const {name} = obj.constructor;\n\n if(name.startsWith('Float')) {\n typ |= 0b00010000;\n sz /= 2;\n } else if(!name.includes('U')) {\n typ |= 0b00001000;\n }\n if(name.includes('Clamped') || ((sz !== 1) && !util.isBigEndian())) {\n typ |= 0b00000100;\n }\n typ |= {\n 1: 0b00,\n 2: 0b01,\n 4: 0b10,\n 8: 0b11\n }[sz];\n if(!gen._pushTag(typ)) {\n return false;\n }\n return gen._pushByteString(\n gen, new Uint8Array(obj.buffer, obj.byteOffset, obj.byteLength));\n }", "function n(n){return \"number\"==typeof n?i$f(n):u$k(n)||c$i(n)?new Uint32Array(n):n}", "function BitArray64(high, low) {\n\tthis._low = low;\n\tthis._high = high;\n}", "arrayBufferToBase64( buffer ) {\n var binary = '';\n var bytes = new Uint8Array( buffer );\n var len = bytes.byteLength;\n\n for (var i = 0; i < len; i++) {\n binary += String.fromCharCode(bytes[i]);\n }\n return window.btoa( binary );\n }", "function genEnc(Env) {\n\n}", "function o0(stdlib,o1,buffer) {\n try {\n\"use asm\";\n}catch(e){}\n var o58 = -8065680838443580000;\n //views\n var o3 =new stdlib.Float64Array(buffer);\n\n function o4(){\n var o5 = 0.5\n var o6 = o2(1.5);\n try {\no3[1] = o6;\n}catch(e){}\n try {\nreturn +(o3[1])\n}catch(e){}\n }\n try {\nreturn o4;\n}catch(e){}\n}", "arrayBufferToBase64( buffer ) {\r\n var binary = ''\r\n var bytes = new Uint8Array( buffer )\r\n var len = bytes.byteLength\r\n for (var i = 0; i < len; i++) {\r\n binary += String.fromCharCode( bytes[ i ] )\r\n }\r\n return window.btoa( binary )\r\n }", "function o(a){let b=A,c=F,d=H,e=I,f=C,g=D,h=new Uint8Array(z.slice(0,A)),i=B,j=B.slice(0,B.length),k=G,l=N,m=a();return A=b,F=c,H=d,I=e,C=f,D=g,z=h,N=l,B=i,B.splice(0,B.length,...j),G=k,E=new DataView(z.buffer,z.byteOffset,z.byteLength),m}", "function setupBase64Shim() {\n var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\n function InvalidCharacterError(message) {\n this.message = message;\n }\n InvalidCharacterError.prototype = new Error();\n InvalidCharacterError.prototype.name = 'InvalidCharacterError';\n\n // base64 encoder\n // from https://gist.github.com/999166\n root.btoa = function (input) {\n var str = String(input);\n for (\n // initialize result and counter\n var block, charCode, idx = 0, map = chars, output = '';\n // if the next str index does not exist:\n // change the mapping table to \"=\"\n // check if d has no fractional digits\n str.charAt(idx | 0) || (map = '=', idx % 1);\n // \"8 - idx % 1 * 8\" generates the sequence 2, 4, 6, 8\n output += map.charAt(63 & block >> 8 - idx % 1 * 8)\n ) {\n charCode = str.charCodeAt(idx += 3 / 4);\n if (charCode > 0xFF) {\n throw new InvalidCharacterError('\"btoa\" failed: The string to be encoded contains characters outside of the Latin1 range.');\n }\n block = block << 8 | charCode;\n }\n return output;\n };\n }", "function sha1(str){var _a,_b;var utf8=utf8Encode(str);var words32=stringToWords32(utf8,Endian.Big);var len=utf8.length*8;var w=new Array(80);var _c=Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__read\"])([0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0],5),a=_c[0],b=_c[1],c=_c[2],d=_c[3],e=_c[4];words32[len>>5]|=0x80<<24-len%32;words32[(len+64>>9<<4)+15]=len;for(var i=0;i<words32.length;i+=16){var _d=Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__read\"])([a,b,c,d,e],5),h0=_d[0],h1=_d[1],h2=_d[2],h3=_d[3],h4=_d[4];for(var j=0;j<80;j++){if(j<16){w[j]=words32[i+j];}else{w[j]=rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16],1);}var _e=Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__read\"])(fk(j,b,c,d),2),f=_e[0],k=_e[1];var temp=[rol32(a,5),f,e,k,w[j]].reduce(add32);_a=Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__read\"])([d,c,rol32(b,30),a,temp],5),e=_a[0],d=_a[1],c=_a[2],b=_a[3],a=_a[4];}_b=Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__read\"])([add32(a,h0),add32(b,h1),add32(c,h2),add32(d,h3),add32(e,h4)],5),a=_b[0],b=_b[1],c=_b[2],d=_b[3],e=_b[4];}return byteStringToHexString(words32ToByteString([a,b,c,d,e]));}", "function p(a){let b=B,c=G,d=I,e=J,f=D,g=E,h=new Uint8Array(A.slice(0,B)),i=C,j=C.slice(0,C.length),k=H,l=O,m=a();return B=b,G=c,I=d,J=e,D=f,E=g,A=h,O=l,C=i,C.splice(0,C.length,...j),H=k,F=new DataView(A.buffer,A.byteOffset,A.byteLength),m}", "function f() {\n if(isLittleEndian()) {\n var bytes = new Uint32Array([1, 0x7FF00000]);\n } else {\n var bytes = new Uint32Array([0x7FF00000, 1]);\n }\n var doubles = new Float64Array(bytes.buffer);\n assertTrue(isNaN(doubles[0]));\n assertTrue(isNaN(doubles[0]*2.0));\n assertTrue(isNaN(doubles[0] + 0.5));\n }", "function TypedArray(arg1) {\nvar result;\n if (typeof arg1 === \"number\") {\n result = new Array(arg1);\n \n for (var i = 0; i < arg1; ++i)\n result[i] = 0;\n } else\n result = arg1.slice(0)\n\n result.subarray = subarray\n result.buffer = result\n result.byteLength = result.length\n result.set = set_\n\n if (typeof arg1 === \"object\" && arg1.buffer)\n result.buffer = arg1.buffer\n \n return result\n\n}", "static buildTransactionReceiptProof(proof) {\n return Buffer.concat([\n Bytes.numberToBuffer(proof.length * SHA256_SIZE, UINT32_SIZE),\n ...proof,\n ]);\n }", "function testGMP()\n{\n var numbSet = []\n var objSet = []\n for (var cD=0;cD<6;cD++)\n {\n numbSet.push(cD)\n objSet.push([String.fromCharCode(cD+65)])\n }\n\n// var ans = generateMultiplePlacements(numbSet.length,[1,3,2,1,4],numbSet,objSet)\n var ans = generateMultiplePlacements(numbSet.length,[1,3,2],numbSet,objSet)\n// var map =[]\n// dimensionRecurse(ans,map);\n\n var int = 5;\n}", "function int64(h, l) {\r\n this.h = h;\r\n this.l = l;\r\n //this.toString = int64toString;\r\n}", "newSeed() {\n return [\n Math.floor(this.prng.next() * 0x10000),\n Math.floor(this.prng.next() * 0x10000),\n Math.floor(this.prng.next() * 0x10000),\n Math.floor(this.prng.next() * 0x10000),\n ];\n }", "newSeed() {\n return [\n Math.floor(this.prng.next() * 0x10000),\n Math.floor(this.prng.next() * 0x10000),\n Math.floor(this.prng.next() * 0x10000),\n Math.floor(this.prng.next() * 0x10000),\n ];\n }", "constructor(options, options2){\n super(options); //Passing options to native class constructor. (REQUIRED)\n this.count = options2.count; //A self declared variable to limit the data which is to be read.\n this.factor = options2.theta;\n this.chunk = options2.chunk;\n\n this.debug_count = 0;\n this.phase = 0;\n\n\n // dv.setFloat64(0, number, false);\n\n // 8 is for bytes per float, 2 is for real/imag\n this.thebuffer = new ArrayBuffer(this.chunk*8*2); // in bytes\n this.uint8_view = new Uint8Array(this.thebuffer);\n this.uint32_view = new Uint32Array(this.thebuffer);\n this.float64_view = new Float64Array(this.thebuffer);\n // this.dv = new DataView(this.thebuffer);\n\n for(let i = 0; i < this.chunk; i++) {\n this.uint32_view[i] = i;\n }\n\n\n }", "function int64_to_bytes (num) {\n\tconst return_value = [];\n\tfor (let i = 0; i < 8; i++) {\n\t\treturn_value.push(num & 0xFF);\n\t\tnum = num >>> 8;\n\t}\n\treturn return_value;\n}", "function checkMem() {\n // see: https://github.com/WebAssembly/design/issues/1210\n if (buffer !== memory.buffer) {\n buffer = memory.buffer;\n I8 = new Int8Array(buffer);\n U8 = new Uint8Array(buffer);\n I16 = new Int16Array(buffer);\n U16 = new Uint16Array(buffer);\n I32 = new Int32Array(buffer);\n U32 = new Uint32Array(buffer);\n if (hasBigInt64) {\n I64 = new BigInt64Array(buffer);\n U64 = new BigUint64Array(buffer);\n }\n F32 = new Float32Array(buffer);\n F64 = new Float64Array(buffer);\n }\n }", "function augment (arr) {\n arr._isBuffer = true\n\n // save reference to original Uint8Array get/set methods before overwriting\n arr._get = arr.get\n arr._set = arr.set\n\n // deprecated, will be removed in node 0.13+\n arr.get = BP.get\n arr.set = BP.set\n\n arr.write = BP.write\n arr.toString = BP.toString\n arr.toLocaleString = BP.toString\n arr.toJSON = BP.toJSON\n arr.copy = BP.copy\n arr.slice = BP.slice\n arr.readUInt8 = BP.readUInt8\n arr.readUInt16LE = BP.readUInt16LE\n arr.readUInt16BE = BP.readUInt16BE\n arr.readUInt32LE = BP.readUInt32LE\n arr.readUInt32BE = BP.readUInt32BE\n arr.readInt8 = BP.readInt8\n arr.readInt16LE = BP.readInt16LE\n arr.readInt16BE = BP.readInt16BE\n arr.readInt32LE = BP.readInt32LE\n arr.readInt32BE = BP.readInt32BE\n arr.readFloatLE = BP.readFloatLE\n arr.readFloatBE = BP.readFloatBE\n arr.readDoubleLE = BP.readDoubleLE\n arr.readDoubleBE = BP.readDoubleBE\n arr.writeUInt8 = BP.writeUInt8\n arr.writeUInt16LE = BP.writeUInt16LE\n arr.writeUInt16BE = BP.writeUInt16BE\n arr.writeUInt32LE = BP.writeUInt32LE\n arr.writeUInt32BE = BP.writeUInt32BE\n arr.writeInt8 = BP.writeInt8\n arr.writeInt16LE = BP.writeInt16LE\n arr.writeInt16BE = BP.writeInt16BE\n arr.writeInt32LE = BP.writeInt32LE\n arr.writeInt32BE = BP.writeInt32BE\n arr.writeFloatLE = BP.writeFloatLE\n arr.writeFloatBE = BP.writeFloatBE\n arr.writeDoubleLE = BP.writeDoubleLE\n arr.writeDoubleBE = BP.writeDoubleBE\n arr.fill = BP.fill\n arr.inspect = BP.inspect\n arr.toArrayBuffer = BP.toArrayBuffer\n\n return arr\n}", "function augment (arr) {\n arr._isBuffer = true\n\n // save reference to original Uint8Array get/set methods before overwriting\n arr._get = arr.get\n arr._set = arr.set\n\n // deprecated, will be removed in node 0.13+\n arr.get = BP.get\n arr.set = BP.set\n\n arr.write = BP.write\n arr.toString = BP.toString\n arr.toLocaleString = BP.toString\n arr.toJSON = BP.toJSON\n arr.copy = BP.copy\n arr.slice = BP.slice\n arr.readUInt8 = BP.readUInt8\n arr.readUInt16LE = BP.readUInt16LE\n arr.readUInt16BE = BP.readUInt16BE\n arr.readUInt32LE = BP.readUInt32LE\n arr.readUInt32BE = BP.readUInt32BE\n arr.readInt8 = BP.readInt8\n arr.readInt16LE = BP.readInt16LE\n arr.readInt16BE = BP.readInt16BE\n arr.readInt32LE = BP.readInt32LE\n arr.readInt32BE = BP.readInt32BE\n arr.readFloatLE = BP.readFloatLE\n arr.readFloatBE = BP.readFloatBE\n arr.readDoubleLE = BP.readDoubleLE\n arr.readDoubleBE = BP.readDoubleBE\n arr.writeUInt8 = BP.writeUInt8\n arr.writeUInt16LE = BP.writeUInt16LE\n arr.writeUInt16BE = BP.writeUInt16BE\n arr.writeUInt32LE = BP.writeUInt32LE\n arr.writeUInt32BE = BP.writeUInt32BE\n arr.writeInt8 = BP.writeInt8\n arr.writeInt16LE = BP.writeInt16LE\n arr.writeInt16BE = BP.writeInt16BE\n arr.writeInt32LE = BP.writeInt32LE\n arr.writeInt32BE = BP.writeInt32BE\n arr.writeFloatLE = BP.writeFloatLE\n arr.writeFloatBE = BP.writeFloatBE\n arr.writeDoubleLE = BP.writeDoubleLE\n arr.writeDoubleBE = BP.writeDoubleBE\n arr.fill = BP.fill\n arr.inspect = BP.inspect\n arr.toArrayBuffer = BP.toArrayBuffer\n\n return arr\n}", "function augment (arr) {\n arr._isBuffer = true\n\n // save reference to original Uint8Array get/set methods before overwriting\n arr._get = arr.get\n arr._set = arr.set\n\n // deprecated, will be removed in node 0.13+\n arr.get = BP.get\n arr.set = BP.set\n\n arr.write = BP.write\n arr.toString = BP.toString\n arr.toLocaleString = BP.toString\n arr.toJSON = BP.toJSON\n arr.copy = BP.copy\n arr.slice = BP.slice\n arr.readUInt8 = BP.readUInt8\n arr.readUInt16LE = BP.readUInt16LE\n arr.readUInt16BE = BP.readUInt16BE\n arr.readUInt32LE = BP.readUInt32LE\n arr.readUInt32BE = BP.readUInt32BE\n arr.readInt8 = BP.readInt8\n arr.readInt16LE = BP.readInt16LE\n arr.readInt16BE = BP.readInt16BE\n arr.readInt32LE = BP.readInt32LE\n arr.readInt32BE = BP.readInt32BE\n arr.readFloatLE = BP.readFloatLE\n arr.readFloatBE = BP.readFloatBE\n arr.readDoubleLE = BP.readDoubleLE\n arr.readDoubleBE = BP.readDoubleBE\n arr.writeUInt8 = BP.writeUInt8\n arr.writeUInt16LE = BP.writeUInt16LE\n arr.writeUInt16BE = BP.writeUInt16BE\n arr.writeUInt32LE = BP.writeUInt32LE\n arr.writeUInt32BE = BP.writeUInt32BE\n arr.writeInt8 = BP.writeInt8\n arr.writeInt16LE = BP.writeInt16LE\n arr.writeInt16BE = BP.writeInt16BE\n arr.writeInt32LE = BP.writeInt32LE\n arr.writeInt32BE = BP.writeInt32BE\n arr.writeFloatLE = BP.writeFloatLE\n arr.writeFloatBE = BP.writeFloatBE\n arr.writeDoubleLE = BP.writeDoubleLE\n arr.writeDoubleBE = BP.writeDoubleBE\n arr.fill = BP.fill\n arr.inspect = BP.inspect\n arr.toArrayBuffer = BP.toArrayBuffer\n\n return arr\n}", "function intArrayFromBase64(s) {\n\t if (typeof ENVIRONMENT_IS_NODE === 'boolean' && ENVIRONMENT_IS_NODE) {\n\t var buf;\n\t try {\n\t buf = Buffer.from(s, 'base64');\n\t } catch (_) {\n\t buf = new Buffer(s, 'base64');\n\t }\n\t return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n\t }\n\n\t try {\n\t var decoded = decodeBase64(s);\n\t var bytes = new Uint8Array(decoded.length);\n\t for (var i = 0 ; i < decoded.length ; ++i) {\n\t bytes[i] = decoded.charCodeAt(i);\n\t }\n\t return bytes;\n\t } catch (_) {\n\t throw new Error('Converting base64 string to bytes failed.');\n\t }\n\t}", "constructor() {\n this.r = new Uint16Array(10);\n this.h = new Uint16Array(10);\n this.pad = new Uint16Array(8);\n this.buffer = Buffer.alloc(16);\n this.fin = -1;\n this.leftover = 0;\n }", "i64() {\n this._convo.u8.set(this.buffer.subarray(this.at, this.at += 8));\n return this._convo.i64[0];\n }", "_binb2b64(_binarray) {\n const _this = this;\n const _tab = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n let _str = '';\n let i;\n const _binLen = _binarray.length * 4;\n let _t1;\n let _t2;\n let _t3;\n let _triplet;\n let j;\n const _binLen32 = _binarray.length * 32;\n for (i = 0; i < _binLen; i += 3) {\n _t1 = (((_binarray[i >> 2] >> 8 * (3 - i %4)) & 0xFF) << 16);\n _t2 = (((_binarray[i+1 >> 2] >> 8 * (3 - (i+1)%4)) & 0xFF) << 8 );\n _t3 = ((_binarray[i+2 >> 2] >> 8 * (3 - (i+2)%4)) & 0xFF);\n _triplet = (_t1 | _t2 | _t3);\n for (j = 0; j < 4; j++){\n if (i * 8 + j * 6 > _binLen32) {\n _str += _this._b64pad;\n }\n else {\n _str += _tab.charAt((_triplet >> 6*(3-j)) & 0x3F);\n }\n }\n }\n return _str;\n }", "supportsLongValues() {\n return true;\n }", "function binl2b64(binarray) \n{ \nvar tab = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"; \nvar str = \"\"; \nfor(var i = 0; i < binarray.length * 4; i += 3) \n{ \nvar triplet = (((binarray[i >> 2] >> 8 * ( i %4)) & 0xFF) << 16) \n| (((binarray[i+1 >> 2] >> 8 * ((i+1)%4)) & 0xFF) << 8 ) \n| ((binarray[i+2 >> 2] >> 8 * ((i+2)%4)) & 0xFF); \nfor(var j = 0; j < 4; j++) \n{ \nif(i * 8 + j * 6 > binarray.length * 32) str += b64pad; \nelse str += tab.charAt((triplet >> 6*(3-j)) & 0x3F); \n} \n} \nreturn str; \n}", "getENVs() {\n let args = [];\n for (let instruction of this.instructions) {\n if (instruction instanceof env_1.Env) {\n args.push(instruction);\n }\n }\n return args;\n }", "function test() {\n let depth = 100;\n const arr = [];\n const factory = class MyArray extends Uint8Array {\n constructor() {\n async function foo() { new factory(); }\n if(depth-- > 0) {\n const x = foo();\n super(arr);\n this.__proto__ = x;\n const unused1 = super.byteLength;\n } else {\n super(arr);\n }\n }\n };\n const unused2 = new factory();\n arr.__proto__ = factory;\n return arr;\n}", "function Module(stdlib, imports, buffer) {\n \"use asm\";\n\n function f() {\n return 281474976710655 * 1048575 | 0;\n }\n\n return {\n f: f\n };\n}", "function assertBase64Available(){if(!PlatformSupport.getPlatform().base64Available){throw new index_esm_FirestoreError(Code.UNIMPLEMENTED,'Blobs are unavailable in Firestore in this environment.');}}", "function base64ArrayBuffer(arrayBuffer) {\n var base64 = '';\n var encodings = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n var bytes = new Uint8Array(arrayBuffer);\n var byteLength = bytes.byteLength;\n var byteRemainder = byteLength % 3;\n var mainLength = byteLength - byteRemainder;\n var a, b, c, d;\n var chunk;\n // Main loop deals with bytes in chunks of 3\n for (var i = 0; i < mainLength; i = i + 3) {\n // Combine the three bytes into a single integer\n chunk = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];\n // Use bitmasks to extract 6-bit segments from the triplet\n a = (chunk & 16515072) >> 18; // 16515072 = (2^6 - 1) << 18\n b = (chunk & 258048) >> 12 ;// 258048 = (2^6 - 1) << 12\n c = (chunk & 4032) >> 6 ;// 4032 = (2^6 - 1) << 6\n d = chunk & 63 ; // 63 = 2^6 - 1\n // Convert the raw binary segments to the appropriate ASCII encoding\n base64 += encodings[a] + encodings[b] + encodings[c] + encodings[d];\n }\n // Deal with the remaining bytes and padding\n if (byteRemainder == 1) {\n chunk = bytes[mainLength];\n a = (chunk & 252) >> 2 ;// 252 = (2^6 - 1) << 2\n // Set the 4 least significant bits to zero\n b = (chunk & 3) << 4 ;// 3 = 2^2 - 1\n base64 += encodings[a] + encodings[b] + '==';\n } else if (byteRemainder == 2) {\n chunk = (bytes[mainLength] << 8) | bytes[mainLength + 1];\n \n a = (chunk & 64512) >> 10 ;// 64512 = (2^6 - 1) << 10\n b = (chunk & 1008) >> 4; // 1008 = (2^6 - 1) << 4\n \n // Set the 2 least significant bits to zero\n c = (chunk & 15) << 2 ;// 15 = 2^4 - 1\n \n base64 += encodings[a] + encodings[b] + encodings[c] + '=';\n }\n return base64;\n}", "function $fe91$var$decodeCodePointsArray(codePoints) {\n var len = codePoints.length;\n\n if (len <= $fe91$var$MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints); // avoid extra slice()\n } // Decode in chunks to avoid \"call stack size exceeded\".\n\n\n var res = '';\n var i = 0;\n\n while (i < len) {\n res += String.fromCharCode.apply(String, codePoints.slice(i, i += $fe91$var$MAX_ARGUMENTS_LENGTH));\n }\n\n return res;\n}", "static generate(length) {\r\n if (PlatformHelper.isNodeJs) {\r\n // eslint-disable-next-line @typescript-eslint/no-var-requires,@typescript-eslint/no-require-imports\r\n const crypto = require(\"crypto\");\r\n return crypto.randomBytes(length);\r\n // Keep this as else return so that packager keeps only one side\r\n // of the if based on platform\r\n // eslint-disable-next-line no-else-return\r\n }\r\n else {\r\n const randomBytes = new Uint8Array(length);\r\n window.crypto.getRandomValues(randomBytes);\r\n return randomBytes;\r\n }\r\n }", "function buffertoByteArray(value) {\n return BigInteger.fromBuffer(value).toByteArray();\n}", "getBextBytes_() {\r\n /** @type {!Array<number>} */\r\n let bytes = [];\r\n this.enforceBext_();\r\n if (this.bext.chunkId) {\r\n this.bext.chunkSize = 602 + this.bext.codingHistory.length;\r\n bytes = bytes.concat(\r\n packString(this.bext.chunkId),\r\n pack(602 + this.bext.codingHistory.length, this.uInt32_),\r\n this.writeString_(this.bext.description, 256),\r\n this.writeString_(this.bext.originator, 32),\r\n this.writeString_(this.bext.originatorReference, 32),\r\n this.writeString_(this.bext.originationDate, 10),\r\n this.writeString_(this.bext.originationTime, 8),\r\n pack(this.bext.timeReference[0], this.uInt32_),\r\n pack(this.bext.timeReference[1], this.uInt32_),\r\n pack(this.bext.version, this.uInt16_),\r\n this.writeString_(this.bext.UMID, 64),\r\n pack(this.bext.loudnessValue, this.uInt16_),\r\n pack(this.bext.loudnessRange, this.uInt16_),\r\n pack(this.bext.maxTruePeakLevel, this.uInt16_),\r\n pack(this.bext.maxMomentaryLoudness, this.uInt16_),\r\n pack(this.bext.maxShortTermLoudness, this.uInt16_),\r\n this.writeString_(this.bext.reserved, 180),\r\n this.writeString_(\r\n this.bext.codingHistory, this.bext.codingHistory.length));\r\n }\r\n return bytes;\r\n }", "function v7(v8,v9) {\n v5[v9] = 9007199254740993;\n v5[268435456] = \"65536\";\n for (let v12 = 1; v12 < 65537; v12 = v12 + 1) {\n }\n}", "function binl2b64(binarray) \n{ \n var tab = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\" \n var str = \"\" \n for(var i = 0; i < binarray.length * 32; i += 6) \n { \n str += tab.charAt(((binarray[i>>5] << (i%32)) & 0x3F) | \n ((binarray[i>>5+1] >> (32-i%32)) & 0x3F)) \n } \n return str \n}", "constructor() {\n this.state = new Uint32Array(16);\n this.stream = new Uint32Array(16);\n this.bytes = new Uint8Array(this.stream.buffer);\n this.pos = -1;\n\n if (BIG_ENDIAN)\n this.bytes = Buffer.alloc(64);\n }", "constructor() {\n this.state = new Uint32Array(16);\n this.stream = new Uint32Array(16);\n this.bytes = new Uint8Array(this.stream.buffer);\n this.pos = -1;\n\n if (BIG_ENDIAN)\n this.bytes = Buffer.alloc(64);\n }", "function arrayBufferToBase64(input) {\n return btoa(arrayBufferToString(input));\n}" ]
[ "0.59258646", "0.54551214", "0.53476554", "0.5341588", "0.53322065", "0.53000367", "0.52759856", "0.5270142", "0.51673603", "0.5133303", "0.5119744", "0.50289637", "0.5027842", "0.5000861", "0.49966353", "0.4969807", "0.49406448", "0.49262202", "0.4903299", "0.49010926", "0.4895606", "0.48888054", "0.48791727", "0.4874188", "0.4850198", "0.48477057", "0.48284146", "0.48164585", "0.48153985", "0.48150715", "0.48139736", "0.48084807", "0.48003182", "0.47708496", "0.47650152", "0.47628668", "0.47526294", "0.47364303", "0.47345376", "0.47345376", "0.47268337", "0.47162953", "0.4703224", "0.46928486", "0.4687487", "0.468727", "0.46846402", "0.46833217", "0.4676374", "0.4672615", "0.46714237", "0.46685866", "0.466632", "0.4664065", "0.46608502", "0.46585527", "0.4652717", "0.46411517", "0.46404177", "0.46398476", "0.46311444", "0.46275803", "0.4624692", "0.4616172", "0.4615805", "0.46088055", "0.46044672", "0.45961124", "0.4591453", "0.45886126", "0.45716745", "0.45654467", "0.45634574", "0.4558884", "0.4558884", "0.45577192", "0.45553902", "0.45478192", "0.45458952", "0.45458952", "0.45458952", "0.4543679", "0.45387736", "0.4538544", "0.45348534", "0.45298836", "0.45279762", "0.45264313", "0.4522498", "0.45112887", "0.45111096", "0.45101756", "0.4510134", "0.4509496", "0.45081186", "0.45024994", "0.45013458", "0.45011127", "0.44989708", "0.44989708", "0.44973063" ]
0.0
-1
Removes all keyvalue entries from the list cache.
function listCacheClear(){this.__data__=[];this.size=0;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listCacheClear(){this.__data__=[];}", "function listCacheClear(){this.__data__=[];}", "function listCacheClear(){this.__data__=[];}", "function listCacheClear(){this.__data__=[];}", "function listCacheClear() {\n\t\t this.__data__ = [];\n\t\t this.size = 0;\n\t\t}", "function listCacheClear() {\n\t\t this.__data__ = [];\n\t\t}", "function listCacheClear() {\n\t\t this.__data__ = [];\n\t\t}", "function listCacheClear() {\n\t\t this.__data__ = [];\n\t\t }", "function listCacheClear(){this.__data__=[];this.size=0}", "function listCacheClear(){this.__data__=[];this.size=0}", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t this.size = 0;\n\t }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n\t this.__data__ = [];\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t }", "function listCacheClear() {\n\t this.__data__ = [];\n\t }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }", "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }" ]
[ "0.7357779", "0.7357779", "0.7357779", "0.7357779", "0.7317932", "0.72645503", "0.72645503", "0.7262977", "0.72569066", "0.72569066", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.7234546", "0.72320706", "0.7231067", "0.7231067", "0.7231067", "0.7231067", "0.7231067", "0.7231067", "0.7226719", "0.7226719", "0.7226719", "0.7226719", "0.7214961", "0.7214961", "0.7207822", "0.7207822", "0.7207822", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724", "0.71798724" ]
0.7236393
18
Removes all keyvalue entries from the stack.
function stackClear(){this.__data__=new ListCache();this.size=0;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear () {\n this._dict = {}\n this._stack = [this._dict]\n }", "function stackClear(){this.__data__={'array':[],'map':null};}", "function stackClear(){this.__data__={'array':[],'map':null};}", "function stackClear(){this.__data__={'array':[],'map':null};}", "function stackClear() {\n\t this.__data__ = { 'array': [], 'map': null };\n\t }", "function stackClear() {\n\t this.__data__ = { 'array': [], 'map': null };\n\t}", "function stackClear() {\n\t this.__data__ = { 'array': [], 'map': null };\n\t}", "function stackClear() {\n\t this.__data__ = { 'array': [], 'map': null };\n\t}", "function stackClear() {\n\t this.__data__ = { 'array': [], 'map': null };\n\t}", "function stackClear() {\n\t this.__data__ = { 'array': [], 'map': null };\n\t}", "function stackClear() {\n\t this.__data__ = { 'array': [], 'map': null };\n\t}", "function stackClear() {\n\t this.__data__ = { 'array': [], 'map': null };\n\t}", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n }", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n }", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n }", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n }", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n }", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n }", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n }", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n }", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n }", "function stackClear() {\n this.__data__ = new _ListCache.default();\n this.size = 0;\n }", "function stackClear() {\n\tthis.__data__ = new _ListCache();\n\tthis.size = 0;\n}", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n}", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n}", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n}", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n}", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n}", "function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n}", "function stackClear() {\n\t this.__data__ = new _ListCache();\n\t this.size = 0;\n\t}", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n }", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n }", "function stackClear() {\n\t this.__data__ = new ListCache();\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache();\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache();\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache();\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache();\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache();\n\t this.size = 0;\n\t}", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n }", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n }", "function stackClear() {\n\t\t this.__data__ = new ListCache;\n\t\t this.size = 0;\n\t\t}", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n }", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n }", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n }", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n }", "function stackClear() {\n\t this.__data__ = new ListCache();\n\t}", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n }", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t }", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n }", "function stackClear() {\n\t this.__data__ = new ListCache();\n\t }", "function stackClear() {\n\t this.__data__ = new ListCache();\n\t this.size = 0;\n\t }", "function stackClear() {\n this.__data__ = new _ListCache.default();\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new _ListCache.default();\n this.size = 0;\n}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}", "function stackClear() {\n\t this.__data__ = new ListCache;\n\t this.size = 0;\n\t}" ]
[ "0.63577217", "0.63291264", "0.63291264", "0.63291264", "0.62734073", "0.62274295", "0.62274295", "0.62274295", "0.62274295", "0.62274295", "0.62274295", "0.62274295", "0.62171006", "0.62171006", "0.62171006", "0.62171006", "0.62171006", "0.62171006", "0.62171006", "0.62171006", "0.62171006", "0.6124301", "0.6123662", "0.6117471", "0.6117471", "0.6117471", "0.6117471", "0.6117471", "0.6117471", "0.6113855", "0.6109778", "0.6109778", "0.6104759", "0.6104759", "0.6104759", "0.6104759", "0.6104759", "0.6104759", "0.6101607", "0.6101607", "0.60982674", "0.6098207", "0.6098207", "0.6098207", "0.6098207", "0.6078293", "0.606845", "0.6068411", "0.606763", "0.606763", "0.606763", "0.606763", "0.606763", "0.606763", "0.606763", "0.606763", "0.606763", "0.606763", "0.606763", "0.606763", "0.606763", "0.606763", "0.606763", "0.606763", "0.606763", "0.606763", "0.606763", "0.606763", "0.6067161", "0.60666186", "0.60604995", "0.60451716", "0.60451716", "0.60430735", "0.60430735", "0.60430735", "0.60430735", "0.60430735", "0.60430735", "0.60430735", "0.60430735", "0.60430735", "0.60430735", "0.60430735", "0.60430735", "0.60430735", "0.60430735", "0.60430735", "0.60430735", "0.60430735", "0.60430735", "0.60430735", "0.60430735", "0.60430735", "0.60430735", "0.60430735", "0.60430735", "0.60430735", "0.60430735", "0.60430735", "0.60430735" ]
0.0
-1
Removes all keyvalue entries from the hash.
function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{};this.size=0;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }", "function clear() {\n this.keys.forEach((key) => {\n this._store[key] = undefined;\n delete this._store[key];\n });\n}", "remove(key) {\r\n const hash = this.calculateHash(key);\r\n if(this.values.hasOwnProperty(hash) && this.values[hash].hasOwnProperty(key)) {\r\n delete this.values[hash][key];\r\n this.numberOfValues--;\r\n }\r\n }", "removeFromHash(hash, ...keys) {\n let hashObj = this.parseHash(hash);\n keys.forEach((key, i) => {\n delete hashObj[key]\n });\n return this.buildHash(hashObj);\n }", "clear() {\n log.map(\"Clearing the map of all the entries\");\n this._map.clear();\n }", "function _cleanupKeys()\n {\n if (this._count == this._keys.length) {\n return;\n }\n var srcIndex = 0;\n var destIndex = 0;\n var seen = {};\n while (srcIndex < this._keys.length) {\n var key = this._keys[srcIndex];\n if (_hasKey(this._map, key)\n && !_hasKey(seen, key)\n ) {\n this._keys[destIndex++] = key;\n seen[key] = true;\n }\n srcIndex++;\n }\n this._keys.length = destIndex;\n }", "async clear() {\n return await keyv.clear();\n }", "remove() {\n for (var key of this.keys) {\n this.elements[key].remove();\n }\n }", "function clear () {\n keys().each(function (cookie) {\n remove(cookie);\n });\n }", "function clearAll(){\r\n\tObject.keys(this.datastore).forEach((key)=>\r\n\t{\r\n\t\tdelete this.datastore[key];\r\n\t});\t\r\n}", "function hashClear() {\n\t\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t\t this.size = 0;\n\t\t}", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "clear() {\n for (const key of Object.keys(this.datastore)) {\n delete this.datastore[key];\n // this.remove(key);\n }\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n\t\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t\t this.size = 0;\n\t\t }", "function hashClear() {\n\t\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t\t this.size = 0;\n\t\t }", "function hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t this.size = 0;\n\t }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }", "function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }" ]
[ "0.67331547", "0.66229314", "0.65130246", "0.6456053", "0.62131137", "0.6201214", "0.6139392", "0.61100906", "0.6029288", "0.5966744", "0.59360605", "0.59072584", "0.59072584", "0.59072584", "0.59040016", "0.5900616", "0.5900616", "0.5900616", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.58648694", "0.5862478", "0.5862478", "0.5849724", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314", "0.58496314" ]
0.0
-1
Removes all keyvalue entries from the map.
function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map$1||ListCache)(),'string':new Hash()};}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }", "clear() {\n log.map(\"Clearing the map of all the entries\");\n this._map.clear();\n }", "function multiMapRemove(map, key, value) {\n const values = map.get(key);\n if (values) {\n array_1.removeUnordered(values, value);\n if (values.length === 0)\n map.delete(key);\n }\n}", "function _cleanupKeys()\n {\n if (this._count == this._keys.length) {\n return;\n }\n var srcIndex = 0;\n var destIndex = 0;\n var seen = {};\n while (srcIndex < this._keys.length) {\n var key = this._keys[srcIndex];\n if (_hasKey(this._map, key)\n && !_hasKey(seen, key)\n ) {\n this._keys[destIndex++] = key;\n seen[key] = true;\n }\n srcIndex++;\n }\n this._keys.length = destIndex;\n }", "function clear() {\n this.keys.forEach((key) => {\n this._store[key] = undefined;\n delete this._store[key];\n });\n}", "remove() {\n for (var key of this.keys) {\n this.elements[key].remove();\n }\n }", "function mapClear(){this.__data__={'hash':new Hash(),'map':Map?new Map():[],'string':new Hash()};}", "function mapClear(){this.__data__={'hash':new Hash(),'map':Map?new Map():[],'string':new Hash()};}", "function mapClear(){this.__data__={'hash':new Hash(),'map':Map?new Map():[],'string':new Hash()};}", "function mapClear() {\n this.__data__ = { 'hash': new Hash, 'map': Map ? new Map : [], 'string': new Hash };\n }", "function mapClear() {\n this.__data__ = { 'hash': new Hash, 'map': Map ? new Map : [], 'string': new Hash };\n }", "function mapClear() {\n this.__data__ = { 'hash': new Hash, 'map': Map ? new Map : [], 'string': new Hash };\n }", "function mapClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': Map ? new Map : [],\n\t 'string': new Hash\n\t };\n\t }", "remove(key) {\r\n const hash = this.calculateHash(key);\r\n if(this.values.hasOwnProperty(hash) && this.values[hash].hasOwnProperty(key)) {\r\n delete this.values[hash][key];\r\n this.numberOfValues--;\r\n }\r\n }", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "function mapClear() {\n\t this.__data__ = {\n\t 'hash': new Hash(),\n\t 'map': Map ? new Map() : [],\n\t 'string': new Hash()\n\t };\n\t}", "function mapClear() {\n\t this.__data__ = { 'hash': new Hash, 'map': Map ? new Map : [], 'string': new Hash };\n\t}", "function mapClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': Map ? new Map : [],\n\t 'string': new Hash\n\t };\n\t}", "function mapClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': Map ? new Map : [],\n\t 'string': new Hash\n\t };\n\t}", "function mapClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': Map ? new Map : [],\n\t 'string': new Hash\n\t };\n\t}", "function mapClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': Map ? new Map : [],\n\t 'string': new Hash\n\t };\n\t}", "function mapClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': Map ? new Map : [],\n\t 'string': new Hash\n\t };\n\t}", "function mapClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': Map ? new Map : [],\n\t 'string': new Hash\n\t };\n\t}", "clear() {\n this.map = {};\n if (this.store) this.store.clear();\n }", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n}", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n}", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n}", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n}", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n}", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n}", "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n}", "function clear()\r{\r\tvar end = mapping_names.length;\r\r\tfor(var i=end-1; i>=0; i--){\r\t\tremove(mapping_names[i]);\r\t}\r\twhile(mapping_names.pop());\r\twhile(mapping_sources.pop());\r\twhile(mapping_destinations.pop());\r\twhile(mapping_algorithms.pop());\r}", "function filterMutateMap(map, predicate) {\n for (const [key, value] of map) {\n if (!predicate(key, value)) {\n map.delete(key);\n }\n }\n}", "delete(key) {\n this.map[key] = undefined;\n if (this.store) this.store.removeItem(key);\n }", "mapRemove() {\n\n\t\tthis.map.remove();\n\n\t}", "garbageCollect() {\n // Q: Can we delete keys from the map while iterating over it?\n // A: The ECMA spec states that yes, keys may be deleted during forEach.\n // It is less clear for iterators.\n let deleteBefore = new Date().getTime() - MAX_GLOBAL_COOLDOWN;\n this._cooldowns.forEach((value, key) => {\n if (value < deleteBefore) {\n this._cooldowns.delete(key);\n }\n });\n }", "function clearAll(){\r\n\tObject.keys(this.datastore).forEach((key)=>\r\n\t{\r\n\t\tdelete this.datastore[key];\r\n\t});\t\r\n}", "async clear() {\n return await keyv.clear();\n }", "clear() {\n for (const key of Object.keys(this.datastore)) {\n delete this.datastore[key];\n // this.remove(key);\n }\n }", "function clearObjects() {\n setMapOnAll(null);\n}", "clear() {\n const _ = this;\n _._map.clear();\n _._nameSet.clear();\n }", "function mapCacheClear(){this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "function mapCacheClear(){this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "function mapCacheClear(){this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "function mapCacheClear(){this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "function clear () {\n keys().each(function (cookie) {\n remove(cookie);\n });\n }", "function clean_maps() {\n var count;\n list_maps();\n\n for (var k in maps) {\n for (var i = 0; i < maps[k].length; i++) {\n var map = maps[k][i];\n count++;\n\n // if map render job is idle and last render process is older than\n // an hour, remove map\n if (map.renderer_idle && (time() - map.renderer_stop > 3600000)) {\n console.log(k + '/' + i + ': garbage collector removes map');\n maps[k].splice(i, 1);\n i--;\n }\n }\n }\n}", "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "stopAll() {\n const _ = this;\n for (const entry of _._map.values()) {\n clearTimeout(entry.handle);\n }\n _._map.clear();\n }", "function mapCacheClear() {\n\t\t this.size = 0;\n\t\t this.__data__ = {\n\t\t 'hash': new Hash,\n\t\t 'map': new (Map || ListCache),\n\t\t 'string': new Hash\n\t\t };\n\t\t}", "function mapCacheClear() {\n\t\t this.__data__ = {\n\t\t 'hash': new Hash,\n\t\t 'map': new (Map || ListCache),\n\t\t 'string': new Hash\n\t\t };\n\t\t}", "function mapCacheClear() {\n\t\t this.__data__ = {\n\t\t 'hash': new Hash,\n\t\t 'map': new (Map || ListCache),\n\t\t 'string': new Hash\n\t\t };\n\t\t}", "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new _Hash,\n 'map': new (_Map || _ListCache),\n 'string': new _Hash\n };\n }", "function mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map$1 || ListCache)(),\n 'string': new Hash()\n };\n }", "function mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map$1 || ListCache)(),\n 'string': new Hash()\n };\n }", "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new _Hash(),\n 'map': new (_Map || _ListCache)(),\n 'string': new _Hash()\n };\n }", "clearance () {\n mapDoS.forEach((val, key, map) => {\n if (val.at < moment().utc().subtract(val.interval, 'seconds')) {\n map.delete(key)\n }\n })\n }", "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new _Hash.default(),\n 'map': new (_Map.default || _ListCache.default)(),\n 'string': new _Hash.default()\n };\n }", "function mapCacheClear() {\n\t this.size = 0;\n\t this.__data__ = {\n\t 'hash': new _Hash(),\n\t 'map': new (_Map || _ListCache)(),\n\t 'string': new _Hash()\n\t };\n\t}", "function clearEntry () {\n\n nextValue = null;\n}", "remove(key) {\n let index = this._hash(key);\n if (this.keyMap[index] && this.keyMap[index].length) {\n this.keyMap[index] = undefined;\n this.size--;\n return true;\n } else {\n return false;\n }\n }", "function mapCacheClear() {\n\t this.size = 0;\n\t this.__data__ = {\n\t 'hash': new _Hash,\n\t 'map': new (_Map || _ListCache),\n\t 'string': new _Hash\n\t };\n\t}", "function mapCacheClear() {\n\t this.size = 0;\n\t this.__data__ = {\n\t 'hash': new _Hash,\n\t 'map': new (_Map || _ListCache),\n\t 'string': new _Hash\n\t };\n\t}", "function mapCacheClear() {\n\t this.size = 0;\n\t this.__data__ = {\n\t 'hash': new _Hash,\n\t 'map': new (_Map || _ListCache),\n\t 'string': new _Hash\n\t };\n\t}", "function mapCacheClear() {\n\t this.size = 0;\n\t this.__data__ = {\n\t 'hash': new _Hash,\n\t 'map': new (_Map || _ListCache),\n\t 'string': new _Hash\n\t };\n\t}", "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map$1 || ListCache),\n 'string': new Hash\n };\n }", "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map$1 || ListCache),\n 'string': new Hash\n };\n }", "function mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map$1 || ListCache),\n 'string': new Hash\n };\n }", "function mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map$1 || ListCache),\n 'string': new Hash\n };\n }", "function mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map$1 || ListCache),\n 'string': new Hash\n };\n }", "function clearAllMarkers() {\n setMarkersOnMap(null);\n}", "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map || ListCache)(),\n 'string': new Hash()\n };\n }", "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map || ListCache)(),\n 'string': new Hash()\n };\n }", "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new _Hash,\n 'map': new (_Map || _ListCache),\n 'string': new _Hash\n };\n }", "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new _Hash,\n 'map': new (_Map || _ListCache),\n 'string': new _Hash\n };\n }", "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new _Hash,\n 'map': new (_Map || _ListCache),\n 'string': new _Hash\n };\n }", "clear () {\n if (this.doc !== null) {\n transact(this.doc, transaction => {\n this.forEach(function (_value, key, map) {\n typeMapDelete(transaction, map, key)\n })\n })\n } else {\n /** @type {Map<string, any>} */ (this._prelimContent).clear()\n }\n }", "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map$1 || ListCache),\n 'string': new Hash\n };\n }", "function mapCacheClear() {\n\tthis.size = 0;\n\tthis.__data__ = {\n\t\thash: new _Hash(),\n\t\tmap: new ( _Map || _ListCache )(),\n\t\tstring: new _Hash(),\n\t};\n}", "function mapCacheClear() {\n\t this.__data__ = {\n\t 'hash': new Hash(),\n\t 'map': new (Map || ListCache)(),\n\t 'string': new Hash()\n\t };\n\t }", "function clearAllMarkers() {\n setAllMap(null);\n}", "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map || ListCache)(),\n 'string': new Hash()\n };\n }", "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map || ListCache)(),\n 'string': new Hash()\n };\n }", "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map || ListCache)(),\n 'string': new Hash()\n };\n }" ]
[ "0.7589402", "0.70686156", "0.673569", "0.6651485", "0.6528891", "0.6266802", "0.6257602", "0.6257602", "0.6257602", "0.6170819", "0.6170819", "0.6170819", "0.616584", "0.6152476", "0.6147431", "0.6147431", "0.6147431", "0.6147431", "0.6147431", "0.6147431", "0.6147431", "0.6147431", "0.6147431", "0.61281383", "0.61072534", "0.6101482", "0.6101482", "0.6101482", "0.6101482", "0.6101482", "0.6101482", "0.60470563", "0.60258466", "0.60258466", "0.60258466", "0.60258466", "0.60258466", "0.60258466", "0.60258466", "0.6024839", "0.60080713", "0.60036314", "0.598349", "0.59391546", "0.59210443", "0.59042466", "0.5902615", "0.5861328", "0.58580554", "0.5847384", "0.5847384", "0.5847384", "0.5847384", "0.58460045", "0.5840549", "0.57226163", "0.57226163", "0.57226163", "0.57226163", "0.57226163", "0.57226163", "0.57226163", "0.57226163", "0.57226163", "0.57224345", "0.5718643", "0.57083184", "0.57083184", "0.5703612", "0.5698988", "0.5698988", "0.56893474", "0.5685078", "0.56835866", "0.5682128", "0.56813186", "0.5681309", "0.5673353", "0.5673353", "0.5673353", "0.5673353", "0.56731236", "0.56731236", "0.5671988", "0.5671988", "0.5671988", "0.56603295", "0.5658843", "0.5658843", "0.56549543", "0.56549543", "0.56549543", "0.56538534", "0.5646069", "0.5643372", "0.5634007", "0.562995", "0.5629937", "0.5629937", "0.5629937" ]
0.5825702
55
Deeply get a value from an object via its path.
function getIn(obj,key,def,p){if(p===void 0){p=0;}var path=toPath(key);while(obj&&p<path.length){obj=obj[path[p++]];}return obj===undefined?def:obj;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n }", "function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n }", "function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n }", "function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n }", "function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n }", "function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n }", "function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n }", "function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n }", "function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n }", "function getDeepVal(obj, path) {\n if (typeof obj === \"undefined\" || obj === null) return;\n path = path.split(/[\\.\\[\\]\\\"\\']{1,2}/);\n for (var i = 0, l = path.length; i < l; i++) {\n if (path[i] === \"\") continue;\n obj = obj[path[i]];\n if (typeof obj === \"undefined\" || obj === null) return;\n }\n return obj;\n }", "function nestedGet(object, path) {\n if (Immutable.isImmutable(object)) {\n return Immutable.getIn(object, path);\n }\n let index = 0;\n const length = path.length;\n let o = object;\n\n while (o != null && index < length) {\n // eslint-disable-next-line no-plusplus\n o = o[path[index++]];\n }\n return (index && index === length) ? o : undefined;\n}", "function safeGet(object, path) {\n\tvar value = null;\n\n\tif(object) {\n\t\tvar pieces = path.split(\".\"), node = object;\n\n\t\tfor(var p = 0; p < pieces.length-1; ++p) {\n\t\t\tnode = node[pieces[p]];\n\n\t\t\tif(!node) { return value; }\n\t\t}\n\n\t\tvalue = node[pieces.wrap(-1)];\n\t}\n\t\n\treturn value;\n}", "function getObjectValue(obj, path) {\r\n path = path.split(\".\");\r\n let curr = obj;\r\n\r\n for (let i = 0; i < path.length; i++) {\r\n const activeObj = curr[path[i]];\r\n curr = activeObj;\r\n }\r\n \r\n if(curr === undefined){\r\n return null;\r\n }\r\n \r\n return curr;\r\n}", "function getValue(obj, keyPath) {\n let keys = keyPath.split(\".\");\n\n while (keys.length > 0 && obj != null) {\n keyPath = keys.shift();\n obj = obj[keyPath];\n }\n\n return obj;\n}", "function getPathValue (obj, path) {\n if (!isObject(obj)) { return null }\n\n var paths = parsePath(path);\n if (empty(paths)) {\n return null\n } else {\n var length = paths.length;\n var ret = null;\n var last = obj;\n var i = 0;\n while (i < length) {\n var value = last[paths[i]];\n if (value === undefined) {\n last = null;\n break\n }\n last = value;\n i++;\n }\n\n ret = last;\n return ret\n }\n}", "function getValueByPath(obj, path) {\n const value = path.split('.').reduce((o, i) => o[i], obj)\n return value\n}", "function getValueByPath(o, path) {\n for (var i = 0, len = path.length;\n o !== undefined && i < len;\n i++) {\n o = o[path[i]];\n }\n return o;\n }", "function getValueByPath(obj, path) {\r\n const value = path.split('.').reduce((o, i) => o[i], obj)\r\n return value\r\n}", "function getValueByPath(obj, path) {\n return path.split('.').reduce(function (o, i) {\n return o ? o[i] : null;\n }, obj);\n}", "function getValueByPath(obj, path) {\n return path.split('.').reduce(function (o, i) {\n return o ? o[i] : null;\n }, obj);\n }", "function getIn(obj, path) {\n var val = obj;\n for (var _i = 0, path_1 = path; _i < path_1.length; _i++) {\n var elem = path_1[_i];\n if (val[elem]) {\n val = val[elem];\n }\n else {\n return null;\n }\n }\n return val;\n}", "function getValueByPath(obj, path) {\n var value = path.split('.').reduce(function (o, i) {\n return o[i];\n }, obj);\n return value;\n }", "function get(obj, path) {\n\n\tvar keys = path.split(\".\");\n\n\tkeys.forEach(function(key) {\n\t\tobj = obj[key];\n\t});\n\n\treturn obj;\n}", "function get(object, path, defaultValue) {\n var value = deepGet(object, toPath$1(path));\n return isUndefined(value) ? defaultValue : value;\n }", "function get(object, path, defaultValue) {\n var value = deepGet(object, toPath$1(path));\n return isUndefined(value) ? defaultValue : value;\n }", "function get(object, path, defaultValue) {\n var value = deepGet(object, toPath$1(path));\n return isUndefined(value) ? defaultValue : value;\n }", "function get(object, path, defaultValue) {\n var value = deepGet(object, toPath$1(path));\n return isUndefined(value) ? defaultValue : value;\n }", "function get(object, path, defaultValue) {\n var value = deepGet(object, toPath$1(path));\n return isUndefined(value) ? defaultValue : value;\n }", "function get(object, path, defaultValue) {\n var value = deepGet(object, toPath$1(path));\n return isUndefined(value) ? defaultValue : value;\n }", "function get(object, path, defaultValue) {\n var value = deepGet(object, toPath$1(path));\n return isUndefined(value) ? defaultValue : value;\n }", "function get(object, path, defaultValue) {\n var value = deepGet(object, toPath$1(path));\n return isUndefined(value) ? defaultValue : value;\n }", "function get(object, path, defaultValue) {\n var value = deepGet(object, toPath$1(path));\n return isUndefined(value) ? defaultValue : value;\n }", "function getIn(obj, path, unset) {\n const val = obj[path[0]];\n if (typeof val === 'undefined') return unset;\n return path.length <= 1 ? val : val.getIn(path.slice(1), unset);\n}", "function _get(obj,path){\n\t \n\t //Split the path into it's seperate components\n\t\tvar _path = path.split(\".\");\n\t\t\n\t\t//Set the object we use to query for this name to be the original object\n\t\tvar subObj = obj;\n\t \n\t\t//Parse the object properties\n\t\tvar c_len = _path.length;\n\t\tfor (var i=0;i<c_len;++i) {\n \n //Skip if we don't have this part of the path\n\t\t\tif( _path[i].length > 0 ) {\n\t\t\t \n\t\t\t //Get the sub object using the path\n\t\t\t\tsubObj = subObj[_path[i]];\n\t\t\t\t\n\t\t\t\t//Break if we don't have this sub object\n\t\t\t\tif(subObj === null || subObj === undefined) break;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Return an empty string if we don't have a value\n\t\tif(subObj === null || subObj === undefined) return(\"\");\n\t\t\n\t\treturn(subObj);\n\t}", "function getPropFromPath(obj, path) {\n var keys = path.split('.');\n var targetKey = keys.pop();\n var objRef = obj;\n\n for (var i in keys) {\n if (typeof objRef === 'object') { objRef = objRef[keys[i]]; }\n }\n\n return (typeof objRef === 'object') ? objRef[targetKey] : undefined;\n }", "function getPropFromPath(obj, path) {\n var keys = path.split('.');\n var targetKey = keys.pop();\n var objRef = obj;\n\n for (var i in keys) {\n if (typeof objRef === 'object') { objRef = objRef[keys[i]]; }\n }\n\n return (typeof objRef === 'object') ? objRef[targetKey] : undefined;\n }", "function get(obj, path) {\n var props = [];\n\n if (util.isArray(path)) {\n props = path;\n } else {\n props = path.split('.');\n }\n\n while(props.length && obj) {\n var prop = props.shift()\n , match = /(.+)\\[([0-9]*)\\]/.exec(prop);\n\n if (match && match.length === 3) {\n var name = match[1]\n , index = match[2];\n\n if (typeof obj[name] !== 'undefined') {\n obj = obj[name][index];\n } else {\n obj = null;\n }\n } else {\n obj = obj[prop];\n }\n }\n\n return obj || null;\n}", "function pull(obj, path, opt_noErrorDefault) {\r\n path = typeOf(path, 'String') ? path.split('.') : path;\r\n for (var doError = arguments.length < 3, i = 0, l = path.length; i < l; i++) {\r\n if (obj != undefined && path[i] in Object(obj)) {\r\n obj = obj[path[i]];\r\n }\r\n else if (doError) {\r\n throw new Error('There is no value at \"' + slice(path, 0, i + 1).join('.') + '\".');\r\n }\r\n else {\r\n return opt_noErrorDefault;\r\n }\r\n }\r\n return obj;\r\n }", "function deepFind(obj, path) {\n if (path.indexOf('.')) {\n for (var i = 0, path = path.split('.'), len = path.length; i < len; i++) {\n obj = obj[path[i]];\n }\n } else {\n obj[path];\n }\n return obj;\n }", "get(path) {\n if (path) {\n return findValue(this.data, path)\n }\n return this.toObject();\n }", "function _get(obj, keypath) {\n var parts = _keyPathNormalize(keypath).split('.')\n var dest = obj\n parts.forEach(function(key) {\n if (isNon(dest)) return !(dest = undf())\n dest = dest[key]\n })\n return dest\n}", "function deepGet(target, path) {\n return path.length ? lodashGet(target, path) : target;\n}", "function getIn(obj, path) {\n let pointer = obj;\n for (let el of path) {\n pointer = pointer\n ? pointer[el]\n : undefined;\n }\n\n return pointer;\n}", "function _getter(obj, path) {\n var keys = path.split('.');\n var length = keys.length;\n var target = obj;\n\n for (var i = 0; i < length - 1; i++) {\n target[keys[i]] = _isObject(target[keys[i]]) ? target[keys[i]] : {};\n target = target[keys[i]];\n }\n\n return {\n target: target,\n lastKey: keys[length - 1]\n };\n }", "traverse(obj, path) {\n if (path == null) return undefined;\n let pelems = path.split('.');\n let res = obj;\n pelems.forEach(function (item) {\n res = item === 'this' ? obj : res[item];\n });\n return res;\n }", "function getPropertyPathValue(obj, propertyPath) {\n var properties = Array.isArray(propertyPath) ? propertyPath : propertyPath.split(\".\");\n if (properties.length === 1) {\n return obj.getProperty(propertyPath);\n } else {\n var nextValue = obj;\n // hack use of some to perform mapFirst operation.\n properties.some(function (prop) {\n nextValue = nextValue.getProperty(prop);\n return nextValue == null;\n });\n return nextValue;\n }\n}", "function get (object, path) {\n let iterator = object\n for (const part of path) {\n iterator = iterator[part]\n }\n return iterator\n}", "function get(obj, path, defaultValue) {\n return path\n .split('.')\n .reduce(function (a, c) { return (a && a[c] ? a[c] : defaultValue || null); }, obj);\n}", "function getDescendantProperty(obj, path) {\n return path.split('.').reduce((acc, part) => acc && acc[part], obj);\n}", "function resolveObjectFromPath(object, path) {\n path = path.replace(/\\[(\\w+)\\]/g, '.$1'); // convert indexes to properties\n path = path.replace(/^\\./, ''); // strip a leading dot\n var a = path.split('.');\n while (a.length) {\n var n = a.shift();\n if (n in object) {\n object = object[n];\n } else {\n return;\n }\n }\n return object;\n }", "function getProperty(path, obj) {\n return [obj].concat(path.split('.')).reduce(function(prev, curr) {\n return prev && prev[curr];\n });\n}", "getValueInPath(json, path) {\n const pathElements = this.pathUtilService.toPathArray(path);\n let value = json;\n pathElements.forEach(pathElement => {\n value = value[pathElement];\n if (!value) {\n throw new Error(`\"${pathElement}\" of given path not defined in given json`);\n }\n });\n return value;\n }", "function getProperty(object, property_path, default_value) {\n\tif (isDefined(object)) {\n\t\tif (isDefined(object[property_path])) {\n\t\t\treturn object[property_path];\n\t\t}\n\t\tvar path_parts = property_path.split('.'); // path as nested properties\n\t\tfor (var i = 0; i < path_parts.length && isDefined(object); i++) {\n\t\t\tobject = object[path_parts[i]];\n\t\t}\n\t}\n\treturn isDefined(object) ? object : default_value;\n}", "function dotTraverseObject(object, path)\n{\n var chunks = path.split(/\\./);\n var cur = object;\n for (var i = 0; chunks.length > i; i++)\n {\n if (cur == null) throw new Error(\"Complete object path does not exist\");\n cur = cur[chunks[i]];\n }\n return cur;\n}", "function _cpBaseGet(object, castedPath) {\n /* here we have removed casted path line from Lodash\n path = isKey(path, object) ? [path] : castPath(path);\n */\n var index = 0,\n length = castedPath.length;\n\n while (object != null && index < length) {\n object = object[TOKEY(castedPath[index++])];\n }\n return (index && index == length) ? object : undefined;\n}", "function get(opt, path) {\n path = path.split(',');\n var obj = opt;\n\n for (var i = 0; i < path.length; i++) {\n obj = obj && obj[path[i]];\n\n if (obj == null) {\n break;\n }\n }\n\n return obj;\n}", "function get(opt, path) {\n path = path.split(',');\n var obj = opt;\n\n for (var i = 0; i < path.length; i++) {\n obj = obj && obj[path[i]];\n\n if (obj == null) {\n break;\n }\n }\n\n return obj;\n}", "function get(opt, path) {\n path = path.split(',');\n var obj = opt;\n\n for (var i = 0; i < path.length; i++) {\n obj = obj && obj[path[i]];\n\n if (obj == null) {\n break;\n }\n }\n\n return obj;\n}", "function get(opt, path) {\n path = path.split(',');\n var obj = opt;\n\n for (var i = 0; i < path.length; i++) {\n obj = obj && obj[path[i]];\n\n if (obj == null) {\n break;\n }\n }\n\n return obj;\n}", "function get(opt, path) {\n path = path.split(',');\n var obj = opt;\n\n for (var i = 0; i < path.length; i++) {\n obj = obj && obj[path[i]];\n\n if (obj == null) {\n break;\n }\n }\n\n return obj;\n}", "static _resolvePath(path, object) {\n if (typeof path !== 'string') throw Error(\"Requires a string, got an \" + typeof path + \" that \" + Array.isArray(path) ? \"is\" : \"isn't\" + \" an array\");\n\n object = object || ApplicationState._state;\n const nodes = ApplicationState.walk(path);\n\n for (let index = 0; index < nodes.length; index++) {\n const node = nodes[index];\n object = object[node.name];\n if (typeof object === 'undefined') return undefined;\n if (object === null) return null;\n }\n\n return object;\n }", "function get(opt, path) {\n var pathArr = path.split(',');\n var obj = opt;\n\n for (var i = 0; i < pathArr.length; i++) {\n obj = obj && obj[pathArr[i]];\n\n if (obj == null) {\n break;\n }\n }\n\n return obj;\n}", "function getProperty(object, propertyPath, defaultValue) {\n if (isDefined(object)) {\n if (isDefined(object[propertyPath])) {\n return object[propertyPath];\n }\n var pathParts = propertyPath.split('.'); // path as nested properties\n for (var i = 0; i < pathParts.length && isDefined(object); i++) {\n object = object[pathParts[i]];\n }\n }\n return isDefined(object) ? object : defaultValue;\n}", "function evalPath(obj, path) {\n return path.split('.').reduce(function(o, i) { return o[i];}, obj);\n}", "function getValueFrom(object, key) {\n var keys = key.split('.');\n var value = object;\n for (var i = 0; i < keys.length; i++) {\n var v = value[keys[i]];\n if (v !== undefined) {\n value = v;\n } else {\n return undefined;\n }\n }\n return value;\n}", "_resolveObjectPath(path, obj) {\n return path.split(\".\").reduce(function(prev, curr) {\n return prev ? prev[curr] : null;\n }, obj || self);\n }", "function getField(obj, path) {\n if (obj[path] === undefined) {\n // We assign it to an empty object\n // so that the key is actually created\n obj[path] = {};\n return undefined;\n }\n var value = obj[path].value;\n if (value === true) {\n return \"true\";\n }\n return obj[path].value;\n}", "getPath(object, path) {\n if (object == null) return object\n const steps = spellCore.splitPath(path)\n if (!steps) return undefined\n let target = object\n for (let i = 0; i < steps.length; i++) {\n let key = steps[i]\n if (target == null) return undefined\n if (typeof key === \"number\" && typeof target.getItem === \"function\") target = target.getItem(key)\n else target = target[key]\n }\n return target\n }", "static accessValue(object, key) {\n const keys = key.split('.');\n let value = object;\n for (let i = 0, max = keys.length; i < max; i++) {\n value = value[keys[i]];\n }\n return value;\n }", "function get(target, field) {\n var pathArray = splitNested(field);\n var result = void 0;\n try {\n result = pathArray.reduce(function (curr, path) {\n return curr[path];\n }, target);\n } catch (e) {}\n return result;\n}", "function pathToReference(obj, path) {\n return reduce(function (reference, segment) {\n\tif (reference) {\n\t if (typeof segment === \"object\" && segment.hasOwnProperty(\"id\")) \n\t\treturn idToReferenceAndIndex(reference, segment.id).obj;\n\t else\n\t\treturn reference[segment];\n\t}\n\telse\n\t return reference;\n }, \n path, obj);\n}", "function setPropFromPath(obj, path, value) {\n var keys = path.split('.');\n var targetKey = keys.pop();\n var objRef = obj;\n\n for (var i in keys) {\n if (typeof objRef === 'object') {\n if (typeof objRef[keys[i]] === 'undefined' || objRef[keys[i]] === null) { objRef[keys[i]] = {}; }\n\n objRef = objRef[keys[i]];\n }\n }\n\n if (typeof objRef === 'object') { objRef[targetKey] = value; }\n }", "function setPropFromPath(obj, path, value) {\n var keys = path.split('.');\n var targetKey = keys.pop();\n var objRef = obj;\n\n for (var i in keys) {\n if (typeof objRef === 'object') {\n if (typeof objRef[keys[i]] === 'undefined' || objRef[keys[i]] === null) { objRef[keys[i]] = {}; }\n\n objRef = objRef[keys[i]];\n }\n }\n\n if (typeof objRef === 'object') { objRef[targetKey] = value; }\n }", "function deepGet(object, [head, ...tail], fallback = null) {\n const val = object[head]\n if (val === undefined || val === null) { return fallback }\n if (tail.length === 0) { return val }\n return deepGet(val, tail, fallback)\n}", "get(path){\n if (typeof path === 'string') {\n let array = path.split('.');\n return this.get(array);\n }\n let data = this.data;\n let len = path ? path.length : 0;\n let i;\n for (i = 0; data && i < len; i++) {\n let segment = path[i];\n data = data[segment];\n }\n return i === len ? data : null;\n }", "function getJsonValue(path, obj) {\n function cleanObjPart(s) {\n // Handle the case when processing an array element (e.g. \"jobs[0]\")\n var re = /(\\w+)\\s*\\[\\s*(\\d+)\\s*\\]\\s*/;\n var match = re.exec(s);\n var objPart;\n if (match != null) {\n var elem1 = match[1];\n var index = parseInt(match[2], 10);\n objPart = obj[elem1][index];\n }\n else {\n objPart = obj[s];\n }\n return objPart;\n }\n\n var NOT_FOUND = \"notFound\";\n var parts = path.split(/(?!\\B\"[^\"]*)\\.(?![^\"]*\"\\B)/);\n var part;\n var last = removeDoubleQuotes(parts.pop());\n while ((part = parts.shift())) {\n part = removeDoubleQuotes(part);\n var objPart = cleanObjPart(part);\n if (typeof objPart != \"object\") return NOT_FOUND;\n obj = objPart;\n }\n\n var r = cleanObjPart(last);\n return r === undefined ? NOT_FOUND : r;\n}", "function setDeepValue(obj, path, value) {\n if (typeof path === 'string') {\n path = path.split('.');\n }\n if (path.length > 1) {\n const e = path.shift();\n setDeepValue(obj[e] = Object.prototype.toString.call(obj[e]) === '[object Object]' ? obj[e] : {}, path, value);\n }\n else {\n obj[path[0]] = value;\n }\n}", "function getPropertySafe(obj, path, defValue) {\n var hasOwnProp = Object.prototype.hasOwnProperty;\n\n var keys = Array.isArray(path) ? path : path.split('.');\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!obj || !hasOwnProp.call(obj, key)) {\n obj = undefined;\n break;\n }\n obj = obj[key];\n }\n\n if(arguments.length > 2 && obj === undefined)\n return defValue;\n\n return obj;\n}", "function getPath(obj, ks) {\n if (typeof ks == \"string\") ks = ks.split(\".\");\n\n // If we have reached an undefined property\n // then stop executing and return undefined\n if (obj === undefined) return void 0;\n\n // If the path array has no more elements, we've reached\n // the intended property and return its value\n if (ks.length === 0) return obj;\n\n // If we still have elements in the path array and the current\n // value is null, stop executing and return undefined\n if (obj === null) return void 0;\n\n return getPath(obj[_.first(ks)], _.rest(ks));\n }", "function get(obj, props) {\n if (typeof props === 'string') {\n props = props.split('.');\n } else if (!(props instanceof Array)) {\n throw new TypeError('Invalid type for key: ' + (typeof props));\n }\n var i;\n for (i = 0; i < props.length; i += 1) {\n if ((obj === undefined) ||\n (typeof obj !== 'object') ||\n (obj === null)) {\n throw new Error('Invalid object path: ' + props.join('.') + ' at ' + i);\n }\n obj = obj[props[i]];\n }\n if (obj === undefined) {\n throw new Error('No value found on object path: ' + props.join('.'));\n } else {\n return obj;\n }\n }", "function getIn(object, pathArray) {\n return R.path(pathArray, object);\n}", "resolveProp(obj, path) {\n return path.split('.').reduce((prev, curr) => {\n return prev ? prev[curr] : null;\n }, obj);\n }", "function setIn(obj, path, value) {\n var res = clone(obj); // this keeps inheritance when obj is a class\n\n var resVal = res;\n var i = 0;\n var pathArray = toPath(path);\n\n for (; i < pathArray.length - 1; i++) {\n var currentPath = pathArray[i];\n var currentObj = getIn(obj, pathArray.slice(0, i + 1));\n\n if (currentObj && (isObject(currentObj) || Array.isArray(currentObj))) {\n resVal = resVal[currentPath] = clone(currentObj);\n } else {\n var nextPath = pathArray[i + 1];\n resVal = resVal[currentPath] = isInteger(nextPath) && Number(nextPath) >= 0 ? [] : {};\n }\n } // Return original object if new value is the same as current\n\n\n if ((i === 0 ? obj : resVal)[pathArray[i]] === value) {\n return obj;\n }\n\n if (value === undefined) {\n delete resVal[pathArray[i]];\n } else {\n resVal[pathArray[i]] = value;\n } // If the path array has a single element, the loop did not run.\n // Deleting on `resVal` had no effect in this scenario, so we delete on the result instead.\n\n\n if (i === 0 && value === undefined) {\n delete res[pathArray[i]];\n }\n\n return res;\n}", "function cpGet(object, castedPath, defaultValue) {\n var result = object == null ? undefined : _cpBaseGet(object, castedPath);\n return result === undefined ? defaultValue : result;\n}", "function getProperty(path) {\n if (is(path, 'string')) {\n return path;\n }\n if (is(path, 'array') && path.length > 0) {\n return path[0];\n }\n return undefined;\n }", "function setIn(obj, path, value) {\n var res = lodash_es_clone(obj); // this keeps inheritance when obj is a class\n\n var resVal = res;\n var i = 0;\n var pathArray = lodash_es_toPath(path);\n\n for (; i < pathArray.length - 1; i++) {\n var currentPath = pathArray[i];\n var currentObj = getIn(obj, pathArray.slice(0, i + 1));\n\n if (currentObj && (formik_esm_isObject(currentObj) || Array.isArray(currentObj))) {\n resVal = resVal[currentPath] = lodash_es_clone(currentObj);\n } else {\n var nextPath = pathArray[i + 1];\n resVal = resVal[currentPath] = isInteger(nextPath) && Number(nextPath) >= 0 ? [] : {};\n }\n } // Return original object if new value is the same as current\n\n\n if ((i === 0 ? obj : resVal)[pathArray[i]] === value) {\n return obj;\n }\n\n if (value === undefined) {\n delete resVal[pathArray[i]];\n } else {\n resVal[pathArray[i]] = value;\n } // If the path array has a single element, the loop did not run.\n // Deleting on `resVal` had no effect in this scenario, so we delete on the result instead.\n\n\n if (i === 0 && value === undefined) {\n delete res[pathArray[i]];\n }\n\n return res;\n}", "function getPathValue(path, ctx) {\n\t\t'use strict';\n\n\t\tif (path.length === 1 && path[0].length !== 0) {\n\t\t\treturn ctx.get(path[0]);\n\t\t}\n\t\t// anchor = false;\n\t\tif (path[0].length === 0) {\n\t\t\treturn ctx.getPath(true, path.slice(1));\n\t\t}\n\t\treturn ctx.getPath(false, path);\n\t}", "static _assignValue(path, value, object) {\n object = object || ApplicationState._state;\n\n const nodes = ApplicationState.walk(path);\n\n for (let index = 0; index < nodes.length; index++) {\n const node = nodes[index];\n switch (node.type) {\n case 'object':\n if (typeof object[node.name] === 'undefined') {\n object[node.name] = {};\n }\n object = object[node.name];\n break;\n case 'array':\n if (typeof object[node.name] === 'undefined') {\n object[node.name] = [];\n }\n object = object[node.name];\n break;\n case 'leaf':\n return object[node.name] = value;\n break;\n }\n }\n\n throw Error(\"We should have returned after setting the value.\");\n }", "function result(obj, path, fallback) {\n path = toPath$1(path);\n var length = path.length;\n if (!length) {\n return isFunction$1(fallback) ? fallback.call(obj) : fallback;\n }\n for (var i = 0; i < length; i++) {\n var prop = obj == null ? void 0 : obj[path[i]];\n if (prop === void 0) {\n prop = fallback;\n i = length; // Ensure we don't continue iterating.\n }\n obj = isFunction$1(prop) ? prop.call(obj) : prop;\n }\n return obj;\n }", "function result(obj, path, fallback) {\n path = toPath$1(path);\n var length = path.length;\n if (!length) {\n return isFunction$1(fallback) ? fallback.call(obj) : fallback;\n }\n for (var i = 0; i < length; i++) {\n var prop = obj == null ? void 0 : obj[path[i]];\n if (prop === void 0) {\n prop = fallback;\n i = length; // Ensure we don't continue iterating.\n }\n obj = isFunction$1(prop) ? prop.call(obj) : prop;\n }\n return obj;\n }", "function result(obj, path, fallback) {\n path = toPath$1(path);\n var length = path.length;\n if (!length) {\n return isFunction$1(fallback) ? fallback.call(obj) : fallback;\n }\n for (var i = 0; i < length; i++) {\n var prop = obj == null ? void 0 : obj[path[i]];\n if (prop === void 0) {\n prop = fallback;\n i = length; // Ensure we don't continue iterating.\n }\n obj = isFunction$1(prop) ? prop.call(obj) : prop;\n }\n return obj;\n }", "function result(obj, path, fallback) {\n path = toPath$1(path);\n var length = path.length;\n if (!length) {\n return isFunction$1(fallback) ? fallback.call(obj) : fallback;\n }\n for (var i = 0; i < length; i++) {\n var prop = obj == null ? void 0 : obj[path[i]];\n if (prop === void 0) {\n prop = fallback;\n i = length; // Ensure we don't continue iterating.\n }\n obj = isFunction$1(prop) ? prop.call(obj) : prop;\n }\n return obj;\n }", "function result(obj, path, fallback) {\n path = toPath$1(path);\n var length = path.length;\n if (!length) {\n return isFunction$1(fallback) ? fallback.call(obj) : fallback;\n }\n for (var i = 0; i < length; i++) {\n var prop = obj == null ? void 0 : obj[path[i]];\n if (prop === void 0) {\n prop = fallback;\n i = length; // Ensure we don't continue iterating.\n }\n obj = isFunction$1(prop) ? prop.call(obj) : prop;\n }\n return obj;\n }", "function result(obj, path, fallback) {\n path = toPath$1(path);\n var length = path.length;\n if (!length) {\n return isFunction$1(fallback) ? fallback.call(obj) : fallback;\n }\n for (var i = 0; i < length; i++) {\n var prop = obj == null ? void 0 : obj[path[i]];\n if (prop === void 0) {\n prop = fallback;\n i = length; // Ensure we don't continue iterating.\n }\n obj = isFunction$1(prop) ? prop.call(obj) : prop;\n }\n return obj;\n }", "function result(obj, path, fallback) {\n path = toPath$1(path);\n var length = path.length;\n if (!length) {\n return isFunction$1(fallback) ? fallback.call(obj) : fallback;\n }\n for (var i = 0; i < length; i++) {\n var prop = obj == null ? void 0 : obj[path[i]];\n if (prop === void 0) {\n prop = fallback;\n i = length; // Ensure we don't continue iterating.\n }\n obj = isFunction$1(prop) ? prop.call(obj) : prop;\n }\n return obj;\n }", "function result(obj, path, fallback) {\n path = toPath$1(path);\n var length = path.length;\n if (!length) {\n return isFunction$1(fallback) ? fallback.call(obj) : fallback;\n }\n for (var i = 0; i < length; i++) {\n var prop = obj == null ? void 0 : obj[path[i]];\n if (prop === void 0) {\n prop = fallback;\n i = length; // Ensure we don't continue iterating.\n }\n obj = isFunction$1(prop) ? prop.call(obj) : prop;\n }\n return obj;\n }", "function result(obj, path, fallback) {\n path = toPath$1(path);\n var length = path.length;\n if (!length) {\n return isFunction$1(fallback) ? fallback.call(obj) : fallback;\n }\n for (var i = 0; i < length; i++) {\n var prop = obj == null ? void 0 : obj[path[i]];\n if (prop === void 0) {\n prop = fallback;\n i = length; // Ensure we don't continue iterating.\n }\n obj = isFunction$1(prop) ? prop.call(obj) : prop;\n }\n return obj;\n }", "function parent(object, path) {\n return path.length < 2 ? object : baseGet(object, slice(path, 0, -1));\n}", "function accessor (path) {\n path = path.split(\".\");\n return function (obj) {\n for (var i = 0; i < path.length; i++)\n obj = obj[path[i]];\n return obj;\n }\n }", "function getPathObject(ob, path, ltOb, fn) {\n // Iterate through path to late paths: @a.b.c paths\n // Return \"\" (or noop if leaf is a function @a.b.c(...) ) if intermediate object not yet available\n var prevOb,\n tokens,\n l,\n i = 0;\n\n if (ltOb === 1) {\n fn = 1;\n ltOb = undefined;\n } // Paths like ^a^b^c or ~^a^b^c will not throw if an object in path is undefined.\n\n\n if (path) {\n tokens = path.split(\".\");\n l = tokens.length;\n\n for (; ob && i < l; i++) {\n prevOb = ob;\n ob = tokens[i] ? ob[tokens[i]] : ob;\n }\n }\n\n if (ltOb) {\n ltOb.lt = ltOb.lt || i < l; // If i < l there was an object in the path not yet available\n }\n\n return ob === undefined ? fn ? noop : \"\" : fn ? function () {\n return ob.apply(prevOb, arguments);\n } : ob;\n }", "get(path) {\n return _find(this, path, '.');\n }" ]
[ "0.8193551", "0.8193551", "0.8193551", "0.8193551", "0.8193551", "0.8193551", "0.8193551", "0.8193551", "0.8193551", "0.7947024", "0.7807266", "0.77647674", "0.7747176", "0.7579353", "0.75734", "0.7538337", "0.7516273", "0.7497333", "0.74887854", "0.74285764", "0.73955286", "0.7382455", "0.73431295", "0.73426753", "0.73426753", "0.73426753", "0.73426753", "0.73426753", "0.73426753", "0.73426753", "0.73426753", "0.73426753", "0.7327972", "0.7274172", "0.72232026", "0.72232026", "0.7152044", "0.70637673", "0.70098203", "0.7002042", "0.69413894", "0.6910604", "0.68931866", "0.6892991", "0.67340064", "0.66947156", "0.6680362", "0.66581845", "0.6649187", "0.66372406", "0.6579872", "0.6576446", "0.6538267", "0.653377", "0.6471995", "0.6415175", "0.6415175", "0.6415175", "0.6415175", "0.6415175", "0.6376437", "0.635542", "0.63529974", "0.63204813", "0.63139474", "0.6281767", "0.6257389", "0.62166965", "0.62089723", "0.62072235", "0.6200745", "0.61954373", "0.61954373", "0.61879355", "0.618699", "0.61807567", "0.6179652", "0.6160693", "0.61430585", "0.61378074", "0.61214393", "0.61174047", "0.60903573", "0.6086552", "0.6082264", "0.60779446", "0.60625684", "0.6051781", "0.6047391", "0.6047391", "0.6047391", "0.6047391", "0.6047391", "0.6047391", "0.6047391", "0.6047391", "0.6047391", "0.60430723", "0.6042763", "0.5996265", "0.59900177" ]
0.0
-1
Deeply set a value from in object via it's path. If the value at `path` has changed, return a shallow copy of obj with `value` set at `path`. If `value` has not changed, return the original `obj`. Existing objects / arrays along `path` are also shallow copied. Sibling objects along path retain the same internal js reference. Since new objects / arrays are only created along `path`, we can test if anything changed in a nested structure by comparing the object's reference in the old and new object, similar to how russian doll cache invalidation works. In earlier versions of this function, which used cloneDeep, there were issues whereby settings a nested value would mutate the parent instead of creating a new object. `clone` avoids that bug making a shallow copy of the objects along the update path so no object is mutated in place. Before changing this function, please read through the following discussions.
function setIn(obj,path,value){var res=clone(obj);// this keeps inheritance when obj is a class var resVal=res;var i=0;var pathArray=toPath(path);for(;i<pathArray.length-1;i++){var currentPath=pathArray[i];var currentObj=getIn(obj,pathArray.slice(0,i+1));if(currentObj&&(isObject$2(currentObj)||Array.isArray(currentObj))){resVal=resVal[currentPath]=clone(currentObj);}else {var nextPath=pathArray[i+1];resVal=resVal[currentPath]=isInteger(nextPath)&&Number(nextPath)>=0?[]:{};}}// Return original object if new value is the same as current if((i===0?obj:resVal)[pathArray[i]]===value){return obj;}if(value===undefined){delete resVal[pathArray[i]];}else {resVal[pathArray[i]]=value;}// If the path array has a single element, the loop did not run. // Deleting on `resVal` had no effect in this scenario, so we delete on the result instead. if(i===0&&value===undefined){delete res[pathArray[i]];}return res;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setIn(obj, path, value) {\n var res = clone(obj); // this keeps inheritance when obj is a class\n\n var resVal = res;\n var i = 0;\n var pathArray = toPath(path);\n\n for (; i < pathArray.length - 1; i++) {\n var currentPath = pathArray[i];\n var currentObj = getIn(obj, pathArray.slice(0, i + 1));\n\n if (currentObj && (isObject(currentObj) || Array.isArray(currentObj))) {\n resVal = resVal[currentPath] = clone(currentObj);\n } else {\n var nextPath = pathArray[i + 1];\n resVal = resVal[currentPath] = isInteger(nextPath) && Number(nextPath) >= 0 ? [] : {};\n }\n } // Return original object if new value is the same as current\n\n\n if ((i === 0 ? obj : resVal)[pathArray[i]] === value) {\n return obj;\n }\n\n if (value === undefined) {\n delete resVal[pathArray[i]];\n } else {\n resVal[pathArray[i]] = value;\n } // If the path array has a single element, the loop did not run.\n // Deleting on `resVal` had no effect in this scenario, so we delete on the result instead.\n\n\n if (i === 0 && value === undefined) {\n delete res[pathArray[i]];\n }\n\n return res;\n}", "function setIn(obj, path, value) {\n var res = lodash_es_clone(obj); // this keeps inheritance when obj is a class\n\n var resVal = res;\n var i = 0;\n var pathArray = lodash_es_toPath(path);\n\n for (; i < pathArray.length - 1; i++) {\n var currentPath = pathArray[i];\n var currentObj = getIn(obj, pathArray.slice(0, i + 1));\n\n if (currentObj && (formik_esm_isObject(currentObj) || Array.isArray(currentObj))) {\n resVal = resVal[currentPath] = lodash_es_clone(currentObj);\n } else {\n var nextPath = pathArray[i + 1];\n resVal = resVal[currentPath] = isInteger(nextPath) && Number(nextPath) >= 0 ? [] : {};\n }\n } // Return original object if new value is the same as current\n\n\n if ((i === 0 ? obj : resVal)[pathArray[i]] === value) {\n return obj;\n }\n\n if (value === undefined) {\n delete resVal[pathArray[i]];\n } else {\n resVal[pathArray[i]] = value;\n } // If the path array has a single element, the loop did not run.\n // Deleting on `resVal` had no effect in this scenario, so we delete on the result instead.\n\n\n if (i === 0 && value === undefined) {\n delete res[pathArray[i]];\n }\n\n return res;\n}", "function setIn(obj, path, value) {\n var res = (0,lodash_es_clone__WEBPACK_IMPORTED_MODULE_5__.default)(obj); // this keeps inheritance when obj is a class\n\n var resVal = res;\n var i = 0;\n var pathArray = (0,lodash_es_toPath__WEBPACK_IMPORTED_MODULE_4__.default)(path);\n\n for (; i < pathArray.length - 1; i++) {\n var currentPath = pathArray[i];\n var currentObj = getIn(obj, pathArray.slice(0, i + 1));\n\n if (currentObj && (isObject(currentObj) || Array.isArray(currentObj))) {\n resVal = resVal[currentPath] = (0,lodash_es_clone__WEBPACK_IMPORTED_MODULE_5__.default)(currentObj);\n } else {\n var nextPath = pathArray[i + 1];\n resVal = resVal[currentPath] = isInteger(nextPath) && Number(nextPath) >= 0 ? [] : {};\n }\n } // Return original object if new value is the same as current\n\n\n if ((i === 0 ? obj : resVal)[pathArray[i]] === value) {\n return obj;\n }\n\n if (value === undefined) {\n delete resVal[pathArray[i]];\n } else {\n resVal[pathArray[i]] = value;\n } // If the path array has a single element, the loop did not run.\n // Deleting on `resVal` had no effect in this scenario, so we delete on the result instead.\n\n\n if (i === 0 && value === undefined) {\n delete res[pathArray[i]];\n }\n\n return res;\n}", "function setIn(obj, path, value) {\n var res = (0,lodash_es_clone__WEBPACK_IMPORTED_MODULE_5__.default)(obj); // this keeps inheritance when obj is a class\n\n var resVal = res;\n var i = 0;\n var pathArray = (0,lodash_es_toPath__WEBPACK_IMPORTED_MODULE_4__.default)(path);\n\n for (; i < pathArray.length - 1; i++) {\n var currentPath = pathArray[i];\n var currentObj = getIn(obj, pathArray.slice(0, i + 1));\n\n if (currentObj && (isObject(currentObj) || Array.isArray(currentObj))) {\n resVal = resVal[currentPath] = (0,lodash_es_clone__WEBPACK_IMPORTED_MODULE_5__.default)(currentObj);\n } else {\n var nextPath = pathArray[i + 1];\n resVal = resVal[currentPath] = isInteger(nextPath) && Number(nextPath) >= 0 ? [] : {};\n }\n } // Return original object if new value is the same as current\n\n\n if ((i === 0 ? obj : resVal)[pathArray[i]] === value) {\n return obj;\n }\n\n if (value === undefined) {\n delete resVal[pathArray[i]];\n } else {\n resVal[pathArray[i]] = value;\n } // If the path array has a single element, the loop did not run.\n // Deleting on `resVal` had no effect in this scenario, so we delete on the result instead.\n\n\n if (i === 0 && value === undefined) {\n delete res[pathArray[i]];\n }\n\n return res;\n}", "function setIn(obj, path, value) {\n var res = (0,lodash_es_clone__WEBPACK_IMPORTED_MODULE_5__.default)(obj); // this keeps inheritance when obj is a class\n\n var resVal = res;\n var i = 0;\n var pathArray = (0,lodash_es_toPath__WEBPACK_IMPORTED_MODULE_4__.default)(path);\n\n for (; i < pathArray.length - 1; i++) {\n var currentPath = pathArray[i];\n var currentObj = getIn(obj, pathArray.slice(0, i + 1));\n\n if (currentObj && (isObject(currentObj) || Array.isArray(currentObj))) {\n resVal = resVal[currentPath] = (0,lodash_es_clone__WEBPACK_IMPORTED_MODULE_5__.default)(currentObj);\n } else {\n var nextPath = pathArray[i + 1];\n resVal = resVal[currentPath] = isInteger(nextPath) && Number(nextPath) >= 0 ? [] : {};\n }\n } // Return original object if new value is the same as current\n\n\n if ((i === 0 ? obj : resVal)[pathArray[i]] === value) {\n return obj;\n }\n\n if (value === undefined) {\n delete resVal[pathArray[i]];\n } else {\n resVal[pathArray[i]] = value;\n } // If the path array has a single element, the loop did not run.\n // Deleting on `resVal` had no effect in this scenario, so we delete on the result instead.\n\n\n if (i === 0 && value === undefined) {\n delete res[pathArray[i]];\n }\n\n return res;\n}", "function setIn(obj, path, value) {\n var res = Object(lodash_es_clone__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(obj); // this keeps inheritance when obj is a class\n\n var resVal = res;\n var i = 0;\n var pathArray = Object(lodash_es_toPath__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(path);\n\n for (; i < pathArray.length - 1; i++) {\n var currentPath = pathArray[i];\n var currentObj = getIn(obj, pathArray.slice(0, i + 1));\n\n if (currentObj && (isObject(currentObj) || Array.isArray(currentObj))) {\n resVal = resVal[currentPath] = Object(lodash_es_clone__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(currentObj);\n } else {\n var nextPath = pathArray[i + 1];\n resVal = resVal[currentPath] = isInteger(nextPath) && Number(nextPath) >= 0 ? [] : {};\n }\n } // Return original object if new value is the same as current\n\n\n if ((i === 0 ? obj : resVal)[pathArray[i]] === value) {\n return obj;\n }\n\n if (value === undefined) {\n delete resVal[pathArray[i]];\n } else {\n resVal[pathArray[i]] = value;\n } // If the path array has a single element, the loop did not run.\n // Deleting on `resVal` had no effect in this scenario, so we delete on the result instead.\n\n\n if (i === 0 && value === undefined) {\n delete res[pathArray[i]];\n }\n\n return res;\n}", "function setDeepValue(obj, path, value) {\n if (typeof path === 'string') {\n path = path.split('.');\n }\n if (path.length > 1) {\n const e = path.shift();\n setDeepValue(obj[e] = Object.prototype.toString.call(obj[e]) === '[object Object]' ? obj[e] : {}, path, value);\n }\n else {\n obj[path[0]] = value;\n }\n}", "function lazyImmutableDeepSet(target, original, path, value) {\n if (!path.length)\n return value;\n var parentNode;\n var targetNode = target;\n var originalNode = original;\n // We assume that the last path component is the key of a value; not a\n // container, so we stop there.\n for (var i = 0; i < path.length; i++) {\n var key = path[i];\n // If the target still references the original's objects, we need to diverge\n if (!targetNode || targetNode === originalNode) {\n if (typeof key === 'number') {\n targetNode = originalNode ? tslib_1.__spread(originalNode) : [];\n }\n else if (typeof key === 'string') {\n targetNode = originalNode ? tslib_1.__assign({}, originalNode) : {};\n }\n else {\n throw new Error(\"Unknown path type \" + JSON.stringify(key) + \" in path \" + JSON.stringify(path) + \" at index \" + i);\n }\n if (i === 0) {\n // Make sure we have a reference to the new target. We can keep the\n // reference here because \"target\" is pointing as currentNode.data.\n target = targetNode;\n }\n else {\n parentNode[path[i - 1]] = targetNode;\n }\n }\n // Regardless, we keep walking deeper.\n parentNode = targetNode;\n targetNode = targetNode[key];\n originalNode = originalNode && originalNode[key];\n }\n // Finally, set the value in our previously or newly cloned target.\n parentNode[path[path.length - 1]] = value;\n return target;\n}", "function setPath(obj, value, path) {\n var keys = path.split('.');\n var ret = obj;\n var lastKey = keys[keys.length -1];\n var target = ret;\n\n var parentPathKeys = keys.slice(0, keys.length -1);\n parentPathKeys.forEach(function(key) {\n if (!target.hasOwnProperty(key)) {\n target[key] = {};\n }\n target = target[key];\n });\n\n target[lastKey] = value;\n return ret;\n }", "function setPath(obj, value, path) {\n var keys = path.split('.');\n var ret = obj;\n var lastKey = keys[keys.length - 1];\n var target = ret;\n var parentPathKeys = keys.slice(0, keys.length - 1);\n parentPathKeys.forEach(function (key) {\n if (!target.hasOwnProperty(key)) {\n target[key] = {};\n }\n target = target[key];\n });\n target[lastKey] = value;\n return ret;\n }", "function setPath(obj, value, path) {\n var keys = path.split('.');\n var ret = obj;\n var lastKey = keys[keys.length - 1];\n var target = ret;\n var parentPathKeys = keys.slice(0, keys.length - 1);\n parentPathKeys.forEach(function (key) {\n if (!target.hasOwnProperty(key)) {\n target[key] = {};\n }\n target = target[key];\n });\n target[lastKey] = value;\n return ret;\n }", "function setPropFromPath(obj, path, value) {\n var keys = path.split('.');\n var targetKey = keys.pop();\n var objRef = obj;\n\n for (var i in keys) {\n if (typeof objRef === 'object') {\n if (typeof objRef[keys[i]] === 'undefined' || objRef[keys[i]] === null) { objRef[keys[i]] = {}; }\n\n objRef = objRef[keys[i]];\n }\n }\n\n if (typeof objRef === 'object') { objRef[targetKey] = value; }\n }", "function setPropFromPath(obj, path, value) {\n var keys = path.split('.');\n var targetKey = keys.pop();\n var objRef = obj;\n\n for (var i in keys) {\n if (typeof objRef === 'object') {\n if (typeof objRef[keys[i]] === 'undefined' || objRef[keys[i]] === null) { objRef[keys[i]] = {}; }\n\n objRef = objRef[keys[i]];\n }\n }\n\n if (typeof objRef === 'object') { objRef[targetKey] = value; }\n }", "function setInObj(obj, keyPath, value){\n var currPath = obj;\n var path = keyPath.split('.');\n console.log('path from keyPath: ' + path);\n for(var i=0; i < path.length-1; i++){\n console.log('path chunk: ' + path[i]);\n if (typeof(currPath[ path[i] ]) !== \"undefined\") {\n console.log('path chunk exist: ' + currPath[ path[i] ]);\n currPath = currPath[ path[i] ];\n //console.log(obj); // DEBUG\n //console.log(currPath); // DEBUG\n } else {\n //console.log('path added: ' + currPath[ path[i] ]);\n currPath[ path[i] ] = {};\n currPath = currPath[ path[i] ];\n //console.log(obj); // DEBUG\n //console.log(currPath); // DEBUG\n }\n }\n //currPath = value; // not working ?\n currPath[ path[ path.length-1 ] ] = value;\n}", "function setNestedProperty(path, value, obj) {\n\t\t\tvar schema = obj || dataService.data;\n\t\t\tvar pList = path.replace(/\\]/g, '').split(/\\.|\\[/);\n\t\t\tvar len = pList.length;\n\t\t\tfor (var i = 0; i < len - 1; i++) {\n\t\t\t\tvar elem = pList[i];\n\t\t\t\tif (!schema[elem])\n\t\t\t\t\treturn false;\n\t\t\t\tschema = schema[elem];\n\t\t\t}\n\t\t\tschema[pList[len - 1]] = value;\n\t\t}", "set(path, value) {\n if (typeof path === \"object\") {\n iterateObject(path, (val, n) => {\n setValue(this.data, n, val)\n });\n } else {\n setValue(this.data, path, value);\n }\n return this;\n }", "_createNestedObjectRecursive(obj, path, value) {\n if (path.length === 0) {\n return;\n }\n if ((!Object.prototype.hasOwnProperty.call(obj, path[0]) && !obj[path[0]]) || typeof obj[path[0]] !== 'object') {\n obj[path[0]] = path.length === 1 && value ? value : {};\n }\n return this._createNestedObjectRecursive(obj[path[0]], path.slice(1), value);\n }", "static _assignValue(path, value, object) {\n object = object || ApplicationState._state;\n\n const nodes = ApplicationState.walk(path);\n\n for (let index = 0; index < nodes.length; index++) {\n const node = nodes[index];\n switch (node.type) {\n case 'object':\n if (typeof object[node.name] === 'undefined') {\n object[node.name] = {};\n }\n object = object[node.name];\n break;\n case 'array':\n if (typeof object[node.name] === 'undefined') {\n object[node.name] = [];\n }\n object = object[node.name];\n break;\n case 'leaf':\n return object[node.name] = value;\n break;\n }\n }\n\n throw Error(\"We should have returned after setting the value.\");\n }", "_pathSet(path, value) {\n let obj = this.fieldNode; // we set the values relative to the fieldnode, so fieldnode is the root\n const parts = path.split('.');\n while (parts.length > 1) {\n const key = parts.shift();\n // create if not exist\n if (!(key in obj)) {\n obj[key] = {};\n }\n obj = obj[key];\n }\n obj[parts.shift()] = value;\n }", "function _set(obj, keypath, value, hook) {\n var parts = _keyPathNormalize(keypath).split('.')\n var last = parts.pop()\n var dest = obj\n parts.forEach(function(key) {\n // Still set to non-object, just throw that error\n dest = dest[key]\n })\n if (hook) {\n // hook proxy set value\n hook(dest, last, value)\n } else {\n dest[last] = value\n }\n return obj\n}", "set(path, value) {\n if (typeof path === 'string') {\n let array = path.split('.');\n return this.set(array, value);\n }\n let data = this.data;\n let len = path ? path.length : 0;\n let i;\n for (i = 0; i < len - 1; i++) {\n let segment = path[i];\n let next = data[segment];\n if (!next)\n break;\n data = next;\n }\n // Add missing objects\n for (; i < len - 1; i++) {\n let segment = path[i];\n data = data[segment] = {};\n }\n if (data) {\n let segment = path[path.length - 1];\n data[segment] = value;\n }\n return this;\n \n }", "function put(obj, path, value, opt_buildMissingPath) {\r\n path = typeOf(path, 'String') ? path.split('.') : path;\r\n \r\n for (var name, i = 0, e = path.length - 1; (name = path[i], i < e); i++) {\r\n if (obj[name] == undefined) {\r\n if (!opt_buildMissingPath) {\r\n throw new ReferenceError(\"Path couldn't be followed: \" + slice(path, 0, i + 1).join('.'));\r\n }\r\n obj[name] = {};\r\n }\r\n obj = obj[name];\r\n }\r\n \r\n if (e < 0) {\r\n throw new ReferenceError('Path must be specified.');\r\n }\r\n \r\n var oldValue = obj[name];\r\n obj[name] = value;\r\n return oldValue;\r\n }", "function dynamicSetNestedProperty(path, value, obj) {\n\t\t\tvar schema = obj || dataService.data;\n\t\t\tvar pList = path.replace(/\\]/g, '').split(/\\.|\\[/);\n\t\t\tvar len = pList.length;\n\t\t\tfor (var i = 0; i < len - 1; i++) {\n\t\t\t\tvar elem = pList[i];\n\t\t\t\tif (!schema[elem]) schema[elem] = {}\n\t\t\t\tschema = schema[elem];\n\t\t\t}\n\t\t\tschema[pList[len - 1]] = value;\n\t\t}", "function _set(obj, keypath, value) {\n\t var parts = _keyPathNormalize(keypath).split('.')\n\t var last = parts.pop()\n\t var dest = obj\n\t var hasError\n\t var errorInfo\n\t util.some(parts, function(key) {\n\t var t = util.type(dest)\n\t if (t != 'object' && t != 'array') {\n\t hasError = true\n\t errorInfo = [key, dest]\n\t return true\n\t }\n\t dest = dest[key]\n\t })\n\t // set value\n\t if (!hasError) {\n\t if (util.type(dest) != 'object' && util.type(dest) != 'array') {\n\t hasError = true\n\t errorInfo = [last, dest]\n\t } else {\n\t dest[last] = value\n\t return obj\n\t }\n\t }\n\t throw new Error('Can\\' not access \"' + errorInfo[0] + '\" of \"'+ errorInfo[1] + '\" when set value of \"' + keypath + '\"')\n\t}", "function set(obj, path, value) {\n\n\tvar keys = path.split(\".\");\n\n\tkeys.forEach(function(key, index) {\n\t\tif(index === keys.length-1) {\n\t\t\tobj[key] = value;\n\t\t}\n\t\telse {\n\t\t\tobj = obj[key];\n\t\t}\n\t});\n}", "function setPropertyByPath(obj, path, value, throwErr) {\n if (throwErr === void 0) { throwErr = true; }\n var objPath = getObjectPath(path);\n var obj = getPropertyByPath(obj, objPath, throwErr);\n var propName = getPropertyName(path);\n // TODO: Allow adding properties?\n if (!(propName in obj) && throwErr) {\n throw new Error(xp.formatString('Unable to set property value \"{0}\" by path \"{1}\". Property is unreachable.', value, path));\n }\n obj[propName] = value;\n }", "function setValueByPath(o, path, val) {\n var len = path.length - 1,\n s = o;\n if (len >= 0) {\n for (var i = 0; i < len; i++) {\n o = o[path[i]];\n }\n if (o !== undefined) {\n o[path[i]] = val;\n } else {\n s = undefined;\n }\n }\n return s;\n }", "function setNestedObjectValues(object,value,visited,response){if(visited===void 0){visited=new WeakMap();}if(response===void 0){response={};}for(var _i=0,_Object$keys=Object.keys(object);_i<_Object$keys.length;_i++){var k=_Object$keys[_i];var val=object[k];if(isObject$2(val)){if(!visited.get(val)){visited.set(val,true);// In order to keep array values consistent for both dot path and\n// bracket syntax, we need to check if this is an array so that\n// this will output { friends: [true] } and not { friends: { \"0\": true } }\nresponse[k]=Array.isArray(val)?[]:{};setNestedObjectValues(val,value,visited,response[k]);}}else {response[k]=value;}}return response;}", "function setNestedObjectValues(object, value, visited, response) {\n if (visited === void 0) {\n visited = new WeakMap();\n }\n\n if (response === void 0) {\n response = {};\n }\n\n for (var _i = 0, _Object$keys = Object.keys(object); _i < _Object$keys.length; _i++) {\n var k = _Object$keys[_i];\n var val = object[k];\n\n if (isObject(val)) {\n if (!visited.get(val)) {\n visited.set(val, true); // In order to keep array values consistent for both dot path and\n // bracket syntax, we need to check if this is an array so that\n // this will output { friends: [true] } and not { friends: { \"0\": true } }\n\n response[k] = Array.isArray(val) ? [] : {};\n setNestedObjectValues(val, value, visited, response[k]);\n }\n } else {\n response[k] = value;\n }\n }\n\n return response;\n}", "function setNestedObjectValues(object, value, visited, response) {\n if (visited === void 0) {\n visited = new WeakMap();\n }\n\n if (response === void 0) {\n response = {};\n }\n\n for (var _i = 0, _Object$keys = Object.keys(object); _i < _Object$keys.length; _i++) {\n var k = _Object$keys[_i];\n var val = object[k];\n\n if (isObject(val)) {\n if (!visited.get(val)) {\n visited.set(val, true); // In order to keep array values consistent for both dot path and\n // bracket syntax, we need to check if this is an array so that\n // this will output { friends: [true] } and not { friends: { \"0\": true } }\n\n response[k] = Array.isArray(val) ? [] : {};\n setNestedObjectValues(val, value, visited, response[k]);\n }\n } else {\n response[k] = value;\n }\n }\n\n return response;\n}", "function setNestedObjectValues(object, value, visited, response) {\n if (visited === void 0) {\n visited = new WeakMap();\n }\n\n if (response === void 0) {\n response = {};\n }\n\n for (var _i = 0, _Object$keys = Object.keys(object); _i < _Object$keys.length; _i++) {\n var k = _Object$keys[_i];\n var val = object[k];\n\n if (isObject(val)) {\n if (!visited.get(val)) {\n visited.set(val, true); // In order to keep array values consistent for both dot path and\n // bracket syntax, we need to check if this is an array so that\n // this will output { friends: [true] } and not { friends: { \"0\": true } }\n\n response[k] = Array.isArray(val) ? [] : {};\n setNestedObjectValues(val, value, visited, response[k]);\n }\n } else {\n response[k] = value;\n }\n }\n\n return response;\n}", "function setNestedObjectValues(object, value, visited, response) {\n if (visited === void 0) {\n visited = new WeakMap();\n }\n\n if (response === void 0) {\n response = {};\n }\n\n for (var _i = 0, _Object$keys = Object.keys(object); _i < _Object$keys.length; _i++) {\n var k = _Object$keys[_i];\n var val = object[k];\n\n if (isObject(val)) {\n if (!visited.get(val)) {\n visited.set(val, true); // In order to keep array values consistent for both dot path and\n // bracket syntax, we need to check if this is an array so that\n // this will output { friends: [true] } and not { friends: { \"0\": true } }\n\n response[k] = Array.isArray(val) ? [] : {};\n setNestedObjectValues(val, value, visited, response[k]);\n }\n } else {\n response[k] = value;\n }\n }\n\n return response;\n}", "function setNestedObjectValues(object, value, visited, response) {\n if (visited === void 0) {\n visited = new WeakMap();\n }\n\n if (response === void 0) {\n response = {};\n }\n\n for (var _i = 0, _Object$keys = Object.keys(object); _i < _Object$keys.length; _i++) {\n var k = _Object$keys[_i];\n var val = object[k];\n\n if (isObject(val)) {\n if (!visited.get(val)) {\n visited.set(val, true); // In order to keep array values consistent for both dot path and\n // bracket syntax, we need to check if this is an array so that\n // this will output { friends: [true] } and not { friends: { \"0\": true } }\n\n response[k] = Array.isArray(val) ? [] : {};\n setNestedObjectValues(val, value, visited, response[k]);\n }\n } else {\n response[k] = value;\n }\n }\n\n return response;\n}", "function setNestedObjectValues(object, value, visited, response) {\n if (visited === void 0) {\n visited = new WeakMap();\n }\n\n if (response === void 0) {\n response = {};\n }\n\n for (var _i = 0, _Object$keys = Object.keys(object); _i < _Object$keys.length; _i++) {\n var k = _Object$keys[_i];\n var val = object[k];\n\n if (formik_esm_isObject(val)) {\n if (!visited.get(val)) {\n visited.set(val, true); // In order to keep array values consistent for both dot path and\n // bracket syntax, we need to check if this is an array so that\n // this will output { friends: [true] } and not { friends: { \"0\": true } }\n\n response[k] = Array.isArray(val) ? [] : {};\n setNestedObjectValues(val, value, visited, response[k]);\n }\n } else {\n response[k] = value;\n }\n }\n\n return response;\n}", "function updateObject(object, newValue, path){\n var stack = path.split('.');\n while(stack.length>1){object = object[stack.shift()];}\n object[stack.shift()] = newValue;\n }", "function writeDeepPath(obj, path, val,ds) {\n\t\tif(typeof path !== 'string') return;\n\n\t\tvar paths = path.split('.'),\n\t\t\tlen = paths.length,\n\t\t\ttotal = len - 1,\n\t\t\tdata = obj;\n\t\tif(!len) return;\n\t\tfor(var i = 0; i < len; i++) {\n\t\t\tif (i< total && data[paths[i]]===undefined) data[paths[i]] = {};\n\t\t\tif(i < total) data = data[paths[i]];\n\t\t\telse data[paths[i]] = val;\n\t\t}\n\t}", "function coerce (type, obj, path, value) {\n if (isNil(path)) return;\n\n // Turn positive integer into string\n if (isPositiveInteger(path)) path = String(path);\n\n // Parse string path into an array\n if (isString(path)) {\n path = compact(path.trim().split(SEPERATOR));\n }\n\n // Return if path is invalid\n if (!path || !isArray(path) || path.length === 0) return;\n\n // Copy array for future use\n path = path.slice();\n\n // Shift the first path value\n var key = path.shift();\n\n // Return `undefined` if obj is `NaN` or `null` or `undefined`\n if (isNil(obj)) return;\n\n switch (type) {\n case 'get':\n if (path.length === 0) {\n return obj[key];\n }\n break;\n case 'set':\n if (path.length) {\n if (typeof obj[key] === 'undefined') {\n obj[key] = {};\n }\n\n if (isNil(obj[key])) return false;\n } else {\n obj[key] = value;\n return true;\n }\n break;\n case 'remove':\n if (path.length === 0) {\n\n if (isArray(obj) && isPositiveInteger(key)) {\n key = Number(key);\n\n if (obj.length - 1 < key) return false;\n\n obj.splice(key, 1);\n } else {\n if (!Object.hasOwnProperty.call(obj, key)) return false;\n\n delete obj[key];\n }\n\n return true;\n }\n break;\n case 'exists':\n if (path.length === 0) {\n if (isArray(obj) && isPositiveInteger(key)) {\n key = Number(key);\n return obj.length - 1 >= key;\n } else {\n return Object.hasOwnProperty.call(obj, key);\n }\n }\n break;\n default:\n return;\n }\n\n return coerce(type, obj[key], path, value);\n}", "function setValue(obj, keyPath, value) {\n let keys = keyPath.split(\".\");\n\n while (keys.length > 0) {\n // Set value for the last key\n if (keys.length === 1) {\n obj[keys.shift()] = value;\n return;\n }\n\n const key = keys.shift();\n\n if (obj[key] != null) {\n obj = obj[key];\n } else {\n obj = obj[key] = {};\n }\n }\n}", "function put (obj, key, value, path = []) {\n if (!isObject(value)) {\n // if we are overriding an existing object,\n // record deletion\n if (isObject(obj[key])) {\n // recursively delete object props\n del(obj, key)\n }\n\n // record parent object update\n let parent = baseObject(obj)\n parent[key] = baseObject(value)\n recordMutation('put', path, parent)\n return\n }\n\n // if we are overriding an existing non-object,\n // record update of parent base object\n if (key in obj && !isObject(obj[key])) {\n let base = baseObject(obj)\n delete base[key]\n recordMutation('put', path, base)\n }\n\n // if parent is array, ensure length gets updated\n if (Array.isArray(obj)) {\n let parent = baseObject(obj)\n recordMutation('put', path, parent)\n }\n\n let base = baseObject(value)\n recordMutation('put', path.concat(key), base)\n\n for (let childKey in value) {\n let child = value[childKey]\n\n // if any of our non-object children override an\n // existing object, then record deletion\n if (!isObject(child)) {\n if (!isObject(obj[key])) continue\n if (!isObject(obj[key][childKey])) continue\n del(obj[key], childKey, path.concat(key))\n continue\n }\n\n // recursively record puts for objects\n put(value, childKey, child, path.concat(key))\n }\n }", "setDepth(obj, path, value) {\n obj = obj || {};\n let tags = path.split(\".\").reverse();\n\n obj[tags.shift()] = value;\n\n for (let tag of tags) {\n let _obj = Object.assign({}, obj);\n obj = {[tag]: _obj};\n }\n return obj;\n }", "function remove(obj, path) {\n if (obj.toJSON) {\n // We need to get the JSON form of the object before recursing.\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON()_behavior\n obj = obj.toJSON();\n }\n if (Array.isArray(obj)) {\n var is_cloned = false;\n for (var i = 0; i < obj.length; i++) {\n var value = obj[i];\n if (value) {\n if (value instanceof ArrayBuffer || ArrayBuffer.isView(value)) {\n if (!is_cloned) {\n obj = obj.slice();\n is_cloned = true;\n }\n buffers.push(ArrayBuffer.isView(value) ? value.buffer : value);\n buffer_paths.push(path.concat([i]));\n // easier to just keep the array, but clear the entry, otherwise we have to think\n // about array length, much easier this way\n obj[i] = null;\n }\n else {\n var new_value = remove(value, path.concat([i]));\n // only assigned when the value changes, we may serialize objects that don't support assignment\n if (new_value !== value) {\n if (!is_cloned) {\n obj = obj.slice();\n is_cloned = true;\n }\n obj[i] = new_value;\n }\n }\n }\n }\n }\n else if (isPlainObject(obj)) {\n for (var key in obj) {\n var is_cloned = false;\n if (obj.hasOwnProperty(key)) {\n var value = obj[key];\n if (value) {\n if (value instanceof ArrayBuffer || ArrayBuffer.isView(value)) {\n if (!is_cloned) {\n obj = __assign({}, obj);\n is_cloned = true;\n }\n buffers.push(ArrayBuffer.isView(value) ? value.buffer : value);\n buffer_paths.push(path.concat([key]));\n delete obj[key]; // for objects/dicts we just delete them\n }\n else {\n var new_value = remove(value, path.concat([key]));\n // only assigned when the value changes, we may serialize objects that don't support assignment\n if (new_value !== value) {\n if (!is_cloned) {\n obj = __assign({}, obj);\n is_cloned = true;\n }\n obj[key] = new_value;\n }\n }\n }\n }\n }\n }\n return obj;\n }", "setIn(path, value) {\n if (isEmptyPath(path))\n this.contents = value;\n else if (this.contents == null) {\n this.contents = collectionFromPath(this.schema, Array.from(path), value);\n }\n else if (assertCollection(this.contents)) {\n this.contents.setIn(path, value);\n }\n }", "function patchValueAlreadyInPath(root, patch) {\n var ancestors = [root];\n patch.path.reduce(function (parent, p) {\n ancestors.push(parent[p]);\n return parent[p];\n }, root);\n return pointToAncestor(patch.value);\n\n function pointToAncestor(obj) {\n return ___WEBPACK_IMPORTED_MODULE_12__[\"default\"].isObject(obj) && (ancestors.indexOf(obj) >= 0 || _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_6___default()(obj).some(function (k) {\n return pointToAncestor(obj[k]);\n }));\n }\n}", "function setObjectValue(obj, attribute, value) {\n // Reference to return\n var reference = obj;\n\n if (attribute.indexOf('.') >= 0) {\n // Handle dotted path\n var path = attribute.split('.');\n\n while (path.length > 1) {\n var shift = path.shift();\n\n // If not exists, create it\n if (!obj[shift]) {\n obj[shift] = {};\n }\n\n obj = obj[shift];\n }\n\n obj[path.shift()] = value;\n } else {\n // Handle simple path\n obj[attribute] = value;\n }\n\n return reference;\n}", "function setProperty(path, obj, val) {\n var parts = path.split('.'),\n last = parts.pop(),\n part;\n\n /* jshint boss: true */\n while (part = parts.shift()) { // assignment\n // rewrite property if it exists but is not an object\n obj = obj[part] = obj[part] instanceof Object ?\n obj[part] : {};\n }\n\n obj[last] = val;\n}", "function patchValueAlreadyInPath(root, patch) {\n var ancestors = [root];\n patch.path.reduce(function (parent, p) {\n ancestors.push(parent[p]);\n return parent[p];\n }, root);\n return pointToAncestor(patch.value);\n\n function pointToAncestor(obj) {\n return ___WEBPACK_IMPORTED_MODULE_12__.default.isObject(obj) && (ancestors.indexOf(obj) >= 0 || _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_6___default()(obj).some(function (k) {\n return pointToAncestor(obj[k]);\n }));\n }\n}", "function subPointer(path) {\n\n return {\n\n _refresh: function() {\n var current = util.pick(root.data, path) \n this._previous = this._current\n this._current = current\n },\n \n isChanged: function() { return this._previous !== this._current },\n\n refine: function(ext) {\n var newPath = path.concat(typeof ext == 'string' ? ext.split('.') : ext)\n var newPathString = newPath.join('.')\n var existing = root.subs[newPathString]\n var sub = existing || (root.subs[newPathString] = subPointer(newPath))\n !existing && sub._refresh()\n return sub\n },\n \n fromRoot: function(ext) {\n return root.refine(ext)\n },\n\n deref: function(orDefault) {\n return typeof this._current !== 'undefined' ? this._current : orDefault\n },\n\n update: function(delta) {\n var deltaForRoot = util.nest(path, delta)\n var newData = React.addons.update(root.data, deltaForRoot)\n root.swap(newData)\n },\n\n get: function(path) {\n return util.pick(this.deref(), path)\n },\n\n set: function(val) {\n return this.update({ $set: val })\n }\n }\n }", "setIn(path, value) {\n if (Collection.isEmptyPath(path)) {\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents = value;\n }\n else if (this.contents == null) {\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents = Collection.collectionFromPath(this.schema, Array.from(path), value);\n }\n else if (assertCollection(this.contents)) {\n this.contents.setIn(path, value);\n }\n }", "function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n }", "function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n }", "function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n }", "function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n }", "function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n }", "function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n }", "function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n }", "function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n }", "function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n }", "function objectSet (label, value) {\n if(o) {\n o[label] = value;\n }\n var newPath = self.makeObjectPath(path, label);\n var handled = self.emitValue(newPath, value);\n if(!handled && typeof dispose == 'function') {\n dispose();\n }\n return newPath;\n }", "function cloneDeep(value) {\n return _.cloneDeep(value);\n}", "function Data(root, refPath, value, ensurePathValid) {\n root = root || Store;\n var toSet = arguments.length >= 3 && value !== __;\n var v = root;\n // var proppath = fullpathOf(null, root);\n var paths = [];\n if (refPath) paths = splitPath(refPath);\n var parent;\n var prop;\n\n while (paths.length) {\n if (ensurePathValid && v == null) {\n parent[prop] = {};\n } else if (Util.isBasic(v)) {\n return undefined;\n }\n prop = paths.shift();\n // proppath += (proppath === '' ? '' : '.') + prop;\n if (toSet && paths.length === 0) { /* set */\n if (Util.isInstance(v, OArray) &&\n !(Util.isObject(v[prop]) && Util.isObject(value))) {\n v.set(prop, value);\n } else {\n v[prop] = Util.extend(v[prop], value);\n }\n } else { /* get */\n parent = v;\n v = v[prop];\n }\n }\n return toSet ? v[prop] : v;\n}", "function cloneDeep$2(value) {\n // If the value is an array, create a new array where every item has been cloned.\n if (Array.isArray(value)) {\n return value.map(function (item) { return cloneDeep$2(item); });\n }\n // If the value is an object, go through all of the object’s properties and add them to a new\n // object.\n if (value !== null && typeof value === 'object') {\n var nextValue = {};\n for (var key in value) {\n if (value.hasOwnProperty(key)) {\n nextValue[key] = cloneDeep$2(value[key]);\n }\n }\n return nextValue;\n }\n // Otherwise this is some primitive value and it is therefore immutable so we can just return it\n // directly.\n return value;\n}", "setObjectWithNestedKey(obj, key, value) {\n\n if(key.indexOf(\".\")) {\n // Need to deal with arrays\n var keys = key.split(\".\");\n var lastHash = keys.pop();\n for(var i = 0; i < keys.length; i++) {\n let keyPointer = keys[i];\n\n if(_.isString(keyPointer) && keyPointer.indexOf(\"[\") === 0) {\n keyPointer = keyPointer.replace(\"[\", \"\").replace(\"]\", \"\");\n keyPointer = parseInt(keyPointer, 10);\n }\n\n if(!_.has(obj, keyPointer) || !_.isObject(obj[keyPointer])) {\n\n var newObj = {};\n var nextKey = i + 1;\n\n if(keys.length > nextKey && _.isString(keys[nextKey]) && keys[nextKey].indexOf(\"[\") === 0) {\n newObj = [];\n }\n\n\n obj[keyPointer] = newObj;\n\n }\n\n obj = obj[keyPointer];\n }\n\n //obj[lastHash] = {};\n key = lastHash;\n }\n\n obj[key] = value;\n\n\n return true;\n }", "setValue(_value) {\n if (this.isntUndefined(_value) && this.isValueObject(this.valueObj) && this.valueDiffers(_value)) {\n this.__value = _value;\n if (this.isObjectOrArray(_value)) {\n this.valueObj.set(this.cloneObject(_value));\n }\n else {\n this.valueObj.set(_value);\n }\n if (this.isFunction(this.refresh)) {\n this.refresh();\n }\n else if (this.isFunction(this.refreshValue)) {\n this.refreshValue();\n }\n }\n }", "function cloneDeep(value) {\n // If the value is an array, create a new array where every item has been cloned.\n if (Array.isArray(value)) {\n return value.map(function (item) { return cloneDeep(item); });\n }\n // If the value is an object, go through all of the object’s properties and add them to a new\n // object.\n if (value !== null && typeof value === 'object') {\n var nextValue = {};\n for (var key in value) {\n if (value.hasOwnProperty(key)) {\n nextValue[key] = cloneDeep(value[key]);\n }\n }\n return nextValue;\n }\n // Otherwise this is some primitive value and it is therefore immutable so we can just return it\n // directly.\n return value;\n}", "function cloneDeep(value) {\n // If the value is an array, create a new array where every item has been cloned.\n if (Array.isArray(value)) {\n return value.map(function (item) { return cloneDeep(item); });\n }\n // If the value is an object, go through all of the object’s properties and add them to a new\n // object.\n if (value !== null && typeof value === 'object') {\n var nextValue = {};\n for (var key in value) {\n if (value.hasOwnProperty(key)) {\n nextValue[key] = cloneDeep(value[key]);\n }\n }\n return nextValue;\n }\n // Otherwise this is some primitive value and it is therefore immutable so we can just return it\n // directly.\n return value;\n}", "function cloneDeep(value) {\n // If the value is an array, create a new array where every item has been cloned.\n if (Array.isArray(value)) {\n return value.map(function (item) { return cloneDeep(item); });\n }\n // If the value is an object, go through all of the object’s properties and add them to a new\n // object.\n if (value !== null && typeof value === 'object') {\n var nextValue = {};\n for (var key in value) {\n if (value.hasOwnProperty(key)) {\n nextValue[key] = cloneDeep(value[key]);\n }\n }\n return nextValue;\n }\n // Otherwise this is some primitive value and it is therefore immutable so we can just return it\n // directly.\n return value;\n}", "function cloneDeep(value) {\n // If the value is an array, create a new array where every item has been cloned.\n if (Array.isArray(value)) {\n return value.map(function (item) { return cloneDeep(item); });\n }\n // If the value is an object, go through all of the object’s properties and add them to a new\n // object.\n if (value !== null && typeof value === 'object') {\n var nextValue = {};\n for (var key in value) {\n if (value.hasOwnProperty(key)) {\n nextValue[key] = cloneDeep(value[key]);\n }\n }\n return nextValue;\n }\n // Otherwise this is some primitive value and it is therefore immutable so we can just return it\n // directly.\n return value;\n}", "function cloneDeep(value) {\n // If the value is an array, create a new array where every item has been cloned.\n if (Array.isArray(value)) {\n return value.map(function (item) { return cloneDeep(item); });\n }\n // If the value is an object, go through all of the object’s properties and add them to a new\n // object.\n if (value !== null && typeof value === 'object') {\n var nextValue = {};\n for (var key in value) {\n if (value.hasOwnProperty(key)) {\n nextValue[key] = cloneDeep(value[key]);\n }\n }\n return nextValue;\n }\n // Otherwise this is some primitive value and it is therefore immutable so we can just return it\n // directly.\n return value;\n}", "function cloneDeep(value) {\n // If the value is an array, create a new array where every item has been cloned.\n if (Array.isArray(value)) {\n return value.map(function (item) { return cloneDeep(item); });\n }\n // If the value is an object, go through all of the object’s properties and add them to a new\n // object.\n if (value !== null && typeof value === 'object') {\n var nextValue = {};\n for (var key in value) {\n if (value.hasOwnProperty(key)) {\n nextValue[key] = cloneDeep(value[key]);\n }\n }\n return nextValue;\n }\n // Otherwise this is some primitive value and it is therefore immutable so we can just return it\n // directly.\n return value;\n}", "function cloneDeep(value) {\n // If the value is an array, create a new array where every item has been cloned.\n if (Array.isArray(value)) {\n return value.map(function (item) { return cloneDeep(item); });\n }\n // If the value is an object, go through all of the object’s properties and add them to a new\n // object.\n if (value !== null && typeof value === 'object') {\n var nextValue = {};\n for (var key in value) {\n if (value.hasOwnProperty(key)) {\n nextValue[key] = cloneDeep(value[key]);\n }\n }\n return nextValue;\n }\n // Otherwise this is some primitive value and it is therefore immutable so we can just return it\n // directly.\n return value;\n}", "function cloneDeep(value) {\n // If the value is an array, create a new array where every item has been cloned.\n if (Array.isArray(value)) {\n return value.map(function (item) { return cloneDeep(item); });\n }\n // If the value is an object, go through all of the object’s properties and add them to a new\n // object.\n if (value !== null && typeof value === 'object') {\n var nextValue = {};\n for (var key in value) {\n if (value.hasOwnProperty(key)) {\n nextValue[key] = cloneDeep(value[key]);\n }\n }\n return nextValue;\n }\n // Otherwise this is some primitive value and it is therefore immutable so we can just return it\n // directly.\n return value;\n}", "function updateIn(rootVal, paths, f) {\n\t for (var _len3 = arguments.length, args = Array(_len3 > 3 ? _len3 - 3 : 0), _key3 = 3; _key3 < _len3; _key3++) {\n\t args[_key3 - 3] = arguments[_key3];\n\t }\n\t\n\t var ff = function ff(v) {\n\t return f.apply(null, [v].concat(args));\n\t };\n\t\n\t var newRootVal;\n\t if (paths.length > 0) {\n\t var command = rootAt(paths, { $apply: ff });\n\t newRootVal = (0, _reactAddonsUpdate2.default)(rootVal, command);\n\t } else if (paths.length === 0) {\n\t newRootVal = ff(rootVal);\n\t }\n\t\n\t // would be better to do this valEq check on just the leaf\n\t return (0, _deepEqual2.default)(rootVal, newRootVal) ? rootVal // preserve === if same value\n\t : newRootVal;\n\t}", "function cloneDeep(value) {\n // If the value is an array, create a new array where every item has been cloned.\n if (Array.isArray(value)) {\n return value.map(function (item) {\n return cloneDeep(item);\n });\n }\n // If the value is an object, go through all of the object’s properties and add them to a new\n // object.\n if (value !== null && typeof value === 'object') {\n var nextValue = {};\n for (var key in value) {\n if (value.hasOwnProperty(key)) {\n nextValue[key] = cloneDeep(value[key]);\n }\n }\n return nextValue;\n }\n // Otherwise this is some primitive value and it is therefore immutable so we can just return it\n // directly.\n return value;\n}", "function cloneDeep(value) {\n // If the value is an array, create a new array where every item has been cloned.\n if (Array.isArray(value)) {\n return value.map(function (item) {\n return cloneDeep(item);\n });\n }\n // If the value is an object, go through all of the object’s properties and add them to a new\n // object.\n if (value !== null && typeof value === 'object') {\n var nextValue = {};\n for (var key in value) {\n if (value.hasOwnProperty(key)) {\n nextValue[key] = cloneDeep(value[key]);\n }\n }\n return nextValue;\n }\n // Otherwise this is some primitive value and it is therefore immutable so we can just return it\n // directly.\n return value;\n}", "function fastpathSet(obj, name) {\n if (name === 'toString') { fail(\"internal: Can't fastpath .toString\"); }\n if (isFrozen(obj)) {\n fail(\"Can't set .\", name, ' on frozen (', debugReference(obj), ')');\n }\n if (typeOf(obj) === 'function') {\n fail(\"Can't make .\", name, \n ' writable on a function (', debugReference(obj), ')');\n }\n fastpathEnum(obj, name);\n fastpathRead(obj, name);\n if (obj[name + '_canCall___']) {\n obj[name + '_canCall___'] = false;\n }\n if (obj[name + '_grantCall___']) {\n obj[name + '_grantCall___'] = false;\n }\n obj.SLOWFREEZE___ = obj;\n obj[name + '_canSet___'] = obj;\n }", "function set (path, value) {\n let map = this._root\n for (const item of path) {\n let nextMap = map.get(item)\n if (!nextMap) {\n // Create next map if none exists\n nextMap = new Map()\n map.set(item, nextMap)\n }\n map = nextMap\n }\n\n // Reached end of path. Set the data symbol to the given value, and\n // increment size if nothing was here before.\n if (!map.has(dataSymbol)) this._size += 1\n map.set(dataSymbol, value)\n return this\n}", "function deepObjectAssignNonentry() {\n for (var _len2 = arguments.length, values = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n values[_key2] = arguments[_key2];\n }\n\n if (values.length < 2) {\n return values[0];\n } else if (values.length > 2) {\n var _context2;\n\n return deepObjectAssignNonentry.apply(void 0, concat$2(_context2 = [deepObjectAssign(values[0], values[1])]).call(_context2, toConsumableArray(slice$3(values).call(values, 2))));\n }\n\n var a = values[0];\n var b = values[1];\n\n var _iterator = _createForOfIteratorHelper(ownKeys$3(b)),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var prop = _step.value;\n if (Object.prototype.propertyIsEnumerable.call(b, b[prop])) ;else if (b[prop] === DELETE) {\n delete a[prop];\n } else if (a[prop] !== null && b[prop] !== null && _typeof_1(a[prop]) === \"object\" && _typeof_1(b[prop]) === \"object\" && !isArray$5(a[prop]) && !isArray$5(b[prop])) {\n a[prop] = deepObjectAssignNonentry(a[prop], b[prop]);\n } else {\n a[prop] = clone(b[prop]);\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return a;\n}", "function deepObjectAssignNonentry() {\n for (var _len2 = arguments.length, values = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n values[_key2] = arguments[_key2];\n }\n\n if (values.length < 2) {\n return values[0];\n } else if (values.length > 2) {\n var _context2;\n\n return deepObjectAssignNonentry.apply(void 0, concat$2(_context2 = [deepObjectAssign(values[0], values[1])]).call(_context2, toConsumableArray(slice$6(values).call(values, 2))));\n }\n\n var a = values[0];\n var b = values[1];\n\n var _iterator = _createForOfIteratorHelper(ownKeys$3(b)),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var prop = _step.value;\n if (Object.prototype.propertyIsEnumerable.call(b, b[prop])) ;else if (b[prop] === DELETE) {\n delete a[prop];\n } else if (a[prop] !== null && b[prop] !== null && _typeof_1(a[prop]) === \"object\" && _typeof_1(b[prop]) === \"object\" && !isArray$3(a[prop]) && !isArray$3(b[prop])) {\n a[prop] = deepObjectAssignNonentry(a[prop], b[prop]);\n } else {\n a[prop] = clone(b[prop]);\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return a;\n}", "function safeDeepClone(circularValue, refs, obj) {\n var copy;\n\n // object is a false or empty value, or otherwise not an object\n if (!obj || 'object' !== typeof obj || obj instanceof Error || obj instanceof ArrayBuffer || obj instanceof Blob || obj instanceof File) return obj;\n\n // Handle Date\n if (obj instanceof Date) {\n copy = new Date();\n copy.setTime(obj.getTime());\n return copy;\n }\n\n // Handle Array - or array-like items\n if (obj instanceof Array || obj.length) {\n \n refs.push(obj);\n copy = [];\n for (var i = 0, len = obj.length; i < len; i++) {\n if (refs.indexOf(obj[i]) >= 0) {\n copy[i] = circularValue;\n } else {\n copy[i] = safeDeepClone(circularValue, refs, obj[i]);\n }\n }\n refs.pop();\n return copy;\n }\n\n // Handle Object\n refs.push(obj);\n\n // Bring a long prototype\n if (obj.constructor && obj.constructor !== Object) {\n copy = Object.create(obj.constructor.prototype);\n } else {\n copy = {};\n }\n\n for (var attr in obj) {\n if (obj.hasOwnProperty(attr) && attr !== '$$hashKey') {\n if (refs.indexOf(obj[attr]) >= 0) {\n copy[attr] = circularValue;\n } else {\n copy[attr] = safeDeepClone(circularValue, refs, obj[attr]);\n }\n }\n }\n refs.pop();\n return copy;\n}", "function deepObjectAssignNonentry() {\n for (var _len2 = arguments.length, values = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n values[_key2] = arguments[_key2];\n }\n\n if (values.length < 2) {\n return values[0];\n } else if (values.length > 2) {\n var _context2;\n\n return deepObjectAssignNonentry.apply(void 0, concat$2(_context2 = [deepObjectAssign(values[0], values[1])]).call(_context2, toConsumableArray(slice$4(values).call(values, 2))));\n }\n\n var a = values[0];\n var b = values[1];\n\n var _iterator = _createForOfIteratorHelper(ownKeys$3(b)),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var prop = _step.value;\n if (!Object.prototype.propertyIsEnumerable.call(b, prop)) ;else if (b[prop] === DELETE) {\n delete a[prop];\n } else if (a[prop] !== null && b[prop] !== null && _typeof_1(a[prop]) === \"object\" && _typeof_1(b[prop]) === \"object\" && !isArray$5(a[prop]) && !isArray$5(b[prop])) {\n a[prop] = deepObjectAssignNonentry(a[prop], b[prop]);\n } else {\n a[prop] = clone(b[prop]);\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return a;\n}", "function wrap (obj, onMutate, path = []) {\n function recordMutation (op, childPath, value) {\n let fullPath = path.concat(childPath)\n let oldValue\n let existed = false\n try {\n [ oldValue, existed ] = access(obj, childPath)\n } catch (err) {}\n let mutation = {\n op,\n path: fullPath,\n oldValue: baseObject(oldValue),\n newValue: value,\n existed\n }\n onMutate(mutation)\n // TODO: replace mutations for overriden paths\n }\n\n // TODO: wrap array methods to record array-specific mutations,\n // otherwise ops like splices and shifts will create N mutations\n\n function put (obj, key, value, path = []) {\n if (!isObject(value)) {\n // if we are overriding an existing object,\n // record deletion\n if (isObject(obj[key])) {\n // recursively delete object props\n del(obj, key)\n }\n\n // record parent object update\n let parent = baseObject(obj)\n parent[key] = baseObject(value)\n recordMutation('put', path, parent)\n return\n }\n\n // if we are overriding an existing non-object,\n // record update of parent base object\n if (key in obj && !isObject(obj[key])) {\n let base = baseObject(obj)\n delete base[key]\n recordMutation('put', path, base)\n }\n\n // if parent is array, ensure length gets updated\n if (Array.isArray(obj)) {\n let parent = baseObject(obj)\n recordMutation('put', path, parent)\n }\n\n let base = baseObject(value)\n recordMutation('put', path.concat(key), base)\n\n for (let childKey in value) {\n let child = value[childKey]\n\n // if any of our non-object children override an\n // existing object, then record deletion\n if (!isObject(child)) {\n if (!isObject(obj[key])) continue\n if (!isObject(obj[key][childKey])) continue\n del(obj[key], childKey, path.concat(key))\n continue\n }\n\n // recursively record puts for objects\n put(value, childKey, child, path.concat(key))\n }\n }\n\n function del (obj, key, path = []) {\n let value = obj[key]\n\n if (!isObject(obj[key])) {\n // record parent object update\n let parent = baseObject(obj)\n delete parent[key]\n recordMutation('put', path, parent)\n return\n }\n\n // recursively record deletions for objects\n for (let childKey in value) {\n let child = value[childKey]\n if (!isObject(child)) continue\n del(value, childKey, path.concat(key))\n }\n\n recordMutation('del', path.concat(key))\n }\n\n let wrapped = new Proxy(obj, {\n // recursively wrap child objects when accessed\n get (obj, key) {\n let value = obj[key]\n\n // functions should be bound to parent\n if (typeof value === 'function') {\n return value.bind(wrapped)\n }\n\n // don't recurse if not object\n if (!isObject(value)) {\n return value\n }\n\n // convert array bases to actual array\n if ('__MERK_ARRAY__' in value) {\n let base = value\n value = new Array(value.length)\n Object.assign(value, base)\n delete value.__MERK_ARRAY__\n }\n\n // if value is object, recursively wrap\n let childPath = path.concat(key)\n return wrap(value, onMutate, childPath)\n },\n\n // record mutations\n set (obj, key, value) {\n put(obj, key, value)\n obj[key] = value\n return true\n },\n\n // record deletions as mutations too\n deleteProperty (obj, key) {\n if (!(key in obj)) return true\n del(obj, key)\n delete obj[key]\n return true\n },\n\n // ovverride ownKeys to exclude symbol properties\n ownKeys () {\n return Object.getOwnPropertyNames(obj)\n }\n })\n return wrapped\n}", "function clone(val, depth = 5) {\n if (typeof val !== 'object') {\n return val;\n }\n // If we're cloning an array, use an array as the base, otherwise use an object\n const clonedObject = Array.isArray(val) ? [] : {};\n for (const key in val) {\n // Recursively clone eack item unless we're at the maximum depth\n clonedObject[key] = depth <= 1 ? val[key] : (val[key] ? clone(val[key], depth - 1) : val[key]);\n }\n return clonedObject;\n}", "setJsonDeep(target, keys, value) {\n let origin = target;\n keys = keys.split('.');\n for (let key of keys) {\n let last = key === keys[keys.length - 1];\n if (typeof origin[key] === 'undefined' || !origin[key]) {\n origin[key] = last ? value : {};\n } else {\n origin[key] = last ? value : origin[key];\n }\n origin = origin[key];\n }\n }", "function setPropertyChanged(params) {\n var path = params.path;\n var value = params.value;\n\n var root = _config;\n var iter = root;\n var pathArray = path.split(\".\");\n\n var i = 0;\n while (iter && i < pathArray.length - 1) {\n var pathItem = pathArray[i];\n iter = iter[pathItem];\n i++;\n }\n\n if (iter && pathArray.length) {\n var lastPathItem = pathArray[pathArray.length - 1];\n\n if (!value) {\n if (pathArray.length < 3) {\n return;\n }\n\n var base = getBase({ path: path });\n if (!base) {\n return;\n }\n\n var basePathArray = pathArray.slice(2);\n var basePath = basePathArray.join(\".\");\n var baseValue = getProperty({\n path: basePath,\n root: base\n });\n iter[lastPathItem] = DistModel.clone(baseValue);\n }\n\n if (!iter[\"@metadata\"]) {\n iter[\"@metadata\"] = {};\n }\n var metadata = iter[\"@metadata\"];\n var childrenProperties = metadata.properties;\n if (!childrenProperties) {\n childrenProperties = {};\n metadata.properties = childrenProperties;\n }\n var childProperties = childrenProperties[lastPathItem];\n if (!childProperties) {\n childProperties = {};\n childrenProperties[lastPathItem] = childProperties;\n }\n childProperties.changed = value;\n }\n }", "function deepClone(obj) {\n return JSON.parse(JSON.stringify(obj));\n}", "static setItem (path, value) {\n path = Store._validatePath(path)\n\n const lastValue = (value !== undefined || value !== null) ? Store._createPath(Store.store, path, value) : Store._createPath(Store.store, path)\n\n Store._storeToLocalStorage()\n\n return lastValue\n }", "setPath(object, path, value) {\n if (object == null) return object\n const steps = spellCore.splitPath(path)\n if (!steps) return undefined\n let target = object\n // go right up to the penultimate item\n if (steps.length > 1) {\n for (let i = 0; i < steps.length - 1; i++) {\n const key = steps[i]\n if (target[key] == null) {\n if (typeof steps[i + 1] === \"number\") target[key] = []\n else target[key] = {}\n }\n if (typeof key === \"number\" && typeof target.getItem === \"function\") target = target.getItem(key)\n else target = target[key]\n }\n }\n const key = steps[steps.length - 1]\n if (typeof key === \"number\" && typeof target.setItem === \"function\") {\n target.setItem(key, value)\n } else if (value === undefined) {\n target[key] = undefined\n delete target[key]\n } else {\n target[key] = value\n }\n return value\n }", "function safeAccess(obj, path) {\n var undefinedType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;\n\n if (!obj) return undefinedType;\n var compositePaths = path.split('.');\n var movingReference = obj;\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = compositePaths[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var subpath = _step.value;\n\n // console.log(`path:${path} paths:${compositePaths} subpath:${subpath} movingReference:${inspect(movingReference,false,0)} movingReference.subpath:${inspect(movingReference[subpath], false, 0)}`)\n if (movingReference[subpath] !== undefined) movingReference = movingReference[subpath];else return undefinedType;\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n ;\n return movingReference;\n}", "function clone(val) {\n var trace = {\n objects: [],\n values: []\n };\n return doClone(trace, val);\n\n /**\n * Clones the given value.\n * @param trace An internal property used to prevent circular objects\n * from causing issues.\n * @param val The value to clone.\n */\n function doClone(trace, val) {\n var vt, prop, res, idx;\n\n // Prevent recursive processing.\n idx = trace.objects.indexOf(val);\n if (idx > -1) {\n return trace.values[idx];\n }\n\n vt = typeOf(val);\n switch (vt) {\n case 'object':\n res = {};\n traceAdd(val, res);\n for (prop in val) {\n if (val.hasOwnProperty(prop)) {\n res[prop] = doClone(trace, val[prop]);\n }\n }\n return res;\n case 'function':\n res = copy(val);\n traceAdd(val, res);\n for (prop in val) {\n /* istanbul ignore else */\n if (val.hasOwnProperty(prop)) {\n res[prop] = doClone(trace, val[prop]);\n }\n }\n return res;\n case 'array':\n res = val.map(clone.bind(null, trace));\n return res;\n // Shallow\n case 'regexp':\n case 'date':\n return copy(val);\n case 'string':\n case 'number':\n case 'boolean':\n case 'nan':\n case 'null':\n case 'undefined':\n return val;\n default:\n throw new Error(\n format('Unrecognized typeOf return value \"{0}\"', vt)\n );\n }\n\n /**\n * Adds to the trace\n * @param obj The value we are cloning.\n * @param val The resulting value which the properties\n * will be cloned onto.\n */\n function traceAdd(obj, val) {\n trace.objects.push(obj);\n trace.values.push(val);\n }\n }\n }", "function deepCopy(value) {\r\n return deepExtend(undefined, value);\r\n}", "function deepCopy(value) {\r\n return deepExtend(undefined, value);\r\n}", "function deepClone(object) {\n return JSON.parse(JSON.stringify(object));\n}", "function setNestedObject(o, key, value) {\n if (key.indexOf('.') < 0) {\n if (typeof o === 'object') {\n o[key] = value;\n }\n return;\n }\n\n var pList = key.split('.');\n var len = pList.length;\n\n for(var i = 0; i < len-1; i += 1) {\n let elem = pList[i];\n if(!o[elem]) o[elem] = {}\n o = o[elem];\n }\n\n return o[pList[len-1]] = value;\n}", "setRecursion(value) {\n this.value = value;\n this.children.forEach((child) => {\n child.setRecursion(value);\n });\n }", "function exem(o, path, value) {\n if (absenty(o)) return;\n\n var props = path.split('.');\n var currentValue = o[props[0]];\n\n if (value && props.length === 1) {\n o[props[0]] = value;\n return;\n }\n \n if (!value && props.length === 1) return currentValue;\n return exem(currentValue, props.slice(1).join('.'), value);\n}", "function deepCopy(value) {\n return deepExtend(undefined, value);\n}", "function deepCopy(value) {\n return deepExtend(undefined, value);\n}", "function deepCopy(value) {\n return deepExtend(undefined, value);\n}", "function deepCopy(value) {\n return deepExtend(undefined, value);\n}", "function deepCopy(value) {\n return deepExtend(undefined, value);\n}" ]
[ "0.75242656", "0.7520379", "0.7399823", "0.7399823", "0.7399823", "0.73113424", "0.71814436", "0.67938864", "0.67573845", "0.67254883", "0.67254883", "0.66972333", "0.66972333", "0.64113533", "0.63646054", "0.63281685", "0.632334", "0.63189703", "0.6268811", "0.6060656", "0.6012898", "0.6012411", "0.59803385", "0.59455127", "0.59450567", "0.59298086", "0.58956", "0.5837307", "0.5776563", "0.5776563", "0.5776563", "0.5776563", "0.5776563", "0.57760113", "0.57575625", "0.57097054", "0.5699921", "0.56944245", "0.5653451", "0.5603803", "0.55350435", "0.54462606", "0.5420337", "0.5407171", "0.5388043", "0.5386466", "0.5375822", "0.5364491", "0.5343669", "0.5343669", "0.5343669", "0.5343669", "0.5343669", "0.5343669", "0.5343669", "0.5343669", "0.5343669", "0.5342837", "0.5317921", "0.5309526", "0.5206601", "0.5193626", "0.5182185", "0.5160908", "0.5160908", "0.5160908", "0.5160908", "0.5160908", "0.5160908", "0.5160908", "0.5160908", "0.51582456", "0.5149033", "0.5149033", "0.5148365", "0.5147413", "0.5142001", "0.51385826", "0.51360136", "0.51315904", "0.5129824", "0.51297146", "0.5103693", "0.5081168", "0.50780076", "0.5075554", "0.5074166", "0.5060824", "0.5058484", "0.5055332", "0.5055332", "0.50494194", "0.50483984", "0.5046586", "0.5038222", "0.50194573", "0.50194573", "0.50194573", "0.50194573", "0.50194573" ]
0.7266066
6
Recursively a set the same value for all keys and arrays nested object, cloning
function setNestedObjectValues(object,value,visited,response){if(visited===void 0){visited=new WeakMap();}if(response===void 0){response={};}for(var _i=0,_Object$keys=Object.keys(object);_i<_Object$keys.length;_i++){var k=_Object$keys[_i];var val=object[k];if(isObject$2(val)){if(!visited.get(val)){visited.set(val,true);// In order to keep array values consistent for both dot path and // bracket syntax, we need to check if this is an array so that // this will output { friends: [true] } and not { friends: { "0": true } } response[k]=Array.isArray(val)?[]:{};setNestedObjectValues(val,value,visited,response[k]);}}else {response[k]=value;}}return response;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setObjectWithNestedKey(obj, key, value) {\n\n if(key.indexOf(\".\")) {\n // Need to deal with arrays\n var keys = key.split(\".\");\n var lastHash = keys.pop();\n for(var i = 0; i < keys.length; i++) {\n let keyPointer = keys[i];\n\n if(_.isString(keyPointer) && keyPointer.indexOf(\"[\") === 0) {\n keyPointer = keyPointer.replace(\"[\", \"\").replace(\"]\", \"\");\n keyPointer = parseInt(keyPointer, 10);\n }\n\n if(!_.has(obj, keyPointer) || !_.isObject(obj[keyPointer])) {\n\n var newObj = {};\n var nextKey = i + 1;\n\n if(keys.length > nextKey && _.isString(keys[nextKey]) && keys[nextKey].indexOf(\"[\") === 0) {\n newObj = [];\n }\n\n\n obj[keyPointer] = newObj;\n\n }\n\n obj = obj[keyPointer];\n }\n\n //obj[lastHash] = {};\n key = lastHash;\n }\n\n obj[key] = value;\n\n\n return true;\n }", "function lazyImmutableDeepSet(target, original, path, value) {\n if (!path.length)\n return value;\n var parentNode;\n var targetNode = target;\n var originalNode = original;\n // We assume that the last path component is the key of a value; not a\n // container, so we stop there.\n for (var i = 0; i < path.length; i++) {\n var key = path[i];\n // If the target still references the original's objects, we need to diverge\n if (!targetNode || targetNode === originalNode) {\n if (typeof key === 'number') {\n targetNode = originalNode ? tslib_1.__spread(originalNode) : [];\n }\n else if (typeof key === 'string') {\n targetNode = originalNode ? tslib_1.__assign({}, originalNode) : {};\n }\n else {\n throw new Error(\"Unknown path type \" + JSON.stringify(key) + \" in path \" + JSON.stringify(path) + \" at index \" + i);\n }\n if (i === 0) {\n // Make sure we have a reference to the new target. We can keep the\n // reference here because \"target\" is pointing as currentNode.data.\n target = targetNode;\n }\n else {\n parentNode[path[i - 1]] = targetNode;\n }\n }\n // Regardless, we keep walking deeper.\n parentNode = targetNode;\n targetNode = targetNode[key];\n originalNode = originalNode && originalNode[key];\n }\n // Finally, set the value in our previously or newly cloned target.\n parentNode[path[path.length - 1]] = value;\n return target;\n}", "function recursiveFn(source, target, key) {\n if (isArray(source) || isObject$1(source)) {\n target = isPrimitive(target) ? isObject$1(source) ? {} : [] : target;\n for (var _key in source) {\n // $FlowFixMe: support computed key here\n setter(target, _key, recursiveFn(source[_key], target[_key], _key));\n // target[key] = recursiveFn(source[key], target[key], key);\n }\n return target;\n }\n return fn(source, target, key);\n }", "function deepObjectAssignNonentry() {\n for (var _len2 = arguments.length, values = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n values[_key2] = arguments[_key2];\n }\n\n if (values.length < 2) {\n return values[0];\n } else if (values.length > 2) {\n var _context2;\n\n return deepObjectAssignNonentry.apply(void 0, concat$2(_context2 = [deepObjectAssign(values[0], values[1])]).call(_context2, toConsumableArray(slice$6(values).call(values, 2))));\n }\n\n var a = values[0];\n var b = values[1];\n\n var _iterator = _createForOfIteratorHelper(ownKeys$3(b)),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var prop = _step.value;\n if (Object.prototype.propertyIsEnumerable.call(b, b[prop])) ;else if (b[prop] === DELETE) {\n delete a[prop];\n } else if (a[prop] !== null && b[prop] !== null && _typeof_1(a[prop]) === \"object\" && _typeof_1(b[prop]) === \"object\" && !isArray$3(a[prop]) && !isArray$3(b[prop])) {\n a[prop] = deepObjectAssignNonentry(a[prop], b[prop]);\n } else {\n a[prop] = clone(b[prop]);\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return a;\n}", "function deepObjectAssignNonentry() {\n for (var _len2 = arguments.length, values = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n values[_key2] = arguments[_key2];\n }\n\n if (values.length < 2) {\n return values[0];\n } else if (values.length > 2) {\n var _context2;\n\n return deepObjectAssignNonentry.apply(void 0, concat$2(_context2 = [deepObjectAssign(values[0], values[1])]).call(_context2, toConsumableArray(slice$3(values).call(values, 2))));\n }\n\n var a = values[0];\n var b = values[1];\n\n var _iterator = _createForOfIteratorHelper(ownKeys$3(b)),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var prop = _step.value;\n if (Object.prototype.propertyIsEnumerable.call(b, b[prop])) ;else if (b[prop] === DELETE) {\n delete a[prop];\n } else if (a[prop] !== null && b[prop] !== null && _typeof_1(a[prop]) === \"object\" && _typeof_1(b[prop]) === \"object\" && !isArray$5(a[prop]) && !isArray$5(b[prop])) {\n a[prop] = deepObjectAssignNonentry(a[prop], b[prop]);\n } else {\n a[prop] = clone(b[prop]);\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return a;\n}", "function deepObjectAssignNonentry() {\n for (var _len2 = arguments.length, values = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n values[_key2] = arguments[_key2];\n }\n\n if (values.length < 2) {\n return values[0];\n } else if (values.length > 2) {\n var _context2;\n\n return deepObjectAssignNonentry.apply(void 0, concat$2(_context2 = [deepObjectAssign(values[0], values[1])]).call(_context2, toConsumableArray(slice$4(values).call(values, 2))));\n }\n\n var a = values[0];\n var b = values[1];\n\n var _iterator = _createForOfIteratorHelper(ownKeys$3(b)),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var prop = _step.value;\n if (!Object.prototype.propertyIsEnumerable.call(b, prop)) ;else if (b[prop] === DELETE) {\n delete a[prop];\n } else if (a[prop] !== null && b[prop] !== null && _typeof_1(a[prop]) === \"object\" && _typeof_1(b[prop]) === \"object\" && !isArray$5(a[prop]) && !isArray$5(b[prop])) {\n a[prop] = deepObjectAssignNonentry(a[prop], b[prop]);\n } else {\n a[prop] = clone(b[prop]);\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return a;\n}", "setJsonDeep(target, keys, value) {\n let origin = target;\n keys = keys.split('.');\n for (let key of keys) {\n let last = key === keys[keys.length - 1];\n if (typeof origin[key] === 'undefined' || !origin[key]) {\n origin[key] = last ? value : {};\n } else {\n origin[key] = last ? value : origin[key];\n }\n origin = origin[key];\n }\n }", "function clone(val, depth = 5) {\n if (typeof val !== 'object') {\n return val;\n }\n // If we're cloning an array, use an array as the base, otherwise use an object\n const clonedObject = Array.isArray(val) ? [] : {};\n for (const key in val) {\n // Recursively clone eack item unless we're at the maximum depth\n clonedObject[key] = depth <= 1 ? val[key] : (val[key] ? clone(val[key], depth - 1) : val[key]);\n }\n return clonedObject;\n}", "function recursiveFn(source, target, key) {\n if (isArray(source) || isObject$1(source)) {\n target = isPrimitive(target) ? isObject$1(source) ? {} : [] : target;\n for (var _key in source) {\n // $FlowFixMe: support computed key here\n setter(target, _key, recursiveFn(source[_key], target[_key], _key));\n // target[key] = recursiveFn(source[key], target[key], key);\n }\n return target;\n }\n return fn(source, target, key);\n }", "function recurse(tgt, src, depth) {\n Object.entries(src).forEach(function ([\n key, bb\n ]) {\n let aa;\n aa = tgt[key];\n if (aa === undefined || aa === null || aa === \"\") {\n tgt[key] = bb;\n return;\n }\n if (\n depth !== 0 &&\n typeof aa === \"object\" && aa && !Array.isArray(aa) &&\n typeof bb === \"object\" && bb && !Array.isArray(bb)\n ) {\n recurse(aa, bb, depth - 1);\n }\n });\n }", "function setNestedObjectValues(object, value, visited, response) {\n if (visited === void 0) {\n visited = new WeakMap();\n }\n\n if (response === void 0) {\n response = {};\n }\n\n for (var _i = 0, _Object$keys = Object.keys(object); _i < _Object$keys.length; _i++) {\n var k = _Object$keys[_i];\n var val = object[k];\n\n if (formik_esm_isObject(val)) {\n if (!visited.get(val)) {\n visited.set(val, true); // In order to keep array values consistent for both dot path and\n // bracket syntax, we need to check if this is an array so that\n // this will output { friends: [true] } and not { friends: { \"0\": true } }\n\n response[k] = Array.isArray(val) ? [] : {};\n setNestedObjectValues(val, value, visited, response[k]);\n }\n } else {\n response[k] = value;\n }\n }\n\n return response;\n}", "function deepFillIn(target, defaults){\n\t var i = 0,\n\t n = arguments.length,\n\t obj;\n\n\t while(++i < n) {\n\t obj = arguments[i];\n\t if (obj) {\n\t // jshint loopfunc: true\n\t forOwn(obj, function(newValue, key) {\n\t var curValue = target[key];\n\t if (curValue == null) {\n\t target[key] = newValue;\n\t } else if (isPlainObject(curValue) &&\n\t isPlainObject(newValue)) {\n\t deepFillIn(curValue, newValue);\n\t }\n\t });\n\t }\n\t }\n\n\t return target;\n\t }", "function setNestedObjectValues(object, value, visited, response) {\n if (visited === void 0) {\n visited = new WeakMap();\n }\n\n if (response === void 0) {\n response = {};\n }\n\n for (var _i = 0, _Object$keys = Object.keys(object); _i < _Object$keys.length; _i++) {\n var k = _Object$keys[_i];\n var val = object[k];\n\n if (isObject(val)) {\n if (!visited.get(val)) {\n visited.set(val, true); // In order to keep array values consistent for both dot path and\n // bracket syntax, we need to check if this is an array so that\n // this will output { friends: [true] } and not { friends: { \"0\": true } }\n\n response[k] = Array.isArray(val) ? [] : {};\n setNestedObjectValues(val, value, visited, response[k]);\n }\n } else {\n response[k] = value;\n }\n }\n\n return response;\n}", "function setNestedObjectValues(object, value, visited, response) {\n if (visited === void 0) {\n visited = new WeakMap();\n }\n\n if (response === void 0) {\n response = {};\n }\n\n for (var _i = 0, _Object$keys = Object.keys(object); _i < _Object$keys.length; _i++) {\n var k = _Object$keys[_i];\n var val = object[k];\n\n if (isObject(val)) {\n if (!visited.get(val)) {\n visited.set(val, true); // In order to keep array values consistent for both dot path and\n // bracket syntax, we need to check if this is an array so that\n // this will output { friends: [true] } and not { friends: { \"0\": true } }\n\n response[k] = Array.isArray(val) ? [] : {};\n setNestedObjectValues(val, value, visited, response[k]);\n }\n } else {\n response[k] = value;\n }\n }\n\n return response;\n}", "function setNestedObjectValues(object, value, visited, response) {\n if (visited === void 0) {\n visited = new WeakMap();\n }\n\n if (response === void 0) {\n response = {};\n }\n\n for (var _i = 0, _Object$keys = Object.keys(object); _i < _Object$keys.length; _i++) {\n var k = _Object$keys[_i];\n var val = object[k];\n\n if (isObject(val)) {\n if (!visited.get(val)) {\n visited.set(val, true); // In order to keep array values consistent for both dot path and\n // bracket syntax, we need to check if this is an array so that\n // this will output { friends: [true] } and not { friends: { \"0\": true } }\n\n response[k] = Array.isArray(val) ? [] : {};\n setNestedObjectValues(val, value, visited, response[k]);\n }\n } else {\n response[k] = value;\n }\n }\n\n return response;\n}", "function setNestedObjectValues(object, value, visited, response) {\n if (visited === void 0) {\n visited = new WeakMap();\n }\n\n if (response === void 0) {\n response = {};\n }\n\n for (var _i = 0, _Object$keys = Object.keys(object); _i < _Object$keys.length; _i++) {\n var k = _Object$keys[_i];\n var val = object[k];\n\n if (isObject(val)) {\n if (!visited.get(val)) {\n visited.set(val, true); // In order to keep array values consistent for both dot path and\n // bracket syntax, we need to check if this is an array so that\n // this will output { friends: [true] } and not { friends: { \"0\": true } }\n\n response[k] = Array.isArray(val) ? [] : {};\n setNestedObjectValues(val, value, visited, response[k]);\n }\n } else {\n response[k] = value;\n }\n }\n\n return response;\n}", "function setNestedObjectValues(object, value, visited, response) {\n if (visited === void 0) {\n visited = new WeakMap();\n }\n\n if (response === void 0) {\n response = {};\n }\n\n for (var _i = 0, _Object$keys = Object.keys(object); _i < _Object$keys.length; _i++) {\n var k = _Object$keys[_i];\n var val = object[k];\n\n if (isObject(val)) {\n if (!visited.get(val)) {\n visited.set(val, true); // In order to keep array values consistent for both dot path and\n // bracket syntax, we need to check if this is an array so that\n // this will output { friends: [true] } and not { friends: { \"0\": true } }\n\n response[k] = Array.isArray(val) ? [] : {};\n setNestedObjectValues(val, value, visited, response[k]);\n }\n } else {\n response[k] = value;\n }\n }\n\n return response;\n}", "function deepFillIn(obj, var_defaults){\n forEach(Array.prototype.slice.call(arguments, 1), function(base){\n forOwn(base, function(val, key){\n var curVal = obj[key];\n if (curVal == null) {\n obj[key] = val;\n } else if (typeof curVal === 'object' && typeof val === 'object') {\n deepFillIn(curVal, val);\n }\n });\n });\n return obj;\n }", "function changeValuesToChildren(arr){\n for (var i=0; i < arr.length; i++){\n if (Array.isArray(arr[i].values)){\n arr[i].children = arr[i].values\n delete arr[i].values\n changeValuesToChildren(arr[i].children)\n }\n }\n }", "function deepcopy(x) {\n let y, val, key\n if (typeof x !== \"object\" || x === null) return x // base case\n y = listy(x) ? [] : {} // initialize the copy\n for (key in x) {\n val = x[key]\n y[key] = deepcopy(val) // recur!\n }\n return y\n}", "function deepCopy(obj){\n if(typeof obj ==\"object\"){\n return Object.keys(obj)\n .map((key)=>({[key]:deepCopy(obj[key])}))\n .reduce((acc,cur)=>Object.assign(acc,cur),{});\n\n\n}\nreturn obj;\n\n}", "function _updateParentPopulated(arr) {\n const parent = arr[arrayParentSymbol];\n if (!parent || parent.$__.populated == null) return;\n\n const populatedPaths = Object.keys(parent.$__.populated).\n filter(p => p.startsWith(arr[arrayPathSymbol] + '.'));\n\n for (const path of populatedPaths) {\n const remnant = path.slice((arr[arrayPathSymbol] + '.').length);\n if (!Array.isArray(parent.$__.populated[path].value)) {\n continue;\n }\n\n parent.$__.populated[path].value = arr.map(val => val.populated(remnant));\n }\n}", "function sanitize(value, depth) {\n if (typeof value !== \"object\" || value === null) {\n return value;\n }\n if (Array.isArray(value)) {\n if (depth) {\n return value.map((item) => sanitize(item, depth - 1));\n }\n else {\n return [];\n }\n }\n if (depth) {\n let clone = {};\n for (let key of Object.keys(value)) {\n clone[key] = sanitize(value[key], depth - 1);\n }\n return clone;\n }\n else {\n return {};\n }\n}", "function recClone(oldObject, newObject) {\n Object.keys(oldObject).forEach(function forCurrentParam(key) {\n if (typeof oldObject[key] !== 'function') {\n if (Array.isArray(oldObject[key])) {\n newObject[key] = [];\n recClone(oldObject[key], newObject[key]);\n } else {\n newObject[key] = oldObject[key];\n }\n }\n });\n\n return newObject;\n }", "function deepCopy(obj) {\n if (typeof obj == \"object\") {\n } else if (typeof obj == \"array\") {\n return Object.keys(obj)\n .map((key) => ({ [key]: deepCopy(obj[key]) }))\n .reduce((acc, cur) => Object.assign(acc, cur), {});\n }\n return obj;\n}", "function CloneDeep(original) {\n var clone = {};\n var _loop_1 = function(key) {\n if (original.hasOwnProperty(key)) {\n if (original[key] instanceof Array) {\n clone[key] = [];\n var arr_1 = clone[key];\n original[key].forEach(function (ele) { return arr_1.push(CloneDeep(ele)); });\n }\n else if (typeof original[key] === \"object\")\n clone[key] = CloneDeep(original[key]);\n else\n clone[key] = original[key];\n }\n };\n for (var key in original) {\n _loop_1(key);\n }\n return clone;\n }", "static deepCopy(obj) {\n let output, v, key;\n output = Array.isArray(obj) ? [] : {};\n\n for (key in obj) {\n v = obj[key];\n output[key] = (typeof v === \"object\") ? this.deepCopy(v) : v;\n }\n\n return output;\n }", "function getClone() {\n // Recursive function to clone Object + Array\n function recClone(oldObject, newObject) {\n Object.keys(oldObject).forEach(function forCurrentParam(key) {\n if (typeof oldObject[key] !== 'function') {\n if (Array.isArray(oldObject[key])) {\n newObject[key] = [];\n recClone(oldObject[key], newObject[key]);\n } else {\n newObject[key] = oldObject[key];\n }\n }\n });\n\n return newObject;\n }\n \n return recClone(state, {});\n }", "function setIn(obj,path,value){var res=clone(obj);// this keeps inheritance when obj is a class\nvar resVal=res;var i=0;var pathArray=toPath(path);for(;i<pathArray.length-1;i++){var currentPath=pathArray[i];var currentObj=getIn(obj,pathArray.slice(0,i+1));if(currentObj&&(isObject$2(currentObj)||Array.isArray(currentObj))){resVal=resVal[currentPath]=clone(currentObj);}else {var nextPath=pathArray[i+1];resVal=resVal[currentPath]=isInteger(nextPath)&&Number(nextPath)>=0?[]:{};}}// Return original object if new value is the same as current\nif((i===0?obj:resVal)[pathArray[i]]===value){return obj;}if(value===undefined){delete resVal[pathArray[i]];}else {resVal[pathArray[i]]=value;}// If the path array has a single element, the loop did not run.\n// Deleting on `resVal` had no effect in this scenario, so we delete on the result instead.\nif(i===0&&value===undefined){delete res[pathArray[i]];}return res;}", "function trie_recurse( obj, key, val ) {\n if ( key.length <= 1 ) {\n if (key.length < 1) {\n obj.value = val;\n }\n obj[key] = {\n value: val\n }\n return;\n }\n let n = key.slice(0, 1);\n if (!obj[n]) obj[n] = {};\n trie_recurse(obj[n], key.slice(1, key.length), val);\n}", "function assignProxies (obj, cbs, shouldComponentUpdate, parent) {\n for (let k in obj) {\n if (obj[k] instanceof Array || obj[k] instanceof Object) {\n let curPosition = (parent === null ? '' : parent)\n let key = getCorrectPathOfObject(obj, k)\n obj[k] = assignProxies(obj[k], cbs, shouldComponentUpdate, curPosition + key)\n }\n }\n if (obj instanceof Array || obj instanceof Object) {\n Object.defineProperty(obj, '_parent', {\n enumerable: false,\n writable: true\n })\n obj._parent = parent\n }\n if (obj instanceof Array) {\n return makeArrayProxy(obj, cbs, shouldComponentUpdate)\n } else if (obj instanceof Object) {\n return makeObjectProxy(obj, cbs, shouldComponentUpdate)\n } else {\n return obj\n }\n}", "function deepReplace(obj, valueType, origValue, newValue, deleteTheseKeys=[]) {\n if (!obj || !(obj instanceof Object)) {\n return;\n }\n\n if (!(obj instanceof Array)) {\n Object.keys(obj).forEach((key) => {\n const nestedObj = obj[key];\n if (typeof nestedObj === valueType && nestedObj === origValue) {\n if (newValue === undefined) {\n deleteTheseKeys.push(key);\n } else {\n obj[key] = newValue;\n }\n } else if (nestedObj instanceof Object) {\n deepReplace(nestedObj, valueType, origValue, newValue);\n }\n });\n deleteTheseKeys.forEach((key) => {\n delete obj[key];\n });\n } else {\n obj.forEach((nestedObj, idx, currArr) => {\n if (typeof nestedObj === valueType && nestedObj === origValue) {\n if (newValue === undefined) {\n deleteTheseKeys.push(idx);\n } else {\n currArr[idx] = newValue;\n }\n } else if (nestedObj instanceof Object) {\n deepReplace(nestedObj, valueType, origValue, newValue);\n }\n });\n while (deleteTheseKeys.length > 0) {\n const idx = deleteTheseKeys.pop();\n obj.splice(idx, 1);\n }\n }\n}", "function deepObjectAssign() {\n var merged = deepObjectAssignNonentry.apply(void 0, arguments);\n stripDelete(merged);\n return merged;\n}", "function deepClone(data, clone){\n\t(isArray(data)) ? clone = [] : clone = {};\n\n\tif(isArray(data)){\n\t\tdata.forEach(elem => {\n\t\t (isObject(elem)) ? clone.push(deepClone(elem)) : clone.psuh(elem)\n\t\t})\n\t}else if(isObject(data)){\n\t\tfor(let key in data){\n\t\t\t(isObject(data[key])) ? clone[key] = deepClone(data[key]) : clone[key] = data[key]\n\t\t}\n\t}\n\n\treturn clone;\n}", "flatClone(noodle, flatList = noodle.object.flatList(obj), newList = new Array(flatList.length)) { //Kinda stupid to check lists for each recursion?\n for (var i in flatList) {\n var obj = flatList[i];\n if (typeof obj == 'object') {\n //Go through obj to find its properties in flatList and clone them to newList\n for (var j in obj) {\n var ind = flatList.indexOf(obj[i]);//Find obj[i] in flatList\n if (ind != -1) {\n if (newList[i] == undefined) {//If this object hasn't been found before\n newList[i] = shallowClone(); //TODO\n }\n }\n }\n }\n return $.extend(null, obj);\n }\n }", "function setNestedObject(o, key, value) {\n if (key.indexOf('.') < 0) {\n if (typeof o === 'object') {\n o[key] = value;\n }\n return;\n }\n\n var pList = key.split('.');\n var len = pList.length;\n\n for(var i = 0; i < len-1; i += 1) {\n let elem = pList[i];\n if(!o[elem]) o[elem] = {}\n o = o[elem];\n }\n\n return o[pList[len-1]] = value;\n}", "function setIn(obj, path, value) {\n var res = lodash_es_clone(obj); // this keeps inheritance when obj is a class\n\n var resVal = res;\n var i = 0;\n var pathArray = lodash_es_toPath(path);\n\n for (; i < pathArray.length - 1; i++) {\n var currentPath = pathArray[i];\n var currentObj = getIn(obj, pathArray.slice(0, i + 1));\n\n if (currentObj && (formik_esm_isObject(currentObj) || Array.isArray(currentObj))) {\n resVal = resVal[currentPath] = lodash_es_clone(currentObj);\n } else {\n var nextPath = pathArray[i + 1];\n resVal = resVal[currentPath] = isInteger(nextPath) && Number(nextPath) >= 0 ? [] : {};\n }\n } // Return original object if new value is the same as current\n\n\n if ((i === 0 ? obj : resVal)[pathArray[i]] === value) {\n return obj;\n }\n\n if (value === undefined) {\n delete resVal[pathArray[i]];\n } else {\n resVal[pathArray[i]] = value;\n } // If the path array has a single element, the loop did not run.\n // Deleting on `resVal` had no effect in this scenario, so we delete on the result instead.\n\n\n if (i === 0 && value === undefined) {\n delete res[pathArray[i]];\n }\n\n return res;\n}", "function setInObj(obj, keyPath, value){\n var currPath = obj;\n var path = keyPath.split('.');\n console.log('path from keyPath: ' + path);\n for(var i=0; i < path.length-1; i++){\n console.log('path chunk: ' + path[i]);\n if (typeof(currPath[ path[i] ]) !== \"undefined\") {\n console.log('path chunk exist: ' + currPath[ path[i] ]);\n currPath = currPath[ path[i] ];\n //console.log(obj); // DEBUG\n //console.log(currPath); // DEBUG\n } else {\n //console.log('path added: ' + currPath[ path[i] ]);\n currPath[ path[i] ] = {};\n currPath = currPath[ path[i] ];\n //console.log(obj); // DEBUG\n //console.log(currPath); // DEBUG\n }\n }\n //currPath = value; // not working ?\n currPath[ path[ path.length-1 ] ] = value;\n}", "function doCopy(copy, original) {\n\t\t\tvar value, key;\n\t\t\t\n\t\t\tfor (key in original) {\n\t\t\t\tvalue = original[key];\n\t\t\t\tif (value && typeof value === 'object' && value.constructor !== Array &&\n\t\t\t\t\t\ttypeof value.nodeType !== 'number') {\n\t\t\t\t\tcopy[key] = doCopy(copy[key] || {}, value); // copy\n\n\t\t\t\t} else {\n\t\t\t\t\tcopy[key] = original[key];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn copy;\n\t\t}", "$_fillRecursive(formData) {}", "function recursive( obj, key, value ) {\n if ( !obj ) return;\n var next = key.shift();\n if ( key.length === 0 )\n return value !== undefined ? obj[ next ] = value : obj[ next ];\n if ( !obj[ next ] && value !== undefined ) obj[ next ] = isNaN( key[ 0 ] ) ? {} : [];\n return recursive( obj[ next ], key, value ); // recursive call\n }", "cloneObject(obj) {\n\t\tif (typeof obj === 'object' && obj.length !== undefined) {\n\t\t\tconst newObj = [];\n\t\t\tfor (const item of obj) {\n\t\t\t\tif (typeof item === 'object') {\n\t\t\t\t\tnewObj.push(this.cloneObject(item));\n\t\t\t\t} else {\n\t\t\t\t\tnewObj.push(item);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn newObj;\n\t\t} else {\n\t\t\tconst newObj = {};\n\t\t\t// loop over the keys of the object first node\n\t\t\tfor (const key of Object.keys(obj)) {\n\t\t\t\t// If this key is an array\n\t\t\t\tif (typeof obj[key] === 'object' && obj[key].length !== undefined) {\n\t\t\t\t\tnewObj[key] = [];\n\t\t\t\t\tfor (const item of obj[key]) {\n\t\t\t\t\t\tif (typeof item === 'object') {\n\t\t\t\t\t\t\tnewObj[key].push(this.cloneObject(item));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnewObj[key].push(item);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t// If this key is an object\n\t\t\t\t} else if (typeof obj[key] === 'object') {\n\t\t\t\t\tnewObj[key] = {};\n\t\t\t\t\tconst _item = obj[key];\n\t\t\t\t\tfor (const k of Object.keys(_item)) {\n\t\t\t\t\t\tif (typeof _item[k] === 'object') {\n\t\t\t\t\t\t\tnewObj[key][k] = this.cloneObject(_item[k]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnewObj[key][k] = _item[k];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t// If this key is any other typeof\n\t\t\t\t} else {\n\t\t\t\t\tnewObj[key] = obj[key];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn newObj;\n\t\t}\n\t}", "function setIn(obj, path, value) {\n var res = (0,lodash_es_clone__WEBPACK_IMPORTED_MODULE_5__.default)(obj); // this keeps inheritance when obj is a class\n\n var resVal = res;\n var i = 0;\n var pathArray = (0,lodash_es_toPath__WEBPACK_IMPORTED_MODULE_4__.default)(path);\n\n for (; i < pathArray.length - 1; i++) {\n var currentPath = pathArray[i];\n var currentObj = getIn(obj, pathArray.slice(0, i + 1));\n\n if (currentObj && (isObject(currentObj) || Array.isArray(currentObj))) {\n resVal = resVal[currentPath] = (0,lodash_es_clone__WEBPACK_IMPORTED_MODULE_5__.default)(currentObj);\n } else {\n var nextPath = pathArray[i + 1];\n resVal = resVal[currentPath] = isInteger(nextPath) && Number(nextPath) >= 0 ? [] : {};\n }\n } // Return original object if new value is the same as current\n\n\n if ((i === 0 ? obj : resVal)[pathArray[i]] === value) {\n return obj;\n }\n\n if (value === undefined) {\n delete resVal[pathArray[i]];\n } else {\n resVal[pathArray[i]] = value;\n } // If the path array has a single element, the loop did not run.\n // Deleting on `resVal` had no effect in this scenario, so we delete on the result instead.\n\n\n if (i === 0 && value === undefined) {\n delete res[pathArray[i]];\n }\n\n return res;\n}", "function setIn(obj, path, value) {\n var res = (0,lodash_es_clone__WEBPACK_IMPORTED_MODULE_5__.default)(obj); // this keeps inheritance when obj is a class\n\n var resVal = res;\n var i = 0;\n var pathArray = (0,lodash_es_toPath__WEBPACK_IMPORTED_MODULE_4__.default)(path);\n\n for (; i < pathArray.length - 1; i++) {\n var currentPath = pathArray[i];\n var currentObj = getIn(obj, pathArray.slice(0, i + 1));\n\n if (currentObj && (isObject(currentObj) || Array.isArray(currentObj))) {\n resVal = resVal[currentPath] = (0,lodash_es_clone__WEBPACK_IMPORTED_MODULE_5__.default)(currentObj);\n } else {\n var nextPath = pathArray[i + 1];\n resVal = resVal[currentPath] = isInteger(nextPath) && Number(nextPath) >= 0 ? [] : {};\n }\n } // Return original object if new value is the same as current\n\n\n if ((i === 0 ? obj : resVal)[pathArray[i]] === value) {\n return obj;\n }\n\n if (value === undefined) {\n delete resVal[pathArray[i]];\n } else {\n resVal[pathArray[i]] = value;\n } // If the path array has a single element, the loop did not run.\n // Deleting on `resVal` had no effect in this scenario, so we delete on the result instead.\n\n\n if (i === 0 && value === undefined) {\n delete res[pathArray[i]];\n }\n\n return res;\n}", "function setIn(obj, path, value) {\n var res = (0,lodash_es_clone__WEBPACK_IMPORTED_MODULE_5__.default)(obj); // this keeps inheritance when obj is a class\n\n var resVal = res;\n var i = 0;\n var pathArray = (0,lodash_es_toPath__WEBPACK_IMPORTED_MODULE_4__.default)(path);\n\n for (; i < pathArray.length - 1; i++) {\n var currentPath = pathArray[i];\n var currentObj = getIn(obj, pathArray.slice(0, i + 1));\n\n if (currentObj && (isObject(currentObj) || Array.isArray(currentObj))) {\n resVal = resVal[currentPath] = (0,lodash_es_clone__WEBPACK_IMPORTED_MODULE_5__.default)(currentObj);\n } else {\n var nextPath = pathArray[i + 1];\n resVal = resVal[currentPath] = isInteger(nextPath) && Number(nextPath) >= 0 ? [] : {};\n }\n } // Return original object if new value is the same as current\n\n\n if ((i === 0 ? obj : resVal)[pathArray[i]] === value) {\n return obj;\n }\n\n if (value === undefined) {\n delete resVal[pathArray[i]];\n } else {\n resVal[pathArray[i]] = value;\n } // If the path array has a single element, the loop did not run.\n // Deleting on `resVal` had no effect in this scenario, so we delete on the result instead.\n\n\n if (i === 0 && value === undefined) {\n delete res[pathArray[i]];\n }\n\n return res;\n}", "function recurse(initial, update) {\n for (var prop in initial) {\n if ({}.hasOwnProperty.call(initial, prop) &&\n (update !== null && {}.hasOwnProperty.call(update, prop))\n ) {\n if (typeof initial[prop] === 'object' &&\n (\n initial[prop] !== null &&\n initial[prop].constructor !== Array\n ) &&\n (\n typeof update[prop] === 'object' &&\n update[prop] !== null\n )\n ) {\n recurse(initial[prop], update[prop])\n } else if (update[prop] === null) {\n initial[prop] = self.baseModel[prop]\n } else {\n initial[prop] = update[prop]\n }\n }\n }\n\n return initial\n }", "binClonePlus(noodle, obj, clone, map = {}, flatList = noodle.sList.new(noodle), flatClone = noodle.sList.new(noodle), flatMap = noodle.sList.new(noodle), path = [], func = function () { }, cond = function () { return true; }) {\n //Add unpassed parameters to arguments{\n [arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7], arguments[8], arguments[9]] = [clone, map, flatList, flatClone, flatMap, path, func, cond];\n if (arguments.length < 10) //This condition is necessary since arguments might be longer than 8\n arguments.length = 10;\n //}\n\n var args = Array.from(arguments);\n args.splice(7, 2);\n if (!cond.apply(undefined, args)) {\n return obj;\n }\n func.apply(undefined, args);\n\n //flatClone.push(clone);\n if (obj == null || obj == undefined)\n return obj;\n\n if (typeof obj == 'object') {\n //If clone is undefined, make it an empty array or object\n if (clone == undefined) {\n if (obj.constructor === Array) {\n clone = [];\n }\n else {\n clone = {};\n }\n }\n noodle.sList.add(noodle, flatList, obj);\n noodle.sList.add(noodle, flatClone, clone);\n noodle.sList.add(noodle, flatMap, path);\n\n var flatInd;\n //TODO: Find indices before loop\n //Go through obj to clone all its properties\n for (var i in obj) {\n [...path] = path; //Shallow clone path\n path.push(i);\n flatInd = noodle.sList.indexOf(noodle, flatList, obj[i]);\n //If we've found a new object, add it to flatList and clone it to clone and flatClone\n if (flatInd == -1) {\n //Set up map[i]{\n var mapVal;\n var isObj = true;\n //If obj[i] is not null or undefined, let mapVal be of the same type{\n if (obj[i] != undefined) {\n if (obj[i].constructor === Array)\n mapVal = [];\n else if (typeof obj[i] === 'object')\n mapVal = {};\n else {\n mapVal = obj[i];\n isObj = false;\n }\n }\n else {\n mapVal = obj[i];\n isObj = false;\n }\n //}\n map[i] = { recog: false, val: mapVal, isObj: isObj };\n //}\n //clone[i] = clone[i] || {};\n [...args] = arguments; //TODO: Guess I could place this line outside the loop?\n\n args[1] = obj[i];\n args[2] = clone[i];\n args[3] = map[i].val;\n clone[i] = noodle.object.binClonePlus.apply(undefined, args); //This works because flatList gets updated\n\n }\n //If we've seen obj[i] before, add the clone of it to clone\n else {\n clone[i] = noodle.sList.get(noodle, flatClone, flatInd);\n map[i] = { recog: true, path: noodle.sList.get(noodle, flatMap, flatInd) };\n }\n }\n return clone;\n }\n return obj;\n }", "function recursiveDeepCopy(o) {\n var newO,\n i;\n \n if (typeof o !== 'object') {\n return o;\n }\n if (!o) {\n return o;\n }\n \n if ('[object Array]' === Object.prototype.toString.apply(o)) {\n newO = [];\n for (i = 0; i < o.length; i += 1) {\n newO[i] = recursiveDeepCopy(o[i]);\n }\n return newO;\n }\n \n newO = {};\n for (i in o) {\n if (o.hasOwnProperty(i)) {\n newO[i] = recursiveDeepCopy(o[i]);\n }\n }\n return newO;\n }", "function setIn(obj, path, value) {\n var res = Object(lodash_es_clone__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(obj); // this keeps inheritance when obj is a class\n\n var resVal = res;\n var i = 0;\n var pathArray = Object(lodash_es_toPath__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(path);\n\n for (; i < pathArray.length - 1; i++) {\n var currentPath = pathArray[i];\n var currentObj = getIn(obj, pathArray.slice(0, i + 1));\n\n if (currentObj && (isObject(currentObj) || Array.isArray(currentObj))) {\n resVal = resVal[currentPath] = Object(lodash_es_clone__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(currentObj);\n } else {\n var nextPath = pathArray[i + 1];\n resVal = resVal[currentPath] = isInteger(nextPath) && Number(nextPath) >= 0 ? [] : {};\n }\n } // Return original object if new value is the same as current\n\n\n if ((i === 0 ? obj : resVal)[pathArray[i]] === value) {\n return obj;\n }\n\n if (value === undefined) {\n delete resVal[pathArray[i]];\n } else {\n resVal[pathArray[i]] = value;\n } // If the path array has a single element, the loop did not run.\n // Deleting on `resVal` had no effect in this scenario, so we delete on the result instead.\n\n\n if (i === 0 && value === undefined) {\n delete res[pathArray[i]];\n }\n\n return res;\n}", "function setIn(obj, path, value) {\n var res = clone(obj); // this keeps inheritance when obj is a class\n\n var resVal = res;\n var i = 0;\n var pathArray = toPath(path);\n\n for (; i < pathArray.length - 1; i++) {\n var currentPath = pathArray[i];\n var currentObj = getIn(obj, pathArray.slice(0, i + 1));\n\n if (currentObj && (isObject(currentObj) || Array.isArray(currentObj))) {\n resVal = resVal[currentPath] = clone(currentObj);\n } else {\n var nextPath = pathArray[i + 1];\n resVal = resVal[currentPath] = isInteger(nextPath) && Number(nextPath) >= 0 ? [] : {};\n }\n } // Return original object if new value is the same as current\n\n\n if ((i === 0 ? obj : resVal)[pathArray[i]] === value) {\n return obj;\n }\n\n if (value === undefined) {\n delete resVal[pathArray[i]];\n } else {\n resVal[pathArray[i]] = value;\n } // If the path array has a single element, the loop did not run.\n // Deleting on `resVal` had no effect in this scenario, so we delete on the result instead.\n\n\n if (i === 0 && value === undefined) {\n delete res[pathArray[i]];\n }\n\n return res;\n}", "reinitializeArray() {\n const that = this;\n\n if (that.type === 'none') {\n return;\n }\n\n const dimensions = that.dimensions,\n oldValue = JSON.stringify(that.value);\n\n if (that.dimensions === 1) {\n that.value.fill(that._getDefaultValue());\n }\n else {\n const recursion = function (arr, level) {\n for (let i = 0; i < arr.length; i++) {\n if (level === dimensions) {\n arr[i] = that._getDefaultValue();\n }\n else {\n recursion(arr[i], level + 1);\n }\n }\n };\n\n recursion(that.value, 1);\n }\n\n if (oldValue !== JSON.stringify(that.value)) {\n that._scroll();\n that.$.fireEvent('change', { 'value': that.value, 'oldValue': JSON.parse(oldValue) });\n }\n }", "function put (obj, key, value, path = []) {\n if (!isObject(value)) {\n // if we are overriding an existing object,\n // record deletion\n if (isObject(obj[key])) {\n // recursively delete object props\n del(obj, key)\n }\n\n // record parent object update\n let parent = baseObject(obj)\n parent[key] = baseObject(value)\n recordMutation('put', path, parent)\n return\n }\n\n // if we are overriding an existing non-object,\n // record update of parent base object\n if (key in obj && !isObject(obj[key])) {\n let base = baseObject(obj)\n delete base[key]\n recordMutation('put', path, base)\n }\n\n // if parent is array, ensure length gets updated\n if (Array.isArray(obj)) {\n let parent = baseObject(obj)\n recordMutation('put', path, parent)\n }\n\n let base = baseObject(value)\n recordMutation('put', path.concat(key), base)\n\n for (let childKey in value) {\n let child = value[childKey]\n\n // if any of our non-object children override an\n // existing object, then record deletion\n if (!isObject(child)) {\n if (!isObject(obj[key])) continue\n if (!isObject(obj[key][childKey])) continue\n del(obj[key], childKey, path.concat(key))\n continue\n }\n\n // recursively record puts for objects\n put(value, childKey, child, path.concat(key))\n }\n }", "shallowMerge(other, overwrite = true, withAppend = false) {\n //shallow merge must be mutable so we have to remap\n let newThis = (0, AssocArray_1.shallowMerge)(overwrite, withAppend, this.value, other.value);\n if (Array.isArray(this._value)) {\n this._value.length = 0;\n this._value.push(...newThis);\n }\n else {\n Object.getOwnPropertyNames(this._value).forEach(key => delete this._value[key]);\n Object.getOwnPropertyNames(newThis).forEach(key => this._value[key] = newThis[key]);\n }\n }", "function cloneDeep$2(value) {\n // If the value is an array, create a new array where every item has been cloned.\n if (Array.isArray(value)) {\n return value.map(function (item) { return cloneDeep$2(item); });\n }\n // If the value is an object, go through all of the object’s properties and add them to a new\n // object.\n if (value !== null && typeof value === 'object') {\n var nextValue = {};\n for (var key in value) {\n if (value.hasOwnProperty(key)) {\n nextValue[key] = cloneDeep$2(value[key]);\n }\n }\n return nextValue;\n }\n // Otherwise this is some primitive value and it is therefore immutable so we can just return it\n // directly.\n return value;\n}", "function demo008(){\n var obj = {\n subObject: {\n subKey: 'subvalue',\n subSubObject: {\n subSubKey: 'subSubValue'\n }\n }\n } ;\n const originalMap = Immutable.fromJS(obj) ;\n const newMap = originalMap.setIn(['subObject','subKey'],'ha ha!') ;\n console.info(newMap.toJS()) ;\n // {subObject:{subKey:'ha ha!', subSubObject:{subSubKey:'subSubValue'}}}\n const newerMap2 = originalMap.setIn(\n ['subObject', 'subSubObject', 'subSubKey'],\n 'ha ha ha!');\n console.info(newerMap2.toJS()) ;\n //// {subObject:{subKey:'subvalue', subSubObject:{subSubKey:'ha ha ha!'}}}\n}", "function recurse(tob, sob) {\n Object.keys(sob).forEach(function (k) {\n\n // if target ob is completely undefined, then copy the whole thing\n if (utils.isUndefined(tob[k])) {\n tob[k] = sob[k];\n }\n\n // if source ob is an object then we need to recurse to find any missing items in the target ob\n else if (utils.isObject(sob[k])) {\n recurse(tob[k], sob[k]);\n }\n\n });\n }", "static mapValuesDeep(obj, fn, key) {\n return isArray(obj)\n ? map(obj, (innerObj, idx) => ObjectUtils.mapValuesDeep(innerObj, fn, idx))\n : isPlainObject(obj)\n ? mapValues(obj, (val, key) => ObjectUtils.mapValuesDeep(val, fn, key))\n : isObject(obj)\n ? obj\n : fn(obj, key)\n }", "function deepObjectAssign() {\n var merged = deepObjectAssignNonentry.apply(void 0, arguments);\n stripDelete(merged);\n console.log(merged);\n return merged;\n}", "function deepObjectAssign() {\n var merged = deepObjectAssignNonentry.apply(void 0, arguments);\n stripDelete(merged);\n console.log(merged);\n return merged;\n}", "function fill(arrOrObj, value) {\r\n walk(arrOrObj, function(v, k) {\r\n arrOrObj[k] = value;\r\n }, 1);\r\n return arrOrObj;\r\n }", "function _clone (parent, depth) {\n // cloning null always returns null\n if (parent === null) { return null }\n\n if (depth === 0) {\n return parent\n }\n\n let child\n let proto\n if (typeof parent !== 'object') {\n return parent\n }\n\n if (parent instanceof NativeMap) {\n child = new NativeMap()\n } else if (parent instanceof NativeSet) {\n child = new NativeSet()\n } else if (parent instanceof NativePromise) {\n child = new NativePromise(function (resolve, reject) {\n parent.then(function (value) {\n resolve(_clone(value, depth - 1))\n }, function (err) {\n reject(_clone(err, depth - 1))\n })\n })\n } else if (clone.__isArray(parent)) {\n child = []\n } else if (clone.__isRegExp(parent)) {\n child = new RegExp(parent.source, __getRegExpFlags(parent))\n if (parent.lastIndex) child.lastIndex = parent.lastIndex\n } else if (clone.__isDate(parent)) {\n child = new Date(parent.getTime())\n } else if (useBuffer && Buffer.isBuffer(parent)) {\n child = Buffer.alloc(parent.length)\n parent.copy(child)\n return child\n } else if (parent instanceof Error) {\n child = Object.create(parent)\n } else {\n if (typeof prototype === 'undefined') {\n proto = Object.getPrototypeOf(parent)\n child = Object.create(proto)\n } else {\n child = Object.create(prototype)\n proto = prototype\n }\n }\n\n if (circular) {\n let index = allParents.indexOf(parent)\n\n if (index !== -1) {\n return allChildren[index]\n }\n allParents.push(parent)\n allChildren.push(child)\n }\n\n if (parent instanceof NativeMap) {\n let keyIterator = parent.keys()\n while (true) {\n let next = keyIterator.next()\n if (next.done) {\n break\n }\n let keyChild = _clone(next.value, depth - 1)\n let valueChild = _clone(parent.get(next.value), depth - 1)\n child.set(keyChild, valueChild)\n }\n }\n if (parent instanceof NativeSet) {\n let iterator = parent.keys()\n while (true) {\n let next = iterator.next()\n if (next.done) {\n break\n }\n let entryChild = _clone(next.value, depth - 1)\n child.add(entryChild)\n }\n }\n\n for (let i in parent) {\n let attrs\n if (proto) {\n attrs = Object.getOwnPropertyDescriptor(proto, i)\n }\n\n if (attrs && attrs.set == null) {\n continue\n }\n child[i] = _clone(parent[i], depth - 1)\n }\n\n if (Object.getOwnPropertySymbols) {\n let symbols = Object.getOwnPropertySymbols(parent)\n for (let i = 0; i < symbols.length; i++) {\n // Don't need to worry about cloning a symbol because it is a primitive,\n // like a number or string.\n let symbol = symbols[i]\n let descriptor = Object.getOwnPropertyDescriptor(parent, symbol)\n if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {\n continue\n }\n child[symbol] = _clone(parent[symbol], depth - 1)\n if (!descriptor.enumerable) {\n Object.defineProperty(child, symbol, {\n enumerable: false\n })\n }\n }\n }\n\n if (includeNonEnumerable) {\n let allPropertyNames = Object.getOwnPropertyNames(parent)\n for (let i = 0; i < allPropertyNames.length; i++) {\n let propertyName = allPropertyNames[i]\n let descriptor = Object.getOwnPropertyDescriptor(parent, propertyName)\n if (descriptor && descriptor.enumerable) {\n continue\n }\n child[propertyName] = _clone(parent[propertyName], depth - 1)\n Object.defineProperty(child, propertyName, {\n enumerable: false\n })\n }\n }\n\n return child\n }", "function deepAssign(target, patch) {\n const keys = Object.keys(patch);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (target.hasOwnProperty(key) && typeof target[key] === 'object') {\n deepAssign(target[key], patch[key]);\n } else {\n target[key] = patch[key];\n }\n }\n\n return target;\n}", "function mapObjectRecursive(object, map, context = {}) {\n const clone = Array.isArray(object) ? [] : {};\n for (const k of Object.keys(object)) {\n let key = k;\n const value = object[key];\n if (Array.isArray(object))\n key = +key;\n const contextClone = Object.assign({}, context);\n let result = map(key, value, object, contextClone);\n if (typeof result !== 'undefined' && typeof result !== 'object' && !Array.isArray(result))\n throw new Error('mapObjectRecursive: return value of map function must be undefined, object, or array!');\n if (typeof result === 'undefined') {\n result = { [key]: value };\n }\n for (const kk in result) {\n let value = result[kk];\n if ((0, isPlainObject_1.isPlainObject)(value) || Array.isArray(value))\n value = mapObjectRecursive(value, map, contextClone);\n if (typeof value !== 'undefined')\n clone[kk] = value;\n }\n }\n return clone;\n}", "function deepAssign(target, source, dereference = false)\r\n{\r\n\tif (dereference)\r\n\t{\r\n\t\tsource = Object.assign(Array.isArray(source) ? [] : {}, source)\r\n\t}\r\n\r\n\tfor (let i in source)\r\n\t{\r\n\t\tif (source.hasOwnProperty(i))\r\n\t\t{\r\n\t\t\tif (dereference && source[i] instanceof Object)\r\n\t\t\t{\r\n\t\t\t\tsource[i] = Object.assign(Array.isArray(source[i]) ? [] : {}, source[i])\r\n\t\t\t}\r\n\r\n\t\t\tif (target.hasOwnProperty(i))\r\n\t\t\t{\r\n\t\t\t\tif (dereference && target[i] instanceof Object)\r\n\t\t\t\t{\r\n\t\t\t\t\ttarget[i] = Object.assign(Array.isArray(target[i]) ? [] : {}, target[i])\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (target[i] instanceof Object && source[i] instanceof Object && !(target[i] instanceof Function || source[i] instanceof Function))\r\n\t\t\t\t{\r\n\t\t\t\t\tdeepAssign(target[i], source[i])\r\n\t\t\t\t}\r\n\t\t\t\telse if (target[i] != source[i])\r\n\t\t\t\t{\r\n\t\t\t\t\ttarget[i] = source[i]\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttarget[i] = source[i]\r\n\t\t\t}\r\n\r\n\t\t\tif (Array.isArray(target[i]) && Array.isArray(source[i]) && source[i].length == 0 && target[i].length != 0)\r\n\t\t\t{\r\n\t\t\t\ttarget[i] = []\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn target // For simpler dereference usage\r\n}", "set(array) {\n array = array.map(this.withKey);\n\n // Remove extraneous existing items\n const didRemoveItems = Object.keys(this.items)\n .map(key => {\n if (this.items[key] && array.every(item => (hasKey(item) ? item.key : item) !== key)) {\n this.items[key] = undefined;\n return true;\n }\n })\n .includes(true);\n\n // Add things not already there; check if anything was added\n const didAddItems = array.map(item => {\n const key = hasKey(item) ? item.key : item;\n if (!this.items[key]) {\n this.items[key] = item;\n return true;\n }\n }).includes(true);\n\n const didChangeItems = array.map(item => {\n if (!hasKey(item))\n return false; // No way that an non-keyholding item's value changed\n\n const { key } = item;\n const other = this.items[key];\n\n const didOtherChange =\n Object.keys(item).map(p => {\n if (item[p] !== other[p]) {\n this.items[key][p] = item[p];\n return true;\n }\n }).includes(true) +\n Object.keys(other).map(p => {\n if (other[p] !== item[p]) {\n this.items[key][p] = item[p]; // Likely becomes undefined\n return true;\n }\n }).includes(true);\n return !!didOtherChange\n }).includes(true);\n\n return didRemoveItems || didAddItems || didChangeItems;\n }", "function convertCircRefsRecursively(oldObj, currObj, newObj, replacement = 'Circular Ref') {\n each(currObj, (val, prop) => {\n \n if (isObject(val) || isArray(val)) {\n\n // detect a circular reference\n if (val === oldObj) {\n newObj[prop] = replacement;\n } \n // otherwise initialize the current object\n else {\n if(isArray(val)) {\n newObj[prop] = [];\n } else {\n newObj[prop] = {};\n }\n convertCircRefsRecursively(oldObj, val, newObj[prop], replacement);\n }\n } else {\n newObj[prop] = val;\n }\n });\n}", "setDepth(obj, path, value) {\n obj = obj || {};\n let tags = path.split(\".\").reverse();\n\n obj[tags.shift()] = value;\n\n for (let tag of tags) {\n let _obj = Object.assign({}, obj);\n obj = {[tag]: _obj};\n }\n return obj;\n }", "function clone(a) {\n if (isArray$5(a)) {\n return map$2(a).call(a, function (value) {\n return clone(value);\n });\n } else if (_typeof_1(a) === \"object\" && a !== null) {\n return deepObjectAssignNonentry({}, a);\n } else {\n return a;\n }\n}", "function clone(a) {\n if (isArray$5(a)) {\n return map$2(a).call(a, function (value) {\n return clone(value);\n });\n } else if (_typeof_1(a) === \"object\" && a !== null) {\n return deepObjectAssignNonentry({}, a);\n } else {\n return a;\n }\n}", "function assignVals(o) {\n // replace the original ids in our intermediate _ids structure\n // with the documents found by query\n assignRawDocsToIdStructure(o.rawIds, o.rawDocs, o.rawOrder, o.options,\n o.localField, o.foreignField);\n\n // now update the original documents being populated using the\n // result structure that contains real documents.\n\n var docs = o.docs;\n var rawIds = o.rawIds;\n var options = o.options;\n\n function setValue(val) {\n return valueFilter(val, options);\n }\n\n for (var i = 0; i < docs.length; ++i) {\n if (utils.getValue(o.path, docs[i]) == null &&\n !o.originalModel.schema._getVirtual(o.path)) {\n continue;\n }\n\n if (o.isVirtual && !o.justOne && !Array.isArray(rawIds[i])) {\n if (rawIds[i] == null) {\n rawIds[i] = [];\n } else {\n rawIds[i] = [rawIds[i]];\n }\n }\n\n if (o.isVirtual && docs[i].constructor.name === 'model') {\n // If virtual populate and doc is already init-ed, need to walk through\n // the actual doc to set rather than setting `_doc` directly\n mpath.set(o.path, rawIds[i], docs[i]);\n } else {\n var parts = o.path.split('.');\n var cur = docs[i];\n for (var j = 0; j < parts.length - 1; ++j) {\n if (cur[parts[j]] == null) {\n cur[parts[j]] = {};\n }\n cur = cur[parts[j]];\n }\n if (docs[i].$__) {\n docs[i].populated(o.path, o.allIds[i], o.allOptions);\n }\n utils.setValue(o.path, rawIds[i], docs[i], setValue);\n }\n }\n}", "function cloneDeep(value) {\n // If the value is an array, create a new array where every item has been cloned.\n if (Array.isArray(value)) {\n return value.map(function (item) { return cloneDeep(item); });\n }\n // If the value is an object, go through all of the object’s properties and add them to a new\n // object.\n if (value !== null && typeof value === 'object') {\n var nextValue = {};\n for (var key in value) {\n if (value.hasOwnProperty(key)) {\n nextValue[key] = cloneDeep(value[key]);\n }\n }\n return nextValue;\n }\n // Otherwise this is some primitive value and it is therefore immutable so we can just return it\n // directly.\n return value;\n}", "function cloneDeep(value) {\n // If the value is an array, create a new array where every item has been cloned.\n if (Array.isArray(value)) {\n return value.map(function (item) { return cloneDeep(item); });\n }\n // If the value is an object, go through all of the object’s properties and add them to a new\n // object.\n if (value !== null && typeof value === 'object') {\n var nextValue = {};\n for (var key in value) {\n if (value.hasOwnProperty(key)) {\n nextValue[key] = cloneDeep(value[key]);\n }\n }\n return nextValue;\n }\n // Otherwise this is some primitive value and it is therefore immutable so we can just return it\n // directly.\n return value;\n}", "function cloneDeep(value) {\n // If the value is an array, create a new array where every item has been cloned.\n if (Array.isArray(value)) {\n return value.map(function (item) { return cloneDeep(item); });\n }\n // If the value is an object, go through all of the object’s properties and add them to a new\n // object.\n if (value !== null && typeof value === 'object') {\n var nextValue = {};\n for (var key in value) {\n if (value.hasOwnProperty(key)) {\n nextValue[key] = cloneDeep(value[key]);\n }\n }\n return nextValue;\n }\n // Otherwise this is some primitive value and it is therefore immutable so we can just return it\n // directly.\n return value;\n}", "function cloneDeep(value) {\n // If the value is an array, create a new array where every item has been cloned.\n if (Array.isArray(value)) {\n return value.map(function (item) { return cloneDeep(item); });\n }\n // If the value is an object, go through all of the object’s properties and add them to a new\n // object.\n if (value !== null && typeof value === 'object') {\n var nextValue = {};\n for (var key in value) {\n if (value.hasOwnProperty(key)) {\n nextValue[key] = cloneDeep(value[key]);\n }\n }\n return nextValue;\n }\n // Otherwise this is some primitive value and it is therefore immutable so we can just return it\n // directly.\n return value;\n}", "function cloneDeep(value) {\n // If the value is an array, create a new array where every item has been cloned.\n if (Array.isArray(value)) {\n return value.map(function (item) { return cloneDeep(item); });\n }\n // If the value is an object, go through all of the object’s properties and add them to a new\n // object.\n if (value !== null && typeof value === 'object') {\n var nextValue = {};\n for (var key in value) {\n if (value.hasOwnProperty(key)) {\n nextValue[key] = cloneDeep(value[key]);\n }\n }\n return nextValue;\n }\n // Otherwise this is some primitive value and it is therefore immutable so we can just return it\n // directly.\n return value;\n}", "function cloneDeep(value) {\n // If the value is an array, create a new array where every item has been cloned.\n if (Array.isArray(value)) {\n return value.map(function (item) { return cloneDeep(item); });\n }\n // If the value is an object, go through all of the object’s properties and add them to a new\n // object.\n if (value !== null && typeof value === 'object') {\n var nextValue = {};\n for (var key in value) {\n if (value.hasOwnProperty(key)) {\n nextValue[key] = cloneDeep(value[key]);\n }\n }\n return nextValue;\n }\n // Otherwise this is some primitive value and it is therefore immutable so we can just return it\n // directly.\n return value;\n}", "function cloneDeep(value) {\n // If the value is an array, create a new array where every item has been cloned.\n if (Array.isArray(value)) {\n return value.map(function (item) { return cloneDeep(item); });\n }\n // If the value is an object, go through all of the object’s properties and add them to a new\n // object.\n if (value !== null && typeof value === 'object') {\n var nextValue = {};\n for (var key in value) {\n if (value.hasOwnProperty(key)) {\n nextValue[key] = cloneDeep(value[key]);\n }\n }\n return nextValue;\n }\n // Otherwise this is some primitive value and it is therefore immutable so we can just return it\n // directly.\n return value;\n}", "function cloneDeep(value) {\n // If the value is an array, create a new array where every item has been cloned.\n if (Array.isArray(value)) {\n return value.map(function (item) { return cloneDeep(item); });\n }\n // If the value is an object, go through all of the object’s properties and add them to a new\n // object.\n if (value !== null && typeof value === 'object') {\n var nextValue = {};\n for (var key in value) {\n if (value.hasOwnProperty(key)) {\n nextValue[key] = cloneDeep(value[key]);\n }\n }\n return nextValue;\n }\n // Otherwise this is some primitive value and it is therefore immutable so we can just return it\n // directly.\n return value;\n}", "function cloneDeep(value) {\n // If the value is an array, create a new array where every item has been cloned.\n if (Array.isArray(value)) {\n return value.map(function (item) {\n return cloneDeep(item);\n });\n }\n // If the value is an object, go through all of the object’s properties and add them to a new\n // object.\n if (value !== null && typeof value === 'object') {\n var nextValue = {};\n for (var key in value) {\n if (value.hasOwnProperty(key)) {\n nextValue[key] = cloneDeep(value[key]);\n }\n }\n return nextValue;\n }\n // Otherwise this is some primitive value and it is therefore immutable so we can just return it\n // directly.\n return value;\n}", "function cloneDeep(value) {\n // If the value is an array, create a new array where every item has been cloned.\n if (Array.isArray(value)) {\n return value.map(function (item) {\n return cloneDeep(item);\n });\n }\n // If the value is an object, go through all of the object’s properties and add them to a new\n // object.\n if (value !== null && typeof value === 'object') {\n var nextValue = {};\n for (var key in value) {\n if (value.hasOwnProperty(key)) {\n nextValue[key] = cloneDeep(value[key]);\n }\n }\n return nextValue;\n }\n // Otherwise this is some primitive value and it is therefore immutable so we can just return it\n // directly.\n return value;\n}", "function clone(a) {\n if (isArray$3(a)) {\n return map$2(a).call(a, function (value) {\n return clone(value);\n });\n } else if (_typeof_1(a) === \"object\" && a !== null) {\n return deepObjectAssignNonentry({}, a);\n } else {\n return a;\n }\n}", "clone(noodle, obj, clone, flatList = [], flatClone = []) {\n cloneCounter++;\n //flatClone.push(clone);\n if (obj == undefined)\n return obj;\n\n if (typeof obj == 'object') {\n //If clone is undefined, make it an empty array or object\n if (clone == undefined) {\n if (obj.constructor == Array) {\n clone = new Array(obj.length);\n }\n else {\n clone = {};\n }\n }\n flatList.push(obj);\n flatClone.push(clone);\n //Go through obj to clone all its properties\n for (var i in obj) {\n var flatInd = flatList.indexOf(obj[i]);\n //If we've found a new object, add it to flatList and clone it to clone and flatClone\n if (flatInd == -1) {\n //clone[i] = clone[i] || {};\n clone[i] = noodle.object.clone(noodle, obj[i], clone[i], flatList, flatClone); //This works because flatList gets updated\n }\n //If we've seen obj[i] before, add the clone of it to clone\n else {\n clone[i] = flatClone[flatInd];\n }\n }\n return clone;\n }\n return obj;\n }", "_pathSet(path, value) {\n let obj = this.fieldNode; // we set the values relative to the fieldnode, so fieldnode is the root\n const parts = path.split('.');\n while (parts.length > 1) {\n const key = parts.shift();\n // create if not exist\n if (!(key in obj)) {\n obj[key] = {};\n }\n obj = obj[key];\n }\n obj[parts.shift()] = value;\n }", "function extendDeep(object, source) {\n return _.assignWith(object, source, (a, b) => {\n if (Array.isArray(a)) {\n return _.uniqWith(a.concat(b), _.isEqual);\n }\n if (_.isObject(a)) {\n extendDeep(a, b);\n }\n return a;\n });\n }", "function clone_obj(obj) {\n \n if(obj == null || typeof(obj) != 'object' || obj.nodeName !== undefined)\n return obj;\n //console.log(\"clone begin cons=\" + obj.constructor + \" type \" + typeof(obj) + \" name \" + obj.nodeName);\n //var temp = obj.constructor(); // changed\n var temp = (obj instanceof Array) ? [] : {};\n \n for(var key in obj)\n\tif (obj.hasOwnProperty(key)){\n\t //console.log(\"cloning key \" + key);\n\t temp[key] = clone_obj(obj[key]);\n\t}\n return temp;\n \n\n // var new_obj = (o instanceof Array) ? [] : {};\n \n // for (i in o) {\n // // if (i == 'clone') continue; //?\n // if (o[i] && typeof o[i] == \"object\") {\n // new_obj[i] = clone_obj(o[i]);//.hyperclone();\n // } else \n // new_obj[i] = o[i];\n // } \n \n // return new_obj;\n}", "static fork(obj) {\n var ret, key, value;\n\n if (obj && obj.constructor === Object) {\n ret = Object.setPrototypeOf({}, obj);\n\n for (key in obj) {\n value = obj[key];\n\n if (value) {\n if (value.constructor === Object) {\n ret[key] = this.fork(value);\n } else if (value instanceof Array) {\n ret[key] = value.slice();\n }\n }\n }\n } else {\n ret = obj;\n }\n\n return ret;\n }", "function assign(left, right, keepMods) {\n if (left instanceof Array) {\n if (!(right instanceof Array))\n console.log('errrr');\n left.forEach(function(_, prop) {\n assignHelper(left, right, prop, keepMods);\n });\n }\n else {\n for (var prop in left) {\n if (!isPOJS(right))\n console.log('errrr');\n assignHelper(left, right, prop, keepMods);\n }\n }\n return right;\n }", "aliasObjects (alias, value) {\n const cloned = Object.assign({}, value)\n for (const a in alias) {\n if (a in cloned) {\n cloned[alias[a]] = cloned[a]\n delete cloned[a]\n }\n }\n return cloned\n }", "function wrap (obj, onMutate, path = []) {\n function recordMutation (op, childPath, value) {\n let fullPath = path.concat(childPath)\n let oldValue\n let existed = false\n try {\n [ oldValue, existed ] = access(obj, childPath)\n } catch (err) {}\n let mutation = {\n op,\n path: fullPath,\n oldValue: baseObject(oldValue),\n newValue: value,\n existed\n }\n onMutate(mutation)\n // TODO: replace mutations for overriden paths\n }\n\n // TODO: wrap array methods to record array-specific mutations,\n // otherwise ops like splices and shifts will create N mutations\n\n function put (obj, key, value, path = []) {\n if (!isObject(value)) {\n // if we are overriding an existing object,\n // record deletion\n if (isObject(obj[key])) {\n // recursively delete object props\n del(obj, key)\n }\n\n // record parent object update\n let parent = baseObject(obj)\n parent[key] = baseObject(value)\n recordMutation('put', path, parent)\n return\n }\n\n // if we are overriding an existing non-object,\n // record update of parent base object\n if (key in obj && !isObject(obj[key])) {\n let base = baseObject(obj)\n delete base[key]\n recordMutation('put', path, base)\n }\n\n // if parent is array, ensure length gets updated\n if (Array.isArray(obj)) {\n let parent = baseObject(obj)\n recordMutation('put', path, parent)\n }\n\n let base = baseObject(value)\n recordMutation('put', path.concat(key), base)\n\n for (let childKey in value) {\n let child = value[childKey]\n\n // if any of our non-object children override an\n // existing object, then record deletion\n if (!isObject(child)) {\n if (!isObject(obj[key])) continue\n if (!isObject(obj[key][childKey])) continue\n del(obj[key], childKey, path.concat(key))\n continue\n }\n\n // recursively record puts for objects\n put(value, childKey, child, path.concat(key))\n }\n }\n\n function del (obj, key, path = []) {\n let value = obj[key]\n\n if (!isObject(obj[key])) {\n // record parent object update\n let parent = baseObject(obj)\n delete parent[key]\n recordMutation('put', path, parent)\n return\n }\n\n // recursively record deletions for objects\n for (let childKey in value) {\n let child = value[childKey]\n if (!isObject(child)) continue\n del(value, childKey, path.concat(key))\n }\n\n recordMutation('del', path.concat(key))\n }\n\n let wrapped = new Proxy(obj, {\n // recursively wrap child objects when accessed\n get (obj, key) {\n let value = obj[key]\n\n // functions should be bound to parent\n if (typeof value === 'function') {\n return value.bind(wrapped)\n }\n\n // don't recurse if not object\n if (!isObject(value)) {\n return value\n }\n\n // convert array bases to actual array\n if ('__MERK_ARRAY__' in value) {\n let base = value\n value = new Array(value.length)\n Object.assign(value, base)\n delete value.__MERK_ARRAY__\n }\n\n // if value is object, recursively wrap\n let childPath = path.concat(key)\n return wrap(value, onMutate, childPath)\n },\n\n // record mutations\n set (obj, key, value) {\n put(obj, key, value)\n obj[key] = value\n return true\n },\n\n // record deletions as mutations too\n deleteProperty (obj, key) {\n if (!(key in obj)) return true\n del(obj, key)\n delete obj[key]\n return true\n },\n\n // ovverride ownKeys to exclude symbol properties\n ownKeys () {\n return Object.getOwnPropertyNames(obj)\n }\n })\n return wrapped\n}", "update (state, array) {\n // keys: ['some', 'path', 'to', 'data']\n let keys = array[0].split('.')\n // lastKey: 'data'; keys: ['some', 'path', 'to']\n const lastKey = keys.pop()\n // data: value\n let data = array[1]\n // dig into state by keys\n // result: initialize by state at first\n const pointer = keys.reduce((result, key) => {\n // key: 'some'\n if (key.length === 0) return result || {}\n // '1' => formattedKey: 1; 'some' => formattedKey: 'some'\n const formattedKey = isNaN(key) ? key : parseInt(key)\n // if the key 'some' exists in result, next result: result['some']\n // if not, set result['some'] = {}\n return result[formattedKey] || {}\n }, state)\n\n const isObject = pointer[lastKey] instanceof Object && pointer[lastKey].constructor === Object\n // set value to the specified key\n pointer[lastKey] = isObject ? { ...pointer[lastKey], ...data } : data\n }", "function objectToFlatDictionary(x, keyPrefix)\r\n{\r\n\t//this.dictionaryData; //an associative array/object that will be converted to a dictionary and returned whenever this function finishes with nestingLevel==0.\r\n\tif(typeof objectToFlatDictionary.nestingLevel === 'undefined'){objectToFlatDictionary.nestingLevel = 0};\r\n\tvar keyPrefix;\r\n\tif(typeof keyPrefix === 'undefined'){ keyPrefix = \"\";}\r\n\t\r\n\tif (objectToFlatDictionary.nestingLevel==0) {objectToFlatDictionary.dictionaryData = {}; }; //initialize dictionaryData to an empty object\r\n\tobjectToFlatDictionary.nestingLevel++;\r\n\t\r\n\tfor (var key in x)\r\n\t{\r\n\t\tvar value = x[key];\r\n\t\tif( isObject(value)){\r\n\t\t\tobjectToFlatDictionary(value, keyPrefix + key + \".\");\r\n\t\t\t//objectToFlatDictionary.dictionaryData[\"\" + keyPrefix + key + \"OBJECT\"] = \"<OBJECT>\";\r\n\t\t} else if (isArray(value)) { \r\n\t\t\t{//technically correct method. Rejected because it does not help me.\r\n\t\t\t\t//this is probably the technically most correct way to do the conversion, because it will result in a vba array in the resulting vba dictionary object.\r\n\t\t\t\t// However, solidworks custom properties have no concept of an array, so a vba array value does not do us much good.\r\n\t\t\t\t//objectToFlatDictionary.dictionaryData[keyPrefix + key] = JS2VBArray(value);\r\n\t\t\t}\r\n\r\n\t\t\t//we construct the object tempObject, whose keys are the rather strange \"[0]\", \"[1]\", \"[2]\", etc.\r\n\t\t\t\r\n\t\t\t{ //test cases\r\n\t\t\t\t// // //test to see how this will handle sparse arrays\r\n\t\t\t\t// // // // value = new Array();\r\n\t\t\t\t// // // // value[4] = 123.456;\r\n\t\t\t\t// // // // value[17] = 234.567;\r\n\t\t\t\t// // // // value[-3] = 345.678;\r\n\t\t\t\t// // // // value['foo'] = 456.789;\r\n\t\t\t\t// // //this worked as desired, producing two parameters, exactly as expected.\r\n\t\t\t\t// // //The \"-3\" key was not heeded unless I changed the initializer of the below FOR loop to start i at less than or equal to -3.\r\n\t\t\t\t// // // (value.length is 18 (i.e. highestNaturalNumberIndex + 1)). The -3 and 'foo' keys have no effect on the value of value.length.\r\n\t\t\t\t\r\n\t\t\t\t// // //now something harder:\r\n\t\t\t\t// // // value = new Array();\r\n\t\t\t\t// // // value[\"ahoy\"] = 123.456;\r\n\t\t\t\t// // // value[\"there\"] = 234.567;\r\n\t\t\t\t// // //this did not cause any errors, but neither of the two parameters was extracted.\r\n\t\t\t\t\r\n\t\t\t\t// // //ideally, in the case where\r\n\t\t\t\t\t// value = new Array();\r\n\t\t\t\t\t// value[4] = 123.456;\r\n\t\t\t\t\t// value[17] = 234.567;\r\n\t\t\t\t\t// value[-3] = 345.678;\r\n\t\t\t\t\t// value['foo'] = 456.789;\r\n\t\t\t\t\t// value[\"ah\\\\oy\"] = 123.456;\r\n\t\t\t\t\t// value[\"there\"] = 234.567;\r\n\t\t\t\t\t// value[12.3] = 234.567;\r\n\t\t\t\t// // // I would like to regard the length of the array (perhaps I should call it the 'count' of the array, to be in line with php parlance) as being 7,\r\n\t\t\t\t// // // and I would like to pick up all of the keys\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t{ // This is a more complete options, but rejected in favor of a faster option that will work for just about everything I will ever do.\r\n\t\t\t\t// // // // var tempObject = new Object();\r\n\t\t\t\t// // // // var count = 0;\r\n\t\t\t\t// // // // var arrayKeys;\r\n\t\t\t\t// // // // arrayKeys = new Array();\r\n\t\t\t\t// // // // for (var arrayKey in value)\r\n\t\t\t\t// // // // {\r\n\t\t\t\t\t// // // // //arrayKeys[] = arrayKey;\r\n\t\t\t\t\t// // // // arrayKeys.push(arrayKey);\r\n\t\t\t\t\t// // // // count++;\r\n\t\t\t\t\t// // // // tempObject[\"[\" + ( parseInt(arrayKey) == arrayKey ? arrayKey : JSON.stringify(arrayKey) ) + \"]\"] = value[arrayKey];\r\n\t\t\t\t// // // // }\r\n\t\t\t\t// // // // objectToFlatDictionary.dictionaryData[keyPrefix + key + \".\" + \"arraykeys\"] = JSON.stringify(arrayKeys); \r\n\t\t\t\t// // // // objectToFlatDictionary.dictionaryData[keyPrefix + key + \".\" + \"count\"] = count; //for convenience, we include the array length as a parameter that will appear amongst the Solidworks custom properties.\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t{ //good working strategy\r\n\t\t\t\t//this strategy will only pick up keys that are nonegative natural numbers, but this is sufficient for just about everything I will ever want to do with arrays.\r\n\t\t\t\tvar tempObject = new Object();\r\n\t\t\t\tvar length;\r\n\t\t\t\tvar count = 0;\r\n\t\t\t\tlength = value.length;\r\n\t\t\t\tfor(var i = 0; i<length; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(i in value) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttempObject[\"[\" + i + \"]\"] = value[i];\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tobjectToFlatDictionary.dictionaryData[keyPrefix + key + \".\" + \"length\"] = value.length; //for convenience, we include the array length as a parameter that will appear amongst the Solidworks custom properties.\r\n\t\t\t\t//objectToFlatDictionary.dictionaryData[keyPrefix + key + \".\" + \"count\"] = count; \r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Then we invoke objectToFlatDictionary() upon tempObject almost the same way as in the case where value is an object. The only difference in this case (that is, when value is an array),\r\n\t\t\t// is that we omit the terminal \".\" from the second argument to objectToFlatDictionary. This will mean that, instead of ending up with, for instance,\r\n\t\t\t// the parameter names { \"a.b.c.[0]\", \"a.b.c.[1]\", ...}, we will end up with the parameter names {\"a.b.c[0]\", \"a.b.c[1]\", ...}, which is what we want.\r\n\t\t\tobjectToFlatDictionary(tempObject, keyPrefix + key );\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\tobjectToFlatDictionary.dictionaryData[keyPrefix + key] = value;\r\n\t\t}\r\n\t}\r\n\t\r\n\tobjectToFlatDictionary.nestingLevel--;\r\n\tif (objectToFlatDictionary.nestingLevel == 0) {return objectToDictionary(objectToFlatDictionary.dictionaryData);} else {return null;}\r\n}", "function replaceEqualDeep(a, b) {\r\n if (a === b) {\r\n return a;\r\n }\r\n\r\n var array = Array.isArray(a) && Array.isArray(b);\r\n\r\n if (array || isPlainObject(a) && isPlainObject(b)) {\r\n var aSize = array ? a.length : Object.keys(a).length;\r\n var bItems = array ? b : Object.keys(b);\r\n var bSize = bItems.length;\r\n var copy = array ? [] : {};\r\n var equalItems = 0;\r\n\r\n for (var i = 0; i < bSize; i++) {\r\n var key = array ? i : bItems[i];\r\n copy[key] = replaceEqualDeep(a[key], b[key]);\r\n\r\n if (copy[key] === a[key]) {\r\n equalItems++;\r\n }\r\n }\r\n\r\n return aSize === bSize && equalItems === aSize ? a : copy;\r\n }\r\n\r\n return b;\r\n}", "function flattenTo(obj, result, prefix, level) {\n\t forOwn(obj, function (value, key) {\n\t var nestedPrefix = prefix ? prefix + '.' + key : key;\n\n\t if (level !== 0 && isPlainObject(value)) {\n\t flattenTo(value, result, nestedPrefix, level - 1);\n\t } else {\n\t result[nestedPrefix] = value;\n\t }\n\t });\n\n\t return result;\n\t }", "function cloneDeep(node) {\n\t var newNode = {};\n\n\t for (var key in node) {\n\t if (key[0] === \"_\") continue;\n\n\t var val = node[key];\n\n\t if (val) {\n\t if (val.type) {\n\t val = t.cloneDeep(val);\n\t } else if (Array.isArray(val)) {\n\t val = val.map(t.cloneDeep);\n\t }\n\t }\n\n\t newNode[key] = val;\n\t }\n\n\t return newNode;\n\t}", "function cloneDeep(node) {\n\t var newNode = {};\n\n\t for (var key in node) {\n\t if (key[0] === \"_\") continue;\n\n\t var val = node[key];\n\n\t if (val) {\n\t if (val.type) {\n\t val = t.cloneDeep(val);\n\t } else if (Array.isArray(val)) {\n\t val = val.map(t.cloneDeep);\n\t }\n\t }\n\n\t newNode[key] = val;\n\t }\n\n\t return newNode;\n\t}", "function cloneDeep(node) {\n\t var newNode = {};\n\n\t for (var key in node) {\n\t if (key[0] === \"_\") continue;\n\n\t var val = node[key];\n\n\t if (val) {\n\t if (val.type) {\n\t val = t.cloneDeep(val);\n\t } else if (Array.isArray(val)) {\n\t val = val.map(t.cloneDeep);\n\t }\n\t }\n\n\t newNode[key] = val;\n\t }\n\n\t return newNode;\n\t}", "function cloneDeep(node) {\n\t var newNode = {};\n\n\t for (var key in node) {\n\t if (key[0] === \"_\") continue;\n\n\t var val = node[key];\n\n\t if (val) {\n\t if (val.type) {\n\t val = t.cloneDeep(val);\n\t } else if (Array.isArray(val)) {\n\t val = val.map(t.cloneDeep);\n\t }\n\t }\n\n\t newNode[key] = val;\n\t }\n\n\t return newNode;\n\t}", "function deepCopy(src) {\n if (!src) return src;\n if (Array.isArray(src)) {\n var c = new Array(src.length);\n src.forEach(function (v, i) {\n c[i] = deepCopy(v);\n });\n return c;\n }\n if (typeof src === 'object') {\n var c = {};\n Object.keys(src).forEach(function (k) {\n c[k] = deepCopy(src[k]);\n });\n return c;\n }\n return src;\n}", "function _deepCopy(target, source) {\n\tvar target = target || {};\n\n\tfor ( var k in source) {\n\t\tvar v = source[k];\n\t\tif (typeof v === \"object\") {\n\t\t\ttarget[k] = (v.constructor === Array) ? [] : {};\n\t\t\t_deepCopy(target[k], v);\n\t\t} else {\n\t\t\ttarget[k] = v;\n\t\t}\n\t}\n\n\treturn target;\n}", "function dAssign222(result, curr) {\n\t//console.log(arr)\n\tconsole.log(Reflect.ownKeys(curr).length)\n\t/*for (let i=0; i<Object.keys(curr).length; i++) {\n\t\tresult[Object.keys(curr)[i]] = curr[Object.keys(curr)[i]]\n\t}\t*/\t\n\tReflect.ownKeys(curr).forEach()\n\tconsole.log(Reflect.ownKeys(curr))\n\t//console.log(result)\n\treturn result\n}" ]
[ "0.63569784", "0.6188108", "0.61728525", "0.6083384", "0.6081756", "0.6077687", "0.60632044", "0.60546595", "0.60530597", "0.5991888", "0.598843", "0.59701836", "0.5966591", "0.5966591", "0.5966591", "0.5966591", "0.5966591", "0.59539026", "0.5939421", "0.5895184", "0.5834293", "0.5798957", "0.5789894", "0.5780319", "0.5758771", "0.57293546", "0.5727099", "0.57091165", "0.5687846", "0.5682723", "0.56805587", "0.5665756", "0.5659224", "0.5656146", "0.56406856", "0.562748", "0.5611359", "0.5609586", "0.5609251", "0.55866885", "0.55759174", "0.55710614", "0.55624264", "0.55624264", "0.55624264", "0.5529937", "0.5516655", "0.550767", "0.5480439", "0.5456051", "0.5437436", "0.5431308", "0.5426179", "0.541158", "0.5411572", "0.54016805", "0.54012996", "0.53987324", "0.53987324", "0.53950804", "0.5392291", "0.53901225", "0.53843004", "0.5384076", "0.5366386", "0.5365246", "0.5357837", "0.5353211", "0.5353211", "0.5343036", "0.53405035", "0.53405035", "0.53405035", "0.53405035", "0.53405035", "0.53405035", "0.53405035", "0.53405035", "0.5332348", "0.5332348", "0.5329165", "0.5327244", "0.5326299", "0.5318395", "0.5306269", "0.5299222", "0.52929044", "0.5290463", "0.52856696", "0.5283931", "0.5273955", "0.5272347", "0.5266054", "0.52569306", "0.52569306", "0.52569306", "0.52569306", "0.52456474", "0.52337587", "0.52248216" ]
0.6219428
1
Validate a yup schema.
function validateYupSchema(values,schema,sync,context){if(sync===void 0){sync=false;}if(context===void 0){context={};}var validateData=prepareDataForValidation(values);return schema[sync?'validateSync':'validate'](validateData,{abortEarly:false,context:context});}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validationSchema() {\n return {\n name: Yup.string().required(true),\n };\n}", "function validateYupSchema(values, schema, sync, context) {\n if (sync === void 0) {\n sync = false;\n }\n\n if (context === void 0) {\n context = {};\n }\n\n var validateData = prepareDataForValidation(values);\n return schema[sync ? 'validateSync' : 'validate'](validateData, {\n abortEarly: false,\n context: context\n });\n}", "function validateYupSchema(values, schema, sync, context) {\n if (sync === void 0) {\n sync = false;\n }\n\n if (context === void 0) {\n context = {};\n }\n\n var validateData = prepareDataForValidation(values);\n return schema[sync ? 'validateSync' : 'validate'](validateData, {\n abortEarly: false,\n context: context\n });\n}", "function validateYupSchema(values, schema, sync, context) {\n if (sync === void 0) {\n sync = false;\n }\n\n if (context === void 0) {\n context = {};\n }\n\n var validateData = prepareDataForValidation(values);\n return schema[sync ? 'validateSync' : 'validate'](validateData, {\n abortEarly: false,\n context: context\n });\n}", "function validateYupSchema(values, schema, sync, context) {\n if (sync === void 0) {\n sync = false;\n }\n\n if (context === void 0) {\n context = {};\n }\n\n var validateData = prepareDataForValidation(values);\n return schema[sync ? 'validateSync' : 'validate'](validateData, {\n abortEarly: false,\n context: context\n });\n}", "function validateYupSchema(values, schema, sync, context) {\n if (sync === void 0) {\n sync = false;\n }\n\n if (context === void 0) {\n context = {};\n }\n\n var validateData = prepareDataForValidation(values);\n return schema[sync ? 'validateSync' : 'validate'](validateData, {\n abortEarly: false,\n context: context\n });\n}", "function validateYupSchema(values, schema, sync, context) {\n if (sync === void 0) {\n sync = false;\n }\n\n if (context === void 0) {\n context = {};\n }\n\n var validateData = prepareDataForValidation(values);\n return schema[sync ? 'validateSync' : 'validate'](validateData, {\n abortEarly: false,\n context: context\n });\n}", "_validate (schema){\n return SwaggerParser.validate(schema);\n }", "validateForm () {\n let schema = Yup.object().shape(this.props.schema);\n let {values, errors} = this.state;\n\n schema.validate(values, {context: values, abortEarly: false}).then((value) => {\n if (!value) return;\n log('[StellarForm.validateForm]: ', value, values, errors);\n this.isValid(true, {});\n })\n .catch((error) => {\n if (!error) return;\n log('[!StellarForm.validateForm]: ', error, values, errors);\n let e = this.getErrors(error);\n // {field: {}}\n //this.setState({errors});\n this.isValid(false, e);\n })\n .catch((e) => {\n console.log('[StellarForm.validateForm] (error): ', e);\n });\n }", "checkStructure(jsonSchema) {\n const { res } = this;\n\n if (jsonSchema.isJoi) {\n const error = Joi.validate(res.data, jsonSchema).error;\n\n assert.isTrue(error === null, error && error.message);\n } else {\n const ajv = new Ajv({ schemaId: 'auto' });\n ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json'));\n\n const validate = ajv.validate(jsonSchema, res.data);\n\n assert.isTrue(validate, ajv.errorsText());\n }\n\n }", "function validate(instance, schema, tightenSchema) {\n if (!schema || !_.isObject(schema)) {\n return {\n valid: false,\n errors: [\n 'Invalid schema.'\n ]\n };\n }\n\n if (_.isUndefined(tightenSchema) || tightenSchema) {\n schema = tighten(schema);\n }\n\n if (!instance || !_.isObject(instance)) {\n return {\n valid: false,\n errors: [\n 'Invalid instance.'\n ]\n };\n }\n return validator.validate(instance, schema);\n}", "function valid_schema(schema) {\n\t\tif (typeof schema !== \"object\") {\n\t\t\tvar help = \"\";\n\t\t\tif (typeof schema == \"function\") help = \" It is a function, did you forget to use new?\"\n\t\t\tthrow new Error(\"schema '\" + schema + \"' is not an object.\" + help);\n\t\t}\n\n\t\tif (schema.__proto__['_schema_valid']) return schema;\n\n\t\tschema.__proto__['_schema_checking'] = true;\n\n\t\tfor (var field in schema) {\n\t\t\tif (field.indexOf('_schema_') === 0) continue;\n\n\t\t\t// Make sure a qualifier is set.\n\t\t\tif (schema[field].qualifier != \"required\" &&\n\t\t\t\t\tschema[field].qualifier != \"optional\" &&\n\t\t\t\t\tschema[field].qualifier != \"repeated\")\n\t\t\t\tthrow new Error(\"Invalid qualifier '\" + schema[field].qualifier + \"' on field '\" + field + \"'\");\n\n\t\t\t// Check the type of the field.\n\n\t\t\tif (isPrimitive(schema[field].type)) {\n\t\t\t\t// Primitive fields cannot go wrong.\n\t\t\t\t; // Nothing to do.\n\t\t\t} else {\n\t\t\t\t// Fields that are schemas have to be recursively. We watch out for loops!\n\t\t\t\tif (schema[field].type['_schema_checking']) {\n\t\t\t\t\tif (schema[field].qualifier == \"required\") {\n\t\t\t\t\t\tthrow new Error(\"required fields can not be used recursively (think about it, it makes sense)\");\n\t\t\t\t\t}\n\t\t\t\t\tschema_log(\"loop detected, already checked\");\n\t\t\t\t} else {\n\t\t\t\t\tvalid_schema(schema[field].type);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tschema.__proto__['_schema_checked'] = true;\n\t\tdelete schema.__proto__['_schema_valid'];\n\n\t\treturn schema;\n\t}", "function compileSchema (schema) {\n return (payload) => {\n return Joi.validate(payload, schema)\n }\n}", "validate(schema, options) {\n schema.forEach(field => {\n // Infinite recursion prevention\n const key = `${options.type}:${options.subtype}.${field.name}`;\n if (!self.validatedSchemas[key]) {\n self.validatedSchemas[key] = true;\n self.validateField(field, options);\n }\n });\n }", "function validateSchema(fileName, object, schema) {\n const v = new Validator();\n const validationErrors = v.validate(object, schema).errors;\n if (validationErrors.length) {\n console.error(colors.red('\\nError - Schema validation:'));\n console.error(' ' + colors.yellow(fileName + ': '));\n validationErrors.forEach(e => {\n if (e.property) {\n console.error(' ' + colors.yellow(e.property + ' ' + e.message));\n } else {\n console.error(' ' + colors.yellow(e));\n }\n });\n console.error();\n process.exit(1);\n }\n}", "function userValidating(post) {\n const userSchema = {\n \n 'title': Joi.string().min(3).required(),\n // 'desc':Joi.Boolean().require(),\n 'numberOfLikes': Joi.number().required()\n }\n return Joi.validate(post, userSchema);\n}", "function makeValidator(schema) {\n return ajv.compile(schema);\n}", "function isValid(schema, data) {\n try {\n return ajv.validate(schema, data);\n } catch (e) {\n return false;\n }\n}", "function validate(schema,obj){\n if (obj === undefined || !schema) return;\n var corr = schema.bind(obj)\n if (!corr.validate) return;\n var ret\n corr.once('error', function(err){ \n ret = err; \n });\n corr.validate();\n return ret;\n}", "validate(args) {\n new SimpleSchema({\n text: {type: String},\n agentName: {type: String}\n }).validate(args)\n }", "function validateAgainstSchema(message, schema) {\n\tconst ajv = new Ajv({ schemaId: 'auto', allErrors: true, verbose: true })\n\tajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json'))\n\tajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json'))\n\tif (!ajv.validate(schema, message) && ajv.errors) {\n\t\tonViolation(message, ajv.errors)\n\t}\n}", "getSchemaValidator() {\n const ajv = new Ajv__default[\"default\"]({ strict: true, strictTuples: true, strictTypes: true });\n ajv.addMetaSchema(ajvSchemaDraft);\n ajv.addKeyword(ajvRegexpKeyword);\n ajv.addKeyword({ keyword: \"copyable\" });\n return ajv.compile(this.schema);\n }", "validate (data) {\n Joi.assert(data, Joi.object().keys({\n screenName: Joi.string().required()\n }).required())\n }", "function validateSchema(tags) {\n function isTagOk(tag_label) {\n let meta_char = tag_label[0]\n if (meta_char == '?' || meta_char == '!') {\n // It's a meta tag or a comment, we will allow it\n return true;\n }\n let slash_index = tag_label.indexOf('/')\n if (slash_index > 0) {\n tag_label = tag_label.substr(0, slash_index);\n }\n let found = schema_tags[tag_label];\n if (!found) {\n return false;\n }\n return true;\n }\n\n function handleTagNotFound(tag) {\n let problem_line = Number(tag.line) + 1;\n validateFailure(\"Óþekkt tag: <\" + tag.tag_label + \"> í línu \" + problem_line);\n }\n\n // assumes a schema_tags variable\n if (!schema_tags) {\n return;\n }\n\n // first prototype: just validate that tags are legal\n for (let i = 0; i < tags.length; ++i) {\n // check the opening tag, \n // if the opening tags are OK\n // then bad closing tags will not match\n let tag = tags[i].tag_open\n let label = tag.tag_label;\n if (!isTagOk(label)) {\n handleTagNotFound(tag);\n return true;\n }\n }\n}", "schema() { }", "function valid(schema, object) {\n\t\ttry {\n\t\t\tcheck(schema, object);\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t}", "function validateSchema(schema) {\n // First check to ensure the provided value is in fact a GraphQLSchema.\n Object(_schema__WEBPACK_IMPORTED_MODULE_7__[\"assertSchema\"])(schema); // If this Schema has already been validated, return the previous results.\n\n if (schema.__validationErrors) {\n return schema.__validationErrors;\n } // Validate the schema, producing a list of errors.\n\n\n var context = new SchemaValidationContext(schema);\n validateRootTypes(context);\n validateDirectives(context);\n validateTypes(context); // Persist the results of validation before returning to ensure validation\n // does not run multiple times for this schema.\n\n var errors = context.getErrors();\n schema.__validationErrors = errors;\n return errors;\n}", "function validate(body){ \n userSchema = {\n id: Joi.string(),\n name: Joi.string().required(),\n email: Joi.string().email().required(),\n role: Joi.string().required()\n }\n const joiSchema = Joi.object(userSchema);\n return joiSchema.validate(body);\n}", "function validateSchema(schema) {\n // First check to ensure the provided value is in fact a GraphQLSchema.\n Object(_schema_mjs__WEBPACK_IMPORTED_MODULE_7__[\"assertSchema\"])(schema); // If this Schema has already been validated, return the previous results.\n\n if (schema.__validationErrors) {\n return schema.__validationErrors;\n } // Validate the schema, producing a list of errors.\n\n\n var context = new SchemaValidationContext(schema);\n validateRootTypes(context);\n validateDirectives(context);\n validateTypes(context); // Persist the results of validation before returning to ensure validation\n // does not run multiple times for this schema.\n\n var errors = context.getErrors();\n schema.__validationErrors = errors;\n return errors;\n}", "function assertValidSchema(schema) {\n var errors = validateSchema(schema);\n\n if (errors.length !== 0) {\n throw new Error(errors.map(function (error) {\n return error.message;\n }).join('\\n\\n'));\n }\n}", "function assertValidSchema(schema) {\n var errors = validateSchema(schema);\n\n if (errors.length !== 0) {\n throw new Error(errors.map(function (error) {\n return error.message;\n }).join('\\n\\n'));\n }\n}", "function assertValidSchema(schema) {\n var errors = validateSchema(schema);\n\n if (errors.length !== 0) {\n throw new Error(errors.map(function (error) {\n return error.message;\n }).join('\\n\\n'));\n }\n}", "function assertValidSchema(schema) {\n var errors = validateSchema(schema);\n\n if (errors.length !== 0) {\n throw new Error(errors.map(function (error) {\n return error.message;\n }).join('\\n\\n'));\n }\n}", "function assertValidSchema(schema) {\n var errors = validateSchema(schema);\n\n if (errors.length !== 0) {\n throw new Error(errors.map(function (error) {\n return error.message;\n }).join('\\n\\n'));\n }\n}", "function validateSchema(schema) {\n // First check to ensure the provided value is in fact a GraphQLSchema.\n Object(_schema_mjs__WEBPACK_IMPORTED_MODULE_10__[\"assertSchema\"])(schema); // If this Schema has already been validated, return the previous results.\n\n if (schema.__validationErrors) {\n return schema.__validationErrors;\n } // Validate the schema, producing a list of errors.\n\n\n var context = new SchemaValidationContext(schema);\n validateRootTypes(context);\n validateDirectives(context);\n validateTypes(context); // Persist the results of validation before returning to ensure validation\n // does not run multiple times for this schema.\n\n var errors = context.getErrors();\n schema.__validationErrors = errors;\n return errors;\n}", "function YffValidator() {}", "function validateSchema(schema) {\n // First check to ensure the provided value is in fact a GraphQLSchema.\n (0, _schema.assertSchema)(schema); // If this Schema has already been validated, return the previous results.\n\n if (schema.__validationErrors) {\n return schema.__validationErrors;\n } // Validate the schema, producing a list of errors.\n\n\n var context = new SchemaValidationContext(schema);\n validateRootTypes(context);\n validateDirectives(context);\n validateTypes(context); // Persist the results of validation before returning to ensure validation\n // does not run multiple times for this schema.\n\n var errors = context.getErrors();\n schema.__validationErrors = errors;\n return errors;\n}", "function validateSchema(schema) {\n // First check to ensure the provided value is in fact a GraphQLSchema.\n (0, _schema.assertSchema)(schema); // If this Schema has already been validated, return the previous results.\n\n if (schema.__validationErrors) {\n return schema.__validationErrors;\n } // Validate the schema, producing a list of errors.\n\n\n var context = new SchemaValidationContext(schema);\n validateRootTypes(context);\n validateDirectives(context);\n validateTypes(context); // Persist the results of validation before returning to ensure validation\n // does not run multiple times for this schema.\n\n var errors = context.getErrors();\n schema.__validationErrors = errors;\n return errors;\n}", "function valUserSchema(req, res, next) {\n try {\n const result = jsonschema.validate(req.body, userSchema);\n if (!result.valid) {\n const errorStack = result.errors.map(e => e.stack);\n throw new ExpressError(errorStack, 400);\n };\n return next();\n } catch (error) {\n return next(error);\n };\n}", "function test(schema, ob) {\n\ttry {\n\t\tconst errors = schema.validate(ob);\n\t\tif (errors) {\n\t\t\terrors.forEach(err => {\n\t\t\t\tconsole.log(err);\n\t\t\t});\n\t\t}\n\t} catch (err) {\n\t\tconsole.log(err);\n\t}\n}", "function schema(schema_fn) {\n\t\treturn valid_schema(new schema_fn());\n\t}", "validate( data ) {\n\n const Joi = this.joi\n\n const schema = {\n };\n\n return Joi.validate( data, schema)\n\n }", "validate() {}", "function validateSarifFileSchema(sarifFilePath, logger) {\n const sarif = JSON.parse(fs.readFileSync(sarifFilePath, \"utf8\"));\n const schema = require(\"../src/sarif_v2.1.0_schema.json\");\n const result = new jsonschema.Validator().validate(sarif, schema);\n if (!result.valid) {\n // Output the more verbose error messages in groups as these may be very large.\n for (const error of result.errors) {\n logger.startGroup(`Error details: ${error.stack}`);\n logger.info(JSON.stringify(error, null, 2));\n logger.endGroup();\n }\n // Set the main error message to the stacks of all the errors.\n // This should be of a manageable size and may even give enough to fix the error.\n const sarifErrors = result.errors.map((e) => `- ${e.stack}`);\n throw new Error(`Unable to upload \"${sarifFilePath}\" as it is not valid SARIF:\\n${sarifErrors.join(\"\\n\")}`);\n }\n}", "function userValidating(post) {\n const postSchema = {\n 'title': Joi.string().min(3).required(),\n 'desc': Joi.string().required(),\n 'numberOfLikes':Joi.number().required()\n }\n return Joi.validate(post, postSchema);\n}", "function validateBody(schema) {\n try {\n return function (req, res, next) {\n //I convert the price and the stock to numbers because when I bring the information using multer everything is a String\n if (req.body.price && req.body.stock) {\n req.body.price = parseInt(req.body.price);\n req.body.stock = parseInt(req.body.stock);\n }\n var valid = ajv.validate(schema, req.body);\n if (!valid) {\n //Get the error in that way to send the error to the DOM\n res.status(400).send(ajv.errors[0]['message']);\n return;\n }\n next();\n };\n }\n catch (error) {\n console.error(error);\n }\n}", "_createSchemaValidators(schema) {\n if (typeof schema === 'string') {\n schema = { type: schema };\n }\n\n if (schema.type && typeof schema.type === 'string') {\n // is item schema\n return new this.constructor(\n Object.assign({}, schema, {\n name: this.name,\n path: this.path,\n model: this.model\n })\n );\n }\n\n return Object.keys(schema).reduce((validators, key) => {\n let name;\n let path;\n let config = schema[key];\n\n if (typeof config === 'string') {\n config = { type: config };\n }\n\n if (typeof config === 'object') {\n name = key;\n path = `${this.path}.${name}`;\n } else {\n // if config is not an object, then it's invalid. the Field constructor\n // will therefore throw an error; with the next line, we just ensure it\n // throws the right error\n name = this.name;\n }\n\n validators[name] = new this.constructor(\n Object.assign({}, config, {\n name,\n path,\n model: this.model\n })\n );\n return validators;\n }, {});\n }", "defineSchema() {\n\n }", "validate (){\n const that = this;\n return this\n ._validate(this.swaggerInput)\n .then((dereferencedSchema) => {\n that.swaggerObject = dereferencedSchema;\n return that;\n });\n }", "function validate(inp) {\n const schema = Joi.object({\n email: Joi.string()\n .email()\n .required(),\n\n password: Joi.string()\n .required()\n .min(5)\n .max(1024)\n });\n\n const result = schema.validate(inp);\n return result;\n}", "addValidationSchema(schema) {\n const validationMetadatas = new _validation_schema_ValidationSchemaToMetadataTransformer__WEBPACK_IMPORTED_MODULE_0__[\"ValidationSchemaToMetadataTransformer\"]().transform(schema);\n validationMetadatas.forEach(validationMetadata => this.addValidationMetadata(validationMetadata));\n }", "validate() {\n const that = this;\n _.keys(that._schema).forEach(function(key) {\n let value = that[key];\n if (value !== null && value !== undefined) {\n if (isEmbeddedDocument(value)) {\n value.validate();\n return;\n } else if (\n isArray(value) &&\n value.length > 0 &&\n isEmbeddedDocument(value[0])\n ) {\n value.forEach(function(v) {\n v.validate();\n });\n return;\n }\n }\n\n if (!isValidType(value, that._schema[key].type)) {\n // TODO: Formatting should probably be done somewhere else\n let typeName = null;\n let valueName = null;\n if (\n Array.isArray(that._schema[key].type) &&\n that._schema[key].type.length > 0\n ) {\n typeName = '[' + that._schema[key].type[0].name + ']';\n } else if (\n Array.isArray(that._schema[key].type) &&\n that._schema[key].type.length === 0\n ) {\n typeName = '[]';\n } else {\n typeName = that._schema[key].type.name;\n }\n\n if (Array.isArray(value)) {\n // TODO: Not descriptive enough! Strings can look like numbers\n valueName = '[' + value.toString() + ']';\n } else {\n valueName = typeof value;\n }\n throw new ValidationError(\n 'Value assigned to ' +\n that.collectionName() +\n '.' +\n key +\n ' should be ' +\n typeName +\n ', got ' +\n valueName\n );\n }\n if (\n !isSchema(that._schema[key]) &&\n that._schema[key].required &&\n isEmptyValue(value)\n ) {\n throw new ValidationError(\n 'Key ' +\n that.collectionName() +\n '.' +\n key +\n ' is required' +\n ', but got ' +\n value\n );\n }\n\n if (\n that._schema[key].match &&\n isString(value) &&\n !that._schema[key].match.test(value)\n ) {\n throw new ValidationError(\n 'Value assigned to ' +\n that.collectionName() +\n '.' +\n key +\n ' does not match the regex/string ' +\n that._schema[key].match.toString() +\n '. Value was ' +\n value\n );\n }\n\n if (!isInChoices(that._schema[key].choices, value)) {\n throw new ValidationError(\n 'Value assigned to ' +\n that.collectionName() +\n '.' +\n key +\n ' should be in choices [' +\n that._schema[key].choices.join(', ') +\n '], got ' +\n value\n );\n }\n\n if (isNumber(that._schema[key].min) && value < that._schema[key].min) {\n throw new ValidationError(\n 'Value assigned to ' +\n that.collectionName() +\n '.' +\n key +\n ' is less than min, ' +\n that._schema[key].min +\n ', got ' +\n value\n );\n }\n\n if (isNumber(that._schema[key].max) && value > that._schema[key].max) {\n throw new ValidationError(\n 'Value assigned to ' +\n that.collectionName() +\n '.' +\n key +\n ' is less than max, ' +\n that._schema[key].max +\n ', got ' +\n value\n );\n }\n\n if (\n isFunction(that._schema[key].validate) &&\n !that._schema[key].validate(value)\n ) {\n throw new ValidationError(\n 'Value assigned to ' +\n that.collectionName() +\n '.' +\n key +\n ' failed custom validator. Value was ' +\n value\n );\n }\n\n if (isSchema(that._schema[key].validate) || isSchema(that._schema[key])) {\n try {\n assert(\n value,\n isSchema(that._schema[key].validate)\n ? that._schema[key].validate\n : that._schema[key]\n );\n } catch (error) {\n if (error.details[0].path.length === 0) {\n throw new ValidationError(\n error.details[0].message.replace(\n 'value',\n `${that.collectionName()}.${key}`\n )\n );\n } else if (error.details[0].path[0] !== key) {\n throw new ValidationError(\n error.details[0].message.replace(\n error.details[0].path[0],\n `${that.collectionName()}.${key}.${error.details[0].path[0]}`\n )\n );\n } else {\n throw new ValidationError(\n error.details[0].message.replace(\n 'value',\n `${that.collectionName()}.${key}`\n )\n );\n }\n }\n }\n });\n }", "validate() { }", "function _initSchema() {\n if (!ajvSchema) {\n ajvSchema = ajv_min({ allErrors: true });\n ajvSchema.addSchema(schemaJson, \"_\");\n ajvValidators = {};\n }\n }", "function validateFunctionCode(it) {\n if (isSchemaObj(it)) {\n checkKeywords(it);\n if (schemaCxtHasRules(it)) {\n topSchemaObjCode(it);\n return;\n }\n }\n validateFunction(it, () => (0, boolSchema_1.topBoolOrEmptySchema)(it));\n}", "static async isValidObject (object) {\n return Station.validator.validate('station.schema.json', object);\n }", "function validate(data) {\n const schema = joi.object({\n exchange: joi.string().required(),\n pair: joi.string().required(),\n sign: joi.string().required(),\n price: joi.number().required(),\n email: joi.string().email().required()\n })\n\n return schema.validate(data)\n}", "static get jsonSchema () {\n return {\n type: 'object',\n required: ['name']\n };\n }", "static get schema() {\n return {\n name: { type: 'string' },\n version: { type: 'string' },\n description: { type: 'string' },\n authors: { type: 'array' },\n }\n }", "function validateObjects(movie){\n const schema = Joi.object({\n title: Joi.string().min(5).max(100).required(),\n genre: Joi.object({\n _id: Joi.objectId(),\n name: Joi.string()\n }),\n numberInStock: Joi.number().min(0).required(),\n dailyRentalRate: Joi.number().min(0).required()\n });\n return schema.validate(movie);\n}", "validateSchema(schema, throwOrLogError) {\n if (typeof schema == \"boolean\")\n return true;\n let $schema;\n $schema = schema.$schema;\n if ($schema !== undefined && typeof $schema != \"string\") {\n throw new Error(\"$schema must be a string\");\n }\n $schema = $schema || this.opts.defaultMeta || this.defaultMeta();\n if (!$schema) {\n this.logger.warn(\"meta-schema not available\");\n this.errors = null;\n return true;\n }\n const valid = this.validate($schema, schema);\n if (!valid && throwOrLogError) {\n const message = \"schema is invalid: \" + this.errorsText();\n if (this.opts.validateSchema === \"log\")\n this.logger.error(message);\n else\n throw new Error(message);\n }\n return valid;\n }", "function validate(schema, options) {\n if (options === void 0) { options = {}; }\n options = options || {};\n return function validateRequest(req, res, next) {\n if (req === 'schemaBypass') {\n return schema;\n }\n if (!schema) {\n return next();\n }\n var toValidate = validationFields.reduce(function (newArr, key) {\n var _a, _b;\n if (!schema[key]) {\n return newArr;\n }\n if (key === 'headers') {\n var authorization = req.headers.authorization;\n return __assign({}, newArr, (_a = {}, _a[key] = { authorization: authorization }, _a));\n }\n return __assign({}, newArr, (_b = {}, _b[key] = req[key], _b));\n }, __assign({}, validate));\n var error = Joi.validate(toValidate, schema, options).error;\n // for isValidate()\n res.locals.isValidated = true;\n if (error) {\n // return error response\n return next({ message: error.message, details: error.details });\n }\n // continue\n return next();\n };\n}", "async function validateDidDocSchema(req, didDoc) {\n let valid = await ajv.validate(didDocSchema, didDoc);\n if (!valid) {\n throw new intErrMsg(` Tracking number:'${Date.now()}' for request DID: '${req}'. DID document has invalid shcema. Detail info message: '${ajv.errors[0].message}'`);\n }\n return valid;\n}", "async validate() {\n return true\n }", "function initializeZSchema () {\n ZSchema = new ZSchema({\n breakOnFirstError: true,\n noExtraKeywords: true,\n ignoreUnknownFormats: false,\n reportPathAsArray: true\n });\n}", "function subschemaCode(it, valid) {\n if (isSchemaObj(it)) {\n checkKeywords(it);\n if (schemaCxtHasRules(it)) {\n subSchemaObjCode(it, valid);\n return;\n }\n }\n (0, boolSchema_1.boolOrEmptySchema)(it, valid);\n}", "validate() {\n\t\tconst schemaKeys = Object.keys(this.schema).sort();\n\t\tconst fieldsKeys = Object.keys(this.fields).sort();\n\t\t\n\t\tschemaKeys.sort();\n\t\tfieldsKeys.sort();\n\n\t\tconst match = _.isEqual(schemaKeys, fieldsKeys);\n\t\tif (!match) {\n\t\t\treturn response({invalid: true, message: `Field does not match! Required fields: ${schemaKeys} but got: ${fieldsKeys}`});\n\t\t} else {\n\t\t\treturn response({valid: true});\n\t\t}\n\t}", "function validate(request) {\n const schema = Joi.object({\n name: Joi.string().required().min(3)\n });\n\n return schema.validate(request);\n}", "validateUser(user) {\n const schema = Joi.object({\n name: Joi.string().min(2).max(255).required(),\n email: Joi.string().email().min(6).max(255).required(),\n password: Joi.string().min(6).max(1024).required(),\n user_type: Joi.string().required(),\n });\n\n return schema.validate(user);\n }", "function validateYaml(filename, content) {\n if (!content.hasOwnProperty('name')) {\n console.error(`Missing 'name' in ${filename}`)\n }\n if (!content.hasOwnProperty('blip')) {\n console.error(`Missing 'blip' in ${filename}`)\n }\n if (!Array.isArray(content.blip)) {\n console.error(`'blip' is not an array in ${filename}`)\n }\n for (var blip of content.blip) {\n if (!blip.hasOwnProperty('version')) {\n console.error(`Missing 'blip[*].version' in ${filename}`)\n }\n if (!blip.hasOwnProperty('ring')) {\n console.error(`Missing 'blip[*].ring' in ${filename}`)\n }\n }\n if (!content.hasOwnProperty('description')) {\n console.error(`Missing 'description' in ${filename}`)\n }\n}", "function validateSchema(schemaTypes) {\n return (0, _traverseSchema.default)(schemaTypes, (schemaDef, visitorContext) => {\n var typeVisitor = schemaDef && schemaDef.type && typeVisitors[schemaDef.type] || getNoopVisitor(visitorContext);\n\n if (visitorContext.isRoot) {\n return combine(_rootType.default, _common.default, typeVisitor)(schemaDef, visitorContext);\n }\n\n return combine(_common.default, typeVisitor)(schemaDef, visitorContext);\n });\n}", "validate(input) {\r\n return new Promise((resolve, reject) => {\r\n SwaggerParser.validate(input+'.yaml').then((api) => {\r\n resolve(true);\r\n }).catch((err) => {\r\n \t\t console.log(err);\r\n resolve('You must provide an existing OpenAPI spec (yaml file in working directory) and the spec MUST be valid');\r\n });\r\n });\r\n }", "static schema () {\n return {\n employeeNumber: joi.number().integer(),\n firstname: joi.string().alphanum().min(3).max(30).required(),\n lastname: joi.string().alphanum().min(3).max(30).required(),\n grade: joi.string().regex(/^[a-zA-Z0-9]{3}$/).required(),\n birthDate: joi.date().raw().required(),\n joinDate: joi.date().raw().required(),\n salary: joi.number().required(),\n email: joi.string().email()\n }\n }", "function validateRequest(body, schemaToValidateAgainst) {\n return Joi.validate(body, schemaToValidateAgainst);\n}", "function registerSchema(schema) {\n Object(_metadata_MetadataStorage__WEBPACK_IMPORTED_MODULE_0__[\"getMetadataStorage\"])().addValidationSchema(schema);\n}", "function validate(value, schemas) {\n return !schemas.every(function (schema) { return validateValueForSchema(value, schema); });\n }", "function validation(yargs, usage, y18n) {\n const __ = y18n.__;\n const __n = y18n.__n;\n const self = {};\n // validate appropriate # of non-option\n // arguments were provided, i.e., '_'.\n self.nonOptionCount = function nonOptionCount(argv) {\n const demandedCommands = yargs.getDemandedCommands();\n // don't count currently executing commands\n const _s = argv._.length - yargs.getContext().commands.length;\n if (demandedCommands._ && (_s < demandedCommands._.min || _s > demandedCommands._.max)) {\n if (_s < demandedCommands._.min) {\n if (demandedCommands._.minMsg !== undefined) {\n usage.fail(\n // replace $0 with observed, $1 with expected.\n demandedCommands._.minMsg\n ? demandedCommands._.minMsg.replace(/\\$0/g, _s.toString()).replace(/\\$1/, demandedCommands._.min.toString())\n : null);\n }\n else {\n usage.fail(__n('Not enough non-option arguments: got %s, need at least %s', 'Not enough non-option arguments: got %s, need at least %s', _s, _s, demandedCommands._.min));\n }\n }\n else if (_s > demandedCommands._.max) {\n if (demandedCommands._.maxMsg !== undefined) {\n usage.fail(\n // replace $0 with observed, $1 with expected.\n demandedCommands._.maxMsg\n ? demandedCommands._.maxMsg.replace(/\\$0/g, _s.toString()).replace(/\\$1/, demandedCommands._.max.toString())\n : null);\n }\n else {\n usage.fail(__n('Too many non-option arguments: got %s, maximum of %s', 'Too many non-option arguments: got %s, maximum of %s', _s, _s, demandedCommands._.max));\n }\n }\n }\n };\n // validate the appropriate # of <required>\n // positional arguments were provided:\n self.positionalCount = function positionalCount(required, observed) {\n if (observed < required) {\n usage.fail(__n('Not enough non-option arguments: got %s, need at least %s', 'Not enough non-option arguments: got %s, need at least %s', observed, observed, required));\n }\n };\n // make sure all the required arguments are present.\n self.requiredArguments = function requiredArguments(argv) {\n const demandedOptions = yargs.getDemandedOptions();\n let missing = null;\n for (const key of Object.keys(demandedOptions)) {\n if (!Object.prototype.hasOwnProperty.call(argv, key) || typeof argv[key] === 'undefined') {\n missing = missing || {};\n missing[key] = demandedOptions[key];\n }\n }\n if (missing) {\n const customMsgs = [];\n for (const key of Object.keys(missing)) {\n const msg = missing[key];\n if (msg && customMsgs.indexOf(msg) < 0) {\n customMsgs.push(msg);\n }\n }\n const customMsg = customMsgs.length ? `\\n${customMsgs.join('\\n')}` : '';\n usage.fail(__n('Missing required argument: %s', 'Missing required arguments: %s', Object.keys(missing).length, Object.keys(missing).join(', ') + customMsg));\n }\n };\n // check for unknown arguments (strict-mode).\n self.unknownArguments = function unknownArguments(argv, aliases, positionalMap, isDefaultCommand) {\n const commandKeys = yargs.getCommandInstance().getCommands();\n const unknown = [];\n const currentContext = yargs.getContext();\n Object.keys(argv).forEach((key) => {\n if (specialKeys.indexOf(key) === -1 &&\n !Object.prototype.hasOwnProperty.call(positionalMap, key) &&\n !Object.prototype.hasOwnProperty.call(yargs._getParseContext(), key) &&\n !self.isValidAndSomeAliasIsNotNew(key, aliases)) {\n unknown.push(key);\n }\n });\n if ((currentContext.commands.length > 0) || (commandKeys.length > 0) || isDefaultCommand) {\n argv._.slice(currentContext.commands.length).forEach((key) => {\n if (commandKeys.indexOf(key) === -1) {\n unknown.push(key);\n }\n });\n }\n if (unknown.length > 0) {\n usage.fail(__n('Unknown argument: %s', 'Unknown arguments: %s', unknown.length, unknown.join(', ')));\n }\n };\n self.unknownCommands = function unknownCommands(argv) {\n const commandKeys = yargs.getCommandInstance().getCommands();\n const unknown = [];\n const currentContext = yargs.getContext();\n if ((currentContext.commands.length > 0) || (commandKeys.length > 0)) {\n argv._.slice(currentContext.commands.length).forEach((key) => {\n if (commandKeys.indexOf(key) === -1) {\n unknown.push(key);\n }\n });\n }\n if (unknown.length > 0) {\n usage.fail(__n('Unknown command: %s', 'Unknown commands: %s', unknown.length, unknown.join(', ')));\n return true;\n }\n else {\n return false;\n }\n };\n // check for a key that is not an alias, or for which every alias is new,\n // implying that it was invented by the parser, e.g., during camelization\n self.isValidAndSomeAliasIsNotNew = function isValidAndSomeAliasIsNotNew(key, aliases) {\n if (!Object.prototype.hasOwnProperty.call(aliases, key)) {\n return false;\n }\n const newAliases = yargs.parsed.newAliases;\n for (const a of [key, ...aliases[key]]) {\n if (!Object.prototype.hasOwnProperty.call(newAliases, a) || !newAliases[key]) {\n return true;\n }\n }\n return false;\n };\n // validate arguments limited to enumerated choices\n self.limitedChoices = function limitedChoices(argv) {\n const options = yargs.getOptions();\n const invalid = {};\n if (!Object.keys(options.choices).length)\n return;\n Object.keys(argv).forEach((key) => {\n if (specialKeys.indexOf(key) === -1 &&\n Object.prototype.hasOwnProperty.call(options.choices, key)) {\n [].concat(argv[key]).forEach((value) => {\n // TODO case-insensitive configurability\n if (options.choices[key].indexOf(value) === -1 &&\n value !== undefined) {\n invalid[key] = (invalid[key] || []).concat(value);\n }\n });\n }\n });\n const invalidKeys = Object.keys(invalid);\n if (!invalidKeys.length)\n return;\n let msg = __('Invalid values:');\n invalidKeys.forEach((key) => {\n msg += `\\n ${__('Argument: %s, Given: %s, Choices: %s', key, usage.stringifiedValues(invalid[key]), usage.stringifiedValues(options.choices[key]))}`;\n });\n usage.fail(msg);\n };\n // custom checks, added using the `check` option on yargs.\n let checks = [];\n self.check = function check(f, global) {\n checks.push({\n func: f,\n global\n });\n };\n self.customChecks = function customChecks(argv, aliases) {\n for (let i = 0, f; (f = checks[i]) !== undefined; i++) {\n const func = f.func;\n let result = null;\n try {\n result = func(argv, aliases);\n }\n catch (err) {\n usage.fail(err.message ? err.message : err, err);\n continue;\n }\n if (!result) {\n usage.fail(__('Argument check failed: %s', func.toString()));\n }\n else if (typeof result === 'string' || result instanceof Error) {\n usage.fail(result.toString(), result);\n }\n }\n };\n // check implications, argument foo implies => argument bar.\n let implied = {};\n self.implies = function implies(key, value) {\n argsert_1.argsert('<string|object> [array|number|string]', [key, value], arguments.length);\n if (typeof key === 'object') {\n Object.keys(key).forEach((k) => {\n self.implies(k, key[k]);\n });\n }\n else {\n yargs.global(key);\n if (!implied[key]) {\n implied[key] = [];\n }\n if (Array.isArray(value)) {\n value.forEach((i) => self.implies(key, i));\n }\n else {\n common_types_1.assertNotStrictEqual(value, undefined);\n implied[key].push(value);\n }\n }\n };\n self.getImplied = function getImplied() {\n return implied;\n };\n function keyExists(argv, val) {\n // convert string '1' to number 1\n const num = Number(val);\n val = isNaN(num) ? val : num;\n if (typeof val === 'number') {\n // check length of argv._\n val = argv._.length >= val;\n }\n else if (val.match(/^--no-.+/)) {\n // check if key/value doesn't exist\n val = val.match(/^--no-(.+)/)[1];\n val = !argv[val];\n }\n else {\n // check if key/value exists\n val = argv[val];\n }\n return val;\n }\n self.implications = function implications(argv) {\n const implyFail = [];\n Object.keys(implied).forEach((key) => {\n const origKey = key;\n (implied[key] || []).forEach((value) => {\n let key = origKey;\n const origValue = value;\n key = keyExists(argv, key);\n value = keyExists(argv, value);\n if (key && !value) {\n implyFail.push(` ${origKey} -> ${origValue}`);\n }\n });\n });\n if (implyFail.length) {\n let msg = `${__('Implications failed:')}\\n`;\n implyFail.forEach((value) => {\n msg += (value);\n });\n usage.fail(msg);\n }\n };\n let conflicting = {};\n self.conflicts = function conflicts(key, value) {\n argsert_1.argsert('<string|object> [array|string]', [key, value], arguments.length);\n if (typeof key === 'object') {\n Object.keys(key).forEach((k) => {\n self.conflicts(k, key[k]);\n });\n }\n else {\n yargs.global(key);\n if (!conflicting[key]) {\n conflicting[key] = [];\n }\n if (Array.isArray(value)) {\n value.forEach((i) => self.conflicts(key, i));\n }\n else {\n conflicting[key].push(value);\n }\n }\n };\n self.getConflicting = () => conflicting;\n self.conflicting = function conflictingFn(argv) {\n Object.keys(argv).forEach((key) => {\n if (conflicting[key]) {\n conflicting[key].forEach((value) => {\n // we default keys to 'undefined' that have been configured, we should not\n // apply conflicting check unless they are a value other than 'undefined'.\n if (value && argv[key] !== undefined && argv[value] !== undefined) {\n usage.fail(__('Arguments %s and %s are mutually exclusive', key, value));\n }\n });\n }\n });\n };\n self.recommendCommands = function recommendCommands(cmd, potentialCommands) {\n const threshold = 3; // if it takes more than three edits, let's move on.\n potentialCommands = potentialCommands.sort((a, b) => b.length - a.length);\n let recommended = null;\n let bestDistance = Infinity;\n for (let i = 0, candidate; (candidate = potentialCommands[i]) !== undefined; i++) {\n const d = levenshtein_1.levenshtein(cmd, candidate);\n if (d <= threshold && d < bestDistance) {\n bestDistance = d;\n recommended = candidate;\n }\n }\n if (recommended)\n usage.fail(__('Did you mean %s?', recommended));\n };\n self.reset = function reset(localLookup) {\n implied = obj_filter_1.objFilter(implied, k => !localLookup[k]);\n conflicting = obj_filter_1.objFilter(conflicting, k => !localLookup[k]);\n checks = checks.filter(c => c.global);\n return self;\n };\n const frozens = [];\n self.freeze = function freeze() {\n frozens.push({\n implied,\n checks,\n conflicting\n });\n };\n self.unfreeze = function unfreeze() {\n const frozen = frozens.pop();\n common_types_1.assertNotStrictEqual(frozen, undefined);\n ({\n implied,\n checks,\n conflicting\n } = frozen);\n };\n return self;\n}", "function validateCardHasCorrectBodyContents(req, res, next) {\n const result = Joi.validate(req.body, schema);\n\n if (result.error !== null) {\n // if req.body doesn't match schema\n res.status(422); // unprocessable entity\n // send to the error handler\n next({ message: result.error.message });\n } else {\n next();\n }\n}", "function check(schema, object) {\n\n\t\tfor (var field in schema) {\n\n\t\t\t// Skip fields we use internally.\n\t\t\tif (field.indexOf('_schema_') === 0) continue;\n\n\t\t\t// Handle the different qualifiers.\n\t\t\tswitch (schema[field].qualifier) {\n\n\t\t\t\tcase \"required\":\n\t\t\t\t\tif (object[field] === undefined || object[field] === null)\n\t\t\t\t\t\tthrow new Error(\"required field '\" + field + \"' is \" + object[field]);\n\t\t\t\t\tif (isPrimitive(schema[field].type)) {\n\t\t\t\t\t\t// Check primitive field's type.\n\t\t\t\t\t\tif (typeof object[field] !== schema[field].type)\n\t\t\t\t\t\t\tthrow primitiveTypeMismatchError(\"required\", field, object[field], schema[field].type);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Schema field: check structure recursively.\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcheck(schema[field].type, object[field]);\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\tthrow new Error(\"required field '\" + field + \"' substructure mismatch: { \" + e + \" }\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"optional\":\n\t\t\t\t\tif (object[field] === undefined || object[field] === null) {\n\t\t\t\t\t\t// Field is is optional and not present, all right, continue.\n\t\t\t\t\t\t; // Nothing to do.\n\t\t\t\t\t// Field is optional and present.\n\t\t\t\t\t} else if (isPrimitive(schema[field].type)) {\n\t\t\t\t\t\t// Check primitive field's type.\n\t\t\t\t\t\tif (typeof object[field] !== schema[field].type)\n\t\t\t\t\t\t\tthrow primitiveTypeMismatchError(\"optional\", field, object[field], schema[field].type);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Schema field: check structure recursively.\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcheck(schema[field].type, object[field]);\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\tthrow new Error(\"optional field '\" + field + \"' substructure mismatch: { \" + e + \" }\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"repeated\":\n\t\t\t\t\t// Object check: only allow arrays.\n\t\t\t\t\tif (object[field] === undefined || object[field] === null)\n\t\t\t\t\t\tthrow new Error(\"repeated field '\" + field + \"' is '\" + object[field] + \"'\");\n\t\t\t\t\tif (object[field].__proto__ !== [].__proto__)\n\t\t\t\t\t\tthrow new Error(\"repeated field '\" + field + \"' is not an array: '\" + object[field] + \"'\");\n\n\t\t\t\t\t// Is it an array of primitives or objects?\n\t\t\t\t\tif (isPrimitive(schema[field].type)) {\n\t\t\t\t\t\tfor (var index in object[field]) {\n\t\t\t\t\t\t\t// Check if the array entry has that primitive type\n\t\t\t\t\t\t\tif (typeof object[field][index] !== schema[field].type)\n\t\t\t\t\t\t\t\tthrow primitiveTypeMismatchError(\"repeated\", field, object[field], schema[field].type);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (var index in object[field]) {\n\t\t\t\t\t\t\t// Repeated schema field: check recursively if the array entry matches the subschema\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tcheck(schema[field].type, object[field][index]);\n\t\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t\tthrow new Error(\"repeated field '\" + field + \"' substructure mismatch: { \" + e + \" }\");\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\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t// If switch did not match, we got a bad input (but this impossible due to the `valid_schema()` check).\n\t\t\t\t\tthrow new Error(\"jsschema: Illegal state: No qualifier matched\");\n\t\t\t}\n\t\t}\n\n\t\treturn object;\n\t}", "static get schema() {\n return {\n name: { type: 'string' },\n kit: { type: 'string' },\n }\n }", "function validate(schema, options) {\n\t\t return function (x) {\n\t\t var validate = jsen(schema, options);\n\t\t var isValid = validate(x);\n\t\t if (isValid) {\n\t\t return undefined;\n\t\t }\n\t\t else {\n\t\t return validate.errors\n\t\t .map(normalizeError);\n\t\t }\n\t\t };\n\t\t}", "function validate_document(data, logger) {\n var instance_json = JSON.parse(data);\n var type = instance_json._type;\n if (type) {\n var url = type_url_map[type];\n if (url) {\n var schema = url_schema_map[url];\n if (schema) {\n var errors = schema.validate(instance_json).errors;\n if (errors.length) {\n logger.error(JSON.stringify(errors));\n }\n }\n else {\n logger.error(\"No schema for \" + url);\n }\n }\n else {\n logger.error(\"No URL for \" + type);\n }\n }\n else {\n logger.error(\"No _type for \" + data);\n }\n }", "dynamic() {\n\t\tconst dynamicSchema = Object.keys(this.schema)\n\t\t\t.filter(key => this.field.includes(key))\n\t\t\t.reduce((obj, key) => {\n\t\t\t\tobj[key] = this.schema[key];\n\t\t\t\treturn obj;\n\t\t\t}, {});\n\t\t\t\n\t\tconst validate = Joi.object(dynamicSchema).validateAsync(this.fields);\n\t\treturn validate.then(() => {\n\t\t\treturn response({valid: true});\n\t\t}).catch(error => {\n\t\t\treturn response({invalid: true, message: joiError(error.toString())});\n\t\t})\n\t}", "_validate() {\n\t}", "function DefaultSchemaValidator() {\n this._composer = new Ajv({ useDefaults: true });\n this._validator = new Ajv();\n this._composer.addSchema(Private.SCHEMA, 'main');\n this._validator.addSchema(Private.SCHEMA, 'main');\n }", "function validate(obj, schema) {\n if (schema instanceof RegExp) {\n\tif ((obj + \"\").match(schema)) {\n\t return false;\n\t} else {\n\t return \"RegExp failed: \" + schema;\n\t}\n }\n\n if (typeof schema === 'function') {\n\ttry {\n\t return schema(obj);\n\t} catch (e) {\n\t return \"Predicate failed: \" + e;\n\t}\n }\n\n if (obj === schema) {\n\treturn false;\n }\n\n if (typeof obj !== typeof schema) {\n\treturn \"Type mismatch: expected typeof to be \" + (typeof schema);\n }\n\n if (typeof schema !== 'object') {\n\treturn \"Value mismatch: expected \" + schema;\n }\n\n // Recursive structural equivalence.\n var key;\n\n if (!(schema.hasOwnProperty(\"_extensible\") && schema._extensible)) {\n\t// Ensure there's nothing in the object that the schema doesn't have.\n\tvar oKeys = {};\n\tfor (key in obj) {\n\t if (obj.hasOwnProperty(key)) {\n\t\toKeys[key] = 1;\n\t }\n\t}\n\tfor (key in schema) {\n\t if (!special_property(key) && schema.hasOwnProperty(key)) {\n\t\tdelete oKeys[key];\n\t }\n\t}\n\n\tvar aKeys = [];\n\tfor (key in oKeys) {\n\t aKeys.push(key);\n\t}\n\tif (aKeys.length) {\n\t return \"Unexpected properties: \" + aKeys.join(\", \");\n\t}\n }\n\n var haveResult = false;\n var result = {};\n var intermediate;\n\n for (key in schema) {\n\tif (!special_property(key) && schema.hasOwnProperty(key)) {\n\t intermediate = validate(obj[key], schema[key]);\n\t if (intermediate) {\n\t\tresult[key] = intermediate;\n\t\thaveResult = true;\n\t }\n\t}\n }\n\n return haveResult ? result : false;\n}", "function fixSchema(schema){\n recurseotron.recurse(schema,{},function(obj,state){\n if ((state.key == 'id') && (typeof obj == 'string')) delete state.parent.id;\n if ((state.key == 'title') && (typeof obj == 'string')) delete state.parent.title;\n if ((state.key == 'description') && (typeof obj == 'string')) delete state.parent.description;\n if ((state.key == 'location') && (typeof obj == 'string')) delete state.parent.location;\n if ((state.key == 'type') && (typeof obj == 'string')) {\n if (obj == 'textarea') {\n state.parent.type = 'string';\n }\n }\n if ((state.key == '$ref') && (typeof obj == 'string') && !obj.startsWith('#/')) {\n state.parent[\"$ref\"] = '#/definitions/'+obj;\n }\n if ((state.key == 'required') && (typeof obj == 'boolean')) {\n if (obj === true) {\n var greatgrandparent = state.parents[state.parents.length-3];\n if (greatgrandparent) {\n if (state.keys[state.keys.length-2] != 'items') { // TODO better check for arrays\n if (!greatgrandparent.required) greatgrandparent.required = [];\n greatgrandparent.required.push(state.keys[state.keys.length-2]);\n }\n }\n }\n delete state.parent.required;\n }\n });\n}", "function validate(){\n\n\t\t//TODO: make this work\n\n\n\t}", "function validateInput(res,req) {\n const schema = Joi.object({\n title: Joi.string().min(3).required()\n });\n\n const result = schema.validate(req.body);\n\n if (result.error) {\n res.status(400).send(result.error.details[0].message);\n return;\n };\n}", "function validateUser(user){\n const schema = Joi.object().keys({\n username: Joi.string().trim(),\n email: Joi.string().trim().email().lowercase().required(),\n });\n schema.validate(user)\n}", "static get schema() {\n return {};\n }", "validate(event) {\n\t\tevent.preventDefault();\n\n\t\tlet valid = true;\n\n\t\tconst form = document.forms['form'];\n\t\tconst formNodes = Array.prototype.slice.call(form.childNodes);\n\t\tvalid = this.props.schema.fields.every(field => {\n\t\t\tconst input = formNodes.find(node => node.id === field.id);\n\n\t\t\t// Check field is answered if mandatory\n\t\t\tif (!field.optional || typeof field.optional === 'object') {\n\t\t\t\tlet optional;\n\n\t\t\t\t// Check type of 'optional' field.\n\t\t\t\tif (typeof field.optional === 'object') {\n\n\t\t\t\t\t// Resolve condition in 'optional' object.\n\t\t\t\t\tconst dependentOn = formNodes.find(node => node.id === field.optional.dependentOn);\n\t\t\t\t\tconst dependentOnValue = this.getValue(dependentOn, field.type);\n\n\t\t\t\t\t// Try and find a value in schema 'values' object that matches a value\n\t\t\t\t\t// given in 'dependentOn' input.\n\t\t\t\t\t// Otherwise, use the default value provided.\n\t\t\t\t\tconst value = field.optional.values.find(val => dependentOnValue in val);\n\n\t\t\t\t\tif (value) {\n\t\t\t\t\t\toptional = value[dependentOnValue];\n\t\t\t\t\t} else {\n\t\t\t\t\t\toptional = field.optional.default;\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\t// Else 'optional' field is just a boolean value.\n\t\t\t\t\toptional = field.optional;\n\t\t\t\t}\n\n\t\t\t\t// If not optional, make sure input is answered.\n\t\t\t\tif (!optional) {\n\t\t\t\t\treturn Boolean(this.getValue(input, field.type));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn field.validations.every(validation => {\n\t\t\t\tif (validation.containsChar) {\n\t\t\t\t\t// Ensure input value has the specified char.\n\t\t\t\t\treturn this.getValue(input, field.type).trim().includes(validation.containsChar);\n\n\t\t\t\t} else if (validation.dateGreaterThan) {\n\t\t\t\t\t// Ensure difference between today and given date is larger than specified interval.\n\t\t\t\t\tconst value = this.getValue(input, field.type);\n\n\t\t\t\t\tlet diff = Date.now() - new Date(value).getTime();\n\n\t\t\t\t\t// Convert from milliseconds to the unit given in schema.\n\t\t\t\t\tswitch(validation.dateGreaterThan.unit) {\n\t\t\t\t\t\tcase \"seconds\":\n\t\t\t\t\t\t\tdiff = diff / 1000;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"minutes\":\n\t\t\t\t\t\t\tdiff = diff / 1000 / 60;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"hours\":\n\t\t\t\t\t\t\tdiff = diff / 1000 / 60 / 60;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"days\":\n\t\t\t\t\t\t\tdiff = diff / 1000 / 60 / 60 / 24;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"years\":\n\t\t\t\t\t\t\tdiff = diff / 1000 / 60 / 60 / 24 / 365;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\treturn diff > validation.dateGreaterThan.value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\t// If all checks pass, submit the form. Otherwise alert the user.\n\t\tif (valid) {\n\t\t\tthis.submit();\n\t\t} else {\n\t\t\talert(\"Form is not valid. Please make sure all inputs have been correctly answered.\");\n\t\t}\n\n\t}", "function validateUser (input) {\n const schema = Joi.object({\n password: Joi.string()\n .required()\n .min(7)\n .max(50),\n\n email: Joi.string()\n .email()\n .required()\n });\n\n const result = schema.validate(input);\n return result;\n}", "function isSchema(schema) {\n return (0, _instanceOf.default)(schema, GraphQLSchema);\n}", "static validate(objectModel) {\n const schema = Validator._getRootSchema();\n const schemaValidation = Joi.validate(objectModel, schema);\n\n if (schemaValidation.error) {\n throw schemaValidation.error;\n }\n }", "validateField(field, options, parent = null) {\n const fieldType = self.fieldTypes[field.type];\n if (!fieldType) {\n fail('Unknown schema field type.');\n }\n if (!field.name) {\n fail('name property is missing.');\n }\n if (!field.label && !field.contextual) {\n field.label = _.startCase(field.name.replace(/^_/, ''));\n }\n if (field.hidden && field.hidden !== true && field.hidden !== false) {\n fail(`hidden must be a boolean, \"${field.hidden}\" provided.`);\n }\n if (field.if && field.if.$or && !Array.isArray(field.if.$or)) {\n fail(`$or conditional must be an array of conditions. Current $or configuration: ${JSON.stringify(field.if.$or)}`);\n }\n if (!field.editPermission && field.permission) {\n field.editPermission = field.permission;\n }\n if (options.type !== 'doc type' && (field.editPermission || field.viewPermission)) {\n warn(`editPermission or viewPermission must be defined on doc-type schemas only, \"${options.type}\" provided`);\n }\n if (options.type === 'doc type' && (field.editPermission || field.viewPermission) && parent) {\n warn(`editPermission or viewPermission must be defined on root fields only, provided on \"${parent.name}.${field.name}\"`);\n }\n if (fieldType.validate) {\n fieldType.validate(field, options, warn, fail);\n }\n // Ancestors hoisting should happen AFTER the validation recursion,\n // so that ancestors are processed as well.\n self.hoistFollowingFieldsToParent(field, parent);\n function fail(s) {\n throw new Error(format(s));\n }\n function warn(s) {\n self.apos.util.error(format(s));\n }\n function format(s) {\n const fieldName = parent && parent.name\n ? `${parent.name}.${field.name}`\n : field.name;\n\n return stripIndents`\n ${options.type} ${options.subtype}, ${field.type} field \"${fieldName}\":\n\n ${s}\n\n `;\n }\n }", "function validates() {\n if(this.isRoot()) {\n return true; \n }else if(this.value === undefined && !this.rule.required) {\n return false;\n }\n return this.rule.required\n || (!this.rule.required && this.source.hasOwnProperty(this.field));\n}", "function validatefoodType(foodTypeModel) {\n const schema = {\n foodTypeName: Joi.string().required(), \n status:Joi.number(),\n createdDate:Joi.date(),\n updatedDate:Joi.date(),\n updateUser:Joi.number(),\n createdUser:Joi.number()\n };\n \n return Joi.validate(foodTypeModel, schema);\n }", "function validateTeacher(teacher) {\n const schema = Joi.object({\n name: Joi.string().min(5).max(255).required(),\n username : Joi.string().min(5).max(255).required(),\n password: Joi.string().min(5).max(255).required(),\n });\n\n return schema.validate(teacher);\n}", "function isValidManifest(skillSchema) {\n if (skillSchema &&\n skillSchema.manifest &&\n typeof skillSchema.manifest === 'object')\n {\n return true;\n }\n else {\n return false;\n }\n}" ]
[ "0.708026", "0.6426762", "0.6426762", "0.6426762", "0.6426762", "0.6426762", "0.6426762", "0.6037371", "0.59873", "0.5872371", "0.5733999", "0.5728448", "0.56688386", "0.5661867", "0.56045157", "0.553236", "0.549124", "0.54804677", "0.54655415", "0.5416495", "0.54163957", "0.5382009", "0.5376274", "0.537232", "0.53392625", "0.5325243", "0.5307066", "0.5300661", "0.5285403", "0.52805483", "0.52805483", "0.52805483", "0.52805483", "0.52805483", "0.5278693", "0.52611864", "0.5241161", "0.5241161", "0.52323395", "0.52248293", "0.519577", "0.51750916", "0.51409936", "0.51402164", "0.5108545", "0.5102664", "0.50997466", "0.5084294", "0.50810343", "0.5042452", "0.50166523", "0.5015965", "0.501537", "0.50131565", "0.49989086", "0.49908492", "0.49807695", "0.4968906", "0.49558052", "0.4933812", "0.493303", "0.491483", "0.49147987", "0.49084288", "0.4900121", "0.48993984", "0.48872352", "0.48828042", "0.4864439", "0.4856206", "0.48551255", "0.48403925", "0.48248643", "0.48207098", "0.4817639", "0.47908542", "0.47757915", "0.4763002", "0.47601482", "0.47478864", "0.47427538", "0.47358894", "0.47124207", "0.47111705", "0.4702631", "0.46903634", "0.46891385", "0.46827215", "0.46639913", "0.4660831", "0.4648405", "0.4644643", "0.4629483", "0.46204698", "0.46187207", "0.4603437", "0.46026066", "0.4597639", "0.45895523", "0.4581847" ]
0.71655756
0
deepmerge array merging algorithm
function arrayMerge(target,source,options){var destination=target.slice();source.forEach(function merge(e,i){if(typeof destination[i]==='undefined'){var cloneRequested=options.clone!==false;var shouldClone=cloneRequested&&options.isMergeableObject(e);destination[i]=shouldClone?deepmerge_1(Array.isArray(e)?[]:{},e,options):e;}else if(options.isMergeableObject(e)){destination[i]=deepmerge_1(target[i],e,options);}else if(target.indexOf(e)===-1){destination.push(e);}});return destination;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mergeArrays(arr1, arr2) {\n \n}", "merge(tree) {\n let arr = tree.toArray();\n for(let i=0; i<arr.length; i++) {\n this.add(arr[i]);\n }\n }", "function mergeSort(array) {\r\n //まずアレイを一つずつ要素が入った子アレイを持つ親アレイにする。\r\n const decomposedArray = [];\r\n for (let ele of array) {\r\n decomposedArray.push([ele]);\r\n }\r\n\r\n //バラバラになったアレイdecomposedArrayを最終的に並べ替えて一つのアレイにする関数に渡す。この関数は、下に定義。\r\n return reduceArray(decomposedArray);\r\n\r\n //(1)親アレイの要素を半数にする関数(2)を、要素が1つになるまで繰り返す関数。\r\n function reduceArray(array) {\r\n if (array.length === 1) {\r\n return array[0];\r\n }\r\n array = halveArray(array);\r\n return reduceArray(array);\r\n }\r\n\r\n //(2)親アレイの子アレイを(3)を使って二つずつを一つにして半分の要素にする関数。\r\n function halveArray(array, newArray = []) {\r\n if (array.length === 0) {\r\n return newArray;\r\n }\r\n if (array.length === 1) {\r\n newArray.push(array[0]);\r\n array.shift();\r\n return halveArray(array, newArray);\r\n }\r\n newArray.push(mergeTwo(array[0], array[1]));\r\n array.shift();\r\n array.shift();\r\n // console.log(array.length);\r\n return halveArray(array, newArray);\r\n }\r\n\r\n // (3)二つのアレイを小さい要素からマージする関数を定義\r\n function mergeTwo(array1, array2, newArray = []) {\r\n //array1もarray2も空のとき\r\n if (array1.length === 0 && array2.length === 0) {\r\n return newArray;\r\n }\r\n if (array1.length === 0) {\r\n newArray.push(array2[0]);\r\n array2.shift();\r\n return mergeTwo(array1, array2, newArray);\r\n }\r\n if (array2.length === 0) {\r\n newArray.push(array1[0]);\r\n array1.shift();\r\n return mergeTwo(array1, array2, newArray);\r\n }\r\n if (array1[0] <= array2[0]) {\r\n newArray.push(array1[0]);\r\n array1.shift();\r\n\r\n return mergeTwo(array1, array2, newArray);\r\n }\r\n newArray.push(array2[0]);\r\n array2.shift();\r\n return mergeTwo(array1, array2, newArray);\r\n }\r\n}", "function arrayMerge(a, b) {\r\n\tvar newArray = {};\r\n\t\r\n\tb.walk (function(e,key) {\r\n\t\t\r\n\t\t//if ( (typeof(a[element]) == 'object') && (typeof(b[element]) == 'object') )\r\n\t\t//\tnewArray[element] = arrayMerge(a[element],b[element]);\t// If we got an array in array, recurse into it\r\n\t\t\r\n\t\t// If the element exists in A, take it from A, otherwise take it from B\r\n\t\tif (typeof(a[key]) != 'undefined')\r\n\t\t\tnewArray[key] = a[key];\r\n\t\telse\r\n\t\t\tnewArray[key] = e;\r\n\r\n\t} );\r\n\t\r\n\treturn newArray;\r\n}", "function merge(a, b) {\n\n var i;\n var j;\n var k=0;\n var c = [];\n\nfor (i=0; i<a.length; i++) {\n\n c[k]=a[i];\n k++;\n}\n\nfor (j=0; j<b.length; j++) {\n\n c[k]=b[j];\n k++;\n}\n\n\n return c;\n\n}", "mergeArray (sourceArr, extArr) {\n // note: Array.prototype.push.apply(arr1,arr2) is unreliable\n extArr.forEach((el) => {\n sourceArr.push(el)\n })\n }", "function mergeArrayAlt(x, y) {\n\tvar temp = [];\n\tvar finalArray = [];\n\t\n\tif (x.length<y.length) { z = y.length}\n\t\telse { z = x.length}\n\tfor (var i = 0; i <= z; i++) {\n\t\t\n\t\t(temp.push(x[i]) && temp.push(y[i]))\n\t\n\t}\n\tfor (var i = 0; i <= temp.length; i++) {\n\t\ttemp[i] && finalArray.push(temp[i]);\n\t};\n\n\t\tconsole.log(finalArray);\n}", "function merge(a, b) {\n while (a.length) {\n while (b.length) {\n while (a[0] < b[0]) {\n return [a[0]].concat(merge(a.slice(1), b))\n }\n return [b[0]].concat(merge(a, b.slice(1)))\n }\n return a\n }\n return b\n}", "function mergeSort(obj) {\n // break array into individual arrays of single integers\n // keep merging until result contains a single array\n //while (result.length > 1) {\n const oddNumbered = obj.result.length % 2 != 0;\n let temp = [];\n\n // iterate 2 subarrays at a time and merge into larger subarray\n for (let i = 0; i < obj.result.length; i += 2) {\n let a = obj.result[i];\n let b = obj.result[i + 1];\n\n // pre-merge 3 subarrays into 2 if there are odd number of subarrays\n if (oddNumbered && i == (obj.result.length - 3)) {\n b = merge(b, obj.result[i + 2]);\n i++;\n }\n // accumulate intermediate result\n temp.push(merge(a, b));\n }\n // current level merged, update result\n obj.result = temp;\n //}\n return obj.result;\n}", "function recursiveMerge(arr) {\n if (Array.isArray(arr[0]) && !Array.isArray(arr[0][0])) {\n return merge(arr[0], arr[1]);\n } else {\n return [recursiveMerge(arr[0]), recursiveMerge(arr[1])];\n }\n}", "function merge(arr1, arr2) {\n\tlet output = [];\n\tlet left = 0;\n\tlet right = 0;\n\tlet iterate = true;\n\n\twhile (iterate) {\n\t\tif (arr1[left] === arr2[right]) {\n\t\t\toutput.push(arr1[left], arr2[right]);\n\t\t\tright++;\n\t\t\tleft++;\n\t\t}\n\t\tif (arr1[left] < arr2[right]) {\n\t\t\toutput.push(arr1[left]);\n\t\t\tleft++;\n\t\t} else {\n\t\t\toutput.push(arr2[right]);\n\t\t\tright++;\n\t\t}\n\t\tif (!arr1[left]) {\n\t\t\toutput.push(...arr2.slice(right, arr2.lenght));\n\t\t\titerate = false;\n\t\t}\n\t\tif (!arr2[right]) {\n\t\t\toutput.push(...arr1.slice(left, arr1.lenght));\n\t\t\titerate = false;\n\t\t}\n\t}\n\n\treturn output;\n}", "merge(arr, l, m, r) {\n // original array is broken in two parts \n // left and right array \n let len1 = m - l + 1, len2 = r - m;\n let left = [], right = [];\n for (let i = 0; i < len1; i++)\n left[i] = arr[l + i];\n for (let i = 0; i < len2; i++)\n right[i] = arr[m + 1 + i];\n\n let i = 0;\n let j = 0;\n let k = l;\n\n // after comparing, we merge those two array \n // in larger sub array \n while (i < len1 && j < len2) {\n if (left[i] <= right[j]) {\n arr[k] = left[i];\n i++;\n }\n else {\n arr[k] = right[j];\n j++;\n }\n k++;\n }\n\n // copy remaining elements of left, if any \n while (i < len1) {\n arr[k] = left[i];\n k++;\n i++;\n }\n\n // copy remaining element of right, if any \n while (j < len2) {\n arr[k] = right[j];\n k++;\n j++;\n }\n }", "deepMerge(){\n for ( let i = 1; i < arguments.length; i++ ) {\n for ( let key in arguments[ i ] )\n if ( arguments[ i ].hasOwnProperty( key ) ) {\n if ( typeof arguments[ 0 ][ key ] === 'object' && typeof arguments[ i ][ key ] === 'object' ) {\n this.deepMerge( arguments[ 0 ][ key ], arguments[ i ][ key ] );\n } else {\n arguments[ 0 ][ key ] = arguments[ i ][ key ];\n }\n }\n }\n return arguments[ 0 ];\n }", "function merge(arr1, arr2) {\n return arr1.length === 0\n ? arr2\n : arr2.length === 0\n ? arr1\n : is_earlier(arr1[0], arr2[0])\n ? [arr1[0]].concat(merge(arr1.splice(1), arr2))\n : [arr2[0]].concat(merge(arr1, arr2.splice(1)));\n }", "mergeSort(){\n if(this.length() > 1){\n let mid = traverseIndex(this.length()/2);\n let L = arr.slice(0,mid-1);\n let R = arr.slice(mid);\n\n this.mergeSort(L);\n this.mergeSort(R);\n\n i = j = k = 0;\n\n while( i < ){\n\n }\n }\n }", "function arrayMerge(destination, source) {\n\t return source;\n\t}", "function arrayMerge(target, source, options) {\n var destination = target.slice();\n source.forEach(function (e, i) {\n if (typeof destination[i] === 'undefined') {\n var cloneRequested = options.clone !== false;\n var shouldClone = cloneRequested && options.isMergeableObject(e);\n destination[i] = shouldClone ? Object(deepmerge__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Array.isArray(e) ? [] : {}, e, options) : e;\n } else if (options.isMergeableObject(e)) {\n destination[i] = Object(deepmerge__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(target[i], e, options);\n } else if (target.indexOf(e) === -1) {\n destination.push(e);\n }\n });\n return destination;\n}", "function merge(array1, array2) {\n let merged = [];\n while (array1.length && array2.length) {\n if (array1[0] < array2[0]) {\n merged.push(array1.shift());\n } else if (array1[0] > array2[0]) {\n merged.push(array2.shift());\n } else {\n merged.push(array1.shift(), array2.shift());\n }\n }\n // Una vez finalizado el ciclo, una matriz está vacía y la otra matriz contiene solo\n // valores mayores que todos los valores en merged\n return [...merged, ...array1, ...array2];\n }", "function arrayMerge(target, source, options) {\n var destination = target.slice();\n source.forEach(function merge(e, i) {\n if (typeof destination[i] === 'undefined') {\n var cloneRequested = options.clone !== false;\n var shouldClone = cloneRequested && options.isMergeableObject(e);\n destination[i] = shouldClone ? (0,deepmerge__WEBPACK_IMPORTED_MODULE_2__.default)(Array.isArray(e) ? [] : {}, e, options) : e;\n } else if (options.isMergeableObject(e)) {\n destination[i] = (0,deepmerge__WEBPACK_IMPORTED_MODULE_2__.default)(target[i], e, options);\n } else if (target.indexOf(e) === -1) {\n destination.push(e);\n }\n });\n return destination;\n}", "function arrayMerge(target, source, options) {\n var destination = target.slice();\n source.forEach(function merge(e, i) {\n if (typeof destination[i] === 'undefined') {\n var cloneRequested = options.clone !== false;\n var shouldClone = cloneRequested && options.isMergeableObject(e);\n destination[i] = shouldClone ? (0,deepmerge__WEBPACK_IMPORTED_MODULE_2__.default)(Array.isArray(e) ? [] : {}, e, options) : e;\n } else if (options.isMergeableObject(e)) {\n destination[i] = (0,deepmerge__WEBPACK_IMPORTED_MODULE_2__.default)(target[i], e, options);\n } else if (target.indexOf(e) === -1) {\n destination.push(e);\n }\n });\n return destination;\n}", "function arrayMerge(target, source, options) {\n var destination = target.slice();\n source.forEach(function merge(e, i) {\n if (typeof destination[i] === 'undefined') {\n var cloneRequested = options.clone !== false;\n var shouldClone = cloneRequested && options.isMergeableObject(e);\n destination[i] = shouldClone ? (0,deepmerge__WEBPACK_IMPORTED_MODULE_2__.default)(Array.isArray(e) ? [] : {}, e, options) : e;\n } else if (options.isMergeableObject(e)) {\n destination[i] = (0,deepmerge__WEBPACK_IMPORTED_MODULE_2__.default)(target[i], e, options);\n } else if (target.indexOf(e) === -1) {\n destination.push(e);\n }\n });\n return destination;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function arrayMerge(destination, source) {\n return source;\n}", "function merge_node_list(a, b) {\n\tvar i = 0;\n\tvar j = 0;\n\tvar c = [];\n\tconsole.log('merge 1 ' + a.length + ' ' + b.length);\n\tfor (; i < a.length && j < b.length;) {\n\t\t\tconsole.log('merge 2.1 ' + i + \" \" + j );\n\t\tvar pos = a[i].compareDocumentPosition(b[j]);\n\t\tif (pos & 2) {\n\t\t\tc.push(b[j]);\n\t\t\t++j;\n\t\t} else if (pos & 4) {\n\t\t\tc.push(a[i]);\n\t\t\t++i;\n\t\t} else {\n\t\t\tc.push(a[i]);\n\t\t\t++i;\n\t\t\t++j;\n\t\t}\n\t}\n\tconsole.log('merge 3.1');\n\tfor(; i < a.length; ++i) {\n\t\tconsole.log('merge 4.1 ' + i);\n\t\tc.push(a[i]);\n\t}\n\tfor(; j < b.length; ++j) {\n\t\tconsole.log('merge 4.2 ' + i);\n\t\tc.push(b[j]);\n\t}\n\treturn c;\n}", "function concatenate() {\n\n\tvar mergeList =[];\n\tif(concatenateArray1 != 0 && concatenateArray2 != 0)\n\t{\n\t\tvar i = 0;\n\t\tvar j = 0;\n\t\tvar array1len = JSON.parse(JSON.stringify(concatenateArray1.children.length));\n\t\tvar array2len = JSON.parse(JSON.stringify(concatenateArray2.children.length));\n\t\tconsole.log(array1len);\n\t\tconsole.log(array2len);\n\t\tconsole.log(\"in merging\");\n\n\t\twhile(i<array1len && j<array2len)\n\t\t{\n\t\t\tconsole.log(\"both\");\n\t\t\tconsole.log(mergeList);\n\t\t\tconsole.log(i);\n\t\t\tconsole.log(concatenateArray1.children.length);\n\t\t\tconsole.log(array1len);\n\t\t\tconsole.log(j);\n\t\t\tconsole.log(concatenateArray2.children.length);\n\t\t\tconsole.log(array2len);\n\n\t\t\tif(parseInt(concatenateArray1.children[i].innerHTML) <= parseInt(concatenateArray2.children[j].innerHTML))\n\t\t\t{\n\t\t\t\tmergeList.push(concatenateArray1.children[i]);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tmergeList.push(concatenateArray2.children[j]);\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\n\t\twhile(i<array1len)\n\t\t{\n\t\t\tmergeList.push(concatenateArray1.children[i]);\n\t\t\ti++;\t\t\t\n\t\t}\n\n\t\twhile(j<array2len)\n\t\t{\n\t\t\tmergeList.push(concatenateArray2.children[j]);\n\t\t\tj++;\t\t\t\n\t\t}\n\n\t\tvar concatenateArrayid = concatenateArray1.id;\n\t\tpivot_arrays = document.getElementById('array_container_pivot');\n\t\tpivot_arrays.removeChild(concatenateArray1);\n\t\tpivot_arrays.removeChild(concatenateArray2);\n\n\t\tvar concatenateArray = document.createElement('div');\n\t\tconcatenateArray.id = concatenateArrayid\n\t\tconcatenateArray.addEventListener(\"click\", function(){\n\t\t\tselectPartitionArray(concatenateArray.id);\n\t\t}, false);\n\n\t\tconsole.log(mergeList);\n\t\tfor(var i=0;i<mergeList.length;i++)\n\t\t\tconcatenateArray.appendChild(mergeList[i])\n\t\tpivot_arrays.appendChild(concatenateArray);\n\t}\n\telse \n\t\talert(\"concatenate arrays not chosen\")\n\n\tpartitionNode = 0;\n\tconcatenateArray1 = 0;\n\tconcatenateArray2 = 0;\n\tunselectAllNodes();\n}", "function merge(array1,array2) {\n let mergedArray = [];\n\n while (array1.length && array2.length) {\n\n if(array1[0] <= array2[0]) {\n\n mergedArray.push(array1[0]);\n array1 = array1.slice(1);\n\n } else {\n\n mergedArray.push(array2[0]);\n array2 = array2.slice(1);\n\n }\n\n }\n \n while (array1.length)\n\n mergedArray.push(array1.shift());\n\n while (array2.length)\n\n mergedArray.push(array2.shift());\n\n return mergedArray;\n\n\n}", "function bs_arrayMerge(obj1, obj2) {\n if (!bs_isObject(obj1) || !bs_isObject(obj2)) return false;\n for (var key in obj2) {obj1[key] = obj2[key];}\n return obj1;\n}", "function arrayMerge(target, source, options) {\n var destination = target.slice();\n source.forEach(function merge(e, i) {\n if (typeof destination[i] === 'undefined') {\n var cloneRequested = options.clone !== false;\n var shouldClone = cloneRequested && options.isMergeableObject(e);\n destination[i] = shouldClone ? deepmerge(Array.isArray(e) ? [] : {}, e, options) : e;\n } else if (options.isMergeableObject(e)) {\n destination[i] = deepmerge(target[i], e, options);\n } else if (target.indexOf(e) === -1) {\n destination.push(e);\n }\n });\n return destination;\n}", "function merge_array(array1, array2) {\r\n var result_array = [];\r\n var arr = array1.concat(array2);\r\n var len = arr.length;\r\n var assoc = {};\r\n\r\n while (len--) {\r\n var item = arr[len];\r\n\r\n if (!assoc[item]) {\r\n result_array.unshift(item);\r\n assoc[item] = true;\r\n }\r\n }\r\n return result_array;\r\n}", "function merge(arr1, arr2) {\n let results = []\n let p1 = 0\n let p2 = 0\n while (p1 < arr1.length && p2 < arr2.length) {\n if (arr2[p2] > arr1[p1]) {\n results.push(arr1[p1])\n p1++\n } else {\n results.push(arr2[p2])\n p2++\n }\n }\n\n while (p1 < arr1.length) {\n results.push(arr1[p1])\n p1++\n }\n while (p2 < arr2.length) {\n results.push(arr2[p2])\n p2++\n }\n return results\n}", "function merge(arr1, arr2) {\n var results = [], i = 0, j = 0;\n while (i < arr1.length && j < arr2.length) {\n if (arr1[i] < arr2[j] ) {\n results.push(arr1[i]);\n i++;\n } else {\n results.push(arr2[j]);\n j++;\n }\n }\n while (i < arr1.length) {\n results.push(arr1[i]);\n i++;\n }\n while (j < arr2.length) {\n results.push(arr2[j]);\n j++;\n }\n return results;\n}", "function merge(a, b) {\r\n\t for (var key in b) {\r\n\t if (typeof b[key] !== 'object' || b[key] === null) {\r\n\t a[key] = b[key];\r\n\t }\r\n\t else if (Array.isArray(b[key])) {\r\n\t a[key] = (a[key] || []).concat(clone(b[key]));\r\n\t }\r\n\t else if (typeof a[key] !== 'object' || a[key] === null || Array.isArray(a[key])) {\r\n\t a[key] = merge({}, b[key]);\r\n\t }\r\n\t else {\r\n\t a[key] = merge(a[key], b[key]);\r\n\t }\r\n\t }\r\n\t return a;\r\n\t}", "function merge(arr1,arr2) {\n let results=[];\n let i=0;\n let j=0;\n while(i<arr1.length && j<arr2.length) {\n if(arr1[i]>arr2[j]) {\n results.push(arr2[j]);\n j++;\n } else{\n results.push(arr1[i]);\n i++;\n }\n }\n while(i<arr1.length){\n results.push(arr1[i]);\n i++;\n }\n while(j<arr2.length){\n results.push(arr2[j]);\n j++;\n }\n return results;\n}", "function mergeArray (arr1, arr2) {\nvar input1 = arr1\nvar input2 = arr2\n\nvar input1Last = input1.slice(-1)\n\nvar combine = input1Last.concat(input2)\n\nreturn(combine)\n}", "function merge(arr1, arr2) {\n let results = []\n let i = 0\n let j = 0\n while (i < arr1.length && j < arr2.length) {\n if (arr2[j] > arr1[i]) {\n results.push(arr1[i])\n i++\n } else {\n results.push(arr2[j])\n j++\n }\n }\n while (i < arr1.length) {\n results.push(arr1[i])\n i++\n }\n while (j < arr2.length) {\n results.push(arr2[j])\n j++\n }\n return results\n}", "function merge(arr1, arr2) {\n let results = [];\n let i = 0;\n let j = 0;\n\n while (i < arr1.length && j < arr2.length) {\n if (arr1[i] < arr2[j]) {\n results.push(arr1[i]);\n i++;\n } else {\n results.push(arr2[j]);\n j++;\n }\n }\n while (i < arr1.length) {\n results.push(arr1[i]);\n i++;\n }\n while (j < arr2.length) {\n results.push(arr2[j]);\n j++;\n }\n return results;\n}", "function merger(arr1, arr2) {\n let i = 0, j = 0, mergedArr = [];\n while (i < arr1.length && j < arr2.length) {\n if (arr1[i] > arr2[j]) mergedArr.push(arr2[j++]);\n else mergedArr.push(arr1[i++]);\n }\n while (i < arr1.length) {\n mergedArr.push(arr1[i++]);\n }\n while (j < arr2.length) {\n mergedArr.push(arr2[j++]);\n }\n return mergedArr;\n}", "function merge(arr1,arr2, comparator){\n// take two arrays\nif(arr1.length<=0||arr2.length<=0){return console.warn('provide valid array')}\nlet resArr=[], i=0,j=0,end=true;\n\n\ncomparator= comparator!==undefined?comparator:baseCkeck\n//let resComp=comparator!==undefined?comparator(arr1[i],arr2[j]):baseCheck(arr1[i]>arr2[j])\nwhile(end){\n if(i>=arr1.length-1&&j>=arr2.length-1){\n end=false\n }\n if(comparator(arr1[i],arr2[j])<0){\n resArr.push(arr1[i])\n i++\n }\n else if(comparator(arr1[i],arr2[j])>0){\n resArr.push(arr2[j])\n j++\n }\n else if(comparator(arr1[i],arr2[j])===0){\n resArr.push(arr1[i])\n resArr.push(arr2[j])\n i++\n j++\n }\n //end condition\n if(i===arr1.length){\n for(j;j<arr2.length;j++){\n resArr.push(arr2[j])\n end=false\n }\n }else if(j===arr2.length){\n for(i;i<arr1.length;i++){\n resArr.push(arr1[i])\n }\n end=false\n }\n}\nreturn resArr\n}", "function mergeDeep(dest) {\n var src = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n src[_i - 1] = arguments[_i];\n }\n for (var _a = 0, src_1 = src; _a < src_1.length; _a++) {\n var s = src_1[_a];\n dest = deepMerge_(dest, s);\n }\n return dest;\n }", "function concatT(old_array, new_array) {\n if (old_array.length <= 0) {\n return new_array;\n }\n if (new_array.length <= 0) {\n return old_array;\n }\n if (old_array[old_array.length - 1][0] < new_array[0][0]) {\n return old_array.concat(new_array);\n }\n var i = bsearchT(new_array[0][0], old_array);\n if (i == null) {\n i = old_array.length - 1;\n while ((i > 0) && (old_array[i - 1][0] == new_array[0][0])) {\n i--;\n }\n }\n // clone the old array because we will be modifying it with splice()\n var merged_array = old_array.slice(0);\n for (var n = 0; n < new_array.length; n++) {\n while ((i < merged_array.length)\n && (merged_array[i][0] <= new_array[n][0])) {\n while (merged_array[i][0] == new_array[n][0]) {\n// consoleLog(\"skipping duplicate element \", i, n);\n n++;\n if (n >= new_array.length) {\n// consoleLog(\"returning early, duplicates\");\n return merged_array;\n }\n }\n i++;\n }\n if (i == merged_array.length) {\n// consoleLog(\"returning now\");\n while ((n < new_array.length)\n && (merged_array[i - 1][0] == new_array[n][0])) {\n n++;\n }\n if (n < new_array.length) {\n return merged_array.concat(new_array.slice(n));\n } else {\n return merged_array;\n }\n }\n// consoleLog(\"inserting element\", n, \"at\", i, \"(\", new_array[n], \")\");\n merged_array.splice(i, 0, new_array[n]);\n i++;\n }\n// consoleLog(\"returning merged array\");\n return merged_array;\n}", "function mergeTogether(left,right,orig){\n let i = 0; //increments the left array\n let j = 0; //increments the right array\n let k = 0; //increments the orig array\n //for the length of the sub arrays:\n while(i < left.length && j < right.length){\n // compare the same index number of the left array to the same index number of the right array. whichever is smaller overwrites the index in orig array.\n if(left[i] <= right[j]){\n orig[k] = left[i];\n i++;\n }\n else{\n orig[k] = right[j];\n j++;\n }\n k++;\n }\n //if one sub array exhausts its indexes before the other, the remaining values in the remaining array go onto the end of the orig array.\n while(i < left.length){\n orig[k] = left[i];\n i++;\n k++;\n }\n while(j < right.length){\n orig[k] = right[j];\n j++;\n k++;\n }\n return orig\n }", "function mergeSortedArray(arr1,arr2) {\n debugger;\n let array1 = new MyArray().fromArray(arr1);\n let array2 = new MyArray().fromArray(arr2);\n\n const type1 = array1.data[array1.length-1] - array1.data[array1.length-2] >0 ; // 递增\n const type2 = array2.data[array2.length-1] - array2.data[array2.length-2] >0 ; // 递减\n\n if(type1 == type2 && type1 ==false ){\n for(let i=0; i< array1.length; i++){ \n array2 = insertOneValueIntoSortedArray(array1.data[i],array2,false);\n }\n return array2;\n\n }else {\n if(type1){\n for(let i= array2.length -1; i >=0 ; i-- ){ \n array1 = insertOneValueIntoSortedArray(array2.data[i],array1,true);\n }\n return array1;\n }else {\n for(let i= array1.length -1; i >=0 ; i-- ){ \n array2 = insertOneValueIntoSortedArray(array1.data[i],array2,true);\n }\n return array2;\n }\n \n }\n\n\n}", "function merge() {\n\t\t/* Support cycles */\n\t\tvar seen = [];\n\t\tvar merged = [];\n\n\t\tfunction _merge() {\n\t\t\tvar objectsStart = 0;\n\t\t\tvar deep = false;\n\t\t\tif (typeof arguments[0] === \"boolean\") {\n\t\t\t\tdeep = arguments[0];\n\t\t\t\tobjectsStart++;\n\t\t\t}\n\t\t\tvar target = arguments[objectsStart];\n\t\t\tif (typeof target !== \"object\" && typeof target !== \"function\") {\n\t\t\t\tthrow exception(\"Target object argument to merge is not appropriate: \" + typeof target);\n\t\t\t}\n\t\t\tif (target === null) {\n\t\t\t\tthrow exception(\"Target object argument to merge is not appropriate: \" + target);\n\t\t\t}\n\t\t\tfor (var i = objectsStart + 1; i < arguments.length; i++) {\n\t\t\t\tvar source = arguments[i];\n\t\t\t\tif (source === undefined) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (typeof source !== \"object\" && typeof source !== \"function\") {\n\t\t\t\t\tthrow exception(\"Argument \" + (i+1) + \" to merge is not appropriate: \" + typeof source);\n\t\t\t\t}\n\n\t\t\t\tseen.push(source);\n\t\t\t\tmerged.push(target);\n\n\t\t\t\tfor (var name in source) {\n\t\t\t\t\t/* Do not merge any key \"$\" */\n\t\t\t\t\tif (name === \"$\") {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar value = source[name];\n\t\t\t\t\tif (value !== undefined) {\n\t\t\t\t\t\tif (deep && typeof value === \"object\" && value !== null) {\n\t\t\t\t\t\t\tvar found = arrayIndexOf(seen, value);\n\t\t\t\t\t\t\tif (found === -1) {\n\t\t\t\t\t\t\t\tvar deepTarget = target[name];\n\t\t\t\t\t\t\t\tif (deepTarget === undefined) {\n\t\t\t\t\t\t\t\t\tdeepTarget = isArray(value) ? [] : {};\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tvalue = _merge(true, deepTarget, value);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tvalue = merged[found];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttarget[name] = value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn target;\n\t\t}\n\n\t\treturn _merge.apply(this, arguments);\n\t}", "function merge(left, right, array) {\n let leftIndex = 0;\n let rightIndex = 0;\n let outputIndex = 0;\n while (leftIndex < left.length && rightIndex < right.length) {\n if (left[leftIndex] < right[rightIndex]) {\n array[outputIndex++] = left[leftIndex++];\n }\n else {\n array[outputIndex++] = right[rightIndex++];\n }\n }\n\n for (let i = leftIndex; i < left.length; i++) {\n array[outputIndex++] = left[i];\n }\n\n for (let i = rightIndex; i < right.length; i++) {\n array[outputIndex++] = right[i];\n }\n return array;\n}", "function mergeSort(array) { // divides the array into a subset of arrays with 1 el each, then calls merge\n if (array.length <= 1) {\n return array;\n }\n\n const middle = Math.floor(array.length / 2);\n let left = array.slice(0, middle);\n let right = array.slice(middle, array.length);\n \n left = mergeSort(left);\n right = mergeSort(right);\n return merge(left, right, array);\n}", "function merge2dArrays(arrFrom, arrTo, numIdColTo, fieldTypes, columns)\n{\n\n // get the row of IDs from\n var idsFrom = {}; \n for (var i = 0, l = arrFrom.length; i < l; i++)\n {\n idsFrom[arrFrom[i][numIdColTo - 1]] = i; \n }\n \n var result = [];\n \n // loop arrTo row by row\n var id = -1;\n var row = [];\n var numRowFrom = -1;\n var cols = arrTo[0].length;\n var rowResult = [];\n var rowFrom = [];\n var fieldType;\n for (var numRow = 0, rows = arrTo.length; numRow < rows; numRow++)\n {\n row = arrTo[numRow]; \n//if (numRow < 2) Logger.log(row);\n id = row[numIdColTo - 1];\n numRowFrom = idsFrom[id];\n rowResult = [];\n var numColFrom = -1;\n // loop columns\n var numCol;\n for (numCol = 0; numCol < cols; numCol++)\n {\n fieldType = fieldTypes[numCol];\n if (fieldType == 2 || fieldType == -1)\n {\n // column with formuls or empty col\n rowResult.push(''); \n }\n else if (fieldType == 1)\n {\n // column with static data\n rowResult.push(row[numCol]); \n }\n else\n {\n rowResult.push('');\n // Logger.log('FieldId ' + fieldTypes[numCol] + ' = ' + fieldType);\n }\n }\n \n if (numRowFrom != undefined)\n {\n // id was found, loop columns again\n rowFrom = arrFrom[numRowFrom];\n for (numCol = 0; numCol < cols; numCol++)\n {\n numColFrom = columns[numCol];\n if (numColFrom > -1)\n {\n rowResult[numCol] = rowFrom[numCol];\n }\n }\n \n }\n \n result.push(rowResult);\n \n }\n \n return result;\n \n}", "function mergeArray(arr1, arr2) {\n mergedArray = []\n counter1 = 0\n counter2 = 0\n\n while (true) {\n if (counter1 == arr1.length) {\n for (i = counter2; i < arr2.length; i++) {\n mergedArray.push(arr2[i])\n }\n return mergedArray\n }\n if (counter2 == arr2.length) {\n for (i = counter1; i < arr1.length; i++) {\n mergedArray.push(arr1[i])\n }\n return mergedArray\n }\n \n if (arr1[counter1] < arr2[counter2]) {\n mergedArray.push(arr1[counter1])\n counter1++\n } else {\n mergedArray.push(arr2[counter2])\n counter2++\n }\n }\n}", "function merge(arr1,arr2){\n let results = [];\n let i = 0;\n let j = 0;\n // going to compare the values at these arrays \n\n while(i < arr1.length && j < arr2.length){\n if(arr1[i] < arr2[j]){\n results.push(arr1[i]);\n i++;\n }else{\n results.push(arr2[j]);\n j++;\n }\n }\n while(i < arr1.length){\n results.push(arr1[i]);\n i++;\n }\n while(j < arr2.length){\n results.push(arr2[j]);\n j++;\n }\n return results;\n\n}", "merge (left, right) {\n let resultArray = [], leftIndex = 0, rightIndex = 0;\n\n // We will concatenate values into the resultArray in order\n while (leftIndex < left.length && rightIndex < right.length) {\n if (left[leftIndex] < right[rightIndex]) {\n resultArray.push(left[leftIndex]);\n leftIndex++; // move left array cursor\n } else {\n resultArray.push(right[rightIndex]);\n rightIndex++; // move right array cursor\n }\n }\n\n // We need to concat here because there will be one element remaining\n // from either left OR the right\n return resultArray\n .concat(left.slice(leftIndex))\n .concat(right.slice(rightIndex));\n }", "function mergeSort(arr) {\n let result = [];\n ///base case\n if (arr.length === 1 || arr.length === 0) {\n return arr;\n }\n\n for (let i = 0; i < arr.length; i++) {\n let e = arr[i];\n\n if (Array.isArray(e)) {\n result = merge(result, e);\n } else {\n result.push(e);\n }\n console.log(result);\n }\n}", "function mergeSort(array) {\n\n}", "shallowMerge(other, overwrite = true, withAppend = false) {\n //shallow merge must be mutable so we have to remap\n let newThis = (0, AssocArray_1.shallowMerge)(overwrite, withAppend, this.value, other.value);\n if (Array.isArray(this._value)) {\n this._value.length = 0;\n this._value.push(...newThis);\n }\n else {\n Object.getOwnPropertyNames(this._value).forEach(key => delete this._value[key]);\n Object.getOwnPropertyNames(newThis).forEach(key => this._value[key] = newThis[key]);\n }\n }", "function mergeSort(arr) {\n\tif (arr.length <= 1) return arr;\n\n\tlet mid = Math.floor(arr.length / 2);\n\tlet left = mergeSort(arr.slice(0, mid));\n\tlet right = mergeSort(arr.slice(mid));\n\tconsole.log(left, right);\n\treturn merge(left, right);\n}", "function mergeSort(arr) {\n\n}", "function merge(arr1, arr2) {\n\n let results = [];\n\n let i = 0;\n let j = 0;\n\n while (i < arr1.length && j < arr2.length) {\n if (arr2[j] > arr1[i]) {\n results.push(arr1[i]);\n i++;\n } else {\n results.push(arr2[j]);\n j++;\n }\n }\n while (i < arr1.length) {\n results.push(arr1[i]);\n i++;\n }\n while (j < arr2.length) {\n results.push(arr2[j]);\n j++;\n }\n\n return results;\n}", "function merge(arr1, arr2) {\n let combined = [];\n let i = 0;\n let j = 0;\n while (i < arr1.length && j < arr2.length) {\n if (arr1[i] < arr2[j]) {\n combined.push(arr1[i]);\n i++;\n } else {\n combined.push(arr2[j]);\n j++;\n }\n }\n\n while (i < arr1.length) {\n combined.push(arr1[i]);\n }\n\n while (i < arr2.length) {\n combined.push(arr2[i]);\n }\n\n return combined;\n}", "function merge(arr1, arr2) {\n let results = [];\n let i = 0;\n let j = 0;\n while (i < arr1.length && j < arr2.length) {\n if (arr2[j] > arr1[i]) {\n results.push(arr1[i]);\n i++;\n } else {\n results.push(arr2[j])\n j++;\n }\n }\n while (i < arr1.length) {\n results.push(arr1[i])\n i++;\n }\n while (j < arr2.length) {\n results.push(arr2[j])\n j++;\n }\n return results;\n}", "function mergeSort (arr) {\n\tvar length = arr.length;\n//\tconsole.log(length);\n\n\tif (length == 1\t)\n\t\treturn arr;\n\t\n\tvar l1 = arr.slice(0,length/2);\n\tvar l2 = arr.slice(length/2,length);\n\tconsole.log(l1);\n\tconsole.log(l2);\n\tvar mergeResult = merge(mergeSort(l1), mergeSort(l2));\n\tshowLog(\"mergeResult=\", mergeResult);\n\treturn mergeResult;\n\t\n//\tshowLog(\"before merge\");\n//\tshowLog(\"l1=\", l1);\n//\tshowLog(\"l2=\", l2);\n//\treturn merge(l1,l2);\n//\t\n}", "function merge(arr1, arr2){\n let output = [];\n let i = 0;\n let j = 0;\n while(i < arr1.length && j < arr2.length){\n if(arr1[i] < arr2[j]){\n output.push(arr1[i]);\n i++;\n }else{\n output.push(arr2[j]);\n j++;\n }\n }\n while(i < arr1.length){\n output.push(arr1[i]);\n i++;\n }\n while(j < arr2.length){\n output.push(arr2[j]);\n j++;\n }\n return output;\n}", "function merge(arr1, arr2) {\n let results = [];\n let i = 0;\n let j = 0;\n while (i < arr1.length && j < arr2.length) {\n if (arr2[j] > arr1[i]) {\n results.push(arr1[i]);\n i++;\n } else {\n results.push(arr2[j])\n j++;\n }\n }\n\n while (i < arr1.length) {\n results.push(arr1[i])\n i++;\n }\n\n while (j < arr2.length) {\n results.push(arr2[j])\n j++;\n }\n\n return results;\n}", "function merge(arr1, arr2) {\n let emptyArr = [];\n let pointer1 = 0;\n let pointer2 = 0;\n while (emptyArr.length < arr1.length + arr2.length) {\n if (pointer1 === arr1.length) {\n emptyArr.push(arr2[pointer2]);\n pointer2++;\n } else if (pointer2 === arr2.length) {\n emptyArr.push(arr1[pointer1]);\n pointer1++;\n }\n if (arr1[pointer1] < arr2[pointer2]) {\n emptyArr.push(arr1[pointer1]);\n pointer1++;\n } else if (arr1[pointer1] > arr2[pointer2]) {\n emptyArr.push(arr2[pointer2]);\n pointer2++;\n }\n }\n return emptyArr;\n}", "function mergeArray(start, end) {\r\n\tlet mid = parseInt((start + end) >> 1);\r\n\tlet start1 = start, start2 = mid + 1\r\n\tlet end1 = mid, end2 = end\r\n\t\r\n\t// Initial index of merged subarray\r\n\tlet index = start\r\n\r\n\twhile (start1 <= end1 && start2 <= end2) {\r\n\t\tif (arr[start1] <= arr[start2]) {\r\n\t\t\titmd[index] = arr[start1]\r\n\t\t\tindex = index + 1\r\n\t\t\tstart1 = start1 + 1;\r\n\t\t}\r\n\t\telse if(arr[start1] > arr[start2]) {\r\n\t\t\titmd[index] = arr[start2]\r\n\t\t\tindex = index + 1\r\n\t\t\tstart2 = start2 + 1;\r\n\t\t}\r\n\t}\r\n\r\n\t// Copy the remaining elements of\r\n\t// arr[], if there are any\r\n\twhile (start1 <= end1) {\r\n\t\titmd[index] = arr[start1]\r\n\t\tindex = index + 1\r\n\t\tstart1 = start1 + 1;\r\n\t}\r\n\r\n\twhile (start2 <= end2) {\r\n\t\titmd[index] = arr[start2]\r\n\t\tindex = index + 1\r\n\t\tstart2 = start2 + 1;\r\n\t}\r\n\r\n\tindex = start\r\n\twhile (index <= end) {\r\n\t\tarr[index] = itmd[index];\r\n\t\tindex++;\r\n\t}\r\n}", "function merge(left, right, array){\n if (left.length == 0 && right.length == 0) {\n return array;\n } else if (left.length == 0) {\n return array.concat(right);\n } else if (right.length == 0) {\n return array.concat(left);\n } else if (left[0] < right[0]) {\n array.push(left.shift());\n } else if (left[0] > right[0]) {\n array.push(right.shift());\n } else {\n array.push(left.shift());\n right.shift();\n }\n return merge(left, right, array);\n}", "function merge(arr1, arr2) {\n let results = [];\n let i = 0;\n let j = 0;\n\n while (i < arr1.length && j < arr2.length) {\n if (arr2[j] > arr1[i]) {\n results.push(arr1[i]);\n i++;\n } else {\n results.push(arr2[j]);\n j++;\n }\n }\n\n while (i < arr1.length) {\n results.push(arr1[i]);\n i++;\n }\n while (j < arr2.length) {\n results.push(arr2[j]);\n j++;\n }\n\n return results;\n}", "function mergeSort(arr) {\n let length = arr.length;\n if (length === 1) return;\n\n let mid = length / 2;\n let left = arr.slice(0, mid);\n let right = arr.slice(mid, length);\n\n mergeSort(left);\n mergeSort(right);\n merge(arr, left, right);\n}", "function executeDeepMerge(target) {\n\tvar _objects = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n\tvar _options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n\tvar options = {\n\t\tarrayBehaviour: _options.arrayBehaviour || 'replace' // Can be \"merge\" or \"replace\".\n\t};\n\n\t// Ensure we have actual objects for each.\n\tvar objects = _objects.map(function (object) {\n\t\treturn object || {};\n\t});\n\tvar output = target || {};\n\n\t// Enumerate the objects and their keys.\n\tfor (var oindex = 0; oindex < objects.length; oindex++) {\n\t\tvar object = objects[oindex];\n\t\tvar keys = Object.keys(object);\n\n\t\tfor (var kindex = 0; kindex < keys.length; kindex++) {\n\t\t\tvar key = keys[kindex];\n\t\t\tvar value = object[key];\n\t\t\tvar type = getTypeOf(value);\n\t\t\tvar existingValueType = getTypeOf(output[key]);\n\n\t\t\tif (type === 'object') {\n\t\t\t\tif (existingValueType !== 'undefined') {\n\t\t\t\t\tvar existingValue = existingValueType === 'object' ? output[key] : {};\n\t\t\t\t\toutput[key] = executeDeepMerge({}, [existingValue, quickCloneObject(value)], options);\n\t\t\t\t} else {\n\t\t\t\t\toutput[key] = quickCloneObject(value);\n\t\t\t\t}\n\t\t\t} else if (type === 'array') {\n\t\t\t\tif (existingValueType === 'array') {\n\t\t\t\t\tvar newValue = quickCloneArray(value);\n\t\t\t\t\toutput[key] = options.arrayBehaviour === 'merge' ? output[key].concat(newValue) : newValue;\n\t\t\t\t} else {\n\t\t\t\t\toutput[key] = quickCloneArray(value);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput[key] = value;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn output;\n}", "function merge(arr1, arr2) {\n let arr1copy = arr1.slice();\n let arr2copy = arr2.slice();\n let results = [];\n\n while (arr1copy.length > 0 && arr2copy.length > 0) {\n results.push(copy1[0] <= copy2[0] ? copy1.shift() : copy2.shift());\n }\n\n console.log(result.concat(copy1.length === 0 ? copy2 : copy1));\n}", "function merge(a, b) {\n const combinedLen = a.length + b.length\n const merged = []\n let idxA = 0\n let idxB = 0\n\n while (merged.length < combinedLen) {\n if (idxB === b.length || a[idxA] < b[idxB]) {\n merged.push(a[idxA++]) // eslint-disable-line\n } else {\n merged.push(b[idxB++]) // eslint-disable-line\n }\n }\n return merged\n}", "function merge(left, right) {\n if (left[0] < right[0]) {\n mergeArr.push(left[0])\n left.shift()\n }else {\n mergeArr.push(right[0])\n right.shift()\n }\n}", "function mergeDeep(dest) {\n var src = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n src[_i - 1] = arguments[_i];\n }\n for (var _a = 0, src_1 = src; _a < src_1.length; _a++) {\n var s = src_1[_a];\n dest = deepMerge_(dest, s);\n }\n return dest;\n}", "function mergeSortedArray(a, b){\n /////// empty array to push the sorted arrays into\n var merged = [];\n /////// starting at the [0] index of the existing first array\n var aElement = a[0];\n /////// starting at the [0] index of the existing second array\n var bElement = b[0];\n /////// for iterating to the next index of the existing arrays\n var i = 1;\n var j = 1;\n /////// While it is either a or b\n while(aElement || bElement) {\n /////// (if this a number and not b number) or (a number is less than b number)\n if((aElement && !bElement) || aElement < bElement) {\n //////// push a number into the merged array\n merged.push(aElement);\n //////// then iterate to the next number in a\n aElement = a[i++];\n } else {\n ////// else push the b number\n merged.push(bElement);\n //// then iterate to the next number in b\n bElement = b[j++];\n }\n }\n return merged; //// returns the new merged number\n}", "function mergeArray(left, right) {\n var sortedArr = [];\n //current left and right index being compared\n var leftInd = 0;\n var rightInd = 0;\n while (leftInd < left.length || rightInd < right.length) {\n if (rightInd === right.length || left[leftInd] <= right[rightInd]) {\n sortedArr.push(left[leftInd]);\n ++leftInd;\n } else {\n sortedArr.push(right[rightInd]);\n ++rightInd;\n }\n }\n processText += '<br /> step '+(processCount++)+' - Merge / left : right => [ '+left.toString() +'] : [ '+ right.toString()+' ] / merge sorted : ' + sortedArr.toString() + '<br />';\n return sortedArr;\n}" ]
[ "0.6493913", "0.64938843", "0.64637727", "0.6422636", "0.63669133", "0.6352357", "0.633785", "0.63314736", "0.6298962", "0.62649876", "0.622593", "0.622237", "0.6176762", "0.6166889", "0.614755", "0.6132026", "0.61226326", "0.6093744", "0.60814524", "0.60814524", "0.60814524", "0.60794747", "0.60794747", "0.60794747", "0.60794747", "0.60794747", "0.60794747", "0.60794747", "0.60794747", "0.60794747", "0.60794747", "0.60794747", "0.60794747", "0.60794747", "0.60794747", "0.60794747", "0.60794747", "0.60794747", "0.60794747", "0.60794747", "0.60794747", "0.60794747", "0.60794747", "0.60794747", "0.60794747", "0.60794747", "0.60794747", "0.60794747", "0.60794747", "0.60794747", "0.60794747", "0.60261554", "0.602153", "0.6005348", "0.5989573", "0.59806377", "0.595755", "0.5944442", "0.59302497", "0.5923472", "0.5919571", "0.5918465", "0.5911816", "0.58993345", "0.58967066", "0.58959526", "0.58935964", "0.58926755", "0.5892007", "0.58866554", "0.58710945", "0.58690685", "0.5868335", "0.5867494", "0.586707", "0.58657646", "0.58653086", "0.5855957", "0.58521545", "0.5851378", "0.5844386", "0.58418053", "0.5825542", "0.5823978", "0.58126515", "0.58105344", "0.5801153", "0.58007336", "0.57925856", "0.57888275", "0.5783139", "0.5781186", "0.577913", "0.5772031", "0.5770848", "0.577057", "0.5770309", "0.57566375", "0.57561433", "0.5749576" ]
0.6866639
0
Return multi select values based on an array of options
function getSelectedValues(options){return Array.from(options).filter(function(el){return el.selected;}).map(function(el){return el.value;});}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSelectedValues(options) {\n return Array.from(options).filter(function (el) {\n return el.selected;\n }).map(function (el) {\n return el.value;\n });\n}", "function getSelectedValues(options) {\n return Array.from(options).filter(function (el) {\n return el.selected;\n }).map(function (el) {\n return el.value;\n });\n}", "function getSelectedValues(options) {\n return Array.from(options).filter(function (el) {\n return el.selected;\n }).map(function (el) {\n return el.value;\n });\n}", "function getSelectedValues(options) {\n return Array.from(options).filter(function (el) {\n return el.selected;\n }).map(function (el) {\n return el.value;\n });\n}", "function getSelectedValues(options) {\n return Array.from(options).filter(function (el) {\n return el.selected;\n }).map(function (el) {\n return el.value;\n });\n}", "function getSelectedValues(options) {\n return Array.from(options).filter(function (el) {\n return el.selected;\n }).map(function (el) {\n return el.value;\n });\n}", "function getSelectValues (select, selectedOptions) {\r\n var value = [],\r\n options = selectedOptions || select.selectedOptions,\r\n opt;\r\n\r\n for (var i = 0, len = options.length; i < len; i++) {\r\n opt = options[i];\r\n\r\n if (!(opt.disabled || opt.parentNode.tagName === 'OPTGROUP' && opt.parentNode.disabled)) {\r\n value.push(opt.value || opt.text);\r\n }\r\n }\r\n\r\n if (!select.multiple) {\r\n return !value.length ? null : value[0];\r\n }\r\n\r\n return value;\r\n }", "function getSelectValues (select, selectedOptions) {\r\n var value = [],\r\n options = selectedOptions || select.selectedOptions,\r\n opt;\r\n\r\n for (var i = 0, len = options.length; i < len; i++) {\r\n opt = options[i];\r\n\r\n if (!(opt.disabled || opt.parentNode.tagName === 'OPTGROUP' && opt.parentNode.disabled)) {\r\n value.push(opt.value || opt.text);\r\n }\r\n }\r\n\r\n if (!select.multiple) {\r\n return !value.length ? null : value[0];\r\n }\r\n\r\n return value;\r\n }", "_getSelectedOptionValues() {\n return this.options.filter(option => option.selected).map(option => option.value);\n }", "_getSelectedOptionValues() {\n return this.options.filter(option => option.selected).map(option => option.value);\n }", "function getSelectValues (select, selectedOptions) {\n var value = [],\n options = selectedOptions || select.selectedOptions,\n opt;\n\n for (var i = 0, len = options.length; i < len; i++) {\n opt = options[i];\n\n if (!(opt.disabled || opt.parentNode.tagName === 'OPTGROUP' && opt.parentNode.disabled)) {\n value.push(opt.value);\n }\n }\n\n if (!select.multiple) {\n return !value.length ? null : value[0];\n }\n\n return value;\n }", "function getSelectValues (select, selectedOptions) {\n var value = [],\n options = selectedOptions || select.selectedOptions,\n opt;\n\n for (var i = 0, len = options.length; i < len; i++) {\n opt = options[i];\n\n if (!(opt.disabled || opt.parentNode.tagName === 'OPTGROUP' && opt.parentNode.disabled)) {\n value.push(opt.value || opt.text);\n }\n }\n\n if (!select.multiple) {\n return !value.length ? null : value[0];\n }\n\n return value;\n }", "function getSelectValues (select) {\r\n var result = [];\r\n var options = select && select.options;\r\n var opt;\r\n\r\n if (select.multiple) {\r\n for (var i = 0, len = options.length; i < len; i++) {\r\n opt = options[i];\r\n\r\n if (opt.selected) {\r\n result.push(opt.value || opt.text);\r\n }\r\n }\r\n } else {\r\n result = select.value;\r\n }\r\n\r\n return result;\r\n }", "function getSelectValues (select) {\n var result = [];\n var options = select.selectedOptions;\n var opt;\n\n if (select.multiple) {\n for (var i = 0, len = options.length; i < len; i++) {\n opt = options[i];\n\n result.push(opt.value || opt.text);\n }\n } else {\n result = select.value;\n }\n\n return result;\n }", "function getSelectValues(select) {\n var result = [];\n var options = select && select.options;\n var opt;\n\n if (select.multiple) {\n for (var i = 0, len = options.length; i < len; i++) {\n opt = options[i];\n\n if (opt.selected) {\n result.push(opt.value || opt.text);\n }\n }\n } else {\n result = select.value;\n }\n\n return result;\n }", "function getSelectValues(select) {\n var result = [];\n var options = select && select.options;\n var opt;\n\n if (select.multiple) {\n for (var i = 0, len = options.length; i < len; i++) {\n opt = options[i];\n\n if (opt.selected) {\n result.push(opt.value || opt.text);\n }\n }\n } else {\n result = select.value;\n }\n\n return result;\n }", "function getSelectValues(select) {\n var result = [];\n var options = select && select.options;\n var opt;\n\n if (select.multiple) {\n for (var i = 0, len = options.length; i < len; i++) {\n opt = options[i];\n\n if (opt.selected) {\n result.push(opt.value || opt.text);\n }\n }\n } else {\n result = select.value;\n }\n\n return result;\n }", "function getSelectedOptionsValues(select) {\r\n\ttoBeReturned = [];\r\n\tfor (var i = 0; i < select.options.length; i++) {\r\n\t\tif (select.options[i].selected) {\r\n\t\t\ttoBeReturned.push(select.options[i].value);\r\n\t\t}\r\n\t}\r\n\tconsole.log(toBeReturned);\r\n\treturn toBeReturned;\r\n}", "function a(e){var t,a=[],n=e&&e.options;if(e.multiple)for(var r=0,f=n.length;r<f;r++)t=n[r],t.selected&&a.push(t.value||t.text);else a=e.value;return a}", "function getSelectValues(select) {\n\t\t\t var result = [];\n\t\t\t var options = select && select.options;\n\t\t\t var opt;\n\n\t\t\t for (var i=0, iLen=options.length; i<iLen; i++) {\n\t\t\t\topt = options[i];\n\n\t\t\t\tif (opt.selected) {\n\t\t\t\t result.push(opt.value || opt.text);\n\t\t\t\t}\n\t\t\t }\n\t\t\t return result;\n\t\t\t}", "function getSelectValues(select) {\n var result = [];\n var options = select && select.options;\n var opt;\n\n for (var i=0, iLen=options.length; i<iLen; i++) {\n opt = options[i];\n\n if (opt.selected) {\n result.push(opt.value || opt.text);\n }\n }\n return result;\n}", "function getSelectValues(select) {\n var result = [];\n var options = select && select.options;\n var opt;\n\n for (var i=0, iLen=options.length; i<iLen; i++) {\n opt = options[i];\n\n if (opt.selected) {\n result.push(opt.text);\n }\n }\n return result;\n}", "function mselectToArray(getid ){\n var objects = document.getElementById(getid);\n var values = [];\n for (var i = 0; i < objects.options.length; i++) {\n if (objects.options[i].selected) {\n values.push(objects.options[i].value);\n }\n }\n return values;\n }", "function generateOptionElements(arr, targetMultiSelect) {\n for (var i = 0; i < arr.length; i++) {\n var option = document.createElement('OPTION');\n var text = document.createTextNode(arr[i]);\n option.appendChild(text);\n $(targetMultiSelect).append(option);\n }\n}", "get selectedValues() {\n return this.value.join(', ');\n }", "function getSelectValues(select) {\n var result = [];\n var options = select.options;\n var option;\n\n for (i = 0; i < options.length; i++) {\n option = options[i];\n if (option.selected) {\n result.push(option.value);\n }\n }\n return result;\n }", "function generateOptionElements(arr, targetMultiSelect) {\n for (var i = 0; i < arr.length; i++) {\n var option = document.createElement('OPTION');\n var text = document.createTextNode(arr[i]);\n option.appendChild(text);\n $(targetMultiSelect).append(option);\n }\n }", "function RetrieveDropDownMultiValue(id) {\n debugger;\n var values = [];\n var dropdownMultiSelect = document.getElementById(id);\n if (dropdownMultiSelect && dropdownMultiSelect.value !== undefined) {\n if (dropdownMultiSelect.getAttribute('multiple') !== undefined && dropdownMultiSelect.hasChildNodes != undefined) {\n var dropdownMultiOptions = dropdownMultiSelect.childNodes;\n if (dropdownMultiOptions && dropdownMultiOptions.length > 0) {\n for (let idx = 0; idx < dropdownMultiOptions.length; idx++) {\n // We need to search for which option was selected in the dropdown\n // by looking at the value from https://www.w3schools.com/jsref/prop_select_value.asp\n if (dropdownMultiOptions[idx].selected) {\n values.push(dropdownMultiOptions[idx].value);\n }\n }\n }\n }\n else {\n values = dropdownSingleSelect.value;\n }\n }\n else {\n console.log(\"Could not find drop down with id '\" + id + \"'\");\n }\n return values;\n}", "getValues() {\n if (this.$filterElm && typeof this.$filterElm.multipleSelect === 'function') {\n return this.$filterElm.multipleSelect('getSelects');\n }\n return [];\n }", "async select(...values) {\n for (const value of values)\n assert(helper.isString(value), 'Values must be strings. Found value \"' +\n value +\n '\" of type \"' +\n typeof value +\n '\"');\n return this.evaluate((element, values) => {\n if (!(element instanceof HTMLSelectElement))\n throw new Error('Element is not a <select> element.');\n const options = Array.from(element.options);\n element.value = undefined;\n for (const option of options) {\n option.selected = values.includes(option.value);\n if (option.selected && !element.multiple)\n break;\n }\n element.dispatchEvent(new Event('input', { bubbles: true }));\n element.dispatchEvent(new Event('change', { bubbles: true }));\n return options\n .filter((option) => option.selected)\n .map((option) => option.value);\n }, values);\n }", "function fetchDropDownListSelectedValues(id){ \n var selectedValues = \"\"; \n var obj = document.getElementById(''+id);\n for (var i = 0; i < obj.options.length; i++){\n if (obj.options[ i ].selected){ \n if(i==0){\n selectedValues = obj.options[ i ].value;\n }else{\n selectedValues += ','+obj.options[ i ].value;\n }\n }\n } \n return selectedValues;\n}", "getFilteredOptionsValues() {\n const filteredValues = [];\n this.filteredOptions.forEach(option => {\n filteredValues.push(option.value);\n });\n return filteredValues;\n }", "function getSelectValuesVSMS3(){ \n let array = Array.from(document.querySelectorAll('select[id=\"vsms-3\"] > optgroup'));\n for(var l=0; l< array.length;l++){ \n writeToMemory(\"\\t\\t\\t\"+array[l].label);\n let values3 = Array.from( array[l].children);\n let ValArray = values3.map(e =>e.text); \n let arr = [... new Set(values3.filter((e,index) => e && ValArray.indexOf(e.text) == index))] \n for(var k=0; k< arr.length;k++){ \n writeToMemory(\"\\t\\t\\t\\t\"+arr[k].text); \n }\n } \n }", "get value()\n {\n const list = [];\n for (let item of this.falldown)\n {\n if (item.selected)\n {\n list.push(item.value);\n }\n }\n if (this.options.multiple)\n {\n return list\n }\n else\n {\n return list[0]\n }\n }", "async select(...values) {\n for (const value of values) {\n (0, assert_js_1.assert)((0, util_js_1.isString)(value), 'Values must be strings. Found value \"' +\n value +\n '\" of type \"' +\n typeof value +\n '\"');\n }\n return this.evaluate((element, vals) => {\n const values = new Set(vals);\n if (!(element instanceof HTMLSelectElement)) {\n throw new Error('Element is not a <select> element.');\n }\n const selectedValues = new Set();\n if (!element.multiple) {\n for (const option of element.options) {\n option.selected = false;\n }\n for (const option of element.options) {\n if (values.has(option.value)) {\n option.selected = true;\n selectedValues.add(option.value);\n break;\n }\n }\n }\n else {\n for (const option of element.options) {\n option.selected = values.has(option.value);\n if (option.selected) {\n selectedValues.add(option.value);\n }\n }\n }\n element.dispatchEvent(new Event('input', { bubbles: true }));\n element.dispatchEvent(new Event('change', { bubbles: true }));\n return [...selectedValues.values()];\n }, values);\n }", "function selectedAllOption(mixSelect, booSelected)\n{\n var select = getObject(mixSelect);\n if (empty(select))\n return false;\n if (!isBoolean(booSelected))\n booSelected = true;\n var arrOption = select.getElementsByTagName('OPTION');\n for (var intCount = 0; intCount < arrOption.length; ++intCount) {\n var option = arrOption[intCount];\n option.selected = booSelected;\n }\n return arrOption;\n}", "function GetMultiSelectIDs(menu) {\n\tvar i, IDs = [];\n\tfor (i = 0; i < menu.options.length; i++) {\n\t\tif (menu.options[i].selected) {\n\t\t\tIDs.push(menu.options[i].value);\n\t\t}\n\t}\n\n\treturn IDs;\n}", "async select(...values) {\n for (const value of values)\n assert_js_1.assert(helper_js_1.helper.isString(value), 'Values must be strings. Found value \"' +\n value +\n '\" of type \"' +\n typeof value +\n '\"');\n return this.evaluate((element, values) => {\n if (element.nodeName.toLowerCase() !== 'select')\n throw new Error('Element is not a <select> element.');\n const options = Array.from(element.options);\n element.value = undefined;\n for (const option of options) {\n option.selected = values.includes(option.value);\n if (option.selected && !element.multiple)\n break;\n }\n element.dispatchEvent(new Event('input', { bubbles: true }));\n element.dispatchEvent(new Event('change', { bubbles: true }));\n return options\n .filter((option) => option.selected)\n .map((option) => option.value);\n }, values);\n }", "async select(...values) {\n for (const value of values)\n assert_js_1.assert(helper_js_1.helper.isString(value), 'Values must be strings. Found value \"' +\n value +\n '\" of type \"' +\n typeof value +\n '\"');\n return this.evaluate((element, values) => {\n if (element.nodeName.toLowerCase() !== 'select')\n throw new Error('Element is not a <select> element.');\n const options = Array.from(element.options);\n element.value = undefined;\n for (const option of options) {\n option.selected = values.includes(option.value);\n if (option.selected && !element.multiple)\n break;\n }\n element.dispatchEvent(new Event('input', { bubbles: true }));\n element.dispatchEvent(new Event('change', { bubbles: true }));\n return options\n .filter((option) => option.selected)\n .map((option) => option.value);\n }, values);\n }", "function chosen_selected_values(chosen_select_id)\n{\n var chosen_select = $(`#${chosen_select_id}`);\n var values_by_dataindex = [];\n\n // Support for option groups.\n $(`#${chosen_select_id} > optgroup`).each(function () {\n values_by_dataindex.push(\"\");\n $(this).find(\"option\").each(function () { values_by_dataindex.push($(this).val()); });\n });\n // Support for single options.\n $(`#${chosen_select_id} > option`).each(function() {values_by_dataindex.push($(this).val());});\n\n // Get ordered selected options.\n var ordered_selected_values = [];\n $(`#${chosen_select_id}_chosen .search-choice a`).each(function (element) {\n ordered_selected_values.push(values_by_dataindex[$(this).attr(\"data-option-array-index\")]);\n });\n\n return ordered_selected_values;\n}", "function getSelectOptions(options) {\n let optionsHtml = \"<option value='All'>All</option>\";\n for (const option of options) {\n optionsHtml += \"<option value='\" + option[0] + \"'>\" + option[1] + \"</option>\";\n }\n return optionsHtml;\n}", "_setAllOptionsSelected(isSelected, skipDisabled, isUserInput) {\n // Keep track of whether anything changed, because we only want to\n // emit the changed event when something actually changed.\n const changedOptions = [];\n this.options.forEach(option => {\n if ((!skipDisabled || !option.disabled) && option._setSelected(isSelected)) {\n changedOptions.push(option);\n }\n });\n if (changedOptions.length) {\n this._reportValueChange();\n if (isUserInput) {\n this._emitChangeEvent(changedOptions);\n }\n }\n return changedOptions;\n }", "function populate_select_arr(sel_id, arr) {\n jQuery.each(arr, function(idx, val) {\n\t$(sel_id).append($('<option>', {\n\t value: arr[idx], text: val\n\t}));\n });\n}", "function getSelectedOptions(sel) {\n var opts = [];\n var opt;\n if (sel instanceof HTMLSelectElement) {\n // loop through options in select list\n for (var i = 0, len = sel.options.length; i < len; i++) {\n opt = sel.options[i];\n // check if selected\n if (opt.selected) {\n // add to array of option elements to return from this function\n opts.push(opt);\n }\n }\n }\n else if (sel instanceof HTMLInputElement) {\n if (sel.checked) {\n return sel.value;\n }\n else {\n return false;\n }\n }\n else {\n return sel\n .Where(function (i) { return i.checked; })\n .Select(function (i) { return i.value; })\n .ToArray(false);\n }\n return opts;\n }", "function decodeMultSelection(domId) {\r\n var str = \"\";\r\n //if ($(domId).prop('options') && $(domId).prop('selectedOptions') && $(domId).prop('options').length === $(domId).prop('selectedOptions').length) {\r\n // str = \"ALL\";\r\n //} else if ($(domId).val() !== null) {\r\n $.each($(domId).val(), function(i,item) {\r\n str += (i>0) ? \".\" : \"\";\r\n str += item;\r\n });\r\n //}\r\n return str;\r\n}", "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 getInsightsOptions() {\n return $('#insightsOptions').multipleSelect('getSelects', 'value');\n}", "function populateItems(arr, targetMultiSelect) {\n arr.sort();\n generateOptionElements(arr, targetMultiSelect);\n }", "function populateItems(arr, targetMultiSelect) {\n arr.sort();\n generateOptionElements(arr, targetMultiSelect);\n }", "function populateItems(arr, targetMultiSelect) {\n arr.sort();\n generateOptionElements(arr, targetMultiSelect);\n }", "function getSelectedValueArray(eid) {\n var selectedValues = new Array();\n var selectBox = document.getElementById(eid);\n var count = 0;\n for (var i = 0; i < selectBox.options.length; i++) {\n if (selectBox.options[i].selected) {\n selectedValues[count] = selectBox.options[i].value;\n count++;\n }\n }\n return selectedValues;\n}", "function getSelectedOptions(item) {\n var selectedOptions = null;\n if (item.variant && item.variant.length > 0) {\n var options = item.variant;\n selectedOptions = [];\n for (var j = 0; j < options.length; j++) {\n selectedOptions.push({'optionName': options[j].optionName, 'optionValue': options[j].optionValue});\n }\n }\n return selectedOptions;\n }", "function multiSelectList_submit(baseName)\n{\n\n var hidden = document.getElementById(baseName + 'hidden');\n\n var selectedList = document.getElementById(baseName + 'selected');\n \n var values = new Array();\n for (var i=0;i<selectedList.options.length;i++)\n values.push(selectedList.options[i].value);\n \n hidden.value = values.join(',');\n\n}", "function get_selected(selObject){\n var arSelected = new Array(); \n \n for (i=0;i<selObject.options.length;i++){\n if (selObject.options[i].selected==true){\n arSelected.push('\\''+selObject.options[i].value+'\\'');\n };\n }\n onts=arSelected.join(',');\n return onts\n \n}", "function selectMultiSelectList()\n { \n //cs-csi lists\n obj_selCSNAMEHidden.length = 0; //load the clean list\n obj_selCSCSIHidden.length = 0;\n obj_selACCSIHidden.length = 0;\n for (var i=0; i<obj_selectedCS.length; i++) //selected cs ids\n {\n obj_selectedCS[i].selected = true;\n var csName = obj_selectedCS[i].text;\n obj_selCSNAMEHidden[i] = new Option(csName, csName);\n obj_selCSNAMEHidden[i].selected = true;\n }\n for (var idx=0; idx<selACCSIArray.length; idx++) \n { \n //selected cs-csi ids\n obj_selCSCSIHidden[idx] = new Option(selACCSIArray[idx][4], selACCSIArray[idx][4]);\n obj_selCSCSIHidden[idx].selected = true;\n //selected ac-csi ids\n obj_selACCSIHidden[idx] = new Option(selACCSIArray[idx][5], selACCSIArray[idx][5]);\n obj_selACCSIHidden[idx].selected = true;\n //selected ac ids stored in here for edit\n obj_selACHidden[idx] = new Option(selACCSIArray[idx][6], selACCSIArray[idx][6]);\n obj_selACHidden[idx].selected = true;\n }\n // alert(obj_selectedCS.length + \" cscsi \" + selACCSIArray.length);\n }", "function customizeMultiSelect(){\n /* IE doesn't support event handling on option tag, hence conveted option click event to select onchange event*/\n $('body').on('change','.customize_multiselect', function(){\n var select = $(this);\n var sel_val = $(this).val();\n var sel_opt = '';\n $(select).find(\"option\").each(function () {\n if($(this).val() == sel_val){\n sel_opt = $(this);\n return;\n }\n });\n if ($(sel_opt).attr(\"class\") == undefined || $(sel_opt).attr(\"class\").length == 0 || $(sel_opt).hasClass(\"unclicked\")){\n $(sel_opt).removeClass('unclicked');\n $(sel_opt).addClass('clicked');\n } else {\n $(sel_opt).removeClass('clicked')\n $(sel_opt).addClass('unclicked');\n $(sel_opt).removeAttr(\"selected\");\n }\n $(select).find(\"option.clicked\").attr(\"selected\",\"selected\");\n $(select).find(\"option.unclicked\").removeAttr(\"selected\");\n });\n}", "_setOptionsFromValues(values) {\n this.options.forEach(option => option._setSelected(false));\n values.forEach(value => {\n const correspondingOption = this.options.find(option => {\n // Skip options that are already in the model. This allows us to handle cases\n // where the same primitive value is selected multiple times.\n return option.selected ? false : this.compareWith(option.value, value);\n });\n if (correspondingOption) {\n correspondingOption._setSelected(true);\n }\n });\n }", "_setOptionsFromValues(values) {\n this.options.forEach(option => option._setSelected(false));\n values.forEach(value => {\n const correspondingOption = this.options.find(option => {\n // Skip options that are already in the model. This allows us to handle cases\n // where the same primitive value is selected multiple times.\n return option.selected ? false : this.compareWith(option.value, value);\n });\n if (correspondingOption) {\n correspondingOption._setSelected(true);\n }\n });\n }", "multiselect() {\n \n const selected = self.filters.selected[key];\n \n let index;\n \n if( selected.length > 1 && (index = selected.indexOf(undefined)) > -1 ) {\n \n selected.splice(index, 1);\n \n }\n \n }", "function optionArrays(arr, eachId){\n arr.forEach(eachItem => {\n //console.log(eachId, eachItem.name);\n // eachItem.name.split(' ')[0] --> split by space between words, and take the first word.\n // populate inside the <selec> --> the options inside\n // we use += to add inside <select> the options <option> , not only equals to replace, but + to add it\n eachId.innerHTML += `<option value=\"${eachItem.name}\">${eachItem.name}</option>`\n //console.log(content);\n });\n }", "function MultipleSelect(idDropdownlist) {\n $(\"#\" + idDropdownlist).multiselect({\n includeSelectAllOption: true,\n enableCaseInsensitiveFiltering: true,\n buttonWidth: '100%',\n maxHeight: 300,\n buttonClass: 'btn-multiple-select'\n });\n}", "function multi_select_all(){\n\tvar samples = this.samples;\n\tvar projects = this.projects;\n\t$('.multi_select').each(function() {\n\t\tif ($.inArray($(this).attr('samplesid'), samples) > -1){\n\t\t\t$(this).prop('checked', true);\n\t\t} else if ($.inArray($(this).attr('projectsid'), projects) > -1){\n\t\t\t$(this).prop('checked', true);\n\t\t}\n\t});\n}", "function getOptions(select) {\r\n // Select all the options available\r\n const all_options = Array.from(\r\n select.querySelectorAll(\"option\")\r\n ).map(el => el.value);\r\n\r\n // Get the options that are selected from the user\r\n const options_selected = Array.from(\r\n select.querySelectorAll(\"option:checked\")\r\n ).map(el => el.value);\r\n\r\n // Create an autocomplete options array with the options that are not selected by the user\r\n const autocomplete_options = [];\r\n all_options.forEach(option => {\r\n if (!options_selected.includes(option)) {\r\n autocomplete_options.push(option);\r\n }\r\n });\r\n\r\n autocomplete_options.sort();\r\n\r\n return {\r\n options_selected,\r\n autocomplete_options\r\n };\r\n\r\n}", "_getValues() {\n var options = {};\n var form = this.$form;\n var values = form.find('form').serializeArray();\n\n $.each(values, function(index, object) {\n var input = form.find(`[name=\"${object.name}\"][data-attribute]`);\n var key = input.attr('data-attribute');\n\n if (key) {\n if (/^.*\\[\\]$/.test(object.name)) {\n if (options[key]) {\n options[key] = `${options[key]},${object.value}`;\n } else {\n options[key] = object.value;\n }\n } else {\n options[key] = object.value;\n }\n }\n });\n\n return options;\n }", "function fillSelect(select, valuesArray) {\n var options = '';\n valuesArray.forEach(value => {\n options += '<option value=\"' + value + '\">' + value + '</option>';\n });\n select.append(options);\n}", "buildOptions(array) {\n var listitems = []\n\n for (let i = 0; i < array.length; i++) {\n listitems.push(\n <option key={array[i]} value={array[i]}>\n {array[i]}\n </option>\n )\n }\n return listitems\n }", "function multiChangeHandler(func) {\n return function handleMultiHandler(values) {\n const selectedValue = values ? values : []; \n func(selectedValue.map(value => value.value));\n };\n}", "async selectOptions(...optionIndexes) {\n await this._stabilize();\n const options = await this.element().findElements(webdriver.By.css('option'));\n const indexes = new Set(optionIndexes); // Convert to a set to remove duplicates.\n if (options.length && indexes.size) {\n // Reset the value so all the selected states are cleared. We can\n // reuse the input-specific method since the logic is the same.\n await this.setInputValue('');\n for (let i = 0; i < options.length; i++) {\n if (indexes.has(i)) {\n // We have to hold the control key while clicking on options so that multiple can be\n // selected in multi-selection mode. The key doesn't do anything for single selection.\n await this._actions().keyDown(webdriver.Key.CONTROL).perform();\n await options[i].click();\n await this._actions().keyUp(webdriver.Key.CONTROL).perform();\n }\n }\n await this._stabilize();\n }\n }", "function get_selected(selObject){\n var arSelected = new Array(); \n for (i=0;i<selObject.options.length;i++){\n if (selObject.options[i].selected==true){\n arSelected.push('\\''+selObject.options[i].value+'\\'');\n };\n }\n onts=arSelected.join(',');\n return onts\n}", "function getChosenValuesFromList(divID) {\r\n var chosenItems = [];\r\n var itemDropDown = document.getElementById(divID);\r\n for (var i = 0; i < itemDropDown.options.length; i++) {\r\n if (itemDropDown.options[i].selected == true) {\r\n var itemName = itemDropDown.options[i].value;\r\n chosenItems.push(itemName);\r\n }\r\n }\r\n\r\n return chosenItems;\r\n}", "function getSelectedOptions( chooser ) {\n var selectedValues = [],\n value;\n // loop through options in select list\n for ( var i=0, len=chooser.options.length; i < len; i++ ) {\n value = chooser.options[i];\n // check if selected\n if ( value.selected && value.value ) {\n // add to array of option elements to return from this function\n selectedValues.push( value.value );\n }\n }\n if (selectedValues.length <= 0) {\n return \"\";\n }\n // return array containing references to selected option elements\n return selectedValues;\n}", "get productSelectOptions() {\n const { company } = this.props,\n optionsArray = [...new Set(this.props.templates.map(temp => temp.product))];\n\n return optionsArray.map((product, i) =>\n <option key={`${company}${i}${product}`} value={product}>\n {product}\n </option>\n );\n }", "function formMultiSelect(a,b,c,d,e,f,g,h){if(!h){return false}var s=document.createElement('select');var j=\"\",k,l;$(s).attr(\"name\",a).attr(\"class\",\"form-control\");for(var i=0;i<c.length;i++){if(c[i][\"par_id\"]==d){k=($.inArray(c[i][\"id\"],b)!=-1)?\" selected\":\"\";j+='<option value=\"'+c[i][\"id\"]+'\"'+k+'>'+c[i][\"title\"]+'</option>'}};l=j!=\"\"?true:false;if(f){if(!l){j+='<option value=\"\" selected class=\"additional\">---</option>'}j+='<option value=\"new_'+a+'\" class=\"new\">'+g+'</option>'}if(j!=\"\"){$(s).html(j);$(e).append(s);$(e).append(\" \");$(s).on(\"focus\",function(){if($(this).val()!=\"new_\"+a){$(this).data(\"value\",$(this).get(0).selectedIndex)}}).on(\"change\",function(){$(this).nextAll('select').remove();var o=$(this);var v=o.val();if(v==\"new_\"+a){$(this).prop(\"id\",\"multiselect_active\");$(\".modal\",e).off(\"show.bs.modal shown.bs.modal hide.bs.modal hidden.bs.modal\").on(\"show.bs.modal\",function(){$(\".multiselect_new_input\",$(this)).data(\"child\",\"0\").val('')}).on(\"shown.bs.modal\",function(){$(\".multiselect_new_input\",$(this)).focus()}).on(\"hide.bs.modal\",function(){$(\"#multiselect_active\").removeAttr(\"id\")}).on(\"hidden.bs.modal\",function(){if($(\".multiselect_new_input\",$(this)).data(\"child\")==\"1\"){formMultiSelect(a,b,c,v,e,f,\"+++ new +++\",true)}else{if($(o).get(0).selectedIndex!=$(o).data(\"value\")){$(o).get(0).selectedIndex=$(o).data(\"value\");$(o).trigger(\"change\")}}}).modal(\"show\")}else{if(v!=\"\"){formMultiSelect(a,b,c,v,e,f,\"+++ new +++\",l)}}if(!l){$(s).focus()}}).trigger(\"change\")}}", "get isMultipleSelect() {\n return this._isMultipleSelect;\n }", "function popolaSelect($select, array, fnc) {\n var str = array.reduce(fnc, '<option></option>');\n return $select.html(str);\n }", "function populateMultiChoiceSearchSelection(getQueryParams){\n\n // Make sure we wait until all search field options are loaded\n $q.all([checkboxMultipleChoicesPromise]).then(function() {\n\n // Tick the appropriate checkboxes\n for (var key in vm.checkboxMultipleChoices) {\n if (vm.checkboxMultipleChoices.hasOwnProperty(key)) {\n if (key in getQueryParams) {\n var value = getQueryParams[key];\n\n // It might be an array of values or a single value\n if (value.constructor === Array) {\n for (var i = 0; i < value.length; i++) {\n vm.checkBoxSelection[key][value[i]] = true;\n }\n } else {\n vm.checkBoxSelection[key][value] = true;\n }\n }\n }\n }\n });\n\n // If there was only 1 tag, we have to explicitly convert the string to array\n if (typeof getQueryParams.tags === \"string\"){\n vm.searchCriteria.tags = [getQueryParams.tags]\n }\n }", "function populate(arr, cntrl) {\n\tvar i;\n\t$(cntrl).html(\"\");\n\tfor(i = 0; i < arr.length; i++) {\n\t\t//original using terms\n\t\t// $(cntrl).append(\"<option value='\"+ arr[i].vocabterm.value +\"'>\"+arr[i].vocabterm.value+\" (\"+ arr[i].occurence.value+\")</option>\"); \n\t\t//redesign using encoded uris\n\t\t$(cntrl).append(\"<option value='\"+ arr[i].vocabterm.value + \"#\" + arr[i].classification.value +\"'>\"+arr[i].vocabterm.value+\" (\"+ arr[i].occurence.value+\")</option>\"); \n\t}\n\t$(cntrl).multiselect({title: \"Select Term\"});\n\t\n\t\n}", "function getLicences() {\n\n //these are the licenses provided from the spec that the user can select in a dropdown format\n const licenses = [\"CC BY\", \"CC BY-NC\", \"CC BY-NC-ND\", \"CC BY-NC-SA\", \"CC BY-SA\", \"EMUCL\", \"GFDL\", \"GGPL\", \"OPL\", \"PD\"]\n const licenseList = document.getElementById('license-select');\n\n for(let i = 0; i < licenses.length; i++) {\n const licenseListItem = document.createElement(\"option\");\n licenseListItem.textContent = licenses[i];\n licenseListItem.value = licenses[i];\n licenseList.appendChild(licenseListItem);\n }\n\n $('#license-select').multiselect({\n includeSelectAllOption: true,\n buttonText: function(options, select) {\n return 'Select one or more';\n },\n onChange: function(option, checked, select) {\n $(option).each(function(index, id) {\n let i = licenseArr.indexOf(id.value);\n if (i === -1) {\n licenseArr.push(id.value); \n } else {\n licenseArr.splice(i, 1);\n if (licenseArr.length === 0) {\n licenseArr.push(0);\n }\n }\n });\n searchBooksObj.licenseCodes = licenseArr;\n },\n onSelectAll: function() {\n searchBooksObj.licenseCodes = $('#license-select').val();\n }\n });\n}", "function ui_selectAllOptions(id_targetList){\n\tvar _list = ui_getObjById(id_targetList);\n\tif (_list.multiple){\n\t\tfor (var i=0; i<_list.options.length; i++){\n\t\t\t_list.options[i].selected = true;\n\t\t}\n\t}\n}", "setOptionsFromValues(values) {\n this.options.forEach((option) => option.setSelected(false));\n values\n .map((value) => this.getOptionByValue(value))\n .filter(Boolean)\n .forEach((option) => option.setSelected(true));\n }", "function filterOptions(result, key, filteredValues) {\r\n let i = 0;\r\n let arraysed = new Array();\r\n\r\n if (result == true) {\r\n // break;\r\n $(\"#\" + key).find(\"option\").each(function () {\r\n if (filteredValues.indexOf($(this)[0].innerText) == -1) {\r\n if (navigator.platform.indexOf(\"Win32\") > - 1 || navigator.platform.indexOf(\"Android\") > -1) {\r\n\r\n $(this).removeClass(\"hide-option\").addClass(\"hide-option\");\r\n\r\n\r\n }\r\n\r\n else {\r\n $(this).removeClass(\"hide-option\").prop('disabled', true);\r\n }\r\n }\r\n else {\r\n let valuesToAssign = $(this)[0].innerText;\r\n if (i <= filteredValues.length && valuesToAssign != \"Select\") {\r\n arraysed[i] = valuesToAssign;\r\n i++;\r\n }\r\n }\r\n })\r\n\r\n let a = arraysed[0];\r\n $(\"#\" + key).val(a);\r\n } else {\r\n $(\"#\" + key).find(\"option\").each(function () {\r\n\r\n if (navigator.platform.indexOf(\"Win32\") > - 1 || navigator.platform.indexOf(\"Android\") > -1) {\r\n\r\n $(this).removeClass(\"hide-option\");\r\n\r\n }\r\n else {\r\n $(this).removeClass(\"hide-option\").removeAttr('disabled');\r\n }\r\n let valuesToAssign = $(this)[0].innerText;\r\n\r\n if (i <= filteredValues.length && filteredValues.length >= 2) {\r\n arraysed[i] = valuesToAssign;\r\n i++;\r\n }\r\n })\r\n let a = arraysed[0];\r\n $(\"#\" + key).val(a);\r\n\r\n }\r\n\r\n}", "function updateSelectOptions(elementId, values) {\n\t$('#' + elementId + ' :selected').removeAttr('selected');\n\n\tvar detail = '';\n\n\tfor ( var idx in values) {\n\t\tvar key = values[idx].substring(0, values[idx].indexOf(':'));\n\t\tvar value = values[idx].substring(values[idx].indexOf(':') + 1);\n\n\t\t$('#' + elementId + ' option').each(function() {\n\t\t\tif ($(this).val() == key) {\n\t\t\t\t$(this).attr('selected', 'selected');\n\n\t\t\t\tdetail += value + '; ';\n\t\t\t}\n\t\t});\n\t}\n\n\t$('#' + elementId).multiselect('refresh');\n\n\tif (detail) {\n\t\t$('#' + elementId + '_detail').text(detail);\n\t} else {\n\t\t$('#' + elementId + '_detail').text('-');\n\t}\n}", "function addSelectOptions(array, selectID) {\n const selectElement = document.getElementById(selectID);\n array.forEach((value) => {\n const newOptionHTML = `<option value=\"${value}\">${value}</option>`;\n selectElement.innerHTML += newOptionHTML;\n });\n}", "function generateMultiDropdown(parentID,label,dropID,title,searchTitle,array,maxOptions) {\n //check if search bar added\n if (searchTitle === 0){\n searTitl = ''\n } else {\n searTitl = 'data-live-search=\"true\" data-live-search-placeholder=\"'+searchTitle+'\" ';\n }\n //check if overall max options\n if (maxOptions === 0){\n dataMax = ''\n } else {\n dataMax = 'data-max-options=\"'+maxOptions+'\" ';\n }\n\n //add select options\n var dropHtml = \"\";\n if (label != \"\") {\n dropHtml += '<label>' + label + '</label>'\n }\n dropHtml += '<select class=\"selectpicker\" id=\"'+ dropID +'\" title=\"'+title+'\" data-style=\"btn-default\" data-width=\"100%\" data-size=\"10\" multiple ' + searTitl + dataMax + 'data-selected-text-format=\"count\">'\n //build list, apply BREAKS or LABELS if words present in array\n for (i = 0; i < array.length; i++) {\n\n if (array[i] == 'BREAK'){\n dropHtml += '<option data-divider=\"true\"></option>';\n } else if (array[i].includes('LABEL=')) {\n if (array[i].includes('MAX=')){\n var split = array[i].split('MAX=')\n dropHtml += '<optgroup label=\"' + split[0].replace('LABEL=','') + '\" data-max-options=\"' + split[1] + '\">';\n } else {\n dropHtml += '<optgroup label=\"' + array[i].replace('LABEL=','') + '\">';\n }\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 //append 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 itemsselected(keyname) {\n // clear out the array\n itemselected = [];\n for (var i = 0; i < keyname.options.length; i++) {\n if (keyname.options[i].selected == true) {\n itemselected.push(keyname.options[i].text);\n }\n }\n return itemselected\n}", "function CreateSelectHTML (array) \n{\n var temp = \"\";\n\n for (var i = 0; i < array.length; i++) \n {\n temp += \"<option>\" + array[i] + \"</option>\";\n };\n\n return temp;\n}", "function getSelectOptions(selector_){\n\tvar template=\"\";\n\t$(selector_).children(\"option\").each(function(){\n template += \"<li><a href='#' data-value='\"+$(this).val()+\"'>\"+$(this).text()+\"</a></li>\";\n if($(this).prop(\"selected\")){\n applySelectedValue($(this).parent().parent().find(\"ul[role!='']\"), $(this).text())\n }\n\t});\n\treturn template;\n}", "function orderSelectOptions() {\n var options = $('.search_section select#cities_select option');\n var arr = options.map(function(_, o) {\n return {\n t: $(o).text(),\n v: o.value\n };\n }).get();\n arr.sort(function(o1, o2) {\n return o1.t > o2.t ? 1 : o1.t < o2.t ? -1 : 0;\n });\n options.each(function(i, o) {\n o.value = arr[i].v;\n $(o).text(arr[i].t);\n });\n\n $('.search_section select#cities_select').multiselect('rebuild');\n}", "function buildOptions (incomingArray) {\n $(\"#location\").empty();\n \n var i = 0;\n while (i < incomingArray.length) {\n for (var name in incomingArray[i]) {\n $(\"#location\").append('<option value=\"' + name + '\">' + name + '</option>');\n }\n i++;\n }\n}", "function create_custom_option_arr(htmls_id , opt_id , selected_elm, tmp_arr){\n\n htmls_id = document.getElementById(htmls_id);\n tmp_div = document.createElement('select');\n tmp_div.setAttribute(\"id\", opt_id);\n tmp_div.setAttribute(\"name\", opt_id);\n tmp_div.setAttribute(\"class\", opt_id);\n\n for(f = 0 ; f < tmp_arr.length ; f++){\n\n addOption_custom (tmp_div, tmp_arr[f].text , f+1 , false , f+1 == selected_elm, tmp_arr[f].id, tmp_arr[f].isdisable);\n\n }\n htmls_id.appendChild(tmp_div);\n}", "function createGenreSelector(){\n let genres = getGenres()\n genres = genres.sort()\n const genreSelector = document.getElementById(\"genreSelector\");\n genreSelector.innerHTML = \"\"\n for (const genre of genres) {\n // modified from: https://stackoverflow.com/questions/17730621/how-to-dynamically-add-options-to-an-existing-select-in-vanilla-javascript\n genreSelector.options[genreSelector.options.length] = new Option(genre, genre)\n }\n $(genreSelector).on('change', filteredByGenre)\n // create a multiselector\n // modified from: https://materializecss.com/select.html\n var elems = document.querySelectorAll('#genreSelector');\n var instances = M.FormSelect.init(elems, {});\n\n // modified from: https://codepen.io/souvik1809/pen/rvNMyO?fbclid=IwAR3lxAlSq8wmShlAta5N2EKgEc02e3r9txS_YzoE2XJrp0X2w5VC6zKatZQ\n const selectAll = $('<li><span>Select All</span></li>');\n $('#genreSelector').siblings('ul').prepend(selectAll);\n selectAll.on('click', function () {\n supressGenreFilter = true\n var jq_elem = $(this),\n jq_elem_span = jq_elem.find('span'),\n select_all = jq_elem_span.text() === 'Select All',\n set_text = select_all ? 'Select None' : 'Select All';\n jq_elem_span.text(set_text);\n jq_elem.siblings('li').filter(function() {\n return $(this).find('input').prop('checked') !== select_all;\n }).click();\n supressGenreFilter = false;\n filteredByGenre()\n });\n\n}", "function FillDataToMultipleSelect(idDropdownlist, arrDataSource, valueField, textFiled) {\n $('#' + idDropdownlist).multiselect('destroy');\n $('#' + idDropdownlist).empty();\n var option = '';\n for (var i = 0; i < arrDataSource.length; i++) {\n option += '<option value=\"' + arrDataSource[i][valueField] + '\">' + arrDataSource[i][textFiled] + '</option>';\n }\n $('#' + idDropdownlist).append(option);\n\n //Format dropdownlist to selection\n MultipleSelect(idDropdownlist);\n}", "function isSelectMultiple(mixSelect)\n{\n if (empty(mixSelect))\n return false;\n var select = getObject(mixSelect);\n if (empty(select))\n return false;\n if (select.tagName.toLowerCase() != 'select')\n return false;\n var booMultiple = true;\n if (document.all)\n booMultiple = (select.getAttribute('multiple') === false) ? false : true;\n else\n booMultiple = (select.getAttribute('multiple') === null) ? false : true;\n return booMultiple;\n}", "function isSelectMultiple(mixSelect)\n{\n if (empty(mixSelect))\n return false;\n var select = getObject(mixSelect);\n if (empty(select))\n return false;\n if (select.tagName.toLowerCase() != 'select')\n return false;\n var booMultiple = true;\n if (document.all)\n booMultiple = (select.getAttribute('multiple') === false) ? false : true;\n else\n booMultiple = (select.getAttribute('multiple') === null) ? false : true;\n return booMultiple;\n}", "function getRepositories() {\n $('#repository').multiselect({\n includeSelectAllOption: true,\n buttonText: function(options, select) {\n return 'Select one or more';\n },\n onChange: function(option, checked, select) {\n $(option).each(function(index, id) {\n let i = respositoryArr.indexOf(id.value);\n if (i === -1) {\n respositoryArr.push(id.value); \n } else {\n respositoryArr.splice(i, 1);\n if (respositoryArr.length === 0) {\n respositoryArr.push(0);\n }\n }\n });\n searchBooksObj.repositoryIds = respositoryArr;\n },\n onSelectAll: function() {\n searchBooksObj.repositoryIds = $('#repository').val();\n }\n });\n\n fetch(baseUrl + 'repositories')\n .then(response => response.json())\n .then(repositories => {\n let data = repositories.map(repositories => {\n return {label: repositories.name, title: repositories.name, value: repositories.id};\n });\n $('#repository').multiselect('dataprovider', data)\n })\n .catch(error => console.error(error));\n}", "function populateOptions(select, list, uidToSet) {\n var str = list.reduce(function(acc, val) {\n var opt = '<option value=\"' + val.uid + '\"';\n if(uidToSet && uidToSet === val.uid) {\n opt += ' selected';\n }\n opt += '>' + val.codice + ' - ' + val.descrizione + '</option>';\n return acc + opt;\n }, '<option></option>');\n select.append(str);\n }", "function getMultipleChoiceValues(id, element) {\n const option = element.options[id];\n // TODO: i18n.\n return option.code || option.label[\"en\"] || \"\";\n}", "_setAllOptionsSelected(isSelected, skipDisabled, isUserInput) {\n // Keep track of whether anything changed, because we only want to\n // emit the changed event when something actually changed.\n const changedOptions = [];\n this.options.forEach(option => {\n if ((!skipDisabled || !option.disabled) && option._setSelected(isSelected)) {\n changedOptions.push(option);\n }\n });\n if (changedOptions.length) {\n this._reportValueChange();\n if (isUserInput) {\n this._emitChangeEvent(changedOptions);\n }\n }\n }", "function setInputOptions(jQuerySelector, array, selected, sort=false) {\n if (sort) {\n array.sort();\n }\n let output = [];\n $.each(array, function(key, value)\n {\n let option;\n if (value === selected) {\n option = '<option selected value=\\\"'+ value +'\\\">'+ value +'</option>';\n } else {\n option = '<option value=\\\"'+ value +'\\\">'+ value +'</option>';\n }\n output.push(option);\n });\n jQuerySelector.empty();\n jQuerySelector.html(output.join(''));\n}", "function getDisciplines() {\n $('#disciplines').multiselect({\n includeSelectAllOption: true,\n buttonText: function(options, select) {\n return 'Select one or more';\n },\n onChange: function(option, checked, select) {\n $(option).each(function(index, id) {\n let i = disciplineArr.indexOf(id.value);\n if (i === -1) {\n disciplineArr.push(id.value); \n } else {\n disciplineArr.splice(i, 1);\n if (disciplineArr.length === 0) {\n disciplineArr.push(0);\n }\n }\n });\n searchBooksObj.tagIds = disciplineArr;\n }\n });\n fetch(baseUrl + 'tag')\n .then(disciplineResponse => disciplineResponse.json())\n .then(disciplines => {\n let data = disciplines.map(discipline => {\n return {label: discipline.name, title: discipline.name, value: discipline.id};\n });\n // programmatically add data to select list using multiselect library\n $('#disciplines').multiselect('dataprovider', data);\n })\n .catch(error => console.error(error));\n}" ]
[ "0.7157802", "0.7157802", "0.7157802", "0.7157802", "0.7157802", "0.7157802", "0.68796736", "0.68796736", "0.68406266", "0.68406266", "0.68306524", "0.6830643", "0.6739273", "0.669184", "0.6674298", "0.6674298", "0.66361904", "0.6542995", "0.6434029", "0.6427701", "0.64018255", "0.62965053", "0.6267897", "0.62465817", "0.6232354", "0.6205841", "0.61809826", "0.6153484", "0.6135782", "0.61249334", "0.6096655", "0.60762316", "0.60538876", "0.59942514", "0.5985523", "0.5982509", "0.59431255", "0.5942499", "0.5942499", "0.5941403", "0.5936487", "0.59149265", "0.59110606", "0.59005994", "0.5893124", "0.5890056", "0.58707476", "0.5850361", "0.5850361", "0.5850361", "0.5842963", "0.58420163", "0.5831583", "0.58170396", "0.5770206", "0.5764117", "0.57508856", "0.57508856", "0.57423156", "0.5736195", "0.5719447", "0.5706919", "0.5701157", "0.5700356", "0.56940633", "0.5692811", "0.56716883", "0.5641832", "0.5638981", "0.5628957", "0.5626439", "0.5621507", "0.56049305", "0.5594891", "0.5588733", "0.5567449", "0.556391", "0.5563781", "0.5558917", "0.55297416", "0.5528409", "0.55269974", "0.550508", "0.549916", "0.54706997", "0.5470545", "0.5469293", "0.5460608", "0.5454264", "0.54452753", "0.5439658", "0.5434701", "0.54306173", "0.54306173", "0.5429987", "0.5429747", "0.5418171", "0.5408017", "0.54043514", "0.53933156" ]
0.749405
0
Return the next value for a checkbox
function getValueForCheckbox(currentValue,checked,valueProp){// If the current value was a boolean, return a boolean if(typeof currentValue==='boolean'){return Boolean(checked);}// If the currentValue was not a boolean we want to return an array var currentArrayOfValues=[];var isValueInArray=false;var index=-1;if(!Array.isArray(currentValue)){// eslint-disable-next-line eqeqeq if(!valueProp||valueProp=='true'||valueProp=='false'){return Boolean(checked);}}else {// If the current value is already an array, use it currentArrayOfValues=currentValue;index=currentValue.indexOf(valueProp);isValueInArray=index>=0;}// If the checkbox was checked and the value is not already present in the aray we want to add the new value to the array of values if(checked&&valueProp&&!isValueInArray){return currentArrayOfValues.concat(valueProp);}// If the checkbox was unchecked and the value is not in the array, simply return the already existing array of values if(!isValueInArray){return currentArrayOfValues;}// If the checkbox was unchecked and the value is in the array, remove the value and return the array return currentArrayOfValues.slice(0,index).concat(currentArrayOfValues.slice(index+1));}// React currently throws a warning when using useLayoutEffect on the server.
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "nextValue() {\n let value = this.getContext().changeValue(NEXT_VALUE);\n\n if (value === null) return value;\n this.value = value;\n\n return true;\n }", "function next() {\n setValue(()=>{\n return checkValue(value+1)\n })\n }", "next() {\n // 4. it should return the value as an object {done: Boolean, value: any}\n if (this.current <= this.last) {\n return { done: false, value: this.current++ };\n } else {\n return { done: true };\n }\n }", "get next() {\n for (let i = 0; i < this.chapters.length; i++)\n if(this.isSelected(this.chapters[i]))\n return this.chapters[i + 1] ? this.chapters[i + 1] : null;\n }", "next() {\n // 4. it should return the value as an object {done:.., value :...}\n if (this.current <= this.last) {\n return { done: false, value: this.current++ };\n } else {\n return { done: true };\n }\n }", "function getbhkVal(){\n var bhk_val = document.getElementsByName(\"bhkOpt\");\n for(var i in bhk_val){\n if(bhk_val[i].checked){\n return parseInt(i)+1;\n }\n }\n return -1; // for invalid value\n}", "next() {\n if(this.ind===this.group.values.length) {\n return {value: undefined, done: true}\n }\n else {\n let val = this.group.values[this.ind];\n this.ind++;\n return {value: val, done: false}\n }\n }", "function nextInput()\r\n{\r\n var res = inputCurrent;\r\n if(res == null)\r\n return null;\r\n inputCurrent = inputCurrent.next;\r\n return res;\r\n}", "function checkNext(event)\n{\n let element = document.getElementById(event.target.id)\n if (event.target.id != \"q6\")\n {\n if (event.target.id != \"q4\")\n {\n if (element.value == \"Yes\")\n {\n let nextNumber = parseInt(event.target.id.substring(1,2)) + 1\n let nextItem = event.target.id.substring(0,1) + nextNumber.toString()\n document.getElementById(nextItem).disabled = false;\n console.log(nextItem)\n }\n else\n {\n let nextNumber = parseInt(event.target.id.substring(1,2)) + 1\n let nextItem = event.target.id.substring(0,1) + nextNumber.toString()\n document.getElementById(nextItem).disabled = true;\n console.log(nextItem)\n }\n }\n else\n {\n if(document.getElementById(event.target.id).value != \"\")\n {\n let nextNumber = parseInt(event.target.id.substring(1,2)) + 1\n let nextItem = event.target.id.substring(0,1) + nextNumber.toString()\n document.getElementById(nextItem).disabled = false;\n console.log(nextItem)\n }\n else\n {\n let nextNumber = parseInt(event.target.id.substring(1,2)) + 1\n let nextItem = event.target.id.substring(0,1) + nextNumber.toString()\n document.getElementById(nextItem).disabled = true;\n console.log(nextItem)\n }\n }\n }\n else\n {\n document.getElementById(\"business-next-button\").disabled = false;\n }\n}", "next() {\n // 4. it should returnthe value as an object {done:..., value:...}\n if (this.current <= this.last) {\n return {\n done: false,\n value: this.current++,\n };\n } else {\n return {\n done: true,\n };\n }\n }", "get next() { return this.nextStep; }", "checkedChanged(prev, next) {\n if (typeof next === \"boolean\") {\n this.ariaChecked = next ? \"true\" : \"false\";\n return;\n }\n\n this.ariaChecked = undefined;\n }", "function getNextValue(el) {\n var next = el.next;\n var value = \"\";\n while (next.children.length < 1 && next.next != undefined && next.next != null) {\n next = next.next\n }\n if (next.children.length == 1) {\n value = getValueTag(next.children[0]);\n } else {\n value = next.children.reduce((prev, curr) => {\n return getValueTag(prev) + \"\\n\" + getValueTag(curr);\n });\n }\n return value.trim();\n}", "function prev() {\n setValue(()=>{\n return checkValue(value-1)\n })\n }", "function next() {\n\t\t\treturn go(current+1);\n\t\t}", "getNextValue(current) {\n var key;\n var opt_keys = this.options.keys;\n if(isEmpty(opt_keys))\n return null;\n if(current == null)\n return opt_keys[0];\n key = opt_keys[opt_keys.indexOf(current)+1];\n return key;\n }", "clickedNext(state) {\n return state.clickedNext;\n }", "function Next(i) {\n var active_number = $('#nomor_soal').val();\n var next = (active_number*1)+(1*1);\n if(active_number!=i){\n $('.soal > .data').hide();\n $('#Soal_'+next).show();\n $('.tombol > a').removeClass(' in-active');\n $('#daftar'+next).addClass(' in-active');\n $('#nomor_soal').val(next);\n }\n}", "next() {\n let item = this.rbIter.data();\n\n if (item) {\n let ret = {\n value: item,\n done: false\n };\n\n this.rbIter[this.nextFunc]();\n\n return ret;\n } else {\n return {\n done: true\n }\n }\n }", "function valButton(btn) {\n var cnt = -1;\n for (var i=btn.length-1; i > -1; i--) {\n if (btn[i].checked) {cnt = i; i = -1;}\n }\n if (cnt > -1) return btn[cnt];\n else return null;\n}", "function TimeoutNextClick(tot) {\n//\talert(\"new func\");\n\tvar checked = 0;\n\tfor(nn = 0; nn < tot; nn++) {\n\t\tif(document.QuestionForm.pre_answer[nn].checked) {\n\t\t\tdocument.QuestionForm.answer.value = document.QuestionForm.pre_answer[nn].value;\n\t\t\tchecked = 1;\n\t\t}\n//\t\talert(checked + \":\" + document.QuestionForm.pre_answer[nn].value);\n\t}\n\tif(checked == 0) {\n\t\tdocument.QuestionForm.answer.value = document.QuestionForm.timeout_answer.value;\n\t}\n\treturn true;\n}", "function getNextVal(val) {\n\treturn vals[(vals.indexOf(val) + 1) % vals.length];\n}", "next() {\n if (this.current == \"one\") {\n this.current = \"two\";\n return { done: false, value: \"one\" };\n } else if (this.current == \"two\") {\n this.current = \"\";\n return { done: false, value: \"two\" };\n }\n return { done: true };\n }", "_next(value) {\n //console.log(\"hii\", value);\n let currentStep = this.state.currentStep;\n //let indexStep= this.state.index;\n // If the current step is 1 or 2, then add one on \"next\" button click\n currentStep = currentStep >= 2 ? 3 : currentStep + 1;\n this.setState({\n currentStep: currentStep\n });\n }", "function get_next_correct_answer() {\n var result = first_answer.correct_answers[first_answer.correct_answer_index];\n first_answer.correct_answer_index = (first_answer.correct_answer_index + 1) % first_answer.correct_answers.length;\n return result;\n }", "function mjgetchecked(checkgroup)\n{\n for (ii=0; ii<checkgroup.length; ii++){\n if (checkgroup[ii].checked == true)\n return checkgroup[ii].value;\n }\n return -1;\n}", "isNextBitSet(){\n return this.data[this.index++] === '1';\n }", "function getPokerus() {\n \n var pokerusValue=1;\n\n var form = document.forms[\"evTrainingForm\"];\n var pokerusBoolean = form.elements[\"pokerus\"];\n\n if(pokerusBoolean.checked==true){\n pokerusValue=2;\n }\n\n return pokerusValue;\n}", "function findNextButton() {\r\n\tvar xpath = \"//a[@accesskey='2']\"; \r\n\tvar nextButtonSnapshot = document.evaluate(xpath, document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);\r\n\r\n\tif (nextButtonSnapshot.snapshotLength == 2) {\r\n\t\tvar nextButton = nextButtonSnapshot.snapshotItem(0);\r\n \t\treturn nextButton;\r\n\t}\r\n}", "function getInput(){\n const clicked = document.querySelectorAll('.answer');\n \n for(var x = 0; x < clicked.length; x++){\n if(clicked[x].checked){\n return clicked[x].value;\n }\n }\n }", "function getCheckedValue(el) {\n for (var i = 0, length = el.length; i < length; i++) {\n if (el[i].checked) {\n return el[i].value;\n break;\n }\n }\n return '';\n}", "function valButton(btn) {\n\t\t\tvar cnt = -1;\n\t\t\tfor (var i=btn.length-1; i > -1; i--) {\n\t\t\t\tif (btn[i].checked) {cnt = i; i = -1;}\n\t\t\t}\n\t\t\tif (cnt > -1) return btn[cnt].value;\n\t\t\telse return null;\n\t\t}", "next() {\n this.selectedIndex = Math.min(this._selectedIndex + 1, this.steps.length - 1);\n }", "function getRecurso(value) {\n if ((value == 1) || (value == \"checked\") || (value == true)) {\n return $('#lb_EstadoActiva').text();\n }\n else {\n return $('#lb_EstadoInactiva').text();\n }\n}", "next() {\n this.selectNonDisabled(this.activeTabIndex, 1);\n }", "function next(item){\n return item.nextElementSibling;\n }", "function next(item){\n return item.nextElementSibling;\n }", "function next(item){\n return item.nextElementSibling;\n }", "function next(item) {\n return item.nextElementSibling;\n }", "function bannerSwitcher() {\n $next = $('.sec-1-input').filter(\":checked\").next('.sec-1-input');\n if ($next.length) $next.prop('checked', true);\n else $('.sec-1-input').first().prop('checked', true); \n}", "function getCheckboxValue(el, checked) {\r\n const key = checked ? '_trueValue' : '_falseValue';\r\n return key in el ? el[key] : checked;\r\n}", "function getCheckboxValue(el, checked) {\r\n const key = checked ? '_trueValue' : '_falseValue';\r\n return key in el ? el[key] : checked;\r\n}", "moveToNextSignUpStep() {\n console.log(this.checked);\n if (!this.checked) {\n alert(\"이용약관에 동의해주세요.\");\n } else {\n window.location.href = \"/users/signup2\";\n }\n }", "function focusNext(from) {\n var focusIndex = focusOn('next', from);\n if ( focusIndex != list.indexOf(selected)) {\n\n // Announce focus change\n $scope.$broadcast(EVENT.FOCUS_CHANGED, focusIndex);\n }\n return focusIndex;\n }", "function getCheckboxValue(el, checked) {\n const key = checked ? '_trueValue' : '_falseValue';\n return key in el ? el[key] : checked;\n}", "function getCheckboxValue(el, checked) {\n const key = checked ? '_trueValue' : '_falseValue';\n return key in el ? el[key] : checked;\n}", "function getCheckboxValue(el, checked) {\n const key = checked ? '_trueValue' : '_falseValue';\n return key in el ? el[key] : checked;\n}", "function getCheckboxValue(el, checked) {\n const key = checked ? '_trueValue' : '_falseValue';\n return key in el ? el[key] : checked;\n}", "function getCheckboxValue(el, checked) {\n const key = checked ? '_trueValue' : '_falseValue';\n return key in el ? el[key] : checked;\n}", "function getCheckboxValue(el, checked) {\n const key = checked ? '_trueValue' : '_falseValue';\n return key in el ? el[key] : checked;\n}", "function getCheckboxValue(el, checked) {\n const key = checked ? '_trueValue' : '_falseValue';\n return key in el ? el[key] : checked;\n}", "function getCheckboxValue(el, checked) {\n const key = checked ? '_trueValue' : '_falseValue';\n return key in el ? el[key] : checked;\n}", "function getCheckboxValue(){\n\t\tif(go('selectValue').checked){\n\t\t\t\tselectValue= go('selectValue').value;\n\t\t\n\t\t\t}else{\n\t\t\tselectValue=\"No\"\n\t}\n}", "function next(item){\r\n return item.nextElementSibling;\r\n }", "function next(item){\r\n return item.nextElementSibling;\r\n }", "function btnNextElement() {\n if(message_type_bot) {\n return $(\".bot_scenario textarea[name='\" + $('input.btn_next_messages_focus').val() + \"']\");\n } else {\n return $(\".user_scenario textarea[name='\" + $('input.btn_next_messages_focus').val() + \"']\");\n }\n}", "next() {\n const { index, showTooltip } = this.state;\n const { steps } = this.props;\n const nextIndex = index + 1;\n\n const shouldDisplay = Boolean(steps[nextIndex]) && showTooltip;\n\n this.logger('joyride:next', ['new index:', nextIndex]);\n this.toggleTooltip(shouldDisplay, nextIndex, 'next');\n }", "function goNext( event ){\n event.preventDefault();\n go( revOffset - 1 );\n return false;\n }", "function next() {\n var nextElement = this.elements[0].nextElementSibling;\n \n return $.make(nextElement);\n }", "get nextStepKey() {\n return self.step.nextStepKey(self.annotations)\n }", "function getNextInput(el){\n\tif(inputElements == null){\n\t \tinputElements = $(\"input[type = 'text']:visible\");\n\t}\n\tvar idx = 0;\n\tfor(var i = 0; i < inputElements.size(); i++){\n\t \tif(inputElements[i] == el){\n\t \t \tidx = i;\n\t \t \tbreak;\n\t \t}\n\t}\n\tif(++idx == inputElements.size()){\n\t \treturn null;\n\t}\n\treturn inputElements[idx];\n}", "function nextQuestion(){\n global_index++;\n askQuestion(global_index);\n uncheck();\n }", "focusNextOption() {\n this.focused_option = this.getNextValue(this.focused_option);\n this.behave('focusCurrentOption');\n }", "function next_selection() {\n if (window.selected_rows.length == 0) {\n return null;\n }\n var next_row_index = window.selected_rows.shift();\n window.current_row_index = next_row_index;\n\n // remove the selected class so it is not highlighted\n var dt = window.datatable;\n var tr_node = dt.row(next_row_index).node();\n var next = $(tr_node);\n next.removeClass(\"selected\");\n\n // return row index\n return next_row_index;\n}", "next() {\n const that = this,\n availableItems = that.dataSource.length;\n \n if (that.disabled || availableItems === 0) {\n return;\n }\n\n let nextItem = that._currentIndex;\n\n if(that.loop){\n nextItem = nextItem >= availableItems-1 ? 0 : nextItem + 1;\n }\n else {\n nextItem = nextItem >= availableItems-1 ? nextItem : nextItem + 1;\n }\n\n that._goToItem(nextItem);\n }", "next_focused_option_index()\n\t{\n\t\tconst { options } = this.props\n\t\tconst i = this.getFocusedOptionIndex()\n\t\treturn i === options.length - 1 ? i : i + 1\n\t}", "get next() { return this.$n++; }", "next() {\n // $(this.parentElement).data(\"obj\").select_fwd();\n $(this.parentElement).data(\"obj\").update_idx(1);\n return false;\n }", "function next(currentEq) {\n if (currentEq < $slides.length - 1) {\n return currentEq + 1;\n } else {\n return 0;\n }\n }", "next(delta = 1) {\n let result = {\n value: undefined,\n done: true\n };\n\n if (!first) {\n current += delta;\n }\n\n if (current <= end) {\n result.value = current;\n result.done = false;\n }\n\n first = false;\n return result;\n }", "clickNextLnk() {\n return this.NextLnk.click();\n }", "getCurrentValue(index) {\n if (index == null || index === '') {\n index = this.rawDefault;\n } else {\n index -= 1;\n }\n\n var choice = this.opt.choices.getChoice(index);\n return choice ? choice.value : null;\n }", "getCurrentValue(index) {\n if (index == null || index === '') {\n index = this.rawDefault;\n } else {\n index -= 1;\n }\n\n var choice = this.opt.choices.getChoice(index);\n return choice ? choice.value : null;\n }", "checkNext() {\n let token;\n if (this.currentToken < this.tokens.length){\n token = this.tokens[this.currentToken];\n }\n else\n token = \"NO_MORE_TOKENS\";\n return token;\n }", "nextStep() {\n\n if (this.slides[this.currSlide].steps.length - 1 > this.currStep) {\n\n this.goTo(this.currSlide, this.currStep + 1);\n\n }\n\n }", "function getValue($el) {\n return $el.is('[type=\"checkbox\"]') ? $el.prop('checked') : $el.is('[type=\"radio\"]') ? !!$('[name=\"' + $el.attr('name') + '\"]:checked').length : $el.val();\n }", "function getValue($el) {\n return $el.is('[type=\"checkbox\"]') ? $el.prop('checked') :\n $el.is('[type=\"radio\"]') ? !!$('[name=\"' + $el.attr('name') + '\"]:checked').length :\n $el.val()\n }", "selectNext() {\n const children = Array.from(this.children);\n if (!children || children.length === 0) {\n return;\n }\n const selectedItem = this.selectedItem;\n const prevIndex = children.indexOf(selectedItem);\n const nextIndex = prevIndex + 1 >= children.length ? 0 : prevIndex + 1;\n this.selected = nextIndex;\n }", "getTutorial() {\n return this.$panel.find(`[name=tutorial-${this.name}-${this.num}]:checked`).val() || \"\";\n }", "static RememberCheckboxCounterValueByIndex(index, state) {\n let value = browser.getText(`li:nth-child(${index}) > div .indflow-checkbox-accordion_link-text`);\n value = value.replace(/[^\\d.]/g, '');\n value = Number(value);\n state.checkboxValueByIndex = value;\n return state.checkboxValueByIndex;\n }", "function ListBox_GetNextItem(theHTML, aData)\n{\n\t//next item to select\n\tvar nNextToSelect;\n\t//final?\n\tvar bFinal = false;\n\t//theObject\n\tvar theObject = theHTML.InterpreterObject;\n\t//is multiselection enabled?\n\tif (theObject.MultiSelection)\n\t{\n\t\t//loop through the items\n\t\tfor (var items = theObject.Items, i = 0, c = items.length; i < c; i++)\n\t\t{\n\t\t\t//get action index\n\t\t\tvar actionIndex = \"\" + (items[i].Index + 1);\n\t\t\t//want to select\n\t\t\tvar bShouldBeSelected = false;\n\t\t\t//loop through the items\n\t\t\tfor (var i2 = 0, c2 = aData.length; i2 < c2; i2++)\n\t\t\t{\n\t\t\t\t//found it?\n\t\t\t\tif (aData[i2] == actionIndex)\n\t\t\t\t{\n\t\t\t\t\t//we want it\n\t\t\t\t\tbShouldBeSelected = true;\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//want to select it? and not selected?\n\t\t\tif (bShouldBeSelected != items[i].Selected)\n\t\t\t{\n\t\t\t\t//is the the final?\n\t\t\t\tif (bFinal)\n\t\t\t\t{\n\t\t\t\t\t//no longer final\n\t\t\t\t\tbFinal = false;\n\t\t\t\t\t//end loop\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t//select it\n\t\t\t\tnNextToSelect = i;\n\t\t\t\t//mark it as final\n\t\t\t\tbFinal = true;\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\t//we have to be final as we only accept 1 value\n\t\tbFinal = true;\n\t\t//next to select is the index of the target\n\t\tnNextToSelect = Get_Number(aData[0]) - 1;\n\t}\n\t//return the result\n\treturn { Index: nNextToSelect, Final: bFinal, NeedsScroll: theObject.MapItems[nNextToSelect].HTML == null || /none/i.test(theObject.MapItems[nNextToSelect].HTML.style.display) };\n}", "function doFocusNext(field,form,iteration) {\r\n\tif (!isNumeric(iteration)) iteration = 1;\r\n\tvar nexttabindex = $('form#'+form+' input[name=\"'+field+'\"]').attr('tabindex') + iteration;\r\n\tvar nextfield = $('form#'+form+' input[tabindex=\"'+nexttabindex+'\"]:enabled:visible:first, form#'+form+' select[tabindex=\"'+nexttabindex+'\"], form#'+form+' textarea[tabindex=\"'+nexttabindex+'\"]');\r\n\tvar nextradiofield = $('form#'+form+' input[name=\"'+nextfield.attr('name')+'___radio\"]:enabled:visible:first');\r\n\tif (nextradiofield.length && (nextradiofield.css('visibility') == 'visible' || nextradiofield.css('visibility') == 'inherit')) {\r\n\t\t// Next input is a radio, so put focus on it\r\n\t\tnextradiofield.trigger('focus');\r\n\t} else if (nextfield.length && (nextfield.css('visibility') == 'visible' || nextfield.css('visibility') == 'inherit')\r\n\t\t&& !nextfield.prop('readonly')) {\r\n\t\t// Put focus on next input, select, or textarea\r\n\t\tnextfield.trigger('focus');\r\n\t} else if (iteration <= 20) {\r\n\t\t// Don't do more than 20 recursions if field not found\r\n\t\tdoFocusNext(field,form,iteration+1);\r\n\t} else {\r\n\t\t// Give up! Couldn't find the next field.\r\n\t}\r\n}", "getFieldValue(target) {\n return target.type === 'checkbox' ? target.checked : target.value;\n }", "function next($event) {\n $event.preventDefault();\n angular.element('#input-1').val('');\n count++;\n if(count === 4){\n $scope.questionLabel= questionData.questionLabel[1].text;\n } else {\n if (count === 8){\n count= 0;\n $scope.questionLabel= questionData.questionLabel[0].text;\n }\n }\n init();\n return false;\n }", "next() {\n if (this.hasNext()) {\n this.setState({\n offset: Math.max(0, this.state.offset - 1),\n });\n }\n }", "function getFirstChecked(tblName)\n\t{\n\t\tfor (var i=1; i<tblName.rows.length; i++)\n\t\t{\n\t\t\tif (tblName.rows(i).cells(0).firstChild.checked) return i;\n\t\t}\n\t\treturn -1;\n\t}", "gotoNextStep() {\n this.gotoStep(this.currentStep + 1);\n }", "getValue() {\n return this.state.isChecked;\n }", "function nextFormElement() {\n var fields = $('body').find('button,input,textarea,select'),\n index = fields.index($input);\n if (index > -1 && (index + 1) < fields.length) {\n fields.eq(index + 1).focus();\n }\n return false;\n }", "function _nextQuestion() {\n var nextQuestion = vm.questionSelected.Id;\n nextQuestion++;\n console.log(nextQuestion);\n // run function to get question \n _getQuestion(nextQuestion);\n }", "selectNext(element) {\n const order = this.getOrdered(element);\n const i = order.indexOf(element);\n const next = order[i + 1] || order[0];\n this.select(next);\n return next;\n }", "getJumpNext(){\n\t\tvar arr = this.async_jump_pos.copy();\n\t\tvar sz = arr.count();\n\t\tvar item = arr.item(sz - 1);\n\t\tarr.set(sz - 1, item + 1);\n\t\treturn FunctionStack.getJumpString(arr);\n\t}", "function calcNextPrev(index, array, direction) {\n if (direction === 'next') {\n return array[index + 1] ? array[index + 1] : array[0];\n } else if (direction === 'prev') {\n return array[index - 1] ? array[index - 1] : array[array.length - 1];\n }\n\n return false;\n }", "selectNext(loop = false) {\n\t\tvar following, items = this.getItemsArray();\n\t\tif (_isEmpty(items)) {\n\t\t\tif (_isFunction(loop)) {\n\t\t\t\tloop();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (this.current.active) {\n\t\t\tfollowing = _following(items, this.current.active, false/*length*/, loop);\n\t\t} else if (loop && (!_isFunction(loop) || loop(0))) {\n\t\t\tfollowing = _arrFirst(items);\n\t\t}\n\t\tif (following) {\n\t\t\treturn following.setActiveState(true);\n\t\t}\n\t}", "function selectNextItem(){\n var items = document.getElementById('searchresults').childNodes;\n selectIndex((selectedSearchIndex + 1) % items.length);\n }", "function GetItemTrueFalseButton4(){\n var val1 = document.getElementById(\"exampleRadios1\").checked;\n var val2 = document.getElementById(\"exampleRadios2\").checked;\n var returnval;\n if(val1 === true){\n returnval = \"change\";\n }\n else if(val2 === true){\n returnval = \"else\";\n }else{\n returnval = \"N/A\";\n }\n // Validation(returnval); - Validation is currently done on text entries\n return returnval;\n}", "function getValue($el) {\n return $el.is('[type=\"checkbox\"]') ? $el.prop('checked') :\n $el.is('[type=\"radio\"]') ? !!$('[name=\"' + $el.attr('name') + '\"]:checked').length :\n $el.val()\n }", "function TimeoutNextClickCheck(tot) {\n\tif(IsRadioClick==false) {\n// BMOD: use confirm instead of alert\n//\t\talert(\"You did not click on an answer\");\n//\t\treturn false;\n\t\tif(!confirm(\"Proceed without answer?\")) {\n\t\t\treturn false;\n\t\t}\n\t}\n//\talert(\"new func\");\n\tvar checked = 0;\n\tfor(nn = 0; nn < tot; nn++) {\n\t\tif(document.QuestionForm.pre_answer[nn].checked) {\n\t\t\tdocument.QuestionForm.answer.value = document.QuestionForm.pre_answer[nn].value;\n\t\t\tchecked = 1;\n\t\t}\n//\t\talert(checked + \":\" + document.QuestionForm.pre_answer[nn].value);\n\t}\n\tif(checked == 0) {\n\t\tdocument.QuestionForm.answer.value = document.QuestionForm.timeout_answer.value;\n\t}\n\treturn true;\n}", "function checkNext() {\r\n\r\n\t$(\".checkout-next\").click(function (e) {\r\n\t\te.preventDefault();\r\n\r\n\t\tvar next = $(this).attr('data-page');\r\n\t\t$('.' + next ).find('.collapsed').trigger('click');\r\n\t});\r\n}", "function getValue($el) {\n return $el.is('[type=\"checkbox\"]') ? $el.prop('checked') :\n $el.is('[type=\"radio\"]') ? !!$('[name=\"' + $el.attr('name') + '\"]:checked').length :\n $.trim($el.val())\n }", "function IteratorStep( iterator, value ) {\n var result = IteratorNext(iterator, value);\n var done = result['done'];\n if (Boolean(done) === true) return false;\n return result;\n }" ]
[ "0.66381294", "0.64310277", "0.6164489", "0.6139948", "0.60716945", "0.6049012", "0.5960204", "0.59186673", "0.5884741", "0.5867915", "0.58380634", "0.5821627", "0.58103305", "0.5798497", "0.57925844", "0.57908046", "0.57835233", "0.5776785", "0.57597613", "0.57554394", "0.5745365", "0.5739258", "0.5702036", "0.569742", "0.5690998", "0.56547755", "0.5616917", "0.56155217", "0.5606379", "0.5599317", "0.5595741", "0.5560268", "0.55428755", "0.55259186", "0.55216306", "0.5519032", "0.5519032", "0.5519032", "0.54923016", "0.5486696", "0.5485765", "0.5485765", "0.54798913", "0.54779804", "0.5474172", "0.5474172", "0.5474172", "0.5474172", "0.5474172", "0.5474172", "0.5474172", "0.5474172", "0.5473846", "0.54720145", "0.54720145", "0.54642254", "0.5452859", "0.5452347", "0.5442942", "0.54395294", "0.54263633", "0.54218936", "0.5386785", "0.5383154", "0.53823745", "0.53753126", "0.5374983", "0.536164", "0.536017", "0.53516227", "0.5334744", "0.5331071", "0.5331071", "0.53231174", "0.5315567", "0.5312769", "0.5311266", "0.5306241", "0.53010046", "0.5300767", "0.5299175", "0.5293507", "0.52934307", "0.5267949", "0.52554405", "0.52536845", "0.5244497", "0.5239755", "0.5238399", "0.522685", "0.5223896", "0.5223235", "0.5220435", "0.52076393", "0.5202725", "0.519958", "0.5199295", "0.51985735", "0.51929754", "0.5189418", "0.51890355" ]
0.0
-1
Connect any component to Formik context, and inject as a prop called `formik`;
function connect(Comp){var C=function C(props){return/*#__PURE__*/react.createElement(FormikConsumer,null,function(formik){!!!formik?warning(false,"Formik context is undefined, please verify you are rendering <Form>, <Field>, <FastField>, <FieldArray>, or your custom context-using component as a child of a <Formik> component. Component name: "+Comp.name):void 0;return/*#__PURE__*/react.createElement(Comp,Object.assign({},props,{formik:formik}));});};var componentDisplayName=Comp.displayName||Comp.name||Comp.constructor&&Comp.constructor.name||'Component';// Assign Comp to C.WrappedComponent so we can access the inner component in tests // For example, <Field.WrappedComponent /> gets us <FieldInner/> C.WrappedComponent=Comp;C.displayName="FormikConnect("+componentDisplayName+")";return hoistNonReactStatics_cjs(C,Comp// cast type to ComponentClass (even if SFC) );}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function withFormik(_ref) {\n var _ref$mapPropsToValues = _ref.mapPropsToValues,\n mapPropsToValues = _ref$mapPropsToValues === void 0 ? function (vanillaProps) {\n var val = {};\n\n for (var k in vanillaProps) {\n if (vanillaProps.hasOwnProperty(k) && typeof vanillaProps[k] !== 'function') {\n // @todo TypeScript fix\n val[k] = vanillaProps[k];\n }\n }\n\n return val;\n } : _ref$mapPropsToValues,\n config = _objectWithoutPropertiesLoose(_ref, [\"mapPropsToValues\"]);\n\n return function createFormik(Component$1) {\n var componentDisplayName = Component$1.displayName || Component$1.name || Component$1.constructor && Component$1.constructor.name || 'Component';\n /**\r\n * We need to use closures here for to provide the wrapped component's props to\r\n * the respective withFormik config methods.\r\n */\n\n var C = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(C, _React$Component);\n\n function C() {\n var _this;\n\n _this = _React$Component.apply(this, arguments) || this;\n\n _this.validate = function (values) {\n return config.validate(values, _this.props);\n };\n\n _this.validationSchema = function () {\n return formik_esm_isFunction(config.validationSchema) ? config.validationSchema(_this.props) : config.validationSchema;\n };\n\n _this.handleSubmit = function (values, actions) {\n return config.handleSubmit(values, _extends({}, actions, {\n props: _this.props\n }));\n };\n /**\r\n * Just avoiding a render callback for perf here\r\n */\n\n\n _this.renderFormComponent = function (formikProps) {\n return createElement(Component$1, Object.assign({}, _this.props, formikProps));\n };\n\n return _this;\n }\n\n var _proto = C.prototype;\n\n _proto.render = function render() {\n var _this$props = this.props,\n props = _objectWithoutPropertiesLoose(_this$props, [\"children\"]);\n\n return createElement(Formik, Object.assign({}, props, config, {\n validate: config.validate && this.validate,\n validationSchema: config.validationSchema && this.validationSchema,\n initialValues: mapPropsToValues(this.props),\n initialStatus: config.mapPropsToStatus && config.mapPropsToStatus(this.props),\n initialErrors: config.mapPropsToErrors && config.mapPropsToErrors(this.props),\n initialTouched: config.mapPropsToTouched && config.mapPropsToTouched(this.props),\n onSubmit: this.handleSubmit,\n children: this.renderFormComponent\n }));\n };\n\n return C;\n }(Component);\n\n C.displayName = \"WithFormik(\" + componentDisplayName + \")\";\n return hoistNonReactStatics(C, Component$1 // cast type to ComponentClass (even if SFC)\n );\n };\n}", "function withFormik(_ref) {\n var _ref$mapPropsToValues = _ref.mapPropsToValues,\n mapPropsToValues = _ref$mapPropsToValues === void 0 ? function (vanillaProps) {\n var val = {};\n\n for (var k in vanillaProps) {\n if (vanillaProps.hasOwnProperty(k) && typeof vanillaProps[k] !== 'function') {\n // @todo TypeScript fix\n val[k] = vanillaProps[k];\n }\n }\n\n return val;\n } : _ref$mapPropsToValues,\n config = _objectWithoutPropertiesLoose(_ref, [\"mapPropsToValues\"]);\n\n return function createFormik(Component$1) {\n var componentDisplayName = Component$1.displayName || Component$1.name || Component$1.constructor && Component$1.constructor.name || 'Component';\n /**\r\n * We need to use closures here for to provide the wrapped component's props to\r\n * the respective withFormik config methods.\r\n */\n\n var C = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(C, _React$Component);\n\n function C() {\n var _this;\n\n _this = _React$Component.apply(this, arguments) || this;\n\n _this.validate = function (values) {\n return config.validate(values, _this.props);\n };\n\n _this.validationSchema = function () {\n return isFunction(config.validationSchema) ? config.validationSchema(_this.props) : config.validationSchema;\n };\n\n _this.handleSubmit = function (values, actions) {\n return config.handleSubmit(values, _extends({}, actions, {\n props: _this.props\n }));\n };\n /**\r\n * Just avoiding a render callback for perf here\r\n */\n\n\n _this.renderFormComponent = function (formikProps) {\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Component$1, Object.assign({}, _this.props, formikProps));\n };\n\n return _this;\n }\n\n var _proto = C.prototype;\n\n _proto.render = function render() {\n var _this$props = this.props,\n props = _objectWithoutPropertiesLoose(_this$props, [\"children\"]);\n\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Formik, Object.assign({}, props, config, {\n validate: config.validate && this.validate,\n validationSchema: config.validationSchema && this.validationSchema,\n initialValues: mapPropsToValues(this.props),\n initialStatus: config.mapPropsToStatus && config.mapPropsToStatus(this.props),\n initialErrors: config.mapPropsToErrors && config.mapPropsToErrors(this.props),\n initialTouched: config.mapPropsToTouched && config.mapPropsToTouched(this.props),\n onSubmit: this.handleSubmit,\n children: this.renderFormComponent\n }));\n };\n\n return C;\n }(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\n C.displayName = \"WithFormik(\" + componentDisplayName + \")\";\n return hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_3___default()(C, Component$1 // cast type to ComponentClass (even if SFC)\n );\n };\n}", "function withFormik(_ref) {\n var _ref$mapPropsToValues = _ref.mapPropsToValues,\n mapPropsToValues = _ref$mapPropsToValues === void 0 ? function (vanillaProps) {\n var val = {};\n\n for (var k in vanillaProps) {\n if (vanillaProps.hasOwnProperty(k) && typeof vanillaProps[k] !== 'function') {\n // @todo TypeScript fix\n val[k] = vanillaProps[k];\n }\n }\n\n return val;\n } : _ref$mapPropsToValues,\n config = _objectWithoutPropertiesLoose(_ref, [\"mapPropsToValues\"]);\n\n return function createFormik(Component$1) {\n var componentDisplayName = Component$1.displayName || Component$1.name || Component$1.constructor && Component$1.constructor.name || 'Component';\n /**\r\n * We need to use closures here for to provide the wrapped component's props to\r\n * the respective withFormik config methods.\r\n */\n\n var C =\n /*#__PURE__*/\n function (_React$Component) {\n _inheritsLoose(C, _React$Component);\n\n function C() {\n var _this;\n\n _this = _React$Component.apply(this, arguments) || this;\n\n _this.validate = function (values) {\n return config.validate(values, _this.props);\n };\n\n _this.validationSchema = function () {\n return isFunction(config.validationSchema) ? config.validationSchema(_this.props) : config.validationSchema;\n };\n\n _this.handleSubmit = function (values, actions) {\n return config.handleSubmit(values, _extends({}, actions, {\n props: _this.props\n }));\n };\n /**\r\n * Just avoiding a render callback for perf here\r\n */\n\n\n _this.renderFormComponent = function (formikProps) {\n return Object(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(Component$1, Object.assign({}, _this.props, formikProps));\n };\n\n return _this;\n }\n\n var _proto = C.prototype;\n\n _proto.render = function render() {\n var _this$props = this.props,\n props = _objectWithoutPropertiesLoose(_this$props, [\"children\"]);\n\n return Object(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(Formik, Object.assign({}, props, config, {\n validate: config.validate && this.validate,\n validationSchema: config.validationSchema && this.validationSchema,\n initialValues: mapPropsToValues(this.props),\n initialStatus: config.mapPropsToStatus && config.mapPropsToStatus(this.props),\n initialErrors: config.mapPropsToErrors && config.mapPropsToErrors(this.props),\n initialTouched: config.mapPropsToTouched && config.mapPropsToTouched(this.props),\n onSubmit: this.handleSubmit,\n children: this.renderFormComponent\n }));\n };\n\n return C;\n }(react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]);\n\n C.displayName = \"WithFormik(\" + componentDisplayName + \")\";\n return hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_8___default()(C, Component$1 // cast type to ComponentClass (even if SFC)\n );\n };\n}", "function withFormik(_ref) {\n var _ref$mapPropsToValues = _ref.mapPropsToValues,\n mapPropsToValues = _ref$mapPropsToValues === void 0 ? function (vanillaProps) {\n var val = {};\n\n for (var k in vanillaProps) {\n if (vanillaProps.hasOwnProperty(k) && typeof vanillaProps[k] !== 'function') {\n // @todo TypeScript fix\n val[k] = vanillaProps[k];\n }\n }\n\n return val;\n } : _ref$mapPropsToValues,\n config = _objectWithoutPropertiesLoose(_ref, [\"mapPropsToValues\"]);\n\n return function createFormik(Component) {\n var componentDisplayName = Component.displayName || Component.name || Component.constructor && Component.constructor.name || 'Component';\n /**\r\n * We need to use closures here for to provide the wrapped component's props to\r\n * the respective withFormik config methods.\r\n */\n\n var C = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(C, _React$Component);\n\n function C() {\n var _this;\n\n _this = _React$Component.apply(this, arguments) || this;\n\n _this.validate = function (values) {\n return config.validate(values, _this.props);\n };\n\n _this.validationSchema = function () {\n return isFunction(config.validationSchema) ? config.validationSchema(_this.props) : config.validationSchema;\n };\n\n _this.handleSubmit = function (values, actions) {\n return config.handleSubmit(values, _extends({}, actions, {\n props: _this.props\n }));\n };\n /**\r\n * Just avoiding a render callback for perf here\r\n */\n\n\n _this.renderFormComponent = function (formikProps) {\n return React.createElement(Component, Object.assign({}, _this.props, formikProps));\n };\n\n return _this;\n }\n\n var _proto = C.prototype;\n\n _proto.render = function render() {\n var _this$props = this.props,\n props = _objectWithoutPropertiesLoose(_this$props, [\"children\"]);\n\n return React.createElement(Formik, Object.assign({}, props, config, {\n validate: config.validate && this.validate,\n validationSchema: config.validationSchema && this.validationSchema,\n initialValues: mapPropsToValues(this.props),\n initialStatus: config.mapPropsToStatus && config.mapPropsToStatus(this.props),\n initialErrors: config.mapPropsToErrors && config.mapPropsToErrors(this.props),\n initialTouched: config.mapPropsToTouched && config.mapPropsToTouched(this.props),\n onSubmit: this.handleSubmit,\n children: this.renderFormComponent\n }));\n };\n\n return C;\n }(React.Component);\n\n C.displayName = \"WithFormik(\" + componentDisplayName + \")\";\n return hoistNonReactStatics(C, Component // cast type to ComponentClass (even if SFC)\n );\n };\n}", "function withFormik(_ref) {\n var _ref$mapPropsToValues = _ref.mapPropsToValues,\n mapPropsToValues = _ref$mapPropsToValues === void 0 ? function (vanillaProps) {\n var val = {};\n\n for (var k in vanillaProps) {\n if (vanillaProps.hasOwnProperty(k) && typeof vanillaProps[k] !== 'function') {\n // @todo TypeScript fix\n val[k] = vanillaProps[k];\n }\n }\n\n return val;\n } : _ref$mapPropsToValues,\n config = _objectWithoutPropertiesLoose(_ref, [\"mapPropsToValues\"]);\n\n return function createFormik(Component$1) {\n var componentDisplayName = Component$1.displayName || Component$1.name || Component$1.constructor && Component$1.constructor.name || 'Component';\n /**\n * We need to use closures here for to provide the wrapped component's props to\n * the respective withFormik config methods.\n */\n\n var C = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(C, _React$Component);\n\n function C() {\n var _this;\n\n _this = _React$Component.apply(this, arguments) || this;\n\n _this.validate = function (values) {\n return config.validate(values, _this.props);\n };\n\n _this.validationSchema = function () {\n return isFunction(config.validationSchema) ? config.validationSchema(_this.props) : config.validationSchema;\n };\n\n _this.handleSubmit = function (values, actions) {\n return config.handleSubmit(values, _extends({}, actions, {\n props: _this.props\n }));\n };\n /**\n * Just avoiding a render callback for perf here\n */\n\n\n _this.renderFormComponent = function (formikProps) {\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Component$1, Object.assign({}, _this.props, formikProps));\n };\n\n return _this;\n }\n\n var _proto = C.prototype;\n\n _proto.render = function render() {\n var _this$props = this.props,\n props = _objectWithoutPropertiesLoose(_this$props, [\"children\"]);\n\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Formik, Object.assign({}, props, config, {\n validate: config.validate && this.validate,\n validationSchema: config.validationSchema && this.validationSchema,\n initialValues: mapPropsToValues(this.props),\n initialStatus: config.mapPropsToStatus && config.mapPropsToStatus(this.props),\n initialErrors: config.mapPropsToErrors && config.mapPropsToErrors(this.props),\n initialTouched: config.mapPropsToTouched && config.mapPropsToTouched(this.props),\n onSubmit: this.handleSubmit,\n children: this.renderFormComponent\n }));\n };\n\n return C;\n }(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\n C.displayName = \"WithFormik(\" + componentDisplayName + \")\";\n return hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_3___default()(C, Component$1 // cast type to ComponentClass (even if SFC)\n );\n };\n}", "function withFormik(_ref) {\n var _ref$mapPropsToValues = _ref.mapPropsToValues,\n mapPropsToValues = _ref$mapPropsToValues === void 0 ? function (vanillaProps) {\n var val = {};\n\n for (var k in vanillaProps) {\n if (vanillaProps.hasOwnProperty(k) && typeof vanillaProps[k] !== 'function') {\n // @todo TypeScript fix\n val[k] = vanillaProps[k];\n }\n }\n\n return val;\n } : _ref$mapPropsToValues,\n config = _objectWithoutPropertiesLoose(_ref, [\"mapPropsToValues\"]);\n\n return function createFormik(Component$1) {\n var componentDisplayName = Component$1.displayName || Component$1.name || Component$1.constructor && Component$1.constructor.name || 'Component';\n /**\n * We need to use closures here for to provide the wrapped component's props to\n * the respective withFormik config methods.\n */\n\n var C = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(C, _React$Component);\n\n function C() {\n var _this;\n\n _this = _React$Component.apply(this, arguments) || this;\n\n _this.validate = function (values) {\n return config.validate(values, _this.props);\n };\n\n _this.validationSchema = function () {\n return isFunction(config.validationSchema) ? config.validationSchema(_this.props) : config.validationSchema;\n };\n\n _this.handleSubmit = function (values, actions) {\n return config.handleSubmit(values, _extends({}, actions, {\n props: _this.props\n }));\n };\n /**\n * Just avoiding a render callback for perf here\n */\n\n\n _this.renderFormComponent = function (formikProps) {\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Component$1, Object.assign({}, _this.props, formikProps));\n };\n\n return _this;\n }\n\n var _proto = C.prototype;\n\n _proto.render = function render() {\n var _this$props = this.props,\n props = _objectWithoutPropertiesLoose(_this$props, [\"children\"]);\n\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Formik, Object.assign({}, props, config, {\n validate: config.validate && this.validate,\n validationSchema: config.validationSchema && this.validationSchema,\n initialValues: mapPropsToValues(this.props),\n initialStatus: config.mapPropsToStatus && config.mapPropsToStatus(this.props),\n initialErrors: config.mapPropsToErrors && config.mapPropsToErrors(this.props),\n initialTouched: config.mapPropsToTouched && config.mapPropsToTouched(this.props),\n onSubmit: this.handleSubmit,\n children: this.renderFormComponent\n }));\n };\n\n return C;\n }(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\n C.displayName = \"WithFormik(\" + componentDisplayName + \")\";\n return hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_3___default()(C, Component$1 // cast type to ComponentClass (even if SFC)\n );\n };\n}", "function connect(Comp) {\n var C = function C(props) {\n return Object(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(FormikConsumer, null, function (formik) {\n !!!formik ? true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(false, \"Formik context is undefined, please verify you are rendering <Form>, <Field>, <FastField>, <FieldArray>, or your custom context-using component as a child of a <Formik> component. Component name: \" + Comp.name) : undefined : void 0;\n return Object(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(Comp, Object.assign({}, props, {\n formik: formik\n }));\n });\n };\n\n var componentDisplayName = Comp.displayName || Comp.name || Comp.constructor && Comp.constructor.name || 'Component'; // Assign Comp to C.WrappedComponent so we can access the inner component in tests\n // For example, <Field.WrappedComponent /> gets us <FieldInner/>\n\n C.WrappedComponent = Comp;\n C.displayName = \"FormikConnect(\" + componentDisplayName + \")\";\n return hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_8___default()(C, Comp // cast type to ComponentClass (even if SFC)\n );\n}", "function connect(Comp) {\n var C = function C(props) {\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(FormikConsumer, null, function (formik) {\n !!!formik ? true ? (0,tiny_warning__WEBPACK_IMPORTED_MODULE_6__.default)(false, \"Formik context is undefined, please verify you are rendering <Form>, <Field>, <FastField>, <FieldArray>, or your custom context-using component as a child of a <Formik> component. Component name: \" + Comp.name) : 0 : void 0;\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Comp, Object.assign({}, props, {\n formik: formik\n }));\n });\n };\n\n var componentDisplayName = Comp.displayName || Comp.name || Comp.constructor && Comp.constructor.name || 'Component'; // Assign Comp to C.WrappedComponent so we can access the inner component in tests\n // For example, <Field.WrappedComponent /> gets us <FieldInner/>\n\n C.WrappedComponent = Comp;\n C.displayName = \"FormikConnect(\" + componentDisplayName + \")\";\n return hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_3___default()(C, Comp // cast type to ComponentClass (even if SFC)\n );\n}", "function connect(Comp) {\n var C = function C(props) {\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(FormikConsumer, null, function (formik) {\n !!!formik ? true ? (0,tiny_warning__WEBPACK_IMPORTED_MODULE_6__.default)(false, \"Formik context is undefined, please verify you are rendering <Form>, <Field>, <FastField>, <FieldArray>, or your custom context-using component as a child of a <Formik> component. Component name: \" + Comp.name) : 0 : void 0;\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Comp, Object.assign({}, props, {\n formik: formik\n }));\n });\n };\n\n var componentDisplayName = Comp.displayName || Comp.name || Comp.constructor && Comp.constructor.name || 'Component'; // Assign Comp to C.WrappedComponent so we can access the inner component in tests\n // For example, <Field.WrappedComponent /> gets us <FieldInner/>\n\n C.WrappedComponent = Comp;\n C.displayName = \"FormikConnect(\" + componentDisplayName + \")\";\n return hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_3___default()(C, Comp // cast type to ComponentClass (even if SFC)\n );\n}", "function connect(Comp) {\n var C = function C(props) {\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(FormikConsumer, null, function (formik) {\n !!!formik ? true ? (0,tiny_warning__WEBPACK_IMPORTED_MODULE_6__.default)(false, \"Formik context is undefined, please verify you are rendering <Form>, <Field>, <FastField>, <FieldArray>, or your custom context-using component as a child of a <Formik> component. Component name: \" + Comp.name) : 0 : void 0;\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Comp, Object.assign({}, props, {\n formik: formik\n }));\n });\n };\n\n var componentDisplayName = Comp.displayName || Comp.name || Comp.constructor && Comp.constructor.name || 'Component'; // Assign Comp to C.WrappedComponent so we can access the inner component in tests\n // For example, <Field.WrappedComponent /> gets us <FieldInner/>\n\n C.WrappedComponent = Comp;\n C.displayName = \"FormikConnect(\" + componentDisplayName + \")\";\n return hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_3___default()(C, Comp // cast type to ComponentClass (even if SFC)\n );\n}", "function connect(Comp) {\n var C = function C(props) {\n return React.createElement(FormikConsumer, null, function (formik) {\n !!!formik ? invariant(false, \"Formik context is undefined, please verify you are rendering <Form>, <Field>, <FastField>, <FieldArray>, or your custom context-using component as a child of a <Formik> component. Component name: \" + Comp.name) : void 0;\n return React.createElement(Comp, Object.assign({}, props, {\n formik: formik\n }));\n });\n };\n\n var componentDisplayName = Comp.displayName || Comp.name || Comp.constructor && Comp.constructor.name || 'Component'; // Assign Comp to C.WrappedComponent so we can access the inner component in tests\n // For example, <Field.WrappedComponent /> gets us <FieldInner/>\n\n C.WrappedComponent = Comp;\n C.displayName = \"FormikConnect(\" + componentDisplayName + \")\";\n return hoistNonReactStatics(C, Comp // cast type to ComponentClass (even if SFC)\n );\n}", "function App() {\n return (\n <div className=\"App\">\n {/* <Form/> */}\n {/* <Formik/> */}\n </div>\n );\n}", "function CheckoutFormProvider({ children }) {\n /**\n * This will hold the initial graphql response data.\n * This will be later used by individual form section in order update their initivalues.\n */\n const [initialData, setInitialData] = useState(null);\n /**\n * Controls formik reinitialization. By default, it is enabled.\n * If in case, the formik states reinitialization needs to be turne off, this feature can be used.\n */\n const [enableReinitialize, setEnableReinitialize] = useState(true);\n /**\n * Holds individual form sections which constitutes the entire checkout-form-formik\n */\n const [sections, updateSections] = useState([]);\n\n /**\n * if any of the payment method has any custom action needs to be carried out\n * during \"Place Order\" action, then it must be added here\n */\n const [paymentActionList, setPaymentActions] = useState({});\n\n const { placeOrder } = useCartContext();\n const { setPageLoader } = useAppContext();\n\n /**\n * Init value of checkout-form-formik\n *\n * It will be the combined object of each individual form sections which\n * are registered to this provider.\n *\n * So the whole initValues would be represented like:\n * {\n * [form_section_id]: { ...form_section_init_values},\n * [form_section_id]: { ...form_section_init_values},\n * }\n */\n const formInitialValues = useMemo(\n () => prepareFormInitValues(sections),\n [sections]\n );\n\n /**\n * ValidationSchema of checkout-form-formik\n *\n * If there is no activeForm, then the validationSchema equals to the combined\n * validationSchema of each individual form section which are registered with\n * this provider\n *\n * If there is a valid activeForm, then the validationSchema represent the\n * validationSchema of the active form section.\n */\n const formValidationSchema = useMemo(\n () => prepareFormValidationSchema(sections),\n [sections]\n );\n\n const formSubmit = useCallback(\n async (values) => {\n try {\n setPageLoader(true);\n const order = await placeOrder(values, paymentActionList);\n\n const orderNumber = _get(order, 'order_number');\n\n if (orderNumber && config.isProductionMode) {\n LocalStorage.clearCheckoutStorage();\n window.location.replace(config.successPageRedirectUrl);\n }\n\n if (orderNumber && config.isDevelopmentMode) {\n LocalStorage.clearCheckoutStorage();\n }\n setPageLoader(false);\n } catch (error) {\n console.error(error);\n setPageLoader(false);\n }\n },\n [setPageLoader, paymentActionList, placeOrder]\n );\n\n /**\n * This will help any custom payment method renderer component to register\n * a custom payment action. Custom payment action will be triggered when\n * the place order happens.\n */\n const registerPaymentAction = useCallback(\n (paymentMethodCode, paymentMethodAction) => {\n setPaymentActions((actions) => ({\n ...actions,\n [paymentMethodCode]: paymentMethodAction,\n }));\n },\n [setPaymentActions]\n );\n\n /**\n * This will register individual form sections to the checkout-form-formik\n */\n const registerFormSection = useCallback((section) => {\n updateSections((prevSections) => {\n const sectionIds = prevSections.map((prevSection) => prevSection.id);\n\n // new section, so append the section.\n if (!sectionIds.includes(section.id)) {\n return [...prevSections, section];\n }\n\n // Already existing section. So update the individual section with latest section data.\n const sectionIndex = _findIndexById(prevSections, section.id);\n const newSections = [...prevSections];\n const newSectionData = { ...prevSections[sectionIndex], ...section };\n _set(newSections, sectionIndex, newSectionData);\n\n return newSections;\n });\n }, []);\n\n const formik = useFormik({\n enableReinitialize,\n onSubmit: formSubmit,\n initialValues: formInitialValues,\n validationSchema: formValidationSchema,\n });\n\n const context = useMemo(\n () => ({\n registerFormSection,\n setEnableReinitialize,\n registerPaymentAction,\n submitHandler: formSubmit,\n aggregatedData: initialData,\n storeAggregatedFormStates: setInitialData,\n checkoutFormValidationSchema: formValidationSchema,\n }),\n [\n formSubmit,\n initialData,\n registerFormSection,\n formValidationSchema,\n registerPaymentAction,\n ]\n );\n\n return (\n <CheckoutFormContext.Provider value={context}>\n <FormikProvider value={formik}>{children}</FormikProvider>\n </CheckoutFormContext.Provider>\n );\n}", "function connect(Comp) {\n var C = function C(props) {\n return (0,react.createElement)(FormikConsumer, null, function (formik) {\n !!!formik ? false ? 0 : tiny_warning_esm(false) : void 0;\n return (0,react.createElement)(Comp, Object.assign({}, props, {\n formik: formik\n }));\n });\n };\n\n var componentDisplayName = Comp.displayName || Comp.name || Comp.constructor && Comp.constructor.name || 'Component'; // Assign Comp to C.WrappedComponent so we can access the inner component in tests\n // For example, <Field.WrappedComponent /> gets us <FieldInner/>\n\n C.WrappedComponent = Comp;\n C.displayName = \"FormikConnect(\" + componentDisplayName + \")\";\n return hoist_non_react_statics_cjs_default()(C, Comp // cast type to ComponentClass (even if SFC)\n );\n}", "formInputAction(formInput){\n this.props.useFormInput(formInput);\n }", "function FormsComp () {\n return (\n <Card className='m-2'>\n <Card.Header>\n <h3>Login</h3>\n </Card.Header>\n <Form className='m-3'> \n <Form.Group controlId='basicEmail'>\n <Form.Label>Email Address:</Form.Label>\n <Form.Control type='email' placeHolder='Enter Email'/>\n <Form.Text cassName='text-mute'>\n Some intructions here\n </Form.Text>\n </Form.Group>\n\n <Form.Group controlId='basicPasswd'>\n <Form.Label>Password:</Form.Label>\n <Form.Control type='password' placeHolder='Password'/>\n </Form.Group>\n <Button variant='secondary' type='submit'>\n Submit\n </Button>\n </Form>\n </Card>\n )\n}", "function ProvideContexts(Story) {\n return (\n <Providers>\n <FormProvider {...useForm()}>\n <Story />\n </FormProvider>\n </Providers>\n )\n}", "render() {\n const { handleSubmit } = this.props; // reduxForm function\n\n return (\n <form onSubmit={handleSubmit(this.onSubmit.bind(this))}>\n <Field\n label=\"Title\"\n name=\"title\"\n component={this.renderField}\n />\n <Field\n label=\"Categories\"\n name=\"categories\"\n component={this.renderField}\n />\n <Field\n label=\"Content\"\n name=\"content\"\n component={this.renderField}\n />\n <button type=\"submit\" className=\"btn btn-primary\">Submit</button>\n <Link to=\"/\" className=\"btn btn-danger\">Cancel</Link>\n </form>\n );\n }", "function connectForm(reduxFormParams, params = {}) {\n\n const {\n disableFieldsOnSubmit = true,\n onFieldSubmit = null,\n shouldSubmit = null,\n connectReduxForm = reduxForm,\n } = params\n\n return (Component) => {\n const componentName = getDisplayName(Component)\n const displayName = `FormWrapper(${componentName})`\n const formParams = _populateParams(componentName, reduxFormParams, params)\n\n @connectReduxForm(formParams)\n class FormWrapper extends React.Component {\n\n static displayName = displayName\n\n static propTypes = {\n fields: React.PropTypes.object.isRequired,\n submitting: React.PropTypes.bool.isRequired,\n }\n\n componentWillMount() {\n this._updateFields(this.props)\n }\n\n componentWillReceiveProps(nextProps) {\n const shouldUpdateFields = (\n nextProps.submitting != this.props.submitting\n )\n\n if (shouldUpdateFields) {\n this._updateFields(nextProps)\n }\n }\n\n _updateFields(props) {\n _.each(props.fields, (field, name) => {\n field.name = name\n field.disabled = (disableFieldsOnSubmit && !! props.submitting)\n field.submit = (onFieldSubmit ? this._onFieldSubmit : null)\n })\n }\n\n render() {\n return (\n <Component\n {...this.props}\n submit={this._submit}\n />\n )\n }\n\n /**\n * Shortcut to simplify using of `handleSubmit`.\n *\n * @example\n *\n * // Usually, when you have some special submitting logic\n * // you are doing this\n * const submit = this.props.handleSubmit(() => {\n * // some submitting logic\n * })\n *\n * submit()\n *\n * // But now you can do this\n * this.props.submit(() => {\n * // some submitting logic\n * })\n *\n * @param {Function} callback Will be passed to the `handleSubmit`\n * @private\n */\n _submit = (callback) => {\n if (!shouldSubmit || shouldSubmit(this.props)) {\n const submit = this.props.handleSubmit(callback)\n submit()\n }\n }\n\n /**\n * If the `onFieldSubmit` parameter was defined,\n * then this callback will be passed as the `submit`\n * property to every field.\n *\n * @private\n */\n _onFieldSubmit = () => {\n // We delay the submitting, because the `change`\n // action is dispatched after this function,\n // and `values` in the state is not actual.\n _.delay(() => {\n this._submit(() => onFieldSubmit(this.props))\n })\n }\n }\n\n return FormWrapper\n }\n}", "getExposedConfig() {\n const {form} = this.props.form;\n return {\n form\n }\n }", "function PollForm({ registerVote }) {\n const classes = useStyles();\n\n // Poll radio select value\n const [value, setValue] = useState(\"\");\n\n // Get poll settings from context store\n const { pollQuestion, pollOptions } = useContext(PollContext);\n\n // Passes the select poll option to the higher component and resets the voting form\n const handleVote = (e) => {\n e.preventDefault();\n registerVote(value);\n setValue(\"\");\n };\n\n // return an empty component if poll settings context is empty\n if (!pollOptions) return null;\n return (\n <Paper className={classes.paper}>\n <FormControl component=\"fieldset\">\n <FormLabel component=\"legend\"> {pollQuestion}</FormLabel>\n <RadioGroup\n aria-label=\"gender\"\n name=\"gender1\"\n value={value}\n onChange={(e) => setValue(e.target.value)}\n >\n {pollOptions.map(({ title }, index) => (\n <FormControlLabel\n key={index}\n value={index.toString()}\n control={<Radio />}\n label={title}\n />\n ))}\n </RadioGroup>\n <Button\n type=\"submit\"\n variant=\"contained\"\n color=\"primary\"\n onClick={handleVote}\n >\n Vote\n </Button>\n </FormControl>\n </Paper>\n );\n}", "function mapStateToProps({ form: { personalForm } }) {\n return {\n formValues: personalForm\n };\n}", "componentDidMount() {\n this.onFormSubmit('Pizza Hut');\n }", "render() {\n const {t, engine, error, currentDataset, datasets, currentPronDict, pronDicts, modelNew} = this.props;\n /**\n * If we have a current dataset or pron-dict, pre-select them in the form,\n * else preselect the first item in each list.\n * This allows the values to be passed to onsubmit without having to explicitly select either\n */\n let defaultDatasetName = \"\";\n\n if (currentDataset) {\n defaultDatasetName = currentDataset;\n } else if (datasets.length > 0) {\n defaultDatasetName = datasets[0];\n }\n\n let defaultPronDictName = \"\";\n\n if (currentPronDict) {\n defaultPronDictName = currentPronDict;\n } else if (pronDicts.length > 0) {\n defaultPronDictName = pronDicts[0].name;\n }\n\n return (\n <Formik\n enableReinitialize\n initialValues={{\n name: \"m\",\n dataset_name: defaultDatasetName,\n pron_dict_name: defaultPronDictName,\n }}\n validate={values => {\n let errors = {};\n\n if (!values.name) {\n errors.name = \"Required\";\n } else if (\n !/^[ 0-9a-zA-Z\\-_@]+$/i.test(values.name)\n ) {\n errors.name = t(\"common.invalidCharacterErrorMessage\");\n }\n\n return errors;\n }}\n onSubmit={(values) => {\n const filtered_pd = pronDicts.filter(pd => (pd.name === values.pron_dict_name));\n const modelData = {name: values.name, engine};\n\n if (engine === \"kaldi\"){\n // Get the dataset name from the pron dicts setting if we are using Kaldi\n modelData[\"pron_dict_name\"] = filtered_pd[0].name;\n modelData[\"dataset_name\"] = filtered_pd[0].dataset_name;\n } else {\n // Non-kaldi, use the specified dataset\n modelData[\"dataset_name\"] = values.dataset_name;\n }\n\n modelNew(modelData, this.props.history, urls.gui.model.settings);\n }}\n >\n {({\n values,\n handleSubmit,\n handleChange,\n /* and other goodies */\n }) => (\n <Form onSubmit={handleSubmit}>\n <Form.Field>\n <Input\n label={t(\"model.new.nameLabel\")}\n value={values.name}\n placeholder={t(\"model.new.namePlaceholder\")}\n name=\"name\"\n type=\"text\"\n onChange={handleChange}\n />\n <ErrorMessage component=\"div\" className=\"error\" name=\"name\" />\n </Form.Field>\n {/* For Kaldi engines, base the model on the pron dict.\n Pron dicts have single dataset dependency */}\n {engine && engine === \"kaldi\" &&\n <Form.Field>\n <label>{t(\"model.new.selectPronDictLabel\")}</label>\n <Field component=\"select\" name=\"pron_dict_name\" disabled={pronDicts.length === 0}>\n {pronDicts.map(pronDict => (\n <option key={pronDict.name} value={pronDict.name}>\n {pronDict.name} | {pronDict.dataset_name}\n </option>\n ))}\n </Field>\n </Form.Field>\n }\n {/* If the engine is not Kaldi, base the model on a dataset only */}\n {engine && engine !== \"kaldi\" &&\n <Form.Field>\n <label>{t(\"model.new.selectDatasetLabel\")}</label>\n <Field component=\"select\" name=\"dataset_name\" disabled={datasets.length === 0}>\n {datasets.map(dataset => (\n <option key={dataset} value={dataset}>\n {dataset}\n </option>\n ))}\n </Field>\n </Form.Field>\n }\n {error &&\n <p className={\"error-message\"}>{error}</p>\n }\n {engine && engine === \"kaldi\" &&\n <Button type=\"button\" onClick={handleSubmit} disabled={pronDicts.length === 0}>\n {t(\"common.addNewButton\")}\n </Button>\n } \n {engine && engine !== \"kaldi\" &&\n <Button type=\"button\" onClick={handleSubmit} disabled={datasets.length === 0}>\n {t(\"common.addNewButton\")}\n </Button>\n } \n </Form>\n )}\n </Formik>\n );\n }", "function App() {\n // TODO: add a const called formik assigned to useFormik()\n const formik = useFormik({\n initialValues: {\n emailField: '',\n pswField: '', \n },\n onSubmit: values =>{\n console.log('form:', values);\n alert(JSON.stringify('Login Successful'));\n },\n validate: values =>{\n let errors = {};\n if(!values.emailField) {\n errors.emailField = 'Field required';\n } else if (!/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$/i.test(values.emailField)) {\n errors.emailField = 'Invalid email address';\n }\n \n if(!values.pswField) errors.pswField = 'Field required';\n return errors;\n }\n });\n return (\n <div>\n <form onSubmit={formik.handleSubmit}>\n <div>Username:</div>\n <input type=\"text\" name=\"emailField\" onChange={formik.handleChange} value={formik.values.emailField}/>\n {formik.errors.emailField ? <div id=\"emailError\" style={{color:'red'}}>{formik.errors.emailField}</div>: null} \n <div>Password:</div>\n <input type=\"text\" name=\"pswField\" onChange={formik.handleChange} value={formik.values.pswField}/>\n {formik.errors.pswField ? <div id=\"pswError\" style={{color:'red'}}>{formik.errors.pswField}</div>: null} \n <br/>\n <button type=\"submit\">Submit</button>\n \n </form> \n </div>\n );\n}", "init () {\n // register default plugins\n this.apply(BasicForm.UiLibPlugin, new SchemaPlugin(), new RenderPlugin())\n\n // user defined plugins\n const plugins = this.options.plugins\n if (plugins && plugins.length > 0) {\n this.apply.apply(this, plugins)\n }\n\n /** create and render form view - without data bind */\n this.create()\n }", "function connect(Component) {\n var staticProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var fetchInitData = staticProps.fetchInitData,\n mapState = staticProps.mapState,\n mapDispatch = staticProps.mapDispatch,\n form = staticProps.form,\n formProps = staticProps.formProps;\n var oriCom = Component;\n Component = proxyHook(Component, staticProps); // supply this.props.location... etc.\n\n var WrapperComponent = (0, _i18n.withTranslation)()((0, _reactRouterDom.withRouter)((0, _reactRedux.connect)(mapState || function () {\n return {};\n }, mapDispatch)(Component))); // if form prop of the container exists, we wrap the container with reduxForm for using `redux-form` functionalities.\n\n if (form) {\n WrapperComponent = (0, _reduxForm.reduxForm)(_objectSpread({\n form: form\n }, formProps))(WrapperComponent);\n var selector = (0, _reduxForm.formValueSelector)(form);\n /* eslint-disable no-param-reassign */\n\n oriCom.getFormValues = function getFormValues(state) {\n var names = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n if (!names.length) {\n return {};\n } else if (names.length === 1) {\n var first = names[0];\n return (0, _defineProperty2[\"default\"])({}, first, selector(state, first));\n }\n\n return selector.apply(void 0, [state].concat((0, _toConsumableArray2[\"default\"])(names)));\n };\n }\n\n WrapperComponent.fetchInitData = fetchInitData;\n return WrapperComponent;\n}", "function Captcha({ key, name }) {\n const { touched, errors, setFieldValue } = useFormikContext();\n const error = touched[name] && errors[name] ? errors[name] : null;\n\n useEffect(() => {\n const script = document.createElement(\"script\");\n script.src = \"https://www.google.com/recaptcha/api.js\";\n script.async = true;\n script.defer = true;\n document.body.appendChild(script);\n }, []);\n\n return (\n <div className={classNames(\"form-group\", { error })}>\n {error && <label>{error}</label>}\n <Recaptcha\n sitekey={key}\n render=\"explicit\"\n verifyCallback={response => {\n setFieldValue(\"recaptcha\", response);\n }}\n onloadCallback={() => {}}\n />\n </div>\n );\n}", "setup(forms) {\n this.forms = forms;\n // select form to show into the devtools\n MobxReactFormDevTools.register(this.forms);\n }", "function MyForm(props) {\n const classes = useStyles();\n return (\n <Dialog\n open={props.open}\n onClose={props.handleClose}\n closeAfterTransition\n >\n <DialogContent>\n <div>\n <Formik\n initialValues={{\n name: \"\",\n description: \"\",\n }}\n onSubmit = {(values) => {props.submit(values); props.handleClose();}}\n >\n <Form width='100%'>\n <Typography fullwidth align=\"center\" className={classes.textfield}>\n ADD NEW PROJECT\n </Typography>\n <Field as={TextField}\n label=\"Name\"\n variant=\"outlined\"\n name=\"name\"\n id=\"name\"\n className={classes.textfield}\n fullWidth\n required\n />\n <Field as={TextField}\n label=\"Description\"\n variant=\"outlined\"\n name=\"description\"\n id=\"description\"\n className={classes.textfield}\n fullWidth\n />\n <Button\n type=\"submit\"\n color=\"primary\"\n variant=\"contained\"\n fullWidth\n className={classes.textfield}\n >\n Submit\n </Button>\n </Form>\n </Formik>\n </div>\n </DialogContent>\n </Dialog>\n );\n}", "setContext(context) {\n this.context = context;\n }", "render(){\n //generate props to pass to UI\n const props = this._generateProps()\n\n return( <SignupForm { ...props } submitHandler = {this.submitHandler} handleChange = {this.handleChange}/>);\n }", "componentDidMount() {\n this.props.getForm(FORMS.PASSPHRASE);\n this.props.getForm(FORMS.IDENTITY_NAME);\n }", "setForm(form) {\n this.options.form = form;\n }", "function AdminSignUp(admin) {\n\n const { values, touched, errors, handleChange, handleBlur, handleSubmit, isSubmitting } = useFormik({\n initialValues: {\n name: \"\",\n phone: \"\",\n city: \"\",\n state: \"\",\n email: \"\",\n password: \"\",\n image: \"\",\n checked: false,\n },\n validationSchenma,\n // Handles updating component state when the admin types into the input field\n onSubmit(values) {\n handleFormOnsubmit(values)\n }\n});\n \n //Function to reset the form to empty fields\n const clearForm = () => {\n window.location.reload()\n }\n \n // Does a post to the signup route. If successful, we are redirected to the login page\n // Otherwise we log errors\n function handleFormOnsubmit(evt) {\n evt.preventDefault()\n httpAdmin.signUp({\n name: values.name,\n phone: values.phone,\n city: values.city,\n state: values.state,\n email: values.email,\n password: values.password,\n image: values.image,\n checked: values.checked\n }).then(admin => {\n console.log(\"admin\", admin)\n if (admin) {\n window.location.replace(\"/admin-12152011\")\n this.props.onSignUpSuccess(admin)\n this.props.history.push('/')\n }\n $('#errorMsg').attr(\"style\", \"color:red\")\n $('#errorMsg').text(\"An error occured please review your entries\");\n return\n }).catch(err => console.log('err', err));\n \n }\n\n // render the Form and handle validations\n return (\n <>\n <Navbar />\n <form onSubmit={handleSubmit}>\n <div id='errorMsg' ></div>\n <div className=\"tile is-ancestor\">\n <div className=\"tile is vertical is-7 box\" id=\"tile\">\n\n <div className=\"tile is-parent\">\n <article className=\"tile is-child notification is-dark\">\n\n <div className=\"field\">\n <label className=\"label\">Name</label>\n <div className=\"control has-icons-left\">\n <input className=\"input\"\n type=\"text\"\n onChange={handleChange}\n onBlur={handleBlur}\n name=\"name\"\n placeholder=\"Name (required)\"\n value={values.name}\n />\n {values.name.length < 1 && touched.name && 'errors' ? (\n <p className=\"errMsg\">Please enter your name</p>\n ): ''} \n <span className=\"icon is-small is-left\">\n <i className=\"fas fa-user-astronaut\"></i>\n </span>\n </div>\n </div>\n <div className=\"field\">\n <label className=\"label\">Email</label>\n <div className=\"control has-icons-left has-icons-right\">\n <input className=\"input \" type=\"email\"\n onChange={handleChange}\n onBlur={handleBlur}\n name=\"email\"\n placeholder=\"Email (required)\"\n value={values.email} />\n {!values.email.match(emailVal) && touched.email && 'errors' ? (\n <p className=\"errMsg\">Please enter a valid Email</p>\n ): ''}\n <span className=\"icon is-small is-left\">\n <i className=\"fas fa-envelope\"></i>\n </span>\n </div>\n </div>\n <div className=\"field\">\n <label className=\"label\">Password</label>\n <div className=\"control has-icons-left\">\n <input className=\"input \" type=\"password\"\n onChange={handleChange}\n onBlur={handleBlur}\n name=\"password\"\n placeholder=\"Password (required)\"\n value={values.password} />\n {values.password.length <8 && touched.password && 'errors' ? (\n <p className=\"errMsg\">Please enter a valid Password</p>\n ): ''}\n <span className=\"icon is-small is-left\">\n <i className=\"fas fa-lock\"></i>\n </span>\n </div>\n </div>\n \n <div className=\"field\">\n <div className=\"control\">\n <label className=\"checkbox\">\n <input id=\"bluefish\" type=\"checkbox\"\n onChange={handleChange}\n onBlur={handleBlur}\n name=\"checked\"\n value={values.checked}\n />I agree to the <a href=\"#\"> terms and conditions</a>\n\n {values.checked !== true && 'errors' ? (\n <div><p className=\"errMsg\">Please check the box to enable the submit button </p></div>\n ): ''} \n \n \n </label>\n </div>\n </div>\n\n <div className=\"field is-grouped\">\n <div className=\"control\">\n <button className=\"button is-light\" \n onClick={handleFormOnsubmit} \n disabled={!values.checked && 'errors'}\n disabled={!values.phone.match(phoneno)}\n disabled={!values.email.match(emailVal)}\n id=\"twofish\"\n >Submit</button>\n </div>\n <div className=\"control\">\n <button className=\"button is-light\" \n onClick={clearForm} id=\"rainbowfish\">Cancel</button>\n </div>\n </div>\n </article>\n </div>\n </div>\n </div> \n </form>\n </>\n )\n\n}", "function connectSubmitForm (Form, submitAction, errorMsg) {\r\n return React.createClass({\r\n contextTypes: {\r\n //redux Store\r\n store: PropTypes.object.isRequired\r\n },\r\n\r\n getInitialState () {\r\n return {}\r\n },\r\n\r\n onSubmit (...args) {\r\n const { context: { store: { dispatch } } } = this\r\n const { submitAction: submit }\r\n = bindActionCreators({ submitAction }, dispatch)\r\n this.setState({ isLoading: true })\r\n submit(...args)\r\n .then(() => {\r\n this.setState({ submitted: true, isLoading: false })\r\n })\r\n .catch(() => {\r\n this.setState({ error: errorMsg, isLoading: false })\r\n })\r\n },\r\n\r\n handleCloseError() {\r\n this.setState({ error: null });\r\n },\r\n\r\n render () {\r\n const {\r\n onSubmit,\r\n props,\r\n state: { submitted, error, isLoading }\r\n } = this\r\n return (<Form {...props} onSubmit={onSubmit} submitted={submitted}\r\n error={error} onCloseError={this.handleCloseError}\r\n isLoading={isLoading} />)\r\n }\r\n })\r\n}", "function App(props) {\n const [showProfile, setProfile] = useState(false);\n const { handleSubmit } = props;\n return (\n <div className=\"App\">\n <h3>This is redux form</h3>\n <form\n onSubmit={handleSubmit((formValues) => {\n setProfile(true);\n console.log(formValues);\n })}\n >\n <label>First name</label>\n <Field type=\"text\" name=\"firstname\" component=\"input\" />\n <br />\n <label>Last name</label>\n <Field type=\"text\" name=\"lastname\" component=\"input\" />\n <br />\n <button type=\"submit\">Submit It</button>\n </form>\n {showProfile ? <Profile /> : null}\n </div>\n );\n}", "componentWillMount() {\n this.formFields = this.createFormStructure();\n }", "render() {\n return (\n <div className=\"pageWrapper\">\n <div className=\"formWrapper\">\n <form className=\"form\" onSubmit={this.handleSubmit}>\n <div>\n <label htmlFor=\"name\">What's your name?</label>\n <input type=\"text\" id=\"name\" name=\"name\" />\n </div>\n <div>\n <p>Which of the following technologies have you used?</p>\n <div>\n <input type=\"checkbox\" id=\"react\" name=\"react\" value=\"react\" />\n <label htmlFor=\"react\">React</label>\n </div>\n <div>\n <input type=\"checkbox\" id=\"redux\" name=\"redux\" value=\"redux\" />\n <label htmlFor=\"redux\">Redux</label>\n </div>\n <div>\n <input\n type=\"checkbox\"\n id=\"formik\"\n name=\"formik\"\n value=\"formik\"\n />\n <label htmlFor=\"formik\">Formik</label>\n </div>\n <div>\n <input\n type=\"checkbox\"\n id=\"graphQL\"\n name=\"graphQL\"\n value=\"graphQL\"\n />\n <label htmlFor=\"graphQL\">GraphQL</label>\n </div>\n <div>\n <input type=\"checkbox\" id=\"node\" name=\"node\" value=\"node\" />\n <label htmlFor=\"node\">Node</label>\n </div>\n <div>\n <input\n type=\"checkbox\"\n id=\"reactNative\"\n name=\"reactNative\"\n value=\"reactNative\"\n />\n <label htmlFor=\"reactNative\">ReactNative</label>\n </div>\n </div>\n <button className=\"submitButton\" type=\"submit\">\n Submit Form\n </button>\n </form>\n </div>\n <Content />\n </div>\n );\n }", "render() {\n let fRef = null;\n return (\n <Grid id='sell-page' container centered>\n <Grid.Column>\n <AutoForm ref={ref => { fRef = ref; }} schema={bridge} onSubmit={data => this.submit(data, fRef)} >\n <Segment>\n <TextField id='sell-item-name' name='productName'/>\n <TextField id='sell-item-image' name='productImage'/>\n <LongTextField id='sell-item-description' name='description'/>\n <RadioField name='saleType' inline showInlineError={true}/>\n <SubmitField id='sell-item-submit' value='Submit'/>\n <ErrorsField/>\n </Segment>\n </AutoForm>\n </Grid.Column>\n </Grid>\n );\n }", "function RegistrationPage() {\n return (\n <div>\n <Form1 />\n </div>\n )\n}", "render() {\n const { auth, firebase } = this.state\n return (\n // provide firebase and auth for all children 🔥\n <FirebaseContext.Provider value={firebase}>\n <AuthContext.Provider value={auth}>\n {this.props.children}\n </AuthContext.Provider>\n </FirebaseContext.Provider>\n )\n }", "function FormElement(props) {\n return (\n <Form\n viewsiteId={props.viewsiteId}\n viewpageId={props.viewpageId}\n element={props.element}\n onEditElement={props.onEditElement}\n onDeleteElement={props.onDeleteElement}\n onSetGlobalState={props.onSetGlobalState}/>\n );\n}", "handleFormSubmit(formProps) {\n // call action creator to sign up user\n this.props.addArticle(formProps);\n }", "function App() {\n return (\n <div>\n <RegistrationForm />\n </div>\n );\n}", "function AddPlayer() {\n\n const [profilePic, setProfilePic] = useState();\n \n\n // Validating the form fields. \n\n function validate(values){\n const errors = {}\n if(!values.name){\n errors.name = \"Name cannot be empty!\";\n }\n if(!values.current_club){\n errors.current_club = \"Current club cannot be empty!\";\n }\n if(!values.age){\n errors.age = \"Age cannot be empty!\";\n }\n if(!values.goal){\n errors.goal = \"Goals cannot be empty!\";\n }\n if(!values.assists){\n errors.assists = \"Assists cannot be empty!\";\n }\n if(!values.position){\n errors.position = \"Position cannot be empty!\";\n }\n if(!values.debut_year){\n errors.debut_year = \"Debut Year cannot be empty!\";\n }\n if(!values.freekick_scored){\n errors.freekick_scored = \"Freekicks scored cannot be emptyquired!\";\n }\n return errors\n }\n\n // This function is used to map the local address of an image to a URL. This is used to have the preview of the image uploaded. \n function onChange(event){\n setProfilePic(URL.createObjectURL(event.target.files[0]));\n }\n\n const formik = useFormik({\n initialValues:{\n \"photo\":\"\",\n \"name\":\"\",\n \"current_club\":\"\",\n \"age\":\"\",\n \"debut_year\":\"\",\n \"prev_club\":\"\",\n \"goal\":\"\",\n \"assists\":\"\",\n \"position\":\"\",\n \"freekick_scored\":\"\"\n },\n validate,\n onSubmit : values => {\n formik.values.photo = profilePic\n alert(JSON.stringify(values, null, 2))\n },\n })\n\n // console.log(\"Test\", formik.values.photo)\n\n // console.log(\"gg\", profilePic)\n\n return (\n <div>\n <Sidebar \n text={\n <div className=\"addPlayerWrapper\">\n <div className=\"addHeading\">\n List the new player below\n </div>\n <div className=\"listNewPlayerForm\">\n <form>\n <div className=\"form\">\n <div className=\"playerImageWrapper\">\n <div className=\"previewBox\">\n {/* {console.log(\"Test\", formik.values.photo)} */}\n {profilePic ? \n // <div className=\"showProfilePic\">\n \n <img src={profilePic} alt=\"Profile Pic\" className=\"profileImg\" />\n // </div> :\n :\n // <div className=\"showAlternate\">\n <GiIcons.GiSoccerKick size=\"50px\" color=\"white\" style={{marginTop:\"75px\"}}/>\n // </div>\n }\n </div>\n <div className=\"playerImage\">\n <div className=\"photoInp\">\n <input \n name=\"photo\"\n id=\"photo\"\n type=\"file\"\n onChange={onChange}\n value={formik.values.photo}\n className=\"photoInput\"\n />\n </div>\n <div className=\"inputText\">\n Please click here to upload the photo\n </div>\n {/* {formik.errors.photo ? <div className=\"errorField\">{formik.errors.photo}</div>: null} */}\n <div className=\"formSubmitButton1\">\n <Button1 type=\"Submit\" text=\"Submit\" link=\"/add\" onClick={formik.handleSubmit} />\n </div>\n </div>\n </div>\n <div className=\"playerDetails\">\n <div className=\"twoFields\">\n <div className=\"labelInputWrapper\">\n <div className=\"label\">\n Name\n </div>\n <div className=\"detailsInput\">\n <input \n className=\"input\"\n name=\"name\"\n id=\"name\"\n type=\"text\"\n onChange={formik.handleChange}\n value={formik.values.name}\n placeholder=\"eg: Cristiano Ronaldo\"\n />\n </div>\n {formik.errors.name ? <div className=\"errorField\">{formik.errors.name}</div>: null}\n </div>\n\n <div className=\"labelInputWrapper\">\n <div className=\"label\">\n Current Club\n </div>\n <div className=\"detailsInput\">\n <input \n className=\"input\"\n name=\"current_club\"\n id=\"current_club\"\n type=\"text\"\n onChange={formik.handleChange}\n value={formik.values.current_club}\n placeholder=\"eg: Juventus\"\n />\n </div>\n {formik.errors.current_club ? <div className=\"errorField\">{formik.errors.current_club}</div>: null}\n </div> \n </div>\n\n <div className=\"twoFields\">\n <div className=\"labelInputWrapper\">\n <div className=\"label\">\n Age\n </div>\n <div className=\"detailsInput\">\n <input \n className=\"input\"\n name=\"age\"\n id=\"age\"\n type=\"number\"\n onChange={formik.handleChange}\n value={formik.values.age}\n placeholder=\"eg: 36\"\n />\n </div>\n {formik.errors.age ? <div className=\"errorField\">{formik.errors.age}</div>: null}\n </div>\n\n <div className=\"labelInputWrapper\">\n <div className=\"label\">\n Debut Year\n </div>\n <div className=\"detailsInput\">\n <input \n className=\"input\"\n name=\"debut_year\"\n id=\"debut_year\"\n type=\"number\"\n onChange={formik.handleChange}\n value={formik.values.debut_year}\n placeholder=\"eg: 2001\"\n />\n </div>\n {formik.errors.debut_year ? <div className=\"errorField\">{formik.errors.debut_year}</div>: null}\n </div>\n </div>\n\n <div className=\"twoFields\">\n <div className=\"labelInputWrapper\">\n <div className=\"label\">\n Previous Club\n </div>\n <div className=\"detailsInput\">\n <input \n className=\"input\"\n name=\"prev_club\"\n id=\"prev_club\"\n value={formik.values.prev_club}\n onChange={formik.handleChange}\n type=\"text\"\n placeholder=\"eg: Real Madrid\"\n />\n </div>\n </div>\n\n <div className=\"labelInputWrapper\">\n <div className=\"label\">\n Total Goals\n </div>\n <div className=\"detailsInput\">\n <input \n className=\"input\"\n name=\"goal\"\n id=\"goal\"\n value={formik.values.goal}\n onChange={formik.handleChange}\n type=\"number\"\n placeholder=\"eg: 780\"\n />\n </div>\n {formik.errors.goal ? <div className=\"errorField\">{formik.errors.goal}</div>: null}\n </div>\n </div>\n\n <div className=\"twoFields\">\n <div className=\"labelInputWrapper\">\n <div className=\"label\">\n Total Assists\n </div>\n <div className=\"detailsInput\">\n <input \n className=\"input\"\n name=\"assists\"\n id=\"assists\"\n value={formik.values.assists}\n onChange={formik.handleChange}\n type=\"number\"\n placeholder=\"eg:210\"\n />\n </div>\n {formik.errors.assists ? <div className=\"errorField\">{formik.errors.assists}</div>: null}\n </div>\n\n <div className=\"labelInputWrapper\">\n <div className=\"label\">\n Position\n </div>\n <div className=\"detailsInput\">\n <input \n className=\"input\"\n name=\"position\"\n id=\"position\"\n value={formik.values.position}\n onChange={formik.handleChange}\n type=\"text\"\n placeholder=\"eg: Forward\"\n />\n </div>\n {formik.errors.position ? <div className=\"errorField\">{formik.errors.position}</div>: null}\n </div>\n </div>\n\n <div className=\"twoFields\">\n <div className=\"labelInputWrapper\">\n <div className=\"label\">\n Total freekicks scored\n </div>\n <div className=\"detailsInput\">\n <input \n className=\"input\"\n name=\"freekick_scored\"\n id=\"freekick_scored\"\n value={formik.values.freekick_scored}\n onChange={formik.handleChange}\n type=\"number\"\n placeholder=\"eg: 55\"\n />\n </div>\n {formik.errors.freekick_scored ? <div className=\"errorField\">{formik.errors.freekick_scored}</div>: null}\n </div>\n </div>\n </div>\n </div>\n </form>\n <div className=\"formSubmitButton2\">\n <Button1 type=\"Submit\" text=\"Submit\" link=\"/add\" onClick={formik.handleSubmit} />\n </div>\n </div>\n </div>\n }\n />\n </div>\n )\n}", "render() {\n return (\n <div>\n <form action=\"\" className=\"ui form error\" onSubmit={this.props.handleSubmit(this.onSubmit)}>\n <Field name=\"title\" component={this.renderInput} label=\"Enter Title\" />\n <Field name=\"description\" component={this.renderInput} label=\"Enter Description\" />\n <button className=\"ui button primary\">Submit</button>\n </form>\n </div>\n )\n }", "render() {\n return (\n <div>\n <Formik\n initialValues={this.props.initialValues}\n validationSchema={userSchema}\n onSubmit={async (values, { resetForm }) => {\n const payload = {\n // make payload here using values\n firstName: values.firstName,\n lastName: values.lastName,\n email: values.email,\n password: values.password,\n };\n console.log(payload);\n const dat = JSON.stringify(payload);\n const requestOptions = {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: dat,\n };\n\n fetch(\"http://localhost:8080/api/users\", requestOptions)\n .then(async (response) => {\n const isJson = response.headers\n .get(\"content-type\")\n ?.includes(\"application/json\");\n const data = isJson && (await response.json());\n\n // check for error response\n if (!response.ok) {\n const error =\n \"Status:\" +\n response.status +\n \" \" +\n \"Response:\" +\n response.statusText;\n this.setHeader(\"ERROR!\");\n this.setMessage(error);\n this.showModal();\n console.log(response);\n // return Promise.reject(error);\n } else {\n console.log(\"User was successfully created\");\n resetForm();\n this.setHeader(\"Success\");\n this.setMessage(\"User was successfully created\");\n this.showModal();\n // setheader(\"Changed\");\n // settrigger(true);\n }\n })\n .catch((error) => {\n this.setHeader(\"ERROR\");\n this.setMessage(\"error\");\n this.showModal();\n console.error(\"There was an error!\", error);\n });\n }}\n >\n {(formik) => (\n <div>\n <Form>\n <h1 className=\"my-4 font-weight-bold .display-4\">Sign Up</h1>\n <TextField label=\"First Name\" name=\"firstName\" type=\"text\" />\n <TextField label=\"last Name\" name=\"lastName\" type=\"text\" />\n <TextField label=\"Email\" name=\"email\" type=\"email\" />\n\n <TextField label=\"Password\" name=\"password\" type=\"password\" />\n <TextField\n label=\"Confirm Password\"\n name=\"confirmPassword\"\n type=\"password\"\n />\n <div class=\"d-flex justify-content-center\">\n <button\n className=\"btn btn-dark mt-4\"\n type=\"submit\"\n disabled={!(formik.isValid && formik.dirty)}\n >\n Register\n </button>\n\n <button className=\"btn btn-danger mt-4 ms-4\" type=\"reset\">\n Reset\n </button>\n </div>\n </Form>\n </div>\n )}\n </Formik>\n\n <Popup\n show={this.state.show}\n handleClose={this.hideModal}\n message={this.state.message}\n header={this.state.header}\n />\n {/* <button type=\"button\" onClick={this.showModal}>\n Open\n </button> */}\n </div>\n );\n }", "function CanvasKeyForm(props) {\n const { setHasLocalKey } = props;\n\n const _uploadKey = async (inputs) => {\n console.log(inputs);\n await superagent.post(`${API_URL}/canvas_key`)\n .set('x-access-token', localStorage.getItem('token'))\n .send(inputs);\n // TODO: remove form;\n localStorage.setItem('canvas_api_key', inputs.canvas_api_key);\n setHasLocalKey(true);\n return null;\n };\n const { inputs, handleInputChange, handleSubmit } = useForm(_uploadKey);\n return (\n <form onSubmit={handleSubmit}>\n <label htmlFor=\"canvas_api_key\">\n Add your api key here\n <input type=\"text\" name=\"canvas_api_key\" onChange={handleInputChange} value={inputs.name} required />\n </label>\n \n \n <input type=\"submit\" value=\"add key\" />\n </form>\n );\n}", "render() {\n return (\n <div className=\"App\">\n {this.handleItems()}\n\n <Flexi\n conf={this.state.jsonData}\n onSubmit={this.handleButtonClick.bind(this)}\n />\n </div>\n );\n }", "function CreatePost() {\n let history = useHistory()\n // Crear los valores iniciales como un objeto y se lo paso como arg a Formik\n const initialValues = {\n title:\"\",\n postText:\"\",\n username:\"\"\n }\n\n // Esta variable me permite validar los datos de los inputs\n const validationSchema = Yup.object().shape({\n title: Yup.string().required(\"You must input a title\"),\n postText: Yup.string().required(\"You must input a Text from the post\"),\n username: Yup.string().min(3).max(15).required()\n })\n // Funcion que se va a ejecutar cuando se envie el formulario, Formik le pasa la data automaticamente\n const onSubmit = (data) => {\n axios.post(\"http://localhost:3001/posts\", data).then((response)=>{\n history.push(\"/\")\n })\n }\n\n return (\n <div className=\"createPostPage\">\n <Formik initialValues={initialValues} onSubmit={onSubmit} validationSchema={validationSchema}>\n <Form className=\"formContainer\">\n <label>Title: </label>\n <ErrorMessage name=\"title\" component=\"span\"/>\n <Field autocomplete=\"off\" id=\"inputCreatePost\" name=\"title\" placeholder=\"(Ex. Title...)\" />\n <label>Post: </label>\n <ErrorMessage name=\"postText\" component=\"span\"/>\n <Field autocomplete=\"off\" id=\"inputCreatePost\" name=\"postText\" placeholder=\"(Ex. Text...)\" />\n <label>Username: </label>\n <ErrorMessage name=\"username\" component=\"span\"/>\n <Field autocomplete=\"off\" id=\"inputCreatePost\" name=\"username\" placeholder=\"(Ex. rvenegas...)\" />\n\n <button type=\"submit\">Create Post</button>\n </Form>\n </Formik>\n </div>\n )\n}", "getForm() {\r\n return (\r\n <StagingForm\r\n // Update functions\r\n //onStagingUpdate={this.handleStagingUpdate}\r\n\t\t\t\tupdateValue={this.updateValue}\r\n // Properties\r\n staging={this.staging}\r\n />\r\n ); \r\n }", "componentDidMount() {\n this.props.setValue(this.props.value);\n }", "function ChinhSuaVaiTro(props) {\n const item = props.location.state.item;\n const { handleUpdate } = props;\n\n const initialValues = {\n resource_name: item.resource_name,\n }\n\n const validationSchema = Yup.object({\n resource_name: Yup.string().required(\"Resource name can not be empty\"),\n });\n\n const onSubmit = async (values) => {\n const { resource_name } = values;\n handleUpdate({ resource_name, resource_id: item.resource_id });\n }\n\n const formik = useFormik({\n initialValues,\n validationSchema,\n onSubmit,\n })\n\n const { handleChange, handleSubmit, handleBlur } = formik;\n\n const form_sua_tainguyen = () => {\n return (\n <form onSubmit={handleSubmit}>\n\n <div className=\"form-group\">\n <label htmlFor=\"resource_name\" >Tên tài nguyên</label>\n <input\n type=\"text\"\n name=\"resource_name\"\n id=\"resource_name\"\n className=\"form-control\"\n onChange={handleChange}\n onBlur={handleBlur}\n value={formik.values.resource_name}\n />\n {formik.errors.resource_name ? (<p className=\"text-danger\">{formik.errors.resource_name}</p>) : null}\n\n </div>\n\n <button type=\"submit\" className=\"btn btn-primary btn-block mt-3\">Chỉnh sửa tài nguyên</button>\n </form>\n\n )\n }\n\n return (\n <div className=\"container\">\n {form_sua_tainguyen()}\n </div>\n )\n}", "render() {\n const { contact } = this.state;\n if (this.state.hasError) {\n // Fallback UI when Error\n // return \n }\n return (\n <View>\n <Header title=\"Edit Contact\"/>\n <Formik\n initialValues={{ \n firstName: contact.firstName,\n lastName: contact.lastName,\n age: contact.age,\n photo: contact.photo,\n }}\n onSubmit={values => this.onSubmit(values)}\n >\n {({ handleChange, handleBlur, handleSubmit, values }) => (\n <View>\n\n <Input\n label=\"Nama Depan\"\n placeholder={contact.firstName.toString()}\n value={values.firstName}\n onBlur={handleBlur.firstName}\n onChangeText={handleChange('firstName')}\n />\n\n <Input\n label=\"Nama Belakang\"\n placeholder={contact.lastName.toString()}\n value={values.lastName}\n onBlur={handleBlur.lastName}\n onChangeText={handleChange('lastName')}\n />\n\n <Input\n label=\"Umur\"\n placeholder={contact.age.toString()}\n value={values.age}\n onBlur={handleBlur.age}\n onChangeText={handleChange('age')}\n keyboardType=\"number-pad\"\n />\n\n <Input\n label=\"URL Foto\"\n placeholder={contact.photo.toString()}\n value={values.photo}\n onBlur={handleBlur.photo}\n onChangeText={handleChange('photo')}\n />\n\n <View\n style={{\n padding: 10,\n marginTop: 10\n }}\n >\n <Button onPress={handleSubmit} title=\"Submit\" />\n </View>\n\n </View>\n )}\n </Formik>\n\n \n </View>\n )\n }", "render() {\n return (\n <div className=\"ui segment\">\n {/*// this is the third way for binding*/}\n {/*<form onSubmit={event => {this.onFormSubmit(event)}} action=\"\" className=\"ui form\">*/}\n <form onSubmit={this.onFormSubmit} action=\"\" className=\"ui form\">\n <div className=\"field\">\n <label htmlFor=\"search\">Image Search</label>\n <input type=\"text\"\n onChange={(e) => {this.setState({term: e.target.value})}}\n value={this.state.term}\n name=\"search\"\n id=\"search\"\n />\n </div>\n </form>\n </div>\n );\n }", "mounted() {\n if (this.module) {\n this.initForm(this.$route)\n }\n }", "function SignupForm() {\n return (\n <div className={styles.indivForm}>\n <IndividualSignUpForm iconPic1={\"user\"} iconPic2={\"key\"} />\n </div>\n );\n}", "render() {\n let fRef = null;\n const allInterests = _.pluck(Interests.find().fetch(), 'name');\n const allParticipants = _.pluck(Profiles.find().fetch(), 'email');\n const formSchema = makeSchema(allInterests, allParticipants);\n const bridge = new SimpleSchema2Bridge(formSchema);\n return (\n <Grid container centered>\n <Grid.Column>\n <Header as=\"h2\" textAlign=\"center\">Add Project</Header>\n <AutoForm ref={ref => { fRef = ref; }} schema={bridge} onSubmit={data => this.submit(data, fRef)} >\n <Segment>\n <Form.Group widths={'equal'}>\n <TextField name='name' showInlineError={true} placeholder='Project name'/>\n <TextField name='picture' showInlineError={true} placeholder='Project picture URL'/>\n <TextField name='homepage' showInlineError={true} placeholder='Homepage URL'/>\n </Form.Group>\n <LongTextField name='description' placeholder='Describe the project here'/>\n <Form.Group widths={'equal'}>\n <MultiSelectField name='interests' showInlineError={true} placeholder={'Interests'}/>\n <MultiSelectField name='participants' showInlineError={true} placeholder={'Participants'}/>\n </Form.Group>\n <SubmitField value='Submit'/>\n <ErrorsField/>\n </Segment>\n </AutoForm>\n </Grid.Column>\n </Grid>\n );\n }", "function withEnhancedForm(hocOptions = {}) {\n return WrappedComponent =>\n class extends React.Component {\n state = {\n isSubmitting: false,\n errors: [],\n innerErrors: {},\n };\n\n options = Object.assign({}, defaultOptions, hocOptions);\n\n onSubmit = originalOnSubmit => (...args) => {\n this.setState({ isSubmitting: true });\n\n const modifiedArgs = [].slice.call(args);\n\n modifiedArgs[1] = this.successCallback(modifiedArgs[1]);\n modifiedArgs[2] = this.failureCallback(modifiedArgs[2]);\n\n originalOnSubmit(...modifiedArgs);\n };\n\n successCallback = originalCallback => (...args) => {\n this.setState({ isSubmitting: false });\n\n if (typeof originalCallback === 'function') {\n originalCallback(...args);\n }\n };\n\n failureCallback = originalCallback => (...args) => {\n this.setState({ isSubmitting: false });\n\n if (typeof originalCallback === 'function') {\n originalCallback(...args);\n }\n\n if (this.options.handleErrors === true) {\n this.handleErrors(args[0]);\n }\n };\n\n handleErrors = errors => {\n const values = this.props.form.getFieldsValue();\n const fieldsData = {};\n\n Object.entries(errors.withField).forEach(element => {\n const key = element[0];\n\n const error = element[1];\n const fieldErrors = error.messages;\n\n if (error.innerErrors)\n this.setState(state => {\n const newState = Object.assign({}, state);\n newState.innerErrors[key] = error.innerErrors;\n return newState;\n });\n\n fieldsData[key] = {\n value: values[key],\n errors: fieldErrors.map(e => new Error(e)),\n };\n });\n\n this.setState({ errors: errors.withoutField });\n this.props.form.setFields(fieldsData);\n };\n\n render() {\n return (\n <WrappedComponent\n {...this.props}\n isSubmitting={this.state.isSubmitting}\n onSubmit={this.onSubmit(this.props.onSubmit)}\n errors={this.state.errors}\n innerErrors={this.state.innerErrors}\n />\n );\n }\n };\n}", "render() {\n const { categorySelected } = this.state;\n const { components, placeholder, id} = this.props;\n return (\n <Context.Consumer>\n {value => {\n return (\n <form\n onSubmit={e => {\n e.preventDefault();\n }}\n >\n <div className=\"d-flex\">\n {components.map(component => {\n return(\n <div className=\"form-group\" check>\n <div className=\"custom-control custom-radio kk-search-radio\">\n <input\n name={component}\n id={component}\n type=\"radio\"\n checked=\"true\"\n value={component}\n checked={categorySelected === component }\n onChange={this.toggleCategory}\n className=\"custom-control-input\"\n />\n <label className=\"custom-control-label\" htmlFor={component}>\n {component}\n </label>\n </div>\n </div>\n )\n })}\n </div>\n <div />\n <div className=\"kk-search-input\">\n <label htmlFor={id} className=\"d-none\"></label>\n <input id={id} placeholder={placeholder} />\n <button name=\"search button\" aria-label=\"Search button\" role=\"button\" className=\"kk-search-button-icon\">\n <img src={SearchIcon} alt=\"alt text\" />\n </button>\n </div>\n </form>\n );\n }}\n </Context.Consumer>\n );\n }", "function ContextDemo() {\n return <UserProvider>\n <div className=\"ContextDemo\">\n \n <div>\n <h4>Enter a name and location. The \"Name\" and \"Location\" components will update using the Provider/Context classes.</h4>\n </div>\n <div>\n Reference: <a href=\"https://scotch.io/courses/10-react-challenges-beginner/use-context-to-pass-data\">\n https://scotch.io/courses/10-react-challenges-beginner/use-context-to-pass-data</a>\n </div> \n \n <div className=\"container\">\n <UserForm />\n\n <h2 className=\"is-size-4\">Display User Info Here</h2>\n <p>\n These two children components will receive data. These could be nested\n components.\n </p>\n <Name />\n <Location />\n </div>\n </div>\n </UserProvider>;\n}", "componentDidMount(){ this.updateForm( ) }", "render(){\n // todo add the components\n return( <LoginForm/>);\n \n // Todo add the Form \n }", "constructor(parent) {\n this.parent = parent;\n this.form = this.createForm();\n }", "function FormField(props) {\n var children = props.children,\n className = props.className,\n control = props.control,\n disabled = props.disabled,\n error = props.error,\n inline = props.inline,\n label = props.label,\n required = props.required,\n type = props.type,\n width = props.width;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_3_classnames___default()(Object(__WEBPACK_IMPORTED_MODULE_6__lib__[\"z\" /* useKeyOnly */])(disabled, 'disabled'), Object(__WEBPACK_IMPORTED_MODULE_6__lib__[\"z\" /* useKeyOnly */])(error, 'error'), Object(__WEBPACK_IMPORTED_MODULE_6__lib__[\"z\" /* useKeyOnly */])(inline, 'inline'), Object(__WEBPACK_IMPORTED_MODULE_6__lib__[\"z\" /* useKeyOnly */])(required, 'required'), Object(__WEBPACK_IMPORTED_MODULE_6__lib__[\"F\" /* useWidthProp */])(width, 'wide'), 'field', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_6__lib__[\"q\" /* getUnhandledProps */])(FormField, props);\n var ElementType = Object(__WEBPACK_IMPORTED_MODULE_6__lib__[\"p\" /* getElementType */])(FormField, props);\n\n // ----------------------------------------\n // No Control\n // ----------------------------------------\n\n if (__WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(control)) {\n if (__WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(label)) return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n children\n );\n\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n Object(__WEBPACK_IMPORTED_MODULE_6__lib__[\"i\" /* createHTMLLabel */])(label)\n );\n }\n\n // ----------------------------------------\n // Checkbox/Radio Control\n // ----------------------------------------\n var controlProps = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { children: children, disabled: disabled, required: required, type: type\n\n // wrap HTML checkboxes/radios in the label\n });if (control === 'input' && (type === 'checkbox' || type === 'radio')) {\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n ElementType,\n { className: classes },\n __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n 'label',\n null,\n Object(__WEBPACK_IMPORTED_MODULE_5_react__[\"createElement\"])(control, controlProps),\n ' ',\n label\n )\n );\n }\n\n // pass label prop to controls that support it\n if (control === __WEBPACK_IMPORTED_MODULE_7__modules_Checkbox__[\"a\" /* default */] || control === __WEBPACK_IMPORTED_MODULE_8__addons_Radio__[\"a\" /* default */]) {\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n ElementType,\n { className: classes },\n Object(__WEBPACK_IMPORTED_MODULE_5_react__[\"createElement\"])(control, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, controlProps, { label: label }))\n );\n }\n\n // ----------------------------------------\n // Other Control\n // ----------------------------------------\n\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n ElementType,\n { className: classes },\n Object(__WEBPACK_IMPORTED_MODULE_6__lib__[\"i\" /* createHTMLLabel */])(label, { defaultProps: {\n htmlFor: __WEBPACK_IMPORTED_MODULE_1_lodash_get___default()(controlProps, 'id') }\n }),\n Object(__WEBPACK_IMPORTED_MODULE_5_react__[\"createElement\"])(control, controlProps)\n );\n}", "setFormApi(formApi) {\n this.formApi = formApi;\n }", "render() {\n\t\treturn (\n\t\t\t<View style={styles.addDeckWrapper}>\n\t\t\t\t<Text style={styles.deckHeader}>Add a Deck</Text>\n\t\t\t\t<Formik\n\t\t\t\t\tinitialValues={{ deck: '' }}\n\t\t\t\t\tonSubmit={(values) => this.addNewDeck(values)}\n\t\t\t\t\tvalidate={(values) => {\n\t\t\t\t\t\tlet errors = [];\n\t\t\t\t\t\t(!values.deck) && (errors.deck = 'A deck name is required.');\n\t\t\t\t\t\treturn errors;\n\t\t\t\t\t}}>\n\t\t\t\t\t{(formProps) => (\n\t\t\t\t\t\t<View>\n\t\t\t\t\t\t\t<TextInput\n\t\t\t\t\t\t\t\tplaceholder='enter flashcard deck name'\n\t\t\t\t\t\t\t\tonChangeText={formProps.handleChange('deck')}\n\t\t\t\t\t\t\t\tonBlur={formProps.handleBlur('deck')}\n\t\t\t\t\t\t\t\tvalue={formProps.values.deck}\n\t\t\t\t\t\t\t\tselectionColor={purpleBlue}\n\t\t\t\t\t\t\t\tstyle={styles.formField}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<TouchableOpacity\n\t\t\t\t\t\t\t\tstyle={(formProps.isSubmitting || !formProps.values.deck) ? (\n\t\t\t\t\t\t\t\t\tstyles.disabledButton\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\tstyles.button\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\tonPress={formProps.handleSubmit}\n\t\t\t\t\t\t\t\tdisabled={formProps.isSubmitting || !formProps.values.deck}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Text style={(formProps.isSubmitting || !formProps.values.deck) ? (\n\t\t\t\t\t\t\t\t\tstyles.disabledButtonText\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\tstyles.buttonText\n\t\t\t\t\t\t\t\t)}>Submit</Text>\n\t\t\t\t\t\t\t</TouchableOpacity>\n\t\t\t\t\t\t</View>\n\t\t\t\t\t)}\n\t\t\t\t\t</Formik>\n\t\t\t</View>\n\t\t)\n\t}", "submit () {\n this.get ('component').doSubmit ();\n }", "function makeWrapper() {\n return mount(TestForm, {\n slots: {\n testComponent: LicenseDropdown,\n },\n });\n}", "constructor(props) {\n super(props);\n this.formName = 'interface-login';\n this.formClass = 'interface-login';\n this.formID = 'interface-login';\n this.formType = 'POST';\n }", "attachForm() {\n this.formView = new ContactFormView(this.formEl, this);\n }", "render() {\n const { config } = this.props;\n const { plugins } = config;\n return (\n <>\n <WrappedComponent {...this.props} ref={(parent) => { this.pluginParent = parent; }} />\n { /* TODO: Refactor .name here in some way so we dont need to rely on it */}\n {componentPlugins(WrappedComponent.name, plugins)\n .map(component => React.createElement(\n connect(component.mapStateToProps, component.mapDispatchToProps)(component.component),\n { key: component.name, ...this.props, pluginParent: this.getPluginParent },\n ))\n }\n </>\n );\n }", "function App() {\n\n // stuff goes here\n return (\n <div>\n <h1>Here is a form</h1>\n <Name firstName=\"Julian\" />\n <MakeForm />\n </div>\n );\n}", "render() {\n const nameslist = this.state.names;\n const names = nameslist.map((data) => (\n <option key={data.name} value={data.name}>\n {data.name}\n </option>\n ));\n return (\n <>\n <Formik\n enableReinitialize\n initialValues={this.props.log || {}}\n onSubmit={(values, { setSubmitting }) => {\n if (values.log_id) {\n editLog(values, setSubmitting);\n } else {\n addLog(values, setSubmitting);\n }\n }}\n >\n {(formProps) => {\n const {\n values,\n dirty,\n isSubmitting,\n handleChange,\n handleBlur,\n handleSubmit,\n handleReset,\n setFieldValue,\n } = formProps;\n return (\n <form onSubmit={handleSubmit} className=\"LogForm\">\n <h3> Add today's activity </h3>\n <div>\n <label htmlFor=\"friendname\">Name: </label>\n <select\n name=\"friendname\"\n type=\"dropdown\"\n value={values.friendname}\n onChange={handleChange}\n id=\"friendname\"\n >\n <option>Select Name</option>\n {names}\n </select>\n <ErrorMessage name=\"friendname\" />\n </div>\n <div>\n <label htmlFor=\"date\"> Date: </label>\n <div >\n <DatePicker\n selected={values.date}\n dateFormat=\"MMMM d, yyyy\"\n name=\"date\"\n className=\"date\"\n onChange={(date) => setFieldValue(\"date\", date)}\n />\n </div>\n </div>\n <div>\n <label htmlFor=\"friendname\">\n How did you move your body today:\n </label>\n <input\n required\n value={values.movebody}\n onChange={handleChange}\n onBlur={handleBlur}\n placeholder=\"I walked around my block\"\n type=\"text\"\n name=\"movebody\"\n id=\"movebody\"\n />\n </div>\n <div>\n <label htmlFor=\"glasseswater\">\n How many glasses of water did you drink:{\" \"}\n </label>\n <input\n required\n value={values.glasseswater}\n onChange={handleChange}\n onBlur={handleBlur}\n placeholder=\"8\"\n type=\"number\"\n name=\"glasseswater\"\n id=\"glasseswater\"\n />\n </div>\n <div className=\"buttonquestion\">\n <label>Did you leave the house?</label>\n <div className=\"radioButton\">\n <label htmlFor=\"leavehouse-yes\">Yes</label>\n <input\n required\n value={\"yes\"}\n checked={values.leavehouse === \"yes\"}\n onChange={handleChange}\n onBlur={handleBlur}\n placeholder=\"Yes\"\n type=\"radio\"\n name=\"leavehouse\"\n id=\"leavehouse-yes\"\n />\n <label htmlFor=\"leavehouse-no\">No</label>\n <input\n required\n value={\"no\"}\n checked={values.leavehouse === \"no\"}\n onChange={handleChange}\n onBlur={handleBlur}\n placeholder=\"No\"\n type=\"radio\"\n name=\"leavehouse\"\n id=\"leavehouse-no\"\n />\n </div>\n </div>\n <div>\n <label htmlFor=\"winofday\">\n What was your win of the day?\n </label>\n <input\n required\n value={values.winofday}\n onChange={handleChange}\n onBlur={handleBlur}\n placeholder=\"I am proud of myself for not getting too frustrated at my coworker\"\n type=\"text\"\n name=\"winofday\"\n id=\"winofday\"\n />\n </div>\n <div className=\"buttonquestion\">\n <label>Did you shower? </label>\n <div className=\"radiobutton\">\n <label htmlFor=\"shower-yes\">Yes</label>\n <input\n required\n value={\"yes\"}\n checked={values.shower === \"yes\"}\n onChange={handleChange}\n onBlur={handleBlur}\n placeholder=\"Yes\"\n type=\"radio\"\n name=\"shower\"\n id=\"shower-yes\"\n />\n <label htmlFor=\"shower-no\">No</label>\n <input\n required\n value={\"no\"}\n checked={values.shower === \"no\"}\n onChange={handleChange}\n onBlur={handleBlur}\n placeholder=\"No\"\n type=\"radio\"\n name=\"shower\"\n id=\"shower-no\"\n />\n </div>\n </div>\n <div className=\"buttonquestion\">\n <label>Did you clean your room?</label>\n <div className=\"radiobutton\">\n <label htmlFor=\"cleanroom-yes\">Yes</label>\n <input\n required\n value={\"yes\"}\n checked={values.cleanroom === \"yes\"}\n onChange={handleChange}\n onBlur={handleBlur}\n placeholder=\"Yes\"\n type=\"radio\"\n name=\"cleanroom\"\n id=\"cleanroom-yes\"\n />\n <label htmlFor=\"cleanroom-no\">No</label>\n <input\n required\n value={\"no\"}\n checked={values.cleanroom === \"no\"}\n onChange={handleChange}\n onBlur={handleBlur}\n placeholder=\"No\"\n type=\"radio\"\n name=\"cleanroom\"\n id=\"cleanroom-no\"\n />\n </div>\n </div>\n <div className=\"buttonquestion\">\n <label>Did you do the dishes?</label>\n <div className=\"radiobutton\">\n <label htmlFor=\"dodishes-yes\">Yes</label>\n <input\n required\n value={\"yes\"}\n checked={values.dodishes === \"yes\"}\n onChange={handleChange}\n onBlur={handleBlur}\n placeholder=\"Yes\"\n type=\"radio\"\n name=\"dodishes\"\n id=\"dodishes-yes\"\n />\n <label htmlFor=\"dodishes-no\">No</label>\n <input\n required\n value={\"no\"}\n checked={values.dodishes === \"no\"}\n onChange={handleChange}\n onBlur={handleBlur}\n placeholder=\"No\"\n type=\"radio\"\n name=\"dodishes\"\n id=\"dodishes-no\"\n />\n </div>\n </div>\n <div className=\"buttonquestion\">\n <label>Did you do your skincare routine?</label>\n <div className=\"radiobutton\">\n <label htmlFor=\"washface-yes\">Yes</label>\n <input\n required\n value={\"yes\"}\n checked={values.washface === \"yes\"}\n onChange={handleChange}\n onBlur={handleBlur}\n placeholder=\"Yes\"\n type=\"radio\"\n name=\"washface\"\n id=\"washface-yes\"\n />\n <label htmlFor=\"washface-no\">No</label>\n <input\n required\n value={\"no\"}\n checked={values.washface === \"no\"}\n onChange={handleChange}\n onBlur={handleBlur}\n placeholder=\"No\"\n type=\"radio\"\n name=\"washface\"\n id=\"washface-no\"\n />\n </div>\n </div>\n <div>\n <br></br>\n\n <label htmlFor=\"fooddrop\">Food Drop Off</label>\n <select\n name=\"fooddrop\"\n value={values.fooddrop}\n onChange={handleChange}\n onBlur={handleBlur}\n id=\"fooddrop\"\n >\n <option>Select</option>\n <option value=\"I am in need of someone to drop off food for me - thanks!\">\n {\" \"}\n I am in need of someone to drop off food for me - thanks!{\" \"}\n </option>\n <option value=\" Reach out to me if you need someone to drop food off\n for you!\">\n {\" \"}\n Reach out to me if you need someone to drop food off\n for you!{\" \"}\n </option>\n </select>\n </div>\n <div className=\"buttonquestion\">\n <label>Phone Call</label>\n <br></br>\n <label htmlFor=\"call-yes\">\n I would like a phone call with a friend{\" \"}\n </label>\n <input\n value={\"yes\"}\n checked={values.call === \"yes\"}\n onChange={handleChange}\n onBlur={handleBlur}\n placeholder=\"Yes\"\n type=\"radio\"\n name=\"call\"\n id=\"call-yes\"\n />\n <br></br>\n </div>\n <div className=\"buttonquestion\">\n <label> Hang Out </label>\n <br></br>\n <label htmlFor=\"distacewalk-yes\">\n I am free to hang out with someone{\" \"}\n </label>\n <input\n value={\"yes\"}\n checked={values.distancewalk === \"yes\"}\n onChange={handleChange}\n onBlur={handleBlur}\n type=\"radio\"\n name=\"distancewalk\"\n id=\"distancewalk-yes\"\n />\n <br></br>\n </div>\n <button type=\"submit\" disabled={isSubmitting}>\n Submit\n </button>\n </form>\n );\n }}\n </Formik>\n </>\n );\n }", "function ReactComponent(props,context){this.props=props;this.context=context;}", "render() {\n return (\n <form\n onSubmit={this.props.handleSubmit(this.onSubmit)}\n className=\"ui form error\"\n >\n <Field name=\"title\" component={this.renderInput} label=\"Enter Title\" />\n <Field\n name=\"description\"\n component={this.renderInput}\n label=\"Enter Description\"\n />\n <button className=\"ui button primary\">Submit</button>\n </form>\n );\n }", "function Form(props) {\n console.log('props from FORM.js', props);\n const [url, setUrl] = useState('');\n const handleOnChange = (evt) => {\n setUrl((evt.target.value));\n }\n\n const handleSubmit = (evt) => {\n evt.preventDefault();\n props.handleAddMeme(url);\n }\n\n // returns some JSX\n return (\n <form onSubmit={handleSubmit}>\n <p><input onChange={handleOnChange} type='text' name='url' value={url}></input></p>\n <p><button>submit</button></p>\n </form>\n )\n}", "componentDidMount(){\n this.handleGetForm()\n}", "render() {\r\n const changeRolePage = { paddingTop: '15px', paddingBottom: '20px' };\r\n let fRef = null;\r\n return (\r\n <Grid container centered style={changeRolePage} id='editrole-page'>\r\n <Grid.Column>\r\n <Header as=\"h2\" textAlign=\"center\">Verify Users</Header>\r\n <AutoForm ref={ref => { fRef = ref; }} schema={bridge} onSubmit={data => this.submit(data, fRef)} >\r\n <Segment>\r\n <TextField name='userId'/>\r\n <SelectField name=\"role\" options={options} />\r\n <SubmitField value='Submit'/>\r\n <ErrorsField/>\r\n </Segment>\r\n </AutoForm>\r\n </Grid.Column>\r\n </Grid>\r\n );\r\n }", "render() {\n return (\n <Grid container centered>\n <Grid.Column>\n <Header as=\"h2\" textAlign=\"center\">Add Report</Header>\n <AutoForm ref={(ref) => { this.formRef = ref; }} schema={ReportSchema} onSubmit={this.submit}>\n <Segment>\n <TextField name='description'/>\n <ErrorsField/>\n <HiddenField name='seller' value={this.props.doc.seller}/>\n <HiddenField name='item' value={this.props.doc._id}/>\n <HiddenField name='itemName' value={this.props.doc.name}/>\n </Segment>\n </AutoForm>\n </Grid.Column>\n </Grid>\n );\n }", "_onPressHandler() {\n const { formFields, submitForm } = this.props;\n submitForm(formFields);\n }", "render() {\n let fRef = null;\n const { from } = this.props.location.state || { from: { pathname: '/listall' } };\n // if correct authentication, redirect to page instead of login screen\n if (this.state.redirectToReferer) {\n return <Redirect to={from}/>;\n }\n return (\n <Grid container centered id='add-item'>\n <Grid.Column>\n <Header as=\"h2\" textAlign=\"center\" inverted>Sell Item</Header>\n <AutoForm ref={ref => { fRef = ref; }} schema={bridge} onSubmit={data => this.submit(data, fRef)} >\n <Segment>\n <TextField name='itemName' id='itemName-area'/>\n <TextField name='address' label='Address(Where to meet up)' id='address-area'/>\n <TextField name='image' label='Image Address' id='image-area'/>\n <NumField name='price' id='price-area'/>\n <SelectField name='description' id='description-area'/>\n <LongTextField name='details' id='details-area'/>\n <SelectField name='label' id='label-area'/>\n <SubmitField value='Submit' id='item-submit'/>\n <ErrorsField/>\n </Segment>\n </AutoForm>\n </Grid.Column>\n </Grid>\n );\n }", "constructor(props) { //added because we moved submit to its own function\n super(props)\n this.submit = this.submit.bind(this) // we must bind the scope of the component to any methods that need to access that scope with this\n }", "componentWillMount() {\n this.createFormState(this.props);\n }", "constructor(props, context){\n super(props, context);\n\n }", "render() {\n return (\n <div className=\"head-bar\">\n <h1 className=\"head-title\">POLUTFORSKER</h1>\n <form className=\"search-form\" onSubmit={this.handleSubmit}>\n <Field\n name=\"search\"\n component=\"input\"\n type=\"text\"\n placeholder=\"Search...\"\n />\n </form>\n </div>\n );\n }", "function FormField(props) {\n var children = props.children,\n className = props.className,\n content = props.content,\n control = props.control,\n disabled = props.disabled,\n error = props.error,\n inline = props.inline,\n label = props.label,\n required = props.required,\n type = props.type,\n width = props.width;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_3_classnames___default()(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__lib__[\"a\" /* useKeyOnly */])(disabled, 'disabled'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__lib__[\"a\" /* useKeyOnly */])(error, 'error'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__lib__[\"a\" /* useKeyOnly */])(inline, 'inline'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__lib__[\"a\" /* useKeyOnly */])(required, 'required'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__lib__[\"h\" /* useWidthProp */])(width, 'wide'), 'field', className);\n var rest = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__lib__[\"b\" /* getUnhandledProps */])(FormField, props);\n var ElementType = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__lib__[\"c\" /* getElementType */])(FormField, props);\n\n // ----------------------------------------\n // No Control\n // ----------------------------------------\n\n if (__WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(control)) {\n if (__WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(label)) {\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n __WEBPACK_IMPORTED_MODULE_6__lib__[\"d\" /* childrenUtils */].isNil(children) ? content : children\n );\n }\n\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__lib__[\"C\" /* createHTMLLabel */])(label)\n );\n }\n\n // ----------------------------------------\n // Checkbox/Radio Control\n // ----------------------------------------\n var controlProps = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { content: content, children: children, disabled: disabled, required: required, type: type\n\n // wrap HTML checkboxes/radios in the label\n });if (control === 'input' && (type === 'checkbox' || type === 'radio')) {\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n ElementType,\n { className: classes },\n __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n 'label',\n null,\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5_react__[\"createElement\"])(control, controlProps),\n ' ',\n label\n )\n );\n }\n\n // pass label prop to controls that support it\n if (control === __WEBPACK_IMPORTED_MODULE_7__modules_Checkbox__[\"a\" /* default */] || control === __WEBPACK_IMPORTED_MODULE_8__addons_Radio__[\"a\" /* default */]) {\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n ElementType,\n { className: classes },\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5_react__[\"createElement\"])(control, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, controlProps, { label: label }))\n );\n }\n\n // ----------------------------------------\n // Other Control\n // ----------------------------------------\n\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n ElementType,\n { className: classes },\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__lib__[\"C\" /* createHTMLLabel */])(label, { defaultProps: {\n htmlFor: __WEBPACK_IMPORTED_MODULE_1_lodash_get___default()(controlProps, 'id') }\n }),\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5_react__[\"createElement\"])(control, controlProps)\n );\n}", "function ReactComponent(props,context){this.props = props;this.context = context;}", "function FormField(props) {\n var children = props.children,\n className = props.className,\n control = props.control,\n disabled = props.disabled,\n error = props.error,\n inline = props.inline,\n label = props.label,\n required = props.required,\n type = props.type,\n width = props.width;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_2_classnames___default()(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"a\" /* useKeyOnly */])(disabled, 'disabled'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"a\" /* useKeyOnly */])(error, 'error'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"a\" /* useKeyOnly */])(inline, 'inline'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"a\" /* useKeyOnly */])(required, 'required'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"f\" /* useWidthProp */])(width, 'wide'), 'field', className);\n var rest = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"b\" /* getUnhandledProps */])(FormField, props);\n var ElementType = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"c\" /* getElementType */])(FormField, props);\n\n // ----------------------------------------\n // No Control\n // ----------------------------------------\n\n if (__WEBPACK_IMPORTED_MODULE_1_lodash_isNil___default()(control)) {\n if (__WEBPACK_IMPORTED_MODULE_1_lodash_isNil___default()(label)) return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n children\n );\n\n return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"t\" /* createHTMLLabel */])(label)\n );\n }\n\n // ----------------------------------------\n // Checkbox/Radio Control\n // ----------------------------------------\n var controlProps = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { children: children, required: required, type: type });\n\n // wrap HTML checkboxes/radios in the label\n if (control === 'input' && (type === 'checkbox' || type === 'radio')) {\n return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(\n ElementType,\n { className: classes },\n __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(\n 'label',\n null,\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3_react__[\"createElement\"])(control, controlProps),\n ' ',\n label\n )\n );\n }\n\n // pass label prop to controls that support it\n if (control === __WEBPACK_IMPORTED_MODULE_5__modules_Checkbox__[\"a\" /* default */] || control === __WEBPACK_IMPORTED_MODULE_6__addons_Radio__[\"a\" /* default */]) {\n return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(\n ElementType,\n { className: classes },\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3_react__[\"createElement\"])(control, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, controlProps, { label: label }))\n );\n }\n\n // ----------------------------------------\n // Other Control\n // ----------------------------------------\n\n return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(\n ElementType,\n { className: classes },\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"t\" /* createHTMLLabel */])(label),\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3_react__[\"createElement\"])(control, controlProps)\n );\n}", "render() {\n return (\n <div>\n <Container>\n <LanguageStore>\n <LanguageSelector />\n <ColorContext.Provider value=\"facebook\">\n <UserCreate />\n </ColorContext.Provider>\n </LanguageStore>\n </Container>\n </div>\n );\n }", "renderForm(){\n const { getFieldDecorator, validateFields } = this.props.form;\n const { showMap, loading, guardarBtn, restricciones, imagen, current, ubicacion, x } = this.state\n return(\n <section>\n <Steps current={current} style={{marginBottom:20}}>\n {steps.map(item => <Step key={item.title} title={item.title} />)}\n </Steps>\n <div className=\"steps-content\">\n\n {\n current===0\n ? <Form onSubmit={this.handleSubmit} className=\"login-form\">\n {/* NOMBRE */}\n <FormItem>\n {getFieldDecorator('nombre', {\n rules: [{ required: true, message: 'Inserta un nombre!' }],\n })(\n <Input prefix={<Icon type=\"home\" style={{ color: 'rgba(0,0,0,.25)' }} />} placeholder=\"titulo\" /> \n )}\n </FormItem>\n\n {/* DESCRIPCION */}\n <FormItem>\n {getFieldDecorator('descripcion',{\n rules: [{ required: true, message: 'Inserta alguna descripción!' }],\n })(\n <Input prefix={<Icon type=\"select\" style={{ color: 'rgba(0,0,0,.25)' }} />} type=\"text\" placeholder=\"Descripción\" />\n )}\n </FormItem>\n\n {/* FECHA HORA */}\n <FormItem>\n {getFieldDecorator('fechaLugar', {\n rules: [{ required: false, message: 'Inserta una fecha y hora' }],\n })(\n <DatePicker showTime format=\"YYYY-MM-DD HH:mm:ss\" className='ant-input' placeholder='Fecha y hora' />\n )}\n </FormItem>\n\n {/* RESTRICCIONES */}\n <FormItem>\n {getFieldDecorator('restricciones', {\n rules: [{ required: false, message: 'Inserta tu username!' }],\n })(\n <RestriccionLista restriccionesAgregadas={(res)=>this.setState({restricciones:res})} lista />\n )}\n </FormItem>\n\n {/* CATEGORIA */}\n <FormItem>\n {getFieldDecorator('categoria', {\n rules: [{ required: false, message: 'Inserta tu username!' }],\n })(\n <CategoriaLista categoriasAgregadas={(cat)=>this.setState({categorias:cat})} lista />\n )}\n </FormItem>\n {/* UBICACION */}\n <FormItem>\n {getFieldDecorator('ubicacion',{\n initialValue: ubicacion,\n rules: [{ required: false, message: 'Inserta alguna descripción!' }],\n })(\n <Input prefix={<Icon type=\"environment-o\" style={{ color: 'rgba(0,0,0,.25)' }} />} type=\"text\" placeholder=\"Ubicacion\" \n onClick={()=>this.setState({showMap:true})} />\n )}\n </FormItem>\n {/* MOSTRAR MAPA */}\n {\n showMap\n &&<MapaContainer \n close={(e)=>this.setState({showMap:e})}\n center={{lat: this.state.x.latitude, lng:this.state.x.longitude}}\n height='500px'\n zoom={17}\n drag={(lat, lng)=>this.drag(lat, lng)}\n autocomplate={(lugar, show)=>this.autocomplate(lugar, show)}\n />\n }\n <div style={{textAlign:'right'}}>\n <Button type=\"primary\" htmlType=\"submit\" className=\"login-form-button\">\n Siguiente\n </Button>\n </div>\n </Form>\n :current===1\n ?<Imagenes \n imagenes={(fileList)=>this.setState({fileList})}\n actualizaCurrent={(number, imagen)=>this.setState({current:number, imagen})} \n />\n :current===2\n ?<Previsualizacion imagen={this.state.imagen} />\n :<div>Pagos</div>\n }\n\n \n <div className=\"steps-action\">\n {\n current > 0\n &&\n <Button style={{ marginLeft: 8 }} onClick={() => this.setState({current:current-1})}>\n Anterior\n </Button>\n }\n {\n current === 2\n &&\n <div style={{textAlign:'right'}}>\n <Button type=\"primary\" onClick={() => this.finalizar()}>{this.state.guardarBtn}</Button>\n </div>\n }\n </div>\n </div>\n </section>\n )\n }", "render() {\n const options = [\n { key: 'm', text: 'Mānoa', value: 'Mānoa' },\n { key: 'h', text: 'Hilo', value: 'Hilo' },\n { key: 'ha', text: 'Hawaiʻi', value: 'Hawaiʻi' },\n { key: 'ho', text: 'Honolulu', value: 'Honolulu' },\n { key: 'k', text: 'Kapiʻolani', value: 'Kapiʻolani' },\n { key: 'ka', text: 'Kauaʻi', value: 'Kauaʻi' },\n { key: 'le', text: 'Leeward', value: 'Leeward' },\n { key: 'ma', text: 'Maui', value: 'Maui' },\n { key: 'wi', text: 'Windward', value: 'Windward' },\n { key: 'wo', text: 'West Oʻahu', value: 'West Oʻahu' },\n ];\n\n // if correct authentication, redirect to from: page instead of signup screen\n if (this.state.redirectToReferer) {\n return <Redirect to={'/signin'}/>;\n }\n return (\n <Container>\n <Grid textAlign=\"center\" verticalAlign=\"middle\" centered columns={2}>\n <Grid.Column>\n <Header as=\"h2\" textAlign=\"center\">\n Register your account\n </Header>\n <Form onSubmit={this.handleSubmit} inverted>\n <Segment stacked inverted>\n <Header as=\"h5\" textAlign=\"center\">\n Account Information\n </Header>\n <Form.Input\n label=\"Email\"\n icon=\"user\"\n iconPosition=\"left\"\n required\n name=\"email\"\n type=\"email\"\n placeholder=\"E-mail address\"\n onChange={this.handleChange}\n />\n <Form.Input\n label=\"Password\"\n icon=\"lock\"\n iconPosition=\"left\"\n required\n name=\"password\"\n placeholder=\"Password\"\n type=\"password\"\n onChange={this.handleChange}\n />\n <Form.Input\n label=\"repassword\"\n icon=\"lock\"\n iconPosition=\"left\"\n name=\"repassword\"\n required\n placeholder=\"repassword\"\n type=\"password\"\n onChange={this.handleChange}\n />\n\n <Header as=\"h5\" textAlign=\"center\">\n Student Information\n </Header>\n <Form.Group widths={'equal'}>\n <Form.Input fluid label='First name' placeholder='First name' name=\"firstName\"\n type=\"firstName\"\n onChange={this.handleChange} required/>\n <Form.Input fluid label='Last name' placeholder='Last name' name=\"lastName\"\n type=\"lastName\"\n onChange={this.handleChange} required/>\n </Form.Group>\n <Form.Group widths={'equal'}>\n <Form.Select\n fluid\n label='Campus'\n options={options}\n required\n placeholder='Campus'\n name=\"campus\"\n type=\"campus\"\n onChange={this.handleChange}\n />\n </Form.Group>\n <Form.Button content=\"Submit\"/>\n </Segment>\n </Form>\n <Message color='black'>\n Have an account with us? <Link to=\"/signin\">Sign in</Link>\n </Message>\n\n {this.state.error === '' ? (\n ''\n ) : (\n <Message\n error\n header=\"Registration was not successful\"\n content={this.state.error}\n />\n )}\n </Grid.Column>\n </Grid>\n </Container>\n );\n }", "componentDidMount() {\n if(this.props.formStructure) {\n this.props.buildForm(this.props.id, this.props.formStructure);\n } else {\n // TODO remove loading from redux action, and add it to this component\n this.props.loadForm(this.formLoader, this.props.id, this.props.url, this.props.recordId);\n }\n }", "function FormField(props) {\n var children = props.children,\n className = props.className,\n content = props.content,\n control = props.control,\n disabled = props.disabled,\n error = props.error,\n inline = props.inline,\n label = props.label,\n required = props.required,\n type = props.type,\n width = props.width;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_3_classnames___default()(Object(__WEBPACK_IMPORTED_MODULE_6__lib__[\"B\" /* useKeyOnly */])(disabled, 'disabled'), Object(__WEBPACK_IMPORTED_MODULE_6__lib__[\"B\" /* useKeyOnly */])(error, 'error'), Object(__WEBPACK_IMPORTED_MODULE_6__lib__[\"B\" /* useKeyOnly */])(inline, 'inline'), Object(__WEBPACK_IMPORTED_MODULE_6__lib__[\"B\" /* useKeyOnly */])(required, 'required'), Object(__WEBPACK_IMPORTED_MODULE_6__lib__[\"H\" /* useWidthProp */])(width, 'wide'), 'field', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_6__lib__[\"r\" /* getUnhandledProps */])(FormField, props);\n var ElementType = Object(__WEBPACK_IMPORTED_MODULE_6__lib__[\"q\" /* getElementType */])(FormField, props);\n\n // ----------------------------------------\n // No Control\n // ----------------------------------------\n\n if (__WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(control)) {\n if (__WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(label)) {\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n __WEBPACK_IMPORTED_MODULE_6__lib__[\"d\" /* childrenUtils */].isNil(children) ? content : children\n );\n }\n\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n Object(__WEBPACK_IMPORTED_MODULE_6__lib__[\"i\" /* createHTMLLabel */])(label)\n );\n }\n\n // ----------------------------------------\n // Checkbox/Radio Control\n // ----------------------------------------\n var controlProps = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { content: content, children: children, disabled: disabled, required: required, type: type\n\n // wrap HTML checkboxes/radios in the label\n });if (control === 'input' && (type === 'checkbox' || type === 'radio')) {\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n ElementType,\n { className: classes },\n __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n 'label',\n null,\n Object(__WEBPACK_IMPORTED_MODULE_5_react__[\"createElement\"])(control, controlProps),\n ' ',\n label\n )\n );\n }\n\n // pass label prop to controls that support it\n if (control === __WEBPACK_IMPORTED_MODULE_7__modules_Checkbox__[\"a\" /* default */] || control === __WEBPACK_IMPORTED_MODULE_8__addons_Radio__[\"a\" /* default */]) {\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n ElementType,\n { className: classes },\n Object(__WEBPACK_IMPORTED_MODULE_5_react__[\"createElement\"])(control, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, controlProps, { label: label }))\n );\n }\n\n // ----------------------------------------\n // Other Control\n // ----------------------------------------\n\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n ElementType,\n { className: classes },\n Object(__WEBPACK_IMPORTED_MODULE_6__lib__[\"i\" /* createHTMLLabel */])(label, { defaultProps: {\n htmlFor: __WEBPACK_IMPORTED_MODULE_1_lodash_get___default()(controlProps, 'id') }\n }),\n Object(__WEBPACK_IMPORTED_MODULE_5_react__[\"createElement\"])(control, controlProps)\n );\n}", "function FormField(props) {\n var children = props.children,\n className = props.className,\n content = props.content,\n control = props.control,\n disabled = props.disabled,\n error = props.error,\n inline = props.inline,\n label = props.label,\n required = props.required,\n type = props.type,\n width = props.width;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_3_classnames___default()(Object(__WEBPACK_IMPORTED_MODULE_6__lib__[\"B\" /* useKeyOnly */])(disabled, 'disabled'), Object(__WEBPACK_IMPORTED_MODULE_6__lib__[\"B\" /* useKeyOnly */])(error, 'error'), Object(__WEBPACK_IMPORTED_MODULE_6__lib__[\"B\" /* useKeyOnly */])(inline, 'inline'), Object(__WEBPACK_IMPORTED_MODULE_6__lib__[\"B\" /* useKeyOnly */])(required, 'required'), Object(__WEBPACK_IMPORTED_MODULE_6__lib__[\"H\" /* useWidthProp */])(width, 'wide'), 'field', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_6__lib__[\"r\" /* getUnhandledProps */])(FormField, props);\n var ElementType = Object(__WEBPACK_IMPORTED_MODULE_6__lib__[\"q\" /* getElementType */])(FormField, props);\n\n // ----------------------------------------\n // No Control\n // ----------------------------------------\n\n if (__WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(control)) {\n if (__WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(label)) {\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n __WEBPACK_IMPORTED_MODULE_6__lib__[\"d\" /* childrenUtils */].isNil(children) ? content : children\n );\n }\n\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n Object(__WEBPACK_IMPORTED_MODULE_6__lib__[\"i\" /* createHTMLLabel */])(label)\n );\n }\n\n // ----------------------------------------\n // Checkbox/Radio Control\n // ----------------------------------------\n var controlProps = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { content: content, children: children, disabled: disabled, required: required, type: type\n\n // wrap HTML checkboxes/radios in the label\n });if (control === 'input' && (type === 'checkbox' || type === 'radio')) {\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n ElementType,\n { className: classes },\n __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n 'label',\n null,\n Object(__WEBPACK_IMPORTED_MODULE_5_react__[\"createElement\"])(control, controlProps),\n ' ',\n label\n )\n );\n }\n\n // pass label prop to controls that support it\n if (control === __WEBPACK_IMPORTED_MODULE_7__modules_Checkbox__[\"a\" /* default */] || control === __WEBPACK_IMPORTED_MODULE_8__addons_Radio__[\"a\" /* default */]) {\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n ElementType,\n { className: classes },\n Object(__WEBPACK_IMPORTED_MODULE_5_react__[\"createElement\"])(control, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, controlProps, { label: label }))\n );\n }\n\n // ----------------------------------------\n // Other Control\n // ----------------------------------------\n\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n ElementType,\n { className: classes },\n Object(__WEBPACK_IMPORTED_MODULE_6__lib__[\"i\" /* createHTMLLabel */])(label, { defaultProps: {\n htmlFor: __WEBPACK_IMPORTED_MODULE_1_lodash_get___default()(controlProps, 'id') }\n }),\n Object(__WEBPACK_IMPORTED_MODULE_5_react__[\"createElement\"])(control, controlProps)\n );\n}", "function FormField(props) {\n var children = props.children,\n className = props.className,\n content = props.content,\n control = props.control,\n disabled = props.disabled,\n error = props.error,\n inline = props.inline,\n label = props.label,\n required = props.required,\n type = props.type,\n width = props.width;\n var classes = __WEBPACK_IMPORTED_MODULE_4_classnames___default()(Object(__WEBPACK_IMPORTED_MODULE_7__lib__[\"A\" /* useKeyOnly */])(disabled, 'disabled'), Object(__WEBPACK_IMPORTED_MODULE_7__lib__[\"A\" /* useKeyOnly */])(error, 'error'), Object(__WEBPACK_IMPORTED_MODULE_7__lib__[\"A\" /* useKeyOnly */])(inline, 'inline'), Object(__WEBPACK_IMPORTED_MODULE_7__lib__[\"A\" /* useKeyOnly */])(required, 'required'), Object(__WEBPACK_IMPORTED_MODULE_7__lib__[\"G\" /* useWidthProp */])(width, 'wide'), 'field', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_7__lib__[\"r\" /* getUnhandledProps */])(FormField, props);\n var ElementType = Object(__WEBPACK_IMPORTED_MODULE_7__lib__[\"q\" /* getElementType */])(FormField, props); // ----------------------------------------\n // No Control\n // ----------------------------------------\n\n if (__WEBPACK_IMPORTED_MODULE_3_lodash_isNil___default()(control)) {\n if (__WEBPACK_IMPORTED_MODULE_3_lodash_isNil___default()(label)) {\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(ElementType, __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_extends___default()({}, rest, {\n className: classes\n }), __WEBPACK_IMPORTED_MODULE_7__lib__[\"c\" /* childrenUtils */].isNil(children) ? content : children);\n }\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(ElementType, __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_extends___default()({}, rest, {\n className: classes\n }), Object(__WEBPACK_IMPORTED_MODULE_7__lib__[\"h\" /* createHTMLLabel */])(label, {\n autoGenerateKey: false\n }));\n } // ----------------------------------------\n // Checkbox/Radio Control\n // ----------------------------------------\n\n\n var controlProps = __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_objectSpread___default()({}, rest, {\n content: content,\n children: children,\n disabled: disabled,\n required: required,\n type: type // wrap HTML checkboxes/radios in the label\n\n });\n\n if (control === 'input' && (type === 'checkbox' || type === 'radio')) {\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(ElementType, {\n className: classes\n }, __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\"label\", null, Object(__WEBPACK_IMPORTED_MODULE_6_react__[\"createElement\"])(control, controlProps), \" \", label));\n } // pass label prop to controls that support it\n\n\n if (control === __WEBPACK_IMPORTED_MODULE_8__modules_Checkbox__[\"a\" /* default */] || control === __WEBPACK_IMPORTED_MODULE_9__addons_Radio__[\"a\" /* default */]) {\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(ElementType, {\n className: classes\n }, Object(__WEBPACK_IMPORTED_MODULE_6_react__[\"createElement\"])(control, __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_objectSpread___default()({}, controlProps, {\n label: label\n })));\n } // ----------------------------------------\n // Other Control\n // ----------------------------------------\n\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(ElementType, {\n className: classes\n }, Object(__WEBPACK_IMPORTED_MODULE_7__lib__[\"h\" /* createHTMLLabel */])(label, {\n defaultProps: {\n htmlFor: __WEBPACK_IMPORTED_MODULE_2_lodash_get___default()(controlProps, 'id')\n },\n autoGenerateKey: false\n }), Object(__WEBPACK_IMPORTED_MODULE_6_react__[\"createElement\"])(control, controlProps));\n}", "componentDidMount() {\n // We add element label for input mobile and phone\n this.setLabelElementForInput('account_user_mobile', 'rp.checkout.customer.mobile');\n this.setLabelElementForInput('account_user_phone', 'rp.checkout.customer.phone');\n }", "function ExampleFormComponent() {\n var _this = _super.call(this) || this;\n _this.email = \"\";\n _this.password = \"\";\n _this.rememberMe = false;\n if (typeof _this.data === 'string') {\n _this.data = JSON.parse(_this.data);\n }\n _this.data = (_this.data) ? _this.data : {};\n _this.title = (_this.title) ? _this.title : 'Welcome!';\n return _this;\n }", "render() {\n // onSubmit binds goToStore method to \"this\"\n return (\n <form className=\"store-selector\" onSubmit={(e) => this.goToStore(e)}>\n <h2>Please Enter A Store</h2>\n {/* when input is rendered on the page, it's going to put a reference of the input on the class itself */}\n <input type=\"text\" required placeholder=\"Store Name\" defaultValue={getFunName()} ref={(input) => { this.storeInput = input } } />\n <button type=\"submit\">Visit Store</button>\n </form>\n )\n }" ]
[ "0.713233", "0.71126294", "0.71036565", "0.7081676", "0.7058521", "0.7058521", "0.619911", "0.6107712", "0.6107712", "0.6107712", "0.598304", "0.5802057", "0.5759564", "0.5643108", "0.5533933", "0.53613365", "0.5301838", "0.52787024", "0.52782476", "0.52213615", "0.52167946", "0.521251", "0.5203792", "0.51683384", "0.51253617", "0.50325155", "0.50126857", "0.497493", "0.49696174", "0.49208683", "0.49185184", "0.49046913", "0.48652464", "0.48641518", "0.4841913", "0.48345312", "0.48170263", "0.4786419", "0.478584", "0.4772474", "0.47599608", "0.47592992", "0.47570184", "0.4744668", "0.47438335", "0.4719583", "0.4704873", "0.470254", "0.46751583", "0.46710205", "0.46685523", "0.4665598", "0.46129748", "0.45995688", "0.4592979", "0.45911056", "0.45904613", "0.4576629", "0.4572513", "0.4570887", "0.45574605", "0.45542866", "0.4553885", "0.45467445", "0.45447153", "0.45411554", "0.45339507", "0.45295155", "0.4528344", "0.4527166", "0.45223835", "0.45195526", "0.45143422", "0.4512012", "0.45092243", "0.45049334", "0.45023084", "0.45014954", "0.4498807", "0.44915932", "0.44889253", "0.44824034", "0.4481062", "0.4478674", "0.4468162", "0.44630373", "0.44593677", "0.4456045", "0.44497874", "0.44409528", "0.44400924", "0.44383264", "0.4434725", "0.44346955", "0.44341892", "0.44341892", "0.44340205", "0.44264573", "0.44261432", "0.4423602" ]
0.61819106
7
! Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
function __awaiter(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function WSAPI() {\n }", "private internal function m248() {}", "private public function m246() {}", "createObjectContext2() {\n console.log('deprecated')\n return C.extension\n }", "supportsPlatform() {\n return true;\n }", "function T7(){return typeof window>\"u\"&&(self.window=self),function(n){var e={parse:function(r){var s=e._bin,o=new Uint8Array(r);if(s.readASCII(o,0,4)==\"ttcf\"){var a=4;s.readUshort(o,a),a+=2,s.readUshort(o,a),a+=2;var l=s.readUint(o,a);a+=4;for(var c=[],d=0;d<l;d++){var h=s.readUint(o,a);a+=4,c.push(e._readFont(o,h))}return c}return[e._readFont(o,0)]},_readFont:function(r,s){var o=e._bin,a=s;o.readFixed(r,s),s+=4;var l=o.readUshort(r,s);s+=2,o.readUshort(r,s),s+=2,o.readUshort(r,s),s+=2,o.readUshort(r,s),s+=2;for(var c=[\"cmap\",\"head\",\"hhea\",\"maxp\",\"hmtx\",\"name\",\"OS/2\",\"post\",\"loca\",\"glyf\",\"kern\",\"CFF \",\"GPOS\",\"GSUB\",\"SVG \"],d={_data:r,_offset:a},h={},p=0;p<l;p++){var m=o.readASCII(r,s,4);s+=4,o.readUint(r,s),s+=4;var v=o.readUint(r,s);s+=4;var y=o.readUint(r,s);s+=4,h[m]={offset:v,length:y}}for(p=0;p<c.length;p++){var x=c[p];h[x]&&(d[x.trim()]=e[x.trim()].parse(r,h[x].offset,h[x].length,d))}return d},_tabOffset:function(r,s,o){for(var a=e._bin,l=a.readUshort(r,o+4),c=o+12,d=0;d<l;d++){var h=a.readASCII(r,c,4);c+=4,a.readUint(r,c),c+=4;var p=a.readUint(r,c);if(c+=4,a.readUint(r,c),c+=4,h==s)return p}return 0}};e._bin={readFixed:function(r,s){return(r[s]<<8|r[s+1])+(r[s+2]<<8|r[s+3])/65540},readF2dot14:function(r,s){return e._bin.readShort(r,s)/16384},readInt:function(r,s){return e._bin._view(r).getInt32(s)},readInt8:function(r,s){return e._bin._view(r).getInt8(s)},readShort:function(r,s){return e._bin._view(r).getInt16(s)},readUshort:function(r,s){return e._bin._view(r).getUint16(s)},readUshorts:function(r,s,o){for(var a=[],l=0;l<o;l++)a.push(e._bin.readUshort(r,s+2*l));return a},readUint:function(r,s){return e._bin._view(r).getUint32(s)},readUint64:function(r,s){return 4294967296*e._bin.readUint(r,s)+e._bin.readUint(r,s+4)},readASCII:function(r,s,o){for(var a=\"\",l=0;l<o;l++)a+=String.fromCharCode(r[s+l]);return a},readUnicode:function(r,s,o){for(var a=\"\",l=0;l<o;l++){var c=r[s++]<<8|r[s++];a+=String.fromCharCode(c)}return a},_tdec:typeof window<\"u\"&&window.TextDecoder?new window.TextDecoder:null,readUTF8:function(r,s,o){var a=e._bin._tdec;return a&&s==0&&o==r.length?a.decode(r):e._bin.readASCII(r,s,o)},readBytes:function(r,s,o){for(var a=[],l=0;l<o;l++)a.push(r[s+l]);return a},readASCIIArray:function(r,s,o){for(var a=[],l=0;l<o;l++)a.push(String.fromCharCode(r[s+l]));return a},_view:function(r){return r._dataView||(r._dataView=r.buffer?new DataView(r.buffer,r.byteOffset,r.byteLength):new DataView(new Uint8Array(r).buffer))}},e._lctf={},e._lctf.parse=function(r,s,o,a,l){var c=e._bin,d={},h=s;c.readFixed(r,s),s+=4;var p=c.readUshort(r,s);s+=2;var m=c.readUshort(r,s);s+=2;var v=c.readUshort(r,s);return s+=2,d.scriptList=e._lctf.readScriptList(r,h+p),d.featureList=e._lctf.readFeatureList(r,h+m),d.lookupList=e._lctf.readLookupList(r,h+v,l),d},e._lctf.readLookupList=function(r,s,o){var a=e._bin,l=s,c=[],d=a.readUshort(r,s);s+=2;for(var h=0;h<d;h++){var p=a.readUshort(r,s);s+=2;var m=e._lctf.readLookupTable(r,l+p,o);c.push(m)}return c},e._lctf.readLookupTable=function(r,s,o){var a=e._bin,l=s,c={tabs:[]};c.ltype=a.readUshort(r,s),s+=2,c.flag=a.readUshort(r,s),s+=2;var d=a.readUshort(r,s);s+=2;for(var h=c.ltype,p=0;p<d;p++){var m=a.readUshort(r,s);s+=2;var v=o(r,h,l+m,c);c.tabs.push(v)}return c},e._lctf.numOfOnes=function(r){for(var s=0,o=0;o<32;o++)r>>>o&1&&s++;return s},e._lctf.readClassDef=function(r,s){var o=e._bin,a=[],l=o.readUshort(r,s);if(s+=2,l==1){var c=o.readUshort(r,s);s+=2;var d=o.readUshort(r,s);s+=2;for(var h=0;h<d;h++)a.push(c+h),a.push(c+h),a.push(o.readUshort(r,s)),s+=2}if(l==2){var p=o.readUshort(r,s);for(s+=2,h=0;h<p;h++)a.push(o.readUshort(r,s)),s+=2,a.push(o.readUshort(r,s)),s+=2,a.push(o.readUshort(r,s)),s+=2}return a},e._lctf.getInterval=function(r,s){for(var o=0;o<r.length;o+=3){var a=r[o],l=r[o+1];if(r[o+2],a<=s&&s<=l)return o}return-1},e._lctf.readCoverage=function(r,s){var o=e._bin,a={};a.fmt=o.readUshort(r,s),s+=2;var l=o.readUshort(r,s);return s+=2,a.fmt==1&&(a.tab=o.readUshorts(r,s,l)),a.fmt==2&&(a.tab=o.readUshorts(r,s,3*l)),a},e._lctf.coverageIndex=function(r,s){var o=r.tab;if(r.fmt==1)return o.indexOf(s);if(r.fmt==2){var a=e._lctf.getInterval(o,s);if(a!=-1)return o[a+2]+(s-o[a])}return-1},e._lctf.readFeatureList=function(r,s){var o=e._bin,a=s,l=[],c=o.readUshort(r,s);s+=2;for(var d=0;d<c;d++){var h=o.readASCII(r,s,4);s+=4;var p=o.readUshort(r,s);s+=2;var m=e._lctf.readFeatureTable(r,a+p);m.tag=h.trim(),l.push(m)}return l},e._lctf.readFeatureTable=function(r,s){var o=e._bin,a=s,l={},c=o.readUshort(r,s);s+=2,c>0&&(l.featureParams=a+c);var d=o.readUshort(r,s);s+=2,l.tab=[];for(var h=0;h<d;h++)l.tab.push(o.readUshort(r,s+2*h));return l},e._lctf.readScriptList=function(r,s){var o=e._bin,a=s,l={},c=o.readUshort(r,s);s+=2;for(var d=0;d<c;d++){var h=o.readASCII(r,s,4);s+=4;var p=o.readUshort(r,s);s+=2,l[h.trim()]=e._lctf.readScriptTable(r,a+p)}return l},e._lctf.readScriptTable=function(r,s){var o=e._bin,a=s,l={},c=o.readUshort(r,s);s+=2,l.default=e._lctf.readLangSysTable(r,a+c);var d=o.readUshort(r,s);s+=2;for(var h=0;h<d;h++){var p=o.readASCII(r,s,4);s+=4;var m=o.readUshort(r,s);s+=2,l[p.trim()]=e._lctf.readLangSysTable(r,a+m)}return l},e._lctf.readLangSysTable=function(r,s){var o=e._bin,a={};o.readUshort(r,s),s+=2,a.reqFeature=o.readUshort(r,s),s+=2;var l=o.readUshort(r,s);return s+=2,a.features=o.readUshorts(r,s,l),a},e.CFF={},e.CFF.parse=function(r,s,o){var a=e._bin;(r=new Uint8Array(r.buffer,s,o))[s=0],r[++s],r[++s],r[++s],s++;var l=[];s=e.CFF.readIndex(r,s,l);for(var c=[],d=0;d<l.length-1;d++)c.push(a.readASCII(r,s+l[d],l[d+1]-l[d]));s+=l[l.length-1];var h=[];s=e.CFF.readIndex(r,s,h);var p=[];for(d=0;d<h.length-1;d++)p.push(e.CFF.readDict(r,s+h[d],s+h[d+1]));s+=h[h.length-1];var m=p[0],v=[];s=e.CFF.readIndex(r,s,v);var y=[];for(d=0;d<v.length-1;d++)y.push(a.readASCII(r,s+v[d],v[d+1]-v[d]));if(s+=v[v.length-1],e.CFF.readSubrs(r,s,m),m.CharStrings){s=m.CharStrings,v=[],s=e.CFF.readIndex(r,s,v);var x=[];for(d=0;d<v.length-1;d++)x.push(a.readBytes(r,s+v[d],v[d+1]-v[d]));m.CharStrings=x}if(m.ROS){s=m.FDArray;var w=[];for(s=e.CFF.readIndex(r,s,w),m.FDArray=[],d=0;d<w.length-1;d++){var _=e.CFF.readDict(r,s+w[d],s+w[d+1]);e.CFF._readFDict(r,_,y),m.FDArray.push(_)}s+=w[w.length-1],s=m.FDSelect,m.FDSelect=[];var S=r[s];if(s++,S!=3)throw S;var b=a.readUshort(r,s);for(s+=2,d=0;d<b+1;d++)m.FDSelect.push(a.readUshort(r,s),r[s+2]),s+=3}return m.Encoding&&(m.Encoding=e.CFF.readEncoding(r,m.Encoding,m.CharStrings.length)),m.charset&&(m.charset=e.CFF.readCharset(r,m.charset,m.CharStrings.length)),e.CFF._readFDict(r,m,y),m},e.CFF._readFDict=function(r,s,o){var a;for(var l in s.Private&&(a=s.Private[1],s.Private=e.CFF.readDict(r,a,a+s.Private[0]),s.Private.Subrs&&e.CFF.readSubrs(r,a+s.Private.Subrs,s.Private)),s)[\"FamilyName\",\"FontName\",\"FullName\",\"Notice\",\"version\",\"Copyright\"].indexOf(l)!=-1&&(s[l]=o[s[l]-426+35])},e.CFF.readSubrs=function(r,s,o){var a=e._bin,l=[];s=e.CFF.readIndex(r,s,l);var c,d=l.length;c=d<1240?107:d<33900?1131:32768,o.Bias=c,o.Subrs=[];for(var h=0;h<l.length-1;h++)o.Subrs.push(a.readBytes(r,s+l[h],l[h+1]-l[h]))},e.CFF.tableSE=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,0,111,112,113,114,0,115,116,117,118,119,120,121,122,0,123,0,124,125,126,127,128,129,130,131,0,132,133,0,134,135,136,137,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,0,139,0,0,0,0,140,141,142,143,0,0,0,0,0,144,0,0,0,145,0,0,146,147,148,149,0,0,0,0],e.CFF.glyphByUnicode=function(r,s){for(var o=0;o<r.charset.length;o++)if(r.charset[o]==s)return o;return-1},e.CFF.glyphBySE=function(r,s){return s<0||s>255?-1:e.CFF.glyphByUnicode(r,e.CFF.tableSE[s])},e.CFF.readEncoding=function(r,s,o){e._bin;var a=[\".notdef\"],l=r[s];if(s++,l!=0)throw\"error: unknown encoding format: \"+l;var c=r[s];s++;for(var d=0;d<c;d++)a.push(r[s+d]);return a},e.CFF.readCharset=function(r,s,o){var a=e._bin,l=[\".notdef\"],c=r[s];if(s++,c==0)for(var d=0;d<o;d++){var h=a.readUshort(r,s);s+=2,l.push(h)}else{if(c!=1&&c!=2)throw\"error: format: \"+c;for(;l.length<o;){h=a.readUshort(r,s),s+=2;var p=0;for(c==1?(p=r[s],s++):(p=a.readUshort(r,s),s+=2),d=0;d<=p;d++)l.push(h),h++}}return l},e.CFF.readIndex=function(r,s,o){var a=e._bin,l=a.readUshort(r,s)+1,c=r[s+=2];if(s++,c==1)for(var d=0;d<l;d++)o.push(r[s+d]);else if(c==2)for(d=0;d<l;d++)o.push(a.readUshort(r,s+2*d));else if(c==3)for(d=0;d<l;d++)o.push(16777215&a.readUint(r,s+3*d-1));else if(l!=1)throw\"unsupported offset size: \"+c+\", count: \"+l;return(s+=l*c)-1},e.CFF.getCharString=function(r,s,o){var a=e._bin,l=r[s],c=r[s+1];r[s+2],r[s+3],r[s+4];var d=1,h=null,p=null;l<=20&&(h=l,d=1),l==12&&(h=100*l+c,d=2),21<=l&&l<=27&&(h=l,d=1),l==28&&(p=a.readShort(r,s+1),d=3),29<=l&&l<=31&&(h=l,d=1),32<=l&&l<=246&&(p=l-139,d=1),247<=l&&l<=250&&(p=256*(l-247)+c+108,d=2),251<=l&&l<=254&&(p=256*-(l-251)-c-108,d=2),l==255&&(p=a.readInt(r,s+1)/65535,d=5),o.val=p??\"o\"+h,o.size=d},e.CFF.readCharString=function(r,s,o){for(var a=s+o,l=e._bin,c=[];s<a;){var d=r[s],h=r[s+1];r[s+2],r[s+3],r[s+4];var p=1,m=null,v=null;d<=20&&(m=d,p=1),d==12&&(m=100*d+h,p=2),d!=19&&d!=20||(m=d,p=2),21<=d&&d<=27&&(m=d,p=1),d==28&&(v=l.readShort(r,s+1),p=3),29<=d&&d<=31&&(m=d,p=1),32<=d&&d<=246&&(v=d-139,p=1),247<=d&&d<=250&&(v=256*(d-247)+h+108,p=2),251<=d&&d<=254&&(v=256*-(d-251)-h-108,p=2),d==255&&(v=l.readInt(r,s+1)/65535,p=5),c.push(v??\"o\"+m),s+=p}return c},e.CFF.readDict=function(r,s,o){for(var a=e._bin,l={},c=[];s<o;){var d=r[s],h=r[s+1];r[s+2],r[s+3],r[s+4];var p=1,m=null,v=null;if(d==28&&(v=a.readShort(r,s+1),p=3),d==29&&(v=a.readInt(r,s+1),p=5),32<=d&&d<=246&&(v=d-139,p=1),247<=d&&d<=250&&(v=256*(d-247)+h+108,p=2),251<=d&&d<=254&&(v=256*-(d-251)-h-108,p=2),d==255)throw v=a.readInt(r,s+1)/65535,p=5,\"unknown number\";if(d==30){var y=[];for(p=1;;){var x=r[s+p];p++;var w=x>>4,_=15&x;if(w!=15&&y.push(w),_!=15&&y.push(_),_==15)break}for(var S=\"\",b=[0,1,2,3,4,5,6,7,8,9,\".\",\"e\",\"e-\",\"reserved\",\"-\",\"endOfNumber\"],T=0;T<y.length;T++)S+=b[y[T]];v=parseFloat(S)}d<=21&&(m=[\"version\",\"Notice\",\"FullName\",\"FamilyName\",\"Weight\",\"FontBBox\",\"BlueValues\",\"OtherBlues\",\"FamilyBlues\",\"FamilyOtherBlues\",\"StdHW\",\"StdVW\",\"escape\",\"UniqueID\",\"XUID\",\"charset\",\"Encoding\",\"CharStrings\",\"Private\",\"Subrs\",\"defaultWidthX\",\"nominalWidthX\"][d],p=1,d==12&&(m=[\"Copyright\",\"isFixedPitch\",\"ItalicAngle\",\"UnderlinePosition\",\"UnderlineThickness\",\"PaintType\",\"CharstringType\",\"FontMatrix\",\"StrokeWidth\",\"BlueScale\",\"BlueShift\",\"BlueFuzz\",\"StemSnapH\",\"StemSnapV\",\"ForceBold\",0,0,\"LanguageGroup\",\"ExpansionFactor\",\"initialRandomSeed\",\"SyntheticBase\",\"PostScript\",\"BaseFontName\",\"BaseFontBlend\",0,0,0,0,0,0,\"ROS\",\"CIDFontVersion\",\"CIDFontRevision\",\"CIDFontType\",\"CIDCount\",\"UIDBase\",\"FDArray\",\"FDSelect\",\"FontName\"][h],p=2)),m!=null?(l[m]=c.length==1?c[0]:c,c=[]):c.push(v),s+=p}return l},e.cmap={},e.cmap.parse=function(r,s,o){r=new Uint8Array(r.buffer,s,o),s=0;var a=e._bin,l={};a.readUshort(r,s),s+=2;var c=a.readUshort(r,s);s+=2;var d=[];l.tables=[];for(var h=0;h<c;h++){var p=a.readUshort(r,s);s+=2;var m=a.readUshort(r,s);s+=2;var v=a.readUint(r,s);s+=4;var y=\"p\"+p+\"e\"+m,x=d.indexOf(v);if(x==-1){var w;x=l.tables.length,d.push(v);var _=a.readUshort(r,v);_==0?w=e.cmap.parse0(r,v):_==4?w=e.cmap.parse4(r,v):_==6?w=e.cmap.parse6(r,v):_==12?w=e.cmap.parse12(r,v):console.debug(\"unknown format: \"+_,p,m,v),l.tables.push(w)}if(l[y]!=null)throw\"multiple tables for one platform+encoding\";l[y]=x}return l},e.cmap.parse0=function(r,s){var o=e._bin,a={};a.format=o.readUshort(r,s),s+=2;var l=o.readUshort(r,s);s+=2,o.readUshort(r,s),s+=2,a.map=[];for(var c=0;c<l-6;c++)a.map.push(r[s+c]);return a},e.cmap.parse4=function(r,s){var o=e._bin,a=s,l={};l.format=o.readUshort(r,s),s+=2;var c=o.readUshort(r,s);s+=2,o.readUshort(r,s),s+=2;var d=o.readUshort(r,s);s+=2;var h=d/2;l.searchRange=o.readUshort(r,s),s+=2,l.entrySelector=o.readUshort(r,s),s+=2,l.rangeShift=o.readUshort(r,s),s+=2,l.endCount=o.readUshorts(r,s,h),s+=2*h,s+=2,l.startCount=o.readUshorts(r,s,h),s+=2*h,l.idDelta=[];for(var p=0;p<h;p++)l.idDelta.push(o.readShort(r,s)),s+=2;for(l.idRangeOffset=o.readUshorts(r,s,h),s+=2*h,l.glyphIdArray=[];s<a+c;)l.glyphIdArray.push(o.readUshort(r,s)),s+=2;return l},e.cmap.parse6=function(r,s){var o=e._bin,a={};a.format=o.readUshort(r,s),s+=2,o.readUshort(r,s),s+=2,o.readUshort(r,s),s+=2,a.firstCode=o.readUshort(r,s),s+=2;var l=o.readUshort(r,s);s+=2,a.glyphIdArray=[];for(var c=0;c<l;c++)a.glyphIdArray.push(o.readUshort(r,s)),s+=2;return a},e.cmap.parse12=function(r,s){var o=e._bin,a={};a.format=o.readUshort(r,s),s+=2,s+=2,o.readUint(r,s),s+=4,o.readUint(r,s),s+=4;var l=o.readUint(r,s);s+=4,a.groups=[];for(var c=0;c<l;c++){var d=s+12*c,h=o.readUint(r,d+0),p=o.readUint(r,d+4),m=o.readUint(r,d+8);a.groups.push([h,p,m])}return a},e.glyf={},e.glyf.parse=function(r,s,o,a){for(var l=[],c=0;c<a.maxp.numGlyphs;c++)l.push(null);return l},e.glyf._parseGlyf=function(r,s){var o=e._bin,a=r._data,l=e._tabOffset(a,\"glyf\",r._offset)+r.loca[s];if(r.loca[s]==r.loca[s+1])return null;var c={};if(c.noc=o.readShort(a,l),l+=2,c.xMin=o.readShort(a,l),l+=2,c.yMin=o.readShort(a,l),l+=2,c.xMax=o.readShort(a,l),l+=2,c.yMax=o.readShort(a,l),l+=2,c.xMin>=c.xMax||c.yMin>=c.yMax)return null;if(c.noc>0){c.endPts=[];for(var d=0;d<c.noc;d++)c.endPts.push(o.readUshort(a,l)),l+=2;var h=o.readUshort(a,l);if(l+=2,a.length-l<h)return null;c.instructions=o.readBytes(a,l,h),l+=h;var p=c.endPts[c.noc-1]+1;for(c.flags=[],d=0;d<p;d++){var m=a[l];if(l++,c.flags.push(m),(8&m)!=0){var v=a[l];l++;for(var y=0;y<v;y++)c.flags.push(m),d++}}for(c.xs=[],d=0;d<p;d++){var x=(2&c.flags[d])!=0,w=(16&c.flags[d])!=0;x?(c.xs.push(w?a[l]:-a[l]),l++):w?c.xs.push(0):(c.xs.push(o.readShort(a,l)),l+=2)}for(c.ys=[],d=0;d<p;d++)x=(4&c.flags[d])!=0,w=(32&c.flags[d])!=0,x?(c.ys.push(w?a[l]:-a[l]),l++):w?c.ys.push(0):(c.ys.push(o.readShort(a,l)),l+=2);var _=0,S=0;for(d=0;d<p;d++)_+=c.xs[d],S+=c.ys[d],c.xs[d]=_,c.ys[d]=S}else{var b;c.parts=[];do{b=o.readUshort(a,l),l+=2;var T={m:{a:1,b:0,c:0,d:1,tx:0,ty:0},p1:-1,p2:-1};if(c.parts.push(T),T.glyphIndex=o.readUshort(a,l),l+=2,1&b){var A=o.readShort(a,l);l+=2;var L=o.readShort(a,l);l+=2}else A=o.readInt8(a,l),l++,L=o.readInt8(a,l),l++;2&b?(T.m.tx=A,T.m.ty=L):(T.p1=A,T.p2=L),8&b?(T.m.a=T.m.d=o.readF2dot14(a,l),l+=2):64&b?(T.m.a=o.readF2dot14(a,l),l+=2,T.m.d=o.readF2dot14(a,l),l+=2):128&b&&(T.m.a=o.readF2dot14(a,l),l+=2,T.m.b=o.readF2dot14(a,l),l+=2,T.m.c=o.readF2dot14(a,l),l+=2,T.m.d=o.readF2dot14(a,l),l+=2)}while(32&b);if(256&b){var C=o.readUshort(a,l);for(l+=2,c.instr=[],d=0;d<C;d++)c.instr.push(a[l]),l++}}return c},e.GPOS={},e.GPOS.parse=function(r,s,o,a){return e._lctf.parse(r,s,o,a,e.GPOS.subt)},e.GPOS.subt=function(r,s,o,a){var l=e._bin,c=o,d={};if(d.fmt=l.readUshort(r,o),o+=2,s==1||s==2||s==3||s==7||s==8&&d.fmt<=2){var h=l.readUshort(r,o);o+=2,d.coverage=e._lctf.readCoverage(r,h+c)}if(s==1&&d.fmt==1){var p=l.readUshort(r,o);o+=2;var m=e._lctf.numOfOnes(p);p!=0&&(d.pos=e.GPOS.readValueRecord(r,o,p))}else if(s==2&&d.fmt>=1&&d.fmt<=2){p=l.readUshort(r,o),o+=2;var v=l.readUshort(r,o);o+=2,m=e._lctf.numOfOnes(p);var y=e._lctf.numOfOnes(v);if(d.fmt==1){d.pairsets=[];var x=l.readUshort(r,o);o+=2;for(var w=0;w<x;w++){var _=c+l.readUshort(r,o);o+=2;var S=l.readUshort(r,_);_+=2;for(var b=[],T=0;T<S;T++){var A=l.readUshort(r,_);_+=2,p!=0&&(V=e.GPOS.readValueRecord(r,_,p),_+=2*m),v!=0&&(W=e.GPOS.readValueRecord(r,_,v),_+=2*y),b.push({gid2:A,val1:V,val2:W})}d.pairsets.push(b)}}if(d.fmt==2){var L=l.readUshort(r,o);o+=2;var C=l.readUshort(r,o);o+=2;var R=l.readUshort(r,o);o+=2;var k=l.readUshort(r,o);for(o+=2,d.classDef1=e._lctf.readClassDef(r,c+L),d.classDef2=e._lctf.readClassDef(r,c+C),d.matrix=[],w=0;w<R;w++){var H=[];for(T=0;T<k;T++){var V=null,W=null;p!=0&&(V=e.GPOS.readValueRecord(r,o,p),o+=2*m),v!=0&&(W=e.GPOS.readValueRecord(r,o,v),o+=2*y),H.push({val1:V,val2:W})}d.matrix.push(H)}}}else{if(s==9&&d.fmt==1){var F=l.readUshort(r,o);o+=2;var J=l.readUint(r,o);if(o+=4,a.ltype==9)a.ltype=F;else if(a.ltype!=F)throw\"invalid extension substitution\";return e.GPOS.subt(r,a.ltype,c+J)}console.debug(\"unsupported GPOS table LookupType\",s,\"format\",d.fmt)}return d},e.GPOS.readValueRecord=function(r,s,o){var a=e._bin,l=[];return l.push(1&o?a.readShort(r,s):0),s+=1&o?2:0,l.push(2&o?a.readShort(r,s):0),s+=2&o?2:0,l.push(4&o?a.readShort(r,s):0),s+=4&o?2:0,l.push(8&o?a.readShort(r,s):0),s+=8&o?2:0,l},e.GSUB={},e.GSUB.parse=function(r,s,o,a){return e._lctf.parse(r,s,o,a,e.GSUB.subt)},e.GSUB.subt=function(r,s,o,a){var l=e._bin,c=o,d={};if(d.fmt=l.readUshort(r,o),o+=2,s!=1&&s!=4&&s!=5&&s!=6)return null;if(s==1||s==4||s==5&&d.fmt<=2||s==6&&d.fmt<=2){var h=l.readUshort(r,o);o+=2,d.coverage=e._lctf.readCoverage(r,c+h)}if(s==1&&d.fmt>=1&&d.fmt<=2){if(d.fmt==1)d.delta=l.readShort(r,o),o+=2;else if(d.fmt==2){var p=l.readUshort(r,o);o+=2,d.newg=l.readUshorts(r,o,p),o+=2*d.newg.length}}else if(s==4){d.vals=[],p=l.readUshort(r,o),o+=2;for(var m=0;m<p;m++){var v=l.readUshort(r,o);o+=2,d.vals.push(e.GSUB.readLigatureSet(r,c+v))}}else if(s==5&&d.fmt==2){if(d.fmt==2){var y=l.readUshort(r,o);o+=2,d.cDef=e._lctf.readClassDef(r,c+y),d.scset=[];var x=l.readUshort(r,o);for(o+=2,m=0;m<x;m++){var w=l.readUshort(r,o);o+=2,d.scset.push(w==0?null:e.GSUB.readSubClassSet(r,c+w))}}}else if(s==6&&d.fmt==3){if(d.fmt==3){for(m=0;m<3;m++){p=l.readUshort(r,o),o+=2;for(var _=[],S=0;S<p;S++)_.push(e._lctf.readCoverage(r,c+l.readUshort(r,o+2*S)));o+=2*p,m==0&&(d.backCvg=_),m==1&&(d.inptCvg=_),m==2&&(d.ahedCvg=_)}p=l.readUshort(r,o),o+=2,d.lookupRec=e.GSUB.readSubstLookupRecords(r,o,p)}}else{if(s==7&&d.fmt==1){var b=l.readUshort(r,o);o+=2;var T=l.readUint(r,o);if(o+=4,a.ltype==9)a.ltype=b;else if(a.ltype!=b)throw\"invalid extension substitution\";return e.GSUB.subt(r,a.ltype,c+T)}console.debug(\"unsupported GSUB table LookupType\",s,\"format\",d.fmt)}return d},e.GSUB.readSubClassSet=function(r,s){var o=e._bin.readUshort,a=s,l=[],c=o(r,s);s+=2;for(var d=0;d<c;d++){var h=o(r,s);s+=2,l.push(e.GSUB.readSubClassRule(r,a+h))}return l},e.GSUB.readSubClassRule=function(r,s){var o=e._bin.readUshort,a={},l=o(r,s),c=o(r,s+=2);s+=2,a.input=[];for(var d=0;d<l-1;d++)a.input.push(o(r,s)),s+=2;return a.substLookupRecords=e.GSUB.readSubstLookupRecords(r,s,c),a},e.GSUB.readSubstLookupRecords=function(r,s,o){for(var a=e._bin.readUshort,l=[],c=0;c<o;c++)l.push(a(r,s),a(r,s+2)),s+=4;return l},e.GSUB.readChainSubClassSet=function(r,s){var o=e._bin,a=s,l=[],c=o.readUshort(r,s);s+=2;for(var d=0;d<c;d++){var h=o.readUshort(r,s);s+=2,l.push(e.GSUB.readChainSubClassRule(r,a+h))}return l},e.GSUB.readChainSubClassRule=function(r,s){for(var o=e._bin,a={},l=[\"backtrack\",\"input\",\"lookahead\"],c=0;c<l.length;c++){var d=o.readUshort(r,s);s+=2,c==1&&d--,a[l[c]]=o.readUshorts(r,s,d),s+=2*a[l[c]].length}return d=o.readUshort(r,s),s+=2,a.subst=o.readUshorts(r,s,2*d),s+=2*a.subst.length,a},e.GSUB.readLigatureSet=function(r,s){var o=e._bin,a=s,l=[],c=o.readUshort(r,s);s+=2;for(var d=0;d<c;d++){var h=o.readUshort(r,s);s+=2,l.push(e.GSUB.readLigature(r,a+h))}return l},e.GSUB.readLigature=function(r,s){var o=e._bin,a={chain:[]};a.nglyph=o.readUshort(r,s),s+=2;var l=o.readUshort(r,s);s+=2;for(var c=0;c<l-1;c++)a.chain.push(o.readUshort(r,s)),s+=2;return a},e.head={},e.head.parse=function(r,s,o){var a=e._bin,l={};return a.readFixed(r,s),s+=4,l.fontRevision=a.readFixed(r,s),s+=4,a.readUint(r,s),s+=4,a.readUint(r,s),s+=4,l.flags=a.readUshort(r,s),s+=2,l.unitsPerEm=a.readUshort(r,s),s+=2,l.created=a.readUint64(r,s),s+=8,l.modified=a.readUint64(r,s),s+=8,l.xMin=a.readShort(r,s),s+=2,l.yMin=a.readShort(r,s),s+=2,l.xMax=a.readShort(r,s),s+=2,l.yMax=a.readShort(r,s),s+=2,l.macStyle=a.readUshort(r,s),s+=2,l.lowestRecPPEM=a.readUshort(r,s),s+=2,l.fontDirectionHint=a.readShort(r,s),s+=2,l.indexToLocFormat=a.readShort(r,s),s+=2,l.glyphDataFormat=a.readShort(r,s),s+=2,l},e.hhea={},e.hhea.parse=function(r,s,o){var a=e._bin,l={};return a.readFixed(r,s),s+=4,l.ascender=a.readShort(r,s),s+=2,l.descender=a.readShort(r,s),s+=2,l.lineGap=a.readShort(r,s),s+=2,l.advanceWidthMax=a.readUshort(r,s),s+=2,l.minLeftSideBearing=a.readShort(r,s),s+=2,l.minRightSideBearing=a.readShort(r,s),s+=2,l.xMaxExtent=a.readShort(r,s),s+=2,l.caretSlopeRise=a.readShort(r,s),s+=2,l.caretSlopeRun=a.readShort(r,s),s+=2,l.caretOffset=a.readShort(r,s),s+=2,s+=8,l.metricDataFormat=a.readShort(r,s),s+=2,l.numberOfHMetrics=a.readUshort(r,s),s+=2,l},e.hmtx={},e.hmtx.parse=function(r,s,o,a){for(var l=e._bin,c={aWidth:[],lsBearing:[]},d=0,h=0,p=0;p<a.maxp.numGlyphs;p++)p<a.hhea.numberOfHMetrics&&(d=l.readUshort(r,s),s+=2,h=l.readShort(r,s),s+=2),c.aWidth.push(d),c.lsBearing.push(h);return c},e.kern={},e.kern.parse=function(r,s,o,a){var l=e._bin,c=l.readUshort(r,s);if(s+=2,c==1)return e.kern.parseV1(r,s-2,o,a);var d=l.readUshort(r,s);s+=2;for(var h={glyph1:[],rval:[]},p=0;p<d;p++){s+=2,o=l.readUshort(r,s),s+=2;var m=l.readUshort(r,s);s+=2;var v=m>>>8;if((v&=15)!=0)throw\"unknown kern table format: \"+v;s=e.kern.readFormat0(r,s,h)}return h},e.kern.parseV1=function(r,s,o,a){var l=e._bin;l.readFixed(r,s),s+=4;var c=l.readUint(r,s);s+=4;for(var d={glyph1:[],rval:[]},h=0;h<c;h++){l.readUint(r,s),s+=4;var p=l.readUshort(r,s);s+=2,l.readUshort(r,s),s+=2;var m=p>>>8;if((m&=15)!=0)throw\"unknown kern table format: \"+m;s=e.kern.readFormat0(r,s,d)}return d},e.kern.readFormat0=function(r,s,o){var a=e._bin,l=-1,c=a.readUshort(r,s);s+=2,a.readUshort(r,s),s+=2,a.readUshort(r,s),s+=2,a.readUshort(r,s),s+=2;for(var d=0;d<c;d++){var h=a.readUshort(r,s);s+=2;var p=a.readUshort(r,s);s+=2;var m=a.readShort(r,s);s+=2,h!=l&&(o.glyph1.push(h),o.rval.push({glyph2:[],vals:[]}));var v=o.rval[o.rval.length-1];v.glyph2.push(p),v.vals.push(m),l=h}return s},e.loca={},e.loca.parse=function(r,s,o,a){var l=e._bin,c=[],d=a.head.indexToLocFormat,h=a.maxp.numGlyphs+1;if(d==0)for(var p=0;p<h;p++)c.push(l.readUshort(r,s+(p<<1))<<1);if(d==1)for(p=0;p<h;p++)c.push(l.readUint(r,s+(p<<2)));return c},e.maxp={},e.maxp.parse=function(r,s,o){var a=e._bin,l={},c=a.readUint(r,s);return s+=4,l.numGlyphs=a.readUshort(r,s),s+=2,c==65536&&(l.maxPoints=a.readUshort(r,s),s+=2,l.maxContours=a.readUshort(r,s),s+=2,l.maxCompositePoints=a.readUshort(r,s),s+=2,l.maxCompositeContours=a.readUshort(r,s),s+=2,l.maxZones=a.readUshort(r,s),s+=2,l.maxTwilightPoints=a.readUshort(r,s),s+=2,l.maxStorage=a.readUshort(r,s),s+=2,l.maxFunctionDefs=a.readUshort(r,s),s+=2,l.maxInstructionDefs=a.readUshort(r,s),s+=2,l.maxStackElements=a.readUshort(r,s),s+=2,l.maxSizeOfInstructions=a.readUshort(r,s),s+=2,l.maxComponentElements=a.readUshort(r,s),s+=2,l.maxComponentDepth=a.readUshort(r,s),s+=2),l},e.name={},e.name.parse=function(r,s,o){var a=e._bin,l={};a.readUshort(r,s),s+=2;var c=a.readUshort(r,s);s+=2,a.readUshort(r,s);for(var d,h=[\"copyright\",\"fontFamily\",\"fontSubfamily\",\"ID\",\"fullName\",\"version\",\"postScriptName\",\"trademark\",\"manufacturer\",\"designer\",\"description\",\"urlVendor\",\"urlDesigner\",\"licence\",\"licenceURL\",\"---\",\"typoFamilyName\",\"typoSubfamilyName\",\"compatibleFull\",\"sampleText\",\"postScriptCID\",\"wwsFamilyName\",\"wwsSubfamilyName\",\"lightPalette\",\"darkPalette\"],p=s+=2,m=0;m<c;m++){var v=a.readUshort(r,s);s+=2;var y=a.readUshort(r,s);s+=2;var x=a.readUshort(r,s);s+=2;var w=a.readUshort(r,s);s+=2;var _=a.readUshort(r,s);s+=2;var S=a.readUshort(r,s);s+=2;var b,T=h[w],A=p+12*c+S;if(v==0)b=a.readUnicode(r,A,_/2);else if(v==3&&y==0)b=a.readUnicode(r,A,_/2);else if(y==0)b=a.readASCII(r,A,_);else if(y==1)b=a.readUnicode(r,A,_/2);else if(y==3)b=a.readUnicode(r,A,_/2);else{if(v!=1)throw\"unknown encoding \"+y+\", platformID: \"+v;b=a.readASCII(r,A,_),console.debug(\"reading unknown MAC encoding \"+y+\" as ASCII\")}var L=\"p\"+v+\",\"+x.toString(16);l[L]==null&&(l[L]={}),l[L][T!==void 0?T:w]=b,l[L]._lang=x}for(var C in l)if(l[C].postScriptName!=null&&l[C]._lang==1033)return l[C];for(var C in l)if(l[C].postScriptName!=null&&l[C]._lang==0)return l[C];for(var C in l)if(l[C].postScriptName!=null&&l[C]._lang==3084)return l[C];for(var C in l)if(l[C].postScriptName!=null)return l[C];for(var C in l){d=C;break}return console.debug(\"returning name table with languageID \"+l[d]._lang),l[d]},e[\"OS/2\"]={},e[\"OS/2\"].parse=function(r,s,o){var a=e._bin.readUshort(r,s);s+=2;var l={};if(a==0)e[\"OS/2\"].version0(r,s,l);else if(a==1)e[\"OS/2\"].version1(r,s,l);else if(a==2||a==3||a==4)e[\"OS/2\"].version2(r,s,l);else{if(a!=5)throw\"unknown OS/2 table version: \"+a;e[\"OS/2\"].version5(r,s,l)}return l},e[\"OS/2\"].version0=function(r,s,o){var a=e._bin;return o.xAvgCharWidth=a.readShort(r,s),s+=2,o.usWeightClass=a.readUshort(r,s),s+=2,o.usWidthClass=a.readUshort(r,s),s+=2,o.fsType=a.readUshort(r,s),s+=2,o.ySubscriptXSize=a.readShort(r,s),s+=2,o.ySubscriptYSize=a.readShort(r,s),s+=2,o.ySubscriptXOffset=a.readShort(r,s),s+=2,o.ySubscriptYOffset=a.readShort(r,s),s+=2,o.ySuperscriptXSize=a.readShort(r,s),s+=2,o.ySuperscriptYSize=a.readShort(r,s),s+=2,o.ySuperscriptXOffset=a.readShort(r,s),s+=2,o.ySuperscriptYOffset=a.readShort(r,s),s+=2,o.yStrikeoutSize=a.readShort(r,s),s+=2,o.yStrikeoutPosition=a.readShort(r,s),s+=2,o.sFamilyClass=a.readShort(r,s),s+=2,o.panose=a.readBytes(r,s,10),s+=10,o.ulUnicodeRange1=a.readUint(r,s),s+=4,o.ulUnicodeRange2=a.readUint(r,s),s+=4,o.ulUnicodeRange3=a.readUint(r,s),s+=4,o.ulUnicodeRange4=a.readUint(r,s),s+=4,o.achVendID=[a.readInt8(r,s),a.readInt8(r,s+1),a.readInt8(r,s+2),a.readInt8(r,s+3)],s+=4,o.fsSelection=a.readUshort(r,s),s+=2,o.usFirstCharIndex=a.readUshort(r,s),s+=2,o.usLastCharIndex=a.readUshort(r,s),s+=2,o.sTypoAscender=a.readShort(r,s),s+=2,o.sTypoDescender=a.readShort(r,s),s+=2,o.sTypoLineGap=a.readShort(r,s),s+=2,o.usWinAscent=a.readUshort(r,s),s+=2,o.usWinDescent=a.readUshort(r,s),s+=2},e[\"OS/2\"].version1=function(r,s,o){var a=e._bin;return s=e[\"OS/2\"].version0(r,s,o),o.ulCodePageRange1=a.readUint(r,s),s+=4,o.ulCodePageRange2=a.readUint(r,s),s+=4},e[\"OS/2\"].version2=function(r,s,o){var a=e._bin;return s=e[\"OS/2\"].version1(r,s,o),o.sxHeight=a.readShort(r,s),s+=2,o.sCapHeight=a.readShort(r,s),s+=2,o.usDefault=a.readUshort(r,s),s+=2,o.usBreak=a.readUshort(r,s),s+=2,o.usMaxContext=a.readUshort(r,s),s+=2},e[\"OS/2\"].version5=function(r,s,o){var a=e._bin;return s=e[\"OS/2\"].version2(r,s,o),o.usLowerOpticalPointSize=a.readUshort(r,s),s+=2,o.usUpperOpticalPointSize=a.readUshort(r,s),s+=2},e.post={},e.post.parse=function(r,s,o){var a=e._bin,l={};return l.version=a.readFixed(r,s),s+=4,l.italicAngle=a.readFixed(r,s),s+=4,l.underlinePosition=a.readShort(r,s),s+=2,l.underlineThickness=a.readShort(r,s),s+=2,l},e==null&&(e={}),e.U==null&&(e.U={}),e.U.codeToGlyph=function(r,s){var o=r.cmap,a=-1;if(o.p0e4!=null?a=o.p0e4:o.p3e1!=null?a=o.p3e1:o.p1e0!=null?a=o.p1e0:o.p0e3!=null&&(a=o.p0e3),a==-1)throw\"no familiar platform and encoding!\";var l=o.tables[a];if(l.format==0)return s>=l.map.length?0:l.map[s];if(l.format==4){for(var c=-1,d=0;d<l.endCount.length;d++)if(s<=l.endCount[d]){c=d;break}return c==-1||l.startCount[c]>s?0:65535&(l.idRangeOffset[c]!=0?l.glyphIdArray[s-l.startCount[c]+(l.idRangeOffset[c]>>1)-(l.idRangeOffset.length-c)]:s+l.idDelta[c])}if(l.format==12){if(s>l.groups[l.groups.length-1][1])return 0;for(d=0;d<l.groups.length;d++){var h=l.groups[d];if(h[0]<=s&&s<=h[1])return h[2]+(s-h[0])}return 0}throw\"unknown cmap table format \"+l.format},e.U.glyphToPath=function(r,s){var o={cmds:[],crds:[]};if(r.SVG&&r.SVG.entries[s]){var a=r.SVG.entries[s];return a==null?o:(typeof a==\"string\"&&(a=e.SVG.toPath(a),r.SVG.entries[s]=a),a)}if(r.CFF){var l={x:0,y:0,stack:[],nStems:0,haveWidth:!1,width:r.CFF.Private?r.CFF.Private.defaultWidthX:0,open:!1},c=r.CFF,d=r.CFF.Private;if(c.ROS){for(var h=0;c.FDSelect[h+2]<=s;)h+=2;d=c.FDArray[c.FDSelect[h+1]].Private}e.U._drawCFF(r.CFF.CharStrings[s],l,c,d,o)}else r.glyf&&e.U._drawGlyf(s,r,o);return o},e.U._drawGlyf=function(r,s,o){var a=s.glyf[r];a==null&&(a=s.glyf[r]=e.glyf._parseGlyf(s,r)),a!=null&&(a.noc>-1?e.U._simpleGlyph(a,o):e.U._compoGlyph(a,s,o))},e.U._simpleGlyph=function(r,s){for(var o=0;o<r.noc;o++){for(var a=o==0?0:r.endPts[o-1]+1,l=r.endPts[o],c=a;c<=l;c++){var d=c==a?l:c-1,h=c==l?a:c+1,p=1&r.flags[c],m=1&r.flags[d],v=1&r.flags[h],y=r.xs[c],x=r.ys[c];if(c==a)if(p){if(!m){e.U.P.moveTo(s,y,x);continue}e.U.P.moveTo(s,r.xs[d],r.ys[d])}else m?e.U.P.moveTo(s,r.xs[d],r.ys[d]):e.U.P.moveTo(s,(r.xs[d]+y)/2,(r.ys[d]+x)/2);p?m&&e.U.P.lineTo(s,y,x):v?e.U.P.qcurveTo(s,y,x,r.xs[h],r.ys[h]):e.U.P.qcurveTo(s,y,x,(y+r.xs[h])/2,(x+r.ys[h])/2)}e.U.P.closePath(s)}},e.U._compoGlyph=function(r,s,o){for(var a=0;a<r.parts.length;a++){var l={cmds:[],crds:[]},c=r.parts[a];e.U._drawGlyf(c.glyphIndex,s,l);for(var d=c.m,h=0;h<l.crds.length;h+=2){var p=l.crds[h],m=l.crds[h+1];o.crds.push(p*d.a+m*d.b+d.tx),o.crds.push(p*d.c+m*d.d+d.ty)}for(h=0;h<l.cmds.length;h++)o.cmds.push(l.cmds[h])}},e.U._getGlyphClass=function(r,s){var o=e._lctf.getInterval(s,r);return o==-1?0:s[o+2]},e.U.getPairAdjustment=function(r,s,o){var a=!1;if(r.GPOS)for(var l=r.GPOS,c=l.lookupList,d=l.featureList,h=[],p=0;p<d.length;p++){var m=d[p];if(m.tag==\"kern\"){a=!0;for(var v=0;v<m.tab.length;v++)if(!h[m.tab[v]]){h[m.tab[v]]=!0;for(var y=c[m.tab[v]],x=0;x<y.tabs.length;x++)if(y.tabs[x]!=null){var w,_=y.tabs[x];if((!_.coverage||(w=e._lctf.coverageIndex(_.coverage,s))!=-1)&&y.ltype!=1){if(y.ltype==2){var S=null;if(_.fmt==1){var b=_.pairsets[w];for(p=0;p<b.length;p++)b[p].gid2==o&&(S=b[p])}else if(_.fmt==2){var T=e.U._getGlyphClass(s,_.classDef1),A=e.U._getGlyphClass(o,_.classDef2);S=_.matrix[T][A]}if(S){var L=0;return S.val1&&S.val1[2]&&(L+=S.val1[2]),S.val2&&S.val2[0]&&(L+=S.val2[0]),L}}}}}}}if(r.kern&&!a){var C=r.kern.glyph1.indexOf(s);if(C!=-1){var R=r.kern.rval[C].glyph2.indexOf(o);if(R!=-1)return r.kern.rval[C].vals[R]}}return 0},e.U._applySubs=function(r,s,o,a){for(var l=r.length-s-1,c=0;c<o.tabs.length;c++)if(o.tabs[c]!=null){var d,h=o.tabs[c];if(!h.coverage||(d=e._lctf.coverageIndex(h.coverage,r[s]))!=-1){if(o.ltype==1)r[s],h.fmt==1?r[s]=r[s]+h.delta:r[s]=h.newg[d];else if(o.ltype==4)for(var p=h.vals[d],m=0;m<p.length;m++){var v=p[m],y=v.chain.length;if(!(y>l)){for(var x=!0,w=0,_=0;_<y;_++){for(;r[s+w+(1+_)]==-1;)w++;v.chain[_]!=r[s+w+(1+_)]&&(x=!1)}if(x){for(r[s]=v.nglyph,_=0;_<y+w;_++)r[s+_+1]=-1;break}}}else if(o.ltype==5&&h.fmt==2)for(var S=e._lctf.getInterval(h.cDef,r[s]),b=h.cDef[S+2],T=h.scset[b],A=0;A<T.length;A++){var L=T[A],C=L.input;if(!(C.length>l)){for(x=!0,_=0;_<C.length;_++){var R=e._lctf.getInterval(h.cDef,r[s+1+_]);if(S==-1&&h.cDef[R+2]!=C[_]){x=!1;break}}if(x){var k=L.substLookupRecords;for(m=0;m<k.length;m+=2)k[m],k[m+1]}}}else if(o.ltype==6&&h.fmt==3){if(!e.U._glsCovered(r,h.backCvg,s-h.backCvg.length)||!e.U._glsCovered(r,h.inptCvg,s)||!e.U._glsCovered(r,h.ahedCvg,s+h.inptCvg.length))continue;var H=h.lookupRec;for(A=0;A<H.length;A+=2){S=H[A];var V=a[H[A+1]];e.U._applySubs(r,s+S,V,a)}}}}},e.U._glsCovered=function(r,s,o){for(var a=0;a<s.length;a++)if(e._lctf.coverageIndex(s[a],r[o+a])==-1)return!1;return!0},e.U.glyphsToPath=function(r,s,o){for(var a={cmds:[],crds:[]},l=0,c=0;c<s.length;c++){var d=s[c];if(d!=-1){for(var h=c<s.length-1&&s[c+1]!=-1?s[c+1]:0,p=e.U.glyphToPath(r,d),m=0;m<p.crds.length;m+=2)a.crds.push(p.crds[m]+l),a.crds.push(p.crds[m+1]);for(o&&a.cmds.push(o),m=0;m<p.cmds.length;m++)a.cmds.push(p.cmds[m]);o&&a.cmds.push(\"X\"),l+=r.hmtx.aWidth[d],c<s.length-1&&(l+=e.U.getPairAdjustment(r,d,h))}}return a},e.U.P={},e.U.P.moveTo=function(r,s,o){r.cmds.push(\"M\"),r.crds.push(s,o)},e.U.P.lineTo=function(r,s,o){r.cmds.push(\"L\"),r.crds.push(s,o)},e.U.P.curveTo=function(r,s,o,a,l,c,d){r.cmds.push(\"C\"),r.crds.push(s,o,a,l,c,d)},e.U.P.qcurveTo=function(r,s,o,a,l){r.cmds.push(\"Q\"),r.crds.push(s,o,a,l)},e.U.P.closePath=function(r){r.cmds.push(\"Z\")},e.U._drawCFF=function(r,s,o,a,l){for(var c=s.stack,d=s.nStems,h=s.haveWidth,p=s.width,m=s.open,v=0,y=s.x,x=s.y,w=0,_=0,S=0,b=0,T=0,A=0,L=0,C=0,R=0,k=0,H={val:0,size:0};v<r.length;){e.CFF.getCharString(r,v,H);var V=H.val;if(v+=H.size,V==\"o1\"||V==\"o18\")c.length%2!=0&&!h&&(p=c.shift()+a.nominalWidthX),d+=c.length>>1,c.length=0,h=!0;else if(V==\"o3\"||V==\"o23\")c.length%2!=0&&!h&&(p=c.shift()+a.nominalWidthX),d+=c.length>>1,c.length=0,h=!0;else if(V==\"o4\")c.length>1&&!h&&(p=c.shift()+a.nominalWidthX,h=!0),m&&e.U.P.closePath(l),x+=c.pop(),e.U.P.moveTo(l,y,x),m=!0;else if(V==\"o5\")for(;c.length>0;)y+=c.shift(),x+=c.shift(),e.U.P.lineTo(l,y,x);else if(V==\"o6\"||V==\"o7\")for(var W=c.length,F=V==\"o6\",J=0;J<W;J++){var K=c.shift();F?y+=K:x+=K,F=!F,e.U.P.lineTo(l,y,x)}else if(V==\"o8\"||V==\"o24\"){W=c.length;for(var ue=0;ue+6<=W;)w=y+c.shift(),_=x+c.shift(),S=w+c.shift(),b=_+c.shift(),y=S+c.shift(),x=b+c.shift(),e.U.P.curveTo(l,w,_,S,b,y,x),ue+=6;V==\"o24\"&&(y+=c.shift(),x+=c.shift(),e.U.P.lineTo(l,y,x))}else{if(V==\"o11\")break;if(V==\"o1234\"||V==\"o1235\"||V==\"o1236\"||V==\"o1237\")V==\"o1234\"&&(_=x,S=(w=y+c.shift())+c.shift(),k=b=_+c.shift(),A=b,C=x,y=(L=(T=(R=S+c.shift())+c.shift())+c.shift())+c.shift(),e.U.P.curveTo(l,w,_,S,b,R,k),e.U.P.curveTo(l,T,A,L,C,y,x)),V==\"o1235\"&&(w=y+c.shift(),_=x+c.shift(),S=w+c.shift(),b=_+c.shift(),R=S+c.shift(),k=b+c.shift(),T=R+c.shift(),A=k+c.shift(),L=T+c.shift(),C=A+c.shift(),y=L+c.shift(),x=C+c.shift(),c.shift(),e.U.P.curveTo(l,w,_,S,b,R,k),e.U.P.curveTo(l,T,A,L,C,y,x)),V==\"o1236\"&&(w=y+c.shift(),_=x+c.shift(),S=w+c.shift(),k=b=_+c.shift(),A=b,L=(T=(R=S+c.shift())+c.shift())+c.shift(),C=A+c.shift(),y=L+c.shift(),e.U.P.curveTo(l,w,_,S,b,R,k),e.U.P.curveTo(l,T,A,L,C,y,x)),V==\"o1237\"&&(w=y+c.shift(),_=x+c.shift(),S=w+c.shift(),b=_+c.shift(),R=S+c.shift(),k=b+c.shift(),T=R+c.shift(),A=k+c.shift(),L=T+c.shift(),C=A+c.shift(),Math.abs(L-y)>Math.abs(C-x)?y=L+c.shift():x=C+c.shift(),e.U.P.curveTo(l,w,_,S,b,R,k),e.U.P.curveTo(l,T,A,L,C,y,x));else if(V==\"o14\"){if(c.length>0&&!h&&(p=c.shift()+o.nominalWidthX,h=!0),c.length==4){var O=c.shift(),U=c.shift(),X=c.shift(),D=c.shift(),G=e.CFF.glyphBySE(o,X),$=e.CFF.glyphBySE(o,D);e.U._drawCFF(o.CharStrings[G],s,o,a,l),s.x=O,s.y=U,e.U._drawCFF(o.CharStrings[$],s,o,a,l)}m&&(e.U.P.closePath(l),m=!1)}else if(V==\"o19\"||V==\"o20\")c.length%2!=0&&!h&&(p=c.shift()+a.nominalWidthX),d+=c.length>>1,c.length=0,h=!0,v+=d+7>>3;else if(V==\"o21\")c.length>2&&!h&&(p=c.shift()+a.nominalWidthX,h=!0),x+=c.pop(),y+=c.pop(),m&&e.U.P.closePath(l),e.U.P.moveTo(l,y,x),m=!0;else if(V==\"o22\")c.length>1&&!h&&(p=c.shift()+a.nominalWidthX,h=!0),y+=c.pop(),m&&e.U.P.closePath(l),e.U.P.moveTo(l,y,x),m=!0;else if(V==\"o25\"){for(;c.length>6;)y+=c.shift(),x+=c.shift(),e.U.P.lineTo(l,y,x);w=y+c.shift(),_=x+c.shift(),S=w+c.shift(),b=_+c.shift(),y=S+c.shift(),x=b+c.shift(),e.U.P.curveTo(l,w,_,S,b,y,x)}else if(V==\"o26\")for(c.length%2&&(y+=c.shift());c.length>0;)w=y,_=x+c.shift(),y=S=w+c.shift(),x=(b=_+c.shift())+c.shift(),e.U.P.curveTo(l,w,_,S,b,y,x);else if(V==\"o27\")for(c.length%2&&(x+=c.shift());c.length>0;)_=x,S=(w=y+c.shift())+c.shift(),b=_+c.shift(),y=S+c.shift(),x=b,e.U.P.curveTo(l,w,_,S,b,y,x);else if(V==\"o10\"||V==\"o29\"){var ne=V==\"o10\"?a:o;if(c.length==0)console.debug(\"error: empty stack\");else{var ie=c.pop(),q=ne.Subrs[ie+ne.Bias];s.x=y,s.y=x,s.nStems=d,s.haveWidth=h,s.width=p,s.open=m,e.U._drawCFF(q,s,o,a,l),y=s.x,x=s.y,d=s.nStems,h=s.haveWidth,p=s.width,m=s.open}}else if(V==\"o30\"||V==\"o31\"){var fe=c.length,de=(ue=0,V==\"o31\");for(ue+=fe-(W=-3&fe);ue<W;)de?(_=x,S=(w=y+c.shift())+c.shift(),x=(b=_+c.shift())+c.shift(),W-ue==5?(y=S+c.shift(),ue++):y=S,de=!1):(w=y,_=x+c.shift(),S=w+c.shift(),b=_+c.shift(),y=S+c.shift(),W-ue==5?(x=b+c.shift(),ue++):x=b,de=!0),e.U.P.curveTo(l,w,_,S,b,y,x),ue+=4}else{if((V+\"\").charAt(0)==\"o\")throw console.debug(\"Unknown operation: \"+V,r),V;c.push(V)}}}s.x=y,s.y=x,s.nStems=d,s.haveWidth=h,s.width=p,s.open=m};var t=e,i={Typr:t};return n.Typr=t,n.default=i,Object.defineProperty(n,\"__esModule\",{value:!0}),n}({}).Typr}", "transient private internal function m185() {}", "protected internal function m252() {}", "static final private internal function m106() {}", "function main()\n{\n\t// Find Visual Studio 7.1, 8.0, 9.0, 10.0, 11.0, 12.0\n\tvar bVS71 = null;\n\tvar bVS80 = null;\n\tvar bVS90 = null;\n\tvar bVS100 = null;\n\tvar bVS110 = null;\n\tvar bVS120 = null;\n\tvar bVS140 = null;\n\tvar bVS80X = null;\n\tvar bVS90X = null;\n\tvar bVS100X = null;\n\tvar bVS110X = null;\n\tvar bVS120X = null;\n\tvar bMSDN80 = null;\n\tvar bMSDN90 = null;\n\tvar bVSA80 = null;\n\tvar bVSA90 = null;\n\tvar bSQL100 = null;\n\tvar bSQL110 = null;\n\tvar bSQL120 = null;\n\n\ttry { bVS71 = WshShell.RegRead(g_strBaseKey + \"VisualStudio\\\\7.1\\\\MyDocumentsLocation\"); } catch (e) { bVS71 = null; }\n\ttry { bVS80 = WshShell.RegRead(g_strBaseKey + \"VisualStudio\\\\8.0\\\\MyDocumentsLocation\"); } catch (e) { bVS80 = null; }\n\ttry { bVS90 = WshShell.RegRead(g_strBaseKey + \"VisualStudio\\\\9.0\\\\MyDocumentsLocation\"); } catch (e) { bVS90 = null; }\n\ttry { bVS100 = WshShell.RegRead(g_strBaseKey + \"VisualStudio\\\\10.0\\\\MyDocumentsLocation\"); } catch (e) { bVS100 = null; }\n\ttry { bVS110 = WshShell.RegRead(g_strBaseKey + \"VisualStudio\\\\11.0\\\\MyDocumentsLocation\"); } catch (e) { bVS110 = null; }\n\ttry { bVS120 = WshShell.RegRead(g_strBaseKey + \"VisualStudio\\\\12.0\\\\MyDocumentsLocation\"); } catch (e) { bVS120 = null; }\n\ttry { bVS140 = WshShell.RegRead(g_strBaseKey + \"VisualStudio\\\\14.0\\\\MyDocumentsLocation\"); } catch (e) { bVS140 = null; }\n\ttry { bVS80X = WshShell.RegRead(g_strBaseKey + \"VCExpress\\\\8.0\\\\MyDocumentsLocation\"); } \t catch (e) { bVS80X = null; }\n\ttry { bVS90X = WshShell.RegRead(g_strBaseKey + \"VCExpress\\\\9.0\\\\MyDocumentsLocation\"); } catch (e) { bVS90X = null; }\n\ttry { bVS100X = WshShell.RegRead(g_strBaseKey + \"VCExpress\\\\10.0\\\\MyDocumentsLocation\"); } catch (e) { bVS100X = null; }\n\ttry { bVS110X = WshShell.RegRead(g_strBaseKey + \"VCExpress\\\\11.0\\\\MyDocumentsLocation\"); } catch (e) { bVS110X = null; }\n\ttry { bVS120X = WshShell.RegRead(g_strBaseKey + \"VCExpress\\\\12.0\\\\MyDocumentsLocation\"); } catch (e) { bVS120X = null; }\n\ttry { bMSDN80 = WshShell.RegRead(g_strBaseKey + \"MSDN\\\\8.0\\\\MyDocumentsLocation\"); } catch (e) { bMSDN80 = null; }\n\ttry { bMSDN90 = WshShell.RegRead(g_strBaseKey + \"MSDN\\\\9.0\\\\MyDocumentsLocation\"); } catch (e) { bMSDN90 = null; }\n\ttry { bVSA80 = WshShell.RegRead(g_strBaseKey + \"VSA\\\\8.0\\\\MyDocumentsLocation\"); } catch (e) { bVSA80 = null; }\n\ttry { bVSA90 = WshShell.RegRead(g_strBaseKey + \"VSA\\\\9.0\\\\MyDocumentsLocation\"); } catch (e) { bVSA90 = null; }\n\ttry { bSQL100 = WshShell.RegRead(g_strBaseKey + \"Microsoft SQL Server\\\\100\\\\Tools\\\\Shell\\\\MyDocumentsLocation\"); } catch (e) { bSQL100 = null; }\n\ttry { bSQL110 = WshShell.RegRead(g_strBaseKey + \"SQL Server Management Studio\\\\11.0\\\\MyDocumentsLocation\"); } catch (e) { bSQL110 = null; }\n\ttry { bSQL120 = WshShell.RegRead(g_strBaseKey + \"SQL Server Management Studio\\\\12.0\\\\MyDocumentsLocation\"); } catch (e) { bSQL120 = null; }\n\n\ttry\n\t{\n\t\tif (bVS71) RegisterCustomVSPaths(\"VisualStudio\\\\\", \"7.1\", \"vs2003\", true);\n\t\tif (bVS80) RegisterCustomVSPaths(\"VisualStudio\\\\\", \"8.0\", \"vs2005\", true);\n\t\tif (bVS90) RegisterCustomVSPaths(\"VisualStudio\\\\\", \"9.0\", \"vs2008\", true);\n\t\tif (bVS100) RegisterCustomVSPaths(\"VisualStudio\\\\\", \"10.0\", \"vs2010\", true);\n\t\tif (bVS110) RegisterCustomVSPaths(\"VisualStudio\\\\\", \"11.0\", \"vs2012\", true);\n\t\tif (bVS120) RegisterCustomVSPaths(\"VisualStudio\\\\\", \"12.0\", \"vs2013\", true);\n\t\tif (bVS140) RegisterCustomVSPaths(\"VisualStudio\\\\\", \"14.0\", \"vs2015\", true);\n\t\tif (bVS80X) RegisterCustomVSPaths(\"VCExpress\\\\\", \"8.0\", \"vcx2005\", false);\n\t\tif (bVS90X) RegisterCustomVSPaths(\"VCExpress\\\\\", \"9.0\", \"vcx2008\", false);\n\t\tif (bVS100X) RegisterCustomVSPaths(\"VCExpress\\\\\", \"10.0\", \"vcx2010\", false);\n\t\tif (bVS110X) RegisterCustomVSPaths(\"VCExpress\\\\\", \"11.0\", \"vcx2012\", false);\n\t\tif (bVS110X) RegisterCustomVSPaths(\"VCExpress\\\\\", \"12.0\", \"vcx2013\", false);\n\t\tif (bMSDN80) RegisterCustomVSPaths(\"MSDN\\\\\", \"8.0\", null, false );\n\t\tif (bMSDN90) RegisterCustomVSPaths(\"MSDN\\\\\", \"9.0\", null, false);\n\t\tif (bVSA80) RegisterCustomVSPaths(\"VSA\\\\\", \"8.0\", null, false);\n\t\tif (bVSA90) RegisterCustomVSPaths(\"VSA\\\\\", \"9.0\", null, false);\n\t\tif (bSQL100) RegisterCustomVSPaths(\"Microsoft SQL Server\\\\100\\\\Tools\\\\Shell\\\\\",\"\", \"mssql2008\", false);\n\t\tif (bSQL110) RegisterCustomVSPaths(\"SQL Server Management Studio\\\\11.0\\\\\",\"\", \"mssql2012\", false);\n\t\tif (bSQL120) RegisterCustomVSPaths(\"SQL Server Management Studio\\\\12.0\\\\\",\"\", \"mssql2014\", false);\n\t}\n\tcatch (e)\n\t{\n\t\tWScript.Echo(\"ERROR: Cannot write to registry.\");\n\t\treturn null;\n\t}\n\n\treturn true;\n}", "function DataViewer() {\n\n \"use strict\";\n\n}", "function DataViewer() {\n\n \"use strict\";\n\n}", "function SBRecordsetPHP_analyzePlatformSpecific()\r\n{\r\n\r\n\r\n}", "function test_crosshair_op_azone_azure() {}", "transient private protected internal function m182() {}", "transient protected internal function m189() {}", "function setup() {\n\n\n}", "function setup() {\n\n\n}", "get native() {\r\n return this._internalWin;\r\n }", "transient final protected internal function m174() {}", "function setup() {\r\n}", "async function $(r,s){const o=q(t$x(r));if(\"wosr\"===o.fileType){const e=await(s.cache?s.cache.loadWOSR(o.url,s):x(o.url,s)),t=b(e,s);return {lods:[t],referenceBoundingBox:t.boundingBox,isEsriSymbolResource:!1,isWosr:!0,remove:e.remove}}const i=await(s.cache?s.cache.loadGLTF(o.url,s,s.usePBR):l(new n$3(s.streamDataRequester),o.url,s,s.usePBR)),a=g$a(i.model.meta,\"ESRI_proxyEllipsoid\");i.meta.isEsriSymbolResource&&r$s(a)&&-1!==i.meta.uri.indexOf(\"/RealisticTrees/\")&&J(i,a);const u=i.meta.isEsriSymbolResource?{usePBR:s.usePBR,isSchematic:!1,treeRendering:i.customMeta.esriTreeRendering,mrrFactors:[0,1,.2]}:{usePBR:s.usePBR,isSchematic:!1,mrrFactors:[0,1,.5]},n={...s.materialParamsMixin,treeRendering:i.customMeta.esriTreeRendering};if(null!=o.specifiedLodIndex){const e=K(i,u,n,o.specifiedLodIndex);let t=e[0].boundingBox;if(0!==o.specifiedLodIndex){t=K(i,u,n,0)[0].boundingBox;}return {lods:e,referenceBoundingBox:t,isEsriSymbolResource:i.meta.isEsriSymbolResource,isWosr:!1,remove:i.remove}}const l$1=K(i,u,n);return {lods:l$1,referenceBoundingBox:l$1[0].boundingBox,isEsriSymbolResource:i.meta.isEsriSymbolResource,isWosr:!1,remove:i.remove}}", "function gn() {\n if (!pe.Lt().ia) throw new c(h.UNIMPLEMENTED, \"Blobs are unavailable in Firestore in this environment.\");\n}", "transient final private internal function m170() {}", "transient final private protected internal function m167() {}", "isWindows() {\n return !!process.platform.match(/^win/);\n }", "function Main()\n {\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "function _____SHARED_functions_____(){}", "function setup() { \n\n}", "function test_vmrc_console_windows(browser, operating_system, provider) {}", "function OnLoad() {\n try {\n var eDiv = document.createElement(\"div\");\n if (navigator.appName.indexOf(\"Internet\") >= 0 || navigator.appVersion.indexOf(\"Trident\") >= 0) {\n if (window.navigator.cpuClass == \"x86\") {\n eDiv.innerHTML = \"<object id=\\\"CryptoAgent\\\" codebase=\\\"CryptoKit.Cypfintech.x86.cab\\\" classid=\\\"clsid:F87C344E-3D2A-45C5-BCCF-DBFFEF5668E2\\\" ></object>\";\n }\n else {\n eDiv.innerHTML = \"<object id=\\\"CryptoAgent\\\" codebase=\\\"CryptoKit.Cypfintech.x64.cab\\\" classid=\\\"clsid:FE9859B2-245B-4794-A9B7-6E01BA93B5CD\\\" ></object>\";\n }\n }\n else {\n eDiv.innerHTML = \"<embed id=\\\"CryptoAgent\\\" type=\\\"application/npCryptoKit.Cypfintech.x86\\\" style=\\\"height: 0px; width: 0px\\\">\";\n }\n document.body.appendChild(eDiv);\n }\n catch (e) {\n // alert(e);\n return;\n }\n CryptoAgent = document.getElementById(\"CryptoAgent\");\n CryptoAgent.SetSM2CSPList(\"CFCA CSP v3.0||CFCA Ulan CSP v4.0\");\n}", "addPolyfills(){// Polyfill for canvas.toBlob().\nif(!HTMLCanvasElement.prototype.toBlob){Object.defineProperty(HTMLCanvasElement.prototype,'toBlob',{value:function(callback,type,quality){var binStr=atob(this.toDataURL(type,quality).split(',')[1]);var len=binStr.length;var arr=new Uint8Array(len);for(var i=0;i<len;i++){arr[i]=binStr.charCodeAt(i)}callback(new Blob([arr],{type:type||'image/png'}))}})}}", "function setup() {\n\n}", "function setup() {\n\n}", "function setup() {\n\n}", "function setup() {\n\n}", "function LoadFilesystemInfo()\n{\n path = document.getElementById('@@PATH_INPUT_CLIENTID@@').value;\n\n MatrixPACS.ImageServer.Web.Application.Services.FilesystemInfoService.GetFilesystemInfo(path, OnLoadFilesystemInfoSuccess, OnLoadFilesystemInfoError); \n}", "function setup() {\n \n}", "isWindowsPlatform() {\n return process.platform.startsWith('win');\n }", "static private protected public internal function m117() {}", "function initBingTranslator () {\r\n unsafeWindow.BingCW.Init ( {\r\n AppID: \"GM Foo\",\r\n MachineTranslation: true,\r\n WebDefinition: true\r\n } );\r\n}", "function _detectSubtleMsCrypto(fn) {\n\t return (typeof util.globalScope !== 'undefined' &&\n\t typeof util.globalScope.msCrypto === 'object' &&\n\t typeof util.globalScope.msCrypto.subtle === 'object' &&\n\t typeof util.globalScope.msCrypto.subtle[fn] === 'function');\n\t}", "function Scdr() {\r\n}", "createObjectContext() {\n console.log('deprecated')\n return C.context\n }", "function VisualAudioContext(mediaStream, audioContext) {\n const vac = this\n const AudioContext = window.AudioContext || window.webkitAudioContext\n\n const context = audioContext || new AudioContext()\n\n let connected = false\n // let bufferActive\n let javascriptNode\n let sourceNode = mediaStream\n let splitter\n let analyser\n let analyser2\n let channels\n let mediaStreamNode\n // let mediaStreamSource\n // let streamRecorder\n let gainNode\n\n const init = vol => {\n ;(gainNode = context.createGain()),\n (splitter = context.createChannelSplitter()),\n (analyser = context.createAnalyser()),\n (analyser2 = context.createAnalyser()),\n (channels = {\n analyser,\n analyser2,\n })\n\n javascriptNode.connect(context.destination)\n\n analyser.smoothingTimeConstant = 0.3\n analyser.fftSize = 1024\n analyser2.smoothingTimeConstant = 0.0\n analyser2.fftSize = 1024\n\n // connect the source to the analyser and the splitter\n sourceNode.connect(splitter)\n\n splitter.connect(analyser, 0, 0)\n splitter.connect(analyser2, 1, 0)\n\n sourceNode.connect(gainNode)\n gainNode.gain.value = vol\n\n // NEED FOR SoundCloud VERSION!!!!!!!!!\n // sourceNode.connect(context.destination);\n // if (bufferActive) {\n // sourceNode.buffer = bufferActive\n // }\n\n connected = true\n vac.javascriptNode = javascriptNode\n vac.sourceNode = sourceNode\n vac.gainNode = gainNode\n context.suspend()\n\n if (typeof callback === 'function') {\n callback()\n }\n }\n\n const setupMicNodes = () => {\n mediaStreamNode = context.createMediaStreamSource(mediaStream)\n javascriptNode = context.createScriptProcessor(2048, 1, 1)\n sourceNode = mediaStreamNode\n init(0)\n }\n\n const setupAudioNodes = () => {\n javascriptNode = context.createScriptProcessor(2048, 1, 1)\n sourceNode = undefined\n init(0.5)\n }\n\n if (!mediaStream) {\n setupAudioNodes()\n } else {\n setupMicNodes()\n }\n\n this.getAverageVolume = array => {\n let values = 0\n const length = array.length\n let average\n // get all the frequency amplitudes\n\n for (let i = 0; i < length; i++) {\n values += array[i]\n }\n average = values / length\n return average\n }\n this.ch = channels\n this.javascriptNode = javascriptNode\n this.sourceNode = sourceNode\n this.gainNode = gainNode\n ;(this.resume = function() {\n this.gainNode.gain.value = 0.2\n this.sourceNode.connect(this.gainNode.gain)\n context.resume()\n }),\n (this.close = function() {\n this.gainNode.gain.value = 0\n this.sourceNode.connect(this.gainNode.gain)\n context.suspend()\n })\n}", "function showCSPActiveX() {\n\t\tif (navigator.appName.indexOf(\"Explorer\") != -1) {\n\t\t if ( navigator.userAgent.indexOf(\"Windows NT 10\") != -1 ) {\n\t\t\t\tdocument.writeln(\"<object classid=\\\"clsid:884e2049-217d-11da-b2a4-000e7bbb2b09\\\" id=\\\"g_objClassFactory\\\" height=\\\"0\\\" width=\\\"0\\\" ></object>\");\n\t\t\t} else {\n\t\t\t\tdocument.writeln(\"<object classid=\\\"clsid:127698e4-e730-4e5c-a2b1-21490a70c8a1\\\" id=\\\"newencoder\\\" codebase=\\\"/CertControl/xenroll.cab#Version=5,131,3659,0\\\" height=\\\"0\\\" width=\\\"0\\\" ></object>\");\n\t\t\t\tdocument.writeln(\"<object classid=\\\"clsid:43F8F289-7A20-11D0-8F06-00C04FC295E1\\\" id=\\\"oldencoder\\\" height=\\\"0\\\" width=\\\"0\\\" ></object>\");\n\t\t\t}\n\t\t}\n\t}", "function UclrError()\n{\n window.status = window.defaultStatus;\n return true;\n}", "function twopicsBlueDouble(){\n \t//csInterface.evalScript(\"cstwopicsBlueDoublee()\");\n\n \tvar extensionPath = (csInterface.getSystemPath(SystemPath.EXTENSION)+templatePath);\n \tcsInterface.evalScript('cstwopicsBlueDoublee(' + JSON.stringify(extensionPath) + ')');\n }", "static private internal function m121() {}", "static transient final protected public internal function m46() {}", "function setup() {\n \n}", "function setup() {\n \n}", "function PerformanceTestCase() {\n}", "function ImgtoDataURL(imgURL, callerdata, OnSuccess, OnError,subject,msg)\n{\n // load image from data url\n var imageObj = new Image();\n var localImgURL; //WP8 only\n if (OnError)\n imageObj.onerror = OnError;\n \n \n imageObj.onload = function() {\n var msgHeight=0;\n var canvas = document.createElement('canvas');\n var msgHeight=0;\n var baseFontSize = 20;\n var leftMargin = 20;\n var baseLineHeight = 1.2 * baseFontSize;\n var txt='';\n if (subject)\n txt = subject;\n if (msg)\n txt += '\\n' + msg;\n \n canvas.width = this.width;\n canvas.height = this.height;\n var context = canvas.getContext('2d');\n if (txt.length)\n {\n var maxMsgWidth = this.width - 2*leftMargin;\n //measuring the height of the text once wrapped on multiple line (of 16 pixels)\n context.textBaseline=\"top\"; //y position will refer to top of the text (Default is Alphabetical)\n context.font=baseFontSize + \"px Arial\";\n msgHeight = baseLineHeight + wrapText(context, txt, leftMargin + 4, 0, maxMsgWidth, baseLineHeight ,true);\n DBG && console.log(\"actual msgHeight=\"+msgHeight);\n\n //reset canvas size (this will clear it)\n canvas.height = this.height + msgHeight;\n context.textBaseline=\"top\"; //y position will refer to top of the text (Default is Alphabetical)\n context.fillStyle = 'white';\n context.font=baseFontSize + \"px Arial\";\n context.fillRect(0,0,canvas.width,canvas.height);\n context.fillStyle = 'black';\n wrapText(context, txt, leftMargin + 4, baseLineHeight/2, maxMsgWidth, baseLineHeight, false);\n } \n context.drawImage(this, 0, msgHeight, this.width, this.height);\n var dataURL = canvas.toDataURL(\"image/png\"); //\"data:image/jpeg;base64,\"\n if (localImgURL)//release memory associated with blob url in wp8/ie10 case\n URL.revokeObjectURL(localImgURL);\n OnSuccess(callerdata, dataURL);\n }; \n if (device.platform === \"Win32NT\") {\n //on wp8 IE10 CORS is not supported\n //make the remote image a local one use XML httprequest\n var xhr = new XMLHttpRequest();\n xhr.onload = function () {\n var localImgURL = URL.createObjectURL(this.response);\n imageObj.src = localImgURL;\n DBG && console.log(\"xhr.onload success - loading local image\");\n };\n xhr.onerror = function () {\n DBG && console.log(\"xhr ERROR on loading as blob (\" + imgURL + \")\");\n // URL.revokeObjectURL(url);\n };\n xhr.open('GET', imgURL, true);\n xhr.responseType = 'blob';\n xhr.send();\n }\n else {\n imageObj.crossOrigin = \"anonymous\";//Important set atherwise browser through tainted canvas security CORS exception\n imageObj.src = imgURL;\n }\n\n}", "function useMSXHR() {\r\n return typeof ActiveXObject == \"function\";\r\n }", "function mbcs() {}", "function mbcs() {}", "transient private protected public internal function m181() {}", "transient final private protected public internal function m166() {}", "function vc() {\n if (\"undefined\" == typeof atob) throw new T(E.UNIMPLEMENTED, \"Blobs are unavailable in Firestore in this environment.\");\n}", "get SUPPORT_BASE64_DRAWING() {\n 'use strict';\n\n return function (src) {\n var _value = testBase64(document, src);\n Object.defineProperty(FEATURES, 'SUPPORT_BASE64_DRAWING', { value: function value() {\n return _value;\n } });\n return _value;\n };\n }", "get SUPPORT_BASE64_DRAWING() {\n 'use strict';\n\n return function (src) {\n var _value = testBase64(document, src);\n Object.defineProperty(FEATURES, 'SUPPORT_BASE64_DRAWING', { value: function value() {\n return _value;\n } });\n return _value;\n };\n }", "get SUPPORT_BASE64_DRAWING() {\n 'use strict';\n\n return function (src) {\n var _value = testBase64(document, src);\n Object.defineProperty(FEATURES, 'SUPPORT_BASE64_DRAWING', { value: function value() {\n return _value;\n } });\n return _value;\n };\n }", "static final protected internal function m110() {}" ]
[ "0.5718999", "0.5127648", "0.50340307", "0.4986635", "0.4893337", "0.48703453", "0.48676834", "0.48674643", "0.4854622", "0.48420036", "0.48402965", "0.48402965", "0.48220244", "0.47662336", "0.4719181", "0.4710195", "0.4675956", "0.4675956", "0.46712086", "0.46453077", "0.46272883", "0.46200496", "0.46033517", "0.45850563", "0.45772904", "0.45367643", "0.45267865", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45171684", "0.45145193", "0.45143077", "0.45112407", "0.4510925", "0.4510164", "0.45085585", "0.45085585", "0.45085585", "0.45085585", "0.44945392", "0.44819734", "0.44761446", "0.44671845", "0.4465899", "0.4461667", "0.44609624", "0.44589573", "0.44584128", "0.4449132", "0.44463146", "0.44407603", "0.44340146", "0.44256788", "0.44151804", "0.44151804", "0.4400238", "0.43833312", "0.43816924", "0.43778905", "0.43778905", "0.43771735", "0.4366763", "0.435924", "0.4355946", "0.4355946", "0.4355946", "0.4354039" ]
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 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 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}" ]
[ "0.6231517", "0.5987249", "0.5949213", "0.57122", "0.57122", "0.5705207", "0.56892043", "0.56892043", "0.55873036", "0.5555952", "0.5543145", "0.5543145", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.5510524", "0.55039376", "0.548416", "0.54746956", "0.5456079", "0.5456079", "0.54443634", "0.5425702", "0.5411477", "0.5411477", "0.5411477", "0.53554267", "0.53381497", "0.53381497", "0.53381497", "0.53381497", "0.52763915", "0.5234131", "0.5226253", "0.52213514", "0.52112293", "0.5182654", "0.51636595", "0.5158534", "0.51469135", "0.51469135", "0.51469135", "0.51469135", "0.5126754", "0.51078755", "0.5100304", "0.506721", "0.5062196", "0.50521255", "0.50521255", "0.5050252", "0.5050252", "0.50167155", "0.50122356", "0.5001438", "0.49898553", "0.4989373", "0.49776623", "0.49619618", "0.4956046", "0.4956046", "0.4956046", "0.4955233", "0.49551553" ]
0.0
-1
Trust the developer to only use possibleRegistrationNames in true
function registerTwoPhaseEvent(registrationName,dependencies){registerDirectEvent(registrationName,dependencies);registerDirectEvent(registrationName+'Capture',dependencies);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "allow() {\n this._isAllowed = true;\n }", "static allowOnlyUsers(ctx) {\n if( ctx.clientIdentity.getMSPID() === USERS_MSP_ID )\n return\n throw new Error(PERMISSION_ERROR_MESSAGE)\n }", "get Restricted() {}", "static allowOnlyRegistrar(ctx) {\n if( ctx.clientIdentity.getMSPID() === REGISTRAR_MSP_ID )\n return\n throw new Error(PERMISSION_ERROR_MESSAGE)\n }", "function bypassAnticheat() { // SO THAT YOUR ACCOUNT DOESNT GET BANNED\n \n}", "get restricted() {\n\t\treturn this.__Internal__Dont__Modify__.restricted;\n\t}", "set Restricted(value) {}", "static isAllowedToControl(object, isControlled){\n\t\t\tlet offset = object.getFlag(moduleName, 'offset') || {};\n\t\t\tif(Object.keys(offset).length === 0) return;\n\t\t\tlet objParent = object.getFlag(moduleName, 'parent') || {};\n\t\t\tif(document.getElementById(\"tokenAttacher\") && TokenAttacher.isCurrentAttachUITarget(objParent)) return;\n\t\t\tlet unlocked = object.getFlag(moduleName, 'unlocked');\n\t\t\tif(unlocked) return;\n\t\t\t\n\t\t\tif(game.user.isGM){\n\t\t\t\tlet quickEdit = getProperty(window, 'tokenAttacher.quickEdit');\n\t\t\t\tif(quickEdit && canvas.scene._id === quickEdit.scene) return;\n\t\t\t}\n\t\t\treturn object.release();\n\t\t}", "async isAllowed() {\n return config.isDeveloperMode;\n }", "get allowed () {\r\n\t\treturn this._allowed;\r\n\t}", "function imposeSupportRequestSecurityUIRestrictions() {\n var divIdToSecure;\n divIdToSecure = '#supportRequestFormSave';\n (isUserAuthorized('UPDATE_SUPPORT_REQUEST', false)) ?\n securityshow(divIdToSecure) : securityHide(divIdToSecure);\n\n divIdToSecure = '#supportRequestFormAdd';\n (isUserAuthorized('INSERT_SUPPORT_REQUEST', false)) ?\n securityshow(divIdToSecure) : securityHide(divIdToSecure);\n\n divIdToSecure = '#supportRequestEntryDivId';\n (isUserAuthorized('UPDATE_SUPPORT_REQUEST', false) ||\n isUserAuthorized('INSERT_SUPPORT_REQUEST', false)) ?\n securityshow(divIdToSecure) : securityHide(divIdToSecure);\n if (!isUserAuthorized('INSERT_SUPPORT_REQUEST', false) &&\n !isUserAuthorized('UPDATE_SUPPORT_REQUEST', false)) {\n securityLockForm('supportRequestForm', true);\n\n }\n if (!isUserAuthorized('INSERT_SUPPORT_REQUEST', false) &&\n isFormEmpty('supportRequestForm')) {\n securityLockForm('supportRequestForm', true);\n }\n\n}", "function Protect() {\r\n}", "function denyConsent(){\n var saveConsentCheckbox = document.getElementById(\"saveConsent\");\n var data = {\n \"decision\": \"deny\",\n \"csrf\": document.getElementById(\"csrf\").value\n }\n if (saveConsentCheckbox.checked === true) {\n data.save_consent = \"on\";\n }\n continueAuthorization(AM_HOST, CLIENT_ID, REDIRECT_URI,SCOPES, data, handleAuthzCallBack);\n}", "justProtect() {\n return this.keyCloak.protect();\n }", "function checkPermissions() {\n for (i = 0; i < $scope.modules.length; i++) {\n for (j = 0; j < $scope.modules[i].use_cases.length; j++) {\n if ($scope.modules[i].use_cases[j].codename in $scope.useCases) {\n $scope.modules[i].use_cases[j].allowed = true;\n } else {\n delete $scope.modules[i].use_cases[j].allowed;\n }\n }\n }\n }", "isAllowed(...args) {\n const perimeter = this._sandbox.getPerimeter(this._name);\n\n return perimeter.hasOwnGoverness() ?\n perimeter.isAllowed(...args) :\n perimeter.purposeGoverness.isAllowed(...args);\n }", "function is_public() {\r\n return (unsafeWindow.MySpace.ProfileClientContext && \r\n unsafeWindow.MySpace.ProfileClientContext.PrivateToUser) ? false : true;\r\n}", "function $AxMc$var$trustNone() {\n return false;\n}", "function set_allowed(allow){\n\tallowed = allow;\n}", "function allowAny() { }", "function allowConsent(){\n var saveConsentCheckbox = document.getElementById(\"saveConsent\");\n var data = {\n \"decision\": \"allow\",\n \"csrf\": document.getElementById(\"csrf\").value\n }\n if (saveConsentCheckbox.checked === true) {\n data.save_consent = \"on\";\n }\n continueAuthorization(AM_HOST, CLIENT_ID, REDIRECT_URI,SCOPES, data, handleAuthzCallBack);\n}", "shouldQuarantine() {\r\n if (this.passengers.map(passenger => (passenger.isHealthy)).includes(false)) {\r\n return true\r\n } else {\r\n return false\r\n }\r\n\r\n }", "function disablePrivateFeatures() {\n // TODO Update the login status\n}//disablePrivateFeatures()", "isAllowed(...args) {\n return this.governess.isAllowed(...args);\n }", "isSecurityEnabled() {\n\t\treturn this._memberServices !== undefined;\n\t}", "function makeRequest() {\n setCanUserMakeRequest(false)\n }", "function permitirAcceso(persona) {\n if (!esMayorDeEdad(persona)){ // si la persona no es mayor de edad\n console.log(\"ACCESO DENAGADO\")\n }\n}", "unlocked(){return true}", "throw() {\n if (!this.check()) throw new Meteor.Error('access-denied', Security.errorMessages.notAllowed);\n }", "isNotAllowed(...args) {\n return !this.isAllowed(...args);\n }", "isNotAllowed(...args) {\n return !this.isAllowed(...args);\n }", "getReorgSafety() {\n return this.configuration.getReorgSafety();\n }", "function developerCheck(req, res, next) {\n if (req.session.user.role === \"developer\") {\n return res.sendStatus(403);\n } else {\n next();\n }\n}", "allow() {\n throw new Error(\"Not implemented.\");\n }", "verify (req, res, endpoint) {\n if (endpoint.scope && !req.user.scp.includes(endpoint.scope) && !req.user.scp.includes('write_root')) {\n res.status(403).send({\n error: 'Unauthorized',\n reason: `Expected ${endpoint.scope}, got ${req.user.scp}.`\n })\n return true\n }\n }", "function checkLic() {\n if (!params.enableObjectDetect) return;\n if (!params.lic) {\n _lic = false;\n return wss.broadcast('msgLicNotDetected', {\n binary: false\n });\n };\n _lic = true;\n}", "async requireAndAllow () {\n\t\tif (this.request.body.token) {\n\t\t\tthrow this.errorHandler.error('deprecated', { reason: 'confirmation tokens are deprecated' });\n\t\t}\n\t\tawait this.requireAllowParameters(\n\t\t\t'body',\n\t\t\t{\n\t\t\t\trequired: {\n\t\t\t\t\tstring: ['email', 'confirmationCode']\n\t\t\t\t},\n\t\t\t\toptional: {\n\t\t\t\t\tstring: ['password', 'username', 'environment'],\n\t\t\t\t\tnumber: ['expiresIn', 'nrAccountId']\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function checkReadOnly(){\n\tif (assistants.scope.current === 'eid'){\n return true; //read from eID\n\t}else{\n\t\tif (myForm.user){\n\t\t\tif (myForm.user.modeid == '3'){\n\t\t\t\treturn true; //Firmenkunde\n\t\t\t}else{\n\t\t\t\tif (myForm.user.levelid == '3') {\n\t\t\t\t\treturn true; //höhere Sicherheitstufe Bürger\n\t\t\t\t}else{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}\n}", "function verifyContactInfoAccessPrivilege (req, res, next) {\n let targetContact = req.targetContact\n let isAdminOrStaff = req.userPrivilege >= 2\n let userIsContact = req.registeredUser.id === targetContact.id\n if (isAdminOrStaff || userIsContact) {\n return next()\n } else {\n res.status(403)\n let error = new Error('Regular users does not have full access')\n return next(error)\n }\n}", "function trustNone(){return false;}", "get isBlocked() {\n\n }", "static get hidden () {\n\t return ['role_access']\n\t}", "_deny() {\n // deny everything\n this.deny({\n insert() { return true; },\n update() { return true; },\n remove() { return true; }\n });\n }", "canEnroll() {\r\n return super._canEnroll(core.Credential.SecurityQuestions);\r\n }", "async authorize () {\n\t\t// if no reply-to domain is specified, this is probably an on-prem installation\n\t\t// where inbound emails are not supported\n\t\tif (this.api.config.inboundEmailServer.inboundEmailDisabled) {\n\t\t\tthrow this.errorHandler.error('notSupported');\n\t\t}\n\n\t\t// we rely on a secret, known only to the inbound email server and the\n\t\t// API server ... disallowing arbitrary clients to call this request\n\t\tif (this.request.body.secret !== this.api.config.sharedSecrets.mail) {\n\t\t\tthrow this.errorHandler.error('unauthorized');\n\t\t}\n\t}", "allowGuestSignin(allowed) {\n this.guestSessionAllowed_ = allowed;\n }", "function set_gmap_is_allowed() {\n // check config\n if (typeof(gmap_use_consenting_cookie) != 'undefined' && gmap_use_consenting_cookie == false) {\n gmap_is_allowed = true;\n return;\n }\n // check cookie\n var name = \"ss_googlemaps_allow=\";\n var decodedCookie = decodeURIComponent(document.cookie);\n var ca = decodedCookie.split(';');\n for(var i = 0; i <ca.length; i++) {\n var c = ca[i];\n while (c.charAt(0) == ' ') {\n c = c.substring(1);\n }\n if (c.indexOf(name) == 0) {\n gmap_is_allowed = c.substring(name.length, c.length);\n return;\n }\n }\n gmap_is_allowed = false;\n}", "get Emissive() {}", "isPrivate() {\n return !!this.username;\n }", "function originIsAllowed(origin) {\n\t//debido a que no se restringen clientes, no se realiza ningun tratamiento\n\treturn true;\n}", "disagreeWithLicense() {\n this.state.preferences.save({ agreedToLicense: false }, {\n success: () => {\n this.trigger(this.state);\n }\n });\n }", "function checkRights() {\n\n var bCreateRights = GetBoolFromString(getWFDataKey(\"CRT_BT\"));\n var bEditRights = GetBoolFromString(getWFDataKey(\"EDT_BT\"));\n var sMode = getPageMode();\n var bAllowToSubmit = false;\n\n if (sMode == MODE_NEW && bCreateRights == true) {\n bAllowToSubmit = true;\n\n }\n else if (sMode == MODE_EDIT && bEditRights == true) {\n bAllowToSubmit = true;\n }\n else {\n showWarningMessage(\"You do not have sufficient rights to perform the selected operation.\");\n }\n return bAllowToSubmit;\n\n}", "function thridPartyDisallowance() {\n var frm = document.frmDisallow;\n if (frm.disallowTPAddress.value.length < 41) {\n $(\"#statusFormDisallow\").css(\"background-color\", \"Salmon\");\n $(\"#statusFormDisallow\").html(\"You must inform appropriate information\");\n return\n }\n $(\"#statusFormDisallow\").css(\"background-color\", \"lightblue\");\n $(\"#statusFormDisallow\").html(\"Waiting for you to confirm the transaction in MetaMask or another Ethereum wallet software\");\n console.log(\"Sending... \" + frm.disallowTPAddress.value);\n contract.removeIssuers(frm.disallowTPAddress.value, {from: web3.eth.accounts[0], gas: 3000000, value: 0}, function (err, result) {\n if (!err) {\n $(\"#statusFormDisallow\").css(\"background-color\", \"yellow\");\n $(\"#statusFormDisallow\").text(\"Transaction sent. Wait until it is mined. Transaction hash: \" + result);\n waitForTxToBeMined(result, \"#statusFormDisallow\");\n } else {\n console.error(err);\n $(\"#statusFormDisallow\").css(\"background-color\", \"Salmon\");\n $(\"#statusFormDisallow\").html(\"Error \" + JSON.stringify(err));\n }\n });\n $(\"#btnStartOverDisallowance\").show();\n $(\"#btn3TPDisallowance\").hide();\n}", "isAuthorized(state, getters, rootState) {\n const playSpace = state.current\n if (!playSpace || !playSpace.users) return false\n if (!rootState.user.username) return false\n if (playSpace.users[rootState.user.username] === \"owner\") {\n return true\n }\n return false\n }", "allowedCallback() {\n return true;\n }", "function BLOCKIND() {return true;}", "canEnroll() {\r\n return super._canEnroll(core.Credential.ContactlessCard);\r\n }", "async requireAndAllow () {\n\t\t// mock token must be accompanied by secret\n\t\tif (this.request.query._mockToken && this.request.query._mockTokenSecret &&\n\t\t\tdecodeURIComponent(this.request.query._secret || '') !== this.api.config.sharedSecrets.confirmationCheat) {\n\t\t\tthis.warn('Deleting mock token because incorrect secret sent');\n\t\t\tdelete this.request.query._mockToken;\n\t\t\tdelete this.request.query._mockTokenSecret;\n\t\t}\n\t\tdelete this.request.query._secret;\n\n\t\tawait this.requireAllowParameters(\n\t\t\t'query',\n\t\t\t{\n\t\t\t\trequired: {\n\t\t\t\t\tstring: ['code']\n\t\t\t\t},\n\t\t\t\toptional: {\n\t\t\t\t\tstring: ['host', '_mockToken', '_mockTokenSecret', 'sharing', 'requestServerToken']\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "function disableDigitalRestrictionsManagement(platformInfo) {\n if (platformInfo.PlatformOs == \"android\") {\n chrome.privacy.websites.protectedContentEnabled.set({ value: false });\n } else if (platformInfo.PlatformOs == \"windows\") {\n chrome.privacy.websites.protectedContentEnabled.set({ value: false });\n }\n}", "allowedTeamlessBoardVisibilities() {\n const visibilities = ['private', 'public'];\n if (this.isPaidManagedEntMember()) {\n const enterprise = this.getEnterprise();\n if (enterprise) {\n return visibilities.filter((vis) =>\n enterprise.canSetTeamlessBoardVisibility(vis),\n );\n }\n }\n return visibilities;\n }", "get isPrivate(){\r\n return this._isPrivate\r\n }", "isAuthorized(){\n return this.authorized;\n }", "shouldQuarantine () {\n for (let index = 0; index < this.passengerList.length; index += 1) {\n let passengersHealth = this.passengerList [index];\n if (passengersHealth.isHealthy === false) {\n return true;\n }\n }\n return false;\n }", "async allowPrivateJournals(value)\n {\n await this.setState({showPrivateJournals: value});\n await this.reloadJournals();\n }", "function ts_skip_or_boost_sorb_button_user_permissions()\n{\n tc_Ensure_SorB_button_is_displayed_but_disabled_for_any_user_lower_than_CL3_on_suggested_and_current_tab();\n tc_Ensure_SorB_button_is_enabled_for_any_user_higher_than_CL2_on_suggested_and_current_tab(); \n}", "function trustNone() {\n return false;\n}", "function trustNone() {\n return false;\n}", "function trustNone() {\n return false;\n}", "function trustNone() {\n return false;\n}", "function trustNone() {\n return false;\n}", "function trustNone() {\n return false;\n}", "blockUser() {\r\n // show a block confirmation\r\n // hide all of user's messages\r\n }", "function checkProductControls()\r\n {\r\n if ($claimType == 'Warranty')\r\n {\r\n productControls(false); // disable\r\n }\r\n else if ($claimType == 'Non-Warranty')\r\n {\r\n productControls(false); // disable\r\n }\r\n else if($claimStatus == 'Created')\r\n {\r\n productControls(true); // enable\r\n }\r\n else\r\n {\r\n productControls(false); // disable\r\n }\r\n }", "function trustNone () {\n return false\n}", "function trustNone () {\n return false\n}", "function trustNone () {\n return false\n}", "function trustNone () {\n return false\n}", "function trustNone () {\n return false\n}", "function trustNone () {\n return false\n}", "function trustNone () {\n return false\n}", "function trustNone () {\n return false\n}", "function trustNone () {\n return false\n}", "function trustNone () {\n return false\n}", "preventAccessWhenAuth() {\n return [];\n }", "deny(result) {\n this.component.deny(result);\n }", "function canAdamDrive(object) {\n return object['legalToDrive']\n }", "unblock(){\n // defer until dom is ready\n this.domready(() => {\n const elements = document.querySelectorAll('[data-consent-requires]');\n\n elements.forEach(el => {\n if(\n !('consentAttr' in el.dataset) ||\n el.dataset['consentAttr'] === '' ||\n 'consentManaged' in el.dataset\n ){\n return;\n }\n\n const purposes = el.dataset['consentRequires'].split(',');\n\n if(!purposes.reduce((p,v) => {return p && this.allows(v)}, true)){\n this.log('Element not unblocked, not enough consent', el);\n return;\n }\n\n const attr = el.dataset['consentAttr'].split(',');\n\n // rewrite attributes from data-attr to attr\n attr.forEach(a => {\n a in el.dataset && el.setAttribute(a, el.dataset[a]);\n });\n\n this.log('Element unblocked', el);\n el.setAttribute('data-consent-managed', true);\n });\n });\n }", "onFail_() {\n this.canAccess = false;\n }", "canEnroll() {\r\n return super._canEnroll(core.Credential.U2F);\r\n }", "function __hasOptedOutOfPersonalization() {\n return window.localStorage.getItem(CONCERT_NO_PERSONALIZATION_KEY) === 'true';\n }", "function draw() {\n if (!permissionGranted) return;\n}", "function checkCardSecurityCode(creditCardType, cardSecurityCodeObj, includeCard) {\n if(needCardSecurityCode(creditCardType, includeCard)) {\n cardSecurityCodeObj.disabled=\"\";\n } else {\n cardSecurityCodeObj.value=\"\";\n cardSecurityCodeObj.disabled=\"disabled\";\n }\n}", "canEnroll() {\r\n return super._canEnroll(core.Credential.SmartCard);\r\n }", "get requiredPermissions () {\n return this.target.isAcl\n ? new Set([acl.CONTROL])\n : new Set([acl.WRITE])\n }", "canAct() {\n return this.cooldown < 1;\n }", "canAct() {\n return this.cooldown < 1;\n }", "function removeFreeKitFromCustomer() {\n var Transaction = require('dw/system/Transaction');\n if (customer && customer.authenticated && customer.profile) {\n Transaction.wrap(function () {\n customer.profile.custom.freeMaternityEligible = false;\n });\n }\n}", "get unlocked() {\n // Check for Berry requirements\n const requiredBerries = Farming.getGeneration(3);\n if (!requiredBerries.every(berry => App.game.farming.unlockedBerries[berry]())) {\n return false;\n }\n return super.unlocked;\n }", "function blockUnrequired(){\r\n\tset(\"V[z_vaxx_*]\",\"\");\r\n\tset(\"V[z_va01_*]\",\"\");\r\n}", "function theyCantban() {\n message.channel.send(`${message.author}, you are not aloud to ban members.`);\n }", "static isSecret(x) {\n return x !== null && typeof (x) === 'object' && SECRET_SYMBOL in x;\n }" ]
[ "0.6821976", "0.6397543", "0.63840806", "0.62601405", "0.6199454", "0.6155516", "0.6138417", "0.60157514", "0.59850806", "0.5874411", "0.5874405", "0.5854616", "0.5825604", "0.58157027", "0.5803607", "0.578216", "0.5779587", "0.575128", "0.57488424", "0.57419086", "0.5734621", "0.57137406", "0.56999606", "0.5690487", "0.56677157", "0.55853117", "0.5579193", "0.55747616", "0.5532042", "0.5530034", "0.5530034", "0.5510563", "0.54957885", "0.5473486", "0.5462681", "0.5454733", "0.5444112", "0.5437213", "0.5427362", "0.5419201", "0.54145646", "0.54022586", "0.54014593", "0.5387696", "0.5383193", "0.53799504", "0.53780144", "0.5376886", "0.5375253", "0.53697646", "0.5347952", "0.53457636", "0.5341706", "0.53296113", "0.5311984", "0.53106415", "0.5302917", "0.53024787", "0.5298624", "0.5296635", "0.52915215", "0.5290044", "0.5258352", "0.525681", "0.5241107", "0.52198935", "0.52198935", "0.52198935", "0.52198935", "0.52198935", "0.52198935", "0.52198756", "0.5218761", "0.52183396", "0.52183396", "0.52183396", "0.52183396", "0.52183396", "0.52183396", "0.52183396", "0.52183396", "0.52183396", "0.52183396", "0.51935905", "0.51877", "0.5179706", "0.51722485", "0.517052", "0.5170155", "0.5160523", "0.515545", "0.5149594", "0.5146791", "0.5144629", "0.514365", "0.514365", "0.51347965", "0.5131628", "0.5130053", "0.5116171", "0.5097098" ]
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) {\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\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\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\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\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\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.8159446", "0.8159446", "0.8144443", "0.8068438", "0.8068438", "0.80646837", "0.8060194", "0.8060194", "0.8060194", "0.8060194", "0.8060194", "0.8060194", "0.8060194", "0.8060194", "0.8060194", "0.8060194", "0.8060194", "0.8060194", "0.8060194", "0.8060194", "0.8060194", "0.8060194", "0.8060194", "0.8060194", "0.8060194", "0.8060194", "0.8060194", "0.8060194", "0.8060194", "0.8060194", "0.8060194", "0.8060194", "0.8060194", "0.793312", "0.793312", "0.793312", "0.793312", "0.7898624", "0.7898624", "0.7898624", "0.7898624", "0.7898624", "0.7898624", "0.7898624", "0.7898624", "0.7898624", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.7888724", "0.78772646", "0.7877153", "0.7872436", "0.7872436", "0.7872436", "0.7872436", "0.7860624", "0.78513634", "0.78513634", "0.78513634", "0.78513634", "0.78513634", "0.78513634", "0.7831229", "0.7828764", "0.7828764" ]
0.7925386
37