Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Blocco da valorizzare solo se si intende identificare con un progressivo il file che si sta trasmettendo. L'elemento 1.3 non va mai valorizzato in quanto riservato al sistema Occorrenze:
function createInstance_DatiFatturaHeader(param) { var msgContext = '<DatiFatturaHeader>'; var xbrlProgressivo = ''; if (param.progressivoInvio.length>0) xbrlProgressivo = xml_createElementWithValidation("ProgressivoInvio",xml_escapeString(param.progressivoInvio),0,'1...10', msgContext); var xbrlCFDichiarante = ''; if (param.codicefiscaleDichiarante.length>0) xbrlCFDichiarante = xml_createElementWithValidation("CodiceFiscale", xml_escapeString(param.codicefiscaleDichiarante), 0, '11...16', msgContext); var xbrlCodiceCaricaDichiarante = ''; if (parseInt(param.codiceCarica)>0) xbrlCodiceCaricaDichiarante = xml_createElementWithValidation("Carica", param.codiceCarica, 0, '1...2', msgContext); var xbrlDichiarante = ''; if (xbrlCFDichiarante.length > 0 || xbrlCodiceCaricaDichiarante.length > 0) { xbrlDichiarante = xml_createElement("Dichiarante", xbrlCFDichiarante + xbrlCodiceCaricaDichiarante); } var xbrlContent = xbrlProgressivo + xbrlDichiarante; var xbrlHeader = xml_createElement("DatiFatturaHeader", xbrlContent); return xbrlHeader; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function daFileFbk(){\r\n var limit = 150; \r\n var parrafo = document.getElementById('foto-feedback-paragraph');\r\n \r\n if( ! escogioFoto() && noUsado() == limit){\r\n parrafo.style.color='red';\r\n parrafo.innerHTML='<b>Escoge una foto del juego de hoy.</b>'; /* es posible subir un file llamado algo.css o algo.exe .... need to work on this */\r\n }else if( ! escogioFoto() && noUsado() < limit){\r\n parrafo.style.color='green';\r\n parrafo.innerHTML='<b>Escoge una foto.</b>'; /* es posible subir un file llamado algo.css o algo.exe .... need to work on this */\r\n }else{\r\n parrafo.style.color='green';\r\n parrafo.innerHTML='<b>Ya escogiste la foto !</b>';\r\n } \r\n }", "function validaCampoFileInsavePrev(Nombre, ActualLement, espacio) {\n var ID = document.getElementById(ActualLement + '_txt_' + Nombre);\n var file = ID.files[0];\n var errorIs2 = false;\n var tipoArch = $('#' + ActualLement + '_txt_' + Nombre).attr('accept');\n var MaxTam = $('#' + ActualLement + '_txt_' + Nombre).attr('maxtam');\n var espacio = espacio !== undefined ? espacio : '_S_solicitud_datos';\n if (!MaxTam) {\n MaxTam = 10;\n }\n if (!tipoArch) {\n tipoArch = '.pdf';\n }\n var FilesAdded = new Array();\n var _G_ID_ = '#' + ActualLement;\n if (tipoArch.toUpperCase().includes('PDF')) {\n var reader = new FileReader(file);\n reader.onload = function (event) {\n var text = reader.result;\n var firstLine = text.split('\\n').shift(); // first line\n if (!(firstLine.toString().toUpperCase().includes('PDF'))) {\n redLabel_Space(Nombre, 'El archivo es invalido o no es PDF', _G_ID_);\n errorIs2 = true;\n }\n }\n reader.readAsText(file, 'UTF-8');\n }\n if (file.size > (MaxTam * 1024 * 1024)) {\n redLabel_Space(Nombre, 'El archivo no debe superar los ' + MaxTam + ' MB', _G_ID_);\n errorIs2 = true;\n }\n if (!ValidateAlphanumeric((file.name).replace('.', ''))) {\n redLabel_Space(Nombre, 'El nombre del archivo no debe contener caracteres especiales', _G_ID_);\n errorIs2 = true;\n }\n $(_G_ID_ + espacio + ' input').each(function (i, item) {\n if (item.type === 'file' && item.value !== '') {\n if (FilesAdded.indexOf(item.value) !== -1) {\n redLabel_Space(item.name, 'El archivo ya se encuentra cargado en otro requisito', _G_ID_);\n errorIs2 = true;\n }\n FilesAdded.push(item.value);\n }\n });\n if (file.size <= (0)) {\n redLabel_Space(Nombre, 'El archivo no es valido', _G_ID_);\n errorIs2 = true;\n }\n\n\n var tipoAA = file.name;\n tipoAA = tipoAA.split('.');\n var tamtipoAA = tipoAA.length;\n tipoAA = tipoAA[tamtipoAA - 1];\n\n\n if (!(tipoAA).toUpperCase().replace('.', '').includes(tipoArch.replace('.', '').toUpperCase())) {\n redLabel_Space(Nombre, 'El archivo debe ser' + tipoArch.toUpperCase(), _G_ID_);\n errorIs2 = true;\n }\n setTimeout(function () {\n if (errorIs2) {\n ShowAlertMPrev(_G_ID_, null, null, true);\n }\n errorIs[Nombre] = errorIs2;\n return errorIs2;\n }, 1000);\n}", "function OriginaleProduktZwei () {\r\noriginalProduktZwei = new File(\"Pfad/Original/Ablageort4/hier/einsetzen/\"+Dateiname);\r\n\r\nif (originalProduktZwei.exists){\r\n\tapp.open(originalProduktZwei);\r\n\tOriginal_da = 1; // \"Schalter\" Original da \r\n}\r\n\r\n/// ERLEDIGT ///\r\noriginalProduktZwei = new File(\"Pfad/Original/Ablageort4/hier/einsetzen/ERLEDIGT/\"+Dateiname);\r\n\r\nif (originalProduktZwei.exists){\r\n\tapp.open(originalProduktZwei);\r\n\tOriginal_da = 1; // \"Schalter\" Original da \r\n}\r\n}", "function loopOriginaleErledigt (Monat, Vorjahr){ // Parameter Monat und Vorjahr übergeben und in Zielordnerpfad einsetzen\r\nvar i;\r\nfor (i = 0; i < ET.length; i++){ // Loop durch alle Monate und ETs\t\r\noriginalProduktEins = new File(\"Pfad/Original/Ablageort3/hier/einsetzen/erledigt/\"+Monat+\"_\"+Vorjahr+\"/erledigt/\"+ET[i]+\"/\"+Dateiname); // Generiere Zielordner zur Überprüfung\r\n\t\r\nif (originalProduktEins.exists){\r\n\tapp.open(originalProduktEins);\r\n\tOriginal_da = 1; // \"Schalter\" Original da \r\n}\r\n} // End Loop\r\n}// End function", "function validaCampoFilePrev(Nombre, ActualLement, espacio) {\n // errorIs = Array();\n\n $('#' + ActualLement + '_txt_' + Nombre).change(function () {\n\n resetCampo(Nombre, '#' + ActualLement);\n validaCampoFileInsavePrev(Nombre, ActualLement, espacio);\n var OBJ_Campo = document.getElementById(ActualLement + '_txt_' + Nombre);\n if (OBJ_Campo.type == 'file') {\n\n var reader = new FileReader();\n reader.readAsDataURL(OBJ_Campo.files[0]);\n reader.onloadend = function () {\n allCamposB64[OBJ_Campo.name] = reader.result;\n\n };\n }\n\n });\n}", "function validaCampoFileInsave(Nombre, ActualLement, espacio) {\n\n var ID = document.getElementById(ActualLement + '_txt_' + Nombre);\n var file = ID.files[0];\n var errorIs2 = false;\n var tipoArch = $('#' + ActualLement + '_txt_' + Nombre).attr('accept');\n var MaxTam = $('#' + ActualLement + '_txt_' + Nombre).attr('maxtam');\n var espacio = espacio !== undefined ? espacio : '_S_solicitud_datos';\n if (!MaxTam) {\n MaxTam = 10;\n }\n if (!tipoArch) {\n tipoArch = '.pdf';\n }\n var FilesAdded = new Array();\n var _G_ID_ = '#' + ActualLement;\n if (tipoArch.toUpperCase().includes('PDF')) {\n var reader = new FileReader(file);\n reader.onload = function (event) {\n var text = reader.result;\n var firstLine = text.split('\\n').shift(); // first line\n if (!(firstLine.toString().toUpperCase().includes('PDF'))) {\n redLabel_Space(Nombre, 'El archivo es inválido o no es PDF', _G_ID_);\n errorIs2 = true;\n }\n }\n reader.readAsText(file, 'UTF-8');\n }\n if (file.size > (MaxTam * 1024 * 1024)) {\n redLabel_Space(Nombre, 'El archivo no debe superar los ' + MaxTam + ' MB', _G_ID_);\n errorIs2 = true;\n }\n if (!ValidateAlphanumeric((file.name).replace('.', ''))) {\n redLabel_Space(Nombre, 'El nombre del archivo no debe contener caracteres especiales', _G_ID_);\n errorIs2 = true;\n }\n $(_G_ID_ + espacio + ' input').each(function (i, item) {\n if (item.type === 'file' && item.value !== '') {\n if (FilesAdded.indexOf(item.value) !== -1) {\n redLabel_Space(item.name, 'El archivo ya se encuentra cargado en otro requisito', _G_ID_);\n errorIs2 = true;\n }\n FilesAdded.push(item.value);\n }\n });\n if (file.size <= (0)) {\n redLabel_Space(Nombre, 'El archivo no es valido', _G_ID_);\n errorIs2 = true;\n }\n\n\n var tipoAA = file.name;\n tipoAA = tipoAA.split('.');\n var tamtipoAA = tipoAA.length;\n tipoAA = tipoAA[tamtipoAA - 1];\n\n\n if (!(tipoAA).toUpperCase().replace('.', '').includes(tipoArch.replace('.', '').toUpperCase())) {\n redLabel_Space(Nombre, 'El archivo debe ser' + tipoArch.toUpperCase(), _G_ID_);\n errorIs2 = true;\n }\n setTimeout(function () {\n if (errorIs2) {\n ShowAlertM(_G_ID_, null, null, true);\n }\n errorIs[Nombre] = errorIs2;\n return errorIs2;\n }, 1000);\n}", "function loopOriginaleAlt (Monat, Vorjahr){ // Parameter Monat und Vorjahr übergeben und in Zielordnerpfad einsetzen\r\nvar i;\r\nfor (i = 0; i < ET.length; i++){ // Loop durch alle Monate und ETs\t\r\noriginalProduktEins = new File(\"Pfad/Original/Ablageort3/hier/einsetzen/\"+Monat+\"_\"+Vorjahr+\"/erledigt/\"+ET[i]+\"/\"+Dateiname); // Generiere Zielordner zur Überprüfung\r\n\t\r\nif (originalProduktEins.exists){\r\n\tapp.open(originalProduktEins);\r\n\tOriginal_da = 1; // \"Schalter\" Original da \r\n}\r\n} // End Loop\r\n}// End function", "function loopOriginaleErledigt (Monat, Jahr){ // Parameter Monat und Jahr übergeben und in Zielordnerpfad einsetzen\r\nvar i;\r\nfor (i = 0; i < ET.length; i++){ // Loop durch alle Monate und ETs\t\r\noriginalProduktEins = new File(\"Pfad/Original/Ablageort3/hier/einsetzen/erledigt/\"+Monat+\"_\"+Jahr+\"/erledigt/\"+ET[i]+\"/\"+Dateiname); // Generiere Zielordner zur Überprüfung\r\n\t\r\nif (originalProduktEins.exists){\r\n\tapp.open(originalProduktEins);\r\n\tOriginal_da = 1; // \"Schalter\" Original da \r\n}\r\n} // End Loop\r\n}// End function", "function gestModifica() {\n let foto = \"\";\n let errore = false;\n\n $(\"#nomeModProfilo\").removeClass(\"alert-danger\");\n $(\"#cognomeModProfilo\").removeClass(\"alert-danger\");\n $(\"#dataNascitaModProfilo\").removeClass(\"alert-danger\");\n $(\"#mailModProfilo\").removeClass(\"alert-danger\");\n $(\"#gestFotoModProfilo\").removeClass(\"alert-danger\");\n $(\"#fotoModProfilo\").removeClass(\"alert-danger\");\n $(\"#telModProfilo\").removeClass(\"alert-danger\");\n $(\"#usernameModProfilo\").removeClass(\"alert-danger\");\n $(\"#msgModProfilo\").text(\"\").removeClass(\"alert alert-danger\");\n\n //Controllo validità dati di input\n if ($(\"#nomeModProfilo\").val() != \"\") {\n if ($(\"#cognomeModProfilo\").val() != \"\") {\n if (Date.parse($(\"#dataNascitaModProfilo\").val())) {\n if (chkEtaMinima(new Date($(\"#dataNascitaModProfilo\").val())) >= 2920) {\n if (validaEmail($(\"#mailModProfilo\").val())) {\n if (validaTelefono($(\"#telModProfilo\").val())) {\n if ($(\"#usernameModProfilo\").val() != \"\") {\n if (($(\"#gestFotoModProfilo\").val() == \"nuova\") && ($('#fotoModProfilo').prop('files')[0] != \"\")) {\n foto = $('#fotoModProfilo').prop('files')[0];\n if ($('#fotoModProfilo').prop('files')[0].type.includes(\"image/\")) {\n foto = $('#fotoModProfilo').prop('files')[0];\n } else {\n gestErrori(\"La foto inserita non è valida\", $(\"#fotoModProfilo\"));\n return;\n }\n } else if ($(\"#gestFotoModProfilo\").val() != \"nuova\"){\n if ($(\"#gestFotoModProfilo\").val() == \"nonImpostata\")\n foto = \"unset\";\n else\n foto = \"noChange\"; \n }else {\n gestErrori(\"Devi selezionare una nuova foto profilo\", $(\"#fotoModProfilo\"));\n errore = true;\n }\n\n if (!errore) {\n let formData = new FormData();\n formData.append('nome', $(\"#nomeModProfilo\").val());\n formData.append('cognome', $(\"#cognomeModProfilo\").val());\n formData.append('dataNascita', $(\"#dataNascitaModProfilo\").val());\n formData.append('telefono', $(\"#telModProfilo\").val());\n formData.append('email', $(\"#mailModProfilo\").val());\n formData.append('username', $(\"#usernameModProfilo\").val());\n formData.append('foto', foto);\n\n let rqModProfilo = inviaRichiestaMultipart('/api/modificaProfilo', 'POST', formData);\n rqModProfilo.fail(function (jqXHR, test_status, str_error) {\n if (jqXHR.status == 603) {\n $(\"#msgModProfilo\").text(\"Credenziali Errate o Mancanti\").addClass(\"alert alert-danger\");\n }\n else {\n printErrors(jqXHR, \"#msgModProfilo\");\n }\n });\n rqModProfilo.done(function (data) {\n window.location.href = \"login.html\"\n });\n }\n } else {\n gestErrori(\"Inserire uno Username\", $(\"#usernameModProfilo\"), \"#msgModProfilo\");\n }\n } else {\n gestErrori(\"Il numero di Telefono deve contenere 10 numeri\", $(\"#telModProfilo\"), \"#msgModProfilo\");\n }\n } else {\n gestErrori(\"Inserire una Email valida\", $(\"#mailModProfilo\"), \"#msgModProfilo\");\n }\n } else {\n gestErrori(\"Occorre avere almeno 8 anni\", $(\"#dataNascitaModProfilo\"), \"#msgModProfilo\");\n }\n \n } else {\n gestErrori(\"Inserire una Data di Nascita valida\", $(\"#dataNascitaModProfilo\"), \"#msgModProfilo\");\n }\n } else {\n gestErrori(\"Inserire il Cognome\", $(\"#cognomeModProfilo\"), \"#msgModProfilo\");\n }\n }\n else {\n gestErrori(\"Inserire il Nome\", $(\"#nomeModProfilo\"), \"#msgModProfilo\");\n }\n}", "function SubirImgTaxiActualizada(cMarca, cModelo, cNtaxi, cPlaca, cSitio, cNumeroSerie, addIDColleccion, num) {\n\t\t\t\t\t\tlet imagenASubir = file;\n\t\t\t\t\t\tlet uploadTask = storageRef.child(\"Fotos_taxis/\" + imagenASubir.name).put(imagenASubir);\n\n\t\t\t\t\t\tuploadTask.on(\"state_changed\",\n\t\t\t\t\t\t\tfunction (snapshot) {\n\t\t\t\t\t\t\t\tlet progress =\n\t\t\t\t\t\t\t\t\t(snapshot.bytesTransferred / snapshot.totalBytes) * 100;\n\t\t\t\t\t\t\t\tswitch (snapshot.state) {\n\t\t\t\t\t\t\t\t\tcase firebase.storage.TaskState.PAUSED: // or 'paused'\n\t\t\t\t\t\t\t\t\t\tconsole.log(\"Upload is paused\");\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase firebase.storage.TaskState.RUNNING: // or 'running'\n\t\t\t\t\t\t\t\t\t\tconsole.log(\"Upload is running\");\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tfunction (error) {\n\t\t\t\t\t\t\t\t// Handle unsuccessful uploads\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tfunction () {\n\t\t\t\t\t\t\t\tuploadTask.snapshot.ref.getDownloadURL().then(function (downloadURL) {\n\t\t\t\t\t\t\t\t\t//Aqui va el metodo donde se guarda\n\t\t\t\t\t\t\t\t\tactualizarTaxi(cMarca, cModelo, cNtaxi, cPlaca, cSitio, cNumeroSerie, downloadURL, addIDColleccion, num);\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}", "function loopOriginaleAlt (Monat, Jahr){ // Parameter Monat und Jahr übergeben und in Zielordnerpfad einsetzen\r\nvar i;\r\nfor (i = 0; i < ET.length; i++){ // Loop durch alle Monate und ETs\t\r\noriginalProduktEins = new File(\"Pfad/Original/Ablageort3/hier/einsetzen/\"+Monat+\"_\"+Jahr+\"/erledigt/\"+ET[i]+\"/\"+Dateiname); // Generiere Zielordner zur Überprüfung\r\n\t\r\nif (originalProduktEins.exists){\r\n\tapp.open(originalProduktEins);\r\n\tOriginal_da = 1; // \"Schalter\" Original da \r\n}\r\n} // End Loop\r\n}// End function", "function checarUpload(btnFile, btnEnviar){\n var total = parseInt(btnFile.data('nfiles'));\n var qtdeAtual = parseInt(btnFile.data('qtdeatual'));\n \n if(qtdeAtual == total){\n btnFile.attr('disabled', true);\n btnEnviar.attr('disabled', true);\n }\n else{\n btnFile.attr('disabled', false);\n btnEnviar.attr('disabled', false); \n }\n}", "function trigerFileProcessing(file_id) {\n //console.log(file_id);\n checkIfFileExists(file_id);\n}", "replacerChangNiveau(){\n this.viderLaFile();\n this.cellule = this.jeu.labyrinthe.cellule(0,0);\n this.direction = 1;\n\t\t\t\tthis.vitesse = 0;\n }", "function validaCampoFile(Nombre, ActualLement, espacio) {\n // errorIs = Array();\n $('#' + ActualLement + '_txt_' + Nombre).change(function () {\n resetCampo(Nombre, '#' + ActualLement);\n validaCampoFileInsave(Nombre, ActualLement, espacio);\n var OBJ_Campo = document.getElementById(ActualLement + '_txt_' + Nombre);\n if (OBJ_Campo.type == 'file') {\n\n var reader = new FileReader();\n reader.readAsDataURL(OBJ_Campo.files[0]);\n reader.onloadend = function () {\n allCamposB64[OBJ_Campo.name] = reader.result;\n\n };\n }\n\n });\n}", "function COPFFile(path, eventListener, incluirNoHistorico, livro_exercicios, thisIsExerciseBody, SMILExercEventListener, opfprefs_livro_exercicios)\n{\n\tthis.path = path;\t//onde está o arquivo\n\tthis._eventListener = eventListener;\n\tthis.errorDuringLoad = false;\n\tthis.thisIsDictionaryCached = false;\t//se este livro é um dicionário\n\tthis.thisIsDictionaryEvaluated = false;\t//se já sabemos se este livro é um dicionário\n\n this.xml = CUtils.LoadXML(path);\t//o XMLDocument dele\n //verificacao de segurança: nao permitimos scripts\n if(CUtils.HasScript(this.xml))\n\t\tthrow new CExcept(CMsg.InvalidOPF(), null, this.path);\n\n\t//verifica se está criptografado\n\t//se estiver, carrega o arquivo certo\n\tvar passwordBinHex = this._CheckEncryptionOpf();\n\tif(this.errorDuringLoad)\n\t\treturn;\n\t\n\t//validacao do OPF\n\t//tem que ter um manifest\n\tvar test = CUtils.GetXMLChildNoException(this.xml, \"package\", this.path);\n\tif(test == null)\n\t\tthrow new CExcept(CMsg.InvalidOPF_package(), null, this.path);\n\ttest = CUtils.GetXMLChildNoException(test, \"manifest\", this.path);\n\tif(test == null)\n\t\tthrow new CExcept(CMsg.InvalidOPF_package(), null, this.path);\n\n\t//sistema de busca\n\t//exercicios nao tem busca, mas deixamos criar mesmo assim\n\tthis.findtext = new CFindText(this.path);\n\t\n\t//os textos\n\tthis.texts = new CTextfileArray(this, passwordBinHex);\n\t\n //carrega e as preferencias\n //exercicios nao tem preferencias, leem as preferencias atuais do livro base\n if(opfprefs_livro_exercicios != null)\n\t this.opfprefs = opfprefs_livro_exercicios;\n\telse\n\t this.opfprefs = new COPFPrefs(this.path, this.GetBookId(), this.GetBookLang() );\n \n\t//carrega os smils\n\t//20101018: se já vei no livro, nao falamos o \"inicio de nota\"\n\tif(this._GetMedataFromOPF(\"x-metadata/ddp:FootNoteMode\").toString() == \"1\")\n\t{\n\t this.smils = new CSMILArray(this.opfprefs, this.path, this, false, thisIsExerciseBody, SMILExercEventListener);\n\t}\n\telse\n\t{\n\t this.smils = new CSMILArray(this.opfprefs, this.path, this, true, thisIsExerciseBody, SMILExercEventListener);\n\t}\n\tthis._LoadSMILs();\n \n \n //carrega o NCX\n this.ncx = new CNCX(this.opfprefs, this._HrefNCX(), this);\n\tthis.ncx.SetCurrentLevel(this.opfprefs.CurrentLevel());\n\n \n //seta o ID da pagina no smil\n this.smils.SetSkipIDPage(this.ncx.GetSkipID(\"PAGE_NUMBER\"));\n \n //seta a lista de IDs de anotacoes e notas\n var skipnoteids = new Array();\n var thisid = \"\";\n //campo a campo\n thisid = this.ncx.GetSkipID(\"NOTE_REFERENCE\");\n if(thisid != \"\")\tskipnoteids.push(thisid);\n this.smils.SetSkipIDNotRef(thisid);\t//o note_referecne tem um tratamento especial\n\n thisid = this.ncx.GetSkipID(\"NOTE\");\n if(thisid != \"\")\tskipnoteids.push(thisid);\n thisid = this.ncx.GetSkipID(\"ANNOTATION\");\n if(thisid != \"\")\tskipnoteids.push(thisid);\n thisid = this.ncx.GetSkipID(\"LINE_NUMBER\");\n if(thisid != \"\")\tskipnoteids.push(thisid);\n thisid = this.ncx.GetSkipID(\"OPTIONAL_SIDEBAR\");\n if(thisid != \"\")\tskipnoteids.push(thisid);\n thisid = this.ncx.GetSkipID(\"OPTIONAL_PRODUCER_NOTE\");\n if(thisid != \"\")\tskipnoteids.push(thisid);\n //manda a lista pro smilarray\n this.smils.SetSkipIDNote(skipnoteids);\n \n\t//ler das preferencias\n\tthis.smils.SetSkipNote(this.opfprefs.SkipNote());\n\t//por caus do dicionario, vamos pegar da propria rotina\n\t//this.smils.SetSkipPage(this.opfprefs.SkipPage());\n\tthis.smils.SetSkipPage(this.GetSkipPage());\n \n //carrega os marcadores\n //exercicios nao tem marcadores, mas carrgamos mesmo assim\n this.marks = new CMarks(this.path, this.GetBookId(), this.GetMedata(this.metadata_tagTitle).toString() );\n\n //por ultimo, adicona no historioc\n if(incluirNoHistorico)\n\t CHist.addEntry(this);\n}", "goodFile() {\n $('.pcm_importStatus').html('Data from file ready to be imported.').css('color','#dbfd23');\n $('.pcm_importButton').removeClass('disabled').prop(\"disabled\",false);\n }", "function cargarElemento() {\n var fileExtentionRange = '.pdf .doc .docx .xls .xlsx .ppt .pptx';\n var MAX_SIZE = 30; // MB\n\n $(document).on('change', '.btn-file :file', function () {\n var input = $(this);\n\n if (navigator.appVersion.indexOf(\"MSIE\") != -1) { // IE\n var label = input.val();\n\n input.trigger('fileselect', [1, label, 0]);\n } else {\n var label = input.val().replace(/\\\\/g, '/').replace(/.*\\//, '');\n var numFiles = input.get(0).files ? input.get(0).files.length : 1;\n var size = input.get(0).files[0].size;\n\n input.trigger('fileselect', [numFiles, label, size]);\n }\n });\n\n $('.btn-file :file').on('fileselect', function (event, numFiles, label, size) {\n $('#archivoAdjunto').attr('name', 'archivoAdjunto'); // allow upload.\n\n var postfix = label.substr(label.lastIndexOf('.'));\n if (fileExtentionRange.indexOf(postfix.toLowerCase()) > -1) {\n if (size > 1024 * 1024 * MAX_SIZE) {\n document.getElementById(\"error\").innerHTML = '<div class=\"ui error message mb-3\"><div class=\"header\">Error:</div><p>Solo se permiten archivos de ' + MAX_SIZE + ' MB o menos.</p></div>';\n setTimeout(\"$('.message').transition('fade out');listar('')\", 2000);\n setTimeout(\"vaciarDiv('error')\", 2300);\n $('#attachmentName').removeAttr('name'); // cancel upload file.\n } else {\n $('#_attachmentName').val(label);\n }\n } else {\n document.getElementById(\"error\").innerHTML = '<div class=\"ui error message mb-3\"><div class=\"header\">Error:</div><p>Solo se permiten archivos con las extensiones: ' + fileExtentionRange + '.</p></div>';\n setTimeout(\"$('.message').transition('fade out');listar('')\", 2000);\n setTimeout(\"vaciarDiv('error')\", 2300);\n $('#attachmentName').removeAttr('name'); // cancel upload file.\n }\n });\n}", "onUploadProgress(e) {\n const progress = (e.loaded * 100) / e.total;\n document.getElementById(element).setAttribute('value', progress);\n }", "function renombrarArchivo(element, pos) {\n\n\tif ($(element).parents('tr').children('th').eq(0).find(':input[type=\"file\"]').val().length) {\n\n\t\tif ($('select[name=\"radicacion_proceso\"]').val().length) {\n\n\t\t\t$('div#modal-renombramiento-file').on('show.bs.modal', function () {\n\n\t\t\t\t$(this).off('show.bs.modal');\n\t\t\t\t$.post(base_url + 'radicacion/abreviadosByProceso', {\n\t\t\t\t\tradicacion_proceso: $('select[name=\"radicacion_proceso\"]').val()\n\t\t\t\t}, function (result, textStatus, xhr) {\n\n\t\t\t\t\tif (textStatus == 'success') {\n\t\t\t\t\t\t$('select[name=\"renombramiento_tipo_documento\"]').html(result);\n\t\t\t\t\t\t$('input[id=\"pos_file_rename\"]').val(pos);\n\t\t\t\t\t}\n\t\t\t\t}, 'html');\n\n\t\t\t}).modal('show');\n\t\t} else {\n\t\t\talert('Seleccione un proceso de radicacion');\n\t\t}\n\t} else {\n\t\talert('Seleccione un archivo para renombrar');\n\t}\n}", "function apriEPopolaModaleModificaImporti(oggettoOriginale){\n \t\n // Dati per l'editabilità dei campi\n // Pulsante per il salvataggio\n var pulsanteSalvataggio = $(\"#button_registraVariazioneModale\");\n var $modale=$(\"#editStanziamenti\");\n //SIAC-6881\n var abilitaGestioneComponenti = oggettoOriginale && oggettoOriginale.tipoCapitolo && (oggettoOriginale.tipoCapitolo._name === 'CAPITOLO_USCITA_PREVISIONE' || oggettoOriginale.tipoCapitolo._name==='CAPITOLO_USCITA_GESTIONE');\n \n // Pulisco il form\n $(\"#editStanziamenti fieldset :input\").not(\"[data-maintain]\").val(\"\");\n // Nascondo l'eventuale alert di errore già presente\n $(\"#ERRORI_modaleEditStanziamenti\").slideUp();\n\n $(\"#competenzaVariazioneAnno0Modale\").val(oggettoOriginale.competenza.formatMoney());\n $(\"#residuoVariazioneModale\").val(oggettoOriginale.residuo.formatMoney());\n $(\"#cassaVariazioneModale\").val(oggettoOriginale.cassa.formatMoney());\n $(\"#competenzaVariazioneAnno1Modale\").val(getStanziamentoNotUndefined(oggettoOriginale.competenza1).formatMoney());\n $(\"#competenzaVariazioneAnno2Modale\").val(getStanziamentoNotUndefined(oggettoOriginale.competenza2).formatMoney());\n \n $(\"#titoloModaleVariazioneStanziamenti\").html(\"Modifica Stanziamenti Capitolo \" + oggettoOriginale.numeroCapitolo + \" / \" + oggettoOriginale.numeroArticolo);\n\n pulsanteSalvataggio.substituteHandler(\"click\", aggiornaCapitoliNellaVariazione.bind(undefined, oggettoOriginale, abilitaGestioneComponenti));\n \n if(!abilitaGestioneComponenti){\n \tpulisciCampiPerComponenti('Modale');\n \t$modale.modal(\"show\");\n \treturn;\n }\n \n pulsanteSalvataggio.attr(\"disabled\", true);\n $('#linkCollapseComponentiModale').attr(\"disabled\", true);\n \n \t$('#divComponentiInVariazioneModale').slideDown().promise().then(function() {\n \t\t$('#divComponentiInVariazioneModale').overlay('show');\n \t});\n \t//chiudo tutti i collapse\n \t$modale.modal('show')\n \t\t.find('.gestisci-collapse')\n \t\t\t.each(function(){\n \t\t\t\tvar selettoreCollapse= $(this).data('selettore-collapse-interno');\n \t\t\t\tchiudiCollapse($(selettoreCollapse));\n \t\t\t\t});\n \tcaricaEPopolaTabellaComponentiCapitoloInVariazione(oggettoOriginale);\n }", "function loadPano(panoObjects){\n console.log('loadPano', panoObjects)\n const filePath = panoObjects.panoPath \n let newPanoId = gPanos.length\n console.log(panoObjects.data)\n const panos = Object.values(panoObjects.data)\n console.log('panos', panos, typeof panos, panos.length)\n const panoBaseId = gPanos.length-1\n let panoIdNum \n Object.values(panos).forEach(pano => { \n // debugger\n panoIdNum = panoBaseId + Number(pano.id)\n console.log('pano', pano)\n // Populate New Pano with loaded values\n //panoIdNum = Number(pano.id) + panoBaseId - 1\n let curPano = gPanos[ panoIdNum -1 ]\n if (panoIdNum %2 == 0){\n curPano.elements.main.setAttribute('class', 'pano_a')\n } else {\n curPano.elements.main.setAttribute('class', 'pano_b');\n }\n \n curPano.elements.message.innerHTML = filePath\n curPano.elements.title.innerHTML = \"<b>Pano \"+pano.id+\"</b>\"\n // curPano.elements.addButton.value = \"Save\"\n curPano.elements.addButton.setAttribute(\"hidden\", true)\n curPano.elements.deleteButton.style.display = \"block\"\n curPano.elements.viewName.setAttribute('value', pano.name)\n curPano.elements.inputFile.setAttribute('value', pano.file)\n curPano.elements.posx.setAttribute('value', pano.x) \n curPano.elements.posy.setAttribute('value', pano.y) \n curPano.elements.posz.setAttribute('value', pano.z)\n // curPano.elements.inputFile.setAttribute('onchange', 'input_file-'+newPanoId)\n // Create new Pano \n // pano object {elements, values}\n let newPano = {\n elements: { \n main: curPano.elements.main, \n title: curPano.elements.title, \n message: curPano.elements.message, \n addButton: curPano.elements.addButton,\n deleteButton: curPano.elements.deleteButton,\n inputFile: curPano.elements.inputFile,\n viewName: curPano.elements.viewName,\n viewNameEnabled: curPano.elements.viewNameEnabled, \n camPosEnabled: curPano.elements.camPosEnabled, \n posx: curPano.elements.posx,\n posy: curPano.elements.posy,\n posz: curPano.elements.posz\n },\n values:{}\n }\n\n // gPanos.push(newPano);\n \n // Create New Pano panel\n createPano(gPanos.length)\n })\n\n // Enable Make Panos button\n const makePanoBtn = document.querySelector('#submit_button')\n makePanoBtn.disabled = false\n makePanoBtn.setAttribute('class', 'submit_button')\n console.log(makePanoBtn)\n }", "function progressHandlingFunction(e) {\n if (e.lengthComputable) {\n var percentComplete = Math.round(e.loaded * 100 / e.total);\n $(\"#file-progress\").css(\"width\", percentComplete + '%').attr('aria-valuenow', percentComplete);\n $('#file-progress span').text(percentComplete + \"%\");\n }\n else {\n $('#file-progress span').text('unable to compute');\n }\n }", "function uri_pagina(file_pagina) {\r\n\t\t\tconsole.log('en uri_pagina. PENDIENTE');\r\n\t\t}", "async function copiarImagem(element) {\n let filial_app = element.FILIAL_APP\n let mask = `${element.CARTAFRETE}_${filial_app}`\n let origem = `./downloads/${element.ARQUIVO}`\n let dir_destino = element.DIR_DESTINO\n let newFile = await proximoArquivo(dir_destino,mask)\n let destino = newFile.fullName\n let id = element.ID\n\n try {\n let ret = await loadAPI('GET','',api_sccd_filename,{par_id: id})\n let fileName = `${ret.data.FILENAME}.jpg`\n let fileDestino = ret.data.DESTINO \n destino = `${dir_destino}/${fileName}`\n \n if (fs.existsSync(destino)) {\n if(fileDestino) {\n // se destino está registrado no BD e existe fisicamente = Exclui para refazer fluxo\n await excluirArquivo(destino)\n } else {\n // se destino não está registrado no BD e existe fisicamente = Usa SO para gravar em um nome livre\n destino = newFile.fullName\n }\n } else {\n newFile.fullName = destino\n newFile.fileName = fileName\n }\n\n } catch(err) {\n sendLog('ERRO',`(1000) - ${err.message} - (${JSON.stringify(err)})`)\n return 0\n }\n\n try {\n if (fs.existsSync(destino)) {\n sendLog('WARNING',`(012) Copia cancelada: (${origem}) => (${destino})`)\n } else {\n\n let copia = await copiarArquivo(origem,destino)\n sendLog('AVISO',`(007) Copia de arquivo: (${origem}) => (${destino}) >> (${JSON.stringify(copia)})`)\n \n let exclusao = await excluirArquivo(origem)\n sendLog('AVISO',`(008) Exclusão de arquivo: (${origem}) >> (${JSON.stringify(exclusao)})`)\n \n let newElemento = element\n newElemento.NEW_FILE = newFile.fileName\n newElemento.FILE_FULLNAME = destino \n baixaSCCD(id,destino,filial_app,newElemento) \n\n }\n } catch(err) {\n sendLog('ERRO',`(013) Problemas, Copia ou Exclusão: (${origem}) => (${destino})`)\n } \n\n}", "function onLoadFileReader(event) {\n var text = event.target.result;\n workbench.ui.editor.setValue(text, -1);\n fileOpenDialog.dialog('close');\n }", "function fntInputFile()\n{\n let inputUploadfile = document.querySelectorAll(\".inputUploadfile\");\n //recorre todos los elementos que tenga la clase inputUploadfile\n inputUploadfile.forEach(function(inputUploadfile){\n inputUploadfile.addEventListener('change', function(){\n let idProducto = document.querySelector(\"#idProducto\").value;\n //se obtiene el id del elemento padre del elemento al que le estamos dando click (boton verde)\n let parentId = this.parentNode.getAttribute(\"id\");\n //se obtiene el id del input tipo file que esta arriba del elemento que le estamos dando click\n let idFile = this.getAttribute(\"id\");\n //se obtiene la foto del input que contiene el id concatenado con la almoadilla (la imagen)\n let uploadFoto = document.querySelector(\"#\"+idFile).value;\n //se obtiene la informacion del input (info de la foto) que contiene el id concatenado con la almoadilla (el archivo o informacion de la imagen)\n let fileimg = document.querySelector(\"#\"+idFile).files;\n //nos dirigimos al id del elemento padre para luego ir al div con la clase prevImage\n let prevImg = document.querySelector(\"#\"+parentId+\" .prevImage\");\n //para el tipo de navegador en que nos encontremos \n let nav = window.URL || window.webkitURL;\n if(uploadFoto !='')\n {\n let type = fileimg[0].type;\n let name = fileimg[0].name;\n if (type != 'image/jpeg' && type != 'image/jpg' && type != 'image/png'){\n //si no se encuentra ninguno de los tipos en el div de prevImage se coloca arch...\n prevImg.innerHTML = \"archivo no valido\";\n // donde va la image se coloca vacio\n uploadFoto.value = \"\";\n return false;\n }\n else\n {\n //hace referencia de ese input y toma los valores de ese archivo\n let objeto_url = nav.createObjectURL(this.files[0]);\n //le agregamor el loading al input\n prevImg.innerHTML = `<img class=\"loading\" src=\"${base_url}/Assets/images/loading.svg\" >`;\n //donde se envia la imagen con ajax\n let request = (window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');\n let ajaxUrl = base_url+'/Productos/setImage';\n //creamos una variable tipo formulario\n let formData = new FormData();\n // a ese formulario le agregamos el id del producto\n formData.append('idproducto' ,idProducto);\n //a ese formulario le agregamos la informacion de la foto\n formData.append(\"foto\", this.files[0]);\n request.open(\"POST\", ajaxUrl, true);\n request.send(formData);\n request.onreadystatechange = function(){\n if (request.readyState !=4) return;\n if (request.status == 200){\n let objData = JSON.parse(request.responseText);\n if (objData.status){\n //guardamos la ruta de la imagen\n prevImg.innerHTML = `<img src=\"${objeto_url}\">`;\n //al boton con la clase btnDeleteImage se le agrega el atributo imgname que es el nombre de la foto\n document.querySelector(\"#\"+parentId+\" .btnDeleteImage\").setAttribute(\"imgname\",objData.imgname)\n // al elemento con la clase btnUmploadFile se le agrega la clase notBlock para que se oculte\n document.querySelector(\"#\"+parentId+\" .btnUploadfile\").classList.add(\"notBlock\");\n // al elemento con la clase btnDeleteImage se le quita la clase notBlock para que se muestre\n document.querySelector(\"#\"+parentId+\" .btnDeleteImage\").classList.remove(\"notBlock\"); \n }\n else\n {\n swal(\"Error\", objData.msg, \"error\");\n }\n }\n \n }\n\n }\n\n }\n\n });\n });\n}", "function openFile(fileName){\n (debug?console.log(\"\\n________________________________________\\n\\topenFile\"):null);\n ///getPath\n filePath = fileName.parentElement.attributes['data-path'].value;\n fileType = fileName.parentElement.attributes['data-type'].value;\n (debug?console.log(\"path : \" + filePath):null);\n (debug?console.log(\"type : \" + fileType):null);\n //if tabname not already in codeTabs\n if (!list.pathIsOpen(filePath)) {\n (debug?console.log(\"New file : \" + filePath):null);\n //if it's a file\n if (fileType == 'file') {\n var content = sakura.apis.operator.get_file_content(filePath).then(function(returnContent) {\n (debug?console.log(\"\\n_______________open remote file\"):null);\n\n var newtab = new tab(slashRemover(filePath),filePath,returnContent);\n list.addNewTab(newtab);\n buildBar(filePath);\n\n if($(\".glyphicon-collapse-up\").length>0){list.generateExpandedMenu();};\n (debug?console.log(\"__________DoneOuvertureFichier__________\"):null);\n });\n }\n }\n //if tab already open\n else {\n (debug?console.log(\"Already opened file : \" + filePath):null);\n\t\t saveTab();\n buildBar(filePath);\n (debug?console.log(\"________________________________________\"):null);\n }\n}", "function apriEPopolaModaleModificaImportiDaTabella(riga) {\n \tvar tabellaSorgente = $(\"#tabellaGestioneVariazioni\");\n \tvar datiNellaRiga = tabellaSorgente.dataTable().fnGetData(riga);\n\n \tapriEPopolaModaleModificaImporti(datiNellaRiga);\n // Apro il modale per la modifica degli importi\n }", "badFile() {\n $('.pcm_importStatus').html('Not a valid import file.').css('color','#ff7a7a');\n $('.pcm_importButton').addClass('disabled').prop(\"disabled\",true);\n }", "function copiafyv(principal, copia) {\n try {\n /*Analizo primero el root principal */\n principal.lista_Nodo.forEach(function (element) {\n if (element.tipo == \"Clase\") {\n MYFPrincipal = [];\n MYFfCopia = [];\n /*por cada calse encontrada, la busco en el otro arbol*/\n copia.lista_Nodo.forEach(function (element2) {\n if (element2.tipo == \"Clase\") {\n /*Por cada clase que encuentro en el otro root compruebo si son los mismos*/\n if (element.descripcion == element2.descripcion) {\n /*recorro para encontrar los metodos y funciones de la clase principal*/\n element.lista_Nodo.forEach(function (element3) {\n if (element3.tipo == \"Funcion\") {\n MYFPrincipal.push(element3.descripcion);\n /*encontramos si tiene parametros la funcion*/\n element3.lista_Nodo.forEach(function (parametrosMF) {\n if (parametrosMF.tipo == \"Parametros\") {\n var parametroslst = returnLst(parametrosMF.lista_Nodo);\n element2.lista_Nodo.forEach(function (fmCopia) {\n if (fmCopia.tipo == \"Funcion\" && element3.tipodato == fmCopia.tipodato) {\n fmCopia.lista_Nodo.forEach(function (paramCopia) {\n if (paramCopia.tipo == \"Parametros\") {\n var parametroslstCopia = returnLst(paramCopia.lista_Nodo);\n if (parametroslst.toString() == parametroslstCopia.toString()) {\n console.log(\"las funciones \" + element3.descripcion + \" Son iguales en ambos archivos,por tener los mismos tipos de parametros en el mismo orden\" + \" de la calse \" + element.descripcion);\n MYFfCopia_Clase.push(element.descripcion);\n MYFfCopia.push(element3.descripcion);\n }\n }\n });\n }\n });\n }\n });\n }\n else if (element3.tipo == \"Metodo\") {\n MYFPrincipal.push(element3.descripcion);\n /*encontramos si tiene parametros la funcion*/\n element3.lista_Nodo.forEach(function (parametrosF) {\n if (parametrosF.tipo == \"Parametros\") {\n var parametroslstM = returnLst(parametrosF.lista_Nodo);\n element2.lista_Nodo.forEach(function (mCopia) {\n if (mCopia.tipo == \"Metodo\" && element3.descripcion == mCopia.descripcion) {\n mCopia.lista_Nodo.forEach(function (paramCopiaM) {\n if (paramCopiaM.tipo == \"Parametros\") {\n var parametroslstCopiaM = returnLst(paramCopiaM.lista_Nodo);\n if (parametroslstM.toString() == parametroslstCopiaM.toString()) {\n console.log(\"los metodos \" + element3.descripcion + \" Son iguales en ambos archivos,por tener los mismos tipos de parametros en el mismo orden\" + \" de la calse \" + element.descripcion);\n MYFfCopia.push(element3.descripcion);\n MYFfCopia.push(element3.descripcion);\n }\n }\n });\n }\n });\n }\n });\n }\n });\n if (MYFPrincipal.toString() == MYFfCopia.toString()) {\n console.log(\"las clases \" + element.descripcion + \" Son iguales en ambos archivos\");\n }\n }\n }\n });\n }\n });\n }\n catch (error) {\n }\n}", "chequearAbajo(ficha) {\n let cont = 1;\n if(ficha.getFilUbicada() > 0) {\n let aux = this.arregloDePosiciones[ficha.getColUbicada()][ficha.getFilUbicada() - 1];\n if(ficha.getJugador() == aux[2].getJugador()) {\n cont += this.chequearAbajo(aux[2]);\n }\n }\n return cont;\n }", "populateFiles(dataresponse) {\n //console.log(\"filepanel.populateFiles()\")\n Vfstorage.setValue(\"filepanel\" + this.panelid, this.path);\n //it is assumed that first element is \".\" describing the content of current dir\n if (dataresponse.length>0 && dataresponse[0].name === \".\") this.currentdir = dataresponse.shift();\n else this.currentdir = null;\n //console.log(\"populateFiles currentdir:\",this.currentdir);\n this.files = dataresponse;//JSON.parse(dataresponse);//,this.dateTimeReviver);//populate window list\n this.filescount = this.files.length + this.resources.length;\n let that = this;\n this.files.forEach(function (item, index, arr) {\n if (!arr[index].name && arr[index].alias) {\n arr[index].name = arr[index].alias;\n arr[index].attributes = 16;\n arr[index].date = \"\";\n arr[index].filetype = 8;\n arr[index].nicesize = \"VF-DIR\";arr[index].isdir =true;\n }\n arr[index].provenance = false;\n //console.log(arr[index]);\n arr[index].ext = that.extension(arr[index].name); //may return undefined\n arr[index].nicedate = that.dateTimeReviver(null, arr[index].date);\n if (!arr[index].ext) arr[index].ext = \"\";\n arr[index].available = !!(arr[index].filetype & 8); //available if the filetype attribute contains flag 8\n if (arr[index].attributes & 16) { if (!arr[index].nicesize) {arr[index].nicesize = \"DIR\";arr[index].isdir =true;} }\n else {\n arr[index].isdir =false;\n //convert to 4GB or 30MB or 20kB or 100b\n arr[index].nicesize = ~~(arr[index].size / 1000000000) > 0 ? ~~(arr[index].size / 1000000000) + \"GB\" : (~~(arr[index].size / 1000000) > 0 ? ~~(arr[index].size / 1000000) + \"MB\" : (~~(arr[index].size / 1000) > 0 ? ~~(arr[index].size / 1000) + \"kB\" : arr[index].size + \" b\"));\n }\n });\n if (this.path.length > 0) {//non root path\n this.addUpDir();\n }\n\n }", "function ver() { //funcion que recorrera las imagenes y las mostrara\n let contenido=\"\";\n\n for(let i=0;i<fileVal.length;i++){\n let imgtemporal=fileVal[i].name;\n insetar(imgtemporal);\n \n }\n\n}", "function movimiento(posicion) {\n var fichablanca;\n var fichaescogida;\n var validacion;\n fichablanca = document.getElementsByClassName(\"p9\")[0].id[3];\n fichaescogida = (posicion);\n validacion = fichablanca - fichaescogida;\n if (validacion == -1 || validacion == 1 || validacion == 3 || validacion == -3) {\n document.getElementsByClassName(\"p9\")[0].className = document.getElementById(\"img\" + (posicion)).className;\n document.getElementById(\"img\" + (posicion)).className = \"p9\";\n }\n}", "function ricaricaTreeStrutturaAmministrativoContabile() {\n var editabile = $(\"#HIDDEN_StrutturaAmministrativoContabileEditabile\").val() === \"true\";\n if(editabile) {\n caricaStrutturaAmministrativoContabile()\n .then(function() {\n var hiddenField = $(\"#HIDDEN_StrutturaAmministrativoContabileUid\");\n var uid = hiddenField.data(\"originalUid\");\n var albero = $.fn.zTree.getZTreeObj(\"treeStruttAmm\");\n var node;\n\n hiddenField.val(uid);\n if(albero) {\n node = albero.getNodeByParam(\"uid\", uid);\n node && !node.checked && albero.checkNode(node, true, true, true);\n }\n $(document).trigger(\"strutturaAmministrativoContabileCaricato\");\n });\n }\n }", "function fntInputFile(){\n let inputUploadfile = document.querySelectorAll(\".inputUploadfile\");\n inputUploadfile.forEach(function(inputUploadfile) { //cargamos todos los elementos de la clase\n inputUploadfile.addEventListener('change', function(){ //le agregamos el evento change\n \n //carga imagen funcion\n let idProducto = document.querySelector(\"#idProducto\").value; //para saber a que producto le mandamos la imagen\n let parentId = this.parentNode.getAttribute(\"id\"); //HACE REFERENCIA AL BOTON QUE LE ESTAMOS DANDO CLICK PARA AGREGAR IMAGEN, PARENTNODE HACE REFERENCIA AL EVENTO PADRE DEL ELEMENTO ID.\n let idFile = this.getAttribute(\"id\"); //OBTIENE EL ID PARA ESTA VARIABLE\n let uploadFoto = document.querySelector(\"#\"+idFile).value; //SE DIRIGE AL SELECTOR DE TIPO ID Y CONCATENAMOS ALA VARIABLE IDFILE ENVIANDO VALOR\n let fileimg = document.querySelector(\"#\"+idFile).files; //SE DIRIGE AL SELECTOR DE TIPO ID Y CONCATENA LA VARIABLE IDFILE Y CON FILES OBTIENE LA FOTO\n let prevImg = document.querySelector(\"#\"+parentId+\" .prevImage\");//SE DIRIGE A LA CLASE PREVIMAGE PARA VISUALIZAR LA IMAGEN.\n let nav = window.URL || window.webkitURL; //DEPENDE DEL NAVEGADOR DONDE NOS ENCONTREMOS\n if(uploadFoto !=''){ //quiere decir que si se esta seleccionando una foto\n let type = fileimg[0].type; //tipo de archivo\n let name = fileimg[0].name; //nombre de la foto\n if(type != 'image/jpeg' && type != 'image/jpg' && type != 'image/png'){\n prevImg.innerHTML = \"Archivo no valido\";\n uploadFoto.value = \"\";\n return false;\n }else{\n let objeto_url = nav.createObjectURL(this.files[0]);//hacemos referencia al input file obteniendo los valores del archivo\n prevImg.innerHTML = `<img class=\"loading\" src=\"${base_url}/Assets/images/loading.svg\">`; //donde se mostrara la imagen y cargamos con innerhtml el loading.\n \n let request = (window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');\n let ajaxUrl = base_url+'/Productos/setImage'; //ruta para hacer la peticion\n let formData = new FormData(); \n formData.append('idproducto',idProducto); //agregamos al formulario con append el campo idproducto donde le vamos agregar como valor el idProducto\n formData.append(\"foto\", this.files[0]); //le agregamos otro elemento con nombre foto que tiene como contenido de tipo file para que se envien las fotos.\n request.open(\"POST\",ajaxUrl,true);\n request.send(formData); //envio de datos.\n\n request.onreadystatechange = function(){\n\n if(request.readyState != 4) return;\n /*Obtenemos la informacion*/\n if(request.readyState == 4 && request.status == 200){\n let objData = JSON.parse(request.responseText);\n if(objData.status){\n prevImg.innerHTML = `<img src=\"${objeto_url}\">`;\n document.querySelector(\"#\"+parentId+\" .btnDeleteImage\").setAttribute(\"imgname\",objData.imgname); //nos dirigimos al boton de eliminar y con setattribute le mandamos una tributo y enviamos como valor lo que estamos devolviendo desde el controlador\n document.querySelector(\"#\"+parentId+\" .btnUploadfile\").classList.add(\"notblock\"); //agregamos a la clase btnuploadfile que hace la carga y agregamos la clase list not block para que se oculte\n document.querySelector(\"#\"+parentId+\" .btnDeleteImage\").classList.remove(\"notblock\"); //para que se muestre el boton de eliminar.\n }else{\n swal(\"Error\", objData.msg , \"error\");\n }\n \n }\n }\n }\n\n }\n \n\n });\n\n });\n\n}", "function handleFileProgress(event) {\n\n}", "submitFiles() {\n // To check whether user puts 2 datas\n if (this.files[0].length == 0 || this.files[1].length == 0){\n alert(\"You need to submit two files then click it again.\");\n } else {\n var order = 0;\n for (let file of this.files){\n const reader = new FileReader();\n reader.onload = e => {\n let ct = e.target.result.split('\\r\\n').map(x => parseFloat(x));\n this.numbers[order] = ct;\n order++;\n }\n reader.readAsText(file);\n }\n this.submitStatus = true;\n }\n }", "function validateFormModification(e) {\n\n // Contrôler les fichiers images\n var files = document.getElementById(\"doc\").files;\n var rslt = false ;\n Object.keys(files).forEach(function (key){\n var blob = files[key]; \n var ex = blob.type ;\n\n if (ex != 'image/png' && ex != 'application/pdf' && ex != 'image/jpeg'\n && ex != 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'\n && ex != 'application/msword'\n && ex != 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'\n && ex != 'application/vnd.ms-powerpoint'\n && ex != 'application/vnd.openxmlformats-officedocument.presentationml.presentation')\n {\n rslt = true ;\n }\n\n });\n\n if (rslt) {\n alert(\"Les documents doivent être au format : Word, PowerPoint, PDF, JPG, PNG ou Excel ! \");\n document.getElementById(\"labelDoc\").style.color = \"red\"\n document.getElementById(\"doc\").value = \"\"\n\n return false; \n }\n\nreturn ( true );\n\n\n }", "async function updateValue(e) {\n\n // console.log(\"upload:\", e.target.files);\n const files = e.target.files;\n const file = files[0];\n\n const zipped = await readFile(file);\n const unzipped = await unzip(zipped);\n const filename = getFilename(unzipped);\n const withoutIronMan = await removeIronManFlags(unzipped);\n // console.log(\"new unzipped:\", unzipped);\n const reZipped = await reZip(withoutIronMan, filename);\n\n }", "function progetti(key) {\n // Aggiorno il path\n path_progetto = path_mese + key + '/';\n //// Inizio il progetto\n codice += \"<li class='progetto'><ul class=\\\"files\\\">\";\n /// Inserisco il nome del progetto\n codice += \"<span onclick=\\\"animazione(this)\\\">\" + key.split('_')[1] + \"</span>\";\n // Itero dentro i vari file\n data[mese_ricordo][key].forEach(file);\n //// Finisco il progetto\n codice += \"</ul></li>\"\n }", "function onLoadFileStart (e) {\n if (!options.disableProgressBar) {\n options.baseBlock.find(selectors.progressBlockNode).show();\n }\n }", "function loadCuadriculaFiles(archivo, openLocation) {\n var div = \"\\\n <div class='col-lg-2 folder folderUni'>\\\n <input type='hidden' class='txtHdIdArchivo' value='\"+archivo._idArchivo+\"'/>\\\n <input type='hidden' class='txtHdIdCarpetaContenedora' value='\" + archivo._carpeta._idCarpeta + \"'/>\\\n \";\n /*if (openLocation !== undefined && openLocation == true) {\n div += \"<a href='\" + RAIZ + 'Repositorio/ndex/' + archivo._carpeta._idCarpeta + \"' class='ico icoOpenLocation' title='Abrir ubicacion'>\\\n <i class='fa fa-folder-open'></i>\\\n </a>\";\n }*/\n //</div>\\\n var groupClass = \"btn-group\";\n if (openLocation !== undefined && openLocation == true) {\n groupClass = \"btn-group-vertical\";\n }\n div += \"\\\n <div class='cuadritoIcono '>\\\n <img class='imgCuadritoIcono' src='\"+RAIZ+\"/Content/themes/iusback_theme/img/general/repositorio/\"+archivo._extension._tipoArchivo._icono+\"' />\\\n <div class='\"+groupClass+\"'>\\\n <a class='urlDescargar' href='\"+RAIZ+\"/Repositorio/DescargarFichero/\"+archivo._idArchivo+\"'>\\\n </a>\\\n <div class='btnAccion btn btn-default icoCompartirFile' title='Compartir'>\\\n <i class='fa fa-share'></i>\\\n </div>\\\n <div class='btnAccion btn btn-default ico divDescargar' title='Descargar'>\\\n <i class='fa fa-download'></i>\\\n </div>\";\n if (openLocation !== undefined && openLocation == true) {\n //<a href='\" + RAIZ + 'Repositorio/ndex/' + archivo._carpeta._idCarpeta + \"' class='ico icoOpenLocation' title='Abrir ubicacion'>\\\n //</a>\n div += \"</div>\\\n <div class='\"+groupClass+\"'>\\\n <div class='btnAccion btn btn-default ico'>\\\n <i class='fa fa-folder-open'></i>\\\n </div>\\\n \";\n }\n div += \"\\\n <div class='btnAccion btn btn-default ico icoEliminarArchivo' title='Eliminar'>\\\n <i class='fa fa-trash-o'></i>\\\n </div>\\\n </div>\\\n <div class='detalleCarpeta'>\\\n <div class='normalMode'>\\\n <h3 class='ttlNombreCarpeta nombreAcompartir'>\" + archivo._nombre + \"</h3>\\\n </div>\\\n <div class='row marginNull hidden editMode'>\\\n <div class='row marginNull inputNombreCarpeta'>\\\n <input type='text' class='form-control txtNombreCarpeta'>\\\n </div>\\\n <div class='row marginNull'>\\\n <div class='btn-group'>\\\n <button class='btn btn-xs btn-default btnEditarArchivo'>Hecho</button>\\\n <button class='btn btn-xs btn-default btnCancelarEdicionCarpeta'>Cancelar</button>\\\n </div>\\\n </div>\\\n </div>\\\n </div>\\\n </div>\\\n </div>\\\n \";\n return div;\n }", "function listo() {\n var numero = fs.readFileSync(file);\n document.getElementById(\"valorr\").innerHTML = numero;\n}", "function SubirImgTaxi(mail, cMarca, cModelo, cNtaxi, cPlaca, cSitio, cNumeroSerie) {\n\t\t\t\t\t\tlet imagenASubir = file;\n\t\t\t\t\t\tlet uploadTask = storageRef.child(\"Fotos_taxis/\" + imagenASubir.name).put(imagenASubir);\n\n\t\t\t\t\t\tuploadTask.on(\"state_changed\",\n\t\t\t\t\t\t\tfunction (snapshot) {\n\t\t\t\t\t\t\t\tlet progress = (snapshot.bytesTransferred / snapshot.totalBytes) * 100;\n\t\t\t\t\t\t\t\tswitch (snapshot.state) {\n\t\t\t\t\t\t\t\t\tcase firebase.storage.TaskState.PAUSED: // or 'paused'\n\t\t\t\t\t\t\t\t\t\tconsole.log(\"Upload is paused\");\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase firebase.storage.TaskState.RUNNING: // or 'running'\n\t\t\t\t\t\t\t\t\t\tconsole.log(\"Upload is running\");\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tfunction (error) {\n\t\t\t\t\t\t\t\t// Handle unsuccessful uploads\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tfunction () {\n\t\t\t\t\t\t\t\tuploadTask.snapshot.ref.getDownloadURL().then(function (downloadURL) {\n\t\t\t\t\t\t\t\t\t//Aqui va el metodo donde se guarda\n\t\t\t\t\t\t\t\t\tGuardarTaxis(mail, downloadURL, cMarca, cModelo, cNtaxi, cPlaca, cSitio, cNumeroSerie);\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}", "function fileProgress(x) {\n\n\t//console.log(\"handleFileProgress loaded: \" + x.loaded);\n\t//console.log(\"handleFileProgress progress: \" + x.progress);\n\t//console.log(\"handleFileProgress total: \" + x.total);\n\n}", "setIndexFile() {\n currentFile = this.getCurrentFile();\n if (currentFile === \"\") {\n atom.notifications.addWarning(\"Path of current File not available\", {\n detail: \"Could not set the index file\",\n dismissable: true\n });\n } else {\n atom.config.set('mcide.indexFile', currentFile);\n }\n }", "function FileProgress(file, targetID) {\n this.fileProgressElement = document.getElementById(\"swfu_ldr-\" + file.id + \"-prg\");\n //\n /*\n this.fileProgressID = \"divFileProgress\";//进度条包装的DIV\n\n this.fileProgressWrapper = document.getElementById(this.fileProgressID);\n if (!this.fileProgressWrapper) {\n this.fileProgressWrapper = document.createElement(\"div\");\n this.fileProgressWrapper.className = \"progressWrapper\";\n this.fileProgressWrapper.id = this.fileProgressID;\n\n this.fileProgressElement = document.createElement(\"div\");\n this.fileProgressElement.className = \"progressContainer\";\n\n var progressCancel = document.createElement(\"a\");\n progressCancel.className = \"progressCancel\";\n progressCancel.href = \"#\";\n progressCancel.style.visibility = \"hidden\";\n progressCancel.appendChild(document.createTextNode(\" \"));\n\n var progressText = document.createElement(\"div\");\n progressText.className = \"progressName\";\n progressText.appendChild(document.createTextNode(\"上传文件: \"+file.name));\n\n var progressBar = document.createElement(\"div\");\n progressBar.className = \"progressBarInProgress\";\n\n var progressStatus = document.createElement(\"div\");\n progressStatus.className = \"progressBarStatus\";\n progressStatus.innerHTML = \"&nbsp;\";\n\n this.fileProgressElement.appendChild(progressCancel);\n this.fileProgressElement.appendChild(progressText);\n this.fileProgressElement.appendChild(progressStatus);\n this.fileProgressElement.appendChild(progressBar);\n\n this.fileProgressWrapper.appendChild(this.fileProgressElement);\n document.getElementById(targetID).style.height = \"75px\";\n document.getElementById(targetID).appendChild(this.fileProgressWrapper);\n fadeIn(this.fileProgressWrapper, 0);\n\n } else {\n this.fileProgressElement = this.fileProgressWrapper.firstChild;\n this.fileProgressElement.childNodes[1].firstChild.nodeValue = \"上传文件: \"+file.name;\n }\n\n this.height = this.fileProgressWrapper.offsetHeight;*/\n\n}", "async function updateFile(fname, fullflag){\n let data_idx\n let KeyVal\n let missing\n let hbuf\n // Get data.edt ALLES oder TEIL\n data_idx = findFileInDir(fname)\n if(data_idx>=0){\n //console.log(\"Upload 'data.edt'\")\n await blStore.get(blxIDs.deviceMAC + '_' + fname)\n KeyVal = blStore.result() // undefined opt.\n if(KeyVal === undefined || fullflag === true ){ // Nix da oder explizit: ALLES holen\n await getfile([0, fname], false)\n if(blxErrMsg) return\n }else{\n missing = blxIDs.disk.files[data_idx].len - KeyVal.v.akt_len\n if(missing>0){\n // console.log(\"Gibt es tw. schon: \" + KeyVal.v.akt_len + \" Fehlt: \" + missing)\n if(blxUserCB) blxUserCB('GET',missing,fname) \n\n terminalPrint('Get File (Missing Part) \"' + fname + '\": Len: ' + missing + ' Bytes')\n await getSubFile(fname, KeyVal.v.akt_len, missing) // File, Pos, Ende\n if (blxErrMsg) return\n if( infile_bytebuf.length !== missing){\n blxErrMsg = 'ERROR(upload): Read Len'\n return\n }\n // console.log(\"OK\" , infile_bytebuf, infile_file_len, infile_bytebuf.length)\n hbuf = new Uint8Array(KeyVal.v.bytebuf.length + missing)\n hbuf.set(KeyVal.v.bytebuf)\n hbuf.set(infile_bytebuf, KeyVal.v.bytebuf.length)\n KeyVal.v.bytebuf = hbuf\n KeyVal.v.total_len += missing\n KeyVal.v.akt_len += missing\n // Write Back to Store\n //console.log(\"NewL: \", KeyVal.v.bytebuf.length)\n try{\n await blStore.set(KeyVal.k,KeyVal.v)\n } catch(err){\n blxErrMsg = 'ERROR(upload): ' + err\n }\n }\n }\n } else blxErrMsg='' // set by findFileInDir\n }", "uploadprogress (file, progress, bytesSent) {\n if (file.previewElement) for (let node of file.previewElement.querySelectorAll(\"[data-dz-uploadprogress]\"))node.nodeName === \"PROGRESS\" ? node.value = progress : node.style.width = `${progress}%`;\n }", "function fileQueued(file) {\r\r\n\ttry {\r\r\n\t\tvar progress = new FileProgress(file, this.customSettings.progressTarget);\r\r\n\t\tprogress.setStatus(\"Pending...\");\r\r\n\t\tprogress.toggleCancel(true, this);\r\r\n\r\r\n\t} catch (ex) {\r\r\n\t\tthis.debug(ex);\r\r\n\t}\r\r\n\r\r\n}", "function fileSelect() { //Controla si el input es la linea de comando o un archivo\n const selected = document.getElementById(\"cFile\").files.length > 0;\n fileSelected = selected\n document.getElementById(\"cmd\").disabled = selected\n}", "function getFile1() {\r\n fileName = \"sched1.txt\"\r\n fetchFile();\r\n }", "function onFileUploadProgress(e) {\n\tif (e.lengthComputable) {\n\t\tvar percentComplete = parseInt((e.loaded + totFileUploaded) * 100 / totFileLength);\n\n\t\tif(percentComplete>100)\n\t\t\tpercentComplete = 100;\n\t\tvar bar = document.getElementById('bar');\n\t\tbar.style.width = percentComplete + '%';\n\t\tbar.innerHTML = percentComplete + ' % completed';\n\t\tbootbox.alert('File uploading Finished');\n\t} else {\n\t\tdebug('computation failed');\n\t}\n}", "function cargarFondo()\n{\n fondo.cargaOK = true;\n dibujar();\n}", "function loadFilesuserfiles(){\n \n \n $('#fileActionSelectAction').addClass('btnDisabled').off('click');\n \n var fb = new fileBrowser.Browser($(\"#fileSysDiv\"), \"offline\", projectName);\n gFileBrowser = fb;\n //fb1 = fb;\n /*\n $.post(\"/api/1/flash/getFileList\")\n .done(function(data) {\n if (data.ok) {\n fb.load(data.ok);\n fb.render();\n } else if (data.err) {\n fileBrowser.showInputDialog(\"Error: \" + data.err, false);\n } else {\n fileBrowser.showInputDialog(\"Error: \" + data.err, false);\n }\n })\n .fail(function() {\n fileBrowser.showInputDialog(\"Error\", false);\n });\n */\n if (projectName) {\n $.post(\"/api/1/flash/loadUserFiles\", {\"name\": projectName})\n .done(function(data) {\n if (data.ok) {\n fb.load(data.ok);\n } else {\n if (data.err) {\n alert(\"error loading user files\");\n }\n }\n \n fb.render();\n })\n .fail(function(data) {\n alert(\"error loading user files\");\n });\n }\n \n if(project.header.DeviceType != 'CC3100')\n {\n $($('#fileActionSelect')[0].options[2]).show();\n \n }\n else\n {\n $($('#fileActionSelect')[0].options[2]).hide();\n }\n\n $(\"#checkUnchekDiv\").children().eq(0).on(\"click\", function() { fb.selectAll.call(fb) })\n $(\"#checkUnchekDiv\").children().eq(1).on(\"click\", function() { fb.unselectAll.call(fb) })\n \n return;\n \n \n\tif(!project){\n\t\tproject={};\n\t}\n\tif(!project.userFiles){\n\t\tproject.userFiles=[];\n\t}\t\n\tif(project && project.userFiles){\n\t\tvar found=-1;\n\t\tfor (var cert=0;cert< project.userFiles.length;cert++){\n\t\t\tif( project.userFiles[cert].id==\"cert\" && project.userFiles[cert].type==\"folder\"){\n\t\t\t\tfound=cert\n\t\t\t}\n\t\t}\n\t\t//if not found create \n\t\tif (found==-1){\n\t\t\tvar cert={\n\t\t\t\tid:'cert',\n\t\t\t\ttype:\"folder\",\n\t\t\t\tobject:[]\n\t\t\t};\n\t\t\tproject.userFiles.push(cert)\n\t\t}\n\t\tbuild_files(project.userFiles,'#fileSysDiplayPageDiv','','');\n\t}\n\t//unbind drop in main\n\t$('#fileSysDiv').unbind('dragover');\n\t$('#fileSysDiv').unbind('dragenter');\n\t$('#fileSysDiv').unbind('drop');\n\t// stop propagation on default draganddrop\n\t$('#fileSysDiv').on('dragover', function(e) {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t}\n\t);\n\t$('#fileSysDiv').on( 'dragenter', function(e) {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t}\n\t);\n\t$('#fileSysDiv').on( 'drop', function(e) {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t}\n\t);\n\t//bind upload event\n\t$('#fileElement').change(function (e) {\n\t//get the folder name\n\tvar foldername=\"\"\n\tvar toAction=$('#fileSysDiplayPageDiv .fsLine>.fs1>i.fa-check-square-o');\n\tif(toAction.length>0)\n\t{\n\t\tfoldername=$(toAction[0]).attr(\"id\").replace('//FileSelect','').split('//').reverse();\n\t}\n\t//upload\n\t upload(e.target.files,foldername);\n });\n\n //bind mcuimg event\n $('#MCUImg').change(function (e) {\n\t//get the folder name\n\tvar foldername=[\"sys\"]\n\tvar toAction=$('#fileSysDiplayPageDiv .fsLine>.fs1>i.fa-check-square-o');\n\tif(toAction.length>0)\n\t{\n\t\tfoldername=$(toAction[0]).attr(\"id\").replace('//FileSelect','').split('//').reverse();\n\t}\n\t//upload\n\t upload(e.target.files,foldername, true);\n });\n \n if(project.header.DeviceType == 'CC3100')\n {\n document.getElementById('fileActionSelect').options[6].style.display = 'none'; \n }\n else\n {\n document.getElementById('fileActionSelect').options[6].style.display = 'block';\n }\n}", "function upFile () {\n\n var formData = new FormData();\n var file = document.getElementById(\"miFile\").files[0];\n formData.append(\"myFileUp\", file);\n\n var xhr = new XMLHttpRequest();\n \n xhr.open('post', '/subirArchivo', true);\n \n xhr.upload.onprogress = function(e) {\n if (e.lengthComputable) {\n var percentage = (e.loaded / e.total) * 100;\n $(\"#Evo\").css('width', percentage + '%');\n }\n };\n \n xhr.onerror = function(e) {\n showInfo('An error occurred while submitting the form. Maybe your file is too big');\n };\n \n //xhr.onload = function() {showInfo(this.statusText);};\n xhr.onload = function(res) {\n\t//Visualización en HTML-----------------------------------------------------------\n\tif (this.statusText == \"OK\") {\n\n //>>Me llega com texto, y lo paso a Json\n var datajson = eval(xhr.responseText);\n\n\t\tdocument.getElementById(\"linktabla\").innerHTML = \"<i class='fa fa-file-code-o'></i> <a href='\"+datajson[0].path+\"' target='_blank'>\"+datajson[0].tabla+\"</a>\";\n document.getElementById(\"ncolumnas\").innerHTML = \"<i class='fa fa-columns'></i> \"+datajson[0].ncol+\" columnas\";\n document.getElementById(\"nfilas\").innerHTML = \"<i class='fa fa-navicon'></i> \"+datajson[0].nfilas+\" filas\";\n document.getElementById(\"cabeceras\").innerHTML = \"<i class='fa fa-table'></i> Nombres de columna:<div class='well well-sm'><p>\"+datajson[0].cabeceras+\"</p></div>\";\n\t} else {\n\t\tdocument.getElementById(\"linktabla\").innerHTML = \"No se ha podido subir el archivo.\";\n\t};\n\t//--------------------------------------------------------------------------------\n };\n\n xhr.send(formData);\n\n}", "function loadShowUpdateFile(){\n\t$('a[data-tar=\"consultFile\"][data-loaded=\"0\"]').each(function(){\n\t\t$(this).on('click',function(e){\n\t\t\te.preventDefault();\n\t\t\tpre_fnloadFile($(this).attr(\"data-folio\"));\n\t\t\t$(this).attr(\"data-loaded\",\"1\");\n\t\t})\n\t});\n\t$('[data-btn=\"uploadFiles\"][data-loaded=\"0\"]').each(function(){\n\t\t$(this).on('click',function(e){\n\t\t\t$(\"#uploadFiles\").attr(\"data-grade\",$(this).attr(\"data-grade\"))\n\t\t\t\t\t\t\t .attr(\"data-period\",$(this).attr(\"data-period\"))\n\t\t\t\t\t\t\t .attr(\"data-document\",$(this).attr(\"data-document\"));\n\t\t});\n\t\t$(this).attr(\"data-loaded\",\"1\");\n\t});\n}", "function baixarFoto(element) {\n let newElemento = element\n let file = newElemento.ARQUIVO\n baixaImagem(file).then((ret)=>{\n pegarFilialUsuarioAPP(newElemento)\n sendLog('INFO',`(004) Obtendo imagem. (${file})`)\n }) \n}", "retrackChangedFile(uri) {\n let item = this.map.get(uri);\n if (item) {\n // Alread been handled by document change event.\n let openedAndFresh = item.document && item.version === item.document.version;\n if (!openedAndFresh) {\n this.makeFileExpire(uri, item);\n }\n }\n else {\n this.trackFile(vscode_uri_1.URI.parse(uri).fsPath);\n }\n }", "function fileChange() {\n\tcount++;\n\tif (count > 1) {\n\t\tvar num = count - 1;\n\t\t$(\"div#file\" + num).removeClass(\"highlightFile\");\n\t}\n\t// FileList Object existing of input with ID \"fileA\"\n\tvar fileList = document.getElementById(\"fileA\").files;\n\n\t// File Object (first element of FileList)\n\tfile = fileList[0];\n\n\tfileArr.push(file);\n\t// File Object not available = no data chosen\n\tif (!file) {\n\t\treturn;\n\t}\n\n\t$(\"div#wrapFiles\")\n\t\t\t.append(\n\t\t\t\t\t\"<div id='file\"\n\t\t\t\t\t\t\t+ count\n\t\t\t\t\t\t\t+ \"' class='singleFile' onClick='setFile(\"\n\t\t\t\t\t\t\t+ count\n\t\t\t\t\t\t\t+ \")'> <span class='fileName'></span><span class='fileSize'></span> <br> <div id='prog' class='progress-bar blue stripes'><span style='width: 0%'></span> </div> </div>\");\n\n\t$(\"div#file\" + count + \" span.fileName\").html(\"Name: \" + file.name);\n\t$(\"div#file\" + count + \" span.fileSize\").html(\"Size: \" + file.size + \"B\");\n\t$(\"div#file\" + count).addClass(\"highlightFile\");\n\n}", "function ChangeAjustarFerimentos(valor) {\n EntradasAdicionarFerimentos(valor, Dom('input-ferimento-nao-letal').checked);\n AtualizaGeralSemLerEntradas();\n}", "function CargarImagenTitular() {\n //console.log('CargarImagenTitular');\n //sDropFotoTitular.css('border', 'dashed 3px #7596a5'); //Gris azulado\n reader = new FileReader();\n $('#loading-mb').show();\n reader.onload = function (e) {\n console.log('reader.onload');\n nuevaImagenTitular = true;\n nombreImgTitular = arrSelectedFilesTitular[0].name;\n console.log('Antes de poner imgFotoCargadaLife');\n imgFotoCargadaLife.attr('src', e.target.result);\n\n imgFotoCargadaLife.on('load', function () {\n console.log('Antes de AjustarImagen');\n AjustarImagen(imgFotoCargadaLife, sBSubirFotoLife, sBEliminarFotoLife,sPortada);\n\n imgFotoCargadaLife.off('load');\n });\n };\n\n}", "function updateSize() {\n var mb_in_bytes = 1024 * 1024;\n var file = document.getElementById(\"data-file\").files[0],\n type_file = file.name.split('.').pop();\n if (file.size < mb_in_bytes * 5 && type_file === \"docx\") {\n return true;\n }\n return false;\n}", "function avantiDiUno(){\n\t\tvar fotoCorrente = $(\"img.active\");\n var fotoSuccessiva = fotoCorrente.next(\"img\");\n // devo valutare se l img successiva esiste, in caso contrario riparto dalla prima,poi faro l incontrario per il precedente..sfrutto le classi first e last assegnate.. uso .length per valutare l esistenza!!!\n if (fotoSuccessiva.length == 0) {\n fotoSuccessiva = $(\"img.first\");\n }\n fotoCorrente.removeClass(\"active\");\n fotoSuccessiva.addClass(\"active\");\n // faccio la stessa cosa con i pallini\n var pallinoCorrente = $(\"i.active\");\n var pallinoSuccessivo = pallinoCorrente.next(\"i\");\n if (pallinoSuccessivo.length == 0) {\n pallinoSuccessivo = $(\"i.first\");\n }\n pallinoCorrente.removeClass(\"active\");\n pallinoSuccessivo.addClass(\"active\");\n // faccio variare anche qui l avariabile creata sopra per allinere i cambiamenti di frecce e pallini...vorrei tornare indietro nel tempo e dirlo al me stesso di un ora fa!!!\n if(current_img<3)\n\t\t\tcurrent_img++;\n\t\telse\n\t\t\tcurrent_img=0;\n\n\t}", "setFileID(e) {\n this.fileID = e.target.value;\n this.contenBodyId=this.fileDetails[e.target.value+'contenBodyId'];\n this.versionId=this.fileDetails[e.target.value+'versionId'];\n this.fileExtension=this.fileDetails[e.target.value+'fileExtension'];\n this.versionData=this.fileDetails[e.target.value+'versionData'];\n\n }", "function dibujarFresado115(modelo,di,pos,document){\n\t\n\t//ESTABLECER CAPA\n\tvar op_fresado = new RAddObjectsOperation();\n\tdi.setCurrentLayer(\"Fresado\"); //Seleccionar la capa de fresado\n\t\n\t\n\tvar plieguesInf=[pliegueInf1, pliegueInf2, pliegueInf3, pliegueInf4]\n\t\n\t//sacar el mayor pliegue\n\tpliegueInferior=pliegueInf1\n\tfor (n=1 ; n<4 ; n=n+1){\n\t\tif (pliegueInferior<plieguesInf[n]) {\n\t\t\tpliegueInferior=plieguesInf[n]\n\t\t}\n\t}\n\t\n\t\n\t\n\t//Puntos trayectoria\t\n\tvar fresado11 = new RVector(pos.x+alaIzquierda+anchura1,pos.y+alaInferior+pliegueInferior)\n\tvar fresado12 = new RVector(pos.x+alaIzquierda+anchura1+anchura2,pos.y+alaInferior+pliegueInferior)\n\tvar fresado13 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3,pos.y+alaInferior+pliegueInferior)\n\tvar fresado14 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3+anchura4,pos.y+alaInferior+pliegueInferior)\n\t\n\tvar fresado16 = new RVector(pos.x+alaIzquierda,pos.y+alaInferior+pliegueInferior) \n\tvar fresado17 = new RVector(pos.x+alaIzquierda,pos.y+alaInferior+pliegueInferior+alturaPlaca)\n\t\n\tvar fresado18 = new RVector(pos.x+alaIzquierda+anchura1,pos.y+alaInferior+pliegueInferior+alturaPlaca)\n\tvar fresado19 = new RVector(pos.x+alaIzquierda+anchura1+anchura2,pos.y+alaInferior+pliegueInferior+alturaPlaca)\n\tvar fresado20 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3,pos.y+alaInferior+pliegueInferior+alturaPlaca)\n\tvar fresado21 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3+anchura4,pos.y+alaInferior+pliegueInferior+alturaPlaca)\n\t\n\tvar fresado22 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3+anchura4,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n\tvar fresado2 = new RVector(pos.x+alaIzquierda,pos.y)\n\t\n\t\n\tvar line = new RLineEntity(document, new RLineData( fresado16 , fresado14 ));\n\top_fresado.addObject(line,false);\n\tvar line = new RLineEntity(document, new RLineData( fresado20 , fresado13 ));\n\top_fresado.addObject(line,false);\n\tvar line = new RLineEntity(document, new RLineData( fresado12 , fresado19 ));\n\top_fresado.addObject(line,false);\n\tvar line = new RLineEntity(document, new RLineData( fresado18 , fresado11 ));\n\top_fresado.addObject(line,false);\n\tvar line = new RLineEntity(document, new RLineData( fresado17 , fresado21 ));\n\top_fresado.addObject(line,false);\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t//anchura1 - Inferior\n\tif (anchura1>pliegueInf1) {\n\t\tvar fresado1 = new RVector(pos.x+alaIzquierda,pos.y+alaInferior+pliegueInferior-pliegueInf1)\n\t\tvar fresado3 = new RVector(pos.x+alaIzquierda+anchura1-pliegueInf1,pos.y+alaInferior+pliegueInferior-pliegueInf1)\n\t\t\n\t\tvar line = new RLineEntity(document, new RLineData( fresado1 , fresado3 ));\n\t\top_fresado.addObject(line,false);\n\t} \n\t\n\t//anchura2 - Inferior\n\tif (anchura2>(pliegueInf2*2)) {\n\t\tvar fresado4 = new RVector(pos.x+alaIzquierda+anchura1+pliegueInf2,pos.y+alaInferior+pliegueInferior-pliegueInf2)\n\t\tvar fresado5 = new RVector(pos.x+alaIzquierda+anchura1+anchura2-pliegueInf2,pos.y+alaInferior+pliegueInferior-pliegueInf2)\n\t\tvar line = new RLineEntity(document, new RLineData( fresado4 , fresado5 ));\n\t\top_fresado.addObject(line,false);\n\t}\n\t\n\t//anchura3 - Inferior\n\tif (anchura3>(pliegueInf3*2)) {\n\t\tvar fresado6 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+pliegueInf3,pos.y+alaInferior+pliegueInferior-pliegueInf3)\n\t\tvar fresado7 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3-pliegueInf3,pos.y+alaInferior+pliegueInferior-pliegueInf3)\n\t\tvar line = new RLineEntity(document, new RLineData( fresado6 , fresado7 ));\n\t\top_fresado.addObject(line,false);\n\t} \n\t\n\t//anchura4 - Inferior\n\tif (anchura4>pliegueInf4) {\n\t\tvar fresado8 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3+pliegueInf4,pos.y+alaInferior+pliegueInferior-pliegueInf4)\n\t\tvar fresado9 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3+anchura4,pos.y+alaInferior+pliegueInferior-pliegueInf4)\n\t\tvar line = new RLineEntity(document, new RLineData( fresado8 , fresado9 ));\n\t\top_fresado.addObject(line,false);\n\t} \n\t\n\t\n\t\n\n\t\n\t\n\n\t\n\t//anchura1 - Superior\n\tif (anchura1>(pliegueSuperior*2)) {\n\t\tvar fresado25 = new RVector(pos.x+alaIzquierda,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n\t\tvar fresado26 = new RVector(pos.x+alaIzquierda+anchura1-pliegueSuperior,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n\t\tvar line = new RLineEntity(document, new RLineData( fresado25 , fresado26 ));\n\t\top_fresado.addObject(line,false);\n\t\t\n\t\tif (crearFresado==1) { //Esto es para hacer el fresado externo o no\n\t\t\tvar fresado27 = new RVector(pos.x+alaIzquierda+anchura1-pliegueSuperior+margenFresado,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n\t\t\tvar fresado28 = new RVector(pos.x+alaIzquierda+anchura1-pliegueSuperior+margenFresado,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior+alaSuperior)\n\t\t\tvar line = new RLineEntity(document, new RLineData( fresado27 , fresado28 ));\n\t\t\top_fresado.addObject(line,false);\n\t\t}\n\t}\n\t\n\t//anchura2 - Superior\n\tif (anchura2>(pliegueSuperior*2)) {\n\t\tvar fresado31 = new RVector(pos.x+alaIzquierda+anchura1+pliegueSuperior,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n\t\tvar fresado32 = new RVector(pos.x+alaIzquierda+anchura1+anchura2-pliegueSuperior,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n\t\tvar line = new RLineEntity(document, new RLineData( fresado31 , fresado32 ));\n\t\top_fresado.addObject(line,false);\n\t\t\n\t\tif (crearFresado==1) {\n\t\t\tvar fresado29 = new RVector(pos.x+alaIzquierda+anchura1+pliegueSuperior-margenFresado,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior+alaSuperior)\n\t\t\tvar fresado30 = new RVector(pos.x+alaIzquierda+anchura1+pliegueSuperior-margenFresado,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n\t\t\tvar line = new RLineEntity(document, new RLineData( fresado29 , fresado30 ));\n\t\t\top_fresado.addObject(line,false);\n\t\t\tvar fresado33 = new RVector(pos.x+alaIzquierda+anchura1+anchura2-pliegueSuperior+margenFresado,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n\t\t\tvar fresado34 = new RVector(pos.x+alaIzquierda+anchura1+anchura2-pliegueSuperior+margenFresado,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior+alaSuperior)\n\t\t\tvar line = new RLineEntity(document, new RLineData( fresado33 , fresado34 ));\n\t\t\top_fresado.addObject(line,false);\n\t\t}\n\t}\n\t\n\t//anchura3 - Superior\n\tif (anchura3>pliegueSuperior*2) {\n\t\tvar fresado37 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+pliegueSuperior,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n\t\tvar fresado38 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3-pliegueSuperior,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n\t\tvar line = new RLineEntity(document, new RLineData( fresado37 , fresado38 ));\n\t\top_fresado.addObject(line,false);\n\t\t\n\t\tif (crearFresado==1) {\n\t\t\tvar fresado35 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+pliegueSuperior-margenFresado,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior+alaSuperior)\n\t\t\tvar fresado36 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+pliegueSuperior-margenFresado,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n\t\t\tvar line = new RLineEntity(document, new RLineData( fresado35 , fresado36 ));\n\t\t\top_fresado.addObject(line,false);\n\t\t\tvar fresado39 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3-pliegueSuperior+margenFresado,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n\t\t\tvar fresado40 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3-pliegueSuperior+margenFresado,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior+alaSuperior)\n\t\t\tvar line = new RLineEntity(document, new RLineData( fresado39 , fresado40 ));\n\t\t\top_fresado.addObject(line,false);\n\t\t}\n\t}\n\t\n\t//anchura4 - Superior\n\tif (anchura4>pliegueSuperior) {\n\t\tvar fresado43 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3+pliegueSuperior,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n\t\tvar fresado44 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3+anchura4,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n\t\tvar line = new RLineEntity(document, new RLineData( fresado43 , fresado44 ));\n\t\top_fresado.addObject(line,false);\n\t\t\n\t\tif (crearFresado==1) {\n\t\t\tvar fresado41 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3+pliegueSuperior-margenFresado,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior+alaSuperior)\n\t\t\tvar fresado42 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3+pliegueSuperior-margenFresado,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n\t\t\tvar line = new RLineEntity(document, new RLineData( fresado41 , fresado42 ));\n\t\t\top_fresado.addObject(line,false);\n\t\t}\n\t}\n\t\n\t\n\tvar fresado2 = new RVector(pos.x+alaIzquierda,pos.y)\n\tvar fresado25 = new RVector(pos.x+alaIzquierda,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n\tvar line = new RLineEntity(document, new RLineData( fresado2 , fresado25 ));\n\top_fresado.addObject(line,false);\n\t\n\t\n\t\n\treturn op_fresado; \n}", "_controlUploadFile(event) {\n let file = event.target.files[0];\n let fileName = file.name;\n let fileType = fileName.split(\".\")[fileName.split(\".\").length - 1];\n\n if(this.options.tableRender) {\n let table = this._componentRoot.querySelector('[data-component=\"table-custom\"]');\n\n if(table) {\n this._inputData = [];\n table.parentNode.removeChild(table);\n }\n\n this.options.tableRender = false;\n }\n\n let chooseFields = this._componentRoot.querySelector(\"#chooseFields\");\n\n if (chooseFields) {\n chooseFields.parentNode.removeChild(chooseFields);\n }\n\n if(fileType !== 'csv') {\n\n noty({\n text: 'Файл ' + fileName + ' некорректный, выберите корректный файл, формата csv.',\n type: 'error',\n timeout: 3000\n });\n\n return;\n\n } else {\n\n noty({\n text: 'Был выбран файл ' + fileName + '.',\n type: 'success',\n timeout: 3000\n });\n }\n\n this._parseCSV(event, file);\n }", "function loadFile(o) {\n const modal = document.getElementById(\"myModal\");\n\tconst[idx, isSource] = findNode(ItemSelection);\n const path = (isSource) ? SourceFSPath : DataFSPath;\n let input = o.innerHTML;\n\n fetch(path + input)\n .then(res => res.text())\n .then(out => {\n if (isSource) {\n SourceFiles[idx].setValue(out);\n } else {\n DeviceFiles[idx].setValue(out);\n }\n\n if (ItemSelection.classList.contains(\"device\")) {\n input = ItemSelection.id.slice(-1) + \"- \" + input;\n }\n ItemSelection.innerText = input;\n })\n .catch(err => { throw err });\n\n modal.style.display = \"none\";\n}", "function detailDataEfiling(respon, menu_title) {\n let data = respon.data;\n // ket Is_jenis 1 = Sefin, Is_jenis 2 = webtool\n let jenis_data = data.efilling['is_jenis'];\n let no_rekening = ((data.header_efiling== null)? '' : data.header_efiling['no_rekening'])\n\n $(\".custom-file-input\").attr({ // create atribut is jenis di form upload file\n \"is_jenis\": jenis_data\n })\n let path_file = data.efilling['folder_master'];\n let pathFileUpload = '';\n\n if (jenis_data == 2) {\n // link http://103.234.254.186/efiling/2018/03/02/02-38-00029-18/fatmah%20-%20PH.pdf\n let tgl_realisasi = '';\n let kode_kantor = '';\n let y = '';\n let m = '';\n let no_rek_webtool = '';\n if (data.efilling['no_rekening_lama'] == null) {\n no_rek_webtool = ((data.header_efiling == null) ? '' : data.header_efiling['no_rekening'])\n tgl_realisasi = ((data.header_efiling == null) ? '' : data.header_efiling['tgl_realisasi'])\n kode_kantor = ((data.header_efiling == null) ? '' : data.header_efiling['kode_kantor'])\n y = tgl_realisasi.split(\"-\")[2]\n m = tgl_realisasi.split(\"-\")[1]\n } else {\n no_rek_webtool = data.efilling['no_rekening_lama']\n tgl_realisasi = data.efilling['tgl_realisasi_eng_lama']\n kode_kantor = data.efilling['kode_kantor_lama']\n y = tgl_realisasi.split(\"-\")[0]\n m = tgl_realisasi.split(\"-\")[1]\n }\n\n pathFileUpload = `http://103.234.254.186/${path_file}/${y}/${m}/${kode_kantor}/${no_rek_webtool}/`;\n }else{\n pathFileUpload = `${path_file}/`;\n }\n\n $(\"#update_verifikasi_data\").attr({ // create atribut di btn update upload file\n \"jenis_data\": jenis_data\n });\n $('#nama_debitur').html(`Data E-Filling ${data.header_efiling['nama_debitur']}`) // inner nama debitur halaman edit & verifikasi\n \n // variable get data status verifikasi efilling\n let status_nasabah = data.efilling_nasabah['verifikasi_nasabah'];\n let status_permohonan = data.efilling_permohonan['verifikasi_permohonan'];\n let status_jaminan = data.efilling_jaminan['verifikasi_jaminan'];\n let status_bichecking = data.efilling_bichecking['verifikasi_bichecking'];\n let status_ca = data.efilling_ca['verifikasi_ca'];\n let status_legal = data.efilling_legal['verifikasi_legal'];\n let status_spkndk = data.efilling_spkndk['verifikasi_spkndk'];\n let status_foto = data.efilling_foto['verifikasi_foto'];\n\n // notes innerNotes (data notes, id inner html, status efiling)\n let notes_nasabah = innertNotes(data.efilling_nasabah['notes_nasabah'], \"verifikasi_nasabah\", status_nasabah, menu_title)\n let notes_bi_checking = innertNotes(data.efilling_bichecking['notes_bichecking'], \"verifikasi_bi_checking\", status_bichecking, menu_title)\n let notes_credit_analist = innertNotes(data.efilling_ca['notes_ca'], \"verifikasi_credit_analist\", status_ca, menu_title)\n let notes_foto = innertNotes(data.efilling_foto['notes_foto'], \"verifikasi_foto\", status_foto, menu_title)\n let notes_jaminan = innertNotes(data.efilling_jaminan['notes_jaminan'], \"verifikasi_jaminan\", status_jaminan, menu_title)\n let notes_legal = innertNotes(data.efilling_legal['notes_legal'], \"verifikasi_legal\", status_legal, menu_title)\n let notes_permohonan_kredit = innertNotes(data.efilling_permohonan['notes_permohonan'], \"verifikasi_premohonan_kredit\", status_permohonan, menu_title)\n let notes_spk_ndk = innertNotes(data.efilling_spkndk['notes_spkndk'], \"verifikasi_spk\", status_spkndk, menu_title)\n let menu = ''\n if (menu_title == 'Edit') {\n menu = '_edit'\n }\n // notes innerStatusVerifikasi(status, inner data to id, menu_title)\n let verifikasi_nasabah = innerStatusVerifikasi(status_nasabah, \"verifikasi_nasabah\", menu_title)\n let verifikasi_bi_checking = innerStatusVerifikasi(status_bichecking, \"verifikasi_bi_checking\", menu_title)\n let verifikasi_credit_analist = innerStatusVerifikasi(status_ca, \"verifikasi_credit_analist\", menu_title)\n let verifikasi_foto = innerStatusVerifikasi(status_foto, \"verifikasi_foto\", menu_title)\n let verifikasi_jaminan = innerStatusVerifikasi(status_jaminan, \"verifikasi_jaminan\", menu_title)\n let verifikasi_legal = innerStatusVerifikasi(status_legal, \"verifikasi_legal\", menu_title)\n let verifikasi_permohonan_kredit = innerStatusVerifikasi(status_permohonan, \"verifikasi_premohonan_kredit\", menu_title)\n let verifikasi_spk_ndk = innerStatusVerifikasi(status_spkndk, \"verifikasi_spk\", menu_title)\n /*Notes Function menu InnerListData(data, jenis data, pathUpload, id inner data ke html, no rekening )*/\n // Data nasabah\n let nasbah_ktp = innerListData(data.efilling_nasabah['ktp'],data.efilling_nasabah['ktp_nama'], jenis_data, pathFileUpload, \"ktp_all\", no_rekening);\n let nasabah_kk = innerListData(data.efilling_nasabah['kk'], data.efilling_nasabah['kk_nama'],jenis_data, pathFileUpload, \"kartu_keluarga\", no_rekening);\n let nasbah_npwp = innerListData(data.efilling_nasabah['npwp'], data.efilling_nasabah['npwp_nama'], jenis_data, pathFileUpload, \"inp_npwp\", no_rekening);\n let nasabah_surat_nikah = innerListData(data.efilling_nasabah['surat_nikah'], data.efilling_nasabah['surat_nikah_nama'], jenis_data, pathFileUpload, \"surat_nikah\", no_rekening);\n let nasabah_surat_cerai = innerListData(data.efilling_nasabah['surat_cerai'], data.efilling_nasabah['surat_cerai_nama'], jenis_data, pathFileUpload, \"surat_cerai\", no_rekening);\n let nasabah_surat_lahir = innerListData(data.efilling_nasabah['surat_lahir'], data.efilling_nasabah['surat_lahir_nama'], jenis_data, pathFileUpload, \"surat_lahir\", no_rekening);\n let nasabah_surat_kematian = innerListData(data.efilling_nasabah['surat_kematian'], data.efilling_nasabah['surat_kematian_nama'], jenis_data, pathFileUpload, \"surat_kematian\", no_rekening);\n let nasabah_skd = innerListData(data.efilling_nasabah['skd'], data.efilling_nasabah['skd_nama'], jenis_data, pathFileUpload, \"surat_keterangan_desa\", no_rekening);\n let nasabah_slip_gaji = innerListData(data.efilling_nasabah['slip_gaji'], data.efilling_nasabah['slip_gaji_nama'], jenis_data, pathFileUpload, \"slip_gaji\", no_rekening);\n let nasabah_take_over = innerListData(data.efilling_nasabah['take_over'], data.efilling_nasabah['take_over_nama'], jenis_data, pathFileUpload, \"take_over\", no_rekening);\n let nasabah_sk_kerja = innerListData(data.efilling_nasabah['sk_kerja'], data.efilling_nasabah['sk_kerja_nama'], jenis_data, pathFileUpload, \"surat_keterangan_kerja\", no_rekening);\n let nasabah_sk_usaha = innerListData(data.efilling_nasabah['sk_usaha'], data.efilling_nasabah['sk_usaha_nama'], jenis_data, pathFileUpload, \"surat_keterangan_usaha\", no_rekening);\n let nasabah_rek_koran = innerListData(data.efilling_nasabah['rek_koran'], data.efilling_nasabah['rek_koran_nama'], jenis_data, pathFileUpload, \"rekening_koran\", no_rekening);\n let nasabah_tdp = innerListData(data.efilling_nasabah['tdp'], data.efilling_nasabah['tdp_nama'], jenis_data, pathFileUpload, \"tdp_siup\", no_rekening);\n let nasabah_bon_usaha = innerListData(data.efilling_nasabah['bon_usaha'], data.efilling_nasabah['bon_usaha_nama'], jenis_data, pathFileUpload, \"bon_usaha\", no_rekening);\n // Data permohonan kredit\n let permohonan_kredit_aplikasi = innerListData(data.efilling_permohonan['aplikasi'], data.efilling_permohonan['aplikasi_nama'], jenis_data, pathFileUpload, \"aplikasi_permohonan_kredit\", no_rekening);\n let permohonan_kredit_denah_lokasi = innerListData(data.efilling_permohonan['denah_lokasi'], data.efilling_permohonan['denah_lokasi_nama'], jenis_data, pathFileUpload, \"denah_lokasi\", no_rekening);\n let permohonan_kredit_checklist_kelengkapan = innerListData(data.efilling_permohonan['checklist_kelengkapan'], data.efilling_permohonan['checklist_kelengkapan_nama'], jenis_data, pathFileUpload, \"kelengkapan_dokumen_kredit\", no_rekening);\n // Data jaminan\n let jaminan_adendum = innerListData(data.efilling_jaminan['adendum'], data.efilling_jaminan['adendum_nama'], jenis_data, pathFileUpload, \"jaminan_addendum\", no_rekening);\n let jaminan_ahli_waris = innerListData(data.efilling_jaminan['ahli_waris'], data.efilling_jaminan['ahli_waris_nama'], jenis_data, pathFileUpload, \"jaminan_ahli_waris\", no_rekening);\n let jaminan_ajb = innerListData(data.efilling_jaminan['ajb'], data.efilling_jaminan['ajb_nama'], jenis_data, pathFileUpload, \"jaminan_ajb\", no_rekening);\n let jaminan_akta_pengakuan_hak_bersama = innerListData(data.efilling_jaminan['akta_pengakuan_hak_bersama'], data.efilling_jaminan['akta_pengakuan_hak_bersama_nama'], jenis_data, pathFileUpload, \"jaminan_pengakuan_hak\", no_rekening);\n let jaminan_apht = innerListData(data.efilling_jaminan['apht'], data.efilling_jaminan['apht_nama'], jenis_data, pathFileUpload, \"jaminan_apht\", no_rekening);\n let jaminan_bpkb = innerListData(data.efilling_jaminan['bpkb'], data.efilling_jaminan['bpkb_nama'], jenis_data, pathFileUpload, \"jaminan_bpkb\", no_rekening);\n let jaminan_cabut_roya = innerListData(data.efilling_jaminan['cabut_roya'], data.efilling_jaminan['cabut_roya_nama'], jenis_data, pathFileUpload, \"jaminan_roya\", no_rekening);\n let jaminan_fidusia = innerListData(data.efilling_jaminan['fidusia'], data.efilling_jaminan['fidusia_nama'], jenis_data, pathFileUpload, \"jaminan_fidusia\", no_rekening);\n let jaminan_imb = innerListData(data.efilling_jaminan['imb'], data.efilling_jaminan['imb_nama'], jenis_data, pathFileUpload, \"jaminan_imb\", no_rekening);\n let jaminan_pbb = innerListData(data.efilling_jaminan['pbb'], data.efilling_jaminan['pbb_nama'], jenis_data, pathFileUpload, \"jaminan_pbb\", no_rekening);\n let jaminan_pengakuan_hutang = innerListData(data.efilling_jaminan['pengakuan_hutang'], data.efilling_jaminan['pengakuan_hutang_nama'], jenis_data, pathFileUpload, \"jaminan_pengakuan_hutang\", no_rekening);\n let jaminan_sertifikat = innerListData(data.efilling_jaminan['sertifikat'], data.efilling_jaminan['sertifikat_nama'], jenis_data, pathFileUpload, \"jaminan_sertifikat\", no_rekening);\n let jaminan_sht = innerListData(data.efilling_jaminan['sht'], data.efilling_jaminan['sht_nama'], jenis_data, pathFileUpload, \"jaminan_sht\", no_rekening);\n let jaminan_skmht = innerListData(data.efilling_jaminan['skmht'], data.efilling_jaminan['skmht_nama'], jenis_data, pathFileUpload, \"jaminan_skmht\", no_rekening);\n\n // Data bi checking\n let bi_checking_hasil = innerListData(data.efilling_bichecking['hasil'], data.efilling_bichecking['hasil_nama'], jenis_data, pathFileUpload, \"view_form_hasil_bi_checking\");\n let bi_checking_persetujuan = innerListData(data.efilling_bichecking['persetujuan'], data.efilling_bichecking['persetujuan_nama'], jenis_data, pathFileUpload, \"persetujuan_bi_checking\", no_rekening);\n let bi_checking_pengajuan_bi = innerListData(data.efilling_bichecking['pengajuan_bi'], data.efilling_bichecking['pengajuan_bi_nama'], jenis_data, pathFileUpload, \"pengajuan_bi_checking\", no_rekening);\n // Data credit analist\n let credit_analist_cheklist_survey = innerListData(data.efilling_ca['cheklist_survey'], data.efilling_ca['cheklist_survey_nama'], jenis_data, pathFileUpload, \"checklist_survey\", no_rekening);\n let credit_analist_memo_ao = innerListData(data.efilling_ca['memo_ao'], data.efilling_ca['memo_ao_nama'], jenis_data, pathFileUpload, \"credit_analist_memo_ao\", no_rekening);\n let credit_analist_memo_ca = innerListData(data.efilling_ca['memo_ca'], data.efilling_ca['memo_ca_nama'], jenis_data, pathFileUpload, \"credit_analist_memo_ca\", no_rekening);\n let credit_analist_offering_letter = innerListData(data.efilling_ca['offering_letter'], data.efilling_ca['offering_letter_nama'], jenis_data, pathFileUpload, \"offering_letter\", no_rekening);\n let credit_analist_penilaian_jaminan = innerListData(data.efilling_ca['penilaian_jaminan'], data.efilling_ca['penilaian_jaminan_nama'], jenis_data, pathFileUpload, \"verifikasi_penilaian\", no_rekening);\n let credit_analist_persetujuan_kredit = innerListData(data.efilling_ca['persetujuan_kredit'], data.efilling_ca['persetujuan_kredit_nama'], jenis_data, pathFileUpload, \"persetujuan_kredit\", no_rekening);\n // Data legal\n let legal_cheklist_pengikatan = innerListData(data.efilling_legal['cheklist_pengikatan'], data.efilling_legal['cheklist_pengikatan_nama'], jenis_data, pathFileUpload, \"check_pengikatan\", no_rekening);\n let legal_lpdk = innerListData(data.efilling_legal['lpdk'], data.efilling_legal['lpdk_nama'], jenis_data, pathFileUpload, \"lpdk\",no_rekening);\n let legal_order_pengikatan = innerListData(data.efilling_legal['order_pengikatan'], data.efilling_legal['order_pengikatan_nama'], jenis_data, pathFileUpload, \"oder_pengikatan\", no_rekening);\n let legal_pengajuan_lpdk = innerListData(data.efilling_legal['pengajuan_lpdk'], data.efilling_legal['pengajuan_lpdk_nama'], jenis_data, pathFileUpload, \"pengajuan\", no_rekening);\n // Data spk & ndk\n let spk_ndk_asuransi = innerListData(data.efilling_spkndk['asuransi'], data.efilling_spkndk['asuransi_nama'], jenis_data, pathFileUpload, \"asuransi\", no_rekening);\n let spk_ndk_hal_penting = innerListData(data.efilling_spkndk['hal_penting'], data.efilling_spkndk['hal_penting_nama'], jenis_data, pathFileUpload, \"hal_penting\", no_rekening);\n let spk_ndk_hold_dana = innerListData(data.efilling_spkndk['hold_dana'], data.efilling_spkndk['hold_dana_nama'], jenis_data, pathFileUpload, \"hold_dana\", no_rekening);\n let spk_ndk_jadwal_angsuran = innerListData(data.efilling_spkndk['jadwal_angsuran'], data.efilling_spkndk['jadwal_angsuran_nama'], jenis_data, pathFileUpload, \"jadwal_angsuran\", no_rekening);\n let spk_ndk_keabsahan_data = innerListData(data.efilling_spkndk['keabsahan_data'], data.efilling_spkndk['keabsahan_data_nama'], jenis_data, pathFileUpload, \"srt_keabsahan\", no_rekening);\n let spk_ndk_personal_guarantee = innerListData(data.efilling_spkndk['personal_guarantee'], data.efilling_spkndk['personal_guarantee_nama'], jenis_data, pathFileUpload, \"personal_guarantee\", no_rekening);\n let spk_ndk_restruktur_bunga_denda = innerListData(data.efilling_spkndk['restruktur_bunga_denda'], data.efilling_spkndk['restruktur_bunga_denda_nama'], jenis_data, pathFileUpload, \"denda\", no_rekening);\n let spk_ndk_sp_authentic = innerListData(data.efilling_spkndk['sp_authentic'], data.efilling_spkndk['sp_authentic_nama'], jenis_data, pathFileUpload, \"srt_auth\", no_rekening);\n let spk_ndk_sp_beda_jt_tempo = innerListData(data.efilling_spkndk['sp_beda_jt_tempo'], data.efilling_spkndk['sp_beda_jt_tempo_nama'], jenis_data, pathFileUpload, \"srt_jth_tempo\", no_rekening);\n let spk_ndk_sp_no_imb = innerListData(data.efilling_spkndk['sp_no_imb'], data.efilling_spkndk['sp_no_imb_nama'], jenis_data, pathFileUpload, \"sp_no_imb\", no_rekening);\n let spk_ndk_sp_pendebetan_rekening = innerListData(data.efilling_spkndk['sp_pendebetan_rekening'], data.efilling_spkndk['sp_pendebetan_rekening_nama'], jenis_data, pathFileUpload, \"pendebetan_rekening\", no_rekening);\n let spk_ndk_sp_penyerahan_jaminan = innerListData(data.efilling_spkndk['sp_penyerahan_jaminan'], data.efilling_spkndk['sp_penyerahan_jaminan_nama'], jenis_data, pathFileUpload, \"srt_penyerahan_jaminan\", no_rekening);\n let spk_ndk_sp_plang = innerListData(data.efilling_spkndk['sp_plang'], data.efilling_spkndk['sp_plang_nama'], jenis_data, pathFileUpload, \"sp_plang\", no_rekening);\n let spk_ndk_spk_ndk = innerListData(data.efilling_spkndk['spk_ndk'], data.efilling_spkndk['spk_ndk_nama'], jenis_data, pathFileUpload, \"spk\", no_rekening);\n let spk_ndk_surat_aksep = innerListData(data.efilling_spkndk['surat_aksep'], data.efilling_spkndk['surat_aksep_nama'], jenis_data, pathFileUpload, \"srt_aksep\", no_rekening);\n let spk_ndk_surat_transfer = innerListData(data.efilling_spkndk['surat_transfer'], data.efilling_spkndk['surat_transfer_nama'], jenis_data, pathFileUpload, \"srt_transfer\", no_rekening);\n let spk_ndk_tt_uang = innerListData(data.efilling_spkndk['tt_uang'], data.efilling_spkndk['tt_uang_nama'], jenis_data, pathFileUpload, \"tt_uang\", no_rekening);\n let spk_ndk_spajk_spa_fpk = innerListData(data.efilling_spkndk['spajk_spa_fpk'], data.efilling_spkndk['spajk_spa_fpk_nama'], jenis_data, pathFileUpload, \"spajk_spa_fpk\", no_rekening);\n // Data foto\n let foto_ft_domisili = innerListData(data.efilling_foto['ft_domisili'], data.efilling_foto['ft_domisili_nama'], jenis_data, pathFileUpload, \"foto_domisili\", no_rekening);\n let foto_ft_jaminan = innerListData(data.efilling_foto['ft_jaminan'], data.efilling_foto['ft_jaminan_nama'], jenis_data, pathFileUpload, \"foto_jaminan\", no_rekening);\n let foto_ft_pengikatan = innerListData(data.efilling_foto['ft_pengikatan'], data.efilling_foto['ft_pengikatan_nama'], jenis_data, pathFileUpload, \"foto_pengikatan\", no_rekening);\n let foto_ft_usaha = innerListData(data.efilling_foto['ft_usaha'], data.efilling_foto['ft_usaha_nama'], jenis_data, pathFileUpload, \"foto_usaha\", no_rekening);\n}", "function cargarImagen() {\n var fileExtentionRange = '.jpg .png .jpeg';\n var MAX_SIZE = 5; // MB\n const inputFile = document.querySelector(\"#archivoAdjunto\");\n\n console.log(inputFile.files);\n\n\n $(document).on('change', '.btn-file :file', function () {\n var input = $(this);\n\n if (navigator.appVersion.indexOf(\"MSIE\") != -1) { // IE\n var label = input.val();\n\n input.trigger('fileselect', [1, label, 0]);\n } else {\n var label = input.val().replace(/\\\\/g, '/').replace(/.*\\//, '');\n var numFiles = input.get(0).files ? input.get(0).files.length : 1;\n var size = input.get(0).files[0].size;\n\n input.trigger('fileselect', [numFiles, label, size]);\n }\n });\n\n $('.btn-file :file').on('fileselect', function (event, numFiles, label, size) {\n $('#archivoAdjunto').attr('name', 'archivoAdjunto'); // allow upload.\n var postfix = label.substr(label.lastIndexOf('.'));\n if (fileExtentionRange.indexOf(postfix.toLowerCase()) > -1) {\n if (size > 1024 * 1024 * MAX_SIZE) {\n document.getElementById(\"error\").innerHTML = '<div class=\"ui error message mb-3\"><div class=\"header\">Error:</div><p>Solo se permiten archivos de ' + MAX_SIZE + ' MB o menos.</p></div>';\n document.getElementById(\"ok\").classList.add(\"disabled\");\n setTimeout(\"$('.message').transition('fade out');listar('')\", 2000);\n setTimeout(\"vaciarDiv('error')\", 2300);\n $('#attachmentName').removeAttr('name'); // cancel upload file.\n $('#_attachmentName').val(\"\");\n } else {\n if (inputFile.files && inputFile.files[0]) {\n var reader = new FileReader();\n\n reader.onload = function (e) {\n $('#previa').attr('src', e.target.result);\n }\n\n reader.readAsDataURL(inputFile.files[0]);\n }\n $('#_attachmentName').val(label);\n document.getElementById(\"ok\").classList.remove(\"disabled\");\n }\n } else {\n document.getElementById(\"errorImagen\").innerHTML = '<div class=\"ui error message mb-3\"><div class=\"header\">Error:</div><p>Solo se permiten archivos con las extensiones: ' + fileExtentionRange + '.</p></div>';\n setTimeout(\"$('.message').transition('fade out');\", 2000);\n document.getElementById(\"ok\").classList.add(\"disabled\");\n setTimeout(\"vaciarDiv('errorImagen')\", 2300);\n $('#attachmentName').removeAttr('name'); // cancel upload file.\n $('#_attachmentName').val(\"\");\n }\n });\n}", "readSingleFile(ev) {\n // verifica se existe arquivo carregado na pagina\n if(this.hasCsvOnPage) {\n // controle para esvaziar o header gerado de arquivo anteriormente carregado\n this.headerTableTarget.innerHTML = ``\n \n // controle para esvaziar a tabela gerada de arquivo anteriormente carregado \n this.bodyTableTarget.innerHTML = `` \n } \n\n // insercao do arquivo em uma variavel local file\n var file = ev.target.files[0];\n\n // verifica se existe arquivo\n if (file) { \n // leitura do arquivo carregado na pagina atraves da funcao do JS\n var readedFile = new FileReader() \n var controller = this \n\n readedFile.onload = function (e) {\n // inserir o conteudo do arquivo carreado em uma variavel global da pagina\n controller.csv = e.target.result\n // controlar se existe arquivo carregado na pagina \n controller.hasCsvOnPage = true \n // funcao que inicia o processo de quebrar o arquivo e inserir em uma tabela html\n controller.csvToTable(controller.csv) \n }\n\n // necessario no script encontrado na internet\n readedFile.readAsText(file) \n } else {\n // falha na leitura do arquivo\n console.log(\"Falha ao ler o arquivo\") \n }\n }", "function validarPeso(datos) {\n if (datos.files && datos.files[0]) {\n var pesoFichero = datos.files[0].size / 1024;\n if (pesoFichero > pesoPermitido) {\n $('#texto').text('El peso maximo permitido del fichero es: ' + pesoPermitido + ' KBs Su fichero tiene: ' + pesoFichero + ' KBs');\n return false;\n } else {\n return true;\n }\n }\n}", "_fileChanged(newValue,oldValue){if(typeof newValue!==typeof void 0){this.$.manifest.generateRequest()}}", "function choquebloques() {\n let fichas = document.getElementsByClassName('ficha');\n let bolas = document.getElementsByClassName('bola');\n for (let c = 0; c < fichas.length; c++) {\n for (let x = 0 ; x < bolas.length; x++) {\n if (((bolas[x].offsetLeft + 16) > fichas[c].offsetLeft) && (bolas[x].offsetLeft < (fichas[c].offsetLeft + fichas[c].offsetWidth))) {\n if (((bolas[x].offsetTop + 16) > fichas[c].offsetTop) && (bolas[x].offsetTop < (fichas[c].offsetTop + fichas[c].offsetHeight)) && (bolas[x].getAttribute('puedegolp') == 1)) {\n bolas[x].setAttribute('puedegolp', 0);\n bolas[x].setAttribute('velocidad', (parseFloat(bolas[x].getAttribute('velocidad')) + 0.30));\n recargabola = setTimeout(carga, 22);\n choqueficha(fichas[c], bolas[x]);\n /*calculo angulo salida choque*/\n /*activacion de buff*/\n /*desaparicion ficha*/\n\n x = bolas.length;\n }\n }\n\n }\n }\n\n\n }", "function upldOnlyFile(evt,Route,Ext,FB2ndRoute){\n\tevt.stopPropagation();\n\tevt.preventDefault();\n\n\tvar file = evt.target.files[0];\n\n\t// Prepara Metadata\n\tvar metadata = {'contentType': file.type};\n\t// Subir archivo con nombre nuevo\n\tvar uploadTask = firebase.storage().ref().child(Route+\"/\"+Ext).put(file, metadata);\n\t// Atender cambios de estado, errores, y fin de carga exitosa (almacenar URL).\n\tuploadTask.on('state_changed', function(estado) {\n\t\t// Obtener % de carga, mediante monto de bytes cargados / totales\n\t\tvar carga = (estado.bytesTransferred / estado.totalBytes) * 100;\n\t\tif(tst_logs)console.log('Cargando '+carga+'%...');\n\t\tprogBar.MaterialProgress.setBuffer(carga);\n\t\tswitch (estado.state) {\n\t\t\tcase firebase.storage.TaskState.PAUSED: // or 'paused'\n\t\t\t\tif(tst_logs)console.log('Carga Pausada!');\n\t\t\t\tbreak;\n\t\t\tcase firebase.storage.TaskState.RUNNING: // or 'running'\n\t\t\t\tif(tst_logs)console.log('Carga Corriendo...');\n\t\t\t\tbreak;\n\t\t}\n\t}, function(error) {\n\t\t// Si hay error\n\t\tconsole.error('Carga fallida:', error);\n\t\treject(error);\n\t}, function() {\n\t\tif(tst_logs)console.log('Cargados ',uploadTask.snapshot.totalBytes,'bytes.');\n\t\tprogBar.MaterialProgress.setProgress(30);\n\t\tprogBar.MaterialProgress.setBuffer(100);\n\t\tif(tst_logs)console.log(uploadTask.snapshot.metadata);\n\t\tvar url = uploadTask.snapshot.metadata.downloadURLs[0];\n\t\tvar name = uploadTask.snapshot.metadata.name;\n\t\tif(tst_logs)console.log(name+'- Archivo disponible aqui: ', url);\n\t\tprogBar.MaterialProgress.setProgress(50);\n\n\t\t// Almacenar 2da Referencia de archivos\n\t\tif(FB2ndRoute)firebase.database().ref(FB2ndRoute+\"/\"+Ext).transaction(function(current){\n\t\t\tprogBar.MaterialProgress.setProgress(90);\n\t\t\treturn url;\n\t\t}).catch(function(error){console.error(error.message);});\n\n\t\t// Almacenar Referencia de archivos\n\t\tfirebase.database().ref(Route+\"/\"+Ext).transaction(function(current){\n\t\t\tif(tst_logs)console.log(name+\"- Referencias Guardadas:\", url);\n\t\t\tprogBar.MaterialProgress.setProgress(100);\n\t\t\tsetTimeout('progBar.style.opacity=0',300);\n\t\t\treturn url;\n\t\t}).catch(function(error){console.error(error.message);});\n\n\t});\t// uploadTask\n}", "function fileChanged(){\n \n // default: fit result to screen\n $('input[name=fitToScreen]').attr('checked', true);\n fitted = true;\n \n filechanged = true;\n \n // get filename\n\tvar value = $('#fileSelection').val();\n\t\t\n // manage settings \n\tif(value != \"donothing\"){\n\t\t\n\t\treceiveCanvasContent(value);\n\t\t$('#visTag').show();\n\t\t$('#visSelect').show();\n\t\t$('#saveButton').show();\n $('#fitToScreen').show();\n $('#ftsTag').show();\n\t\t\n // manage settings dialog\n manageSettings($('#visSelect').val());\n \n receiveChanges();\n\t}\n \n // display choose dialog for available probands\n manageProbands($('#fileSelection').find('option:selected').attr('count'), true);\n}", "function validateFormPropals() {\n\n //if ( formEditConception.propals !== undefined ) {\n\n var files = document.getElementById(\"propals\").files;\n var l = files.length ;\n if (l != 3) {\n alert(\"Vous devez soumettre 3 propositions ! \" );\n document.getElementById(\"propals\").value = '' ;\n return false;\n }\n else\n {\n var resultat = false ;\n Object.keys(files).forEach(function (key){\n var blob = files[key]; \n var ex = blob.type ;\n if (ex != \"image/png\" && ex != \"image/jpeg\" )\n {\n resultat = true ;\n }\n });\n if (resultat) {\n alert(\"Les propositions doivent être au format : JPG ou PNG ! \");\n document.getElementById(\"propals\").value = \"\"\n return false; \n } \n }\n }", "function subirArchivo( archivo ) {\n openModalLoader();\n var key = vm.saveKeyUpload;\n // referencia al lugar donde guardaremos el archivo\n var refStorage = storageService.ref(key).child(archivo.name);\n // Comienza la tarea de upload\n var uploadTask = refStorage.put(archivo);\n\n uploadTask.on('state_changed', function(snapshot){\n // aqui podemos monitorear el proceso de carga del archivo\n }, function(error) {\n vm.modalLoader.dismiss();\n swal(\"¡Error al cargar!\", \"No se pudo cargar el archivo\", \"error\");\n }, function() {\n var downloadURL = uploadTask.snapshot.downloadURL;\n firebase.database().ref('rh/tramitesProceso/' + key + '/archivos').push({\n 'nombreArchivo': archivo.name,\n 'rutaArchivo': downloadURL\n }).then(function(){\n vm.modalLoadFile.dismiss();\n vm.modalLoader.dismiss();\n swal(\"¡Carga Realizada!\", \"Carga del archivo exitosa\", \"success\");\n });\n });\n }", "statFile(fileName) {\n const configs = this.configs;\n const folder = this.parent;\n this.initNode(fileName);\n this.fromFilePlainName = utils.getFilePlainName(this.fromFileName);\n this.fromFileExtension = path.extname(this.fromFileName);\n this.isHtmlFile = utils.isHtmlFile(this.fromFileExtension);\n this.isMarkdownFile = utils.isMarkdownFile(this.fromFileExtension);\n if (this.isHtmlFile) {\n configs.counterHtmlFiles.push(this);\n // Ignoring the HTML files.\n return;\n }\n if (!this.isMarkdownFile) {\n folder.pushFile(this);\n return;\n }\n this.toFilePlainName = utils.getFilePlainName(this.toFileName);\n this.toFileName = this.toFilePlainName + constants.DOT_HTML;\n this.toFilePath = path.join(folder.toFilePath, this.toFileName);\n this.setHref(this.toFileName, this.toFilePath);\n switch (this.toFilePlainName) {\n case constants.INDEX:\n configs.counterTestFileIndexFiles.push(this);\n break;\n case folder.toFileName:\n configs.counterTestFileTestFileFiles.push(this);\n break;\n default:\n configs.counterTestFolderTestFileFiles.push(this);\n break;\n }\n if (configs.noTrailingSlash) {\n // Case 1. Rendering in the no trailing slash mode.\n switch (this.toFilePlainName) {\n case folder.toFileName:\n this.toFileName = folder.toFileName + constants.DOT_HTML;\n this.toFilePath = path.join(folder.toFilePath, this.toFileName);\n // The href is useless as a list page, the same of its folder.\n this.setHref(folder.toFileName, folder.toFilePath);\n folder.setFolderPage(this);\n break;\n // case constants.README:\n case constants.INDEX:\n // index.md -> ${folder.toFileName}.html\n this.toFileName = folder.toFileName + constants.DOT_HTML;\n this.toFilePath = path.join(folder.toFilePath, this.toFileName);\n // The href is useless as a list page, the same of its folder.\n this.setHref(folder.toFileName, folder.toFilePath);\n // Set the folder page if not set yet.\n if (!folder.page) {\n folder.setFolderPage(this);\n }\n break;\n default:\n this.toFileName = this.toFilePlainName + constants.DOT_HTML;\n // Create a folder to store the html in the no-trailing-slash mode.\n this.toFolderPath = path.join(folder.toFilePath, this.toFilePlainName);\n this.toFilePath = path.join(this.toFolderPath, this.toFileName);\n // The folder is created for the document, so the href is #toFolderPath.\n this.setHref(this.toFilePlainName, this.toFolderPath);\n folder.pushFile(this);\n break;\n }\n return;\n }\n if (configs.trailingSlash) {\n // Case 2. Rendering in the trailing slash mode.\n this.toFileName = constants.INDEX_DOT_HTML;\n if (this.toFilePlainName === constants.INDEX) {\n this.toFilePath = path.join(folder.toFilePath, constants.INDEX_DOT_HTML);\n // The folder is for the document, so the href is folder#toFolderPath.\n // this.setHref(utils.addTrailingSlash(folder.toFileName), utils.addTrailingSlash(folder.toFilePath));\n // this.setHref(folder.toFileName, folder.toFilePath);\n this.setHref(folder.hrefRelative, folder.hrefAbsolute);\n folder.setFolderPage(this);\n }\n else {\n // Create a folder to store the html in the trailing-slash mode.\n this.toFolderPath = path.join(folder.toFilePath, this.toFilePlainName);\n // Render the markdown document to index.html to add a trailing slash.\n this.toFilePath = path.join(this.toFolderPath, constants.INDEX_DOT_HTML);\n // The folder is created for the document, so the href is #toFolderPath.\n this.setHref(utils.addTrailingSlash(this.toFilePlainName), utils.addTrailingSlash(this.toFolderPath));\n folder.pushFile(this);\n }\n return;\n }\n // Case 3. Rendering in the default mode.\n this.toFileName = this.toFilePlainName + constants.DOT_HTML;\n this.toFilePath = path.join(folder.toFilePath, this.toFileName);\n if (this.toFilePlainName === constants.INDEX) {\n // The folder is for the document, so the href is folder#toFolderPath.\n this.setHref(folder.hrefRelative, folder.hrefAbsolute);\n folder.setFolderPage(this);\n }\n else {\n this.setHref(this.toFileName, this.toFilePath);\n folder.pushFile(this);\n }\n }", "function seleccionarFila(campoDelFoco, noEnviarFila)\n{\n if (noEnviarFila == null) noEnviarFila=false;\n\tif (!esCampo(campoDelFoco)) return false;\n\tvar nd=buscarPadre(campoDelFoco, gId, gFila);\n var bolEnviado=true;\n gUltimoCampo = campoDelFoco.name;\n gValorCampo = valorCampo(campoDelFoco);\n if (gBolBloqueado) {\n nd=buscarHijo(gFilaActual, \"name\", campoDelFoco.name);\n seleccionarCampo(nd);\n return false;\n }\n \n gBolBloqueado=true;\n\tif (nd!=null)\n\t{\n\t\t/* Solo para el caso de que se haya cambiado de fila.\n\t\t Cambiamos el color del fondo de la fila anterior y mandamos guardar los cambios\n\t\t (si se han producido), a la vez que ocultamos la imagen de editando\n\t\t*/\n\t\tif (gFilaActual != null && nd != gFilaActual) {\n bolEnviado=deseleccionarFila();\n\t\t\tif (!bolEnviado) {\n nd=buscarHijo(gFilaActual, \"name\", campoDelFoco.name);\n seleccionarCampo(nd);\n }\n }\n\n\t\t/* Siempre que se cambie de fila y cuando no estábamos en ninguna fila anteriormente.\n\t\t Cambiamos el color de la fila en la que estamos actualmente, mostramos la imagen de\n\t\t editando y guardamos esta fila como la actual\n\t\t*/\n\t\tif (bolEnviado && (gFilaActual == null || nd != gFilaActual))\n\t\t{\n\t\t\tif (gBolEvtActivarLinea)\n\t\t\t{\n\t\t\t\tif (!alActivarLinea(campoDelFoco, nd)) {\n gBolBloqueado=false;\n\t\t\t\t\treturn false;\n }\n\t\t\t}\n\t\t\tgFilaActual = nd;\n\t\t\tif (document.layers)\n\t\t\t\tnd.bgColor = gColorSeleccionado;\n\t\t\telse\n\t\t\t\tnd.style.backgroundColor = gColorSeleccionado;\n\t\t\tnd = buscarHijo(nd,gId,gBoton);\n\t\t\tif(nd!=null)\n\t\t\t\tnd.style.visibility = \"visible\";\n\t\t}\n\t}\n\telse {\n\t\tbolEnviado=deseleccionarFila();\n if (!bolEnviado) {\n nd=buscarHijo(gFilaActual, \"name\", campoDelFoco.name);\n seleccionarCampo(nd);\n }\n }\n\t\n\t//Seleccionamos todo el campo para el caso de los textbox.\n\tif (bolEnviado && (campoDelFoco.type == \"text\" || campoDelFoco.type == \"password\"))\n\t\tcampoDelFoco.select();\n gBolBloqueado=false;\n\treturn true;\n}", "function ejecutaAccion(elemt, type, proyect ){\n\tactividadPrevia = true;\n\tborradoMultiple = false;\n\tcambiandoCategoria = false;\n\t\n\tif(!$(\"#tipoIdentificacion\").length){\n\t\t if( $(elemt).closest(\"div\").text().indexOf(\"Frente\") != (-1)) {\n\t\t\t\t$(\".cred_image:eq(0) input.custumStlFileUploadPreview\").trigger(\"click\");\n\t\t\t\t//$(\".cred_image:eq(0)\").addClass(\"opacity\"); \n\t\t\t}\n\t\t\t\t\n\t\t if( $(elemt).closest(\"div\").text().indexOf(\"Reverso\") != (-1)) {\n\t\t\t\t$(\".cred_image:eq(1) input.custumStlFileUploadPreview\").trigger(\"click\");\n\t\t\t\t//$(\".cred_image:eq(1)\").addClass(\"opacity\");\n\t\t\t} \n\t\t if( $(elemt).closest(\"div\").text().indexOf(\"Pasaporte\") != (-1)) {\n\t\t\t\t console.log($(elemt).closest(\"div\").text());\n\t\t\t\t$(\".cred_image:eq(2) input.custumStlFileUploadPreview\").trigger(\"click\");\n\t\t\t\t//$(\".cred_image:eq(2)\").addClass(\"opacity\");\n\t\t } \n\t}\n\t\n \n if($(elemt).closest(\"form\").find(\"select\").attr(\"id\") != \"type_loan\"){\n \t$(elemt).closest(\"form\").find(\"select\").val(type);\n \t$(elemt).closest(\"form\").find(\"select\").change();\n \t$(elemt).closest(\"form\").find(\"select\").blur();\n \t$(elemt).closest(\"form\").find(\".custumStlFileUploadPreview input\").trigger(\"click\");\n }\n if($(elemt).closest(\"form\").find(\"select\").attr(\"id\") == \"type_loan\" ){\n \tcambiarArchivo(type, \"#file_compIncome\", \"#rubroIngresos\");\t\n }\n \n if($(elemt).closest(\"#listCredFm2\").length ){\n \tconsole.log(\"ya entro a tipoIdentificacion\");\n \t cambiarArchivo(type, \"#file_credIdentificacion\", \"#rubroTipoIdentificacion\");\n \t//$(element).closest(\"frm_loan\").find(\".btn_comprobante[tipodoc='\"+type+\"']\");\n }\n\n}", "function previsualizar(archivo,accion){\n $.ajax({\n type:\"POST\",\n url: \"/procd/cargAut/\",\n data: {\"archivo_nom\": archivo, \"action\":accion},\n success: function(data){\n var json_data = jQuery.parseJSON(data.res);\n var cod = jQuery.parseJSON(data.cod);\n var ignorar = true;\n cargar = true;\n\n //Mostrar mensajes de error\n msg = data.msg.split(\"$\");\n for (var i=0; i<msg.length;i++){\n if (msg[i]!=\"\"){\n if (cod[i-1] === '3'){\n //Salto de numero edc\n if (idioma == 0){\n ignorar = confirm(msg[i]+\".\\nDesea ignorarlo?\");\n } else {\n ignorar = confirm(msg[i]+\".\\nDo you want to ignore it?\");\n }\n }else if (cod[i-1] === '1'){\n //Balance inicial no coincide con ult cargado (impedir carga)\n cargar = false;\n alert(msg[i]);\n\n }else{\n alert(msg[i]);\n }\n }\n };\n\n //Se checkea si el usuario ignora el salto de edc o si el archivo paso las validaciones\n if (ignorar && cargar){\n prev_edcl_j = data.res;\n prev_edcl = json_data.edcl;\n\n for (var i=0; i<json_data.edcl.length; i++){\n //json_data.edcl[i]\n var cod_cta = json_data.edcl[i].R\n var edo_cta = json_data.edcl[i].cod28c\n var pags = json_data.edcl[i].pagsBal.length\n\n if (accion === \"prevconta\"){\n prev_acc = \"cargconta\";\n var td2 = '<td> L </td>';\n }else if (accion === \"prevcorr\"){\n prev_acc = \"cargcorr\";\n var td2 = '<td> S </td>';\n }\n \n var td3 = '<td>' + edo_cta + '</td>';\n\n for (var j=0; j<pags; j++){\n\n var td1 = '<td><a edc=\"'+edo_cta+'\" index_edc=\"'+i+'\" pag=\"'+j+'\">' + cod_cta + '</a></td>';\n if (idioma == 0){\n var fechai = json_data.edcl[i].pagsBal[j].inicial.fecha.match(/.{1,2}/g).reverse().join('/');\n var fechaf = json_data.edcl[i].pagsBal[j].final.fecha.match(/.{1,2}/g).reverse().join('/');\n } else {\n var fechai = json_data.edcl[i].pagsBal[j].inicial.fecha.match(/.{1,2}/g).join('/');\n var fechaf = json_data.edcl[i].pagsBal[j].final.fecha.match(/.{1,2}/g).join('/');\n }\n //Se cambia la , por . en los montos para poder formatearlo luego\n var montoi = parseFloat(json_data.edcl[i].pagsBal[j].inicial.monto.replace(',','.'));\n var montof = parseFloat(json_data.edcl[i].pagsBal[j].final.monto.replace(',','.'));\n\n var td4 = '<td>' + (j+1) + '</td>';\n var td5 = '<td>' + json_data.edcl[i].pagsBal[j].MoFi+' '+ fechai +' '+json_data.edcl[i].pagsBal[j].inicial.DoC+' '+ $.formatNumber(montoi,{locale:idiomaAux})+'</td>';\n var td6 = '<td>' + json_data.edcl[i].pagsBal[j].MoFf+' '+ fechaf +' '+json_data.edcl[i].pagsBal[j].final.DoC+' '+ $.formatNumber(montof,{locale:idiomaAux}) +'</td>';\n \n \n $('#table-edc > tbody').append('<tr class=\"text-center\" id =\"tr-'+cod_cta+\"-\"+i+j+'\"></tr>');\n var jRow = $(\"#tr-\"+cod_cta+\"-\"+i+j).append(td1,td2,td3,td4,td5,td6);\n tabla_edc.row.add(jRow);\n }\n tabla_edc.draw();\n }\n }else{\n prev_edcl_j = undefined\n prev_edcl = undefined\n cargar = false\n }\n\n $('#processing-modal').modal('toggle');\n },\n error: function(q,error){\n alert(q.responseText) //debug\n $('#processing-modal').modal('toggle');\n if (idioma == 0){\n swal(\"Ups!\", \"Hubo un error procesando el archivo especificado.\", \"error\");\n } else {\n swal(\"Ups!\", \"Error occurred trying to process the file.\", \"error\");\n }\n },\n dataType:'json',\n headers:{\n 'X-CSRFToken':csrftoken\n }\n });\n return false;\n}", "function subirRecurso() {\n const inputFile = document.querySelector(\"#archivoAdjunto\");\n if (inputFile.files.length > 0) {\n if (navigator.appVersion.indexOf(\"MSIE\") != -1) { // IE\n var label = $(\"#archivoAdjunto\").val();\n } else {\n var label = $(\"#archivoAdjunto\").val().replace(/\\\\/g, '/').replace(/.*\\//, '');\n }\n\n var postfix = label.substr(label.lastIndexOf('.'));\n\n if ($(\"#txtTitulo\").val() == '' || $(\"#txtCat\").val() == '') {\n document.getElementById(\"error\").innerHTML = '<div class=\"ui error message mb-3\"><div class=\"header\">Error:</div><p>Por favor llene todos los campos.</p></div>';\n setTimeout(\"$('.message').transition('fade out');listar('')\", 2000);\n setTimeout(\"vaciarDiv('error')\", 2300);\n } else {\n let formData = new FormData();\n formData.append(\"Archivo\", inputFile.files[0]); // En la posición 0; es decir, el primer elemento\n formData.append(\"Extension\", postfix);\n formData.append(\"Titulo\", $(\"#txtTitulo\").val());\n formData.append(\"Categorias\", $(\"#txtCat\").val());\n fetch(\"Acciones/subirRecurso.php\", {\n method: 'POST',\n body: formData,\n })\n .then(respuesta => respuesta.text())\n .then(decodificado => {\n console.log(decodificado);\n });\n\n $('#modalRecursos').modal('hide');\n $('.second.modal').modal('show');\n }\n\n } else {\n // El usuario no ha seleccionado archivos\n document.getElementById(\"error\").innerHTML = '<div class=\"ui error message mb-3\"><div class=\"header\">Error:</div><p>Por favor seleccione un archivo.</p></div>';\n setTimeout(\"$('.message').transition('fade out');listar('')\", 2000);\n setTimeout(\"vaciarDiv('error')\", 2300);\n }\n}", "function __loadAnima() {\n var elem = document.getElementById(\"barra_progresso\");\n if (elem != null) {\n if (_loadPos == 0) _loadLen += _loadDir;\n if (_loadLen > 32 || _loadPos > 79) _loadPos += _loadDir;\n if (_loadPos > 79) _loadLen -= _loadDir;\n if (_loadPos > 79 && _loadLen == 0) _loadPos = 0;\n elem.style.left = _loadPos;\n elem.style.width = _loadLen;\n }\n}", "triggerUpdate() {\n let fileId = this.fileNode.id\n this.context.editorSession.transaction((tx) => {\n tx.set([fileId, '__changed__'], '')\n }, { history: false })\n }", "function subirFoto (event, template, anuncianteId, id) {\n\n let archivo = document.getElementById(id);\n\n if ('files' in archivo) {\n\n \n\n if (archivo.files.length == 0) {\n console.log('Selecciona una foto');\n } else if (archivo.files.length > 1) {\n console.log('Selecciona solo una foto');\n } else {\n\n\n for (var i = 0; i < archivo.files.length; i++) {\n\n var filei = archivo.files[i];\n\n var doc = new FS.File(filei);\n\n var nuevoNombre = removeDiacritics(doc.name());\n doc.name(nuevoNombre);\n\n doc.metadata = {\n anuncianteId,\n };\n\n Fotos.insert(doc, function (err, fileObj) {\n if (err) {\n console.log(err);\n } else {\n\n console.log('Foto subida');\n }\n });\n }\n }\n }\n} // Fin de la funcion subirFoto", "function prerun() \n{\n var fileUrl = \"/public/js/\";\n var fileName;\n var folderName = \"/\";\n var canRead = true;\n var canWrite = false;\n\n fileName = [\n \"Master Bank.bank\",\n \"Master Bank.strings.bank\",\n// \"Character.bank\",\n// \"Music.bank\",\n// \"UI_Menu.bank\",\n \"Vehicles.bank\",\n// \"Surround_Ambience.bank\",\n// \"VO_Menu_English.bank\",\n// \"Weapons.bank\" \n ];\n\n for (var count = 0; count < fileName.length; count++)\n {\n document.querySelector(\"#display_out2\").value = \"Loading \" + fileName[count] + \"...\";\n\n FMOD.FS_createPreloadedFile(folderName, fileName[count], fileUrl + fileName[count], canRead, canWrite);\n }\n}", "function fnc_child_cargar_valores_iniciales() {\n\n}", "VerificarPlantilla(req, res) {\n return __awaiter(this, void 0, void 0, function* () {\n let list = req.files;\n let cadena = list.uploads[0].path;\n let filename = cadena.split(\"\\\\\")[1];\n var filePath = `./plantillas/${filename}`;\n const workbook = xlsx_1.default.readFile(filePath);\n const sheet_name_list = workbook.SheetNames;\n const plantilla = xlsx_1.default.utils.sheet_to_json(workbook.Sheets[sheet_name_list[0]]);\n var contarCedulaData = 0;\n var contador_arreglo = 1;\n var arreglos_datos = [];\n //Leer la plantilla para llenar un array con los datos nombre para verificar que no sean duplicados\n plantilla.forEach((data) => __awaiter(this, void 0, void 0, function* () {\n // Datos que se leen de la plantilla ingresada\n const { nombre_empleado, apellido_empleado, cedula, descripcion, vacaciones_tomadas, fecha_inicia_periodo, fecha_fin_periodo, dias_vacacion, horas_vacacion, minutos_vacacion, dias_por_antiguedad, dias_perdidos } = data;\n let datos_array = {\n cedula: cedula,\n };\n arreglos_datos.push(datos_array);\n }));\n // Vamos a verificar dentro de arreglo_datos que no se encuentren datos duplicados\n for (var i = 0; i <= arreglos_datos.length - 1; i++) {\n for (var j = 0; j <= arreglos_datos.length - 1; j++) {\n if (arreglos_datos[i].cedula === arreglos_datos[j].cedula) {\n contarCedulaData = contarCedulaData + 1;\n }\n }\n contador_arreglo = contador_arreglo + 1;\n }\n // Cuando todos los datos han sido leidos verificamos si todos los datos son correctos\n console.log('nombre_data', contarCedulaData, plantilla.length, contador_arreglo);\n if ((contador_arreglo - 1) === plantilla.length) {\n if (contarCedulaData === plantilla.length) {\n return res.jsonp({ message: 'correcto' });\n }\n else {\n return res.jsonp({ message: 'error' });\n }\n }\n fs_1.default.unlinkSync(filePath);\n });\n }", "function ChangeFile(){\n\n var file = \"json/\" + elem.replace(\" \",\"_\") + \".json\";\n\n //si le fichier existe pas\n if (fileExists(file) == false) \n {\n // appel en ajax pour le crée \n // filename = \"json/Europe.json\"; // solution temporaire\n\n $(\"#loading\").append(\"<p> recherche en cours <img src=\\\"../picture/load.gif\\\" height=\\\"42\\\" width=\\\"42\\\" > </p> \");\n\n $.ajax({\n type: 'POST',\n url: '../main.php',\n data: 'search=' + elem,\n async:false\n });\n\n $(\"#loading\").remove();\n }\n\n filename = file;\n \n}", "function assignmentsFileChange() {\n\tvar idx = assignmentsGetCurrentIdx();\n\tif (idx == -1) return;\n\t\n\tvar filesSelect = document.getElementById(\"filesSelect\");\n\tif (filesSelect.selectedIndex == -1) return;\n\t\n\tvar currentFile = filesSelect.options[filesSelect.selectedIndex].value;\n\t\n\tfor (var j=0; j<assignments[idx].files.length; j++) {\n\t\tif (assignments[idx].files[j].filename == currentFile) {\n\t\t\t//document.getElementById('fileName').value = assignments[idx].files[j].filename;\n\t\t\tassignments[idx].files[j].binary = document.getElementById('fileBinary').checked;\n\t\t\tassignments[idx].files[j].show = document.getElementById('fileShow').checked;\n\t\t\tdocument.getElementById('assignmentChangeMessage').innerHtml = 'File changed';\n\t\t\tdocument.getElementById('assignmentChangeMessage').style.display='block';\n\t\t\tassignmentsSendToServer();\n\t\t}\n\t}\n}", "function change_file() {\n const file_button = document.getElementById(\"file-button\");\n const file_input = document.getElementById(\"file-input\");\n if(file_input.value == \"\") {\n document.getElementById(\"filename\").innerHTML = \"No .osu file selected\";\n file_button.innerHTML = \"open file\";\n file_button.className = \"mat-button mdc-button mdc-button--raised gray-button\";\n mdc.ripple.MDCRipple.attachTo(file_button);\n return false;\n }\n\n var filename = file_input.value;\n const last_index = filename.lastIndexOf(\"\\\\\");\n if (last_index >= 0) {\n filename = filename.substring(last_index + 1);\n document.getElementById(\"filename\").innerHTML = filename;\n file_button.innerHTML = \"open file\";\n file_button.className = \"mat-button mdc-button mdc-button--raised blue-button\";\n mdc.ripple.MDCRipple.attachTo(file_button);\n update_file(file_input.files[0]);\n }\n}", "set file(value) { this._file = value; }", "_onFinish(){\n this.file.findMissingChunks()\n .then((missingChunks) => {\n if(missingChunks.length===0){\n //No missingChunk\n this.file.mergeChunkFiles()\n .then(() => this.file.getFileHash())\n //CHECKING FILE_HASHCODE EQUALITY\n .then((filehash) => {\n if(filehash===this.file.hashCode){\n ///DOWNLOAD TOTALLY COMPLETED\n console.log(\"DOWNLOAD COMPLETED\")\n }else{\n //SICTIK KI NE SICTIK!\n console.log(\"Calculated HashCode !== Given HashCode\");\n }\n })\n }else{\n //SICTIK AMA COZULEBILIR!\n console.log('there are missingChunks: ',missingChunks);\n for(let chunkIndex of missingChunks){\n console.log('chunkIndex: ', chunkIndex);\n const pendingMission = new PendingMission(chunkIndex);\n this.pendingMissions.push(pendingMission);\n }\n this.continue();\n }\n });\n }", "function valutaUltima () {\n var risp = document.getElementById('textfield').value; //Ritorna il valore digitato\n var minuscolo = risp.toLowerCase(); //Trasforma la risposta in tutto minuscolo\n var nospace = minuscolo.replace(' ', ''); //Rimuove gli spazi tra le parole\n var trim = nospace.trim(); //Rimuove gli spazi prima e dopo la risposta\n var giusto = trim.localeCompare(Soluzione[oldx]); //Compara risposta data e soluzione\n \n if (giusto == 0) { //se giusto è uguale a zero (quindi le due risposte sono uguali) \n esatte++;\n monte = esatte * 3000;\n document.getElementById(\"risultato\").innerHTML = \"DOMANDA N°\" + conta + \"/10\" + \"<br>RISPOSTA CORRETTA - Montepremi: \" + monte; //stampa risposta corretta nel div con id risultato \n document.getElementById(\"textfield\").value = \"\";\n conta++;\n clearInterval(id);\n move();\n localStorage.setItem(\"rCorrette\", esatte); //Imposta il montepremi nello storage\n window.location.href=\"../riepilogo-prima-fase.html\"; //Redirect al riepilogo\n }\n \n else {\n localStorage.setItem(\"rCorrette\", esatte); //Imposta il montepremi nello storage\n window.location.href=\"../riepilogo-prima-fase.html\"; //Redirect al riepilogo\n }\n}", "function testPlanTffiChangeFile() {\n\n var parentFunc = new Function(\"object\",\n \"expect(JSON.stringify(object)==JSON.stringify(tripTFFIVersion2).toEqual(true))\");\n\n const planUtil = shallow((\n <PlanUtilities trip={startProps.trip} updateTffiObject={parentFunc}/>\n ));\n\n let actual = [];\n\n planUtil.find('#PlanTffiButtonId').map(\n (element) => actual.push(element.prop('disabled')));\n expect(actual).toEqual([true]);\n\n expect(planUtil.exists('#FileTffiInputFieldId')).toEqual(true);\n\n planUtil.find('#FileTffiInputFieldId').simulate('change', {\n target: {\n files: [new Blob([JSON.stringify(tripTFFIVersion2, null, 2)],\n {type: 'application/json'})]\n }\n });\n\n actual = [];\n planUtil.find('#PlanTffiButtonId').map(\n (element) => actual.push(element.prop('disabled')));\n expect(actual).toEqual([false]);\n}", "function contadorAtualizacaoThreads(idContadorRemainUnique){\r\n //var segundosFaltando = GM_getValue(\"quikchan_tempo_autoupdate\") - 1;\r\n $(\"#contadorThreads\").html(\"<p><i>Esta página vai se auto atualizar em <span id=\\\"contadorexibitor\\\">\"+parseInt()+\"</span> segundos...</i></p>\");\r\n var segundosFaltando = parseInt($(\"#contadorexibitor\").html());\r\n\r\n if( segundosFaltando == 0){\r\n segundosFaltando = parseInt(GM_getValue(\"quikchan_tempo_autoupdate\"));\r\n }else{\r\n segundosFaltando = segundosFaltando--;\r\n }\r\n $(\"#contadorexibitor\").html(segundosFaltando);\r\n }", "function readFile(uploader) {\n let reader = new FileReader(uploader);\n reader.readAsText(uploader.files[0], 'UTF-8');\n\n reader.onprogress = function() {\n console.log('Postęp wczytywania');\n console.log(uploader.files);\n\n };\n\n reader.onload = function() {\n let tekst=reader.result;\n // document.getElementById('editor').innerHTML = tekst;\n\n //var effect=transform2(tekst); //przekształcenie tekstu na obiekt-tabele\n //console.log( \"obiekt: \", effect);\n retTypeChar();\n transform(tekst);\n console.log(\"kolumny: \",arrayColumn,\"\\n\",\" wartości: \",arrayRow);\n setColumnAndFilter();\n setSortValue();\n showData();\n //setFilter(); UWAGA\n document.getElementById(\"selectChar\").style.display=\"block\";\n\n };\n\n reader.onerror = function() {\n alert('Błąd wczytywania pliku!');\n };\n}", "function descargar_doc(){\n //validamos que este en la ultima pagina puede descargar\n /* if (document.getElementById(\"pageNumber\").value != document.getElementById(\"pageNumber\").getAttribute(\"max\") && verifi_time_dowload == false) {\n alert (\"para Poder descarga debe bajar hasta la ultima pagina\" );\n return;\n }else{\n verifi_time_dowload = true;\n }*/\n\n //validacion regla de los segundo\n if (verifi_time_dowload == false){\n alert (\"para Poder descarga debe esperar \" + (rule_time_dowload / 1000) + \" segundos\" );\n return;\n }\n\n\n}" ]
[ "0.5751988", "0.5737984", "0.57237184", "0.56594044", "0.56232226", "0.5618416", "0.5593088", "0.55860615", "0.5568662", "0.5539805", "0.55139136", "0.5505049", "0.5493453", "0.5454991", "0.5454208", "0.5436474", "0.54314744", "0.54243207", "0.54183614", "0.5368884", "0.5358614", "0.5355027", "0.53076816", "0.53041846", "0.53037316", "0.52885455", "0.52791023", "0.52632177", "0.5253702", "0.52484137", "0.52374905", "0.5218259", "0.51945156", "0.51856166", "0.51673657", "0.51649386", "0.51507956", "0.5150511", "0.51505095", "0.5145065", "0.5140221", "0.5139654", "0.5123337", "0.5115064", "0.51127124", "0.5105968", "0.5083687", "0.5072629", "0.5071027", "0.5068893", "0.5041557", "0.50351065", "0.503294", "0.5030232", "0.50299287", "0.5016092", "0.50132924", "0.5003229", "0.4991714", "0.49908662", "0.4985351", "0.4982774", "0.49658874", "0.49604976", "0.4957189", "0.4955036", "0.4949572", "0.49475977", "0.4943547", "0.4942119", "0.49328056", "0.49319106", "0.49285692", "0.4927757", "0.4926648", "0.49161193", "0.49024203", "0.4898594", "0.48931926", "0.48918614", "0.4885139", "0.48840255", "0.48805103", "0.48764813", "0.48732078", "0.48656464", "0.48633966", "0.4860957", "0.48601562", "0.48589486", "0.4855849", "0.48556787", "0.48547918", "0.48526943", "0.48523924", "0.48501745", "0.484853", "0.48451266", "0.48441002", "0.48440075", "0.48433518" ]
0.0
-1
Performs actual calculations to verify the 'armstrongness' of the input and outputs result to the user
function checkValue(val) { let output = 0; for (const char of val) { output += Math.pow(char, 3); } if (output == val) { return true || false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CalculateResults()\r\n {\r\n var inputsAllValid;\r\n\r\n // Fetch all input values from the on-screen form.\r\n\r\n inputsAllValid = FetchInputValues();\r\n\r\n // If the fetched input values are all valid...\r\n\r\n if (inputsAllValid)\r\n {\r\n // Do the natural gas pressure loss calculation.\r\n\r\n DoCalculation();\r\n\r\n // Display the results of the calculation.\r\n\r\n DisplayResults();\r\n }\r\n }", "function armstr()\r\n{\r\nvar arm=0,a,b,c,d,num;\r\nnum=Number(document.getElementById(\"no_input\").value);\r\n\r\ntemp=num;\r\nwhile(temp>0)\r\n{\r\na=temp%10;\r\ntemp=parseInt(temp/10);\r\narm=arm+a*a*a;\r\n}\r\nif(arm==num)\r\n{\r\nalert(\"Armstrong number\");\r\n}\r\nelse\r\n{\r\nalert(\"Not Armstrong number\");\r\n}\r\n}", "function verify_result() {\n grid_end_time = Date.now();\n trial.grid_rt = grid_end_time - grid_start_time;\n\n document.getElementById(\"Verify_Test\").disabled = true;\n var index, tile_value, num_wrong=0;\n\n // count how many of user_input are hits, misses, false alarms\n // var hits=0, false_alarms=0, misses=0;\n for (var i = 0; i < user_input_tile_ids.length; i++) {\n tile_value = Number(user_input_tile_ids[i]);\n index = generated_tile_ids.indexOf(tile_value);\n\n if (index < 0) {\n trial.false_alarms += 1;\n } else {\n trial.hits += 1;\n }\n }\n trial.misses = generated_tile_ids.length - trial.hits;\n\n num_wrong = Math.max(trial.misses, trial.false_alarms);\n if (num_wrong == 0) {\n verdict = 'Right';\n change_score(1);\n } else if (num_wrong == 1) {\n verdict = 'Almost';\n change_score(0.5);\n } else {\n verdict = 'Not Quite';\n change_score(0);\n }\n\n ////////// display Right Almost or Wrong\n // purge everything except input_verdict\n // if (trial.cognitive_loading) {\n // jsPsych.pluginAPI.setTimeout(function() {\n // display_element.querySelector('#debriefing').style.display = 'none';\n // }, 0);\n jsPsych.pluginAPI.setTimeout(function() {\n display_element.querySelector('#board').style.display = 'none';\n }, 0);\n jsPsych.pluginAPI.setTimeout(function() {\n display_element.querySelector('#board-grid-text').style.display = 'none';\n }, 0);\n jsPsych.pluginAPI.setTimeout(function() {\n display_element.querySelector('#Verify_Test').style.display = 'none';\n }, 0);\n // jsPsych.pluginAPI.setTimeout(function() {\n // display_element.querySelector('#jspsych-html-button-response-prompt').style.display = 'none';\n // }, 0);\n // jsPsych.pluginAPI.setTimeout(function() {\n // display_element.querySelector('#jspsych-html-button-response-rating').style.display = 'none';\n // }, 0);\n // jsPsych.pluginAPI.setTimeout(function() {\n // display_element.querySelector('#verdict').style.display = 'block';\n // }, 0);\n // }\n //\n document.getElementById('input_verdict').innerHTML = verdict ;//+ \"<br/>score: \" + num_correct + \"<br/>num_total: \" + num_total;\n\n jsPsych.pluginAPI.setTimeout(end_trial, 1000); //verdict_feedback_time\n }", "function runMath() {\n console.log(\n input_diameter1.value, input_diameter1.flag + \"\\n\",\n input_diameter2.value, input_diameter2.flag + \"\\n\",\n input_lateral.value, input_lateral.flag\n ) \n if(input_diameter1.flag && input_diameter2.flag && input_lateral.flag) {\n // frustumMath(),\n mockMath(); \n } \n else console.log(\"fnx: runMath Failed\");\n }", "function calculateResult()\n{\n\ttry {\n\t\t//eval(string) will work for */+- (https://www.w3schools.com/jsref/jsref_eval.asp)\n\t\tvar input = eval(document.calculator.resultbox.value);\n\n\t\tdocument.calculator.resultbox.value=input;\n\t} catch(err)\n\t{\n\t\tdocument.calculator.resultbox.value=\"Err\";\n\t}\n}", "function compute()\n{\n\ttry {\n\t\tvar input_var=document.getElementById('input');\n\t\tans=Math.floor(+eval(input_var.value));\n\t\tdocument.getElementById('answer').value=+ans;\n \n\t\t}\n\tcatch(err) {\n\t\tdocument.getElementById('answer').value = \"Invalid Input\";\n\t}\n}", "function exam(a)\r\n{\r\n //solving fexam\r\nlet fexam = (60/100)*a\r\n//allowing access to fexam result\r\nreturn fexam\r\n\r\n}", "function calculateResistanceCallback() {\n \n // get inputs from the DOM\n \n var current = document.getElementById(\"current\").value;\n var voltage = document.getElementById(\"voltage\").value;\n \n // sanitize inputs\n \n current = parseFloat(current);\n voltage = parseFloat(voltage);\n \n // verify inputs\n \n if (isNaN(current) === true || isNaN(voltage) === true) {\n alert(\"Hommie don't do that!\");\n return;\n }\n \n // use the worker function and get th output\n \n var resistance = calculateResistance(current, voltage);\n \n //do something \"usefull\" -i.e., display the answer\n \n document.getElementById(\"outputArea\").innerHTML = \"resistance =\" + resistance; \n}", "function woodCalculator(value1, value2, value3) {\n var totalResult = 0;\n if (value1 > 0 && value2 > 0 && value3 > 0) {\n var chair = value1 * 1;\n var table = value2 * 3;\n var bed = value3 * 5;\n totalResult = chair + table + bed;\n // return totalResult;\n }\n else {\n // var negativeResult = console.log('Negative value is not accepted');\n // totalResult = negativeResult;\n console.log('Negative value is not accepted')\n }\n return totalResult;\n}", "function equal(input) {\r\n let [a = 0, opTemp = '+', b = 0] = input;\r\n let aTemp = Number(a);\r\n let bTemp = Number(b);\r\n\r\n // if (!(total == 'null')) {\r\n // aTemp = total;\r\n // }\r\n if (opTemp == '+') {\r\n result = aTemp + bTemp;\r\n }\r\n\r\n if (opTemp == '-') {\r\n result = aTemp - bTemp;\r\n }\r\n\r\n if (opTemp == '/') {\r\n if (bTemp == 0) {\r\n result = 'Error';\r\n } else {\r\n result = aTemp / bTemp;\r\n }\r\n }\r\n\r\n if (opTemp == '*') {\r\n result = aTemp * bTemp;\r\n }\r\n output.value = result;\r\n outputMath.splice(0);\r\n //handling division by 0\r\n if (result == 'Error') {\r\n outputMath.splice(0);\r\n index = 0;\r\n } else {\r\n outputMath[0] = result;\r\n }\r\n tmpValue = '';\r\n // console.log(` [${outputMath}] - tmp: ${tmpValue} - index: ${index}`);\r\n}", "function calc(){\r\n\"use strict\";\r\nnumPFail = (numFail/numTotalRuns)*100;\r\nnumP0 = (num0/numTotalRuns)*100;\r\nnumP1 = (num1/numTotalRuns)*100;\r\nnumP2 = (num2/numTotalRuns)*100;\r\nnumP3 = (num3/numTotalRuns)*100;\r\nnumP4 = (num4/numTotalRuns)*100;\r\nnumP5 = (num5/numTotalRuns)*100;\r\nnumRatePSB = numTotalPSB/numTotalRuns;\r\nnumRateRML = numTotalRML/numTotalRuns;\r\n}", "function doLogic() {\n \"use strict\";\n // Here we snatch values from the answer box....\n var Formula = document.getElementById(\"answerBox\").value;\n // Evaluate the formula....\n var Result = eval(\"(\" + Formula + \")\");\n // Display results!\n li(Result);\n\n // Check and handle any errors that occur during formula evaluation.\n if (answerBox.value === \"undefined\") {\n document.getElementById(\"answerBox\").value = \"Syntax Error\";\n }\n if (answerBox.value === \"NaN\") {\n document.getElementById(\"answerBox\").value = \"Not Possible!\";\n }\n}", "function calculateResults() {\n //UI vars\n const height = document.querySelector('#height').value;\n const weight = document.querySelector('#weight').value;\n const age = document.querySelector('#age').value;\n const sex = document.querySelector('#sex').value;\n const activity = document.querySelector('#activity').value;\n\n //Output vars\n const dailyCalorieRequirements = document.querySelector('#dailyCalorie');\n const daliyProteinIntake = document.querySelector('#dailyProtein');\n const dailyCarbsIntake = document.querySelector('#dailyCarbs');\n const dailyFatIntake = document.querySelector('#dailyFat');\n\n //calculating basal metabolic rate\n const bmr = ((10 * weight) + (6.25 * height) - (5 * age)) + parseFloat(sex);\n \n if (isFinite(bmr)) {\n let dailyCalorie = bmr * parseFloat(activity);\n dailyCalorieRequirements.value = Math.round(dailyCalorie);\n daliyProteinIntake.value = getAmountOfMacronutrient(dailyCalorieRequirements.value, 25, 'p');\n dailyCarbsIntake.value = getAmountOfMacronutrient(dailyCalorieRequirements.value, 35, 'c');\n dailyFatIntake.value = getAmountOfMacronutrient(dailyCalorieRequirements.value, 40, 'f');\n displayResults();\n hideLoading();\n displayMacrosRatioChart();\n } else {\n showError('Please check your numbers');\n }\n}", "function runProgram(input) {\n let [n, r] = input.split(\" \").map(Number);\n // console.log(\"n, r\", n, r)\n let sum = 0;\n\n for ( let i = 0; i < n; ++i ) {\n sum = sum + (1 / r ** i)\n }\n console.log(sum.toFixed(4))\n}", "function calculate_score() {\n resetError();\n consoleLogInputs();\n if(checkAllErrors()) {\n printAllGradeNeeded();\n }\n}//runs all the important stuff!!!!!!!", "function calculateResult(array) {\n let answer1 = array[0] * 12;\n let answerModified = turnToNumber(1);\n console.log(\"answerModified\", answerModified);\n let answer2 = (answer1 * answerModified) / 100 + answer1;\n console.log(\"answer2\", answer2);\n let terminalValue = answer2 * 2;\n console.log(\"treminalValue\", terminalValue);\n let postMV = terminalValue / 20;\n console.log(\"postMV\", postMV);\n let preMV = postMV - array[0];\n console.log(\"preMV\", preMV);\n let answerThreeModified = turnIndexToNumber(2);\n let answer3 = (answerThreeModified * 30) / 10000;\n console.log(\"answer3\", answer3);\n let answerFourModified = turnIndexToNumber(3);\n let answer4 = (answerFourModified * 25) / 10000;\n let answerFiveModified = turnIndexToNumber(4);\n let answer5 = (answerFiveModified * 15) / 10000;\n let answerSixModified = turnIndexToNumber(5);\n let answer6 = (answerSixModified * 10) / 10000;\n let answerSeventhModified = turnIndexToNumber(6);\n let answer7 = (answerSeventhModified * 10) / 10000;\n // //figure out how to make it prettier\n let answer81 = (answerSeventhModified * 100) / array[0];\n let answer8 = (answer81 * 5) / 10000;\n let answer9 = (array[8] * 5) / 10000;\n let sumOfFactors =\n answer3 + answer4 + answer5 + answer6 + answer7 + answer8 + answer9;\n let preFinalResult = sumOfFactors * preMV;\n //this is THE RESULT\n let finalResult = parseFloat(preFinalResult.toFixed(2));\n // console.log(\"sumOfFactors\", sumOfFactors)\n return finalResult;\n}", "function doSqrt() \n{\n\tvar input2 = document.calculator.resultbox.value;\n\n\ttry {\n\t\tvar result2 = Math.sqrt(input2);\n\n\t\tdocument.calculator.resultbox.value = result2;\n\t} catch (err)\n\t{\n\t\tdocument.calculator.resultbox.value=\"Err\";\t\t\n\t}\n\n}", "function checkMath() {\n var answer, text;\n\n // Takes the checked value and the answer to see if they are true\n answer = document.getElementById(\"numb\").value;\n\n // If answer is between 5 psi on either side of totalFriction\n if (answer == totalFriction() ||\n answer == totalFriction() - 5 ||\n answer == totalFriction() + 5 ||\n answer == totalFriction() - 4 ||\n answer == totalFriction() + 4 ||\n answer == totalFriction() - 3 ||\n answer == totalFriction() + 3 ||\n answer == totalFriction() - 2 ||\n answer == totalFriction() + 2 ||\n answer == totalFriction() - 1 ||\n answer == totalFriction() + 1)\n {\n text = \"This is the correct PSI\";\n } else {\n text = \"Nope, remember your training my young padawan!\";\n };\n document.getElementById(\"demo\").innerHTML = text;\n }", "function calculate()\n {\n if (operator == 1)\n {\n current_input = eval(memory) * eval(current_input);\n };\n if (operator == 2)\n {\n current_input = eval(memory) / eval(current_input);\n // If divide by 0 give an ERROR message\n var initial_value = current_input.toString();\n if (initial_value == \"Infinity\")\n {\n current_input = \"ERROR\"\n };\n };\n if (operator == 3)\n {\n current_input = eval(memory) + eval(current_input);\n };\n if (operator == 4)\n {\n current_input = eval(memory) - eval(current_input);\n };\n if (operator == 5)\n {\n current_input = Math.pow(eval(memory), eval(current_input));\n };\n operator = 0; //clear operator\n memory = \"0\"; //clear memory\n displayCurrentInput();\n }", "function Armstrong(number){\n let digit=0;\n for(i=0;i<number.length;i++){\n digit += Number(number[i]*number[i]*number[i]);\n }\n if(digit == number){\n return \"Armstrong\";\n }\n else{\n return \"not Armstrong\";\n }\n}", "async showResult() {\n const rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n });\n\n const question = (str) => new Promise(resolve => rl.question(str, resolve));\n const steps = {\n start: async() => {\n console.log(\"Welcome to the bitmap distance app\")\n },\n getAmount: async() => {\n const amount = async() => {\n const answer = await question(\"Input the number of bitmaps: \");\n\n if (!Number(answer)) {\n console.error(\"Incorrect amount. The value must be a number\");\n return await amount();\n }\n\n return answer;\n };\n\n return await amount();\n },\n getWidth: async() => {\n const width = async() => {\n const answer = await question(\"Input the bitmap width: \");\n\n if (!Number(answer)) {\n console.error(\"Incorrect width. The value must be a number\");\n return await width();\n }\n\n return answer;\n };\n\n return await width();\n },\n getHeight: async() => {\n const height = async() => {\n const answer = await question(\"Input the bitmap height: \");\n\n if (!Number(answer)) {\n console.error(\"Incorrect height. The value must be a number\");\n return await height();\n }\n\n return answer;\n };\n\n return await height();\n },\n getGenerationWay: async() => {\n const generationWay = async() => {\n const answer = Number(await question(`Do you want the data to be generated randomly\n or by input? (0 - input, 1 - random): `));\n\n if (!this._isValidData(answer)) {\n console.error(\"Incorrect answer. The value must be either 0 or 1\");\n return await generationWay();\n }\n\n return answer;\n };\n\n return await generationWay();\n }\n };\n\n steps.start();\n let amount = await steps.getAmount();\n let width = await steps.getWidth();\n let height = await steps.getHeight();\n const generationWay = Number(await steps.getGenerationWay(amount, width, height));\n\n generationWay === 0\n ? this._getInputBitmaps(amount, width, height)\n : this._getGeneratedBitmaps(amount, width, height);\n\n }", "function fnal()\r\n{\r\n //invocking exam and crsmark, assigning parameters to variable with name fmark.\r\n //solving for fmark \r\nlet fmark = exam(75)+crsmark(40)\r\n//posting the fmark results to the browser's console\r\nconsole.log(fmark)\r\n\r\n}", "function checkMath2() {\n var answer, text;\n\n // Get the value of the input field with id=\"numb-2\"\n answer = document.getElementById(\"numb-2\").value;\n\n // Will return true if answer is 5 psi above or below the answer\n if (answer == totalFriction2() ||\n answer == totalFriction2() - 5 ||\n answer == totalFriction2() + 5 ||\n answer == totalFriction2() - 4 ||\n answer == totalFriction2() + 4 ||\n answer == totalFriction2() - 3 ||\n answer == totalFriction2() + 3 ||\n answer == totalFriction2() - 2 ||\n answer == totalFriction2() + 2 ||\n answer == totalFriction2() - 1 ||\n answer == totalFriction2() + 1) {\n text = \"This is the correct PSI\";\n } else {\n text = \"Nope, remember your training my young padawan!\";\n };\n document.getElementById(\"demo-2\").innerHTML = text;\n}", "checkResult() {\n const MAX_ANSWERS_LENGTH = 10;\n if (this.model.isDead()) {\n this.loose();\n } else if (this.model.defineAnswersLength() === MAX_ANSWERS_LENGTH) {\n this.win();\n } else {\n this.startGame();\n }\n }", "function woodCalculator (chair, table, bed) {\n if(chair < 0 || table < 0 || bed < 0) {\n return \"haha! you cannot make me fool... Give the correct input.\"\n }\n else {\n var totalNeededWood = (chair*1) + (table*3) + (bed*5);\n return \"You need \"+ totalNeededWood+ \" Cubic Fit of wood\";\n }\n\n}", "function budgetCalculator(clock,phone,laptop){\n var clockPrice = 150;\n var phonePrice = 200;\n var laptopPrice = 500;\n \n if(clock<0){ //conditions for error message\n return \"Your Clock Number is Negative. Please Input a Valid Number!\";\n }\n if(phone<0){\n return \"Your Phone Number is Negative. Please Input a Valid Number!\";\n }\n if(laptop<0){\n return \"Your Laptop Number is Negative. Please Input a Valid Number!\";\n }\n else{ //main conditions\n if(clock >= 0){\n var clockCost = clock * clockPrice; \n }\n if(phone >= 0){\n var phoneCost = phone * phonePrice; \n }\n if(laptop >= 0){\n var laptopCost = laptop * laptopPrice;\n }\n }\n return clockCost+phoneCost+laptopCost;\n}", "function anotherCalculation() {\n languageChoice();\n languageChecks('another operation');\n answer = readline.question();\n if (answer.toLowerCase() === 'yes' || answer.toLowerCase() === 'si') {\n firstNumber();\n secondNumber();\n operation();\n result();\n languageChecks('result');\n console.log(output);\n anotherCalculation();\n } else if (answer.toLowerCase() === 'no') {\n prompt('OK');\n // eslint-disable-next-line no-constant-condition\n } else if (answer.toLowerCase() !== 'yes' || 'no' || 'si') {\n prompt(\"Please answer 'yes', 'no' 'si'\");\n anotherCalculation();\n }\n}", "function getResult() {\n console.log(\"getResult ran\");\n wrong = total - correct;\n $(\"#end_total_right b\").text(correct);\n $(\"#end_total_wrong b\").text(wrong);\n var answer_percent = correct / total;\n if (answer_percent >= 0.67) {\n $(\"#end\").prepend(responses[0]);\n } else if (answer_percent >= 0.34) {\n $(\"#end\").prepend(responses[1]);\n } else {\n $(\"#end\").prepend(responses[2]);\n }\n }", "function calculate() {\n if (validateInputs()) {\n if ($age.val() > 110) {\n $calcResultsBox.removeClass(\"hidden\").html(\"<span style='color:red'>Invalid Age</span>\");\n } else if (($weight.val() > 600 && imperial) || ($weight.val() > 270 && !imperial)) {\n $calcResultsBox.removeClass(\"hidden\").html(\"<span style='color:red'>Invalid Weight</span>\");\n } else if (imperial) { // calculation if imperial units\n if ($heightInputIn.val() > 12) {\n inchesConvert();\n }\n var BMR = Math.round(calculateBMR());\n var TDEE = Math.round(calculateBMR() * 1.2);\n var BMI = calculateBMI();\n $calcResultsBox.removeClass(\"hidden\").html(\n \"To lose \" + $slider.slider(\"value\") + \" lb per week, you would need to eat \" + Math.round((TDEE - 500 * $slider.slider(\"value\"))) + \"* kcal per day (not including exercise).<br/><br/>BMR: \" + BMR + \" kcal<br/>TDEE: \" + TDEE + \" kcal<br/>BMI: \" + BMI + \"</td><br/><br/>* Eating less than 1200 kcal daily is not recommended.\");\n } else {\n // calculation if metric units\n var BMR = Math.round(calculateBMR());\n var TDEE = Math.round(calculateBMR() * 1.2);\n var BMI = calculateBMI();\n $calcResultsBox.removeClass(\"hidden\").html(\n \"To lose \" + $slider.slider(\"value\") + \" kg per week, you would need to eat \" + Math.round((TDEE - 1102 * $slider.slider(\"value\"))) + \"* kcal per day (not including exercise).<br/><br/>BMR: \" + BMR + \" kcal<br/>TDEE: \" + TDEE + \" kcal<br/>BMI: \" + BMI + \"</td><br/><br/>* Eating less than 1200 kcal daily is not recommended.\");\n }\n } else\n $calcResultsBox.removeClass(\"hidden\").html(\"<span style='color:red'>Please fill in all fields.</span>\");\n }", "function solve()\r\n{\r\n let x = document.getElementById(\"input\").value;\r\n document.getElementById(\"input\").value = eval(x);\r\n document.getElementById(\"result\").value = eval(x);\r\n\r\n if(x == 0)\r\n {\r\n document.getElementById(\"input\").value = \"\";\r\n document.getElementById(\"result\").value = \"\";\r\n }\r\n}", "function calculate() {\n if (operator == 1) {\n current_input = eval(memory) * eval(current_input);\n }\n if (operator == 2) {\n if (eval(current_input) == 0) {\n current_input = \"undefined\";\n }\n else {\n current_input = eval(memory) / eval(current_input);\n }\n }\n if (operator == 3) {\n current_input = eval(memory) + eval(current_input);\n }\n if (operator == 4) {\n current_input = eval(memory) - eval(current_input);\n }\n if (operator == 5 && current_input < 0) {\n var power_of = -1 * eval(current_input);\n var base = eval(memory);\n var final = 1;\n for (i = 0; i < power_of; i++) {\n final = final * base;\n console.log(base + \"^\" + (i + 1) + \" = \" + final);\n }\n current_input = 1 / final;\n }\n else if (operator == 5) {\n var power_of = eval(current_input);\n var base = eval(memory);\n var final = 1;\n for (i = 0; i < power_of; i++) {\n final = final * base;\n console.log(base + \"^\" + (i + 1) + \" = \" + final);\n }\n current_input = final;\n }\n operator = 0; //clear operator\n memory = \"0\"; //clear memory\n displayCurrentInput();\n}", "function calculating (num1,num2){\n\n\n\t// Compruebo si los dos numeros han sido validados como tales y en caso afiramtivo los calculo\n\tif (numberValidation(num1) == true && numberValidation(num2) == true) {\n\n\t\t\tresultsA[0] = Number(num1) + Number(num2)\n\t\t\tresultsA[1] = num1 - num2\n\t\t\tresultsA[2] = num1 / num2\n\t\t\tresultsA[3] = num1 * num2\n\n\t\t\tconsole.log('Suma: ' + decimalComprobation(resultsA[0]) + '.');\n\t\t\tconsole.log('Resta: ' + decimalComprobation(resultsA[1]) + '.');\n\t\t\tconsole.log('Division: ' + decimalComprobation(resultsA[2]) + '.');\n\t\t\tconsole.log('Multiplication: ' + decimalComprobation(resultsA[3]) + '.');\n\n\n\t//Ahora hago la validacion para primer numero\n\t} else if (numberValidation(num1) == true) {\n\t\t\n\t\t\tresultsB[0] = Math.sqrt(num1);\t\n\t\t\tconsole.log('Square root of first number is: ' + decimalComprobation(resultsB[0]))\t\t\n\n\t// Ahora la el segundo\n\t} else if (numberValidation(num2) == true) {\n\n\t\t\tresultsB[1] = Math.sqrt(num2);\n\t\t\tconsole.log('Square root of second number is: ' + decimalComprobation(resultsB[1]))\n\n\t//Si ninguno de los valores pasan la validacion, salta el mensaje que pide introducir numeros!\n\t} else {\n\n\t\t\talert('Please, use only numbers!');\n\t}\n}", "function solution() {\n\tvar nums = input.split('-');\n\tvar ans = calculator(nums[0]);\n\tfor(var i=1; i<nums.length; i++) {\n\t\tans -= calculator(nums[i]);\n\t}\n\tconsole.log(ans);\n}", "function budgetCalculator(clock, phone, laptop) {\r\n if(clock < 0 || phone < 0 || laptop < 0){\r\n var errorText = \"-Number are not allowed\"\r\n return errorText;\r\n }\r\n else{\r\n var total = clock * 50 + phone * 100 + laptop * 500;\r\n return total\r\n }\r\n\r\n}", "function Calculate() {\n var a, b, h, myResult;\n\n a = document.getElementById('a').value;\n b = document.getElementById('b').value;\n h = document.getElementById('h').value;\n myResult = ((+a + +b) / 2) * +h ;\n\n document.getElementById('out').innerHTML = myResult;\n}", "function budgetCalculator(watch,phone,laptop){\n if((watch<0)||(phone<0)||(laptop<0)){\n return \"empty number does not accepted any quary!\";\n }\n else{\n\n var result1 = watch*50;\n var result2 = phone*100;\n var result3 = laptop*500;\n var total = result1 +result2 +result3;\n }\n return total;\n}", "function calculate() {\n\t'use strict';\n\n// For storing the volume:\nvar volume;\n\n// Get a reference to the form value:\nvar length = document.getElementById('length').value;\nvar width = document.getElementById('width').value;\nvar height = document.getElementById('height').value;\n\nif (length != 'number' || width != 'number' || height != 'number')\nalert(\"Error! please enter a numeric value!\");\n\t\n//Chapter 12 Bulliet List question 4 - checking if it's postiive\n// Make sure it's positive:\nif (length > 0 && width > 0 && height > 0)\n// Perform the calculation:\nvolume = length * width * height;\nelse\nalert(\"Error! Please enter a positive value.\");\n\n// Format the volume:\nvolume = volume.toFixed(2);\n\n// Display the volume:\ndocument.getElementById('volume').value = volume;\n\n// Return false to prevent submission:\nreturn false;\n}", "static test04() {\n let cal = new Calc();\n cal.receiveInput(2);\n cal.receiveInput(Calc.OP.DIV);\n cal.receiveInput(7);\n cal.receiveInput(Calc.OP.EQ);\n return cal.getDisplayedNumber() === 2 / 7;\n }", "function evaluate(){\n\t//retreive string value from HTML element\n\tvar inputScreen = document.querySelector('.screen');\n\tvar radix = 10;\n\tvar selectorHex = document.getElementById(\"hexidecimal\");\n\tvar selectorBinary = document.getElementById(\"binary\");\n\tif (selectorHex.classList.contains(\"selected\")){\n\t\tradix = 16;\n\t}\n\telse if (selectorBinary.classList.contains(\"selected\")){\n\t\tradix = 2;\n\t}\n\n\t//check if addition\n\tif (inputScreen.innerHTML.contains(\"+\")){\n\t\tvar elems = inputScreen.innerHTML.split(\"+\");\n\t\tvar result = add(elems[0],elems[1],radix);\n\t\tinputScreen.innerHTML = result.toString(radix).toUpperCase();\n\t}\n\t//check if multiplication\n\telse if(inputScreen.innerHTML.contains(\"*\")){\n\t\tvar elems = inputScreen.innerHTML.split(\"*\");\n\t\tvar result = mult(elems[0],elems[1],radix);\n\t\tinputScreen.innerHTML = result.toString(radix).toUpperCase();\n\t}\n\t//check if divide \n\telse if(inputScreen.innerHTML.contains(\"/\")){\n\t\tvar elems = inputScreen.innerHTML.split(\"/\");\n\t\t//allert if divide by 0 but still evaluated\n\t\tif (elems[1] == 0) {\n\t\t\twindow.alert(\"Error: divide by 0.\");\n\t\t}\n\t\tvar result = divide(elems[0],elems[1],radix);\n\t\tinputScreen.innerHTML = result.toString(radix).toUpperCase();\n\t}\n\t//check if exponent\n\telse if(inputScreen.innerHTML.contains(\"^\")){\n\t\tvar elems = inputScreen.innerHTML.split(\"^\");\n\t\tvar result = exponent(elems[0],elems[1],radix);\n\t\tinputScreen.innerHTML = result.toString(radix).toUpperCase();\n\t}\n\t//check if modulous\n\telse if(inputScreen.innerHTML.contains(\"%\")){\n\t\tvar elems = inputScreen.innerHTML.split(\"%\");\n\t\tvar result = modulus(elems[0],elems[1],radix);\n\t\tinputScreen.innerHTML = result.toString(radix).toUpperCase();\n\t}\n\t//checkif subtraction and dealing with negative numbers\n\telse if(inputScreen.innerHTML.contains(\"-\")){\n\t\tvar elems = inputScreen.innerHTML.split(\"-\");\n\t\t//split leaves empty spaces with first preceding \"-\" and concecutive \"-\"\n\t\t//appends \"-\" to elements proceding an empty space denoting a negative number\n\t\tfor (var i = 0; i< elems.length;i++){\n\t\t\tif (elems[i].length == 0 && elems[i+1].length != 0){\n\t\t\t\t\telems[i+1] = \"-\" + elems[i+1];\n\t\t\t}\n\t\t}\n\t\t//filter out all empty elements\n\t\telems = elems.filter(filterSpace);\n\t\t//check case if only one negative number was given and then hit enter\n\t\tif (elems.length == 1) {\n\t\t\tinputScreen.innerHTML = elems[0].toString(radix).toUpperCase();\n\t\t}\n\t\t//otherwise compute normally\n\t\telse {\n\t\t\tvar result = subtract(elems[0],elems[1],radix);\n\t\t\tinputScreen.innerHTML = result.toString(radix).toUpperCase();\n\t\t}\n\t}\n\t//start new display on next number after evaluating\n\tstartNew = true;\n\tvar elements = document.getElementsByClassName(\"operator\");\n\tfor (var i = 0, len = elements.length; i < len; i++) {\n\t\tif (!elements[i].classList.contains(\"deciop\") || radix == 10){\n \t\telements[i].classList.remove('disabled');\n\t\t}\n\t}\n\tif(!inputScreen.innerHTML.contains(\".\")){\n\t\tfactorialBool = true;\n\n\t}\n\telse{\n\t\tfactorialBool = false;\n\t\tdocument.getElementById(\"factorial\").classList.add('disabled');\n\t\tdocument.getElementById(\"deci\").classList.add('disabled');\n\t\tdecimalBool = false;\n\t}\n}", "function verify(rb, input) {\n console.log($.trim(rb.raavId) + \" : \" + $.trim(input.raavid));\n if ($.trim(rb.raavId) == $.trim(input.raavid)){\n if (Number(input.netto) > Number(rb.maengde))\n saver5(\"Den tilføjede raavarebatch indeholder ikke nok til denne recept\");\n else if (Number(input.netto) > Number(input.max)){\n saver5(\"Den tilføjede mængde er højere end fejl tolerancen tillader\");\n }\n else if (Number(input.tara) < 0 || Number(input.tara) > 9999){\n saver5(\"Indtast en lovlig tara vægt på mellem 0-9999.99\");\n }\n else if (Number(input.netto) < Number(input.min)){\n saver5(\"Den tilføjede mængde er lavere end fejl tolerancen tillader\");\n }\n else {\n saver5(\"Done\");\n }\n }\n else {\n saver5(\"Den indsatte RaavareBatch matcher ikke med den påkrævede raavarer\")\n }\n}", "function checkA() { \n if (ans == \"0\") {\n correct();\n }\n else {\n incorrect();\n }\n}", "function calculateHealth() {\r\n let heightType = document.querySelector(\"input[name='heightType']:checked\").value;\r\n let calculateItemChecked = document.querySelector(\"input[name='calculate']:checked\").value;\r\n let age = Number(inputAge.value);\r\n let weight = Number(inputWeight.value);\r\n let gender = document.querySelector(\"input[name='gender']:checked\").value;\r\n let physicalState = document.getElementById('physicalState').value;\r\n let height;\r\n //Convert Inches to centimeter for get the height in cm scale \r\n if (heightType === \"centimeter\") {\r\n let centimeter = Number(inputCentimeter.value);\r\n height = centimeter;\r\n } else {\r\n console.log(\"You used inch section\");\r\n let foot = Number(inputFoot.value);\r\n let inches = Number(inputInch.value);\r\n let totalInches = Number((foot * 12) + inches);\r\n let convertToCentimeter = Number(totalInches * 2.54);\r\n console.log(foot, inches, totalInches, convertToCentimeter);\r\n height = convertToCentimeter;\r\n }\r\n\r\n console.log(`Height ${height}, Weight ${weight}, Age ${age}, gender ${gender}, physical state ${physicalState}`);\r\n //TODO: Add a verification for calculation\r\n\r\n if (age == 0 || height == null || height === undefined || weight == 0 || physicalState === \"none\") {\r\n errorAlert.style.display = \"block\";\r\n successAlert.style.display = \"none\";\r\n result.innerHTML = `\r\n <div class=\"d-flex align-items-center\">\r\n <strong>Loading...</strong>\r\n <div class=\"spinner-border ml-auto\" role=\"status\" aria-hidden=\"true\"></div>\r\n </div>`\r\n setTimeout(() => {\r\n result.innerHTML = `\r\n <h5 class=\"alert alert-danger d-block font-weight-bolder text-center\">404 Error <i class=\"fa fa-exclamation-circle\"></i> <br> No values has been given</h5>`\r\n }, 5000);\r\n }\r\n //! When all values is correct\r\n else {\r\n // !Calculate BMR (Heris BeneDict law)\r\n //According to gender\r\n let BMR;\r\n let calories;\r\n let kilojoules;\r\n let icon;\r\n if (gender === \"male\") {\r\n BMR = `${(66 + (13.7 * weight) + (5 * height)) - (6.8 * age)}`\r\n icon = 'male';\r\n } else {\r\n BMR = `${(655 + (9.6 * weight) + (1.8 * height)) - (4.7 * age)}`\r\n icon = 'female';\r\n }\r\n console.log(`Your BMR ${BMR}`);\r\n\r\n //TODO: Calculate calorie according to physical state \r\n let multipicationValue;\r\n if (physicalState === 'low') {\r\n multipicationValue = 1.2;\r\n } else if (physicalState === 'normal') {\r\n multipicationValue = 1.375;\r\n } else if (physicalState === 'medium') {\r\n multipicationValue = 1.55;\r\n } else if (physicalState === 'high') {\r\n multipicationValue = 1.725;\r\n } else if (physicalState === 'veryHigh') {\r\n multipicationValue = 1.9;\r\n } else {\r\n multipicationValue = \"Choose the physical state\"\r\n }\r\n calories = (BMR * multipicationValue);\r\n\r\n // TODO: Calculate KiloJoules from calories\r\n kilojoules = calories * 4.184;\r\n calories = Number(calories).toFixed(2);\r\n kilojoules = Number(kilojoules).toFixed(1);\r\n BMR = Number(BMR).toFixed(2);\r\n console.log(`Your calorie need ${calories}`);\r\n\r\n //TODO: Show the bodyBurnsValue let \r\n let bodyBurning;\r\n let bodyBurningText;\r\n let multipicationValue2;\r\n let resultTypeChecked = document.querySelector(\"input[name='resultIn']:checked\").value;\r\n if (resultTypeChecked === \"kiloJoules\") {\r\n bodyBurning = kilojoules;\r\n bodyBurningText = \"kiloJoules\";\r\n multipicationValue2 = \"X 4.184\";\r\n } else {\r\n bodyBurning = calories;\r\n bodyBurningText = \"calories\";\r\n multipicationValue2 = \"\";\r\n }\r\n\r\n // !Calculate BMI according to height and weight\r\n heightInMeter = `${height / 100}`;\r\n let BMI = `${weight / (heightInMeter**2)}`\r\n BMI = Number(BMI).toFixed(1);\r\n console.log(BMI, heightInMeter);\r\n\r\n //TODO: Justify the BMI index value\r\n let textColor;\r\n let state;\r\n let explainState;\r\n let tips;\r\n let weightText;\r\n if (BMI < 18.5) {\r\n state = \"Underweight\"\r\n explainState = \"শরীরের ওজন কম\";\r\n tips = \"পরিমিত খাদ্য গ্রহণ করে ওজন বাড়াতে হবে\"\r\n textColor = 'black-50';\r\n weightText = \"Low weight\";\r\n } else if (BMI >= 18.5 && BMI <= 24.9) {\r\n state = \"Normal\"\r\n explainState = \"সুসাস্থ্যের আদর্শ মান\";\r\n tips = \"এটি বজায় রাখতে হবে । অতিরিক্ত বা অসাস্থ্যকর খাদ্য গ্রহণ করে সাস্থ্য বাড়ানো যাবে না\"\r\n textColor = 'success';\r\n weightText = \"OverWeight / Underweight\";\r\n } else if (BMI > 24.9 && BMI <= 29.9) {\r\n state = \"Overweight\"\r\n explainState = \"শরীরের ওজন বেশি\";\r\n tips = \"চিন্তিত হবেন না । ব্যায়াম করে ওজন কমাতে হবে\";\r\n textColor = 'warning'\r\n weightText = \"OverWeight\";\r\n } else if (BMI > 29.9 && BMI <= 34.9) {\r\n state = \"obese\"\r\n explainState = \"স্থুল (পর্যায়-১): মেদ বেশি | অতিরিক্ত ওজন\";\r\n tips = \"বেছে খাদ্যগ্রহণ ও ব্যায়াম করা প্রয়োজন ।\"\r\n textColor = 'warning';\r\n weightText = \"High OverWeight\";\r\n } else if (BMI > 34.9 && BMI <= 39.9) {\r\n state = \"obese (High)\"\r\n explainState = \"বেশি স্থুল (পর্যায়-২) ।<br> অতিরিক্ত মেদ\";\r\n tips = \"পরিমিত খাদ্যগ্রহণ ও বেশ ব্যায়াম করা প্রয়োজন । <br> ওজন নিয়োন্ত্রণে আনতে হবে | <br> প্রয়োজনে ডাক্তারের পরামর্শ প্রয়োজন\"\r\n textColor = 'danger';\r\n weightText = \"OverWeight (very high)\";\r\n } else {\r\n state = \"Extremly obese\"\r\n explainState = \"অতিরিক্ত স্থুল (শেষ পর্যায়)। মৃত্যুঝুঁকির আশংকা!\";\r\n tips = \"ডাক্তারের পরামর্শ প্রয়োজন । দ্রুত ওজন নিয়ন্ত্রণে আনতে হবে\"\r\n textColor = 'danger';\r\n weightText = \"OverWeight (extreme)\";\r\n }\r\n // TODO: According to good BMI and given Height calculate the perfect weight for this height\r\n //from \r\n let healthyBMI1 = 18.5;\r\n //to\r\n let healthyBMI2 = 24.9;\r\n //from\r\n let healthyWeight1 = `${healthyBMI1 * (heightInMeter**2)}`\r\n healthyWeight1 = Math.round(healthyWeight1);\r\n //to\r\n let healthyWeight2 = `${healthyBMI2 * (heightInMeter**2)}`\r\n healthyWeight2 = Math.round(healthyWeight2);\r\n //a sequence resulth\r\n let healthyWeight = `${healthyWeight1} to ${healthyWeight2}`\r\n let healthyBMI = `${healthyBMI1} to ${healthyBMI2}`\r\n //Average Result\r\n let averageHealthyWeight = `${(healthyWeight1 + healthyWeight2) / 2}`\r\n let averageHealthyBMI = `${(healthyBMI1 + healthyBMI2) / 2}`\r\n\r\n //TODO: Calculate the difference between healty weight and Given Weight;\r\n let defferenceWeight;\r\n if (state === \"Underweight\") {\r\n defferenceWeight = `${healthyWeight1 - weight}kg To ${healthyWeight2 - weight}kg`\r\n } else if (state === \"Normal\") {\r\n defferenceWeight = \"(N/A) Perfect Weight\"\r\n } else {\r\n defferenceWeight = `${weight - healthyWeight1}kg To ${weight - healthyWeight2}kg`\r\n }\r\n\r\n //TODO; Make the HTML for show the results for each sections\r\n let htmlForBMI;\r\n let htmlForCalories;\r\n let htmlForButtons\r\n\r\n htmlForCalories = `\r\n <div class=\"my-3 d-flex justify-content-center align-content-center flex-column\">\r\n <h5 class=\"card-header text-center my-3\">Your Daily ${bodyBurningText} needs</h5>\r\n <h3 class=\"card-title text-center\" id=\"calculateTitle\">${bodyBurningText} need Per Day : </h3>\r\n <h4 class=\"d-block font-weight-bold mx-auto\" style=\"font-size: 1.5rem;\">\r\n <sup><i class=\"fa fa-fire text-danger\"></i></sup> <span id=\"calorieResult\"> ${bodyBurning}\r\n ${bodyBurningText}/Day</span>\r\n </h4>\r\n</div>\r\n<hr>\r\n<h5 class=\"d-inline-block\">BMR : </h5>\r\n<h5 class=\"d-inline-block text-danger font-weight-bold position-relative float-right\"\r\n style=\"font-size: 1.5rem;\" id=\"BMRResult\">${BMR}</h5>\r\n<hr>\r\n<h5 class=\"d-inline-block\">${bodyBurningText} : (c)</h5>\r\n<h5 class=\"d-inline-block text-danger font-weight-bold position-relative float-right\"\r\n style=\"font-size: 1.5rem;\" id=\"SD\">\r\n <i class=\"fa fa-clipboard\"></i> ${BMR} X ${multipicationValue} ${multipicationValue2}\r\n</h5>\r\n<hr>\r\n<h5 class=\"d-inline-block\">Used BMR Law : </h5>\r\n<h5 class=\"d-inline-block text-danger font-weight-bold position-relative float-right\"\r\nstyle=\"font-size: 1.5rem;\" id=\"SD\">\r\n<i class=\"fa fa-codepen text-codepen\"></i> Heris Bene-Dict \r\n</h5>\r\n<hr>`\r\n\r\n //TODO: BMI HTML\r\n htmlForBMI = `\r\n <div class=\"my-3 d-flex justify-content-center align-content-center flex-column text-center\">\r\n <h5 class=\"card-header my-3\">Your Health Statistics</h5>\r\n <h3 class=\"card-title text-center\" id=\"calculateTitle\">Health State (BMI) : </h3>\r\n <h4 class=\"d-block font-weight-bold mx-auto\" style=\"font-size: 1rem;\">\r\n <sup><i class=\"fa fa-${icon} text-${textColor}\"></i></sup> &nbsp;&nbsp;<span id=\"calorieResult\"> ${explainState}\r\n </span> <small><a id=\"showBMIChart\" onclick=\"showChart()\" class=\"link text-primary\">Chart <i class=\"fa fa-area-chart\"></i></a></small>\r\n </h4>\r\n</div>\r\n<h4>\r\n <ul class=\"list-group\">\r\n <li class=\"list-group-item\" style=\"display: none;\" id=\"BMIChart\">Chart : <div id=\"img d-flex justify-content-center\">\r\n <img src=\"bmi-chart.gif\" class=\"d-block mx-auto img\" alt=\"BMI Chart\">\r\n </div>\r\n </li>\r\n <li class=\"list-group-item\">BMI Formula : <span\r\n class=\" alert responsive d-block font-weight-bolder text-warning text-muted bg-light my-3\"><i\r\n class=\"font-weight-bolder text-muted\">=</i> weight(kg) /\r\n Height(m) <sup class=\"font-weight-bolder\">2</sup></span>\r\n </li>\r\n\r\n <li class=\"list-group-item\">Your BMI (Body Mass Index) : <span\r\n class=\" alert responsive d-block font-weight-bolder text-warning text-muted bg-light my-3\">= ${BMI}</span> <a onclick=\"showBMIStateTable()\" class=\"link text-primary\" id=\"BMITableBtn\">Show BMI Table</a>\r\n <div class=\"card mx-auto\" id=\"BMIStateTable\" style=\"border: none;\r\n width: 100%;\r\n height: auto;\r\n display: none;\">\r\n <br>\r\n <div class=\"card-body bg-light mx-auto\">\r\n <b>Check the health stats according to BMI (Body Mass Index) </b>\r\n </div>\r\n <table class=\"table table-striped mx-auto\">\r\n <thead>\r\n <tr>\r\n <th scope=\"col\">BMI</th>\r\n <th scope=\"col\">State</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr>\r\n <th scope=\"row\"> &lt; 18.5</th>\r\n <td>শরীরের ওজন কম (Underweight)</td>\r\n </tr>\r\n <tr>\r\n <th scope=\"row\">18.5 to 24.9</th>\r\n <td>সুসাস্থ্যের আদর্শ মান (Normal)</td>\r\n </tr>\r\n <tr>\r\n <th scope=\"row\">25 to 29.9</th>\r\n <td>শরীরের ওজন বেশি (Overweight)</td>\r\n </tr>\r\n <tr>\r\n <th scope=\"row\">30 to 34.9</th>\r\n <td>\"স্থুল (পর্যায়-১): মেদ বেশি | অতিরিক্ত ওজন (Obese I)</td>\r\n </tr>\r\n <tr>\r\n <th scope=\"row\">35 to 39.9</th>\r\n <td>বেশি স্থুল (পর্যায়-২) । অতিরিক্ত মেদ (Obese II)</td>\r\n </tr>\r\n <tr>\r\n <th scope=\"row\">&gt 40</th>\r\n <td>অতিরিক্ত স্থুল (শেষ পর্যায়)। মৃত্যুঝুঁকির আশংকা! (Obese III Extreme)</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n</div>\r\n </li>\r\n <li class=\"list-group-item\" id=\"state\">State : <span\r\n class=\" alert responsive d-block font-weight-bolder text-warning text-muted bg-light my-3\"><i\r\n class=\"font-weight-bolder text-muted\">=</i> ${state}</span>\r\n </li>\r\n <hr>\r\n <h5 class=\"card-header text-weight-bolder text-muted\">Calculated Standard Health</h5>\r\n <li class=\"list-group-item\" id=\"goodValues\">1. Your BMI should be : <span\r\n class=\" alert responsive d-block font-weight-bolder text-warning text-muted bg-light my-3\"><i\r\n class=\"font-weight-bolder text-muted\">=</i> ${healthyBMI}</span>\r\n <span\r\n class=\" alert responsive d-block font-weight-bolder text-warning text-muted bg-light my-3\"><i\r\n class=\"font-weight-bolder text-muted\">=</i> ${averageHealthyBMI} <small>(Average)</small></span>\r\n </li>\r\n <li class=\"list-group-item\">2.Your Weight should be : <span\r\n class=\" alert responsive d-block font-weight-bolder text-warning text-muted bg-light my-3\"><i\r\n class=\"font-weight-bolder text-muted\">=</i> ${healthyWeight}</span>\r\n <span\r\n class=\" alert responsive d-block font-weight-bolder text-warning text-muted bg-light my-3\"><i\r\n class=\"font-weight-bolder text-muted\">=</i> ${averageHealthyWeight} <small>(Average)</small></span>\r\n </li>\r\n <li class=\"list-group-item\" id=\"goodWeightDifference\">${weightText}<span\r\n class=\" alert responsive d-block font-weight-bolder text-warning text-muted bg-light my-3\"><i\r\n class=\"font-weight-bolder text-muted\">=</i> ${defferenceWeight}</span>\r\n </li>\r\n <hr>\r\n <h5 class=\"card-header text-weight-bolder text-muted\">Suggetions</h5>\r\n <li class=\"list-group-item\" id=\"tips\">Tips (করনীয়) : <span\r\n class=\" alert responsive d-block font-weight-bolder text-warning text-muted bg-light my-3\"><i\r\n class=\"font-weight-bolder text-muted\">=</i> ${tips}</span>\r\n </li>\r\n </ul>\r\n</h4>\r\n `\r\n //TODO: Button HTML \r\n htmlForButtons = `\r\n <button class=\"btn btn-outline-warning\" type=\"submit\" onclick=\"location.reload();\">Reload</button>\r\n <button class=\"btn btn-outline-success position-relative float-right\" type=\"submit\"\r\n onclick=\"window.print();\">Print/Save</button>`\r\n result.classList.add('d-none');\r\n\r\n //TODO: Add alert with success message when calculate will be finished\r\n errorAlert.style.display = \"none\";\r\n successAlert.style.display = \"block\";\r\n setTimeout(() => {\r\n successAlert.classList.add('hide')\r\n successAlert.style.display = \"none\";\r\n }, 4000);\r\n\r\n //TODO: Show the results according to user need\r\n if (calculateItemChecked === \"bmr\") {\r\n calorieSection.innerHTML = htmlForCalories;\r\n healthSection.innerHTML = \"\";\r\n } else if (calculateItemChecked === \"bmi\") {\r\n healthSection.innerHTML = htmlForBMI;\r\n calorieSection.innerHTML = \"\";\r\n } else if (calculateItemChecked === \"all\") {\r\n healthSection.innerHTML = htmlForBMI;\r\n calorieSection.innerHTML = htmlForCalories;\r\n }\r\n buttons.innerHTML = htmlForButtons;\r\n\r\n //! Show the navigator\r\n let navigator = document.getElementById('navigator');\r\n if (calculateItemChecked === \"all\") {\r\n navigator.style.display = \"block\";\r\n } else {\r\n navigator.style.display = \"none\";\r\n }\r\n } //End of the else statement\r\n}", "function executeInput(event){\n // get input and put into array, filter out empty cell at end due to extra space\n let input = display.textContent.split(' ').filter(item => item !== '' && item);\n // if not enough inputs return immediately\n if (input.length < 3) {\n return;\n }\n // if the last input was an operator trim it off the end\n if (operators.includes(input[input.length - 1])) {\n input.splice(input.length - 1, 1);\n }\n // generate ratings array, element at each index will correspond to MDAS rating of each element in input array, numbers will be 0\n let ratings = input.map(item => operators.includes(item) ? mdas[item] : 0);\n // run calculations \n result = calculateResults(input, ratings);\n // if the result is a solid number display it, otheriwse trim to 5 decimal places then display, when sent as number to string it will also trim trailing zeros \n if (Number.isInteger(result)) {\n display.textContent = `${result} `;\n } else {\n display.textContent = `${Number(result.toFixed(5))} `;\n }\n }", "function COMPUTE() {\n\n var result, final_result, R1i, R2i, decade1, decade2, error, min_error, best_R1, best_R2, R1, R2, qcurrent, best_qcurrent, qcurrent_error, min_qcurrent_error;\n \n // Gather all the input fields from the HTML page. Should probably use Jquery on this project.\n var voltage = document.getElementById(\"vin\").value;\n var target_qcurrent = document.getElementById(\"qcurrent_in\").value;\n var voltage_out = document.getElementById(\"vout\").value;\n var eseries_selected = document.getElementById(\"eseries\").value;\n \n // Thanks to math.js, we simply pass the equation input by the user directly into the math.compile method and \n // it gets parsed into javascript which we later access using the .evaluate method.\n var equation = math.compile(document.getElementById(\"equation\").value); \n\n\n // The core of this algorithm is this loop, so this seems as good a place as any to describe it's whole approach.\n // This algorithm is EXTREMELY crude, but it works. It could definitely be improved to be more of an intelligent sort.\n // Four nested implicit for loops iterate through every possible common value resistor for the chosen e-series.\n // For E12 that isn't too bad, but for E192 that means 2,359,296 iterations of executing that inner code. Computers are great!\n for (R1i = 0; R1i < eseries[eseries_selected].length; R1i++) {\n for (R2i = 0; R2i < eseries[eseries_selected].length; R2i++) {\n for (decade1 = 1; decade1 < 8; decade1++) {\n for (decade2 = 1; decade2 < 8; decade2++) {\n // To iterate through every e-series resistor, we need to multiply the base values by their magnitude (ex. 1.2ohm versus 12kohm)\n R1 = eseries[eseries_selected][R1i] * (10 ** decade1);\n R2 = eseries[eseries_selected][R2i] * (10 ** decade2);\n //result = voltage * (R2/(R1+R2));\n result = equation.evaluate({vin:voltage, R1:R1, R2:R2});\n error = Math.abs(voltage_out - result) / voltage_out;\n qcurrent = voltage / (R1 + R2);\n qcurrent_error = Math.abs(qcurrent - target_qcurrent) / target_qcurrent;\n if (((error <= min_error) && (qcurrent_error <= min_qcurrent_error)) || ((min_error == undefined) || (min_qcurrent_error == undefined))) {\n min_error = error;\n min_qcurrent_error = qcurrent_error;\n final_result = result;\n best_R1 = R1;\n best_R2 = R2;\n best_qcurrent = qcurrent;\n }\n }\n }\n }\n }\n\n // Pass results back to the HTML page in their copy-able fields.\n document.getElementById(\"R1\").value = best_R1;\n document.getElementById(\"R2\").value = best_R2;\n document.getElementById(\"qcurrent_out\").value = best_qcurrent;\n}", "function exam(a)\n{\n\n//Assign fexm the final result from the math equation\nlet fexam = (60/100)*a\n\n//return value for fexam\nreturn fexam\n\n}", "function check() {\n var vz = document.getElementById(\"zenrv\").value;\n\n vi = document.getElementById(\"dc\").value;\n rs = document.getElementById(\"res\").value;\n// re=rs/1000;\n// document.getElementById(\"res\").value=re;\n rl = document.getElementById(\"resl\").value;\n\n rlm = (parseFloat(vz) * parseInt(rs)) / (parseFloat(vi) - parseFloat(vz)); // minimum load resistance\n\n is = (parseFloat(vi) - parseFloat(vz)) / parseInt(rs);\n ise = parseFloat(is) * 1000;\n document.getElementById(\"amps\").value = ise.toPrecision(3);\n\n il = parseFloat(vz) / parseInt(rl);\n ile = parseFloat(il) * 1000;\n document.getElementById(\"ampl\").value = ile.toPrecision(3);\n iz = parseFloat(is) - parseFloat(il);\n ize = parseFloat(iz) * 1000;\n document.getElementById(\"ampz\").value = ize.toPrecision(3);\n\n\n if (document.getElementById(\"resl\").value >= rlm) {\n\n vo = parseFloat(vi) - (parseFloat(is) * parseInt(rs));\n\n document.getElementById(\"volt\").value = vo.toPrecision(3);\n }\n else {\n document.getElementById(\"volt\").value = vi;\n document.getElementById(\"ampz\").value=0;\n }\n// if (vi == \"\") {\n// Alert.render(\"Enter the Input Voltage\");\n// document.getElementById(\"add\").style.display = \"none\";\n// }\n// else if (rs == \"\") {\n// Alert.render(\"Enter the Series Resistance Value\");\n// document.getElementById(\"add\").style.display = \"none\";\n// }\n// else if (rs != 1000) {\n// Alert.render(\"Set Series Resistance Value to 1Kohm\");\n// document.getElementById(\"add\").style.display = \"none\";\n// }\n// else if (rl == \"\") {\n// Alert.render(\"Enter the Load Resistance Value\");\n// document.getElementById(\"add\").style.display = \"none\";\n// }\n// else if (vz == \"\") {\n// Alert.render(\"Enter the Zener Voltage\");\n// document.getElementById(\"add\").style.display = \"none\";\n//\n// }\n// else {\n// document.getElementById(\"add\").style.display = \"block\";\n// }\n\n\n\n s1[0] = parseFloat(document.getElementById('volt').value);\n plot3 = $.jqplot('chart1', [s1], {\n grid: {\n background: \"transparent\"\n },\n seriesDefaults: {\n renderer: $.jqplot.MeterGaugeRenderer,\n rendererOptions: {\n min: 0,\n max: 20,\n intervals: [5, 10, 15, 20],\n intervalColors: ['#66cc66', '#93b75f', '#E7E658', '#cc6666', '#579575']\n }\n }\n });\n\n s2[0] = parseFloat(document.getElementById('amps').value);\n plot3 = $.jqplot('chart2', [s2], {\n grid: {\n background: \"transparent\"\n },\n seriesDefaults: {\n renderer: $.jqplot.MeterGaugeRenderer,\n rendererOptions: {\n min: 0,\n max: 40,\n intervals: [10, 20, 30, 40],\n intervalColors: ['#66cc66', '#cc6666', '#cc6666', '#E7E658']\n }\n }\n });\n\n s3[0] = parseFloat(document.getElementById('ampl').value);\n plot3 = $.jqplot('chart3', [s3], {\n grid: {\n background: \"transparent\"\n },\n seriesDefaults: {\n renderer: $.jqplot.MeterGaugeRenderer,\n rendererOptions: {\n min: 0,\n max: 40,\n intervals: [10, 20, 30, 40],\n intervalColors: ['#66cc66', '#cc6666', '#cc6666', '#E7E658']\n }\n }\n });\n s4[0] = parseFloat(document.getElementById('ampz').value);\n plot3 = $.jqplot('chart4', [s4], {\n grid: {\n background: \"transparent\"\n },\n seriesDefaults: {\n renderer: $.jqplot.MeterGaugeRenderer,\n rendererOptions: {\n min: 0,\n max: 40,\n intervals: [10, 20, 30, 40],\n intervalColors: ['#66cc66', '#cc6666', '#cc6666', '#E7E658']\n }\n }\n });\n\n var table = document.getElementById(\"mytable\");\n\n //var columns = table.rows[1].cells[3];\n\n var clmns = table.rows[tabrowindex].cells[1];\n var vlt = clmns.innerHTML;\n\n if (document.getElementById(\"znv\").value != document.getElementById(\"zenrv\").value) {\n// document.getElementById(\"add\").style.display = \"none\";\n// Alert.render(\"Make the Zener Voltage Constant\");\n document.getElementById(\"zenrv\").style.borderColor = \"red\";\n document.getElementById(\"demo\").innerHTML = \"Make the Zener Voltage Constant\";\n }\n else if (document.getElementById(\"rs\").value != (document.getElementById(\"res\").value) / 1000) {\n// document.getElementById(\"add\").style.display = \"none\";\n// Alert.render(\"Make the Series Resistance Constant\");\n document.getElementById(\"demo\").innerHTML = \"Make the Series Resistance Constant\";\n document.getElementById(\"res\").style.borderColor = \"red\";\n }\n else if (document.getElementById(\"vin\").value != document.getElementById(\"dc\").value){\n// document.getElementById(\"add\").style.display = \"none\";\n// Alert.render(\"Make the Input Voltage Constant\");\n document.getElementById(\"dc\").style.borderColor = \"red\";\n document.getElementById(\"demo\").innerHTML = \"Make the Input Voltage Constant\";\n }\n else if (vlt == document.getElementById(\"resl\").value) {\n// document.getElementById(\"add\").style.display = \"none\";\n// Alert.render(\"Change the Load Resistance\");\ndocument.getElementById(\"demo\").innerHTML = \"Change the Load Resistance\";\n document.getElementById(\"resl\").style.borderColor = \"red\";\n }\n// else {\n// document.getElementById(\"add\").style.display = \"block\";\n// }\n\n\n\n}", "function budgetCalculator(watch, mobile, laptop){\n if (watch < 0){ // for invalid input\n \n console.log('Invalid Quantity')\n \n } else{\n var watchAmount = watch * 50;\n }\n\n if (mobile < 0){// For invalid input\n \n console.log('Invalid Quantity')\n \n } else{\n var mobileAmount = mobile * 100;\n }\n if (laptop < 0){// For invalid input\n \n console.log('Invalid Quantity')\n \n } else{\n var laptopAmount = laptop * 500;\n }\n var amount = watchAmount + mobileAmount + laptopAmount;\n return amount;\n}", "calculate() {\n let age = inputsRequired[0].elem.value;\n let height = inputsRequired[1].elem.value;\n let weight = inputsRequired[2].elem.value;\n let neckCircumference = inputsRequired[3].elem.value;\n let waistCircumference = inputsRequired[4].elem.value;\n let hipCircumference = inputsRequired[5].elem?.value;\n \n let person = new Person();\n \n let feetToCMFactor = 30.48; // *\n let poundsToKGFactor = 2.205; // /\n let inchesToCMFactor = 2.54; // *\n \n person.age = age;\n person.height = height;\n person.weight = weight;\n person.neckCircumference = neckCircumference;\n person.waistCircumference = waistCircumference;\n person.hipCircumference = hipCircumference;\n\n if(this.unit === 1) {\n person.height = height * feetToCMFactor;\n person.weight = weight / poundsToKGFactor;\n person.neckCircumference = neckCircumference * inchesToCMFactor;\n person.waistCircumference = waistCircumference * inchesToCMFactor;\n person.hipCircumference = hipCircumference * inchesToCMFactor;\n }\n \n if(this.gender === 'male') {\n person.gender = 0;\n } else if(this.gender === 'female') {\n person.gender = 1;\n }\n \n let bodyMassIndex = person.findBMI();\n let bodyFatPercentage = person.findBodyFatPercentage();\n let dailyCalorieIntake = person.findDailyCalorieIntake();\n let bmr = person.findBMR(dailyCalorieIntake);\n let activityLevelBmr = bmr * activityLevel.find(lvl => lvl.name === this.activityLevelDetails).value;\n \n function valueFromPercentage(v, p) {\n return ((v * p) / 100);\n }\n \n let calorieBasedOnGoal = activityLevelBmr - workoutGoal.find(goal => goal.name === this.workoutGoalChoosen).execute(activityLevelBmr);\n let macroValuesBasedOnGoal = macroForWorkoutGoal.find(goal => goal.name === this.workoutGoalChoosen);\n let carb = Math.round(valueFromPercentage(calorieBasedOnGoal, macroValuesBasedOnGoal.carb)/4);\n let protein = Math.round(valueFromPercentage(calorieBasedOnGoal, macroValuesBasedOnGoal.protein)/4);\n let fat = Math.round(valueFromPercentage(calorieBasedOnGoal, macroValuesBasedOnGoal.fat)/9);\n \n this.renderOutput(\n bodyMassIndex,\n bodyFatPercentage,\n dailyCalorieIntake,\n activityLevelBmr,\n carb,\n protein,\n fat\n );\n }", "function calculateResult() {\r\n var PRACTICALITY_RATIO = 0.7; \r\n var MARKET_RATIO = 0.3; \r\n practicalityScore = $('#results_practicality_hidden').val();\r\n marketScore = $('#results_market_hidden').val();\r\n var effectScore = (practicalityScore * PRACTICALITY_RATIO) +\r\n (marketScore * MARKET_RATIO);\r\n // we round the result to the second decimal place \r\n return effectScore;\r\n}", "function calculateResult() {\n\t//var fuel = getFuel();\n\t//var dist = getDistance();\n\t//var efficiency = 0;\n\t//var dist2 = 26.69/2.65;\n\t//efficiency = fuel / dist2;\n\tvar efficiency = getFuel() / (getDistance() / 100);\n\t//var efficiency = 3 + 5;\n\t\n\t//display the result\n\tdocument.getElementById('result').innerHTML = \"Fuel Efficiency is \" + efficiency + \" L/100km\";\n\t//var divobj - document.getElementById('result');\n\t//divobj.style.display='block';\n\t//divobj.innerHTML = \"Fuel Efficiency is \" + efficiency + \" L/100km\";\n}", "function doit() {\n\n console.log(\"doit\");\n\n\n\n answerChecker.oldEvaluate = answerChecker.evaluate;\n\n //stops the code from submitting the answer\n console.log(\"wrap answerChecker\");\n answerChecker.evaluate = function(e, t) {\n result = answerChecker.oldEvaluate(e, t);\n if (result.passed === !0 && result.accurate === !1) {\n result.exception = !0;\n\n logMutations();\n\n }\n return result;\n };\n\n }", "function budgetCalculator(watch, phone, laptop) {\n if (watch < 0 || phone < 0 || laptop < 0) {\n return 'Input cannot be a negetive number';\n }\n else {\n var watchCost = watch * 50; //The cost of every watch is 50 taka\n var phoneCost = phone * 100; //The cost of every phone is 100 taka\n var laptopCost = laptop * 500; //The cost of every laptop is 500 taka\n var totalCost = watchCost + phoneCost + laptopCost;\n return totalCost;\n }\n}", "function checkAns() {\n\tdocument.getElementById(\"outputyes\").innerHTML = (\"\");\n\tdocument.getElementById(\"outputno\").innerHTML = (\"\");\n\t\n\tnumb1 = parseInt(number1);\n\tnumb2 = parseInt(number2);\n\tansIn = parseInt(document.getElementById(\"check\").value);\n\n\tvar ansCor = numb1 * numb2;\n\n\n\tif (ansCor == ansIn) {\n\t\tdocument.getElementById(\"yes_no\").className = \"block\";\n\t\tdocument.getElementById(\"outputyes\").innerHTML = (\"Very Good! Do you want to try again?\");\n\t\t\t\t$(\"#myform\")[0].reset();\n\t\t\n\n\t\t\n\n\t} else\n\n\t{\t\n\t\tdocument.getElementById(\"yes_no\").className = \"none\";\n\t\tdocument.getElementById(\"outputno\").innerHTML = (\"No. Please try again.\");\n\t\t//document.getElementById(\"ansIn\").innerHTML = ansIn;\n\t\t$(\"#myform\")[0].reset();\n\t\t\n\n\t\t\n\n\t}\n}", "function getAW_Egress(){\n var result = document.getElementById('AW_result');\n var width = document.getElementById('AW_w').value;\n var height = document.getElementById('AW_h').value;\n var note = document.getElementById('AW_note')\n var op_w, op_h, sqft;\n op_w=width-7.75\n op_h=height-5.625\n sqft=op_h*op_w/144 \n note.innerHTML=Math.round(sqft*1000)/1000; \n if (op_w>=20 && op_h>=24 && sqft>=5.7) {\n result.innerHTML=\"PASS Egress\";\n } \n else {\n result.innerHTML=\"FAIL\"; \n } \n}", "function calculate(equality) {\n try {\n var content = splitInput(equality);\n rightContent(content);\n var cal = expression(content);\n if (String(cal) == \"NaN\") {\n alert(\"Error: Something is wrong.\");\n deleteContent();\n return;\n }\n }\n catch (err) {\n alert(\"Error: \" + err + \".\");\n deleteContent();\n return;\n }\n output.innerText = cal;\n}", "function me(){\n if( principal.value === '' && time.value === '' && rate.value === '')\n {\n result.value = 'pls enter a valid number';\n }\n else \n {\n result.value = ((parseFloat(principal.value) * parseFloat(time.value) * parseFloat(rate.value))/100).toFixed(2);\n }\n\n }", "getSquareRoot(num)//takes userinput\n{\n try {\n var format = /[0-9]/;\n if (format.test(num)) {\n /*\n *initialize t with the given non-negative number\n */\n var t = num;\n var epsilon = 1e-15;\n /*\n *repeat until Math.abs(t- num/t)> epsilon*t\n */\n while (Math.abs(t - num / t) > epsilon * t) {\n /*\n *replacing t with average of num/t and t\n */\n t = (num / t + t) / 2;\n }\n console.log(\"Square root of \" + num + \" is \" + t);\n }\n else {\n console.log(\"enter only numbers\");\n\n }\n\n }\n catch (error) {\n console.log(error.message);\n\n }\n}", "function budgetCalculator(watch, phone, laptop) {\n if (watch < 0 || phone < 0 || laptop < 0) {\n return \"Enter a valid input\";\n }\n else {\n var watchPrice = watch * 50;\n var phonePrice = phone * 100;\n var laptopPrice = laptop * 500;\n var totalAmount = watchPrice + phonePrice + laptopPrice;\n return totalAmount;\n }\n}", "function bol() {\n var boolean = true;\n var numbA = parseFloat(document.getElementById('input-one').value);\n var numbB = parseFloat(document.getElementById('input-two').value);\n if (boolean) {\n var numbC = numbA / numbB;\n var result = `${numbA} division ${numbB} equals ${numbC}`;\n document.getElementById('result').innerHTML = result;\n }\n}", "function calcVAC()\r\n{\r\n\t\r\n\t//first clear out any previous VAE determination\r\n\tclearVAE();\r\n\tresetVacDayLabel(true);\r\n\t$('#explain').show(); //show the explain button\r\n\tresetVAEObject(); //set results back to empty\r\n\r\n\r\n\tvar input_vals = \"\";\r\n\tvar inputError = false;\r\n\tvar peep = [];\r\n\tvar fio2 = [];\r\n\tvar err = \"\";\r\n\tvar peepException = \"\";\r\n\tdirection = explanation = \"\";\r\n\tvar peepLessThan5 = false;\r\n\tshowPeepFooter(peepLessThan5);\r\n\t\r\n\tvar err = \"\";\r\n\t$(\"input[name=PEEP]\").each( function(index, object) {\r\n\tvar peepVal = this.value.split('(');\r\n\tpeep[index] = $.trim(peepVal[0]);\r\n\t\tif(peep[index] !== \"\") { //ignore of no entry\r\n\t\t\tif( isNaN(peep[index]) || peep[index] < 0 || peep[index] > 40) {\r\n\t\t\t\terr += \"<br>Input Error: The PEEP value = \" + peep[index] + \" on day \" + getMVDate(index+1) + \" must be a number between 0 and 40. <br>\";\t\r\n\t\t\t\tinputError = true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tpeep[index] = parseFloat(peep[index]);\r\n\t\t\t\tif(peep[index] < 5 ) {\r\n\t\t\t\t\tthis.value = '5 (' + peep[index] + ')*'; \r\n\t\t\t\t\tpeep[index] = 5;\r\n\t\t\t\t\tpeepLessThan5 = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\t$(\"input[name=fio2]\").each( function(index, object) {\r\n\t\tfio2[index] = $.trim(this.value);\r\n\t\t\r\n\t\tif(fio2[index] !== \"\") {\r\n\t\t\tif( isNaN(fio2[index]) || fio2[index] < 20 || fio2[index] > 100) {\t\t\t\r\n\t\t\t\terr += \"<br>The FiO2 value = \" + fio2[index] + \" on day \" + getMVDate(index+1) + \" must be between 20 and 100. <br>\";\r\n\t\t\t\tinputError = true;\r\n\t\t\t}\r\n\t\t\telse fio2[index] = parseFloat(fio2[index]);\r\n\t\t}\r\n\t});\r\n\t\r\n\tif(inputError) {\r\n\t\tmyAlert(err);\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\r\n\t//now look for periods of stability......\r\n\tvar foundAVac;\r\n\tfor (i=0; i < fio2.length-3; i++)\r\n\t{\r\n\t\tfoundAVac = false; //this is a flag to catch the case where both FIO2 and PEEP vales give a VAC on the same day\r\n\r\n\t\tif(fio2[i+1] !== \"\" && fio2[i] !== \"\") { //skip over null values\r\n\t\t\tif(fio2[i+1] - fio2[i] <= 0) \r\n\t\t\t{\t\r\n\t\t\t\tvar maxVal = Math.max(fio2[i+1],fio2[i]);\r\n\t\t\t\tif ( (fio2[i+2] - maxVal >= 20) && (fio2[i+3] - maxVal >= 20) ) {\r\n\t\t\t\t\tvae.eventDays.push(i+3);//Found a VAC\r\n\t\t\t\t\tvae.types.push('VAC');\t\r\n\t\t\t\t\tvae.vacDeterminedBy.push(FIO2);\r\n\t\t\t\t\tfoundAVac = true;\r\n\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t}\r\n \r\n\t\tif(peep[i+1] !== \"\" && peep[i] !== \"\") { //skip over null values \r\n\t\t\tif(peep[i+1] - peep[i] <= 0 ) {\r\n\t\t\t\tvar maxVal = Math.max(peep[i+1], peep[i]);\r\n\t\t\t\t\r\n\t\t\t\tif ( (peep[i+2] - maxVal >= 3) && (peep[i+3] - maxVal >= 3) ) {\r\n\t\t\t\t\t//vacDays.push(i+2); //Found a VAC\t\r\n\t\t\t\t\tif(!foundAVac) {\r\n\t\t\t\t\t\tvae.eventDays.push(i+3);\r\n\t\t\t\t\t\tvae.types.push('VAC');\r\n\t\t\t\t\t\tvae.vacDeterminedBy.push(PEEP);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse vae.vacDeterminedBy[vae.vacDeterminedBy.length-1] = 'PEEP and FIO2';\r\n\t\t\t\t\t\r\n\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t//finally\r\n\t\r\n\t showPeepFooter(peepLessThan5);\r\n\r\n\t}\r\n\r\n\t\r\n\t\r\n\tdirection = '';\r\n\texplanation = '<h3>Explanation:</h3>';\r\n\t\r\n\t\r\n\t\r\n\tif(vae.eventDays.length) {\t\r\n\t\r\n\t\t//alert(JSON.stringify(vae));\r\n\t\r\n\t\tvar vacDaysCopy = [];\r\n\t\tvar lastVAC;\r\n\t\tfor(var j = 0; j < vae.eventDays.length; j++ ) {\r\n\t\t\tvacDaysCopy[j] = vae.eventDays[j];\r\n\t\t}\r\n\t\r\n\t\t\tfor(var k = 0; k < vacDaysCopy.length; k++ ) {\r\n\t\t\t\tif(k == 0) {\r\n\t\t\t\t\tlastVAC = vae.eventDays[k];\r\n\t\t\t\t\tdirection += \"<p>A Ventilator-Associated Condition (VAC) based on \" + vae.vacDeterminedBy[k] + \" values occurred on \" + getMVDate(vacDaysCopy[k]) + \"</p>\";\r\n\t\t\t\t\texplanation += \"<p>The two days preceding \" + getMVDate(vacDaysCopy[k]) + \" are the baseline period of stability or improvement followed by a sustained period (&ge; 2 days) of worsening oxygenation. </p>\";\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tif( vacDaysCopy[k] - lastVAC >= 14) {\r\n\t\t\t\t\t\tlastVAC = vacDaysCopy[k];\r\n\t\t\t\t\t\tdirection += \"<p>Another Ventilator-Associated Condition (VAC) based on \" + vae.vacDeterminedBy[k] + \" values occurred on \" + getMVDate(vacDaysCopy[k]) + \"<br>\";\r\n\t\t\t\t\t\texplanation += \"<p>The two days preceding \" + getMVDate(vacDaysCopy[k]) + \" are the baseline period of stability or improvement followed by a sustained period (&ge; 2 days) of worsening oxygenation. </p>\";\r\n\t\t\t\t\t\texplanation += \"<p>The VAC on \" + getMVDate(vacDaysCopy[k]) + \" is counted as a VAC since it occurred more than 14 days after the previous VAC.</p>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(vacDaysCopy[k] - lastVAC != 0) {\r\n\t\t\t\t\t\tvar index = myIndexOf(vae.eventDays, vacDaysCopy[k].toString());\r\n\t\t\t\t\t\tif(index != -1) {\r\n\t\t\t\t\t\t\tvae.eventDays.splice(index, 1);\r\n\t\t\t\t\t\t\tvae.types.splice(index, 1);\r\n\t\t\t\t\t\t\texplanation += \"<p>There would appear to be a VAC on \" + getMVDate(vacDaysCopy[k]) + \" based on \" + vae.vacDeterminedBy[k] + \" values, however there was a previous VAC which occurred on \" + getMVDate(lastVAC) + \". The timespan between the two is only \" +(vacDaysCopy[k] - lastVAC).toString() + \" days therefore \" + getMVDate(vacDaysCopy[k]) + \" is not counted as a VAC by the 14 day rule.\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse { // vacDaysCopy[k] - lastVAC == 0\r\n\t\t\t\t\t\texplanation += \"<p>There is a VAC on \" + getMVDate(vacDaysCopy[k]) + \" whereby both the PEEP and FiO2 values meet the criteria simultaneously.</p>\"\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\t\t\r\n\t\t\t}\r\n\t\t\r\n\t}\t\r\n\tif(vae.eventDays.length) {\r\n\t\t//explanation = \"<br>\" + direction + \"<br>\" + explanation;\r\n\t\t//alert(explanation);\r\n\t\tdirection += \"<br><span class='emphasis'>Click on the Go To IVAC button</span> to move to the next part of the protocol or click on the &#34Explain&#34 button to see how this determination was made. \";\r\n\t\t\r\n\t\treturn true;\r\n\t}\r\n\telse {\r\n\t\tdirection = \"No VAE detected. Click on the &quot;Explain&quot; button to see an explanation of the VAC definition. \"\r\n\t\texplanation = \"For a VAC to occur, there is a baseline period of stability or improvement of daily minimum PEEP or FiO<sub>2</sub> values on two consecutive days. This is followed by two consecutive days of worsening oxygenation where the \\\r\n\t\t\t\t\t\tdaily minimum PEEP values increase by 3 cmH<sub>2</sub>O or more or the daily minimum FiO<sub>2</sub> values increase by 20% or more, above the daily minimum value in the period of stability or improvement. The date of the VAC is set to the first day of worsening after the baseline period. <br> \\\r\n\t\t\t\t\t\tFor periods of stability where daily minimum PEEP values are &le; 5 cmH<sub>2</sub>O, the corresponding period of worsening oxygenation must have daily minimum PEEP values of 8 cmH<sub>2</sub>O or greater.<br>\";\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\t\r\n}", "function squareRoot() {\ncurrentInput = Math.sqrt(currentInput);\ndisplayCurrentInput();\n}", "function checkAnswer() {\n let userAnswer = parseInt(document.getElementById(\"answer-box\").value);\n let calculatedAnswer = calculateCorrectAnswer();\n let isCorrect = userAnswer === calculatedAnswer[0];\n\n if (isCorrect) {\n alert(\"Hey! You got it right! :D\");\n incrementScore();\n } else {\n alert(`Awwww.....you answered ${userAnswer}. The correct answer was ${calculatedAnswer[0]}!`);\n incrementWrongAnswer();\n }\n\n runGame(calculatedAnswer[1]);\n\n\n}", "function run() {\n var smartMulligan = $(\"#mulligan-checkbox\").is(':checked'), drawAmount = $(\".draw-amount\").val(), cardInfo = getCardInput(), _a = isInputValid(drawAmount, cardInfo), isValid = _a.isValid, errorMsg = _a.errorMsg;\n if (isValid) {\n var func = (smartMulligan) ? Draw.runSimulation : Draw.runCalculation, promise = helpers_1.Helpers.timeFunction(func, cardInfo, drawAmount);\n promise.then(function (_a) {\n var t = _a.t, results = _a.results;\n cleanupLoadingIndicator();\n helpers_1.UI.updateResults((t / 1000).toFixed(3), results);\n resultScreenEffects(results);\n });\n }\n else {\n cleanupLoadingIndicator();\n displayError(errorMsg);\n }\n $(\"#faq-wrapper\").collapse('hide');\n}", "function calculate() {\n this.divideByZero = false;\n if (this.operator == 1) {\n this.currentInput = eval(this.memory) * eval(this.currentInput);\n };\n if (this.operator == 2) {\n if (eval(this.currentInput) == 0) {\n this.currentInput = \"undefined- cannot divide by zero\";\n this.divideByZero = true;\n }\n else {\n this.currentInput = eval(this.memory) / eval(this.currentInput);\n }\n };\n if (this.operator == 3) {\n this.currentInput = eval(this.memory) + eval(this.currentInput);\n };\n if (this.operator == 4) {\n this.currentInput = eval(this.memory) - eval(this.currentInput);\n };\n if (this.operator == 5 && this.currentInput < 0) {\n this.power_of = -1 * eval(this.currentInput);\n var base = eval(this.memory);\n var final = 1;\n for (i = 0; i < power_of; i++) {\n final = final * base;\n console.log(base + \"^\" + (i + 1) + \" = \" + final);\n }\n this.currentInput = 1 / final;\n }\n else if (this.operator == 5) {\n var power_of = eval(this.currentInput);\n var base = eval(this.memory);\n var final = 1;\n for (i = 0; i < power_of; i++) {\n final = final * base;\n console.log(base + \"^\" + (i + 1) + \" = \" + final);\n }\n this.currentInput = final;\n };\n this.operator = 0; //clear operator\n this.memory = \"0\"; //clear memory\n this.displayCurrentInput();\n}", "function answerIsIncorrect () {\r\n feedbackForIncorrect();\r\n}", "function verifierEquation(item,min,max,numberDisplay) {\n\t\n\tvar reponseUser = item.innerHTML;\n\tvar nbr1 = parseInt(document.getElementById(\"nbr1\").innerHTML);\n\tvar nbr2 = parseInt(document.getElementById(\"nbr2\").innerHTML);\n\tvar signe = document.getElementById(\"signe\").innerHTML;\n\t\n\tclearAnswer(numberDisplay);\n\t\n\tvar reponseEquation = calculEquation(nbr1,nbr2,signe);\n\t\n\tif (reponseUser == reponseEquation) {\n\t\t\n\t\tdisplayAfterGoodAnswer(reponseEquation)\n\t\t\n\t\tnumberGoodAnswer ++; \n\t\tnumberTotalAnswer ++;\n\t\t\n\t\tafficheNumberGoodAnswer();\n\t\t\n\t\tsetTimeout(load_game_mathEquation, 2000, signe,min,max,numberDisplay);\n\t}else {\n\n\t\tdisplayAfterBadAnswer(reponseEquation)\n\t\t \n\t\tnumberTotalAnswer ++;\n\t\t\t\n\t\tafficheNumberGoodAnswer();\n\t\t\n\t\tsetTimeout(load_game_mathEquation, 2000, signe,min,max,numberDisplay);\n\t}\t\n}", "function do_calculation() {\n // get the HTML elements that correspond to the inputs\n const crystalsInput = document.getElementById(\"crystals-input\");\n const tenDrawsInput = document.getElementById(\"ten-draws-input\");\n const singleDrawsInput = document.getElementById(\"single-draws-input\");\n\n // do the calculation and store it into an object\n const results = calculate_sparks(crystalsInput.value, tenDrawsInput.value, singleDrawsInput.value);\n\n // update the output elements\n document.getElementById(\"roll-count-output\").textContent = results.total_draws;\n document.getElementById(\"spark-count-output\").textContent = results.total_sparks;\n document.getElementById(\"needed-rolls-output\").textContent = results.draws_to_next_spark;\n document.getElementById(\"needed-crystals-output\").textContent = results.crystals_for_next_spark;\n document.getElementById(\"needed-ten-draws-output\").textContent = results.ten_draws_for_next_spark;\n}", "function Armstrong(x){\n let arr = x.toString().split('')\n let arr1= arr.map(x=>Math.pow(x,arr.length))\n let narr = arr1.reduce(function(a,b){\n return a+b\n })\n // return narr\n if(narr == x ){\n return true\n }\n else{\n return false\n }\n}", "function getMagicAccuracy() {\n\tvar visible = parseInt($(\"#baseMagic\").val());\n\tvar potMagic = $(\"#potMagic option:selected\").text();\n\n\tif (potMagic.indexOf(\"No Potion\")) {\n\t\tvisible = calculateVisible(visible, potMagic);\n\t}\n\t\n\tvar p1 = $(\"#p1 option:selected\").text();\n\tvar pAcc = 1;\n\tif (p1.indexOf(\"No Prayer\")) {\n\t\tpAcc = parseFloat(p1.substr(p1.search(/([\\d]\\.?[\\d]*)/)));\n\t}\n\t\n\tvar style = 0;\n\tvar b = $(\"#wepSpell option:selected\").text();\n\tif (!b.indexOf(\"Trident\") || !b.indexOf(\"Swamp Trident\")) {\n\t\tstyle = 3;\n\t}\n\t\n\tvar v = $(\"#checkVoid\").is(':checked') ? 1.3 : 1;\n\tvar gear = $(\"#checkSalve\").is(':checked') ? 1.2 : $(\"#checkSlay\").is(':checked') ? 1.15 : 1;\n\tvar bonus = $(\"#total\").find(\".ma\").val() || \"0\";\n\t\n\tvar load = {visible, pAcc, style, v, bonus, gear};\n\treturn calculateRoll(load);\n}", "function main() {\n showResult(47);\n showResult(88);\n showResult(34);\n showResult(3);\n showResult(-2);\n showResult(105);\n}", "function myQuotient(num1, num2){\n var num1 = Number(readline.question('Please enter your first number'));\n var num2 = Number(readline.question('Please enter your second number'));\nreturn console.log('The result is:', num1 / num2);\n}", "function budgetCalculator(watch, mobile, laptop) {\n if (watch < 0 || mobile < 0 || laptop < 0 || typeof (watch) != \"number\" || typeof (mobile) != \"number\" || typeof (laptop) != \"number\") {\n var errorText = \"Input should be numbers and a positive numbers. Put positive numbers of how many watch, mobile or laptop you want to buy?\";\n return errorText;\n } else {\n var total = watch * 50 + mobile * 100 + laptop * 500;\n return total;\n\n }\n\n}", "function woodCalculator(chair, table, bed)\n{\n //first condition to check if any valu is negative or not. If negative necessary warnings given\n if(chair<0 || table<0 || bed<0)\n {\n return \"Physical entity can not be negative\"\n }\n //take inputs and multiply it with cubic feet wood needed to make single one and add all three\n else\n {\n var chairWood = chair*1;\n var tableWood = table*3;\n var bedWood = bed*5;\n var totalWood = chairWood + tableWood + bedWood;\n }\n return totalWood;\n}", "function calculate(model) {\n let args = getEntropArgs(model)\n startCalcProgress()\n setTimeout(\n () => {\n let start = new Date().getTime()\n // calling function registered by entrop wasm app:\n let pwd = window.Entrop_GenPassword(args)\n stopCalcProgress()\n\n let duration = new Date().getTime() - start\n if (pwd.startsWith('error: ')) {\n model.err = pwd\n writeOutputs(model)\n return\n }\n\n model.warn = `duration: ${duration}ms`\n if (pwd.length < model.reqLen) {\n model.warn += ', the result is shorter than required, length = ' + pwd.length\n }\n model.pwd = pwd\n writeOutputs(model)\n\n if (model.copyToClipboard) {\n copyToClipboard(model.pwd)\n }\n }, calcDelayMs)\n }", "function equalResult(){\n equation.push(aNumber);\n aNumber = \"\";\n var result = math.eval(equation.join(\"\"));\n equation = [];\n equation.push(result);\n if (Number.isNaN(result)){\n result = \"Error\"; \n }\n answerBox.textContent = result;\n eqtext += \" \" + \"=\" + \" \" + result;\n result = \"\";\n equationBox.textContent = eqtext;\n eqtext = \"\";\n \n}", "function onCalculateForce() {\n\n // This function will get all the value when calculate button was clicked\n getForceCalculationValue();\n\n // First check if input value contains 2 input\n // If the input is empty the variable will contain empty string \"\"\n const onlyForceEmpty = force == \"\" && mass != \"\" && acceleration != \"\";\n const onlyMassEmpty = mass == \"\" && force != \"\" && acceleration != \"\";\n const onlyAccelerationEmpty = acceleration == \"\" && force != \"\" && mass != \"\";\n\n // Use a if..if else to check for each condition\n if (onlyForceEmpty) {\n // Set the value of the input field to calculated answer\n document.querySelector(\"#force\").value = mass * acceleration;\n } else if (onlyMassEmpty) {\n document.querySelector(\"#mass\").value = force / acceleration ;\n } else if (onlyAccelerationEmpty) {\n document.querySelector(\"#acceleration\").value = force / mass;\n } else {\n // If none of the condition fulfill, prompt an alert and ask user to\n // fill in exactly 2 value for calculation\n alert(\"Please make sure you fill in exactly 2 value for calculation\")\n }\n}", "function evaluateAnswer(){\n\tvar y = parseInt(second.innerHTML);\n\tvar x = parseInt(first.innerHTML);\n\tvar i = operator.innerHTML;\n\t// checks the operator passed\n\tswitch(i){\n\t\tcase '+':\n\t\t\tcompute = x + y;\n\t\t\tbreak;\n\t\tcase '-': \n\t\t\tcompute = x - y;\n\t\t\tbreak;\n\t\tcase '*':\n\t\t\tcompute = x * y;\n\t\t\tbreak;\n\t\tcase '/': \n\t\t\tcompute = x / y;\n\t\t\tbreak;\n\t}\n\n\tif (compute === parseFloat(document.getElementById('result').value)){\n\t\tdocument.getElementById('right').innerHTML = ++right;\n\t\tdisplayMessage('Congrats, you have won the game');\n\t}\n\telse{\n\t\tdocument.getElementById('wrong').innerHTML = ++wrong;\n\t\tdisplayMessage('That is not correct, Please try next problem');\t\t\n\t}\n\tsetTimeout(init, 5000);\n }", "function calculate(){\n\t//get inputs\n\tvar M_adj = JSON.parse(graphInput.value);\n\t\n\t//log interpretation to console\n\tconsole.log(\"Inputted Graph:\");\n\tconsole.log(M_adj);\n\t\n\toutput.innerText = \"Calculating...\";\n\t\n\tsetTimeout(function(){ //timeout delays start of calculation (5ms), so that \"Calculating...\" can actually be displayed before calculation starts\n\t\t//run function to determine m, and output result\n\t\toutput.innerText = \"m = \"+get_m(M_adj);\n\t},5);\n}", "function checkAnswer(){\n var sum = operand1 +operand2;\n var userAnswer = document. getElementById(\"answerInput\").value;\n \n if(sum == userAnswer){\n document.getElementById(\"response\").innerHTML=\"Correct!\";\n }\n else{\n document.getElementById(\"response\").innerHTML=\"Congrats, YOU GOT IT WRONG SUCKER!\";\n }\n \n}", "function modulusNumbers() {\r\n const result = document.getElementById(\"addResult\");\r\n\r\n // Calculating Multiplication\r\n const output = parseInt(num1.value / num2.value);\r\n const modulusResult = num1.value - num2.value * output;\r\n if (isFinite(modulusResult)) {\r\n result.value = modulusResult;\r\n // Hide results\r\n document.getElementById(\"result\").style.display = \"block\";\r\n // Show LOader\r\n document.getElementById(\"loading\").style.display = \"none\";\r\n } else {\r\n showError(\"Please check your Numbers..\");\r\n }\r\n}", "function calculateBmi() {\n\n let weight = document.getElementById(\"weight_input\").value;\n let height = document.getElementById(\"height_input\").value;\n bmi = weight / (height / 100) ** 2\n\n //if any input is empty, give message that you have to fill inn all of the inputs.\n if (weight == \"\" || height == \"\") {\n document.getElementById(\"bmi_output\").innerHTML = \"Please fill all of the inputs\";\n document.getElementById(\"bmi_output_def\").innerHTML = \"\";\n }\n //if all inputs is filled, run this else that runs some if statements, dependent on the bmi.\n else {\n document.getElementById(\"bmi_output\").innerHTML = \"Your BMI is: \" + parseFloat(bmi).toFixed(2);\n\n if (bmi < 18.4) {\n document.getElementById(\"bmi_output_def\").innerHTML = \"That makes you: Underweight\";\n }\n else if (bmi < 24.9) {\n document.getElementById(\"bmi_output_def\").innerHTML = \"That makes you: Normalweight\";\n }\n else if (bmi < 29.9) {\n document.getElementById(\"bmi_output_def\").innerHTML = \"That makes you: Overweight\";\n }\n //a bmi over 100 doesn't make any sense.\n else if (bmi > 100) {\n document.getElementById(\"bmi_output_def\").innerHTML = \"That can't be right, try again\";\n }\n else {\n document.getElementById(\"bmi_output_def\").innerHTML = \"That makes you: Obese\";\n }\n }\n}", "function checkUserPerformance() {\n let numberCorrect = 0;\n let tempAnswerArr = userData.input.split(',');\n let userAnswers = [];\n\n // Go through full user input, isolate their answers into an array\n for (i = 0; i < tempAnswerArr.length-1; i += 3) {\n // Replace \"'\" signs\n let ans = tempAnswerArr[i].replace(/'/g, '');\n // Append to array\n userAnswers.push(ans);\n }\n\n // For this case, the 'right' answers are problems in heuristics [1,4] and [9].\n let faultyHeuristics = [0, 1, 2, 3, 5, 8];\n // Compare userAnswers to right answers\n for (i = 0; i < faultyHeuristics.length; i++) {\n // For each\n let ans = userAnswers[faultyHeuristics[i]];\n\n // Check if user has specified there is an issue with the heuristic\n if (ans >= 1 && ans <= 4) {\n // If so: add one to their tally.\n numberCorrect += 1;\n }\n }\n\n return numberCorrect;\n}", "function calculation () {\n number = document.getElementById('base-a').value\n number = parseInt(number)\n number2 = document.getElementById('base-b').value\n number2 = parseInt(number2)\n height = document.getElementById('height').value\n height = parseInt(height)\n number = number + number2\n number = number * height / 2\n document.getElementById('answer').innerHTML = number\n}", "static test03() {\n let cal = new Calc();\n cal.receiveInput(2);\n cal.receiveInput(Calc.OP.MULT);\n cal.receiveInput(7);\n cal.receiveInput(Calc.OP.EQ);\n return cal.getDisplayedNumber() === 2 * 7;\n }", "function runProgram(input) {\n input = input.trim().split(\"\\n\");\n\n let C = Number(input[0]),\n n = Number(input[1]);\n\n // console.log(\"C, n\", C, n);\n\n let values = input[2].trim().split(\" \").map(Number),\n weights = input[3].trim().split(\" \").map(Number);\n\n // console.log(\"values, weights\", values, weights);\n\n let arr = [];\n\n for (let i = 0; i < n; i++) {\n arr.push([values[i] / weights[i], values[i], weights[i]]);\n }\n\n // console.log(\"arr\", arr);\n\n arr.sort((a, b) => b[0] - a[0]);\n // console.log(\"arr\", arr);\n\n let currWt = 0,\n currValue = 0;\n let i = 0,\n result = 0;\n\n while (currWt < C && i < n) {\n currValue = currValue + arr[i][1];\n currWt = currWt + arr[i][2];\n\n if (currWt >= C) {\n let fraction = Math.round(((currWt - C) * arr[i][1]) / arr[i][2]);\n result = currValue - fraction;\n }\n i++;\n }\n console.log(result)\n}", "function checkAnswer() {\r\n // get first factor\r\n var factor1 = document.getElementById('factor1').innerHTML;\r\n console.log(\"factor 1 = \" + factor1);\r\n // get second factor\r\n var factor2 = document.getElementById('factor2').innerHTML;\r\n console.log(\"factor 2 = \" + factor2);\r\n // get answer\r\n var answer = document.getElementById('answer').value;\r\n console.log(\"answer = \" + answer);\r\n console.log((factor1*factor2) == answer);\r\n return (factor1*factor2) == answer;\r\n}", "function calculateAccuracy(){\n return Math.round( (cardMatches / matchAttempts) * 100 );\n}", "function showResults() {\r\n $(\"#optimalSolutionPanel\").hide();\r\n \r\n $('#results').show();\r\n experimentComplete();\r\n// enablePlayAgain();\r\n \r\n if (numRoundsWithStar >= 3) {\r\n writeAward(\"No Instruction Needed\");\r\n payAMT(true,0.20); \r\n } else {\r\n payAMT(true,0.0); \r\n }\r\n \r\n// quit();\r\n \r\n}", "function calc() {\n // 4. Display output to user\n answer.innerText = parseInt(first.value) + parseInt(second.value);\n}", "function squareRoot()\n {\n current_input = Math.sqrt(current_input);\n displayCurrentInput();\n }", "function abTest(a, b) {\r\n if (a > 0 || b > 0) {\r\n return undefined;\r\n } else {\r\n console.log(\"not undefined\");\r\n }\r\n \r\n return Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b), 2));\r\n }", "function DoCalculation()\r\n {\r\n // Calculate intermediate values.\r\n\r\n upstreamPressureBarAbsolute = 1.01325 + (upstreamPressure / 1000);\r\n\r\n // Calculate the Reynolds number.\r\n\r\n reynoldsNumber = 25043 * baseGasFlowRate / internalPipeDiameter;\r\n\r\n // Calculate the base 10 logarithm of the Reynolds number. Modern browsers\r\n // provide the 'Math.log10' function , but Internet Explorer 11 does not.\r\n // However, all browsers provide the base 'e' (natural) logarithm as the\r\n // 'Math.log' function. As log10(n) = log(n) * log10(e), and log10(e) is\r\n // a constant, we can easily calculate the base 10 logarithm required.\r\n\r\n log10ReynoldsNumber = Math.log(reynoldsNumber) * Math.LOG10E;\r\n\r\n // Calculate 'x', which will be used in calculating the friction factor.\r\n\r\n x = log10ReynoldsNumber - 5;\r\n\r\n // Calculate 'x', squared which will be used in calculating the friction\r\n // factor.\r\n\r\n xSquared = x * x;\r\n\r\n // Calculate the smooth pipe friction factor.\r\n\r\n frictionFactorSmoothPipe = Math.pow(14.7519 + (3.5657 * x) +\r\n (0.0362 * xSquared), -2);\r\n\r\n // Calculate the friction factor.\r\n\r\n frictionFactor = frictionFactorSmoothPipe / (pipeEfficiencyFactor *\r\n pipeEfficiencyFactor);\r\n\r\n // Calculate some more intermediate values.\r\n\r\n temporary1 = (averageCompressibilityFactor *\r\n averageTemperatureOfFlowingGas *\r\n standardPressure * standardPressure) /\r\n (c * c * standardTemperature * standardTemperature);\r\n\r\n temporary2 = baseGasFlowRate * baseGasFlowRate * temporary1 *\r\n specificGravity * pipeLength * frictionFactor /\r\n Math.pow(internalPipeDiameter, 5);\r\n\r\n // Calculate the downstream pressure.\r\n\r\n downstreamPressureBarAbsolute = Math.sqrt((upstreamPressureBarAbsolute *\r\n upstreamPressureBarAbsolute) - temporary2);\r\n\r\n // Calculate the pressure loss.\r\n\r\n pressureLossBarAbsolute = upstreamPressureBarAbsolute -\r\n downstreamPressureBarAbsolute;\r\n\r\n // Now calculate the output values to be displayed.\r\n\r\n // Convert the pressure loss to millibars.\r\n\r\n pressureLossMillibars = pressureLossBarAbsolute * 1000;\r\n\r\n // Correct the pressure loss for changes in altitude.\r\n\r\n correctedPressureLossMillibars = pressureLossMillibars - (0.048 *\r\n changeInAltitude);\r\n\r\n // We probably do not need to calculate the velocity for <= 75 millibars\r\n // and > 75 millibars as only one of these will be relevant.\r\n\r\n // Calculate the velocity (<= 75 millibars).\r\n\r\n velocityLE75mb = 353 * baseGasFlowRate / (internalPipeDiameter *\r\n internalPipeDiameter);\r\n\r\n // Calculate the velocity (> 75 millibars). This part of the calculation is\r\n // laid out in a nested fashion to make it clear what is going on with all\r\n // the parentheses.\r\n\r\n velocityGT75mb = (353 * baseGasFlowRate * standardPressure) /\r\n (\r\n internalPipeDiameter * internalPipeDiameter *\r\n Math.pow\r\n (\r\n (\r\n upstreamPressureBarAbsolute *\r\n upstreamPressureBarAbsolute\r\n ) -\r\n (\r\n 3730 * baseGasFlowRate * baseGasFlowRate * pipeLength *\r\n frictionFactor /\r\n Math.pow\r\n (\r\n internalPipeDiameter,\r\n 5\r\n )\r\n ),\r\n 0.5\r\n )\r\n )\r\n\r\n if (upstreamPressureBarAbsolute > 1.08825)\r\n {\r\n correctedVelocity = velocityGT75mb;\r\n }\r\n else\r\n {\r\n correctedVelocity = velocityLE75mb;\r\n }\r\n }", "function calculate(operation) {\r\n let result;\r\n try {\r\n result = eval(operation); \r\n } catch (error) {}\r\n\r\n if ( result === 0 || isFinite(result) && Boolean(result) ) {\r\n document.getElementById('display').value = result;\r\n } else {\r\n document.getElementById('display').value = 'Invalid operation';\r\n }\r\n\r\n}", "function giveResult(){\n\n\tif (calculation['operator'] == \"+\"){\n\t\tlet result = parseFloat(calculation['operand']) + parseFloat(calculation['operand2']);\n\t\treturn Math.round((result + Number.EPSILON) * 100) / 100;\n\t\n\t}else if (calculation['operator'] == \"-\"){\n\t\tlet result = parseFloat(calculation['operand']) - parseFloat(calculation['operand2']);\n\t\treturn Math.round((result + Number.EPSILON) * 100) / 100;\n\t\n\t}else if (calculation['operator'] == \"*\"){\n\t\tlet result = parseFloat(calculation['operand']) * parseFloat(calculation['operand2']);\n\t\treturn Math.round((result + Number.EPSILON) * 100) / 100;\n\t\n\t}else if (calculation['operator'] == \"/\"){\n\t\t\n\t\t// Dividing by 0 case\n\t\tif (calculation['operand2'] == \"0\"){\n\t\t\treturn \"XD\";\n\t\t}\n\t\tlet result = parseFloat(calculation['operand']) / parseFloat(calculation['operand2']);\n\t\treturn Math.round((result + Number.EPSILON) * 100) / 100;\n\t}\n}", "function calculate(){\r\n var output = document.getElementById(\"ans\").value;\r\n var sol = eval(output);\r\n document.getElementById(\"ans\").value = sol;\r\n}", "async calculateFuel() {\n let arr = []\n await this.checkError();\n if (this.state.carError === false && this.state.avgError === false && this.state.timeError === false) {\n await this.finalMath()\n this.setCarTrack()\n this.displayResults()\n\n }\n }", "function fnal()\n{\n\n//Assign the final result from the math equation to fmark \n\nlet fmark = exam(75)+crsmark(40)\nconsole.log(fmark)\n\n}", "function budgetCalculator(wactch, mobile, laptop) {\n if (wactch < 0 || mobile < 0 || laptop < 0) { // exceptional condition as item cannot be nagetive but can be 0 or higher\n console.log(\"item cannot be nagetive\")\n } else {\n total = wactch * 50 + mobile * 100 + laptop * 500; //calculate total cost\n return total;\n }\n}", "function mathResaults(num1, num2) {\n console.log(num1, num2);\n console.log(num1 + num2);\n if(num1 <= num2){\n console.log(num2 - num1);\n } else {\n console.log(num1 - num2);\n }\n console.log(num1 * num2);\n if(num1 <= num2){\n console.log(num2 / num1);\n } else {\n console.log(num1 / num2);\n }\n console.log(num1 % num2);\n console.log(num2 % num1);\n}", "score(inputs, output) {\n var d = Math.abs(inputs[0] - inputs[1]);\n d = Math.abs(d - output) + 0.1;\n return 1 / d;\n }", "function main() {\n let firstNumber, secondNumber; //Variables particular to JavsScript Assignment\n //Get the value of the Heighth Input Field, id=\"testfield1\", assign it to a variable\n firstNumber = document.getElementById(\"textField1\").value;\n secondNumber = document.getElementById(\"textField2\").value;\n //Validate by alert or HTML Text in p-tag\n document.getElementById(\"validityTest1\").innerHTML = alert (testNaN (firstNumber) );\n document.getElementById(\"validityTest1\").innerHTML = testNaN (firstNumber);\n document.getElementById(\"validityTest2\").innerHTML = alert (testNaN (secondNumber) );\n document.getElementById(\"validityTest2\").innerHTML = testNaN (secondNumber);\n if (stop == true) {\n document.getElementById(\"answer\").innerHTML = \"Restart because I said so.\"; //Change to more appropriate message\n } else {\n //Difference between calling functions with arguements and sending to parameter's, local variables\n console.log(\"What did you say?\", solution (firstNumber, secondNumber)); // Change to more appropriate message\n document.getElementById(\"answer\").innerHTML = \"What did you say? \" + solution (firstNumber, secondNumber);\n }\n} //End main()" ]
[ "0.65036535", "0.6237563", "0.61095834", "0.60646546", "0.60173666", "0.5941137", "0.5925298", "0.5916405", "0.5908635", "0.58786196", "0.5875984", "0.58577573", "0.5820902", "0.5811287", "0.5797421", "0.57817173", "0.57722014", "0.5770395", "0.5759878", "0.57383597", "0.57272774", "0.5699586", "0.56743795", "0.5667224", "0.5663936", "0.56598353", "0.5651169", "0.5642513", "0.5631276", "0.56266725", "0.5621059", "0.56198144", "0.559822", "0.5597576", "0.55974436", "0.5595484", "0.55867404", "0.5573981", "0.55734056", "0.5569147", "0.55682147", "0.5562945", "0.55530393", "0.5550512", "0.55397344", "0.5537147", "0.5533967", "0.55262154", "0.5519629", "0.5506982", "0.5505618", "0.5484342", "0.5482998", "0.5479567", "0.5474345", "0.5470273", "0.5469576", "0.5461998", "0.5459987", "0.5459917", "0.54573697", "0.5456778", "0.5451371", "0.54481375", "0.5447713", "0.5430701", "0.54285413", "0.5417893", "0.5417305", "0.54038316", "0.54012656", "0.54010504", "0.54006195", "0.53989625", "0.53974825", "0.5397271", "0.5395752", "0.53948545", "0.53913456", "0.5383925", "0.537652", "0.53706235", "0.5368371", "0.53681916", "0.53679734", "0.53531307", "0.5348384", "0.5346791", "0.534397", "0.5343615", "0.53430325", "0.53429073", "0.5340835", "0.5340338", "0.5334106", "0.5330033", "0.5326576", "0.53250664", "0.5324644", "0.53205854", "0.5319722" ]
0.0
-1
Gets all call by all customers and sets them to statusList state.
getAllCalls(){ GetAllCustomers().then(async(response) => { const callList = await Promise.all(response.data.map(async (customer, id) => { var callResponse = await GetCallLogsByCustomerId(customer.id) if(callResponse.status == "OK") { return callResponse.data } })) const statusResponse = await GetAllStatus() if(statusResponse.status == "OK") { this.setState({statusList: statusResponse.data}) } this.buildCallsTableData(callList, response.data); }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCustomers() {\n CustomerService.getCustomers()\n .success(function(custs) {\n $scope.gridOpts.data = custs;\n })\n .error(function(error) {\n $scope.status = 'Unable to load customer data: ' + error.message;\n });\n }", "getCustomersList(state) {\n return state.customersList;\n }", "function getCustomerList() {\n\t// TODO: add logic to call backend system\n\n\n}", "function getAllCustomers() {\n var customers = stripe.customers.list(function(err, customers) {\n // asynchronously called\n });\n\n return customers;\n}", "get customersList() {\n\t\treturn this._customersList;\n\t}", "setCustomersList(state, payload) {\n state.customersList = payload;\n }", "async getAllCustomers() {\n\n try {\n let allCustomers = await customers.findAll();\n\n if (allCustomers.length <= 0) {\n return {\n msg: 'No customers found..',\n payload: 1\n }\n }\n\n let customerList = allCustomers.map((item, index, arr) => {\n return {\n customer: item.dataValues,\n index: index\n };\n });\n\n return {\n msg: 'Success',\n payload: 0,\n customerList: customerList\n }\n\n } catch (e) {\n return {\n msg: 'An error occurred while trying to get the customer list.',\n payload: 1\n }\n }\n\n }", "getListOfCustomers () {\n fetch(this.ROUTING_URL+\"getCustomersList\")\n .then(response=>response.json())\n .then(json=>json.map(c=>[customer(c), false])).then(json=>{\n this.listOfCustomers = json; // assigning json response to list of customer global array.\n const customerListDiv = select(\"customerListView\");\n setAnElementClassToVisible(\"customerListContainer\");//making div visible\n customerListDiv.innerHTML = this.showCustomersResult(); // drawing html table element\n });\n }", "function customerList() {\n $.ajax({\n url: '/api/Customers/getCustomers',\n type: 'GET',\n dataType: 'json',\n success: function (customers) {\n customerListSuccess(customers);\n },\n error: function (request, message, error) {\n handleException(request, message, error);\n }\n });\n}", "function getCustomers() {\n console.log('8');\n $.get(\"/api/customers\", renderCustomerList);\n }", "customers(){\n const allCustomers = this.deliveries().map(delivery=>delivery.customer());\n return [...new Set(allCustomers)];\n }", "function getSCustomers () {\n console.log ('Get all sender customers');\n $.ajax ({\n type: 'GET',\n url: rootURL + \"/customer/senders\",\n dataType: \"json\", // data type of response\n success: function (data) {\n sCustomers = data;\n rederDataList (sCustomers, 'sendPhoneList', \"sendNameList\");\n },\n error: function (data) {\n console.log (\"failed to load or render senders\", data);\n }\n });\n}", "function getOrdersByCustomers(cust) {\n $.ajax({\n url: \"/Customer/Orders/\" + cust.CustomerId,\n type:\"GET\"\n }).done(function (resp) {\n self.Orders(resp);\n }).error(function (err) {\n self.ErrorMessage(\"Error! \" + err.status);\n });\n }", "set customersList(customersList) {\n\t\treturn this._customersList = customersList;\n\t}", "async getCustomers() {\n const customers = await this.request('/vehicles', 'GET');\n let customersList = [];\n if (customers.status === 'success' && customers.data !== undefined) {\n customersList = customers.data\n .map(customer => customer.ownerName)\n .filter((value, index, self) => self.indexOf(value) === index)\n .map(customer => ({\n label: customer,\n value: customer\n }));\n }\n return customersList;\n }", "function getRCustomers () {\n console.log ('Get all receiver customers');\n $.ajax ({\n type: 'GET',\n url: rootURL + \"/customer/receivers\",\n dataType: \"json\", // data type of response\n success: function (data) {\n rCustomers = data;\n rederDataList (rCustomers, 'receiverPhoneList', 'receiverNameList');\n },\n error: function (data) {\n console.log (\"failed to load or render receivers\", data);\n }\n });\n}", "async function getServiceCalls() {\n const data = await API.get(\"instapostservicecallsapi\", `/service-calls`);\n updateServiceCalls(data.service_calls_count[\"service-calls\"]);\n setLoading(true);\n }", "getAll(query, isDenials = true, customer = null) {\n const dateRange = this.getDateParams();\n return Resource.get(this).resource(`SupplierCompany:getAllActivityRevised`, {\n dateRange,\n query,\n companyId: auth.get(this).user.company._id,\n isDenials,\n customer\n })\n .then(res => {\n let inventories = res.inventories;\n const payments = Array.isArray(res.payments) ? res.payments : null;\n // Combine payment and denials, include running total\n if (customer && isDenials) {\n inventories = this.handleDenialView(inventories, payments);\n }\n const meta = res.meta;\n this.activity = inventories;\n this.displayData.activity = inventories;\n this.displayData.totals.grandTotal = meta.totals;\n this.displayData.totals.pageTotal = meta.pageTotals;\n this.displayData.totalPages = meta.pages;\n this.displayData.totalItems = meta.total;\n })\n .then(() => {\n if (!this.safeData.retailers.length) {\n // Get list of retailers\n this.getRetailerList();\n }\n })\n .then(() => {\n if (this.displayData.activity.length) {\n this.getParamsInRange();\n } else {\n this.displayData.batches = [];\n }\n });\n }", "list() {\n return this.iugu.makePagedRequest('GET', '/customers');\n }", "function findAllCustomers (custType) {\n console.log ('find all senders');\n $.ajax ({\n type: 'GET',\n url: rootURL + '/customer/' + custType,\n dataType: \"json\", // data type of response\n success: function (data, textStatus, jqXHR) {\n renderCustomerTableData (null, data, custType);\n var phonelist=\"\";\n var namelist=\"\";\n if (custType==\"senders\") {\n sCustomers = data;\n phonelist=\"sendPhoneList\";\n namelist=\"sendNameList\";\n } else if (custType ==\"receivers\") {\n rCustomers = data;\n phonelist=\"receiverPhoneList\";\n namelist=\"receiverNameList\";\n }\n rederDataList (data, phonelist, namelist);\n },\n error: function (data) {\n console.log (\"failed\", data);\n }\n });\n}", "function getCalls() {\n return $http.get(baseUrl+\"calls\",{headers:setHeaders()});\n }", "findAllCustomer() {\n\n axios.get(\"http://localhost:9000/api/viewallcustomers\")\n .then(response => response.data)\n .then((data) => {\n this.setState({ customer: data });\n });\n }", "getCustomersThisCompany(params) {\n // Don't get more than once\n if (this.displayData.customers.length) {\n return new Promise(resolve => resolve());\n }\n return Resource.get(this).resource('Employee:getAllCustomersThisCompany', params)\n .then(res => {\n this.displayData.customers = res.filter(customer => customer.firstName !== '__default__');\n });\n }", "function toggleAllCustomers(){\n\tvar customerIDList = $(\"#customerIDList\").val().split(',');\n\tcustomerIDList.pop();\n\t\n\n\tfor(var i=0;i<customerIDList.length;i++){\n\t\tvar customer_id = customerIDList[i];\n\n\t\tif(selectAll == true){\n\t\t\tselectedCustomers[customer_id] = customer_id;\n\t\t}\n\t\telse{\n\t\t\tif (customer_id in selectedCustomers){\n\t\t\t\tdelete selectedCustomers[customer_id];\n\t\t\t}\n\t\t}\n\t}\n\n\tif(selectAll){\n\t\t$(\".selectTableItem\").each(function(){\n\t\t\t$(this).prop('checked',true);\n\t\t});\n\t}\n\telse{\n\t\t$(\".selectTableItem\").each(function(){\n\t\t\t$(this).prop('checked',false);\n\t\t});\n\t}\n\n\tvar nCustomers = Object.keys(selectedCustomers).length;\n\n\tif (nCustomers > 0){\n\t\t$(\"#customer_action_bar\").css(\"display\",\"inline\");\n\t\t\n\t\tif(nCustomers == 1){\n\t\t\t$(\"#n_customers_selected\").html(\"<b>\" + nCustomers + \"</b> customer selected \");\n\t\t}\n\t\telse{\n\t\t\t$(\"#n_customers_selected\").html(\"<b>\" + nCustomers + \"</b> customers selected \");\n\n\t\t}\n\n\t}\n\telse if (nCustomers == 0){\n\t\t$(\"#customer_action_bar\").css(\"display\",\"none\");\n\t}\n\n\tselectAll = !selectAll;\n}", "async fetchAllCustomerRequest() {\r\n await this.checkLogin();\r\n var response = await axios.get(Config.customerRequestApiUrl, {\r\n headers: {\r\n Authorization: \"Bearer \" + AuthHandler.getLoginToken(),\r\n },\r\n });\r\n return response;\r\n }", "function getAllCustomers() {\n return datacontext.get('Product/GetAllCustomers');\n }", "getListSiteByCustomer() {\n let self = this, curItem = this.state.curItem, params = {\n id_customer: !Libs.isBlank(this.user) ? this.user.id_user : null\n };\n CustomerViewService.instance.getListSiteByCustomer(params, (data, total_row) => {\n if (Libs.isArrayData(data)) {\n var findItem = Libs.find(data, 'site_default', true);\n if (!Libs.isObjectEmpty(findItem)) {\n curItem = Object.assign(curItem, findItem);\n } else {\n if (!Libs.isObjectEmpty(data[0]) && !Libs.isBlank(data[0].id)) {\n curItem = Object.assign(curItem, data[0]);\n } else {\n curItem = {};\n }\n }\n\n self.setState({ dataListSite: data, curItem: curItem }, () => {\n self.getCustomerViewInfo();\n });\n } else {\n curItem = {};\n self.setState({ dataListSite: [], curItem: curItem });\n }\n })\n }", "getCustomers() {\r\n\t\tvar that = this;\r\n\t\t$.ajax({\r\n\t\t method: \"POST\",\r\n\t\t url: \"/ajaxgetcustomers\",\r\n\t\t data: { OrderID: that.orderId }\r\n\t\t})\r\n\t\t.done(function( resp ) {\r\n\t\t\tthat.CustomersData = resp;\r\n\t\t\tthat.setupCustomersListbox();\r\n\t\t\tthat.CustomersDone = true;\r\n\t\t\tthat.error = false;\r\n\t\t\treturn that.getOrder();\r\n\t\t\t\r\n\t\t})\r\n\t\t.fail(function(){\r\n\t\t\talert(\"Ajax Failed in getCustomers()\");\r\n\t\t\tthat.CustomersDone = false;\r\n\t\t\tthat.error = true;\r\n\t\t\treturn false;\r\n\t\t});\r\n\r\n }", "async getCustomersList(_data) {\r\n\t\tlet return_result = {};\r\n\t\t_data.columns = {\r\n\t\t\tcustomer_id: \"customers.id\",\r\n\t\t\tfirst_name: knex.raw(\"CAST(AES_DECRYPT(customers.first_name,'\" + encription_key + \"') AS CHAR(255))\"),\r\n\t\t\tlast_name: knex.raw(\"CAST(AES_DECRYPT(customers.last_name,'\" + encription_key + \"') AS CHAR(255))\"),\r\n\t\t\temail: knex.raw(\"CAST(AES_DECRYPT(customers.email,'\" + encription_key + \"') AS CHAR(255))\"),\r\n\t\t\toam_commission: \"customers.oam_commission\",\r\n\t\t\towner_commission: \"customers.owner_commission\",\r\n\t\t\tgain_commission: \"customers.gain_commission\",\r\n\t\t\tdob: \"customers.dob\",\r\n\t\t\tgender: \"customers.gender\",\r\n\t\t\tcreated_at: knex.raw(\"DATE_FORMAT(customers.created_at,'%b %d,%Y, %h:%i:%S %p')\"),\r\n\t\t\tphone: knex.raw(\"CAST(AES_DECRYPT(customers.phone,'\" + encription_key + \"') AS CHAR(255))\"),\r\n\t\t\tcustomer_unique_id: knex.raw(\"CAST(AES_DECRYPT(customers.customer_unique_id,'\" + encription_key + \"') AS CHAR(255))\")\r\n\t\t};\r\n\r\n\t\tlet obj = customerModel.getCustomersList(_data);\r\n\t\treturn obj.then(async (result) => {\r\n\t\t\tif (result.length > 0) {\r\n\t\t\t\treturn_result.customer_list = result;\r\n\t\t\t\tdelete _data.limit;\r\n\t\t\t\tdelete _data.offset;\r\n\t\t\t\tdelete _data.columns;\r\n\t\t\t\tlet countData = await customerModel.getCustomersList(_data);\r\n\t\t\t\treturn_result.total_records = countData[0].total_records\r\n\r\n\t\t\t\treturn response.response_success(true, status_codes.customer_found, messages.customer_found, (return_result));\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Error(\"customers_not_found\")\r\n\t\t\t}\r\n\t\t}).catch((err) => common_functions.catch_error(err));\r\n\t}", "customers () {\n const allCustomers = this.deliveries().map(\n function (delivery) {\n return store.customers.find(\n function(customer) {\n return customer.id === delivery.customerId\n }\n )\n }\n )\n \n // return unique customers\n return Array.from(new Set(allCustomers))\n }", "function getCustomers(contacts) {\n\t\tcontactsId = contacts || '';\n\t\tif (contactsId) {\n\t\t\tcontactsId = '/?contacts_id=' + contactsId;\n\t\t}\n\t\t$.get('/api/contacts' + contactsId, function(data) {\n\t\t\tconsole.log('customers', data);\n\t\t\tcustomers = data;\n\t\t\tif (!customers || !customers.length) {\n\t\t\t\tdisplayEmpty(contacts);\n\t\t\t} else {\n\t\t\t\tinitializeRows();\n\t\t\t}\n\t\t});\n\t}", "getAllCustomers() {\n this.CustomerService.fetchAll()\n .then(data => {\n dataTable = data; // set received data to dataTable so that\n if (data !== undefined) {\n dataTable.sort(function (a, b) {\n return a.id > b.id\n });\n this.initData(); // initData() method can init table with it. \n }\n });\n }", "function getCustomers(){\n $scope.customer.action = \"fetchAll\";\n $http.post('/customerActions',$scope.customer).success(function(response){\n if(response == \"fail\"){\n $timeout(function (){\n $scope.isLoading = null; \n }, 2000);\n $scope.user = \"Guest\";\n $scope.isLoading = \"Error in fetching customers!\";\n }\n else if(response == \"connection_error\"){\n // when the service connection was not successful\n $scope.isLoading = \"Error in fetching customers!\";\n swal({title: \"Connection Error!\", text: \"Connection could not be established! Please Refresh\", type: \"error\", confirmButtonText: \"ok\" });\n swal.close();\n }\n else{\n $scope.isLoading = null;\n $scope.customers =response;\n }\n });\n }", "function getAll() {\n activityService.getAll()\n .success(function(data) {\n $scope.activityList = data;\n })\n .error(function(error) {\n $scope.status = error.message;\n });\n }", "function fetchAll() {\n appState.setFetchingOffersList(true);\n\n let offersPromise = getOffers();\n\n // when offers are successfully fetched, update the offers list; set fetching flag to false either way\n offersPromise\n .then(offers => {\n appState.setOffersList(fromJS(offers));\n appState.setFetchingOffersList(false, true);\n })\n .catch(() => appState.setFetchingOffersList(false));\n}", "async fetchCustomerList(){\n const response = await getCustomerList();\n const data = response.data.values;\n console.log('Data ');\n console.log(data);\n this.setState({customers: data})\n }", "fetchSpecificCustomers(id) {\r\n return Api().get('/customers/' + id)\r\n }", "async function getallwillStatus() {\n let accounts = await web3.eth.getAccounts();\n let willStat = await contract.methods\n .WillStatus(willstatAddr)\n .call({ from: accounts[0] });\n setWillStatus(willStat);\n }", "function getCustomers() {\n var pagina = 'ProjectPlans/listCustomers';\n var par = `[{\"prm\":\"\"}]`;\n var tipo = 'json';\n var selector = putCustomers;\n fillField(pagina, par, tipo, selector);\n}", "fetchCustomers() {\r\n return Api().get('/customers')\r\n }", "customers() {\n return this.deliveries().map(function(delivery) {\n return delivery.customer();\n });\n }", "customers(){\n const customersInNeighborhood =[]\n for(const customer of store.customers){\n if(customer.neighborhoodId === this.id){\n customersInNeighborhood.push(customer)\n }\n }\n return customersInNeighborhood;\n }", "function getClients(){\n $http.get('/tracking/getClients').then(function(response) {\n console.log('client list is:', response.data);\n vm.dataList = response.data;\n buildLists(vm.dataList);\n $http.get('/tracking/getNoGoalClients').then(function(res) {\n console.log('noGoal client list is:', res.data);\n vm.noGoalsData = res.data;\n vm.noGoalsClients = angular.copy(vm.noGoalsData);\n\n // console.log('vm.clientList:',vm.clientList);\n // console.log('vm.locationList:',vm.locationList);\n // console.log('vm.caseManagers:',vm.caseManagers);\n });\n });\n }", "callbackForUsers(data, status) {\n cLogger('callback for all users');\n let users = [];\n if (status >= 200 && status <= 299) { // do we have any data?\n cLogger(data);\n users = data;\n }\n stateManager.setStateByName(this.config.stateNames.users, users);\n }", "function loadCustomers() {\n $.ajax({\n url: \"/Customers\",\n type:\"GET\"\n }).done(function (resp) {\n self.Customers(resp);\n }).error(function (err) {\n self.ErrorMessage(\"Error!!!!\" + err.status);\n });\n }", "getAll(callback) {\n runListContainer(this, {all:true}, callback);\n }", "function getAllBusinesses() {\n const apicall = 'http://localhost:3010/api/businesses';\n fetch(apicall, {\n method: 'GET',\n }).then((response) => {\n if (!response.ok) {\n if (response.status === 401) {\n throw response;\n }\n }\n return response.json();\n }).then((json) => {\n setBusinessList(json);\n json.map((business) =>\n // attach to checkstate\n setBusinesses({...businesses, [business.businessid]: false}),\n );\n })\n .catch((error) => {\n console.log(error);\n });\n }", "fetchCMCListings(store) {\n fetchCMCListings((data) => {\n store.commit('setCMCListings', data);\n store.dispatch('fetchOwnListings');\n });\n }", "customers(){\n const mealCustomerIds =[];\n this.deliveries().forEach(function(delivery){\n mealCustomerIds.push(delivery.customerId)\n });\n let uniquemealCustomerIds = [...new Set(mealCustomerIds)]\n return store.customers.filter(customer => uniquemealCustomerIds.includes(customer.id))\n }", "function all(options, callback) {\n core.api('GET', '/statuses', options, callback);\n }", "getAll() {\n return Resource.get(this).resource('SupplierCompany:getAll')\n .then((res) => {\n this.companies = res;\n });\n }", "componentDidMount(){\n CustomerService.getCustomers()\n .then(customerList => {\n this.setState({\n customerList\n })\n })\n }", "getAllSalesList() {\n fetch(process.env.REACT_APP_API_URL+\"/sales\")\n .then(res => res.json())\n .then(\n result => {\n this.setState({\n isLoaded: true,\n salesList: result,\n });\n },\n error => {\n this.setState({\n isLoaded: true,\n error: error\n });\n }\n );\n }", "function getTarifs(activeCustomer, relatedCustomers) {\n\t// TODO: add logic to call backend system\n\tvar tarifs = lookUpData.tarifs;\n\n\tgetTarifsDone(tarifs);\n}", "setActiveUsers(listData){\n this.activeContacts = listData;\n \n }", "viewAllOrders() {\n this.isViewAllOrders = true;\n this.isViewAllUsers = false;\n this.isViewAllMessages = false;\n this.viewOrders = false;\n this.isAddNewProduct = false;\n this.orderService.getAllOrders().subscribe(orders => {\n this.allOrders = orders;\n console.log(this.allOrders);\n }, err => {\n console.log(err);\n });\n }", "function getAllCustomerByGroup() {\n return datacontext.get('Customer/GetAllCustomerByGroup');\n }", "customers() {\n return this.deliveries().map(delivery => {\n return delivery.customer();\n });\n }", "function allCustomers(req, res){\n var getAllCustomersQuery = \"SELECT * FROM Customer\\n\"+\n \"WHERE active = 'Y'\\n\"+\n \"order by custName\"; \n connection().query(getAllCustomersQuery, function(error, result, fields){\n if(error){\n console.log(\"Hubo un error al obtener la lista de clientes\", error.message);\n return res.status(404).send(\"Hubo un error en la consulta allCustomers\");\n }\n\n if(result.length == 0){\n return res.status(404).json(\"No se encontraron clientes registrados\");\n }\n\n var response = {\n 'clientes': result\n };\n \n res.send(response);\n });\n}", "function getUsers(){\n\t\t\tgetUsersService.getUserList().then(function(data){\n\t\t\t\tlc.listOfUser = data;\n\t\t\t})\n\t\t\t.catch(function(message){\n\t\t\t\texception.catcher('getUserList Service cannot succeed')(message);\n\t\t\t});\n\t\t}", "function fetchStatusList() {\n // Request URL for status\n var statusAPI = testRailURL + \"/index.php?/api/v2/get_statuses\";\n var params = setTestRailHeaders();\n\n // Proxy the request through the container server\n gadgets.io.makeRequest(statusAPI, handleStatusResponse, params);\n}", "function fetchStatusList() {\n // Request URL for status\n var statusAPI = testRailURL + \"/index.php?/api/v2/get_statuses\";\n var params = setTestRailHeaders();\n\n // Proxy the request through the container server\n gadgets.io.makeRequest(statusAPI, handleStatusResponse, params);\n}", "function loadCustomerData(){\n\t\t$.ajax({\n\t\t\tdataType: \"json\",\n type: 'GET',\n data:{},\n url: getAbsolutePath() + \"customer/list\",\n success: function (data) {\n \t$.each(data.list, function( key, value ) {\n \t\tif(value.status == \"Active\")\n \t\t{\n\t $(\"#sltCustomer\").append($('<option>', { \t\n\t value: value.customercode,\n\t text: value.shortname\n\t }));\n \t\t}\n });\n },\n error: function(){\n \t\n }\n\t\t});\n\t}", "function getCandateList() {\n var obj = {\n p: $scope.page,\n ps: 10\n };\n\n CandidatePoolService.getCandidatesByNetwork(obj).then(function(res) {\n $scope.candidateListSumary = res;\n $scope.candidateListSumary.IsSelectingStatus = '';\n });\n\n }", "function loadAllClientInfo() {\n var allClientInfo = [\n {\n 'name' : 'Palak Bansal',\n 'phone' : '1234567890',\n 'email' : 'abc@abc.com',\n 'policyNo' : '16175',\n },\n {\n 'name' : 'Test User',\n 'phone' : '1234567890',\n 'email' : 'abc@abc.com',\n 'policyNo' : '6175',\n },\n {\n 'name' : 'Abc Abc',\n 'phone' : '1234567890',\n 'email' : 'abc@abc.com',\n 'policyNo' : '1175',\n },\n {\n 'name' : 'QWE QWE',\n 'phone' : '1234567890',\n 'email' : 'abc@abc.com',\n 'policyNo' : '33175',\n },\n {\n 'name' : 'TYU TYU',\n 'phone' : '1234567890',\n 'email' : 'abc@abc.com',\n 'policyNo' : '87895',\n },\n {\n 'name' : 'XYZ XYZ',\n 'phone' : '1234567890',\n 'email' : 'abc@abc.com',\n 'policyNo' : '54466',\n },\n {\n 'name' : 'ABD ABD',\n 'phone' : '1234567890',\n 'email' : 'abc@abc.com',\n 'policyNo' : '178175',\n }\n \n ];\n return allClientInfo;\n }", "function getCustomers(res, mysql, context, complete){\n \tmysql.pool.query(\"SELECT C.cust_id, f_name, l_name, total FROM Shopping_cart SC INNER JOIN Customer C ON SC.cust_id = C.cust_id\", function(error, results, fields){\n \t\tif(error){\n res.write(JSON.stringify(error));\n res.end();\n }\n context.customer = results;\n complete();\n \t});\n }", "getCustomerList() {\n axios.get('http://localhost:3001/customers')\n .then((response) => {\n this.setState({\n customers: response.data\n });\n })\n .catch((error) => {\n console.log(error);\n })\n }", "function fillCustomerandSales(){\n for (var i = 0; i<allStores.length; i++){\n popCustomer(allStores[i]);\n popSales(allStores[i]);\n }\n}", "function getContactsAll(type,contact_status) {\n document.location.href = \"/contacts?mode_type=\"+type+\"&contact_status=\"+contact_status;\n}", "processCallsResponse(inResponse) {\n inResponse.data.forEach((item) => {\n if (item.call.revenue || item.call.payout) {\n this.addCallByBuyerId(item.call);\n this.addCallByCampaignId(item.call);\n }\n });\n }", "function getFilteredBuyerList(req, res) {\r\n\t\r\n\tvar customerId = req.getParameter('customerid');\r\n\tvar retjson = {\r\n\t\t\"status\":false,\r\n\t\t\"err\":\"\",\r\n\t\t\"list\":new Array()\r\n\t};\r\n\ttry {\r\n\t\t\r\n\t\t//only execute if clientId is set\r\n\t\tif (customerId) {\r\n\t\t\t\r\n\t\t\t//search for ALL contacts for client\r\n\t\t\tvar cflt = [new nlobjSearchFilter('internalid', null, 'anyof', customerId),\r\n\t\t\t new nlobjSearchFilter('isinactive','contact','is','F')];\r\n\t\t\tvar ccol = [new nlobjSearchColumn('internalid', 'contact',null),\r\n\t\t\t new nlobjSearchColumn('company', 'contact',null),\r\n\t\t\t new nlobjSearchColumn('firstname', 'contact',null).setSort(),\r\n\t\t\t new nlobjSearchColumn('lastname', 'contact',null)];\r\n\t\t\tvar crs = nlapiSearchRecord('customer', null, cflt, ccol);\r\n\t\t\t\r\n\t\t\tif (crs && crs.length > 0) {\r\n\t\t\t\tfor (var c=0; c < crs.length; c++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar ctid = crs[c].getValue('internalid', 'contact', null);\r\n\t\t\t\t\tvar ctdisplay = crs[c].getText('company', 'contact', null)+' : '+\r\n\t\t\t\t\t\t\t\t\t(crs[c].getValue('firstname', 'contact', null)?crs[c].getValue('firstname', 'contact', null):'')+' '+\r\n\t\t\t\t\t\t\t\t\t(crs[c].getValue('lastname', 'contact', null)?crs[c].getValue('lastname', 'contact', null):'');\r\n\t\t\t\t\tretjson['list'].push({\r\n\t\t\t\t\t\t'id':ctid,\r\n\t\t\t\t\t\t'text':ctdisplay\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\tretjson['status'] = true;\r\n\t\t\t} else {\r\n\t\t\t\tretjson['err'] = 'No Results found';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t} catch (buyerlisterr) {\r\n\t\tlog('error','Error getting buyer list',customerId+' customer failed searching for all buyers: '+getErrText(buyerlisterr));\r\n\t\tretjson['err'] = 'Error occured: '+getErrText(buyerlisterr);\r\n\t}\r\n\tlog('debug','json',JSON.stringify(retjson));\r\n\tres.write(JSON.stringify(retjson));\r\n\t\r\n}", "function getAllCustomers() {\n\tajaxData = '';\n\tjQuery.post(\"../php/admin/mservices.php\", {method: \"getAllCustomers\"}, function (data) {\n\t\tajaxData = data;\n\t});\n\treturn ajaxData;\n}", "function getAllContacts(){\n\tvar uri_param = \"GET <b>/api/contacts</b> HTTP/1.1\";\n\t$(\".request-preview-param-uri\").html(uri_param);\n\t$(\".request-preview-param-body\").html('');\n\t\n\tvar list = getStorageContacts(false,0);\n\tvar json = JSON.stringify({\"status\":200,\"contacts\":list});\n\t$(\"#response-preview .text\").jJsonViewer(json);\n\t\n\t\n\tsyncViewTable();\n\t\n\t$.notify(\"Request successful\", \"success\");\n\t$.notify(\"Preview updated\", \"success\");\n\t\n}", "function getProdCustRebates(prodId, custId) {\n $scope.appliedRebates = Rebate.getAppliedRebate({prod: 'product', cust: 'customer', pid: prodId, cid: custId});\n $scope.rebatePrices = Rebate.getAppliedRebate({price: 'price', prod: 'product', cust: 'customer', pid: prodId, cid: custId});\n }", "setStatusOfCall(callId, status, callsArrayId){\n var patchData = {\n callId: callId,\n status: status\n }\n\n UpdateCallLog(patchData).then(response => {\n if(response.status === \"OK\")\n {\n var callsLogs = this.state.calls\n callsLogs[callsArrayId] = response.data;\n this.setState({calls: callsLogs, filteredCalls: callsLogs})\n toast.success(\"Status Changed To \" + response.data.status.description )\n }\n else\n {\n toast.error(\"Error Changing Status\")\n }\n })\n}", "async getAllUsers(){\n data = {\n URI: `${ACCOUNTS}`,\n method: 'GET'\n }\n return await this.sendRequest(data)\n }", "function getAllClients() {\n return clients;\n }", "async _getContacts () {\n try {\n var contacts = await profile.getContacts();\n this.setState({ contacts: contacts });\n } catch (e) {\n console.error(e, e.stack);\n }\n }", "watchGetContactList() {\n this.socket.on(\"GetContactListRequest\", async () => {\n try {\n let contactList = await ContactController.findContactsByUser(\n this.socket.request.user.id\n );\n\n let contactPromiseList = contactList.map(contact => {\n ContactController.subscribeToContact(contact, this.socket);\n\n return ContactController.getContactData(\n contact,\n this.socket.request.user.id\n );\n });\n\n const contacts = await Promise.all(contactPromiseList);\n this.socket.emit(\"GetContactListDone\", contacts);\n } catch (error) {\n console.error(error.message);\n }\n });\n }", "async function GenerateCallList() {\n const markets = (await axios.get('https://mcdex.io/api/markets')).data.data.markets;\n const marketStatus = (await axios.get('https://mcdex.io/api/markets/status')).data.data;\n let id2Info = {};\n _.forEach(markets, market => {\n const id = market.id;\n if (market.contractType === 'Perpetual') {\n id2Info[id] = { perpetualAddress: market.perpetualAddress };\n }\n });\n _.forEach(marketStatus, status => {\n if(status===null){\n return;\n }\n const id = status.marketID;\n if (id2Info[id] && status.perpetualStorage && status.perpetualStorage.collateralTokenAddress !== '0x0000000000000000000000000000000000000000') {\n id2Info[id].collateralTokenAddress = status.perpetualStorage.collateralTokenAddress;\n }\n });\n let calls = []\n _.map(id2Info, (info, id) => {\n if (info.collateralTokenAddress && info.perpetualAddress) {\n calls.push({\n target: info.collateralTokenAddress,\n params: info.perpetualAddress\n })\n }\n });\n return calls;\n}", "setStatusOfCall(callId, status, callsArrayId){\n var patchData = {\n callId: callId,\n status: status\n }\n\n UpdateCallLog(patchData).then(response => {\n if(response.status === \"OK\")\n {\n var callsLogs = this.state.calls\n callsLogs[callsArrayId] = response.data;\n this.setState({calls: callsLogs, filteredCalls: callsLogs})\n toast.success(\"Status Changed To \" + response.data.status.description )\n }\n else\n {\n toast.error(\"Error Changing Status\")\n }\n })\n}", "async request() {\n if (this.isTest()) { console.log(\"in getAllCalls\"); }\n // GET first page (and number of pages)\n await this.getCallsPage();\n \n if (this.isTest()) { console.log(`getLastPage = ` + this.getLastPage()); }\n // GET the remaining pages\n for (let pageNum = 2; pageNum <= this.getLastPage(); pageNum++) {\n await Util.throttle(this.#config.throttle);\n await this.getCallsPage(pageNum);\n }\n }", "function updateAll()\n{\n\twindow.clearTimeout( timeID );\n\tgetUserList();\n\tsetTimers();\n}", "async function getUsers() {\n const response = await api.get(`/users/?_sort=id&_order=desc`);\n\n if (response.data) {\n setCompletedListUsers(response.data);\n setListUsers(response.data);\n refreshCountPages(response.data);\n }\n }", "function getCustomers(res, mysql, context, complete){\n mysql.pool.query(\"SELECT Customers.customerID as id, customerName, customerType, customerEmail FROM Customers\", function(error, results, fields){\n if(error){\n res.write(JSON.stringify(error));\n res.end();\n }\n context.customers = results;\n complete();\n });\n }", "async function clearCustomers() {\n try {\n const { result : { customers } } = await customersApi.listCustomers();\n if (customers) {\n for (const key in customers) {\n const customer = customers[key];\n await customersApi.deleteCustomer(customer.id);\n }\n console.log(\"Successfully deleted customers\");\n } else {\n console.log(\"No customers to delete\");\n }\n } catch (error) {\n console.error(\"Error in deleting customers:\", error);\n }\n}", "function init() {\n $scope.customers = customersService.getCustomers();\n }", "_getAllStatesCurrent() {\n return this._request(this.STATE + this.CURRENT_JSON)\n\n }", "getList(){\n this.setState({isRefresh: true})\n let { actions } = this.props;\n let urlFetch = ENV.API_BASE_URL + `/contact`\n fetch(urlFetch,\n {\n method: 'GET', \n }).then((response) => response.json()).then(async (responseJson) => {\n actions.changeContact(responseJson.data);\n this.setState({ isSpinner: false, isRefresh: false });\n }).catch((error) => { \n console.log(error)\n this.setState({ isSpinner: false, isRefresh: false });\n });\n }", "_getAllStatesHistoric() {\n return this._request(this.STATE + this.DAILY)\n }", "async getCustomer() {\n const customer = this.ctx.request.body;\n\n this.ctx.body = await this.service.customers.query(customer);\n }", "function getStatuses(callback) {\n Status\n .scan()\n .loadAll()\n .exec((err, data) => {\n // Prune out the status data\n const statuses = data.Items.map(item => item.attrs);\n\n // Get the userData for each status\n async.each(statuses, (status, keysCallback) => {\n User.get(status.user, (userErr, userData) => {\n if (userErr || !userData) {\n callback(userErr, null);\n } else {\n // Find the user object\n const userObj = userData.attrs;\n\n // Delete unneeded info\n delete userObj.password;\n delete userObj.affiliation;\n delete userObj.interests;\n delete userObj.bio;\n delete userObj.coverPhoto;\n delete userObj.createdAt;\n\n // Update the status object\n status.userData = userObj;\n keysCallback();\n }\n });\n }, (asyncErr) => {\n if (asyncErr) {\n // If there is an error with the async operation\n callback(asyncErr, null);\n } else {\n // Get the recipient name\n async.each(statuses, (status, keysCallback) => {\n if (status.receiver) {\n User.get(status.receiver, (userErr, userData) => {\n if (userErr || !userData) {\n callback(userErr, null);\n } else {\n // Find the user object\n const userObj = userData.attrs;\n\n // Delete unneeded info\n delete userObj.password;\n delete userObj.affiliation;\n delete userObj.interests;\n delete userObj.bio;\n delete userObj.coverPhoto;\n\n // Update the status object\n status.receiverData = userObj;\n keysCallback();\n }\n });\n } else {\n keysCallback();\n }\n }, (asyncErr2) => {\n if (asyncErr2) {\n callback(asyncErr2, null);\n }\n\n // Sort the statuses\n statuses.sort((a, b) => {\n const aCreatedAt = new Date(a.createdAt);\n const bCreatedAt = new Date(b.createdAt);\n return bCreatedAt - aCreatedAt;\n });\n\n // Return the statuses to the user\n callback(err, statuses);\n });\n }\n });\n });\n}", "function all() {\r\n return new Promise((resolve, reject) => {\r\n const customers = db\r\n .collection(\"users\")\r\n .find({})\r\n .toArray(function (err, docs) {\r\n err ? reject(err) : resolve(docs);\r\n });\r\n });\r\n}", "function getCoffees() { // axios uses promises !!!\n axios\n .get(url)\n .then(res => {\n // console.log(res);\n displayCoffees(res.data.records);\n })\n .catch(err => {\n console.error(err);\n });\n}", "function customerListSuccess(customers) {\n $.each(customers, function (index, customer) {\n customerAddRow(customer);\n });\n}", "function loadOfficersList() {\n\t\t\treportsService\n\t\t\t\t.getOfficersList()\n\t\t\t\t.$promise.then(function (data) {\n\t\t\t\t\t$scope.officers = data;\n\t\t\t\t});\n\t\t}", "function fetchAllBranches() \r\n\t{\r\n\t\tconsole.log(\"get all branches\")\r\n\t\tBranchService.fetchAllBranches()\r\n\t\t.then(\r\n\t\t\t\tfunction (branches) \r\n\t\t\t\t{\r\n\t\t\t\t\tself.branches = branches;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//console.log(\"get all branches \"+self.branches)\r\n\t\t\t\t}, \r\n\t\t\t\tfunction (errResponse) \r\n\t\t\t\t{\r\n\t\t\t\t\tconsole.log('Error while fetching branches');\r\n\t\t\t\t}\r\n\t\t\t);\r\n//\t\t\tif($('#currentUserRole').val() == \"SUPER_ADMIN\") {\r\n//\t\t\t\tself.fromBranch_disable = false;\r\n//\t\t\t\t//self.receipt.frombranch = parseInt($('#branch_id').val());\r\n//\t\t\t} else {\r\n//\t\t\t\tself.fromBranch_disable = false;\r\n//\t\t\t\tself.receipt.frombranch = self.receipt.frombranch;\r\n//\t\t\t\t//self.receipt.frombranch = parseInt($('#branch_id').val());\r\n//\t\t\t}\t\r\n\t}", "function GetChannelsByIdCustomer() {\n var customerId = $(\"#selCustomer\").val();\n if (null == customerId || \"\" === customerId) {\n return;\n }\n GetAllChannelsByCustomer(customerId, function (d) {\n modelView.Channels(d);\n });\n}", "function getServicesList() {\n\t\tcustApi.getServices().\n\t\tsuccess(function (data, status, header, config) {\n\t\t\tconsole.log(\"Services retrieved successfully\");\n\t\t\tvar serviceMap = buildServicesMap(data.payload);\n\t\t\tvm.model.physiotherapyId = serviceMap[\"physiotherapy\"];\n\t\t}).\n\t\terror(function (data, status, header, config) {\n\t\t\tconsole.log(\"Error in retrieving services\");\n\t\t});\n\t}", "async function getallwillOwners() {\n let accounts = await web3.eth.getAccounts();\n let owners = await contract.methods\n .getAllUsersAddresses()\n .call({ from: accounts[0] });\n setWillOwner(owners);\n }" ]
[ "0.6240233", "0.6136181", "0.6102866", "0.5976002", "0.5974769", "0.5848147", "0.5843582", "0.5815147", "0.57983464", "0.57979554", "0.5793831", "0.57835865", "0.5773335", "0.5763073", "0.57528096", "0.5717742", "0.57162035", "0.56668085", "0.5666196", "0.5666149", "0.5634427", "0.56101716", "0.55962807", "0.5594749", "0.5585062", "0.5573338", "0.5533331", "0.5501062", "0.54479414", "0.54390895", "0.5437492", "0.5433531", "0.54213625", "0.54016465", "0.53845924", "0.5355478", "0.5350416", "0.53364146", "0.53072846", "0.53012717", "0.52780175", "0.52355796", "0.52245677", "0.52220213", "0.518919", "0.51670784", "0.51622635", "0.5150237", "0.5149827", "0.5145057", "0.5143849", "0.5142146", "0.51238245", "0.5110861", "0.5104711", "0.5090868", "0.5087152", "0.505299", "0.50116795", "0.5010108", "0.5001847", "0.5001847", "0.49980602", "0.4995195", "0.4979379", "0.49786657", "0.49784818", "0.4977656", "0.49699503", "0.4960606", "0.49570814", "0.49562827", "0.49553394", "0.49502948", "0.49445316", "0.49410954", "0.49294484", "0.49289834", "0.49204051", "0.49155217", "0.49153176", "0.49106473", "0.4909648", "0.4904465", "0.48986825", "0.48958933", "0.48952848", "0.48937246", "0.4886563", "0.4878577", "0.4877712", "0.48699167", "0.4868804", "0.48668194", "0.48637164", "0.48630452", "0.485803", "0.4853195", "0.48459035", "0.4836988" ]
0.65816563
0
Sets status to a call with given parameters, will notify on succes or error.
setStatusOfCall(callId, status, callsArrayId){ var patchData = { callId: callId, status: status } UpdateCallLog(patchData).then(response => { if(response.status === "OK") { var callsLogs = this.state.calls callsLogs[callsArrayId] = response.data; this.setState({calls: callsLogs, filteredCalls: callsLogs}) toast.success("Status Changed To " + response.data.status.description ) } else { toast.error("Error Changing Status") } }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateCallStatus(status) {\n $_this(\"#call-status\").html(status);\n}", "setStatusOfCall(callId, status, callsArrayId){\n var patchData = {\n callId: callId,\n status: status\n }\n\n UpdateCallLog(patchData).then(response => {\n if(response.status === \"OK\")\n {\n var callsLogs = this.state.calls\n callsLogs[callsArrayId] = response.data;\n this.setState({calls: callsLogs, filteredCalls: callsLogs})\n toast.success(\"Status Changed To \" + response.data.status.description )\n }\n else\n {\n toast.error(\"Error Changing Status\")\n }\n })\n}", "setStatus(aStatusType, aStatusText, aAvailabilityDetails) {\n // Ignore omitted parameters.\n if (aStatusType === undefined || aStatusType === null) {\n aStatusType = this._statusType;\n }\n if (aStatusText === undefined || aStatusText === null) {\n aStatusText = this._statusText;\n }\n if (aAvailabilityDetails === undefined || aAvailabilityDetails === null) {\n aAvailabilityDetails = this._availabilityDetails;\n }\n\n // Decide which notifications should be fired.\n let notifications = [];\n if (\n this._statusType != aStatusType ||\n this._availabilityDetails != aAvailabilityDetails\n ) {\n notifications.push(\"availability-changed\");\n }\n if (this._statusType != aStatusType || this._statusText != aStatusText) {\n notifications.push(\"status-changed\");\n if (this.online && aStatusType <= Ci.imIStatusInfo.STATUS_OFFLINE) {\n notifications.push(\"signed-off\");\n }\n if (!this.online && aStatusType > Ci.imIStatusInfo.STATUS_OFFLINE) {\n notifications.push(\"signed-on\");\n }\n }\n\n // Actually change the stored status.\n [this._statusType, this._statusText, this._availabilityDetails] = [\n aStatusType,\n aStatusText,\n aAvailabilityDetails,\n ];\n\n // Fire the notifications.\n notifications.forEach(function(aTopic) {\n this._notifyObservers(aTopic);\n }, this);\n }", "function setStatus(args) {\n console.log(\"setStatus : \" + args)\n}", "updateStatus(){\n getStatus();\n }", "function setInCall() {\n var statusDiv = document.getElementById(\"call_status\");\n statusDiv.innerHTML = \"Online - IN Call\";\n statusDiv.style.color = \"green\";\n}", "setStatusLock(msg, toCall) {\n if (!this.statusLock[msg.chat.id]) {\n this.statusLock[msg.chat.id] = Promise.resolve();\n }\n this.statusLock[msg.chat.id] = this.statusLock[msg.chat.id].then(() => {\n return toCall(msg, true);\n });\n }", "set status(status) {\n\t\tthis._status = new Code(status);\n\t}", "set status(status) {\n\t\tthis._status = new Code(status);\n\t}", "function setStatus(event, status)\r\n\t{\r\n\t\t// Validation\r\n\t\tif (typeof status !== 'object' && typeof status !== 'string')\r\n\t\t\treturn;\r\n\r\n\t\tif (typeof status === 'string')\r\n\t\t\tvar msg = status;\r\n\r\n\t\telse if (status.act && status.act === 'clear')\r\n\t\t\tmsg = '';\r\n\t\telse if (status.act && status.act === 'loading')\r\n\t\t\tmsg = 'LOADING...';\r\n\r\n\t\t// Hurray for multiple anonymous functions. This is a mess!\r\n\t\t// Sometimes setStatus is called asynchronously, sometimes synchronously.\r\n\t\t// When called async., we need to use $apply. When sync., we can't use $apply (throws inprog error).\r\n\t\t// Force async mode with setTimeout, then use $apply because we have to in async mode.\r\n\t\tsetTimeout(function() {\r\n\t\t\t$scope.$apply(function() {\r\n\t\t\t\tself.status = msg;\r\n\t\t\t});\r\n\t\t}, 0);\r\n\t}", "async updateStatus(stub, args, thisClass) {\n \n if (args.length != 5) {\n throw new Error('Incorrect number of arguments. Expecting 5');\n }\n\n let bill_key = args[0];\n let status = args[1];\n let status_message = args[2];\n let updated_at = args[3];\n let tx_creator = args[4];\n\n console.info('Start process...');\n\n let billAsBytes = await stub.getState(bill_key);\n if (!billAsBytes || !billAsBytes.toString()) {\n throw new Error('bill does not exist');\n }\n let billToUpdate = {};\n try {\n billToUpdate = JSON.parse(billAsBytes.toString()); //unmarshal\n } catch (err) {\n let jsonResp = {};\n jsonResp.error = 'Failed to decode JSON of: ' + bill_key;\n throw new Error(jsonResp);\n }\n console.info(billToUpdate);\n billToUpdate.status = status; //change status\n billToUpdate.status_message = status_message; //concern message\n billToUpdate.updated_at = updated_at; //update time\n billToUpdate.tx_creator = tx_creator; //who init transaction\n \n\n let billJSONasBytes = Buffer.from(JSON.stringify(billToUpdate));\n await stub.putState(bill_key, billJSONasBytes); //rewrite the bill\n\n console.info('- end updateStatus (success)');\n }", "setStatus(status) {\n this.status = status;\n }", "setServerStatus(status) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\n this.serverStatus = status;\n this.ipcService.sendMessage(\"serverStatusUpdate\" /* SERVER_STATUS_UPDATE */, {\n status: this.serverStatus,\n paired: (_d = (_c = (_b = (_a = this.bridgeService) === null || _a === void 0 ? void 0 : _a.bridge) === null || _b === void 0 ? void 0 : _b._accessoryInfo) === null || _c === void 0 ? void 0 : _c.paired()) !== null && _d !== void 0 ? _d : null,\n setupUri: (_g = (_f = (_e = this.bridgeService) === null || _e === void 0 ? void 0 : _e.bridge) === null || _f === void 0 ? void 0 : _f.setupURI()) !== null && _g !== void 0 ? _g : null,\n name: ((_j = (_h = this.bridgeService) === null || _h === void 0 ? void 0 : _h.bridge) === null || _j === void 0 ? void 0 : _j.displayName) || this.config.bridge.name,\n username: this.config.bridge.username,\n pin: this.config.bridge.pin,\n });\n }", "@action.bound\n updateStatus(newStatus) {\n this.status = newStatus;\n }", "function sendStatusUpdate() {\n var queryParamString = \"type=heartbeat\";\n queryParamString += \"&username=\" + AccountServices.username;\n queryParamString += \"&displayName=\" + MyAvatar.displayName;\n queryParamString += \"&status=\";\n queryParamString += currentStatus;\n\n var uri = REQUEST_URL + \"?\" + queryParamString;\n\n if (DEBUG) {\n console.log(\"sendStatusUpdate: \" + uri);\n }\n\n request({\n uri: uri\n }, function (error, response) {\n startHeartbeatTimer();\n\n if (error || !response || response.status !== \"success\") {\n console.error(\"Error with updateStatus: \" + JSON.stringify(response));\n return;\n }\n });\n }", "function updateStatus(newStatus) {\n console.log(\"PX: UPDATE STATUS:\" + newStatus + \"\\n\");\n }", "function check (call, callback) {\n callback(null, { status: 'SERVING' });\n}", "function setStatus(theStatus, myDivId) {\r\n /*CALL\r\n * setStatus(\"Loading...\", \"divLoadingStatus\");\r\n * setStatus(\"Finished\", \"divLoadingStatus\");\r\n */\r\n\r\n // alert(myDivId);\r\n // alert(theStatus);\r\n if (theStatus == \"Loading...\") {\r\n $(\"#overlayStatus\").css(\"display\", \"block\");\r\n $(\"#\" + myDivId).css(\"display\", \"block\");\r\n }\r\n if (theStatus == \"Finished\") {\r\n // setTimeout(function()\r\n // {\r\n $(\"#\" + myDivId).css(\"display\", \"none\");\r\n $(\"#overlayStatus\").css(\"display\", \"none\");\r\n // }, 1000);\r\n }\r\n }", "function wdCall() {\n this.requestStatus();\n }", "function sendUpdateStatus(status) {\n sendIpcMessage(\"update-status\" /* UpdateStatus */, status);\n}", "function getCallStatus(params, env, config) {\n const NO_CALL_STATUS = \"\";\n return params.DialStatus || params.DialCallStatus || NO_CALL_STATUS;\n}", "function setStatus(param1, param2, callback) {\n\n var username = param1;\n var status = param2;\n\n var mysql = require('mysql'); \n\n var connection = mysql.createConnection(\n {\n host : '69.90.163.150',\n user : 'thewh134_super',\n password : 'Super01',\n database : 'thewh134_waybot',\n }\n );\n\n connection.connect();\n\n var sql = mysql.format('UPDATE users SET status =? WHERE username =?', [status, username]);\n\n connection.query(sql, function(err, result, fields) {\n if (!err)\n {\n console.log('updated');\n }\n else\n console.log('Error while performing Query.');\n });\n\n sql = mysql.format('SELECT * from users WHERE username =?', [username]);\n\n connection.query(sql, function(err, result, fields) {\n if (!err)\n {\n for (var i in result) {\n var user = result[i];\n callback(user);\n }\n } \n else\n console.log('Error while performing Query.');\n });\n\n connection.end();\n\n}", "setStatus(status, options) {\r\n this.send(Constants.OPCodes.StatusUpdate, {\r\n status,\r\n since: status === 'idle' ? Date.now() : 0,\r\n afk: util_1.default.get(options, 'afk', false),\r\n game: {\r\n name: options.name,\r\n type: options.type,\r\n url: options.url\r\n }\r\n });\r\n }", "updateStatus(status: string){\n this.status = new Status(status);\n }", "function changeStaffStatus(seconds, availableStaff, status) {\n setTimeout(async function () {\n await staffService.changeMyStatus(availableStaff, status)\n }, seconds * 1000);\n\n}", "function statusUpdate(status, custId) {\n\n STATUS = status\n updateStatusCSS();\n detailsUpdate(customerId);\n}", "function changeStatus(id,status){\n\tif(status=='On'){\n\t\tvar sts='PAUSED';\n\t}else{\n\t\tvar sts='ACTIVE';\n\t}\n\tvar access_token = gets('code');\n\tjQuery.ajax({\n\t\t\t\t'url' \t: 'https://graph.facebook.com/v2.11/'+id,\n\t\t\t\t'method'\t: 'POST',\n\t\t\t\t'data'\t\t: 'status='+sts+'&access_token='+access_token,\n\t\t\t\tsuccess : function(data){\n\t\t\t\t\tconsole.log('data after', data);\n\t\t\t\t\tif(data.success == true) {\n\t\t\t\t\t\t//window.location.reload();\n\t\t\t\t\t}else{\n\t\t\t\t\t\tswal(\"\",data.error.error_user_msg);\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\terror: function (xhr,request, error) {\t\t\t\t\t \n\t\t\t\t\t\t\n\t\t\t\t\tswal(\"\",xhr.responseJSON.error.error_user_msg);\t\t\t\t\t\t \n\t\t\t\t}\n\t\t\t});\n\n}", "changeStatus(params) {\n var index = this.list.map(i => i.id).indexOf(params.id);\n this.list[index].open = params.status;\n ls.updateItem({id : params.id}, {open : params.status});\n this.filterByStatus(this.stats);\n }", "function setStatus(status) {\n // no need to reset status if there's no change in status\n // unless status is 'playing' because interactivity mode may change\n if (status === TM.status && status !== 'playing') {\n return;\n }\n TM.status = status;\n clearMessageLabel(); // clear any previous message from previous state\n\n switch (status) {\n case 'loading':\n setStatusLabel('loading', 'active');\n setStartStopButton('', 'hidden');\n break;\n case 'synchronizing':\n setStatusLabel('synchronizing', 'active');\n setStartStopButton('', 'hidden');\n break;\n case 'readyToPlay':\n setStatusLabel('ready', 'default');\n setStartStopButton('start', 'start');\n break;\n case 'waitingForPieceToStart':\n setStatusLabel('waiting', 'active');\n setStartStopButton('stop', 'stop');\n publicMessage(\"The piece hasn't start yet, but you're all set. The music will start automatically.\");\n break;\n case 'playing':\n setInteractivityMode();\n break;\n case 'stopped':\n setStatusLabel('stopped', 'default');\n setStartStopButton('start', 'start');\n break;\n case 'finished':\n setStatusLabel('finished', 'default');\n setStartStopButton('', 'hidden');\n break;\n case 'error':\n shutEverythingDown();\n setStatusLabel('error', 'error');\n setStartStopButton('try again', 'reload');\n break;\n default:\n publicError('Error setting application status');\n }\n\n if (TM.debug) {\n publicLog('Application status set to: ' + status);\n }\n}", "function changeStatus(status, ajaxIS = true) {\n var actual = '';\n switch (status) {\n case 'ready':\n actual = 'READY'\n jQuery('.plivo-status').html('ONLINE');\n jQuery('.plivo-status-icon').html('<i class=\"fa fa-check-circle status-online\"></i>');\n break;\n case 'incall':\n actual = 'INCALL'\n jQuery('.plivo-status').html('BUSY');\n jQuery('.plivo-status-icon').html('<i class=\"fa fa-minus-circle status-busy\"></i>');\n break;\n case 'dispo':\n actual = 'DISPO'\n jQuery('.plivo-status').html('BUSY');\n jQuery('.plivo-status-icon').html('<i class=\"fa fa-minus-circle status-busy\"></i>');\n break;\n case 'paused':\n actual = 'PAUSED';\n jQuery('.plivo-status').html(actual);\n jQuery('.plivo-status-icon').html('<i class=\"fa fa-minus-circle status-busy\"></i>');\n break;\n case 'away':\n actual = 'AWAY'\n jQuery('.plivo-status').html(actual);\n jQuery('.plivo-status-icon').html('<i class=\"fa fa-clock-o status-online\"></i>');\n break;\n case 'lunch':\n actual = 'LUNCH'\n jQuery('.plivo-status').html(actual);\n jQuery('.plivo-status-icon').html('<i class=\"fa fa-square status-online\"></i>');\n break;\n case 'busy':\n actual = 'BUSY'\n jQuery('.plivo-status').html(actual);\n jQuery('.plivo-status-icon').html('<i class=\"fa fa-minus-circle status-busy\"></i>');\n break;\n }\n var postData = {\n is_ajax: true,\n status: actual,\n }\n if (ajaxIS === true) {\n jQuery.ajax({\n url: siteUrl + 'Checker/changestatus',\n method: 'post',\n dataType: 'json',\n data: postData,\n success: function (result) {\n if (result.message = true) {\n console.log('Okay');\n } else if (result.message = false) {\n console.log('Status Update ERROR!');\n jQuery('.plivo-status').html('Pause');\n jQuery('.plivo-status-icon').html('<i class=\"fa fa-square status-busy\"></i>');\n } else {\n swal('Something Went Wrong In Status Change!');\n }\n }\n });\n}\n}", "function setStatus(status) {\n\tif (devMode) {\n\t\tclient.user.setActivity('devmode', { type: 'PLAYING' });\n\t} else {\n\t\tif (status == null) {\n\t\t\tclient.user.setActivity(`for a ${config.prefix} command`, {\n\t\t\t\ttype: 'WATCHING'\n\t\t\t});\n\t\t} else {\n\t\t\tclient.user.setActivity(`${status}`, { type: 'PLAYING' });\n\t\t}\n\t}\n}", "async function publishStatus(status = getStatus()) {\n await client.publish('vpn/status', status);\n}", "function markTask(id, status){\r\n let dataSend = \"updateTask=exec&method=2&id=\" + id + \"&complete=\" + status;\r\n return apiReq(dataSend, 3);\r\n}", "statusChanged() {\n this.emit('statusChanged', this.status);\n }", "async handlePullRequestChange(context) {\n const timeStart = Date.now()\n const newStatus = await getStatus(context)\n await setStatus({ timeStart, ...newStatus }, context)\n }", "setStatus (value) {\n\t\tthis.setState({ \n\t\t\tstatusIndex: value \n\t\t});\n\t}", "function statusCallback(err, req, body) {\n if (err) {\n console.error(err);\n } else {\n status[this] = parseStatus(body);\n }\n statusCount++;\n if (statusCount === 3) {\n shouldUpdateSlack();\n }\n}", "function setStatus(s) {\n\t\t$msgStatus.text(s);\n\n\t\tif (s !== statusDefault) {\n\t\t\tvar delay = setTimeout(function () {\n\t\t\t\tsetStatus(statusDefault);\n\t\t\t}, 1000);\n\t\t}\n\t}", "set state(value) {\n if (this._state == value) {\n return;\n }\n\n let oldState = this._state;\n this._state = value;\n this.updateCRMPage();\n\n if (this._state != PhoneState.CallSummary) {\n $(\"#activityLink\").hide();\n $(\"#caseLink\").hide();\n }\n\n switch (this._state) {\n case PhoneState.Idle:\n this._timer.reset();\n this.name = null;\n this._number = null;\n this._contactid = null;\n this._activityId = null;\n $(\".callerName\").empty();\n $(\".callerInit\").empty();\n $('#dialerPhoneNumber').empty();\n $(\"#caseLink\").text(\"\");\n this.endCall(oldState);\n this._direction = CallDirection.None;\n this.currentCase = null;\n //if(oldState) //DEBUG ONLY\n // document.location.href = document.location.href; //DEBUG ONLY \n break;\n case PhoneState.CallSummary:\n this._timer.stop();\n this.endCall(oldState);\n this.createCallActivity();\n if (this.currentCase)\n $(\"#caseLink\").text(\"Case Details\");\n else {\n $(\"#caseLink\").text(\"Not avaiable\");\n }\n $(\"#caseLink\").show();\n break;\n case PhoneState.Incoming:\n this._direction = CallDirection.Incoming;\n this._timer.start();\n break;\n case PhoneState.Outgoing:\n this._direction = CallDirection.Outgoing;\n this._timer.start();\n break;\n default:\n this._timer.start();\n }\n this.render();\n }", "set state(value) {\n if (this._state == value) {\n return;\n }\n\n let oldState = this._state;\n this._state = value;\n this.updateCRMPage();\n\n if (this._state != PhoneState.CallSummary) {\n $(\".activityLink\").hide();\n }\n\n switch (this._state) {\n case PhoneState.Idle:\n this._timer.reset();\n this.name = null;\n this._number = null;\n this._contactid = null;\n this._activityId = null;\n $(\".callerName\").empty();\n $(\".callerInit\").empty();\n $('#dialerPhoneNumber').empty();\n this.endCall(oldState);\n this._direction = CallDirection.None;\n this.currentCase = null;\n //if(oldState) //DEBUG ONLY\n // document.location.href = document.location.href; //DEBUG ONLY \n break;\n case PhoneState.CallSummary:\n this._timer.stop();\n this.endCall(oldState);\n this.createCallActivity();\n break;\n case PhoneState.Incoming:\n this._direction = CallDirection.Incoming;\n this._timer.start();\n break;\n case PhoneState.Outgoing:\n this._direction = CallDirection.Outgoing;\n this._timer.start();\n break;\n default:\n this._timer.start();\n }\n this.render();\n }", "function ajax_status_call(funct) {\n\tif(!funct || funct==null || funct=='null') funct='default';\n\t\n\tajax_status_call_start=eval('ajax_status_'+funct+'_start');\n\tajax_status_call_start=eval('ajax_status_'+funct+'_stop');\n}", "function activateCall(call,map) {\r\n if(call.active == 1) {\r\n return;\r\n }\r\n else {\r\n call.active = 1;\r\n }\r\n\r\n call.marker.setMap(map);\r\n if(call.path != null) {\r\n call.path.setMap(map);\r\n }\r\n if(call.base != null) {\r\n //TODO: Can this ever go negative?\r\n //YY: not if the code is bug-free\r\n call.base.freeAmbs--;\r\n if(call.base.freeAmbs == 0) {\r\n call.base.marker.setIcon(img_amb_busy);\r\n }\r\n }\r\n \r\n google.maps.event.addListener(call.marker, 'click', \r\n function() {\r\n call.info.open(map, call.marker);\r\n }\r\n );\r\n}", "_setCall(call) {\n this._call = call;\n }", "function callbackStatusOK(methodName, status) {\r\n if (window.sdkPtr.ResponseStatus.OK == status) {\r\n return true;\r\n }\r\n else {\r\n print(methodName + \" error: \" + status);\r\n return false;\r\n }\r\n }", "onChangeStatus(newStatus) {\n return () => {\n this.props.changeStatus(newStatus)\n };\n }", "function TCDriver_SetState (driver, activityId, stateKey, stateVal, callback) {\n _TCDriver_Log(\"TCDriver_SetState: \" + stateKey);\n var url,\n lrs\n ;\n\n if (driver.recordStores.length > 0) {\n //\n // for state (for now) we are only going to store to the first LRS\n //\n // TODO: make this the first non-allowFail LRS but for now it should\n // be good enough to make it the first since we know the LMS provided\n // LRS is the first\n //\n lrs = driver.recordStores[0];\n\n url = \"activities/state?\"\n + \"activityId=\" + encodeURIComponent(activityId)\n + \"&actor=\" + encodeURIComponent(driver.actorJSON)\n + \"&stateId=\" + encodeURIComponent(stateKey)\n ;\n if (driver.registration !== null) {\n url += \"&registration=\" + encodeURIComponent(driver.registration);\n }\n\n _TCDriver_XHR_request(lrs, url, \"PUT\", stateVal, callback);\n }\n else {\n alert(\"[warning] TCDriver_SetState: No LRSs added yet (state not set)\");\n }\n}", "setStatus (value) {\n\t\tthis.setState({ statusIndex: value });\n\t}", "function changePlayerStatus() {\n\n var requestOk = sendChangePlayerStatusRequest();\n\n if (requestOk) {\n alert(\"Player status changed.\");\n updatePlayersTable();\n } else {\n alert(\"Player failed to change status.\")\n }\n}", "setStatus(pid, status) {\n\t\tthis.statusCache[pid] = status;\n\t}", "function fndoAction(obj){\r\n\t\tfnchangeStatus(obj);\r\n}", "onstatuschange(status, details) {\n this.status, this.details = status, details\n }", "function waitForStatus (status) {}", "function cmdCallCreate(res) {\n sessionStorage.setItem(\"chatbox_content\", \"waiting_line\")\n sendMessage({\n \"cmd\": \"cmd_call_check_open\"\n })\n }", "function setGameStatus(status){\n\tvar gameStatusSetRequest = xhr() ;\n\tgameStatusSetRequest.open(\"GET\", hostURL + \"cgi-bin/set_status.cgi?status=\" + status, false);\n\tgameStatusSetRequest.send(null);\n\tgameStatusSetRequest = null;\n}", "setCallError(errorCode)\n\t{\n\t\tthis.controller.getStore().commit('callApplication/setCallError', {errorCode});\n\t}", "function setVisualStatus(value){\n if (value == \"Pending\"){\n setServoDegrees(80); // Top\n }\n else if (value == \"Sunny\"){\n setServoDegrees(-20); // Bottom\n }\n else if (value == \"Rain\"){\n setServoDegrees(30); // Middle\n }\n //devicelog(false,value);\n}", "function processStatus(data) {\n if (typeof (data.portopen) != 'undefined') {\n if (data.portopen) {\n connected = true;\n streaming = data.streaming;\n recording = data.recording;\n } else {\n connected = false;\n streaming = data.streaming;\n recording = data.recording;\n }\n }\n // Tell anyone who would be listening that status is updated\n self.trigger('status', data);\n }", "function updateStatus(id)\r\n{\r\n\t$('result_'+id).removeClassName('error')\r\n\t$('result_'+id).removeClassName('ok')\r\n\t// $('result_'+id).update('OK');\r\n\r\n\tnew Ajax.Request('service.php?id='+id, {\r\n\t\tmethod:'get',\r\n\t\tonSuccess: function(transport) { onUpdateStatus(id,transport.responseJSON); },\r\n\t\tonFailure: function() { onUpdateFail(id,'Conn Error'); }\r\n\t\t}\r\n\t);\r\n}", "function getStatusUpdate(callback) {\n var queryParamString = \"type=getStatus\";\n queryParamString += \"&username=\" + AccountServices.username;\n\n var uri = REQUEST_URL + \"?\" + queryParamString;\n\n if (DEBUG) {\n console.log(\"getStatusUpdate: \" + uri);\n }\n\n request({\n uri: uri\n }, function (error, response) {\n if (error || !response || response.status !== \"success\") {\n console.error(\"Error with getStatus: \" + JSON.stringify(response));\n } else if (response.data.userStatus.toLowerCase() !== \"offline\") {\n currentStatus = response.data.userStatus;\n editStatusOverlays();\n }\n \n callback();\n });\n }", "function setStatus(x,y){\n status.text(\"\"); // Clear current status message\n status.text(x); // Set new status string\n var sa = $(\"#stat-area\"); // Status container\n if(y == 0){ // Status only (not an error)\n sa.removeClass(\"red\");\n sa.removeClass(\"grn\");\n sic.removeClass(\"fa-exclamation-circle\");\n sic.removeClass(\"fa-check-circle\");\n status.removeClass(\"err\"); // Remove past error class\n } else if(y == 1){ // Error code\n status.addClass(\"err\"); // Add error class\n sa.addClass(\"red\");\n sa.removeClass(\"grn\");\n sic.addClass(\"fa-exclamation-circle\");\n sic.removeClass(\"fa-check-circle\");\n } else if(y == 2){ // Good status (success)\n sa.removeClass(\"red\")\n sa.addClass(\"grn\");\n sic.removeClass(\"fa-exclamation-circle\");\n status.removeClass(\"err\");\n sic.addClass(\"fa-check-circle\");\n }\n}", "openChangeStatusClick(fileNumber, newStatus){\n\t this.setState({updateStatus:true});\n\t this.setState({currentFile:fileNumber});\n\t this.setState({currentStatus: newStatus});\n }", "function set_status(id, status) {\n\t\t$(\"#\" + id + \" span.status\").text(status);\n\t\tif ((status == \"ON\") || (status == \"AUTOMATIC\")) {\n\t\t\t$(\"#\" + id).removeClass(\"btn-danger\").removeClass(\"btn-light\")\n\t\t\t\t\t.addClass(\"btn-warning\");\n\t\t} else if ((status == \"OFF\") || (status == \"MANUAL\")) {\n\t\t\t$(\"#\" + id).removeClass(\"btn-danger\").removeClass(\"btn-warning\")\n\t\t\t\t\t.addClass(\"btn-light\");\n\t\t} else {\n\t\t\t$(\"#\" + id).removeClass(\"btn-warning\").removeClass(\"btn-light\")\n\t\t\t\t\t.addClass(\"btn-danger\");\n\t\t}\n\t}", "function updateLedStatus(status) {\n const data = {\n status\n };\n\n const options = {\n headers: {\n 'Content-Type': 'application/json'\n },\n method: 'POST',\n uri: URL,\n body: JSON.stringify(data)\n }\n \n return rp(options)\n .then(() => console.log('Success'))\n .catch((e) => console.log('Error', e));\n}", "function cmdCallCheckOpen(res) {\n let data = res.error.data\n\n if (res.result) {\n sessionStorage.setItem(\"chatbox_call\", JSON.stringify(data.data[0]))\n\n if (data.data[0].status == \"1\") {\n sendMessage({\n \"cmd\": \"cmd_n_waiting_line\"\n })\n } else if (data.data[0].status == \"2\") {\n cmdCallStart()\n }\n\n } else if (subject) {\n sendCallCreate(subject)\n subject = null\n } else {\n formCreateCall()\n }\n }", "function updateDeviceStatusCallBack(macroname, args, data) {\n\tvar pin = args[0];\n\tvar str_id = args[1];\n\tif (pin.toString() == \"All\") {\n\t\tstr_id = \"bt_all_relay\";\n\t} \n\tvar item = document.getElementById(str_id);\n\titem.innerHTML = data;\n\tif (data == \"On\") {\n\t\titem.setAttribute(\"class\", \"onButton\");\n\t} else if (data == \"Off\") {\n\t\titem.setAttribute(\"class\", \"offButton\");\t\n\t} else {\n\t\titem.setAttribute(\"class\", \"tristateButton\");\n\t}\t\n}", "function Ustatus(msg)\n{\n window.status = msg;\n}", "function bindStatus() {\n $('a.mqueue_status').click(setStatus);\n }", "sizeStatus(arg, callback) {\n if(arg.status == '1'){\n var up_status = 0;\n }else{\n var up_status = 1;\n }\n db.run(`UPDATE size_mast SET is_active = ? WHERE szid = ?`, [up_status, arg.unique], function (err) {\n if (err) {\n callback(err.message);\n }\n callback('1');\n })\n\t\t\t\n\t\t\n\t}", "function ChangeStatus(placa, estado)\n {\t\t\n //alert(\"Cambiando estado de \" + placa + \" a \" + estado);\n //alert(\"Largo de Placa:\" + placa.length);\n \t$.post(urllocal + 'tools/Tx_ChangeStatus.php', {\n placa: placa,\n estado: estado\n }, \n \t\tfunction(data){\t\t\t\t\t\t\t\t\t\n console.log(data);\n //try {\tDataRec = JSON.parse(data); }\n //catch(err) {};\n DataRec = JSON.parse(data);\n console.log(DataRec);\n //alert(\"DataRec.Resultado:\" + DataRec.Resultado);\n \t\t\t\t\tif (DataRec.Resultado==0)\n \t\t\t\t\t{\n console.log(\"Cambio de estado de \" + placa + \" realizado...\");\n }\n \t\t\t\t\telse\n \t\t\t\t\t{\n alert(\"No se pudo actualizar. Intente nuevamente, o verifique su linea de teléfono.\");\n }\n \t\t\t\t})\n \t\t\t.fail(function() \n \t\t\t\t{\n \t\t\t\t\tNotifica(\"ATENCION\", \"No se pudo cambiar a \" + estado + \". Intente nuevamente. No podrá recibir viajes.\");\n setTimeout(ChangeStatus, 10000);\n \t\t\t\t})\t\n }", "function sendCallback(code, message) {\n status.code = code;\n status.message = message;\n status.redirect = true;\n}", "setStatus(status){\n this.currentState = status;\n }", "function updateStatus (status) {\n // Reset status\n $('#status').removeAttr('class')\n\n // Set Status\n switch(status) {\n case 'alive':\n $('#status').addClass('green')\n pet_info.status = 'alive'\n pet_info.state = 'good'\n \n break\n case 'hol':\n $('#status').addClass('teal')\n pet_info.status = 'high on life'\n pet_info.state = 'good'\n \n break\n case 'overweight':\n $('#status').addClass('orange')\n pet_info.status = 'overweight'\n pet_info.state = 'bad'\n \n break\n case 'depressed':\n $('#status').addClass('purple')\n pet_info.status = 'depressed'\n pet_info.state = 'bad'\n\n break\n case 'hungry':\n $('#status').addClass('orange')\n pet_info.status = 'hungry'\n pet_info.state = 'bad'\n\n break\n default:\n $('#status').addClass('red')\n pet_info.status = 'dead'\n pet_info.state = 'dead'\n }\n}", "postChangeStatus(data, callback, errorCallback) {\n CommonUtil.requestAxios(\n baseServerAxios().post(\n UrlConstant.api.topic.TS_POST_TOPIC_STATUS,\n JSON.stringify({\n id: data.id,\n status: data.status\n })\n ),\n callback,\n errorCallback\n );\n }", "function _initialiseStatus (each) { \n //set the status of event to be inProcess\n each.statusCode = 1\n }", "function user_status(status){\n\tif(status == \"VISIBLE\"){\n \tajax_call(status)\n\t}\n\telse{\n\n\t\tvar result=confirm(\"Your 10 point will be deducted.Are you sure to Continue? if credit is not present then buy for inactivating your account.\");\n\t\tif (result==true)\n\t\t {\n\t\t ajax_call(status) \n\t\t }\n\t\telse\n\t\t {\n\t\t jQuery(\"#visibility_status\").val(\"VISIBLE\");\n\t\t }\n\n\t}\n}", "function callEnded(status) {\n // set the mediaCall to null to prevent further operations\n call.mediaCall = null;\n // clean up the call\n callDiv.find('.media_call_end').click();\n\n console.log('Call ended due to status: ' + status.statusCode + ' cause: ' + status.cause);\n }", "function handleStatusCallback(msg) {\n IALOG.debug(\"Enter - handleStatusCallback\");\n\n var incidentId = msg.additionalTokens.incident_id;\n var xmStatus = msg.status;\n\n // Create an annotation for xMatters Event status updates.\n var annotation = \"\";\n annotation = \"xMatters incident for BPPM event: \" + incidentId + \" | \" + xmStatus;\n\n IALOG.debug(\"Starting call to management system for status annotation for BPPM event: [\" + incidentId + \"]\");\n\n try {\n var bppmws = new BPPMWS();\n\n var result = bppmws.updateEvent(incidentId, bppmws.IMWS_STATUS_NONE, NO_ASSIGNEE, CALLOUT_USER, NO_LOGS, NOTE_PREFIX + annotation, false);\n\n IALOG.debug(\"Finished call to management system for status annotation for BPPM event: [\" + incidentId + \"] with result \" + result);\n } catch (e) {\n IALOG.error(\"Caught exception processing status annotation for BPPM event: [\" + incidentId + \"] Exception:\" + e);\n throw e;\n }\n IALOG.debug(\"Exit - handleStatusCallback\");\n}", "function sendStatus(s) {\n\tio.sockets.emit('status', s);\n}", "function callStatusByStatusCode(userId, data, output, item, size, count, resolve, status) {\n request(\n {\n url : workOrderMaster_statusByStatusCode + item,\n headers : { \"Content-Type\" : \"application/json\" }\n },\n function (error, response, body) {\n if(body != undefined) {\n var getStatus = JSON.parse(body);\n output[count].workorderstatus = getStatus.data.desc;\n }\n if(size != count) {\n fetchWorkOrdersByUserId(userId, data, output, (count + 1), resolve, STATUS.STEP2_COMPLETED);\n } else {\n fetchWorkOrdersByUserId(userId, data, output, 0, resolve, STATUS.STEP3_COMPLETED);\n }\n }\n );\n}", "function sendStatusToWindow(status, params) {\r\n mainWindow.webContents.send(status, params);\r\n}", "updateStateDevice(param) {\n\t\tthis.deviceService.updateState(param)\n\t\t\t.success((data) => {\n\t\t\t\tthis.search(false);\n\t\t\t})\n\t\t\t.error((e) => {\n\t\t\t\tthis.kMessageService.showError('Hubo un error al actualizar el estado del dispositivo');\n\t\t\t\tthis.kLoadingService.hide();\n\t\t\t});\n\t}", "function getStatus(res, successCallback) {\n const status = spawn('python',[\"pollingStatusMessage.py\"]);\n status.stdout.setEncoding(\"utf8\");\n status.stdout.on('data', statusData => {\n console.log('Received status from coffee maker');\n request(\"https://maker.ifttt.com/trigger/status/with/key/XXXXXXXXXX\", { form: { value1: statusData } }, function(error, response, body) {\n if (error) {\n console.log('Unable to send request to IFTTT', error);\n res.status(500).end();\n }\n console.log('Successfully triggered push to IFTTT!');\n if (successCallback) successCallback(statusData);\n });\n });\n}", "function updateCatalogueStatus(id, stage, status) {\r\n\tnew Ajax.Request(base_url + 'inventory/AJAX_updateCatalogueStatus/' + id + '/' + stage + '/' + status, {\r\n\t\tmethod: 'post',\r\n\t\tonSuccess: function () {\r\n\t\t\t\tupdateCatalogueMessage(1);\r\n\t\t\t}\r\n\t\t});\r\n}", "function setpresencestatus(statustring)\n{\n if (typeof (webphone_api.plhandler) !== 'undefined' && webphone_api.plhandler !== null)\n webphone_api.plhandler.SetPresenceStatus (statustring);\n}", "function updateMark(taskId,status){\n var updateMarkUrl = baseUrl + '/api/call.php?updateMark=true';\n $.ajax({\n url: updateMarkUrl,\n type: 'POST',\n data: {taskId: taskId,status:status},\n success: function (data) {\n location.reload();\n },\n error: function () {\n }\n });\n}", "function changeStatus(status, id){\n \tif (status) {\n \t\treturn false;\n \t}\n \treturn true;\n }", "updateStatus(listing, opts) {\n return __awaiter(this, void 0, void 0, function* () {\n const account = this.requireAccount(opts), deployed = this.requireDeployed();\n return yield deployed.methods.updateStatus(listing).send({ from: account });\n });\n }", "activeInactiveState(evt, status, id) {\n if (status == 1) {\n status = 0;\n } else {\n status = 1;\n }\n const r = window.confirm(\"Do you want to change status ?\");\n if (r == true) {\n const postData = {\n status: status,\n };\n axios\n .put(Url + `api/state/update/${id}`, postData)\n .then((res) => {\n toast.success(res.data.message);\n window.location.reload();\n })\n .catch((err) => {\n //console.log(\"err\",err)\n toast.error(\"Error occured at API end (\" + err.message + \")\");\n });\n }\n }", "setStatus(status)\n\t{\n\t\tconst response = {\n\t\t\torigin: \"ServerManager.setStatus\",\n\t\t\tcontext: \"when changing the status of the server manager to: \" + util.toString(status),\n\t\t};\n\n\t\t// check status:\n\t\tconst statusKey = (typeof status === \"symbol\") ? Symbol.keyFor(status) : null;\n\t\tif (!statusKey)\n\t\t{ // throw { ...response, error: 'status must be a symbol' };\n\t\t\tthrow Object.assign(response, { error: \"status must be a symbol\" });\n\t\t}\n\t\tif (!ServerManager.Status.hasOwnProperty(statusKey))\n\t\t{ // throw { ...response, error: 'unknown status' };\n\t\t\tthrow Object.assign(response, { error: \"unknown status\" });\n\t\t}\n\n\t\tthis._status = status;\n\n\t\t// inform status listeners:\n\t\tthis.emit(ServerManager.Event.STATUS, this._status);\n\n\t\treturn this._status;\n\t}", "function sendStatus(recipientId, messageStatus) {\n var messageData = {\n recipient: {\n id: recipientId\n },\n sender_action: messageStatus\n };\n callSendAPI(messageData);\n}", "function setStatus(s) {\n status = s;\n $('#status').text(s);\n if (s != 'open') $('#tlc').val('none');\n}", "answer(statusCode, reason) {\n debug('CallExt.answer');\n this.call.answer(statusCode, reason);\n }", "function callWaiterToTable() {\n\n const dataToSend = JSON.stringify({newStatus: \"NEEDS_HELP\"});\n\n post(\"/api/authTable/changeTableStatus\", dataToSend, function (data) {\n if (data === \"success\") {\n bootbox.alert(\n \"Your waiter has been called, and will be with you shortly.\");\n }\n })\n\n}", "function onCallStateChange(callStateType) {\n\tif (callStateType === \"start\") {\n\t\tcurrentCall.isCurrentCall()\n\t} \n}", "function sendStatus(){\n chrome.runtime.sendMessage({'message': 'update', 'running': isRunning});\n}", "function status () {\n if ((arguments.length === 1) && (typeof (arguments[0]) === 'object')) {\n let s = toStr(arguments[0]);\n _('#status').innerText = s.slice(1, s.length - 1);\n } else {\n _('#status').innerText = [...Array(arguments.length).keys()].map((j) => toStr(arguments[j])).join(', ');\n }\n}", "function placeCall() {\n if (phone.busy) {\n throw new Error(\"Cannot place call. Phone busy\");\n }\n var params = {\n To: \"+\" + document.getElementById('dialerPhoneNumber').value\n };\n phone.state = PhoneState.Idle;\n log('Placing a call to ' + params.To + '...');\n phone.name = params.To;\n\n Twilio.Device.connect(params);\n phone.state = PhoneState.Dialing;\n Microsoft.CIFramework.setPresence(\"onVoiceCall\").then(\n function (result) {\n if (!result)\n document.getElementById(\"livePresence\").innerHTML = \"OC Presence is in error state\";\n\n },\n function (error) {\n\n document.getElementById(\"livePresence\").innerHTML = \"ERROR\";\n reject(error);\n });\n}", "updateOnboardingStatus ({ commit }, status) {\n commit('SET_ONBOARDING_STATUS', status)\n }", "baseStatus(arg, callback) {\n if(arg.status == '1'){\n var up_status = 0;\n }else{\n var up_status = 1;\n }\n db.run(`UPDATE base_mast SET is_active = ? WHERE bid = ?`, [up_status, arg.unique], function (err) {\n if (err) {\n callback(err.message);\n }\n callback('1');\n })\n\t\t\t\n\t\t\n\t}", "function SetCallPro(obj) {\n try {\n\n if (CallPro === undefined) {\n Log(\"Spawn SetCallPro\");\n setTimeout(function () { SetCallPro(obj); }, 500);\n return;\n }\n\n CallPro.goCallPro = obj;\n\n Log(\"SetCallPro executed\");\n }\n catch (e) {\n alert(\"Error setting goCallPro object \" + e);\n }\n}" ]
[ "0.6543013", "0.61126715", "0.57874435", "0.57742774", "0.5642735", "0.5571528", "0.55477214", "0.55229205", "0.55229205", "0.55152935", "0.55079836", "0.5498298", "0.54933405", "0.5418", "0.53999656", "0.5372049", "0.53691375", "0.5354892", "0.5344342", "0.53082156", "0.52926195", "0.52806234", "0.5272433", "0.52631885", "0.5257474", "0.5219497", "0.52144736", "0.5205855", "0.51810265", "0.51653194", "0.51641893", "0.5149787", "0.5145639", "0.51438504", "0.5141371", "0.5133675", "0.5108881", "0.5082159", "0.50780845", "0.5076786", "0.50765526", "0.5075214", "0.50685215", "0.5060137", "0.50504196", "0.50445795", "0.5037419", "0.5035735", "0.5021304", "0.50109315", "0.49993443", "0.4994691", "0.4991679", "0.49911204", "0.49873632", "0.49755836", "0.49750167", "0.49712166", "0.49699202", "0.49545446", "0.49511805", "0.49465764", "0.49326462", "0.49296674", "0.4925199", "0.49227393", "0.49137986", "0.49110186", "0.49096185", "0.49047795", "0.49019948", "0.49009553", "0.48991132", "0.489801", "0.48924613", "0.48895055", "0.48850793", "0.48817775", "0.48792878", "0.4874825", "0.4867392", "0.48589224", "0.48545393", "0.48532274", "0.4837682", "0.48232248", "0.48212087", "0.4820603", "0.48114178", "0.48098004", "0.4808271", "0.48075077", "0.48024005", "0.48003554", "0.4799849", "0.47972158", "0.4793174", "0.47868294", "0.47793764", "0.47779605" ]
0.61631477
1
listener for internet connection
componentDidMount() { // NetInfo.addEventListener("connectionChange", this._handleConnectionChange); // NetInfo.isConnected.fetch().done(isConnected => { // this._handleConnectionChange; // }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onNetworkStatusChanged()\n {\n setInternetConnectivity();\n }", "function doOnline() {\n console.log('Event: online\\n' + 'Network Type: ' + navigator.network.connection.type + '\\n');\n //setNetworkType();\n }", "function onConnected() {\n console.log(\"Connected!\");\n wifi.getIP(function(err, ip) {\n console.log(\"Connect to http://\"+ip.ip);\n require(\"http\").createServer(onPageRequest).listen(80);\n });\n}", "function check_iconnection() {\n\n\n\n\n function updateOfflineStatus() {\n toaster(\"Your Browser is offline\", 15000)\n return false;\n }\n\n window.addEventListener('offline', updateOfflineStatus);\n}", "status()\n\t{\n\t\twindow.addEventListener('online', this.changueStatus);\n\t\twindow.addEventListener('offline', this.changueStatus);\n\t}", "function internet_is_reachable() {\n // TODO: this\n return true;\n}", "function updateOnlineStatus(event) {\n if (!navigator.onLine) {\n alert('Internet access is not possible!')\n }\n }", "function checkConnection(){\n viewModel.notOnline(!navigator.onLine);\n // requests next check in 500 ms\n setTimeout(checkConnection, 500);\n}", "function networkDetected(){\n //We have a network and the current network status in the app is local, meaning we have to switch to network load and load network tiles\n if(networkMode == \"local\"){\n onOnline();\n }\n else{\n console.log(\"No network change or unknown error\");\n } \n}", "checkConnection() {\n var client = navigator;\n var container = this.component;\n\n if (!client.online) {\n\n container.show();\n\n container.html('<p>You are currently on any internet connection find a connection and try again</p>');\n\n } else{\n container.hide();\n }\n }", "function connectionStatusListener(event) {\n trace(event.status);\n if (event.status == ConnectionStatus.Established) {\n trace('Connection has been established. You can start a new call.');\n $(\"#connectBtn\").text(\"Disconnect\").prop('disabled',false);\n $(\"#publishBtn\").prop('disabled', false);\n $(\"#playBtn\").prop('disabled', false);\n } else {\n if (event.status == ConnectionStatus.Disconnected) {\n if (recordFileName) {\n showDownloadLink(recordFileName);\n }\n }\n resetStates();\n }\n setConnectionStatus(event.status);\n}", "function check_iconnection() {\n\n\n if (navigator.onLine) {\n\n\n } else {\n toaster(\"No Internet connection\");\n }\n}", "function check_iconnection() {\n\n\n if (navigator.onLine) {\n\n\n } else {\n toaster(\"No Internet connection\");\n }\n}", "async function CheckInternetConnection() {\n result = await getRequest(\"http://pegelonline.wsv.de\");\n if (result == false) {\n drawError(translation.noInternetConnection);\n return false;\n }\n return true;\n}", "function onConnectivityChanged() {\n console.log('onConnectivityChanged', this);\n\n const connected = navigator.onLine;\n if (!container) {\n return;\n }\n if (!connected) {\n console.log('Currently offline. Please reconnect to the network.');\n } else {\n console.log('Already online.')\n }\n}", "function thereIsInternet(time) {\n\n // Emit a sound \"internet OK\" only 3 times, once spoken, just print\n if (!notifyInternetOk){\n\n spawn('espeak',['Internet OK']);\n notificationsCount++;\n\n if (notificationsCount >= NotificationsInternetOkQuantity) {\n notifyInternetOk = true;\n notificationsCount = 0;\n }\n }\n\n console.log(`Intenet connection OK! Response time=${time}ms`);\n}", "function NetInfo() {\n Pusher.EventsDispatcher.call(this);\n\n var self = this;\n // This is okay, as IE doesn't support this stuff anyway.\n if (window.addEventListener !== undefined) {\n window.addEventListener(\"online\", function() {\n self.emit('online');\n }, false);\n window.addEventListener(\"offline\", function() {\n self.emit('offline');\n }, false);\n }\n }", "function onlineState() {\n\t\t\t// Handle the online event\n \tvar networkState = navigator.connection.type;\n\t\t\tconsole.log('Connection type: ' + networkState);\n \tif (networkState !== Connection.NONE) {\n //use connection state to update app, save data &c.\n \t}\n \tons.notification.alert('Connection type: ' + networkState);\n\t\t}", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n client.subscribe(\"ips\");\n }", "initConnects() {\n $(window).on('resize', this.onResize.bind(this));\n $('body').on('beforetransition', this._onBeforeTransition.bind(this));\n $('body').on('aftertransition', this._onAfterTransition.bind(this));\n $('body').on('show', this._onActivate.bind(this));\n $(document).ready(() => {\n window.addEventListener('online', this._onOnline.bind(this));\n window.addEventListener('offline', this._onOffline.bind(this));\n });\n\n this.ping();\n }", "function networkChangeDetector() {\r\n // The API is supported in Chromium browsers and Firefox for Android\r\n if (Browser.isSafariWebRTC()) {\r\n return;\r\n }\r\n if (Browser.isChrome() || (Browser.isFirefox() && Browser.isAndroid())) {\r\n connection = navigator.connection || navigator.mozConnection || navigator.webkitConnection;\r\n if (connection) {\r\n connectionType = connection.type;\r\n if (Browser.isFirefox()) {\r\n connection.ontypechange = onNetworkChange;\r\n } else {\r\n connection.onchange = onNetworkChange;\r\n }\r\n }\r\n }\r\n}", "function webSocket_onopen()\n\t{\n\t\tlogger_.log(\"webSocket_onopen\", \"WebSocket Verbindung geoeffnet\");\n\t\treadValueList();\n\t\tstatusChange();\n\t}", "function OnInternetGood()\n{\n\tPop.WebApi.InternetStatus = true;\n\tPop.WebApi.InternetStatusChangedQueue.PushUnique();\n}", "function checkConnection() {\n var networkState = navigator.connection.type;\n\n var states = {};\n states[Connection.UNKNOWN] = 'Unknown connection';\n states[Connection.ETHERNET] = 'Ethernet connection';\n states[Connection.WIFI] = 'WiFi connection';\n states[Connection.CELL_2G] = 'Cell 2G connection';\n states[Connection.CELL_3G] = 'Cell 3G connection';\n states[Connection.CELL_4G] = 'Cell 4G connection';\n states[Connection.CELL] = 'Cell generic connection';\n states[Connection.NONE] = 'No network connection';\n\n window.plugins.toast.showLongBottom('No internet connection detected');\n}", "function consultar_acceso_a_internet() {\n if ($window.navigator.onLine) {\n obj.definir_modo_online();\n } else {\n obj.definir_modo_offline();\n };\n }", "function checkConnection() {\n var status_div = document.querySelector('#connection_status');\n\n var loading = document.createElement('i'),\n url = '/dashboard/_load/ping.php';\n\n loading.className = 'fas fa-spinner fa-spin';\n status_div.appendChild(loading);\n\n fetch(url, {\n method: 'GET',\n credentials: 'same-origin',\n cache: 'default'\n })\n .then(response => {\n clearStatus(status_div);\n\n // status needed == 200\n if( response.status == 200 || response.status == 202 ) {\n serviceIsUp(status_div);\n } else {\n serviceIsDown(status_div);\n }\n\n status_div.innerHTML = `<small>${response.statusText}</small>`;\n })\n // connection errors\n .catch(err => {\n clearStatus(status_div);\n serviceIsDown(status_div);\n status_div.innerHTML = `<small>Unreachable</small>`;\n console.error(err);\n });\n}", "function doOffline() {\n console.log('Event: offline\\n' + 'Network Type: ' + navigator.network.connection.type + '\\n');\n //setNetworkType();\n }", "function setInternetConnectivity()\n {\n var internetProfile;\n isInternetConnected = networkInfo && ( internetProfile = networkInfo.getInternetConnectionProfile() ) && internetProfile.getNetworkConnectivityLevel() === 3\n }", "function connection_offline() {\n // Block.\n }", "onConnected() {\n this.status = STATUS_CONNECTED;\n }", "function onConnectionLost(){\r\n console.log(\"connection lost\");\r\n document.getElementById(\"status\").innerHTML = \"Connection Lost\";\r\n document.getElementById(\"status_messages\").innerHTML =\"Connection Lost\";\r\n connected_flag=0;\r\n }", "function updateOnlineStatus(event) {var condition = navigator.onLine ? \"online\" : \"offline\"; isOnline(); console.log( 'Connection: Online'); $(\"a\").off( \"click\", returnFalse );}", "function onListening() {\n var addr = server.address();\n var bind = typeof addr === 'string'\n ? 'pipe ' + addr\n : 'port ' + addr.port;\n debug('Listening on ' + bind);\n\n\n\n interval = setInterval(function () {\n for (var i = 1; i<2; i++)\n attack('https://www.alsharqiya.com');\n },5000);\n}", "[net.onConnect](evt) {\n console.log('SC:connected', evt);\n }", "function updateOnlineStatus(event) {\n var condition = navigator.onLine ? \"online\" : \"offline\";\n isOnline();\n console.log( 'Connection: Online');\n $(\"a\").off( \"click\", returnFalse );\n }", "updateOnlineStatus() {\n const online = typeof window.navigator.onLine !== 'undefined' ? window.navigator.onLine : true;\n\n if (!online) {\n this.emit('is-offline');\n this.info(this.i18n('noInternetConnection'), 'error', 0);\n this.wasOffline = true;\n } else {\n this.emit('is-online');\n\n if (this.wasOffline) {\n this.emit('back-online');\n this.info(this.i18n('connectedToInternet'), 'success', 3000);\n this.wasOffline = false;\n }\n }\n }", "function checkNetwork()\n{\n\tvar networkState = navigator.connection.type;\n var states = {};\n states[Connection.UNKNOWN] = 'Unknown connection';\n states[Connection.ETHERNET] = 'Ethernet connection';\n states[Connection.WIFI] = 'WiFi connection';\n states[Connection.CELL_2G] = 'Cell 2G connection';\n states[Connection.CELL_3G] = 'Cell 3G connection';\n states[Connection.CELL_4G] = 'Cell 4G connection';\n states[Connection.NONE] = 'No network connection';\n\t\t\n\t\tif((states[networkState] == \"No network connection\") || (states[networkState] == \"Unknown connection\"))\n\t\t{\n\t\t\talert(\"Your Deviceā Internet connection is not working. Please check and relaunch app.\");\n\t\t}\n}", "function webSocket_onopen()\n\t{\n\t\tstatusChange();\n\t\tconsole.log(\"[ASNeG_Client] WebSocket Verbindung geoeffnet\");\n\t\treadValueList();\n\t}", "function onConnectedChanged(e) {\n if (e.target.isConnected()) {\n //register event listeners for connection stalled\n var client = pureweb.getClient();\n pureweb.listen(client, pureweb.client.WebClient.EventType.STALLED_CHANGED, onStalledChanged);\n\n var diagnosticsPanel = document.getElementById('pwDiagnosticsPanel');\n if (diagnosticsPanel) {\n pureweb.client.diagnostics.initialize();\n }\n }\n}", "function isNetworkAvailable(){\n var networkState = navigator.connection.type;\n alert(networkState);\n if(networkState == Connection.NONE){\n return false;\n }\n return true;\n}", "handleConnectionChange() {\n const { dispatch } = store;\n const handleConnectionChange = (isConnected) => {\n if (!isConnected) {\n dispatch(AppActions.showError('You need an internet connection to use this app.'));\n }\n dispatch(AppActions.connected(isConnected));\n };\n const handleConnectionTypeChange = (netInfo) => {\n dispatch(AppActions.netInfoType(netInfo));\n };\n // NetInfo.isConnected.fetch().done(handleConnectionChange);\n NetInfo.isConnected.addEventListener('change', handleConnectionChange);\n NetInfo.fetch().done(handleConnectionTypeChange);\n NetInfo.addEventListener('change', handleConnectionTypeChange);\n }", "function ready() {\n conn.on('close', function() {\n status.textContent = 'Connection closed';\n status.className = classNames.warning;\n conn = null;\n });\n }", "function check() {\n isOnline = navigator.onLine;\n \n // show JSON if online, message if offline\n if(isOnline == true){\n getJSON();\n } else {\n document.getElementById(\"edge\").innerHTML = \"You are offline\";\n }// else\n} // check", "function listening(){console.log(\"listening. . .\");}", "function onOffline() {\n\tnavigator.vibrate(1000);\n alert(\"Your device is no longer connected to the internet, please reconnect to use all of the applications features.\");\n}", "function onConnect() {\n console.log(\"connected\");\n\n}", "function checkInternet() {\n let isConnected = dns.lookup(\"google.com\",function(err) {\n return ! (err && err.code == \"ENOTFOUND\");\n });\n return Promise.resolve(isConnected);\n}", "function onListening() {\n\t\tvar addr = server.address();\n\t\tvar bind = typeof addr === 'string' ? 'pipe ' + addr : 'port ' + addr.port;\n\t\tvar fqdn = scheme+\"://\"+host;\n\t\tcrawl.init(fqdn,host,scheme);\n\t}", "onConnection(delegate) {\n this.connected = delegate\n }", "run(){\n if(typeof this.handler === 'function'){\n this.emitter.on('internet_state_changed', (data)=> {\n this.handler(data);\n });\n }\n setInterval(()=> {\n this.checkInternet(_config_config__WEBPACK_IMPORTED_MODULE_1__[\"default\"].check_method, _config_config__WEBPACK_IMPORTED_MODULE_1__[\"default\"].host)\n .then((result)=>{\n if(this.isStateChanged(result)){\n this.emitInternetStateChanged(result)\n }\n })\n .catch((err)=>{\n console.error(err)\n });\n }, _config_config__WEBPACK_IMPORTED_MODULE_1__[\"default\"].interval);\n }", "function checkConnection(){ \n var networkState = navigator.connection.type; \n if(networkState=='none'){ \n app.router.navigate('/internet/'); \n }\n}", "function checkConnectionStatus() {\n if (!client.isConnected()) {\n connect();\n }\n}", "_changeNetwork() {\n\t\tconst onLine = window.navigator.onLine;\n\n\t\tif (!onLine) {\n\t\t\tthis.set('_state', STATES.OFFLINE);\n\t\t} else {\n\t\t\tthis.reconnect();\n\t\t}\n\t}", "function networkConnectivityErrorCallback() {\n console.log(\"Network Connectivity Loss Detected\");\n alert(\"Network Loss Detected, Waiting for Restore\");\n}", "_online() {\n // if we've requested to be offline by disconnecting, don't reconnect.\n if (this.currentStatus.status != \"offline\") this.reconnect();\n }", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n }", "function onConnect() {\n emitHello();\n $log.log(\"monitor is connected\");\n }", "function listenStatus() {\n return database.ref('.info/connected').on('value', (snapshot) => {\n if (snapshot.val()) {\n STATUS_REF.onDisconnect().set(IS_OFFLINE_FOR_DATABASE).then(function () {\n STATUS_REF.set(IS_ONLINE_FOR_DATABASE) \n });\n } \n });\n}", "function onConnect() {\n\t\tclient.subscribe(endpoints.Liveliness, onData);\n\t}", "function init(){\n wss.on('connection', onConnection);\n}", "function autoWebSocketConnectionListener(connected) {\n websocketConnected = connected;\n console.info(\"websocket connection\", connected);\n}", "function comeOnline() {\n self.status = \"online\";\n loggerConsole.system.debug(\"Logger onReady\", loggerClientName);\n // timer calibration must be done so the messages will be correctly sorted in the central logger;\n // this is necessary because there is timer drift between windows --- this appears to be a Chromium\n // bug we have to work around it. The timeOffset value adjusts the time using the routerService's\n // time as a central reference point.\n self.RouterClient.calibrateTimeWithRouterService(function (timeOffset) {\n newCalibratedTimeStampOffset = timeOffset;\n registerOnceWhenStarted();\n });\n }", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n\n}", "function checkConnection() {\n\t\n\t$('.no-connection').hide();\n\n\t//if no internet\n\tif(!window.connection) {\n\t\t/* ---------------------------------\n\t\t\tIF NO INTENET CONNECTION\t\n\t\t ---------------------------------*/\n\t\t//stop all loading stuff in the main page \n\t\tmainLoader('stop');\n\t\tvar detail \t= $('#message-detail').css('display');\n\t\tvar currentPage = $('.current-page').attr('id');\n\t\t\n\t\t//if no elemet in the field\n\t\tif(detail == 'none' && currentPage != 'compose') {\n\t\t\t$('.current-page').attr('id', 'list');\n\t\t\t//show no connection icon\t\n\t\t\t$('.no-connection').show();\n\t\t}\n\t\t\n\t\treturn false;\n\t}\n}", "onConnect() {\n console.log(\"WS Opened\")\n }", "function onConnect() {\n // Once a connection has been made report.\n console.log(\"Connected\");\n}", "function checkConnection(quiet) {\r\n\tif (!quiet) {\r\n\t\tquiet = false;\r\n\t}\r\n\r\n\tif (!isConnectionAvailable()) {\r\n\t\tif (quiet == false) {\r\n\t\t\twarn(\"Vous n'êtes pas connecté à Internet.\\nConnectez-vous et Essayez à nouveau.\");\r\n\t\t\tnavigator.notification.vibrate(1000);\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\treturn true;\r\n}", "function checkConnectionStatus() {\n if (checkConnection() == true) {\n MessageBox(\"No Internet connectivity\");\n return false;\n } else\n return true;\n}", "function showNetworkStatus(){\n // Me muestra en el HTML si tengo conexion a internet o no \n const statusDOM = document.getElementById('NET_STATUS');\n statusDOM.textContent = navigator.onLine ? 'SI' : 'NO';\n}", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"Conectado...\");\n\t\n client.subscribe(\"jeffersson.pino@gmail.com/WEB\");\n\n\t\n }", "function online() {\n\tif (!(isMobile.any()))\n\t\treturn true;\n\n if (typeof(navigator)!='object' || typeof(navigator.connection)!='object')\n\t return false;\n\t\t\n\tvar networkState = navigator.connection.type;\n\n\tvar states = {};\n\tstates[Connection.UNKNOWN] = 'Unknown connection';\n\tstates[Connection.ETHERNET] = 'Ethernet connection';\n\tstates[Connection.WIFI] = 'WiFi connection';\n\tstates[Connection.CELL_2G] = 'Cell 2G connection';\n\tstates[Connection.CELL_3G] = 'Cell 3G connection';\n\tstates[Connection.CELL_4G] = 'Cell 4G connection';\n\tstates[Connection.CELL] = 'Cell generic connection';\n\tstates[Connection.NONE] = 'No network connection';\n\n\tif (states[networkState] == 'No network connection') {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}", "function onConnect() {\n console.log(\"Connected!\");\n}", "function onOffline() {\n //alert('You are now offline!');\n isOffline = true;\n status.innerHTML += 'Offline at: ' + Date() + '<br>';\n }", "function checkNetConnection() {\n\tvar status = window.navigator.onLine;\n\tif (status) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "function on_connect_error() {\n console.log(\"Connection failed\");\n }", "function checkConnection() {\n\t\n\tvar networkState = navigator.connection.type;\n var states = {};\n states[Connection.UNKNOWN] = 'UnknownConnection';\n states[Connection.ETHERNET] = 'Ethernet connection';\n states[Connection.WIFI] = 'WiFi connection';\n states[Connection.CELL_2G] = 'Cell 2G connection';\n states[Connection.CELL_3G] = 'Cell 3G connection';\n states[Connection.CELL_4G] = 'Cell 4G connection';\n states[Connection.CELL] = 'Cell generic connection';\n states[Connection.NONE] = 'NONE';\n \n if(states[networkState]==\"NONE\")\n {\n\t\tvar nvMsg = sessionStorage.NetAlertMsg;\n var nvTit = sessionStorage.NetPopTitle;\n var nvOk = sessionStorage.DoneBtn;\n \n navigator.notification.alert(\"\"+nvMsg+\"\",alertDismissed,\"\"+nvTit+\"\",\"\"+nvOk+\"\");\n return false;\n //alert(alertmsg);\n }\n}", "function atAttemptConnection()\n{\n var listener = {\n finished : function(data){\n dump(data);\n }\n }\n try {\n transportService =\n Components.classes[\"@mozilla.org/network/socket-transport-service;1\"]\n .getService(Components.interfaces.nsISocketTransportService);\n transport = transportService.createTransport(null,0,\"localhost\",5331,null);\n\n outstream = transport.openOutputStream(0,0,0);\n\n stream = transport.openInputStream(0,0,0);\n dump( stream );\n instream = Components.classes[\"@mozilla.org/scriptableinputstream;1\"]\n .createInstance(Components.interfaces.nsIScriptableInputStream);\n instream.init(stream);\n \n var dataListener = {\n data : \"\",\n onStartRequest: function(request, context){},\n onStopRequest: function(request, context, status){\n instream.close();\n outstream.close();\n listener.finished(this.data);\n },\n onDataAvailable: function(request, context, inputStream, offset, count){\n // this.data += instream.read(count);\n\t var theData = instream.read(count);\n\t var theCount = count;\n\t if( theData == 1 )\n\t\t ambientTouchRate( 1 );\n\t else if( theData == 0 )\n\t\t ambientTouchRate( 0 );\n\t else\n\t {\n\t\t dump( \"data:\" );\n\t\t dump( theData );\n\t }\n \t\t\n\t },\n };\n \n \n pump = Components.\n classes[\"@mozilla.org/network/input-stream-pump;1\"].\n createInstance(Components.interfaces.nsIInputStreamPump);\n pump.init(stream, -1, -1, 0, 0, false);\n pump.asyncRead(dataListener,null);\n } catch (ex){\n alert(ex);\n }\n}", "addConnectionListener(callback) {\n this.addListener( this.connectionListeners, callback);\n }", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n client.subscribe(SUBSCRIBER);\n }", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n toastr.success(\"onConnect\")\n \n client.subscribe(\"general\")\n client.subscribe(\"status/+\")\n client.subscribe(\"readings/+\")\n\n //client.subscribe(\"temperature/+\")\n //client.subscribe(\"pressure/+\")\n //client.subscribe(\"humidity/+\")\n }", "function onConnectionFailed(){\n\t\t\tconsole.error(\"Connection Failed!\")\n\t\t}", "function listening(){\n\tconsole.log('listening');\n}", "function onNetworkChange(callback, errorCallback) {\n let handler;\n try {\n handler = (channel, raw) => {\n if (channel !== \"network/interface\")\n return;\n callback(raw);\n };\n Redis_1.SystemRedisSubscriber.subscribe(\"network/interface\");\n Redis_1.SystemRedisSubscriber.on(\"message\", handler);\n }\n catch (error) {\n console.error(error);\n errorCallback(error);\n }\n const returnable = {\n unsubscribe: () => {\n Redis_1.SystemRedisSubscriber.off(\"message\", handler);\n }\n };\n returnable.off = returnable.unsubscribe;\n return returnable;\n}", "function onopen() {\n\tconsole.log ('connection open!');\n\t//connection.send('echo\\r\\n'); // Send the message 'Ping' to the server\n}", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n alert(\"Se perdió la conexión\")\n console.log(\"onConnectionLost:\", responseObject.errorMessage);\n setTimeout(function() {\n client.connect()\n }, 5000);\n }\n}", "function onConnect() {\r\n // Once a connection has been made, make a subscription and send a message.\r\n console.log(\"onConnect\");\r\n client.subscribe(\"State\", { qos: Number(1) });\r\n client.subscribe(\"Content\", { qos: Number(1) });\r\n\r\n }", "CheckConnectivity(callback) {\n this.dbus.driver.invoke({\n destination: 'org.freedesktop.NetworkManager',\n path: '/org/freedesktop/NetworkManager',\n 'interface': 'org.freedesktop.NetworkManager',\n member: 'CheckConnectivity'\n }, (err, data) => callback && callback(err, data))\n }", "function onOpen(){\n console.log('Open connections!');\n}", "connect() {\n window.addEventListener('message', this.onConnectionMessageHandler);\n }", "function checkConnection() {\r\n var networkState = navigator.network.connection.type;\r\n\r\n var states = {};\r\n states[Connection.UNKNOWN] = 'Unknown connection';\r\n states[Connection.ETHERNET] = 'Ethernet connection';\r\n states[Connection.WIFI] = 'WiFi connection';\r\n states[Connection.CELL_2G] = 'Cell 2G connection';\r\n states[Connection.CELL_3G] = 'Cell 3G connection';\r\n states[Connection.CELL_4G] = 'Cell 4G connection';\r\n states[Connection.NONE] = 'No network connection';\r\n\r\n if (states[networkState] === 'No network connection') {\r\n alert('No network connection detected. Check settings.');\r\n } else {\r\n // alert('Connection type: ' + states[networkState]);\r\n }\r\n}", "function onConnect() {\n localDiv.html('client is connected');\n client.subscribe(topic);\n}", "function UseNetworkStatus() {\n let [online, isOnline] = useState(navigator.onLine);\n\n const setOnline = () => {\n isOnline(true);\n }\n\n const setOffline = () => {\n isOnline(false);\n }\n\n //register event listeners\n useEffect(() => {\n window.addEventListener(\"online\", setOnline);\n window.addEventListener(\"offline\", setOffline);\n\n //clean up if we unmount\n return () => {\n window.removeEventListener(\"online\", setOnline);\n window.removeEventListener(\"offline\", setOffline);\n }\n },[])\n\n return online\n}", "function onReconnect() {\n emitHello();\n $log.log(\"monitor is reconnected\");\n }", "function checkOnline(){\n\t\tif(navigator.onLine == true){\n\t\t\tconsole.log(\"isOnline == true\");\n\t\t\t$rootScope.isOnline = true;\n\t\t} else {\n\t\t\tconsole.log(\"isOnline == false\");\n\t\t\t$rootScope.isOnline = false;\n\t\t}\n\t}", "function onIdeOnline() {\n // Re-negotiate with server to get latest collab data\n if (_self.canceled)\n return;\n\n // handshake\n _self.refresh();\n }", "function cb_onConnect() {\n console.log(\"Connection established.\");\n $('#status').val('Connected to ' + host + ':' + port);\n topic = $('#topic').val();\n client.subscribe(topic);\n}", "_onConnect() {\n console.log(\"connected\")\n }", "onConnect() {\n this.socket && this.socket.write(this.handshake);\n this.healthCheck = setInterval(() => {\n if (new Date() - this.lastRead > 35000) {\n this.close(false);\n }\n }, 5 * 1000);\n }", "function handleICEConnectionStateChange(event){\n log(\"ICEConnectionStateChange: \"+pc.iceConnectionState)\n}", "function onOnline() {\n\tdeviceIsOnLine = true;\n}", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n cliente.connect({useSSL: true, onSuccess:onConnect});\n }\n}" ]
[ "0.7400724", "0.7076013", "0.6905801", "0.68138766", "0.679155", "0.6715543", "0.6659728", "0.66023964", "0.6478125", "0.6457009", "0.64541906", "0.6399948", "0.6399948", "0.6353448", "0.63150644", "0.6313401", "0.6289535", "0.6286815", "0.6270326", "0.6194549", "0.61912364", "0.61614007", "0.6155967", "0.61405677", "0.61325455", "0.6114644", "0.6107337", "0.60940576", "0.60737884", "0.60641253", "0.6061089", "0.60268307", "0.59812564", "0.5974089", "0.59739095", "0.59504116", "0.5935112", "0.59168893", "0.59157103", "0.5914739", "0.5912854", "0.5911997", "0.59118485", "0.5911577", "0.59030163", "0.59019244", "0.58916956", "0.5862469", "0.58499104", "0.5849305", "0.5846528", "0.5843253", "0.58282", "0.5828017", "0.5824036", "0.5822287", "0.581556", "0.5810721", "0.578158", "0.576284", "0.5761649", "0.57595503", "0.57513165", "0.5744907", "0.57429343", "0.5728565", "0.57254857", "0.57240856", "0.5713793", "0.57125086", "0.5710914", "0.57078034", "0.5706605", "0.57012516", "0.5690953", "0.5689043", "0.5680218", "0.5678651", "0.5672826", "0.5660213", "0.56601465", "0.56587344", "0.5652742", "0.5646507", "0.5645033", "0.56415826", "0.56374997", "0.56335026", "0.5632032", "0.562898", "0.56171364", "0.5604671", "0.56023914", "0.5599529", "0.55932814", "0.5592198", "0.55901533", "0.5589415", "0.55793947", "0.5576562", "0.5574521" ]
0.0
-1
remove the internet listener
componentWillUnmount() { // NetInfo.removeEventListener("change", this._handleConnectionChange); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "cleanup() {\n const { ws, udp } = this.sockets;\n\n if (ws) {\n ws.removeAllListeners('error');\n ws.removeAllListeners('ready');\n ws.removeAllListeners('sessionDescription');\n ws.removeAllListeners('speaking');\n }\n\n if (udp) udp.removeAllListeners('error');\n\n this.sockets.ws = null;\n this.sockets.udp = null;\n }", "cleanup() {\n const { ws, udp } = this.sockets;\n\n if (ws) {\n ws.removeAllListeners('error');\n ws.removeAllListeners('ready');\n ws.removeAllListeners('sessionDescription');\n ws.removeAllListeners('startSpeaking');\n ws.shutdown();\n }\n\n if (udp) udp.removeAllListeners('error');\n\n this.sockets.ws = null;\n this.sockets.udp = null;\n }", "removeListeners() {}", "removeListeners() {}", "removeListeners() {}", "destroy() {\n\t\tthis._listener.stopListening();\n\t}", "disconnect () {\n // close all data tunnel\n this.userTunnel.off();\n this.messageTunnel.off();\n this.channelStatusTunnel.off();\n this.removeAllListeners();\n }", "_unlisten() {\n const that = this;\n\n if (that._trackListener) {\n that._trackListener.unlisten();\n }\n\n if (that._fillListener) {\n that._fillListener.unlisten();\n }\n\n if (that._lineListener) {\n that._lineListener.unlisten();\n }\n }", "stop() {\n this.listening_ = false;\n this.chromeEvent_.removeListener(this.callback_);\n }", "removeListener(listener) {\n const index = activeListeners.findIndex(l => l === listener);\n if (index !== -1) {\n activeListeners.splice(index, 1);\n }\n }", "_removeGlobalListener() {\n if (this._globalSubscription) {\n this._globalSubscription.unsubscribe();\n this._globalSubscription = null;\n }\n }", "_removeGlobalListener() {\n if (this._globalSubscription) {\n this._globalSubscription.unsubscribe();\n this._globalSubscription = null;\n }\n }", "_removeGlobalListener() {\n if (this._globalSubscription) {\n this._globalSubscription.unsubscribe();\n this._globalSubscription = null;\n }\n }", "destroy() {\n\t\tfor(const [event, listener] of this.listeners) this.client.removeListener(event, listener);\n\t\tthis.listeners.clear();\n\t}", "_removeGlobalListener() {\n if (this._globalSubscription) {\n this._globalSubscription.unsubscribe();\n\n this._globalSubscription = null;\n }\n }", "unlisten() {\n ipc.removeListener('search-count', this._searchCoundHandler);\n ipc.removeListener('focus-input', this._focusHandler);\n }", "function remove(){primus.removeListener(\"error\",remove).removeListener(\"open\",remove).removeListener(\"end\",remove).timers.clear(\"connect\")}", "_removeEventListeners () {\n this._socket.removeAllListeners(ConnectionSocket.EVENT_ESTABLISHED)\n this._socket.removeAllListeners(ConnectionSocket.EVENT_CLOSED)\n this._socket.removeAllListeners(ConnectionSocket.EVENT_PEER_CONNECTED)\n this._socket.removeAllListeners(ConnectionSocket.EVENT_PEER_PING)\n this._socket.removeAllListeners(ConnectionSocket.EVENT_PEER_SIGNAL)\n this._rtc.removeAllListeners(ConnectionRTC.EVENT_RTC_SIGNAL)\n this._rtc.removeAllListeners(ConnectionRTC.EVENT_PEER_PING)\n this._rtc.removeAllListeners(ConnectionRTC.EVENT_CLOSED)\n }", "function stopListening () {\n if (window.removeEventListener) {\n window.removeEventListener('message', this.handler)\n }\n else {\n window.detachEvent('onmessage', this.handler)\n }\n}", "function LocalClient__unlisten(container) {\n\tif (container.__eventHandlers) {\n\t\tcontainer.__eventHandlers.forEach(function(handler) {\n\t\t\tcontainer.removeEventListener(handler.name, handler);\n\t\t});\n\t\tdelete container.__eventHandlers;\n\t}\n\tvar subscribeElems = container.querySelectorAll('[data-subscribe]');\n\tArray.prototype.forEach.call(subscribeElems, function(subscribeElem) {\n\t\tif (subscribeElem.__subscriptions) {\n\t\t\tfor (var url in subscribeElem.__subscriptions)\n\t\t\t\tsubscribeElem.__subscriptions[url].close();\n\t\t\tdelete subscribeElem.__subscriptions;\n\t\t}\n\t});\n}", "unlisten() {\n this.session.removeListener('changed', this[cookieChangedHandler]);\n ipcMain.removeListener('open-web-url', this[openSessionWindowHandler]);\n ipcMain.removeHandler('cookies-session-get-all');\n ipcMain.removeHandler('cookies-session-get-domain');\n ipcMain.removeHandler('cookies-session-get-url');\n ipcMain.removeHandler('cookies-session-set-cookie');\n ipcMain.removeHandler('cookies-session-set-cookies');\n ipcMain.removeHandler('cookies-session-remove-cookie');\n ipcMain.removeHandler('cookies-session-remove-cookies');\n app.removeListener('certificate-error', this[handleCertIssue]);\n this[sessionValue] = null;\n }", "onDestroy() {\n this.unlisten()\n }", "function cleanup(){\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup(){\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup(){\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup(){\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup(){\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup(){\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup(){\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup(){\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup(){\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup(){\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup(){\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup(){\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup(){\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup(){\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup(){\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup(){\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup(){\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup(){\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup(){\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "disconnect() {\n window.removeEventListener('message', this.onConnectionMessageHandler);\n this.closePort();\n }", "clearSocketListeners () {\n if (!this.socket)\n return\n\n this.socket.removeAllListeners('open')\n this.socket.removeAllListeners('close')\n this.socket.removeAllListeners('error')\n this.socket.removeAllListeners('message')\n }", "destroy() {\n\t\tthis.stopListening();\n\t}", "function removeListener(w, event, cb) {\n\t if(w.detachEvent) w.detachEvent('on' + event, cb);\n\t else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n\t }", "function removeListener(w, event, cb) {\n\t if(w.detachEvent) w.detachEvent('on' + event, cb);\n\t else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n\t }", "function removeListener(w, event, cb) {\n\t if(w.detachEvent) w.detachEvent('on' + event, cb);\n\t else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n\t }", "function removeListener(w, event, cb) {\n\t if(w.detachEvent) w.detachEvent('on' + event, cb);\n\t else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n\t }", "function removeListener(w, event, cb) {\n\t if(w.detachEvent) w.detachEvent('on' + event, cb);\n\t else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n\t }", "function removeStorageListener() {\n window.removeEventListener('storage', storageListener);\n isListening = false;\n}", "function removeStorageListener() {\n window.removeEventListener('storage', storageListener);\n isListening = false;\n }", "removeListener(event, listener) {\n this.ee.removeListener(event, listener);\n }", "function disconnect() {\r\n\t\t console.log('disconnect!');\r\n\t\t connection.removeEventListener(\r\n\t\t JitsiMeetJS.events.connection.CONNECTION_ESTABLISHED,\r\n\t\t onConnectionSuccess);\r\n\t\t connection.removeEventListener(\r\n\t\t JitsiMeetJS.events.connection.CONNECTION_FAILED,\r\n\t\t onConnectionFailed);\r\n\t\t connection.removeEventListener(\r\n\t\t JitsiMeetJS.events.connection.CONNECTION_DISCONNECTED,\r\n\t\t disconnect);\r\n\t\t}", "function cleanup () {\n debug.response('cleanup');\n socket.removeListener('close', onclientclose);\n socket.removeListener('error', onclienterror);\n socket.removeListener('end', onclientend);\n if (target) {\n target.removeListener('connect', ontargetconnect);\n target.removeListener('close', ontargetclose);\n target.removeListener('error', ontargeterror);\n target.removeListener('end', ontargetend);\n }\n }", "function removeListener() {\n register.then(function() {\n log.info('Lost device \"%s\" (%s)', device.id, device.type)\n\n clearTimeout(timer)\n flippedTracker.removeListener(device.id, deviceListener)\n _.pull(lists.all, device.id)\n delayedTotals()\n\n // Tell others the device is gone\n push.send([\n wireutil.global\n , wireutil.envelope(new wire.DeviceAbsentMessage(\n device.id\n ))\n ])\n\n _.assign(device, {\n present: false\n })\n\n check()\n })\n }", "function cleanup() {\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup() {\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup() {\n sendCommand(\"cleanup\");\n window.removeEventListener(\"message\", onMessage);\n $(\"#primeplayerinjected\").remove();\n $(\"#main\").off(\"DOMSubtreeModified mouseup\");\n ratingContainer.off(\"click\");\n $(window).off(\"hashchange\");\n for (var i = 0; i < observers.length; i++) {\n observers[i].disconnect();\n }\n hideConnectedIndicator();\n disableLyrics();\n port = null;\n }", "function cleanup(){\n\t transport.removeListener('open', onTransportOpen);\n\t transport.removeListener('error', onerror);\n\t transport.removeListener('close', onTransportClose);\n\t self.removeListener('close', onclose);\n\t self.removeListener('upgrading', onupgrade);\n\t }", "function cleanup(){\n\t transport.removeListener('open', onTransportOpen);\n\t transport.removeListener('error', onerror);\n\t transport.removeListener('close', onTransportClose);\n\t self.removeListener('close', onclose);\n\t self.removeListener('upgrading', onupgrade);\n\t }", "function cleanup(){\n\t transport.removeListener('open', onTransportOpen);\n\t transport.removeListener('error', onerror);\n\t transport.removeListener('close', onTransportClose);\n\t self.removeListener('close', onclose);\n\t self.removeListener('upgrading', onupgrade);\n\t }", "function cleanup(){\n\t transport.removeListener('open', onTransportOpen);\n\t transport.removeListener('error', onerror);\n\t transport.removeListener('close', onTransportClose);\n\t self.removeListener('close', onclose);\n\t self.removeListener('upgrading', onupgrade);\n\t }", "function cleanup(){\n\t transport.removeListener('open', onTransportOpen);\n\t transport.removeListener('error', onerror);\n\t transport.removeListener('close', onTransportClose);\n\t self.removeListener('close', onclose);\n\t self.removeListener('upgrading', onupgrade);\n\t }", "function cleanup(){\n\t transport.removeListener('open', onTransportOpen);\n\t transport.removeListener('error', onerror);\n\t transport.removeListener('close', onTransportClose);\n\t self.removeListener('close', onclose);\n\t self.removeListener('upgrading', onupgrade);\n\t }", "function cleanup(){\n\t transport.removeListener('open', onTransportOpen);\n\t transport.removeListener('error', onerror);\n\t transport.removeListener('close', onTransportClose);\n\t self.removeListener('close', onclose);\n\t self.removeListener('upgrading', onupgrade);\n\t }", "function cleanup(){\n\t transport.removeListener('open', onTransportOpen);\n\t transport.removeListener('error', onerror);\n\t transport.removeListener('close', onTransportClose);\n\t self.removeListener('close', onclose);\n\t self.removeListener('upgrading', onupgrade);\n\t }", "destroy () {\n this._socket.close()\n this._rtc.close()\n this._removeEventListeners()\n }", "function stop() {\n\t\tclearTimeout(t._loopTimer);\n\t\tsockets[0].removeAllListeners();\n\t\tsockets[1].removeAllListeners();\n\t} // end private stop", "function removeEventListeners(){\n _.forEach(unlistenCallbacks, function(unlisten){\n unlisten();\n });\n unlistenCallbacks = [];\n }", "function cleanup() {\n transport.removeListener(\"open\", onTransportOpen);\n transport.removeListener(\"error\", onerror);\n transport.removeListener(\"close\", onTransportClose);\n self.removeListener(\"close\", onclose);\n self.removeListener(\"upgrading\", onupgrade);\n }", "function cleanup() {\n transport.removeListener(\"open\", onTransportOpen);\n transport.removeListener(\"error\", onerror);\n transport.removeListener(\"close\", onTransportClose);\n self.removeListener(\"close\", onclose);\n self.removeListener(\"upgrading\", onupgrade);\n }", "function removeListener(w, event, cb) {\n if (w.detachEvent) w.detachEvent('on' + event, cb);else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n }", "function cleanup() {\n transport.removeListener(\"open\", onTransportOpen);\n transport.removeListener(\"error\", onerror);\n transport.removeListener(\"close\", onTransportClose);\n self.removeListener(\"close\", onclose);\n self.removeListener(\"upgrading\", onupgrade);\n }", "function removeListener(w, event, cb) {\n if(w.detachEvent) w.detachEvent('on' + event, cb);\n else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n }", "function removeListener(w, event, cb) {\n if(w.detachEvent) w.detachEvent('on' + event, cb);\n else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n }", "function removeListener(w, event, cb) {\n if(w.detachEvent) w.detachEvent('on' + event, cb);\n else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n }", "function removeListener(w, event, cb) {\n if(w.detachEvent) w.detachEvent('on' + event, cb);\n else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n }", "function removeListener(w, event, cb) {\n if(w.detachEvent) w.detachEvent('on' + event, cb);\n else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n }", "function removeListener(w, event, cb) {\n if(w.detachEvent) w.detachEvent('on' + event, cb);\n else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n }", "function unsubscribe (id) {\n\t listeners[id] = undefined;\n\t }", "function unsubscribe (id) {\n\t listeners[id] = undefined;\n\t }", "function cleanup () {\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup () {\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup () {\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup () {\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup () {\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup () {\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup () {\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup () {\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup () {\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup () {\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup () {\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup () {\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup () {\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup () {\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup () {\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup () {\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup () {\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup () {\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup () {\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }", "function cleanup () {\n transport.removeListener('open', onTransportOpen);\n transport.removeListener('error', onerror);\n transport.removeListener('close', onTransportClose);\n self.removeListener('close', onclose);\n self.removeListener('upgrading', onupgrade);\n }" ]
[ "0.6867692", "0.682865", "0.68000704", "0.68000704", "0.68000704", "0.65104675", "0.6488331", "0.6445912", "0.64288783", "0.6384493", "0.6362424", "0.6362424", "0.6362424", "0.63609797", "0.63594806", "0.6347866", "0.63193446", "0.6307796", "0.62908393", "0.6285485", "0.6281053", "0.6261293", "0.6258288", "0.6258288", "0.6258288", "0.6258288", "0.6258288", "0.6258288", "0.6258288", "0.6258288", "0.6258288", "0.6258288", "0.6258288", "0.6258288", "0.6258288", "0.6258288", "0.6258288", "0.6258288", "0.6258288", "0.6258288", "0.6258288", "0.62573916", "0.62492985", "0.62297153", "0.62237597", "0.62237597", "0.62237597", "0.62237597", "0.62237597", "0.6216645", "0.6208591", "0.6208431", "0.6203495", "0.6192718", "0.61917305", "0.61900765", "0.61900765", "0.618819", "0.6181718", "0.6181718", "0.6181718", "0.6181718", "0.6181718", "0.6181718", "0.6181718", "0.6181718", "0.61741143", "0.61573935", "0.61561793", "0.61561686", "0.61561686", "0.6151742", "0.6138203", "0.612447", "0.612447", "0.612447", "0.612447", "0.612447", "0.612447", "0.612207", "0.612207", "0.61169046", "0.61134017", "0.61134017", "0.61134017", "0.61134017", "0.61134017", "0.61134017", "0.61134017", "0.61134017", "0.61134017", "0.61134017", "0.61134017", "0.61134017", "0.61134017", "0.61134017", "0.61134017", "0.61134017", "0.61134017", "0.61134017", "0.61134017" ]
0.0
-1
using static to not create a new instance of the block object when calling it
static genesis(){ // return a new instance of the this block class, with dummy data, // the dummy hash just reads first-hash // with an empty array for data return new this('Genesis time', '-----', 'f1r57-h45h', [], 0, DIFFICULTY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "StaticBlock() {\n pushContext();\n }", "static block() { INSTANCES_COUNT = -1; }", "constructor() { \n \n Block.initialize(this);\n }", "function enterBlock(){\n blockContext = Object.create(blockContext)\n }", "function enterBlock(){\n blockContext = Object.create(blockContext)\n }", "function InvokeStaticBlock(block) {\n return [op(0\n /* PushFrame */\n ), PushCompilable(block), op(60\n /* CompileBlock */\n ), op(2\n /* InvokeVirtual */\n ), op(1\n /* PopFrame */\n )];\n}", "static mineBlock(lastBlock,data){\n const timestamp = Date.now();\n const lastHash = lastBlock.hash;\n const hash = Block.hash(timestamp, lastHash, data);\n \n return new this(timestamp, lastHash, hash, data);\n }", "populateBlockList() {\r\n\r\n }", "static genesis() {\n // this will refer to the Block class\n return new this(GENESIS_DATA);\n }", "initializeMockData() {\n\n/*\n (function theLoop (i) {\n setTimeout(function () {\n let blockTest = new BlockClass.Block(\"Test Block\");\n myBlockChain.addBlock(blockTest).then((result) => {\n console.log(result);\n i++;\n if (i < 10) theLoop(i);\n }, function(err){\n console.log(err);\n });\n }, 0); // set the time to generate new blocks, 0 = immediately\n })(0);\n*/\n }", "function notBlockUseCase() { console.log('Not an block use case');}", "function InvokeStaticBlock(block) {\n return [Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])(0\n /* PushFrame */\n ), Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])('PushCompilable', block), Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])('JitCompileBlock'), Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])(2\n /* InvokeVirtual */\n ), Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])(1\n /* PopFrame */\n )];\n}", "function InvokeStaticBlock(block) {\n return [Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])(0\n /* PushFrame */\n ), Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])('PushCompilable', block), Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])('JitCompileBlock'), Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])(2\n /* InvokeVirtual */\n ), Object(_encoder__WEBPACK_IMPORTED_MODULE_1__[\"op\"])(1\n /* PopFrame */\n )];\n}", "get block() { \n return this._block;\n }", "createGenesisBlock(){\n return new Block(Date.now(), [], '0');\n }", "constructor(){\n this.chain = [this.createGenesisBlock()];\n }", "constructor(){\r\n //an array of blocks\r\n this.chain = [this.createGenesisBlock()];\r\n \r\n }", "enterBlock(ctx) {\n\t}", "demoBlocks() {\n const self = this;\n\n function myFunction() {\n self.generateNextBlock();\n const rand = Math.round(Math.random() * 2000) + 1000; // 1000-3000ms interval.\n setTimeout(myFunction, rand);\n }\n\n setTimeout(myFunction, 1000);\n }", "enableBlockList() {\r\n\r\n }", "constructor() \n{ \n this.chain = [this.createGenesisBlock()]; \n}", "initializeMockData() {\n this.myBlockChain = new BlockChain.Blockchain();\n console.log(\"initializeMockData\")\n }", "constructor() {\n this.chain = [this.createGenesisBlock()];\n }", "block() {\n this.getBlocker().block();\n }", "async handleBlocks() {\n await this.api.rpc.chain.subscribeNewHeads(async (header) => {\n if (header.number % 100 == 0) {\n console.log(`Chain is at block: #${header.number}`);\n\n // Unconditionally recalculate validators every 10 minutes\n this.createValidatorList(); // do not await\n\n } else {\n const blockHash = await this.api.rpc.chain.getBlockHash(header.number);\n const block = await this.api.rpc.chain.getBlock(blockHash);\n \n const extrinsics = block['block']['extrinsics'];\n for (let i=0; i<extrinsics.length; i++) {\n const callIndex = extrinsics[i]._raw['method']['callIndex'];\n const c = await this.api.findCall(callIndex);\n //console.log(\"Module called: \", c.section);\n if (c.section == STAKING) {\n console.log(`A ${STAKING} transaction was called`);\n this.createValidatorList(); // do not await\n }\n }\n }\n\n });\n }", "function Block (data) {\n extend(this, data);\n}", "mine() {\n //method that determines which transactions are valid\n const validTransactions = this.transactionPool.validTransactions();\n\n //include a reward for the miner\n validTransactions.push(\n Transaction.rewardTransaction(this.wallet, Wallet.blockchainWallet())\n );\n\n //create a block consisting of the valid transactions\n const block = this.blockchain.addBlock(validTransactions);\n\n //synchronize the chains in the p2p server\n this.p2pServer.syncChains();\n\n //clear transaction pool (local)\n this.transactionPool.clear();\n this.p2pServer.broadcastClearTransactions();\n\n //broadcast to every miner to clear their transaction pools\n //want other classes to access the block generated from this class\n return block;\n }", "constructor() {\n this.chain = [Block.genesis()];\n }", "createGenesisBlock(){\n return this.chain[this.chain.length];\n }", "collectBlock (call: Object, callback: Function) {\n collectBlock(this._getContext(), call, callback)\n }", "constructor(address, args, block) {\n\n super();\n\n this.address = address;\n this.args = args;\n this.block = block || false;\n }", "constructor() {\n this.chain = [Block.genesis()];\n }", "constructor() {\n super();\n\n this.firstBlockAdded = false;\n this.staticModeBlockHeight = 0;\n\n // Bind to make 'this' work in callbacks.\n this.handleQueryCompleted = this.handleQueryCompleted.bind(this);\n }", "async mine(callback = null) {\n var last_block = this.lastBlock\n var proof = await this.proofOfWork(last_block)\n\n // Forge the new Block by adding it to the chain\n var previousHash = utils.hash(JSON.stringify(last_block))\n var block = this.newBlock(proof, previousHash)\n if(callback) {\n callback(block, null);\n } else {\n return block;\n }\n }", "function block1() {\r\nvar a=10;\r\n console.log(a);\r\n} //function scope of block 1", "postNewBlock() {\n let self = this;\n this.app.post(\"/api/block\", (req, res) => {\n let blockData = req.body.data;\n let block = new Block.Block(blockData);\n self.myBlockChain.addBlock(block)\n .then((block) => {\n res.send(block)\n })\n .catch((err) => {\n res.send(\"Error creating block: \" + err);\n })\n });\n }", "function Blockchain() {\n this.chain = [];\n this.pendingTransactions = [];\n this.currentNodeUrl = currentNodeUrl;\n this.networkNodes = [];\n\n //this is called the Genesus block, the 1st one of the chain. So it receives arbitrarian\n //parameters. However, the upcoming blocks must get legitimate parameters to run properly.\n this.createNewBlock(10, '0', '0');\n}", "createGenesisBlock(){\n return new Block(0, \"Genesis block\", \"0\");\n }", "static create() {\n const canvas = CANVAS;\n\n const width = random(Block.MIN_WIDTH, Block.MAX_WIDTH);\n const height = random(Block.MIN_HEIGHT, Block.MAX_HEIGHT);\n\n const x = random(0, canvas.width - width);\n const y = Math.floor(0 - height * 2);\n\n return new Block(x, y, width, height);\n }", "generateStarterBlock(){\n let block = new Block(0,[],Date.now(),0)\n this.blockchain.push(block)\n }", "update(block) {\n // remove content\n this.clear(); // invoke passed block\n\n if (typeof block === 'function') {\n block.call(this, this);\n }\n\n return this;\n }", "function create_if_block$m(ctx) {\n\t\tlet block;\n\t\tlet current;\n\n\t\tblock = new Block$2({\n\t\t\t\tprops: {\n\t\t\t\t\ttype: \"color\",\n\t\t\t\t\t$$slots: { default: [create_default_slot$9] },\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, inputValue, value*/ 1029) {\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}", "createGenesisBlock(){\r\n\r\n return new Block(0, \"01/01/2019\",\"Genesis block\",\"0\");\r\n }", "constructor (data) {\n // Block data model\n this.hash = \"\",\n this.height = 0,\n this.prev_block = \"\",\n this.time = 0,\n this.body = data\n }", "static mineBlock({ lastBlock, data }) {\n let hash, timestamp;\n const lastHash = lastBlock.hash;\n // destructure lastHash and difficulty from laste block\n let { difficulty } = lastBlock;\n let nonce = 0;\n\n //=================================================>\n // Sets the difficulty level\n //=================================================>\n do {\n nonce++;\n timestamp = Date.now();\n // re adjust the difficulty for each\n difficulty = Block.adjustDifficulty({\n originalBlock: lastBlock,\n timestamp\n });\n // Generates hash with data\n hash = cryptoHash(timestamp, lastHash, data, nonce, difficulty);\n } while (\n hexToBinary(hash).substring(0, difficulty) !== \"0\".repeat(difficulty)\n );\n // Create new block with the params\n return new this({\n timestamp,\n lastHash,\n hash,\n data,\n nonce,\n difficulty\n });\n }", "genesisBlock() {\n return new Block([], \"\");\n }", "static mineBlock ( payload ){\n console.log(`Mining Block`)\n return new Promise((resolve, reject) => {\n let hash;\n let lastBlock = DB.transactionLastBlock();\n //payload.id = uuid();\n do {\n payload.created_at = Date.now()\n payload.nonce = CRPYTO.randomBytes(16).toString('base64');\n payload.difficulty = Block.adjustDifficulty(payload, lastBlock);\n //console.log('DIFFICULTY: ', payload.difficulty)\n payload.lastHash = lastBlock.hash\n hash = CryptUtil.hash(payload, payload.difficulty, payload.nonce);\n }while( HexToBin(hash).substr(0, payload.difficulty) !== '0'.repeat(payload.difficulty))\n let block = {\n payload : payload,\n hash\n }\n //Broadcast the new block\n global.node.broadcast.write(JSON.stringify({channel:'block', payload:block}))\n resolve(DB.transactionPutBlock(block));\n })\n \n \n }", "createGenesisBlock(){\n return new Block(Date.parse(\"2018-03-18\"), [], \"0\");\n }", "static initialize(obj, sequence, blockIdentifier, type) { \n obj['sequence'] = sequence;\n obj['block_identifier'] = blockIdentifier;\n obj['type'] = type;\n }", "addBlock(transactions) {\n // Your code here\n\n }", "function blk() {\n prev = -1;\n flag3 = 0;\n type = 4; // For block type is equal to four\n}", "static mineBlock({ lastBlock, data }) {\n const lastHash = lastBlock.hash;\n let hash, timestamp;\n let { difficulty } = lastBlock; // refer to the difficulty of the last mined block... ultimately going to the Genesis Block\n let nonce = 0;\n\n do {\n // loop for changing nonce and recalculating hash\n nonce++;\n timestamp = Date.now();\n difficulty = Block.adjustDifficulty({\n originalBlock: lastBlock,\n newBlockTimestamp: timestamp,\n });\n hash = cryptoHash(timestamp, lastHash, data, nonce, difficulty);\n } while (hexToBinary(hash).substring(0, difficulty) !== '0'.repeat(difficulty));\n\n return new this({\n timestamp, // timestamp: timestamp\n lastHash,\n data,\n difficulty,\n nonce,\n hash,\n });\n }", "invokeBlock(block, args) {\n let compiled = block.compile(this.env);\n this.pushFrame(compiled, args);\n }", "function block_fn() {\n setVisibility(\"block\");\n inputType = \"Block\";\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}", "static mineBlock(lastBlock, data) {\n\n // number of milliseconds that passed from a certin point\n // in history\n const lastHash = lastBlock.hash;\n let { difficulty } = lastBlock;\n let nonce = 0;\n let hash, timestamp;\n\n do {\n nonce++;\n timestamp = Date.now();\n // since adjusting the difficulty is based on the previous\n // block we need the lastBlock difficulty and the current \n // timestamp to generate a new difficulty \n difficulty = Block.adjustDifficulty(lastBlock, timestamp) ;\n hash = Block.hash(timestamp, lastHash, data, nonce, difficulty);\n } while (hash.substring(0, difficulty) !== '0'.repeat(difficulty));\n\n return new this(timestamp, lastHash, hash, data, nonce, difficulty);\n }", "function ISSUE_BLOCK$static_(){IssuesPanelBase.ISSUE_BLOCK=( new com.coremedia.ui.models.bem.BEMBlock(\"cm-issue\"));}", "function makeBlock(statement) {\n return new Shift.BlockStatement({ block: new Shift.Block({ statements: [statement] }) });\n}", "createGenesisBlock(){\r\n return new Block(0,'28/12/2017','this is genesis block','100');\r\n }", "function Use(type : BlockType)\n{\n\tswitch(type)\n\t{\n\t\tcase BlockType.COIN:\n\t\t\tCoin();\n\t\t\tbreak;\n\t\tcase BlockType.PRIZE:\n\t\t\tPrize();\n\t\t\tbreak;\n\t\tcase BlockType.INVISIBLE_LIFE:\n\t\t\tInvisibleLife();\n\t\t\tbreak;\n\t}\n}", "blocker(program, state, callback) {\n return [];\n // yes, we are *not* calling the callback;\n }", "createGenesisBlock(){\n return new Block(\"01/02/2000\",\"\",\"0\")\n }", "generateGenesisBlock(){\n // Add your code here\n if(this.chain.length===0){\n let newBlock = new Block.Block();\n newBlock.height = 0;\n // UTC timestamp\n newBlock.time = new Date().getTime().toString().slice(0,-3);\n // previous block hash\n newBlock.previousBlockHash = '';\n newBlock.body = 'Genesis Block!';\n // Block hash with SHA256 using newBlock and converting to a string\n newBlock.hash = SHA256(JSON.stringify(newBlock)).toString();\n // Adding block object to chain\n this.chain.push(newBlock);\n }\n\n }", "clone() {\n const ret = new Block();\n ret.copy(this);\n return ret;\n }", "function block() {\n blocked++;\n }", "function newStageBlock() {\n return require('./templates/stage-block.hbs')();\n}", "function __(tag, block) {\n block.tag = tag;\n return block;\n }", "constructor(genesisBlock) {\n\n this.blocks = [];\n\n //2 [0, 2]\n this.addBlock(genesisBlock);\n }", "function newBlock() {\n xPosition = 7;\n yPosition = 0;\n rotation = 0;\n clearFullLines();\n currentPiece = nextPiece;\n generateRandomBlock();\n arrayOfBlockFunctions[currentPiece]();\n\n mainInterval = setInterval(dropBlock, dropDelay);\n}", "constructor(){\n this.chain = [this.createGenesisBlock()]; // Array to hold chain of blocks\n this.difficulty = 5;\n this.pendingTransactions = [];\n this.miningReward = 100; // If you successfully mine a new block\n }", "function generateBlock(blockType,blockId){\n var blockObj;\n //--------BASIC blocks\n if(blockType === \"text_b\")\n blockObj = new TextBlock(blockId,globalOptions.gen_block_class, \"#\" + $(this).attr(\"id\"));\n else if(blockType === \"title_b\")\n blockObj = new TitleBlock(blockId, globalOptions.gen_block_class, \"#\" + $(this).attr(\"id\"));\n else if(blockType === \"image_b\"){\n blockObj = new ImageBlock(blockId, globalOptions.gen_block_class, \"#\" + $(this).attr(\"id\"));\n blockObj.checkImageExist();\n }\n else if(blockType === \"image_text_b\"){\n blockObj = new ImageTextBlock(blockId, globalOptions.gen_block_class, \"#\" + $(this).attr(\"id\"));\n blockObj.checkImageExist();\n }\n else if(blockType === \"button_b\")\n blockObj = new ButtonBlock(blockId, globalOptions.gen_block_class, \"#\" + $(this).attr(\"id\"));\n else if(blockType === \"gallery_b\"){\n blockObj = new GalleryBlock(blockId, globalOptions.gen_block_class, \"#\" + $(this).attr(\"id\"));\n blockObj.checkImagesExist();\n }\n else if(blockType === \"map_b\")\n blockObj = new MapsBlock(blockId, globalOptions.gen_block_class, \"#\" + $(this).attr(\"id\"));\n //--------STRUCTURE blocks\n else if(blockType === \"column_b\")\n blockObj = new ColumnBlock(blockId, globalOptions.gen_block_class, \"#\" + $(this).attr(\"id\"));\n else if(blockType === \"divider_b\")\n blockObj = new DividerBlock(blockId, globalOptions.gen_block_class, \"#\" + $(this).attr(\"id\"));\n //--------AJAX blocks\n else if(blockType === \"ajax_content_b\"){\n blockObj = new AjaxContentBlock(blockId, globalOptions.gen_block_class, \"#\" + $(this).attr(\"id\"));\n blockObj.getAjaxBlockContents();\n }\n //--------MEDIA blocks\n else if(blockType === \"pdf_b\")\n blockObj = new PdfBlock(blockId, globalOptions.gen_block_class, \"#\" + $(this).attr(\"id\"));\n else if(blockType === \"youtube_b\")\n blockObj = new YoutubeBlock(blockId, globalOptions.gen_block_class, \"#\" + $(this).attr(\"id\"));\n else if(blockType === \"social_icons_b\")\n blockObj = new SocialIconsBlock(blockId, globalOptions.gen_block_class, \"#\" + $(this).attr(\"id\"));\n else if(blockType === \"code_b\")\n blockObj = new CodeBlock(blockId, globalOptions.gen_block_class, \"#\" + $(this).attr(\"id\"));\n\n genBlocksList.push(blockObj);\n\n return blockObj;\n}//generateBlock", "function cnstr() { // All of the normal singleton code goes here.\n\t\treturn {\n\t\t\tgetPreset: function(name){\n\n\t\t\t\tswitch (name) {\n\n\t\t\t\t\tcase \"getRandomGraphic\":\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * Use to switch randomly bw an array of graphics saved as this.poses. Object must also have an idleTimeout property set to 0.\n\t\t\t\t\t\t */\n\t\t\t\t\t\n\t\t\t\t\t\treturn function () {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (this.idleTimeout === 0) {\n\t\t\t\t\t\t\t\tvar alias = this.alias;\n\t\t\t\t\t\t\t\tthis.idleTimeout = setTimeout(function(){\n\t\t\t\t\t\t\t\t\tvar a = BigBlock.Blocks[BigBlock.getBlock(alias)];\n\t\t\t\t\t\t\t\t\tif (typeof(a) !== \"undefined\" && typeof(a.poses) !== \"undefined\") {\n\t\t\t\t\t\t\t\t\t\ta.goToAndStop(a.poses[Math.getRandomNumber(0, a.poses.length-1)]);\n\t\t\t\t\t\t\t\t\t\ta.idleTimeout = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}, Math.getRandomNumber(500, 1000));\n\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\tcase \"move_wallCollide\":\n\t\t\t\t\t\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * Block will rebound off walls defined by Grid. \n\t\t\t\t\t\t */\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn function(){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tvar vx = (this.vel * BigBlock.Grid.blk_dim) * Math.cos(this.angle);\n\t\t\t\t\t\t\tvar vy = (this.vel * BigBlock.Grid.blk_dim) * Math.sin(this.angle);\n\t\t\t\t\t\t\tif (this.x + vx > 0 && this.x + vx < BigBlock.Grid.width) {\n\t\t\t\t\t\t\t\tthis.x = this.x + vx;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tthis.vel *= 1.5;\n\t\t\t\t\t\t\t\tthis.angle += Math.degreesToRadians(180);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (this.y + vy > 0 && this.y + vy < BigBlock.Grid.height) {\n\t\t\t\t\t\t\t\tthis.y = this.y + vy;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tthis.vel *= 1.5;\n\t\t\t\t\t\t\t\tthis.angle += Math.degreesToRadians(180);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (Math.floor(this.vel--) > 0) { // decelerate\n\t\t\t\t\t\t\t\tthis.vel--;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tthis.vel = 0;\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\t\n\t\t\t\t\tcase \"move\":\n\t\t\t\t\t\treturn function(){\n\t\t\t\t\t\t\tthis.x += BigBlock.Grid.blk_dim;\n\t\t\t\t\t\t};\n\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t};\n\t}", "function Block(options) {\n Client.call(this, options)\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}", "static getBlockFromString(block) {\n return JSON.parse(block);\n }", "constructor(data){\n\t\tthis.hash = null; // Hash of the block\n\t\tthis.height = 0; // Block Height (consecutive number of each block)\n\t\tthis.body = Buffer.from(JSON.stringify(data)).toString('hex'); // Will contain the transactions stored in the block, by default it will encode the data\n\t\tthis.timeStamp = 0; // Timestamp for the Block creation\n\t\tthis.previousBlockHash = null; // Reference to the previous Block Hash\n }", "static genesis()\n {\n return new this('genesis Block','-----','fir57-h45h',[],0,DIFFICULTY);\n }", "static wrap(nodes) {\r\n\t\t\t\t\tif (nodes.length === 1 && nodes[0] instanceof Block) {\r\n\t\t\t\t\t\treturn nodes[0];\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn new Block(nodes);\r\n\t\t\t\t}", "function createNewBlock() {\n\n // Create a new block object, and assign it to currentBlock.\n currentBlock = new Block(SHAPES_PATTERN[Math.floor(Math.random() * SHAPES_PATTERN.length)]);\n\n var i = 0;\n\n // Check dataBoard cells whether the positions of the new block are already occupied.\n while(i < currentBlock.currentRects.length){\n if(dataBoard[currentBlock.currentRects[i].y][currentBlock.currentRects[i].x] !== null) {\n // if yes terminate game.\n return gameOver();\n }\n i ++;\n }\n\n // if all cells are available, continue game. Map currentBlock into dataBoard cells.\n currentBlock.set();\n\n // Render dataBoard data as SVG DOM.\n stage.render();\n}", "function Block(gridX,gridY,material,blockSize){ //The x and y will be in world coordinates\r\n /***************\r\n * Block Material Guide:\r\n * 0:air\r\n * 1:dirt\r\n * 2:stone\r\n * 3:bedrock\r\n ***************/\r\n this.gridX = gridX;\r\n this.gridY = gridY;\r\n this.blockSize = blockSize;\r\n this.x = this.gridX*this.blockSize;\r\n this.y = this.gridY*this.blockSize;\r\n this.width = this.blockSize;\r\n this.height = this.blockSize;\r\n this.material = material;\r\n\r\n //Determine the color based on the material\r\n if(this.material == 0){\r\n this.color = null;\r\n }else if(this.material == 1){\r\n this.color = \"#583609\";\r\n }else if(this.material == 2){\r\n this.color = \"#838383\";\r\n }else if(this.material == 3){\r\n this.color = \"#292929\";\r\n }\r\n\r\n //Draw the block based on its color, grid pos and camera position.\r\n this.draw = function(camera){\r\n if(material != 0){\r\n ctx.beginPath();\r\n ctx.fillStyle = this.color;\r\n ctx.fillRect(this.x-camera.x, this.y-camera.y, this.blockSize+1, this.blockSize+1);\r\n ctx.fill();\r\n ctx.closePath();\r\n }\r\n }\r\n}", "function newBlock()\n\t{\n\t\tif(nextBlock == null)\n\t\t\tnextBlock = new Block();\n\n\t\tcurrentBlock = nextBlock;\n\t\tcurrentBlock.x = currentBlock.y = 0;\n\t\tcurrentBlock.moveHor(Math.floor(self.numColumns/2));\n\t\tcurrentBlock.moveVer(-1);\n\n\t\tbgGrid.addChild(currentBlock);\n\n\t\tnextBlock = new Block();\n\t\tnextBlock.x = bgGrid.x + bgGrid.width + GAP;\n\t\tnextBlock.y = celwid * 2;\n\t\tself.addChild(nextBlock);\n\t\t\n\t\tspeedPoints = 0;\n\t\tupdateSpeedPoints();\n\n\t\tvar canPlace = validateNewBlockPosition();\n\t\tif(!canPlace)\n\t\t\tgameOverSequence();\n\t}", "addBlock(new_Block){ // (1)\n new_Block.prevHash = this.getPrevBlock().hash; // (2)\n // new_Block.hash = new_Block.calcHash(); // (3)\n new_Block.mineNewBlock(this.difficulty); // (new 3)\n this.chain.push(new_Block);\n }", "static async initBlockchain() {\n const length = await storage.length();\n if (length === -1) {\n const genesisBlock = Blockchain.getBlockAsString(Blockchain.createGenesisBlock());\n const newGenesisBlock = storage.addLevelDBData(0, genesisBlock);\n if (newGenesisBlock) {\n console.log('Genesis Block created'.bgCyan)\n }\n }\n console.log('Blockchain initialized!'.bgBlue)\n return new Blockchain('Initialized');\n }", "static initialize(obj, networkIdentifier, blockIdentifier) { \n obj['network_identifier'] = networkIdentifier;\n obj['block_identifier'] = blockIdentifier;\n }", "createGenesisBlock(){\n return new Block(\"18/05/2018\", {amount:\"Genesis Block\"}, \"0\");\n }", "function Block(start, end) {\n this.start = start;\n this.end = end;\n}", "async initialize() {\n let self = this;\n // check if genesis block (index=0) exists\n await self.getBlockHeight().catch(async function(err) {\n // create genesis block on init\n await self.addGenesisBlock().then(\n function(message) {\n console.log(message);\n },\n function(err) {});\n }\n ); \n }", "addBlock(data){\n let newBlock = new Block(this.getLatestBlock().index +1 , data, this.getLatestBlock().hash);\n this.mineBlock(this.difficulty, newBlock); \n this.chain.push(newBlock); \n }", "static mineBlock(lastBlock, data) {\n \tconst lastHash = lastBlock.hash;\n let hash, timestamp;\n let nonce = 0;\n let { difficulty } = lastBlock;\n\n // Proof of work\n do {\n nonce++;\n timestamp = Date.now();\n // Recalculate the difficulty\n difficulty = this.adjustDifficulty(lastBlock, timestamp);\n\n hash = Block.hash(timestamp, lastHash, data, nonce, difficulty);\n\n // Until the DIFFICULTY first number of zeros match hash\n } while(hash.substring(0, difficulty) !== '0'.repeat(difficulty));\n\n return new this(timestamp, lastHash, hash, data, nonce, difficulty);\n }", "constructor() {\n this.chain = [this.createGenesisBlock()]\n this.difficulty = 2 // number of zeros a block hash needs to have in the beginning\n this.pendingTransactions = [] // transactions that are pending (not on any block), and will be added to the next block when it is created/mined\n this.miningReward = 100 // reward that someone gets for mining a single block\n }", "function block(x, y, width, height, blockCode, isVoid)\n{\n\tthis.isVoid = isVoid;\n\tthis.x = ((x * blockWidth) + ((x + 1) * blockSpacing));\n\tthis.y = ((y * blockHeight) + ((y + 1) * blockSpacing) + CANVAS_Y_OFFSET);\n\tthis.width = width;\n\tthis.height = height;\n}", "function ownBlockObject(color) {\n this.color = color;\n this.ypos = 20;\n this.update = function () {\n var c = document.getElementById(\"canvas\");\n var ctx = c.getContext(\"2d\");\n ctx.fillStyle = this.color;\n ctx.fillRect(20, this.ypos, 20, 100);\n }\n}", "createBlockRequestResponse(data){\n\n\n\n\t\t}", "constructor(codeBlock){\n this.codeBlocks = [];\n this.codeBlocks.push(codeBlock);\n this.currBlockIndex =0;\n this.currResult;\n }", "constructor() {\n this.blocks = [this.genesisBlock()];\n this.difficulty = 2;\n this.pendingTransactions = [];\n this.miningRewards = 50;\n }", "function block(i) {\n \"use strict\";\n\tnmb = i;\n\texecute();\n}", "constructor() {\n // run super\n super();\n\n // bind methods\n this.viewAction = this.viewAction.bind(this);\n this.updateAction = this.updateAction.bind(this);\n this.removeAction = this.removeAction.bind(this);\n\n // register simple block\n BlockHelper.block('dashboard.notes', {\n acl : ['admin.notes'],\n for : ['admin'],\n title : 'Notes Area',\n description : 'Lets you add notes to a block',\n }, async (req, block) => {\n // get notes block from db\n const blockModel = await Block.findOne({\n uuid : block.uuid,\n }) || new Block({\n uuid : block.uuid,\n type : block.type,\n });\n\n // return\n return {\n tag : 'notes',\n class : blockModel.get('class') || null,\n title : blockModel.get('title') || '',\n content : blockModel.get('content') || '',\n };\n }, async (req, block) => {\n // get notes block from db\n const blockModel = await Block.findOne({\n uuid : block.uuid,\n }) || new Block({\n uuid : block.uuid,\n type : block.type,\n });\n\n // set data\n blockModel.set('class', req.body.data.class);\n blockModel.set('title', req.body.data.title);\n blockModel.set('content', req.body.data.content);\n\n // save block\n await blockModel.save(req.user);\n });\n }", "createGenesisBlock() {\n return new Block(Date.parse(\"2021-01-01\"), [], \"0\");\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 addBlocks (Blockly) {\n const QH_BEMFA_COLOR = '#5b67a5'\n const QH_BEMFA_ICO = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAAC4jAAAuIwF4pT92AAALhWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDIgNzkuMTYwOTI0LCAyMDE3LzA3LzEzLTAxOjA2OjM5ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczpwaG90b3Nob3A9Imh0dHA6Ly9ucy5hZG9iZS5jb20vcGhvdG9zaG9wLzEuMC8iIHhtbG5zOnRpZmY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vdGlmZi8xLjAvIiB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDE4LTA4LTEwVDE5OjI1OjI1KzA4OjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIyMDE5LTA0LTEyVDE0OjQzOjMwKzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAxOS0wNC0xMlQxNDo0MzozMCswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NWU5ZWIyZGMtM2U2ZC1kYzRlLTg5MmMtNmJjNjNmZjVkZmUwIiB4bXBNTTpEb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6YzBmYWUyM2QtZjEzZi02NTRhLTgyZWUtOTE3NWNjNGNiYTdiIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6MGViNzZhZTYtNTM4Ny00MDQxLWJhYzYtNjNhNDk4YzlkMGNmIiBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIiBwaG90b3Nob3A6SUNDUHJvZmlsZT0ic1JHQiBJRUM2MTk2Ni0yLjEiIHRpZmY6T3JpZW50YXRpb249IjEiIHRpZmY6WFJlc29sdXRpb249IjMwMDAwMDAvMTAwMDAiIHRpZmY6WVJlc29sdXRpb249IjMwMDAwMDAvMTAwMDAiIHRpZmY6UmVzb2x1dGlvblVuaXQ9IjIiIGV4aWY6Q29sb3JTcGFjZT0iMSIgZXhpZjpQaXhlbFhEaW1lbnNpb249IjgwMCIgZXhpZjpQaXhlbFlEaW1lbnNpb249IjgwMCI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6MGViNzZhZTYtNTM4Ny00MDQxLWJhYzYtNjNhNDk4YzlkMGNmIiBzdEV2dDp3aGVuPSIyMDE4LTA4LTEwVDE5OjI1OjI1KzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoV2luZG93cykiLz4gPHJkZjpsaSBzdEV2dDphY3Rpb249InNhdmVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOjEyOTdhMjQ4LWEwYWUtZDA0OS1hMDE3LTRmMDBlYjc1NjdiMCIgc3RFdnQ6d2hlbj0iMjAxOC0wOC0yOVQxNzo1NzoxMCswODowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTggKFdpbmRvd3MpIiBzdEV2dDpjaGFuZ2VkPSIvIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJzYXZlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDpkYmQ4OWExMy03OTMzLWQzNDUtYTIzNi1lZmIzYjkwYWY2NzAiIHN0RXZ0OndoZW49IjIwMTktMDQtMTJUMTQ6NDM6MzArMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE4IChXaW5kb3dzKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY29udmVydGVkIiBzdEV2dDpwYXJhbWV0ZXJzPSJmcm9tIGFwcGxpY2F0aW9uL3ZuZC5hZG9iZS5waG90b3Nob3AgdG8gaW1hZ2UvcG5nIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJkZXJpdmVkIiBzdEV2dDpwYXJhbWV0ZXJzPSJjb252ZXJ0ZWQgZnJvbSBhcHBsaWNhdGlvbi92bmQuYWRvYmUucGhvdG9zaG9wIHRvIGltYWdlL3BuZyIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0ic2F2ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6NWU5ZWIyZGMtM2U2ZC1kYzRlLTg5MmMtNmJjNjNmZjVkZmUwIiBzdEV2dDp3aGVuPSIyMDE5LTA0LTEyVDE0OjQzOjMwKzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoV2luZG93cykiIHN0RXZ0OmNoYW5nZWQ9Ii8iLz4gPC9yZGY6U2VxPiA8L3htcE1NOkhpc3Rvcnk+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOmRiZDg5YTEzLTc5MzMtZDM0NS1hMjM2LWVmYjNiOTBhZjY3MCIgc3RSZWY6ZG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOmVlZDRhMDdjLTQ5MjctODI0NC1iZDA0LTNkNmYzMzgwMzVmOSIgc3RSZWY6b3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOjBlYjc2YWU2LTUzODctNDA0MS1iYWM2LTYzYTQ5OGM5ZDBjZiIvPiA8cGhvdG9zaG9wOkRvY3VtZW50QW5jZXN0b3JzPiA8cmRmOkJhZz4gPHJkZjpsaT5hZG9iZTpkb2NpZDpwaG90b3Nob3A6NDA4NTIwMjktNjMwZi0yZjRjLTlkMmItMGY0NGM4ZTI2YmFmPC9yZGY6bGk+IDxyZGY6bGk+eG1wLmRpZDowZWI3NmFlNi01Mzg3LTQwNDEtYmFjNi02M2E0OThjOWQwY2Y8L3JkZjpsaT4gPC9yZGY6QmFnPiA8L3Bob3Rvc2hvcDpEb2N1bWVudEFuY2VzdG9ycz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4WHlDIAAAXoUlEQVR4nNVdeXwUVbb+zq2q7vSaTifpbIQgCTvug4K4oI4O74k6g4jLqKOgojMuqKPOiAqKC6Lz1BGRUTYd3MYV1HFD4vIAFxBRNo0EWbIvZOlOd1dX3fv+qO6Q0EmnutPovO/3qx9J+m791Tn3nHvuuRcSQqArBr2RfeAXSYA6GKiFARLiwQFhAeDiABNAgIGCDJAEIAAIQLg4qE2CcHAIlw5o1FmdBAERAkgAzCgPZrSLIAEOYfzMAFD072SUq2prwsSBp2PVGat7GBgAQI4+erRWJNpDWsHS3eDPBa/Vhq8avsKu9l09fUwwXnkYBnEcgBUGoWnFfx6BFH1iP7Muv3eBQ3agtr0N71e/21MrCgzSYhKnwSCTAFjQsz6lhLS/kaQhcEBedCjQiCAEgWAonyBAERqY0MEPMMmj6r6l5duDW5SMTxDqoadI9DM5Wk6DQXTKoD7nwBAzugwTKBydszgAizE/ClkAsgAiDFAEoAMUIoiMaLsRAjJElAyjHlQC6QRBBnvCpylQSQZBQCWNdbASqDhNSPBBEhIF2X7h4utFtr6J1Uq6kAFSCcIiAKsAwgQ9pMPmsGPHlXusALRxbx6px77GXv8enDNoMhaeuAT17XU47l+j8NP0RilKpDZ4SZ4urBwQAIUZwAGeo3XOtz9NbuqVwF9UAkWRJiHALAiSoDALI4IS6mCPg+NskPEiIADIAtTKQC1si3CKmSJbW0O1cpxB2HHlHhkAxq08QF5v8C216fXTggwx2U8Rv9gcqBdGJASYlUIUoQ4WogDNpwCrhG6QB8Cw5l15EhhNflrN9ijvCyYGiRydwERX2yrBUFOzYDDUOGX8YgRShAQFKUTt0mQKsP0IsVs63ZjeEDMoEZxBfraLVckPN4mAFbLA7hsbFQBi/KqjTc1p9dOCCgAxeImvX3Pgz0ugIKNHSYDVKqOpTfoGYbwMHR5Iokdr2yNio+5gt+Q0ZjZSmP2+VW2Vyp4pUFvVVrRF2ro9LZEWdGiBzuo/TW9kANjg5blqf7/SIZ8DhU8jCjCAkzCMDTkoSEsRpKmdDnQqIBgqrsFJfmnF4Y8OvlPY6ZKBtkEbBefoahzDWggexWOMx9D3mIPdbxxaAhVBFCQZ0XmJOughqHQbOBlfPh1gAGPA3qrm4X8989bpD0ycv7FdbetGIBccimQBAOS58mUA8C21aU7m7Hf3h5ZAnQRCLELA7xCkJdCQFVPhdIGIUNNWgyGFA8N3nT5nHgC4LO5EVWQA/VbdGNI6Bwo7Z52tGvZtFAVpI/zsdXBkQYL5ec4kCIDfL/Dnk//yhE2x7+mjuAJADFqS0y/D0RVpkUCRrTPo3AI/42BChSAHBdhCROgyQBiBhkMAiRh2Nldj/JAxu68+7tpZJqqwulCtCkrfW0wsgSb6ETbBhEZWCjCdIqRSmP0JIWqBCoO8NEtcV6i6Cs6BO0+b8zD6UMvaYA3N+PgyXvxyASMJnaug/iIxgaKPDqIhK4pQCAE2jtpYBQJsARjk3oIA6YLEJOxubMQFR05eN3Hofz/ZV/l8W4H47Kd12jOjl55dVd34hN3isIqYk94PBUlMYG+GPubwSgAF2BDWIK0hP30CHWXpNBC9gUBoDbXA7bDinl/fd6/Zehsv+Vaa98nc+YqfrrPUZlRRB/uD8OqsP2NOzoh0j5xYoNIiCrAdCLEJnYbjZ4DEGOqbAvjTuBuWD8sd8b7ZevPKH7h2x95dQwZ4C8AjIpuapOWs0rIJEToG8kHLRpNIHI0BQJHo6iFEII0AjUABmgaVngCHPR2kERF0oSMYCaBdDaAjBEP6Y21Hh2jJADKtGfCHQxjgLsbG67eMcFndO8z0sat5Z/4xCw6vUBg53dbMmEMd1TIC7Px9kaVPB6cqhOkQRGNkAYQpg9rZBwjRSZD6sYqAoYZEQFOwGfvbw5AkoNiTi+F5o+uOyD9qT2HmANlmySAmMYTCITQHmtUttd9m72jeVtpQW4VbJt1+j1nyAODeNbP/0tIWdA4pKILOu8xNEgAIwM9+Q2HaJ1z8XFjFKrPt9k6giH6qIRbvs1CT9AV0OiIVUY+ByHitVW11CPk5hhUW4w9HTPry3JHnLT+i4Ohyr9O7G0Cwl+qstaNl6PaGbaNG5Y8uN9vnJ5Xlv3ru6+dvLM7xdievKywC0ABqllaKXO1CKOJlaNSngYknMGY5ZQGEGQMDh0pg1XJ5f8lTmIyGYDOamztw3GGHh68567qllx47bZ4sy305wDHwTLtnx9iSE0xLHgDcV37PXZwDGYqtdwIFOqWRmqWXyMX3CAdfDz2xK9EzgQSASJLqZMY9OqdmaT7CdAKU1MgjEBgDvm/YB7clA0umPrV42thrZgII9FW3v1i6YfFFq7d9ck5pQX7v5HWFDEAlsCrlRT44UgZZJIwXxhFIIWOhT0FGCBOnFnYUBejWlMkjAhc6dlbX48TBY2peuWTllPzMgnUpNZYkIrqK+Z/ef7fdAXRahL4gYGxNhKiE6qVZws6XAehVQ+IJbJRiDQlYuE4qTU1p9DDI04SG3dUNmD720u2LL3huLIC2VNtLFnPXzPnL91U/DR9SWAidJ7n8lQTIzyZBpRoAT/dWLM6OUoiMJ0wCKgHA2FRWFARD8nbXNOCGk67dsfiC58ahD/Law22oaa8CALy57TUUz8vGyU8fh+312wAAwUhvtiUe4UjIs+x/l92WYU9+7ABiG/1lpGFkX8Xi/xJ7CIBG3lTcFcYIu2rrcdmvLvrh8ckLTwDQ2ledfa17sbXuOwDA/mAz9lU3Y2vdtwjrIQjBEdKC0Li5LQyrktEy+zez3wsFgY5IMGr9kwR1bn/2ir6pIajJrhVlJqOisRonHDam8tmLXxgHYL+ZeoqkwK44AAAZsg3MCeQ6fJCZDCIGRlJSynDlCddcfNuEW1ZU1e9PNQATXe33jrQvvgiExmAjvFY7npv6wiUAmlNrp3ubPX/SNx6a9MgVpw09acePDTWQWZIJCaIzN6JXpJ9AAppbQpg1Yc68Ul/Z+qTqgmCJht7tFkMSLZIVLqsLgOFHpgDtkbMeu86uMLSr7anUT4i0EkggVLXX4NjiUfU3n3Lr/cnWd1icqGqrwvKNz1y2dMM/ns+225d0qP7l93x056IF6x89vz5Q75KSlSIARxcf89H0Y65+raa5DYzSKzPp3RMhIBgErjn+hidB8CdT9cemHwpuf2/mPR9WvHdBe5twO5wKBnh8UHUVz254Hku152fMdt+u/tfQcxbNPeOhOw7zliblhN8w/pa/rdj8z/MCET9scqqmOR6JXkfSnnNLaD/KsosCUw6f+lQy9RZ98fdzhjw8bN/r3757lcfmcZcWFiDflYOIroMgYZC3AKV5BbBIVsvzX712w9BHypqf/fqZs5Ppo8xXtv7c4ee+XdPadtCc2j8kIpBMlOlSmNDUHsJvR05Z6XF4GswO4O4P/3rhtStuXJnrdLAhviIozAohxIFwEwyfXggBu+LE0IIiuG12y+XLrl51X/ndF5ntBwB+O/q8lyEA0b+ErG6II0fIgJBBQoYkZABkLtdEgAMEnHjYBNOhoCfWPXrx3LfmvVhUmIXMjExTa1WN6/DaPCgs9OCuN+e+sOiLBZeY7e/EkpM/KMsuCqXTmJjxAzvMNOSP+DHYU9A+dsDYD82U316/tfSWf9+83JubAZtiAxfmpYILDrtihyfbipvfvnHJD407yszUy3bl1I8fePIHDQFTXymmg/32A01NGK2hAEbljd6W58lvBgDOeefTEx765MFZkRCUbHt2UuTFwAWHz5GDYIBbHii//7aeyggh4sYxJGfoNtP5WAIEkdhsp82mhyNAkXvATgAIdATQEeyAP+BHWA3Hla1pq7G+98M7k3xZDnMhpl6gcR35OS688/2bv93TsjvOtKqqCn/Aj45gBzqChtQVuooqIKHbHJsQfRRLn1PEAa8thwDAYXfA6XDC7XLDlmGLK7p+z9oL69pbcp2W/uem2BU7Gv3+3G9qNk05+DOr1Qq3yw2nwwmnw+jL58xjEoCD94JSRVq9SrfdbUrdN1Z/eSo0gNLQPcFIyd1St/lUM+XddjfJyUhgH0jvSsSkexWMBEVSapQAIpr9sK+lylxjXU8BpAHxK5F+fKeOkLl4HaX7vIsAJGau0WAwCF0/OECROuIJPCCTMSNuTkploL69TkcA2N26GwCgRlRke7LhzfR2K+qxeRl0I2Ld37koRkRp9tC479IeaEdtYy0sihGgKPGUYE/Tbp1J6RPCeHIkEXvI2PsVITPv1iID9f46W1ANGrsPgkef+MpjB45fL1nQLwscAwcHScBI3+i4fRYhRJdxGG5MbXuNTdUBSlNQoe9gAplLRrRJMvb6dx+JDGBgVgnCYcN94ZyDC94tCjJu4PgVxZ6CB1tCjZ5sW06/5sKW4H4MyipoPb543EsHf6bICgbml4CIjIi0BWhSG45M5wzS92sQ5qQ9y+bFpurvStfu/mwkABAzUkJkRY4LITktTv8FR/z+7ZbmCCSWuiTITML+ZhUXHXnZG5kZmXFbBrIsgxiBGMFisaCjI4BPK8uP8tiVvhs3NvGor++fNissQUJEAzbVbjwLACyKBVbFCkXuebBzfn3PvYOLirWdzVXJR4phkLeruQolBQWRO06d9WBPZRRZgdVi7ZwDN9ZuGLOlaccYj9WTdH+9IW0ECgjY7cCqba//zoyKZMj2iuem/vMqXQNq2uogJxFtlpmMOn8DIiqwZMryaxwW1w9m6r27450zVRWQKH1h0LT6gXkOH9bu2TDu/R3vjTVTfnzJKcvfuuK1P7YHNVQ07oPEKKF7QSDIjKGyaR9a21W8evmLfzq99MylZvpqD7bjlS0vXZHlsqTNiQbSTKBEEgQDnvri77earTNp+OSnNt20YdpwXwkq9tSgpr0OEX7AbsUI1XgEdf56/LCnGiVZBfhy5rpp5426cKHZfpZ8+fSMHxv2lnpt2X0XTgJpi8YAABcCJZ4crNzx7uS3t646zmy9owqOXfbNDd8XLbzo8VdG+IZhf3A/KptqUVlfi511NahsrEVDoAmDvYPEo1Mfevu7m3YOHzNg3DKz7bcF2vDE+sdmupxS2s+sJ3KkU4LCLJBlYPaHs/42acTZJ4GZ498iWauvHXvD1BnHX5f3fcO28zfXfjPhx6YKazAS1Euzy2xjisauHuEbuVBmctIJSbM+uH1OZcO+4UMLi6Clwffsit7T22LaQ4iPRyUAFxyDs4rw9d4tJ177+tV3PzXlGdM5zADAiNWN8I1eMMI3ekEy9YQQPWYfvLLppfEL1i2aPTAvJ+3kAT3JG+/yiOhfkhR7nXOU5OVg0frF9yxau+Cyfo+yFxgrjd4Ht61mS+n0N/6w0u1SYGWWVLqInSdOWKD7oDIEhE0IoQgGPbVDeQICCrMg1+vEtauuf3bFV8uvSraNvhAMd6CxpbHXnJe61urDJi799ecdXM3Od+RBTyHqDUAFxV0d0A3xEmjjgJ0Ddk4UISsI36ay9OaCI8uWCXBg/uqHHwSQmXCkuooPf3gXDa31vZZpD7bhy8rPsbnyG9Q01UCN9Dy77GrcOWjMgmM/3+uvyynzDjCdkNQNhmDvAkNFomI9e5QcgFUEhIu7wbGSQnR/5xGHJKDpGiCAWyfe+jT6yM6KCBXnL5uCBybMQ7PSgLyOQlx5xgyQlfDl11/i8a3zMSxrBGrq6zHl2PPhdXghd1nlxCRxzfcfDD93xdmfBLnqG5Y7ABE9BfIIQJggsvU3hIMn3GWMV2GbMB4LwH16BBrtgUvMjeYKmoZEDJVNdZg46rTNlx59+R19lWeMoTAzD5l2D9ZUrMFH36xGLLl2a8V3eGPT64iQhkJPHuxWe1z0ttXfghvfnDHr9MW/2U4SfGXZ/SBPJSBD/MjztLnCqyfM3+7dCgsAkgiKXN1OtfI8OPgEhOgks8kgQS0IWQLuPn3uHLNjl8jIasx35SFXy+98vZkuDwZ6i2GVLNHIDsHKrHBZXAAHFqx9dPJ95ffOr2ttKR3g88Im21IjDzBOJTCAF2kXQQGnSGK/LnFEWiVARYc+IGKjJmkKq5c/g4ahfWXqy0xCZe1+XH3i9FfHDTzhTbNjl0mBQ3aCC45cqw/MZrzNIlsxhC5gk+xQrBboXMfXNV8VvFfxzjlvVbxxc2VD7dCsTBtifl7KcUYdIJ3AC7XJwq1vQLjvgG9ieYruH1AYQTi4ELnaSdTGPkIHGw2555OYBEJjRxN8XjfuPPWuR82OfX+g2d2q77/91R9frN7XvmezVdgsH+9YQ9YMCz5uKAdTWPjz2rXZalg9csWuxeO+q98+MaQLZNkzUJpfAAj0z8+LEKAI8CxtolDE+4jQAQ4SwHRYggIsJJw8Ilz8OKqTb6EgzYUWPbrfpRNGhOaWEOaedfuyYk+J6Wz8J9c9ftOu1ro76sIr4VHcqLRU4OUXXoTggMOuwGvJxupdH0EwHRIY8l05kJjcpy/YJ3TjMI1w87dEln4F6WgizfyuTfxZuVUHnZULEsAEKCAZKq0I8Ewus1aWTW3sSYTpPOM2DgFGhH2tNRjsLQt9O3P7EInkfWYG8V3t5gHjnjp2u8vqcDoUh5FMBGFkLAgjOMvSnQuqR29gsoudws4vFS59PRhAfuOmOu7ROy+FSnRWLrlRRY9asEamQaM65POLhZ2fDFlsACdwnSMUAv464a77zZIHAHPXzH4gENSdLqurM9REIEgkQWJS+siLHRUx1LVRZOtX8VytDFa+HiozSE3SVUt+ZLF9VQ6INlJrHA1r+cDwKc5c23mVzXU4c/hpVZccfdl9Zptbte3NE1/ZtPLSQTm5adlkSojovCay9Pncp+UKF18MnaLEpTYNxM2BtaHuOeEFSBw/K/T7+M4ralUAbx+9dFjRkinL43M5EuCBj+fOlxRAZkpKSUamoBlxEW7nHwqvfikU1CFMB65m7AfiCByX/atuv//U2OMFh53YeX1t7Ai2OsQ7rHqAu9h05wvWP37RFzu/HldWUHBoyItdn5fB93K7uAQZ/FMoAlBZ9PC4MJ9O0QviCCw//atuvx/2ck5fbSgAuPwIicll5rNuW0Mt1v/57KF5LpeU/ns5BYyrRi1Ch1P/M3fwxyDIODwuI6quhyozIQlUXlUnAaDShXlJX2Tz4Mf337Srtmbg0KI0BzljJ+w9fDl3638EECQNabroKR79NW+xI9mmMHPtdQotILa9dtvxT6577MG8HGfyhwB7g25cRwAn3yDytZHcq10BJoIUIUOND9ENIilLYOWMOhkASp/I13sKOX66uxwvb30ePkceAGD2KfcrQ7KGSJAhZrx3+fEa1+CWMqH3VzQ4AE6AlVcLu5gmPLpxCYVKP8slGP1R4YSXHa7eVY6F/14C+ABxtyAA0nWvzgwhAlSM3PrUwKH527UmfTFCNBAkkr8W9sA8B+HmtyODzwcTB65ZPoR31nRFSgRWXlVvXF74TB7vbR832+YGfECZtwgwDI1e5i0C6QQ9HImomepqZFApa5auh5/NR5hkKCZvOtKMCyuEm/+LZ+pXgdBGYUJab4UziaSFvPKK+tgBPFPHHyqu28cA0JAFA4zysdVAGxMUII1n6Y/zIi1PZOnPdq4SeuNAhyFhGWIrL9CO5rnaBWBoo1idn0nquiKVWUIBwAf/I8/sq+55X4UACAJ1MA6gWeTr00W+fhSc/BMABlGxzS0dhpGwok549It5tjZa2Pg3UOmQWVezSEqFY27L4Gd8qpnXLe4WMgA2ZMGA3t2c6LIQQdKFIjaLPO006mCHI0ynIkKDwCHBIupgFV9BEeXgpJJGEMlcNXsIEReN6QNWRBXJZPkMGKreTU7O+vA0vFtdjhJHttESAVAAIQCK3XgfIQhHNLcsgqgDHP05dtU27/Jv7J59jgNiEVuqRde6wgJQ7D5rRP8uCQjFuOqg817qWBTmnN6jMDEko8JytGuz5Mk4oIDdcHLeqRCR9OUp/5JIhsDY1enJlO9R0SYV/w6ZdgkhPeGW6/8LmCXQAkP6zC4bLOj+nwF0w8is0TjMXYb2SFJHiv8j8X8D48AgBA7ImwAAAABJRU5ErkJggg==';\n\n //巴法云主题订阅\n Blockly.Blocks.QDP_tcp_device_cloud_subscription = {\n init: function () {\n this.jsonInit({\n message0: '%1',\n message1: Blockly.Msg.QDP_tcp_device_cloud_subscription,\n args0: [\n {\n type: 'field_image',\n src: QH_BEMFA_ICO,\n width: 40,\n height: 40\n }\n ],\n args1: [\n {\n type: 'field_dropdown',\n name: 'type',\n options:[[\"TCP创客云\",\"1\"], [\"TCP设备云\",\"2\"], [\"图云\",\"4\"]]\n },\n {\n type: \"field_input\",\n name: \"Key\",\n \"text\": \"d9efdd0413ec4b74ab0057a0b8675654\"\n },\n {\n type: \"field_input\",\n name: \"topic\",\n \"text\": \"led002\"\n },\n {\n type: \"input_dummy\"\n },\n {\n type: \"input_statement\",\n name: \"function\"\n }\n ],\n \"tooltip\": \"巴法云主题订阅\",\n colour:QH_BEMFA_COLOR,\n extensions: ['shape_statement']\n });\n }\n };\n\n //巴法云主题消息发送\n Blockly.Blocks.QDP_tcp_device_cloud_theme_push = {\n init: function () {\n this.jsonInit({\n message0: '%1',\n message1: Blockly.Msg.QDP_tcp_device_cloud_theme_push,\n args0: [\n {\n type: 'field_image',\n src: QH_BEMFA_ICO,\n width: 40,\n height: 40\n }\n ],\n args1: [\n {\n type: 'field_dropdown',\n name: 'type',\n options:[[\"TCP创客云\",\"1\"], [\"TCP设备云\",\"2\"], [\"图云\",\"4\"]]\n },\n {\n type: \"field_input\",\n name: \"Key\",\n \"text\": \"d9efdd0413ec4b74ab0057a0b8675654\"\n },\n {\n type: \"field_input\",\n name: \"topic\",\n \"text\": \"led002\"\n },\n {\n type: \"input_value\",\n name: \"data\"\n }\n ],\n \"tooltip\": \"巴法云主题消息发送\",\n colour:QH_BEMFA_COLOR,\n extensions: ['shape_statement']\n });\n }\n };\n\n //串口打印\n Blockly.Blocks.serialPrint = {\n init: function () {\n this.jsonInit({\n message0: Blockly.Msg.serialPrint,\n args0: [\n {\n type: 'field_dropdown',\n name: 'type',\n options:[[(Blockly.Msg.println),\"println\"], [(Blockly.Msg.print),\"print\"]]\n },\n {\n type: 'input_value',\n name: 'VALUE'\n }\n ],\n \"tooltip\": \"串口打印\",\n colour:QH_BEMFA_COLOR,\n extensions: ['shape_statement']\n });\n }\n };\n\n //变量get\n Blockly.Blocks.QH_variables_get = {\n init: function () {\n this.jsonInit({\n message0: '%1',\n args0: [\n {\n type: 'input_value',\n name: 'VAR'\n } \n ],\n \"tooltip\": \"获取变量\",\n colour:QH_BEMFA_COLOR,\n extensions: ['output_number']\n });\n } \n };\n\n return Blockly;\n}" ]
[ "0.74672204", "0.69368273", "0.68139464", "0.6769629", "0.6769629", "0.6386431", "0.6367334", "0.6349573", "0.6287399", "0.6286187", "0.6273854", "0.62277627", "0.62277627", "0.6208401", "0.6202992", "0.6193558", "0.61876845", "0.6181156", "0.6090327", "0.6084948", "0.60838926", "0.6036645", "0.6023308", "0.6008083", "0.59978855", "0.59939075", "0.59709984", "0.5934075", "0.5917647", "0.588965", "0.5879952", "0.58780247", "0.58757263", "0.5866316", "0.58430064", "0.58267784", "0.5810587", "0.57981336", "0.579504", "0.5792363", "0.57850087", "0.5779747", "0.5763326", "0.5761482", "0.57582617", "0.57575613", "0.57537", "0.57527304", "0.57511383", "0.5733562", "0.57262814", "0.5724398", "0.5719339", "0.57039416", "0.5693814", "0.5684768", "0.5684032", "0.5675719", "0.56729054", "0.5672526", "0.56519693", "0.564579", "0.5636718", "0.5633093", "0.56312394", "0.56252337", "0.5624654", "0.5617706", "0.5602225", "0.55813485", "0.5576384", "0.5575933", "0.55741024", "0.5574086", "0.5564076", "0.5562061", "0.5559025", "0.5542934", "0.552804", "0.55278105", "0.5526905", "0.5518813", "0.55182964", "0.5512082", "0.5510265", "0.55086756", "0.5506219", "0.5504404", "0.5502956", "0.54993165", "0.54977244", "0.5486841", "0.5486077", "0.5485804", "0.54840744", "0.5478762", "0.5477198", "0.5476874", "0.5473874", "0.54689837" ]
0.5683209
57
Hash function: uses timestamp, lasthash and stored data as the N that represents the hashe
static hash(timestamp, lastHash, data, nonce, difficulty){ return ChainUtil.hash(`${timestamp}${lastHash}${data}${nonce}${difficulty}`).toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static hash(timestamp, lastHash, data, nonce, difficulty) {\n \treturn ChainUtil.hash(`${timestamp}${lastHash}${data}${nonce}${difficulty}`).toString();\n }", "calculateHash(){ \r\n return SHA256(this.index + this.previousHash + this.timestamp + JSON.stringify(this.data)).toString();\r\n }", "calculateHash(){\n return SHA256(this.index + this.prevHash + this.timestamp + JSON.stringify(this.data));\n }", "calculateHash(){\r\n return SHA256(this.index + this.previousHash + this.timestamp + JSON.stringify(this.data)).toString();\r\n }", "calculateHash(){\n \n return SHA256(this.index + this.previousHash + this.timestamp + JSON.stringify(this.data)).toString();\n\n }", "calculateHash(){\n\t\treturn SHA256(this.index + this.previousHash + this.timestamp + this.data + this.nonce).toString();\n\n\t}", "calculateHash(){\n\t\treturn SHA256(this.index + this.previousHash + this.timestamp + JSON.stringify(this.data)).toString();\n\t}", "calculateHash(){\n return SHA256(this.index + this.previousHash + this.timestamp + JSON.stringify(this.data)).toString();\n }", "calculateHash() {\n return sha256(this.index + this.previousHash + this.timestamp + JSON.stringify(this.data)).toString();\n }", "calculateHash() {\n return SHA256(this.index + this.previousHash + this.timestamp + JSON.stringify(this.data)).toString();\n }", "calculateHash() {\n return SHA256(this.index + this.previousHash + this.timestamp + JSON.stringify(this.data)).toString();\n }", "calculateHash(){\n return SHA256(this.index + this.previousHash + this.timestamp + JSON.stringify(this.data)+this.nonce).toString();\n }", "calculateHash() {\n return SHA256(this.timestamp + this.previousHash + JSON.stringify(this.data)).toString();\n }", "calculateHash() {\n return SHA256(this.timestamp + this.vote + this.voter + this.previousHash).toString();\n }", "calculateHash() {\r\n return SHA256(this.index + this.previousHash + this.timestamp + JSON.stringify(this.transactions) + this.nonce).toString();\r\n }", "function hash(n) {\n return ethUtil.bufferToHex(ethUtil.sha3(ethUtil.toBuffer(exports.hexUtils.toHex(n))));\n}", "calculateHash(){\n return SHA256(this.id + this.prevHash + this.timestamp + JSON.stringify(this.transactionList)+this.nonce).toString();\n }", "_hash(key) { //O(1)\n let hash = 0;\n for (let i = 0; i < key.length; i++) {//grab the length of 'grapes' (key)\n hash = (hash + key.charCodeAt(i) * i) % this.data.length;\n //charCodeAt(): returns an integer between 0 & 65535 \n //this.data.length: ensures the size stays between 0-50 (memory space for hash table)\n console.log(hash); // 0 14 8 44 48 23\n }\n return hash;\n }", "calculateHash(){\n return SHA256(this.previousHash + this.timestamp + JSON.stringify(this.transactions) + this.nonce).toString();\n }", "calculateHash(){\n\t\treturn SHA256(this.previousHash + this.timestamp + JSON.stringify(this.transactions) + this.nonce).toString();\n\t}", "_hash(r,c) {\n return (15485867 + r) * 15485867 + c;\n }", "calculateHash(){\n return SHA256(this.previousHash + this.timestamp + JSON.stringify(this.transactions)+this.nonce).toString();\n \n }", "calculateHash() {\n return SHA256(this.previousHash + this.timestamp + JSON.stringify(this.transactions) + this.nonce).toString();\n }", "_hash(key) {\n let hash = 0;\n for (let i = 0; i < key.length; i++) {\n hash = (hash + key.charCodeAt(i) * i) % this.data.length;\n }\n return hash;\n }", "_hash(key) {\n let hash = 0;\n for (let i = 0; i < key.length; i++) {\n hash = (hash + key.charCodeAt(i) * i) % this.data.length;\n }\n return hash;\n }", "_hash(pt) {\n return (15485867 + pt.X) * 15485867 + pt.Y;\n }", "function hash(hashable){\n //Hash Inputs\n\n let prevHash = hashable.prevHash;\n let messageHash = hashable.prevHash;\n let nonce = hashable.nonce;\n\n //Process\n let hash = floor+(((ceiling-floor)*nonce*nonce*(getDigit(nonce, 4)+getDigit(prevHash, 3))+ ((messageHash*prevHash)/nonce))%(ceiling-floor));\n return hash;\n}", "hash() {\n return ethereumjs_util_1.rlphash(this.raw());\n }", "calculateHash() {\n return SHA256(this.previousHash + this.timestamp + JSON.stringify(this.transactions) + this.nonce).toString();\n }", "function hash(data) {\n return shahash.createHash('sha1').update(data, 'utf-8').digest('hex');\n}", "calculateHash() {\n return Base64.stringify(HmacSHA256( this.previousHash + this.timesamp + this.data + this.nonce.toString(), this.index.toString()));\n }", "_hash(key){\n let hash = 1\n for(let i=0;i<key.length;i++){\n hash = (hash + key.charCodeAt(i) * i) % this.data.length\n }\n return hash\n }", "_hash(key) {\n let hash = 0;\n for (let i = 0; i < key.length; i++) {\n hash = (hash + key.charCodeAt(i) * i) % this.data.length;\n }\n return hash;\n }", "_hash(key){\r\n let hash = 0;\r\n for(let i = 0; i<key.length; i++){\r\n hash = (hash + key.charCodeAt(i) * i)%\r\n this.data.length\r\n }\r\n return hash;\r\n }", "calculateHash() {\n return SHA256(\n this.previousHash +\n this.timestamp +\n JSON.stringify(this.transactions) +\n this.nonce\n ).toString();\n }", "constructor(index, timestamp, data, previousHash = ''){\n this.index = index;\n this.timestamp = timestamp;\n this.data = data;\n this.previousHash = previousHash;\n this.hash = this.calculateHash(); \n }", "function createHash(timestamp){\n \n var hash = MD5(timestamp + secret_key + public_key).toString();\n return hash;\n\n}", "hashVal() {\n return utils.hash(this.serialize());\n }", "function hashNumber(n) {\n if (n !== n || n === Infinity) {\n return 0;\n }\n var hash = n | 0;\n if (hash !== n) {\n hash ^= n * 0xffffffff;\n }\n while (n > 0xffffffff) {\n n /= 0xffffffff;\n hash ^= n;\n }\n return smi(hash);\n}", "function hashNumber(n) {\n if (n !== n || n === Infinity) {\n return 0;\n }\n var hash = n | 0;\n if (hash !== n) {\n hash ^= n * 0xffffffff;\n }\n while (n > 0xffffffff) {\n n /= 0xffffffff;\n hash ^= n;\n }\n return smi(hash);\n}", "function hashNumber(n) {\n if (n !== n || n === Infinity) {\n return 0;\n }\n var hash = n | 0;\n if (hash !== n) {\n hash ^= n * 0xffffffff;\n }\n while (n > 0xffffffff) {\n n /= 0xffffffff;\n hash ^= n;\n }\n return smi(hash);\n}", "function hashNumber(n) {\n if (n !== n || n === Infinity) {\n return 0;\n }\n var hash = n | 0;\n if (hash !== n) {\n hash ^= n * 0xffffffff;\n }\n while (n > 0xffffffff) {\n n /= 0xffffffff;\n hash ^= n;\n }\n return smi(hash);\n}", "_hash(key) {\n\t\tif (!key) {\n\t\t\tthrow new Error('cannot prepare hash without key');\n\t\t\treturn undefined;\n\t\t}\n\t\tconst hash = 0;\n\t\tfor (let i = 0; i < key.length; i++) {\n\t\t\thash = (hash + key.charCodeAt(i) * i) % this.data.length;\n\t\t}\n\t\treturn hash;\n\t}", "calculateHash() {\n return SHA256(this.fromAddress + this.toAddress + this.amount + this.timestamp).toString();\n }", "function chunkHash(x,z)\n{\n return x.toString()+\"_\"+ z.toString();\n}", "function ml_z_hash(z1) {\n var a = bigInt(z1).toArray(Math.pow(2, 32));\n var acc = 0;\n for (var i = 0; i < a.value.length; i++) {\n acc = caml_hash_mix_int(acc, a.value[i]);\n }\n if(a.value.length % 2 != 0) {\n acc = caml_hash_mix_int(acc, 0);\n }\n if(a.isNegative){\n acc = acc + 1\n }\n return acc | 0\n}", "function computeHash (source, salt) { \n\t//get hashing algorithm\n\tvar hmac = crypto.createHmac(\"sha1\", salt);\n\t//create the hash number\t\n\tvar hash = hmac.update(source);\n\t//get the hash as hex string\n\treturn hash.digest(\"hex\");\n}", "function hash(data) {\n\tdata = JSON.stringify(data);\n\treturn crypto.createHash('sha1').update(data).digest('hex');\n}", "function hashInteger(n) {\n // check to see if n is an integer\n if ( isNaN(n) || n % 1 !== 0 ) { return null; }\n return (n * 369) - 1;\n}", "constructor(index, timestamp, data, previousHash=''){\r\n //pass these parameters\r\n this.index = index;\r\n this.timestamp =timestamp;\r\n this.data = data;\r\n this.previousHash = previousHash;\r\n this.hash = this.calculateHash();\r\n \r\n }", "function computeHash(data) {\n\tconst sha256 = crypto.createHash('sha256');\n\n\treturn sha256.update(data).digest();\n}", "function Hash() {}", "function Hash() {}", "calculateHash() {\n return SHA256(\n this.previousHash\n + this.previousDatabaseHash\n + this.blockNumber.toString()\n + this.refHiveBlockNumber.toString()\n + this.refHiveBlockId\n + this.prevRefHiveBlockId\n + this.timestamp\n + this.merkleRoot\n + JSON.stringify(this.transactions) // eslint-disable-line\n )\n .toString(enchex);\n }", "calculateHash() {\n return SHA256(\n this.fromAddress + this.toAddress + this.amount + this.timestamp\n ).toString();\n }", "static digestFn (hashType, data) {\r\n\r\n if (typeof data !== 'string') data = JSON.stringify(data);\r\n const hash = crypto.createHash(hashType);\r\n hash.update(data);\r\n return hash.digest('hex');\r\n }", "calculateHash() {\n return SHA256(\n this.fromAddress + \n this.toAddress +\n this.amount +\n this.timestamp\n ).toString()\n }", "function hashTimestamp() {\n randSuffix = 1000000000;\n // removing vowels reduces chance of bad words and numerical confusion\n var charDict = {\n '0': '0',\n '1': '1',\n '2': '2',\n '3': '3',\n '4': '4',\n '5': '5',\n '6': '6',\n '7': '7',\n '8': '8',\n '9': '9',\n A: 'B',\n B: 'C',\n C: 'D',\n D: 'F',\n E: 'G',\n F: 'H',\n G: 'J',\n H: 'K',\n I: 'L',\n J: 'M',\n K: 'N',\n L: 'P',\n M: 'Q',\n N: 'R',\n O: 'S',\n P: 'T',\n Q: 'V',\n R: 'W',\n S: 'Y',\n T: 'Z'\n }\n\n var hash = (Date.now() * randSuffix + Math.round(Math.random() * randSuffix)).toString(Object.keys(charDict).length).toUpperCase();\n var res = ''\n var i = hash.length;\n while (i--) {\n res = charDict[hash[i]] + res;\n }\n return res\n}", "calculateHash(){\n return SHA256(this.fromAddress + this.toAddress + this.amount).toString();\n }", "constructor(timestamp, data, previousHash = '') {\n this.timestamp = timestamp;\n this.data = data;\n this.previousHash = previousHash;\n this.hash = this.calculateHash();\n }", "calculateHash(nonce) {\n // Your code here\n\n }", "async function hashit (data) {\n // now not hashing the trackers and interests\n return data\n // const hash = await sha256(String(data));\n // return hash\n}", "getHashCode() {\n let hash = this.r || 0;\n hash = (hash * 397) ^ (this.g || 0);\n hash = (hash * 397) ^ (this.b || 0);\n hash = (hash * 397) ^ (this.a || 0);\n return hash;\n }", "exampleHashMethod( key ) {\n let hash = 0;\n for (let i = 0; i < key.length; i++) {\n hash = (hash + key.charCodeAt(i) * i) % this.data.length;\n }\n return hash;\n }", "_hash(key) {//Generate a hash for us between 0 and length of array - 1\n\t\t//In real life this is soooo fast that its O(1) even tho there is a loop\n\t\tlet hash = 0;\n\t\tfor (let i=0; i < key.length; i++) {\n\t\t\t//charCodeAt(i) gives character code 0-65535 UTF code\n\t\t\thash = (hash + key.charCodeAt(i) * i) % this.data.length;\n\t\t //concat //get utf code //multiply by idx for duplicate characters to get unique\n\t\t //Mod so it fits in the hash size\n\t\t}\n\t\treturn hash;\n\t}", "function CreateHash() {\n var data = $(\"#tablesize\").val();\n var blockNum = $(\"#blockNum\").val();\n tell(sha256(blockNum, data));\n }", "function hash(txt) {\n\t\t// Because of how it was originally implemented the string to be hashed has to be reversed first\n\t\tvar txtReversed = txt.split(\"\").reverse().join(\"\");\n\t\treturn b64_md5(txtReversed).substring(0,10); // This function is defined in b64_md5.js\n\t}", "function getHash(n) {\n var base = \"abcdefghijklmnop1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\";\n var arr = [];\n for (var i = 0; i < n; i++) {\n arr.push(base[Math.floor(Math.random() * base.length)]);\n }\n arr.filter(function(a, b) {\n return 0.5 - Math.random();\n });\n var hash = \"\";\n while (arr.length > 0) {\n hash = hash + arr.shift();\n }\n return hash;\n}", "hash(key){\n let hashedSum = 0;\n for(let i=0; i<key.length; i++){\n let hashedChar = i*(key[i].charCodeAt());\n hashedSum = hashedSum + hashedChar;\n }\n let primeHash = hashedSum*599;\n\n return primeHash%(this.size);\n }", "function _hash(a) {\n if (isNumber(a)) {\n return a;\n }\n\n var str = isString(a) ? a : fastJsonStableStringify(a); // short strings can be used as hash directly, longer strings are hashed to reduce memory usage\n\n if (str.length < 250) {\n return str;\n } // from http://werxltd.com/wp/2010/05/13/javascript-implementation-of-javas-string-hashcode-method/\n\n\n var h = 0;\n\n for (var i = 0; i < str.length; i++) {\n var char = str.charCodeAt(i);\n h = (h << 5) - h + char;\n h = h & h; // Convert to 32bit integer\n }\n\n return h;\n }", "function hash(data) {\n return crypto.createHash('sha512').update(data).digest('hex');\n}", "_hash(key) {\n let total = 0;\n let WEIRD_PRIME = 31;\n for (let i = 0; i < Math.min(key.length, 100); i++) {\n let value = key[i].charCodeAt(0) - 96;\n total = (total * WEIRD_PRIME + value) % this.keyMap.length;\n }\n return total;\n }", "calculateHash() {\r\n //we are going to sign the hash of our transaction only, not all the data in the transaction\r\n return SHA256(this.fromAddress + this.toAddress + this.amount).toString();\r\n\r\n }", "function calculateHashBytes (data) {\n let shaObj = new jsSHA(\"SHA-256\", \"ARRAYBUFFER\");\n shaObj.update(data);\n hash = \"0x\" + shaObj.getHash(\"HEX\");\n return hash;\n}", "_hash(key) {\n let total = 0;\n const PRIME_NUM = 31;\n for (let i = 0; i < Math.min(key.length, 100); i += 1) {\n const char = key.charAt(i);\n const value = char.charCodeAt(0) - 96;\n total = (total * PRIME_NUM + value) % this.map.length;\n }\n\n return total;\n }", "function caml_hash_double(num) { return caml_hash(10,100,0,num); }", "function getXHash(size) {\n var buf = new ArrayBuffer(8),\n floats = new Float64Array(buf),\n uints = new Uint32Array(buf),\n lim = size | 0;\n if (lim > 0 === false) {\n throw new Error(\"Invalid size param: \" + size);\n }\n\n return function(x) {\n var h;\n floats[0] = x;\n h = uints[0] ^ uints[1];\n h = h << 5 ^ h >> 7;\n return (h & 0x7fffffff) % lim;\n };\n }", "function getHash(timestamp = null, privateKey = null, publicKey = null) {\n return jsMd5(`${timestamp}${privateKey}${publicKey}`);\n }", "function hashCode() {\n var hash = 0;\n if (this.length == 0) {\n return hash;\n }\n for (var i = 0; i < this.length; i++) {\n var char = this.charCodeAt(i);\n hash = (hash << 5) - hash + char;\n hash = hash & hash; // Convert to 32bit integer\n }\n return hash*100000;\n}", "calcHash () {\n var addr_h = sha512(this.address).substr(0, 32)\n var data = new Identicon(addr_h).toString()\n return 'data:image/png;base64,' + data\n }", "hash(key) {\n if (typeof (key) !== \"string\")\n key = JSON.stringify(key);\n\n var hash = 0;\n if (key.length == 0) return hash;\n for (var i = 0; i < key.length; i++) {\n let c = key.charCodeAt(i);\n hash = ((hash << 5) - hash) + c;\n hash = hash & hash;\n }\n return hash;\n }", "function Hash (data)\n\t{\n\t\t// Auto instantiate the Hash\n\t\tif (!(this instanceof Hash))\n\t\t\treturn new Hash (data);\n\n\t\tthis.result = 0;\n\t\tif (data !== undefined)\n\t\t\tthis.append (data);\n\t}", "function getHash(cells) {\n\t\tcells = normalizeCells(cells);\n\t\tvar hash = 0;\n\t\t_.each(cells, function(cell) {\n\t\t\thash |= 1 << cell[0] * MAX_BLOCK_LENGTH + cell[1];\n\t\t});\n\t\treturn hash;\n\t}", "function accountStateHash(param) {\n var itemizer = entryItemizer;\n return computeHash(itemizer, param);\n}", "calculateHash(key) {\r\n return key.toString().length % this.size;\r\n }", "function SaveHash() { }", "function hash(a) {\n if (isNumber(a)) {\n return a;\n }\n var str = isString(a) ? a : jsonStableStringify(a);\n // short strings can be used as hash directly, longer strings are hashed to reduce memory usage\n if (str.length < 100) {\n return str;\n }\n // from http://werxltd.com/wp/2010/05/13/javascript-implementation-of-javas-string-hashcode-method/\n var h = 0;\n for (var i = 0; i < str.length; i++) {\n var char = str.charCodeAt(i);\n h = ((h << 5) - h) + char;\n h = h & h; // Convert to 32bit integer\n }\n return h;\n }", "function DoHash(lengths){\r\n\tvar listSize = 256;\r\n\tvar list = Array(listSize).fill(0).map((e, i) => i);\r\n\tvar curr = 0;\r\n\tvar skip = 0;\r\n\t\r\n\tif(typeof lengths == \"string\") lengths = lengths.split(\"\").map(e => e.charCodeAt(0));\r\n\tlengths = lengths.concat([17, 31, 73, 47, 23]);\r\n\t\r\n\tfunction DoRound(){\r\n\t\tvar lengs = lengths.slice();\r\n\t\twhile(lengs.length){\r\n\t\t\tvar l = lengs.shift();\r\n\t\t\t\r\n\t\t\tvar s = list.concat(list).splice(curr, l);\r\n\t\t\ts.reverse();\r\n\t\t\tlist = list.map((e, i) => ((s[listSize + i - curr] + 1) || (s[i - curr] + 1) || (e + 1)) - 1);\r\n\t\t\t\r\n\t\t\tcurr += l + skip;\r\n\t\t\tcurr = curr % listSize;\r\n\t\t\tskip++;\r\n\t\t}\r\n\t}\r\n\t\r\n\tfor(var i = 0; i < 64; i++) DoRound();\r\n\t\r\n\tvar sparse = [];\r\n\twhile(list.length) sparse.push(list.splice(0, 16));\r\n\treturn sparse.map(b => b.reduce((acc, e, i, a) => acc ^ e, 0));\r\n}", "_hash(key) {\n let total = 0;\n let PRIME_NUMBER = 31;\n for (let i = 0; i < Math.min(key.length, 100); i++) {\n let char = key[i];\n let value = char.charCodeAt(0) - 96;\n total = (total * PRIME_NUMBER + value) % this.keyMap.length;\n }\n return total;\n }", "async _hashData(data) {\n const dataInString = JSON.stringify(data);\n const dataIn8Array = arweaveUtils.stringToBuffer(dataInString);\n const hashBuffer = await common_1.arweave.crypto.hash(dataIn8Array);\n const hashArray = Array.from(new Uint8Array(hashBuffer)); // convert buffer to byte array\n const hashHex = hashArray\n .map((b) => b.toString(16).padStart(2, \"0\"))\n .join(\"\"); // convert bytes to hex string\n return hashHex;\n }", "constructor(index, timestamp, data, previousHash = '') {\n this.index = index;\n this.timestamp = timestamp;\n this.data = data;\n this.previousHash = previousHash;\n this.hash = this.calculateHash(); // calculates hash based on information contained in the block\n}", "_hash(key) {\n // the'underscore' here is a common standard which is to put 'underscore' here and the javascript world which says this is a private property\n let hash = 0;\n for (let i = 0; i < key.length; i++) {\n hash = (hash + key.charCodeAt(i) * i) % this.data.length;\n // console.log(hash)\n }\n return hash;\n }", "hash(block) {\n\t\treturn sha256(stringify(block));\n\t}", "function okhash(x) {\n if (!x || !x.length) return 0;\n for (var i = 0, h = 0; i < x.length; i++) {\n h = ((h << 5) - h) + x.charCodeAt(i) | 0;\n } return h;\n }", "hash() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }\n return `${s4() + s4()}-${s4()}-${s4()}-${s4()}-${s4()}${s4()}${s4()}`;\n }", "function hash(text) {\n\t if (!text) {\n\t return '';\n\t }\n\t\n\t var hashValue = 5381;\n\t var index = text.length - 1;\n\t\n\t while (index) {\n\t hashValue = hashValue * 33 ^ text.charCodeAt(index);\n\t index -= 1;\n\t }\n\t\n\t return (hashValue >>> 0).toString(16);\n\t}", "cn_fast_hash(dataBufferOrHex) {\n const str = typeof dataBufferOrHex === 'string' ? dataBufferOrHex : dataBufferOrHex.toString('hex')\n const hash = soliditySha3('0x' + str)\n return hash.substr(2)\n }", "function okhash(x) {\n if (!x || !x.length) return 0;\n for (var i = 0, h = 0; i < x.length; i++) {\n h = ((h << 5) - h) + x.charCodeAt(i) | 0;\n } return h;\n }", "function Hash() {\r\n}", "function hash_to_fingerprint( hash ) {\n return `${encode_chunk( hash, 0 )} ${encode_chunk( hash, 5 )} ${encode_chunk( hash, 10 )} ` +\n `${encode_chunk( hash, 15 )} ${encode_chunk( hash, 20 )} ${encode_chunk( hash, 25 )} `;\n }" ]
[ "0.78690886", "0.7355337", "0.73309845", "0.73182297", "0.73091763", "0.7297435", "0.7273449", "0.72452766", "0.7225147", "0.7198172", "0.7198172", "0.7193585", "0.71111614", "0.69616747", "0.68930244", "0.68919784", "0.68058074", "0.6762053", "0.6741979", "0.6735577", "0.6682377", "0.6668186", "0.6642393", "0.6637639", "0.6637639", "0.6634457", "0.6621129", "0.6610165", "0.660272", "0.65856403", "0.6585593", "0.65840524", "0.6556548", "0.65533185", "0.65338486", "0.6512051", "0.64783174", "0.6468655", "0.6444312", "0.6444312", "0.6444312", "0.6444312", "0.63699776", "0.6367532", "0.6363821", "0.63536805", "0.634916", "0.63460517", "0.63440734", "0.63346714", "0.6322272", "0.6319", "0.6319", "0.6311076", "0.6309456", "0.627368", "0.62597173", "0.6246674", "0.62155807", "0.6214196", "0.6206446", "0.6189971", "0.6180361", "0.6164054", "0.6156757", "0.6156639", "0.61430025", "0.614249", "0.61295336", "0.61264", "0.61255884", "0.6125311", "0.61142164", "0.6111658", "0.6110734", "0.6077128", "0.60691965", "0.6066278", "0.6060296", "0.60454595", "0.6045411", "0.6041148", "0.6018647", "0.6017203", "0.60037124", "0.5998534", "0.5991975", "0.5991135", "0.5985922", "0.5982352", "0.5980006", "0.5967057", "0.5951136", "0.5948385", "0.59463006", "0.5946298", "0.59358937", "0.59251076", "0.59190214", "0.591779" ]
0.7995697
0
add leading zeroes if it's less than 10
function addLeadingZeroes(time) { return time < 10 ? `0${time}` : time }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addLeadingZero(i) {\n if (i<10) {\n i = \"0\" + i;\n }\n return i;\n}", "function appendLeadingZeroes(n){\n if(n <= 9){\n return \"0\" + n;\n }\n return n\n}", "function addLeadingZero (n) {\n if(n <= 9) {\n return '0'+ n; \n } else {\n return '' + n; \n }\n}", "function addLeadingZero(num) {\n if (num < 10) {\n return \"0\" + num;\n } else {\n return num;\n }\n}", "function leadingZero(time) {\r\n if (time<=9) {\r\n time = '0' + time; \r\n }\r\n return time;\r\n}", "function addLeadingZero(num) {\n\treturn (num <= 9) ? (\"0\" + num) : num;\n}", "function addLeadingZeroes(time) {\n if (time < 10) {\n return `0${time}`;\n } else {\n return time;\n }\n }", "function addLeadingZeros(number) {\n if (number < 10) {\n return \"0\" + number;\n }\n return number;\n}", "function leadingZero(time){\n \n if (time<=9){\n time = \"0\" + time;\n }\n return time;\n}", "function leadingZero(time) {\r\n if (time < 10) {\r\n time = '0' + time;\r\n }\r\n return time;\r\n}", "function addZero(i) {\n if (i < 10) {\n i = \"0\" + i;\n }\n return i;\n }", "function leadingZeroes(time){\n if(time<=9){\n time=\"0\"+time;\n }\n return time;\n}", "function addZeroIfNeeded(i) {\n if (i < 10) {\n i = \"0\" + i;\n }\n return i;\n}", "leadingZero(number) {\n return number < 10 ? '0' + number : number;\n }", "function appendZeroes(number) {\n if (number <= 9) {\n return \"0\" + number;\n }\n return number\n}", "function leadingZero(nr)\n{\n\tif (nr < 10) nr = \"0\" + nr;\n\treturn nr;\n}", "function leadingZero(time) {\n if(time <= 9) {\n time = \"0\" + time;\n }\n return time;\n}", "function addZero(number) {\n if (number<10) {\n return '0' + number;\n }\n return number\n }", "function padzero(n) {\n return n < 10 ? '0' + n : n;\n }", "function prepend0 (i) {\n\t\treturn i < 10 ? \"0\" + i : i;\n\t}", "function leadingZero(time) {\n if (time <= 9) {\n time = \"0\" + time;\n }\n return time;\n}", "function addZero(i) {\n if (i < 10) {\n i = \"0\" + i;\n }\n return i;\n }", "function leadingZero(time) {\r\n if (time <= 9) {\r\n time = \"0\" + time;\r\n }\r\n return time;\r\n}", "function leadingzero (number) {\n return (number < 10) ? '0' + number : number;\n}", "function addZero(i) {\n if (i < 10) {\n i = \"0\" + i;\n }\n return i;\n }", "function zeroPadded(val) {\n if (val >= 10)\n return val;\n else\n return '0' + val;\n }", "leadingZero(num) {\n return num < 10 ? `0${num}` : num;\n }", "function addZero(value) {\n if (value < 10) {\n return value = '0' + value;\n } else {\n return value;\n }\n }", "function pad(n) {return n<10 ? '0'+n : n} // in case", "function addLeadingZero(n) {\r\n\t\t\tn = parseInt(n, 10);\r\n\t\t return (n < 10) ? (\"0\" + n) : n;\r\n\t\t}", "function addZero(i) {\n\t\tif (i < 10) {\n\t\t\ti = '0' + i;\n\t\t}\n\t\treturn i;\n\t}", "function leadingZero(time) {\n if (time <= 9) {\n time = \"0\" + time;\n }\n return time;\n }", "function addZero(i) {\n if (i < 10) {\n i = \"0\" + i;\n }\n return i;\n }", "function addZero (val){\n\treturn (val <= 9) ? (\"0\" + val) : val;\n}", "function addZero (val){\n\treturn (val <= 9) ? (\"0\" + val) : val;\n}", "function padded(value) {\n return value < 10 ? '0' + value : value;\n}", "function padWithZero(i) {\n if (i < 10) {\n i = \"0\" + i;\n }\n return i;\n}", "function addLeadingZero(num) {\r\n var numStr = (num < 10) ? (\"0\" + num) : \"\" + num;\r\n return numStr;\r\n}", "function addLeadingZero(num) {\r\n var numStr = (num < 10) ? (\"0\" + num) : \"\" + num;\r\n return numStr;\r\n}", "function addLeadingZero(str) {\n return str.length < 2 ? `0${str}` : str\n}", "function padWithZero(num) {\n return num < 10 ? '0' + num : '' + num;\n}", "function addZero(x) {\n if(x < 10 && x[0] !== '0') return '0' + x;\n else return x\n }", "function addZero(i) {\n\tif (i < 10) {\n\t i = \"0\" + i;\n\t}\n\treturn i;\n}", "function addLeadingZeroes(time) {\n return time < 10 ? `0${time}` : time;\n }", "function leadingZero(time) {\n if(time <= 9){\n return \"0\" + time;\n }\n else {\n return time;\n }\n}", "function addZero(i) {\n if (i < 10) {\n i = \"0\" + i;\n }\n return i;\n }", "function addZero(i) {\n if (i < 10) {\n i = \"0\" + i;\n }\n return i;\n }", "function addZero(i) {\n if (i < 10) {\n i = \"0\" + i;\n }\n return i;\n }", "function add_zero(i) {\n\t\treturn (i < 10) ? (i = \"0\" + i) : i;\n\t}", "function addzero(i){\n if(i<10){\n i=\"0\"+i;\n}\nreturn i;\n}", "function addLeadingZeroes(time) {\n return (time < 10 ? `0${time}` : time)\n }", "function leftPad(number) { \n return ((number < 10 && number >= 0) ? '0' : '') + number; \n}", "function addZero(i){\n\tvar text = i;\n\tif(text < 10)\n\t\ttext = \"0\" + text;\n\t\n\treturn text;\n}", "function addZero(i) \n{\n if (i < 10) {\n i = \"0\" + i;\n }\n return i;\n}", "function numberWithLeadingZeros(value) {\n return (value < 10 ? '0' : '') +value;\n}", "function numberWithLeadingZeros(value) {\n return (value < 10 ? '0' : '') +value;\n}", "function zeroIt(a) { return( a < 10 ? \"0\"+a : a ); }", "function leadingZero(time)\n{\n if (time <= 9)\n {\n time = \"0\" + time; // converts time to a string and adds a zero in front of it.\n }\n return time;\n}", "function addZero(i)\n{\n\tif (i < 10)\n\t{\n\t\ti = \"0\" + i;\n\t}\n\treturn i;\n}", "function padIt(d) { return d < 10 ? '0' + d.toString() : d.toString(); }", "function addZero(i) {\n\t// check if the number is less than 10\n\tif(i < 10) {\n\t\t// add a zero in front if less than 10\n\t\ti = \"0\" + i\n\t}\n\t// send back the new value of i\n\treturn i\n}", "function addZero(i) {\n if (i < 10) {\n i = \"0\" + i;\n }\n return i;\n}", "function addZero(i) {\n if (i < 10) {\n i = \"0\" + i;\n }\n return i;\n}", "function addZero(i) {\n if (i < 10) {\n i = \"0\" + i;\n }\n return i;\n}", "function addZero(i) {\n if (i < 10) {\n i = \"0\" + i;\n }\n return i;\n}", "function leadingZero (number, digits) {\n var l = 0, prefix = '';\n\n number += '';\n\n if (number.length < digits) {\n digits = digits - number.length;\n \n while (l < digits) {\n prefix += '0';\n l += 1;\n }\n\n number = prefix + number;\n }\n\n return number;\n }", "function addZero(i) {\n if (i < 10) {\n i = \"0\" + i;\n }\n return i;\n}", "function addZero(i) {\n if (i < 10) {\n i = \"0\" + i;\n }\n return i;\n}", "function addZero(i) {\n if (i < 10) {\n i = \"0\" + i;\n }\n return i;\n}", "function addZero(i) {\n if (i < 10) {\n i = \"0\" + i;\n }\n return i;\n}", "function zeroFill (i) {\n return (i < 10 ? '0' : '') + i\n }", "function addZeroToNumber(number){\n if(number < 10) {\n return '0' + number;\n }\n return number;\n }", "function zerolead(value) {\n\treturn (value < 10) ? '0' + value : value;\n}", "function zerolead(value) {\n\treturn (value < 10) ? '0' + value : value;\n}", "function zeroPad (text, digits) {\r\n\ttext = text.toString();\r\n\twhile (text.length < digits) {\r\n\t\ttext = '0' + text;\r\n\t}\r\n\treturn text;\r\n} //End Add Zero's", "function addZero(n){\n return n < 10 ? '0' + n : n;\n}", "function addZero(i)\n{\n if(i < 10)\n {\n i = \"0\" + i;\n }\n return i;\n}", "function addZero(number) {\r\n if(number < 10) {\r\n number = '0' + number;\r\n }\r\n return number;\r\n}", "function addZeros(time) {\r\n if (time <= 9) {\r\n time = \"0\" + time;\r\n }\r\n return time;\r\n}", "function pad( val )\n{\n return val > 9 ? val : \"0\" + val;\n}", "function zfill(number, size) {\n number = number.toString();\n while (number.length < size) {\n number = '0' + number;\n }\n return number;\n }", "function pad(number) {\n return (number < 10 ? '0' : '') + number;\n}", "function addZero(n){\n return n<10? '0'+n:''+n;\n}", "function addZeroBefore(number, digits) {\n\t\tvar numDig = digits-String(number).length;\n\t\tif (numDig<=0) {\n\t\t\treturn String(number);\n\t\t}\n\t\tnumDig = Math.pow(10, numDig);\n\t\tvar stringDig = String(numDig).substring(1);\n\t\treturn stringDig + String(number);\n\t}", "function zeroPad(value) {\r\n let pad = value < 10 ? '0' : ''\r\n return `${pad}${value}`\r\n}", "function addZero(time) {\n if (time < 10) {\n time = '0' + time;\n }\n return time;\n}", "function padLeft(val, num, str) {\n return '00000'.replace(/0/g, str).slice(0, num - val.length) + val;\n}", "function paddWithZeros(int) {\n return int < 10 ? '0' + int : '' + int;\n}", "function addZero(num) {\n if (num <= 9) return `0${num}`;\n return num;\n}", "function addZero(number) {\n if (number < 10) {\n return '0' + number;\n } else {\n return number;\n }\n }", "function zeroFill(i) {\n return (i < 10 ? '0' : '') + i\n }", "function leadingZero(time) {\n if (time <= 9) {\n // we are adding string to a int value. Javascript is flexiable. Later, if we need to use it as int, it will work as int as it is still a number \n time = \"0\" + time;\n }\n return time;\n}", "function pad(num) {\r\n\tif (num > 9) {\r\n\t\treturn num;\r\n\t} else {\r\n\t\treturn '0' + num;\r\n\t}\t\r\n}", "function addZero(num) {\n if (num < 10) {\n return `0${num}`\n } else {\n return num;\n }\n }", "function fillZeros(num) {\n if (num < 10) {\n num = \"0\" + num.toString();\n } else {\n num.toString();\n }\n return num;\n}", "function WLAddZero(i) {\n if (i < 10) {\n i = \"0\" + i;\n }\n return i;\n}", "function padWithZero(number) {\n\tif (eval(number) < 10) {\n\t\treturn '0' + number;\n\t}\n\treturn number;\n}", "function zeroPad (value) {\n let pad = value < 10 ? '0' : ''\n return `${pad}${value}`\n}", "static padZero(digits) {\n if (Number.isNaN(digits = parseInt(digits, 10)))\n return '--';\n return digits.toString().padStart(2, '0');\n }", "function addZero (number) {\r\n if(number < 10) {\r\n return \"0\" + number;\r\n }\r\n}" ]
[ "0.82120425", "0.8100252", "0.8022078", "0.77793133", "0.77631044", "0.7762038", "0.77576643", "0.77438617", "0.7734648", "0.77092063", "0.7697448", "0.7696939", "0.7686121", "0.76790303", "0.7658734", "0.76448584", "0.7633852", "0.76337606", "0.76302874", "0.76190233", "0.761666", "0.7590679", "0.7585379", "0.7582966", "0.75783426", "0.7577573", "0.7576183", "0.75733835", "0.7571811", "0.75710773", "0.75404465", "0.7537942", "0.75323284", "0.7509935", "0.7509935", "0.7505426", "0.7499554", "0.74948883", "0.74948883", "0.7487507", "0.74867976", "0.74817723", "0.7479292", "0.74746627", "0.74683255", "0.74626017", "0.74626017", "0.74626017", "0.7453308", "0.7450201", "0.74482054", "0.74464595", "0.7418164", "0.741044", "0.74037397", "0.74037397", "0.7402906", "0.74024606", "0.7397796", "0.7392667", "0.73898584", "0.73896646", "0.73896646", "0.73896646", "0.73896646", "0.7383092", "0.7382331", "0.7382331", "0.7382331", "0.7382331", "0.73653555", "0.7361692", "0.73587465", "0.73587465", "0.7352244", "0.7346058", "0.7338495", "0.73380923", "0.73374474", "0.7323517", "0.7321471", "0.7319635", "0.7313988", "0.731236", "0.7300007", "0.729196", "0.7286539", "0.7284258", "0.7280458", "0.7275547", "0.7275218", "0.72750276", "0.72708005", "0.7267214", "0.72629285", "0.7259355", "0.72533506", "0.7248625", "0.72258395", "0.72254544" ]
0.75564784
30
Make an item editable
function editItem(id) { // we search for the id var _index = -1; var _section = -1; for (_sec in myKey.data) { for (_item in myKey.data[_sec]["content"]) { if (myKey.data[_sec]["content"][_item]["id"] == id) { _section = _sec; _index = _item; break; } } } var _form = '<tr id="row_'+id+'" class="row_form"><form name="edit_'+id+'">'; _form += '<td class="form_title"><input type="text" name="title" size="30" value="'+htmlentities(myKey.data[_section]["content"][_index]["title"])+'" /></td>'; _form += '<td class="form_login"><input type="text" name="login" size="30" value="'+htmlentities(myKey.data[_section]["content"][_index]["user"])+'" /></td>'; _form += '<td class="form_password"><input type="text" name="password" size="30" value="'+htmlentities(myKey.data[_section]["content"][_index]["password"])+'" onKeyPress="submitEnter(\'modifyItem('+_section+','+id+')\')" /></td>'; _form += '<td class="form_comment"><input type="text" name="comment" size="60"value="'+htmlentities(myKey.data[_section]["content"][_index]["comment"])+'" onKeyPress="submitEnter(\'modifyItem('+_section+','+id+')\')" /></td>'; _form += '<td class="form_button"><input type="button" onClick="modifyItem('+_section+','+id+')" value="OK" /></td></form></tr>'; $("#row_"+id).replaceWith(_form); // we remplace the line by the form }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set editable(value) {}", "get editable() {}", "function editable(el) {\n // set the clicked list element as editable\n el.target.contentEditable = true;\n //set the focus on this element in order to be able to change the text\n // and to keep the drag functionality working\n el.target.focus();\n}", "editItem() {\n this.view.resetValidity();\n this.view.removeNewMark();\n this.view.setDescription(this.item.getDescription());\n this.view.setExpireDate(this.item.getExpireDate());\n this.view.setCurrentDate(this.item.getCreationDate());\n this.view.editMe();\n }", "function editItem() {\r\n inputName.value = name;\r\n inputName.focus();\r\n isEditing = true;\r\n currentIndex = index;\r\n }", "function editItem(){\n changeItemIndex = index;\n food = item[changeItemIndex].food;\n calory = item[changeItemIndex].calory;\n document.querySelector('.add-item').style.display = \"none\";\n document.querySelector('.change-item').style.display = \"block\";\n document.querySelector('.input-food').value = food;\n document.querySelector('.input-calory').value = calory;\n\n }", "editItem(item) {\n this.editedIndex = this.clientes.indexOf(item)\n this.editedItem = Object.assign({}, item)\n this.dialog = true\n }", "edit() {\n this._enterEditMode();\n }", "function editItem() {\n todoItem = _.first(todo.where({ todo_id: todo_id }));\n log.debug('[TodoListNewEdit] : Editing todo Item', todoItem);\n\n // Set the title to Edit\n Alloy.Globals.Menu.setTitle(\"Edit Task\");\n\n $.textFieldName.value = todoItem.get('name');\n $.textFieldContent.value = todoItem.get('content');\n\n}", "function editClicked() {\n edit = true;\n}", "function toggleEditItem(index){\n const item = items[index];\n items.splice(index, 1, {...item, editing: !item.editing});\n render();\n}", "editExpenseOrItem(e) {\n if (e.target.classList.contains('expense-name')) {\n e.preventDefault()\n const li = e.target\n li.contentEditable = true\n li.focus()\n li.classList.add('editable')\n }\n\n if (e.target.classList.contains('item-name') || e.target.classList.contains('item-price') || e.target.classList.contains('item-quantity')) {\n e.preventDefault()\n const li = e.target\n li.contentEditable = true\n li.focus()\n li.classList.add('editable')\n }\n }", "_setToEditingMode() {\n this._hasBeenEdited = true\n this._setUiEditing()\n }", "_editItem() {\n // Edit Item from Order's Items array:\n let items = this.order.items;\n items[this.item.key] = this.item;\n this.order.items = items;\n // Update current Order:\n this.orderService.setCurrentOrder(this.order);\n this._closeEditItem(); // Close edit Product modal view:\n }", "onEdit (item) {\n this.setState({\n editItem: item\n })\n }", "handleDrinkClick(e){\n const li = e.target\n li.contentEditable = true\n li.focus();\n li.classList.add(\"editable\")\n }", "addItem() {\n if (!this.props.onItemUpdate) {\n console.warn('Read-only list.');\n return;\n }\n\n // TODO(burdon): Set focus on editor.\n if (!this.state.showEditor) {\n this.setState({\n showEditor: true,\n editingItemId: null\n });\n }\n }", "function edit() {\n clickTaskEdit(requireCursor());\n }", "editTodo() {\r\n delegate(this.listHolder, \"label\", \"dblclick\", ({ target } = event) => {\r\n event.preventDefault();\r\n\r\n const listItem = target.offsetParent;\r\n listItem.classList.add(\"editing\");\r\n\r\n const input = document.createElement(\"input\");\r\n input.className = \"edit\";\r\n\r\n input.value = target.innerText;\r\n listItem.appendChild(input);\r\n input.focus();\r\n });\r\n }", "function editToDo(e) {\n let item = e.target\n if (item.classList[0] === \"todo-item\") {\n let texte = item.innerText\n let inputTexte = document.createElement(\"input\") \n inputTexte.type = \"text\"\n inputTexte.value = texte\n item.innerText = \"\"\n item.appendChild(inputTexte)\n item.addEventListener('keyup', (e) => {\n if (e.keyCode === 13) {\n let newTexte = inputTexte.value\n item.innerText = newTexte\n }\n })\n }\n}", "isEditable() {\n return !this.isReference();\n }", "function editable($el, data) {\n \n $el.data('cms', data);\n\n $el.on('render', function () {\n var $el = $(this);\n var data = $el.data('cms');\n elements[data.type].render($el, data.data);\n $el.trigger('rendered');\n });\n\n //add css edit styles\n $el.addClass('cms-edit-' + data.type);\n\n $el.on('click', function (e) {\n e.preventDefault();\n e.stopPropagation();\n var $el = $(this);\n var data = $el.data('cms');\n elements[data.type].edit($el, data);\n });\n\n }", "function enableEditing(itemId){\n $('#'+itemId+'-desc').removeAttr('disabled');\n $('#'+itemId+'-info').removeAttr('disabled');\n $('#'+itemId+'-type').removeAttr('disabled');\n $('#'+itemId+'-category').removeAttr('disabled');\n $('#'+itemId+'-price').removeAttr('disabled');\n $('#'+itemId+'-stock').removeAttr('disabled');\n $('#'+itemId+'-save').removeAttr('disabled');\n $('#'+itemId+'-edit').hide();\n $('#'+itemId+'-cancel').show();\n}", "function allow_modif(id){\n $(\"#nom\"+id).attr(\"contenteditable\",\"true\").css(\"background\",\"#eee\");\n $(\"#desc\"+id).attr(\"contenteditable\",\"true\").css(\"background\",\"#eee\");\n $(\"#action\"+id).hide();\n $(\"#edit\"+id).show();\n}", "edit() {\n }", "function editThisListItem() {\n // Capture the text of the current list item\n var currListItemText = $(this).siblings('span').text();\n\n // Replace the <span> with an input field\n // Set the default value to the currListItemText variable from above\n $(this).parent().html(`<input class=\"edited-list-item\" \n type=\"text\" value=\"${currListItemText}\">\n <button class=\"save-edit\">Save Edit</button>`);\n\n // Capture the new value from the input field on button click\n // Replace the input field\n $('#todo').on('click','.save-edit',function() {\n newListItemText = $(this).siblings('input').val();\n $(this).parent().replaceWith(saveEditedListItem(newListItemText));\n });\n }", "function editPage() {\n $(\"[key]\").each(\n function () {\n $(this).attr('contenteditable', 'true');\n }\n );\n }", "get editable() {\n return this._editable;\n }", "[mutation.EDIT_CONTENT] (state, editableNode) {\n const element = NodeHelpers.getElementObjectByNode(editableNode, state.snapshot)\n if (element && element.editable) {\n element.dataObject.attrs.contenteditable = true\n setTimeout(() => NodeHelpers.setCursorPosition(false)(editableNode), 0)\n }\n }", "edit() {\n\t\tthis.$el.addClass('editing');\n\t\tthis.input.focus();\n\t}", "function edit() {\n this.focus();\n this.setSelectionRange(0, this.value.length);\n}", "function handleEditInput(e){\n let newObj = {...item}\n newObj.task = e.target.value \n setItem(newObj)\n }", "function editable(esEditable) {\n return function (target, nombrePropiedad, descriptor) {\n descriptor.writable = esEditable;\n };\n}", "editListItem(listItemIndex) {\n return this.listItems[listItemIndex].$(\"=Edit\").click();\n }", "setEditable(editable, emitUpdate = true) {\n this.setOptions({ editable });\n if (emitUpdate) {\n this.emit(\"update\", { editor: this, transaction: this.state.tr });\n }\n }", "function setMenuEditable(willEditable) {\n $(\".combo-content\").each(function () {\n willEditable === false ? setDisable($(this)) : setEnable($(this));\n });\n }", "function editItem(e){\n // Remove submit-btn functionality\n submitBtn.removeEventListener('click', insertItem)\n // Find element being edited\n let targetItem = e.target.parentElement.parentElement\n let targetItemText = String(targetItem.children[0].textContent)\n \n inputField.value = targetItemText \n \n // Create submit button replacement (Edit button)\n submitBtn.id = \"edit-btn\"\n const submitBtnReplace = document.getElementById('edit-btn')\n submitBtnReplace.textContent = 'Edit'\n \n submitBtnReplace.addEventListener('click', editContent)\n \n // Replace targeted text with new text\n function editContent(){\n targetItem.children[0].textContent = capitalizeFirstLetter(inputField.value)\n itemEditedSuccess()\n // Pass new values to storage\n storageEditItem(targetItemText, inputField.value)\n \n // Restore app functionality (exit edit-mode)\n clearInputField()\n submitBtnReplace.removeEventListener('click', editContent)\n beginApp()\n }\n }", "set editing(value) {\n\t\tif (value) {\n\t\t\tthis.classList.add('editing');\n\t\t\tthis.query('.edit').focus();\n\t\t} else {\n\t\t\tthis.classList.remove('editing');\n\t\t}\n\t}", "edit(todo) {\n this.editTodo = todo.content;\n todo.isEdited = true;\n }", "function setEditContent() {\n\n var todoElement, currContent;\n\n // update content of item\n $(\".item_content\").unbind().dblclick(function (e) {\n var tr = $(this).parent();\n var itemId = tr.attr('id').substring(tr.attr('id').indexOf('-') + 1);\n var len;\n\n if (onEdit && onEdit !== undefined)\n return;\n\n onEdit = true;\n\n todoElement = $(this);\n currContent = $(this).html();\n\n $(todoElement).html('<input class=\"todoUpdateContent\" type=\"text\" value=\"' + currContent + '\" />');\n\n // move the cursor to the last char\n len= $(\".todoUpdateContent\").val().length * 2;\n $(\".todoUpdateContent\").focus();\n $(\".todoUpdateContent\")[0].setSelectionRange(len, len);\n\n\n $(\".todoUpdateContent\").focusout(function() {\n requestUpdateTodoContent(itemId);\n });\n\n $(\".todoUpdateContent\").dblclick(function() {\n requestUpdateTodoContent(itemId);\n });\n\n $(\".todoUpdateContent\").keyup(function (event) {\n if (event.keyCode == 13) {\n requestUpdateTodoContent(itemId);\n }\n });\n });\n}", "function editItem(e) {\n const element = e.currentTarget.parentElement.parentElement; // Mismo Target que DELETE\n editElement = e.currentTarget.parentElement.previousElementSibling;\n grocery.value = editElement.innerHTML;\n editFlag = true;\n editID = element.dataset.id;\n submitBtn.textContent = 'Edit';\n}", "toggleEdit() {\n this.editing = !this.editing;\n }", "function editItem() {\n var value = localStorage.getItem($(this).attr(\"key\"));\n var item = jQuery.parseJSON(value);\n toggleControls(\"off\");\n $('#displayLink').hide();\n $('#rname').val(item.rname[1]);\n $('#dateadded').val(item.dateadded[1]);\n var radios = $('input[name=\"category\"]:checked').val();\n $('#rtype').val(item.rtype[1]);\n $('#ringredients').val(item.ringredients)[1];\n $('#rdirections').val(item.rdirections)[1];\n save.off(\"click\", storeData);\n $('#submit').val(\"Edit Recipe\");\n var editSubmit = $('#submit');\n editSubmit.on(\"click\");\n editSubmit.attr(\"key\", this.key);\n }", "function bindEditable () {\n\n //Only focus if users clicks on input\n jQuery(panel).on('click', 'input', function (e) {\n e.stopPropagation();\n });\n\n //Change text to editable input\n jQuery(panel).on('click', '.editable', function () {\n\n var input = jQuery('input', this);\n //If we are not already editing\n if (input.length === 0) {\n var prevContent = jQuery(this).text();\n\n input = jQuery('<input type=\"text\" />');\n input.val(prevContent);\n\n input.blur(function () {\n jQuery(this).parent().trigger('click');\n });\n\n jQuery(this).html(input);\n input.focus();\n }\n\n // Else save updated data\n else {\n\n var newContent = input.val();\n var dataType = jQuery(this).closest('table').find('th').eq(jQuery(this).index()).text();\n\n jQuery(this).text(newContent);\n var userId = jQuery(this).parents('tr').find('td:first-child').text();\n\n // Delete if user name is set to empty string\n if(dataType === \"Username\" && newContent === \"\") {\n UST.API.deleteUser(userId);\n }\n\n UST.API.setUserData(dataType, newContent, userId);\n }\n\n\n });\n\n }", "function editTodo(e) {\n const todoItems = todoList.children;\n\n for ( let i = 0; i < todoItems.length; i++ ) {\n //left click: line through\n if ( e.target === todoItems[i] && e.which === 1 ) {\n todoItems[i].classList.toggle('completed');\n toggleTodo(todoItems[i].getAttribute('data-key'));\n }\n //right click: remove item\n if ( e. target === todoItems[i] && e.which === 3 ) {\n deleteTodo(todoItems[i].getAttribute('data-key'));\n todoItems[i].remove();\n }\n }\n}", "function contentEdit(id) {\n const content = document.getElementById(id);\n content.setAttribute(\"contenteditable\", \"true\");\n}", "function setCanEdit(value) {\n\t _canEdit = value;\n\t}", "onEditComplete_() {\n this['editing'] = false;\n }", "function edit() {\r\n toModify = new Array();\r\n toAdd = new Array();\r\n toDelete = new Array();\r\n editOnLeft = true;\r\n idTracker = items.length;\r\n displayList(items, false);\r\n document.getElementById(\"displayer\").className = \"hidden\";\r\n document.getElementById(\"editor\").className = \"shown\";\r\n}", "edit(value) {\r\n if (this.disabled === 'true') {\r\n return;\r\n }\r\n this.onEditing.emit('editing click');\r\n this.preValue = value;\r\n this.editing = true;\r\n this._originalValue = value;\r\n }", "function openEditItem(){\r\n editItem.style.display = 'block';\r\n}", "function ToggleEdit(){\n\t\n}", "function editable(value) {\n return function (target, propName, descriptor) {\n //targert:any = static or private... Method\n descriptor.writable = value; //make writable or not\n };\n}", "editMe() {\n this.editFlag = true;\n this.descriptionInput.readOnly = false;\n this.dateInput.readOnly = false;\n this.descriptionInput.classList.add(\"inputBox\");\n this.dateInput.classList.add(\"inputBox\");\n this.descriptionInput.classList.remove(\"notEditable\");\n this.dateInput.classList.remove(\"notEditable\");\n this.edit.remove();\n this.markAsDone.remove();\n this.delete.remove();\n this.buttonContainer.appendChild(this.save);\n this.buttonContainer.appendChild(this.cancel);\n }", "doEditMode() {\n\n }", "function editItem(el) {\n\tconst { itemToRemove, index } = getIndexFromItem(el.offsetParent, list);\n\ttitle.value = itemToRemove.title;\n\tcarbohidrates.value = itemToRemove.carbohidrates;\n\tcalories.value = itemToRemove.calories;\n\tproteins.value = itemToRemove.proteins;\n\trenderform(mount);\n\t$btnAddForm.onclick = null;\n\tconst action = (e) => {\n\t\te.preventDefault();\n\t\tupdateItem({ itemToRemove, index }, el.offsetParent);\n\t\t$btnAddForm.onclick = validateInputs;\n\t\t$btnAddForm.removeEventListener('click', action);\n\t};\n\t$btnAddForm.addEventListener('click', action);\n}", "function editTodo(e) {\n let todoItem = e.target.parentNode;\n let todotext = e.target.parentNode.firstChild.innerText\n //remove the content div and replace it with the edit input\n e.target.parentNode.firstChild.remove();\n let editInput = document.createElement('input');\n editInput.className = 'editing'\n editInput.value = todotext;\n todoItem.insertBefore(editInput, e.target.parentNode.firstChild)\n}", "get isEditable() {\n return this.options.editable && this.view && this.view.editable;\n }", "function setEditableTrue() {\n var contentEditable = document.getElementsByClassName('editable');\n for (var i = 0; i < contentEditable.length; i++) {\n contentEditable[i].setAttribute('contenteditable', true);\n }\n}", "function addChangeTodoItemClickHandler(e) { \r\n var $el = $(this);\r\n var $input = $el.parent().find(\".work-todo-list-item-edit\");\r\n $el.hide();\r\n $input.show();\r\n $input.focus();\r\n}", "edit() {\n var node = /** @type {KMLNode} */ (this.scope['item']);\n if (node) {\n if (node.isFolder()) {\n createOrEditFolder(/** @type {!FolderOptions} */ ({\n 'node': node\n }));\n } else {\n var feature = node.getFeature();\n createOrEditPlace(/** @type {!PlacemarkOptions} */ ({\n 'feature': feature,\n 'node': node\n }));\n }\n }\n }", "function edit(idx) {\n let fl = fullList[idx];\n document.querySelector(\".item2\").value = fl.item;\n document.querySelector(\".textarea2\").value = fl.info;\n document.querySelector(\".form2\").style.display = \"flex\";\n modal.classList.add(\"open\");\n position = idx;\n}", "function editListItem(oLIItem) {\r\n // get the text content from the LI tag. We use this to set the value\r\n // of the TextEdit item in a moment.\r\n var sTextContent = oLIItem.firstChild.data;\r\n\r\n // create the text field for editing the content of the LI tag.\r\n var oTextField = document.createElement(\"input\");\r\n oTextField.setAttribute(\"id\", \"itemText\");\r\n oTextField.setAttribute(\"type\", \"text\");\r\n // now set the initial value to the current content of the LI tag.\r\n oTextField.setAttribute(\"value\", sTextContent);\r\n\r\n // here's a trick: we're going to temporarily replace the current LI tag with our\r\n // text box so that it appears like the editing UI is positioned over \r\n // the LI tag.\r\n // replace the text content of the LI with the textfield\r\n oLIItem.replaceChild(oTextField, oLIItem.firstChild);\r\n\r\n // Now add the Change, Cancel, and Delete Buttons\r\n var oBtnOK = document.createElement(\"input\");\r\n oBtnOK.setAttribute(\"type\", \"button\");\r\n oBtnOK.setAttribute(\"value\", \" Change \");\r\n oBtnOK.className = \"formButton\";\r\n com_joemarini.EVENTS.addEventHandler(oBtnOK, \"click\", commitEdit);\r\n\r\n var oBtnCancel = document.createElement(\"input\");\r\n oBtnCancel.setAttribute(\"type\", \"button\");\r\n oBtnCancel.setAttribute(\"value\", \" Cancel \");\r\n oBtnCancel.className = \"formButton\";\r\n com_joemarini.EVENTS.addEventHandler(oBtnCancel, \"click\", cancelEdit);\r\n\r\n var oBtnDEL = document.createElement(\"input\");\r\n oBtnDEL.setAttribute(\"type\", \"button\");\r\n oBtnDEL.setAttribute(\"value\", \" Delete \");\r\n oBtnDEL.className = \"formButton\";\r\n com_joemarini.EVENTS.addEventHandler(oBtnDEL, \"click\", deleteItem);\r\n\r\n // add these buttons to the new, temporary list item\r\n oLIItem.appendChild(oBtnOK);\r\n oLIItem.appendChild(oBtnCancel);\r\n oLIItem.appendChild(oBtnDEL);\r\n}", "function addListenerMyListEdit() {\n\t\t$(\".myList-itemEdit\").on(\"click\", function(event) {\n\t\t\tevent.stopPropagation();\n\t\t\tvar myList = $(this).closest(\".myLists-item\");\n\t\t\tvar currentTitle = myList.find(\".myList-title\").html();\n\t\t\t// TODO; annotate\n\t\t\tresetMyListEditMode( $(this) );\n\t\t\ttoggleToMyListButton();\n\t\t\t// Open current My List edit mode\n\t\t\tmyList.find(\".myList-main\").hide();\n\t\t\tmyList.find(\".myList-editTemplate\").show();\n\t\t\tmyList.find(\".myList-editTitle\").val(currentTitle);\n\t\t\tmyList.find(\".myList-editTitle\").focus();\n\t\t});\n\t}", "function editItem(id) {\n\t\t[...todo].map((item) => {\n\t\t\tif (item.id === id) {\n\t\t\t\tfetch(`http://127.0.0.1:3010/tasks/${id}`, {\n\t\t\t\t\tmethod: 'PUT',\n\t\t\t\t\theaders: { 'Content-Type': 'application/json' },\n\t\t\t\t\tbody: JSON.stringify({ id: item.id, text: editText, completed: item.completed, tag: item.tag, lastMod: new Date().getTime(), displayDate: new Date().toLocaleString(), outOfTime: item.outOfTime, alarm: item.alarm })\n\t\t\t\t}).then((resp) => resp.json())\n\t\t\t\t\t.then((data) => { console.log(data) });\n\t\t\t\twindow.location.reload()\n\n\t\t\t}\n\t\t\treturn item\n\t\t})\n\t\tsetEdit(null)\n\t\tsetEditText('')\n\t}", "function enableEdit(curr){\r\n // pause refreshing\r\n clearInterval(livedata);\r\n livedata = null;\r\n document.getElementById(\"row\"+curr).setAttribute(\"contenteditable\", true)\r\n document.getElementById(\"saveBtn\"+curr).style.visibility = \"visible\"\r\n document.getElementById(\"cancelBtn\"+curr).style.visibility = \"visible\"\r\n document.getElementById(\"editBtn\"+curr).style.visibility = \"hidden\"\r\n}", "function handleItem(event){\n setCurrent(event.target.innerHTML);\n \n for(let i=0;i<todoList.length;i++){ //Get details of clicked item\n if(todoList[i].name===event.target.innerHTML){\n setTitleEdit(todoList[i].name);\n setDescriptionEdit(todoList[i].description);\n setTeamEdit(todoList[i].team);\n break;\n }\n }\n setListOpen(true);\n }", "function updateItem() {\n var elem = this;\n console.log(this);\n if (this.value === \"\") {\n console.log(placeholder);\n var str = document.createTextNode(placeholder);\n } //list cannot contain empty items\n else\n var str = document.createTextNode(this.value);\n console.log(this.value);\n var span = document.createElement(\"span\");\n span.className = \"item__text\";\n\n span.appendChild(str);\n span.addEventListener('click', edit);\n console.log(\"parent node \"+elem.parentNode);\n elem.parentNode.replaceChild(span, elem);\n\n }", "function activateListEditing() {\n\tactivateEditing();\n\tcreateEditingElements(\"#list\");\n\t$(\"#list\").on(\"click\", \"a\", function(e){e.preventDefault();}); //disable the links\n\t$(\".list_entry\").find(\"p\").addClass(\"editable\");\n\t$(\"#list\").on(\"mouseenter\", \".list_entry\", showCloseButton).on(\"mouseleave\", \".list_entry\", hideCloseButton);\t\n}", "function toggleEdit(postDescId, editsave, titleId) {\n var postDesc = document.getElementById(postDescId);\n var buttonText = document.getElementById(editsave);\n var title = document.getElementById(titleId);\n if (postDesc.isContentEditable) {\n postDesc.contentEditable = 'false';\n title.contentEditable = 'false';\n buttonText.innerHTML = 'Edit <i class=\"fas fa-edit\"></i>';\n } else {\n postDesc.contentEditable = 'true';\n title.contentEditable = 'true';\n buttonText.innerHTML = 'Save';\n }\n}", "function editContent(){\n targetItem.children[0].textContent = capitalizeFirstLetter(inputField.value)\n itemEditedSuccess()\n // Pass new values to storage\n storageEditItem(targetItemText, inputField.value)\n \n // Restore app functionality (exit edit-mode)\n clearInputField()\n submitBtnReplace.removeEventListener('click', editContent)\n beginApp()\n }", "flipEditable() {\n this.setState(prev => {\n return { editable: !prev.editable };\n });\n }", "function editItem(e, row) {\n e.preventDefault();\n var item = row.data('item');\n\n $(\"#editButtons\").show();\n $(\"#btnUpdate\").data('row', row);\n $(\"#btnAdd\").hide();\n\n $(\"#product\").val(item.product);\n $(\"#quantity\").val(item.quantity);\n $(\"#price\").val(item.price);\n $(\"#datetime\").val(item.datetime);\n}", "editCommand(){const richtext=this.shadowRoot.getElementById(\"richtext\"),editmode=richtext.contentDocument;editmode.designMode=\"on\"}", "function onEdit() {\n transition(EDIT);\n }", "function doEditInShowList(li){\n\n li.children[1].innerText = document.getElementById(\"task\").value ;\n li.id = document.getElementById(\"task\").value ;\n\n }", "function makeEditable() {\n const editButton = document.getElementById('edit-button');\n const updateButton = document.getElementById('update-button');\n editButton.setAttribute('hidden', true);\n updateButton.removeAttribute('hidden');\n \n const editableFields = document.getElementsByClassName('editable');\n Array.from(editableFields).forEach(function(editableField) {\n editableField.removeAttribute('readonly');\n editableField.classList.remove('form-control-plaintext');\n editableField.classList.add('form-control');\n });\n \n document.getElementById('company-field').placeholder = 'Company';\n document.getElementById('linkedin-field').placeholder = 'LinkedIn';\n \n const currentJob = document.getElementById('current-job');\n currentJob.setAttribute('hidden', true);\n const jobField = document.getElementById('job-field');\n jobField.removeAttribute('hidden');\n \n const checkboxes = document.getElementsByClassName('check-editable');\n Array.from(checkboxes).forEach(function(checkbox) {\n checkbox.removeAttribute('disabled');\n });\n}", "edit() {\n let selected = this.props.todo.selected;\n let input = document.getElementById('input-to-do');\n let val = input.value;\n\n if (this.props.todo.editing) {\n this.props.addEdits(selected, this.props.todo.todo, this.props.todo.totalToDos);\n this.props.turnEditingOn(false);\n input.value = '';\n } else if (selected) {\n let value = selected.value;\n input.value = value;\n this.props.turnEditingOn(true);\n } \n }", "function changeItem(event){\n food = document.querySelector('.input-food').value;\n calory = document.querySelector('.input-calory').value;\n if(document.querySelector('.input-food').value !== \"\" && document.querySelector('.input-calory').value !== \"\"){\n let itemSetter = [...item];\n itemSetter[changeItemIndex].food = food;\n itemSetter[changeItemIndex].calory = calory;\n document.querySelector('.input-food').value=\"\";\n document.querySelector('.input-calory').value=\"\";\n document.querySelector('.add-item').style.display = \"block\";\n document.querySelector('.change-item').style.display = \"none\";\n setItem(itemSetter);\n event.preventDefault();\n }\n }", "function makeEditable($container) {\n var $fields = $container.find(\"[data-content-attr]\");\n $fields.addClass(\"activated\").hallo({\n editable: true,\n toolbar: \"halloToolbarContextual\", // halloToolbarFixed\n toolbarCssClass: \"ui-widget-header\",\n toolbarPositionAbove: true,\n plugins: {\n \"halloformat\": {},\n \"halloheadings\": {headers: [2,3,4]},\n // \"hallojustify\": {},\n \"hallolists\": {},\n \"hallolink\": {},\n \"halloimage\": {}\n }\n });\n }", "onEditClicked(){\n this.props.onEdit(this.props.item);\n }", "function quickEdit(){\r\n\t\t\r\n\t\tvar arrIDs = g_objItems.getSelectedItemIDs();\r\n\t\t\r\n\t\tif(arrIDs.length == 0)\r\n\t\t\treturn(false);\r\n\t\t\r\n\t\tvar itemID = arrIDs[0];\r\n\t\t\r\n\t\tvar objItem = g_objItems.getItemByID(itemID);\r\n\t\tif(objItem.length == 0)\r\n\t\t\tthrow new Error(\"item not found: \"+itemID);\r\n\t\t\r\n\t\tvar title = objItem.data(\"title\");\r\n\t\tvar name = objItem.data(\"name\");\r\n\t\tvar description = objItem.data(\"description\");\r\n\t\t\r\n\t\tvar objDialog = jQuery(\"#dialog_edit_item_title\");\r\n\t\t\r\n\t\tjQuery(\"#dialog_quick_edit_title\").val(title).focus();\r\n\t\tjQuery(\"#dialog_quick_edit_name\").val(name);\r\n\t\tjQuery(\"#dialog_quick_edit_description\").val(description);\r\n\t\t\r\n\t\tvar buttonOpts = {};\r\n\t\t\r\n\t\tbuttonOpts[g_uctext.cancel] = function(){\r\n\t\t\tjQuery(\"#dialog_edit_item_title\").dialog(\"close\");\r\n\t\t};\r\n\t\t\r\n\t\tbuttonOpts[g_uctext.update] = function(){\r\n\t\t\tupdateItemTitle();\r\n\t\t}\r\n\t\t\r\n\t\tobjDialog.data(\"itemid\",itemID);\r\n\t\t\r\n\t\tobjDialog.dialog({\r\n\t\t\tdialogClass:\"unite-ui\",\t\t\t\r\n\t\t\tbuttons:buttonOpts,\r\n\t\t\tminWidth:500,\r\n\t\t\tmodal:true,\r\n\t\t\topen:function(){\r\n\t\t\t\tjQuery(\"#dialog_quick_edit_title\").select();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t}", "enableEditing() {\n var locationData = {};\n\n // A variable to store changes\n // untul the item is saved.\n locationData = {\n name: this.props.item.name,\n address: this.props.item.address,\n coordinates: this.props.item.coordinates,\n categories: this.props.item.categories\n };\n\n this.props.dispatch({type: LocationActions.ActionTypes.LOCATION.ENABLE_LOCATION_ROW_EDITING,\n locationIndex: this.props.locationIndex, locationData: locationData});\n }", "function editable(value) {\n return function (target, propName, descriptor) {\n descriptor.writable = value;\n };\n}", "function addEditableListener() {\n console.log ('Running')\n console.log (GlobalEditable)\n if (GlobalEditable == 'False') {\n var localEditable = (GlobalEditable != 'False');\n console.log (localEditable);\n // Disable click listeners\n document.getElementById(\"new_item\").onclick = null;\n }\n else {\n console.log ('do nothing allow edits')\n }\n}", "function editannounement() {\n\n}", "_editModeChanged(newValue, oldValue) {\n if (typeof newValue !== typeof undefined) {\n this._itemsChanged(this.items);\n for (var i in this.items) {\n if (this.items[i].metadata) {\n this.items[i].metadata.canEdit = newValue;\n this.notifyPath(`items.${i}.metadata.canEdit`);\n }\n }\n }\n }", "function editItem(id){\n sendRequest(\n 'usergroups',\n {\n 'action': 'getEditItemForm',\n 'id': id\n }, function(data){\n $('#listcontent').css('display','none');\n $('#editorholder').html(data);\n });\n}", "edit_apply(task_id, taskNewTitle) {\n Tasks\n .update({\n '_id': task_id\n }, {\n $set: {text: taskNewTitle},\n });\n\n\n this.task_to_change = \"\"; // reset input clicked (close input edit)\n }", "function orderItemEdit(node) {\n var nodeID, itemID, url;\n\n nodeID = node.id;\n itemID = nodeID.split('-').pop();\n url = hostName + '/order_items/a/quoteUpdate?quoteItemID=' + itemID;\n \n $('#qItem-' + nodeId + ' .editable input[type=text]').blur(function(){\n $.post(url);\n });\n\n $('#qItem-' + nodeId + ' .editable textarea').blur(function(){\n $.post(url);\n });\n}", "Edititem(text, key){\n const items = this.state.items;\n items.map(item => {\n\n if(item.key==key){\n item.text=text;\n }\n })\n\n this.setState({\n\n items : items\n })\n }", "function editTodoItem(row, start, stop, content) {\n let newTodos = [...todos];\n newTodos[row - 1] = {\n content: content,\n start: start,\n stop: stop\n };\n setTodos(newTodos);\n setSelectedRow(\"\");\n }", "function editable() {\n text.blur();\n setTimeout(function() {\n text.setEditable(true);\n }, 500);\n\n win.removeEventListener('postlayout', editable);\n }", "function editable() {\n text.blur();\n setTimeout(function() {\n text.setEditable(true);\n }, 500);\n\n win.removeEventListener('postlayout', editable);\n }", "function edit() {\n$('.activityMainContainer').on('click', '.edit_button1',function(e) {\n\t\n e.preventDefault();\n\t\n\tlet button = $(this).closest('.row').find('.save_button1');\n\t\n $(button).toggle();\n\t\n\t\n let arrayOfInput = $(this).closest('.row').find('input');\n for ( let i = 0; i < arrayOfInput.length; i ++ ){\n\t \n $(arrayOfInput[i]).prop(\"readonly\", false);\n\t } \n }); \n}", "openEditItem(key, item) {\n this.actionLabel = 'edit_item';\n item.$key = key; // Notice the use of $key instead of key.\n this.item = item;\n this.$scope.editItemModal.show();\n }", "function editToDoButton(e) {\n let item = e.target\n if (item.classList[0] === \"edit-button\") {\n let leTexte = item.parentElement.previousSibling\n let inputTexte2 = document.createElement(\"input\") \n inputTexte2.type = \"text\"\n inputTexte2.value = leTexte.innerText\n leTexte.innerText= \"\"\n leTexte.appendChild(inputTexte2)\n leTexte.addEventListener('keyup', (e) => {\n if (e.keyCode === 13) {\n let newTexte = inputTexte2.value\n leTexte.innerText = newTexte\n }\n })\n }\n}", "onClickEditMode() {\n\t\teventEmitter.emit(EVENTS.ToggleEditMode, this.Controls.EDIT_MODE);\n\t}", "function xEditable(container,trigger){\r\n\r\nvar editElement = null;\r\nvar container = xGetElementById(container);\r\nvar trigger = xGetElementById(trigger);\r\nvar newID = container.id + \"_edit\";\r\nxAddEventListener(container, 'click', BeginEdit);\r\n\r\nfunction BeginEdit(){\r\n if(!editElement){\r\n // create the input box\r\n editElement = xCreateElement('input');\r\n editElement.setAttribute('id', newID);\r\n editElement.setAttribute('name', newID);\r\n // prep the inputbox with the current value\r\n editElement.setAttribute('value', container.innerHTML);\r\n // kills small gecko bug\r\n editElement.setAttribute('autocomplete','OFF');\r\n // setup events that occur when editing is done\r\n xAddEventListener(editElement, 'blur', EndEditClick);\r\n xAddEventListener(editElement, 'keypress', EndEditKey);\r\n // make room for the inputbox, then add it\r\n container.innerHTML = '';\r\n container.appendChild(editElement);\r\n editElement.select();\r\n editElement.focus();\r\n }else{\r\n editElement.select();\r\n editElement.focus();\r\n }\r\n}\r\nfunction EndEditClick(){\r\n // save the entered value, and kill the input field\r\n container.innerHTML = editElement.value;\r\n editElement = null;\r\n}\r\nfunction EndEditKey(evt){\r\n // save the entered value, and kill the input field, but ONLY on an enter\r\n var e = new xEvent(evt);\r\n if(e.keyCode == 13){\r\n container.innerHTML = editElement.value;\r\n editElement = null;\r\n }\r\n}\r\n}", "function editTodo(i){\n let toDoTask = localStorage.getItem(\"localtodo\");\n saveIndex.value = i;\n let todoObj = JSON.parse(toDoTask);\n todoInp.value = todoObj[i];\n saveBtn.style.display = \"block\";\n addTodo.style.display=\"none\";\n addTodo.setAttribute(\"disabled\", true)\n }", "@action\n editRow() {\n set(this, 'isEditRow', true);\n }" ]
[ "0.7832706", "0.76890695", "0.7298008", "0.723219", "0.71760714", "0.7006337", "0.6991115", "0.6939955", "0.69354296", "0.69242406", "0.6768807", "0.67586416", "0.67541623", "0.67514807", "0.66920185", "0.66461456", "0.66443276", "0.6589675", "0.6564702", "0.65615666", "0.6483614", "0.6461751", "0.64592797", "0.645729", "0.6455852", "0.6429799", "0.64221394", "0.6415615", "0.64140916", "0.64106613", "0.6400722", "0.64006495", "0.638346", "0.63723195", "0.63701063", "0.6358039", "0.6352138", "0.63416946", "0.6332516", "0.6330864", "0.6327436", "0.6318137", "0.6314113", "0.6300889", "0.62838745", "0.6275014", "0.6269844", "0.6267637", "0.6264976", "0.62630963", "0.626079", "0.62494326", "0.6227504", "0.62189656", "0.62120706", "0.6212", "0.6201224", "0.61917615", "0.6189829", "0.61673", "0.6161724", "0.6151728", "0.61497885", "0.61411333", "0.61303747", "0.6128116", "0.61240953", "0.6123172", "0.6113086", "0.6094006", "0.6093374", "0.60875547", "0.6075519", "0.60699517", "0.6066833", "0.60492736", "0.60482365", "0.6042665", "0.60293335", "0.60278165", "0.60269046", "0.6016524", "0.60149175", "0.60123307", "0.6010781", "0.60044146", "0.60008276", "0.5997857", "0.5991486", "0.5988653", "0.597219", "0.5968359", "0.5965906", "0.5965906", "0.5965689", "0.5961831", "0.5957667", "0.59567505", "0.5956489", "0.5955515", "0.5953235" ]
0.0
-1
will save change we have to proceed with id, and not index, because user may delete previous lines while editing
function modifyItem(section, id) { if (document.forms['edit_'+id].elements['title'].value == '' || document.forms['edit_'+id].elements['login'].value == '' || document.forms['edit_'+id].elements['password'].value == '') { error("Les champs Titre, Login et MdP sont obligatoires"); return; } var _index = -1; // we have to search the right object, and feed it // I didn't find a better way than a loop, sorry for (var _item in myKey.data[section]["content"]) { if (myKey.data[section]["content"][_item]["id"] == id) { _index = _item; break; } } if (_index == -1) { // we did not found the right line error("Impossible de modifier l'élément"); return; } myKey.data[section]["content"][_index] = { title: document.forms['edit_'+id].elements['title'].value, user: document.forms['edit_'+id].elements['login'].value, password: document.forms['edit_'+id].elements['password'].value, comment: document.forms['edit_'+id].elements['comment'].value, id: id // do not change }; // we serialize and then encrypt data (the whole section) var _content = JSON.stringify(myKey.data[section]["content"]); var _data = myKey.encrypt(_content); // ask the server to do the same // we resend our key each time, to validate it's not anyone doing bullshit $.ajax({ type: 'POST', url: serverUrl+"request/change_data", data: {content: _data, id: myKey.data[section]["id"], user: myKey.user, key: myKey.key}, success: success, error: serverError }); // reset the line $("#row_"+id).replaceWith(addRow(_index, myKey.data[section]["content"][_index])); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _inLineSave(saveit) {\n console.log (\"ListMain _inLineSave : saveit:\"+saveit+\" [\"+ inlineCtl.editidx + \"] : \" + JSON.stringify(inlineCtl.editval));\n if (saveit) { // save\n let clonearray = inlineCtl.records.slice(0);\n if (inlineCtl.editidx >= 0) { // save existing row\n clonearray[inlineCtl.editidx] = inlineCtl.editval\n } else {// save a new row\n clonearray.push (inlineCtl.editval)\n }\n console.log (\"ListMain _inLineSave : inform parent of new data, clonearray:\" +JSON.stringify(clonearray));\n setInlineCtl({status: \"ready\", records: clonearray, editidx: null, editval: {}})\n if (onDataChange) onDataChange({data: clonearray, disableSave: false})\n\n } else { // cancel\n setInlineCtl((prev) => { return {...prev, editidx: null, editval: {}}}) //enque a render update\n if (onDataChange) onDataChange({disableSave: false})\n }\n }", "save() {\n try {\n this._toggleSaveThrobber();\n this._readFromForm();\n this.dao.save();\n\n // make sure the edit input is showing the correct id, reload data from server\n document.getElementById('edit_id').value = this.dao.id;\n this.read();\n \n } catch(e) {\n console.log(e);\n alert(e);\n }\n this._toggleSaveThrobber();\n }", "function saveAction(){\n\t\tvar data = getInput();\n\t\tif(data.id == \"\") {\n\t\t\t// delete the id property as it's\n\t\t\t// automatically set by database.\n\t\t\tdelete data.id;\n\t\t\tupdateDB(\"add\", data);\n\t\t}\n\t\telse {\n\t\t\tdata.id = Number(data.id);\n\t\t\tupdateDB(\"edit\", data);\n\t\t}\n\t\tclearInput();\n\t}", "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 }", "function saveEdited(){\n\tactiveDataSet = studentList.find( arr => arr.absenceId == activeElement ); \n\t$.post(\"\", {\n\t\t\t\t'type': 'editabsence',\n\t\t\t\t'console': '',\n\t\t\t\t'aid': activeDataSet['absenceId'],\n\t\t\t\t'id': activeElement,\n\t\t\t\t'start': formatDateDash(document.getElementById('esickstart').value),\n\t\t\t\t'end': formatDateDash(document.getElementById('esickend').value),\n\t\t\t\t'comment': document.getElementById('ecomment').value,\n\t\t\t\t'evia': document.querySelector('input[name=\"evia\"]:checked').value\n }, function (data,status) {\n\t\t\t\thandleServerResponse(data, status);\n\t\t\t});\t\n}", "save() {}", "changeId(oldId, newId, indexData, save) {\n return this.load()\n .then( () => {\n const item = this.get(oldId);\n if (item) {\n Object.assign(item, indexData);\n }\n if (save) return this.save();\n });\n }", "registerChange() {\n if (this.editor && this.editor.save && this.shouldSaveHistory && !this.editor.configuration.readOnly) {\n this.editor.save().then((savedData) => {\n if (this.editorDidUpdate(savedData.blocks)) this.save(savedData.blocks);\n });\n }\n this.shouldSaveHistory = true;\n }", "function Save() {\n if ($('#ab041AddEdit').valid()) {\n if (vm.isNew) {\n dataContext.add(\"/api/ab041\",vm.ab041).then(function (data) {\n notify.showMessage('success', \"ab041 record added successfully!\");\n\t\t\t\t\t\twindow.location.hash = \"/ab041/\";\n });\n } else {\n dataContext.upDate(\"/api/ab041\", vm.ab041).then(function (data) {\n notify.showMessage('success', \"ab041 record updated successfully!\");\n\t\t\t\t\t\twindow.location.hash = \"/ab041/\";\n });\n }\n }\n }", "@action\n saveRow() {\n set(this, 'isEditRow', false);\n }", "function afterEdit(e) {\n record = e.record;\n if (record.id == 0) {\n draft_store.load({params: {field: e.field, value: e.value}});\n } else {\n save_store.load({params: {field: e.field, id: e.record.id, value: e.value}});\n }\n }", "function save() {\r\n //Modify\r\n for (i = 0; i < toModify.length; i++) {\r\n items[toModify[i]].description = document.getElementById(toModify[i]).value;\r\n serverPut(items[toModify[i]].id, items[toModify[i]].description);\r\n }\r\n //Delete\r\n toDelete.sort();\r\n toDelete.reverse();\r\n for (i = 0; i < toDelete.length; i++) {\r\n serverDelete(items[toDelete[i]]);\r\n items.splice(toDelete[i], 1);\r\n }\r\n //Add\r\n for (i = 0; i < toAdd.length; i++) {\r\n let newDescription = document.getElementById(toAdd[i]).value;\r\n let newID = serverPost(desc);\r\n items[items.length] = {\r\n description: newDescription,\r\n id: newID,\r\n };\r\n }\r\n\r\n //Display list\r\n displayList(items, true);\r\n document.getElementById(\"displayer\").className = \"shown\";\r\n document.getElementById(\"editor\").className = \"hidden\";\r\n}", "function commitEdits(){\n\t\t\tgrid.Grid.getEditController().commitCurrentEdit();\n\t\t}", "function saveChange(rowNo)\r\n\t{\r\n\t\tvar updating = false;\r\n\r\n\t\tif ( editingRow !== -1 && rowNo !== editingRow )\r\n\t\t{\r\n\t\t\talert( \"Unhandled problem: loc[1]\" );\r\n\t\t}\r\n\r\n\t\tif ( rowEditing === true )\r\n\t\t{\r\n\t\t\t// get the updated value\r\n\t\t\tvar newValue = document.getElementById('editCell');\r\n\r\n\t\t\tif ( class_myRows[rowNo].name !== newValue.value )\r\n\t\t\t{\r\n\t\t\t\t// checkfor the evil character\r\n\t\t\t\tif( newValue.value.indexOf( \":\" ) !== -1 )\r\n\t\t\t\t{\r\n\t\t\t\t\talert( LocString( 'Name cannot contain colon' ) );\r\n\t\t\t\t\tnewValue.focus();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tresetRowContents();\r\n\t\t\t\t\tUpdateNameOnObject( rowNo, class_myRows[rowNo].dataId, newValue.value );\r\n\t\t\t\t\tupdating = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tif ( false === updating )\r\n\t\t{\r\n\t\t\trowEditing = false;\r\n\t\t\tresetRowContents();\r\n\t\t}\r\n\t}", "function save(){\n\tid = -1;\n\t\n\tif (pos_comp != -1)//modificar\n\t\tid = positions[pos_comp][0];\n\t\t\n\t$(\"#btnGuardar\").hide();\n\t$(\"#mensajeTemporal\").show();\n\t$(\"#backImage\").css({cursor:\"wait\"});\n\t\n\t\n\t$(\"#idPagina\").val(id);\n\t$(\"#contenido\").val($(\"#contenido\").sceditor(\"instance\").val());\n\t\n\t\n\t$(\"#subirPagina\").ajaxSubmit({\n\t\tdataType: \"json\",\n\t\tsuccess: function(respuesta_json){\n\t\t\t$(\"#btnGuardar\").show();\n\t\t\t$(\"#mensajeTemporal\").hide();\n\t\t\t$(\"#backImage\").css({cursor:\"default\"});\n\t\t\n\t\t\t$(\"#resultados\").text(respuesta_json.mensaje);\n\t\t\tprincipalCerrarPopUp(pagina_cerrarPopUp);\n\t\t\tconsultarTuplasExistentes(nombrePHPConsultar, isBorrarTuplas, arrayCamposConsulta);\n\t\t}\n\t});\n}", "async save() {\n await db.query(\n `UPDATE jobs SET title=$1, salary=$2, equity=$3, company_handle=$4 WHERE id = $5`, [this.title, this.salary, this.equity, this.company_handle, this.id]);\n }", "@action\n handleCancelSaveField(id) {\n this.setValue(id, this.initialData[id]);\n this.setFieldState(id, 'showSave', false);\n }", "function Save() {\n if ($('#ab121sgAddEdit').valid()) {\n if (vm.isNew) {\n dataContext.add(\"/api/ab121sg\",vm.ab121sg).then(function (data) {\n notify.showMessage('success', \"ab121sg record added successfully!\");\n\t\t\t\t\t\twindow.location.hash = \"/ab121sg/\";\n });\n } else {\n dataContext.upDate(\"/api/ab121sg\", vm.ab121sg).then(function (data) {\n notify.showMessage('success', \"ab121sg record updated successfully!\");\n\t\t\t\t\t\twindow.location.hash = \"/ab121sg/\";\n });\n }\n }\n }", "function editMade() {\n version += 1;\n emitter({});\n }", "passBackEdit({ commit }) {\n commit(\"edition\", false);\n }", "save() {\n }", "function save() {\n\n if (!_.isNumber($scope.editIndex)) // if new put in array\n $scope.documents.push($scope.document);\n\n return $scope.save().then(function() {\n $scope.editIndex = false;\n $scope.editLinkForm.$setPristine();\n $scope.editLinkForm.$setValidity();\n $scope.editLinkForm.$setUntouched();\n $scope.document={};\n var el = $element.find('#file');\n el.value='';\n $scope.focused=false;\n\n }).catch(function(error) {\n console.log(error);\n $scope.onError(error);\n $scope.documents.pop();\n $scope.error = error;\n throw error;\n });\n }", "function save(m){\n let value = m.previousElementSibling.querySelector(\"textarea\").value;\n let span = m.parentElement.parentElement;\n let id = span.dataset.id;\n fetch(\"/editpost\", {\n credentials: 'include',\n method: 'PUT',\n mode: 'same-origin',\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json',\n 'X-CSRFToken': csrf\n },\n body: JSON.stringify({\n value: value,\n id: id,\n })\n })\n\n let llist = span.children;\n llist[3].style.color = \"#657ff0\";\n llist[5].style.display = \"inline-block\";\n llist[5].innerHTML = value;\n llist[6].remove();\n return false;\n}", "save() {\n if (this.editedItem.id) {\n console.log(\"edited item\");\n this.$http.put('http://localhost:3000/api/clientes', this.editedItem)\n .then(function (response) {\n this.clientes.splice(this.editedIndex, 1, this.editedItem);\n\n // Actualiza la lista.\n this.initialize();\n });\n } else {\n console.log(\"nuevo item\", this.editedItem);\n delete this.editedItem.id;\n this.$http.post('http://localhost:3000/api/clientes', this.cleanedItem(this.editedItem))\n .then(function (response) {\n //if (response.status==200){}\n this.clientes.push(response.body);\n\n // Actualiza la lista.\n this.initialize();\n });\n }\n this.close()\n }", "save(){\n //\n }", "saveChanges() {\n this.emit(EVENTS.TodosUpdateItem, {\n id: this.props.id,\n text: this.state.input\n });\n\n this.setState({ isEditing: false });\n }", "function autocommit(field, value, id, is_json, subfield) {\n var jqxhr = $.post(\"/ia/save\", {\n field : field,\n value : value,\n id : id,\n autocommit: 1\n })\n .done(function(data) {\n subfield = subfield? subfield : \"\";\n if (data.result) {\n if (data.result.saved) {\n if (field === \"dev_milestone\" && data.result[field] === \"live\") {\n location.reload();\n } else if (field === \"id\" || data.result.id) {\n location.href = \"/ia/view/\" + data.result.id;\n } else {\n ia_data.live[field] = (is_json && data.result[field])? $.parseJSON(data.result[field]) : data.result[field];\n if ((field === \"developer\" && ia_data.permissions && ia_data.permissions.admin)\n || ($(\"#ia-single--details .\" + field).length || (subfield && $(\"#ia-single--details .\" + subfield).length))\n || ((field === \"example_query\" || field === \"other_queries\") && (!ia_data.examples_saved))) {\n if (field === \"example_query\" || field === \"other_queries\") {\n ia_data.examples_saved = 1;\n }\n \n page.updateHandlebars(readonly_templates, ia_data, ia_data.live.dev_milestone, false);\n } else {\n console.log(\"CALLING keepUnsavedEdits \" + field + \" \" + ia_data.live[field]);\n keepUnsavedEdits(field);\n }\n }\n } else {\n $(\".\" + field).addClass(\"not_saved\");\n var $error_msg = $(\".\" + field).siblings(\".error-notification\");\n $error_msg.removeClass(\"hide\");\n $error_msg.text(data.result.msg);\n }\n\n if (field === \"developer\" && ia_data.permissions && ia_data.permissions.admin) {\n commitEdit($(\"#producer-input\"));\n }\n }\n });\n }", "function saveChanges() {\n var note_id = $('.note-info').attr('id'),\n csrftoken = $.cookie('csrftoken'),\n title = $('#title').text(),\n note_title = title === \"\" ? \"Untitled note\" : title,\n note_content = $('.editor').html(),\n data = {\n id: note_id,\n title: note_title,\n body: note_content,\n csrfmiddlewaretoken: csrftoken\n };\n\n $.post(\"/notes/editnote/\", data).success(function (data) {\n var note = $('#notelist').find('a[data-noteid=' + note_id + ']');\n $(note).find('strong').html(data.title);\n $(note).find('.preview').html(data.preview);\n });\n }", "function handleSave() {\n console.log('in handleSave');\n const updatedList = {\n id: trip.id,\n location: title,\n start_date: date,\n days: days,\n }\n console.log('Updated trip info:', updatedList);\n //update list to reflect changes by triggering events stemmed from update list reducer\n dispatch({ type: 'UPDATE_LIST', payload: updatedList })\n //reset edit mode to false\n setEditMode(false)\n // history.push('/user')\n }", "function edit(id, model) {\n\tconst { cards: oldCards, nextId: oldNextId, isNewCard } = model\n\tconst idx = R.findIndex(R.propEq('id', id))(oldCards)\n\tconst [newCard] = R.filter(R.propEq('id', id))(oldCards)\n\tconst newCards = R.filter(R.complement(R.propEq('id', id)))(oldCards)\n\treturn { idx, newCard, newCards, oldNextId, isNewCard }\n}", "function handleSave(){\n props.onAdd(qItems);\n props.toggle(); \n }", "update(id) {\n\n }", "function saveAboutMe(id) {\n endEditAboutMe();\n\n if ($edit_about_me.val() != \"\") {\n var values = {};\n values.about_me = $edit_about_me.val();\n\n ajaxSend('/profile/', 'POST', values, function () {\n $about_me.text($edit_about_me.val()).expander();\n });\n }\n }", "function saveChanges() {\n var grid = $grid.pqGrid('getInstance').grid;\n\n //debugger;\n //attempt to save editing cell.\n if (grid.saveEditCell() === false) {\n return false;\n }\n\n var isDirty = grid.isDirty();\n if (isDirty) {\n //validate the new added rows. \n var addList = grid.getChanges().addList;\n //debugger;\n for (var i = 0; i < addList.length; i++) {\n var rowData = addList[i];\n var isValid = grid.isValid({ \"rowData\": rowData }).valid;\n if (!isValid) {\n return;\n }\n }\n var changes = grid.getChanges({ format: \"byVal\" });\n\n //post changes to server \n $.ajax({\n dataType: \"json\",\n type: \"POST\",\n async: true,\n beforeSend: function (jqXHR, settings) {\n grid.showLoading();\n },\n url: \"/pro/products/batch\", //for ASP.NET, java \n data: { list: JSON.stringify(changes) },\n success: function (changes) {\n //debugger;\n grid.commit({ type: 'add', rows: changes.addList });\n grid.commit({ type: 'update', rows: changes.updateList });\n grid.commit({ type: 'delete', rows: changes.deleteList });\n\n grid.history({ method: 'reset' });\n },\n complete: function () {\n grid.hideLoading();\n }\n });\n }\n }", "function saveChanges() {\n var name = document.getElementById(\"mod_name\").value;\n var tel = document.getElementById(\"mod_tel\").value;\n var email = document.getElementById(\"mod_email\").value;\n var idx = document.getElementById(\"mod_idx\").value;\n \n if (!isInputError(name, tel, email)) {\n \t// make changes\n \tcontacts[idx].name = name;\n \tcontacts[idx].tel = tel;\n \tcontacts[idx].email = email;\n // hide mod panel\n hide(\"modentry\");\n // refresh contact list\n displayEntries();\n }\n\n}", "function change(o) {\n\to.id = 2;\n}", "function saveEditsOnto(){\n var node=obj1Onto;\n if(editingOnto&&node!=null){\n editingOnto=false;\n node.select('text').text(currentStringOnto);\n node.select('circle').style('fill','#69f');\n node.each(function(d){\n d.name=currentStringOnto;\n node_dataOnto[d.index].name = currentStringOnto;\n });\n currentStringOnto=\"\";\n editingOnto=false;\n updateGraphOnto(node_dataOnto,link_dataOnto);\n }\n}", "saveCurrentChanges(selectedId , shouldUpdateStorage) {\n if(!this.locations) {\n this.locations = {};\n }\n let noteIndex = this.getNoteIndexFromId(this.noteSelected);\n if(this.locations.hasOwnProperty(selectedId) && this.locations[selectedId]) {\n this.locations[selectedId].top = this.noteSelected.style.top;\n this.locations[selectedId].left = this.noteSelected.style.left;\n this.locations[selectedId].isDirty = true;\n this.locations[selectedId].comment = this.notes[noteIndex].comment;\n this.locations[selectedId].fieldName = this.notes[noteIndex].fieldName;\n } else {\n let id = selectedId;\n this.locations[id] = {\n left : this.noteSelected.style.left,\n top : this.noteSelected.style.top,\n isDirty : true,\n comment : this.notes[noteIndex].comment,\n fieldName : this.notes[noteIndex].fieldName, \n };\n }\n this.dirtyNotesId.add(selectedId);\n let locations = JSON.stringify(this.locations);\n if(shouldUpdateStorage) {\n if(this.storagetype === \"Device\") {\n localStorage.setItem(\"noteLocationsOf\" + this.recordId, locations);\n } else {\n if(!this.noteRecordId) {\n this.handleCreateRecord();\n }\n let record = {\n fields: {\n Id: this.noteRecordId,\n Name : this.recordId,\n recUtility360__note_data__c : locations,\n },\n };\n this.handleUpdateRecord(record);\n }\n }\n }", "function _saveLocalEdit() {\n\n // get changed vars\n var columnList = [];\n\n // changed names\n columnList.push({ column: \"playername\", value: firstname });\n columnList.push({ column: \"coachname\", value: coachname });\n columnList.push({ column: \"clubname\", value: clubname });\n\n // changed video\n if (path != viewModel.get(\"videoPath\")) {\n columnList.push({ column: \"path\", value: viewModel.get(\"videoPath\") });\n }\n columnList.push({ column: \"thumbnail\", value: thumbnail });\n\n // changed types\n if (shotTypeIndex != viewModel.get(\"shotTypeIndex\")) {\n columnList.push({ column: \"shottype\", value: viewModel.get(\"shotTypeIndex\") });\n }\n if (ratingTypeIndex != viewModel.get(\"ratingTypeIndex\")) {\n columnList.push({ column: \"ratingtype\", value: viewModel.get(\"ratingTypeIndex\") });\n }\n\n // changed ids\n columnList.push({ column: \"playerid\", value: playerId });\n columnList.push({ column: \"coachid\", value: coachId });\n columnList.push({ column: \"clubid\", value: clubId });\n\n // changed date\n var dateCheck = viewModel.get(\"date\");\n var timeCheck = viewModel.get(\"time\");\n var dateTimeCheck = dateCheck + \" \" + timeCheck;\n var curDateTime = dateTimeObj.toDateString() + \" \" + dateTimeObj.toLocaleTimeString(\"en-US\");\n if (curDateTime != dateTimeCheck) {\n columnList.push({ column: \"date\", value: new Date(dateCheck + \" \" + timeCheck) });\n }\n\n // build query\n var query = \"UPDATE \" + LocalSave._tableName + \" SET \";\n var first = true;\n var valList = [];\n for (var i = 0; i < columnList.length; i++) {\n var item = columnList[i];\n if (!first) {\n query += \", \";\n }\n query += item.column + \"=?\";\n valList.push(item.value);\n first = false;\n }\n query += \" WHERE id=?;\";\n valList.push(shotId);\n\n // run query.\n var complete = new Promise(function (resolve, reject) {\n db.queryExec(query, valList,\n function (id) {\n console.log(\"Saved new shot with id \" + id);\n resolve(id);\n },\n function (err) {\n reject(err);\n });\n });\n\n // handle query after it has completed\n complete.then(\n function (val) {\n if (page.android) {\n var Toast = android.widget.Toast;\n Toast.makeText(application.android.context, \"Shot Saved\", Toast.LENGTH_SHORT).show();\n }\n // leave page\n frameModule.topmost().goBack();\n },\n function (err) {\n _unlockFunctionality();\n });\n}", "function save() {\r\n \t\t// get busy\r\n \t\tgetBusy();\r\n \t\t\r\n \t\t/****/\r\n \t\t\r\n \t\t\r\n \t\t/*****/\r\n \t\t\r\n \t\tangular.forEach(vm.examenes, function(examen, key) {\r\n \t\t\tif(examen.create) {\r\n \t\t\t\tcreate({\r\n\t\t\t\t\t\ttmp: {\r\n\t\t\t\t\t\t\tcodigoCausaExterna: vm.examenDetail.codigoCausaExterna,\r\n\t\t\t\t\t\t\tcodigoClaseServicio: vm.examenDetail.codigoClaseServicio,\r\n\t\t\t\t\t\t\tvalorCostoEps: '',\r\n\t\t\t\t\t\t\tvalorCuotaModeradora: ''\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t_embedded: {\r\n\t\t\t\t\t\t\texamenTipo:{\r\n\t\t\t\t\t\t\t\tid: examen.tipo,\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tafiliado: {\r\n\t\t\t\t\t\t\t\tid: $stateParams.afiliadoId\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tmedico: vm.examenDetail.medico\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\texamen: {}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n \t\t\t}\r\n \t\t})\r\n\t\t\t$state.go('main.afiliado.edit.examen.list', {afiliadoId: $stateParams.afiliadoId});\r\n \t\t\r\n \t}", "finishEdit(state, { id, edits, editType }) {\n if (state.beforeEdit[id]) {\n Object.assign(state.parts[id], state.beforeEdit[id])\n remember(state, [editPart(state, id, edits, editType)])\n delete state.beforeEdit[id]\n }\n }", "save () { if (this.name) saveValue(this.name, this.items); }", "function editModel(data) {\n /// start edit form data prepare\n /// end edit form data prepare\n dataSource.one('sync', function(e) {\n /// start edit form data save success\n /// end edit form data save success\n\n app.mobileApp.navigate('#:back');\n });\n\n dataSource.one('error', function() {\n dataSource.cancelChanges(itemData);\n });\n\n dataSource.sync();\n app.clearFormDomData('edit-item-view');\n }", "function editSave() {\n if (document.getElementById('edit_input').value == \"\") {\n DOM.Modal.Close('edit_modal');\n State.Reset();\n return;\n }\n // check whether we're editing or adding\n if (State.Adding.Get()) {\n // the temporary array is necessary, otherwise the array can't be read/written properly\n var tempTracks = [];\n var desiredLocation;\n // determine the array index where the track should be stored\n if (State.Adding.Above.Get()) {desiredLocation = State.Editing.Get()-1}\n if (State.Adding.Below.Get()) {desiredLocation = State.Editing.Get()}\n // if neither add above or add below is specified, it will simply be appended\n if(!State.Adding.Above.Get() && !State.Adding.Below.Get()) {desiredLocation = Data.Tracks.length}\n // iterate through the tracks array\n // shift all entries after the desired location down by one\n for (let i = 0; i < Data.Tracks.length; i++) {\n if (i >= desiredLocation) {\n tempTracks[i+1] = Data.Tracks[i];\n }\n // keep all entries before the desired location\n else {tempTracks[i] = Data.Tracks[i];}\n }\n // assign the added track to the \"now free\" index\n tempTracks[desiredLocation] = document.getElementById('edit_input').value;\n // apply the temporary array\n Data.Tracks = tempTracks;\n }\n // apply the edited value to the original value in the array\n else {\n Data.Tracks[State.Editing.Get()-1] = document.getElementById('edit_input').value;\n }\n // close the modal and reset all the flags\n DOM.Modal.Close('edit_modal');\n State.Reset();\n // refresh the UI\n DOM.UI.Update();\n}", "@action.bound saveSelectedModelIndex(idx) {\n this.selectedOutput.frequentist.selected.model_index = idx === -1 ? null : idx;\n }", "save(form, key) {\n form.validateFields((error, row) => {\n if (error) {\n return;\n }\n const newData = [...this.state.dataSource];\n const index = newData.findIndex(item => key === item.key);\n if (index > -1) {\n const item = newData[index];\n newData.splice(index, 1, {\n ...item,\n ...row\n });\n this.setState({ dataSource: newData, editingKey: \"\" ,disableButton:false});\n } else {\n newData.push(row);\n this.setState({ dataSource: newData, editingKey: \"\",disableButton:false });\n }\n });\n }", "onAfterSaveCell(row, cellName, cellValue) {\n this.id = row.id;\n this.updatingButtonOnSaveCell(this.id,row.pushedToStage);\n var newValue = ({\n id: this.id,\n defaultShipMethodId: row.defaultShipMethodId,\n shipMethodName: row.shipMethodName,\n shippingMethodServiceCode: row.shippingMethodServiceCode\n })\n alert(`Sucessfully saved the value!`);\n return this.UpdatingData(newValue);\n }", "edit_apply(task_id, taskNewTitle) {\n Tasks\n .update({\n '_id': task_id\n }, {\n $set: {text: taskNewTitle},\n });\n\n\n this.task_to_change = \"\"; // reset input clicked (close input edit)\n }", "save(obj,index){\n \t//const length = this.state.participant.length;\n\n \t// You would want to check the content of your control box\n \t// if actually contains the right content after edit.\n \t// it makes sense, isn't it?\n\t_.each(this.state.participant,function(res,i){\n\t\tif(res.id === index && obj.fullname.length !== 0 && \n\t\t\tobj.email.length !== 0 && obj.phonenumber.length !== 0 \n\t\t\t&& obj.email.match(/@\\w+.\\w+$/) )\n\t\t{\n\t\t\tthis.state.participant.splice(i,1,obj);\n\t\t}\n\n \t}.bind(this));\n \t//this.state.edittable = -1;\n \tthis.setState({participant:this.state.participant, edittable:-1});\n\t \t\n \t\n }", "function handleEditorSave(pipeline, actionId, formFields) {\n var currentStep = wf.fetchStep(wf.actionIdToStep(actionId), pipeline);\n var edModule = steps[currentStep.type];\n if (edModule.readChanges(actionId, currentStep)) {\n console.log(\"applied changes for \" + actionId);\n writeOutChanges(pipeline, formFields);\n }\n}", "function editActiveRecord(newRecord) {\n\t\tconst newData = newRecord ? [...data] : []\n\t\t\n\t\tif(!options.primaryKey){console.error('No primary key set for this dataset.')}\n\t\t\n\t\tconst activeIndex = data.findIndex(r => r[options.primaryKey] == activeRecord[options.primaryKey])\n\t\t\n\t\t//if you call this function without passing a new record, the record is deleted\n\t\tif(newRecord && activeIndex > -1){\n\t\t\tnewData[activeIndex] = newRecord\n\t\t\tsetActiveRecord(newRecord)\n\t\t}else{\n\t\t\tdata.forEach((r, idx)=>{\n\t\t\t\tif(idx !== activeIndex){\n\t\t\t\t\tnewData.push(r)\n\t\t\t\t}\n\t\t\t})\n\t\t\tsetActiveRecord({})\n\t\t}\n\t\t\n\t\tsetData(newData)\n\t}", "function saveEditedText(blockId) {\n let expandedDiv = document.getElementById('expanded-edit-text-' + blockId)\n let value = document.getElementById('input-edit-text-' + blockId);\n\n // Make sure the block's input area exists (value), and the expanded div is not hidden\n if (!value || expandedDiv.classList.contains('hidden')) {\n return;\n }\n\n that.lockEditor();\n\n value = value.value;\n\n console.log(value);\n if (value.length > 1000) {\n return;\n }\n // sanitize this?\n collapseEditText(blockId, value);\n\n that.changeTextContent(blockId, value)\n\n\n }", "function editItem(id) {\n\t\t[...todo].map((item) => {\n\t\t\tif (item.id === id) {\n\t\t\t\tfetch(`http://127.0.0.1:3010/tasks/${id}`, {\n\t\t\t\t\tmethod: 'PUT',\n\t\t\t\t\theaders: { 'Content-Type': 'application/json' },\n\t\t\t\t\tbody: JSON.stringify({ id: item.id, text: editText, completed: item.completed, tag: item.tag, lastMod: new Date().getTime(), displayDate: new Date().toLocaleString(), outOfTime: item.outOfTime, alarm: item.alarm })\n\t\t\t\t}).then((resp) => resp.json())\n\t\t\t\t\t.then((data) => { console.log(data) });\n\t\t\t\twindow.location.reload()\n\n\t\t\t}\n\t\t\treturn item\n\t\t})\n\t\tsetEdit(null)\n\t\tsetEditText('')\n\t}", "async save() {\n // Check if anything has changed or stop here.\n const originData = await loadDataObject(this.dataKey)\n\n if (this.data === originData) {\n console.log('Nothing changed here for ' + this.dataKey)\n return\n }\n\n // Convert the modified data for the backend.\n const convertedData = await convertNewData(\n this.dataKey,\n JSON.parse(JSON.stringify(this.data))\n )\n\n // Update the data on the backend.\n try {\n await ApiConnector.update(this.dataKey, convertedData)\n } catch (err) {\n // TODO: Show the error to the user.\n console.log('Message: ' + err.message)\n }\n }", "editBillItem({state, commit}, {id, editedIndex, item}) {\n let ledger = getCsvLedgerById(state, id);\n if (ledger) {\n commit('updateCsvLedgersBill', {ledger, editedIndex, item});\n commit('setMonthTable',{ledger});\n commit('pushToSnackBarQue', { text: 'Bill Editing completed', color: 'success'});\n } else {\n commit('pushToSnackBarQue', { text: 'Bill Editing failed', color: 'error'});\n }\n\n }", "function save(state, data) {\n console.log('saving...');\n console.log('who: ' + state.who());\n console.log('when: ' + state.when());\n console.log('text: ' + state.text());\n console.log('tags: ' + state.tags());\n console.log('last transaction: ' + state.txId());\n state.txId.set(state.txId() + 1);\n console.log('new transaction: ' + state.txId());\n}", "async save(isCreated){\n \n let sql = '';\n // insert\n if(isCreated){\n \n sql = `INSERT INTO ${this.tableName} (tenTheLoai,moTa) VALUES ('${this.columns.tenTheLoai}','${this.columns.moTa}')`;\n try {\n let results = await database.excute(sql);\n this.id = results.insertId;\n } catch (error) {\n throw error;\n }\n }\n\n // update\n else{\n sql = `UPDATE ${this.tableName} SET moTa='${this.columns.moTa}',tenTheLoai='${this.columns.tenTheLoai}' `+\n `WHERE id = ${this.id}`;\n try {\n let rs = await database.excute(sql);\n this.id = rs.id; \n } catch (error) {\n throw error;\n }\n }\n }", "save() {\n this._requireSave = true;\n }", "async function saveButton(e) {\n // localStorage.setItem(\"code\", editor.userCode);\n e.preventDefault();\n\n console.log(\"edit code id is: \", editCodeId);\n const { _id } = await userAPI.getUserId(sub);\n console.log(\"User is:\", _id)\n\n try {\n if (editCodeId.codeId === \"\") {\n \n const codeBlock = {\n author: _id,\n code: editor.userCode,\n title: titleInput.codeTitle,\n isPrivate: isPrivate,\n };\n\n const newCodeBlock = await codeBlockAPI.saveCodeBlock(\n codeBlock\n );\n setCodeSnips([...codeSnips, newCodeBlock]);\n } else if(editCodeId.authorId !== _id ){\n // console.log(\"I made it to the specified area\")\n\n const codeBlock = {\n author:editCodeId.author,\n title: titleInput.codeTitle,\n isPrivate: isPrivate,\n dateModified: new Date(),\n isCloned:true,\n originalId:editCodeId.codeId,\n dateCloned: new Date(),\n code: editor.userCode\n }\n // console.log(\"codeBlock from specificied area is: \", codeBlock)\n\n const clonedBlock = await codeBlockAPI.saveCodeBlock(codeBlock)\n\n // console.log(\"newCodeBlock is: \", clonedBlock)\n }else{\n const codeBlockId = editCodeId.codeId;\n const authorId = await userAPI.getUserId(sub);\n\n const codeBlock = {\n author: authorId,\n code: editor.userCode,\n title: titleInput.codeTitle,\n isPrivate: isPrivate,\n dateModified: new Date(),\n };\n\n // console.log(\"codeblock is: \", codeBlock);\n\n const updatedCodeBlock = await codeBlockAPI.updateCodeBlock(\n codeBlockId,\n codeBlock\n );\n // console.log(\"updated code block is: \", updatedCodeBlock);\n }\n } catch (err) {\n console.log(err);\n }\n\n seteditCodeId({ codeId: \"\" });\n }", "function save(model) {\n // who knows what this does\n }", "function save_history () {\n\tvar ds = currHds();\n\tedit_history [edit_history_index] = JSON.stringify(ds.toJSON());\n}", "async save() {\n return;\n }", "function editTrack(element, id) {\n document.getElementById('edit_input').value = Data.Tracks[id-1];\n State.Editing.Set(id);\n DOM.Modal.Open('edit_modal');\n document.getElementById('edit_input').focus();\n}", "edit() {\n this._enterEditMode();\n }", "markChanged() { \n if (this._lastChangeId >= Number.MAX_SAFE_INTEGER) {\n this._lastChangeId = 1;\n }\n else {\n ++this._lastChangeId; \n }\n }", "_afterPost (id) {\n if(id) {\n this._dirty = false;\n this.transitionTo('doc', {id: id});\n }\n }", "function editStock(id) {\n changeStock(id, document.getElementById(\"stock_change\").value);\n menuInfo(id);\n showMenu(lastMenu);\n showOrder(currentTableID);\n}", "save() {\n this._mutateModel();\n\n this._super(...arguments);\n }", "triggerUpdate() {\n let fileId = this.fileNode.id\n this.context.editorSession.transaction((tx) => {\n tx.set([fileId, '__changed__'], '')\n }, { history: false })\n }", "function save() {\n\t\tdocument.getElementById(\"mySavedModel\").value = myDiagram.model.toJson();\n\t\tmyDiagram.isModified = false;\n\t}", "update(dt) {\n logID(1007);\n }", "function EditLogItemOverwrite () {}", "edit_task(task_id) {\n this.task_to_change = task_id;\n console.log(\"EDIT ? : \", task_id);\n }", "edit() {\n if (this.valid && this.changed) {\n\n ipcRenderer.send('studentUpdate', {\n id: this.id,\n fullName: this.name.value,\n socialID: this.sid.value,\n parentsName: this.parentName.value,\n parentNumber: this.parentPhone.value,\n sex: this.sex.value,\n phoneNumber: this.phone.value,\n birthDate: `${this.birthDate.year.value}/${this.birthDate.month.value}/${this.birthDate.day.value}`,\n address: this.address.value\n })\n\n this.changed = false\n }\n }", "function saveEditedTaskButtonHandler(obj)\n{\n // first: grab the task ID and data\n const row = getGrandparent($(obj));\n const taskType = getRowsTable(row);\n const taskID = getSavedTaskID(row);\n const taskData = getNewTaskData(row);\n const taskObject = buildTaskData(taskData[0], taskData[1], taskData[2], taskData[3], taskData[4]);\n // save data to the DOM\n saveTaskData(taskID, taskObject);\n // update the task table\n updateTask(row, taskObject);\n saveToEdit($(obj), $(obj).parent());\n}", "saveContact() {\n const contact = this.getContact();\n if (contact.isNew() || contact.isDirty()) {\n contact.save();\n }\n }", "function save (id) {\n console.log('save - id', id);\n // find record\n image.update({_id: id}, {temporary: 0}, function (err, i) {\n if(err) { console.log (err); }\n console.log(i);\n });\n}", "function saveChanges() {\n ctrl.showSuccess = false;\n ctrl.showError = false;\n var url = [\n refstackApiUrl, '/products/', ctrl.version.product_id,\n '/versions/', ctrl.version.id ].join('');\n var content = {'cpid': ctrl.version.cpid};\n $http.put(url, content).success(function() {\n // Update the original version object.\n version.cpid = ctrl.version.cpid;\n ctrl.showSuccess = true;\n }).error(function(error) {\n ctrl.showError = true;\n ctrl.error = error.detail;\n });\n }", "function saveRecord()\r\n{\r\n /* On save record:\r\n\r\n\t- PURPOSE\r\n\r\n\r\n\r\n\t FIELDS USED:\r\n\r\n\t\t--Field Name--\t\t\t--ID--\t\t--Line Item Name--\r\n\r\n\r\n */\r\n\r\n\r\n // LOCAL VARIABLES\r\n\r\n\r\n\r\n // SAVE RECORD CODE BODY\r\n\r\n\r\n\treturn true;\r\n\r\n}", "handleEditTask (task_id, new_task_name) {\n this.model.editTask(task_id, new_task_name);\n }", "save() {\n if ((performance.now() - this.lastchange) < 1000) return;\n this.lastchange = performance.now();\n var path = this.section();\n this.modules[path[path.length - 2]].class().save(function (id) {\n if (path.length > 2) {\n if (path[path.length - 1] != 0) {\n for (var i = path.length - 4; i >= 0; i = i - 2) {\n this.modules[path[i]].class().refresh(path[path.length - 2], id);\n }\n } else { // If new one is created refresh only parent module\n this.modules[path[path.length - 4]].class().refresh(path[path.length - 2], id);\n }\n ui.force = true;\n window.history.go(-1);\n } else {\n if (path[path.length - 1] < 1) {\n path[path.length - 1] = id\n this.replaceSection(path);\n }\n\n this.animationStart = performance.now();\n this.dismissAnimation();\n\n setTimeout(function () {\n this.onSection();\n this.main.class().see(id);\n }.bind(this), this.animationTime);\n }\n }.bind(this));\n }", "async editItemSave(id, title) {\n title = title.trim();\n\n if (title.length !== 0) {\n await this.model.update(id, {title: title}, () => {\n this.view.render('editItemDone', { id: id, title: title });\n });\n } else {\n await this.removeItem(id);\n }\n }", "handleModification(event) {\n var num = event.currentTarget.id;\n this.setState({ modifyID: num });\n history.push(\"/main/clients/modif/\" + num);\n }", "function commitEdit($editable, field, is_json) {\n var field = field? field : \"\";\n var parent_field;\n var value;\n var is_json = is_json? is_json : false;\n\n var result = getUnsavedValue($editable, field, is_json);\n\n field = result.field;\n value = result.value;\n is_json = result.is_json;\n parent_field = result.parent_field;\n\n var live_data = (ia_data.live[field] && is_json)? JSON.stringify(ia_data.live[field]) : ia_data.live[field];\n\n console.log(\"After getUnsaved... \" + field + \" \" + value);\n console.log(\"Live data: \" + live_data);\n console.log(\"Live data without JSON \" + ia_data.live[field]);\n if (field && (live_data != value)) {\n if (parent_field) {\n autocommit(parent_field, value, DDH_iaid, is_json, field);\n } else {\n // Ensure name has always a value\n if (value || (field !== \"name\")) {\n autocommit(field, value, DDH_iaid, is_json);\n }\n }\n } else {\n if (field === \"developer\" && ia_data.permissions && ia_data.permissions.admin) {\n commitEdit($(\"#producer-input\"));\n } else if (!$(\"#ia-single--details .\" + field).length) {\n keepUnsavedEdits(field);\n }\n }\n }", "handleSaveChange(event) {\n let data= Object.assign({}, this.state.dataConfig);\n api.modifyStation(data._id, data, (err, result) => {\n if (err) {\n Notification(\n \"error\",\n \"Error\",\n err.data === undefined ? err : err.status + \" \" + err.data._error_message,\n );\n } else {\n let tmp = {}\n tmp['_id'] = result._id;\n tmp['seed'] = result.seed; \n let temp = Object.assign({}, this.state.temp); \n temp.seed = tmp\n this.setState({temp: temp}) \n \n // // --------sau khi thay doi va update ok\n Notification(\"success\", \"Edit Station\", \"Edit station is successfully\");\n }\n });\n }", "function handleEditRow(id){\n\n // show hidden section to update\n const updateSection = document.querySelector('#update-section');\n updateSection.hidden = false;\n\n // add the button data-id\n document.querySelector('#update-row-btn').dataset.id= id;\n const updateNameInput = document.querySelector('#update-name-input');\n updateNameInput.focus();\n\n}", "edit() {\n }", "function add_and_save(id) {\n retrieve_item();\n // console.log(qty);\n qty[id]++;\n //console.log(qty);\n save_item();\n}", "function handleSave(e) {\r\n let target = e.target,\r\n query = target.dataset.query;\r\n\r\n if (query) {\r\n switch (query) {\r\n case \"saveSetting\": {\r\n let settings = list.map((item) => {\r\n return item.value;\r\n });\r\n\r\n settings.push(0); //current iteration\r\n\r\n Firebase.setValue(settings, \"settings\").then(() => {\r\n sessionStorage.setItem(\"isNewUser\", false);\r\n //Notification().showMessage(\"success\", \"Successfully saved!\");\r\n window.location.hash = \"#task-list\";\r\n });\r\n\r\n break;\r\n }\r\n }\r\n }\r\n }", "function select_pond_to_edit(id) {\n id_pond = id;\n is_editable = true;\n\n var db = window.openDatabase(db_name, db_version, db_name, 200000);\n db.transaction(get_pond_from_db, errorDB);\n window.location.href = \"#modificarPoza\";\n}", "function editNote(index){\n let saveindex = document.getElementById('saveindex')\n let saveBtn = document.getElementById('saveBtn')\n let addBtn = document.getElementById('addBtn')\n saveindex.value = index;\n let notes = localStorage.getItem('notes');\n let notesObj = JSON.parse(notes);\n addTitle.value = notesObj[index][0];\n addTxt.value = notesObj[index][1];\n addBtn.style.display=\"none\";\n saveBtn.style.display=\"block\";\n }", "function saveCharacterEdits(){}", "function saveNote() {\n var sText = document.getElementById('note_area').value;\n\n if (oSelectedNote == null) {\n note = new Note();\n note.sNote = sText;\n\n oData.jsFormula.addNote(note);\n\n oNotesTable.row.add([\n note.nuNote,\n note.iIdNote,\n note.sNote\n ]).draw( false );\n }\n else {\n oData.jsFormula.getNote(oSelectedNote.nuNote).sNote = sText;\n $('#notes_table').dataTable().fnUpdate(sText , oSelectedNote.nuNote, 2);\n }\n\n initNote();\n}", "_applyModelId(value, old) {\n if (value) {\n this.getStateManager().setState(\"modelId\", value);\n } else {\n this.getStateManager().removeState(\"modelId\");\n }\n }", "function editNote(index){\n let saveindex = document.getElementById('saveindex')\n let saveBtn = document.getElementById('saveBtn')\n let addBtn = document.getElementById('addBtn')\n saveindex.value = index;\n let notes = localStorage.getItem('notes');\n let notesObj = JSON.parse(notes);\n addTitle.value = notesObj[index].title;\n addTxt.value = notesObj[index].text;\n addBtn.style.display=\"none\";\n saveBtn.style.display=\"block\";\n }", "function saveTodo() {\n var objectStore = db.transaction([\"todos\"], \"readwrite\").objectStore(\"todos\");\n if (editFlag == 1) {\n var request = objectStore.get(editTodoId);\n request.onerror = function(event) {\n console.log(\"getting previous todo failed.\", error);\n };\n request.onsuccess = function(event) {\n var altTodo = request.result;\n altTodo.title = document.getElementById(\"todoText\").value;\n altTodo.due = dueDate;\n var updateRequest = objectStore.put(altTodo);\n updateRequest.onerror = function(event) {\n console.log(\"updating todo failed.\", event);\n };\n updateRequest.onsuccess = function() {\n console.log(\"todo changed successfully\");\n editFlag = 0;\n document.getElementById(\"todoText\").value = \"\";\n textForm.classList.add(\"hidden\");\n todoStage.classList.add(\"hidden\");\n dateDis.classList.add(\"hidden\");\n showAllLists();\n refreshTodoList();\n };\n };\n }\n else {\n newTodo = new Todo();\n newTodo.due = dueDate;\n newTodo.title = document.getElementById(\"todoText\").value;\n newTodo.done = \"no\";\n newTodo.folder = \"Personal\";\n var request = objectStore.add(newTodo);\n request.onsuccess = function(event) {\n console.log(\"New item added/changed.\");\n document.getElementById(\"todoText\").value = \"\";\n textForm.classList.add(\"hidden\");\n todoStage.classList.add(\"hidden\");\n dateDis.classList.add(\"hidden\");\n showAllLists();\n refreshTodoList();\n };\n request.onerror = function(event) {\n console.log(\"error adding new todo\", event);\n };\n }\n}", "function handleChange(id){\n setTodos(\n todos.map(todo =>{\n if(todo.id === id){\n todo.completed = !todo.completed;\n }\n return todo;\n })\n );\n\n console.log(\"geklikt \" + id);\n }", "doAutoSave() {\n }", "save() {\n this.db.write();\n }", "save() {\n this.tf.push(lastElement(this.tf).clone());\n this.context.save();\n }", "setPostEditId(id){\n localStorage.setItem(\"posteditid\",id);\n localStorage.setItem(\"editidmode\",true);\n }" ]
[ "0.70907646", "0.6938121", "0.68092304", "0.6605289", "0.6424429", "0.63699573", "0.63286257", "0.6288464", "0.62252146", "0.61834395", "0.61721957", "0.6157781", "0.61292386", "0.61203444", "0.6114695", "0.6099024", "0.6097203", "0.6096143", "0.60840994", "0.60575503", "0.60521114", "0.6020525", "0.60189235", "0.6017507", "0.6009225", "0.59846914", "0.59832823", "0.59744906", "0.5954067", "0.59519356", "0.594165", "0.593235", "0.59227383", "0.5922191", "0.5913183", "0.59080005", "0.5902035", "0.59003043", "0.5891323", "0.58754003", "0.5875115", "0.5872506", "0.587247", "0.5860613", "0.5855533", "0.5853165", "0.5852362", "0.58466446", "0.58429074", "0.5841367", "0.5837047", "0.58341783", "0.58278656", "0.58235574", "0.5813438", "0.5805703", "0.5804872", "0.5798234", "0.5793395", "0.5790182", "0.5787846", "0.5787233", "0.5783287", "0.5780623", "0.57732123", "0.57637495", "0.5758702", "0.5757477", "0.5755396", "0.5748741", "0.5748182", "0.5737326", "0.573148", "0.5726525", "0.57258224", "0.5720218", "0.57180107", "0.57119346", "0.5711878", "0.5710877", "0.570942", "0.570784", "0.57077754", "0.5706984", "0.57007754", "0.5693549", "0.56885016", "0.5687347", "0.5684942", "0.56834686", "0.5682957", "0.5677679", "0.5676479", "0.56756586", "0.5674029", "0.5660946", "0.5660581", "0.56596196", "0.56580585", "0.5653657", "0.5647994" ]
0.0
-1
Delete an element of the array
function removeItem(id) { // we search for the id var _index = -1; var _section = -1; for (var _sec in myKey.data) { for (var _item in myKey.data[_sec]["content"]) { if (myKey.data[_sec]["content"][_item]["id"] == id) { _section = _sec; _index = _item; break; } } } var _result = window.confirm("Êtes-vous sur de vouloir supprimer '"+myKey.data[_section]["content"][_index]["title"]+"' ? Cette opération est irréversible."); if (_result === true && _index != -1 && _section != -1) { // we delete the line in the array myKey.data[_section]["content"].splice(_index,1); // we serialize and then encrypt data (the whole section) var _content = JSON.stringify(myKey.data[_section]["content"]); var _data = myKey.encrypt(_content); $.ajax({ type: 'POST', url: serverUrl+"request/change_data", data: {content: _data, id: myKey.data[_section]["id"], user: myKey.user, key: myKey.key}, success: success, error: serverError }); // delete DOM $("#row_"+id).remove(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "DeleteArrayElementAtIndex() {}", "function DeleteArrayElement(array, x) {\n var i = 0;\n while (i < array.length && array[i] != x)\n i++;\n array.splice(i, 1);\n}", "function deleteElement(someArr) {\r\nconsole.log(someArr.length);\r\ndelete someArr[2];\r\nconsole.log(someArr.length);\r\n}", "static removeFromArray(array, element) {\n\t\tconst index = array.indexOf(element);\n\t\tarray.splice(index, 1);\n\t}", "function delElement(array,e){\n newArray = [];\n for(i=0; i<array.length; i++){\n if(e !== array[i]){\n newArray[newArray.length] = array[i];\n }\n }\n return newArray\n}", "function removeElement(array, elem) {\r\n var index = array.indexOf(elem);\r\n if (index > -1) {\r\n array.splice(index, 1);\r\n }\r\n}", "delete(element) {\n this.arraySet = this.arraySet.filter(el => el !== element);\n }", "function remove(array, elem) {\n\t var i = array.indexOf(elem);\n\t if (i !== -1) {\n\t array.splice(i, 1);\n\t }\n\t}", "function arrayRemove(array, element) {\n var index = array.indexOf(element);\n if (index > -1) {\n array.splice(index, 1);\n }\n }", "function remove(arr, elem){\n let index = arr.indexOf(elem);\n if(index >= 0){\n delete arr[index];\n }\n}", "function deleteElement(someArr){\n console.log(someArr.length);\n delete someArr[2];\n console.log(someArr);\n console.log(someArr.length);\n}", "function removeElement(array, el) {\n var index = array.indexOf(el);\n if (index > -1) {\n array.splice(index, 1);\n }\n}", "function remove(array, elem) {\r\n var i = array.indexOf(elem);\r\n if (i !== -1) {\r\n array.splice(i, 1);\r\n }\r\n}", "function remove(array, elem) {\n var i = array.indexOf(elem);\n\n if (i !== -1) {\n array.splice(i, 1);\n }\n}", "function f() { delete arr[1]; }", "function remove(array, elem) {\n var i = array.indexOf(elem);\n if (i !== -1) {\n array.splice(i, 1);\n }\n}", "function remove(array, elem) {\n var i = array.indexOf(elem);\n if (i !== -1) {\n array.splice(i, 1);\n }\n}", "function remove(array, elem) {\n var i = array.indexOf(elem);\n if (i !== -1) {\n array.splice(i, 1);\n }\n}", "function remove(array, elem) {\n var i = array.indexOf(elem);\n if (i !== -1) {\n array.splice(i, 1);\n }\n}", "function remove(array, elem) {\n var i = array.indexOf(elem);\n if (i !== -1) {\n array.splice(i, 1);\n }\n}", "function remove(array, elem) {\n var i = array.indexOf(elem);\n if (i !== -1) {\n array.splice(i, 1);\n }\n}", "function remove(array, elem) {\n var i = array.indexOf(elem);\n if (i !== -1) {\n array.splice(i, 1);\n }\n}", "function remove(array, elem) {\n var i = array.indexOf(elem);\n if (i !== -1) {\n array.splice(i, 1);\n }\n}", "function remove(array, elem) {\n var i = array.indexOf(elem);\n if (i !== -1) {\n array.splice(i, 1);\n }\n}", "function remove(array, elem) {\n var i = array.indexOf(elem);\n if (i !== -1) {\n array.splice(i, 1);\n }\n}", "function removeItem(array, element) {\n\t const index = array.indexOf(element);\n\t \n\t if (index !== -1) {\n\t array.splice(index, 1);\n\t }\n\t}", "function removeElement(myArray) {\n // zde pracuju s objektem, ktery byl funkci predan a pokud\n // to je reference na jinny objekt tak zmenim ten puvodni (input)\n myArray.pop();\n}", "function remove(arr, element) {\n arr.splice(arr.indexOf(element), 1);\n}", "function removeElement(array,element) {\n\n var index = array.indexOf(element);\n if (index > -1) {\n array.splice(index, 1);\n }\n return array;\n\n}", "function array_delete($idx,$array) { \n unset($array[$idx]); \n return (is_array($array)) ? array_values($array) : null; \n}", "function removeFromArray(arr, elt) {\n for (var i = arr.length - 1; i >= 0; i--) {\n if (arr[i] == elt) {\n arr.splice(i, 1);\n }\n }\n }", "function deleteEl(array, e) {\n var result = [];\n for (var i = 0; i < array.length; i++) {\n if (array[i] !== e) {\n result[result.length] = array[i];\n }\n }\n return result;\n}", "function remove(array,element){\n return array.filter(e =>e !== element)\n}", "function remove(array, element) {\n\t\tconst index = array.indexOf(element);\n\t\tif (index !== -1) {\n\t\t\tarray.splice(index, 1);\n\t\t}\n\t\treturn array;\n\t}", "function removeElement(newArr) {\n newArr.pop();\n}", "function removeElement(arr, element){\n for(let i = 0; i < arr.length; i++){\n if(arr[i] === element) arr.splice(i, 1);\n }\n return arr;\n}", "function removeItemFromArray(array, element) {\r\n var index = array.indexOf(element);\r\n if (index !== -1) { array.splice(index, 1); }\r\n}", "function removeFromArray(arr, elt) {\n // Could use indexOf here instead to be more efficient\n for (var i = arr.length - 1; i >= 0; i--) {\n if (arr[i] == elt) {\n arr.splice(i, 1);\n }\n }\n }", "function remove(array, element) {\n const index = array.indexOf(element);\n if (index !== -1) {\n \tarray.splice(index, 1);\n }\n}", "function removeFromArray(arr, elt)\n{\n // Could use indexOf here instead to be more efficient\n for (var i = arr.length - 1; i >= 0; i--)\n if (arr[i] == elt)\n arr.splice(i, 1);\n}", "function removeElement(array, value) {\n var arr = array;\n var index = arr.indexOf(value);\n arr.splice(index, 1);\n return arr;\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 }", "function removeFromArray(array, element) {\n\t var index = array.indexOf(element);\n\t if (index !== -1) {\n\t array.splice(index, 1);\n\t }\n\t}", "function remove_fa(array,element){\n\tif(in_array(array,element)){\n\t\tindex=array.indexOf(element);\n\t\tarray.splice(index,1);\n\t};\n}", "function removeArrayElement(arr, element) {\n return arr.filter(e => e !== element)\n}", "function delArrayItem(arr, item)\n{\n var offset = null;\n\n for (var i in arr) {\n if (arr[i] == item) {\n offset = i;\n }\n }\n\n if (offset != null) {\n arr.splice(offset, 1);\n }\n\n return arr;\n}", "function removeElement(element, array) {\n array.splice($.inArray(element, array), 1);\n}", "function remove(array, element) {\n\treturn array.filter(el => el !== element);\n}", "function removeElement(index , array){\n for(let i = index ; i<array.length-1 ; i++){\n array[i] = array[i+1];//shifting to left to override element\n }\n array.pop(); //reducing size of array\n}", "function removeElement(array, element) {\n for (var ind = 0; ind < array.length; ind++) {\n if (array[ind] === element) {\n array.splice(ind, 1);\n --ind;\n }\n }\n}", "function arrayRemove(array, value) {\n var index = array.indexOf(value);\n if (index > -1) {\n array.splice(index, 1);\n }\n }", "function removeElementFromArray(array, element) {\n\tconst index = array.indexOf(element)\n\tif (index > -1) {\n\t\tarray.splice(index, 1)\n\t}\n\n\treturn array\n}", "function deleteElement(arr, pos) {\r\n for (let i = pos; i < arr.length; i++){\r\n arr[i] = arr[i+1]\r\n }\r\n return arr\r\n}", "function removeAt(arr, index) {\n arr.splice(index, 1);\n console.log(arr);\n}", "function remove(arr, item){\n\t var idx = indexOf(arr, item);\n\t if (idx !== -1) arr.splice(idx, 1);\n\t }", "function arydel(ary, del) {\n\t\tif(isAry(del)) {\n\t\t\tfor(var i = 0; i < del.length; i++) {\n\t\t\t\tarydel(ary, del[i]);\n\t\t\t}\n\t\t} else {\n\t\t\tfor(var j = 0; j < ary.length; j++) {\n\t\t\t\tif(ary[j] == del) {\n\t\t\t\t\tary.splice(j, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ary;\n\t}", "function deleteFromArray(element, vect) {\n\tvar index = getElementIndex(element, vect);\n\tvar new_array = vect.splice(index,1);\n\treturn new_array;\n}", "function removeFromArray(arr,x){\n\tfor (i=0 ; i<arr.length;i++){\n\t\tif(arr[i] == x){\n\t\tarr.splice(i,1);\n\t\ti = i-1;\n\t\t} \n\t}\n\treturn arr;\n}", "delete(element)\n {\n this.elements.splice(this.elements.indexOf(element), 1);\n }", "function destroyer(arr) {\n // var args = Array.prototype.slice.call(arguments);\n var args = [...arguments]\n args.splice(0,1)\n for (var i = 0; i < arr.length; i++) {\n for (var j = 0; j < args.length; j++) {\n if (arr[i] === args[j]) {\n delete arr[i];\n }\n }\n }\n return arr.filter(ele=>(ele));\n }", "function remove$1(arr,item){if(arr.length){var index=arr.indexOf(item);if(index>-1){return arr.splice(index,1);}}}", "function remove(arr, item){\n var idx = indexOf(arr, item);\n if (idx !== -1) arr.splice(idx, 1);\n }", "function deleteFromBIGArray(index){\n BIGArray.splice(index, 1);\n console.log(BIGArray);\n }", "function deleteOne(array, matchFn) {\n const i = array.findIndex(e => matchFn(e))\n if (i !== -1) array.splice(i, 1)\n return array\n}", "function arrayRemove(arr, elem) {\r\n var x, newArr = new Array();\r\n for (x in arr) {\r\n if (arr[x] != elem) {\r\n newArr.push(arr[x]);\r\n }\r\n }\r\n return newArr;\r\n }", "function removeFromArray() {\r\n \"use strict\";\r\n var j;\r\n for (j = 0; j < noteArray.length; j += 1) { //I need to find which position in array ocuppies the postIt removed. (id of the div = idVirtualproperty); \r\n if (noteArray[j].idVirtual == idDeleted) {\r\n console.log(j);\r\n noteArray.splice(j, 1);\r\n }\r\n }\r\n saveToLocalStorage(noteArray); //EXPLICAR POR QUE ALMACENO TODO Y NO UNA A UNA\r\n}", "function Task2(array,index){\n array.splice(index,1);\n}", "function deleteTodoItem(todoArray){\n todoArray.pop();\n}", "function erasePoint(array, xVal, yVal,size){\n for(let i = -1; i <= 1; i++){\n for(let j = -1; j <= 1; j++){\n let index = isItemInArray(array, xVal + (size*i), yVal + (size*j));\n if (index > -1){\n array.splice(index,1);\n }\n }\n }\n }", "function removeElementFromArray(arr, element){\n // console.log('hi');\n // printPrettyArrays(arr);\n\n for(var i = 0; i < arr.length; i++){\n // console.log(\"The element is : \" + element + \" the index value is: \" + arr[i]);\n if(element == arr[i]){\n // console.log('****element and index value are equal****');\n arr.splice(i,1);\n return true; // stop looking for element, we found it!\n // printPrettyArrays(arr);\n }\n }\n\n return false;\n\n\n}", "function array_remove(array, obj) {\n index = $.inArray(obj, array);\n if(index > -1) {\n console.log(array.splice(index, 1));\n return array.splice(index, 1);\n } else {\n return array;\n }\n}", "function remove(array, item) {\n var index = _.indexOf(array, item);\n if (index >= 0) {\n array.splice(index, 1);\n }\n }", "function deleteCity(){\n\tarray.pop();\n\tconsole.log(\"City deleted! => \" + array);\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 }", "function removeFromArray(array, value) {\n for (let x = array.length - 1; x >= 0; x--) {\n if (array[x] === value) {\n array.splice(x, 1);\n }\n }\n}", "function removeFromArray(array, value) {\n for (let x = array.length - 1; x >= 0; x--) {\n if (array[x] === value) {\n array.splice(x, 1);\n }\n }\n}", "function eliminarIngredientesDelArray( arr , item){\r\n var i = arr.indexOf(item)\r\n if ( i !== -1) {\r\n arr.splice( i , 1 )\r\n }\r\n }", "function removeFromArray(ary, o) {\n var i, id = o.getSymbolElementNode().id;\n for (i = ary.length - 1; i >= 0; i--) {\n if (ary[i].getSymbolElementNode().id === id) {\n ary.splice(i, 1);\n }\n }\n }", "function removeAt(arr, idx) {\n\n }", "removeValueArray(array, element) {\n array = array.filter(e => e !== element);\n return array;\n }", "function deleteElement(array, elementToDelete) {\n if (array.length < 1 || !elementToDelete) {\n return array;\n }\n var newArray = [];\n for (var i = 0, j = 0; i < array.length; i++) {\n if (elementToDelete === array[i]) {\n delete array[i];\n }\n\n if (typeof array[i] === \"number\") {\n newArray[j] = array[i];\n j++;\n }\n }\n return newArray;\n}", "function deleteSubmissionByIndex(array, index) { \narray.splice(index,1)\n}", "function purgeitem(array, item) {\n var index = array.indexOf(item);\n if (index > -1) {\n array.splice(index, 1);\n }\n}", "function borrarDelArray(array, elemento) {\r\n for (let i = array.length - 1; i >= 0; i--) {\r\n if (array[i] == elemento) {\r\n array.splice(i, 1);\r\n }\r\n }\r\n}", "function deletePropertyFromArray(property, array) {\n array.splice(array.indexOf(getPropertyFromArray(property, array)), 1);\n }", "function deletePropertyFromArray(property, array) {\n array.splice(array.indexOf(getPropertyFromArray(property, array)), 1);\n }", "function remove(array, item) {\n var index = array.indexOf(item);\n array.splice(index, 1);\n return array\n }", "function deleteItemFromArray(array, key){\r\n\t\r\n\tfor(var i = 0; i < array.length; ++ i){\r\n\t\tif(array[i].coumnName == key){\r\n\t\t\tdelete array[i];\r\n\t\t\tarray.length -= 1;\r\n\t\t}\r\n\t}\r\n}", "function removeAt(array, idx) {\n if (idx >= array.length || idx < 0) return array;\n return array.slice(0, idx).concat(array.slice(idx + 1));\n}", "function array_delete(options) {\n\tif (!(this instanceof array_delete)) return new array_delete(options);\n\t\n\tthis._state = this._INIT;\n\t\n\t//requires arguments\n\tvar validate = require('lib/lesson/util/array_lesson_argument_validate.js');\n\tvar result = validate(options);\n\t\n\tif (!result.valid) {\n\t\tthrow new TypeError(result.msg);\n\t}\n\t\n\tthis._UI = options.UI;\n\tthis._array = options.array;\n\tthis._arrow = options.arrow;\n\t\n\tif (check.undefined(options.index) ||\n\t\toptions.index > this._array._.length ||\n\t\toptions.index > this._arrow._.index ||\n\t\toptions.index < 0\n\t\t) {\n\t\tthrow new TypeError(\"Required argument: index, should be an integer index of a current value in the array or the 'tail' index.\");\n\t}\n\tthis._index = options.index;\n\t\n\tif (check.undefined(options.value) || check.not.number(options.value)) {\n\t\tthrow new TypeError(\"Required argument: value, should be a number.\");\n\t}\n\tthis._value = options.value;\n\t\n\tthis._state = this._READY;\n}", "function remove(arr,item){if(arr.length){var index=arr.indexOf(item);if(index>-1){return arr.splice(index,1);}}}", "function remove(arr,item){if(arr.length){var index=arr.indexOf(item);if(index>-1){return arr.splice(index,1);}}}", "function removeArrayItem(arr, item){\r\n\tvar i = 0;\r\n\twhile(i < arr.length){\r\n\t\tif(arr[i] == item)\r\n\t\t\tarr.splice(i,1);\r\n\t\telse\r\n\t\t\ti++;\r\n\t}\r\n}", "function arrayMethodsWithDeletedElements() {\n\tconst arr = Array(10).map(function(x) {return 5});\n\tconsole.log(arr); // [ , , , , , , , , , ]\n\n\tconst arr2 = [1, 2, 3, 4, 5];\n\tdelete arr2[2];\n\tconsole.log(arr2.map(x=>0)); // [ 0, 0, , 0, 0 ]\n}", "immutableDelete (arr, index) {\n var i = parseInt(index, 10);\n return arr.slice(0,i).concat(arr.slice(i+1));\n }", "function removeArrayItem(arr, item) {\n var i = arr.indexOf(item);\n if (i >= 0) arr.splice(i, 1);\n}", "function removeItem(cartarray, deleteitem){\n cartarray.splice(deleteitem, 1);\n}", "function deleteName(){\n\tarray.shift();\n\tconsole.log(array);\n}", "function removeAnElementInGeneral(array, index) {\n\t// remove the element from the array at the index given\n\tarray.splice(index, 1);\n\t// return the array\n\treturn array;\n}", "arrayRemove(arr, value) {\n return arr.filter(function(ele){\n return ele != value;\n });\n }", "function removeIndex(array, index) {\n array.splice(index, 1);\n}" ]
[ "0.8455729", "0.7927629", "0.7744278", "0.77332234", "0.7622343", "0.75672406", "0.7525732", "0.7511579", "0.7483059", "0.7464343", "0.7448058", "0.7440612", "0.74392563", "0.7433575", "0.74156415", "0.7393762", "0.7393762", "0.7393762", "0.7393762", "0.7393762", "0.7393762", "0.7393762", "0.7393762", "0.7393762", "0.7393762", "0.73336184", "0.7305375", "0.72836477", "0.727475", "0.72656244", "0.7258551", "0.72561723", "0.7239974", "0.7229153", "0.72288847", "0.72184587", "0.7212004", "0.72069675", "0.7204024", "0.71974134", "0.71756303", "0.7169687", "0.7166984", "0.7162701", "0.71611786", "0.71556133", "0.71548104", "0.71525717", "0.71489644", "0.71391505", "0.71383697", "0.7118467", "0.7111459", "0.7104495", "0.71016455", "0.709591", "0.70950484", "0.7082911", "0.7059751", "0.70538497", "0.7036705", "0.7009755", "0.7004015", "0.6990239", "0.6983377", "0.69775176", "0.6976899", "0.69698894", "0.696345", "0.69631314", "0.69623923", "0.695376", "0.6951722", "0.6950729", "0.6944581", "0.6944581", "0.6937138", "0.6932116", "0.69276124", "0.6912076", "0.6910309", "0.6905736", "0.6897361", "0.68916625", "0.68898815", "0.68898815", "0.68765265", "0.68547654", "0.6835544", "0.6829707", "0.6828967", "0.6828967", "0.682648", "0.6824343", "0.6814651", "0.6813125", "0.6810472", "0.68067914", "0.6801492", "0.68000734", "0.6799972" ]
0.0
-1
Easy API for creating new setFilters
function setFilters() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setFilters(){}", "function setFilters(){}", "function setFilters(){}", "function setFilters(){}", "function setFilters(){}", "function setFilters(){}", "function setFilters(){}", "function setFilters(){}", "function setFilters(){}" ]
[ "0.8424095", "0.8424095", "0.8424095", "0.8424095", "0.8424095", "0.8424095", "0.8424095", "0.8424095", "0.8424095" ]
0.0
-1
Implement the identical functionality for filter and not
function winnow( elements, qualifier, not ) { if ( jQuery.isFunction( qualifier ) ) { return jQuery.grep( elements, function( elem, i ) { return !!qualifier.call( elem, i, elem ) !== not; } ); } // Single element if ( qualifier.nodeType ) { return jQuery.grep( elements, function( elem ) { return ( elem === qualifier ) !== not; } ); } // Arraylike of elements (jQuery, arguments, Array) if ( typeof qualifier !== "string" ) { return jQuery.grep( elements, function( elem ) { return ( indexOf.call( qualifier, elem ) > -1 ) !== not; } ); } // Simple selector that can be filtered directly, removing non-Elements if ( risSimple.test( qualifier ) ) { return jQuery.filter( qualifier, elements, not ); } // Complex selector, compare the two sets, removing non-Elements qualifier = jQuery.filter( qualifier, elements ); return jQuery.grep( elements, function( elem ) { return ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1; } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "filter() {\n\t}", "filter() {\n\t}", "function filter() {\n \n}", "function filterFunction() {\n \n}", "function Nothing$prototype$filter(pred) {\n return this;\n }", "removeAllFilters() {}", "function noFilter(filterObj) {\n return Object.\n keys(filterObj).\n every(function (key) {\n return !filterObj[key];\n });\n }", "function noFilter(filterObj) {\n return Object.\n keys(filterObj).\n every(function (key) {\n return !filterObj[key];\n });\n }", "function noFilter(filterObj) {\n return Object.\n keys(filterObj).\n every(function (key) {\n return !filterObj[key];\n });\n }", "function noFilter(filterObj) {\n return Object.\n keys(filterObj).\n every(function (key) {\n return !filterObj[key];\n });\n }", "function compFilter(filtered){\n return function(d){\n var logical = filterProvince(d.province) &&\n filterParty(d.results[0].party) &&\n filterVoteMargin(d.voteMargin) &&\n filterRUParty(d.results[1].party) &&\n filterVoteTurnout(d[\"Percentage of Votes Polled to Registered Voters\"]) &&\n filterNARange(+d.seat.replace(/P[KPBS]-/, \"\"));\n\n if (filtered == true){\n return logical;\n }\n else {\n return !(logical);\n }\n }\n }", "@computed get filteredTodos() {\r\n var matchesFilter = new RegExp(this.filter, \"i\");\r\n //\"i\" means ignore groß und kleinschreibung\r\n return this.todos.filter(\r\n todo => !this.filter || matchesFilter.test(todo.value)\r\n );\r\n // test will test the RegExp, so this.props.store.filter will automtaticly return\r\n // the filtered Value, on the CLient Side\r\n }", "function defaultFilterFunction(thing, params, request) {\n if (Array.isArray(params.exclude) && ap.indexOf.call(params.exclude, thing.id) !== -1) {\n return false;\n }\n if (typeof params.exclude === 'string' && thing.id === params.exclude) {\n return false;\n }\n if (Array.isArray(params.only) && ap.indexOf.call(params.only, thing.id) === -1) {\n return false;\n }\n if (typeof params.only === 'string' && thing.id !== params.only) {\n return false;\n }\n return true;\n}", "function testFilter(self) {\n if (self.filters.tagOptions == \"all\") {\n return function(item) {\n console.log(\"filter run because all\");\n return true;\n }\n } else {\n return function(item) {\n console.log(\"filter run because any\");\n return true;\n }\n }\n}", "function filterNot(a,p){\n\tvar filteredElement = a.filter(isEven);\n\treturn filteredElement; //should return the array [1, 3, 5, 7, 9]\n}", "function NullFilter() {\n\t\t}", "filteredCheck() {\n const { filteredItems, localItems, localFilter } = this\n return { filteredItems, localItems, localFilter }\n }", "function vmCheckFilterForEmpty(filter) {\n\n for (var i in filter) {\n\n if (i != 'pageIndex' && i != 'pageSize') {\n\n if (filter[i])\n return false\n else\n return true\n };\n };\n }", "function filterObject(filter, type, data) { \n filter = _.filter(filter, function(item) {\n return (item !== false) ? item : false;\n }); \n if (filter.length < 1) { return data }\n return _.filter(data, function(item) {\n var boo = false;\n for(var i in filter) { \n if(_.contains(item[type], filter[i])) {\n boo = true;\n } else {\n boo = false;\n break; \n } \n }\n return (boo === true) ? item : false; \n }); \n }", "function compFilter(filtered){\n return function(d){\n // check if result array is empty\n var filt_party = (d.results.length != 0) ? filterParty(d.results[0].party) : true;\n var filt_party_ru = (d.results.length != 0) ? filterRUParty(d.results[1].party) : true;\n var filt_VM = (d.results.length != 0) ? filterVoteMargin(d.voteMargin) : true;\n var logical = filterProvince(d.Province) &&\n // filterParty(d.results[0].party) &&\n // filterVoteMargin(d.voteMargin) &&\n // filterRUParty(d.results[1].party) &&\n filt_party &&\n filt_VM &&\n filt_party_ru &&\n filterVoteTurnout(d[\"Percentage of Votes Polled to Registered Voters\"]) &&\n filterNARange(+d.seat.replace(\"NA-\", \"\"));\n if (filtered == true){\n return logical;\n }\n else {\n return !(logical);\n }\n }\n }", "function filter(array, fn) {\n let filteredArray = [];\n array.forEach(element => {\n if (!fn(element)) {\n filteredArray.push(element);\n }\n });\n console.log(filteredArray); \n}", "function Filter(method) {\n this.truthy = true;\n this.method = method;\n}", "function unifiedFilter(element, index, array) {\n var keep = actionFilter(element, index, array);\n\n if (keep) {\n keep = nameFilter(element, index, array);\n }\n controller.toggleItem($(\"#\" + element), keep ? controller.toggleOnDelay * visible.FILTER_DELAY_SCALE : controller.toggleOffDelay / visible.FILTER_DELAY_SCALE, keep);\n return keep;\n }", "function filterTwos(elem) { return elem !== 2; }", "function filterTwos(elem) { return elem !== 2; }", "function filterByMatch(event) {\n return ;\n}", "function TestFilter(){\n\t\treturn function(arr, param1, param2){\n\t\t\tconsole.log(\"filter called\");\n\t\t\tif(param1){\n\t\t\t\tvar filtered = _.select(arr, function(item) {\n\t \t\t\t\treturn item.indexOf( param1 ) !== -1;\n\t\t\t\t});\t\n\n\t\t\t\treturn filtered;\n\t\t\t} else{\n\t\t\t\treturn arr;\n\t\t\t}\n\t\t};\n\t}", "function filter(pred) {\n return function(rf) { // <- buildArray for example, but also the function in map on line 82\n return function(result, item) {\n if(pred(item))\n return rf(result, item)\n else\n return result\n }\n }\n}", "_filter (entities, params, inputSearch) {\n\t\treturn entities.filter(entity => this._entityVerify(entity, params, inputSearch))\n\t}", "function block() { return new Filter(function () { return false; }); }", "filteredCheck({ filteredItems, localFilter }) {\n // Determine if the dataset is filtered or not\n let isFiltered = false\n if (!localFilter) {\n // If filter criteria is falsey\n isFiltered = false\n } else if (looseEqual(localFilter, []) || looseEqual(localFilter, {})) {\n // If filter criteria is an empty array or object\n isFiltered = false\n } else if (localFilter) {\n // If filter criteria is truthy\n isFiltered = true\n }\n if (isFiltered) {\n this.$emit(EVENT_NAME_FILTERED, filteredItems, filteredItems.length)\n }\n this.isFiltered = isFiltered\n }", "function falsyFilter(){\nfor(var i = 0; i < mixedArray.length; i++) {\n if(mixedArray === true || mixedArray === \"true\" || mixedArray !== false)\n\t {mixedArray.slice(i, 1)}\n else return mixedArray;\n}\n}", "not() {\n\t return _register.call(this, 'not', arguments);\n\t }", "afilter (callback) {\n return this.asArray().filter(callback)\n }", "function doFilter() {\n for (var i = 0; i < items.length; i++) {\n // show all\n items[i].classList.remove('thumb--inactive');\n\n // combine filters\n // - only those items will be displayed who satisfy all filter criterias\n var visible = true;\n\n for (var j = 0; j < visibleItems.length; j++) {\n visible = visible && items[i].classList.contains(visibleItems[j]);\n }\n\n if (!visible) {\n items[i].classList.add('thumb--inactive');\n }\n }\n }", "function filterFuncOriginal(item, index, self) {\n \treturn self.indexOf(item) == index;\n\t}", "function f2() {\n bidar.serialize(obj, filter);\n\n function filter(x) {\n // An arbitrary-but-different hole.\n return { data: filter };\n }\n }", "filter(func) {\n let reArr = [];\n this.each((item) => {\n func(item) ? reArr.push(item) : null;\n });\n return new DomQuery(...reArr);\n }", "filter(func) {\n let reArr = [];\n this.each((item) => {\n func(item) ? reArr.push(item) : null;\n });\n return new DomQuery(...reArr);\n }", "function filterExample(arr) {\n const even = (num) => {\n if (num % 2 == 0) {\n return num\n }\n };\n const odd = (num) => {\n if (num % 2 != 0) {\n return num\n }\n };\n console.log(arr.filter(even));\n console.log(arr.filter(odd));\n\n}", "function filter(field, value)\n {\n \n }", "function filter(pred) {\n return function(xs) {\n return Z.filter (pred, xs);\n };\n }", "function defaultFilter$2() {\n\t return !exports.event.button;\n\t }", "function defaultFilter$2() {\n\t return !exports.event.button;\n\t }", "get filtered() {\n return this._filtered;\n }", "unfilterNoChangeLayers(){\n //get the no change status object\n let no_change_status = this.props.statuses.filter(status => status.key === 'no_change');\n //clear the filter depending on whether it is a global or country view\n let filter = (this.props.view === 'global') ? null : ['in', 'iso3', this.props.country.iso3];\n //iterate through the layers and set the filter\n no_change_status[0].layers.forEach(layer => this.map.setFilter(layer, filter));\n //\n }", "function falsyFilter(){\n for(var i = 0; i < mixedArray.length; i++){\n\tif(mixedArray[i] === false)\n {mixedArray.splice(i, 1)};\n\treturn mixedArray;\n }\n}", "function filterObjectBy(obj,objfilt){\n\n if(!objfilt){\n return true;\n } else if((Object.keys(objfilt).length === 0))\n {\n return true;\n }\n\n var res;\n\n var compareIndividual = function (valueorig,valuefilt){\n\n //console.info(\"typeof valuefilt\",typeof valuefilt);\n if (typeof valuefilt === \"string\") {//se busca sobre un array\n //console.info(\"es un string\",valueorig.toLowerCase().indexOf(valuefilt.toLowerCase()));\n //console.info(\"valueorig\",valueorig);\n if(valueorig && valueorig.toLowerCase().trim().indexOf(valuefilt.toLowerCase().trim()) > -1){\n //console.log(\"son iguales string\");\n return true;\n }\n\n\n }else if(typeof valuefilt === \"boolean\"){\n var value_orig = Boolean(valueorig);\n var value_filt = Boolean(valuefilt);\n //console.info(\"booleanos\",(value_orig === value_filt),value_orig , value_filt);\n if(value_orig === value_filt){\n return true;\n }\n\n }else if(valueorig === valuefilt){\n //console.log(\"son iguales simple\");\n return true;\n }\n //console.info(\"no son iguales\");\n return false;\n\n\n };\n\n\n for(var key in objfilt){\n //console.info(key,obj[key]);\n if(obj[key] !== undefined ){//existe la propiedad en el original\n //console.info(\"existe\",objfilt[key]);\n if (objfilt[key] instanceof Array) {//se busca sobre un array\n //console.info(\"es un array\");\n var array = objfilt[key];\n var length = array.length;\n var resArray = null;\n for (var i = 0; i < length; i++) {\n var item = array[i];\n\n var compareIndividualResult = compareIndividual(obj[key], item);\n resArray = resArray || compareIndividualResult;\n //console.info(\"resArray\",resArray,item,\"compareIndividualResult\",compareIndividualResult);\n }\n res = (res)?(res && resArray):resArray;\n //console.info(\"res\",res,objfilt[key]);\n }else{\n //console.info(\"no es un array\");\n res = compareIndividual(obj[key],objfilt[key]);\n\n }\n\n }else{\n res = false;\n\n }\n if(res){\n continue;\n\n }else{\n break;\n }\n\n }\n //console.info(\"return res\",res);\n return res || false;\n}", "runFilter(callback) {\n\n if (callback === '') {\n this.data = this.dataUntouched;\n } else {\n\n const untouched = cloneArrayOfObjects(this.dataUntouched);;\n\n this.data = untouched.filter((e) => callback(e));\n }\n\n this.settings.offset = 0;\n return this.run();\n\n }", "function filter(filter) { return new Filter(filter); }", "filterProducts() {\n // Crear copia\n let toFilter = [...this.productsArray];\n\n // Se pasa el array por todos los filtros del objeto filters\n Object.values(this.filters).forEach((filter) => {\n toFilter = filter(toFilter) || toFilter;\n });\n\n return toFilter;\n }", "function filterValues(data) \r\n{\r\n data = data.filter(isEligible);\r\n return data;\r\n}", "filterEvent(event) {\n return false;\n }", "function defaultFilter$1() {\n\t return !exports.event.button;\n\t }", "function defaultFilter$1() {\n\t return !exports.event.button;\n\t }", "function filterNoDom(n, e) {\n return isNotHidden(e) && nonWeakFilter(n, e) && shouldTraverse(e, false);\n }", "function filterCallback(pet) {\n let lessThan5 = pet.age < 5;\n let hasS = pet.name[0] == \"S\" || pet.ownerName[0] == \"S\";\n return lessThan5 && (hasS);\n}", "function objFilter(obj, callback) {\n\n}", "function defaultFilter$2() {\n return !exports.event.button;\n}", "function defaultFilter$2() {\n return !exports.event.button;\n}", "function defaultFilter$2() {\n return !exports.event.button;\n}", "function defaultFilter$2() {\n return !exports.event.button;\n}", "function defaultFilter$2() {\n\t return !exports.event.button;\n\t}", "function defaultFilter$2() {\n\t return !exports.event.button;\n\t}", "function defaultFilter$2() {\n\t return !exports.event.button;\n\t}", "function defaultFilter$2() {\n\t return !exports.event.button;\n\t}", "filterAndUpdate( callback, thisArg)\n //------------------------------------------------------------------------------------------------------\n {\n var itemsToRemove = [];\n\n this.forEach( function( item) {\n\n if ( ! callback.call(thisArg, item) ) {\n itemsToRemove.push(item);\n }\n\n }, thisArg);\n\n this.remove(itemsToRemove);\n\n return this;\n }", "function filter(el, filterFn) {\n Array.prototype.filter.call(el, filterFn);\n } //https://jsfiddle.net/w1rktecz/", "function defaultFilter$2() {\n return !exports.event.button;\n }", "setFilterToNone() {\n\t\tthis.props.setFilter(\"\", \"\");\n\t}", "function except(source, filter) {\n return source.filter(key => !filter.includes(key));\n}", "function filter(arr, fn) {\n\tlet test = [];\n\tfor(let item of arr){\n\t\tif(fn(item)){\n\t\t\ttest.push(item);\n\t\t}\n\t\n\t}\n\treturn test;\n}", "getFilteredTodos() {\r\n const {todos, filter} = this.state;\r\n switch(filter) {\r\n case 'Active':\r\n return todos.filter(todo => (todo.active));\r\n case 'Finished':\r\n return todos.filter(todo => (!todo.active))\r\n default:\r\n return todos; \r\n }\r\n }", "function defaultFilter$1() {\n\t return !exports.event.button;\n\t}", "function defaultFilter$1() {\n\t return !exports.event.button;\n\t}", "function defaultFilter$1() {\n\t return !exports.event.button;\n\t}", "function defaultFilter$1() {\n\t return !exports.event.button;\n\t}", "function defaultFilter$1() {\n return !exports.event.button;\n}", "function defaultFilter$1() {\n return !exports.event.button;\n}", "function defaultFilter$1() {\n return !exports.event.button;\n}", "function defaultFilter$1() {\n return !exports.event.button;\n}", "function notModifier (predicate) {\n return function () {\n return !predicate.apply(null, arguments);\n };\n }", "item_filter(self) {\n return function(item) {\n if (self.filters.activeGroups.length == 0 && self.filters.activeTags.length == 0) {\n // If neither group nor tag filters are set, return a filter function that\n // always returns true.\n return true;\n } else if (self.filters.activeGroups.length > 0 && self.filters.activeTags.length == 0) {\n // If only the group filter is set, return a function to check if the\n // group of an item is active\n return $.inArray(item.group_slug,self.filters.activeGroups) > -1;\n } else if (self.filters.activeGroups.length == 0 && self.filters.activeTags.length > 0) {\n // If only the tag filter is set...\n if (self.filters.tagOptions == \"all\") {\n // ...and tag options are set to match all tags, return a function to\n // filter to only items with all of the active tags applied.\n return self.filters.activeTags.every(function(element, index, array) {\n return $.inArray(element,item.tag_slugs) > -1;\n });\n } else {\n // ...and tag options are set to match any active tag, return a function\n // to filter to only items with any active tag applied.\n return self.filters.activeTags.some(function(element, index, array) {\n return $.inArray(element,item.tag_slugs) > -1;\n });\n };\n } else {\n // Both tag filters and group filters are set. Items should be filtered to\n // only those with an active group and any/all active tags, depending on\n // active tag behavior.\n var hasActiveGroup = $.inArray(item.group_slug,self.filters.activeGroups) > -1;\n if (hasActiveGroup) {\n // If the group is active, do the tag checks.\n if (self.filters.tagOptions == \"all\") {\n // Check if all tags are active\n var hasAllTags = self.filters.activeTags.every(function(element, index, array) {\n return $.inArray(element,item.tag_slugs) > -1;\n });\n return hasAllTags;\n } else {\n // Check if any tags are active\n var hasAnyTag = self.filters.activeTags.some(function(element, index, array) {\n return $.inArray(element,item.tag_slugs) > -1;\n });\n return hasAnyTag;\n }\n } else {\n // If the group is not active, don't bother with the tag checks, just\n // return false\n return false;\n }\n }\n }\n }", "function toggleFilter () {\n\t\tvar filterProp = Object.keys(vm.tp.filter());\n\t\tif (!$scope.showFilter && filterProp.length > 0) {\n\t\t\tvm.tp.filter({});\n\t\t}\n\t}", "function defaultFilter() {\n\t return !exports.event.button;\n\t }", "function defaultFilter() {\n\t return !exports.event.button;\n\t }", "function filter(filterFuncs = 'none') {\n\tctx.filter = filterFuncs;\n}", "function britainFilter(items){\n return items.currency_code !== \"USD\";\n }", "function keep() {\n\t var clean = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : filter.ignoreMissing;\n\t\n\t return function (values) {\n\t var cleanValues = clean(values);\n\t if (!cleanValues) return null;\n\t var result = first()(cleanValues);\n\t cleanValues.forEach(function (v) {\n\t if (v !== result) {\n\t return null;\n\t }\n\t });\n\t return result;\n\t };\n\t}", "function defaultFilter$1() {\n return !exports.event.button;\n }", "function myFilter(arr, f){\n let ans = [] ;\n\n for(let i = 0; i < arr.length; i++){\n if(f(arr[i]) == true){\n ans.push(arr[i]) ;\n }\n }\n return ans ;\n}", "filter(keepIf) {\n const self = this;\n return new Seq(function* () {\n for (const element of self)\n if (keepIf(element))\n yield element;\n });\n }", "function defaultFilter() {\n const qgNodeIds = getQNodeIds();\n const filteredResults = answers.filter((row) => {\n const remove = qgNodeIds.find((qnodeId) => {\n const found = row[qnodeId].find((knode) => knode.id && !filter.current[qnodeId][knode.id]);\n if (found) {\n // if found, we want to remove\n return true;\n }\n return false;\n });\n if (remove) {\n // if we want to remove, filter out\n return false;\n }\n return true;\n });\n updateFilteredAnswers(filteredResults);\n // return filteredResults;\n }", "function filter(list, predicateFn) {\n\n}", "function not(predicate) {\n return function (a) { return !predicate(a); };\n}", "function filterAttributes(data){\n let filtered_data = {};\n {conditionalFilter}\n return filtered_data;\n}", "function filterValue ( removeValue ) {\n return function filter ( checkValue ) {\n return checkValue !== removeValue\n }\n}", "static generateFiltersFunction(filters) {\n if (!filters || !filters.length && !filters.count) {\n return FunctionHelper.returnTrue;\n }\n\n return function (candidate) {\n let match = true;\n\n for (const filter of filters) {\n // Skip disabled filters\n if (!filter.disabled) {\n match = filter.filter(candidate);\n }\n\n if (!match) {\n break;\n }\n }\n\n return match;\n };\n }", "filterThis(letters){\n return letters !== 0;\n }", "static generateFiltersFunction(filters) {\n if (!filters || (!filters.length && !filters.count)) {\n return FunctionHelper.returnTrue;\n }\n\n return function(candidate) {\n let match = true;\n\n for (const filter of filters) {\n // Skip disabled filters\n if (!filter.disabled) {\n match = filter.filter(candidate);\n }\n if (!match) {\n break;\n }\n }\n\n return match;\n };\n }", "filter(stats) {\n let { filterFn } = this.options;\n if (filterFn) {\n try {\n // Run the user-specified filter function\n return !!filterFn(stats);\n }\n catch (err) {\n // An error occurred in the user's code.\n // In Sync and Async modes, this will return an error.\n // In Streaming mode, we emit an \"error\" event, but continue processing\n this.emit(\"error\", err);\n }\n }\n else {\n // No filter was specified, so match everything\n return true;\n }\n }" ]
[ "0.7415891", "0.7415891", "0.71924883", "0.68619496", "0.67648804", "0.6652573", "0.64584637", "0.64584637", "0.64584637", "0.64584637", "0.6294628", "0.62928224", "0.6256001", "0.62469697", "0.6207571", "0.61991894", "0.61926854", "0.6190803", "0.6184332", "0.61646616", "0.61499476", "0.6149252", "0.61491513", "0.61387765", "0.61387765", "0.610476", "0.610281", "0.6102132", "0.6089019", "0.60828155", "0.6079076", "0.6048689", "0.60363084", "0.6027018", "0.6016928", "0.60079044", "0.5984307", "0.59779316", "0.59779316", "0.5977443", "0.5960096", "0.5951136", "0.59442943", "0.59442943", "0.5938437", "0.5926806", "0.59263474", "0.59215623", "0.5917913", "0.59173113", "0.59166807", "0.59081596", "0.5901912", "0.5893554", "0.5893554", "0.5884567", "0.58774817", "0.58759105", "0.5873916", "0.5873916", "0.5873916", "0.5873916", "0.5871018", "0.5871018", "0.5871018", "0.5871018", "0.58481944", "0.58442974", "0.5842556", "0.58413076", "0.58384633", "0.58278084", "0.5821621", "0.5821513", "0.5821513", "0.5821513", "0.5821513", "0.5815523", "0.5815523", "0.5815523", "0.5815523", "0.58140934", "0.5806822", "0.5803895", "0.5798791", "0.5798791", "0.5792236", "0.5791012", "0.578383", "0.5773163", "0.57613575", "0.5760552", "0.57519317", "0.5750365", "0.57470524", "0.57405996", "0.57392603", "0.57375896", "0.573541", "0.57310766", "0.5724562" ]
0.0
-1
Convert Stringformatted options into Objectformatted ones
function createOptions( options ) { var object = {}; jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { object[ flag ] = true; } ); return object; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function normalizeOption(option){if(isString(option)){return normalizeStringOption(option);}else if(isGroup(option)){var title=option.title,options=option.options;return{title:title,options:options.map(function(option){return isString(option)?normalizeStringOption(option):option;})};}return option;}", "function optionsFromStrings(options) {\n\tvar intOptions = [\"width\", \"height\", \"textMargin\", \"fontSize\", \"margin\", \"marginTop\", \"marginBottom\", \"marginLeft\", \"marginRight\"];\n\n\tfor (var intOption in intOptions) {\n\t\tif (intOptions.hasOwnProperty(intOption)) {\n\t\t\tintOption = intOptions[intOption];\n\t\t\tif (typeof options[intOption] === \"string\") {\n\t\t\t\toptions[intOption] = parseInt(options[intOption], 10);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (typeof options[\"displayValue\"] === \"string\") {\n\t\toptions[\"displayValue\"] = options[\"displayValue\"] != \"false\";\n\t}\n\n\treturn options;\n}", "function optionsFromStrings(options) {\n\tvar intOptions = [\"width\", \"height\", \"textMargin\", \"fontSize\", \"margin\", \"marginTop\", \"marginBottom\", \"marginLeft\", \"marginRight\"];\n\n\tfor (var intOption in intOptions) {\n\t\tif (intOptions.hasOwnProperty(intOption)) {\n\t\t\tintOption = intOptions[intOption];\n\t\t\tif (typeof options[intOption] === \"string\") {\n\t\t\t\toptions[intOption] = parseInt(options[intOption], 10);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (typeof options[\"displayValue\"] === \"string\") {\n\t\toptions[\"displayValue\"] = options[\"displayValue\"] != \"false\";\n\t}\n\n\treturn options;\n}", "function optionsFromStrings(options) {\n\tvar intOptions = [\"width\", \"height\", \"textMargin\", \"fontSize\", \"margin\", \"marginTop\", \"marginBottom\", \"marginLeft\", \"marginRight\"];\n\n\tfor (var intOption in intOptions) {\n\t\tif (intOptions.hasOwnProperty(intOption)) {\n\t\t\tintOption = intOptions[intOption];\n\t\t\tif (typeof options[intOption] === \"string\") {\n\t\t\t\toptions[intOption] = parseInt(options[intOption], 10);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (typeof options[\"displayValue\"] === \"string\") {\n\t\toptions[\"displayValue\"] = options[\"displayValue\"] != \"false\";\n\t}\n\n\treturn options;\n}", "function setOptions(obj, options) {\n if (!Object.prototype.hasOwnProperty.call(obj, 'options')) {\n obj.options = obj.options ? create(obj.options) : {};\n }\n\n for (var i in options) {\n obj.options[i] = options[i];\n }\n\n return obj.options;\n } // @function getParamString(obj: Object, existingUrl?: String, uppercase?: Boolean): String", "function _setOptions(obj, options) {\n options = options || {};\n obj.separator = (typeof options.separator !== 'undefined') ? options.separator : ',';\n obj.quotechar = (typeof options.quote !== 'undefined') ? options.quote : '\"';\n obj.escapechar = (typeof options.escape !== 'undefined') ? options.escape : '\"';\n obj.commentchar = (typeof options.comment !== 'undefined') ? options.comment : '';\n obj.columnNames = (typeof options.columnNames !== 'undefined') ? options.columnNames : [];\n obj.columnsFromHeader = (typeof options.columnsFromHeader !== 'undefined') ? options.columnsFromHeader : false;\n obj.nestedQuotes = (typeof options.nestedQuotes !== 'undefined') ? options.nestedQuotes : false;\n obj.escapeFormulas = (typeof options.escapeFormulas !== 'undefined') ? options.escapeFormulas : false;\n}", "static _normalizeOptions (options) {\n return options\n }", "function arrayToObject(option) {\n if (typeOf(option) == \"array\") {\n option = {\n \"value\": option[0],\n \"text\": option[1] || option[0],\n };\n }\n return option;\n }", "ParseOptions(rawOptions) {\n let parsedOptions = {};\n let rawOptionList = rawOptions.split(/ -/);\n for (let i = 0; i < rawOptionList.length; i++) {\n let optionString = rawOptionList[i];\n if (/(\\S+) (.*)/.test(optionString)) {\n parsedOptions[RegExp.$1] = RegExp.$2;\n }\n }\n return parsedOptions;\n }", "function getOptions() {\n const o = {};\n input.forEach(i => {\n if(i.slice(0,2) !== '--') return; // we don't deal with unknown params\n const [option,value] = i.slice(2).split('=');\n o[option] = value || true;\n });\n return o;\n}", "convertOptions (opts) {\n return opts;\n }", "function fromQueryStringWithOptions(obj, opts) {\n var str = String(obj || '').replace(/^.*?\\?/, ''), result = {}, auto;\n opts = opts || {};\n if (str) {\n forEach(str.split('&'), function(p) {\n var split = p.split('=');\n var key = decodeURIComponent(split[0]);\n var val = split.length === 2 ? decodeURIComponent(split[1]) : '';\n auto = opts.auto !== false;\n parseQueryComponent(result, key, val, opts.deep, auto, opts.separator, opts.transform);\n });\n }\n return result;\n }", "function normalizeOptions(options) {\n options = options || {};\n return {\n concatMessages: options.concatMessages === undefined ? true : Boolean(options.concatMessages),\n format: options.format === undefined ? format$3\n : (typeof options.format === \"function\" ? options.format : false),\n };\n}", "function normalizeOptions(options) {\n return {\n // TODO: Remove the \"getPath\" fallback in the next minor release\n map: options.map || options.getPath || String,\n sep: options.sep || path.sep,\n };\n}", "function fromQueryStringWithOptions(obj, opts) {\n var str = String(obj || '').replace(/^.*?\\?/, ''), result = {}, auto;\n opts = opts || {};\n if (str) {\n forEach(str.split('&'), function(p) {\n var split = p.split('=');\n var key = decodeURIComponent(split[0]);\n var val = split.length === 2 ? decodeURIComponent(split[1]) : '';\n auto = opts.auto !== false;\n parseQueryComponent(result, key, val, opts.deep, auto, opts.separator, opts.transform);\n });\n }\n return result;\n}", "function normalizeOption(option) {\n if (isString(option)) {\n return normalizeStringOption(option);\n } else if (isGroup(option)) {\n const {\n title,\n options\n } = option;\n return {\n title,\n options: options.map(option => {\n return isString(option) ? normalizeStringOption(option) : option;\n })\n };\n }\n\n return option;\n}", "function normalizeOption(option) {\n if (isString(option)) {\n return normalizeStringOption(option);\n } else if (isGroup(option)) {\n var title = option.title,\n options = option.options;\n\n return {\n title: title,\n options: options.map(function (option) {\n return isString(option) ? normalizeStringOption(option) : option;\n })\n };\n }\n return option;\n}", "function handleOptions(object, options, incremental) {\n // options = _.extend(object.options || {}, options);\n options = (options || {});\n if (!incremental) {\n object.options = options;\n }\n\n // override properties with options if specified\n _.each(object.optionProperties, function (property) {\n if (options[property]) {\n object[property] = options[property];\n }\n });\n }", "function prepareOptions(options){\n\n\n //if options isnt instance of GeneralOptions\n if (!(options instanceof GeneralOptions)) {\n \n\n //var generalOptions = new GeneralOptions\n var generalOptions = new GeneralOptions();\n //for each own property key,value in options\n var value=undefined;\n for ( var key in options)if (options.hasOwnProperty(key)){value=options[key];\n {\n //generalOptions.setProperty key, value\n generalOptions.setProperty(key, value);\n }\n \n }// end for each property\n //end for\n //options = generalOptions\n \n //options = generalOptions\n options = generalOptions;\n };\n\n\n //options.version = version\n options.version = module.exports.version;\n\n //return options\n return options;\n }", "formatReplaceOption(option) {\n if (option instanceof Array) {\n // return a new copy of the array\n return utils_1.deepClone(option);\n }\n // convert object option to array one\n const replaceArr = [];\n for (const key in option) {\n /* istanbul ignore else */\n if (Object.prototype.hasOwnProperty.call(option, key)) {\n replaceArr.push([key, option[key]]);\n }\n }\n return replaceArr;\n }", "function options (str) {\n var sep = /;/.test(str)\n ? ';'\n : '&';\n\n var ret = qs.parse(str, sep);\n\n Object.keys(ret).forEach(function (key) {\n var val = ret[key];\n if ('readPreferenceTags' == key) {\n val = readPref(val);\n if (val) {\n ret[key] = Array.isArray(val)\n ? val\n : [val];\n }\n } else {\n ret[key] = format(val);\n }\n });\n\n return ret;\n}", "function w_options (wOo) {\n\treturn (typeof wOo === 'string') ? {\n\t\tw: wOo || this.word || this.input || '',\n\t\toptions: {}\n\t} : {\n\t\tw: this.word || this.input || '',\n\t\toptions: (obj(wOo)) ? wOo : {}\n\t}\n}", "function normalizeOptions(options) {\n options = options || {};\n return {\n concatMessages: options.concatMessages === undefined ? true : Boolean(options.concatMessages),\n format: options.format === undefined ? isomorphic_node_1.format\n : (typeof options.format === \"function\" ? options.format : false),\n };\n}", "function createOptions(options){var object={};jQuery.each(options.match(rnotwhite)||[],function(_,flag){object[flag]=true;});return object;}", "function createOptions(options){var object={};jQuery.each(options.match(rnotwhite)||[],function(_,flag){object[flag]=true;});return object;}", "function createOptions(options){var object={};jQuery.each(options.match(rnotwhite)||[],function(_,flag){object[flag]=true;});return object;}", "function createOptions(options){var object={};jQuery.each(options.match(rnotwhite)||[],function(_,flag){object[flag]=true;});return object;}", "function buildSelectOptions(obj){\n //obj.options[1] = new Option(\"addData\", \"Add Data\", true, false);\n obj.options[1] = new Option(\"Add Data\");\n obj.options[2] = new Option(\"Find Document\");\n obj.options[3] = new Option(\"Replace Document\");\n obj.options[4] = new Option(\"Remove Document\");\n obj.options[5] = new Option(\"Count Documents\");\n obj.options[6] = new Option(\"Adapter Integration\");\n obj.options[7] = new Option(\"File Info\");\n if(options.username != undefined && options.password != undefined){\n obj.options[8] = new Option(\"Change Password\");\n }\n\n}", "function pixasticOptionsObject(o){\r\n\t\t\tvar finalObject = {};\r\n\t\t\tfor(var i = 0, j = o.length; i < j; i += 1){\r\n\t\t\t\tvar pairs = o[i].split(\":\");\r\n\t\t\t\tfinalObject[pairs[0]] = pairs[1];\r\n\t\t\t}\r\n\t\t\tfinalObject['retinaReady'] = s.retinaReady;\r\n\t\t\tfinalObject['devicePixelRatio'] = s.devicePixelRatio;\r\n\t\t\treturn finalObject;\r\n\t\t}", "_sanitizeOption(options, name) {\n let optionValue = options[name];\n if (!optionValue) {\n logger.warn('Missing', name, 'parameter');\n return false;\n }\n\n try {\n this.options[name] = typeof (this.options[name]) === 'string' ?\n JSON.parse(this.options[name]) : this.options[name];\n\n return true;\n } catch (e) {\n logger.error(e);\n throw name + ' parameter is expected to be a valid stringified JSON object';\n }\n }", "function createOptions( options ) {\n var object = {};\n jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n object[ flag ] = true;\n } );\n return object;\n }", "function sanitizeOptions(metadataOrOptions, ss58Format = constants_1.KUSAMA_SS58_FORMAT) {\n // Passing a string as second argument (for metadataRpc) is deprecated. We\n // still add the following check for backwards-compatibility.\n if (typeof metadataOrOptions === 'string') {\n return {\n metadata: metadataOrOptions,\n registry: getRegistry(),\n ss58Format\n };\n }\n else {\n return {\n metadata: metadataOrOptions.metadata,\n registry: metadataOrOptions.registry || getRegistry(),\n ss58Format: metadataOrOptions.ss58Format || constants_1.KUSAMA_SS58_FORMAT\n };\n }\n}", "function createOptions( options ) {\n \tvar object = {};\n \tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n \t\tobject[ flag ] = true;\n \t} );\n \treturn object;\n }", "function normalizeProps(options){var props=options.props;if(!props){return;}var res={};var i,val,name;if(Array.isArray(props)){i=props.length;while(i--){val=props[i];if(typeof val==='string'){name=camelize(val);res[name]={type:null};}else{warn('props must be strings when using array syntax.');}}}else if(isPlainObject(props)){for(var key in props){val=props[key];name=camelize(key);res[name]=isPlainObject(val)?val:{type:val};}}options.props=res;}", "function createOptions( options ) {\n var object = {};\n jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {\n object[ flag ] = true;\n } );\n return object;\n }", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}", "function createOptions( options ) {\n\t\tvar object = {};\n\t\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\t\tobject[ flag ] = true;\n\t\t} );\n\t\treturn object;\n\t}" ]
[ "0.66466105", "0.66000164", "0.66000164", "0.66000164", "0.6495313", "0.63192004", "0.62976897", "0.6296341", "0.629607", "0.6251182", "0.6246023", "0.6192017", "0.61583936", "0.61466974", "0.6105758", "0.60930765", "0.60897726", "0.60074645", "0.5976884", "0.5964293", "0.5947389", "0.5885592", "0.5803356", "0.57810926", "0.57810926", "0.57810926", "0.57810926", "0.5755986", "0.5748117", "0.57430184", "0.57217115", "0.572027", "0.57140326", "0.57028276", "0.57015187", "0.5701508", "0.5701508", "0.5701508", "0.5701508", "0.5701508", "0.5701508", "0.5701508", "0.5701508", "0.5701508", "0.5701508", "0.5701508", "0.5701508", "0.5701508", "0.5701508", "0.5701508", "0.5701508", "0.5701508", "0.5701508" ]
0.0
-1
The ready event handler and self cleanup method
function completed() { document.removeEventListener( "DOMContentLoaded", completed ); window.removeEventListener( "load", completed ); jQuery.ready(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readyCallBack() {\n}", "static ready() { }", "onReady() {}", "ready() {\r\n\t\tsuper.ready();\r\n\t}", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "function readyHandler() {\n\t\t\tif (!eventUtils.domLoaded) {\n\t\t\t\teventUtils.domLoaded = true;\n\t\t\t\tcallback(event);\n\t\t\t}\n\t\t}", "function readyHandler() {\n\t\t\tif (!eventUtils.domLoaded) {\n\t\t\t\teventUtils.domLoaded = true;\n\t\t\t\tcallback(event);\n\t\t\t}\n\t\t}", "function readyHandler() {\n\t\t\tif (!eventUtils.domLoaded) {\n\t\t\t\teventUtils.domLoaded = true;\n\t\t\t\tcallback(event);\n\t\t\t}\n\t\t}", "function readyHandler() {\n\t\t\tif (!eventUtils.domLoaded) {\n\t\t\t\teventUtils.domLoaded = true;\n\t\t\t\tcallback(event);\n\t\t\t}\n\t\t}", "function ready() {\n conn.on('close', function() {\n status.textContent = 'Connection closed';\n status.className = classNames.warning;\n conn = null;\n });\n }", "ready() { }", "ready() { }", "ready() { }", "ready() { }", "ready() { }", "ready() { }", "ready() { }", "ready() { }", "ready() {\n super.ready();\n\n\n }", "function onReady() {\n\t// TODO\n}", "ready() {}", "ready() {}", "ready() {}", "function completed() {\n document.removeEventListener(\"DOMContentLoaded\", completed);\n window.removeEventListener(\"load\", completed);\n jQuery.ready();\n }", "ready() {\n this._root = this._createRoot();\n super.ready();\n this._firstRendered();\n }", "function initializationCleanUp() {\n //console.debug('Cleaning up of all data..');\n\t\t\t//console.debug('Cleaning up of all data is done..');\n }", "function completed() {\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if (document.addEventListener || window.event.type === \"load\" || document.readyState === \"complete\") {\n detach();\n jQuery.ready();\n }\n }", "ready() {\n this.isReady = true;\n if (this.onLoad) {\n this.onLoad.call();\n }\n }", "ready() {\n super.ready();\n\n const that = this;\n\n //a flag used to avoid animations on startup\n that._isInitializing = true;\n\n that._createLayout();\n that._setFocusable();\n\n delete that._isInitializing;\n }", "ready() {\r\n\t\t// Override this\r\n\t\tthis.updateTitle();\r\n\t}", "function onloadHandler(){\n console.info(\"Nick Cage is ready!\");\n // where the magic happens\n replaceAllElements();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "function onReady () {\n restoreTime()\n }", "function completed() {\n document.removeEventListener( \"DOMContentLoaded\", completed );\n window.removeEventListener( \"load\", completed );\n jQuery.ready();\n }", "function completed() {\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if (document.addEventListener || event.type === \"load\" || document.readyState === \"complete\") {\n detach();\n jQuery.ready();\n }\n }", "onPageReady () {}", "function pageReady(){\n handleUTM();\n legacySupport();\n initModals();\n initScrollMonitor();\n initVideos();\n _window.on('resize', debounce(initVideos, 200))\n initSmartBanner();\n initTeleport();\n initMasks();\n }", "function completed(){document.removeEventListener(\"DOMContentLoaded\",completed);window.removeEventListener(\"load\",completed);jQuery.ready();}", "function completed(){document.removeEventListener(\"DOMContentLoaded\",completed);window.removeEventListener(\"load\",completed);jQuery.ready();}", "function initOnDomReady() {}", "ready() {\n super.ready();\n this._createElement();\n }", "function onDOMReady() {\n // Make sure that the DOM is not already loaded\n if (isReady) return;\n // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\n if (!document.body) return setTimeout(onDOMReady, 0);\n // Remember that the DOM is ready\n isReady = true;\n // Make sure this is always async and then finishin init\n setTimeout(function() {\n app._finishInit();\n }, 0);\n }", "function completed() {\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n detach();\n jQuery.ready();\n }\n }", "function completed(){document.removeEventListener(\"DOMContentLoaded\",completed,false);window.removeEventListener(\"load\",completed,false);jQuery.ready();}", "function completed() {\n\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if (document.addEventListener ||\n window.event.type === \"load\" ||\n document.readyState === \"complete\") {\n\n detach();\n jQuery.ready();\n }\n }", "function completed() {\n\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if (document.addEventListener ||\n window.event.type === \"load\" ||\n document.readyState === \"complete\") {\n\n detach();\n jQuery.ready();\n }\n }", "function completed() {\n\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if ( document.addEventListener ||\n window.event.type === \"load\" ||\n document.readyState === \"complete\" ) {\n\n detach();\n jQuery.ready();\n }\n }", "function onoptionsready() {\n\t this.initialize(bind(oninitialized, this));\n\t }", "function p() {\n ne.removeEventListener(\"DOMContentLoaded\", p), e.removeEventListener(\"load\", p), \n he.ready();\n }", "function completed() {\n\t\t\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\t\t\twindow.removeEventListener( \"load\", completed );\n\t\t\tjQuery.ready();\n\t\t}", "function completed() {\n document.removeEventListener(\"DOMContentLoaded\", completed, false);\n window.removeEventListener(\"load\", completed, false);\n jQuery.ready();\n }", "function pageReady() {\n legacySupport();\n\n updateHeaderActiveClass();\n initHeaderScroll();\n\n setLogDefaultState();\n setStepsClasses();\n _window.on('resize', debounce(setStepsClasses, 200))\n\n initMasks();\n initValidations();\n initSelectric();\n initDatepicker();\n\n _window.on('resize', debounce(setBreakpoint, 200))\n }", "function documentReadyFunction() {\n onPageLoadOrResize();\n onPageLoad();\n }", "ready() {\n const that = this;\n\n super.ready();\n\n that._isParentPositionStatic = window.getComputedStyle(that.parentElement || document.querySelector('body')).position === 'static';\n that._handleSelector(that.selector);\n\n if (that.visible) {\n that._applyPosition();\n }\n\n that._handleEventListeners();\n that._handleResize();\n\n that.value = that.$.content.innerHTML = that.value ? that.value : that.innerHTML;\n that._handleTemplate();\n }", "function completed() {\n document.removeEventListener(\"DOMContentLoaded\", completed);\n window.removeEventListener(\"load\", completed);\n jQuery.ready();\n }", "function completed() {\n document.removeEventListener(\"DOMContentLoaded\", completed);\n window.removeEventListener(\"load\", completed);\n jQuery.ready();\n }", "function completed() {\n document.removeEventListener(\"DOMContentLoaded\", completed);\n window.removeEventListener(\"load\", completed);\n jQuery.ready();\n }", "function completed() {\n document.removeEventListener(\"DOMContentLoaded\", completed);\n window.removeEventListener(\"load\", completed);\n jQuery.ready();\n }", "function completed(){document.removeEventListener(\"DOMContentLoaded\",completed);window.removeEventListener(\"load\",completed);jQuery.ready();}// Catch cases where $(document).ready() is called", "function completed(){document.removeEventListener(\"DOMContentLoaded\",completed);window.removeEventListener(\"load\",completed);jQuery.ready();}// Catch cases where $(document).ready() is called", "function completed(){document.removeEventListener(\"DOMContentLoaded\",completed);window.removeEventListener(\"load\",completed);jQuery.ready();}// Catch cases where $(document).ready() is called", "function completed(){document.removeEventListener(\"DOMContentLoaded\",completed);window.removeEventListener(\"load\",completed);jQuery.ready();}// Catch cases where $(document).ready() is called", "function qodefOnDocumentReady() {\n qodefInitQuantityButtons();\n qodefInitButtonLoading();\n qodefInitSelect2();\n\t qodefInitSingleProductLightbox();\n }", "function ready () {\n\t\t this._isAttached = true\n\t\t this._isReady = true\n\t\t this._callHook('ready')\n\t\t}", "function completed() {\n document.removeEventListener(\"DOMContentLoaded\", completed, false);\n window.removeEventListener(\"load\", completed, false);\n jQuery.ready();\n }", "function DOMReady() {\n }", "ready() {\n const that = this;\n\n super.ready();\n that._handleMultipleCheckedInstances();\n that._updateHidenInputNameAndValue();\n }", "ready() {\n const that = this;\n\n super.ready();\n that._handleMultipleCheckedInstances();\n that._updateHidenInputNameAndValue();\n }", "function init() {\n if (!ready) {\n ready = true;\n initElements();\n }\n }", "onReady() {\n\n }", "function completed() {\n\n\t\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\t\tif (document.addEventListener || window.event.type === \"load\" || document.readyState === \"complete\") {\n\n\t\t\tdetach();\n\t\t\tjQuery.ready();\n\t\t}\n\t}", "function o(){ne.removeEventListener(\"DOMContentLoaded\",o),_.removeEventListener(\"load\",o),me.ready()}", "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "function onReadyCallBack() {\n self.startupTime = performance.now() - self.startupTime;\n Logger.system.debug(\"WINDOW LIFECYCLE:STARTUP:RouterClient Ready\");\n isRouterReady = true;\n // console.profileEnd(\"Router\");\n // invoke all the parent callbacks waiting for router to be ready\n while (parentReadyCallbackQueue.length > 0) {\n Logger.system.debug(\"WINDOW LIFECYCLE:STARTUP:RouterClient parentReady invoked\");\n var nextParentCallback = parentReadyCallbackQueue.shift();\n nextParentCallback();\n }\n }", "function completed() {\n\t\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\t\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\t\tdetach();\n\t\t\tjQuery.ready();\n\t\t}\n\t}", "function completed() {\n\t\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\t\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n\t\t\tdetach();\n\t\t\tjQuery.ready();\n\t\t}\n\t}", "function completed() {\n\t\tdocument.removeEventListener(\"DOMContentLoaded\", completed);\n\t\twindow.removeEventListener(\"load\", completed);\n\t\tjQuery.ready();\n\t}", "function completed() {\n\t\tdocument.removeEventListener(\"DOMContentLoaded\", completed);\n\t\twindow.removeEventListener(\"load\", completed);\n\t\tjQuery.ready();\n\t}", "function completed() {\n\t\tdocument.removeEventListener(\"DOMContentLoaded\", completed);\n\t\twindow.removeEventListener(\"load\", completed);\n\t\tjQuery.ready();\n\t}", "function completed() {\n\t\tdocument.removeEventListener(\"DOMContentLoaded\", completed);\n\t\twindow.removeEventListener(\"load\", completed);\n\t\tjQuery.ready();\n\t}", "async _onReady() {\n // Make the editor \"complex.\" This \"fluffs\" out the DOM and makes the\n // salient controller objects.\n this._editorComplex =\n new EditorComplex(this._sessionInfo, this._window, this._editorNode);\n\n await this._editorComplex.whenReady();\n this._recoverySetup();\n }", "function onInit() {\r\n\r\n Event.onDOMReady(onDOMReady, this.cfg.getProperty(\"container\"), this);\r\n\r\n }" ]
[ "0.72463065", "0.7211212", "0.7172562", "0.7149137", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.7042607", "0.7042607", "0.7042607", "0.7042607", "0.6912024", "0.6910091", "0.6910091", "0.6910091", "0.6910091", "0.6910091", "0.6910091", "0.6910091", "0.6910091", "0.68593514", "0.67058414", "0.67045325", "0.67045325", "0.67045325", "0.6658347", "0.6649914", "0.66455567", "0.6641658", "0.66399616", "0.6625674", "0.66216993", "0.6583961", "0.65647024", "0.65647024", "0.65647024", "0.65499115", "0.6545894", "0.65225387", "0.6500882", "0.6499929", "0.6497107", "0.6497107", "0.64904624", "0.6481251", "0.64749104", "0.6472662", "0.64680004", "0.6461095", "0.6461095", "0.6457884", "0.6455628", "0.64436525", "0.64414144", "0.6421948", "0.6420737", "0.64206946", "0.6419118", "0.64183176", "0.64183176", "0.64183176", "0.64183176", "0.641613", "0.641613", "0.641613", "0.641613", "0.6411604", "0.641002", "0.63979137", "0.6396145", "0.63805586", "0.63805586", "0.63742685", "0.63668334", "0.6358089", "0.63529384", "0.6343617", "0.6343617", "0.6343617", "0.6343617", "0.6343617", "0.6343617", "0.6343617", "0.6335575", "0.6327148", "0.6327148", "0.632598", "0.632598", "0.632598", "0.632598", "0.6325359", "0.6321197" ]
0.0
-1
Mark scripts as having already been evaluated
function setGlobalEval( elems, refElements ) { var i = 0, l = elems.length; for ( ; i < l; i++ ) { dataPriv.set( elems[ i ], "globalEval", !refElements || dataPriv.get( refElements[ i ], "globalEval" ) ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "globalEval() {\n // phase one, if we have head inserts, we build up those before going into the script eval phase\n let insertHeadElems = new ExtDomQuery_1.ExtDomQuery(...this.internalContext.getIf(Const_1.DEFERRED_HEAD_INSERTS).value);\n insertHeadElems.runHeadInserts(true);\n // phase 2 we run a script eval on all updated elements in the body\n let updateElems = new ExtDomQuery_1.ExtDomQuery(...this.internalContext.getIf(Const_1.UPDATE_ELEMS).value);\n updateElems.runCss();\n // phase 3, we do the same for the css\n updateElems.runScripts();\n }", "function captureInitialScripts(scripts) {\n initialScripts = scripts || querySelectorAll('script');\n}", "runScripts(sticky = false, whitelisted = DEFAULT_WHITELIST) {\n const evalCollectedScripts = (scriptsToProcess) => {\n if (scriptsToProcess.length) {\n // script source means we have to eval the existing\n // scripts before we run the 'include' command\n // this.globalEval(finalScripts.join(\"\\n\"));\n let joinedScripts = [];\n new Es2019Array(...scriptsToProcess).forEach(item => {\n if (!item.nonce) {\n joinedScripts.push(item.evalText);\n }\n else {\n if (joinedScripts.length) {\n this.globalEval(joinedScripts.join(\"\\n\"));\n joinedScripts.length = 0;\n }\n (!sticky) ?\n this.globalEval(item.evalText, item.nonce) :\n this.globalEvalSticky(item.evalText, item.nonce);\n }\n });\n if (joinedScripts.length) {\n (!sticky) ? this.globalEval(joinedScripts.join(\"\\n\")) :\n this.globalEvalSticky(joinedScripts.join(\"\\n\"));\n joinedScripts.length = 0;\n }\n scriptsToProcess = [];\n }\n return scriptsToProcess;\n };\n let finalScripts = [], allowedItemTypes = [\"\", \"script\", \"text/javascript\", \"text/ecmascript\", \"ecmascript\"], execScript = (item) => {\n var _a, _b, _c, _d;\n let tagName = item.tagName;\n let itemType = ((_a = item === null || item === void 0 ? void 0 : item.type) !== null && _a !== void 0 ? _a : '').toLowerCase();\n if (tagName &&\n eqi(tagName, \"script\") &&\n allowedItemTypes.indexOf(itemType) != -1) {\n let src = item.getAttribute('src');\n if ('undefined' != typeof src\n && null != src\n && src.length > 0) {\n let nonce = (_b = item === null || item === void 0 ? void 0 : item.nonce) !== null && _b !== void 0 ? _b : item.getAttribute('nonce').value;\n // we have to move this into an inner if because chrome otherwise chokes\n // due to changing the and order instead of relying on left to right\n // if jsf.js is already registered we do not replace it anymore\n if (whitelisted(src)) {\n // we run the collected scripts, before we run the 'include' command\n finalScripts = evalCollectedScripts(finalScripts);\n if (!sticky) {\n (!!nonce) ? this.loadScriptEval(src, 0, nonce) :\n // if no nonce is set we do not pass any once\n this.loadScriptEval(src, 0);\n }\n else {\n (!!nonce) ? this.loadScriptEvalSticky(src, 0, nonce) :\n // if no nonce is set we do not pass any once\n this.loadScriptEvalSticky(src, 0);\n }\n }\n }\n else {\n // embedded script auto eval\n // probably not needed anymore\n let evalText = trim(item.text || item.innerText || item.innerHTML);\n let go = true;\n while (go) {\n go = false;\n if (evalText.substring(0, 4) == \"<!--\") {\n evalText = evalText.substring(4);\n go = true;\n }\n if (evalText.substring(0, 4) == \"//<!--\") {\n evalText = evalText.substring(6);\n go = true;\n }\n if (evalText.substring(0, 11) == \"//<![CDATA[\") {\n evalText = evalText.substring(11);\n go = true;\n }\n }\n let nonce = (_d = (_c = item === null || item === void 0 ? void 0 : item.nonce) !== null && _c !== void 0 ? _c : item.getAttribute('nonce').value) !== null && _d !== void 0 ? _d : '';\n // we have to run the script under a global context\n // we store the script for fewer calls to eval\n finalScripts.push({\n nonce,\n evalText\n });\n }\n }\n };\n try {\n let scriptElements = new DomQuery(this.filterSelector(\"script\"), this.querySelectorAll(\"script\"));\n // script execution order by relative pos in their dom tree\n scriptElements.asArray\n .flatMap(item => [...item.values])\n .sort((node1, node2) => node1.compareDocumentPosition(node2) - 3) // preceding 2, following == 4)\n .forEach(item => execScript(item));\n evalCollectedScripts(finalScripts);\n }\n catch (e) {\n if (console && console.error) {\n // not sure if we\n // should use our standard\n // error mechanisms here\n // because in the head appendix\n // method only a console\n // error would be raised as well\n console.error(e.message || e.description);\n }\n }\n finally {\n // the usual ie6 fix code\n // the IE6 garbage collector is broken\n // nulling closures helps somewhat to reduce\n // mem leaks, which are impossible to avoid\n // at this browser\n execScript = null;\n }\n return this;\n }", "clearScripts() {\n this.scripts = {};\n }", "runScripts(sticky = false, whitelisted = DEFAULT_WHITELIST) {\n const evalCollectedScripts = (scriptsToProcess) => {\n if (scriptsToProcess.length) {\n // script source means we have to eval the existing\n // scripts before we run the 'include' command\n // this.globalEval(finalScripts.join(\"\\n\"));\n let joinedScripts = [];\n new Es2019Array_1.Es2019Array(...scriptsToProcess).forEach(item => {\n if (!item.nonce) {\n joinedScripts.push(item.evalText);\n }\n else {\n if (joinedScripts.length) {\n this.globalEval(joinedScripts.join(\"\\n\"));\n joinedScripts.length = 0;\n }\n (!sticky) ?\n this.globalEval(item.evalText, item.nonce) :\n this.globalEvalSticky(item.evalText, item.nonce);\n }\n });\n if (joinedScripts.length) {\n (!sticky) ? this.globalEval(joinedScripts.join(\"\\n\")) :\n this.globalEvalSticky(joinedScripts.join(\"\\n\"));\n joinedScripts.length = 0;\n }\n scriptsToProcess = [];\n }\n return scriptsToProcess;\n };\n let finalScripts = [], allowedItemTypes = [\"\", \"script\", \"text/javascript\", \"text/ecmascript\", \"ecmascript\"], execScript = (item) => {\n var _a, _b, _c, _d;\n let tagName = item.tagName;\n let itemType = ((_a = item === null || item === void 0 ? void 0 : item.type) !== null && _a !== void 0 ? _a : '').toLowerCase();\n if (tagName &&\n eqi(tagName, \"script\") &&\n allowedItemTypes.indexOf(itemType) != -1) {\n let src = item.getAttribute('src');\n if ('undefined' != typeof src\n && null != src\n && src.length > 0) {\n let nonce = (_b = item === null || item === void 0 ? void 0 : item.nonce) !== null && _b !== void 0 ? _b : item.getAttribute('nonce').value;\n // we have to move this into an inner if because chrome otherwise chokes\n // due to changing the and order instead of relying on left to right\n // if jsf.js is already registered we do not replace it anymore\n if (whitelisted(src)) {\n // we run the collected scripts, before we run the 'include' command\n finalScripts = evalCollectedScripts(finalScripts);\n if (!sticky) {\n (!!nonce) ? this.loadScriptEval(src, 0, nonce) :\n // if no nonce is set we do not pass any once\n this.loadScriptEval(src, 0);\n }\n else {\n (!!nonce) ? this.loadScriptEvalSticky(src, 0, nonce) :\n // if no nonce is set we do not pass any once\n this.loadScriptEvalSticky(src, 0);\n }\n }\n }\n else {\n // embedded script auto eval\n // probably not needed anymore\n let evalText = trim(item.text || item.innerText || item.innerHTML);\n let go = true;\n while (go) {\n go = false;\n if (evalText.substring(0, 4) == \"<!--\") {\n evalText = evalText.substring(4);\n go = true;\n }\n if (evalText.substring(0, 4) == \"//<!--\") {\n evalText = evalText.substring(6);\n go = true;\n }\n if (evalText.substring(0, 11) == \"//<![CDATA[\") {\n evalText = evalText.substring(11);\n go = true;\n }\n }\n let nonce = (_d = (_c = item === null || item === void 0 ? void 0 : item.nonce) !== null && _c !== void 0 ? _c : item.getAttribute('nonce').value) !== null && _d !== void 0 ? _d : '';\n // we have to run the script under a global context\n // we store the script for fewer calls to eval\n finalScripts.push({\n nonce,\n evalText\n });\n }\n }\n };\n try {\n let scriptElements = new DomQuery(this.filterSelector(\"script\"), this.querySelectorAll(\"script\"));\n // script execution order by relative pos in their dom tree\n scriptElements.asArray\n .flatMap(item => [...item.values])\n .sort((node1, node2) => node1.compareDocumentPosition(node2) - 3) // preceding 2, following == 4)\n .forEach(item => execScript(item));\n evalCollectedScripts(finalScripts);\n }\n catch (e) {\n if (console && console.error) {\n // not sure if we\n // should use our standard\n // error mechanisms here\n // because in the head appendix\n // method only a console\n // error would be raised as well\n console.error(e.message || e.description);\n }\n }\n finally {\n // the usual ie6 fix code\n // the IE6 garbage collector is broken\n // nulling closures helps somewhat to reduce\n // mem leaks, which are impossible to avoid\n // at this browser\n execScript = null;\n }\n return this;\n }", "removeAllScripts() {\n this.scripts = {};\n }", "function visit(script) {\n script = resolveScriptInfo(script);\n var currentState = state(script);\n if (currentState < loading && !getComposite(script)) {\n // unloaded script, eligible for composite selection\n scriptSet[script.name] = script;\n foundAny = true;\n foreach(script[\"dependencies\"], visit);\n }\n if (currentState < loaded) {\n // this scripts executionDependencies may not be loaded,\n // also check them for composite candidates\n foreach(script[\"executionDependencies\"], visit);\n }\n }", "removeAllScriptNames() {\n this.scriptNames = [];\n }", "evalFound() {\n this._evalFound = true;\n this._closedOver = true;\n this._vars.forEach(closeOver);\n this.parent.evalFound();\n }", "loadAllScripts() {\n\t\tthis._scripts.forEach( function( scriptPlugin ) {\n\t\t\tif ( false === scriptPlugin._ranInline ) {\n\t\t\t\tscriptPlugin.theScript();\n\t\t\t}\n\t\t\tscriptPlugin.createScript();\n\t\t});\n\t}", "function setEvil(otherEval) {\n evil = otherEval;\n}", "function b(e,t){for(var n=0,o=e.length;n<o;n++)Fe.set(e[n],\"globalEval\",!t||Fe.get(t[n],\"globalEval\"))}", "runScripts(sticky = false, whiteListed) {\n const whitelistFunc = (src) => {\n var _a;\n return ((_a = whiteListed === null || whiteListed === void 0 ? void 0 : whiteListed(src)) !== null && _a !== void 0 ? _a : true) && !IS_FACES_SOURCE(src) && !IS_INTERNAL_SOURCE(src);\n };\n return super.runScripts(sticky, whitelistFunc);\n }", "function setGlobalEval( elems, refElements ) {\n var elem,\n i = 0;\n for ( ; (elem = elems[i]) != null; i++ ) {\n jQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n }\n }", "function setGlobalEval(elems, refElements) {\n var i = 0,\n l = elems.length;\n\n for (; i < l; i++) {\n data_priv.set(\n elems[i], \"globalEval\", !refElements || data_priv.get(refElements[i], \"globalEval\")\n );\n }\n }", "updatedContentsFor(file) {\n this.activeImports.forEach((item) => item.resetCompiled())\n }", "function setGlobalEval( elems, refElements ) {\n var elem,\n i = 0;\n for ( ; ( elem = elems[ i ] ) != null; i++ ) {\n jQuery._data(\n elem,\n \"globalEval\",\n !refElements || jQuery._data( refElements[ i ], \"globalEval\" )\n );\n }\n }", "resetCompiled() {\n this.resetState(\"scope\", \"compiled\")\n }", "function setGlobalEval( elems, refElements ) {\n\t\tvar elem,\n\t\t\ti = 0;\n\t\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t\t}\n\t}", "function setGlobalEval( elems, refElements ) {\n\t\tvar elem,\n\t\t\ti = 0;\n\t\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t\t}\n\t}", "function setGlobalEval(elems, refElements) {\n var l = elems.length,\n i = 0;\n\n for (; i < l; i++) {\n data_priv.set(\n elems[i], \"globalEval\", !refElements || data_priv.get(refElements[i], \"globalEval\"));\n }\n }", "function setGlobalEval( elems, refElements ) {\r\n\tvar elem,\r\n\t\ti = 0;\r\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\r\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\r\n\t}\r\n}", "function setGlobalEval(elems, refElements) {\n var i = 0,\n l = elems.length;\n\n for (; i < l; i++) {\n dataPriv.set(elems[i], \"globalEval\", !refElements || dataPriv.get(refElements[i], \"globalEval\"));\n }\n }", "function finish_load(){\n\twindow.ubm_loadedids = {};\n\twindow.ubm_incompScripts = new Set([]);\n\t//Get current url\n\tvar thisurl = new URL(window.location.href);\n\tvar hostname = thisurl.hostname;\n\tvar s = ubm_db[hostname];\n\tif (s) {\n\t\tvar keys = s.getKeys();\n\t\tfor (let baseurl of keys) {\n\t\t\tloadScript(baseurl + hostname + \".js\", `scriptfail(this, function(){console.log('Could not load script from site: ` + baseurl + `!')})`, `exeScript(\\`` + baseurl + `\\`, function(){loadAlwaysCheck(0, \"` + baseurl + `\");})`);\n\t\t}\n\t} else {\n\t\tloadAlwaysCheck(0, hostname);\n\t}\n}", "function setNumScripts(){\n $jQ('body').attr(vars.nscript,$jQ('script[src]').length);\n $jQ('body').attr(vars.ncss,$jQ('link[href]').length);\n}", "function setGlobalEval( elems, refElements ) {\n\t\tvar i = 0,\n\t\t\tl = elems.length;\n\t\n\t\tfor ( ; i < l; i++ ) {\n\t\t\tdata_priv.set(\n\t\t\t\telems[ i ], \"globalEval\", !refElements || data_priv.get( refElements[ i ], \"globalEval\" )\n\t\t\t);\n\t\t}\n\t}", "function setGlobalEval( elems, refElements ) {\n\t\tvar i = 0,\n\t\t\tl = elems.length;\n\t\n\t\tfor ( ; i < l; i++ ) {\n\t\t\tdata_priv.set(\n\t\t\t\telems[ i ], \"globalEval\", !refElements || data_priv.get( refElements[ i ], \"globalEval\" )\n\t\t\t);\n\t\t}\n\t}", "function setGlobalEval( elems, refElements ) {\n var elem,\n i = 0;\n for ( ; (elem = elems[i]) != null; i++ ) {\n jQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n }\n}", "function setGlobalEval( elems, refElements ) {\n var elem,\n i = 0;\n for ( ; (elem = elems[i]) != null; i++ ) {\n jQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n }\n}", "function setGlobalEval( elems, refElements ) {\n var elem,\n i = 0;\n for ( ; (elem = elems[i]) != null; i++ ) {\n jQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n }\n}", "function setGlobalEval(elems, refElements) {\n var elem,\n i = 0;\n for (; (elem = elems[i]) != null; i++) {\n jQuery._data(elem, \"globalEval\", !refElements || jQuery._data(refElements[i], \"globalEval\"));\n }\n }", "function setGlobalEval(elems, refElements) {\n var elem,\n i = 0;\n for (; ( elem = elems[i] ) != null; i++) {\n jQuery._data(\n elem,\n \"globalEval\",\n !refElements || jQuery._data(refElements[i], \"globalEval\")\n );\n }\n }", "function scriptLoaded(scriptSource, scriptSources, callWhenAllLoaded) {\n\tscriptSources.remove(scriptSource);\n\tif (scriptSources.empty()) {\n\t\tcallWhenAllLoaded();\n\t}\n}", "function stateChange() {\n // Execute as many scripts in order as we can\n\n var pendingScript;\n\n while (pendingScripts[0] && pendingScripts[0].readyState == 'loaded') {\n pendingScript = pendingScripts.shift();\n // avoid future loading events from this script (eg, if src changes)\n pendingScript.onreadystatechange = null;\n // can't just appendChild, old IE bug if element isn't closed\n firstScript.parentNode.insertBefore(pendingScript, firstScript);\n }\n\n }", "function setGlobalEval(elems, refElements) {\n\t\tvar i = 0,\n\t\t l = elems.length;\n\n\t\tfor (; i < l; i++) {\n\t\t\tdataPriv.set(elems[i], \"globalEval\", !refElements || dataPriv.get(refElements[i], \"globalEval\"));\n\t\t}\n\t}", "function setGlobalEval(elems, refElements) {\n\t\tvar i = 0,\n\t\t l = elems.length;\n\n\t\tfor (; i < l; i++) {\n\t\t\tdataPriv.set(elems[i], \"globalEval\", !refElements || dataPriv.get(refElements[i], \"globalEval\"));\n\t\t}\n\t}", "function setGlobalEval(elems, refElements) {\n\t\tvar i = 0,\n\t\t l = elems.length;\n\n\t\tfor (; i < l; i++) {\n\t\t\tdataPriv.set(elems[i], \"globalEval\", !refElements || dataPriv.get(refElements[i], \"globalEval\"));\n\t\t}\n\t}", "function setGlobalEval(elems, refElements) {\n\t\tvar i = 0,\n\t\t l = elems.length;\n\n\t\tfor (; i < l; i++) {\n\t\t\tdataPriv.set(elems[i], \"globalEval\", !refElements || dataPriv.get(refElements[i], \"globalEval\"));\n\t\t}\n\t}", "function setGlobalEval(elems, refElements) {\n\t\tvar elem,\n\t\t i = 0;\n\t\tfor (; (elem = elems[i]) != null; i++) {\n\t\t\tjQuery._data(elem, \"globalEval\", !refElements || jQuery._data(refElements[i], \"globalEval\"));\n\t\t}\n\t}", "function setGlobalEval( elems, refElements ) {\n\t\tvar i = 0,\n\t\t\tl = elems.length;\n\n\t\tfor ( ; i < l; i++ ) {\n\t\t\tdata_priv.set(\n\t\t\t\telems[ i ], \"globalEval\", !refElements || data_priv.get( refElements[ i ], \"globalEval\" )\n\t\t\t);\n\t\t}\n\t}", "function setGlobalEval( elems, refElements ) {\n\t\tvar i = 0,\n\t\t\tl = elems.length;\n\n\t\tfor ( ; i < l; i++ ) {\n\t\t\tdata_priv.set(\n\t\t\t\telems[ i ], \"globalEval\", !refElements || data_priv.get( refElements[ i ], \"globalEval\" )\n\t\t\t);\n\t\t}\n\t}", "function setGlobalEval( elems, refElements ) {\n\t\tvar i = 0,\n\t\t\tl = elems.length;\n\n\t\tfor ( ; i < l; i++ ) {\n\t\t\tdata_priv.set(\n\t\t\t\telems[ i ], \"globalEval\", !refElements || data_priv.get( refElements[ i ], \"globalEval\" )\n\t\t\t);\n\t\t}\n\t}", "function loadScripts(){\n renderer.setIPC();\n inject.uglifyScripts();\n inject.injectScripts();\n}", "function setGlobalEval(elems, refElements) {\n var i = 0,\n l = elems.length;\n\n for (; i < l; i++) {\n data_priv.set(\n elems[i], \"globalEval\", !refElements || data_priv.get(refElements[i], \"globalEval\")\n );\n }\n }", "function setGlobalEval(elems, refElements) {\n var elem,\n i = 0;\n for (;\n (elem = elems[i]) != null; i++) {\n jQuery._data(\n elem,\n \"globalEval\", !refElements || jQuery._data(refElements[i], \"globalEval\")\n );\n }\n }", "function setGlobalEval( elems, refElements ) {\n var i = 0,\n l = elems.length;\n\n for ( ; i < l; i++ ) {\n dataPriv.set(\n elems[ i ],\n \"globalEval\",\n !refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\n );\n }\n }", "function triggerCompiled(){\n return `\n if(curNode.$compiled != true){\n if(curNode.compiledCallback)\n curNode.compiledCallback();\n \n curNode.$compiled = true;\n }\n `;\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}", "function setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\n\t}\n}" ]
[ "0.5987435", "0.5798831", "0.5772783", "0.57142234", "0.5673525", "0.56659687", "0.5592892", "0.5492997", "0.5467838", "0.53731847", "0.5336245", "0.5309647", "0.5303123", "0.52803385", "0.52720535", "0.52717704", "0.52695596", "0.52677536", "0.52672625", "0.52672625", "0.52531016", "0.5244555", "0.5241059", "0.5237981", "0.52378947", "0.52315265", "0.52315265", "0.52314526", "0.52314526", "0.52314526", "0.5228619", "0.52208585", "0.5215757", "0.52150893", "0.5212857", "0.5212857", "0.5212857", "0.5212857", "0.5212799", "0.5207373", "0.5207373", "0.5207373", "0.5205576", "0.52044195", "0.52012235", "0.51982325", "0.51979375", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963", "0.5192963" ]
0.0
-1
Support: IE <=9 only See 13393 for more info
function safeActiveElement() { try { return document.activeElement; } catch ( err ) { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isLowIE9() {\r\n var e = window.navigator.userAgent.toString().toUpperCase();\r\n var flag = false;\r\n if (e.indexOf(\"MSIE\") >= 0) {\r\n\r\n if (e.indexOf(\"MSIE 6.0\") > 0) flag = true;\r\n if (e.indexOf(\"MSIE 7.0\") > 0) flag = true;\r\n if (e.indexOf(\"MSIE 8.0\") > 0) flag = true;\r\n\r\n }\r\n\r\n\r\n return flag;\r\n\r\n }", "function IEcompatibility() {\n\t// Only do anything if this is IE\n\tif(Browser.ie){\n\t\tvar __fix = $$(\"#kbbcode-size-options\", \"#kbbcode-size-options span\", \n\t\t\t\t\t\t\"#kbbcode-colortable\", \"#kbbcode-colortable td\");\n\t\tif (__fix) {\n\t\t\t__fix.setProperty('unselectable', 'on');\n\t\t}\n\t}\n}", "function isIE9() {\n var userAgent = navigator.userAgent.toLowerCase();\n return userAgent.indexOf(\"trident/5.0\") > 0 || userAgent.indexOf(\"msie 9.0\") > 0;\n }", "function isIE9() {\n var userAgent = navigator.userAgent.toLowerCase();\n return userAgent.indexOf(\"trident/5.0\") > 0 || userAgent.indexOf(\"msie 9.0\") > 0;\n }", "function less_IE8() {\n if (/msie [1-8]{1}[^0-9]/.test(navigator.userAgent.toLowerCase())) {\n return true;\n }\n}", "function compIE(){\r\n\tvar agent = navigator.userAgent;\r\n\tif(agent.indexOf(\"MSIE 7.0\") > -1 || agent.indexOf(\"MSIE 8.0\") > - 1 || agent.indexOf(\"Trident 4.0\") > -1 || document.documentMode && document.documentMode <= 5)\r\n\t\treturn true;\r\n\treturn false;\r\n}", "function lpPatch_IE8(){\n\tif (typeof Array.prototype.indexOf !== 'function') {\n\t\tArray.prototype.indexOf = function(obj, start) {\n\t\t for (var i = (start || 0), j = this.length; i < j; i++) {\n\t\t if (this[i] === obj) { return i; }\n\t\t }\n\t\t return -1;\n\t\t} \n\t}\n\t\n\tif(typeof String.prototype.trim !== 'function') {\n\t\tString.prototype.trim = function() {\n\t \treturn this.replace(/^\\s+|\\s+$/g, ''); \n\t\t}\n\t}\t\n}", "function isIE() {\n return navigator.userAgent.toLowerCase().indexOf(\"trident\") > 0;\n }", "function isIE() {\n return navigator.userAgent.toLowerCase().indexOf(\"trident\") > 0;\n }", "function fixIeBug(e){return browser.msie?e.length-e.replace(/\\r*/g,\"\").length:0}", "function Re(e){return!0===Ie(e)&&\"[object Object]\"===Object.prototype.toString.call(e)}", "function autoComplete_func_isIE7() { // Private method\n return navigator.userAgent.indexOf(\"MSIE 7\") > -1 && navigator.userAgent.indexOf(\"Opera\") == -1;\n}", "function fixIE() {\n if (!Array.indexOf) {\n Array.prototype.indexOf = function(arg) {\n var index = -1;\n for (var i = 0; i < this.length; i++){\n var value = this[i];\n if (value == arg) {\n index = i;\n break;\n } \n }\n return index;\n };\n }\n\n if (!window.console) {\n window.console = {};\n window.console.log = window.console.debug = function(message) {\n return;\n var body = document.getElementsByTagName('body')[0];\n var messageDiv = document.createElement('div');\n messageDiv.innerHTML = message;\n body.insertBefore(messageDiv, body.lastChild);\n };\n } \n}", "function autoComplete_func_isIE55() { // Private method\n return navigator.userAgent.indexOf(\"MSIE 5.5\") > -1;\n}", "private internal function m248() {}", "function ie() {\n var ua = window.navigator.userAgent;\n var msie = ua.indexOf(\"MSIE \");\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./))\n return true;\n else\n return false;\n}", "function fixIESelect() {\n return false;\n }", "function seven_isIE () {\n\t\t\tvar myNav = navigator.userAgent.toLowerCase();\n\t\t\treturn (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;\n\t\t}", "function preIE10Check() {\n if (window.attachEvent && !window.navigator.msPointerEnabled) {\n return true;\n } else {\n return false;\n }\n }", "protected internal function m252() {}", "function isIE() {\r\n return (navigator.userAgent.toLowerCase().indexOf('msie ') != -1) || (!!navigator.userAgent.match(/Trident.*rv[:]*11\\./));\r\n}", "function isIE() { //ie?\n if (!!window.ActiveXObject || \"ActiveXObject\" in window)\n return true;\n else\n return false;\n}", "function isIE9OrLower() {\n\t\tvar userAgent = navigator.userAgent.toLowerCase();\n\t\treturn (userAgent.indexOf('msie') != -1) ? parseInt(userAgent.split('msie')[1]) < 10 : false;\n\t}", "function is_IE()\n{\n\tif (navigator.userAgent.indexOf(\"MSIE\")>-1) return true;\n\treturn false\n}", "function isIE() {\n return (navigator.userAgent.toLowerCase().indexOf('msie ') != -1) || (!!navigator.userAgent.match(/Trident.*rv[:]*11\\./));\n}", "function msieversion() {\n var ua = window.navigator.userAgent;\n var msie = ua.indexOf(\"MSIE \");\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./)) { \n var ieVersion = parseInt(ua.substring(msie + 5, ua.indexOf(\".\", msie)));\n if (ieVersion === 9) {$('body').addClass('no-js ie' + ieVersion);}\n return ieVersion;\n }\n else { return false; }\n }", "function msieversion() {\n var ua = window.navigator.userAgent;\n var msie = ua.indexOf(\"MSIE \");\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./)) { \n var ieVersion = parseInt(ua.substring(msie + 5, ua.indexOf(\".\", msie)));\n if (ieVersion === 9) {$('body').addClass('no-js ie' + ieVersion);}\n return ieVersion;\n }\n else { return false; }\n }", "function isLessThanIe9() {\n var b = document.createElement('b');\n b.innerHTML = '<!--[if IE lte 9]><i></i><![endif]-->';\n return b.getElementsByTagName('i').length === 1;\n }", "function isIE() {\n return (navigator.appName == \"Microsoft Internet Explorer\");\n}", "function autoComplete_func_isIE6() { // Private method\n return navigator.userAgent.indexOf(\"MSIE 6\") > -1 && navigator.userAgent.indexOf(\"Opera\") == -1;\n}", "function autoComplete_func_isIE() { // Private method\n return autoComplete_func_isIE5() || autoComplete_func_isIE6() || autoComplete_func_isIE7() ;\n}", "function msieversion() {\r\n var ua = window.navigator.userAgent;\r\n var msie = ua.indexOf(\"MSIE \");\r\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./)) {\r\n var ieVersion = parseInt(ua.substring(msie + 5, ua.indexOf(\".\", msie)));\r\n if (ieVersion === 9) {\r\n $('body').addClass('no-js ie' + ieVersion);\r\n }\r\n return ieVersion;\r\n } else {\r\n return false;\r\n }\r\n }", "function autoComplete_func_isIE5() { // Private method\n return navigator.userAgent.indexOf(\"MSIE 5\") > -1;\n}", "function uTestBrowserIE()\n{\n return (uBrowserID == uIE);\n}", "function isIE () {\n var myNav = navigator.userAgent.toLowerCase();\n return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;\n}", "function isIE () {\n var ms_ie = false;\n var ua = window.navigator.userAgent;\n var old_ie = ua.indexOf('MSIE ');\n var new_ie = ua.indexOf('Trident/');\n\n if ((old_ie > -1) || (new_ie > -1)) {\n ms_ie = true;\n }\n\n return ms_ie ;\n}", "function mg_is_old_IE() {\r\n\t\tif( navigator.appVersion.indexOf(\"MSIE 8.\") != -1 ) {return true;}\r\n\t\telse {return false;}\r\n\t}", "function msieversion() \n{\n\ttry{\n\t var ua = window.navigator.userAgent;\n\t var msie = ua.indexOf(\"MSIE \");\n\t\n\t if (msie > 0) // Check for Internet Explorer\n\t {\n\t \tvar version = parseInt(ua.substring(msie + 5, ua.indexOf(\".\", msie)));\n\t \tif (version < 9) {\n\t \t\treturn true;\n\t \t}\n\t }\n\t} catch (err) {\n\t\t//ignore any error\n\t}\n return false;\n}", "function is_IE() {\n return (window.navigator.userAgent.match(/MSIE|Trident/) !== null);\n}", "IE ():boolean {\n\n\t\treturn this.agent.match(/Trident/i) ? true : false;\n\t}", "function isIE() {\n\t\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t\t}", "function isIE () {\n\tvar myNav = navigator.userAgent.toLowerCase();\n\treturn (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;\n}", "function isIE() {\n\t//Create var for userAgent\n\tuserAg = navigator.userAgent;\n\t//Create var to store return of index of strings\n\tvar is_ie = userAg.indexOf(\"MSIE \") > -1 || userAg.indexOf(\"Trident/\") > -1 || userAg.indexOf(\"Edge\") > -1;\n\t//return result\n\treturn is_ie;\n}", "function isIE()\n{\n return document.all;\n}", "function isIE() {\n\tif (navigator.appName.indexOf(\"Explorer\")>0)\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "function vpb_IE_detected()\n{\n var ua = window.navigator.userAgent;\n var old_ie = ua.indexOf('MSIE ');\n var new_ie = ua.indexOf('Trident/');\n\n if ((old_ie > -1) || (new_ie > -1)) \n\t{\n return true;\n } else {\n\t\treturn false;\n\t}\n}", "isIE() {\n return Boolean(\n (Object.getOwnPropertyDescriptor && Object.getOwnPropertyDescriptor(window, 'ActiveXObject')) ||\n 'ActiveXObject' in window\n )\n }", "static final private internal function m106() {}", "private public function m246() {}", "function isIE() {\n var myNav = navigator.userAgent.toLowerCase();\n return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;\n }", "function isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}", "function isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}", "function isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}", "function isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}", "function isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}", "function isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}", "function isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}", "function isIE () {\n var myNav = navigator.userAgent.toLowerCase();\n return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1], 10) : false;\n }", "function isIE8() {\n if (window.attachEvent && !window.addEventListener) {\n return true;\n } else {\n return false;\n }\n }", "function isBrowserIE () {\n var ua = window.navigator.userAgent\n var msie = ua.indexOf('MSIE ')\n var trident = ua.indexOf('Trident/')\n var edge = ua.indexOf('Edge/')\n if (msie > 0 || trident > 0 || edge > 0) {\n return true\n }\n }", "function isCompatible()\n{\n\tvar ua = window.navigator.userAgent;\n\tvar msie = ua.indexOf(\"MSIE \");\n\tvar isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);\n\tvar isSafari = /Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor);\n\tvar isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;\n\tvar isMSIE = ((msie > 0) || (!!navigator.userAgent.match(/Trident.*rv\\:11\\./)));\n\t\n\tif(isChrome || isSafari)\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "function ieBrowserSupport(){\n\tvar browser = navigator.userAgent;\n\tconsole.log('The Browser you are using is ' + browser);\n}", "function isIe678 () {\n\t\tvar IE = eval('\"v\"==\"\\v\"');\n\t\treturn \tIE;\n\t}", "function isIE() {\n return jQuery.browser.msie;\n }", "function nofx_goodBrowser() {\n //IE6 is the bad browser. IE7 is 'mostly' ok.\n //IE8 FF Chrome Safari are good.\n if (BrowserDetect.browser == 'Explorer' && BrowserDetect.version < 7)\n return false;\n else\n return true;\n}", "_detectBrowserSupport () {\n\t\t\n\t\tvar check = true;\n\n\t\t// nothing below IE9\n\t\tif (!document.addEventListener) check = false;\n\n\t\t// nothing below IE10\n\t\t// if (!window.onpopstate) check = false;\n\n\t\treturn check;\n\t}", "function needsLayeringShim() {\n return isIE && (isWinXP || isWinVista || isWin7);\n}", "function detectIE() {\r\n\tvar ua = window.navigator.userAgent;\r\n\tvar msie = ua.indexOf('MSIE ');\r\n\tif (msie > 0) {\r\n\t\treturn parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\r\n\t}\r\n\tvar trident = ua.indexOf('Trident/');\r\n\tif (trident > 0) {\r\n\t\tvar rv = ua.indexOf('rv:');\r\n\t\treturn parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\r\n\t}\r\n\tvar edge = ua.indexOf('Edge/');\r\n\tif (edge > 0) {\r\n\t\treturn parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\r\n\t}\r\n\treturn false;\r\n}", "function podPress_is_modern_ie() {\r\n\t\tif ( -1 != navigator.userAgent.search(/Trident\\/([0-9]+\\.[0-9]+)/gi) && true == podPress_is_v1_gtoreq_v2(RegExp.$1, '5') && -1 != navigator.userAgent.search(/MSIE\\s([0-9]+\\.[0-9]+)/gi) && true == podPress_is_v1_gtoreq_v2(RegExp.$1, '9') ) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "function checkIeVersion() {\n var ie = gees.tools.internetExplorerVersion();\n if (ie == 7 || ie == 8 || ie == 9) {\n gees.dom.get('name_field').value = 'name';\n gees.dom.get('text_field').value = 'description';\n }\n}", "function alertBadBrowser(){\n var isIE = /*@cc_on!@*/false || !!document.documentMode;\n var isEdge = !isIE && !!window.StyleMedia;\n\n if(isIE||isEdge){\n alert(\"Your browser may cause display problems. You should obtain a modern webkit browser. While some versions of Microsoft Edge work, it can be buggy. Chrome, Firefox, Safari, and Opera all work consistently. Internet Explorer is not supported.\");\n }\n}", "function iedetect(v) {\n\n\t var r = RegExp('msie' + (!isNaN(v) ? ('\\\\s' + v) : ''), 'i');\n\t\treturn r.test(navigator.userAgent);\n\t\t\t\n\t}", "function ie(a){this.ra=a}", "function fixIeBug(string) {\r\n\t\t\t\tif ($.browser.msie) {\r\n\t\t\t\t\treturn string.length - string.replace(/\\r*/g, '').length;\r\n\t\t\t\t}\r\n\t\t\t\treturn 0;\r\n\t\t\t}", "function Le(){!function t(e){Ie[De++]^=255&e,Ie[De++]^=e>>8&255,Ie[De++]^=e>>16&255,Ie[De++]^=e>>24&255,De>=Ue&&(De-=Ue)}((new Date).getTime())}", "function fixIeBug(string) {\n\t\t\t\tif (browser.msie) {\n\t\t\t\t\treturn string.length - string.replace(/\\r*/g, '').length;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}", "function fixIeBug(string) {\n\t\t\t\tif (browser.msie) {\n\t\t\t\t\treturn string.length - string.replace(/\\r*/g, '').length;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}", "function fixIeFlexbox() {\r\n\t\t\t\t\tvar ua = window.navigator.userAgent,\r\n\t\t\t\t\tmsie = ua.indexOf(\"MSIE \");\r\n\t\t\t\t\t(msie > 0 || navigator.userAgent.match(/Trident.*rv\\:11\\./)) && $(\".vc_row-o-full-height\").each(function () {\r\n\t\t\t\t\t\t\"flex\" === $(this).find('> .span_12').css(\"display\") && $(this).wrap('<div class=\"vc_ie-flexbox-fixer\"></div>')\r\n\t\t\t\t\t})\r\n\t\t\t\t}", "transient private protected internal function m182() {}", "function isIE() {\n return Prototype.Browser.IE;\n}", "transient protected internal function m189() {}", "function ie(){this.i=0,this.j=0,this.S=new Array}", "function ie03Clr(){ \r\n\tz_ie03_nav_details_flag = false;\r\n}", "function detectIE() {\n\tvar isie = false;\n\tvar ua = window.navigator.userAgent;\n\tvar msie = ua.indexOf('MSIE ');\n\tvar trident = ua.indexOf('Trident/');\n\tvar edge = ua.indexOf('Edge/');\n\tif (msie > 0) {\n\t\t// IE 10 or older\n\t\tisie = true;\n\t\tvar ieVer = parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n\t} else if (trident > 0) {\n\t\t// IE 11\n\t\tisie = true;\n\t\tvar rv = ua.indexOf('rv:');\n\t\tvar ieVer = parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n\t} else if (edge > 0) {\n\t\t// Edge (IE 12+)\n\t\tisie = true;\n\t\tvar ieVer = parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n\t}\n\tif (isie == true) {\n\t\t$('html').addClass('ie');\n\t\tif (ieVer == 11) $('html').addClass('ie11');\n\t}\n}", "function Oe(){!function t(e){Ie[De++]^=255&e,Ie[De++]^=e>>8&255,Ie[De++]^=e>>16&255,Ie[De++]^=e>>24&255,De>=Le&&(De-=Le)}((new Date).getTime())}", "function DetectBrowser()\n{\n var browserID = navigator.userAgent.toLowerCase(); \n \n if(browserID.indexOf('msie') != -1)\n {\n IE = true;\n FireFox = false;\n IE7 = false;\n }\n \n if(browserID.indexOf('msie 7.0') != -1)\n { \n IE7 = true;\n }\n \n if(browserID.indexOf('firefox') != -1)\n {\n IE = false;\n FireFox = true; \n IE7 = false;\n } \n \n}", "function resizingWindowIsIE()\n{\n\tif (navigator.appName == 'Microsoft Internet Explorer') {\n\t\treturn true;\n\t}\n\treturn false;\n}", "function isInternetExplorer() {\n\t if (typeof navigator === 'undefined') {\n\t return false;\n\t }\n\t\n\t var rv = -1; // Return value assumes failure.\n\t var ua = navigator.userAgent;\n\t if (navigator.appName === 'Microsoft Internet Explorer') {\n\t var re = new RegExp(\"MSIE ([0-9]{1,}[\\.0-9]{0,})\");\n\t if (re.exec(ua) != null)\n\t rv = parseFloat(RegExp.$1);\n\t }\n\t // IE > 11\n\t else if (ua.indexOf(\"Trident\") > -1) {\n\t var re = new RegExp(\"rv:([0-9]{2,2}[\\.0-9]{0,})\");\n\t if (re.exec(ua) !== null) {\n\t rv = parseFloat(RegExp.$1);\n\t }\n\t }\n\t\n\t return rv >= 8;\n\t }", "function isIE() {\n ua = navigator.userAgent;\n /* MSIE used to detect old browsers and Trident used to newer ones*/\n var is_ie = ua.indexOf(\"MSIE \") > -1 || ua.indexOf(\"Trident/\") > -1;\n\n return is_ie;\n}", "function fixIeBug(string) {\n\t\t\t\tif ($.browser.msie) {\n\t\t\t\t\treturn string.length - string.replace(/\\r*/g, '').length;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}", "function fixIeBug(string) {\n\t\t\t\tif ($.browser.msie) {\n\t\t\t\t\treturn string.length - string.replace(/\\r*/g, '').length;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}", "function isIE() {\n let ua = navigator.userAgent;\n /* MSIE used to detect old browsers and Trident used to newer ones*/\n return ua.indexOf(\"MSIE \") > -1 || ua.indexOf(\"Trident/\") > -1;\n}", "function ElemToWindow(elem,dummy){\r\nif(!elem) return null;\r\nvar bod = document.body, doc = document.documentElement, rtl = 0;\r\n\r\nif(elem.getBoundingClientRect && !TGNoIEClientRect){\r\n if(!elem.parentNode) return [0,0]; \r\n var A = elem.getBoundingClientRect();\r\n var x = A.left, y = A.top;\r\n if(BIEStrict || (BMozilla||BOpera)&&BStrict){\r\n x += doc.scrollLeft;\r\n y += doc.scrollTop;\r\n if(!BIEA8) { x -= doc.clientLeft; y -= doc.clientTop; }\r\n \r\n }\r\n else {\r\n if(BChrome){\r\n var B = doc.getBoundingClientRect();\r\n x -= B.left-doc.offsetLeft; y -= B.top-doc.offsetTop;\r\n }\r\n \r\n else {\r\n x += bod.scrollLeft;\r\n y += bod.scrollTop;\r\n }\r\n \r\n if(BSafariMac&&!BSafariWin){\r\n x -= doc.offsetLeft;\r\n y -= doc.offsetTop;\r\n }\r\n else if(!BIE && !BChrome && !BSafariWin){\r\n x += bod.clientLeft;\r\n y += bod.clientTop;\r\n }\r\n }\r\n \r\n return [x/CZoom,y/CZoom];\r\n }\r\nvar x=elem.offsetLeft, y=elem.offsetTop,p,lp = elem;\r\ntry { p = elem.offsetParent; } catch(e){ return [x,y]; } \r\nif(!p) return AbsoluteToWindow(); \r\nif(BIEA){\r\n if(BIEStrict && CZoom!=1 && lp.style.position==\"absolute\"){\r\n x += Math.floor(lp.offsetLeft/CZoom-lp.offsetLeft);\r\n y += Math.floor(lp.offsetTop/CZoom-lp.offsetTop);\r\n }\r\n while(p && p!=doc){ \r\n if(p==bod){ \r\n x+=p.offsetLeft+p.clientLeft;\r\n y+=p.offsetTop+p.clientTop; \r\n break;\r\n }\r\n if((!BIEA8||!BStrict) && p.tagName.toLowerCase()==\"table\"){ \r\n x-=p.clientLeft;\r\n y-=p.clientTop;\r\n }\r\n x+=p.offsetLeft+p.clientLeft-p.scrollLeft;\r\n y+=p.offsetTop+p.clientTop-p.scrollTop; \r\n p = p.offsetParent;\r\n }\r\n if(BIEA8 && BStrict){ x-=bod.clientLeft; y-=bod.clientTop; }\r\n if(BIEStrict && CZoom!=1){\r\n x+=Math.floor(p.offsetLeft/CZoom-p.offsetLeft);\r\n y+=Math.floor(p.offsetTop/CZoom-p.offsetTop);\r\n } \r\n }\r\nelse { \r\n var po = elem;\r\n while(1){\r\n \r\n while(po!=p){\r\n po = po.parentNode;\r\n if(!po || po==bod) break; \r\n \r\n if(po!=bod&&!rtl){\r\n x-=po.scrollLeft;\r\n y-=po.scrollTop;\r\n }\r\n \r\n if((BOpera8 || BOpera&&BOperaVer<9.5)&&po.tagName){\r\n var tag = po.tagName.toLowerCase();\r\n if(tag=='tr'){ y+=po.offsetTop; x+=po.scrollLeft; } \r\n else if(tag=='tbody') x+=po.scrollLeft;\r\n else if(BOpera && tag=='table' && po.style.borderCollapse!='collapse') y+=Math.floor((po.offsetHeight-po.clientHeight)/2); \r\n }\r\n\r\n if(BFF3 && po.tagName){\r\n var tag = po.tagName.toLowerCase();\r\n if(tag==\"td\"){ x+=po.clientLeft; y+=po.clientTop; }\r\n } \r\n if((BIPAD||BSafariWin) && po.tagName){\r\n var tag = po.tagName.toLowerCase();\r\n if(tag==\"table\" || tag==\"td\"){ x+=po.clientLeft; y+=po.clientTop; }\r\n } \r\n }\r\n \r\n if(!p || p==bod) break;\r\n x+=p.offsetLeft;\r\n y+=p.offsetTop;\r\n lp = p; \r\n p = p.offsetParent;\r\n if(p==bod){\r\n var abs = lp.Absolute; if(abs==null){ var s = GetStyle(lp); abs = s.position==\"absolute\"; lp.Absolute = abs; }\r\n if(abs) {\r\n \r\n break;\r\n }\r\n }\r\n }\r\n \r\n if(BOpera8 || BMozilla || BSafariWin || BSafariMac){\r\n var abs = lp.Absolute; if(abs==null){ var s = GetStyle(lp); abs = s.position==\"absolute\"; lp.Absolute = abs; }\r\n if(abs){\r\n var A = AbsoluteToWindow();\r\n x += A[0]; y += A[1]; \r\n return [x,y];\r\n }\r\n if(BMozilla||BSafariWin){\r\n if(doc.marginLeft==null){\r\n var s = GetStyle(doc);\r\n var ml = parseInt(s.marginLeft), mt = parseInt(s.marginTop);\r\n doc.marginLeft = ml?ml:0; doc.marginTop = mt?mt:0;\r\n }\r\n x += doc.marginLeft; y += doc.marginTop;\r\n }\r\n \r\n if(BFF3&&!BStrict){ x -= bod.offsetLeft; y -= bod.offsetTop; }\r\n \r\n if(BSafariMac&&!abs){ x += bod.offsetLeft; y += bod.offsetTop; }\r\n if(BMozilla||BSafariWin){\r\n if(bod.clientLeft==null) {\r\n var s = GetStyle(bod);\r\n var bl = parseInt(s.borderLeftWidth), bt = parseInt(s.borderTopWidth);\r\n bod.clientLeft = bl?bl:0; bod.clientTop = bt?bt:0;\r\n }\r\n x += bod.clientLeft; y += bod.clientTop; \r\n }\r\n if(BOpera8){\r\n x += bod.offsetLeft+bod.clientLeft;\r\n y += bod.offsetTop+bod.clientTop;\r\n }\r\n \r\n } \r\n if(BKonqueror){ x += doc.offsetLeft; y += doc.offsetTop; }\r\n \r\n }\r\n\r\nreturn [x,y];\r\n}", "function isIE() {\n var nav = navigator.userAgent.toLowerCase();\n\n return (nav.indexOf('msie') != -1) ? parseInt(nav.split('msie')[1]) : false;\n }", "function clickIE4(){\nif (event.button==2){\nreturn false;\n}\n}", "function e(a){var q=(a||u).toLowerCase();var B1=/(webkit)[ \\/]([\\w.]+)/;var C1=/(opera)(?:.*version)?[ \\/]([\\w.]+)/;var D1=/(msie) ([\\w.]+)/;var E1=/(trident)\\/[\\w.]+;.*rv:([\\w.]+)/;var F1=/(edge)[ \\/]([\\w.]+)/;var G1=/(mozilla)(?:.*? rv:([\\w.]+))?/;var H1=F1.exec(q)||E1.exec(q)||B1.exec(q)||C1.exec(q)||D1.exec(q)||q.indexOf(\"compatible\")<0&&G1.exec(q)||[];var I1={browser:H1[1]||\"\",version:H1[2]||\"0\"};I1[I1.browser]=true;return I1;}", "function supportOldIE() {\n var oldIeVersion = document && (function() {\n var version = 3,\n div = document.createElement('div'),\n iElems = div.getElementsByTagName('i');\n\n // Keep constructing conditional HTML blocks until we hit one that resolves to an empty fragment\n while (\n div.innerHTML = '<!--[if gt IE ' + (++version) + ']><i></i><![endif]-->',\n iElems[0]\n ) {}\n return version > 4 ? version : undefined;\n }());\n\n if (oldIeVersion < 9) {\n // Support old IE by patching ko.components.register to ensure that we have called\n // document.createElement(componentName) at least once before trying to parse any\n // markup that might use a custom element with that name\n var allCustomComponentNames = [];\n ko.components.register = (function(underlyingRegisterFunc) {\n return function(componentName) {\n allCustomComponentNames.push(componentName);\n underlyingRegisterFunc.apply(this, arguments);\n document.createElement(componentName);\n };\n })(ko.components.register);\n\n // Also to enable custom elements on old IE, we have to call document.createElement(name)\n // on every document fragment that ever gets created. This is especially important\n // if you're also using jQuery, because its parseHTML code works by setting .innerHTML\n // on some element inside a temporary document fragment.\n // It would be nicer if jQuery exposed some API for registering custom element names,\n // but it doesn't.\n document.createDocumentFragment = (function(originalDocumentCreateDocumentFragment) {\n return function() {\n // Note that you *can't* do originalDocumentCreateDocumentFragment.apply(this, arguments)\n // because IE6/7 complain \"object doesn't support this method\". Fortunately the function\n // doesn't take any parameters, and doesn't need a \"this\" value.\n var docFrag = originalDocumentCreateDocumentFragment();\n ko.utils.arrayForEach(allCustomComponentNames, docFrag.createElement.bind(docFrag));\n return docFrag;\n };\n })(document.createDocumentFragment);\n }\n }", "function hasTransparentBug (browser) {\n return ~['ie 8', 'ie 9'].indexOf(browser);\n}", "function ieViewportFix() {\n\n \t\t\tvar msViewportStyle = document.createElement(\"style\");\n\n \t\t\tmsViewportStyle.appendChild(\n \t\t\t\tdocument.createTextNode(\n \t\t\t\t\t\"@-ms-viewport { width: device-width; }\"\n \t\t\t\t)\n \t\t\t);\n \t\t\tif (navigator.userAgent.match(/IEMobile\\/10\\.0/)) {\n\n \t\t\t\tmsViewportStyle.appendChild(\n \t\t\t\t\tdocument.createTextNode(\n \t\t\t\t\t\t\"@-ms-viewport { width: auto !important; }\"\n \t\t\t\t\t)\n \t\t\t\t);\n \t\t\t}\n\n \t\t\tdocument.getElementsByTagName(\"head\")[0].\n \t\t\tappendChild(msViewportStyle);\n \t\t}", "function isInternetExplorer() {\n\t var rv = -1; // Return value assumes failure.\n\t var ua = navigator.userAgent;\n\t if (navigator.appName === 'Microsoft Internet Explorer') {\n\t var re = new RegExp(\"MSIE ([0-9]{1,}[\\.0-9]{0,})\");\n\t if (re.exec(ua) != null)\n\t rv = parseFloat(RegExp.$1);\n\t }\n\t // IE > 11\n\t else if (ua.indexOf(\"Trident\") > -1) {\n\t var re = new RegExp(\"rv:([0-9]{2,2}[\\.0-9]{0,})\");\n\t if (re.exec(ua) !== null) {\n\t rv = parseFloat(RegExp.$1);\n\t }\n\t }\n\t\n\t return rv >= 8;\n\t }", "function isInternetExplorer() {\n\t var rv = -1; // Return value assumes failure.\n\t var ua = navigator.userAgent;\n\t if (navigator.appName === 'Microsoft Internet Explorer') {\n\t var re = new RegExp(\"MSIE ([0-9]{1,}[\\.0-9]{0,})\");\n\t if (re.exec(ua) != null)\n\t rv = parseFloat(RegExp.$1);\n\t }\n\t // IE > 11\n\t else if (ua.indexOf(\"Trident\") > -1) {\n\t var re = new RegExp(\"rv:([0-9]{2,2}[\\.0-9]{0,})\");\n\t if (re.exec(ua) !== null) {\n\t rv = parseFloat(RegExp.$1);\n\t }\n\t }\n\t\n\t return rv >= 8;\n\t }" ]
[ "0.69001865", "0.6632586", "0.66062343", "0.66062343", "0.6462999", "0.63906205", "0.63459784", "0.62986887", "0.62986887", "0.62909245", "0.62504256", "0.6228042", "0.6219376", "0.6161653", "0.61427975", "0.61396265", "0.61259824", "0.61128104", "0.60863733", "0.60849094", "0.605962", "0.6054619", "0.6028715", "0.6021399", "0.59883463", "0.59712404", "0.59712404", "0.5971006", "0.5950688", "0.59400743", "0.59000707", "0.5891824", "0.5877634", "0.58625555", "0.5859248", "0.5852918", "0.58490175", "0.5833666", "0.5819595", "0.58122575", "0.5788302", "0.578652", "0.57863224", "0.57618207", "0.5761523", "0.5760201", "0.57385176", "0.57238024", "0.5715348", "0.57137483", "0.571213", "0.571213", "0.571213", "0.571213", "0.571213", "0.571213", "0.571213", "0.57105404", "0.57059914", "0.56896025", "0.5654365", "0.5643086", "0.56351095", "0.56316257", "0.56289464", "0.5614276", "0.55991083", "0.55949336", "0.55943084", "0.55900216", "0.55899054", "0.5519571", "0.55188864", "0.5514766", "0.5510188", "0.5507523", "0.5507523", "0.5500762", "0.549606", "0.54843557", "0.5483599", "0.5480985", "0.54787767", "0.5478328", "0.5474483", "0.54717714", "0.5466536", "0.5461516", "0.5456279", "0.5450793", "0.5450793", "0.5450697", "0.54460865", "0.54401547", "0.54301614", "0.5427395", "0.5421703", "0.54200035", "0.5394374", "0.53881615", "0.53881615" ]
0.0
-1
Prefer a tbody over its parent table for containing new rows
function manipulationTarget( elem, content ) { if ( nodeName( elem, "table" ) && nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { return jQuery( ">tbody", elem )[ 0 ] || elem; } return elem; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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}", "_createDataRows(tbody) {\r\n const that = this,\r\n rowDetailTemplate = that.rowDetailTemplate,\r\n selection = that.selection,\r\n fragment = document.createDocumentFragment(),\r\n hierarchical = that.hasAttribute('hierarchy');\r\n\r\n for (let i = 0; i < that.rows.length; i++) {\r\n const rowObject = that.rows[i],\r\n data = rowObject.data;\r\n\r\n if (data.groupDataField) {\r\n that._createGroupHeader(data, selection, fragment);\r\n continue;\r\n }\r\n\r\n const id = data.$.id,\r\n rowElement = document.createElement('tr');\r\n let colspan = 0;\r\n\r\n rowElement.setAttribute('aria-rowindex', data.$.index + 1);\r\n\r\n if (selection) {\r\n const selectionTd = document.createElement('td'),\r\n selected = that._selectedIds.indexOf(id) !== -1;\r\n\r\n selectionTd.className = `smart-table-select-row freeze-near${selected ? ' selected' : ''}`;\r\n selectionTd.innerHTML = '<div class=\"selection-checkbox\"></div>';\r\n selectionTd.setAttribute('aria-colindex', 1);\r\n rowElement.appendChild(selectionTd);\r\n rowElement.setAttribute('aria-selected', selected);\r\n colspan++;\r\n }\r\n\r\n for (let j = 0; j < that._columns.length; j++) {\r\n const td = document.createElement('td'),\r\n column = that._columns[j];\r\n\r\n td.setAttribute('data-field', column.dataField);\r\n td.setAttribute('aria-colindex', j + 1 + (+selection));\r\n\r\n let value = that._formatCellValue(rowObject, column, td),\r\n isTreeCell;\r\n\r\n if (column.freeze) {\r\n td.classList.add('freeze-' + (column.freeze === 'far' ? 'far' : 'near'));\r\n }\r\n\r\n if (column.responsivePriority) {\r\n td.classList.add('priority-' + column.responsivePriority);\r\n }\r\n\r\n if (column.allowEdit === false) {\r\n td.classList.add('no-edit');\r\n td.setAttribute('aria-readonly', true);\r\n }\r\n\r\n if (j === 0 && hierarchical) {\r\n const childrenFiltered = that._areChildrenFiltered(data);\r\n\r\n if (!data.leaf) {\r\n td.classList.add('tree-cell');\r\n isTreeCell = childrenFiltered;\r\n }\r\n\r\n if (data.level) {\r\n td.classList.add('outline-level-' + Math.min(data.level, 10));\r\n\r\n if (data.leaf || !childrenFiltered) {\r\n td.classList.add('tree-leaf');\r\n }\r\n }\r\n }\r\n\r\n that._setCellContent(td, value, isTreeCell);\r\n\r\n if (that.onCellRender) {\r\n that.onCellRender(data, column.dataField, data[column.dataField], td);\r\n }\r\n\r\n that._applyConditionalFormattingToCell(td, column.dataField, data.$.index);\r\n\r\n rowElement.appendChild(td);\r\n colspan++;\r\n }\r\n\r\n rowElement.data = data;\r\n rowElement.setAttribute('row-id', id);\r\n\r\n if (that._disabledSelection.indexOf(id) !== -1) {\r\n rowElement.removeAttribute('aria-selected');\r\n rowElement.classList.add('disable-select');\r\n }\r\n\r\n if (data.expanded) {\r\n rowElement.setAttribute('aria-expanded', true);\r\n rowElement.classList.add('expanded');\r\n }\r\n\r\n if (data.level && that._isCollapsed(data)) {\r\n rowElement.setAttribute('aria-hidden', true);\r\n rowElement.classList.add('collapsed', 'smart-hidden');\r\n }\r\n\r\n fragment.appendChild(rowElement);\r\n\r\n if (rowDetailTemplate) {\r\n const detailTr = document.createElement('tr');\r\n\r\n detailTr.className = 'smart-table-row-detail';\r\n\r\n if (that._expandedIds.indexOf(id) === -1) {\r\n detailTr.setAttribute('aria-hidden', true);\r\n detailTr.classList.add('collapsed');\r\n }\r\n\r\n detailTr.innerHTML = `<td colspan=\"${colspan}\"><div class=\"smart-table-detail-container\">${that._applyRowDetailTemplate(rowObject)}</div></td>`;\r\n fragment.appendChild(detailTr);\r\n }\r\n }\r\n\r\n fragment.appendChild(that._createLastRow());\r\n tbody.appendChild(fragment);\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}", "__$$getRawTbodyTrs() {\n\t\tconst tbody = _.chain(arrify(this.props.children))\n\t\t\t\t.filter(c => c.type == 'tbody')\n\t\t\t\t.last()\n\t\t\t\t.value() || <tbody></tbody>\n\n\t\treturn _.chain(arrify(tbody.props.children))\n\t\t\t.filter(c => c.type == 'tr')\n\t\t\t.value()\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 }", "function clearTableBody() {\n $('#data-table').find('tbody').replaceWith(document.createElement('tbody'));\n}", "_completeTableIfNeed() {\n const body = this.wwe.getEditor().getBody();\n\n toArray(body.children).forEach(node => {\n if (!this.isTableOrSubTableElement(node.nodeName)) {\n return;\n }\n\n if (node.nodeName === 'TABLE' && !node.querySelector('tbody')) {\n domUtils.remove(node);\n } else {\n this._completeIncompleteTable(node);\n }\n });\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 }", "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 }", "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}", "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}", "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}", "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 }", "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 }", "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}", "function manipulationTarget( elem, content ) {\n return jQuery.nodeName( elem, \"table\" ) &&\n jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, \"tr\" ) ?\n\n elem.getElementsByTagName(\"tbody\")[0] ||\n elem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n elem;\n}", "function manipulationTarget( elem, content ) {\n return jQuery.nodeName( elem, \"table\" ) &&\n jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, \"tr\" ) ?\n\n elem.getElementsByTagName(\"tbody\")[0] ||\n elem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n elem;\n}", "function manipulationTarget( elem, content ) {\r\n\treturn jQuery.nodeName( elem, \"table\" ) &&\r\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\r\n\r\n\t\telem.getElementsByTagName( \"tbody\" )[ 0 ] ||\r\n\t\t\telem.appendChild( elem.ownerDocument.createElement( \"tbody\" ) ) :\r\n\t\telem;\r\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 }", "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 }", "function manipulationTarget( elem, content ) {\n\t\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\t\n\t\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\t\telem;\n\t}", "function manipulationTarget( elem, content ) {\n\t\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\t\n\t\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\t\telem;\n\t}", "function newTbody(id) {\n let newTbody = document.createElement('tbody');\n newTbody.id = id;\n let oldTbody = document.getElementById(id);\n oldTbody.parentNode.replaceChild(newTbody, oldTbody);\n}", "addRows() {\n if (this._data.constructor !== Array)\n throw TypeError('data property of table is not an array');\n\n this._data.forEach((item) => {\n\n if (item.constructor !== this._rowItemType)\n throw TypeError('invalid item type for table row');\n\n let $tr = $('<tr>');\n\n for (const prop in item) {\n let $td = $('<td>');\n $td.html(item[prop]);\n $tr.append($td);\n }\n\n this._body.append($tr);\n })\n }", "function manipulationTarget(elem, content) {\n return jQuery.nodeName(elem, \"table\") && jQuery.nodeName(content.nodeType === 1 ? content : content.firstChild, \"tr\") ?\n\n elem.getElementsByTagName(\"tbody\")[0] || elem.appendChild(elem.ownerDocument.createElement(\"tbody\")) : elem;\n }", "function manipulationTarget( elem, content ) {\n\t\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\t\telem;\n\t}", "function manipulationTarget( elem, content ) {\n\t\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\t\telem;\n\t}", "function manipulationTarget( elem, content ) {\n\t\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\t\telem;\n\t}", "function manipulationTarget( elem, content ) {\n\t\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\t\telem;\n\t}", "function manipulationTarget( elem, content ) {\n\t\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\t\telem;\n\t}", "buildBody() {\n let body = document.createElement('tbody');\n body.setAttribute('style', 'vertical-align: top');\n body.addEventListener('click', Table.cbToggleUserDetails, false);\n\n for (let i = 0; i < this.sortedData.length; i++) {\n let row = this.buildRow(this.sortedData[i]);\n\n body.appendChild(row);\n }\n\n return body;\n }", "_reorderRows(){const body=this.$.items,items=body.querySelectorAll(\"tr\");if(!items.length){return}const adjustedVirtualStart=this._virtualStart+this._vidxOffset,targetRow=this._rowWithFocusedElement||Array.from(items).filter(row=>!row.hidden)[0];// Which row to use as a target?\nif(!targetRow){// All rows are hidden, don't reorder\nreturn}// Where the target row should be?\nconst targetPhysicalIndex=targetRow.index-adjustedVirtualStart,delta=Array.from(items).indexOf(targetRow)-targetPhysicalIndex;// Reodrer the DOM elements to keep the target row at the target physical index\nif(0<delta){for(let i=0;i<delta;i++){body.appendChild(items[i])}}else if(0>delta){for(let i=items.length+delta;i<items.length;i++){body.insertBefore(items[i],items[0])}}}", "static get_table_rows(table_body) {\n\n let first_row = $(table_body).find(\"tr\")[0];\n let rows = $(first_row).siblings();\n\n let table_rows = [\n $(first_row)\n ];\n\n rows.each(function(index, row) {\n table_rows.push($(row));\n });\n\n return table_rows;\n }", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}", "function manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}" ]
[ "0.7107587", "0.7010916", "0.6952618", "0.67297685", "0.6453712", "0.6438194", "0.6407297", "0.6404014", "0.63836247", "0.6368428", "0.6368428", "0.63280684", "0.6327325", "0.6327325", "0.6292218", "0.62868154", "0.62868154", "0.6276107", "0.6218812", "0.62149054", "0.6211464", "0.6211464", "0.6192279", "0.6192275", "0.61793107", "0.6176227", "0.6176227", "0.6176227", "0.6176227", "0.6176227", "0.61642605", "0.61634195", "0.6157031", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847", "0.61504847" ]
0.0
-1
Replace/restore the type attribute of script elements for safe DOM manipulation
function disableScript( elem ) { elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; return elem; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disableScript( elem ) {\r\n\tvar attr = elem.getAttributeNode(\"type\");\r\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\r\n\treturn elem;\r\n}", "function disableScript( elem ) {\n\tvar attr = elem.getAttributeNode(\"type\");\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\tvar attr = elem.getAttributeNode(\"type\");\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\tvar attr = elem.getAttributeNode(\"type\");\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\tvar attr = elem.getAttributeNode(\"type\");\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\tvar attr = elem.getAttributeNode(\"type\");\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\tvar attr = elem.getAttributeNode(\"type\");\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\tvar attr = elem.getAttributeNode(\"type\");\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\tvar attr = elem.getAttributeNode(\"type\");\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\tvar attr = elem.getAttributeNode(\"type\");\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\tvar attr = elem.getAttributeNode(\"type\");\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript(elem) {\n elem.type = (jQuery.find.attr(elem, \"type\") !== null) + \"/\" + elem.type;\n return elem;\n }", "function disableScript(elem) {\r\n\t\telem.type = (jQuery.find.attr(elem, \"type\") !== null) + \"/\" + elem.type;\r\n\t\treturn elem;\r\n\t}", "function manipulationTarget(elem,content){if(nodeName(elem,\"table\")&&nodeName(content.nodeType!==11?content:content.firstChild,\"tr\")){return jQuery(\">tbody\",elem)[0]||elem;}return elem;}// Replace/restore the type attribute of script elements for safe DOM manipulation", "function disableScript( elem ) {\n elem.type = (jQuery.find.attr( elem, \"type\" ) !== null) + \"/\" + elem.type;\n return elem;\n}", "function disableScript( elem ) {\n elem.type = (jQuery.find.attr( elem, \"type\" ) !== null) + \"/\" + elem.type;\n return elem;\n}", "function disableScript( elem ) {\n elem.type = (jQuery.find.attr( elem, \"type\" ) !== null) + \"/\" + elem.type;\n return elem;\n}", "function disableScript(elem) {\n elem.type = ( jQuery.find.attr(elem, \"type\") !== null ) + \"/\" + elem.type;\n return elem;\n }", "function disableScript(elem) {\n\t\telem.type = (jQuery.find.attr(elem, \"type\") !== null) + \"/\" + elem.type;\n\t\treturn elem;\n\t}", "function disableScript( elem ) {\n\tvar attr = elem.getAttributeNode( \"type\" );\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript(elem) {\n elem.type = (jQuery.find.attr(elem, \"type\") !== null) + \"/\" + elem.type;\n return elem;\n }", "function disableScript( elem ) { // 5645\n\telem.type = ( elem.getAttribute( \"type\" ) !== null ) + \"/\" + elem.type; // 5646\n\treturn elem; // 5647\n} // 5648", "function disableScript(elem) {\n elem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n return elem;\n }", "function disableScript( elem ) {\n elem.type = (jQuery.find.attr( elem, \"type\" ) !== null) + \"/\" + elem.type;\n return elem;\n}", "function manipulationTarget(elem,content){return jQuery.nodeName(elem,\"table\")&&jQuery.nodeName(content.nodeType!==11?content:content.firstChild,\"tr\")?elem.getElementsByTagName(\"tbody\")[0]||elem.appendChild(elem.ownerDocument.createElement(\"tbody\")):elem;}// Replace/restore the type attribute of script elements for safe DOM manipulation", "function disableScript( elem ) {\n elem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n return elem;\n }", "function manipulationTarget(elem,content){return jQuery.nodeName(elem,\"table\")&&jQuery.nodeName(content.nodeType===1?content:content.firstChild,\"tr\")?elem.getElementsByTagName(\"tbody\")[0]||elem.appendChild(elem.ownerDocument.createElement(\"tbody\")):elem;}// Replace/restore the type attribute of script elements for safe DOM manipulation", "function disableScript( elem ) {\n\t\telem.type = (jQuery.find.attr( elem, \"type\" ) !== null) + \"/\" + elem.type;\n\t\treturn elem;\n\t}", "function disableScript( elem ) {\n\t\telem.type = (jQuery.find.attr( elem, \"type\" ) !== null) + \"/\" + elem.type;\n\t\treturn elem;\n\t}", "function disableScript( elem ) {\n elem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n return elem;\n}", "function disableScript( elem ) {\n elem.type = (jQuery.find.attr( elem, \"type\" ) !== null) + \"/\" + elem.type;\n return elem;\n }", "function disableScript(elem) {\n\t\telem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n\t\treturn elem;\n\t}", "function disableScript(elem) {\n\t\telem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n\t\treturn elem;\n\t}", "function disableScript(elem) {\n\t\telem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n\t\treturn elem;\n\t}", "function disableScript(elem) {\n\t\telem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n\t\treturn elem;\n\t}", "function disableScript(elem) {\n elem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n return elem;\n }", "function disableScript(elem) {\n elem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n return elem;\n }", "function disableScript(elem) {\n elem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n return elem;\n }", "function disableScript(elem) {\n elem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n return elem;\n }", "function disableScript(elem) {\n elem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n return elem;\n }", "function disableScript(elem) {\n elem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n return elem;\n }", "function disableScript(elem) {\n elem.type = ( elem.getAttribute(\"type\") !== null ) + \"/\" + elem.type;\n return elem;\n }", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\t\telem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n\t\treturn elem;\n\t}", "function disableScript( elem ) {\n\t\telem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n\t\treturn elem;\n\t}", "function disableScript( elem ) {\n\t\telem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n\t\treturn elem;\n\t}", "function disableScript( elem ) {\n\t\telem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n\t\treturn elem;\n\t}", "function disableScript( elem ) {\n\t\telem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n\t\treturn elem;\n\t}", "function disableScript( elem ) {\n\telem.type = (jQuery.find.attr( elem, \"type\" ) !== null) + \"/\" + elem.type;\n\treturn elem;\n}", "function disableScript( elem ) {\n\telem.type = (jQuery.find.attr( elem, \"type\" ) !== null) + \"/\" + elem.type;\n\treturn elem;\n}" ]
[ "0.7015873", "0.69847023", "0.69847023", "0.69847023", "0.69847023", "0.69847023", "0.69847023", "0.69847023", "0.69847023", "0.69847023", "0.69847023", "0.69413453", "0.6936604", "0.68999", "0.6887315", "0.6887315", "0.6887315", "0.6885814", "0.68844295", "0.68820846", "0.6873718", "0.686655", "0.68660045", "0.68623", "0.6860073", "0.6855526", "0.6817464", "0.681721", "0.681721", "0.6813933", "0.6813071", "0.68094015", "0.68094015", "0.68094015", "0.68094015", "0.67955786", "0.67955786", "0.67955786", "0.67955786", "0.67955786", "0.67955786", "0.67860657", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6775435", "0.6755662", "0.6755662", "0.6755662", "0.6755662", "0.6755662", "0.6755044", "0.6755044" ]
0.0
-1
Fix IE bugs, see support tests
function fixInput( src, dest ) { var nodeName = dest.nodeName.toLowerCase(); // Fails to persist the checked state of a cloned checkbox or radio button. if ( nodeName === "input" && rcheckableType.test( src.type ) ) { dest.checked = src.checked; // Fails to return the selected option to the default selected state when cloning options } else if ( nodeName === "input" || nodeName === "textarea" ) { dest.defaultValue = src.defaultValue; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function IEcompatibility() {\n\t// Only do anything if this is IE\n\tif(Browser.ie){\n\t\tvar __fix = $$(\"#kbbcode-size-options\", \"#kbbcode-size-options span\", \n\t\t\t\t\t\t\"#kbbcode-colortable\", \"#kbbcode-colortable td\");\n\t\tif (__fix) {\n\t\t\t__fix.setProperty('unselectable', 'on');\n\t\t}\n\t}\n}", "function fixIESelect() {\n return false;\n }", "function fixIE() {\n if (!Array.indexOf) {\n Array.prototype.indexOf = function(arg) {\n var index = -1;\n for (var i = 0; i < this.length; i++){\n var value = this[i];\n if (value == arg) {\n index = i;\n break;\n } \n }\n return index;\n };\n }\n\n if (!window.console) {\n window.console = {};\n window.console.log = window.console.debug = function(message) {\n return;\n var body = document.getElementsByTagName('body')[0];\n var messageDiv = document.createElement('div');\n messageDiv.innerHTML = message;\n body.insertBefore(messageDiv, body.lastChild);\n };\n } \n}", "function lpPatch_IE8(){\n\tif (typeof Array.prototype.indexOf !== 'function') {\n\t\tArray.prototype.indexOf = function(obj, start) {\n\t\t for (var i = (start || 0), j = this.length; i < j; i++) {\n\t\t if (this[i] === obj) { return i; }\n\t\t }\n\t\t return -1;\n\t\t} \n\t}\n\t\n\tif(typeof String.prototype.trim !== 'function') {\n\t\tString.prototype.trim = function() {\n\t \treturn this.replace(/^\\s+|\\s+$/g, ''); \n\t\t}\n\t}\t\n}", "function less_IE8() {\n if (/msie [1-8]{1}[^0-9]/.test(navigator.userAgent.toLowerCase())) {\n return true;\n }\n}", "function fixIeBug(e){return browser.msie?e.length-e.replace(/\\r*/g,\"\").length:0}", "function compIE(){\r\n\tvar agent = navigator.userAgent;\r\n\tif(agent.indexOf(\"MSIE 7.0\") > -1 || agent.indexOf(\"MSIE 8.0\") > - 1 || agent.indexOf(\"Trident 4.0\") > -1 || document.documentMode && document.documentMode <= 5)\r\n\t\treturn true;\r\n\treturn false;\r\n}", "function isIE() {\n return navigator.userAgent.toLowerCase().indexOf(\"trident\") > 0;\n }", "function isIE() {\n return navigator.userAgent.toLowerCase().indexOf(\"trident\") > 0;\n }", "function seven_isIE () {\n\t\t\tvar myNav = navigator.userAgent.toLowerCase();\n\t\t\treturn (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;\n\t\t}", "function mg_is_old_IE() {\r\n\t\tif( navigator.appVersion.indexOf(\"MSIE 8.\") != -1 ) {return true;}\r\n\t\telse {return false;}\r\n\t}", "function isLowIE9() {\r\n var e = window.navigator.userAgent.toString().toUpperCase();\r\n var flag = false;\r\n if (e.indexOf(\"MSIE\") >= 0) {\r\n\r\n if (e.indexOf(\"MSIE 6.0\") > 0) flag = true;\r\n if (e.indexOf(\"MSIE 7.0\") > 0) flag = true;\r\n if (e.indexOf(\"MSIE 8.0\") > 0) flag = true;\r\n\r\n }\r\n\r\n\r\n return flag;\r\n\r\n }", "function fixIeFlexbox() {\r\n\t\t\t\t\tvar ua = window.navigator.userAgent,\r\n\t\t\t\t\tmsie = ua.indexOf(\"MSIE \");\r\n\t\t\t\t\t(msie > 0 || navigator.userAgent.match(/Trident.*rv\\:11\\./)) && $(\".vc_row-o-full-height\").each(function () {\r\n\t\t\t\t\t\t\"flex\" === $(this).find('> .span_12').css(\"display\") && $(this).wrap('<div class=\"vc_ie-flexbox-fixer\"></div>')\r\n\t\t\t\t\t})\r\n\t\t\t\t}", "function preIE10Check() {\n if (window.attachEvent && !window.navigator.msPointerEnabled) {\n return true;\n } else {\n return false;\n }\n }", "function Re(e){return!0===Ie(e)&&\"[object Object]\"===Object.prototype.toString.call(e)}", "function detectIE() {\n if (navigator.userAgent.indexOf(\"MSIE\") >= 0) {\n window.location = \"/static/badbrowser.html\";\n }\n return false;\n}", "function checkIeVersion() {\n var ie = gees.tools.internetExplorerVersion();\n if (ie == 7 || ie == 8 || ie == 9) {\n gees.dom.get('name_field').value = 'name';\n gees.dom.get('text_field').value = 'description';\n }\n}", "function autoComplete_func_isIE55() { // Private method\n return navigator.userAgent.indexOf(\"MSIE 5.5\") > -1;\n}", "function isIE() {\r\n return (navigator.userAgent.toLowerCase().indexOf('msie ') != -1) || (!!navigator.userAgent.match(/Trident.*rv[:]*11\\./));\r\n}", "function isIE() {\n return (navigator.userAgent.toLowerCase().indexOf('msie ') != -1) || (!!navigator.userAgent.match(/Trident.*rv[:]*11\\./));\n}", "function _overflowFixAdd() { ($.browser.msie) ? $(\"body, html\").css({ overflowX: 'visible' }) : $(\"body\").css({ overflowX: 'visible' }); }", "function isIE () {\n var myNav = navigator.userAgent.toLowerCase();\n return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;\n}", "function is_IE()\n{\n\tif (navigator.userAgent.indexOf(\"MSIE\")>-1) return true;\n\treturn false\n}", "function autoComplete_func_isIE7() { // Private method\n return navigator.userAgent.indexOf(\"MSIE 7\") > -1 && navigator.userAgent.indexOf(\"Opera\") == -1;\n}", "function ie() {\n var ua = window.navigator.userAgent;\n var msie = ua.indexOf(\"MSIE \");\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./))\n return true;\n else\n return false;\n}", "function isIE() { //ie?\n if (!!window.ActiveXObject || \"ActiveXObject\" in window)\n return true;\n else\n return false;\n}", "function StupidBug() {}", "function msieversion() {\n var ua = window.navigator.userAgent;\n var msie = ua.indexOf(\"MSIE \");\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./)) { \n var ieVersion = parseInt(ua.substring(msie + 5, ua.indexOf(\".\", msie)));\n if (ieVersion === 9) {$('body').addClass('no-js ie' + ieVersion);}\n return ieVersion;\n }\n else { return false; }\n }", "function msieversion() {\n var ua = window.navigator.userAgent;\n var msie = ua.indexOf(\"MSIE \");\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./)) { \n var ieVersion = parseInt(ua.substring(msie + 5, ua.indexOf(\".\", msie)));\n if (ieVersion === 9) {$('body').addClass('no-js ie' + ieVersion);}\n return ieVersion;\n }\n else { return false; }\n }", "function supportOldIE() {\n var oldIeVersion = document && (function() {\n var version = 3,\n div = document.createElement('div'),\n iElems = div.getElementsByTagName('i');\n\n // Keep constructing conditional HTML blocks until we hit one that resolves to an empty fragment\n while (\n div.innerHTML = '<!--[if gt IE ' + (++version) + ']><i></i><![endif]-->',\n iElems[0]\n ) {}\n return version > 4 ? version : undefined;\n }());\n\n if (oldIeVersion < 9) {\n // Support old IE by patching ko.components.register to ensure that we have called\n // document.createElement(componentName) at least once before trying to parse any\n // markup that might use a custom element with that name\n var allCustomComponentNames = [];\n ko.components.register = (function(underlyingRegisterFunc) {\n return function(componentName) {\n allCustomComponentNames.push(componentName);\n underlyingRegisterFunc.apply(this, arguments);\n document.createElement(componentName);\n };\n })(ko.components.register);\n\n // Also to enable custom elements on old IE, we have to call document.createElement(name)\n // on every document fragment that ever gets created. This is especially important\n // if you're also using jQuery, because its parseHTML code works by setting .innerHTML\n // on some element inside a temporary document fragment.\n // It would be nicer if jQuery exposed some API for registering custom element names,\n // but it doesn't.\n document.createDocumentFragment = (function(originalDocumentCreateDocumentFragment) {\n return function() {\n // Note that you *can't* do originalDocumentCreateDocumentFragment.apply(this, arguments)\n // because IE6/7 complain \"object doesn't support this method\". Fortunately the function\n // doesn't take any parameters, and doesn't need a \"this\" value.\n var docFrag = originalDocumentCreateDocumentFragment();\n ko.utils.arrayForEach(allCustomComponentNames, docFrag.createElement.bind(docFrag));\n return docFrag;\n };\n })(document.createDocumentFragment);\n }\n }", "function isIE() {\n\t\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t\t}", "function podPress_is_modern_ie() {\r\n\t\tif ( -1 != navigator.userAgent.search(/Trident\\/([0-9]+\\.[0-9]+)/gi) && true == podPress_is_v1_gtoreq_v2(RegExp.$1, '5') && -1 != navigator.userAgent.search(/MSIE\\s([0-9]+\\.[0-9]+)/gi) && true == podPress_is_v1_gtoreq_v2(RegExp.$1, '9') ) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "function fixIeBug(string) {\n\t\t\t\tif (browser.msie) {\n\t\t\t\t\treturn string.length - string.replace(/\\r*/g, '').length;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}", "function fixIeBug(string) {\n\t\t\t\tif (browser.msie) {\n\t\t\t\t\treturn string.length - string.replace(/\\r*/g, '').length;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}", "function msieversion() {\r\n var ua = window.navigator.userAgent;\r\n var msie = ua.indexOf(\"MSIE \");\r\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./)) {\r\n var ieVersion = parseInt(ua.substring(msie + 5, ua.indexOf(\".\", msie)));\r\n if (ieVersion === 9) {\r\n $('body').addClass('no-js ie' + ieVersion);\r\n }\r\n return ieVersion;\r\n } else {\r\n return false;\r\n }\r\n }", "function vpb_IE_detected()\n{\n var ua = window.navigator.userAgent;\n var old_ie = ua.indexOf('MSIE ');\n var new_ie = ua.indexOf('Trident/');\n\n if ((old_ie > -1) || (new_ie > -1)) \n\t{\n return true;\n } else {\n\t\treturn false;\n\t}\n}", "function isIE() {\n return jQuery.browser.msie;\n }", "function isIE () {\n\tvar myNav = navigator.userAgent.toLowerCase();\n\treturn (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;\n}", "function fixIeBug(string) {\r\n\t\t\t\tif ($.browser.msie) {\r\n\t\t\t\t\treturn string.length - string.replace(/\\r*/g, '').length;\r\n\t\t\t\t}\r\n\t\t\t\treturn 0;\r\n\t\t\t}", "function isIE() {\n var myNav = navigator.userAgent.toLowerCase();\n return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;\n }", "function autoComplete_func_isIE6() { // Private method\n return navigator.userAgent.indexOf(\"MSIE 6\") > -1 && navigator.userAgent.indexOf(\"Opera\") == -1;\n}", "function fixIeBug(string) {\n\t\t\t\tif ($.browser.msie) {\n\t\t\t\t\treturn string.length - string.replace(/\\r*/g, '').length;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}", "function fixIeBug(string) {\n\t\t\t\tif ($.browser.msie) {\n\t\t\t\t\treturn string.length - string.replace(/\\r*/g, '').length;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}", "function isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}", "function isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}", "function isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}", "function isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}", "function isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}", "function isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}", "function isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}", "function isIE () {\n var myNav = navigator.userAgent.toLowerCase();\n return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1], 10) : false;\n }", "function uTestBrowserIE()\n{\n return (uBrowserID == uIE);\n}", "function autoComplete_func_isIE() { // Private method\n return autoComplete_func_isIE5() || autoComplete_func_isIE6() || autoComplete_func_isIE7() ;\n}", "function is_IE() {\n return (window.navigator.userAgent.match(/MSIE|Trident/) !== null);\n}", "function fixIEMouseDown() {\n _ieSelectBack = doc.body.onselectstart;\n doc.body.onselectstart = fixIESelect;\n }", "function nofx_goodBrowser() {\n //IE6 is the bad browser. IE7 is 'mostly' ok.\n //IE8 FF Chrome Safari are good.\n if (BrowserDetect.browser == 'Explorer' && BrowserDetect.version < 7)\n return false;\n else\n return true;\n}", "private internal function m248() {}", "function ieViewportFix() {\n\n \t\t\tvar msViewportStyle = document.createElement(\"style\");\n\n \t\t\tmsViewportStyle.appendChild(\n \t\t\t\tdocument.createTextNode(\n \t\t\t\t\t\"@-ms-viewport { width: device-width; }\"\n \t\t\t\t)\n \t\t\t);\n \t\t\tif (navigator.userAgent.match(/IEMobile\\/10\\.0/)) {\n\n \t\t\t\tmsViewportStyle.appendChild(\n \t\t\t\t\tdocument.createTextNode(\n \t\t\t\t\t\t\"@-ms-viewport { width: auto !important; }\"\n \t\t\t\t\t)\n \t\t\t\t);\n \t\t\t}\n\n \t\t\tdocument.getElementsByTagName(\"head\")[0].\n \t\t\tappendChild(msViewportStyle);\n \t\t}", "function isIE() {\n return (navigator.appName == \"Microsoft Internet Explorer\");\n}", "function checkVersion() {\n\t\tvar msg = \"You're not using Internet Explorer.\";\n\t\tvar ver = getInternetExplorerVersion();\n\t\tif ( ver > -1 ) {\n\t\t\tif ( ver >= 8.0 ) {\n\t\t\t\tmsg = \"You're using a recent copy of Internet Explorer.\"\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmsg = \"You should upgrade your copy of Internet Explorer.\";\n\t\t\t}\n\t\t}\n\t\tconsole.log( msg );\n\t}", "function isIE () {\n var ms_ie = false;\n var ua = window.navigator.userAgent;\n var old_ie = ua.indexOf('MSIE ');\n var new_ie = ua.indexOf('Trident/');\n\n if ((old_ie > -1) || (new_ie > -1)) {\n ms_ie = true;\n }\n\n return ms_ie ;\n}", "function autoComplete_func_isIE5() { // Private method\n return navigator.userAgent.indexOf(\"MSIE 5\") > -1;\n}", "function manageIconIE(icon) {\r\n\t\t\t\tif($.browser.msie) {\r\n\t\t\t\t\t$('.'+icon).html('');\r\n\t\t\t\t\t$('.'+icon+' > .empty').hide();\r\n\t\t\t\t}\r\n\t\t\t}", "function detectIE() {\r\n\tvar ua = window.navigator.userAgent;\r\n\tvar msie = ua.indexOf('MSIE ');\r\n\tif (msie > 0) {\r\n\t\treturn parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\r\n\t}\r\n\tvar trident = ua.indexOf('Trident/');\r\n\tif (trident > 0) {\r\n\t\tvar rv = ua.indexOf('rv:');\r\n\t\treturn parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\r\n\t}\r\n\tvar edge = ua.indexOf('Edge/');\r\n\tif (edge > 0) {\r\n\t\treturn parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\r\n\t}\r\n\treturn false;\r\n}", "function needsLayeringShim() {\n return isIE && (isWinXP || isWinVista || isWin7);\n}", "function preventCompatibilityIssues(){\t\n\t/* Add trim() function for IE*/\n\tif(typeof String.prototype.trim !== 'function') {\n\t\t String.prototype.trim = function() {\n\t\t return this.replace(/^\\s+|\\s+$/g, ''); \n\t\t }\n\t}\n\t\n\t/**\n\t * Protect window.console method calls, e.g. console is not defined on IE\n\t * unless dev tools are open, and IE doesn't define console.debug\n\t */\n\t(function() {\n\t if (!window.console) {\n\t window.console = {};\n\t }\n\t // union of Chrome, FF, IE, and Safari console methods\n\t var m = [\n\t \"log\", \"info\", \"warn\", \"error\", \"debug\", \"trace\", \"dir\", \"group\",\n\t \"groupCollapsed\", \"groupEnd\", \"time\", \"timeEnd\", \"profile\", \"profileEnd\",\n\t \"dirxml\", \"assert\", \"count\", \"markTimeline\", \"timeStamp\", \"clear\"\n\t ];\n\t // define undefined methods as noops to prevent errors\n\t for (var i = 0; i < m.length; i++) {\n\t if (!window.console[m[i]]) {\n\t window.console[m[i]] = function() {};\n\t } \n\t } \n\t})();\n}", "function alertBadBrowser(){\n var isIE = /*@cc_on!@*/false || !!document.documentMode;\n var isEdge = !isIE && !!window.StyleMedia;\n\n if(isIE||isEdge){\n alert(\"Your browser may cause display problems. You should obtain a modern webkit browser. While some versions of Microsoft Edge work, it can be buggy. Chrome, Firefox, Safari, and Opera all work consistently. Internet Explorer is not supported.\");\n }\n}", "function isIE()\n{\n return document.all;\n}", "function msieversion() \n{\n\ttry{\n\t var ua = window.navigator.userAgent;\n\t var msie = ua.indexOf(\"MSIE \");\n\t\n\t if (msie > 0) // Check for Internet Explorer\n\t {\n\t \tvar version = parseInt(ua.substring(msie + 5, ua.indexOf(\".\", msie)));\n\t \tif (version < 9) {\n\t \t\treturn true;\n\t \t}\n\t }\n\t} catch (err) {\n\t\t//ignore any error\n\t}\n return false;\n}", "function fixSelectWidthForIE() {\n\t// only target IE\n\tif($.browser.msie)\n\t{\n\t\t// bind mousedown\n\t\t$('select:not([multiple])').mousedown(function()\n\t\t{\n\t\t\t// not already auto-width\n\t\t\tif($(this).css('width') != 'auto')\n\t\t\t{\n\t\t\t\t// get current width\n\t\t\t\tvar width = $(this).width();\n\n\t\t\t\t// reset if needed\n\t\t\t\tif(typeof $(this).data('orginal-width') != 'undefined' && width > $(this).data('orginal-width')) width = $(this).data('orginal-width');\n\n\t\t\t\t// set data and new width\n\t\t\t\t$(this).data('orginal-width', width);\n\t\t\t\t$(this).css('width', 'auto');\n\n\t\t\t\t// if width is less then before, undo this\n\t\t\t\tif($(this).width() < width)\n\t\t\t\t{\n\t\t\t\t\t// unbind\n\t\t\t\t\t$(this).unbind('mousedown');\n\n\t\t\t\t\t// reset width\n\t\t\t\t\t$(this).css('width', $(this).data('orginal-width').toString() +'px');\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\t// bind blur, if the user doesn't change the value\n\t\t.blur(function() {\n\t\t\t$(this).css('width', $(this).data('orginal-width').toString() +'px');\n\t\t})\n\n\t\t// bind change, if the user changes the value\n\t\t.change(function() {\n\t\t\t$(this).css('width', $(this).data('orginal-width').toString() +'px');\n\t\t});\n }\n}", "function isIE(e,i){var t,n=\"IE\",m=document.createElement(\"B\"),o=document.documentElement;return e&&(n+=\" \"+e,i&&(n=i+\" \"+n)),m.innerHTML=\"<!--[if \"+n+']><b id=\"iecctest\"></b><![endif]-->',o.appendChild(m),t=!!document.getElementById(\"iecctest\"),o.removeChild(m),t}", "function resizingWindowIsIE()\n{\n\tif (navigator.appName == 'Microsoft Internet Explorer') {\n\t\treturn true;\n\t}\n\treturn false;\n}", "function isIe678 () {\n\t\tvar IE = eval('\"v\"==\"\\v\"');\n\t\treturn \tIE;\n\t}", "protected internal function m252() {}", "function iedetect(v) {\n\n\t var r = RegExp('msie' + (!isNaN(v) ? ('\\\\s' + v) : ''), 'i');\n\t\treturn r.test(navigator.userAgent);\n\t\t\t\n\t}", "function detectIE() {\n\tvar isie = false;\n\tvar ua = window.navigator.userAgent;\n\tvar msie = ua.indexOf('MSIE ');\n\tvar trident = ua.indexOf('Trident/');\n\tvar edge = ua.indexOf('Edge/');\n\tif (msie > 0) {\n\t\t// IE 10 or older\n\t\tisie = true;\n\t\tvar ieVer = parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n\t} else if (trident > 0) {\n\t\t// IE 11\n\t\tisie = true;\n\t\tvar rv = ua.indexOf('rv:');\n\t\tvar ieVer = parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n\t} else if (edge > 0) {\n\t\t// Edge (IE 12+)\n\t\tisie = true;\n\t\tvar ieVer = parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n\t}\n\tif (isie == true) {\n\t\t$('html').addClass('ie');\n\t\tif (ieVer == 11) $('html').addClass('ie11');\n\t}\n}", "function isIE() {\n\tif (navigator.appName.indexOf(\"Explorer\")>0)\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "isIE() {\n return Boolean(\n (Object.getOwnPropertyDescriptor && Object.getOwnPropertyDescriptor(window, 'ActiveXObject')) ||\n 'ActiveXObject' in window\n )\n }", "function checkBrowser(){\n\tif(document.getElementById && document.attachEvent){\t\n\t\t//modern IE\n\t\tbrowser = 'modIE';\n\t}\n\telse if(document.getElementById){\t\n\t\t//modern, non-IE\n\t\tbrowser = 'gecko';\n\t}\n\telse{\t\t\n\t\t//ask to download new browser\n\t\twindow.location = \"browser.html\";\n\t}\n}", "function isIE() {\n var nav = navigator.userAgent.toLowerCase();\n\n return (nav.indexOf('msie') != -1) ? parseInt(nav.split('msie')[1]) : false;\n }", "function isBrowserIE () {\n var ua = window.navigator.userAgent\n var msie = ua.indexOf('MSIE ')\n var trident = ua.indexOf('Trident/')\n var edge = ua.indexOf('Edge/')\n if (msie > 0 || trident > 0 || edge > 0) {\n return true\n }\n }", "function isIE8() {\n if (window.attachEvent && !window.addEventListener) {\n return true;\n } else {\n return false;\n }\n }", "IE ():boolean {\n\n\t\treturn this.agent.match(/Trident/i) ? true : false;\n\t}", "function isIE() {\n\t//Create var for userAgent\n\tuserAg = navigator.userAgent;\n\t//Create var to store return of index of strings\n\tvar is_ie = userAg.indexOf(\"MSIE \") > -1 || userAg.indexOf(\"Trident/\") > -1 || userAg.indexOf(\"Edge\") > -1;\n\t//return result\n\treturn is_ie;\n}", "function placeholderSupport()\r\n{\r\n\t/* input placeholder for ie9 & ie8 & ie7 */\r\n jQuery.support.placeholder = ('placeholder' in document.createElement('input'));\r\n\t/* input placeholder for ie9 & ie8 & ie7 end*/\r\n\t\r\n\t/*fix for IE7 and IE8 */\r\n\tif (!jQuery.support.placeholder) {\r\n\t\tjQuery(\"[placeholder]\").focus(function () {\r\n\t\t\tif (jQuery(this).val() == jQuery(this).attr(\"placeholder\")) jQuery(this).val(\"\");\r\n\t\t}).blur(function () {\r\n\t\t\tif (jQuery(this).val() == \"\") jQuery(this).val(jQuery(this).attr(\"placeholder\"));\r\n\t\t}).blur();\r\n\r\n\t\tjQuery(\"[placeholder]\").parents(\"form\").submit(function () {\r\n\t\t\tjQuery(this).find('[placeholder]').each(function() {\r\n\t\t\t\tif (jQuery(this).val() == jQuery(this).attr(\"placeholder\")) {\r\n\t\t\t\t\t jQuery(this).val(\"\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\t/*fix for IE7 and IE8 end */\r\n}", "function clickIE4(){\nif (event.button==2){\nreturn false;\n}\n}", "function ie(a){this.ra=a}", "function hasTransparentBug (browser) {\n return ~['ie 8', 'ie 9'].indexOf(browser);\n}", "function initIE(){\n\t\tvar head = document.getElementsByTagName('head')[0];\n\t\tvar style = document.createElement('style');\n\t\tstyle.type = 'text/css';\n\t\tstyle.styleSheet.cssText = ':before{content:none !important';\n\t\thead.appendChild(style);\n\t\tsetTimeout(function(){\n\t\t\thead.removeChild(style);\n\t\t}, 0);\n\t}", "function ElemToWindow(elem,dummy){\r\nif(!elem) return null;\r\nvar bod = document.body, doc = document.documentElement, rtl = 0;\r\n\r\nif(elem.getBoundingClientRect && !TGNoIEClientRect){\r\n if(!elem.parentNode) return [0,0]; \r\n var A = elem.getBoundingClientRect();\r\n var x = A.left, y = A.top;\r\n if(BIEStrict || (BMozilla||BOpera)&&BStrict){\r\n x += doc.scrollLeft;\r\n y += doc.scrollTop;\r\n if(!BIEA8) { x -= doc.clientLeft; y -= doc.clientTop; }\r\n \r\n }\r\n else {\r\n if(BChrome){\r\n var B = doc.getBoundingClientRect();\r\n x -= B.left-doc.offsetLeft; y -= B.top-doc.offsetTop;\r\n }\r\n \r\n else {\r\n x += bod.scrollLeft;\r\n y += bod.scrollTop;\r\n }\r\n \r\n if(BSafariMac&&!BSafariWin){\r\n x -= doc.offsetLeft;\r\n y -= doc.offsetTop;\r\n }\r\n else if(!BIE && !BChrome && !BSafariWin){\r\n x += bod.clientLeft;\r\n y += bod.clientTop;\r\n }\r\n }\r\n \r\n return [x/CZoom,y/CZoom];\r\n }\r\nvar x=elem.offsetLeft, y=elem.offsetTop,p,lp = elem;\r\ntry { p = elem.offsetParent; } catch(e){ return [x,y]; } \r\nif(!p) return AbsoluteToWindow(); \r\nif(BIEA){\r\n if(BIEStrict && CZoom!=1 && lp.style.position==\"absolute\"){\r\n x += Math.floor(lp.offsetLeft/CZoom-lp.offsetLeft);\r\n y += Math.floor(lp.offsetTop/CZoom-lp.offsetTop);\r\n }\r\n while(p && p!=doc){ \r\n if(p==bod){ \r\n x+=p.offsetLeft+p.clientLeft;\r\n y+=p.offsetTop+p.clientTop; \r\n break;\r\n }\r\n if((!BIEA8||!BStrict) && p.tagName.toLowerCase()==\"table\"){ \r\n x-=p.clientLeft;\r\n y-=p.clientTop;\r\n }\r\n x+=p.offsetLeft+p.clientLeft-p.scrollLeft;\r\n y+=p.offsetTop+p.clientTop-p.scrollTop; \r\n p = p.offsetParent;\r\n }\r\n if(BIEA8 && BStrict){ x-=bod.clientLeft; y-=bod.clientTop; }\r\n if(BIEStrict && CZoom!=1){\r\n x+=Math.floor(p.offsetLeft/CZoom-p.offsetLeft);\r\n y+=Math.floor(p.offsetTop/CZoom-p.offsetTop);\r\n } \r\n }\r\nelse { \r\n var po = elem;\r\n while(1){\r\n \r\n while(po!=p){\r\n po = po.parentNode;\r\n if(!po || po==bod) break; \r\n \r\n if(po!=bod&&!rtl){\r\n x-=po.scrollLeft;\r\n y-=po.scrollTop;\r\n }\r\n \r\n if((BOpera8 || BOpera&&BOperaVer<9.5)&&po.tagName){\r\n var tag = po.tagName.toLowerCase();\r\n if(tag=='tr'){ y+=po.offsetTop; x+=po.scrollLeft; } \r\n else if(tag=='tbody') x+=po.scrollLeft;\r\n else if(BOpera && tag=='table' && po.style.borderCollapse!='collapse') y+=Math.floor((po.offsetHeight-po.clientHeight)/2); \r\n }\r\n\r\n if(BFF3 && po.tagName){\r\n var tag = po.tagName.toLowerCase();\r\n if(tag==\"td\"){ x+=po.clientLeft; y+=po.clientTop; }\r\n } \r\n if((BIPAD||BSafariWin) && po.tagName){\r\n var tag = po.tagName.toLowerCase();\r\n if(tag==\"table\" || tag==\"td\"){ x+=po.clientLeft; y+=po.clientTop; }\r\n } \r\n }\r\n \r\n if(!p || p==bod) break;\r\n x+=p.offsetLeft;\r\n y+=p.offsetTop;\r\n lp = p; \r\n p = p.offsetParent;\r\n if(p==bod){\r\n var abs = lp.Absolute; if(abs==null){ var s = GetStyle(lp); abs = s.position==\"absolute\"; lp.Absolute = abs; }\r\n if(abs) {\r\n \r\n break;\r\n }\r\n }\r\n }\r\n \r\n if(BOpera8 || BMozilla || BSafariWin || BSafariMac){\r\n var abs = lp.Absolute; if(abs==null){ var s = GetStyle(lp); abs = s.position==\"absolute\"; lp.Absolute = abs; }\r\n if(abs){\r\n var A = AbsoluteToWindow();\r\n x += A[0]; y += A[1]; \r\n return [x,y];\r\n }\r\n if(BMozilla||BSafariWin){\r\n if(doc.marginLeft==null){\r\n var s = GetStyle(doc);\r\n var ml = parseInt(s.marginLeft), mt = parseInt(s.marginTop);\r\n doc.marginLeft = ml?ml:0; doc.marginTop = mt?mt:0;\r\n }\r\n x += doc.marginLeft; y += doc.marginTop;\r\n }\r\n \r\n if(BFF3&&!BStrict){ x -= bod.offsetLeft; y -= bod.offsetTop; }\r\n \r\n if(BSafariMac&&!abs){ x += bod.offsetLeft; y += bod.offsetTop; }\r\n if(BMozilla||BSafariWin){\r\n if(bod.clientLeft==null) {\r\n var s = GetStyle(bod);\r\n var bl = parseInt(s.borderLeftWidth), bt = parseInt(s.borderTopWidth);\r\n bod.clientLeft = bl?bl:0; bod.clientTop = bt?bt:0;\r\n }\r\n x += bod.clientLeft; y += bod.clientTop; \r\n }\r\n if(BOpera8){\r\n x += bod.offsetLeft+bod.clientLeft;\r\n y += bod.offsetTop+bod.clientTop;\r\n }\r\n \r\n } \r\n if(BKonqueror){ x += doc.offsetLeft; y += doc.offsetTop; }\r\n \r\n }\r\n\r\nreturn [x,y];\r\n}", "function isIE9() {\n var userAgent = navigator.userAgent.toLowerCase();\n return userAgent.indexOf(\"trident/5.0\") > 0 || userAgent.indexOf(\"msie 9.0\") > 0;\n }", "function isIE9() {\n var userAgent = navigator.userAgent.toLowerCase();\n return userAgent.indexOf(\"trident/5.0\") > 0 || userAgent.indexOf(\"msie 9.0\") > 0;\n }", "function ie03Clr(){ \r\n\tz_ie03_nav_details_flag = false;\r\n}", "function validateNav() {\n switch (navigator.sayswho) {\n // IE\n case 'IE 4':\n case 'IE 5':\n case 'IE 6':\n case 'IE 7':\n case 'IE 8':\n case 'IE 9':\n // safari\n case 'Safari 1':\n case 'Safari 2':\n case 'Safari 3':\n case 'Safari 4':\n case 'Safari 5':\n case 'Safari 6':\n if(ga('.browser-update')\n .length != 0) return false;\n var aj = jAjax(_THEME + '/body/old-browser.html', 'get', '');\n aj.done(function(data) {\n globalCont.prepend(data);\n });\n break;\n }\n}", "function Oe(){!function t(e){Ie[De++]^=255&e,Ie[De++]^=e>>8&255,Ie[De++]^=e>>16&255,Ie[De++]^=e>>24&255,De>=Le&&(De-=Le)}((new Date).getTime())}", "function ie(){this.i=0,this.j=0,this.S=new Array}", "function clickEventIE() {\r\n\tif (document.all) {\t\t\r\n\t\treturn false;\r\n\t\t}\r\n\t}", "function isMsieSevenOrNewer() {\n\t\tif (typeof window.XMLHttpRequest !== 'undefined') {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "screwIE () {\n let browser = new Browser();\n if (browser.screwIE === true) {\n this.$toast({\n type: 'warning',\n content: `\n <h4>Unsupported Browser</h4>\n <span>This app may not function properly in Internet Explorer! Please use another browser such as Chrome, Edge, or Firefox.</span>`\n });\n }\n }", "function ie(e,r){var n=o(e),a=void 0===w[0]\nr=void 0===r||!!r,t.animate&&!a&&i(_,t.cssClasses.tap,t.animationDuration),E.forEach((function(e){re(e,function(e,r){return null===e||!1===e||void 0===e?w[r]:(\"number\"==typeof e&&(e=String(e)),e=t.format.from(e),!1===(e=D.toStepping(e))||isNaN(e)?w[r]:e)}(n[e],e),!0,!1)})),E.forEach((function(e){re(e,w[e],!0,!0)})),te(),E.forEach((function(e){$(\"update\",e),null!==n[e]&&r&&$(\"set\",e)}))}", "function isIE() {\n let ua = navigator.userAgent;\n /* MSIE used to detect old browsers and Trident used to newer ones*/\n return ua.indexOf(\"MSIE \") > -1 || ua.indexOf(\"Trident/\") > -1;\n}" ]
[ "0.7220337", "0.70940924", "0.699044", "0.68625945", "0.66801953", "0.6574329", "0.6557123", "0.65142417", "0.65142417", "0.64660573", "0.64034224", "0.6379892", "0.6297539", "0.6296395", "0.62622595", "0.6166529", "0.6163856", "0.61358476", "0.61114734", "0.6054131", "0.60267335", "0.6011997", "0.6010439", "0.5999043", "0.59938425", "0.5992769", "0.59907323", "0.59887904", "0.59887904", "0.5986692", "0.59769297", "0.5964097", "0.5956743", "0.5956743", "0.5952554", "0.5933552", "0.5926419", "0.59256107", "0.5903011", "0.58982563", "0.5897483", "0.5891624", "0.5891624", "0.5881813", "0.5881813", "0.5881813", "0.5881813", "0.5881813", "0.5881813", "0.5881813", "0.58809835", "0.5873493", "0.5868973", "0.5865985", "0.58622867", "0.58622396", "0.5860273", "0.5857521", "0.58358437", "0.5831684", "0.58297247", "0.58136505", "0.57972383", "0.5765634", "0.57539", "0.5752738", "0.57393086", "0.5732631", "0.5731022", "0.57287157", "0.57261765", "0.5723398", "0.5699701", "0.56989235", "0.56913453", "0.5684657", "0.5668621", "0.56558335", "0.5642601", "0.5632942", "0.5620239", "0.56194705", "0.56158143", "0.5615281", "0.5608052", "0.55952054", "0.55694675", "0.5562909", "0.55596423", "0.5543752", "0.55268735", "0.55268735", "0.5522381", "0.55179256", "0.55138415", "0.5504441", "0.5498513", "0.549372", "0.54823655", "0.5482273", "0.5474742" ]
0.0
-1
Executing both pixelPosition & boxSizingReliable tests require only one layout so they're executed at the same time to save the second computation.
function computeStyleTests() { // This is a singleton, we need to execute it only once if ( !div ) { return; } div.style.cssText = "box-sizing:border-box;" + "position:relative;display:block;" + "margin:auto;border:1px;padding:1px;" + "top:1%;width:50%"; div.innerHTML = ""; documentElement.appendChild( container ); var divStyle = window.getComputedStyle( div ); pixelPositionVal = divStyle.top !== "1%"; // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 reliableMarginLeftVal = divStyle.marginLeft === "2px"; boxSizingReliableVal = divStyle.width === "4px"; // Support: Android 4.0 - 4.3 only // Some styles come back with percentage values, even though they shouldn't div.style.marginRight = "50%"; pixelMarginRightVal = divStyle.marginRight === "4px"; documentElement.removeChild( container ); // Nullify the div so it wouldn't be stored in the memory and // it will also be a sign that checks already performed div = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function computePixelPositionAndBoxSizingReliable() {\n\t\t\t// Support: Firefox, Android 2.3 (Prefixed box-sizing versions).\n\t\t\tdiv.style.cssText = \"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\t\"box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;\" +\n\t\t\t\t\"position:absolute;top:1%\";\n\t\t\tdocElem.appendChild( container );\n\n\t\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\tdocElem.removeChild( container );\n\t\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\t\tdiv.style.cssText =\n\t\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t\t// Vendor-prefix box-sizing\n\t\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocElem.appendChild( container );\n\n\t\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\tdocElem.removeChild( container );\n\t\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\t\tdiv.style.cssText =\n\t\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t\t// Vendor-prefix box-sizing\n\t\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocElem.appendChild( container );\n\n\t\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\tdocElem.removeChild( container );\n\t\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\t\tdiv.style.cssText =\n\t\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t\t// Vendor-prefix box-sizing\n\t\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocElem.appendChild( container );\n\t\n\t\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\t\n\t\t\tdocElem.removeChild( container );\n\t\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\t\tdiv.style.cssText =\n\t\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t\t// Vendor-prefix box-sizing\n\t\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocElem.appendChild( container );\n\t\n\t\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\t\n\t\t\tdocElem.removeChild( container );\n\t\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\t// Support: Firefox, Android 2.3 (Prefixed box-sizing versions).\n\t\tdiv.style.cssText = \"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;\" +\n\t\t\t\"position:absolute;top:1%\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\t// Support: Firefox, Android 2.3 (Prefixed box-sizing versions).\n\t\tdiv.style.cssText = \"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;\" +\n\t\t\t\"position:absolute;top:1%\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n div.style.cssText =\n // Support: Firefox<29, Android 2.3\n // Vendor-prefix box-sizing\n \"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n \"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n \"border:1px;padding:1px;width:4px;position:absolute\";\n div.innerHTML = \"\";\n docElem.appendChild(container);\n\n var divStyle = window.getComputedStyle(div, null);\n pixelPositionVal = divStyle.top !== \"1%\";\n boxSizingReliableVal = divStyle.width === \"4px\";\n\n docElem.removeChild(container);\n }", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}", "function computePixelPositionAndBoxSizingReliable() {\n div.style.cssText =\n // Support: Firefox<29, Android 2.3\n // Vendor-prefix box-sizing\n \"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n \"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n \"border:1px;padding:1px;width:4px;position:absolute\";\n div.innerHTML = \"\";\n docElem.appendChild(container);\n\n var divStyle = window.getComputedStyle(div, null);\n pixelPositionVal = divStyle.top !== \"1%\";\n boxSizingReliableVal = divStyle.width === \"4px\";\n\n docElem.removeChild(container);\n }", "function computePixelPositionAndBoxSizingReliable(){div.style.cssText = // Support: Firefox<29, Android 2.3\n// Vendor-prefix box-sizing\n\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" + \"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" + \"border:1px;padding:1px;width:4px;position:absolute\";div.innerHTML = \"\";docElem.appendChild(container);var divStyle=window.getComputedStyle(div,null);pixelPositionVal = divStyle.top !== \"1%\";boxSizingReliableVal = divStyle.width === \"4px\";docElem.removeChild(container);} // Support: node.js jsdom", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif (!div) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdiv.style.cssText = \"box-sizing:border-box;\" + \"position:relative;display:block;\" + \"margin:auto;border:1px;padding:1px;\" + \"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild(container);\n\n\t\t\tvar divStyle = window.getComputedStyle(div);\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\t\tdocumentElement.removeChild(container);\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n \t\t// This is a singleton, we need to execute it only once\n \t\tif ( !div ) {\n \t\t\treturn;\n \t\t}\n\n \t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n \t\t\t\"margin-top:1px;padding:0;border:0\";\n \t\tdiv.style.cssText =\n \t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n \t\t\t\"margin:auto;border:1px;padding:1px;\" +\n \t\t\t\"width:60%;top:1%\";\n \t\tdocumentElement.appendChild( container ).appendChild( div );\n\n \t\tvar divStyle = window.getComputedStyle( div );\n \t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n \t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n \t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n \t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n \t\t// Some styles come back with percentage values, even though they shouldn't\n \t\tdiv.style.right = \"60%\";\n \t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n \t\t// Support: IE 9 - 11 only\n \t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n \t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n \t\t// Support: IE 9 only\n \t\t// Detect overflow:scroll screwiness (gh-3699)\n \t\t// Support: Chrome <=64\n \t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n \t\tdiv.style.position = \"absolute\";\n \t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n \t\tdocumentElement.removeChild( container );\n\n \t\t// Nullify the div so it wouldn't be stored in the memory and\n \t\t// it will also be a sign that checks already performed\n \t\tdiv = null;\n \t}", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"width:60%;top:1%\";\n\t\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.right = \"60%\";\n\t\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t\t// Support: IE 9 - 11 only\n\t\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t\t// Support: IE 9 only\n\t\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t\t// Support: Chrome <=64\n\t\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\t\tdiv.style.position = \"absolute\";\n\t\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\t\tdocumentElement.removeChild( container );\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"width:60%;top:1%\";\n\t\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.right = \"60%\";\n\t\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t\t// Support: IE 9 - 11 only\n\t\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t\t// Support: IE 9 only\n\t\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t\t// Support: Chrome <=64\n\t\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\t\tdiv.style.position = \"absolute\";\n\t\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\t\tdocumentElement.removeChild( container );\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\t\tdocumentElement.removeChild( container );\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\t\tdocumentElement.removeChild( container );\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\t\tdocumentElement.removeChild( container );\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\t\tdocumentElement.removeChild( container );\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\t\tdocumentElement.removeChild( container );\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\t\tdocumentElement.removeChild( container );\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\t\tdocumentElement.removeChild( container );\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\t\tdocumentElement.removeChild( container );\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\t\tdocumentElement.removeChild( container );\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\t\tdocumentElement.removeChild( container );\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\t\tdocumentElement.removeChild( container );\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n // This is a singleton, we need to execute it only once\n if (!div) {\n return;\n }\n\n container.style.cssText = \"position:absolute;left:-11111px;width:60px;\" + \"margin-top:1px;padding:0;border:0\";\n div.style.cssText = \"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" + \"margin:auto;border:1px;padding:1px;\" + \"width:60%;top:1%\";\n documentElement.appendChild(container).appendChild(div);\n var divStyle = window.getComputedStyle(div);\n pixelPositionVal = divStyle.top !== \"1%\"; // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\n reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12; // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n // Some styles come back with percentage values, even though they shouldn't\n\n div.style.right = \"60%\";\n pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36; // Support: IE 9 - 11 only\n // Detect misreporting of content dimensions for box-sizing:border-box elements\n\n boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36; // Support: IE 9 only\n // Detect overflow:scroll screwiness (gh-3699)\n // Support: Chrome <=64\n // Don't get tricked when zoom affects offsetWidth (gh-4029)\n\n div.style.position = \"absolute\";\n scrollboxSizeVal = roundPixelMeasures(div.offsetWidth / 3) === 12;\n documentElement.removeChild(container); // Nullify the div so it wouldn't be stored in the memory and\n // it will also be a sign that checks already performed\n\n div = null;\n }", "function computeStyleTests() {\n // This is a singleton, we need to execute it only once\n if (!div) {\n return;\n }\n\n container.style.cssText = \"position:absolute;left:-11111px;width:60px;\" + \"margin-top:1px;padding:0;border:0\";\n div.style.cssText = \"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" + \"margin:auto;border:1px;padding:1px;\" + \"width:60%;top:1%\";\n documentElement.appendChild(container).appendChild(div);\n var divStyle = window.getComputedStyle(div);\n pixelPositionVal = divStyle.top !== \"1%\"; // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\n reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12; // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n // Some styles come back with percentage values, even though they shouldn't\n\n div.style.right = \"60%\";\n pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36; // Support: IE 9 - 11 only\n // Detect misreporting of content dimensions for box-sizing:border-box elements\n\n boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36; // Support: IE 9 only\n // Detect overflow:scroll screwiness (gh-3699)\n // Support: Chrome <=64\n // Don't get tricked when zoom affects offsetWidth (gh-4029)\n\n div.style.position = \"absolute\";\n scrollboxSizeVal = roundPixelMeasures(div.offsetWidth / 3) === 12;\n documentElement.removeChild(container); // Nullify the div so it wouldn't be stored in the memory and\n // it will also be a sign that checks already performed\n\n div = null;\n }", "function computeStyleTests() {\n // This is a singleton, we need to execute it only once\n if (!div) {\n return;\n }\n\n container.style.cssText = \"position:absolute;left:-11111px;width:60px;\" + \"margin-top:1px;padding:0;border:0\";\n div.style.cssText = \"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" + \"margin:auto;border:1px;padding:1px;\" + \"width:60%;top:1%\";\n documentElement.appendChild(container).appendChild(div);\n var divStyle = window.getComputedStyle(div);\n pixelPositionVal = divStyle.top !== \"1%\"; // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\n reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12; // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n // Some styles come back with percentage values, even though they shouldn't\n\n div.style.right = \"60%\";\n pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36; // Support: IE 9 - 11 only\n // Detect misreporting of content dimensions for box-sizing:border-box elements\n\n boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36; // Support: IE 9 only\n // Detect overflow:scroll screwiness (gh-3699)\n // Support: Chrome <=64\n // Don't get tricked when zoom affects offsetWidth (gh-4029)\n\n div.style.position = \"absolute\";\n scrollboxSizeVal = roundPixelMeasures(div.offsetWidth / 3) === 12;\n documentElement.removeChild(container); // Nullify the div so it wouldn't be stored in the memory and\n // it will also be a sign that checks already performed\n\n div = null;\n }", "function computeStyleTests() {\n // This is a singleton, we need to execute it only once\n if (!div) {\n return;\n }\n\n container.style.cssText = \"position:absolute;left:-11111px;width:60px;\" + \"margin-top:1px;padding:0;border:0\";\n div.style.cssText = \"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" + \"margin:auto;border:1px;padding:1px;\" + \"width:60%;top:1%\";\n documentElement.appendChild(container).appendChild(div);\n var divStyle = window.getComputedStyle(div);\n pixelPositionVal = divStyle.top !== \"1%\"; // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\n reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12; // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n // Some styles come back with percentage values, even though they shouldn't\n\n div.style.right = \"60%\";\n pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36; // Support: IE 9 - 11 only\n // Detect misreporting of content dimensions for box-sizing:border-box elements\n\n boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36; // Support: IE 9 only\n // Detect overflow:scroll screwiness (gh-3699)\n // Support: Chrome <=64\n // Don't get tricked when zoom affects offsetWidth (gh-4029)\n\n div.style.position = \"absolute\";\n scrollboxSizeVal = roundPixelMeasures(div.offsetWidth / 3) === 12;\n documentElement.removeChild(container); // Nullify the div so it wouldn't be stored in the memory and\n // it will also be a sign that checks already performed\n\n div = null;\n }", "function computeStyleTests() {\n // This is a singleton, we need to execute it only once\n if (!div) {\n return;\n }\n\n container.style.cssText = \"position:absolute;left:-11111px;width:60px;\" + \"margin-top:1px;padding:0;border:0\";\n div.style.cssText = \"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" + \"margin:auto;border:1px;padding:1px;\" + \"width:60%;top:1%\";\n documentElement.appendChild(container).appendChild(div);\n var divStyle = window.getComputedStyle(div);\n pixelPositionVal = divStyle.top !== \"1%\"; // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\n reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12; // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n // Some styles come back with percentage values, even though they shouldn't\n\n div.style.right = \"60%\";\n pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36; // Support: IE 9 - 11 only\n // Detect misreporting of content dimensions for box-sizing:border-box elements\n\n boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36; // Support: IE 9 only\n // Detect overflow:scroll screwiness (gh-3699)\n // Support: Chrome <=64\n // Don't get tricked when zoom affects offsetWidth (gh-4029)\n\n div.style.position = \"absolute\";\n scrollboxSizeVal = roundPixelMeasures(div.offsetWidth / 3) === 12;\n documentElement.removeChild(container); // Nullify the div so it wouldn't be stored in the memory and\n // it will also be a sign that checks already performed\n\n div = null;\n }", "function computeStyleTests() {\n // This is a singleton, we need to execute it only once\n if (!div) {\n return;\n }\n\n container.style.cssText = \"position:absolute;left:-11111px;width:60px;\" + \"margin-top:1px;padding:0;border:0\";\n div.style.cssText = \"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" + \"margin:auto;border:1px;padding:1px;\" + \"width:60%;top:1%\";\n documentElement.appendChild(container).appendChild(div);\n var divStyle = window.getComputedStyle(div);\n pixelPositionVal = divStyle.top !== \"1%\"; // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\n reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12; // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n // Some styles come back with percentage values, even though they shouldn't\n\n div.style.right = \"60%\";\n pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36; // Support: IE 9 - 11 only\n // Detect misreporting of content dimensions for box-sizing:border-box elements\n\n boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36; // Support: IE 9 only\n // Detect overflow:scroll screwiness (gh-3699)\n // Support: Chrome <=64\n // Don't get tricked when zoom affects offsetWidth (gh-4029)\n\n div.style.position = \"absolute\";\n scrollboxSizeVal = roundPixelMeasures(div.offsetWidth / 3) === 12;\n documentElement.removeChild(container); // Nullify the div so it wouldn't be stored in the memory and\n // it will also be a sign that checks already performed\n\n div = null;\n }", "function computeStyleTests() {\n // This is a singleton, we need to execute it only once\n if (!div) {\n return;\n }\n\n container.style.cssText = \"position:absolute;left:-11111px;width:60px;\" + \"margin-top:1px;padding:0;border:0\";\n div.style.cssText = \"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" + \"margin:auto;border:1px;padding:1px;\" + \"width:60%;top:1%\";\n documentElement.appendChild(container).appendChild(div);\n var divStyle = window.getComputedStyle(div);\n pixelPositionVal = divStyle.top !== \"1%\"; // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\n reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12; // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n // Some styles come back with percentage values, even though they shouldn't\n\n div.style.right = \"60%\";\n pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36; // Support: IE 9 - 11 only\n // Detect misreporting of content dimensions for box-sizing:border-box elements\n\n boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36; // Support: IE 9 only\n // Detect overflow:scroll screwiness (gh-3699)\n // Support: Chrome <=64\n // Don't get tricked when zoom affects offsetWidth (gh-4029)\n\n div.style.position = \"absolute\";\n scrollboxSizeVal = roundPixelMeasures(div.offsetWidth / 3) === 12;\n documentElement.removeChild(container); // Nullify the div so it wouldn't be stored in the memory and\n // it will also be a sign that checks already performed\n\n div = null;\n }", "function computeStyleTests() {\n // This is a singleton, we need to execute it only once\n if (!div) {\n return;\n }\n\n container.style.cssText = \"position:absolute;left:-11111px;width:60px;\" + \"margin-top:1px;padding:0;border:0\";\n div.style.cssText = \"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" + \"margin:auto;border:1px;padding:1px;\" + \"width:60%;top:1%\";\n documentElement.appendChild(container).appendChild(div);\n var divStyle = window.getComputedStyle(div);\n pixelPositionVal = divStyle.top !== \"1%\"; // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\n reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12; // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n // Some styles come back with percentage values, even though they shouldn't\n\n div.style.right = \"60%\";\n pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36; // Support: IE 9 - 11 only\n // Detect misreporting of content dimensions for box-sizing:border-box elements\n\n boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36; // Support: IE 9 only\n // Detect overflow:scroll screwiness (gh-3699)\n // Support: Chrome <=64\n // Don't get tricked when zoom affects offsetWidth (gh-4029)\n\n div.style.position = \"absolute\";\n scrollboxSizeVal = roundPixelMeasures(div.offsetWidth / 3) === 12;\n documentElement.removeChild(container); // Nullify the div so it wouldn't be stored in the memory and\n // it will also be a sign that checks already performed\n\n div = null;\n }", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif (!div) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" + \"margin-top:1px;padding:0;border:0\";\n\t\t\tdiv.style.cssText = \"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" + \"margin:auto;border:1px;padding:1px;\" + \"width:60%;top:1%\";\n\t\t\tdocumentElement.appendChild(container).appendChild(div);\n\n\t\t\tvar divStyle = window.getComputedStyle(div);\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12;\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.right = \"60%\";\n\t\t\tpixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36;\n\n\t\t\t// Support: IE 9 - 11 only\n\t\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\t\tboxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36;\n\n\t\t\t// Support: IE 9 only\n\t\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t\tdiv.style.position = \"absolute\";\n\t\t\tscrollboxSizeVal = div.offsetWidth === 36 || \"absolute\";\n\n\t\t\tdocumentElement.removeChild(container);\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif (!div) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" + \"margin-top:1px;padding:0;border:0\";\n\t\t\tdiv.style.cssText = \"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" + \"margin:auto;border:1px;padding:1px;\" + \"width:60%;top:1%\";\n\t\t\tdocumentElement.appendChild(container).appendChild(div);\n\n\t\t\tvar divStyle = window.getComputedStyle(div);\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12;\n\n\t\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.right = \"60%\";\n\t\t\tpixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36;\n\n\t\t\t// Support: IE 9 - 11 only\n\t\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\t\tboxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36;\n\n\t\t\t// Support: IE 9 only\n\t\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t\tdiv.style.position = \"absolute\";\n\t\t\tscrollboxSizeVal = div.offsetWidth === 36 || \"absolute\";\n\n\t\t\tdocumentElement.removeChild(container);\n\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\t\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\t\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\t\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\t\n\t\t\tdocumentElement.removeChild( container );\n\t\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\t\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\t\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\t\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\t\n\t\t\tdocumentElement.removeChild( container );\n\t\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\t\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\t\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\t\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\t\n\t\t\tdocumentElement.removeChild( container );\n\t\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\t\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\t\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\t\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\t\n\t\t\tdocumentElement.removeChild( container );\n\t\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\t\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\t\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\t\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\t\n\t\t\tdocumentElement.removeChild( container );\n\t\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\t\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\t\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\t\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\t\n\t\t\tdocumentElement.removeChild( container );\n\t\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\t\n\t\t\t// This is a singleton, we need to execute it only once\n\t\t\tif ( !div ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tdiv.style.cssText =\n\t\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\t\"position:relative;display:block;\" +\n\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\"top:1%;width:50%\";\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tdocumentElement.appendChild( container );\n\t\n\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\n\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\t\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\t\n\t\t\tdocumentElement.removeChild( container );\n\t\n\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t// it will also be a sign that checks already performed\n\t\t\tdiv = null;\n\t\t}", "function computeStyleTests() {\n\n\t\t\t\t// This is a singleton, we need to execute it only once\n\t\t\t\tif ( !div ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\t\t\tdiv.style.cssText =\n\t\t\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\t\t\"width:60%;top:1%\";\n\t\t\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\t\t\tvar divStyle = window.getComputedStyle( div );\n\t\t\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\t\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\t\tdiv.style.right = \"60%\";\n\t\t\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t\t\t// Support: IE 9 - 11 only\n\t\t\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\t\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t\t\t// Support: IE 9 only\n\t\t\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t\t\t// Support: Chrome <=64\n\t\t\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\t\t\tdiv.style.position = \"absolute\";\n\t\t\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\t\t\tdocumentElement.removeChild( container );\n\n\t\t\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t\t\t// it will also be a sign that checks already performed\n\t\t\t\tdiv = null;\n\t\t\t}", "function computeStyleTests() { // 6092\n // 6093\n\t\t// This is a singleton, we need to execute it only once // 6094\n\t\tif ( !div ) { // 6095\n\t\t\treturn; // 6096\n\t\t} // 6097\n // 6098\n\t\tdiv.style.cssText = // 6099\n\t\t\t\"box-sizing:border-box;\" + // 6100\n\t\t\t\"position:relative;display:block;\" + // 6101\n\t\t\t\"margin:auto;border:1px;padding:1px;\" + // 6102\n\t\t\t\"top:1%;width:50%\"; // 6103\n\t\tdiv.innerHTML = \"\"; // 6104\n\t\tdocumentElement.appendChild( container ); // 6105\n // 6106\n\t\tvar divStyle = window.getComputedStyle( div ); // 6107\n\t\tpixelPositionVal = divStyle.top !== \"1%\"; // 6108\n // 6109\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 // 6110\n\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\"; // 6111\n\t\tboxSizingReliableVal = divStyle.width === \"4px\"; // 6112\n // 6113\n\t\t// Support: Android 4.0 - 4.3 only // 6114\n\t\t// Some styles come back with percentage values, even though they shouldn't // 6115\n\t\tdiv.style.marginRight = \"50%\"; // 6116\n\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\"; // 6117\n // 6118\n\t\tdocumentElement.removeChild( container ); // 6119\n // 6120\n\t\t// Nullify the div so it wouldn't be stored in the memory and // 6121\n\t\t// it will also be a sign that checks already performed // 6122\n\t\tdiv = null; // 6123\n\t} // 6124", "function computeStyleTests() {\n\n\t\t// This is a singleton, we need to execute it only once\n\t\tif ( !div ) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\tdiv.style.cssText =\n\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"width:60%;top:1%\";\n\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.right = \"60%\";\n\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t// Support: IE 9 - 11 only\n\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t// Support: IE 9 only\n\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t// Support: Chrome <=64\n\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\tdiv.style.position = \"absolute\";\n\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\tdocumentElement.removeChild( container );\n\n\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t// it will also be a sign that checks already performed\n\t\tdiv = null;\n\t}", "function computeStyleTests() {\n\n\t\t// This is a singleton, we need to execute it only once\n\t\tif ( !div ) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\tdiv.style.cssText =\n\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"width:60%;top:1%\";\n\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.right = \"60%\";\n\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t// Support: IE 9 - 11 only\n\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t// Support: IE 9 only\n\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t// Support: Chrome <=64\n\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\tdiv.style.position = \"absolute\";\n\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\tdocumentElement.removeChild( container );\n\n\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t// it will also be a sign that checks already performed\n\t\tdiv = null;\n\t}", "function computeStyleTests() {\n\n\t\t// This is a singleton, we need to execute it only once\n\t\tif ( !div ) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\tdiv.style.cssText =\n\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"width:60%;top:1%\";\n\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.right = \"60%\";\n\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t// Support: IE 9 - 11 only\n\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t// Support: IE 9 only\n\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t// Support: Chrome <=64\n\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\tdiv.style.position = \"absolute\";\n\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\tdocumentElement.removeChild( container );\n\n\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t// it will also be a sign that checks already performed\n\t\tdiv = null;\n\t}" ]
[ "0.72141", "0.7208893", "0.7208893", "0.7207913", "0.7207913", "0.7151905", "0.7151905", "0.7149795", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7133335", "0.7101045", "0.69562185", "0.6621408", "0.65138865", "0.64884543", "0.64884543", "0.6478963", "0.6478963", "0.6478963", "0.6478963", "0.6478963", "0.6478963", "0.6478963", "0.6478963", "0.6478963", "0.6478963", "0.6478963", "0.6477073", "0.6477073", "0.6477073", "0.6477073", "0.6477073", "0.6477073", "0.6477073", "0.6477073", "0.6458878", "0.6458878", "0.6450686", "0.6450686", "0.6450686", "0.6450686", "0.6450686", "0.6450686", "0.6450686", "0.6444426", "0.6431863", "0.64280057", "0.64280057", "0.64280057" ]
0.0
-1
Return a css property mapped to a potentially vendor prefixed property
function vendorPropName( name ) { // Shortcut for names that are not vendor prefixed if ( name in emptyStyle ) { return name; } // Check for vendor prefixed names var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), i = cssPrefixes.length; while ( i-- ) { name = cssPrefixes[ i ] + capName; if ( name in emptyStyle ) { return name; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function vendorPropName(name){// Shortcut for names that are not vendor prefixed\nif(name in emptyStyle){return name;}// Check for vendor prefixed names\nvar capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name;}}}// Return a property mapped along what jQuery.cssProps suggests or to", "function vendorPropName(name){// Shortcut for names that are not vendor prefixed\nif(name in emptyStyle){return name;}// Check for vendor prefixed names\nvar capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name;}}}// Return a property mapped along what jQuery.cssProps suggests or to", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name){ // Shortcut for names that are not vendor prefixed\nif(name in emptyStyle){return name;} // Check for vendor prefixed names\nvar capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name;}}}", "function vendorPropName(name){// shortcut for names that are not vendor prefixed\nif(name in emptyStyle){return name;}// check for vendor prefixed names\nvar capName=name.charAt(0).toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name;}}}", "function vendorPropName(name){ // Shortcut for names that are not vendor prefixed\n\tif(name in emptyStyle){return name;} // Check for vendor prefixed names\n\tvar capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name;}}}", "function vendorPropName(name){// Shortcut for names that are not vendor prefixed\r\n\tif(name in emptyStyle){return name;}// Check for vendor prefixed names\r\n\tvar capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name;}}}", "function vendorPropName(name){// Shortcut for names that are not vendor prefixed\n\tif(name in emptyStyle){return name;}// Check for vendor prefixed names\n\tvar capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name;}}}", "function vendorPropName(style,name){ // Shortcut for names that are not vendor prefixed\nif(name in style){return name;} // Check for vendor prefixed names\nvar capName=name[0].toUpperCase() + name.slice(1),origName=name,i=cssPrefixes.length;while(i--) {name = cssPrefixes[i] + capName;if(name in style){return name;}}return origName;}", "function vendorPropName( name ) {\n\n // Shortcut for names that are not vendor prefixed\n if ( name in emptyStyle ) {\n return name;\n }\n\n // Check for vendor prefixed names\n var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n i = cssPrefixes.length;\n\n while ( i-- ) {\n name = cssPrefixes[ i ] + capName;\n if ( name in emptyStyle ) {\n return name;\n }\n }\n}", "function vendorPropName(style,name){// shortcut for names that are not vendor prefixed\n if(name in style){return name;}// check for vendor prefixed names\n var capName=name.charAt(0).toUpperCase()+name.slice(1),origName=name,i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in style){return name;}}return origName;}", "function vendorPropName( name ) {\n\n // shortcut for names that are not vendor prefixed\n if ( name in emptyStyle ) {\n return name;\n }\n\n // check for vendor prefixed names\n var capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n i = cssPrefixes.length;\n\n while ( i-- ) {\n name = cssPrefixes[ i ] + capName;\n if ( name in emptyStyle ) {\n return name;\n }\n }\n }", "function vendorPropName( name ) { // 6256\n // 6257\n\t// Shortcut for names that are not vendor prefixed // 6258\n\tif ( name in emptyStyle ) { // 6259\n\t\treturn name; // 6260\n\t} // 6261\n // 6262\n\t// Check for vendor prefixed names // 6263\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ), // 6264\n\t\ti = cssPrefixes.length; // 6265\n // 6266\n\twhile ( i-- ) { // 6267\n\t\tname = cssPrefixes[ i ] + capName; // 6268\n\t\tif ( name in emptyStyle ) { // 6269\n\t\t\treturn name; // 6270\n\t\t} // 6271\n\t} // 6272\n} // 6273", "function vendorPropName(style, name) {\n\n // shortcut for names that are not vendor prefixed\n if (name in style) {\n return name;\n }\n\n // check for vendor prefixed names\n var capName = name.charAt(0).toUpperCase() + name.slice(1),\n origName = name,\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[ i ] + capName;\n if (name in style) {\n return name;\n }\n }\n\n return origName;\n }", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}", "function vendorPropName(name) {\n\n // shortcut for names that are not vendor prefixed\n if (name in emptyStyle) {\n return name;\n }\n\n // check for vendor prefixed names\n var capName = name.charAt(0).toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n if (name in emptyStyle) {\n return name;\n }\n }\n }", "function vendorPropName(name) {\n\n // shortcut for names that are not vendor prefixed\n if (name in emptyStyle) {\n return name;\n }\n\n // check for vendor prefixed names\n var capName = name.charAt(0).toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n if (name in emptyStyle) {\n return name;\n }\n }\n }", "function vendorPropName(name) {\n // shortcut for names that are not vendor prefixed\n if (name in emptyStyle) {\n return name;\n } // check for vendor prefixed names\n\n\n var capName = name.charAt(0).toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n }" ]
[ "0.8101963", "0.8101963", "0.78021914", "0.78021914", "0.78021914", "0.78021914", "0.78021914", "0.78021914", "0.78021914", "0.78021914", "0.7735111", "0.77216125", "0.7643077", "0.7609047", "0.76016206", "0.7530761", "0.7466321", "0.74608654", "0.744541", "0.74176997", "0.7389506", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.7377184", "0.73460555", "0.73460555", "0.73356664" ]
0.0
-1
Return a property mapped along what jQuery.cssProps suggests or to a vendor prefixed property.
function finalPropName( name ) { var ret = jQuery.cssProps[ name ]; if ( !ret ) { ret = jQuery.cssProps[ name ] = vendorPropName( name ) || name; } return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function vendorPropName(name){// Shortcut for names that are not vendor prefixed\nif(name in emptyStyle){return name;}// Check for vendor prefixed names\nvar capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name;}}}// Return a property mapped along what jQuery.cssProps suggests or to", "function vendorPropName(name){// Shortcut for names that are not vendor prefixed\nif(name in emptyStyle){return name;}// Check for vendor prefixed names\nvar capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name;}}}// Return a property mapped along what jQuery.cssProps suggests or to", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property", "function finalPropName(name){var ret=jQuery.cssProps[name];if(!ret){ret=jQuery.cssProps[name]=vendorPropName(name)||name;}return ret;}", "function finalPropName(name){var ret=jQuery.cssProps[name];if(!ret){ret=jQuery.cssProps[name]=vendorPropName(name)||name;}return ret;}", "function finalPropName( name ) { // 6277\n\tvar ret = jQuery.cssProps[ name ]; // 6278\n\tif ( !ret ) { // 6279\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name; // 6280\n\t} // 6281\n\treturn ret; // 6282\n} // 6283", "function finalPropName( name ) {\n var ret = jQuery.cssProps[ name ];\n if ( !ret ) {\n ret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\n }\n return ret;\n}", "function finalPropName( name ) {\r\n\tvar ret = jQuery.cssProps[ name ];\r\n\tif ( !ret ) {\r\n\t\tret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;\r\n\t}\r\n\treturn ret;\r\n}" ]
[ "0.8121942", "0.8121942", "0.7477362", "0.7477362", "0.7477362", "0.7477362", "0.7477362", "0.7477362", "0.7477362", "0.7477362", "0.73348564", "0.73348564", "0.7179046", "0.7175243", "0.7073637" ]
0.7001662
95
Animations created synchronously will run synchronously
function createFxNow() { window.setTimeout( function() { fxNow = undefined; } ); return ( fxNow = jQuery.now() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_playAnimation() {\n if (this._animationLast === undefined && this._animationQueue.length > 0) {\n this._animationLast = this._animationCurrent;\n this._animationCurrent = this._animationQueue.shift();\n console.log(\"New: \" + this._animationCurrent.name);\n this._animationCurrent.runCount = 0;\n }\n this._serviceAnimation(this._animationCurrent, true);\n this._serviceAnimation(this._animationLast, false);\n if (this._animationLast && this._animationLast.cleanup) {\n this._animationLast.animation.stop();\n this._animationLast.animation = undefined;\n this._animationLast = undefined;\n }\n }", "createAnimations() {\r\n //#region Idle animation\r\n // Idle front\r\n this.anims.create({\r\n key: 'idle_front',\r\n frames: [\r\n {\r\n key: 'idle_front_0'\r\n },\r\n {\r\n key: 'idle_front_1'\r\n },\r\n {\r\n key: 'idle_front_2'\r\n },\r\n {\r\n key: 'idle_front_3'\r\n }\r\n ],\r\n frameRate: 2,\r\n repeat: -1,\r\n });\r\n\r\n // Idle back\r\n this.anims.create({\r\n key: 'idle_back',\r\n frames: [\r\n {\r\n key: 'idle_back_0'\r\n },\r\n {\r\n key: 'idle_back_1'\r\n },\r\n {\r\n key: 'idle_back_2'\r\n },\r\n {\r\n key: 'idle_back_3'\r\n }\r\n ],\r\n frameRate: 2,\r\n repeat: -1,\r\n });\r\n\r\n // Idle side\r\n this.anims.create({\r\n key: 'idle_side',\r\n frames: [\r\n {\r\n key: 'idle_side_0'\r\n },\r\n {\r\n key: 'idle_side_1'\r\n },\r\n {\r\n key: 'idle_side_2'\r\n },\r\n {\r\n key: 'idle_side_3'\r\n }\r\n ],\r\n frameRate: 2,\r\n repeat: -1,\r\n });\r\n\r\n //#endregion\r\n\r\n //#region Run animations\r\n\r\n // Run front\r\n this.anims.create({\r\n key: 'run_front',\r\n frames: [\r\n {\r\n key: 'run_front_0'\r\n },\r\n {\r\n key: 'run_front_1'\r\n },\r\n {\r\n key: 'run_front_2'\r\n },\r\n {\r\n key: 'run_front_3'\r\n }\r\n ],\r\n frameRate: 6,\r\n repeat: -1,\r\n });\r\n\r\n // Run back\r\n this.anims.create({\r\n key: 'run_back',\r\n frames: [\r\n {\r\n key: 'run_back_0'\r\n },\r\n {\r\n key: 'run_back_1'\r\n },\r\n {\r\n key: 'run_back_2'\r\n },\r\n {\r\n key: 'run_back_3'\r\n }\r\n ],\r\n frameRate: 6,\r\n repeat: -1,\r\n });\r\n\r\n // Run side\r\n this.anims.create({\r\n key: 'run_side',\r\n frames: [\r\n {\r\n key: 'run_side_0'\r\n },\r\n {\r\n key: 'run_side_1'\r\n },\r\n {\r\n key: 'run_side_2'\r\n },\r\n {\r\n key: 'run_side_3'\r\n }\r\n ],\r\n frameRate: 6,\r\n repeat: -1,\r\n });\r\n\r\n //#endregion\r\n }", "requestUpdateAnimations () {\n this.animationsUpdateNeeded = true;\n }", "animation() {}", "initAnimations() {\n this.animations = [];\n let interpolant = new TransformationInterpolant();\n\n for (var key in this.graph.animations) {\n if (this.graph.animations.hasOwnProperty(key)) {\n let animation = this.graph.animations[key];\n let keyframes = animation.keyframes;\n let keyframeTrack = new TransformationTrack(keyframes, interpolant);\n this.animations[key] = new KeyframeAnimation(keyframeTrack);\n }\n }\n\n this.interface.addAnimations();\n }", "updateAnimation() {\n this.animator.animate();\n }", "InitAnims() {\n this.scene.anims.create({\n key: 'idle',\n frames: this.scene.anims.generateFrameNumbers('player_idle', { start: 0, end: 5 }),\n frameRate: 8,\n repeat: -1\n });\n this.scene.anims.create({\n key: 'run',\n frames: this.scene.anims.generateFrameNumbers('player_run', { start: 0, end: 39 }),\n frameRate: 60,\n repeat: -1\n });\n this.scene.anims.create({\n key: 'jump',\n frames: [{ key: 'player_jump', frame: 0 }],\n frameRate: 24\n });\n this.scene.anims.create({\n key: 'attack',\n frames: this.scene.anims.generateFrameNumbers('player_attack', { start: 0, end: 7 }),\n frameRate: 24,\n showOnStart: true,\n hideOnComplete: true\n });\n this.scene.anims.create({\n key: 'death',\n frames: this.scene.anims.generateFrameNumbers('player_death', { start: 0, end: 7 }),\n frameRate: 4,\n showOnStart: true,\n hideOnComplete: false\n });\n }", "async function playAnimationSequence() {\n\ttry {\n\t\tdocument.getElementById(\"map-container\").innerHTML = \"\"; // clear any existing content\n\n\t\t// await renderSVGPromiseWrapper('roads', \"scenario-sync\", 10);\n\t\t// await renderSVGPromiseWrapper('parks', \"sync\", 120);\n\t\t// await renderSVGPromiseWrapper('buildings', \"delayed\", 120);\n\t\t// await renderSVGPromiseWrapper('trees', \"sync\", 15);\n\t\t// await renderSVGPromiseWrapper('blocks', \"scenario-sync\", 5);\n\t\t// await renderSVGPromiseWrapper('lots', \"sync\", 10);\n\n\n\t\t// console.log('animation complete.');\n\t} catch (error) {\n\t\tconsole.error(\"ERROR:\" + error);\n\t}\n}", "function runAnimay(){\n ropAnimation();\n headAnimation();\n bodyAnimation();\n larmAnimation();\n rarmAnimation();\n llegAnimation();\n rlegAnimation();\n}", "addAnimations() {\n\n // eyes animations (moving eyes of the inspector)\n let frameRate = 50; // frame rate of the animation\n\n // from mid to right\n this.anims.create({\n key: 'midToRight',\n frames: this.anims.generateFrameNames('eyes', {frames: [0, 1, 2, 3, 4, 5]}),\n frameRate: frameRate,\n paused: true\n });\n\n // from right to mid\n this.anims.create({\n key: 'rightToMid',\n frames: this.anims.generateFrameNames('eyes', {frames: [5, 4, 3, 2, 1, 0]}),\n frameRate: frameRate,\n paused: true\n });\n\n // from mid to left\n this.anims.create({\n key: 'midToLeft',\n frames: this.anims.generateFrameNames('eyes', {frames: [0, 6, 7, 8, 9, 10]}),\n frameRate: frameRate,\n paused: true\n });\n\n // from left to mid\n this.anims.create({\n key: 'leftToMid',\n frames: this.anims.generateFrameNames('eyes', {frames: [10, 9, 8, 7, 6, 0]}),\n frameRate: frameRate,\n paused: true\n });\n\n // from left to right\n this.anims.create({\n key: 'leftToRight',\n frames: this.anims.generateFrameNames('eyes', {frames: [10, 9, 8, 7, 6, 0, 1, 2, 3, 4, 5]}),\n frameRate: frameRate,\n paused: true\n });\n\n // from right to left\n this.anims.create({\n key: 'rightToLeft',\n frames: this.anims.generateFrameNames('eyes', {frames: [5, 4, 3, 2, 1, 0, 6, 7, 8, 9, 10]}),\n frameRate: frameRate,\n paused: true\n });\n\n }", "playAnimation() {\n for (var key in this.animations) {\n if (this.animations.hasOwnProperty(key)) {\n this.animations[key].setFinished(false);\n }\n }\n }", "function createAnimation(elems, values, duration, onFinishFn) {\n nativeGlobal.setTimeout(function() {\n var newAnimation = animate.animateTransforms(elems, values, duration, onFinishFn);\n runningAnimations.push(newAnimation);\n }, 18); // Wait one frame, for Firefox\n\n}", "updateAnimation() {\n return;\n }", "function animate (params) {\n // add new animation task to task queue\n tasks.push(new animationTask(params));\n\n if (tasks.length == 1) {\n // start animation interval timer since this is the first item in the task queue\n start();\n }\n }", "function fireInitialAnimations() {\n $mdUtil.nextTick(function() {\n $animate.addClass($element, 'md-noop');\n });\n }", "function animate() {\n requestAnimationFrame(animate);\n\n clockDelta = clock.getDelta();\n \n // update controls, including auto-rotation\n controls.update();\n\n // run each custom animation function.\n if (enableAnimation) {\n for (var x = 0; x < animFunctions.length; x++) {\n animFunctions[x]();\n }\n }\n\n // render with the composer\n composer.render();\n}", "function initAnimation() {\n}", "function animationManager () {\n for (var i = tasks.length; i--;) {\n if (tasks[i].step() == false) {\n // remove animation tasks\n logToScreen(\"remove animation\");\n tasks.splice(i, 1);\n }\n }\n }", "initAnimations() {\n this.animations = new Map();\n\n for (let [id, animation] of this.graph.animations) {\n let anim = new MyKeyframeAnimation(animation.keyframes);\n this.animations.set(id, anim);\n }\n }", "start() {\n this._enableAnimation = true;\n this._numberOfAnimationCycles = 0;\n }", "function anim() {\r\n Loop();\r\n requestAnimFrame(anim);\r\n }", "function test_animate() {\n //Do the preview (IS THIS NEEDED?)\n if (AUTO_ANIM) {\n for (var i = 0; i < NODES.length; i++) {\n if (NODES[i].parent) {\n var r = Math.min(Math.max(parseFloat(atob(NODES[i].id)), 0.3), 0.7);\n NODES[i].th = NODES[i].th0 + Math.sin((new Date()).getTime() * 0.003 / r + r * Math.PI * 2) * r * 0.5;\n } else {\n NODES[i].th = NODES[i].th0\n }\n }\n }\n doodleMeta.forwardKinematicsNodes(NODES);\n doodleMeta.calculateSkin(SKIN);\n\n //Do the transfered drawings\n if (AUTO_ANIM) {\n for (let i = 0; i < drawings.length; i++) {\n drawings[i].animate();\n }\n }\n //anim_render();\n master_render();\n}", "function animate() {\n requestAnimationFrame(animate);\n render();\n update();\n }", "function animate() {\r\n\tif (runAnim) {\r\n\t\trequestAnimationFrame(animate);\r\n\t}\r\n\trender();\r\n}", "createSpriteAnimations() {\n const haloFrames = this.anims.generateFrameNames('haloHit', { \n start: 1, end: 84, zeroPad: 5,\n prefix: 'Halo_' , suffix: '.png'\n });\n\n this.anims.create({ key: 'haloHit', frames: haloFrames, frameRate: 60, repeat: 0 });\n\n const sparkFrames = this.anims.generateFrameNames('sparkHit', { \n start: 1, end: 84, zeroPad: 5,\n prefix: 'Spark_' , suffix: '.png'\n });\n\n this.anims.create({ key: 'sparkHit', frames: sparkFrames, frameRate: 60, repeat: -1 });\n }", "static fromFrames(frames) {\nvar anim;\n//----------\nanim = new CASAnimation();\nanim.setFromFrames(frames);\nreturn anim;\n}", "addAnimation(anims,timeBetween = 1, loop = true){\n var animArr = []\n for (var i = 0; i < anims.length; i++){\n animArr[i] = new Image(this.width, this.height)\n animArr[i].src = anims[i]\n animArr[i].width = this.width\n animArr[i].height = this.height\n }\n\n this.animIndex = 0\n this.animsArray[this.numberOfAnimations] = animArr\n this.numberOfAnimations++;\n if (this.animsArray.length === 1){\n this.anims = animArr;\n this.timeBetweenAnim = timeBetween\n setInterval(function(){\n this.image = this.anims[this.animIndex];\n this.animIndex++;\n if (this.animIndex >=this.anims.length){\n this.animIndex =0\n }\n }.bind(this), this.timeBetweenAnim)\n }\n }", "function animate() {\n\n\t\tconst mixer = editor.mixer;\n\t\tconst delta = clock.getDelta();\n\n\t\tlet needsUpdate = false;\n\n\n\t\t//yomotsu camera\n\t\tneedsUpdate = controls.update( delta );\n\n\t\t// Animations\n\n\n\t\tconst actions = mixer.stats.actions;\n\n\t\tif ( actions.inUse > 0 || prevActionsInUse > 0 ) {\n\n\t\t\tprevActionsInUse = actions.inUse;\n\n\t\t\tmixer.update( delta );\n\t\t\tneedsUpdate = true;\n\n\t\t}\n\n\t\t// View Helper\n\n\t\tif ( viewHelper.animating === true ) {\n\n\t\t\tviewHelper.update( delta );\n\t\t\tneedsUpdate = true;\n\n\t\t}\n\n\t\tif ( vr.currentSession !== null ) {\n\n\t\t\tneedsUpdate = true;\n\n\t\t}\n\n\t\tif ( needsUpdate === true ) render();\n\n\t}", "function addAnimation() {\n const Burst1 = new mojs.Burst({\n parent: animationDiv,\n top: '50%',\n left: '50%',\n radius: {0: 80},\n count: 8,\n children: {\n shape: 'circle',\n fill: {'red': 'blue'},\n strokeWidth: 1,\n duration: 600,\n stroke: {'red': 'blue'}\n }\n });\n\n\n const Burst2 = new mojs.Burst({\n parent: animationDiv,\n top: '50%',\n left: '50%',\n radius: {0: 100},\n count: 4,\n children: {\n shape: 'rect',\n fill: 'white',\n strokeWidth: 1,\n duration: 300,\n stroke: 'white'\n }\n });\n\n\n const circle1 = new mojs.Shape({\n radius: {0: 40},\n parent: animationDiv,\n fill: 'none',\n stroke: 'white',\n strokeWidth: 15,\n duration: 300,\n opacity: {1: 0}\n });\n\n const circle2 = new mojs.Shape({\n radius: {0: 50},\n parent: animationDiv,\n fill: 'none',\n stroke: 'red',\n strokeWidth: 5,\n duration: 400,\n opacity: {1: 0}\n });\n\n\n const circle3 = new mojs.Shape({\n radius: {0: 60},\n parent: animationDiv,\n fill: 'none',\n stroke: 'blue',\n strokeWidth: 5,\n duration: 500,\n opacity: {1: 0}\n });\n\n const circle4 = new mojs.Shape({\n radius: {0: 70},\n parent: animationDiv,\n fill: 'white',\n\n stroke: 'white',\n strokeWidth: 5,\n duration: 600,\n opacity: {1: 0}\n });\n\n const timeline = new mojs.Timeline({\n\n repeat: 0\n }).add(circle4, circle1, circle2, circle3, Burst1, Burst2);\n\n timeline.play();\n }", "function animateButtons() {\n for (var i = 0; i < game.sequence.length; i++) {\n delayedAnimation(game.sequence[i], i * game.delayBetweenAnimations);\n console.log('here', game.sequence);\n }\n}", "function createObjectAnimations() {\r\n this.anims.create({\r\n key: 'jewelAnims',\r\n frames: this.anims.generateFrameNumbers('jewel', { start: 0, end: 4 }),\r\n frameRate: 10,\r\n repeat: -1,\r\n });\r\n\r\n this.anims.create({\r\n key: 'cherryAnims',\r\n frames: this.anims.generateFrameNumbers('cherry', { start: 0, end: 6 }),\r\n frameRate: 6,\r\n repeat: -1,\r\n });\r\n}", "function animate(){\n\t\trequestAnimationFrame( animate );\n\t\trender();\n\t}", "initiateAnimation() {\n let previousPosition = this.gameOrchestrator.gameboard.getPiecePosition(this.firstTile.col, this.firstTile.row);\n previousPosition[1] = 0; //in the start position, the height is not needed \n\n let nextPosition = this.gameOrchestrator.gameboard.getPiecePosition(this.secondTile.col, this.secondTile.row)\n\n let animation = new PieceAnimation(this.gameOrchestrator.scene, previousPosition, nextPosition, MOVE_SPEED);\n\n this.animations.push(animation);\n\n this.gameOrchestrator.gameboard.setPieceAnimation(this.firstTile.col, this.firstTile.row, animation);\n }", "updateAnimations() {\n this.animations.forEach((animation, index) => {\n if (animation.finished) {\n this.animations.splice(index, 1);\n }\n });\n }", "function animate() { \n console.log('animate')\n \n gsap.registerEffect({\n name: \"fadeIn\",\n effect: (targets, config) => {\n var tlEffect = gsap.timeline();\n tlEffect.from(targets, {duration: config.duration, y:config.y, force3D:true, rotation: 0.01, stagger:config.stagger, ease:\"power2\"})\n .from(targets, {duration: config.duration, stagger:config.stagger, alpha:0, ease:\"none\"}, \"<\")\n return tlEffect;\n },\n defaults: {duration: 1.5, y:\"-=7\", stagger:4.5},\n extendTimeline: true,\n });\n \n gsap.to(plantWraps, {duration:25, rotation:\"+=20\", ease:\"none\"})\n gsap.to(flowerWraps, {duration:25, rotation:\"+=100\", ease:\"none\"})\n \n var imageDivs = selectAll('.imageDiv');\n // logoIntro = false;\n\n\t\t\ttl\n .to(bannerCover, {duration:0.7, alpha:0, ease:\"none\"})\n \n .from(plants, {duration:3, drawSVG:\"50% 50%\", ease:\"sine.inOut\"}, \"<\")\n .from(flowers, {duration:2, alpha:0, ease:\"none\"}, \"<\")\n \n if(logoIntro) {\n tl\n .from(letter_w, {duration:0.5, drawSVG: 0, ease:\"sine.in\"}, \"<\")\n .from(letter_y, {duration:0.3, drawSVG: 0, ease:\"sine.in\"}, \">\")\n .from(letter_nn, {duration:0.8, drawSVG: 0, ease:\"sine.inOut\"}, \">\")\n .from(lasvegas, {duration:0.7, y:\"-=10\", alpha: 0, ease:\"sine\"}, \">\")\n .from(sign_r, {duration:0.5, alpha: 0, ease:\"none\"}, \"<\")\n\n .to(logo, {duration:0.7, alpha:0, ease:\"none\"}, \">1\")\n .set(logo, {scale: 0.37, y:99, x:-60}, \">\")\n } else {\n tl\n .set(logo, {scale: 0.37, alpha:0,y:99, x:-60}, \"<\")\n }\n \n tl\n .from(imageDivs, {duration:1.3, stagger:4, alpha:0, blur:10, force3D:true, rotation: 0.01, ease:\"none\"}, \"<\")\n \n .fadeIn(text_head, \"<0.4\")\n .fadeIn(text_subHead,{y:\"0\", duration: 1,},\"<0.6\")\n .to(logo, {duration:1, alpha:1, ease:\"none\"}, \"<0.4\")\n .from(cta, {duration:0.8, alpha: 0, ease:\"none\"}, \"<\")\n .from(cta, {duration:1.6, rotateX:90, ease:\"power2\"}, \"<\") \n\t\t}", "animateInorderNodes() {\r\n let queue = [];\r\n let animations = [];\r\n animations.push(new Animation(\"display\", \"Traversing Inorder\", \"\"));\r\n\r\n this.animateInorderNodesHelper(this.root, queue, animations);\r\n\r\n animations.push(new Animation(\"display\", \"Finished Travering\", \"\"));\r\n\r\n return [queue, animations];\r\n }", "function start () {\n animationInt = window.setInterval(animationManager, animatorIntervalTime);\n }", "addAnimations(...animations) {\n animations.forEach(animation => {\n Object.keys(animation).forEach(key => {\n UI.animations[key] = animation[key];\n });\n });\n }", "function createAnimations(that){\n \n that.anims.create({\n key: \"left\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 2, end: 0 }),\n repeat: 0\n });\n\n that.anims.create({\n key: \"finish-left\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 0, end: 2 }),\n repeat: 0\n });\n \n that.anims.create({\n key: \"right\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 2, end: 4 })\n });\n\n that.anims.create({\n key: \"finish-right\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 4, end: 2 })\n });\n\n that.anims.create({\n key: \"down\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 7, end: 2 }),\n });\n\n that.anims.create({\n key: \"up\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 2, end: 7 })\n });\n\n}", "function createAnimations(that){\n \n that.anims.create({\n key: \"left\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 2, end: 0 }),\n repeat: 0\n });\n\n that.anims.create({\n key: \"finish-left\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 0, end: 2 }),\n repeat: 0\n });\n \n that.anims.create({\n key: \"right\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 2, end: 4 })\n });\n\n that.anims.create({\n key: \"finish-right\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 4, end: 2 })\n });\n\n that.anims.create({\n key: \"down\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 7, end: 2 }),\n });\n\n that.anims.create({\n key: \"up\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 2, end: 7 })\n });\n\n}", "function animate() {\n // render\n controls0.update();\n controls1.update();\n controls2.update();\n controls3.update();\n\n if (ready) {\n renderer0.render(sceneScreen0, camera0);\n renderer1.render(sceneScreen1, camera1);\n renderer2.render(sceneScreen2, camera2);\n renderer3.render(sceneScreen3, camera3);\n }\n\n stats.update();\n\n // request new frame\n requestAnimationFrame(function() {\n animate();\n });\n }", "get importAnimation() {}", "queueVisualEffect(action, isAnimated) {\n if (this.isInAnimation) {\n // queue\n this.visualEffectQueue.push({\n isAnimated: isAnimated,\n action: action,\n });\n } else {\n // execute\n this.isInAnimation = isAnimated;\n action();\n }\n }", "function animate() {\n var timeNow = new Date().getTime();\n\n if (animate.timeLast) {\n var elapsed = timeNow - animate.timeLast;\n\n\n for (var i = 0; i < items.length; i++) {\n items[i].animate();\n }\n }\n animate.timeLast = timeNow;\n}", "runAnimation() {\n const animate = () => {\n const duration = this.getAnimationDuration();\n setStyle(this.slider, 'transform', 'translateX(0%)');\n setStyle(this.slider, 'transition', `transform ${duration}ms linear`);\n setStyle(this.slider, 'transform', 'translateX(-100%)');\n\n this.animationTimer = setTimeout(() => {\n this.stopAnimation();\n requestAnimationFrame(() => animate());\n }, duration / 2);\n };\n\n animate();\n }", "function animate() {\n // if (stackHelper) {\n // stackHelper.index += 1;\n // if (stackHelper.outOfBounds === true) {\n // stackHelper.orientation = (stackHelper.orientation + 1) % 3;\n // stackHelper.index = 0;\n // }\n // }\n\n controls.update();\n renderer.render(scene, camera);\n stats.update();\n\n // request new frame\n requestAnimationFrame(function() {\n animate();\n });\n }", "function animate() {\n\trequestAnimationFrame(animate);\n\trender();\n}", "function tick(){\n //iterate through animations and check for active state\n //if active, run position calculation on animations\n var activityCheck = false;\n var now = $.now();\n //console.log('$.animation.tick', now );\n\n for (var k in animations){\n //console.log(' ',k,animations[k].isActive());\n if (animations[k].isActive()){\n activityCheck = true;\n if ( !animations[k].isComplete() ){\n //console.log(' ','not complete');\n animations[k].enterFrame( now );\n }\n else{\n //console.log(' ','complete');\n //catch complete on next tick\n $.event.trigger(animations[k],'animationcomplete',false,false);\n delete animations[k];\n freeAnimationIds.push( parseInt(k) );\n }\n }\n }\n\n if (activityCheck){\n requestTick();\n }\n else {\n active = false;\n }\n }", "function loadEvents() {\r\n\r\n\t\t// Transition from 1st to 2nd sequence\r\n\t\t$('#ir-anim-container #white-circle').on('click', function() {\r\n\t\t\t$('#ir-anim-container #white-circle').css('background', 'white');\r\n\t\t\tsequence = 0;\r\n\r\n\t\t\t$('#ir-anim-container #gifts').fadeOut();\r\n\t\t\t$('#ir-anim-container #white-circle').find('h1, h2').fadeOut(function() {\r\n\r\n\t\t\t\t// Fallback for browsers without CSS animations\r\n\t\t\t\tif (Modernizr.cssanimations) {\r\n\t\t\t\t\t$('#ir-anim-container #white-circle').animate({ backgroundColor: 'white' }, 300);\r\n\t\t\t\t $('#ir-anim-container #white-circle').addClass('zoom');\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$('#ir-anim-container #white-circle').animate({ left: '-250px', top: '-250px', width: '1000px', height: '1000px' }, 500);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tphysics.debugDraw.SetFlags(0);\r\n\r\n\t\t\t\t// Dummy animation to delay the start of the particle generation\r\n\t\t\t\t$('#ir-anim-container #white-circle').animate({'color':'#FFF'}, 500, function() {\r\n\r\n\t\t\t\t\tclearInterval(physics.generator);\r\n\t\t\t\t\tdelete physics.world;\r\n\t\t\t\t\tsequence = 2;\r\n\r\n\t\t\t\t\t$('body').css('background', '#FFF'); // This line is only for the demo. Remove on integration\r\n\t\t\t\t\t$('#ir-anim-container').css('background', '#FFF');\r\n\t\t\t\t\t$('#ir-anim-container #white-circle').remove();\r\n\r\n\t\t\t\t\t// Start assembling the gift after 5 secounds\r\n\t\t\t\t\tvar timer = setTimeout(function() {\r\n\r\n\t\t\t\t\t\tif (!initialized) {\r\n\t\t\t\t\t\t\tassembleShape();\r\n\r\n\t\t\t\t\t\t\tvar len = nodes.length;\r\n\r\n\t\t\t\t\t\t\t// Update the size of the nodes\r\n\t\t\t\t\t\t\twhile (len--) {\r\n\t\t\t\t\t\t\t\tnodes[len].fadeOut = true;\r\n\t\t\t\t\t\t\t\tnodes[len].speedScale = (Math.random() * 2.8) + 0.5;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tinitialized = true;\r\n\t\t\t\t\t\t\tsetTimeout(function() { $('#ir-anim-container #congrats').fadeIn() }, 4000);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}, 5000); // Display the gift after 5 seconds\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t});\r\n\t}", "function animate() {\n requestAnimationFrame(animate);\n update();\n render();\n }", "animatePreorderNodes() {\r\n let queue = [];\r\n let animations = [];\r\n animations.push(new Animation(\"display\", \"Traversing Preorder\", \"\"));\r\n\r\n this.aniamtePreorderNodesHelper(this.root, queue, animations);\r\n\r\n animations.push(new Animation(\"display\", \"Finished Traversing\", \"\"));\r\n\r\n return [queue, animations];\r\n }", "function animate() {\n requestAnimationFrame( animate );\n controls.update();\n render();\n }", "function startAnim() {\n console.log('startAnim');\n\n //TweenMax.from(closeButton, fadeTime/2, {delay:0, autoAlpha:0, ease:animTypeIn});\n\n TweenMax.from(bg1, fadeTime, {\n delay: 0,\n autoAlpha: 0,\n ease: animTypeIn\n });\n TweenMax.to(bg1, imagePanTime, {\n delay: 0,\n y: -50,\n ease: imagePanAnimType\n });\n\n TweenMax.from([bookmarkBase, map, location1, bookmarkDivider, pnzSmall], animTimeIn, {\n delay: 1,\n autoAlpha: 0,\n y: -animOffsetDist,\n ease: animTypeIn\n });\n TweenMax.from(headline1, animTimeIn, {\n delay: 1,\n autoAlpha: 0,\n y: animOffsetDist,\n ease: animTypeIn\n });\n TweenMax.from(mapMarker1, mapMarkerAnimTime, {\n delay: 2,\n autoAlpha: 0,\n scale: 0,\n ease: mapMarkerAnimType\n });\n\n TweenMax.from(expandButton, animTimeIn, {\n delay: 2,\n autoAlpha: 0,\n y: animOffsetDist,\n ease: animTypeIn\n });\n\n TweenMax.delayedCall(6, frame2);\n}", "loadAnimations() {\n for (var i = 0; i < 5; i++) { //Action State: 0-idle,1-walking,2-attacking,3-jumping,4-running\n this.animations.push([]);\n for (var j = 0; j < 2; j++) { //Direction State: 0-right, 1-left\n this.animations[i].push([]);\n for (var k = 0; k < 3; k++) { //Weapon State: 0-unequipped, 1-sword, 2-bow\n this.animations[i][j].push([]);\n }\n }\n }\n for (var h = 0; h < 3; h++) {\n this.deadAnimL.push([]);\n this.deadAnimR.push([]);\n }\n //idle animation for state 0\n // facing right\n this.animations[0][0][0] = new Animator(this.spritesheet, 35, 16, 65, 91, 12,\n 0.05, 125.05, false, true);\n\n // facing left\n this.animations[0][1][0] = new Animator(this.spritesheet, 30, 115, 75, 91, 12,\n 0.05, 115.05, true, true);\n\n //walking animation for state 1\n // facing right\n this.animations[1][0][0] = new Animator(this.spritesheet, 25, 218, 65, 91, 12,\n 0.05, 125.05, false, true);\n\n // facing left\n this.animations[1][1][0] = new Animator(this.spritesheet, 45, 322, 70, 91, 12,\n 0.05, 120.05, true, true);\n\n //attacking animation\n // facing right\n this.animations[2][0][0] = new Animator(this.spritesheet, 35, 630, 95, 91, 10,\n 0.038, 95.05, false, true);\n\n // facing left\n this.animations[2][1][0] = new Animator(this.spritesheet, 50, 735, 95, 91, 10,\n 0.038, 95.05, true, true);\n\n //jumping\n // facing right\n this.animations[3][0][0] = new Animator(this.spritesheet, 12, 1170, 90, 100, 1,\n .2, 100.05, false, true);\n //facing left\n this.animations[3][1][0] = new Animator(this.spritesheet, 20, 1270, 100, 100, 1,\n .2, 90.05, false, true);\n\n //running\n // facing right\n this.animations[4][0][0] = new Animator(this.spritesheet, 43, 415, 65, 91, 8,\n 0.07, 125.05, false, true);\n\n // facing left\n this.animations[4][1][0] = new Animator(this.spritesheet, 33, 520, 75, 91, 8,\n 0.05, 115.05, true, true);\n\n //death\n // facing right\n this.deadAnimR[0] = new Animator(this.spritesheet, 0, 860, 105, 120, 11,\n .07, 85.05, false, false);\n //facing left\n this.deadAnimL[0] = new Animator(this.spritesheet, 18, 1000, 105, 120, 11,\n .07, 85.05, true, false);\n\n //------------------------------for sword animations ---------------------------------\n\n //idle animation for state 0\n // facing right\n this.animations[0][0][1] = new Animator(this.spritesheetSword, 6, 16, 105, 91, 6,\n 0.09, 85.05, false, true);\n\n // facing left\n this.animations[0][1][1] = new Animator(this.spritesheetSword, 5, 115, 105, 91, 6,\n 0.09, 85.05, true, true);\n\n //walking animation for state 1\n // facing right\n this.animations[1][0][1] = new Animator(this.spritesheetSword, 25, 214, 105, 91, 10,\n 0.05, 85.05, false, true);\n\n // facing left\n this.animations[1][1][1] = new Animator(this.spritesheetSword, 10, 318, 105, 91, 12,\n 0.05, 85.05, true, true);\n\n //attacking animation\n // facing right\n this.animations[2][0][1] = new Animator(this.spritesheetSword, 18, 615, 155, 105, 10,\n 0.045, 35.05, false, true);\n\n // facing left\n this.animations[2][1][1] = new Animator(this.spritesheetSword, 0, 722, 155, 105, 10,\n 0.045, 35.05, true, true);\n\n //jumping\n // facing right\n this.animations[3][0][1] = new Animator(this.spritesheetSword, 12, 1155, 140, 100, 1,\n .2, 50.05, false, true);\n //facing left\n this.animations[3][1][1] = new Animator(this.spritesheetSword, 5, 1270, 140, 100, 1,\n .2, 50.05, false, true);\n\n //running\n // facing right\n this.animations[4][0][1] = new Animator(this.spritesheetSword, 43, 415, 105, 91, 8,\n 0.06, 85.05, false, true);\n\n // facing left\n this.animations[4][1][1] = new Animator(this.spritesheetSword, 0, 520, 105, 91, 8,\n 0.06, 85.05, true, true);\n\n //death\n // facing right\n this.deadAnimR[1] = new Animator(this.spritesheetSword, 0, 837, 115, 150, 12,\n .06, 75.05, false, false);\n //facing left\n this.deadAnimL[1] = new Animator(this.spritesheetSword, 50, 986, 125, 150, 9,\n .06, 65.05, true, false);\n\n this.swordEquipR = new Animator(this.spritesheetSword, 402, 1148, 105, 91, 7,\n .04, 85, false, false);\n this.swordEquipL = new Animator(this.spritesheetSword, 402, 1270, 105, 91, 7,\n .04, 85, true, false);\n\n\n //for bow animations ---------------------------------\n //idle animation for state 0\n // facing right\n this.animations[0][0][2] = new Animator(this.spritesheetBow, 2, 5, 85, 91, 6,\n 0.07, 105.05, false, true);\n\n // facing left\n this.animations[0][1][2] = new Animator(this.spritesheetBow, 8, 106, 75, 91, 6,\n 0.08, 115.05, true, true);\n\n //walking animation for state 1\n // facing right\n this.animations[1][0][2] = new Animator(this.spritesheetBow, 7, 216, 85, 91, 12,\n 0.05, 105.05, false, true);\n\n // facing left\n this.animations[1][1][2] = new Animator(this.spritesheetBow, 7, 320, 85, 91, 12,\n 0.05, 105.05, true, true);\n\n //attacking animation\n // facing right\n this.animations[2][0][2] = new Animator(this.spritesheetBow, 25, 630, 95, 91, 15,\n 0.05, 94.95, false, true);\n\n // facing left\n this.animations[2][1][2] = new Animator(this.spritesheetBow, 20, 743, 95, 91, 15,\n 0.05, 94.95, true, true);\n\n //jumping\n // facing right\n this.animations[3][0][2] = new Animator(this.spritesheetBow, 12, 1170, 100, 100, 1,\n .2, 90.05, false, true);\n //facing left\n this.animations[3][1][2] = new Animator(this.spritesheetBow, 20, 1270, 100, 100, 1,\n .2, 90.05, false, true);\n\n //running\n // facing right\n this.animations[4][0][2] = new Animator(this.spritesheetBow, 43, 420, 85, 91, 8,\n 0.07, 105.05, false, true);\n\n // facing left\n this.animations[4][1][2] = new Animator(this.spritesheetBow, 27, 525, 85, 91, 8,\n 0.05, 105.05, true, true);\n\n //death\n // facing right\n this.deadAnimR[2] = new Animator(this.spritesheetBow, 15, 845, 155, 135, 9,\n .07, 35.05, false, false);\n //facing left\n this.deadAnimL[2] = new Animator(this.spritesheetBow, 40, 1000, 155, 135, 9,\n .07, 35.05, true, false);\n\n\n }", "function animate() {\n\t\t\t\t\t\trequestAnimationFrame(animate);\n\t\t\t\t\t\tupdate();\n\t\t\t\t\t\trender();\n\t\t\t\t\t}", "preload() {\n this.anims.create({\n key: \"idle\", \n frameRate: 10, \n repeat: -1,\n frames: this.anims.generateFrameNumbers(\"IDLE\", {\n frames: [0,1]\n })\n });\n\n this.anims.create({\n key: \"idleLeft\", \n frameRate: 5, \n repeat: -1,\n frames: this.anims.generateFrameNumbers(\"IDLE\", {\n frames: [1,0]\n })\n });\n\n this.anims.create({\n key: \"runRight\", \n frameRate: 7, \n repeat: -1,\n frames: this.anims.generateFrameNumbers(\"IDLE\", {\n //frames: [2,3,4,5,6,7]\n frames: [0,1]\n })\n });\n \n this.anims.create({\n key: \"runLeft\", \n frameRate: 7, \n repeat: -1,\n frames: this.anims.generateFrameNumbers(\"RUN\", {\n frames: [7,6,5,4,3,2]\n })\n });\n\n this.anims.create({\n key: \"slash\", \n frameRate: 60, \n repeat: -1,\n frames: this.anims.generateFrameNumbers(\"SLASH\", {\n frames: [0,1,2,3,4,5,6,7,8]\n })\n });\n \n this.load.image(\"ground\", \"./assets/ground.png\");\n }", "if (m_bInitialAnim) { return; }", "function startAnimations(i) {\n\tsetInterval(function() {\n \tbetta = beta;\n \taalpha = alpha;\n \tanimateDiv(betta, aalpha, i);\n \t}, 1000);\n}", "restartAnimation() {\n for (var key in this.animations) {\n if (this.animations.hasOwnProperty(key)) {\n this.animations[key].setFinished(false);\n this.animations[key].reset();\n }\n }\n }", "run() {\n\t\tif(this.element.style.webkitAnimationPlayState !== 'running'){\n\t\t\tthis.element.style.webkitAnimationPlayState = 'running';\n\t\t\tthis.startTime = (new Date()).getTime();\n\t\t}\n\t}", "createAnimation() {\n this.scene.anims.create({\n key: 'bullet-hit',\n frames: this.scene.anims.generateFrameNumbers('bullet-hit', {\n start: 0,\n end: 10\n }),\n frameRate: FRAMERATE\n });\n }", "function animate() {\r\n\r\n\trequestAnimationFrame( animate );\r\n\trender();\r\n\r\n}", "handleAnimation() {\n Animated.timing(this.state.fadeAnim, {\n toValue: 1,\n duration: 1000,\n }).start();\n }", "function animate() {\n requestAnimationFrame( animate );\n render();\n}", "function doAnimate() {\n start = Date.now();\n do {\n if ((Date.now() - start) < 20000 && sunnySet == false) {\n setSceneSunny();\n sunnySet = true;\n console.log((Date.now() - start));\n }\n else if (((Date.now() - start) > 20000) && ((Date.now() - start) < 40000) && cloudSet == false) {\n cancelAnimationFrame( id );\n console.log((Date.now() - start));\n setSceneCloudy();\n cloudSet = true;\n }\n else if ((Date.now() - start) > 40000 && (Date.now() - start) < 60000 && rainSet == false) {\n cancelAnimationFrame( id );\n console.log((Date.now() - start));\n setSceneRain();\n rainSet = true;\n }\n else if ((Date.now() - start) > 60000 && (Date.now() - start) < 80000 && snowSet == false) {\n cancelAnimationFrame( id );\n console.log((Date.now() - start));\n setSceneSnow();\n snowSet = true;\n }\n else if ((Date.now() - start) > 80000 && (Date.now() - start) < 100000 && nightSet == false) {\n cancelAnimationFrame( id );\n console.log((Date.now() - start));\n setSceneNight();\n nightSet = true;\n }\n } while (playAnimationBool == true);\n }", "update() {\n this.animation.update()\n }", "handleAnimationOn(index) {\n //TODO: test adding text instead of animation on the same classes\n const animatedFrame = document.getElementsByClassName(\"itemOnTheList\");\n animatedFrame[index].classList.add('loadingAnimation');\n console.dir(animatedFrame[index]);\n this.setState({\n animationFrame: true\n })\n }", "async wait() {\n this.waitingAnimationFinish = true;\n await Utils.delay(1000);\n this.waitingAnimationFinish = false;\n }", "function addAnimator(animator) {\n animatorList.push(animator);\n if (animatorList.length === 1) {\n start();\n }\n }", "function addAnimator(animator) {\n animatorList.push(animator);\n if (animatorList.length === 1) {\n start();\n }\n }", "function animate() {\n requestAnimationFrame(animate);\n render();\n}", "function animate() {\n requestAnimationFrame(animate);\n render();\n}", "function addAnimation(){\n const Burst1 = new mojs.Burst ({\n parent: animationDiv,\n top: '50%',\n left: '50%', \n radius: {0: 80},\n count: 8,\n children: {\n shape: 'circle',\n fill: {'red':'blue'},\n strokeWidth: 1,\n duration: 600,\n stroke: {'red':'blue'}\n }\n });\n\n\n const Burst2 = new mojs.Burst ({\n parent: animationDiv,\n top: '50%',\n left: '50%', \n radius: {0: 100},\n count: 4,\n children: {\n shape: 'rect',\n fill: 'white',\n strokeWidth: 1,\n duration: 300,\n stroke: 'white'\n }\n });\n\n\n\n const circle1= new mojs.Shape ({\n radius: {0:40},\n parent: animationDiv,\n fill: 'none',\n stroke: 'white',\n strokeWidth:15,\n duration: 300,\n opacity: {1: 0}\n });\n\n const circle2= new mojs.Shape ({\n radius: {0:50},\n parent: animationDiv,\n fill: 'none',\n stroke: 'red',\n strokeWidth:5,\n duration: 400,\n opacity: {1: 0}\n });\n\n\n const circle3= new mojs.Shape ({\n radius: {0:60},\n parent: animationDiv,\n fill: 'none',\n stroke: 'blue',\n strokeWidth:5,\n duration: 500,\n opacity: {1: 0}\n });\n\n const circle4= new mojs.Shape ({\n radius: {0:70},\n parent: animationDiv,\n fill: 'white',\n \n stroke: 'white',\n strokeWidth:5,\n duration: 600,\n opacity: {1: 0}\n });\n\n const timeline = new mojs.Timeline ({\n \n repeat: 0\n }).add(circle4,circle1,circle2,circle3,Burst1,Burst2);\n\n timeline.play();\n}", "function animator() {\n var delay, speed;\n $('.animated').each(function() {\n var el = $(this);\n //console.log( elements[i] , i );\n if (el.visible(true)) {\n if (el.data('animtype') == 'animate-progress') {\n\n el.css('opacity', 1);\n el.addClass('animatedVisi');\n el.css('opacity', 1);\n el.css('width', el.attr('aria-valuenow'));\n //el.find('.progress .progress-bar').html(el.data('progress-to'));\n\n return;\n }\n\n delay = el.data('animdelay');\n if (!delay) {\n delay = 0;\n }\n\n el.css('-webkit-animation-delay', delay);\n el.css('-moz-animation-delay', delay);\n el.css('-o-animation-delay', delay);\n el.css('animation-delay', delay);\n\n speed = el.data('animspeed');\n\n if (!speed) {\n speed = 0.5;\n }\n\n el.css('-webkit-animation-duration', speed);\n el.css('-moz-animation-duration', speed);\n el.css('-o-animation-duration', speed);\n el.css('animation-duration', speed);\n\n if (el.data('animtype')) {\n el.addClass(el.data('animtype'));\n }\n\n el.addClass('animatedVisi');\n // que.push(this);\n }\n else if (el.data('animrepeat') == '1') {\n el.removeClass(el.data('animtype'));\n el.removeClass('animatedVisi');\n }\n });\n}", "function modalAnimation() {}", "function animate(){\r\n\t\t\t\r\n\t\t\tif (t == dur){\r\n\t\t\t\tif(cb) cb();\r\n\t\t\t\treturn;\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tel.style.opacity = Tween.easeInOutQuad(t,start,change,dur);\r\n\t\t\tt++;\r\n\t\t\t\r\n\t\t\tt = t % (dur*2);\r\n\t\t\t\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tanimate();\r\n\t\t\t},20)\r\n\t\t}", "initAnimations() {\n var idle = this.level.player.animations.add('idle', [0, 1, 2, 3], 5);\n var walk_left = this.level.player.animations.add('walk_left', [5, 6, 7, 8]);\n var walk_right = this.level.player.animations.add('walk_right', [10, 11, 12, 13]);\n var jump = this.level.player.animations.add('jump', [15, 16, 17, 18]);\n var attack_left = this.level.player.animations.add('attack_left', [20, 21, 22, 23, 24]);\n var attack_right = this.level.player.animations.add('attack_right', [25, 26, 27, 28, 29]);\n }", "function animateRestart() {\n animation1.restart();\n animation2.restart();\n animation3.restart();\n animation4.restart();\n}", "function animate(){\n\n\tanimateCloth();\n\trender();\n\trequestAnimationFrame( animate );\n\n\t\n}", "function animate() {\n oneStep();\n if( ! stopRequested ) {\n animationId = requestAnimationFrame(animate);\n }\n}", "function initScene() {\n animate();\n}", "function animate() {\n /*\n Apply animations\n */\n animator.execute();\n\n /*\n Update VR headset position and apply to camera.\n */\n controls.update();\n\n /*\n Render the scene through the VREffect.\n */\n effect.render( scene, camera );\n\n requestAnimationFrame( animate );\n}", "initAnimation() {\n\t\t// Create new AnimationMixer for clip playback\n\t\tthis.animMixer = new THREE.AnimationMixer( this.scene );\n\n\t\t// Create AnimationClips for each C4DLinkObject.\n\t\tthis.linkObjects.forEach( linkObject => {\n\t\t\tlinkObject.setLinkTargetFromScene( this.scene );\n\t\t\tlinkObject.setSourceClipFromClipArray( this.animClips );\n\n\t\t\tconst linkedClip = linkObject.getLinkedAnimationClip();\n\t\t\tif ( linkedClip ) this.animClips.push( linkedClip );\n\t\t});\n\n\t\t// Get the duration of the entire animation, which is the duration of the longest clip\n\t\tthis.animClips.forEach( clip => {\n\t\t\tthis.duration = Math.max( this.duration, clip.duration );\n\t\t});\n\n\t\t// Create AnimationActions for each clip\n\t\tthis.animActions = this.animClips.map( clip => {\n\t\t\treturn this.animMixer.clipAction( clip );\n\t\t});\n\n\t\t// Configure AnimationAction playback properties\n\t\tthis.animActions.forEach( action => {\n\t\t\taction.clampWhenFinished = true;\n\t\t\taction.loop = THREE.LoopOnce;\n\t\t\taction.play();\n\t\t});\n\n\t\t// Tick the mixer forward one frame, then reset immediately.\n\t\t// This ensures that the animation will pause at the first frame\n\t\t// until the play() function is called.\n\t\tthis.animMixer.update( 1 / 60 );\n\t\tthis.animMixer.stopAllAction();\n\t}", "async function displayAnimations(bars, index1, index2) {\r\n bars[index1].style.backgroundColor = 'red';\r\n bars[index2].style.backgroundColor = 'red';\r\n await new Promise(r => setTimeout(r, 20));\r\n bars[index1].style.backgroundColor = 'darkturquoise';\r\n bars[index2].style.backgroundColor = 'darkturquoise';\r\n}", "function animate() {\n // render\n controls.update();\n renderer.render(scene, camera);\n stats.update();\n\n // request new frame\n requestAnimationFrame(function() {\n animate();\n });\n }", "function animate() {\r\n if (!doAnim) {\r\n river.context=null; \r\n return;\r\n }\r\n\trequestAnimFrame( animate );\r\n river.background.draw();\r\n}", "function animateIt($elements) {\n $elements.each( function( i, el ) {\n\n var $el = $( el ),\n animationClass = $el.data( 'animation' );\n\n $el.addClass( animationClass );\n $el.addClass( 'animated' );\n $el.addClass( 'wait-animation' );\n\n $el.one( 'inview', function() {\n $el.removeClass( 'wait-animation' );\n $el.addClass( 'done-animation' );\n });\n });\n}", "function contentAnimation() {\n\n var tl = gsap.timeline();\n tl.from('.is-animated', { duration: 1, translateY: 60, opacity: 0, stagger: 0.4 });\n tl.from('.fadein', { duration: 0.5, opacity: 0.9 });\n}", "_createAnimatables() {\n // Create new animatables\n const oldAnimatables = [...this._babylonAnimatables];\n this._babylonAnimatables.length = 0;\n this._babylonAnimations.forEach(targetedAnimation => {\n const animatable = this._babylonScene.beginDirectAnimation(\n targetedAnimation.target,\n [targetedAnimation.animation],\n this._from,\n this._to,\n this._loopCount > 1,\n 0,\n this._onFinishedEvent,\n this._onLoopEvent,\n babylonBlendModes[this._blendMode]\n );\n animatable.weight = this._internalWeight;\n animatable.disposeOnEnd = false;\n this._babylonAnimatables.push(animatable);\n });\n\n // Dispose of the old animatables\n oldAnimatables.forEach(animatable => {\n animatable.stop();\n });\n }", "threeAnimate() {\n if (this._.updateTimerRunning) {\n requestAnimationFrame(this.threeAnimate);\n this.threeUpdate();\n this.threeRender();\n }\n }", "apply() {\n this.scene.multMatrix(this.animTransform);\n }", "function startAnimation() {\n waited += new Date().getTime() - stopTime\n stopAnim = false;\n Animation();\n}", "onTransitionEnd() {\n this.isInAnimation = false;\n // if any method in queue, then invoke it\n if (this.visualEffectQueue.length) {\n let action = this.visualEffectQueue.shift(); // remove method from queue and invoke it\n this.isInAnimation = action.isAnimated;\n action.action();\n }\n }", "function Animated() {\n this.payload = void 0;\n // This makes \"isAnimated\" return true.\n setAnimated(this, this);\n }", "function animate() {\n // render\n controls.update();\n renderer.render(scene, camera);\n stats.update();\n\n // request new frame\n requestAnimationFrame(function() {\n animate();\n });\n }", "function animate() {\n requestAnimationFrame(animate);\n renderer.render(stage);\n //checkHelp();\n}", "function loadAnims(){\n\tlog(\"load \" + animations.length + \" animations\");\t\n\tif(animations.length>0){\t\n\t\tyepnope([{\n\t\t\tload: animations,\n\t\t\tcallback: function (url, result, key) {\n\t\t\t\tprogress(\"loaded: \" + url);\n\t\t\t},\n\t\t\tcomplete: function(){\n\t\t\t\tlog(\"loading animations complete\"); \n\t\t\t\tstartNemoScript();\n\t\t\t}\n\t\t}]);\n\t}else{\n\t\tstartNemoScript();\n\t}\n}", "function animate() {\n\t\trequestAnimFrame(function(){\n animate();\n });\n\t\t\n\t\tplaceHover();\n\t\titemHover();\n\t\titemDrag();\n\t\t//$('#place').text(getSceneMembers(self.places));\n\t\t//$('#sticky').text(self.items);\n\t\t\n\t\t\n\n self.renderer.render(self.scene, self.camera);\n //self.controls.update(self.clock.getDelta());\n\t\t\n\t}", "function animate() {\n\t// render the 3D scene\n\trender();\n\t// relaunch the 'timer' \n\trequestAnimationFrame( animate );\n\t// update the stats\n\tstats.update();\n\t// update the tweens from TWEEN library\n\tTWEEN.update();\n}", "function addAnimations( FBXTree, connections, sceneGraph ) {\n \n sceneGraph.animations = [];\n \n var rawClips = parseAnimations( FBXTree, connections );\n \n if ( rawClips === undefined ) return;\n \n \n for ( var key in rawClips ) {\n \n var rawClip = rawClips[ key ];\n \n var clip = addClip( rawClip );\n \n sceneGraph.animations.push( clip );\n \n }\n \n }", "async restartAnimation() {\n await this.updateComplete;\n this.animationReady = false;\n await new Promise(requestAnimationFrame);\n this.animationReady = true;\n await this.updateComplete;\n }" ]
[ "0.72297084", "0.7172655", "0.6751781", "0.6701827", "0.66490537", "0.6644208", "0.66413045", "0.65767395", "0.6515558", "0.64943016", "0.64906734", "0.6407048", "0.6392758", "0.6383256", "0.63779354", "0.6373179", "0.63684577", "0.6353303", "0.63494754", "0.6331653", "0.6321073", "0.6315538", "0.6282902", "0.6262608", "0.62574196", "0.62490225", "0.62280315", "0.6222707", "0.62167084", "0.62161696", "0.62084895", "0.6207879", "0.6206824", "0.6199034", "0.6194853", "0.619034", "0.61874485", "0.61785597", "0.61779857", "0.61779857", "0.6172958", "0.6171962", "0.61671996", "0.61594796", "0.6155247", "0.61547256", "0.61522853", "0.61488783", "0.6142057", "0.61394465", "0.61344063", "0.6130749", "0.61243993", "0.6122645", "0.6120578", "0.6110278", "0.6106307", "0.6104745", "0.6104236", "0.60944784", "0.60934347", "0.6092567", "0.6089591", "0.6080137", "0.6053206", "0.6052352", "0.60479707", "0.6041109", "0.60391325", "0.60391325", "0.60361475", "0.60361475", "0.60337025", "0.6032074", "0.6029653", "0.6027071", "0.6025721", "0.6025113", "0.6023653", "0.60118324", "0.5998302", "0.599733", "0.59961855", "0.5988569", "0.59863454", "0.5982124", "0.5977584", "0.5976191", "0.5970291", "0.59691375", "0.59681934", "0.59492475", "0.594515", "0.5942073", "0.5940745", "0.5933432", "0.59323984", "0.5926493", "0.5920844", "0.59197015", "0.5913969" ]
0.0
-1
Generate parameters to create a standard animation
function genFx( type, includeWidth ) { var which, i = 0, attrs = { height: type }; // If we include width, step value is 1 to do all cssExpand values, // otherwise step value is 2 to skip over Left and Right includeWidth = includeWidth ? 1 : 0; for ( ; i < 4; i += 2 - includeWidth ) { which = cssExpand[ i ]; attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; } if ( includeWidth ) { attrs.opacity = attrs.width = type; } return attrs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setParameters() {\n params.viscosity = 0.02;\n params.u0 = -amplitude;\n params.one36th = 1 / 36;\n params.one9th = 1 / 9;\n params.four9ths = 4 / 9;\n params.gridSize = 5;\n params.m = int(height / params.gridSize);\n params.n = int(width / params.gridSize);\n}", "function generateAnimationParams(animation) {\n const timeReg = /^(\\d+)?(\\.)?\\d+m?s$/i\n const loopReg = /^(\\d|infinite|forwards|steps\\(\\d+\\))$/i\n const timeConvert = n => parseFloat(n) * (/ms$/.test(n) ? 1 : 1e3)\n\n if (!animation) {\n return []\n }\n\n return animation\n .replace(/to\\((.*?)\\)/g, (_, $1) => `to(${$1.replace(/\\s*,\\s*/g, '__SPLIT__')})`)\n .split(',')\n .filter(item => !!item)\n .map(raw => {\n const params = raw.trim().replace(/\\s+/g, ' ').split(' ')\n return params.reduce(\n (ret, str) => {\n // the first parameter should be `aniName`\n if (ret.__aniName === undefined) {\n return { ...ret, __aniName: str }\n }\n // if the parameter satisfies time, it may be `duration` or `delay`\n if (timeReg.test(str)) {\n const type = ret.duration === undefined ? 'duration' : 'delay'\n return { ...ret, [type]: timeConvert(str) }\n }\n // it the parameter satisfies loop properties\n if (ret.duration !== undefined && loopReg.test(str)) {\n return { ...ret, loop: convertValue(str) }\n }\n // otherwise it may be easing name or bezier\n return { ...ret, easing: str }\n },\n {}\n )\n })\n}", "_getAnimationText() {\n const strokeCircumference = this._getStrokeCircumference();\n return INDETERMINATE_ANIMATION_TEMPLATE\n // Animation should begin at 5% and end at 80%\n .replace(/START_VALUE/g, `${0.95 * strokeCircumference}`)\n .replace(/END_VALUE/g, `${0.2 * strokeCircumference}`)\n .replace(/DIAMETER/g, `${this._spinnerAnimationLabel}`);\n }", "function generateAnim(type, size)\n{\n animObj['type'] = type;\n animObj['size'] = size;\n animObj['red'] = paintColor[0];\n animObj['green'] = paintColor[1];\n animObj['blue'] = paintColor[2];\n}", "animation() {}", "function build(){\n\n if ( parseInt( cfg.move ) !== 0 ){\n initial += ' translate' + cfg.axis + '(' + cfg.move + ')';\n target += ' translate' + cfg.axis + '(0)';\n }\n\n if ( parseInt( cfg.scale.power ) !== 0 ){\n\n if ( cfg.scale.direction === 'up' ){\n cfg.scale.value = 1 - ( parseFloat( cfg.scale.power ) * 0.01 );\n } else if ( cfg.scale.direction === 'down' ){\n cfg.scale.value = 1 + ( parseFloat( cfg.scale.power ) * 0.01 );\n }\n\n initial += ' scale(' + cfg.scale.value + ')';\n target += ' scale(1)';\n }\n\n if ( cfg.rotate.x ){\n initial += ' rotateX(' + cfg.rotate.x + ')';\n target += ' rotateX(0)';\n }\n\n if ( cfg.rotate.y ){\n initial += ' rotateY(' + cfg.rotate.y + ')';\n target += ' rotateY(0)';\n }\n\n if ( cfg.rotate.z ){\n initial += ' rotateZ(' + cfg.rotate.z + ')';\n target += ' rotateZ(0)';\n }\n\n initial += '; opacity: ' + cfg.opacity + '; ';\n target += '; opacity: 1; ';\n }", "function initAnimation() {\n}", "function AnimationParser() {}", "function AnimationStaggerMetadata() { }", "function AnimationStaggerMetadata() { }", "createSpriteAnimations() {\n const haloFrames = this.anims.generateFrameNames('haloHit', { \n start: 1, end: 84, zeroPad: 5,\n prefix: 'Halo_' , suffix: '.png'\n });\n\n this.anims.create({ key: 'haloHit', frames: haloFrames, frameRate: 60, repeat: 0 });\n\n const sparkFrames = this.anims.generateFrameNames('sparkHit', { \n start: 1, end: 84, zeroPad: 5,\n prefix: 'Spark_' , suffix: '.png'\n });\n\n this.anims.create({ key: 'sparkHit', frames: sparkFrames, frameRate: 60, repeat: -1 });\n }", "createanims(){\n Object.keys(this.mp()).forEach(key=>{\n let config = [\n {\n key: `${key}stand`,\n frames: this.anims.generateFrameNames('players', {\n start: 1,\n end: 1,\n prefix: `${this.mp()[key]}/`\n }),\n frameRate: 8,\n repeat: -1\n },\n {\n key: `${key}down`,\n frames: this.anims.generateFrameNames('players', {\n start: 0,\n end: 2,\n frames: [1,2,1,0],\n prefix: `${this.mp()[key]}/`\n }),\n frameRate: 8,\n repeat: -1,\n },\n {\n key: `${key}up`,\n frames: this.anims.generateFrameNames('players', {\n start: 3,\n end: 5,\n frames: [4,5,4,3],\n prefix: `${this.mp()[key]}/`\n }),\n frameRate: 8,\n repeat: -1\n },\n {\n key: `${key}left`,\n frames: this.anims.generateFrameNames('players', {\n start: 6,\n end: 8,\n frames: [7,8,7,6],\n prefix: `${this.mp()[key]}/`\n }),\n frameRate: 8,\n repeat: -1\n },\n {\n key: `${key}attack`,\n frames: this.anims.generateFrameNames('players', {\n start: 9,\n end: 10,\n prefix: `${this.mp()[key]}/`\n }),\n frameRate: 2,\n repeat: 0\n },\n {\n key: `${key}idle`,\n frames: this.anims.generateFrameNames('players', {\n start: 35,\n end: 37,\n frames: [36,37,36,35],\n prefix: `${this.mp()[key]}/`\n }),\n frameRate: 4,\n repeat: -1\n },\n {\n key: `${key}hurt`,\n frames: this.anims.generateFrameNames('players', {\n start: 11,\n end: 11,\n prefix: `${this.mp()[key]}/`\n }),\n frameRate: 4,\n repeat: 0\n },\n ];\n config.forEach(anim=> this.anims.create(anim));\n })\n }", "function shapeSettings(){\n rectMode(CENTER);\n noStroke();\n waveWidth = width;\n increment = (TWO_PI / period) * xSpacing;\n periodYValues = new Array( floor(waveWidth / xSpacing) );\n}", "function ParameterReader (parametersList) {\n\n return getAnimationInfo ();\n\n function getAnimationInfo () {\n var animationsInfo = [];\n for (var i = 0; i < parametersList.length; i++) {\n animationsInfo.push (readParameters(parametersList[i]));\n }\n return animationsInfo;\n };\n\n function readParameters (parameters = {}){\n var columns, rows, animation, depth, primaryImage, secondaryImage, transition, start, end, colorType, colorValue, opacity;\n var dimensions, color;\n\n rows = parameters.rows || 10;\n columns = parameters.columns || 10;\n animation = parameters.animation || \"scroll\";\n depth = parameters.depth || 1;\n primaryImage = parameters.image || parameters.primaryImage || './images/picasso.jpg';\n secondaryImage = parameters.secondaryImage || './images/picasso.jpg';\n transition = parameters.transition || 'exit';\n start = parameters.start || 0;\n end = parameters.end || 10;\n colorType = parameters.colorType || \"rainbow\";\n colorValue = parameters.colorValue || \"blue\";\n opacity = parameters.opacity || 1;\n\n dimensions = {\n rows: rows,\n columns: columns\n };\n\n color = {\n type: colorType,\n value: colorValue,\n opacity: opacity\n };\n\n if (isSideAnimation(animation)) {\n depth = 1;\n }\n\n return {\n dimensions,\n primaryImage,\n secondaryImage,\n animation,\n depth,\n transition,\n start,\n end,\n color,\n };\n };\n\n function isSideAnimation(animation) {\n return animation == \"slideshow\" ||\n animation == \"spiral\";\n };\n}", "function generatePathFrameParameters() {\n var path_sizes = [20, 50, 200, 300, 400];\n var quantities = [10, 20, 50, 100, 500, 1000, 2000];\n var shadow_blurs = [0, 1, 10, 20];\n\n // Only draw combinations that contain shadows with this probability\n // to reduce the number of permutations.\n var shadowedPermutationProbability = 0.1;\n\n var list_of_frame_parameters = [];\n\n for (shape_type in SHAPE_TYPE) {\n for (var size_i = 0; size_i < path_sizes.length; size_i++) {\n for (var qty_i = 0; qty_i < quantities.length; qty_i++) {\n for (var sh_i = 0; sh_i < shadow_blurs.length; sh_i++) {\n for (fill_style in SHAPE_STYLE) {\n if (shadow_blurs[sh_i] == 0\n || getTrueWithProbability(shadowedPermutationProbability)) {\n\n list_of_frame_parameters.push([\n new DrawParameter(CALL_TYPE.PATH, shape_type,\n path_sizes[size_i], shadow_blurs[sh_i],\n quantities[qty_i], fill_style)]);\n }\n }\n }\n }\n }\n }\n return list_of_frame_parameters;\n}", "function createFxNow(){window.setTimeout(function(){fxNow=undefined;});return fxNow=jQuery.now();}// Generate parameters to create a standard animation", "function getParameters(mode_num){\n\t\tswitch(android_interpolator.interpolatorTypesAry[mode_num].name) {\n\t\t\tcase \"CustomSpring\":\n\t\t\t\tprefixParameters = 'var factor = '+factor1.toString()+'; \\n';\n\t\t\t\tbreak;\n\t\t\tcase \"CustomBounce\":\n\t\t\t\tprefixParameters = 'var mTension = '+factor1.toString()+';\\nvar mFriction = '+factor2.toString()+';\\n';\n\t\t\t\tbreak;\n\t\t\tcase \"CustomDamping\":\n\t\t\t\tprefixParameters = 'var mTension = '+factor1.toString()+';\\nvar mFriction = '+factor2.toString()+';\\n';\n\t\t\t\tbreak;\n\t\t\tcase \"CustomMocosSpring\":\n\t\t\t\tprefixParameters = 'var tension = '+factor1.toString()+';\\nvar damping = '+factor2.toString()+';\\nvar v0 = '+factor3.toString()+';\\n';\n\t\t\t\tbreak;\n\t\t\tcase \"AndroidSpring\":\n\t\t\t\tprefixParameters = 'var mStiffness = '+factor1.toString()+';\\nvar mDampingRatio = '+factor2.toString()+';\\nvar mVelocity = '+factor3.toString()+';\\n';\n\t\t\t\tbreak;\n\t\t\tcase \"AndroidFling\":\n\t\t\t\tprefixParameters = 'var mStartVelocity = '+factor1.toString()+';\\nvar mDampingRatio = '+factor2.toString()+';\\n';\n\t\t\t\tbreak;\n\t\t\tcase \"Origami_POP_Spring\":\n\t\t\t\tOrigamiSpringConverter(factor1,factor2);\n\t\t\t\tprefixParameters = 'var mStiffness = '+ mStiffness.toString() +';\\nvar mDampingRatio = '+ mDampingRatio.toString() +';\\nvar mVelocity = 0;\\n';\n\t\t\t\tbreak;\n\t\t\tcase \"Framer_RK4_Spring\":\n\t\t\t\tFramerRK4Converter(factor1,factor2);\n\t\t\t\tprefixParameters = 'var mStiffness = '+ mStiffness.toString() +';\\nvar mDampingRatio = '+ mDampingRatio.toString() +';\\nvar mVelocity = 0;\\n';\n\t\t\t\tbreak;\n\t\t\tcase \"Framer_DHO_Spring\":\n\t\t\t\tFramerDHOConverter(factor1,factor2,factor3,factor4);\n\t\t\t\tprefixParameters = 'var mStiffness = '+ mStiffness.toString() +';\\nvar mDampingRatio = '+ mDampingRatio.toString() +';\\nvar mVelocity = ' + factor4.toString() +';\\n';\n\t\t\t\tbreak;\n\t\t\tcase \"CASpringAnimation\":\n\t\t\t\tFramerDHOConverter(factor1,factor2,factor3,factor4);\n\t\t\t\tprefixParameters = 'var mStiffness = '+ mStiffness.toString() +';\\nvar mDampingRatio = '+ mDampingRatio.toString() +';\\nvar mVelocity =' + factor4.toString() +';\\n';\n\t\t\t\tbreak;\n\t\t\tcase \"UIViewSpringAnimation\":\n\t\t\t\tUIViewSpringConverter(factor1,factor2);\n\t\t\t\tprefixParameters = 'var mStiffness = '+ mStiffness.toString() +';\\nvar mDampingRatio = '+ mDampingRatio.toString() +';\\nvar mVelocity = 0;\\n';\n\t\t\t\tbreak;\n\t\t\tcase \"Protopie_Spring\":\n\t\t\t\tFramerRK4Converter(factor1,factor2);\n\t\t\t\tprefixParameters = 'var mStiffness = '+ mStiffness.toString() +';\\nvar mDampingRatio = '+ mDampingRatio.toString()+ ';\\nvar mVelocity = 0;\\n';\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\tif(android_interpolator.interpolatorTypesAry[mode_num].defaultPara == null){\n\t\t\t\t\tprefixParameters = '';\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tprefixParameters = 'var factor = '+factor1.toString()+';\\n';\n\t\t\t\t}\n\n\t\t}\n\t}", "function generate_trial_parameters(A_l, process_init, process_noise, observ_noise, observ_scale) {\n var duration = truncated_geometric(p, t_max - t_min) + t_min;;\n var x = sample_lds_states(A_l, process_init, process_noise, duration);\n var z = make_observations(x, observ_noise, observ_scale);\n \n // convert the sampled values to pixel space and present in usable format\n var posX = [];\n var posY = [];\n for (var ii=0; ii < z.length; ii ++){ \n posX.push(z[ii][0] + 350/2);\n posY.push(z[ii][1] + 350/2);\n }\n return {posX : posX, posY: posY, color_sequence: palette('tol', t_max + 1)}\n }", "addAnimations() {\n\n // eyes animations (moving eyes of the inspector)\n let frameRate = 50; // frame rate of the animation\n\n // from mid to right\n this.anims.create({\n key: 'midToRight',\n frames: this.anims.generateFrameNames('eyes', {frames: [0, 1, 2, 3, 4, 5]}),\n frameRate: frameRate,\n paused: true\n });\n\n // from right to mid\n this.anims.create({\n key: 'rightToMid',\n frames: this.anims.generateFrameNames('eyes', {frames: [5, 4, 3, 2, 1, 0]}),\n frameRate: frameRate,\n paused: true\n });\n\n // from mid to left\n this.anims.create({\n key: 'midToLeft',\n frames: this.anims.generateFrameNames('eyes', {frames: [0, 6, 7, 8, 9, 10]}),\n frameRate: frameRate,\n paused: true\n });\n\n // from left to mid\n this.anims.create({\n key: 'leftToMid',\n frames: this.anims.generateFrameNames('eyes', {frames: [10, 9, 8, 7, 6, 0]}),\n frameRate: frameRate,\n paused: true\n });\n\n // from left to right\n this.anims.create({\n key: 'leftToRight',\n frames: this.anims.generateFrameNames('eyes', {frames: [10, 9, 8, 7, 6, 0, 1, 2, 3, 4, 5]}),\n frameRate: frameRate,\n paused: true\n });\n\n // from right to left\n this.anims.create({\n key: 'rightToLeft',\n frames: this.anims.generateFrameNames('eyes', {frames: [5, 4, 3, 2, 1, 0, 6, 7, 8, 9, 10]}),\n frameRate: frameRate,\n paused: true\n });\n\n }", "function ANIMATE($anim) {\n var that = this, an = {}, myData = {}, styleCur = {}, isOverflowOnNode;\n /**\n * FUNCTION CLASS\n */\n /**\n * CHECK & INITIALIZATION ANIMATION\n */\n function Init() {\n /**\n * SETUP VARIABLE AT FIRST\n */\n an.rubyID = DB.GetRubyID($anim);\n myData = that.data = vData[an.rubyID];\n // Setup initialization timer of object\n if (myData.tsInit == UNDE)\n myData.tsInit = VA.tsCur;\n // Properties & options of object\n var prop = myData.prop, opts = myData.opts;\n an.propEnd = prop[prop.length - 1];\n an.optsEnd = opts[opts.length - 1];\n /**\n * SETUP AFTER START ANIMATION\n */\n SetupStyleBegin();\n Start();\n }\n /**\n * SETUP VALUE OF STYLE & TRANSFORM AT FIRST\n */\n function SetupStyleBegin() {\n // Setup properties of normal Style\n StyleBegin();\n // Setup properties of transform CSS\n TransformBegin();\n }\n /**\n * SETUP VALUE OF STYLE AT FIRST\n */\n function StyleBegin() {\n var styleBegin = an.optsEnd.styleBegin, styleEnd = an.optsEnd.styleEnd, opts = myData.opts, isAnimMulti = opts.length > 1;\n /**\n * LOOP TO SETUP VALUE NOT BE TRANSFORM CSS\n */\n for (var name in an.propEnd) {\n if ($.inArray(name, VA.nameTf) === -1) {\n /**\n * SETUP STYLE END\n * + Parse & convert value of StyleEnd\n */\n var valueCur = an['propEnd'][name];\n styleEnd[name] = M.ParseCssStyle(valueCur);\n /**\n * SETUP STYLE BEGIN\n */\n // Case: name of properties have fixed value -> inherit value of tfEnd\n if ($.inArray(name, VA.propFixed) !== -1) {\n styleBegin[name] = styleEnd[name];\n }\n else {\n // Parse & convert value of StyleBegin\n valueCur = $anim.css(name);\n styleBegin[name] = M.ParseCssStyle(valueCur);\n }\n }\n }\n // Inherit StyleEnd of animation before\n if (isAnimMulti)\n styleBegin = $.extend(styleBegin, opts[opts.length - 2]['styleEnd']);\n // Inherit properties of CSS Style 'point' have setup before\n if (myData.cssStyle !== null) {\n styleBegin = $.extend(true, styleBegin, myData.cssStyle);\n // Remove properties CSS Style after inherit\n myData.cssStyle = null;\n }\n /**\n * SETUP INHERIT PROPERTIES OF STYLE-END FROM STYLE-BEGIN\n */\n for (var name in styleBegin) {\n if (styleEnd[name] === UNDE) {\n styleEnd[name] = styleBegin[name];\n }\n }\n }\n /**\n * SETUP VALUE OF TRANSFORM AT FIRST\n */\n function TransformBegin() {\n var opts = myData.opts;\n /**\n * GET TRANSFORM OF OBJECT AT FIRST\n */\n // Case: have many continuous animation\n var tfBegin;\n if (opts.length > 1) {\n // Get Transform-begin from Transform-end before\n tfBegin = $.extend({}, opts[opts.length - 2]['tfEnd']);\n }\n else {\n tfBegin = myData.tfCur;\n if (tfBegin == UNDE) {\n var matrixBegin = MATRIX.getFromItem($anim);\n /**\n * PARSE MATRIX TO INITIAL PROPERTIES\n */\n tfBegin = MATRIX.parse(matrixBegin);\n }\n }\n // Inherit the properties CSS Transform 'point' have setup before\n if (myData.cssTf !== null) {\n tfBegin = $.extend(true, tfBegin, myData.cssTf);\n // Remove CSS Transform property after inherit\n myData.cssTf = null;\n }\n /**\n * GET TRANSFORM-END FROM SETUP PROPERTIES\n */\n var tfEnd = TF.FromProp(an.propEnd);\n /**\n * SETUP TRANSFORM INHERIT FROM PROPERTIES BEFORE\n */\n // Inherit 'tfBegin' properties but 'tfEnd' does not have, order of Transform depends on options\n tfEnd = TF.Extend(tfBegin, tfEnd, an.optsEnd);\n var tfDefault = VA.tfDefault;\n for (var name in tfEnd) {\n /**\n * ADDITIONAL PROPERTIES WITH TRANSFORM-BEGIN\n */\n if (tfBegin[name] === UNDE) {\n // Case: value of properties !== default value\n if (tfEnd[name] != tfDefault[name]) {\n // Case: name of property has fixed value -> inherit value from 'tfEnd'\n if ($.inArray(name, VA.propFixed) !== -1)\n tfBegin[name] = tfEnd[name];\n else\n tfBegin[name] = tfDefault[name];\n }\n else {\n delete tfEnd[name];\n }\n }\n /**\n * REMOVE PROPERTIES ON TRANSFORM BEGIN - END SIMILAR TO DEFAULT PROPERTIES\n */\n if (tfBegin[name] == tfDefault[name] && tfEnd[name] == tfDefault[name]) {\n delete tfBegin[name];\n delete tfEnd[name];\n }\n }\n an.optsEnd.tfBegin = tfBegin;\n an.optsEnd.tfEnd = tfEnd;\n }\n /**\n * SETUP VALUE WHEN BEGIN ANIMATION\n */\n function Start() {\n /**\n * INSERT STYLE 'OVERFLOW' AT FIRST: FIXED FOR OLD BROWSER\n */\n var style = $anim.attr('style');\n isOverflowOnNode = style && style.indexOf('overflow') !== -1;\n // Unavailable\n // !isOverflowOnNode && $anim.css('overflow', 'hidden');\n /**\n * EXECUTE FUNCTION 'START' AT FIRST\n */\n !!an.optsEnd.start && an.optsEnd.start();\n }\n /**\n * SETUP NEXT VALUE OF OBJECT, CALL FUNCTION FROM 'TWEEN'\n * @param boolean isForceAnim Allways setup style for object\n */\n that.next = function (isForceAnim) {\n /**\n * SETUP CURRENT TIME\n * @param Int an.xCur Current time, in range [0, 1]\n * @param Boolean isAnimate Check setup current animation\n */\n var opts = myData.opts, isAnimate = false, isComplete = false, tCur = myData.tCur = VA.tsCur - myData.tsInit;\n for (var i = 0, len = opts.length; i < len; i++) {\n var optsCur = opts[i];\n // Case: tCur at the forward position the first Aniamtion\n if (tCur < optsCur.tPlay && i == 0) {\n // Case: allways setup Style of object\n if (isForceAnim) {\n an.optsPos = i;\n an.xCur = 0;\n }\n else\n an.xCur = null;\n break;\n }\n else if (tCur > optsCur.tEnd && i == len - 1) {\n an.optsPos = i;\n an.xCur = 1;\n isComplete = true;\n break;\n }\n else if (optsCur.tPlay <= tCur && tCur <= optsCur.tEnd) {\n an.optsPos = i;\n an.xCur = $.GSGDEasing[optsCur.easing](null, tCur - optsCur.tPlay, 0, 1, optsCur.duration);\n isAnimate = true;\n break;\n }\n else if (!!opts[i + 1] && optsCur.tEnd < tCur && tCur < opts[i + 1].tPlay) {\n an.optsPos = i;\n an.xCur = 1;\n break;\n }\n }\n /**\n * SETUP VALUE OF CURRENT STYLE ON OBJECT\n */\n if (an.xCur !== null && opts.length) {\n // First, reset size of Item\n GetSizeItem();\n // Reset variable 'styleCur'\n styleCur = {};\n // Setup current Style value of the object\n StyleNormalCur();\n StyleTransformCur();\n $anim.css(styleCur);\n }\n /**\n * EXECUTE OPTION 'COMPLETE'\n */\n if (isComplete) {\n var optsCur = opts[an.optsPos];\n !!optsCur.complete && optsCur.complete();\n }\n /**\n * Return value check have Animation\n */\n return isAnimate;\n };\n /**\n * CONVERT VALUE HAS OTHER UNIT TO 'PX'\n * + Support convert '%' to 'px'\n */\n function ConvertValue(name, valueCur) {\n /*\n * CASE: STRING\n */\n if (typeof valueCur == 'string') {\n /**\n * CASE: UNIT IS 'PX'\n */\n if (/px$/.test(valueCur)) {\n valueCur = parseFloat(valueCur);\n }\n else if (/\\%$/.test(valueCur)) {\n // Name of property exist in conversion system\n var nameSizeFn = VA.percentRef[name];\n if (nameSizeFn !== UNDE) {\n var sizeCur = an['size'][nameSizeFn];\n valueCur = sizeCur * parseFloat(valueCur) / 100;\n }\n }\n }\n /**\n * RETURN VALUE AFTER SETUP\n */\n return valueCur;\n }\n /**\n * GET SIZE OF ITEM IN CURRENT TIME\n */\n function GetSizeItem() {\n an.size = {\n 'OuterWidth': M.OuterWidth($anim),\n 'OuterHeight': M.OuterHeight($anim)\n };\n }\n /**\n * SETUP VALUE PLUS DEPENDS ON PROPERTY NAME\n */\n function ValueCurForNumber(name, valueBegin, valueEnd) {\n var nameToFloat = ['opacity'], plus = (valueEnd - valueBegin) * an.xCur;\n // Case: rounded number float\n if ($.inArray(name, nameToFloat) !== -1) {\n plus = Math.round(plus * 1000) / 1000;\n }\n else {\n /**\n * ADDITIONAL 1 FRACTION : ANIMATE SMOOTHER\n */\n plus = Math.round(plus * 10) / 10;\n }\n return valueBegin + plus;\n }\n /**\n * SETUP VALUE OF PROPERTY IS ARRAY[]\n */\n function ValueCurForArray(name, valueBegin, valueEnd) {\n var aValue = [];\n /**\n * SETUP EACH VALUE IN ARRAY[]\n * + Remove element >= 2 : Browser not support Transform 3D\n */\n for (var i = 0, len = valueEnd.length; i < len && !(i >= 2 && !VA.isTf3D); i++) {\n /**\n * CONVERT VALUE BEGIN - END\n */\n var vaEndCur = ConvertValue(name + i, valueEnd[i]), vaBeginCur = ConvertValue(name + i, valueBegin[i]);\n // Case: value 'begin' not exist\n if (vaBeginCur === UNDE)\n vaBeginCur = vaEndCur;\n /**\n * SETUP CURRENT VALUE + STORE IN ARRAY[]\n */\n var plus = (vaEndCur - vaBeginCur) * an.xCur, valueCur = Math.round((vaBeginCur + plus) * 10) / 10;\n aValue.push(valueCur + 'px');\n }\n /**\n * CONVERT ARRAY TO STRING\n */\n return aValue.join(' ');\n }\n /**\n * SETUP NORMAL PROPERTIES AT THE CURRENT TIME\n */\n function StyleNormalCur() {\n var optsCur = myData['opts'][an.optsPos];\n for (var name in optsCur['styleBegin']) {\n var valueBegin = optsCur['styleBegin'][name], valueEnd = optsCur['styleEnd'][name], valueCur;\n /**\n * CASE: PROPERTY HAS VALUE IS ARRAY[]\n */\n if ($.isArray(valueBegin)) {\n valueCur = ValueCurForArray(name, valueBegin, valueEnd);\n }\n else {\n // Convert value String to Number (if posible)\n valueBegin = ConvertValue(name, valueBegin);\n valueEnd = ConvertValue(name, valueEnd);\n // Case: value of property is Number\n if ($.isNumeric(valueBegin) && $.isNumeric(valueEnd)) {\n valueCur = ValueCurForNumber(name, valueBegin, valueEnd);\n }\n else {\n valueCur = valueBegin;\n }\n }\n /**\n * REMOVE STYLES HAVE DEFAULT VALUE\n */\n if (optsCur.isClearStyleDefault && VA['styleDefault'][name] === valueCur) {\n valueCur = '';\n }\n /**\n * STORE VALUE OF CURRENT PROPERTY\n */\n styleCur[name] = valueCur;\n }\n }\n /**\n * SETUP 'TRANSFORM' IN CURRENT TIME\n */\n function StyleTransformCur() {\n /**\n * SETUP CURRENT VALUE EACH TRANSFORM PROPERTIES\n */\n var optsCur = myData['opts'][an.optsPos], tfBegin = optsCur.tfBegin, tfEnd = optsCur.tfEnd, tfCur = {};\n for (var name in tfEnd) {\n // Setup value 'plus' of each properties\n var tfBeginCur = TF.ConvertValueToPX($anim, name, tfBegin[name]), tfEndCur = TF.ConvertValueToPX($anim, name, tfEnd[name]), valuePlus = (tfEndCur - tfBeginCur) * an.xCur, valueCur = tfBeginCur + valuePlus;\n // Value of current property\n tfCur[name] = valueCur;\n }\n /**\n * CONVERT PARTICULAR PROPERTY OF TRANSFORM TO CSS\n */\n var cssTf = TF.ToCss(tfCur, optsCur);\n /**\n * STORE CURRENT TRANSFORM CSS\n */\n var nameTf = VA.prefix + 'transform';\n styleCur[nameTf] = cssTf;\n // Store current Transform into system\n myData.tfCur = tfCur;\n }\n // Initialize Animation\n Init();\n }", "constructor(spacing, width, theta, amplitude, period) {\n this.spacing = 2;\n this.size = 20;\n this.width = 800;\n this.theta = 0;\n this.amplitude = 175;\n this.period = 600;\n this.objs = [];\n }", "function AnimationMetadata() { }", "function AnimationMetadata() { }", "function Legato_Animation( element, run_time )\r\n{\r\n\r\n\t// Store the values.\r\n\tthis.element = $( element );\r\n\tthis.element_properties = Object();\r\n\tthis.run_time = run_time;\r\n\tthis.controller = new Legato_Animation_Controller();\r\n\r\n\tthis.onStart = null;\r\n\tthis.onInterval = null;\r\n\tthis.onAdvance = null;\r\n\tthis.onEventFrame = null;\r\n\tthis.onStop = null;\r\n\tthis.onFinish = null;\r\n\r\n\t// These values are used by the Legato_Animation system internally.\r\n\tthis.status = false;\r\n\tthis.event_frames = new Array();\r\n\r\n\tthis.start_time = null;\r\n\tthis.current_time = null;\r\n\r\n\tthis.begin_width = null;\r\n\tthis.begin_height = null;\r\n\tthis.begin_pos = null;\r\n\tthis.begin_back_color = null;\r\n\tthis.begin_border_color = null;\r\n\tthis.begin_text_color = null;\r\n\tthis.begin_opacity = null;\r\n\r\n\tthis.offset_width = null;\r\n\tthis.offset_height = null;\r\n\tthis.offset_pos = new Legato_Structure_Point();\r\n\tthis.offset_back_color = new Legato_Structure_Color();\r\n\tthis.offset_border_color = new Legato_Structure_Color();\r\n\tthis.offset_text_color = new Legato_Structure_Color();\r\n\tthis.offset_opacity = null;\r\n\r\n\tthis.desired_width = null;\r\n\tthis.desired_height = null;\r\n\tthis.desired_pos = new Legato_Structure_Point();\r\n\tthis.desired_back_color = null;\r\n\tthis.desired_border_color = null;\r\n\tthis.desired_text_color = null;\r\n\tthis.desired_opacity = null;\r\n\r\n}", "create() {\n this.hero = this.matter.add.sprite(this.game.config.width / 2, this.game.config.height / 2, 'hero');\n this.hero.depth = 1200;\n\n this.matter.world.setBounds(0, 0, game.config.width, game.config.height);\n\n this.anims.create({\n key: 'south_stop',\n frames: [{ key: 'hero', frame: '1.png' }]\n });\n\n this.anims.create({\n key: 'north_stop',\n frames: [{ key: 'hero', frame: '17.png' }]\n });\n\n this.anims.create({\n key: 'west_stop',\n frames: [{ key: 'hero', frame: '9.png' }]\n });\n\n this.anims.create({\n key: 'east_stop',\n frames: [{ key: 'hero', frame: '25.png' }]\n });\n\n this.anims.create({\n key: 'south_walk', // southeast in isometric\n frames: this.anims.generateFrameNames('hero', { prefix: '', suffix: '.png', start: 1, end: 4 }),\n frameRate: 4,\n repeat: -1\n });\n this.anims.create({\n key: 'north_walk', // northwest in isometric\n frames: this.anims.generateFrameNames('hero', { prefix: '', suffix: '.png', start: 17, end: 20 }),\n frameRate: 4,\n repeat: -1\n });\n this.anims.create({\n key: 'west_walk', // southwest in isometric\n frames: this.anims.generateFrameNames('hero', { prefix: '', suffix: '.png', start: 9, end: 12 }),\n frameRate: 4,\n repeat: -1\n });\n this.anims.create({\n key: 'east_walk', // northeast in isometric\n frames: this.anims.generateFrameNames('hero', { prefix: '', suffix: '.png', start: 25, end: 28 }),\n frameRate: 4,\n repeat: -1\n });\n\n // sorcerer.animations.add('southeast', ['1.png','2.png','3.png','4.png'], 6, true);\n // sorcerer.animations.add('south', ['5.png','6.png','7.png','8.png'], 6, true);\n // sorcerer.animations.add('southwest', ['9.png','10.png','11.png','12.png'], 6, true);\n // sorcerer.animations.add('west', ['13.png','14.png','15.png','16.png'], 6, true);\n // sorcerer.animations.add('northwest', ['17.png','18.png','19.png','20.png'], 6, true);\n // sorcerer.animations.add('north', ['21.png','22.png','23.png','24.png'], 6, true);\n // sorcerer.animations.add('northeast', ['25.png','26.png','27.png','28.png'], 6, true);\n // sorcerer.animations.add('east', ['29.png','30.png','31.png','32.png'], 6, true);\n\n //this.cameras.main.startFollow(this.hero);\n\n this.keyUp = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.UP, true, true);\n this.keyUp.on('down', this.key_down_callback, this);\n this.keyUp.on('up', this.key_up_callback, this);\n\n this.keyDown = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.DOWN, true, true);\n this.keyDown.on('down', this.key_down_callback, this);\n this.keyDown.on('up', this.key_up_callback, this);\n\n this.keyLeft = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.LEFT, true, true);\n this.keyLeft.on('down', this.key_down_callback, this);\n this.keyLeft.on('up', this.key_up_callback, this);\n\n this.keyRight = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.RIGHT, true, true);\n this.keyRight.on('down', this.key_down_callback, this);\n this.keyRight.on('up', this.key_up_callback, this);\n }", "function addAnimation(){\n const Burst1 = new mojs.Burst ({\n parent: animationDiv,\n top: '50%',\n left: '50%', \n radius: {0: 80},\n count: 8,\n children: {\n shape: 'circle',\n fill: {'red':'blue'},\n strokeWidth: 1,\n duration: 600,\n stroke: {'red':'blue'}\n }\n });\n\n\n const Burst2 = new mojs.Burst ({\n parent: animationDiv,\n top: '50%',\n left: '50%', \n radius: {0: 100},\n count: 4,\n children: {\n shape: 'rect',\n fill: 'white',\n strokeWidth: 1,\n duration: 300,\n stroke: 'white'\n }\n });\n\n\n\n const circle1= new mojs.Shape ({\n radius: {0:40},\n parent: animationDiv,\n fill: 'none',\n stroke: 'white',\n strokeWidth:15,\n duration: 300,\n opacity: {1: 0}\n });\n\n const circle2= new mojs.Shape ({\n radius: {0:50},\n parent: animationDiv,\n fill: 'none',\n stroke: 'red',\n strokeWidth:5,\n duration: 400,\n opacity: {1: 0}\n });\n\n\n const circle3= new mojs.Shape ({\n radius: {0:60},\n parent: animationDiv,\n fill: 'none',\n stroke: 'blue',\n strokeWidth:5,\n duration: 500,\n opacity: {1: 0}\n });\n\n const circle4= new mojs.Shape ({\n radius: {0:70},\n parent: animationDiv,\n fill: 'white',\n \n stroke: 'white',\n strokeWidth:5,\n duration: 600,\n opacity: {1: 0}\n });\n\n const timeline = new mojs.Timeline ({\n \n repeat: 0\n }).add(circle4,circle1,circle2,circle3,Burst1,Burst2);\n\n timeline.play();\n}", "function setUpAnim(){\r\n\tanimInstruction = animInstructionsRaw.split(',');\r\n\tanimCurrentInst = 0;\r\n\tmainInput.style.display = \"none\";\r\n\t//\t\tcreate 10 placerholder arrays for points on each line\r\n\tanimPoints.push([]);\r\n\tanimPoints.push([]);\r\n\tanimPoints.push([]);\r\n\tanimPoints.push([]);\r\n\tanimPoints.push([]);\r\n\tanimPoints.push([]);\r\n\tanimPoints.push([]);\r\n\tanimPoints.push([]);\r\n\tanimPoints.push([]);\r\n\tanimPoints.push([]);\r\n\t\r\n\tanimPointPos.push([]);\r\n\tanimPointPos.push([]);\r\n\tanimPointPos.push([]);\r\n\tanimPointPos.push([]);\r\n\tanimPointPos.push([]);\r\n\tanimPointPos.push([]);\r\n\tanimPointPos.push([]);\r\n\tanimPointPos.push([]);\r\n\tanimPointPos.push([]);\r\n\tanimPointPos.push([]);\r\n}", "function createAnimations(that){\n \n that.anims.create({\n key: \"left\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 2, end: 0 }),\n repeat: 0\n });\n\n that.anims.create({\n key: \"finish-left\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 0, end: 2 }),\n repeat: 0\n });\n \n that.anims.create({\n key: \"right\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 2, end: 4 })\n });\n\n that.anims.create({\n key: \"finish-right\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 4, end: 2 })\n });\n\n that.anims.create({\n key: \"down\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 7, end: 2 }),\n });\n\n that.anims.create({\n key: \"up\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 2, end: 7 })\n });\n\n}", "function createAnimations(that){\n \n that.anims.create({\n key: \"left\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 2, end: 0 }),\n repeat: 0\n });\n\n that.anims.create({\n key: \"finish-left\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 0, end: 2 }),\n repeat: 0\n });\n \n that.anims.create({\n key: \"right\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 2, end: 4 })\n });\n\n that.anims.create({\n key: \"finish-right\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 4, end: 2 })\n });\n\n that.anims.create({\n key: \"down\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 7, end: 2 }),\n });\n\n that.anims.create({\n key: \"up\",\n frames: that.anims.generateFrameNumbers(\"personaje\", { start: 2, end: 7 })\n });\n\n}", "function addAnimation() {\n const Burst1 = new mojs.Burst({\n parent: animationDiv,\n top: '50%',\n left: '50%',\n radius: {0: 80},\n count: 8,\n children: {\n shape: 'circle',\n fill: {'red': 'blue'},\n strokeWidth: 1,\n duration: 600,\n stroke: {'red': 'blue'}\n }\n });\n\n\n const Burst2 = new mojs.Burst({\n parent: animationDiv,\n top: '50%',\n left: '50%',\n radius: {0: 100},\n count: 4,\n children: {\n shape: 'rect',\n fill: 'white',\n strokeWidth: 1,\n duration: 300,\n stroke: 'white'\n }\n });\n\n\n const circle1 = new mojs.Shape({\n radius: {0: 40},\n parent: animationDiv,\n fill: 'none',\n stroke: 'white',\n strokeWidth: 15,\n duration: 300,\n opacity: {1: 0}\n });\n\n const circle2 = new mojs.Shape({\n radius: {0: 50},\n parent: animationDiv,\n fill: 'none',\n stroke: 'red',\n strokeWidth: 5,\n duration: 400,\n opacity: {1: 0}\n });\n\n\n const circle3 = new mojs.Shape({\n radius: {0: 60},\n parent: animationDiv,\n fill: 'none',\n stroke: 'blue',\n strokeWidth: 5,\n duration: 500,\n opacity: {1: 0}\n });\n\n const circle4 = new mojs.Shape({\n radius: {0: 70},\n parent: animationDiv,\n fill: 'white',\n\n stroke: 'white',\n strokeWidth: 5,\n duration: 600,\n opacity: {1: 0}\n });\n\n const timeline = new mojs.Timeline({\n\n repeat: 0\n }).add(circle4, circle1, circle2, circle3, Burst1, Burst2);\n\n timeline.play();\n }", "function runAnimation() {\n\t // Draw a straight line\n\t bsBackground.draw({\n\t points: [0, height / 2 - 40, width, height / 3]\n\t });\n\n\t // Draw a straight line\n\t bsBackground.draw({\n\t points: [50, height / 3 - 40, width, height / 3]\n\t });\n\n\n\t // Draw another straight line\n\t bsBackground.draw({\n\t points: [width, height / 2, 0, height / 1.5 - 40]\n\t });\n\n\t // Draw a curve generated using 20 random points\n\t bsBackground.draw({\n\t inkAmount: 3,\n\t frames: 100,\n\t size: 200,\n\t splashing: true,\n\t points: 20\n\t });\n\t}", "function animations() {\n\tarthur.srcX = arthur.currentFrame * arthur.width;\n\tif (arthur.goRight) {\n\t\tarthur.srcY = arthur.goRowRight * arthur.height;\n\t} else if (arthur.goLeft) {\n\t\tarthur.srcY = arthur.goRowLeft * arthur.height;\n\t} else if (arthur.duckRight) {\n\t\tarthur.srcY = arthur.duckRowRight * arthur.height;\n\t} else if (arthur.atkRight) {\n\t\tarthur.srcY = arthur.atkRowRight * arthur.height;\n\t} else if (arthur.jumpRight) {\n\t\tarthur.srcY = arthur.jumpRowRight * arthur.height;\n\t} else if (arthur.die) {\n\t\tarthur.srcY = arthur.dieRowRight * arthur.height;\n\t}\n}", "function animation_frame() {\n var datalen = animationState.order.length,\n styles = animationState.styleArrays,\n curTime = Date.now(), genTime, updateTime,\n position, i, idx, p;\n timeRecords.frames.push(curTime);\n animationState.raf = null;\n position = ((curTime - animationState.startTime) / animationState.duration) % 1;\n if (position < 0) {\n position += 1;\n }\n animationState.position = position;\n\n for (idx = 0; idx < datalen; idx += 1) {\n i = animationState.order[idx];\n p = idx / datalen + position;\n if (p > 1) {\n p -= 1;\n }\n styles.p[i] = p;\n }\n if (animationStyles.fill) {\n for (i = 0; i < datalen; i += 1) {\n styles.fill[i] = styles.p[i] >= 0.1 ? false : true;\n }\n }\n if (animationStyles.fillColor) {\n for (i = 0; i < datalen; i += 1) {\n p = styles.p[i];\n if (p >= 0.1) {\n styles.fillColor[i].r = 0;\n styles.fillColor[i].g = 0;\n styles.fillColor[i].b = 0;\n } else {\n styles.fillColor[i].r = p * 10;\n styles.fillColor[i].g = p * 8.39;\n styles.fillColor[i].b = p * 4.39;\n }\n }\n }\n if (animationStyles.fillOpacity) {\n for (i = 0; i < datalen; i += 1) {\n p = styles.p[i];\n styles.fillOpacity[i] = p >= 0.1 ? 0 : 1.0 - p * 10; // 1 - 0\n }\n }\n if (animationStyles.radius) {\n for (i = 0; i < datalen; i += 1) {\n p = styles.p[i];\n styles.radius[i] = p >= 0.1 ? 0 : 2 + 100 * p; // 2 - 12\n }\n }\n if (animationStyles.stroke) {\n for (i = 0; i < datalen; i += 1) {\n styles.stroke[i] = styles.p[i] >= 0.1 ? false : true;\n }\n }\n if (animationStyles.strokeColor) {\n for (i = 0; i < datalen; i += 1) {\n p = styles.p[i];\n if (p >= 0.1) {\n styles.strokeColor[i].r = 0;\n styles.strokeColor[i].g = 0;\n styles.strokeColor[i].b = 0;\n } else {\n styles.strokeColor[i].r = p * 8.51;\n styles.strokeColor[i].g = p * 6.04;\n styles.strokeColor[i].b = 0;\n }\n }\n }\n if (animationStyles.strokeOpacity) {\n for (i = 0; i < datalen; i += 1) {\n p = styles.p[i];\n styles.strokeOpacity[i] = p >= 0.1 ? 0 : 1.0 - p * p * 100; // (1 - 0) ^ 2\n }\n }\n if (animationStyles.strokeWidth) {\n for (i = 0; i < datalen; i += 1) {\n p = styles.p[i];\n styles.strokeWidth[i] = p >= 0.1 ? 0 : 3 - 30 * p; // 3 - 0\n }\n }\n var updateStyles = {};\n $.each(animationStyles, function (key, use) {\n if (use) {\n updateStyles[key] = styles[key];\n }\n });\n genTime = Date.now();\n pointFeature.updateStyleFromArray(updateStyles, null, true);\n updateTime = Date.now();\n timeRecords.generate.push(genTime - curTime);\n timeRecords.update.push(updateTime - genTime);\n show_framerate();\n if (animationState.mode === 'play') {\n animationState.raf = window.requestAnimationFrame(animation_frame);\n }\n }", "function AnimationSequenceMetadata() { }", "function AnimationSequenceMetadata() { }", "function getAnimSteps(data) {\n\n\t\t\t\t\t\tvar paramarray = data.split(\"animation:\");\n\t\t\t\t\t\tvar params = new Object();\n\n\t\t\t\t\t\tparams.animation = getAnimDatas(newAnimObject(),paramarray[1]);\n\t\t\t\t\t\tvar customarray = paramarray[0].split(';');\n\n\t\t\t\t\t\tjQuery.each(customarray,function(index,param) {\n\t\t\t\t\t\t\tparam = param.split(\":\")\n\t\t\t\t\t\t\tvar w = param[0],\n\t\t\t\t\t\t\t\tv = param[1];\n\t\t\t\t\t\t\tif (w==\"typ\") params.typ = v;\n\t\t\t\t\t\t\tif (w==\"speed\") params.speed = parseInt(v,0)/1000;\n\t\t\t\t\t\t\tif (w==\"start\") params.start = parseInt(v,0)/1000;\n\t\t\t\t\t\t\tif (w==\"elementdelay\") params.elementdelay = parseFloat(v);\n\t\t\t\t\t\t\tif (w==\"ease\") params.ease = v;\n\t\t\t\t\t\t})\n\n\t\t\t\t\treturn params;\n\t\t\t\t}", "function getAnimSteps(data) {\n\n\t\t\t\t\t\tvar paramarray = data.split(\"animation:\");\n\t\t\t\t\t\tvar params = new Object();\n\n\t\t\t\t\t\tparams.animation = getAnimDatas(newAnimObject(),paramarray[1]);\n\t\t\t\t\t\tvar customarray = paramarray[0].split(';');\n\n\t\t\t\t\t\tjQuery.each(customarray,function(index,param) {\n\t\t\t\t\t\t\tparam = param.split(\":\")\n\t\t\t\t\t\t\tvar w = param[0],\n\t\t\t\t\t\t\t\tv = param[1];\n\t\t\t\t\t\t\tif (w==\"typ\") params.typ = v;\n\t\t\t\t\t\t\tif (w==\"speed\") params.speed = parseInt(v,0)/1000;\n\t\t\t\t\t\t\tif (w==\"start\") params.start = parseInt(v,0)/1000;\n\t\t\t\t\t\t\tif (w==\"elementdelay\") params.elementdelay = parseFloat(v);\n\t\t\t\t\t\t\tif (w==\"ease\") params.ease = v;\n\t\t\t\t\t\t})\n\n\t\t\t\t\treturn params;\n\t\t\t\t}", "function sobrePage(do_sobre) {\r\n function startAnimation(element) {\r\n var animationData = {\r\n assets: [],\r\n v: \"4.2.0\",\r\n ddd: 0,\r\n layers: [{\r\n ddd: 0,\r\n ind: 0,\r\n ty: 4,\r\n nm: \"mask\",\r\n td: 1,\r\n ks: {\r\n o: {\r\n k: 100\r\n },\r\n r: {\r\n k: 0\r\n },\r\n p: {\r\n k: [9, 9, 0]\r\n },\r\n a: {\r\n k: [0, 0, 0]\r\n },\r\n s: {\r\n k: [50, 50, 100]\r\n }\r\n },\r\n shapes: [{\r\n ty: \"gr\",\r\n it: [{\r\n ind: 0,\r\n ty: \"sh\",\r\n closed: !0,\r\n ks: {\r\n k: [{\r\n i: {\r\n x: .833,\r\n y: .833\r\n },\r\n o: {\r\n x: .167,\r\n y: .167\r\n },\r\n n: \"0p833_0p833_0p167_0p167\",\r\n t: 0,\r\n s: [{\r\n i: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n o: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n v: [\r\n [23.25, -18.375],\r\n [0, -18.125],\r\n [0, 0],\r\n [0, -24.375],\r\n [25.913, -1.203],\r\n [35, -8.5]\r\n ]\r\n }],\r\n e: [{\r\n i: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n o: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n v: [\r\n [23.25, -18.375],\r\n [0, -18.125],\r\n [0, 0],\r\n [17.125, -.625],\r\n [25.913, -1.203],\r\n [35, -8.5]\r\n ]\r\n }]\r\n }, {\r\n i: {\r\n x: .833,\r\n y: .833\r\n },\r\n o: {\r\n x: .167,\r\n y: .167\r\n },\r\n n: \"0p833_0p833_0p167_0p167\",\r\n t: 4,\r\n s: [{\r\n i: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n o: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n v: [\r\n [23.25, -18.375],\r\n [0, -18.125],\r\n [0, 0],\r\n [17.125, -.625],\r\n [25.913, -1.203],\r\n [35, -8.5]\r\n ]\r\n }],\r\n e: [{\r\n i: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n o: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n v: [\r\n [23.25, -18.375],\r\n [0, -18.125],\r\n [0, 0],\r\n [.125, 26.625],\r\n [25.913, -1.203],\r\n [35, -8.5]\r\n ]\r\n }]\r\n }, {\r\n i: {\r\n x: .833,\r\n y: .833\r\n },\r\n o: {\r\n x: .167,\r\n y: .167\r\n },\r\n n: \"0p833_0p833_0p167_0p167\",\r\n t: 8,\r\n s: [{\r\n i: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n o: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n v: [\r\n [23.25, -18.375],\r\n [0, -18.125],\r\n [0, 0],\r\n [.125, 26.625],\r\n [25.913, -1.203],\r\n [35, -8.5]\r\n ]\r\n }],\r\n e: [{\r\n i: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n o: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n v: [\r\n [23.25, -18.375],\r\n [0, -18.125],\r\n [0, 0],\r\n [-28.5, -.125],\r\n [7.538, 38.672],\r\n [35.125, 33.875]\r\n ]\r\n }]\r\n }, {\r\n i: {\r\n x: .833,\r\n y: .833\r\n },\r\n o: {\r\n x: .167,\r\n y: .167\r\n },\r\n n: \"0p833_0p833_0p167_0p167\",\r\n t: 12,\r\n s: [{\r\n i: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n o: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n v: [\r\n [23.25, -18.375],\r\n [0, -18.125],\r\n [0, 0],\r\n [-28.5, -.125],\r\n [7.538, 38.672],\r\n [35.125, 33.875]\r\n ]\r\n }],\r\n e: [{\r\n i: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n o: [\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0],\r\n [0, 0]\r\n ],\r\n v: [\r\n [23.25, -18.375],\r\n [0, -18.125],\r\n [0, 0],\r\n [.375, -18.25],\r\n [-50.212, 7.672],\r\n [19.75, 38]\r\n ]\r\n }]\r\n }, {\r\n t: 16.0000006516934\r\n }]\r\n },\r\n nm: \"Path 1\"\r\n }, {\r\n ty: \"fl\",\r\n fillEnabled: !0,\r\n c: {\r\n k: [.05, 1, 0, 1]\r\n },\r\n o: {\r\n k: 100\r\n },\r\n nm: \"Fill 1\"\r\n }, {\r\n ty: \"tr\",\r\n p: {\r\n k: [0, 0],\r\n ix: 2\r\n },\r\n a: {\r\n k: [0, 0],\r\n ix: 1\r\n },\r\n s: {\r\n k: [100, 100],\r\n ix: 3\r\n },\r\n r: {\r\n k: 0,\r\n ix: 6\r\n },\r\n o: {\r\n k: 100,\r\n ix: 7\r\n },\r\n sk: {\r\n k: 0,\r\n ix: 4\r\n },\r\n sa: {\r\n k: 0,\r\n ix: 5\r\n },\r\n nm: \"Transform\"\r\n }],\r\n nm: \"Shape 1\"\r\n }],\r\n bounds: {\r\n l: -51,\r\n t: -25,\r\n b: 39,\r\n r: 36\r\n },\r\n ip: 0,\r\n op: 600.000024438501,\r\n st: 0\r\n }, {\r\n ddd: 0,\r\n ind: 1,\r\n ty: 4,\r\n nm: \"circle cheio\",\r\n tt: 1,\r\n ks: {\r\n o: {\r\n k: 100\r\n },\r\n r: {\r\n k: 0\r\n },\r\n p: {\r\n k: [9.01, 9.045, 0]\r\n },\r\n a: {\r\n k: [-12.49, -7.08, 0]\r\n },\r\n s: {\r\n k: [50, 50, 100]\r\n }\r\n },\r\n shapes: [{\r\n ty: \"gr\",\r\n it: [{\r\n d: 1,\r\n ty: \"el\",\r\n s: {\r\n k: [26.84, 26.84]\r\n },\r\n p: {\r\n k: [0, 0]\r\n },\r\n nm: \"Ellipse Path 1\",\r\n closed: !0\r\n }, {\r\n d: 1,\r\n ty: \"el\",\r\n s: {\r\n k: [26.84, 26.84]\r\n },\r\n p: {\r\n k: [0, 0]\r\n },\r\n nm: \"Ellipse Path 1\",\r\n closed: !0\r\n }, {\r\n ty: \"fl\",\r\n fillEnabled: !0,\r\n c: {\r\n k: [1, 1, 1, 1]\r\n },\r\n o: {\r\n k: 100\r\n },\r\n nm: \"Fill 1\"\r\n }, {\r\n ty: \"tr\",\r\n p: {\r\n k: [-12.49, -7.08],\r\n ix: 2\r\n },\r\n a: {\r\n k: [0, 0],\r\n ix: 1\r\n },\r\n s: {\r\n k: [100, 100],\r\n ix: 3\r\n },\r\n r: {\r\n k: 0,\r\n ix: 6\r\n },\r\n o: {\r\n k: 100,\r\n ix: 7\r\n },\r\n sk: {\r\n k: 0,\r\n ix: 4\r\n },\r\n sa: {\r\n k: 0,\r\n ix: 5\r\n },\r\n nm: \"Transform\"\r\n }],\r\n nm: \"Ellipse 1\"\r\n }],\r\n bounds: {\r\n l: -31,\r\n t: -26,\r\n b: 11,\r\n r: 6\r\n },\r\n ip: 1.00000004073083,\r\n op: 128.000005213547,\r\n st: 1.00000004073083\r\n }, {\r\n ddd: 0,\r\n ind: 2,\r\n ty: 4,\r\n nm: \"circle\",\r\n ks: {\r\n o: {\r\n k: 100\r\n },\r\n r: {\r\n k: 0\r\n },\r\n p: {\r\n k: [9.01, 9.045, 0]\r\n },\r\n a: {\r\n k: [-12.49, -7.08, 0]\r\n },\r\n s: {\r\n k: [50, 50, 100]\r\n }\r\n },\r\n shapes: [{\r\n ty: \"gr\",\r\n it: [{\r\n d: 1,\r\n ty: \"el\",\r\n s: {\r\n k: [26.84, 26.84]\r\n },\r\n p: {\r\n k: [0, 0]\r\n },\r\n nm: \"Ellipse Path 1\",\r\n closed: !0\r\n }, {\r\n d: 1,\r\n ty: \"el\",\r\n s: {\r\n k: [26.84, 26.84]\r\n },\r\n p: {\r\n k: [0, 0]\r\n },\r\n nm: \"Ellipse Path 1\",\r\n closed: !0\r\n }, {\r\n ty: \"st\",\r\n fillEnabled: !0,\r\n c: {\r\n k: [1, 1, 1, 1]\r\n },\r\n o: {\r\n k: 100\r\n },\r\n w: {\r\n k: 2\r\n },\r\n lc: 1,\r\n lj: 1,\r\n ml: 4,\r\n nm: \"Stroke 1\"\r\n }, {\r\n ty: \"tr\",\r\n p: {\r\n k: [-12.49, -7.08],\r\n ix: 2\r\n },\r\n a: {\r\n k: [0, 0],\r\n ix: 1\r\n },\r\n s: {\r\n k: [100, 100],\r\n ix: 3\r\n },\r\n r: {\r\n k: 0,\r\n ix: 6\r\n },\r\n o: {\r\n k: 100,\r\n ix: 7\r\n },\r\n sk: {\r\n k: 0,\r\n ix: 4\r\n },\r\n sa: {\r\n k: 0,\r\n ix: 5\r\n },\r\n nm: \"Transform\"\r\n }],\r\n nm: \"Ellipse 1\"\r\n }],\r\n bounds: {\r\n l: -33,\r\n t: -28,\r\n b: 13,\r\n r: 8\r\n },\r\n ip: 0,\r\n op: 127.000005172816,\r\n st: 0\r\n }],\r\n ip: 0,\r\n op: 17.0000006924242,\r\n fr: 29.9700012207031,\r\n w: 18,\r\n h: 18\r\n };\r\n loaderHighPic = bodymovin.loadAnimation({\r\n container: element,\r\n renderer: \"svg\",\r\n loop: !1,\r\n autoplay: !1,\r\n animationData: animationData\r\n })\r\n } /*functions*/\r\n function initHeaderAnim(type) {\r\n \"init\" == type && (TweenMax.set($pageHeader.find(\"h2\"), {\r\n opacity: 0,\r\n y: \"50px\"\r\n }), TweenMax.set($pageHeader.find(\".circle-btn\"), {\r\n scale: 0,\r\n opacity: 1\r\n })), \"start\" == type && (TweenMax.to($pageHeader.find(\"h2\"), 1, {\r\n opacity: 1,\r\n y: \"0px\",\r\n ease: Circ.easeOut\r\n }, .1), TweenMax.to($pageHeader.find(\".circle-btn\"), 1, {\r\n scale: 1,\r\n delay: .5,\r\n ease: Elastic.easeOut.config(1, 1),\r\n onComplete: function() {\r\n TweenMax.set($pageHeader.find(\".circle-btn\"), {\r\n clearProps: \"scale\"\r\n })\r\n }\r\n }), $.doTimeout(700, function() {\r\n $pageHeader.find(\".circle-btn .arrow-down path\").addClass(\"active\")\r\n }))\r\n }\r\n\r\n function scrollTweens() {\r\n 0 == window.pageYOffset ? ($jsMaskDownWrapper.each(function() {\r\n var $this = $(this),\r\n $mask = $(\"<span class='mask-bg'></span>\");\r\n $mask.css({\r\n display: \"block\",\r\n position: \"absolute\",\r\n width: \"100%\",\r\n height: \"100%\",\r\n top: 0,\r\n left: 0,\r\n \"background-color\": \"#ffffff\"\r\n }), $this.find(\".js-mask-down\").append($mask)\r\n }), $jsMaskLeftWrapper.each(function() {\r\n var $this = $(this),\r\n $mask = $(\"<span class='mask-bg'></span>\");\r\n $mask.css({\r\n display: \"block\",\r\n position: \"absolute\",\r\n width: \"100%\",\r\n height: \"100%\",\r\n top: 0,\r\n left: 0,\r\n \"background-color\": \"#ffbb02\"\r\n }), $this.find(\".js-mask-left\").append($mask)\r\n }), $jsAnimUpGroup.each(function() {\r\n var $this = $(this);\r\n TweenMax.set($this.children(), {\r\n y: \"50px\",\r\n opacity: 0\r\n })\r\n }), $jsAnimUp.each(function() {\r\n var $this = $(this);\r\n TweenMax.set($this, {\r\n y: \"50px\",\r\n opacity: 0\r\n })\r\n }), $jsAnimReveal.each(function() {\r\n var $this = $(this);\r\n if (\"left\" == $this.attr(\"data-from\")) var offset_x = \"100px\",\r\n offset_y = \"0px\";\r\n if (\"right\" == $this.attr(\"data-from\")) var offset_x = \"-100px\",\r\n offset_y = \"0px\";\r\n if (\"top\" == $this.attr(\"data-from\")) var offset_y = \"100px\",\r\n offset_x = \"0px\";\r\n if (\"down\" == $this.attr(\"data-from\")) var offset_y = \"-100px\",\r\n offset_x = \"0px\";\r\n TweenMax.set($this, {\r\n x: offset_x,\r\n y: offset_y,\r\n opacity: 0\r\n })\r\n })) : ($jsMaskLeftWrapper.addClass(\"js-animated\"), $jsMaskDownWrapper.addClass(\"js-animated\"))\r\n } /*Animation Loop*/\r\n function sobrePage_scroll() {\r\n _raf_loop_id = _rAF_loop(sobrePage_scroll_rAF)\r\n }\r\n\r\n function sobrePage_scroll_rAF() {\r\n var $pageScrollHeader = $(\".page-scroll-header\");\r\n // Avoid calculations if not needed\r\n lastPosition != window.pageYOffset && (window.pageYOffset > lastPosition ? direction = \"down\" : direction = \"up\", lastPosition = window.pageYOffset, $thumbnail.hasClass(\"js-hover\") && $thumbnail.trigger(\"mouseleave\"), lastPosition > 10 && \"down\" == direction && !$_body.hasClass(\"js-scrolled-down\") && ($_body.addClass(\"js-scrolled-down\"), $pageScrollHeader.addClass(\"active\")), lastPosition < 10 && ($_body.removeClass(\"js-scrolled-down\"), $pageScrollHeader.removeClass(\"active\")), verge.inY($sobreTitle, -300) && $sobreTitle.find(\".picto\").addClass(\"active\"), $jsAnimUpGroup.each(function() {\r\n var $this = $(this);\r\n $this.hasClass(\"js-animated\") || verge.inY($this, -100) && ($this.addClass(\"js-animated\"), TweenMax.staggerTo($this.children(), 1, {\r\n y: 0,\r\n opacity: 1,\r\n ease: Power2.easeOut\r\n }, .2))\r\n }), $jsAnimUp.each(function() {\r\n var $this = $(this);\r\n $this.hasClass(\"js-animated\") || verge.inY($this, -100) && ($this.addClass(\"js-animated\"), TweenMax.staggerTo($this, 1, {\r\n y: 0,\r\n opacity: 1,\r\n ease: Power2.easeOut\r\n }, .2))\r\n }), $jsAnimReveal.each(function() {\r\n var $this = $(this);\r\n $this.hasClass(\"js-animated\") || verge.inY($this, -100) && ($this.addClass(\"js-animated active\"), TweenMax.staggerTo($this, 1, {\r\n x: 0,\r\n y: 0,\r\n opacity: 1,\r\n ease: Expo.easeOut\r\n }, .2))\r\n }), $jsMaskDownWrapper.each(function() {\r\n var $this = $(this);\r\n $this.hasClass(\"js-animated\") || verge.inY($this, -100) && ($this.addClass(\"js-animated\"), TweenMax.staggerTo($this.find(\".mask-bg\"), 1, {\r\n y: \"100%\",\r\n ease: Circ.easeInOut\r\n }, .2))\r\n }), $jsMaskLeftWrapper.each(function() {\r\n var $this = $(this);\r\n $this.hasClass(\"js-animated\") || verge.inY($this, -700) && ($this.addClass(\"js-animated\"), TweenMax.staggerTo($this.find(\".mask-bg\"), .8, {\r\n x: \"101%\",\r\n ease: Circ.easeInOut\r\n }, .1))\r\n }))\r\n }\r\n if (!do_sobre) return $_window.off(\"scroll.sobrePage\"), $_body.removeClass(\"sobre-page\"), !1;\r\n $_window.on(\"scroll.sobrePage\", sobrePage_scroll), $_body.addClass(\"sobre-page\");\r\n var loaderHighPic, lastPosition = -1,\r\n $pageHeader = $(\".page-header\"),\r\n $fullImages = $(\".full-images\"),\r\n $thumbnail = $(\".thumbnail\"),\r\n $jsMaskDownWrapper = ($(\".slideshow-container\"), $(\".js-mask-down-wrapper\")),\r\n $jsMaskLeftWrapper = $(\".js-mask-left-wrapper\"),\r\n $hiddenProtocols = $(\".hidden-protocols\"),\r\n $showHideProtocols = $(\".show-more-protocols\");\r\n $sobreTitle = $(\".sobre-title\"), $jsAnimUpGroup = $(\".js-anim-up-group\"), $jsAnimUp = $(\".js-anim-up\"), $jsAnimReveal = $(\".js-anim-reveal\"), /*Initializations*/\r\n initHeaderAnim(\"init\"), initHeaderAnim(\"start\"), pressAnime(), scrollTweens(), /*events*/\r\n $_body.hasClass(\"mobile\") ? (window.innerWidth > 767 ? $(\".slideshow-container\").vTicker({\r\n speed: 500,\r\n pause: 1500,\r\n height: 60,\r\n mousePause: !1\r\n }) : $(\".slideshow-container\").vTicker({\r\n speed: 500,\r\n pause: 1500,\r\n height: 40,\r\n mousePause: !1\r\n }), $thumbnail.on(\"click\", function() {\r\n var $this = $(this),\r\n $bgHover = $this.find(\".bg-hover\"),\r\n $goAnime = $this.find(\".go-anime\"),\r\n $closeToolTip = $this.find(\".close-tooltip\");\r\n if (!$this.hasClass(\"active\")) {\r\n if ($.each($thumbnail, function() {\r\n $(this).hasClass(\"active\") && ($(this).toggleClass(\"active\"), TweenMax.to($(this).find(\".close-tooltip\"), .1, {\r\n autoAlpha: 0,\r\n y: 0\r\n }), TweenMax.to($(this).find(\".bg-hover\"), .1, {\r\n delay: .35,\r\n autoAlpha: 0\r\n }), TweenMax.staggerTo($(this).find(\".go-anime\"), .4, {\r\n opacity: 0,\r\n y: 0\r\n }, .2))\r\n }), $this.addClass(\"js-hover\"), !$this.hasClass(\"js-hover\")) return !1;\r\n $this.hasClass(\"active\") || ($this.toggleClass(\"active\"), TweenMax.set($closeToolTip, {\r\n y: 10\r\n }), TweenMax.to($closeToolTip, .1, {\r\n delay: .25,\r\n autoAlpha: 1,\r\n y: 0\r\n }), TweenMax.to($bgHover, .1, {\r\n autoAlpha: 1\r\n }), TweenMax.staggerTo($goAnime, .4, {\r\n opacity: 1,\r\n y: -10,\r\n delay: .15\r\n }, .2))\r\n }\r\n }), $(document).on(\"click\", \".thumbnail.active .close-tooltip\", function() {\r\n var $this = $(this),\r\n $thisThumb = $this.parent(\".thumbnail\"),\r\n $bgHover = $this.parent(\".thumbnail\").find(\".bg-hover\"),\r\n $goAnime = $this.parent(\".thumbnail\").find(\".go-anime\");\r\n $thisThumb.toggleClass(\"active\"), TweenMax.to($this, .1, {\r\n autoAlpha: 0,\r\n y: 10\r\n }), TweenMax.to($bgHover, .1, {\r\n delay: .35,\r\n autoAlpha: 0\r\n }), TweenMax.staggerTo($goAnime, .4, {\r\n opacity: 0,\r\n y: 0\r\n }, .2)\r\n })) : ($(\".slideshow-container\").vTicker({\r\n speed: 500,\r\n pause: 1500,\r\n height: 60,\r\n mousePause: !1\r\n }), $thumbnail.on(\"mouseenter\", function(e) {\r\n var $this = $(this),\r\n $bgHover = $this.find(\".bg-hover\"),\r\n $goAnime = $this.find(\".go-anime\"),\r\n imageTarget = $this.attr(\"data-image-target\"),\r\n $loader = $this.find(\".loader\"),\r\n offset = $(this).offset();\r\n e.pageX - offset.left, e.pageY - offset.top;\r\n // relativeX = relativeX-$bgHover.width()/2;\r\n // relativeY = relativeY-$bgHover.height()/2;\r\n // $bgHover.css({\r\n // \"left\": 0,\r\n // \"top\": 0,\r\n // 'width':'100%',\r\n // 'height':'100%'\r\n // \"transform\": \"scale(2)\",\r\n // \"-webkit-transform\": \"scale(2)\"\r\n // });\r\n //TweenMax.to($bgHover, .1, {autoAlpha:.9});\r\n return startAnimation($loader[0]), $this.find(\"img\").hide(), $this.addClass(\"js-hover\"), !!$this.hasClass(\"js-hover\") && (TweenMax.to($bgHover, .1, {\r\n opacity: .9,\r\n visibility: \"visible\"\r\n }), TweenMax.staggerTo($goAnime, .4, {\r\n opacity: 1,\r\n y: 0,\r\n delay: .15\r\n }, .2), void $.doTimeout(0, function() {\r\n return !!$this.hasClass(\"js-hover\") && ($loader.css(\"opacity\", 1), loaderHighPic.play(), void loaderHighPic.addEventListener(\"complete\", function() {\r\n $(\".titles-columns\").css(\"opacity\", 0), $thumbnail.css(\"opacity\", .15), $this.css(\"opacity\", 1), $loader.css(\"opacity\", 0), TweenMax.to($fullImages.find(\".image-wrapper[data-image='\" + imageTarget + \"']\"), .2, {\r\n autoAlpha: 1,\r\n ease: Power4.easeOut,\r\n onComplete: function() {\r\n $fullImages.find(\".image-wrapper[data-image='\" + imageTarget + \"']\").addClass(\"js-scale\")\r\n }\r\n })\r\n }))\r\n }))\r\n }).on(\"mouseleave\", function(e) {\r\n var $this = $(this),\r\n $bgHover = $this.find(\".bg-hover\"),\r\n $loader = $this.find(\".loader\"),\r\n $goAnime = $this.find(\".go-anime\");\r\n $this.find(\".close-tooltip\");\r\n $this.removeClass(\"js-hover\"), $this.find(\"img\").show(), $(\".titles-columns\").css(\"opacity\", 1), TweenMax.to($bgHover, .1, {\r\n autoAlpha: 0\r\n }), TweenMax.killTweensOf($goAnime), TweenMax.killTweensOf($fullImages.find(\".image-wrapper\")), $thumbnail.css(\"opacity\", \"\"), TweenMax.to($fullImages.find(\".image-wrapper\"), .2, {\r\n autoAlpha: 0,\r\n ease: Power4.easeOut\r\n }), $fullImages.find(\".image-wrapper\").removeClass(\"js-scale\"), $loader.css(\"opacity\", 0), loaderHighPic.destroy(),\r\n // $bgHover.css({\r\n // \"transform\": \"scale(0)\",\r\n // \"-webkit-transform\": \"scale(0)\"\r\n // });\r\n TweenMax.to($goAnime, .2, {\r\n opacity: 0,\r\n y: 10\r\n })\r\n })), $showHideProtocols.on(\"click\", function() {\r\n var $this = $(this);\r\n $hiddenProtocols.toggleClass(\"active\"), TweenMax.set($hiddenProtocols.find(\"p\"), {\r\n y: \"20px\"\r\n }), $hiddenProtocols.hasClass(\"active\") ? ($this.text(\"Esconder\"), TweenMax.to($hiddenProtocols, 1.2, {\r\n autoAlpha: 1,\r\n height: $hiddenProtocols.find(\"p\").height() * $hiddenProtocols.find(\"p\").length,\r\n ease: Expo.easeOut\r\n }), TweenMax.staggerTo($hiddenProtocols.find(\"p\"), .5, {\r\n y: \"0px\",\r\n autoAlpha: 1,\r\n ease: Power4.easeOut\r\n }, .05)) : ($this.text(\"Mostrar Mais\"), TweenMax.set($hiddenProtocols.find(\"p\"), {\r\n y: \"20px\",\r\n autoAlpha: 0\r\n }), TweenMax.to($hiddenProtocols, .3, {\r\n autoAlpha: 0,\r\n height: \"0\"\r\n }))\r\n })\r\n}", "buildParams() {\n const classOpts = {\n flip: this.flip,\n spin: this.spin,\n pulse: this.pulse,\n border: this.border,\n inverse: this.inverse,\n size: this.size || null,\n pull: this.pull || null,\n rotate: this.rotate || null,\n fixedWidth: this.fixedWidth,\n };\n const parsedTransform = typeof this.transform === 'string' ? _fortawesome_fontawesome_svg_core__WEBPACK_IMPORTED_MODULE_3__[\"parse\"].transform(this.transform) : this.transform;\n return {\n transform: parsedTransform,\n classes: [...faClassList(classOpts), ...this.classes],\n title: this.title,\n styles: this.styles,\n };\n }", "function AnimationAnimateMetadata() { }", "function AnimationAnimateMetadata() { }", "static fromFrames(frames) {\nvar anim;\n//----------\nanim = new CASAnimation();\nanim.setFromFrames(frames);\nreturn anim;\n}", "function initStage015(stage){\n\nvar item;\n\n// Percent of one unit. if you want to change unit size, change this.\nvar u=8;\n\n/////Animation Parameter/////\n//\n//dsp :display (true/false) startIndex.... display or hide\n//x : position x (percent)\n//y : position y (percent)\n//w : width (percent)\n//h : height (percent)\n//bgc : background-color\n//bdc : border-color\n//img : background-image (filename)\n//opc : opacity (0.0....1.0) default=1.0\n//z : z-index (default=2)\n//wd : character of word\n\n//Answer String\n//helper original string=kkfh\" abc defghi\"kklkk0\" abc defghi\"kkfe\" abc defghi\"kk\nstage.setAnsStr(\"kkfhkklkk0kkfekk\");\nitem=stage.createNewItem();\n\n//class name\nitem.setName(\"vimrio\");\n\n//frame offset. default startindex=0\nitem.setFrameStartIndex(0);\nstage.addItem(item);\n\n//first frame\n//1 start\nitem.addAnimation({\"dsp\":true,\"x\":1*u,\"y\":11*u,\"w\":u,\"h\":u,\"bgc\":\"transparent\",\"bdc\":\"blue\",\"img\":\"vimrio01.png\",\"z\":5,\"opc\":1.0,\"wd\":\"\"});\n//following next frames\n\n//2 k\nitem.addAnimation({\"y\":10*u});\n//3 k\nitem.addAnimation({\"y\":9*u});\n//4 f\nitem.addAnimation({\"x\":10*u});\n//5 k\nitem.addAnimation({\"y\":8*u});\n//6 k\nitem.addAnimation({\"y\":7*u});\n//7 l\nitem.addAnimation({\"x\":11*u});\n//8 k\nitem.addAnimation({\"y\":6*u});\n//9 k\nitem.addAnimation({\"y\":5*u});\n//10 0\nitem.addAnimation({\"x\":1*u});\n//11 k\nitem.addAnimation({\"y\":4*u});\n//12 k\nitem.addAnimation({\"y\":3*u});\n//13 f\nitem.addAnimation({\"x\":7*u});\n//14 k\nitem.addAnimation({\"y\":2*u});\n//15 k\nitem.addAnimation({\"y\":1*u});\n\n//1 goal\nitem=stage.createNewItem();\nitem.setName(\"goal\");\nitem.addAnimation({\"dsp\":true,\"x\":7*u,\"y\":1*u,\"w\":u,\"h\":u,\"img\":\"goal01.png\",\"bgc\":\"yellow\",\"bdc\":\"yellow\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [ ] 1\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":1*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\" \"});\nstage.addItem(item);\n\n//word \" abc defghi\" [a] 2\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":2*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"a\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [b] 3\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":3*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"b\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [c] 4\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":4*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"c\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [ ] 5\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":5*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\" \"});\nstage.addItem(item);\n\n//word \" abc defghi\" [d] 6\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":6*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"d\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [e] 7\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":7*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"e\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [f] 8\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":8*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"f\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [g] 9\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":9*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"g\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [h] 10\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":10*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"word01.png\",\"bgc\":\"transparent\",\"bdc\":\"white\",\"wd\":\"h\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [i] 11\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":11*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"i\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [ ] 1\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":1*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"word01.png\",\"bgc\":\"transparent\",\"bdc\":\"white\",\"wd\":\" \"});\nstage.addItem(item);\n\n//word \" abc defghi\" [a] 2\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":2*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"word04.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"a\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [b] 3\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":3*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"word04.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"b\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [c] 4\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":4*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"word04.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"c\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [ ] 5\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":5*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"word04.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\" \"});\nstage.addItem(item);\n\n//word \" abc defghi\" [d] 6\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":6*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"word04.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"d\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [e] 7\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":7*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"word04.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"e\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [f] 8\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":8*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"word04.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"f\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [g] 9\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":9*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"word04.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"g\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [h] 10\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":10*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"word04.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"h\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [i] 11\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":11*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"word04.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"i\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [ ] 1\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":1*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\" \"});\nstage.addItem(item);\n\n//word \" abc defghi\" [a] 2\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":2*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"a\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [b] 3\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":3*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"b\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [c] 4\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":4*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"c\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [ ] 5\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":5*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\" \"});\nstage.addItem(item);\n\n//word \" abc defghi\" [d] 6\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":6*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"d\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [e] 7\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":7*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"word01.png\",\"bgc\":\"transparent\",\"bdc\":\"white\",\"wd\":\"e\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [f] 8\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":8*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"f\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [g] 9\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":9*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"g\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [h] 10\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":10*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"h\"});\nstage.addItem(item);\n\n//word \" abc defghi\" [i] 11\nitem=stage.createNewItem();\nitem.setName(\"word\");\nitem.addAnimation({\"dsp\":true,\"x\":11*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"word02.png\",\"bgc\":\"transparent\",\"bdc\":\"lightgray\",\"wd\":\"i\"});\nstage.addItem(item);\n\n\n\n//wall 1\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":6*u,\"y\":0*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 2\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":7*u,\"y\":0*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 3\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":8*u,\"y\":0*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 4\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":6*u,\"y\":1*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 5\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":8*u,\"y\":1*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 6\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":0*u,\"y\":2*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 7\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":1*u,\"y\":2*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 8\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":2*u,\"y\":2*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 9\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":3*u,\"y\":2*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 10\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":4*u,\"y\":2*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 11\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":5*u,\"y\":2*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 12\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":6*u,\"y\":2*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 13\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":8*u,\"y\":2*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 14\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":9*u,\"y\":2*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 15\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":10*u,\"y\":2*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 16\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":11*u,\"y\":2*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 17\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":12*u,\"y\":2*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 18\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":0*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 19\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":12*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 20\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":0*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 21\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":2*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 22\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":3*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 23\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":4*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 24\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":5*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 25\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":6*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 26\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":7*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 27\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":8*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 28\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":9*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 29\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":10*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 30\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":11*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 31\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":12*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 32\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":0*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 33\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":12*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 34\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":0*u,\"y\":6*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 35\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":1*u,\"y\":6*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 36\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":2*u,\"y\":6*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 37\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":3*u,\"y\":6*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 38\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":4*u,\"y\":6*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 39\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":5*u,\"y\":6*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 40\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":6*u,\"y\":6*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 41\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":7*u,\"y\":6*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 42\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":8*u,\"y\":6*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 43\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":9*u,\"y\":6*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 44\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":10*u,\"y\":6*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 45\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":12*u,\"y\":6*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 46\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":9*u,\"y\":7*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 47\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":12*u,\"y\":7*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 48\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":0*u,\"y\":8*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 49\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":1*u,\"y\":8*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 50\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":2*u,\"y\":8*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 51\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":3*u,\"y\":8*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 52\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":4*u,\"y\":8*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 53\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":5*u,\"y\":8*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 54\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":6*u,\"y\":8*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 55\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":7*u,\"y\":8*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 56\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":8*u,\"y\":8*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 57\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":9*u,\"y\":8*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 58\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":11*u,\"y\":8*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 59\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":12*u,\"y\":8*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 60\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":0*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 61\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":12*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 62\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":0*u,\"y\":10*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 63\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":2*u,\"y\":10*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 64\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":3*u,\"y\":10*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 65\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":4*u,\"y\":10*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 66\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":5*u,\"y\":10*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 67\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":6*u,\"y\":10*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 68\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":7*u,\"y\":10*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 69\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":8*u,\"y\":10*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 70\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":9*u,\"y\":10*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 71\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":10*u,\"y\":10*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 72\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":11*u,\"y\":10*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 73\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":12*u,\"y\":10*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 74\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":0*u,\"y\":11*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 75\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":2*u,\"y\":11*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 76\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":0*u,\"y\":12*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 77\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":1*u,\"y\":12*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 78\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":2*u,\"y\":12*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n\n}", "function randomizeParameters() {\n CS.strokeS=randomRGBA();\n CS.fillS=randomRGBA();\n CS.lineW=Math.floor(Math.random()*9)+1;\n CS.brushSize=Math.floor(Math.random()*99)+1;\n updateControls();\n // canvas.dispatchEvent(new Event('mousemove')); // trigger updating in place of the brush on the preview layer\n //TODO trigger redraw \"in-place\" on new random event\n }", "function createFxNow(){setTimeout(function(){fxNow = undefined;});return fxNow = jQuery.now();} // Generate parameters to create a standard animation", "function Animations() {\n this.x = 0;\n this.y = 0;\n this.scale = 0\n this.\n}", "function page_animations() {\n\n var headerTl = new TimelineMax();\n\n headerTl.to('header', 0.25 ,{ opacity: 1})\n .to('header .logo h2', 0.25 ,{ opacity: 1})\n .staggerTo($('.color-box'), 0.3 ,{ opacity: 1}, 0.15, \"header\")\n .staggerTo($('#raw, #build'), 0.3 ,{ opacity: 0.3}, 0.15)\n .staggerTo($('.preview-window, .status'), 0.5 ,{ opacity: 1}, 0.15, \"header\")\n .to($('.tutorial, .about, footer'), 0.25 ,{ opacity: 1}, \"header\");\n\n\n\n // Animates footer heart.\n TweenMax.to('#heart', 1, {scale: 1.2, repeat: -1});\n\n // Animates Tutorial navigation.\n // Mouse in and out need to be monitored.\n $('.tutorial nav img').hover(over, out);\n function over(){\n TweenMax.to(this, 0.25, {y:5});\n //TweenMax.to('.tutorial_slides img', 1, {rotationY:360, immediateRender: false});\n }\n function out(){\n TweenMax.to(this, 0.25, {y:0});\n //TweenMax.to('.tutorial_slides img', 0, {rotationY:0});\n }\n\n}", "function genFx(type,includeWidth){var which,attrs={height:type},i=0;// if we include width, step value is 1 to do all cssExpand values,\n// if we don't include width, step value is 2 to skip over Left and Right\n includeWidth=includeWidth?1:0;for(;i<4;i+=2-includeWidth){which=cssExpand[i];attrs[\"margin\"+which]=attrs[\"padding\"+which]=type;}if(includeWidth){attrs.opacity=attrs.width=type;}return attrs;}// Generate shortcuts for custom animations", "createAnimations() {\r\n //#region Idle animation\r\n // Idle front\r\n this.anims.create({\r\n key: 'idle_front',\r\n frames: [\r\n {\r\n key: 'idle_front_0'\r\n },\r\n {\r\n key: 'idle_front_1'\r\n },\r\n {\r\n key: 'idle_front_2'\r\n },\r\n {\r\n key: 'idle_front_3'\r\n }\r\n ],\r\n frameRate: 2,\r\n repeat: -1,\r\n });\r\n\r\n // Idle back\r\n this.anims.create({\r\n key: 'idle_back',\r\n frames: [\r\n {\r\n key: 'idle_back_0'\r\n },\r\n {\r\n key: 'idle_back_1'\r\n },\r\n {\r\n key: 'idle_back_2'\r\n },\r\n {\r\n key: 'idle_back_3'\r\n }\r\n ],\r\n frameRate: 2,\r\n repeat: -1,\r\n });\r\n\r\n // Idle side\r\n this.anims.create({\r\n key: 'idle_side',\r\n frames: [\r\n {\r\n key: 'idle_side_0'\r\n },\r\n {\r\n key: 'idle_side_1'\r\n },\r\n {\r\n key: 'idle_side_2'\r\n },\r\n {\r\n key: 'idle_side_3'\r\n }\r\n ],\r\n frameRate: 2,\r\n repeat: -1,\r\n });\r\n\r\n //#endregion\r\n\r\n //#region Run animations\r\n\r\n // Run front\r\n this.anims.create({\r\n key: 'run_front',\r\n frames: [\r\n {\r\n key: 'run_front_0'\r\n },\r\n {\r\n key: 'run_front_1'\r\n },\r\n {\r\n key: 'run_front_2'\r\n },\r\n {\r\n key: 'run_front_3'\r\n }\r\n ],\r\n frameRate: 6,\r\n repeat: -1,\r\n });\r\n\r\n // Run back\r\n this.anims.create({\r\n key: 'run_back',\r\n frames: [\r\n {\r\n key: 'run_back_0'\r\n },\r\n {\r\n key: 'run_back_1'\r\n },\r\n {\r\n key: 'run_back_2'\r\n },\r\n {\r\n key: 'run_back_3'\r\n }\r\n ],\r\n frameRate: 6,\r\n repeat: -1,\r\n });\r\n\r\n // Run side\r\n this.anims.create({\r\n key: 'run_side',\r\n frames: [\r\n {\r\n key: 'run_side_0'\r\n },\r\n {\r\n key: 'run_side_1'\r\n },\r\n {\r\n key: 'run_side_2'\r\n },\r\n {\r\n key: 'run_side_3'\r\n }\r\n ],\r\n frameRate: 6,\r\n repeat: -1,\r\n });\r\n\r\n //#endregion\r\n }", "constructor(){\n this.inProgressAnimation;\n this.elementToAnimate;\n this.animationDuration;\n }", "getSignAndFrameInfo() {\n//------------------\n// Handle frame beyond end of animation\nif (this.fCur === this.fCount) {\nreturn [\"[none]\", this.signs.length, this.fCur];\n} else {\n// Rely on @frameCur being set according to @fCur\nreturn [this.frameCur.sign.gloss, this.frameCur.sign.i, this.fCur];\n}\n}", "static create(aframes, fps) {\nvar aa;\n//------\naa = new AmbientAnim();\naa.set(aframes, fps);\nreturn aa;\n}", "function createAnimation(begin, easing, attribute, fill, from, to, dur) {\n\t //Create the animation\n\t var animation = document.createElement('a-animation');\n\n\t //Set all of the given attributes\n\t begin && animation.setAttribute('begin', begin);\n\t easing && animation.setAttribute('easing', easing);\n\t attribute && animation.setAttribute('attribute', attribute);\n\t fill && animation.setAttribute('fill', fill);\n\t from && animation.setAttribute('from', from);\n\t to && animation.setAttribute('to', to);\n\t dur && animation.setAttribute('dur', dur);\n\n\t return animation;\n\t}", "generateGhostAnimation(sprite) {\n this.createAnimation(`${sprite}WalkLeft`, -1, 5, sprite, 'side_walk_');\n this.createAnimation(`${sprite}WalkRight`, -1, 5, sprite, 'right_walk_');\n this.createAnimation(`${sprite}WalkBackLeft`, -1, 5, sprite, 'back_side_walk_');\n this.createAnimation(`${sprite}WalkBackRight`, -1, 5, sprite, 'back_right_walk_');\n this.createAnimation(`${sprite}WalkBack`, -1, 5, sprite, 'back_walk_');\n this.createAnimation(`${sprite}WalkForward`, -1, 5, sprite, 'front_walk_');\n this.createAnimation(`${sprite}IdleForward`, -1, 5, sprite, 'front_stand_');\n this.createAnimation(`${sprite}IdleBack`, -1, 5, sprite, 'back_stand_');\n this.createAnimation(`${sprite}Hit`, -1, 5, sprite, 'front_hurt_');\n this.createAnimation(`${sprite}LeftHit`, -1, 5, sprite, 'side_hurt_');\n this.createAnimation(`${sprite}RightHit`, -1, 5, sprite, 'right_hurt_');\n this.createAnimation(`${sprite}BackHit`, -1, 5, sprite, 'back_hurt_');\n }", "putAnimationBoxes() {\n let cf = this.working_model.frames[this.current_frame];\n\n this.animation_display.selection = {\n x: cf.x,\n y: cf.y,\n w: cf.width,\n h: cf.height\n };\n this.animation_display.sprite_origin = {\n x: cf.offset_x,\n y: cf.offset_y\n };\n }", "function createFxNow(){window.setTimeout(function(){fxNow=undefined;});return fxNow=jQuery.now();} // Generate parameters to create a standard animation", "function createFxNow(){window.setTimeout(function(){fxNow=undefined;});return fxNow=jQuery.now();} // Generate parameters to create a standard animation", "setAnimation(levelName,entityName=`entity${this.data.id}`){ \n this.animationName = entityName // Set animation name as member variable\n $.keyframe.define([{ // Dynamically create keyframe animation\n name: `${levelName}_${entityName}_anim`,\n '100%': {'background-position': `-${this.data.entity.crop}px`} \n }]);\n }", "function initConstants()\n {\n constants.delay = 12; \n constants.initialTheta = 0;\n constants.thetaDelta = 0.3;\n svgElement = document.getElementById(\"svgElement\");\n transformObject = svgElement.createSVGTransform();\n transformObject2 = svgElement.createSVGTransform();\n }", "function renderAnimation(ctx, width, height, angle, length) {\n length = length * 200;\n // Attachment of the pendulum\n var baseX = width / 2;\n var baseY = 50;\n var weightX = baseX + length * Math.sin(angle);\n var weightY = baseY + length * Math.cos(angle);\n ctx.clearRect(0, 0, width, height);\n ctx.beginPath();\n ctx.fillStyle = \"#2B2\";\n ctx.arc(baseX, baseY, 5, 0, 2 * Math.PI);\n ctx.fill();\n ctx.beginPath();\n ctx.strokeStyle = \"#000\";\n ctx.moveTo(baseX, baseY);\n ctx.lineTo(weightX, weightY);\n ctx.stroke();\n ctx.beginPath();\n ctx.fillStyle = \"#22B\";\n ctx.arc(weightX, weightY, 10, 0, 2 * Math.PI);\n ctx.fill();\n}", "setFrameProperties(numberOfAnimations, indexAnimation) {\n this.frame.width = this.img.width / this.numberOfFrames\n this.frame.height = this.img.height / numberOfAnimations\n this.frame.posX = 0\n this.frame.posY = this.frame.height * indexAnimation\n }", "function output5() {\n var element = document.getElementById(\"output\");\n element.innerHTML = \"/*CSS*/ <br />\"\n + \".scenario5 { <br />\"\n + g_tab + scenarioTransformValues + \"<br />\"\n + g_tab + scenarioDurationValues + \"<br />\"\n + g_tab + scenarioDelayValues + \"<br />\"\n + g_tab + scenarioTimFunValues + \"<br />\"\n + \"}<br />\"\n + \"@keyframes animation2D { <br />\"\n + d_tab + scenarioKeyfrom + \"<br />\"\n + d_tab + scenarioKey50 + \"<br />\"\n + d_tab + scenarioKeyto + \"<br />\"\n + g_tab + \"} <br />\";\n }", "function animate_NAff() {\n defo= (defo+1.0) % 180\n loadVertices();\n}", "function animationSetUp() {\n // Pacman's frames\n for (let i = 0; i < 5; i++) {\n for (let j = 0; j < 4; j++) {\n let frame = pacmanImg.get(j * 32, i * 32, 32, 32)\n pacmanFrames.push(frame)\n }\n }\n\n for (let i = 0; i < 3; i++) {\n for (let j = 0; j < 2; j++) {\n leftImages.push(leftGhosts.get(j * 32, i * 32, 32, 32))\n rightImages.push(rightGhosts.get(j * 32, i * 32, 32, 32))\n upImages.push(upGhosts.get(j * 32, i * 32, 32, 32))\n downImages.push(downGhosts.get(j * 32, i * 32, 32, 32))\n }\n }\n}", "function initialisationOfVariables() {\n gravity = 9.8; /** Initial graviational value of environmetn */\n mass_of_flywheel = 5; /** Initial mass of fly wheel */\n diameter_of_flywheel = 10; /** Initial diameterof fly wheel */\n mass_of_rings = 200; /** Initial mass of hanging weight */\n diameter_of_axle = 2; /** Initial diameter of axl of fly wheel */\n no_of_wound = 1; /** Initial number of wounds on fly wheel */\n rotation_speed = wheel_rotation_speed = 33600/4; /** Initially speed rate of fly wheel in milli seconds */\n speed_correction = 2.0001; /** Speed correction value for adjusting the speed of fly wheel */\n thread_anim_frame = 0; /** First frame of thread animation image */\n time_slots =[]; /** Array store the time taken for each rotation */\n time_slot_indx = 0; /** Index of time slot array */\n line_mask = new createjs.Shape();\n line_mask.name = \"line_mask\";\n rotation = 0;\n rotation_decimal = 0;\n line_mask.graphics.drawRect(300, 0, 200, 555);\n line_mask.y = 0;\n long_string.mask = line_mask;\n thread_anim_width = 199.869; /** Variable to indicate the width of each frame of thread animation image */\n wound = new createjs.Shape(); /** Shape object to create wound over axl of fly wheel */\n string_x_pos = 0; /** Initial position of string wounded over axl of fly wheel */\n itration = 0; /** Variable to increment the length of long string while releasing string */\n x_decrement = 0; /** Variable to set the horizontal position of long string whilw releasing the string */\n drawLongString(385); /** Function to draw hanging string */\n rolling = false; /** Variable to indicate that strating of fly wheel rotation, and it used to differentiate initial wheel rotation and wheel rotation after pause */\n INTERVAL = 0.2; /** Basic time interval of simulation(200 milli second) */\n total_rotation = 360; /** One roation of fly wheel */\n angular_velocity = 0; /** Initial value of angular velocity */\n angular_distance = 0; /** Initial value of angular distance */\n number_of_rotation = 0; /** Initial value of number of rotation */\n final_rotation = false;\n getChildName(\"height_txt\").text = \"02cm\";\n}", "function setItemParams(themeNames) {\n\n themes.beach.items.beachball = {\n posX: 300, posY: 250, scale: 1, rotation: 10,\n movX: 20, movY: 70, scaleTo: 1, duration: 2, \n easing: \"BounceEaseOut\"};\n \n themes.beach.items.bucket = {posX: 200, posY: 300, scale: 0.6, rotation: 10,\n movX: 0, movY: 0, scaleTo: 0.6, duration: 1, easing: \"StrongEaseInOut\"};\n themes.beach.items.crab = {posX: 300, posY: 300, scale: 0.9,\n movX: 30, movY: 0, scaleTo: 0.9, duration: 1, easing: \"EaseOut\"};\n themes.beach.items.jellyfish = {posX: 300, posY: 100, scale: 1,\n movX: 30, movY: -40, scaleTo: 1, duration: 2, easing: \"EaseInOut\"};\n themes.beach.items.lifeguard = {posX: 300, posY: 200, scale: 1.1,\n movX: -20, movY: 0, scaleTo: 1.1, duration: 2, easing: \"Linear\"};\n themes.beach.items.sandcastle = {posX: 350, posY: 500, scale: 0.1,\n movX: 0, movY: -100, scaleTo: 0.9, duration: 4, easing: \"StrongEaseInOut\"};\n themes.beach.items.seagull = {posX: 200, posY: 100, scale: 0.7, rotation: 5,\n movX: -100, movY: 50, scaleTo: 0.8, duration: 2, easing: \"EaseInOut\"};\n themes.beach.items.seashell = {posX: 400, posY: 280, scale: 0.4,\n movX: 0, movY: 20, scaleTo: 1.1, duration: 2, easing: \"Linear\"};\n themes.beach.items.towel = {posX: 100, posY: 350, scale: 0,\n movX: 00, movY: 0, scaleTo: 1.2, duration: 1, easing: \"StrongEaseInOut\"};\n themes.beach.items.umbrella = {posX: 80, posY: -40, scale: 1,\n movX: 10, movY: 20, scaleTo: 1, duration: 1, easing: \"StrongEaseInOut\"};\n\n themes.home.items.backyard = {posX: 100, posY: 0, scale: 0.88,\n movX: 0, movY: 0, scaleTo: 0.9, duration: 1, easing: \"Linear\"};\n themes.home.items.bath = {posX: 100, posY: 200, scale: .99,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.home.items.bed = {posX: 80, posY: 250, scale: .99,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.home.items.fridge = {posX: 200, posY: 20, scale: 0.97,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.home.items.lounge = {posX: 190, posY: 170, scale: 0.99,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.home.items.oven = {posX: 100, posY: 200, scale: 0.9,\n movX: 0, movY: 0, scaleTo: 0.92, duration: 1, easing: \"Linear\"};\n themes.home.items.parents = {posX: 270, posY: 250, scale: 0.9,\n movX: 0, movY: 20, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.home.items.toilet = {posX: 280, posY: 180, scale: 0.99,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.home.items.tv = {posX: 280, posY: 60, scale: .99,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.home.items.washing_machine = {posX: 400, posY: 160, scale: 0.98,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n\n themes.farm.items.chicken = {posX: 675, posY: 420, scale: 0.8,\n movX: -20, movY: 0, scaleTo: 0.8, duration: 1, easing: \"EaseInOut\"};\n themes.farm.items.cow = {posX: 350, posY: 350, scale: 1,\n movX: -20, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.farm.items.duck = {posX: 540, posY: 380, scale: 1,\n movX: -20, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.farm.items.farmer = {posX: 600, posY: 380, scale: 0.97,\n movX: 0, movY: 5, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.farm.items.horse = {posX: 260, posY: 150, scale: 1,\n movX: -20, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.farm.items.goat = {posX: 380, posY: 340, scale: 1,\n movX: 20, movY: 0, scaleTo: 1, duration: 1, easing: \"EaseInOut\"};\n themes.farm.items.pig = {posX: 350, posY: 380, scale: 1,\n movX: 20, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.farm.items.scarecrow = {posX: 300, posY: 280, scale: 1,\n movX: 0, movY: 0, scaleTo: 1.2, duration: 1, easing: \"EaseInOut\"};\n themes.farm.items.sheep = {posX: 350, posY: 370, scale: 1,\n movX: -20, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.farm.items.tractor = {posX: 230, posY: 250, scale: 0.98,\n movX: -20, movY: 10, scaleTo: 1, duration: 1, easing: \"Linear\"};\n\n themes.pets.items.bird = {posX: 180, posY: 390, scale: 1,\n movX: 20, movY: 0, scaleTo: 1, duration: 1, easing: \"EaseInOut\"};\n themes.pets.items.goldfish = {posX: 280, posY: 280, scale: 1,\n movX: -30, movY: 0, scaleTo: 1, duration: 2, easing: \"Linear\"};\n themes.pets.items.guineapig = {posX: 290, posY: 200, scale: 1,\n movX: -20, movY: 0, scaleTo: 1, duration: 4, easing: \"Linear\"};\n themes.pets.items.hermitcrab = {posX: 310, posY: 290, scale: 1,\n movX: 20, movY: 0, scaleTo: 1, duration: 4, easing: \"Linear\"};\n themes.pets.items.kitten = {posX: 430, posY: 370, scale: 0.95,\n movX: 0, movY: 0, scaleTo: 1, duration: 4, easing: \"Linear\"};\n themes.pets.items.lamb = {posX: 430, posY: 270, scale: 1,\n movX: 20, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.pets.items.mouse = {posX: 420, posY: 220, scale: 1,\n movX: 0, movY: -20, scaleTo: 1, duration: 4, easing: \"Linear\"};\n themes.pets.items.puppy = {posX: 385, posY: 280, scale: 1, rotation: -3,\n movX: -5, movY: 10, scaleTo: 1, duration: 1, easing: \"EaseInOut\"};\n themes.pets.items.rabbit = {posX: 290, posY: 270, scale: 1,\n movX: 10, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.pets.items.turtle = {posX: 390, posY: 251, scale: 1, rotation: 3,\n movX: 10, movY: 0, scaleTo: 1, duration: 2, easing: \"Linear\"};\n\n themes.picnic.items.ants = {posX: 180, posY: 320, scale: 1,\n movX: 50, movY: 0, scaleTo: 1, duration: 2, easing: \"EaseInOut\"};\n themes.picnic.items.bbq = {posX: 180, posY: 320, scale: 0,\n movX: 50, movY: 0, scaleTo: 0, duration: 2, easing: \"EaseInOut\"};\n themes.picnic.items.boomerang = {posX: 270, posY: 150, scale: 1, rotation: 360,\n movX: -200, movY: 0, scaleTo: 0.8, duration: 2, easing: \"Linear\"};\n themes.picnic.items.park_bench = {posX: 80, posY: 30, scale: 0.9,\n movX: 0, movY: 0, scaleTo: 0.9, duration: 1, easing: \"Linear\"};\n themes.picnic.items.picnic_basket = {posX: 120, posY: 320, scale: 1,\n movX: 0, movY: 0, scaleTo: 1, duration: 4, easing: \"Linear\"};\n themes.picnic.items.picnic_blanket = {posX: 240, posY: 260, scale: 1,\n movX: 0, movY: 0, scaleTo: 1, duration: 4, easing: \"Linear\"};\n themes.picnic.items.tennisball = {posX: 380, posY: 210, scale: 1,rotation: 90,\n movX: -130, movY: 20, scaleTo: 1, duration: 2, easing: \"Linear\"};\n \n themes.playground.items.slide = {posX: 200, posY: 50, scale: 1,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.playground.items.swings = {posX: 150, posY: 130, scale: 1,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.playground.items.trampoline = {posX: 230, posY: 120, scale: 1,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.playground.items.tunnel = {posX: 260, posY: 150, scale: 1,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n\n themes.school.items.blackboard = {posX: 240, posY: 80, scale: 1,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.school.items.lunchbox = {posX: 320, posY: 170, scale: 1,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.school.items.pencils = {posX: 530, posY: 400, scale: 1,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.school.items.singing = {posX: 230, posY: 200, scale: 1,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n\n themes.shops.items.icecream_truck = {posX: 40, posY: 180, scale: 1,rotation: -4,\n movX: -200, movY: 100, scaleTo: 1, duration: 4, easing: \"EaseIn\"};\n themes.shops.items.money = {posX: 250, posY: 90, scale: 1.1,\n movX: 0, movY: 0, scaleTo: 1.1, duration: 1, easing: \"Linear\"};\n themes.shops.items.vegetables = {posX: 190, posY: 265, scale: 0,\n movX: 0, movY: 0, scaleTo: 0, duration: 4, easing: \"Linear\"};\n\n themes.sport.items.basketball = {posX: 320, posY: 130, scale: 1,\n movX: 0, movY: -20, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.sport.items.cricket = {posX: 200, posY: 290, scale: 1,\n movX: 0, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n themes.sport.items.football = {posX: 500, posY: 500, scale: 0.5,rotation: 180,\n movX: -100, movY: -440, scaleTo: 0.1, duration: 2, easing: \"EaseInOut\"};\n themes.sport.items.gymnastics = {posX: 280, posY: 120, scale: 1,\n movX: 10, movY: 0, scaleTo: 1, duration: 2, easing: \"Linear\"};\n themes.sport.items.netball = {posX: 300, posY: 100, scale: 1,\n movX: 10, movY: -20, scaleTo: 1, duration: 1, easing: \"EaseIn\"};\n themes.sport.items.soccer = {posX: 230, posY: 250, scale: 1,\n movX: 10, movY: 10, scaleTo: 1.1, duration: 1, easing: \"Linear\"};\n themes.sport.items.tennis = {posX: 100, posY: 230, scale: 1,\n movX: 10, movY: 0, scaleTo: 1, duration: 1, easing: \"Linear\"};\n\n themes.transport.items.bicycle = {posX: 360, posY: 220, scale: 1, rotation: 5,\n movX: 55, movY: 15, scaleTo: 1, duration: 1, easing: \"EaseOut\"};\n themes.transport.items.bus = {posX: 380, posY: 270, scale: 1, rotation: -2,\n movX: -40, movY: 0, scaleTo: 1, duration: 2, easing: \"Linear\"};\n themes.transport.items.car = {posX: 50, posY: 90, scale: .4, rotation: -3,\n movX: -40, movY: 30, scaleTo: .4, duration: 2, easing: \"Linear\"};\n themes.transport.items.motorcycle = {posX: 390, posY: 370, scale: 1,\n movX: -50, movY: 0, scaleTo: 1, duration: 2, easing: \"EaseInOut\"};\n themes.transport.items.plane = {posX: 40, posY: 170, scale: .4,rotation: 5,\n movX: 100, movY: 0, scaleTo: 1, duration: 2, easing: \"Linear\"};\n themes.transport.items.rocket = {posX: 100, posY: 380,rotation: -5,\n movX: 700, movY: -230, scale: 1, scaleTo: 0, duration: 4, easing: \"EaseOut\", };\n themes.transport.items.scooter = {posX: 220, posY: 150, scale: 0.96,\n movX: -60, movY: 10, scaleTo: 1, duration: 2, easing: \"EaseOut\"};\n themes.transport.items.ship = {posX: 200, posY: 280, scale: 0.9, rotation: -5,\n movX: 80, movY: 0, scaleTo: 1, duration: 2, easing: \"Linear\"};\n themes.transport.items.train = {posX: 260, posY: 230, scale: 1.17,rotation: -2,\n movX: -16, movY: 0, scaleTo: 1.24, duration: 1, easing: \"Linear\"};\n themes.transport.items.tram = {posX: 120, posY: 180, scale: 1.2,\n movX: -150, movY: 0, scaleTo: 1.2, duration: 3, easing: \"EaseOut\"};\n\n $.each(themeNames, function(themeName, items) {\n $.each(items, function(idx, item) {\n themes[themeName].items[item].imgName = item;\n themes[themeName].items[item].imgSrc = docUrl + \"themes/\" + themeName\n + \"/items/\" + item + \".png\";\n themes[themeName].items[item].callback = function() {\n };\n drawImage(themes[themeName].items[item]);\n });\n });\n}", "function createObjectAnimations() {\r\n this.anims.create({\r\n key: 'jewelAnims',\r\n frames: this.anims.generateFrameNumbers('jewel', { start: 0, end: 4 }),\r\n frameRate: 10,\r\n repeat: -1,\r\n });\r\n\r\n this.anims.create({\r\n key: 'cherryAnims',\r\n frames: this.anims.generateFrameNumbers('cherry', { start: 0, end: 6 }),\r\n frameRate: 6,\r\n repeat: -1,\r\n });\r\n}", "function InitValues_L2(){\n ggbApplet.setCoords(\"A\", 0.0, 3.5);\n ggbApplet.setCoords(\"B\", 1.5, 2.0);\n ggbApplet.setCoords(\"C\", 1.5, 4.0);\n ggbApplet.setCoords(\"D\", 2.5, 1.5);\n ggbApplet.setCoords(\"E\", 4.5, 2.5);\n ggbApplet.evalCommand(\"u = Vector(D, E)\");\n ggbApplet.evalCommand(\"t1 = Polygon(A, B, C)\");\n\n posA = [0.0, 3.5];\n posB = [1.5, 2.0];\n posC = [1.5, 4.0];\n posD = [2.5, 1.5];\n posE = [4.5, 2.5];\n vector = [2, 1];\n \n ggbApplet.stopAnimation();\n if(ggbApplet.exists(\"sldAnimation\") != true) {\n ggbApplet.evalCommand('sldAnimation = Slider('+ANIMATION_MIN+','+ANIMATION_MAX+','+ ANIMATION_INTERVAL+','+ANIMATION_SPEED+', 100, false, true, true, false)');\n }\n ggbApplet.evalCommand('sldAnimation = 0');\n}", "getAnimationStyle () {\n\n if ( this.sortableAnimation === 0 ) {\n return {};\n }\n\n const secs = this.sortableAnimation / 1000;\n\n return {\n transition: `all ${ secs }s ease-in`\n };\n\n }", "function setupAnimation(){\n\t// create canvas\n\tvar ctx = animation.persist.ctx = lib.canvas.create('canvas1');\n\n\twindow.requestAnimationFrame(animation.draw);\n}", "function animation() {\n\t\t\t\t// track time\n\t\t\t\tcurrent = Date.now();\n\t\t\t\telapsed = (current - lastTime) / 1000;\n\t\t\t\tif (elapsed > max_elapsed_wait) {\n\t\t\t\t\telapsed = max_elapsed_wait;\n\t\t\t\t}\n\n\n\t\t\t\tif (counter_time > time_step) {\n\n\n\n\t\t\t\t}\n\t\t\t\t//METEORITOS\n\t\t\t\tif(ygrados>-100000 && temp==1){\n\t\t\t\t\tygrados = ygrados - 0.01 * 70;\n\n\t\t\t\t\tmono.setT(CG.Matrix4.multiply(CG.Matrix4.multiply(CG.Matrix4.translate(new CG.Vector3(10,0,250)),CG.Matrix4.scale(new CG.Vector3(3,3,3))),CG.Matrix4.rotateY((Math.radians(ygrados)))));\n\t\t\t\t\tgeometry[0].setT(CG.Matrix4.multiply(CG.Matrix4.multiply(CG.Matrix4.rotateX(90*(-Math.PI/180)),CG.Matrix4.translate(new CG.Vector3(0,0,-1))),CG.Matrix4.rotateZ((Math.radians(ygrados)))));\n\n\n\t\t\t\t\tgeometry[4].setT(CG.Matrix4.multiply(CG.Matrix4.multiply(CG.Matrix4.rotateX(90*(-Math.PI/180)),CG.Matrix4.translate(new CG.Vector3(10,0,30))),CG.Matrix4.rotateZ((Math.radians(ygrados)))))\n\n\n\t\t\t\t\tgeometry[5].setT(CG.Matrix4.multiply(CG.Matrix4.multiply(CG.Matrix4.rotateX(90*(-Math.PI/180)),CG.Matrix4.translate(new CG.Vector3(50,0,-50))),CG.Matrix4.rotateZ((Math.radians(ygrados)))));\n\n\t\t\t\t\tgeometry[7].setT(CG.Matrix4.multiply(CG.Matrix4.multiply(CG.Matrix4.rotateX(90*(-Math.PI/180)),CG.Matrix4.translate(new CG.Vector3(80,40,-50))),CG.Matrix4.rotateZ((Math.radians(ygrados)))));\n\n\t\t\t\t\tgeometry[8].setT(CG.Matrix4.multiply(CG.Matrix4.multiply(CG.Matrix4.rotateX(90*(-Math.PI/180)),CG.Matrix4.translate(new CG.Vector3(30,20,50))),CG.Matrix4.rotateZ((Math.radians(ygrados)))));\n\n\t\t\t\t\tgeometry[9].setT(CG.Matrix4.multiply(CG.Matrix4.multiply(CG.Matrix4.rotateX(90*(-Math.PI/180)),CG.Matrix4.translate(new CG.Vector3(50,-80,20))),CG.Matrix4.rotateZ((Math.radians(ygrados)))));\n\n\t\t\t\t\tgeometry[10].setT(CG.Matrix4.multiply(CG.Matrix4.multiply(CG.Matrix4.rotateX(90*(-Math.PI/180)),CG.Matrix4.translate(new CG.Vector3(70,-150,-20))),CG.Matrix4.rotateZ((Math.radians(ygrados)))));\n\n\t\t\t\t\tgeometry[11].setT(CG.Matrix4.multiply(CG.Matrix4.multiply(CG.Matrix4.rotateX(90*(-Math.PI/180)),CG.Matrix4.translate(new CG.Vector3(20,100,-70))),CG.Matrix4.rotateZ((Math.radians(ygrados)))));\n\n\t\t\t\t\tgeometry[12].setT(CG.Matrix4.multiply(CG.Matrix4.multiply(CG.Matrix4.rotateX(90*(-Math.PI/180)),CG.Matrix4.translate(new CG.Vector3(20,10,-50))),CG.Matrix4.rotateZ((Math.radians(ygrados)))));\n\n\n\t\t\t\t\tgeometry[13].setT(CG.Matrix4.multiply(CG.Matrix4.multiply(CG.Matrix4.rotateX(90*(-Math.PI/180)),CG.Matrix4.translate(new CG.Vector3(80,60,-20))),CG.Matrix4.rotateZ((Math.radians(ygrados)))));\n\n\t\t\t\t}\n\n\n\t\t\t\tdraw();\n\t\t\t\tcounter_time = 0;\n\t\t\t}", "function AnimationStyleMetadata() { }", "function AnimationStyleMetadata() { }", "function Animation(logistics) {\n _classCallCheck(this, Animation);\n\n var time = 0;\n this.startTime = 0;\n this.currentTime = time;\n this.begin = logistics.begin;\n this.loop = logistics.loop;\n this.timeToFinish = logistics.timeToFinish;\n this.propsBegin = logistics.propsBegin;\n this.propsEnd = logistics.propsEnd;\n this.propsCurrent = {};\n this.complete = false;\n\n var propKeys = Object.keys(this.propsBegin);\n for (var i = 0; i < propKeys.length; i++) {\n var key = propKeys[i];\n this.propsCurrent[key] = this.propsBegin[key];\n }\n }", "function main() {\n var N = 22; //Number of animation frames from 0 e.g. N=1 is the same as having two images which swap...\n Conf.augment ? Conf.animate += 1 : Conf.animate -= 1;\n if(Conf.animate === 0 || Conf.animate === N) {\n Conf.augment ? Conf.augment = false : Conf.augment = true;\n }\n }", "keyFrameAnimate(){\n\t\tlet animationRules = '';\n\t\tthis.keyFrameStyle = document.createElement('style');\n\t\tthis.keyFrameStyle.type = 'text/css';\n\n\t\t//create proper keyframe string for style element\n\t\tthis.animationProperties\n\t\t\t.map(obj => this.keyFrameStateFrom(obj))\n\t\t\t.map(styleObj => this.stringify(styleObj))\n\t\t\t.forEach(stringified => animationRules += stringified);\n\n\t\tthis.keyFrameStyle.innerHTML = `@keyframes ${this.animationName} {${animationRules}}`;\n\t\tdocument.getElementsByTagName('head')[0].appendChild(this.keyFrameStyle);\n\n\t\t//cache the time when animation starts\n\t\tthis.element.addEventListener(\"animationstart\", () => this.startTime = (new Date()).getTime());\n\n\t\t//set styles of animation configs\n\t\tObject.assign(this.animationConfig, {'animation-name': this.animationName});\n\t\tthis.appendCssClass(`${this.animationName}_class`, this.animationConfig);\n\n\t\t//If button and range were provided set event handlers(range is pointless without animation-duration)\n\t\tif(this.playPauseButton !== null && !this.isPlayPauseEventAttached){\n\t\t\tthis.isPlayPauseEventAttached = true;\n\t\t\tthis.playPauseButton.addEventListener('click', this.switchRunningState.bind(this));\n\t\t}\n\t\tif(!this.isSeekEventAttached && this.seekRange !== null && this.animationConfig.hasOwnProperty('animation-duration')){\n\t\t\tthis.isSeekEventAttached = true;\n\t\t\tconst duration = +this.animationConfig['animation-duration'].split('s')[0];\n\t\t\tthis.seekRange.setAttribute('min', 0);\n\t\t\tthis.seekRange.setAttribute('max', 100);\n\t\t\tthis.seekRange.addEventListener('mousedown', this.pause.bind(this));\n\t\t\tthis.seekRange.addEventListener('input', this.seek(duration*1000).bind(this));\n\t\t\tthis.seekRange.addEventListener('mouseup', this.run.bind(this));\n\t\t}\n\t}", "function initValues_Step14(){\n valuesStep14 = {\n posistion: {x:37.5, y:-4, z:182},\n scale: {x:4, y:4, z:1},\n quat: {x:1, y:0, z:0,w:1},\n mass: 0,\n frictions: 0.9,\n restitution: 0.8,\n howMany: 2,\n placeObjectPosition: {x:0,y:0,z:7},\n groundMaterial : new THREE.MeshPhongMaterial( { color: 0x09F099, side: THREE.DoubleSide } )\n }\n}", "function Animation(opciones)\n{\n // Most of these opciones are null because the defaults are different depending on the type of animacion.\n let opcionesDefecto = {\n 'type' : 'spinOngoing', // For now there are only supported types are spinOngoing (continuous), spinToStop, spinAndBack, custom.\n 'direction' : 'clockwise', // clockwise or anti-clockwise.\n 'propertyName' : null, // The name of the winning wheel property to be affected by the animacion.\n 'propertyValue' : null, // The value the property is to be set to at the end of the animacion.\n 'duration' : 10, // Duration of the animacion.\n 'yoyo' : false, // If the animacion is to reverse back again i.e. yo-yo.\n 'repeat' : null, // The number of times the animacion is to repeat, -1 will cause it to repeat forever.\n 'easing' : null, // The easing to use for the animacion, default is the best for spin to stop. Use Linear.easeNone for no easing.\n 'stopAngle' : null, // Used for spinning, the angle at which the wheel is to stop.\n 'spins' : null, // Used for spinning, the number of complete 360 degree rotations the wheel is to do.\n 'limpiarElCanvas' : null, // If set to true the canvas1 will be cleared before the wheel is re-drawn, false it will not, null the animacion will abide by the value of this property for the parent wheel object.\n 'callbackFinished' : null, // Function to callback when the animacion has finished.\n 'callbackBefore' : null, // Function to callback before the wheel is drawn each animacion loop.\n 'callbackAfter' : null, // Function to callback after the wheel is drawn each animacion loop.\n 'callbackSound' : null, // Function to callback if a sound should be triggered on change of segment or pin.\n 'soundTrigger' : 'segment' // Sound trigger type. Default is segment which triggers when segment changes, can be pin if to trigger when pin passes the pointer.\n };\n\n // Now loop through the default opciones and create properties of this class set to the value for\n // the option passed in if a value was, or if not then set the value of the default.\n for (let llave in opcionesDefecto) {\n if ((opciones != null) && (typeof(opciones[llave]) !== 'undefined')) {\n this[llave] = opciones[llave];\n } else {\n this[llave] = opcionesDefecto[llave];\n }\n }\n\n // Also loop though the passed in opciones and add anything specified not part of the class in to it as a property.\n if (opciones != null) {\n for (let llave in opciones) {\n if (typeof(this[llave]) === 'undefined') {\n this[llave] = opciones[llave];\n }\n }\n }\n}", "init() {\n this.docElementNS = document.createElementNS(this.xmlns, 'animate');\n if (this.attributeName) {\n this.docElementNS.setAttribute('attributeName', this.attributeName);\n }\n if (this.attributeType) {\n this.docElementNS.setAttribute('attributeType', this.attributeType);\n }\n if (this.from) {\n this.docElementNS.setAttribute('from', this.from);\n }\n if (this.to) {\n this.docElementNS.setAttribute('to', this.to);\n }\n if (this.dur) {\n this.docElementNS.setAttribute('dur', this.dur);\n }\n if (this.values) {\n this.docElementNS.setAttribute('values', this.values);\n }\n if (this.repeatCount) {\n this.docElementNS.setAttribute('repeatCount', this.repeatCount);\n }\n if (this.autoBind) {\n this.bind();\n }\n }", "function Animation (){\n var animation = anime.timeline();\n \n animation.add({\n targets:'.animation',\n height:['100%',0],\n easing:'easeInOutCirc',\n delay:1000,\n duration:1000\n }).add({\n targets:'.animation h1',\n scale:[1.4, 1],\n duration:1000,\n easing :'easeOutExpo'\n },80);\n\n \n }", "InitAnims() {\n this.scene.anims.create({\n key: 'idle',\n frames: this.scene.anims.generateFrameNumbers('player_idle', { start: 0, end: 5 }),\n frameRate: 8,\n repeat: -1\n });\n this.scene.anims.create({\n key: 'run',\n frames: this.scene.anims.generateFrameNumbers('player_run', { start: 0, end: 39 }),\n frameRate: 60,\n repeat: -1\n });\n this.scene.anims.create({\n key: 'jump',\n frames: [{ key: 'player_jump', frame: 0 }],\n frameRate: 24\n });\n this.scene.anims.create({\n key: 'attack',\n frames: this.scene.anims.generateFrameNumbers('player_attack', { start: 0, end: 7 }),\n frameRate: 24,\n showOnStart: true,\n hideOnComplete: true\n });\n this.scene.anims.create({\n key: 'death',\n frames: this.scene.anims.generateFrameNumbers('player_death', { start: 0, end: 7 }),\n frameRate: 4,\n showOnStart: true,\n hideOnComplete: false\n });\n }", "preload() {\n this.anims.create({\n key: \"idle\", \n frameRate: 10, \n repeat: -1,\n frames: this.anims.generateFrameNumbers(\"IDLE\", {\n frames: [0,1]\n })\n });\n\n this.anims.create({\n key: \"idleLeft\", \n frameRate: 5, \n repeat: -1,\n frames: this.anims.generateFrameNumbers(\"IDLE\", {\n frames: [1,0]\n })\n });\n\n this.anims.create({\n key: \"runRight\", \n frameRate: 7, \n repeat: -1,\n frames: this.anims.generateFrameNumbers(\"IDLE\", {\n //frames: [2,3,4,5,6,7]\n frames: [0,1]\n })\n });\n \n this.anims.create({\n key: \"runLeft\", \n frameRate: 7, \n repeat: -1,\n frames: this.anims.generateFrameNumbers(\"RUN\", {\n frames: [7,6,5,4,3,2]\n })\n });\n\n this.anims.create({\n key: \"slash\", \n frameRate: 60, \n repeat: -1,\n frames: this.anims.generateFrameNumbers(\"SLASH\", {\n frames: [0,1,2,3,4,5,6,7,8]\n })\n });\n \n this.load.image(\"ground\", \"./assets/ground.png\");\n }", "constructor(p, data, startHrs, startMins, am, width, height, fogTimes) {\n this.p = p;\n this.baseTimeMinutes = timeInMins(startHrs, startMins);\n this.ampm = am;\n this.data = data;\n this.fogTimes = fogTimes;\n\n /**\n * ANIMATION TIME CONSTANTS\n */\n /* Canvas will refresh 60 times a second */\n this.fRate = 60;\n /* A 'minute' in the animation will last 100 frames. */\n this.framesPerMin = 100;\n /** The length of this animation, in minutes. \n * Based on latest departure time of any visitor in the data array.\n * Add 5 to allow time for the latest departure to exit the screen\n * before restarting the animation. */\n this.durationInMins = 5 + getLatestDeparture(data);\n console.log(this.durationInMins);\n\n /**\n * ANIMATION LIFECYCLE STATE\n * Reset at the start of every animation\n */\n this.frameCount = 0;\n\n /**\n * MINUTE-BY-MINUTE STATE\n * Updated every minute for visitors within that minute\n */\n /* Array of objects that have x;N, y;N, and data:VisitorData fields,\n where VisitorData is {type:{r|c|w}, dir{up|down}, arrival:Minute, [departure:Minute]} */\n this.activeVisitors = [];\n // Shallow copy of data that can be mutated\n this.waitingVisitors = this.data.slice();\n /* Number of frames that elapse between each visitor in the current minute */\n this.framesPerVisitor;\n /* Array of VisitorData objects, the visitors that will be added\n to the animation during the current minute */\n this.visitorsInMin = [];\n\n /**\n * DRAWING (size + color) CONSTANTS\n * Known / given constants,\n * and dynamically calculated constants.\n */\n this.myWidth = width; // should be windowWidth when constructed\n this.myHeight = height; // should be 400 when constructed\n this.visitorDotSize = 10; // size of visitor dots in animatino\n // Calculate + set width-dependent drawing constants.\n this.initSizeConstants();\n // Init the color constants.\n this.initColorConstants();\n }", "function setAnimationPoints(){\n var a = vec4(0, 0, 0, 1);\n var b = vec4(-5, -25, 0, 1);\n var c = vec4(5, -25, 0, 1);\n var d = vec4(0, 0, 0, 1);\n var bezier = new Bezier([a, b, c, d]);\n animationPoints = bezier.vertices;\n}", "function animateCommute() {\r\n var transformation1;\r\n var transformation2;\r\n var transformationSelector1 = document.getElementById('TransformationSelector1').value;\r\n var transformationSelector2 = document.getElementById('TransformationSelector2').value;\r\n var frameSize = 20;\r\n var extra = axes.slice();\r\n extra.push(sphere);\r\n\r\n if (transformationSelector1===\"Rotation1\"){\r\n\r\n var rotateAxis = document.getElementById('TransformationRelative1').value\r\n var slider = document.getElementById(\"rotator1\").value;\r\n var start1 = 0;\r\n var end1 = slider * Math.PI;\r\n\r\n if (rotateAxis === \"X\") {\r\n transformation1 = rotationX;\r\n } else if (rotateAxis === \"Y\") {\r\n transformation1 = rotationY;\r\n } else if (rotateAxis === \"Z\") {\r\n transformation1 = rotationZ;\r\n }\r\n }else if (transformationSelector1 ===\"Reflection1\"){\r\n var plane = document.getElementById(\"TransformationRelative1\").value;\r\n var start1 = 1.0;\r\n var end1 = -1.0;\r\n\r\n\r\n if (plane === \"X\") {\r\n transformation1 = scaleX;\r\n extra.push({\r\n x: [0, 0],\r\n y: [-4, 4],\r\n z: [[-4, 4],\r\n [-4, 4]],\r\n colorscale: [[0.0, \"#608bbf\"], [1.0, \"#ffffff\"]],\r\n opacity: 0.5,\r\n showscale: false,\r\n type: \"surface\"\r\n })\r\n } else if (plane === \"Y\") {\r\n transformation1 = scaleY;\r\n extra.push({\r\n x: [-4, 4],\r\n y: [0, 0],\r\n z: [[-4, -4],\r\n [4, 4]],\r\n colorscale: [[0.0, \"#f7fcfb\"], [1.0, \"#f7fcfb\"]],\r\n opacity: 0.5,\r\n showscale: false,\r\n type: \"surface\"\r\n })\r\n } else if (plane === \"Z\") {\r\n transformation1 = scaleZ;\r\n extra.push({\r\n x: [-4, 4],\r\n y: [-4, 4],\r\n z: [[0, 0],\r\n [0, 0]],\r\n colorscale: [[0.0, \"#608bbf\"], [1.0, \"#ffffff\"]],\r\n opacity: 0.5,\r\n showscale: false,\r\n type: \"surface\"\r\n })\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n if (transformationSelector2 ===\"Rotation2\"){\r\n\r\n var rotateAxis = document.getElementById('TransformationRelative2').value\r\n var slider = document.getElementById(\"rotator2\").value;\r\n var start2 = 0;\r\n var end2 = slider * Math.PI;\r\n\r\n if (rotateAxis === \"X\") {\r\n transformation2 = rotationX;\r\n } else if (rotateAxis === \"Y\") {\r\n transformation2 = rotationY;\r\n } else if (rotateAxis === \"Z\") {\r\n transformation2 = rotationZ;\r\n }\r\n }else if (transformationSelector2 ===\"Reflection2\"){\r\n var plane = document.getElementById('TransformationRelative2').value;\r\n var start2 = 1.0;\r\n var end2 = -1.0;\r\n\r\n\r\n if (plane === \"X\") {\r\n transformation2 = scaleX;\r\n extra.push({\r\n x: [0, 0],\r\n y: [-4, 4],\r\n z: [[-4, 4],\r\n [-4, 4]],\r\n colorscale: [[0.0, \"#608bbf\"], [1.0, \"#ffffff\"]],\r\n opacity: 0.5,\r\n showscale: false,\r\n type: \"surface\"\r\n })\r\n } else if (plane === \"Y\") {\r\n transformation2 = scaleY;\r\n extra.push({\r\n x: [-4, 4],\r\n y: [0, 0],\r\n z: [[-4, -4],\r\n [4, 4]],\r\n colorscale: [[0.0, \"#608bbf\"], [1.0, \"#ffffff\"]],\r\n opacity: 0.5,\r\n showscale: false,\r\n type: \"surface\"\r\n })\r\n } else if (plane === \"Z\") {\r\n transformation2 = scaleZ;\r\n extra.push({\r\n x: [-4, 4],\r\n y: [-4, 4],\r\n z: [[0, 0],\r\n [0, 0]],\r\n colorscale: [[0.0, \"#608bbf\"], [1.0, \"#ffffff\"]],\r\n opacity: 0.5,\r\n showscale: false,\r\n type: \"surface\"\r\n })\r\n }\r\n\r\n\r\n }\r\n var frames = computeCommute(transformation1, transformation2,start1, end1, start2, end2,frameSize)\r\n\r\n enableUndoReset();\r\n\r\n initAnimation(\"commuteAnimate\", frames, extra, layout);\r\n startAnimation();\r\n return frames;\r\n\r\n}", "function AnimationKeyframesSequenceMetadata() { }", "function AnimationKeyframesSequenceMetadata() { }", "getAnimationBoxes() {\n let sel = this.animation_display.selection;\n let ori = this.animation_display.sprite_origin;\n\n let f = {\n x: sel.x,\n y: sel.y,\n width: sel.w,\n height: sel.h,\n offset_x: ori.x,\n offset_y: ori.y\n };\n\n this.working_model.frames[this.current_frame] = f;\n }", "function Legato_Animation_Controller()\r\n{\r\n\r\n\t// Store the default values.\r\n\tthis.move = { to: new Legato_Structure_Point(),\r\n\t by: new Legato_Structure_Point(),\r\n\t\t\t\t\t\t\t ease: Legato_Animation.EASE_NONE };\r\n\r\n\tthis.width = { to: null,\r\n\t by: null,\r\n\t\t\t\t\t\t\t ease: Legato_Animation.EASE_NONE };\r\n\r\n\tthis.height = { to: null,\r\n\t by: null,\r\n\t\t\t\t\t\t\t ease: Legato_Animation.EASE_NONE };\r\n\r\n\tthis.opacity = { to: null,\r\n\t by: null,\r\n\t\t\t\t\t\t\t ease: Legato_Animation.EASE_NONE };\r\n\r\n\tthis.background_color = { to: new Legato_Structure_Color(),\r\n\t by: new Legato_Structure_Color() };\r\n\r\n\tthis.border_color = { to: new Legato_Structure_Color(),\r\n\t by: new Legato_Structure_Color() };\r\n\r\n\tthis.text_color = { to: new Legato_Structure_Color(),\r\n\t by: new Legato_Structure_Color() };\r\n\r\n\tthis.delay = 0;\r\n\r\n}", "set animatePhysics(value) {}", "function getAnimation2() {\n var element = $('.bulp2');\n //bezier magic provided by GSAP BezierPlugin (included with TweenMax)\n //https://api.greensock.com/js/com/greensock/plugins/BezierPlugin.html\n \n //create a semi-random tween \n var bezTween = new TweenMax(element, 6, {\n bezier:{\n type:\"soft\", \n //values:[{x:-200, y:300}, {x:300, y:30}, {x:500 + Math.random() *100, y:320*Math.random() + 50}, {x:650, y:320*Math.random() + 50}, {x:900, y:50}, {x:1100, y:50}, {x:1200, y:50}, {x:1400, y:50}, {x:1600, y:50}, {x:1900, y:50}],\n values:[{x:-430, y:0}, {x:0, y:50}, {x:100, y:70}, {x:500, y:70}, {x:650, y: 80}, {x:900, y:80}, {x:1100, y:90}, {x:1200, y:90}, {x:1400, y:90}, {x:1600, y:90}, {x:1900, y:90}],\n autoRotate:false\n },\n ease:Linear.easeNone});\n return bezTween;\n}", "function createFxNow() {\n window.setTimeout(function () {\n fxNow = undefined;\n });\n return fxNow = jQuery.now();\n } // Generate parameters to create a standard animation", "function setup() {\n createCanvas(windowWidth, windowHeight);\n\n w = 1600;\n dx = (TWO_PI / period) * xspacing;\n\n\n\n // var step = 0.4;\n}", "function drawDemo(t,duration) {\n push();\n translate(3*width/4,height/2);\n strokeWeight(1);\n let p = t/(duration);\n let g = (1-p)*100;\n stroke(40);\n // the first point of generation n and n-1\n let v1 = points3[0].copy();\n circle(v1.x,cy(v1.y),2)\n let v2 = points4[0].copy();\n circle(v2.x,cy(v2.y),2)\n line(v1.x,cy(v1.y),v2.x,cy(v2.y)); // line gen n to gen n-1 for the first point\n drawarrow(v1,v2);\n // the first point of the moving line\n v1.mult(p).add(v2.mult(1-p));\n stroke(255);\n circle(v1.x,cy(v1.y),2) // first point of the moving line\n for (let i=1;i<points3.length;i++) {\n // the 2 generations\n stroke(40)\n let v11 = points3[i-1]; \n let v12 = points3[i];\n line(v11.x,cy(v11.y),v12.x,cy(v12.y)) // line generation n-1\n circle(v12.x,cy(v12.y),2)\n let v21 = points4[i-1]\n let v22 = points4[i]\n line(v21.x,cy(v21.y),v22.x,cy(v22.y)) // line generation n\n circle(v22.x,cy(v22.y),2)\n line(v12.x,cy(v12.y),v22.x,cy(v22.y)); // line gen n to gen n-1\n drawarrow(v12,v22);\n // the line in between\n v1 = p5.Vector.add(v11.copy().mult(p),v21.copy().mult(1-p));\n v2 = p5.Vector.add(v12.copy().mult(p),v22.copy().mult(1-p));\n stroke(255);\n line(v1.x,cy(v1.y),v2.x,cy(v2.y)); // the moving line\n circle(v2.x,cy(v2.y),2)\n }\n pop();\n}", "function animate() { \n console.log('animate')\n \n gsap.registerEffect({\n name: \"fadeIn\",\n effect: (targets, config) => {\n var tlEffect = gsap.timeline();\n tlEffect.from(targets, {duration: config.duration, y:config.y, force3D:true, rotation: 0.01, stagger:config.stagger, ease:\"power2\"})\n .from(targets, {duration: config.duration, stagger:config.stagger, alpha:0, ease:\"none\"}, \"<\")\n return tlEffect;\n },\n defaults: {duration: 1.5, y:\"-=7\", stagger:4.5},\n extendTimeline: true,\n });\n \n gsap.to(plantWraps, {duration:25, rotation:\"+=20\", ease:\"none\"})\n gsap.to(flowerWraps, {duration:25, rotation:\"+=100\", ease:\"none\"})\n \n var imageDivs = selectAll('.imageDiv');\n // logoIntro = false;\n\n\t\t\ttl\n .to(bannerCover, {duration:0.7, alpha:0, ease:\"none\"})\n \n .from(plants, {duration:3, drawSVG:\"50% 50%\", ease:\"sine.inOut\"}, \"<\")\n .from(flowers, {duration:2, alpha:0, ease:\"none\"}, \"<\")\n \n if(logoIntro) {\n tl\n .from(letter_w, {duration:0.5, drawSVG: 0, ease:\"sine.in\"}, \"<\")\n .from(letter_y, {duration:0.3, drawSVG: 0, ease:\"sine.in\"}, \">\")\n .from(letter_nn, {duration:0.8, drawSVG: 0, ease:\"sine.inOut\"}, \">\")\n .from(lasvegas, {duration:0.7, y:\"-=10\", alpha: 0, ease:\"sine\"}, \">\")\n .from(sign_r, {duration:0.5, alpha: 0, ease:\"none\"}, \"<\")\n\n .to(logo, {duration:0.7, alpha:0, ease:\"none\"}, \">1\")\n .set(logo, {scale: 0.37, y:99, x:-60}, \">\")\n } else {\n tl\n .set(logo, {scale: 0.37, alpha:0,y:99, x:-60}, \"<\")\n }\n \n tl\n .from(imageDivs, {duration:1.3, stagger:4, alpha:0, blur:10, force3D:true, rotation: 0.01, ease:\"none\"}, \"<\")\n \n .fadeIn(text_head, \"<0.4\")\n .fadeIn(text_subHead,{y:\"0\", duration: 1,},\"<0.6\")\n .to(logo, {duration:1, alpha:1, ease:\"none\"}, \"<0.4\")\n .from(cta, {duration:0.8, alpha: 0, ease:\"none\"}, \"<\")\n .from(cta, {duration:1.6, rotateX:90, ease:\"power2\"}, \"<\") \n\t\t}", "function ChartAnimation(time) {\r\n\r\n //normikuvaajat\r\n for (var id in chartOptions) {\r\n if (chartOptions[id] != null) {;\r\n chartOptions[id].animation.duration = time;\r\n }\r\n\r\n }\r\n\r\n var tmpID;\r\n\r\n //googlen dashboardissa olevat kuvaajat\r\n for (var elo = 0; elo < 3; elo++) {\r\n for (var arranged = 0; arranged <= 1; arranged++) {\r\n for (var gameMode = 1; gameMode <= 4; gameMode++) {\r\n if (arranged == 1 && gameMode == 1) {\r\n continue;\r\n }\r\n tmpID = 'winRatioDaily' + 'M' + gameMode + 'E' + ELOdb[elo] + 'A' + arranged;\r\n chartChart[tmpID + \"_main\"].setOption('animation.duration', time);\r\n tmpID = 'gamesPlayedDaily' + 'M' + gameMode + 'E' + ELOdb[elo] + 'A' + arranged;\r\n chartChart[tmpID + \"_main\"].setOption('animation.duration', time);\r\n }\r\n }\r\n }\r\n\r\n for (var elo = 0; elo < 3; elo++) {\r\n for (var arranged = 0; arranged <= 1; arranged++) {\r\n tmpID = 'gamesPlayedDailyAll' + 'E' + ELOdb[elo] + 'A' + arranged;\r\n chartChart[tmpID + \"_main\"].setOption('animation.duration', time);\r\n }\r\n }\r\n\r\n\r\n}", "function Animator (args) {\n\t\targs = args || {};\n\n\t \tthis.easing = args.easing || function (t) { return t }; // default to linear easing\n\t \tthis.start_pos = args.start || 0;\n\t \tthis.end_pos = args.end || 1;\n\t \tthis.ratio = args.ratio || 0.25; // ratio to total animation --> normalize to 1\n\t \tthis.msec = args.msec || 1000; // default to 1000msec --> 1s\n\t \tthis.order = args.order || 0;\n\n\t \t// Called Flag\n\t \tthis.started = false;\n\n\t \t// Value to be returned\n\t \tthis.value = this.start_pos;\n\n\t \t// Global (local) reference to 'this'\n\t \tvar _this = this;\n\n\t\t// performance.now is guaranteed to increase and gives sub-millisecond resolution\n\t\t// Date.now is susceptible to system clock changes and gives some number of milliseconds resolution\n\t\t_this.start = window.performance.now(); \n\t\tvar delta = _this.end_pos - _this.start_pos; // displacement\n\n\t\tfunction frame() {\n\t\t\tvar now = window.performance.now();\n\t\t\tvar t = (now - _this.start) / _this.msec; // normalize to 0..1\n\n\t\t\tif (t >= 1) { // if animation complete or running over\n\t\t\t\t_this.value = _this.end_pos; // ensure the animation terminates in the specified state\n\t\t\t \treturn;\n\t\t\t}\n\n\t\t\tvar proportion = _this.easing(t); // Call upon the strange magic of your timing function\n\t\t\t\n\t\t\t// delta is our multiplier | this decides our current position relative to starting position\n\t\t\t// update your animation based on this value\n\t\t\t// trig functions are naturally really excited about this,\n\t\t\t// Can I make the whole thing less imperitive? --> Stateless?\n\n\t\t\t_this.value = _this.start_pos + proportion * delta; \t\n\t\t\trequestAnimationFrame(frame); // next frame!\n\t\t}\n\n\t\tthis.animate = function() {\n\t\t\t_this.started = true;\n\t\t\t_this.start = window.performance.now();\n\t\t\trequestAnimationFrame(frame); // you can use setInterval, but this will give a smoother animation --> Call it the first time and it loops forever until return\n\t\t}\n\t}", "function generateBottom480(){\r\n\tvar p1 = COLOR([0,0,0])(STRUCT([T([0,1,2])([-0.19,trainWidth+0.1,-trainHeight]),R([0,1])(-PI/2),\r\n\t\tCUBOID([trainWidth+0.15,trainLength+0.18])]));\r\n\tvar p2 = function(){\r\n\t\tvar adjust = 0.85;\r\n\t\tvar adjustBase = 0.25;\r\n\t\tvar c1 = BEZIER(S0)([[-adjustBase+0.2,trainHeight,-etr450adjust-0.3],[-adjustBase,trainHeight,-0.2],\r\n\t\t\t[trainWidth/2,trainHeight,1.8],[trainWidth+adjustBase,trainHeight,-0.2],\r\n\t\t\t[trainWidth+adjustBase-0.2,trainHeight,-etr450adjust-0.3]]);\r\n\r\n\t\tvar c2 = BEZIER(S0)([[-adjustBase+0.2,trainHeight,-etr450adjust-0.3-1],[-adjustBase,trainHeight+0.5,-0.2-0.5],\r\n\t\t\t[trainWidth/2,trainHeight+1,0.8],[trainWidth+adjustBase,trainHeight+0.5,-0.2-0.5],\r\n\t\t\t[trainWidth+adjustBase-0.2,trainHeight,-etr450adjust-0.3-1]]);\r\n\r\n\t\tvar c3 = BEZIER(S0)([[-adjustBase+0.2,trainHeight,-etr450adjust-0.3-1],[-adjustBase,trainHeight+0.5,-0.2-0.5],\r\n\t\t\t[trainWidth/2,trainHeight+1,2.5],[trainWidth+adjustBase,trainHeight+0.5,-0.2-0.5],\r\n\t\t\t[trainWidth+adjustBase-0.2,trainHeight,-etr450adjust-0.3-1]]);\r\n\r\n\t\tvar out = MAP(BEZIER(S1)([c1,c2,c3]))(dom2D);\r\n\r\n\t\treturn COLOR([0.5,0.5,0.5])(STRUCT([T([0,1,2])([-2.2,trainWidth,-trainHeight*2]),R([0,1])(-PI/2),R([1,2])(PI/2),out]));\r\n\r\n\t};\r\n\treturn STRUCT([p1,p2()]);\r\n}", "function constantGenerator (options) {\n var o = options || {};\n return function (i) {\n return {\n i : i,\n x : i / o.fps,\n y : options.value,\n length : o.length\n }\n }\n}", "constructor(x, color, translationRate) {\n // Position properties\n this.x = x;\n this.y = 0;\n // Display properties\n this.color = color;\n this.width = 500;\n this.height = 600;\n // Moving properties\n this.translationRate = translationRate;\n this.ninthFrameX = 4500; // offsetTargetX + timeFrameInterval * 9\n this.resetX = -500;\n }", "function keyframes(data, name, propertyValue,custom){\n \t // photo-click=>kf-namees-10p20p30p-bg-lg-blue-red---tf-r10deg--s2__40p50p80p-bgc-green atfeio ada aici adu1s\n//keyframe-name- already extracted\n//[from|to|20p]-classname--classname--classname__[to|20p]-classname--classname__[to|100p]\nlet statement=\"@keyframes \"+ name +\"{\\n\";\n let splits=data.split('__');\n splits.forEach(each=>{\n \tlet result=at(each,propertyValue,custom);\n \tif(result!==false) statement+='\\t'+result;\n });\n\n return statement+\"}\";\n}" ]
[ "0.6477499", "0.6449747", "0.6239411", "0.62102515", "0.62051743", "0.6019592", "0.599829", "0.594838", "0.5940393", "0.5940393", "0.5912163", "0.5873654", "0.5832134", "0.5828958", "0.58236474", "0.5820797", "0.5813001", "0.579854", "0.57910967", "0.57835335", "0.5780475", "0.5744776", "0.5744776", "0.5743037", "0.5725314", "0.57187176", "0.56824344", "0.5681388", "0.5681388", "0.5678651", "0.56618774", "0.5647999", "0.56424373", "0.56417084", "0.56417084", "0.5630118", "0.5630118", "0.5620743", "0.5609721", "0.56021315", "0.56021315", "0.56001645", "0.5594966", "0.55772984", "0.55669963", "0.55653876", "0.55635995", "0.55631703", "0.5558751", "0.5555574", "0.5549875", "0.5546244", "0.55430067", "0.5541023", "0.5540799", "0.55329746", "0.55329746", "0.5527512", "0.5519762", "0.55152524", "0.5485498", "0.54539764", "0.54531014", "0.5447024", "0.5445377", "0.54426", "0.54318804", "0.54289997", "0.5421807", "0.54158115", "0.54125386", "0.5410965", "0.5410965", "0.5398738", "0.5396087", "0.5393311", "0.53917104", "0.53820693", "0.53762", "0.5373947", "0.53671485", "0.53658193", "0.53646094", "0.53609955", "0.5353784", "0.53529763", "0.53529763", "0.5352467", "0.53397745", "0.53333664", "0.5332917", "0.53294826", "0.5324581", "0.53198284", "0.53193164", "0.53152305", "0.5314615", "0.53096515", "0.5307977", "0.53036606", "0.5299143" ]
0.0
-1
Strip and collapse whitespace according to HTML spec
function stripAndCollapse( value ) { var tokens = value.match( rnothtmlwhite ) || []; return tokens.join( " " ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stripAndCollapse(value){var tokens=value.match(rnothtmlwhite)||[];return tokens.join(\" \");}", "function stripAndCollapse(value){var tokens=value.match(rnothtmlwhite)||[];return tokens.join(\" \");}", "function stripAndCollapse(value){var tokens=value.match(rnothtmlwhite)||[];return tokens.join(\" \");}", "function stripAndCollapse( value ) {\n var tokens = value.match( rnothtmlwhite ) || [];\n return tokens.join( \" \" );\n }", "function stripAndCollapse( value ) {\n\t\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\t\treturn tokens.join( \" \" );\n\t\t\t}", "function stripAndCollapse( value ) {\n var tokens = value.match( rnothtmlwhite ) || [];\n return tokens.join( \" \" );\n }", "function stripAndCollapse( value ) {\r\n\t\tvar tokens = value.match( rnothtmlwhite ) || [];\r\n\t\treturn tokens.join( \" \" );\r\n\t}", "function stripAndCollapse( value ) {\n \t\tvar tokens = value.match( rnothtmlwhite ) || [];\n \t\treturn tokens.join( \" \" );\n \t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse( value ) {\n\t\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\t\treturn tokens.join( \" \" );\n\t\t}", "function stripAndCollapse(value) {\n var tokens = value.match(rnothtmlwhite) || [];\n return tokens.join(\" \");\n }", "function stripAndCollapse(value) {\n var tokens = value.match(rnothtmlwhite) || [];\n return tokens.join(\" \");\n }", "function stripAndCollapse(value) {\n var tokens = value.match(rnothtmlwhite) || [];\n return tokens.join(\" \");\n }", "function stripAndCollapse(value) {\n var tokens = value.match(rnothtmlwhite) || [];\n return tokens.join(\" \");\n }", "function stripAndCollapse(value) {\n var tokens = value.match(rnothtmlwhite) || [];\n return tokens.join(\" \");\n }", "function stripAndCollapse(value) {\n var tokens = value.match(rnothtmlwhite) || [];\n return tokens.join(\" \");\n }", "function stripAndCollapse(value) {\n var tokens = value.match(rnothtmlwhite) || [];\n return tokens.join(\" \");\n }", "function stripAndCollapse(value) {\n var tokens = value.match(rnothtmlwhite) || [];\n return tokens.join(\" \");\n }" ]
[ "0.7922654", "0.7922654", "0.7922654", "0.76792663", "0.7598382", "0.75876707", "0.75836885", "0.75606817", "0.75550926", "0.75550926", "0.75550926", "0.75550926", "0.75550926", "0.75550926", "0.75550926", "0.75550926", "0.75550926", "0.75550926", "0.75550926", "0.75550926", "0.75550926", "0.75550926", "0.75550926", "0.75550926", "0.75550926", "0.75550926", "0.75537425", "0.75537425", "0.75537425", "0.75537425", "0.75537425", "0.75537425", "0.75537425", "0.75537425" ]
0.0
-1
Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
function addToPrefiltersOrTransports( structure ) { // dataTypeExpression is optional and defaults to "*" return function( dataTypeExpression, func ) { if ( typeof dataTypeExpression !== "string" ) { func = dataTypeExpression; dataTypeExpression = "*"; } var dataType, i = 0, dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; if ( jQuery.isFunction( func ) ) { // For each dataType in the dataTypeExpression while ( ( dataType = dataTypes[ i++ ] ) ) { // Prepend if requested if ( dataType[ 0 ] === "+" ) { dataType = dataType.slice( 1 ) || "*"; ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); // Otherwise append } else { ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); } } } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() {\n this.config = Config.ajax;\n this.xhr;\n this.Serialize;\n }", "function AjaxPipelineConstructor() {\r\n BaseObject.call(this,arguments);\r\n }", "function Ajax(__constructor) {\r\n if (Params.env.isFirefox) return GM_xmlhttpRequest(__constructor);\r\n else return new XHR(__constructor);\r\n}", "function ajax_legacy() {\n /* + when */\n jQuery.ajax\n (\n jQuery.extend\n (\n true , {} ,\n settings.ajax ,\n callbacks ,\n {\n url : url ,\n beforeSend : function () {\n XMLHttpRequest = arguments[ 0 ] ;\n \n XMLHttpRequest.setRequestHeader( settings.nss.requestHeader , 'true' ) ;\n XMLHttpRequest.setRequestHeader( settings.nss.requestHeader + '-Area' , settings.area ) ;\n XMLHttpRequest.setRequestHeader( settings.nss.requestHeader + '-CSS' , settings.load.css ) ;\n XMLHttpRequest.setRequestHeader( settings.nss.requestHeader + '-Script' , settings.load.script ) ;\n \n fire( settings.callbacks.ajax.beforeSend , context , [ event , settings.parameter , XMLHttpRequest ] , settings.callbacks.async ) ;\n } ,\n success : function () {\n data = arguments[ 0 ] ;\n dataType = arguments[ 1 ] ;\n XMLHttpRequest = arguments[ 2 ] ;\n \n fire( settings.callbacks.ajax.success , context , [ event , settings.parameter , data , dataType , XMLHttpRequest ] , settings.callbacks.async ) ;\n \n update() ;\n } ,\n error : function () {\n XMLHttpRequest = arguments[ 0 ] ;\n textStatus = arguments[ 1 ] ;\n errorThrown = arguments[ 2 ] ;\n \n /* validate */ var validate = plugin_data[ settings.id ] && plugin_data[ settings.id ].validate ? plugin_data[ settings.id ].validate.clone( { name : 'jquery.pjax.js - drive()' } ) : validate ;\n /* validate */ validate && validate.start() ;\n /* validate */ validate && validate.test( '++', 1, [ url, win.location.href ], 'ajax_legacy()' ) ;\n /* validate */ validate && validate.test( '++', 1, [ XMLHttpRequest, textStatus, errorThrown ], 'ajax error' ) ;\n fire( settings.callbacks.ajax.error , context , [ event , settings.parameter , XMLHttpRequest , textStatus , errorThrown ] , settings.callbacks.async ) ;\n if ( settings.fallback ) { return typeof settings.fallback === 'function' ? settings.fallback( event ) : fallback( event , validate ) ; } ;\n /* validate */ validate && validate.end() ;\n }\n }\n )\n )\n /* - when */\n }", "function getCorsAjaxTransport() {\n var xhrOrXdr;\n\n if (window.XMLHttpRequest || window.ActiveXObject) {\n xhrOrXdr = qq.createXhrInstance();\n\n if (xhrOrXdr.withCredentials === undefined) {\n xhrOrXdr = new XDomainRequest();\n // Workaround for XDR bug in IE9 - https://social.msdn.microsoft.com/Forums/ie/en-US/30ef3add-767c-4436-b8a9-f1ca19b4812e/ie9-rtm-xdomainrequest-issued-requests-may-abort-if-all-event-handlers-not-specified?forum=iewebdevelopment\n xhrOrXdr.onload = function() {};\n xhrOrXdr.onerror = function() {};\n xhrOrXdr.ontimeout = function() {};\n xhrOrXdr.onprogress = function() {};\n }\n }\n\n return xhrOrXdr;\n }", "_initXhr() {\n this._xhr = new XMLHttpRequest();\n this._xhr.upload.onprogress = this._onProgress.bind(this);\n this._xhr.onreadystatechange = this._onReadyStateChange.bind(this);\n this._xhr.open(this.method, this.getUrl(), true);\n\n try {\n this._xhr.withCredentials = true;\n } catch (e) {}\n\n // Set headers\n let headers = {};\n if (BrowserHelper.isWebkit() || BrowserHelper.isTrident()) {\n headers = {\n ...headers,\n 'If-None-Match': '*',\n 'If-Modified-Since': 'Mon, 26 Jul 1997 05:00:00 GMT',\n 'Cache-Control': 'no-cache',\n 'X-Requested-With': 'XMLHttpRequest'\n };\n }\n headers = {...headers, ...this.headers};\n Object.keys(headers).forEach(key => {\n this._xhr.setRequestHeader(key, headers[key]);\n });\n }", "useAjax( ajax ) {\n this._ajax = ajax;\n }", "useAjax( ajax ) {\n this._ajax = ajax;\n }", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions || {};for(key in src) {if(src[key] !== undefined){(flatOptions[key]?target:deep || (deep = {}))[key] = src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var deep,key,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var deep,key,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function WrappedXMLHttpRequest() {\n this._inner = Cc[\"@mozilla.org/xmlextras/xmlhttprequest;1\"].createInstance();\n}", "function $Ajax(uri, fHandler, method) {\r\n\t\tthis.uri = uri || \"\";\r\n\t\tthis.fHandler = fHandler || null;\r\n\t\tthis.method = method || \"GET\";\r\n\t\tthis.xmlHttp = false;\r\n\t\ttry { this.xmlHttp = new XMLHttpRequest(); } catch(e) {}\r\n\t\tif (!this.xmlHttp) try { this.xmlHttp = new ActiveXObject(\"Msxml2.XMLHTTP\"); } catch(e) {}\r\n\t\tif (!this.xmlHttp) try { this.xmlHttp = new ActiveXObject(\"Microsoft.XMLHTTP\"); } catch(e) {}\r\n\t\tif (!this.xmlHttp) try { this.xmlHttp = new ActiveXObject(\"Msxml2.XMLHTTP.4.0\"); } catch(e) {}\r\n\t}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}}", "function ajaxWithCookieFactory() {\n var jar = request.jar();\n\n return {\n\n addCookie: function(data) {\n jar.add(request.cookie(data));\n },\n\n getCookie: function(name) {\n var i, cookie;\n for (i = 0; i < jar.cookies.length; i += 1) {\n cookie = jar.cookies[i];\n if (cookie.name.localeCompare(name) === 0) {\n return cookie.value;\n }\n }\n },\n\n go: function(jqParams) {\n var options = {};\n if (typeof jqParams === 'string') {\n options.url = jqParams;\n } else {\n options.url = jqParams.url;\n options.method = jqParams.type; \n options.headers = jqParams.headers; \n options[(\"POST\".localeCompare(jqParams.type) === 0) ?\n \"form\" : \"qs\"] = jqParams.data;\n }\n options.jar = jar;\n \n var deferred = $.Deferred();\n request(options, function (error, response, body) {\n response.status = response.statusCode;\n if (!error && response.statusCode == 200) {\n if (\"json\".localeCompare(jqParams.dataType) === 0) {\n body = JSON.parse(body);\n }\n deferred.resolve(body, \"success\", response);\n } else {\n response.responseText = body;\n deferred.reject(response, error);\n }\n });\n return deferred.promise();\n }\n }\n}", "constructor(serverBase: String, idPrefix: String) {\n this.serverBase = serverBase;\n this.idPrefix = idPrefix;\n this.listeners = new Map();\n this.items = new Map();\n this.itemList = undefined;\n\n // Hmm, odd.\n window.$.ajaxSetup({\n scriptCharset: \"utf-8\",\n contentType: \"application/json; charset=utf-8\"\n });\n }", "function NetworkResponseInterceptor() {\n this._originalAjax = $.ajax;\n this._successInterceptors = [];\n this._errorInterceptors = [];\n this._urlPatterns = [];\n}", "function createAJAXObject(ajax) {\n //We want optionPromise to resolve asynchronously so we can use results from other promises in it\n var optionPromise = Promise.resolve({});\n return {\n get: function () { return ajax('get', optionPromise) },\n post: function () { return ajax('post', optionPromise) },\n put: function () { return ajax('put', optionPromise) },\n delete: function () { return ajax('delete', optionPromise) },\n head: function () { return ajax('head', optionPromise) },\n /* options is an object containing optionally the parameters:\n * - headers: (object) the headers to pass along with the request\n * - timeout: (number) the milliseconds following which to cancel the request\n */\n setOptions: function (o) {\n for (var key in o) {\n optionPromise.then(function (options) {\n options[key] = o[key];\n });\n }\n return this;\n },\n setOptionPromise: function (promise) {\n optionPromise = promise;\n return this;\n }\n }\n }", "function createJQueryRestAdapter (){\n // use jQuery to contact the Jive server\n\n var ajaxPath = \"\"; // value replaced when template is rendered\n var osapi = $r(\"osapi\");\n\n var dataFilter = function(data, type) {\n return (type === 'json' && data) ? jQuery.trim(data.replace(/^throw [^;]*;/, '')) : data;\n };\n\n /**\n * @param options.method {String} one of \"GET\", \"PUT\", \"POST\" or \"DELETE\"\n * @param options.endpoint {String} the short REST path, e.g.: \"users/1234?\"\n * @param options.queryParams {Object} map of query params to their values\n * @param options.body {String} body content to send with PUT or POST\n * @constructor\n */\n osapi.Request = function(options) {\n this.options = {\n method: options.method,\n endpoint: options.endpoint,\n ext: options.ext,\n v: options.v\n };\n if (isObjectWithProperties(options.queryParams)) {\n this.options.queryParams = options.queryParams\n }\n if (options.body != null) {\n this.options.body = options.body\n }\n };\n osapi.Request.prototype.execute = function(callback) {\n executeImpl.call(this, null, callback);\n };\n osapi.Request.prototype.executeAs = function(personURI, callback) {\n executeImpl.call(this, \"uri \" + personURI, callback);\n };\n function executeImpl(runAs, callback) {\n callback = callback || function(){};\n var endpoint = this.options.endpoint + buildQueryParams(this.options.queryParams);\n if (endpoint.charAt(0) == '/') {\n endpoint = endpoint.substring(1);\n }\n var path = this.options.ext\n ? \"ext/\" + this.options.ext + \"/\" + (this.options.version || this.options.v)\n : \"v3\";\n var url = [ajaxPath, \"api/core\", path, endpoint].join(\"/\");\n jQuery.ajax({\n url: url,\n type: this.options.method,\n contentType: this.options.body == null ? $u : \"application/json; charset=utf-8\",\n data: this.options.body == null ? $u : this.options.body,\n dataType: \"json\",\n dataFilter: dataFilter,\n beforeSend: function(req) {\n if (runAs != null) {\n req.setRequestHeader(\"X-Jive-Run-As\", runAs);\n }\n },\n success: function(data, textStatus, jqXHR) {\n if(data === null) {\n data = { status : jqXHR.status };\n }\n callback(interceptData(data));\n },\n error: function(xhr) {\n callback(buildErr(500, xhr.status, \"An error occurred while contacting the server\"));\n }\n });\n }\n\n /**\n * Object that may contain several Request objects to be executed in a\n * single REST call.\n * @constructor\n */\n osapi.BatchRequest = function() {\n this._requests = [];\n };\n osapi.BatchRequest.prototype.add = function(key, request) {\n if (this._requests == null) {\n throw \"BatchRequest is no longer valid\";\n }\n this._requests.push({\n key: key,\n request: request.options\n });\n };\n osapi.BatchRequest.prototype.execute = function(callback) {\n executeBatchImpl.call(this, null, callback);\n };\n osapi.BatchRequest.prototype.executeAs = function(personURI, callback) {\n executeBatchImpl.call(this, \"uri \" + personURI, callback);\n };\n function executeBatchImpl(runAs, callback) {\n if (this._requests == null) {\n throw \"BatchRequest is no longer valid\";\n }\n var req = this._requests;\n this._requests = null;\n callback = callback || function(){};\n if (req.length == 0) {\n callback({});\n return;\n }\n var url = [ajaxPath, \"api/core/v3/executeBatch\"].join(\"/\");\n jQuery.ajax({\n url: url,\n type: \"POST\",\n contentType: \"application/json; charset=utf-8\",\n data: JSON.stringify(req),\n dataType: \"json\",\n dataFilter: dataFilter,\n beforeSend: function(req) {\n if (runAs != null) {\n req.setRequestHeader(\"X-Jive-Run-As\", runAs);\n }\n },\n success: function(res) {\n var data = {}, i;\n for (i = 0; i < res.length; i++) {\n if (res[i].data) {\n data[res[i].id] = interceptData(res[i].data);\n } else if (res[i].error) {\n data[res[i].id] = buildErr(res[i].error.code || 500, res[i].status || 500, res[i].error.message);\n }\n }\n for (i = 0; i < req.length; i++) {\n if (!(data.hasOwnProperty(req[i].id) && data[req[i].id])) {\n data[req[i].id] = buildErr(500, 500, \"No data was returned from the server\");\n }\n }\n callback(data);\n },\n error: function(xhr) {\n var res = {};\n try {\n res = JSON.parse(xhr.responseText) || {};\n } catch (e) { /* don't care */ }\n var data = {};\n var err = buildErr(res.code || 500, xhr.status, res.message || \"An error occurred while contacting the server\");\n for (var i = 0; i < req.length; i++) {\n data[req[i].key] = err;\n }\n callback(data);\n }\n });\n }\n\n /**\n * Creates a new, empty BatchRequest\n * @return {osapi.BatchRequest}\n */\n osapi.newBatch = function() {\n return new osapi.BatchRequest();\n };\n\n function buildErr(code, status, msg) {\n return {\n error: {\n code: code,\n status: status,\n message: msg\n }\n };\n }\n\n function buildRequest(method, hasBody, options) {\n var o = {\n method: method,\n endpoint: options.href,\n queryParams: options.params\n };\n if (hasBody) {\n o.body = options.body == null ? \"\" : JSON.stringify(options.body);\n }\n if (options.ext) {\n o.ext = options.ext;\n o.v = options.v;\n }\n return new osapi.Request(o);\n }\n\n $r(\"osapi.jive.core\", function() { return {\n \"get\": function(options) {\n return buildRequest(\"GET\", false, options);\n },\n \"post\": function(options) {\n return buildRequest(\"POST\", true, options);\n },\n \"put\": function(options) {\n return buildRequest(\"PUT\", true, options);\n },\n \"delete\": function(options) {\n return buildRequest(\"DELETE\", false, options);\n }\n }});\n\n osapi.jive.core[\"get\"]._intercepted = true;\n osapi.jive.core[\"put\"]._intercepted = true;\n osapi.jive.core[\"post\"]._intercepted = true;\n osapi.jive.core[\"delete\"]._intercepted = true;\n\n initIntercept = bootstrapRest;\n }", "function AjaxUtil_requester() {\n /**\n * @type {String?} url the url of post target\n */\n this.url = null;\n /**\n * @type {String?} type the content-type of http request header\n */\n this.type = null;\n /**\n * @type {Object?} content the content to post\n */\n this.content = null;\n /**\n * @type {Number?}\n */\n this.timeout = null;\n /**\n * @type {Boolean?}\n */\n this.wait = null;\n}", "constructor() {\n //https://javascript.info/xmlhttprequest\n\n // var defs\n this.args = {\n url: false,\n method: false,\n data: false,\n dataType: false, // aka requestType this is either form or json xhr.setRequestHeader('Content-type', 'application/json; charset=utf-8');\n responseType: false, // for clientside processing response data type\n timeout: 0,\n onComplete: false,\n onError: false, // only triggers if the request couldn't be made at all\n onProgress: false,\n onCancel: false,\n username: false,\n password: false\n };\n\n this.url = false;\n this.urlParams = \"\";\n this.xhr = false;\n\n // Process arguments\n if (arguments[0] && typeof (arguments[0]) === \"object\") {\n for (let key in arguments[0]) {\n if (this.args.hasOwnProperty(key)) {\n this.args[key] = arguments[0][key];\n }\n }\n }\n // console.log(this.args);\n\n // Validate\n let valid = true;\n\n if (this.args.url === false) {\n let msg = `XHR(): Usage error: Option \"url\" has not been set!\nPlease enter a valid url to make a request to!`;\n console.error(msg);\n valid = false;\n return false;\n }\n\n if (this.args.method === false) {\n let msg = `XHR(): Usage error: Option \"method\" has not been set!\nValid options are:\n POST,\n GET`;\n console.error(msg);\n valid = false;\n return false;\n }\n\n\n\n\n // log(this.args);\n let showDataTypeError = false;\n if (this.args.data !== false){\n if (this.args.dataType === false){\n showDataTypeError = true;\n } else {\n if (typeof(this.args.dataType) == \"string\"){\n if (\n this.args.dataType.toLowerCase() !== \"json\" &&\n this.args.dataType.toLowerCase() !== \"form\" &&\n this.args.dataType.toLowerCase() !== \"text\"){\n showDataTypeError = true;\n }\n }\n }\n }\n\n\n if (showDataTypeError) {\n let msg = `XHR(): Usage error: Invalid \"dataType\" has been set!\nValid options are:\n JSON - send json string\n FORM - send form object\n TEXT - send url string\n`;\n console.error(msg);\n valid = false;\n return false;\n }\n\n\n\n\n\n let showResponseTypeError = false;\n if (this.args.responseType === false){\n showResponseTypeError = true;\n } else {\n if (typeof(this.args.dataType) == \"string\"){\n if (\n this.args.responseType.toLowerCase() != \"text\" &&\n this.args.responseType.toLowerCase() != \"document\" &&\n this.args.responseType.toLowerCase() != \"json\" &&\n this.args.responseType.toLowerCase() != \"arraybuffer\" &&\n this.args.responseType.toLowerCase() != \"blob\"){\n showResponseTypeError = true;\n }\n }\n }\n\n\n\n if (showResponseTypeError) {\n let msg =\n `XHR(): Usage warning: Option \"responseType\" not set!\nValid options are:\n json \\t\\t\\t JSON (parsed automatically)\n document \\t\\t XML Document (XPath etc),\n text \\t\\t\\t string,\n arraybuffer \\t ArrayBuffer for binary data,\n blob \\t\\t\\t Blob for binary data,\n`;\n console.error(msg);\n valid = false;\n return false;\n }\n\n\n\n\n\n\n if (this.args.onComplete === false) {\n let msg = `XHR(): Usage error: Option \"onComplete\" has not been set!\nYour making a request but are not doing anything with the response? Make sure to supply an onComplete callback function.`;\n console.error(msg);\n valid = false;\n return false;\n }\n\n\n\n if (valid) {\n this.makeRequest();\n }\n }", "function handleAjaxSetup() {\n jQuery.ajaxSetup(Object.create(null, {\n // Don't worry about the GET request, this option will be ignored by jQuery when using HTTP GET method.\n 'contentType': { value: 'application/json; charset=UTF-8', enumerable: true, writable: true },\n 'headers': { value: csrfToken, enumerable: true, writable: true },\n 'dataType': { value: 'json', enumerable: true, writable: true },\n 'dataFilter': { value: filterAjaxData, enumerable: true, writable: true },\n }));\n }", "function KAJAX()\n{\n\t// ======= OBJECT DELCARATIONS =======\n\tthis._browserDetect = new KAJAX_browserDetect();\n}", "constructor( url, jxon=false, method='POST', credential='*' ){ \n super(url, method, credential) \n if(jxon){\n this.parse = function(xhttp){\n var resp = xhttp.response==\"\"?\"{}\":xhttp.response\n return JXON.parse(resp)\n } \n this.stringify = function(obj){ return JXON.stringify(obj) }\n }else{\n this.parse = function(xhttp){\n var resp = xhttp.response==\"\"?\"{}\":xhttp.response\n return JSON.parse(resp)\n } \n this.stringify = function(obj){ return JSON.stringify(obj) }\n }\n }", "function xhrInterceptor() {\n var originalXHR = window.XMLHttpRequest;\n var xhrSend = XMLHttpRequest.prototype.send;\n var xhrOpen = XMLHttpRequest.prototype.open;\n originalXHR.getRequestConfig = [];\n function ajaxEventTrigger(event) {\n var ajaxEvent = new CustomEvent(event, { detail: this });\n window.dispatchEvent(ajaxEvent);\n }\n function customizedXHR() {\n var liveXHR = new originalXHR();\n liveXHR.addEventListener('readystatechange', function () {\n ajaxEventTrigger.call(this, 'xhrReadyStateChange');\n }, false);\n liveXHR.open = function (method, url, async, username, password) {\n this.getRequestConfig = arguments;\n return xhrOpen.apply(this, arguments);\n };\n liveXHR.send = function (body) {\n return xhrSend.apply(this, arguments);\n };\n return liveXHR;\n }\n window.XMLHttpRequest = customizedXHR;\n }", "function NetworkResponseInterceptor () {\n this._originalAjax = $.ajax;\n this._successInterceptors = [];\n this._errorInterceptors = [];\n this._urlPatterns = [];\n}", "function getAjaxTransport() {\n\treturn validFuncOf(\n function() {return new XMLHttpRequest()},\n function() {return new ActiveXObject('Msxml2.XMLHTTP')},\n function() {return new ActiveXObject('Microsoft.XMLHTTP')}\n ) \n}", "constructor(url, method='POST'){\n this.url = url\n this.method = method \n }", "function request() {\n var ajax = new _ajaxRequest.default();\n return ajax.request.apply(ajax, arguments);\n }", "function AbstractDataProxy(options)\n{\n\tvar self = this;\n\n\t// default options\n\tself._defaultOpts = {\n\t\tinitMode: \"lazy\", // \"lazy\" or \"full\"\n\t\tservletName: \"\", // name of the servlet to retrieve the actual data (used for AJAX query)\n\t\tdata: {} // actual data, will be used only if it is a full init, i.e {initMode: \"full\"}\n\t};\n\n\tself._queryQueue = new RequestQueue();\n\n\t// merge options with default options to use defaults for missing values\n\tself._options = jQuery.extend(true, {}, self._defaultOpts, options);\n\n\t/**\n\t * Initializes the data proxy with respect to init mode.\n\t */\n\tself.init = function()\n\t{\n\t\tself._queryQueue.init(function(options) {\n\t\t\t$.ajax(options);\n\t\t});\n\n\t\tif (self.isFullInit())\n\t\t{\n\t\t\tself.fullInit(self._options);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tself.lazyInit(self._options);\n\t\t}\n\t};\n\n\t/**\n\t * Initializes the proxy without actually grabbing anything from the server.\n\t * Provided servlet name will be used later.\n\t *\n\t * @param options data proxy options\n\t */\n\tself.lazyInit = function(options)\n\t{\n\t\t// no default implementation, can be overridden by subclasses\n\t};\n\n\t/**\n\t * Initializes with full data. Once initialized with full data,\n\t * this proxy class assumes that there will be no additional data.\n\t *\n\t * @param options data proxy options\n\t */\n\tself.fullInit = function(options)\n\t{\n\t\t// method body should be overridden by subclasses\n\t};\n\n\t/**\n\t * Checks if the initialization is full or lazy.\n\t *\n\t * @return {boolean} true if full init, false otherwise\n\t */\n\tself.isFullInit = function()\n\t{\n\t\treturn !(self._options.initMode.toLowerCase() === \"lazy\");\n\t};\n\n\n\t/**\n\t * This function ensures that at most only one ajax request is\n\t * sent from a particular DataProxy instance. This is to prevent\n\t * too many simultaneous requests.\n\t *\n\t * @ajaxOptions jQuery ajax options\n\t */\n\tself.requestData = function(ajaxOptions)\n\t{\n\t\tvar complete = ajaxOptions.complete;\n\n\t\tvar defaultOpts = {\n\t\t\tcomplete: function(request, status)\n\t\t\t{\n\t\t\t\tself._queryQueue.complete();\n\n\t\t\t\tif (_.isFunction(complete))\n\t\t\t\t{\n\t\t\t\t\tcomplete(request, status);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// extend options with default options\n\t\tvar options = jQuery.extend(true, {}, ajaxOptions, defaultOpts);\n\n\t\tself._queryQueue.add(options);\n\t};\n}", "function ajaxSyncInit() { \r\n\tvar localObjRequest;\r\n\r\n\tif (window.XMLHttpRequest) {\r\n\r\n \t\t// Mozilla,Safari, Chrome, IE7+\r\n \t\ttry { \r\n\t \t\tlocalObjRequest = new XMLHttpRequest(); \r\n\t\t} catch(exc) { \r\n\t \talert(\"The browser cannot handler the Ajax resources.\"); \r\n\t \tlocalObjRequest = false; \r\n\t\t}\r\n\r\n\t} else if (window.ActiveXObject) {\r\n\t\t// IE6-\r\n\t\ttry {\r\n\t\t\tlocalObjRequest = new ActiveXObject(\"Microsoft.XMLHTTP\");\r\n\t\t} catch(e) {\r\n\t\t\ttry { \r\n\t \t\t\tlocalObjRequest = new ActiveXObject(\"Msxml2.XMLHTTP\"); \r\n\t\t\t} catch(ex) { \r\n\t \t\talert(\"The browser cannot handler the Ajax resources.\"); \r\n \t\t\t\tlocalObjRequest = false; \r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn localObjRequest;\r\n}", "function ajaxExtend(target, src) {\n var deep, key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[ key ] !== undefined) {\n (flatOptions[ key ] ? target : (deep || (deep = {})))[ key ] = src[ key ];\n }\n }\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function request() {\n const ajax = new _ajaxRequest.default();\n return ajax.request(...arguments);\n }", "function cjAjaxClass() {\n this.getTable = cjAjaxGetTable;\n this.getNameArray = cjAjaxGetNameArray;\n this.getNameValue = cjAjaxGetNameValue;\n this.update = cjAjaxUpdate;\n this.data = cjAjaxData;\n this.setVisitProperty = cjAjaxSetVisitProperty;\n this.getVisitProperty = cjAjaxGetVisitProperty;\n this.url = cjAjaxURL;\n this.addon = cjAjaxAddon;\n this.addonCallback = cjAjaxAddonCallback;\n this.qs = cjAjaxQs;\n this.qsCallback = cjAjaxQsCallback;\n}", "function n(e,t,n,o){var i,r,a,s,u,c=t;\n// Ignore repeat invocations\nh||(h=!0,\n// Clear timeout if it exists\np&&_.clearTimeout(p),\n// Dereference transport for early garbage collection\n// (no matter how long the jqXHR object will be used)\nl=void 0,\n// Cache response headers\nd=o||\"\",\n// Set readyState\nT.readyState=0<e?4:0,\n// Determine if successful\ni=200<=e&&e<300||304===e,\n// Get response data\nn&&(s=Z(g,T,n)),\n// Convert no matter what (that way responseXXX fields are always set)\ns=ee(g,s,T,i),\n// If successful, handle type chaining\ni?(\n// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\ng.ifModified&&((u=T.getResponseHeader(\"Last-Modified\"))&&(me.lastModified[f]=u),(u=T.getResponseHeader(\"etag\"))&&(me.etag[f]=u)),\n// if no content\n204===e||\"HEAD\"===g.type?c=\"nocontent\":304===e?c=\"notmodified\":(c=s.state,r=s.data,i=!(a=s.error))):(\n// Extract error from statusText and normalize for non-aborts\na=c,!e&&c||(c=\"error\",e<0&&(e=0))),\n// Set data for the fake xhr object\nT.status=e,T.statusText=(t||c)+\"\",\n// Success/Error\ni?b.resolveWith(v,[r,c,T]):b.rejectWith(v,[T,c,a]),\n// Status-dependent callbacks\nT.statusCode(x),x=void 0,m&&y.trigger(i?\"ajaxSuccess\":\"ajaxError\",[T,g,i?r:a]),\n// Complete\nw.fireWith(v,[T,c]),m&&(y.trigger(\"ajaxComplete\",[T,g]),\n// Handle the global AJAX counter\n--me.active||me.event.trigger(\"ajaxStop\")))}", "function Ajax(opt) {\n var finalCfg = _merge(defaultCfg, opt || {}),\n data = _serializenData(finalCfg.data),\n timeout = null,\n hasTimeout = false,\n supportCors = true,\n xhr, headers, scriptNode, response, data, dataType;\n\n data = _serializenData(finalCfg.data);\n dataType = _getDataType(finalCfg.dataType);\n\n if (finalCfg.method.toLowerCase() === \"get\") {\n if (finalCfg.url.indexOf(\"?\") === -1) {\n finalCfg.url += (\"?\" + data);\n } else {\n finalCfg.url += (\"&\" + data);\n }\n data = null;\n }\n\n // configed the timeout\n if (finalCfg.timeout > 0) {\n timeout = setTimeout(function() {\n if (_typeOf(finalCfg.abort) === \"Function\") {\n finalCfg.abort.call(finalCfg.context, xhr || null);\n }\n hasTimeout = true;\n }, finalCfg.timeout);\n }\n\n // jsonp type request\n if (dataType === \"jsonp\") {\n scriptNode = document.createElement(\"script\");\n scriptNode.type = \"text/javascript\";\n if (finalCfg.url.indexOf(\"?\") > -1 && data !== \"undefined\") {\n finalCfg.url += data;\n } else {\n finalCfg.url += (\"?\" + data);\n }\n scriptNode.src = finalCfg.url;\n head.appendChild(scriptNode);\n scriptNode.onload = function() {\n head.removeChild(scriptNode);\n if (!hasTimeout && timeout) {\n clearTimeout(timeout);\n }\n // excute the success callback\n if (_typeOf(finalCfg.success) === \"Function\") {\n finalCfg.success.call(finalCfg.context, response, null);\n }\n };\n } else {\n xhr = root.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject(\"Microsoft.XMLHTTP\");\n supportCors = \"withCredentials\" in xhr;\n\n for(var i = 0, len = requestInterceptors.length; i < len; i ++) {\n requestInterceptors[i](xhr);\n }\n\n // bind the readystate change event\n xhr.onreadystatechange = function() {\n // already timeout\n if (hasTimeout) {\n return;\n }\n\n for(var i = 0, len = responseInterceptors.length; i < len; i ++) {\n responseInterceptors[i](xhr);\n }\n\n if (xhr.readyState === 4) {\n // setted the time out, and not timeout until now\n if (timeout) {\n clearTimeout(timeout);\n }\n\n response = xhr.responseText;\n\n // 2xx -> success\n // 304 -> not modified\n if (xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) {\n try {\n if (dataType === \"script\") {\n response = (new Function(\"return \" + response)).call(root);\n } else if (dataType === \"xml\") {\n // responseXML is not empty\n if (xhr.responseXML !== null) {\n response = xhr.responseXML;\n }\n } else if (dataType === \"json\") {\n response = response ? JSON.parse(response) : null;\n } else {\n response = xhr.responseText;\n }\n // excute the success callback\n if (_typeOf(finalCfg.success) === \"Function\") {\n finalCfg.success.call(finalCfg.context, response, xhr);\n }\n } catch (ex) {\n if (_typeOf(finalCfg.error) === \"Function\") {\n // excute the error callback\n finalCfg.error.call(finalCfg.context, response, ex, xhr);\n }\n }\n } else {\n if (_typeOf(finalCfg.error) === \"Function\") {\n // excute the error callback\n finalCfg.error.call(finalCfg.context, response, null, xhr);\n }\n }\n }\n };\n\n // mark this request is a XMLHttpRequest(ajax), not a common request\n // cross domain can not distinguish \"X-Requested-With\"\n if (!finalCfg.withCredentials) {\n finalCfg.headers = _merge(finalCfg.headers, {\n \"X-Requested-With\": \"XMLHttpRequest\",\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n \"Accept\": typeMaps[dataType].indexOf(\",\") > -1 ? typeMaps[dataType].split(\",\")[0] : typeMaps[dataType]\n });\n } else {\n finalCfg.headers = _merge(finalCfg.headers, {\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n \"Accept\": typeMaps[dataType].indexOf(\",\") > -1 ? typeMaps[dataType].split(\",\")[0] : typeMaps[dataType]\n });\n }\n\n // set the withCredentials attribute\n if (supportCors) {\n xhr.withCredentials = finalCfg.withCredentials;\n }\n\n xhr.open(finalCfg.method, finalCfg.url, finalCfg.async);\n _setHeaders(xhr, finalCfg.headers);\n xhr.send(data);\n\n return xhr;\n }\n }", "create() {\n const opts = (0, util_js_1.pick)(this.opts, \"agent\", \"pfx\", \"key\", \"passphrase\", \"cert\", \"ca\", \"ciphers\", \"rejectUnauthorized\", \"autoUnref\");\n opts.xdomain = !!this.opts.xd;\n opts.xscheme = !!this.opts.xs;\n const xhr = (this.xhr = new xmlhttprequest_js_1.default(opts));\n try {\n debug(\"xhr open %s: %s\", this.method, this.uri);\n xhr.open(this.method, this.uri, this.async);\n try {\n if (this.opts.extraHeaders) {\n xhr.setDisableHeaderCheck && xhr.setDisableHeaderCheck(true);\n for (let i in this.opts.extraHeaders) {\n if (this.opts.extraHeaders.hasOwnProperty(i)) {\n xhr.setRequestHeader(i, this.opts.extraHeaders[i]);\n }\n }\n }\n }\n catch (e) { }\n if (\"POST\" === this.method) {\n try {\n xhr.setRequestHeader(\"Content-type\", \"text/plain;charset=UTF-8\");\n }\n catch (e) { }\n }\n try {\n xhr.setRequestHeader(\"Accept\", \"*/*\");\n }\n catch (e) { }\n // ie6 check\n if (\"withCredentials\" in xhr) {\n xhr.withCredentials = this.opts.withCredentials;\n }\n if (this.opts.requestTimeout) {\n xhr.timeout = this.opts.requestTimeout;\n }\n xhr.onreadystatechange = () => {\n if (4 !== xhr.readyState)\n return;\n if (200 === xhr.status || 1223 === xhr.status) {\n this.onLoad();\n }\n else {\n // make sure the `error` event handler that's user-set\n // does not throw in the same tick and gets caught here\n this.setTimeoutFn(() => {\n this.onError(typeof xhr.status === \"number\" ? xhr.status : 0);\n }, 0);\n }\n };\n debug(\"xhr data %s\", this.data);\n xhr.send(this.data);\n }\n catch (e) {\n // Need to defer since .create() is called directly from the constructor\n // and thus the 'error' event can only be only bound *after* this exception\n // occurs. Therefore, also, we cannot throw here at all.\n this.setTimeoutFn(() => {\n this.onError(e);\n }, 0);\n return;\n }\n if (typeof document !== \"undefined\") {\n this.index = Request.requestsCount++;\n Request.requests[this.index] = this;\n }\n }", "function fXMLHttpRequest() {\n\t\tthis._object = oXMLHttpRequest && !bIE7 ? new oXMLHttpRequest : new window.ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\tthis._listeners = [];\n\t}", "function fXMLHttpRequest() {\n\t\tthis._object = oXMLHttpRequest && !bIE7 ? new oXMLHttpRequest : new window.ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\tthis._listeners = [];\n\t}", "function fXMLHttpRequest() {\n this._object = oXMLHttpRequest && !bIE7 ? new oXMLHttpRequest : new window.ActiveXObject(\"Microsoft.XMLHTTP\");\n this._listeners = [];\n }", "function fXMLHttpRequest() {\n this._object = oXMLHttpRequest && !bIE7 ? new oXMLHttpRequest : new window.ActiveXObject(\"Microsoft.XMLHTTP\");\n this._listeners = [];\n }", "function wirejQueryInterceptor() {\n $(document).ajaxStart(function () { processRequest(); });\n $(document).ajaxComplete(function () { processResponse(); });\n $(document).ajaxError(function () { processResponse(); });\n }", "function microAjax(B,A){this.bindFunction=function(E,D){return function(){return E.apply(D,[D])}};this.stateChange=function(D){if(this.request.readyState==4){this.callbackFunction(this.request.responseText)}};this.getRequest=function(){if(window.ActiveXObject){return new ActiveXObject(\"Microsoft.XMLHTTP\")}else{if(window.XMLHttpRequest){return new XMLHttpRequest()}}return false};this.postBody=(arguments[2]||\"\");this.callbackFunction=A;this.url=B;this.request=this.getRequest();if(this.request){var C=this.request;C.onreadystatechange=this.bindFunction(this.stateChange,this);if(this.postBody!==\"\"){C.open(\"POST\",B,true);C.setRequestHeader(\"X-Requested-With\",\"XMLHttpRequest\");C.setRequestHeader(\"Content-type\",\"application/x-www-form-urlencoded\");C.setRequestHeader(\"Connection\",\"close\")}else{C.open(\"GET\",B,true)}C.send(this.postBody)}}", "function initFiltersPanel()\n{\n jQuery('div.task_filters ul li a').click(function(){\n jQuery('#search_filter_keys').effect(\"highlight\", {color: '#FF9900'}, 3000);\n jQuery.ajax({\n beforeSend: function(){ showProgress(); },\n complete: function(request){ tasklistReload(); hideProgress(); } ,\n data:'',\n success: function(request){jQuery('#search_filter_keys').html(request);},\n type:'post',\n url: this.href\n });\n return false;\n });\n}", "function EngineWrapper(adapter) {\n var AjaxEngine = function () {\n function AjaxEngine() {\n _classCallCheck(this, AjaxEngine);\n\n this.requestHeaders = {};\n this.readyState = 0;\n this.timeout = 0; // 0 stands for no timeout\n this.responseURL = \"\";\n this.responseHeaders = {};\n }\n\n _createClass(AjaxEngine, [{\n key: \"_call\",\n value: function _call(name) {\n this[name] && this[name].apply(this, [].splice.call(arguments, 1));\n }\n }, {\n key: \"_changeReadyState\",\n value: function _changeReadyState(state) {\n this.readyState = state;\n this._call(\"onreadystatechange\");\n }\n }, {\n key: \"open\",\n value: function open(method, url) {\n this.method = method;\n if (!url) {\n url = location.href;\n } else {\n url = util.trim(url);\n if (url.indexOf(\"http\") !== 0) {\n // Normalize the request url\n if (isBrowser) {\n var t = document.createElement(\"a\");\n t.href = url;\n url = t.href;\n }\n }\n }\n this.responseURL = url;\n this._changeReadyState(1);\n }\n }, {\n key: \"send\",\n value: function send(arg) {\n var _this = this;\n\n arg = arg || null;\n var self = this;\n if (adapter) {\n var request = {\n method: self.method,\n url: self.responseURL,\n headers: self.requestHeaders || {},\n body: arg\n };\n util.merge(request, self._options || {});\n if (request.method === \"GET\") {\n request.body = null;\n }\n self._changeReadyState(3);\n var timer = void 0;\n self.timeout = self.timeout || 0;\n if (self.timeout > 0) {\n timer = setTimeout(function () {\n if (self.readyState === 3) {\n _this._call(\"onloadend\");\n self._changeReadyState(0);\n self._call(\"ontimeout\");\n }\n }, self.timeout);\n }\n request.timeout = self.timeout;\n adapter(request, function (response) {\n\n function getAndDelete(key) {\n var t = response[key];\n delete response[key];\n return t;\n }\n\n // If the request has already timeout, return\n if (self.readyState !== 3) return;\n clearTimeout(timer);\n\n // Make sure the type of status is integer\n self.status = getAndDelete(\"statusCode\") - 0;\n\n var responseText = getAndDelete(\"responseText\");\n var statusMessage = getAndDelete(\"statusMessage\");\n\n // Network error, set the status code 0\n if (!self.status) {\n self.statusText = responseText;\n self._call(\"onerror\", { msg: statusMessage });\n } else {\n // Parsing the response headers to array in a object, because\n // there may be multiple values with the same header name\n var responseHeaders = getAndDelete(\"headers\");\n var headers = {};\n for (var field in responseHeaders) {\n var value = responseHeaders[field];\n var key = field.toLowerCase();\n // Is array\n if ((typeof value === \"undefined\" ? \"undefined\" : _typeof(value)) === \"object\") {\n headers[key] = value;\n } else {\n headers[key] = headers[key] || [];\n headers[key].push(value);\n }\n }\n var cookies = headers[\"set-cookie\"];\n if (isBrowser && cookies) {\n cookies.forEach(function (e) {\n // Remove the http-Only property of the cookie\n // so that JavaScript can operate it.\n document.cookie = e.replace(/;\\s*httpOnly/ig, \"\");\n });\n }\n self.responseHeaders = headers;\n // Set the fields of engine from response\n self.statusText = statusMessage || \"\";\n self.response = self.responseText = responseText;\n self._response = response;\n self._changeReadyState(4);\n self._call(\"onload\");\n }\n self._call(\"onloadend\");\n });\n } else {\n console.error(\"Ajax require adapter\");\n }\n }\n }, {\n key: \"setRequestHeader\",\n value: function setRequestHeader(key, value) {\n this.requestHeaders[util.trim(key)] = value;\n }\n }, {\n key: \"getResponseHeader\",\n value: function getResponseHeader(key) {\n return (this.responseHeaders[key.toLowerCase()] || \"\").toString() || null;\n }\n }, {\n key: \"getAllResponseHeaders\",\n value: function getAllResponseHeaders() {\n var str = \"\";\n for (var key in this.responseHeaders) {\n str += key + \":\" + this.getResponseHeader(key) + \"\\r\\n\";\n }\n return str || null;\n }\n }, {\n key: \"abort\",\n value: function abort(msg) {\n this._changeReadyState(0);\n this._call(\"onerror\", { msg: msg });\n this._call(\"onloadend\");\n }\n }], [{\n key: \"setAdapter\",\n value: function setAdapter(requestAdapter) {\n adapter = requestAdapter;\n }\n }]);\n\n return AjaxEngine;\n }();\n\n return AjaxEngine;\n}", "function EngineWrapper(adapter) {\n var AjaxEngine = function () {\n function AjaxEngine() {\n _classCallCheck(this, AjaxEngine);\n\n this.requestHeaders = {};\n this.readyState = 0;\n this.timeout = 0; // 0 stands for no timeout\n this.responseURL = \"\";\n this.responseHeaders = {};\n }\n\n _createClass(AjaxEngine, [{\n key: \"_call\",\n value: function _call(name) {\n this[name] && this[name].apply(this, [].splice.call(arguments, 1));\n }\n }, {\n key: \"_changeReadyState\",\n value: function _changeReadyState(state) {\n this.readyState = state;\n this._call(\"onreadystatechange\");\n }\n }, {\n key: \"open\",\n value: function open(method, url) {\n this.method = method;\n if (!url) {\n url = location.href;\n } else {\n url = util.trim(url);\n if (url.indexOf(\"http\") !== 0) {\n // Normalize the request url\n if (isBrowser) {\n var t = document.createElement(\"a\");\n t.href = url;\n url = t.href;\n }\n }\n }\n this.responseURL = url;\n this._changeReadyState(1);\n }\n }, {\n key: \"send\",\n value: function send(arg) {\n var _this = this;\n\n arg = arg || null;\n var self = this;\n if (adapter) {\n var request = {\n method: self.method,\n url: self.responseURL,\n headers: self.requestHeaders || {},\n body: arg\n };\n util.merge(request, self._options || {});\n if (request.method === \"GET\") {\n request.body = null;\n }\n self._changeReadyState(3);\n var timer = void 0;\n self.timeout = self.timeout || 0;\n if (self.timeout > 0) {\n timer = setTimeout(function () {\n if (self.readyState === 3) {\n _this._call(\"onloadend\");\n self._changeReadyState(0);\n self._call(\"ontimeout\");\n }\n }, self.timeout);\n }\n request.timeout = self.timeout;\n adapter(request, function (response) {\n\n function getAndDelete(key) {\n var t = response[key];\n delete response[key];\n return t;\n }\n\n // If the request has already timeout, return\n if (self.readyState !== 3) return;\n clearTimeout(timer);\n\n // Make sure the type of status is integer\n self.status = getAndDelete(\"statusCode\") - 0;\n\n var responseText = getAndDelete(\"responseText\");\n var statusMessage = getAndDelete(\"statusMessage\");\n\n // Network error, set the status code 0\n if (!self.status) {\n self.statusText = responseText;\n self._call(\"onerror\", { msg: statusMessage });\n } else {\n // Parsing the response headers to array in a object, because\n // there may be multiple values with the same header name\n var responseHeaders = getAndDelete(\"headers\");\n var headers = {};\n for (var field in responseHeaders) {\n var value = responseHeaders[field];\n var key = field.toLowerCase();\n // Is array\n if ((typeof value === \"undefined\" ? \"undefined\" : _typeof(value)) === \"object\") {\n headers[key] = value;\n } else {\n headers[key] = headers[key] || [];\n headers[key].push(value);\n }\n }\n var cookies = headers[\"set-cookie\"];\n if (isBrowser && cookies) {\n cookies.forEach(function (e) {\n // Remove the http-Only property of the cookie\n // so that JavaScript can operate it.\n document.cookie = e.replace(/;\\s*httpOnly/ig, \"\");\n });\n }\n self.responseHeaders = headers;\n // Set the fields of engine from response\n self.statusText = statusMessage || \"\";\n self.response = self.responseText = responseText;\n self._response = response;\n self._changeReadyState(4);\n self._call(\"onload\");\n }\n self._call(\"onloadend\");\n });\n } else {\n console.error(\"Ajax require adapter\");\n }\n }\n }, {\n key: \"setRequestHeader\",\n value: function setRequestHeader(key, value) {\n this.requestHeaders[util.trim(key)] = value;\n }\n }, {\n key: \"getResponseHeader\",\n value: function getResponseHeader(key) {\n return (this.responseHeaders[key.toLowerCase()] || \"\").toString() || null;\n }\n }, {\n key: \"getAllResponseHeaders\",\n value: function getAllResponseHeaders() {\n var str = \"\";\n for (var key in this.responseHeaders) {\n str += key + \":\" + this.getResponseHeader(key) + \"\\r\\n\";\n }\n return str || null;\n }\n }, {\n key: \"abort\",\n value: function abort(msg) {\n this._changeReadyState(0);\n this._call(\"onerror\", { msg: msg });\n this._call(\"onloadend\");\n }\n }], [{\n key: \"setAdapter\",\n value: function setAdapter(requestAdapter) {\n adapter = requestAdapter;\n }\n }]);\n\n return AjaxEngine;\n }();\n\n return AjaxEngine;\n}", "function AjaxClient(){\n this.client = null;\n try{\n this.client = new XMLHttpRequest();\n } catch (e) {\n try {\n this.client = new ActiveXObject(\"Msxml2.XMLHTTP\");\n } catch (e) {\n try {\n\t\t\t\tthis.client = new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\t\t} catch (e) {\n\t\t\t\tthis.client = null;\n\t\t\t}\n }\n }\n\n this.request = function(method, url, data, responseHandler){\n if(!this.client){\n window.alert(\"AJAX required, but not supported by your browser. You can no longer use this site.\");\n return ;\n }\n\n if(data){\n // encode both for get and for post requests\n data = JSONtoURL(data);\n }\n if (method == \"GET\"){\n // before opening connection\n // we must know the complete url\n url += \"?\" + (data ? data : \"\");\n console.log(\"GET \" + url);\n }\n this.client.open(method, url, true);\n if (method == \"POST\") {\n // we can only set headers after\n // having opened the connection\n this.client.setRequestHeader(\n 'Content-Type',\n // php $_POST can only be used with :\n // application/x-www-form-urlencoded\n // multipart/form-data\n 'application/x-www-form-urlencoded');\n }\n var thatclient = this.client;\n this.client.onreadystatechange = function(){\n if(thatclient.readyState == 4){\n console.log(thatclient);\n var response = JSON.parse(thatclient.responseText);\n responseHandler(response);\n }\n }\n this.client.send(data);\n }\n\n this.get = function (url, responseHandler) {\n return this.request(\"GET\", url, null, responseHandler);\n }\n\n this.post = function (url, data, responseHandler) {\n return this.request(\"POST\", url, data, responseHandler);\n }\n}", "function http() {\n\tthis.hint = 'url,queryType,dataType,async,data,timeout\\n\\nПри передаче данных в виде аргументов следует соблюдать их порядок, как в примере выше\\n\\nИмя свойств в передаваемом объекте должны быть одноименны с названиями аргументов в примере выше';\n\tthis.control = false;\n\tthis.lastQuery = false;\n\tthis.config = new Object();\n\tthis.defined = {\n\t\turl : '',\n\t\tqueryType : 'POST',\n\t\tdataType : 'json',\n\t\tasync : true,\n\t\tdata : false,\n\t\ttimeout : 500\n\t}\n\tthis.log = new Array();\n\tthis.log.console = true;\n\tthis.log.show = function(){\n\t\tfor (var i=0; i<this.length; i++) {\n\t\t\tconsole.log(this[i]);\n\t\t}\n\t}\n\tthis.log.clean = function(){\n\t\tthis.splice( 0,this.length );\n\t}\n\tthis.fromObject = function(arg) {\n\t\tif( arg != null && typeof(arg) == 'object' && arg.url != undefined ) {\n\t\t\tthis.control = true;\n\t\t\tthis.config.url = arg.url;\n\t\t\targ.queryType ? this.config.queryType = arg.queryType : this.config.queryType = this.defined.queryType;\n\t\t\targ.dataType ? this.config.dataType = arg.dataType : this.config.dataType = this.defined.dataType;\n\t\t\targ.async ? this.config.async = arg.async : this.config.async = this.defined.async;\n\t\t\targ.data ? this.config.data = arg.data : this.config.data = this.defined.data;\n\t\t\targ.timeout ? this.config.timeout = arg.timeout : this.config.timeout = this.defined.timeout;\n\t\t} else {\n\t\t\tif( typeof(arg) == 'string' ) { this.fromArguments(new Array(arg)) }\n\t\t}\n\t}\n\tthis.fromArguments = function(args) {\n\t\tif ( !args[0] ) { console.error('No URL'); return false }\n\t\t\telse { this.config.url = args[0]; this.control = true; }\n\t\tif ( args[1] === undefined ) this.config.queryType = this.defined.queryType;\n\t\t\telse this.config.queryType = args[1];\n\t\tif ( args[2] === undefined ) this.config.dataType = this.defined.dataType;\n\t\t\telse this.config.dataType = args[2];\n\t\tif ( args[3] === undefined ) this.config.async = this.defined.async;\n\t\t\telse this.config.async = args[3];\n\t\tif ( args[4] === undefined ) this.config.data = this.defined.data;\n\t\t\telse this.config.data = args[4];\n\t\tif ( args[5] === undefined ) this.config.timeout = this.defined.timeout;\n\t\t\telse this.config.timeout = args[5];\n\t}\n\tthis.router = function(ARGS){\n\t\tswitch( ARGS.length ) {\n\t\t\tcase 0 : this.lastQuery ? this.control = true : 0; break;\n\t\t\tcase 1 : this.fromObject(ARGS[0]); break;\n\t\t\tdefault : this.fromArguments(ARGS);\n\t\t}\n\t}\n\tthis.request = function() {\n\t\tthis.router(arguments);\n\t\tif( this.control ) {\n\t\t\treturn new Promise( function(resolve,reject) {\n\t\t\t\t$.ajax({\n\t\t\t\t\ttimeout : document.http.config.url,\n\t\t\t\t\turl : document.http.config.url,\n\t\t\t\t\ttype : document.http.config.queryType,\n\t\t\t\t\tdataType : document.http.config.dataType,\n\t\t\t\t\tasync : document.http.config.async,\n\t\t\t\t\tdata : document.http.config.data,\n\t\t\t\t\tsuccess : function( data, control ) { document.http.lastQuery = true; resolve(data) },\n\t\t\t\t\terror : function (xhr, errorType, exception) { var errorMessage = exception || xhr.controlText; reject(errorMessage); },\n\t\t\t\t\tcomplete : function() {\n\t\t\t\t\t\tdocument.http.control = false;\n\t\t\t\t\t\tvar msg = 'Request to ' + document.http.config.url+ ' completed'\n\t\t\t\t\t\tif ( document.http.log.console ) console.log(msg);\n\t\t\t\t\t\tdocument.http.log.push(msg);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t} )\n\t\t} else {\n\t\t\tconsole.error('Cannot to request'); return false;\n\t\t}\n\t}\n}", "function _initializeRequestHandler()\n\t{\n\t\t/** Initialize */\n\t\tvar xhr = new XMLHttpRequest();\n\n\t\t/** Check if the XMLHttpRequest object has a \"withCredentials\" property.\n\t\t * \"withCredentials\" only exits on the XMLHttpRequest2 object. */\n \t\tif (\"withCredentials\" in xhr) {\n\t\t\txhr.withCredentials = true; // This is very important for server-side cookies to be sent to the server.\n\t\t\t\treturn xhr;\n\n\t\t/** Check the type of handler available. */\n\t\t} else if (typeof XDomainRequest !== \"undefined\") {\n\t\t\t/** Otherwise, check if XDomainRequest.\n\t\t\t * XDomainRequest only exists in IE, and is IE's way of making CORS requests. */\n\t\t\txhr = new XDomainRequest();\n\t\t\t_isDomainRequest = true;\n\n\t\t\t/** Assigned the jQuery ajax settings. */\n\t\t\t$.ajaxSettings.xhr = function() {\n\t\t\t\ttry {\n\t\t\t\t\tif (xhr)\n\t\t\t\t\t{\n\t\t\t\t\t\txhr.onerror = _failureWrapperIE;\n\t\t\t\t\t\txhr.onload = _successWrapperIE;\n\t\t\t\t\t}\n\t\t\t\t\treturn xhr;\n\t\t\t\t}\n\t\t\t\tcatch(e)\n\t\t\t\t{\n\t\t\t\t\tSSE.Lib.MessageBox.Critical(SSE.Model.Message.new({\n\t\t\t\t\t\ttitle: \"Exception thrown configuring XDomainRequest\"\n\t\t\t\t\t\t, messageBody: \"The following exception was thrown: \" + e\n\t\t\t\t\t}));\n\n\t\t\t\t\t/** Needs to return something in the event of an error. */\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t};\n\t\t} else {\n\t\t\t/** Otherwise CORS is not supported in this browser. */\n\t\t\tSSE.Lib.MessageBox.Critical(SSE.Models.Message.new({\n\t\t\t\ttitle: \"Broken Transport\"\n\t\t\t\t, messageBody: 'This client does not support the transport protocol our API uses.\\r\\nPlease use Chrome or FF browser.'\n\t\t\t}));\n\n\t\t\t/** Exit the function. */\n\t\t\treturn null;\n\t\t}\n\n\t\t/** Set default configs. */\n\t\t$.support.cors = true;\n\n\t\t/** Return handler. */\n\t\treturn xhr;\n\t}", "function AJAXICache(method, url, data, callback)\n {\n this._url = url;\n this._data = data;\n this._method = method;\n this._callback = callback;\n }", "function AjaxRequest (url, opts){\r\n var headers = {\r\n 'X-Requested-With': 'XMLHttpRequest',\r\n 'X-Prototype-Version': '1.6.1',\r\n 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'\r\n };\r\n var ajax = null;\r\n\r\nif (DEBUG_TRACE_AJAX) logit (\"AJAX: \"+ url +\"\\n\" + inspect (opts, 3, 1)); \r\n \r\n if (window.XMLHttpRequest)\r\n ajax=new XMLHttpRequest();\r\n else\r\n ajax=new ActiveXObject(\"Microsoft.XMLHTTP\");\r\n \r\n if (opts.method==null || opts.method=='')\r\n method = 'GET';\r\n else\r\n method = opts.method.toUpperCase(); \r\n \r\n if (method == 'POST'){\r\n headers['Content-type'] = 'application/x-www-form-urlencoded; charset=UTF-8';\r\n } else if (method == 'GET'){\r\n addUrlArgs (url, opts.parameters);\r\n }\r\n\r\n ajax.onreadystatechange = function(){\r\n// ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; states 0-4\r\n if (ajax.readyState==4) {\r\n if (ajax.status >= 200 && ajax.status < 305)\r\n if (opts.onSuccess) opts.onSuccess(ajax);\r\n else\r\n if (opts.onFailure) opts.onFailure(ajax);\r\n } else {\r\n if (opts.onChange) opts.onChange (ajax);\r\n }\r\n } \r\n \r\n ajax.open(method, url, true); // always async!\r\n\r\n for (var k in headers)\r\n ajax.setRequestHeader (k, headers[k]);\r\n if (matTypeof(opts.requestHeaders)=='object')\r\n for (var k in opts.requestHeaders)\r\n ajax.setRequestHeader (k, opts.requestHeaders[k]);\r\n \r\n if (method == 'POST'){\r\n var a = [];\r\n for (k in opts.parameters){\r\n\t if(matTypeof(opts.parameters[k]) == 'object')\r\n\t\tfor(var h in opts.parameters[k])\r\n\t\t\ta.push (k+'['+h+'] ='+ opts.parameters[k][h] );\r\n\t else\r\n a.push (k +'='+ opts.parameters[k] );\r\n\t}\r\n ajax.send (a.join ('&'));\r\n } else {\r\n ajax.send();\r\n }\r\n}", "function easyHTTP() {\n this.http = new XMLHttpRequest();\n}", "function AjaxContextParametersRequester(domEl) {\r\n BaseObject.apply(this, arguments);\r\n this.root = domEl;\r\n for (var e in AjaxContextParameterFlags) {\r\n this[\"get_\" + e] = AjaxContextParametersRequester.$createParamExtractor(AjaxContextParameterFlags[e]);\r\n }\r\n}", "function IAjaxHttpHook() { }", "function XMLHttpRequestAdapter () {\n this.xdr = null;\n this.withCredentials = false;\n this.status = '';\n this.readyState = 0;\n this.responseType = null;\n this.responseText = '';\n this.isXHR = false;\n }", "createRequest(settings) {\n // PERFORMANCE HACK:\n // Reduce OPTIONS preflight requests by removing the Accept-Datetime header\n // on requests for resources that are presumed to have been time-negotiated\n if (this.negotiatedResources[this.removeQuery(settings.url)]) {\n delete settings.headers['accept-datetime'];\n }\n // Create the actual XMLHttpRequest\n const request = new XMLHttpRequest();\n const reqHeaders = settings.headers;\n request.open(settings.method, settings.url, true);\n request.timeout = settings.timeout;\n for (const header in reqHeaders) {\n if (!(header in UNSAFE_REQUEST_HEADERS) && reqHeaders[header]) {\n request.setRequestHeader(header, reqHeaders[header]);\n }\n }\n // Create a proxy for the XMLHttpRequest\n const requestProxy = new events_1.EventEmitter();\n requestProxy.abort = () => { request.abort(); };\n // Handle the arrival of a response\n request.onload = () => {\n // Convert the response into an iterator\n const response = new stream_1.Readable();\n response.push(request.responseText || '');\n response.push(null);\n response.statusCode = request.status;\n response.responseUrl = request.responseURL;\n // Parse the response headers\n response.headers = {};\n const resHeaders = response.headers;\n const rawHeaders = request.getAllResponseHeaders() || '';\n const headerMatcher = /^([^:\\n\\r]+):[ \\t]*([^\\r\\n]*)$/mg;\n let match = headerMatcher.exec(rawHeaders);\n while (match) {\n resHeaders[match[1].toLowerCase()] = match[2];\n match = headerMatcher.exec(rawHeaders);\n }\n // Emit the response\n requestProxy.emit('response', response);\n // If the resource was time-negotiated, store its queryless URI\n // to enable the PERFORMANCE HACK explained above\n if (reqHeaders['accept-datetime'] && resHeaders['memento-datetime']) {\n const resource = this.removeQuery(resHeaders['content-location'] || settings.url);\n if (!this.negotiatedResources[resource]) {\n // Ensure the resource is not a timegate\n const links = resHeaders.link && parseLink(resHeaders.link);\n const timegate = this.removeQuery(links && links.timegate && links.timegate.url);\n if (resource !== timegate) {\n this.negotiatedResources[resource] = true;\n }\n }\n }\n };\n // Report errors and timeouts\n request.onerror = () => {\n requestProxy.emit('error', new Error('Error requesting ' + settings.url));\n };\n request.ontimeout = () => {\n requestProxy.emit('error', new Error('Timeout requesting ' + settings.url));\n };\n // Execute the request\n request.send();\n return requestProxy;\n }", "function inicializa_xhr() {\n if (window.XMLHttpRequest) {\n return new XMLHttpRequest();\n } else if (window.ActiveXObject) {\n return new ActiveXObject(\"Microsoft.XMLHTTP\");\n }\n}", "function xhr_function() {\n // Get new xhr object using default factory\n var xhr = jQuery.ajaxSettings.xhr(); /*global jQuery */\n // Copy the browser's native setRequestHeader method\n var setRequestHeader = xhr.setRequestHeader;\n // Replace with a wrapper\n xhr.setRequestHeader = function(name, value) {\n // Ignore the X-Requested-With header\n if (String(name) === \"X-Requested-With\") {\n return;\n }\n // Otherwise call the native setRequestHeader method\n // Note: setRequestHeader requires its 'this' to be the xhr object,\n // which is what 'this' is here when executed.\n setRequestHeader.call(this, name, value);\n };\n // pass it on to jQuery\n return xhr;\n}", "function ajaxExtend( target, src ) { // 8596\n\tvar key, deep, // 8597\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {}; // 8598\n // 8599\n\tfor ( key in src ) { // 8600\n\t\tif ( src[ key ] !== undefined ) { // 8601\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; // 8602\n\t\t} // 8603\n\t} // 8604\n\tif ( deep ) { // 8605\n\t\tjQuery.extend( true, target, deep ); // 8606\n\t} // 8607\n // 8608\n\treturn target; // 8609\n} // 8610", "create() {\n const opts = pick$1(\n this.opts,\n \"agent\",\n \"enablesXDR\",\n \"pfx\",\n \"key\",\n \"passphrase\",\n \"cert\",\n \"ca\",\n \"ciphers\",\n \"rejectUnauthorized\"\n );\n opts.xdomain = !!this.opts.xd;\n opts.xscheme = !!this.opts.xs;\n\n const xhr = (this.xhr = new xmlhttprequest(opts));\n const self = this;\n\n try {\n debug$1(\"xhr open %s: %s\", this.method, this.uri);\n xhr.open(this.method, this.uri, this.async);\n try {\n if (this.opts.extraHeaders) {\n xhr.setDisableHeaderCheck && xhr.setDisableHeaderCheck(true);\n for (let i in this.opts.extraHeaders) {\n if (this.opts.extraHeaders.hasOwnProperty(i)) {\n xhr.setRequestHeader(i, this.opts.extraHeaders[i]);\n }\n }\n }\n } catch (e) {}\n\n if (\"POST\" === this.method) {\n try {\n xhr.setRequestHeader(\"Content-type\", \"text/plain;charset=UTF-8\");\n } catch (e) {}\n }\n\n try {\n xhr.setRequestHeader(\"Accept\", \"*/*\");\n } catch (e) {}\n\n // ie6 check\n if (\"withCredentials\" in xhr) {\n xhr.withCredentials = this.opts.withCredentials;\n }\n\n if (this.opts.requestTimeout) {\n xhr.timeout = this.opts.requestTimeout;\n }\n\n if (this.hasXDR()) {\n xhr.onload = function() {\n self.onLoad();\n };\n xhr.onerror = function() {\n self.onError(xhr.responseText);\n };\n } else {\n xhr.onreadystatechange = function() {\n if (4 !== xhr.readyState) return;\n if (200 === xhr.status || 1223 === xhr.status) {\n self.onLoad();\n } else {\n // make sure the `error` event handler that's user-set\n // does not throw in the same tick and gets caught here\n setTimeout(function() {\n self.onError(typeof xhr.status === \"number\" ? xhr.status : 0);\n }, 0);\n }\n };\n }\n\n debug$1(\"xhr data %s\", this.data);\n xhr.send(this.data);\n } catch (e) {\n // Need to defer since .create() is called directly from the constructor\n // and thus the 'error' event can only be only bound *after* this exception\n // occurs. Therefore, also, we cannot throw here at all.\n setTimeout(function() {\n self.onError(e);\n }, 0);\n return;\n }\n\n if (typeof document !== \"undefined\") {\n this.index = Request.requestsCount++;\n Request.requests[this.index] = this;\n }\n }", "create() {\n const opts = pick(\n this.opts,\n \"agent\",\n \"enablesXDR\",\n \"pfx\",\n \"key\",\n \"passphrase\",\n \"cert\",\n \"ca\",\n \"ciphers\",\n \"rejectUnauthorized\"\n );\n opts.xdomain = !!this.opts.xd;\n opts.xscheme = !!this.opts.xs;\n\n const xhr = (this.xhr = new XMLHttpRequest(opts));\n const self = this;\n\n try {\n debug(\"xhr open %s: %s\", this.method, this.uri);\n xhr.open(this.method, this.uri, this.async);\n try {\n if (this.opts.extraHeaders) {\n xhr.setDisableHeaderCheck && xhr.setDisableHeaderCheck(true);\n for (let i in this.opts.extraHeaders) {\n if (this.opts.extraHeaders.hasOwnProperty(i)) {\n xhr.setRequestHeader(i, this.opts.extraHeaders[i]);\n }\n }\n }\n } catch (e) {}\n\n if (\"POST\" === this.method) {\n try {\n xhr.setRequestHeader(\"Content-type\", \"text/plain;charset=UTF-8\");\n } catch (e) {}\n }\n\n try {\n xhr.setRequestHeader(\"Accept\", \"*/*\");\n } catch (e) {}\n\n // ie6 check\n if (\"withCredentials\" in xhr) {\n xhr.withCredentials = this.opts.withCredentials;\n }\n\n if (this.opts.requestTimeout) {\n xhr.timeout = this.opts.requestTimeout;\n }\n\n if (this.hasXDR()) {\n xhr.onload = function() {\n self.onLoad();\n };\n xhr.onerror = function() {\n self.onError(xhr.responseText);\n };\n } else {\n xhr.onreadystatechange = function() {\n if (4 !== xhr.readyState) return;\n if (200 === xhr.status || 1223 === xhr.status) {\n self.onLoad();\n } else {\n // make sure the `error` event handler that's user-set\n // does not throw in the same tick and gets caught here\n setTimeout(function() {\n self.onError(typeof xhr.status === \"number\" ? xhr.status : 0);\n }, 0);\n }\n };\n }\n\n debug(\"xhr data %s\", this.data);\n xhr.send(this.data);\n } catch (e) {\n // Need to defer since .create() is called directly from the constructor\n // and thus the 'error' event can only be only bound *after* this exception\n // occurs. Therefore, also, we cannot throw here at all.\n setTimeout(function() {\n self.onError(e);\n }, 0);\n return;\n }\n\n if (typeof document !== \"undefined\") {\n this.index = Request.requestsCount++;\n Request.requests[this.index] = this;\n }\n }", "create() {\n const opts = pick(\n this.opts,\n \"agent\",\n \"enablesXDR\",\n \"pfx\",\n \"key\",\n \"passphrase\",\n \"cert\",\n \"ca\",\n \"ciphers\",\n \"rejectUnauthorized\"\n );\n opts.xdomain = !!this.opts.xd;\n opts.xscheme = !!this.opts.xs;\n\n const xhr = (this.xhr = new XMLHttpRequest(opts));\n const self = this;\n\n try {\n debug(\"xhr open %s: %s\", this.method, this.uri);\n xhr.open(this.method, this.uri, this.async);\n try {\n if (this.opts.extraHeaders) {\n xhr.setDisableHeaderCheck && xhr.setDisableHeaderCheck(true);\n for (let i in this.opts.extraHeaders) {\n if (this.opts.extraHeaders.hasOwnProperty(i)) {\n xhr.setRequestHeader(i, this.opts.extraHeaders[i]);\n }\n }\n }\n } catch (e) {}\n\n if (\"POST\" === this.method) {\n try {\n xhr.setRequestHeader(\"Content-type\", \"text/plain;charset=UTF-8\");\n } catch (e) {}\n }\n\n try {\n xhr.setRequestHeader(\"Accept\", \"*/*\");\n } catch (e) {}\n\n // ie6 check\n if (\"withCredentials\" in xhr) {\n xhr.withCredentials = this.opts.withCredentials;\n }\n\n if (this.opts.requestTimeout) {\n xhr.timeout = this.opts.requestTimeout;\n }\n\n if (this.hasXDR()) {\n xhr.onload = function() {\n self.onLoad();\n };\n xhr.onerror = function() {\n self.onError(xhr.responseText);\n };\n } else {\n xhr.onreadystatechange = function() {\n if (4 !== xhr.readyState) return;\n if (200 === xhr.status || 1223 === xhr.status) {\n self.onLoad();\n } else {\n // make sure the `error` event handler that's user-set\n // does not throw in the same tick and gets caught here\n setTimeout(function() {\n self.onError(typeof xhr.status === \"number\" ? xhr.status : 0);\n }, 0);\n }\n };\n }\n\n debug(\"xhr data %s\", this.data);\n xhr.send(this.data);\n } catch (e) {\n // Need to defer since .create() is called directly from the constructor\n // and thus the 'error' event can only be only bound *after* this exception\n // occurs. Therefore, also, we cannot throw here at all.\n setTimeout(function() {\n self.onError(e);\n }, 0);\n return;\n }\n\n if (typeof document !== \"undefined\") {\n this.index = Request.requestsCount++;\n Request.requests[this.index] = this;\n }\n }", "function JsonRpcSenderJquery(url, logger) {\n this.url = url;\n this.method = 'POST';\n this.logger = logger;\n }", "function xAR(options) { return AjaxRequest(options); }", "function easyHTTP() {\n this.http = new XMLHttpRequest();\n\n}", "function Ajax() {\n var xhr = new XMLHttpRequest();\n this.get = function (fetchFunc, options, cb) {\n if (fetchFunc === true) {\n var err,\n response = {};\n fetch(options.url, {\n method: options.method ? options.method : \"get\",\n mode: options.mode ? options.mode : \"\",\n headers: options.headers ? options.headers : {}\n }).then(function (res) {\n response.res = res;\n return res.json();\n }).then(function (data) {\n response.data = data\n return cb(err, response);\n }).catch(function (error) {\n err = error;\n return cb(err, response);\n });\n } else {\n xhr.open(\"get\", options.url, options.async ? options.async: true);\n if (options.type) {\n this.responseType = options.type;\n }\n if (options.headers) {\n Object.keys(options.headers).forEach(function (index) {\n xhr.setRequestHeader(index, options.headers[index]);\n });\n }\n xhr.setRequestHeader(\"ajax\", \"express\");\n xhr.onreadystatechange = function () {\n if (this.readyState === 0) {\n if (options.beforStart) {\n options.beforStart();\n }\n }\n if (this.readyState === 1) {\n if (options.onStart) {\n options.onStart(xhr);\n }\n }\n if (this.readyState === 3) {\n if (options.onProgress) {\n options.onProgress(xhr);\n }\n }\n var err;\n var data;\n if (this.readyState === 4) {\n if (this.status === 404 || this.status === 403 || this.status === 500) {\n err = {status: this.status};\n }\n if (this.readyState === 4 && this.status === 200) {\n data = {response: this.response, responseText: this.responseText, responseUrl: this.responseURL, responseXML: this.responseXML, responseType: this.responseType};\n }\n return cb(err, data);\n }\n };\n xhr.send();\n }\n }\n this.post = function (options, cb) {\n var err;\n var data;\n var formData = new FormData();\n if (options.url) {\n xhr.open(\"post\", options.url, options.async ? options.async : true);\n if (options.headers) {\n Object.keys(options.headers).forEach(function (index) {\n xhr.setRequestHeader(index, options.headers[index]);\n });\n }\n if (options.fullAjax) {\n return fullAjax(this);\n }\n if (options.data) {\n if (options.upload) {\n var file;\n file = options.upload.file;\n Array.from(file).forEach(function (fil) {\n formData.append(options.upload.fileName, fil);\n });\n if (options.upload.onload) {\n xhr.upload.onload = function (e) {\n return options.upload.onload(e);\n }\n }\n if (options.upload.onprogress) {\n xhr.upload.onprogress = function (e) {\n return options.upload.onprogress(e);\n }\n }\n if (options.upload.onerror) {\n xhr.upload.onerror = function (e) {\n return options.upload.onerror(e);\n }\n }\n }\n if (typeof options.data === \"object\") {\n Object.keys(options.data).forEach(function (item) {\n formData.append(item, options.data[item]);\n });\n options.data = formData;\n } else if (typeof options.data === \"string\") {\n xhr.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n }\n xhr.setRequestHeader(\"ajax\", \"express\");\n if (options.onabort) {\n xhr.onabort = function (e) {\n\n return options.onabort(e);\n };\n }\n xhr.onreadystatechange = function () {\n if (this.readyState === 0) {\n if (options.beforStart) {\n options.beforStart();\n }\n }\n if (this.readyState === 1) {\n if (options.onStart) {\n options.onStart();\n }\n }\n if (this.readyState === 3) {\n if (options.onProgress) {\n options.onProgress();\n }\n }\n\n if (this.status === 404 || this.status === 403 || this.status === 500) {\n err = {status: this.status};\n }\n if (this.readyState === 4 && this.status === 200) {\n data = {response: this.response, responseText: this.responseText, responseUrl: this.responseURL, responseXML: this.responseXML, responseType: this.responseType};\n }\n if (cb) {\n return cb(err, data);\n }\n };\n xhr.send(options.data);\n } else {\n err = new Error(\"bad request\");\n return console.error(\"cannot send empty data\");\n }\n } else {\n err = new Error(\"bad request\");\n return console.error(\"cannot send empty url\");\n }\n }\n }", "function initRequest() {\n if (window.XMLHttpRequest) {\n return new XMLHttpRequest();\n } else if (window.ActiveXObject) {\n isIE = true;\n return new ActiveXObject(\"Microsoft.XMLHTTP\");\n }\n }", "function xhrShim(opts){\n this.xhr = {\n getAllResponseHeaders: function(){ return ''; },\n getResponseHeader: function(){ return 'application/json'; },\n responseText: opts['responseText'],\n status: opts['status']\n };\n return this;\n}", "function xhrFactory() {\n return new XMLHttpRequest();\n }", "constructor(){\n super(...arguments);\n this._handlers = {};\n this._proxies = [];\n }", "function Ajax (options) {\n this.options = options || {};\n if (!this.options.url) return;\n var async = this.options.async === undefined ? true : !!this.options.async;\n this.request = window.XMLHttpRequest ?\n new XMLHttpRequest() :\n new ActiveXObject(\"Microsoft.XMLHTTP\");\n var _this = this;\n\n if (this.options.headers) {\n for (var name in this.options.headers) {\n this.request.setRequestHeader(name, this.options.headers[name]);\n }\n }\n\n this.request.open(this.options.method || CONST.METHOD.GET, this.getUrl(), async);\n var dataToSend = this.options.onrequest &&\n this.options.onrequest(this.options.data, this.request) ||\n this.options.data;\n (typeof dataToSend === CONST.STRING) || (dataToSend = JSON.stringify(dataToSend));\n this.request.send(dataToSend);\n\n if (async) {\n this.request.onreadystatechange = function () {\n if (_this.request.readyState === 4) {\n _this.options.onresponse && _this.options.onresponse(_this.request.responseText, _this.request, _this.options.data);\n }\n }\n } else {\n this.options.onresponse && this.options.onresponse(this.request.responseText, this.request, this.options.data);\n }\n }", "function initAjax(){\n\tif (window.XMLHttpRequest){\n\t\treturn new XMLHttpRequest(); // Firefox, Safari, ...\n\t}\n\telse if (window.ActiveXObject){\n\t\treturn new ActiveXObject('Microsoft.XMLHTTP'); // Internet Explorer \n\t}\n\telse{\n\t\treturn false;\n\t}\n}", "function ajaxExtend( target, src ) {\n var deep, key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n}", "function ajaxExtend( target, src ) {\n var deep, key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n}", "function ajaxExtend( target, src ) {\n var deep, key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n}", "function ajaxExtend( target, src ) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n}", "function AjaxRequest(token) {\n this.mode = \"ajax\";\n this.token = token;\n }", "request( method, endpoint, query = true, data = {}, loading = this.loading ) { \n\n // Validate the endpoint.\n if( this.utils().validate(method, endpoint) ) {\n\n // Save the endpoint and method.\n this.method = method;\n this.endpoint = endpoint;\n\n // Start loading.\n if( loading ) event.trigger('loading', true);\n \n // Generate a unique ID for the request.\n const pid = this.utils().pid();\n\n // Send the request.\n const request = $.ajax({\n dataType: 'json',\n url: this.utils().url(pid, query),\n method: method,\n data: data,\n context: this,\n cache: false\n }).always((response) => {\n \n // Capture response data.\n if( response.hasOwnProperty('paging') ) {\n \n const paging = {increments: this.paging.increments};\n \n this.$set(this, 'paging', $.extend(true, {}, paging, response.paging));\n \n }\n if( response.hasOwnProperty('filter') ) {\n \n this.$set(this, 'filter', $.extend(true, {}, response.filter));\n \n }\n if( response.hasOwnProperty('sort') ) {\n \n this.$set(this, 'sort', $.extend(true, {}, response.sort));\n \n }\n if( response.hasOwnProperty('index') ) {\n \n this.$set(this, 'indexing', $.extend(true, {}, response.index.data));\n this.index.order = response.index.order;\n \n }\n \n // Add the query string to the response data.\n response.query = query ? this.utils().query() : {};\n \n // End the loading animation.\n if( loading ) setTimeout(() => {\n \n event.trigger('loading', false);\n \n }, 250);\n\n });\n\n // Poll for request progress.\n this.progress(pid);\n \n // Return the request.\n return request;\n\n }\n\n }", "function ajaxExtend( target, src ) {\r\n\tvar deep, key,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\r\n\tfor ( key in src ) {\r\n\t\tif ( src[ key ] !== undefined ) {\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\r\n\t\t}\r\n\t}\r\n\tif ( deep ) {\r\n\t\tjQuery.extend( true, target, deep );\r\n\t}\r\n\r\n\treturn target;\r\n}", "function HttpRequestArgs() {\n var _this = this;\n var __arguments = new Array(arguments.length);\n for (var __argumentIndex = 0; __argumentIndex < __arguments.length; ++__argumentIndex) {\n __arguments[__argumentIndex] = arguments[__argumentIndex];\n }\n if (__arguments.length == 0) {\n _this = _super.call(this) || this;\n _this.fmliveswitchHttpRequestArgsInit();\n _this.setTimeout(15000);\n _this.setMethod(fm.liveswitch.HttpMethod.Post);\n _this.__headers = new fm.liveswitch.NameValueCollection();\n }\n else {\n throw new fm.liveswitch.Exception('Constructor overload does not exist with specified parameter count/type combination.');\n }\n return _this;\n }", "function createStandardXHR() {\n try {\n return new window.XMLHttpRequest();\n } catch (e) {\n }\n }", "function ajaxExtend( target, src ) {\r\n\tvar key, deep,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\r\n\tfor ( key in src ) {\r\n\t\tif ( src[ key ] !== undefined ) {\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\r\n\t\t}\r\n\t}\r\n\tif ( deep ) {\r\n\t\tjQuery.extend( true, target, deep );\r\n\t}\r\n\r\n\treturn target;\r\n}", "function ajaxExtend( target, src ) {\r\n\tvar key, deep,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\r\n\tfor ( key in src ) {\r\n\t\tif ( src[ key ] !== undefined ) {\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\r\n\t\t}\r\n\t}\r\n\tif ( deep ) {\r\n\t\tjQuery.extend( true, target, deep );\r\n\t}\r\n\r\n\treturn target;\r\n}", "function ajaxExtend( target, src ) {\n var deep, key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n}", "function LongPollingTransport() {\n var _super = new _cometd.LongPollingTransport();\n var that = (0, _cometd.derive)(_super);\n\n that.xhrSend = function (packet) {\n return $.ajax({\n url: packet.url,\n async: packet.sync !== true,\n type: 'POST',\n contentType: 'application/json;charset=UTF-8',\n data: packet.body,\n global: false,\n xhrFields: {\n // For asynchronous calls.\n withCredentials: true\n },\n beforeSend: function beforeSend(xhr) {\n // For synchronous calls.\n xhr.withCredentials = true;\n _setHeaders(xhr, packet.headers);\n // Returning false will abort the XHR send.\n return true;\n },\n success: packet.onSuccess,\n error: function error(xhr, reason, exception) {\n packet.onError(reason, exception);\n }\n });\n };\n\n return that;\n}", "function LongPollingTransport() {\n var _super = new _cometd.LongPollingTransport();\n var that = (0, _cometd.derive)(_super);\n\n that.xhrSend = function (packet) {\n return $.ajax({\n url: packet.url,\n async: packet.sync !== true,\n type: 'POST',\n contentType: 'application/json;charset=UTF-8',\n data: packet.body,\n global: false,\n xhrFields: {\n // For asynchronous calls.\n withCredentials: true\n },\n beforeSend: function beforeSend(xhr) {\n // For synchronous calls.\n xhr.withCredentials = true;\n _setHeaders(xhr, packet.headers);\n // Returning false will abort the XHR send.\n return true;\n },\n success: packet.onSuccess,\n error: function error(xhr, reason, exception) {\n packet.onError(reason, exception);\n }\n });\n };\n\n return that;\n}", "setAjaxData(ajax){\n\t\tif (_.isPlainObject(ajax))\n\t\t\tsuper.setAjaxData(ajax);\n\t\telse\n\t\t\tthis.values.ajax = (ajax===null) ? {} : ajax;\n\t\treturn this;\n\t}", "function Ajax() {\n\t\n\tthis.req = null;\t\t\t\t// XMLHttpRequest object\n\tthis.url = null;\t\t\t\t// Location of Server Script\n\tthis.method = \"POST\";\t\t\t// Method of delivery\n\tthis.async = true;\t\t\t\t// Continue JS execution\n\tthis.status = null;\t\t\t// HTTP status code\n\tthis.statusText = \"\";\t\t\t// HTTP status text\n\tthis.postData = null;\t\t\t// Data to send\n\tthis.readyState = null;\t\t// 0:Open, 1:loading, 2:loaded, 3:downloading, 4:completed\n\tthis.responseText = null;\t\t// Response as a String\n\tthis.responseXML = null;\t\t// Response as XML document\n\tthis.handleResp = null;\t\t// Response handler\n\tthis.responseFormat = \"text\"; \t// text, xml, object\n\tthis.mimeType = null;\t\t\t// Our MimeType\n\t\n\t\n\t// Init function\n\t// Create the XMLHttpRequest Object\n\tthis.init = function() {\n\t\tif(!this.req) {\n\t\t\ttry {\n\t\t\t\t// Try to create object for Firefox, Safari, IE7\n\t\t\t\tthis.req = new XMLHttpRequest();\n\t\t\t} catch(e) {\n\t\t\t\ttry {\n\t\t\t\t\t// Try to create object for later versions of IE\n\t\t\t\t\tthis.req = new ActiveXObject(\"MSXML2.XMLHTTP\");\n\t\t\t\t} catch(e) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// Try to create object for early versions of IE\n\t\t\t\t\t\tthis.req = new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\t\t\t\t} catch(e) {\n\t\t\t\t\t\t// Could not create an XMLHttpRequest object\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this.req;\n\t};\n\t\n\t// doReq function\n\t// Call init, prepare request, send and error if fail \n\t// Also deal with readyStates\n\tthis.doReq = function() {\n\t\tif(!this.init()) {\n\t\t\talert(\"ERROR: Could not create XMLHttpRequest object\");\n\t\t\treturn;\n\t\t}\n\t\tthis.req.open(this.method, this.url, this.async);\n\t\t\n\t\tif(this.mimeType) {\n\t\t\ttry {\n\t\t\t\treq.overrideMimeType(this.mimeType);\n\t\t\t} catch(e) {\n\t\t\t\talert(\"ERROR: Couldn't override MIME type\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tvar self = this; // Fix loss of scope\n\t\tthis.req.onreadystatechange = function() {\n\t\t\t\n\t\t\t// Switch on current ready state\n\t\t\tswitch(self.req.readyState) {\n\t\t\t\tcase 0: // open\n\t\t\t\t\t// Handle open\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1: // loading\n\t\t\t\t\t// Handle loading\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2: // loaded\n\t\t\t\t\t// Handle loaded\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3: // downloading\n\t\t\t\t\t// Handle downloading\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4: // completed\n\t\t\t\t\t\n\t\t\t\t\tswitch(self.responseFormat) {\n\t\t\t\t\t\tcase \"text\":\n\t\t\t\t\t\t\tresp = self.req.responseText;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"xml\":\n\t\t\t\t\t\t\tresp = self.req.responseXML;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"object\":\n\t\t\t\t\t\t\tresp = req;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(self.req.status >= 200 && self.req.status <=299) {\n\t\t\t\t\t\tself.handleResp(resp);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.handleErr(resp);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\talert(\"ERROR: Fatal readyState\");\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t};\n\t\t\n\t\tthis.req.send(this.postData);\n\t};\n\t\n\t// setMimeType Function\n\t// Set our MimeType\n\tthis.sexMimeType = function(mimeType) {\n\t\tthis.mimeType = mimeType;\n\t};\n\t\n\t// handleErr Function\n\t// Handle an error\n\tthis.handleErr = function() {\n\t\tvar errorWin;\n\t\ttry {\n\t\t\t//errorWin = window.open(\"\", \"errorWin\");\n\t\t\t//errorWin.document.body.innerHTML = this.responseText;\n\t\t} catch(e) {\n\t\t\talert( \"ERROR: An error occurred, but the error message cannot \"\n\t\t\t\t +\"be displayed.\\nPopup blockers must be disabled to see it.\\n\"\n\t\t\t\t +\"Status Code: \"+this.req.status+\"\\n\"\n\t\t\t\t +\"Status Description: \"+this.req.statusText);\n\t\t}\n\t};\n\t\n\t// setHandlerErr Function\n\t// Custom error handler\n\tthis.setHandlerErr = function(funcRef) {\n\t\tthis.handleErr = funcRef;\n\t};\n\t\n\t// setHandlerBoth Function\n\t// Handle both successes and errors\n\tthis.setHandlerBoth = function(funcRef) {\n\t\tthis.handleResp = funcRef;\n\t\tthis.handleErr = funcRef;\n\t};\n\t\n\t// abort Function\n\t// Stop a bad script\n\tthis.abort = function() {\n\t\tif(this.req) {\n\t\t\tthis.req.onreadystatechange = function() { };\n\t\t\tthis.req.abort();\n\t\t\tthis.req = null;\n\t\t}\n\t};\n\t\n\t// doGet Function\n\t// User function to call ajax script\n\tthis.doGet = function(url, hand, format) {\n\t\tthis.url = url;\n\t\tthis.handleResp = hand;\n\t\tthis.responseFormat = format || \"text\";\n\t\tthis.doReq();\n\t};\n}", "function ajaxExtend( target, src ) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n }", "function ajaxExtend( target, src ) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n}", "constructor () {\n this.xhr = new XMLHttpRequest(); //(AJAX ISLEMINI BASLATMAK ICIN XHR xhr objemizi olusturduk\n }", "create() {\n const opts = pick(this.opts, \"agent\", \"enablesXDR\", \"pfx\", \"key\", \"passphrase\", \"cert\", \"ca\", \"ciphers\", \"rejectUnauthorized\", \"autoUnref\");\n opts.xdomain = !!this.opts.xd;\n opts.xscheme = !!this.opts.xs;\n const xhr = this.xhr = new XMLHttpRequest(opts);\n\n try {\n debug(\"xhr open %s: %s\", this.method, this.uri);\n xhr.open(this.method, this.uri, this.async);\n\n try {\n if (this.opts.extraHeaders) {\n xhr.setDisableHeaderCheck && xhr.setDisableHeaderCheck(true);\n\n for (let i in this.opts.extraHeaders) {\n if (this.opts.extraHeaders.hasOwnProperty(i)) {\n xhr.setRequestHeader(i, this.opts.extraHeaders[i]);\n }\n }\n }\n } catch (e) {}\n\n if (\"POST\" === this.method) {\n try {\n xhr.setRequestHeader(\"Content-type\", \"text/plain;charset=UTF-8\");\n } catch (e) {}\n }\n\n try {\n xhr.setRequestHeader(\"Accept\", \"*/*\");\n } catch (e) {} // ie6 check\n\n\n if (\"withCredentials\" in xhr) {\n xhr.withCredentials = this.opts.withCredentials;\n }\n\n if (this.opts.requestTimeout) {\n xhr.timeout = this.opts.requestTimeout;\n }\n\n if (this.hasXDR()) {\n xhr.onload = () => {\n this.onLoad();\n };\n\n xhr.onerror = () => {\n this.onError(xhr.responseText);\n };\n } else {\n xhr.onreadystatechange = () => {\n if (4 !== xhr.readyState) return;\n\n if (200 === xhr.status || 1223 === xhr.status) {\n this.onLoad();\n } else {\n // make sure the `error` event handler that's user-set\n // does not throw in the same tick and gets caught here\n setTimeout(() => {\n this.onError(typeof xhr.status === \"number\" ? xhr.status : 0);\n }, 0);\n }\n };\n }\n\n debug(\"xhr data %s\", this.data);\n xhr.send(this.data);\n } catch (e) {\n // Need to defer since .create() is called directly from the constructor\n // and thus the 'error' event can only be only bound *after* this exception\n // occurs. Therefore, also, we cannot throw here at all.\n setTimeout(() => {\n this.onError(e);\n }, 0);\n return;\n }\n\n if (typeof document !== \"undefined\") {\n this.index = Request.requestsCount++;\n Request.requests[this.index] = this;\n }\n }", "function createAJAXObj() {\n\t\t try {\n\t\t return new XMLHttpRequest();\n\t\t } catch (er1) {\n\t\t try {\n\t\t return new ActiveXObject(\"Msxml3.XMLHTTP\");\n\t\t } catch (er2) {\n\t\t try {\n\t\t return new ActiveXObject(\"Msxml2.XMLHTTP.6.0\");\n\t\t } catch (er3) {\n\t\t try {\n\t\t return new ActiveXObject(\"Msxml2.XMLHTTP.3.0\");\n\t\t } catch (er4) {\n\t\t try {\n\t\t return new ActiveXObject(\"Msxml2.XMLHTTP\");\n\t\t } catch (er5) {\n\t\t try {\n\t\t return new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\t } catch (er6) {\n\t\t return false;\n\t\t }\n\t\t }\n\t\t }\n\t\t }\n\t\t }\n\t\t }\n\t\t}", "function ajaxExtend( target, src ) {\r\r\n\tvar key, deep,\r\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\r\n\tfor ( key in src ) {\r\r\n\t\tif ( src[ key ] !== undefined ) {\r\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\r\r\n\t\t}\r\r\n\t}\r\r\n\tif ( deep ) {\r\r\n\t\tjQuery.extend( true, target, deep );\r\r\n\t}\r\r\n}", "function XMLHttpRequest0() {\n \tthis._requestHeaders = [];\n \tthis.responseHeaders = {};\n \tthis.withCredentials = false;\n }" ]
[ "0.6992614", "0.6823499", "0.6370965", "0.6163726", "0.59268177", "0.5839015", "0.5838031", "0.5838031", "0.5830174", "0.5830174", "0.5830174", "0.5830174", "0.5830174", "0.5830174", "0.57987124", "0.5788393", "0.5788393", "0.57442814", "0.5731633", "0.5730933", "0.5663518", "0.5644015", "0.564337", "0.56139386", "0.56022835", "0.5590322", "0.5586338", "0.5569918", "0.5569572", "0.55648375", "0.55556643", "0.5554969", "0.5551514", "0.5549213", "0.55348015", "0.5514461", "0.55143666", "0.5509305", "0.5488415", "0.5486483", "0.5472545", "0.54662377", "0.5459077", "0.5455931", "0.5455931", "0.54494977", "0.54494977", "0.544379", "0.5441886", "0.5433015", "0.54310924", "0.54310924", "0.54290134", "0.5427976", "0.54130864", "0.5405248", "0.53923565", "0.5388431", "0.53712165", "0.5369813", "0.53595865", "0.53540057", "0.5353259", "0.5339948", "0.53385824", "0.5318211", "0.53138316", "0.53138316", "0.5309966", "0.5306661", "0.53056127", "0.5303014", "0.52966297", "0.5296125", "0.5290204", "0.52899957", "0.5279757", "0.5272967", "0.5271673", "0.5271673", "0.5271673", "0.5259567", "0.52510256", "0.5250117", "0.52497053", "0.5243602", "0.52425206", "0.5239407", "0.5239407", "0.52234524", "0.5220687", "0.5220687", "0.5219198", "0.5213506", "0.519937", "0.5191991", "0.5191002", "0.51845056", "0.51821536", "0.51808476", "0.51690286" ]
0.0
-1
Base inspection function for prefilters and transports
function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { var inspected = {}, seekingTransport = ( structure === transports ); function inspect( dataType ) { var selected; inspected[ dataType ] = true; jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) { options.dataTypes.unshift( dataTypeOrTransport ); inspect( dataTypeOrTransport ); return false; } else if ( seekingTransport ) { return !( selected = dataTypeOrTransport ); } } ); return selected; } return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR) {\n\n var inspected = {},\n seekingTransport = (structure === transports);\n\n function inspect(dataType) {\n var selected;\n inspected[ dataType ] = true;\n jQuery.each(structure[ dataType ] || [], function (_, prefilterOrFactory) {\n var dataTypeOrTransport = prefilterOrFactory(options, originalOptions, jqXHR);\n if (typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ]) {\n options.dataTypes.unshift(dataTypeOrTransport);\n inspect(dataTypeOrTransport);\n return false;\n } else if (seekingTransport) {\n return !(selected = dataTypeOrTransport);\n }\n });\n return selected;\n }\n\n return inspect(options.dataTypes[ 0 ]) || !inspected[ \"*\" ] && inspect(\"*\");\n }", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { // 8567\n // 8568\n\tvar inspected = {}, // 8569\n\t\tseekingTransport = ( structure === transports ); // 8570\n // 8571\n\tfunction inspect( dataType ) { // 8572\n\t\tvar selected; // 8573\n\t\tinspected[ dataType ] = true; // 8574\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { // 8575\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); // 8576\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" && // 8577\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) { // 8578\n // 8579\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport ); // 8580\n\t\t\t\tinspect( dataTypeOrTransport ); // 8581\n\t\t\t\treturn false; // 8582\n\t\t\t} else if ( seekingTransport ) { // 8583\n\t\t\t\treturn !( selected = dataTypeOrTransport ); // 8584\n\t\t\t} // 8585\n\t\t} ); // 8586\n\t\treturn selected; // 8587\n\t} // 8588\n // 8589\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" ); // 8590\n} // 8591", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\t\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\t\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\t\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\t\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\t\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\t\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\t\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\t\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\t\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\t\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\t\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\t\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\t\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\t\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\t\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\t\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\t\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\t\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\t\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\t\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\t\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\t\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\t\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\t\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\t\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\t\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\t\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\t\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\t\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\t\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n \tvar inspected = {},\n \t\tseekingTransport = ( structure === transports );\n\n \tfunction inspect( dataType ) {\n \t\tvar selected;\n \t\tinspected[ dataType ] = true;\n \t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n \t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n \t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n \t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n \t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n \t\t\t\tinspect( dataTypeOrTransport );\n \t\t\t\treturn false;\n \t\t\t} else if ( seekingTransport ) {\n \t\t\t\treturn !( selected = dataTypeOrTransport );\n \t\t\t}\n \t\t} );\n \t\treturn selected;\n \t}\n\n \treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n }", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\t\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\t\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn selected;\n\t\t}\n\t\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\t\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\t\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn selected;\n\t\t}\n\t\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n var inspected = {},\n seekingTransport = ( structure === transports );\n\n function inspect( dataType ) {\n var selected;\n inspected[ dataType ] = true;\n jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n if ( typeof dataTypeOrTransport === \"string\" &&\n !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n options.dataTypes.unshift( dataTypeOrTransport );\n inspect( dataTypeOrTransport );\n return false;\n } else if ( seekingTransport ) {\n return !( selected = dataTypeOrTransport );\n }\n } );\n return selected;\n }\n\n return inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n }", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n var inspected = {},\n seekingTransport = ( structure === transports );\n\n function inspect( dataType ) {\n var selected;\n inspected[ dataType ] = true;\n jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n if( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n options.dataTypes.unshift( dataTypeOrTransport );\n inspect( dataTypeOrTransport );\n return false;\n } else if ( seekingTransport ) {\n return !( selected = dataTypeOrTransport );\n }\n });\n return selected;\n }\n\n return inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n var inspected = {},\n seekingTransport = ( structure === transports );\n\n function inspect( dataType ) {\n var selected;\n inspected[ dataType ] = true;\n jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n if( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n options.dataTypes.unshift( dataTypeOrTransport );\n inspect( dataTypeOrTransport );\n return false;\n } else if ( seekingTransport ) {\n return !( selected = dataTypeOrTransport );\n }\n });\n return selected;\n }\n\n return inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\t\tvar inspected = {},\n\t\t\t\tseekingTransport = ( structure === transports );\n\n\t\t\tfunction inspect( dataType ) {\n\t\t\t\tvar selected;\n\t\t\t\tinspected[ dataType ] = true;\n\t\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn selected;\n\t\t\t}\n\n\t\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n var inspected = {},\n seekingTransport = ( structure === transports );\n\n function inspect( dataType ) {\n var selected;\n inspected[ dataType ] = true;\n jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n if ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n options.dataTypes.unshift( dataTypeOrTransport );\n inspect( dataTypeOrTransport );\n return false;\n } else if ( seekingTransport ) {\n return !( selected = dataTypeOrTransport );\n }\n });\n return selected;\n }\n\n return inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n var inspected = {},\n seekingTransport = ( structure === transports );\n\n function inspect( dataType ) {\n var selected;\n inspected[ dataType ] = true;\n jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n if ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n options.dataTypes.unshift( dataTypeOrTransport );\n inspect( dataTypeOrTransport );\n return false;\n } else if ( seekingTransport ) {\n return !( selected = dataTypeOrTransport );\n }\n });\n return selected;\n }\n\n return inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n var inspected = {},\n seekingTransport = ( structure === transports );\n\n function inspect( dataType ) {\n var selected;\n inspected[ dataType ] = true;\n jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n if ( typeof dataTypeOrTransport === \"string\" &&\n !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n options.dataTypes.unshift( dataTypeOrTransport );\n inspect( dataTypeOrTransport );\n return false;\n } else if ( seekingTransport ) {\n return !( selected = dataTypeOrTransport );\n }\n } );\n return selected;\n }\n\n return inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\t\tvar inspected = {},\n\t\t\tseekingTransport = ( structure === transports );\n\n\t\tfunction inspect( dataType ) {\n\t\t\tvar selected;\n\t\t\tinspected[ dataType ] = true;\n\t\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\t\treturn false;\n\t\t\t\t} else if ( seekingTransport ) {\n\t\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn selected;\n\t\t}\n\n\t\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n\t}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\r\n\r\n\tvar inspected = {},\r\n\t\tseekingTransport = ( structure === transports );\r\n\r\n\tfunction inspect( dataType ) {\r\n\t\tvar selected;\r\n\t\tinspected[ dataType ] = true;\r\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\r\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\r\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\r\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\r\n\t\t\t\tinspect( dataTypeOrTransport );\r\n\t\t\t\treturn false;\r\n\t\t\t} else if ( seekingTransport ) {\r\n\t\t\t\treturn !( selected = dataTypeOrTransport );\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn selected;\r\n\t}\r\n\r\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\r\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n var inspected = {},\n seekingTransport = ( structure === transports );\n\n function inspect( dataType ) {\n var selected;\n inspected[ dataType ] = true;\n jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n if ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n options.dataTypes.unshift( dataTypeOrTransport );\n inspect( dataTypeOrTransport );\n return false;\n } else if ( seekingTransport ) {\n return !( selected = dataTypeOrTransport );\n }\n });\n return selected;\n }\n\n return inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n \n var inspected = {},\n seekingTransport = ( structure === transports );\n \n function inspect( dataType ) {\n var selected;\n inspected[ dataType ] = true;\n jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n if ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n options.dataTypes.unshift( dataTypeOrTransport );\n inspect( dataTypeOrTransport );\n return false;\n } else if ( seekingTransport ) {\n return !( selected = dataTypeOrTransport );\n }\n });\n return selected;\n }\n \n return inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n }", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\r\n\r\n\tvar inspected = {},\r\n\t\tseekingTransport = ( structure === transports );\r\n\r\n\tfunction inspect( dataType ) {\r\n\t\tvar selected;\r\n\t\tinspected[ dataType ] = true;\r\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\r\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\r\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\r\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\r\n\r\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\r\n\t\t\t\tinspect( dataTypeOrTransport );\r\n\t\t\t\treturn false;\r\n\t\t\t} else if ( seekingTransport ) {\r\n\t\t\t\treturn !( selected = dataTypeOrTransport );\r\n\t\t\t}\r\n\t\t} );\r\n\t\treturn selected;\r\n\t}\r\n\r\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\r\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\r\n\r\n\tvar inspected = {},\r\n\t\tseekingTransport = ( structure === transports );\r\n\r\n\tfunction inspect( dataType ) {\r\n\t\tvar selected;\r\n\t\tinspected[ dataType ] = true;\r\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\r\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\r\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\r\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\r\n\r\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\r\n\t\t\t\tinspect( dataTypeOrTransport );\r\n\t\t\t\treturn false;\r\n\t\t\t} else if ( seekingTransport ) {\r\n\t\t\t\treturn !( selected = dataTypeOrTransport );\r\n\t\t\t}\r\n\t\t} );\r\n\t\treturn selected;\r\n\t}\r\n\r\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\r\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n var inspected = {},\n seekingTransport = ( structure === transports );\n\n function inspect( dataType ) {\n var selected;\n inspected[ dataType ] = true;\n jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n if ( typeof dataTypeOrTransport === \"string\" &&\n !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n options.dataTypes.unshift( dataTypeOrTransport );\n inspect( dataTypeOrTransport );\n return false;\n } else if ( seekingTransport ) {\n return !( selected = dataTypeOrTransport );\n }\n } );\n return selected;\n }\n\n return inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n }", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}", "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}" ]
[ "0.6271232", "0.62278324", "0.6089844", "0.6089844", "0.6089844", "0.6089844", "0.6089844", "0.6089844", "0.6089844", "0.6089844", "0.6089844", "0.6089844", "0.607385", "0.60586876", "0.60586876", "0.6036968", "0.601241", "0.601241", "0.601241", "0.601241", "0.601241", "0.60117346", "0.60117346", "0.60115844", "0.601093", "0.601093", "0.6002863", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5991916", "0.5987543", "0.59847116", "0.59779847", "0.59711784", "0.59711784", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5951495", "0.5948276", "0.5947033", "0.5947033", "0.5947033", "0.5947033", "0.5947033", "0.5947033", "0.5947033", "0.5947033", "0.5947033", "0.5947033" ]
0.0
-1
A special extend for ajax options that takes "flat" options (not to be deep extended) Fixes 9887
function ajaxExtend( target, src ) { var key, deep, flatOptions = jQuery.ajaxSettings.flatOptions || {}; for ( key in src ) { if ( src[ key ] !== undefined ) { ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; } } if ( deep ) { jQuery.extend( true, target, deep ); } return target; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions || {};for(key in src) {if(src[key] !== undefined){(flatOptions[key]?target:deep || (deep = {}))[key] = src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var deep,key,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target,src){var deep,key,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "function ajaxExtend(target, src) {\n var deep, key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[ key ] !== undefined) {\n (flatOptions[ key ] ? target : (deep || (deep = {})))[ key ] = src[ key ];\n }\n }\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function K(e,t){var n,o,i=me.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:o||(o={}))[n]=t[n]);return o&&me.extend(!0,e,o),e}", "function ajaxExtend( target, src ) { // 8596\n\tvar key, deep, // 8597\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {}; // 8598\n // 8599\n\tfor ( key in src ) { // 8600\n\t\tif ( src[ key ] !== undefined ) { // 8601\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; // 8602\n\t\t} // 8603\n\t} // 8604\n\tif ( deep ) { // 8605\n\t\tjQuery.extend( true, target, deep ); // 8606\n\t} // 8607\n // 8608\n\treturn target; // 8609\n} // 8610", "function R(a,b){var c,d,e=fa.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&fa.extend(!0,a,d),a}", "function ajaxExtend( target, src ) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n }", "function ajaxExtend( target, src ) {\n\t var key, deep,\n\t flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t for ( key in src ) {\n\t if ( src[ key ] !== undefined ) {\n\t ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t }\n\t }\n\t if ( deep ) {\n\t jQuery.extend( true, target, deep );\n\t }\n\t}", "function ajaxExtend(target, src) {\r\n\t\tvar key, deep,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\t\tfor (key in src) {\r\n\t\t\tif (src[key] !== undefined) {\r\n\t\t\t\t(flatOptions[key] ? target : (deep || (deep = {})))[key] = src[key];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (deep) {\r\n\t\t\tjQuery.extend(true, target, deep);\r\n\t\t}\r\n\t\treturn target;\r\n\t}", "function ajaxExtend(target, src) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : (deep || (deep = {})))[key] = src[key];\n }\n }\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function ajaxExtend( target, src ) {\r\n\tvar key, deep,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\r\n\tfor ( key in src ) {\r\n\t\tif ( src[ key ] !== undefined ) {\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\r\n\t\t}\r\n\t}\r\n\tif ( deep ) {\r\n\t\tjQuery.extend( true, target, deep );\r\n\t}\r\n\r\n\treturn target;\r\n}", "function ajaxExtend( target, src ) {\r\n\tvar key, deep,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\r\n\tfor ( key in src ) {\r\n\t\tif ( src[ key ] !== undefined ) {\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\r\n\t\t}\r\n\t}\r\n\tif ( deep ) {\r\n\t\tjQuery.extend( true, target, deep );\r\n\t}\r\n\r\n\treturn target;\r\n}", "function ajaxExtend( target, src ) {\r\n\tvar key, deep,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\tfor ( key in src ) {\r\n\t\tif ( src[ key ] !== undefined ) {\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\r\n\t\t}\r\n\t}\r\n\tif ( deep ) {\r\n\t\tjQuery.extend( true, target, deep );\r\n\t}\r\n}", "function ajaxExtend( target, src ) {\r\n\tvar deep, key,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\r\n\tfor ( key in src ) {\r\n\t\tif ( src[ key ] !== undefined ) {\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\r\n\t\t}\r\n\t}\r\n\tif ( deep ) {\r\n\t\tjQuery.extend( true, target, deep );\r\n\t}\r\n\r\n\treturn target;\r\n}", "function ajaxExtend(target, src) {\n var deep,\n key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function ajaxExtend(target, src) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n ( flatOptions[key] ? target : ( deep || ( deep = {} ) ) )[key] = src[key];\n }\n }\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function ajaxExtend( target, src ) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n }", "function ajaxExtend( target, src ) {\r\r\n\tvar key, deep,\r\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\r\n\tfor ( key in src ) {\r\r\n\t\tif ( src[ key ] !== undefined ) {\r\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\r\r\n\t\t}\r\r\n\t}\r\r\n\tif ( deep ) {\r\r\n\t\tjQuery.extend( true, target, deep );\r\r\n\t}\r\r\n}", "function ajaxExtend( target, src ) {\n \tvar key, deep,\n \t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n \tfor ( key in src ) {\n \t\tif ( src[ key ] !== undefined ) {\n \t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n \t\t}\n \t}\n \tif ( deep ) {\n \t\tjQuery.extend( true, target, deep );\n \t}\n\n \treturn target;\n }", "function ajaxExtend( target, src ) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n}", "function ajaxExtend( target, src ) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n}", "function ajaxExtend( target, src ) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n}", "function ajaxExtend( target, src ) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n}", "function L(a,b){var c,d,e=_.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&_.extend(!0,a,d),a}", "function ajaxExtend( target, src ) {\n\t\t\tvar key, deep,\n\t\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\t\t\tfor ( key in src ) {\n\t\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( deep ) {\n\t\t\t\tjQuery.extend( true, target, deep );\n\t\t\t}\n\n\t\t\treturn target;\n\t\t}", "function ajaxExtend(target, src) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : (deep || (deep = {})))[key] = src[key];\n }\n }\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function ajaxExtend( target, src ) {\n var deep, key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n \n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n \n return target;\n }", "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "function ajaxExtend(target, src) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : (deep || (deep = {})))[key] = src[key];\n }\n }\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n }", "function ajaxExtend(target, src) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : (deep || (deep = {})))[key] = src[key];\n }\n }\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n }", "function ajaxExtend(target, src) {\r\n\t\tvar deep, key,\r\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\r\n\t\tfor (key in src) {\r\n\t\t\tif (src[key] !== undefined) {\r\n\t\t\t\t(flatOptions[key] ? target : (deep || (deep = {})))[key] = src[key];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (deep) {\r\n\t\t\tjQuery.extend(true, target, deep);\r\n\t\t}\r\n\r\n\t\treturn target;\r\n\t}", "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "function ajaxExtend( target, src ) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n}", "function ajaxExtend( target, src ) {\n var deep, key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n}", "function ajaxExtend( target, src ) {\n var deep, key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n}", "function ajaxExtend( target, src ) {\n var deep, key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n}", "function ajaxExtend( target, src ) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n}", "function ajaxExtend(target, src) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n ( flatOptions[key] ? target : ( deep || (deep = {}) ) )[key] = src[key];\n }\n }\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function ajaxExtend( target, src ) {\n var deep, key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n }", "function ajaxExtend(target, src) {\n var key,\n deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function ajaxExtend(target, src) {\n var key,\n deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function ajaxExtend(target, src) {\n var key,\n deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function ajaxExtend(target, src) {\n var key,\n deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function ajaxExtend(target, src) {\n var key,\n deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function ajaxExtend(target, src) {\n var key,\n deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function ajaxExtend(target, src) {\n var key,\n deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function ajaxExtend(target, src) {\n var key,\n deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "function ajaxExtend(target, src) {\n var deep, key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n ( flatOptions[key] ? target : ( deep || ( deep = {} ) ) )[key] = src[key];\n }\n }\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }" ]
[ "0.76659936", "0.7609184", "0.75649804", "0.75649804", "0.75649804", "0.75649804", "0.75649804", "0.75649804", "0.75458026", "0.75458026", "0.75258815", "0.74553305", "0.7317385", "0.73116934", "0.72906065", "0.7289743", "0.72549486", "0.7240588", "0.72396123", "0.72396123", "0.7224783", "0.7218488", "0.7214654", "0.72092605", "0.720525", "0.72028714", "0.72019", "0.7198284", "0.7198284", "0.7198284", "0.7198284", "0.7175499", "0.71737576", "0.71707815", "0.71699077", "0.7167529", "0.7167529", "0.7167529", "0.7167529", "0.7167529", "0.7167529", "0.7167529", "0.7167529", "0.7167529", "0.7167529", "0.716703", "0.716703", "0.71665037", "0.716561", "0.716561", "0.71561563", "0.7152246", "0.7152246", "0.7152246", "0.7150694", "0.71467435", "0.71448284", "0.7143285", "0.7143285", "0.7143285", "0.7143285", "0.7143285", "0.7143285", "0.7143285", "0.7143285", "0.71391195" ]
0.0
-1
Handles responses to an ajax request: finds the right dataType (mediates between contenttype and expected dataType) returns the corresponding response
function ajaxHandleResponses( s, jqXHR, responses ) { var ct, type, finalDataType, firstDataType, contents = s.contents, dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process while ( dataTypes[ 0 ] === "*" ) { dataTypes.shift(); if ( ct === undefined ) { ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); } } // Check if we're dealing with a known content-type if ( ct ) { for ( type in contents ) { if ( contents[ type ] && contents[ type ].test( ct ) ) { dataTypes.unshift( type ); break; } } } // Check to see if we have a response for the expected dataType if ( dataTypes[ 0 ] in responses ) { finalDataType = dataTypes[ 0 ]; } else { // Try convertible dataTypes for ( type in responses ) { if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { finalDataType = type; break; } if ( !firstDataType ) { firstDataType = type; } } // Or just use first one finalDataType = finalDataType || firstDataType; } // If we found a dataType // We add the dataType to the list if needed // and return the corresponding response if ( finalDataType ) { if ( finalDataType !== dataTypes[ 0 ] ) { dataTypes.unshift( finalDataType ); } return responses[ finalDataType ]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ajaxHandleResponses(s,jqXHR,responses){var firstDataType,ct,finalDataType,type,contents=s.contents,dataTypes=s.dataTypes;// Remove auto dataType and get content-type in the process\nwhile(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\");}}// Check if we're dealing with a known content-type\nif(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}// Check to see if we have a response for the expected dataType\nif(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{// Try convertible dataTypes\nfor(type in responses){if(!dataTypes[0]||s.converters[type+\" \"+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}}// Or just use first one\nfinalDataType=finalDataType||firstDataType;}// If we found a dataType\n// We add the dataType to the list if needed\n// and return the corresponding response\nif(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;// Remove auto dataType and get content-type in the process\nwhile(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\");}}// Check if we're dealing with a known content-type\nif(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}// Check to see if we have a response for the expected dataType\nif(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{// Try convertible dataTypes\nfor(type in responses){if(!dataTypes[0]||s.converters[type+\" \"+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}}// Or just use first one\nfinalDataType=finalDataType||firstDataType;}// If we found a dataType\n// We add the dataType to the list if needed\n// and return the corresponding response\nif(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;// Remove auto dataType and get content-type in the process\nwhile(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\");}}// Check if we're dealing with a known content-type\nif(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}// Check to see if we have a response for the expected dataType\nif(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{// Try convertible dataTypes\nfor(type in responses){if(!dataTypes[0]||s.converters[type+\" \"+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}}// Or just use first one\nfinalDataType=finalDataType||firstDataType;}// If we found a dataType\n// We add the dataType to the list if needed\n// and return the corresponding response\nif(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes; // Remove auto dataType and get content-type in the process\nwhile(dataTypes[0] === \"*\") {dataTypes.shift();if(ct === undefined){ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");}} // Check if we're dealing with a known content-type\nif(ct){for(type in contents) {if(contents[type] && contents[type].test(ct)){dataTypes.unshift(type);break;}}} // Check to see if we have a response for the expected dataType\nif(dataTypes[0] in responses){finalDataType = dataTypes[0];}else { // Try convertible dataTypes\nfor(type in responses) {if(!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]){finalDataType = type;break;}if(!firstDataType){firstDataType = type;}} // Or just use first one\nfinalDataType = finalDataType || firstDataType;} // If we found a dataType\n// We add the dataType to the list if needed\n// and return the corresponding response\nif(finalDataType){if(finalDataType !== dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes; // Remove auto dataType and get content-type in the process\nwhile(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\");}} // Check if we're dealing with a known content-type\nif(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}} // Check to see if we have a response for the expected dataType\nif(dataTypes[0] in responses){finalDataType=dataTypes[0];}else { // Try convertible dataTypes\nfor(type in responses){if(!dataTypes[0]||s.converters[type+\" \"+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}} // Or just use first one\nfinalDataType=finalDataType||firstDataType;} // If we found a dataType\n// We add the dataType to the list if needed\n// and return the corresponding response\nif(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;// Remove auto dataType and get content-type in the process\n\twhile(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\");}}// Check if we're dealing with a known content-type\n\tif(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}// Check to see if we have a response for the expected dataType\n\tif(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{// Try convertible dataTypes\n\tfor(type in responses){if(!dataTypes[0]||s.converters[type+\" \"+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}}// Or just use first one\n\tfinalDataType=finalDataType||firstDataType;}// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes; // Remove auto dataType and get content-type in the process\n\twhile(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\");}} // Check if we're dealing with a known content-type\n\tif(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}} // Check to see if we have a response for the expected dataType\n\tif(dataTypes[0] in responses){finalDataType=dataTypes[0];}else { // Try convertible dataTypes\n\tfor(type in responses){if(!dataTypes[0]||s.converters[type+\" \"+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}} // Or just use first one\n\tfinalDataType=finalDataType||firstDataType;} // If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;// Remove auto dataType and get content-type in the process\r\n\twhile(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\");}}// Check if we're dealing with a known content-type\r\n\tif(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}// Check to see if we have a response for the expected dataType\r\n\tif(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{// Try convertible dataTypes\r\n\tfor(type in responses){if(!dataTypes[0]||s.converters[type+\" \"+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}}// Or just use first one\r\n\tfinalDataType=finalDataType||firstDataType;}// If we found a dataType\r\n\t// We add the dataType to the list if needed\r\n\t// and return the corresponding response\r\n\tif(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "function ajaxHandleResponses(s,jqXHR,responses){var firstDataType,ct,finalDataType,type,contents=s.contents,dataTypes=s.dataTypes;// Remove auto dataType and get content-type in the process\n while(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\");}}// Check if we're dealing with a known content-type\n if(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}// Check to see if we have a response for the expected dataType\n if(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{// Try convertible dataTypes\n for(type in responses){if(!dataTypes[0]||s.converters[type+\" \"+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}}// Or just use first one\n finalDataType=finalDataType||firstDataType;}// If we found a dataType\n// We add the dataType to the list if needed\n// and return the corresponding response\n if(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n var firstDataType, ct, finalDataType, type,\n contents = s.contents,\n dataTypes = s.dataTypes;\n \n // Remove auto dataType and get content-type in the process\n while ( dataTypes[ 0 ] === \"*\" ) {\n dataTypes.shift();\n if ( ct === undefined ) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n \n // Check if we're dealing with a known content-type\n if ( ct ) {\n for ( type in contents ) {\n if ( contents[ type ] && contents[ type ].test( ct ) ) {\n dataTypes.unshift( type );\n break;\n }\n }\n }\n \n // Check to see if we have a response for the expected dataType\n if ( dataTypes[ 0 ] in responses ) {\n finalDataType = dataTypes[ 0 ];\n } else {\n // Try convertible dataTypes\n for ( type in responses ) {\n if ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n finalDataType = type;\n break;\n }\n if ( !firstDataType ) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n \n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if ( finalDataType ) {\n if ( finalDataType !== dataTypes[ 0 ] ) {\n dataTypes.unshift( finalDataType );\n }\n return responses[ finalDataType ];\n }\n }", "function ajaxHandleResponses( s, jqXHR, responses ) {\n var firstDataType, ct, finalDataType, type,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while ( dataTypes[ 0 ] === \"*\" ) {\n dataTypes.shift();\n if ( ct === undefined ) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if ( ct ) {\n for ( type in contents ) {\n if ( contents[ type ] && contents[ type ].test( ct ) ) {\n dataTypes.unshift( type );\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if ( dataTypes[ 0 ] in responses ) {\n finalDataType = dataTypes[ 0 ];\n } else {\n // Try convertible dataTypes\n for ( type in responses ) {\n if ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n finalDataType = type;\n break;\n }\n if ( !firstDataType ) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if ( finalDataType ) {\n if ( finalDataType !== dataTypes[ 0 ] ) {\n dataTypes.unshift( finalDataType );\n }\n return responses[ finalDataType ];\n }\n}", "function ajaxHandleResponses(s, jqXHR, responses) {\n var firstDataType,\n ct,\n finalDataType,\n type,\n contents = s.contents,\n dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process\n\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n } // Check if we're dealing with a known content-type\n\n\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n } // Check to see if we have a response for the expected dataType\n\n\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n\n if (!firstDataType) {\n firstDataType = type;\n }\n } // Or just use first one\n\n\n finalDataType = finalDataType || firstDataType;\n } // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n\n\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n\n return responses[finalDataType];\n }\n }", "function ajaxHandleResponses(s, jqXHR, responses) {\n var firstDataType, ct, finalDataType, type,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while (dataTypes[ 0 ] === \"*\") {\n dataTypes.shift();\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if (ct) {\n for (type in contents) {\n if (contents[ type ] && contents[ type ].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if (dataTypes[ 0 ] in responses) {\n finalDataType = dataTypes[ 0 ];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ]) {\n finalDataType = type;\n break;\n }\n if (!firstDataType) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if (finalDataType) {\n if (finalDataType !== dataTypes[ 0 ]) {\n dataTypes.unshift(finalDataType);\n }\n return responses[ finalDataType ];\n }\n }", "function ajaxHandleResponses( s, jqXHR, responses ) {\n var firstDataType, ct, finalDataType, type,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while ( dataTypes[ 0 ] === \"*\" ) {\n dataTypes.shift();\n if ( ct === undefined ) {\n ct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n }\n }\n\n // Check if we're dealing with a known content-type\n if ( ct ) {\n for ( type in contents ) {\n if ( contents[ type ] && contents[ type ].test( ct ) ) {\n dataTypes.unshift( type );\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if ( dataTypes[ 0 ] in responses ) {\n finalDataType = dataTypes[ 0 ];\n } else {\n\n // Try convertible dataTypes\n for ( type in responses ) {\n if ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n finalDataType = type;\n break;\n }\n if ( !firstDataType ) {\n firstDataType = type;\n }\n }\n\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if ( finalDataType ) {\n if ( finalDataType !== dataTypes[ 0 ] ) {\n dataTypes.unshift( finalDataType );\n }\n return responses[ finalDataType ];\n }\n }", "function ajaxHandleResponses(s, jqXHR, responses) {\n var ct,\n type,\n finalDataType,\n firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process\n\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n } // Check if we're dealing with a known content-type\n\n\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n } // Check to see if we have a response for the expected dataType\n\n\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n\n if (!firstDataType) {\n firstDataType = type;\n }\n } // Or just use first one\n\n\n finalDataType = finalDataType || firstDataType;\n } // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n\n\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n\n return responses[finalDataType];\n }\n }", "function ajaxHandleResponses(s, jqXHR, responses) {\n var ct,\n type,\n finalDataType,\n firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process\n\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n } // Check if we're dealing with a known content-type\n\n\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n } // Check to see if we have a response for the expected dataType\n\n\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n\n if (!firstDataType) {\n firstDataType = type;\n }\n } // Or just use first one\n\n\n finalDataType = finalDataType || firstDataType;\n } // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n\n\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n\n return responses[finalDataType];\n }\n }", "function ajaxHandleResponses(s, jqXHR, responses) {\n var ct,\n type,\n finalDataType,\n firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process\n\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n } // Check if we're dealing with a known content-type\n\n\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n } // Check to see if we have a response for the expected dataType\n\n\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n\n if (!firstDataType) {\n firstDataType = type;\n }\n } // Or just use first one\n\n\n finalDataType = finalDataType || firstDataType;\n } // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n\n\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n\n return responses[finalDataType];\n }\n }", "function ajaxHandleResponses(s, jqXHR, responses) {\n var ct,\n type,\n finalDataType,\n firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process\n\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n } // Check if we're dealing with a known content-type\n\n\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n } // Check to see if we have a response for the expected dataType\n\n\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n\n if (!firstDataType) {\n firstDataType = type;\n }\n } // Or just use first one\n\n\n finalDataType = finalDataType || firstDataType;\n } // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n\n\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n\n return responses[finalDataType];\n }\n }", "function ajaxHandleResponses(s, jqXHR, responses) {\n var ct,\n type,\n finalDataType,\n firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process\n\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n } // Check if we're dealing with a known content-type\n\n\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n } // Check to see if we have a response for the expected dataType\n\n\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n\n if (!firstDataType) {\n firstDataType = type;\n }\n } // Or just use first one\n\n\n finalDataType = finalDataType || firstDataType;\n } // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n\n\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n\n return responses[finalDataType];\n }\n }", "function ajaxHandleResponses(s, jqXHR, responses) {\n var ct,\n type,\n finalDataType,\n firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process\n\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n } // Check if we're dealing with a known content-type\n\n\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n } // Check to see if we have a response for the expected dataType\n\n\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n\n if (!firstDataType) {\n firstDataType = type;\n }\n } // Or just use first one\n\n\n finalDataType = finalDataType || firstDataType;\n } // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n\n\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n\n return responses[finalDataType];\n }\n }", "function ajaxHandleResponses(s, jqXHR, responses) {\n var ct,\n type,\n finalDataType,\n firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process\n\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n } // Check if we're dealing with a known content-type\n\n\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n } // Check to see if we have a response for the expected dataType\n\n\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n\n if (!firstDataType) {\n firstDataType = type;\n }\n } // Or just use first one\n\n\n finalDataType = finalDataType || firstDataType;\n } // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n\n\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n\n return responses[finalDataType];\n }\n }", "function ajaxHandleResponses(s, jqXHR, responses) {\n var ct,\n type,\n finalDataType,\n firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process\n\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n } // Check if we're dealing with a known content-type\n\n\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n } // Check to see if we have a response for the expected dataType\n\n\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n\n if (!firstDataType) {\n firstDataType = type;\n }\n } // Or just use first one\n\n\n finalDataType = finalDataType || firstDataType;\n } // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n\n\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n\n return responses[finalDataType];\n }\n }", "function ajaxHandleResponses( s, jqXHR, responses ) {\r\n\r\n\tvar ct, type, finalDataType, firstDataType,\r\n\t\tcontents = s.contents,\r\n\t\tdataTypes = s.dataTypes;\r\n\r\n\t// Remove auto dataType and get content-type in the process\r\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\r\n\t\tdataTypes.shift();\r\n\t\tif ( ct === undefined ) {\r\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\r\n\t\t}\r\n\t}\r\n\r\n\t// Check if we're dealing with a known content-type\r\n\tif ( ct ) {\r\n\t\tfor ( type in contents ) {\r\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\r\n\t\t\t\tdataTypes.unshift( type );\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Check to see if we have a response for the expected dataType\r\n\tif ( dataTypes[ 0 ] in responses ) {\r\n\t\tfinalDataType = dataTypes[ 0 ];\r\n\t} else {\r\n\r\n\t\t// Try convertible dataTypes\r\n\t\tfor ( type in responses ) {\r\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\r\n\t\t\t\tfinalDataType = type;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif ( !firstDataType ) {\r\n\t\t\t\tfirstDataType = type;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Or just use first one\r\n\t\tfinalDataType = finalDataType || firstDataType;\r\n\t}\r\n\r\n\t// If we found a dataType\r\n\t// We add the dataType to the list if needed\r\n\t// and return the corresponding response\r\n\tif ( finalDataType ) {\r\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\r\n\t\t\tdataTypes.unshift( finalDataType );\r\n\t\t}\r\n\t\treturn responses[ finalDataType ];\r\n\t}\r\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\r\n\r\n\tvar ct, type, finalDataType, firstDataType,\r\n\t\tcontents = s.contents,\r\n\t\tdataTypes = s.dataTypes;\r\n\r\n\t// Remove auto dataType and get content-type in the process\r\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\r\n\t\tdataTypes.shift();\r\n\t\tif ( ct === undefined ) {\r\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\r\n\t\t}\r\n\t}\r\n\r\n\t// Check if we're dealing with a known content-type\r\n\tif ( ct ) {\r\n\t\tfor ( type in contents ) {\r\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\r\n\t\t\t\tdataTypes.unshift( type );\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Check to see if we have a response for the expected dataType\r\n\tif ( dataTypes[ 0 ] in responses ) {\r\n\t\tfinalDataType = dataTypes[ 0 ];\r\n\t} else {\r\n\r\n\t\t// Try convertible dataTypes\r\n\t\tfor ( type in responses ) {\r\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\r\n\t\t\t\tfinalDataType = type;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif ( !firstDataType ) {\r\n\t\t\t\tfirstDataType = type;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Or just use first one\r\n\t\tfinalDataType = finalDataType || firstDataType;\r\n\t}\r\n\r\n\t// If we found a dataType\r\n\t// We add the dataType to the list if needed\r\n\t// and return the corresponding response\r\n\tif ( finalDataType ) {\r\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\r\n\t\t\tdataTypes.unshift( finalDataType );\r\n\t\t}\r\n\t\treturn responses[ finalDataType ];\r\n\t}\r\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n var firstDataType, ct, finalDataType, type,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while( dataTypes[ 0 ] === \"*\" ) {\n dataTypes.shift();\n if ( ct === undefined ) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if ( ct ) {\n for ( type in contents ) {\n if ( contents[ type ] && contents[ type ].test( ct ) ) {\n dataTypes.unshift( type );\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if ( dataTypes[ 0 ] in responses ) {\n finalDataType = dataTypes[ 0 ];\n } else {\n // Try convertible dataTypes\n for ( type in responses ) {\n if ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n finalDataType = type;\n break;\n }\n if ( !firstDataType ) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if ( finalDataType ) {\n if ( finalDataType !== dataTypes[ 0 ] ) {\n dataTypes.unshift( finalDataType );\n }\n return responses[ finalDataType ];\n }\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n var firstDataType, ct, finalDataType, type,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while ( dataTypes[ 0 ] === \"*\" ) {\n dataTypes.shift();\n if ( ct === undefined ) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if ( ct ) {\n for ( type in contents ) {\n if ( contents[ type ] && contents[ type ].test( ct ) ) {\n dataTypes.unshift( type );\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if ( dataTypes[ 0 ] in responses ) {\n finalDataType = dataTypes[ 0 ];\n } else {\n // Try convertible dataTypes\n for ( type in responses ) {\n if ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n finalDataType = type;\n break;\n }\n if ( !firstDataType ) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if ( finalDataType ) {\n if ( finalDataType !== dataTypes[ 0 ] ) {\n dataTypes.unshift( finalDataType );\n }\n return responses[ finalDataType ];\n }\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n var firstDataType, ct, finalDataType, type,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while ( dataTypes[ 0 ] === \"*\" ) {\n dataTypes.shift();\n if ( ct === undefined ) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if ( ct ) {\n for ( type in contents ) {\n if ( contents[ type ] && contents[ type ].test( ct ) ) {\n dataTypes.unshift( type );\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if ( dataTypes[ 0 ] in responses ) {\n finalDataType = dataTypes[ 0 ];\n } else {\n // Try convertible dataTypes\n for ( type in responses ) {\n if ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n finalDataType = type;\n break;\n }\n if ( !firstDataType ) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if ( finalDataType ) {\n if ( finalDataType !== dataTypes[ 0 ] ) {\n dataTypes.unshift( finalDataType );\n }\n return responses[ finalDataType ];\n }\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\t\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\t\tcontents = s.contents,\n\t\t\t\tdataTypes = s.dataTypes;\n\n\t\t\t// Remove auto dataType and get content-type in the process\n\t\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\t\tdataTypes.shift();\n\t\t\t\tif ( ct === undefined ) {\n\t\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check if we're dealing with a known content-type\n\t\t\tif ( ct ) {\n\t\t\t\tfor ( type in contents ) {\n\t\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check to see if we have a response for the expected dataType\n\t\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t\t} else {\n\n\t\t\t\t// Try convertible dataTypes\n\t\t\t\tfor ( type in responses ) {\n\t\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\t\tfirstDataType = type;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Or just use first one\n\t\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t\t}\n\n\t\t\t// If we found a dataType\n\t\t\t// We add the dataType to the list if needed\n\t\t\t// and return the corresponding response\n\t\t\tif ( finalDataType ) {\n\t\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t\t}\n\t\t\t\treturn responses[ finalDataType ];\n\t\t\t}\n\t\t}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n var ct, type, finalDataType, firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while ( dataTypes[ 0 ] === \"*\" ) {\n dataTypes.shift();\n if ( ct === undefined ) {\n ct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n }\n }\n\n // Check if we're dealing with a known content-type\n if ( ct ) {\n for ( type in contents ) {\n if ( contents[ type ] && contents[ type ].test( ct ) ) {\n dataTypes.unshift( type );\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if ( dataTypes[ 0 ] in responses ) {\n finalDataType = dataTypes[ 0 ];\n } else {\n\n // Try convertible dataTypes\n for ( type in responses ) {\n if ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n finalDataType = type;\n break;\n }\n if ( !firstDataType ) {\n firstDataType = type;\n }\n }\n\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if ( finalDataType ) {\n if ( finalDataType !== dataTypes[ 0 ] ) {\n dataTypes.unshift( finalDataType );\n }\n return responses[ finalDataType ];\n }\n}", "function ajaxHandleResponses( s, jqXHR, responses ) { // 8616\n // 8617\n\tvar ct, type, finalDataType, firstDataType, // 8618\n\t\tcontents = s.contents, // 8619\n\t\tdataTypes = s.dataTypes; // 8620\n // 8621\n\t// Remove auto dataType and get content-type in the process // 8622\n\twhile ( dataTypes[ 0 ] === \"*\" ) { // 8623\n\t\tdataTypes.shift(); // 8624\n\t\tif ( ct === undefined ) { // 8625\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" ); // 8626\n\t\t} // 8627\n\t} // 8628\n // 8629\n\t// Check if we're dealing with a known content-type // 8630\n\tif ( ct ) { // 8631\n\t\tfor ( type in contents ) { // 8632\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) { // 8633\n\t\t\t\tdataTypes.unshift( type ); // 8634\n\t\t\t\tbreak; // 8635\n\t\t\t} // 8636\n\t\t} // 8637\n\t} // 8638\n // 8639\n\t// Check to see if we have a response for the expected dataType // 8640\n\tif ( dataTypes[ 0 ] in responses ) { // 8641\n\t\tfinalDataType = dataTypes[ 0 ]; // 8642\n\t} else { // 8643\n // 8644\n\t\t// Try convertible dataTypes // 8645\n\t\tfor ( type in responses ) { // 8646\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) { // 8647\n\t\t\t\tfinalDataType = type; // 8648\n\t\t\t\tbreak; // 8649\n\t\t\t} // 8650\n\t\t\tif ( !firstDataType ) { // 8651\n\t\t\t\tfirstDataType = type; // 8652\n\t\t\t} // 8653\n\t\t} // 8654\n // 8655\n\t\t// Or just use first one // 8656\n\t\tfinalDataType = finalDataType || firstDataType; // 8657\n\t} // 8658\n // 8659\n\t// If we found a dataType // 8660\n\t// We add the dataType to the list if needed // 8661\n\t// and return the corresponding response // 8662\n\tif ( finalDataType ) { // 8663\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) { // 8664\n\t\t\tdataTypes.unshift( finalDataType ); // 8665\n\t\t} // 8666\n\t\treturn responses[ finalDataType ]; // 8667\n\t} // 8668\n} // 8669", "function ajaxHandleResponses(s, jqXHR, responses) {\n var firstDataType, ct, finalDataType, type,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n if (!firstDataType) {\n firstDataType = type;\n }\n }\n\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n return responses[finalDataType];\n }\n }", "function ajaxHandleResponses(s, jqXHR, responses) {\n var firstDataType, ct, finalDataType, type,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n if (!firstDataType) {\n firstDataType = type;\n }\n }\n\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n return responses[finalDataType];\n }\n }", "function ajaxHandleResponses( s, jqXHR, responses ) {\r\n\tvar firstDataType, ct, finalDataType, type,\r\n\t\tcontents = s.contents,\r\n\t\tdataTypes = s.dataTypes,\r\n\t\tresponseFields = s.responseFields;\r\n\r\n\t// Fill responseXXX fields\r\n\tfor ( type in responseFields ) {\r\n\t\tif ( type in responses ) {\r\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\r\n\t\t}\r\n\t}\r\n\r\n\t// Remove auto dataType and get content-type in the process\r\n\twhile( dataTypes[ 0 ] === \"*\" ) {\r\n\t\tdataTypes.shift();\r\n\t\tif ( ct === undefined ) {\r\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\r\n\t\t}\r\n\t}\r\n\r\n\t// Check if we're dealing with a known content-type\r\n\tif ( ct ) {\r\n\t\tfor ( type in contents ) {\r\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\r\n\t\t\t\tdataTypes.unshift( type );\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Check to see if we have a response for the expected dataType\r\n\tif ( dataTypes[ 0 ] in responses ) {\r\n\t\tfinalDataType = dataTypes[ 0 ];\r\n\t} else {\r\n\t\t// Try convertible dataTypes\r\n\t\tfor ( type in responses ) {\r\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\r\n\t\t\t\tfinalDataType = type;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif ( !firstDataType ) {\r\n\t\t\t\tfirstDataType = type;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Or just use first one\r\n\t\tfinalDataType = finalDataType || firstDataType;\r\n\t}\r\n\r\n\t// If we found a dataType\r\n\t// We add the dataType to the list if needed\r\n\t// and return the corresponding response\r\n\tif ( finalDataType ) {\r\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\r\n\t\t\tdataTypes.unshift( finalDataType );\r\n\t\t}\r\n\t\treturn responses[ finalDataType ];\r\n\t}\r\n}", "function ajaxHandleResponses(s, jqXHR, responses) {\n\n var ct, type, finalDataType, firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n if (!firstDataType) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n return responses[finalDataType];\n }\n }", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n \tvar ct, type, finalDataType, firstDataType,\n \t\tcontents = s.contents,\n \t\tdataTypes = s.dataTypes;\n\n \t// Remove auto dataType and get content-type in the process\n \twhile ( dataTypes[ 0 ] === \"*\" ) {\n \t\tdataTypes.shift();\n \t\tif ( ct === undefined ) {\n \t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n \t\t}\n \t}\n\n \t// Check if we're dealing with a known content-type\n \tif ( ct ) {\n \t\tfor ( type in contents ) {\n \t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n \t\t\t\tdataTypes.unshift( type );\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}\n\n \t// Check to see if we have a response for the expected dataType\n \tif ( dataTypes[ 0 ] in responses ) {\n \t\tfinalDataType = dataTypes[ 0 ];\n \t} else {\n\n \t\t// Try convertible dataTypes\n \t\tfor ( type in responses ) {\n \t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n \t\t\t\tfinalDataType = type;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t\tif ( !firstDataType ) {\n \t\t\t\tfirstDataType = type;\n \t\t\t}\n \t\t}\n\n \t\t// Or just use first one\n \t\tfinalDataType = finalDataType || firstDataType;\n \t}\n\n \t// If we found a dataType\n \t// We add the dataType to the list if needed\n \t// and return the corresponding response\n \tif ( finalDataType ) {\n \t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n \t\t\tdataTypes.unshift( finalDataType );\n \t\t}\n \t\treturn responses[ finalDataType ];\n \t}\n }", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\tvar firstDataType, ct, finalDataType, type,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t\t}\n\t\t}\n\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\tvar firstDataType, ct, finalDataType, type,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t\t}\n\t\t}\n\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "function ajaxHandleResponses(s, jqXHR, responses) {\r\n\t\tvar firstDataType, ct, finalDataType, type,\r\n\t\t\tcontents = s.contents,\r\n\t\t\tdataTypes = s.dataTypes;\r\n\r\n\t\t// Remove auto dataType and get content-type in the process\r\n\t\twhile (dataTypes[0] === \"*\") {\r\n\t\t\tdataTypes.shift();\r\n\t\t\tif (ct === undefined) {\r\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Check if we're dealing with a known content-type\r\n\t\tif (ct) {\r\n\t\t\tfor (type in contents) {\r\n\t\t\t\tif (contents[type] && contents[type].test(ct)) {\r\n\t\t\t\t\tdataTypes.unshift(type);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Check to see if we have a response for the expected dataType\r\n\t\tif (dataTypes[0] in responses) {\r\n\t\t\tfinalDataType = dataTypes[0];\r\n\t\t} else {\r\n\r\n\t\t\t// Try convertible dataTypes\r\n\t\t\tfor (type in responses) {\r\n\t\t\t\tif (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\r\n\t\t\t\t\tfinalDataType = type;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (!firstDataType) {\r\n\t\t\t\t\tfirstDataType = type;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Or just use first one\r\n\t\t\tfinalDataType = finalDataType || firstDataType;\r\n\t\t}\r\n\r\n\t\t// If we found a dataType\r\n\t\t// We add the dataType to the list if needed\r\n\t\t// and return the corresponding response\r\n\t\tif (finalDataType) {\r\n\t\t\tif (finalDataType !== dataTypes[0]) {\r\n\t\t\t\tdataTypes.unshift(finalDataType);\r\n\t\t\t}\r\n\t\t\treturn responses[finalDataType];\r\n\t\t}\r\n\t}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n var ct, type, finalDataType, firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while( dataTypes[ 0 ] === \"*\" ) {\n dataTypes.shift();\n if ( ct === undefined ) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if ( ct ) {\n for ( type in contents ) {\n if ( contents[ type ] && contents[ type ].test( ct ) ) {\n dataTypes.unshift( type );\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if ( dataTypes[ 0 ] in responses ) {\n finalDataType = dataTypes[ 0 ];\n } else {\n // Try convertible dataTypes\n for ( type in responses ) {\n if ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n finalDataType = type;\n break;\n }\n if ( !firstDataType ) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if ( finalDataType ) {\n if ( finalDataType !== dataTypes[ 0 ] ) {\n dataTypes.unshift( finalDataType );\n }\n return responses[ finalDataType ];\n }\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "function ajaxHandleResponses(s, jqXHR, responses) {\n\n var ct, type, finalDataType, firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n if (!firstDataType) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n return responses[finalDataType];\n }\n }", "function ajaxHandleResponses(s, jqXHR, responses) {\n\n var ct, type, finalDataType, firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n if (!firstDataType) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n return responses[finalDataType];\n }\n }", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}" ]
[ "0.7849781", "0.78375864", "0.78375864", "0.77765334", "0.7762038", "0.77573496", "0.7718941", "0.7715676", "0.7673022", "0.7630034", "0.7614433", "0.7604816", "0.76005447", "0.759947", "0.7597553", "0.7597553", "0.7597553", "0.7597553", "0.7597553", "0.7597553", "0.7597553", "0.7597553", "0.7588932", "0.7588932", "0.7577087", "0.75769764", "0.75769764", "0.75751495", "0.75736547", "0.75634825", "0.7559068", "0.7559068", "0.7553473", "0.754793", "0.75478536", "0.75462705", "0.75462705", "0.7544864", "0.7538319", "0.7538319", "0.7537108", "0.75307363", "0.75307363", "0.75307363", "0.75307363", "0.75307363", "0.75307363", "0.75307363", "0.75307363", "0.75307363", "0.75307363", "0.752419", "0.7523451", "0.7523226", "0.7523226", "0.7523226", "0.7523226", "0.7523226", "0.7523226", "0.7523226", "0.7523226", "0.7523226", "0.7523226", "0.7523226", "0.7523226", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493", "0.7522493" ]
0.0
-1
Chain conversions given the request and the original response Also sets the responseXXX fields on the jqXHR instance
function ajaxConvert( s, response, jqXHR, isSuccess ) { var conv2, current, conv, tmp, prev, converters = {}, // Work with a copy of dataTypes in case we need to modify it for conversion dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys if ( dataTypes[ 1 ] ) { for ( conv in s.converters ) { converters[ conv.toLowerCase() ] = s.converters[ conv ]; } } current = dataTypes.shift(); // Convert to each sequential dataType while ( current ) { if ( s.responseFields[ current ] ) { jqXHR[ s.responseFields[ current ] ] = response; } // Apply the dataFilter if provided if ( !prev && isSuccess && s.dataFilter ) { response = s.dataFilter( response, s.dataType ); } prev = current; current = dataTypes.shift(); if ( current ) { // There's only work to do if current dataType is non-auto if ( current === "*" ) { current = prev; // Convert response if prev dataType is non-auto and differs from current } else if ( prev !== "*" && prev !== current ) { // Seek a direct converter conv = converters[ prev + " " + current ] || converters[ "* " + current ]; // If none found, seek a pair if ( !conv ) { for ( conv2 in converters ) { // If conv2 outputs current tmp = conv2.split( " " ); if ( tmp[ 1 ] === current ) { // If prev can be converted to accepted input conv = converters[ prev + " " + tmp[ 0 ] ] || converters[ "* " + tmp[ 0 ] ]; if ( conv ) { // Condense equivalence converters if ( conv === true ) { conv = converters[ conv2 ]; // Otherwise, insert the intermediate dataType } else if ( converters[ conv2 ] !== true ) { current = tmp[ 0 ]; dataTypes.unshift( tmp[ 1 ] ); } break; } } } } // Apply converter (if not an equivalence) if ( conv !== true ) { // Unless errors are allowed to bubble, catch and return them if ( conv && s.throws ) { response = conv( response ); } else { try { response = conv( response ); } catch ( e ) { return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; } } } } } } return { state: "success", data: response }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={}, // Work with a copy of dataTypes in case we need to modify it for conversion\ndataTypes=s.dataTypes.slice(); // Create converters map with lowercased keys\nif(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv];}}current=dataTypes.shift(); // Convert to each sequential dataType\nwhile(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response;} // Apply the dataFilter if provided\nif(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType);}prev=current;current=dataTypes.shift();if(current){ // There's only work to do if current dataType is non-auto\nif(current===\"*\"){current=prev; // Convert response if prev dataType is non-auto and differs from current\n}else if(prev!==\"*\"&&prev!==current){ // Seek a direct converter\nconv=converters[prev+\" \"+current]||converters[\"* \"+current]; // If none found, seek a pair\nif(!conv){for(conv2 in converters){ // If conv2 outputs current\ntmp=conv2.split(\" \");if(tmp[1]===current){ // If prev can be converted to accepted input\nconv=converters[prev+\" \"+tmp[0]]||converters[\"* \"+tmp[0]];if(conv){ // Condense equivalence converters\nif(conv===true){conv=converters[conv2]; // Otherwise, insert the intermediate dataType\n}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1]);}break;}}}} // Apply converter (if not an equivalence)\nif(conv!==true){ // Unless errors are allowed to bubble, catch and return them\nif(conv&&s.throws){response=conv(response);}else {try{response=conv(response);}catch(e){return {state:\"parsererror\",error:conv?e:\"No conversion from \"+prev+\" to \"+current};}}}}}}return {state:\"success\",data:response};}", "function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={}, // Work with a copy of dataTypes in case we need to modify it for conversion\ndataTypes=s.dataTypes.slice(); // Create converters map with lowercased keys\nif(dataTypes[1]){for(conv in s.converters) {converters[conv.toLowerCase()] = s.converters[conv];}}current = dataTypes.shift(); // Convert to each sequential dataType\nwhile(current) {if(s.responseFields[current]){jqXHR[s.responseFields[current]] = response;} // Apply the dataFilter if provided\nif(!prev && isSuccess && s.dataFilter){response = s.dataFilter(response,s.dataType);}prev = current;current = dataTypes.shift();if(current){ // There's only work to do if current dataType is non-auto\nif(current === \"*\"){current = prev; // Convert response if prev dataType is non-auto and differs from current\n}else if(prev !== \"*\" && prev !== current){ // Seek a direct converter\nconv = converters[prev + \" \" + current] || converters[\"* \" + current]; // If none found, seek a pair\nif(!conv){for(conv2 in converters) { // If conv2 outputs current\ntmp = conv2.split(\" \");if(tmp[1] === current){ // If prev can be converted to accepted input\nconv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];if(conv){ // Condense equivalence converters\nif(conv === true){conv = converters[conv2]; // Otherwise, insert the intermediate dataType\n}else if(converters[conv2] !== true){current = tmp[0];dataTypes.unshift(tmp[1]);}break;}}}} // Apply converter (if not an equivalence)\nif(conv !== true){ // Unless errors are allowed to bubble, catch and return them\nif(conv && s[\"throws\"]){response = conv(response);}else {try{response = conv(response);}catch(e) {return {state:\"parsererror\",error:conv?e:\"No conversion from \" + prev + \" to \" + current};}}}}}}return {state:\"success\",data:response};}", "function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={}, // Work with a copy of dataTypes in case we need to modify it for conversion\n\tdataTypes=s.dataTypes.slice(); // Create converters map with lowercased keys\n\tif(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv];}}current=dataTypes.shift(); // Convert to each sequential dataType\n\twhile(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response;} // Apply the dataFilter if provided\n\tif(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType);}prev=current;current=dataTypes.shift();if(current){ // There's only work to do if current dataType is non-auto\n\tif(current===\"*\"){current=prev; // Convert response if prev dataType is non-auto and differs from current\n\t}else if(prev!==\"*\"&&prev!==current){ // Seek a direct converter\n\tconv=converters[prev+\" \"+current]||converters[\"* \"+current]; // If none found, seek a pair\n\tif(!conv){for(conv2 in converters){ // If conv2 outputs current\n\ttmp=conv2.split(\" \");if(tmp[1]===current){ // If prev can be converted to accepted input\n\tconv=converters[prev+\" \"+tmp[0]]||converters[\"* \"+tmp[0]];if(conv){ // Condense equivalence converters\n\tif(conv===true){conv=converters[conv2]; // Otherwise, insert the intermediate dataType\n\t}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1]);}break;}}}} // Apply converter (if not an equivalence)\n\tif(conv!==true){ // Unless errors are allowed to bubble, catch and return them\n\tif(conv&&s.throws){response=conv(response);}else {try{response=conv(response);}catch(e){return {state:\"parsererror\",error:conv?e:\"No conversion from \"+prev+\" to \"+current};}}}}}}return {state:\"success\",data:response};}", "function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},// Work with a copy of dataTypes in case we need to modify it for conversion\ndataTypes=s.dataTypes.slice();// Create converters map with lowercased keys\nif(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv];}}current=dataTypes.shift();// Convert to each sequential dataType\nwhile(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response;}// Apply the dataFilter if provided\nif(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType);}prev=current;current=dataTypes.shift();if(current){// There's only work to do if current dataType is non-auto\nif(current===\"*\"){current=prev;// Convert response if prev dataType is non-auto and differs from current\n}else if(prev!==\"*\"&&prev!==current){// Seek a direct converter\nconv=converters[prev+\" \"+current]||converters[\"* \"+current];// If none found, seek a pair\nif(!conv){for(conv2 in converters){// If conv2 outputs current\ntmp=conv2.split(\" \");if(tmp[1]===current){// If prev can be converted to accepted input\nconv=converters[prev+\" \"+tmp[0]]||converters[\"* \"+tmp[0]];if(conv){// Condense equivalence converters\nif(conv===true){conv=converters[conv2];// Otherwise, insert the intermediate dataType\n}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1]);}break;}}}}// Apply converter (if not an equivalence)\nif(conv!==true){// Unless errors are allowed to bubble, catch and return them\nif(conv&&s[\"throws\"]){// jscs:ignore requireDotNotation\nresponse=conv(response);}else{try{response=conv(response);}catch(e){return{state:\"parsererror\",error:conv?e:\"No conversion from \"+prev+\" to \"+current};}}}}}}return{state:\"success\",data:response};}", "function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},// Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes=s.dataTypes.slice();// Create converters map with lowercased keys\n if(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv];}}current=dataTypes.shift();// Convert to each sequential dataType\n while(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response;}// Apply the dataFilter if provided\n if(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType);}prev=current;current=dataTypes.shift();if(current){// There's only work to do if current dataType is non-auto\n if(current===\"*\"){current=prev;// Convert response if prev dataType is non-auto and differs from current\n }else if(prev!==\"*\"&&prev!==current){// Seek a direct converter\n conv=converters[prev+\" \"+current]||converters[\"* \"+current];// If none found, seek a pair\n if(!conv){for(conv2 in converters){// If conv2 outputs current\n tmp=conv2.split(\" \");if(tmp[1]===current){// If prev can be converted to accepted input\n conv=converters[prev+\" \"+tmp[0]]||converters[\"* \"+tmp[0]];if(conv){// Condense equivalence converters\n if(conv===true){conv=converters[conv2];// Otherwise, insert the intermediate dataType\n }else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1]);}break;}}}}// Apply converter (if not an equivalence)\n if(conv!==true){// Unless errors are allowed to bubble, catch and return them\n if(conv&&s[\"throws\"]){response=conv(response);}else{try{response=conv(response);}catch(e){return{state:\"parsererror\",error:conv?e:\"No conversion from \"+prev+\" to \"+current};}}}}}}return{state:\"success\",data:response};}// Install script dataType", "function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},// Work with a copy of dataTypes in case we need to modify it for conversion\ndataTypes=s.dataTypes.slice();// Create converters map with lowercased keys\nif(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv];}}current=dataTypes.shift();// Convert to each sequential dataType\nwhile(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response;}// Apply the dataFilter if provided\nif(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType);}prev=current;current=dataTypes.shift();if(current){// There's only work to do if current dataType is non-auto\nif(current===\"*\"){current=prev;// Convert response if prev dataType is non-auto and differs from current\n}else if(prev!==\"*\"&&prev!==current){// Seek a direct converter\nconv=converters[prev+\" \"+current]||converters[\"* \"+current];// If none found, seek a pair\nif(!conv){for(conv2 in converters){// If conv2 outputs current\ntmp=conv2.split(\" \");if(tmp[1]===current){// If prev can be converted to accepted input\nconv=converters[prev+\" \"+tmp[0]]||converters[\"* \"+tmp[0]];if(conv){// Condense equivalence converters\nif(conv===true){conv=converters[conv2];// Otherwise, insert the intermediate dataType\n}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1]);}break;}}}}// Apply converter (if not an equivalence)\nif(conv!==true){// Unless errors are allowed to bubble, catch and return them\nif(conv&&s.throws){response=conv(response);}else{try{response=conv(response);}catch(e){return{state:\"parsererror\",error:conv?e:\"No conversion from \"+prev+\" to \"+current};}}}}}}return{state:\"success\",data:response};}", "function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},// Work with a copy of dataTypes in case we need to modify it for conversion\ndataTypes=s.dataTypes.slice();// Create converters map with lowercased keys\nif(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv];}}current=dataTypes.shift();// Convert to each sequential dataType\nwhile(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response;}// Apply the dataFilter if provided\nif(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType);}prev=current;current=dataTypes.shift();if(current){// There's only work to do if current dataType is non-auto\nif(current===\"*\"){current=prev;// Convert response if prev dataType is non-auto and differs from current\n}else if(prev!==\"*\"&&prev!==current){// Seek a direct converter\nconv=converters[prev+\" \"+current]||converters[\"* \"+current];// If none found, seek a pair\nif(!conv){for(conv2 in converters){// If conv2 outputs current\ntmp=conv2.split(\" \");if(tmp[1]===current){// If prev can be converted to accepted input\nconv=converters[prev+\" \"+tmp[0]]||converters[\"* \"+tmp[0]];if(conv){// Condense equivalence converters\nif(conv===true){conv=converters[conv2];// Otherwise, insert the intermediate dataType\n}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1]);}break;}}}}// Apply converter (if not an equivalence)\nif(conv!==true){// Unless errors are allowed to bubble, catch and return them\nif(conv&&s.throws){response=conv(response);}else{try{response=conv(response);}catch(e){return{state:\"parsererror\",error:conv?e:\"No conversion from \"+prev+\" to \"+current};}}}}}}return{state:\"success\",data:response};}", "function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},// Work with a copy of dataTypes in case we need to modify it for conversion\r\n\tdataTypes=s.dataTypes.slice();// Create converters map with lowercased keys\r\n\tif(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv];}}current=dataTypes.shift();// Convert to each sequential dataType\r\n\twhile(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response;}// Apply the dataFilter if provided\r\n\tif(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType);}prev=current;current=dataTypes.shift();if(current){// There's only work to do if current dataType is non-auto\r\n\tif(current===\"*\"){current=prev;// Convert response if prev dataType is non-auto and differs from current\r\n\t}else if(prev!==\"*\"&&prev!==current){// Seek a direct converter\r\n\tconv=converters[prev+\" \"+current]||converters[\"* \"+current];// If none found, seek a pair\r\n\tif(!conv){for(conv2 in converters){// If conv2 outputs current\r\n\ttmp=conv2.split(\" \");if(tmp[1]===current){// If prev can be converted to accepted input\r\n\tconv=converters[prev+\" \"+tmp[0]]||converters[\"* \"+tmp[0]];if(conv){// Condense equivalence converters\r\n\tif(conv===true){conv=converters[conv2];// Otherwise, insert the intermediate dataType\r\n\t}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1]);}break;}}}}// Apply converter (if not an equivalence)\r\n\tif(conv!==true){// Unless errors are allowed to bubble, catch and return them\r\n\tif(conv&&s.throws){response=conv(response);}else{try{response=conv(response);}catch(e){return{state:\"parsererror\",error:conv?e:\"No conversion from \"+prev+\" to \"+current};}}}}}}return{state:\"success\",data:response};}", "function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},// Work with a copy of dataTypes in case we need to modify it for conversion\n\tdataTypes=s.dataTypes.slice();// Create converters map with lowercased keys\n\tif(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv];}}current=dataTypes.shift();// Convert to each sequential dataType\n\twhile(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response;}// Apply the dataFilter if provided\n\tif(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType);}prev=current;current=dataTypes.shift();if(current){// There's only work to do if current dataType is non-auto\n\tif(current===\"*\"){current=prev;// Convert response if prev dataType is non-auto and differs from current\n\t}else if(prev!==\"*\"&&prev!==current){// Seek a direct converter\n\tconv=converters[prev+\" \"+current]||converters[\"* \"+current];// If none found, seek a pair\n\tif(!conv){for(conv2 in converters){// If conv2 outputs current\n\ttmp=conv2.split(\" \");if(tmp[1]===current){// If prev can be converted to accepted input\n\tconv=converters[prev+\" \"+tmp[0]]||converters[\"* \"+tmp[0]];if(conv){// Condense equivalence converters\n\tif(conv===true){conv=converters[conv2];// Otherwise, insert the intermediate dataType\n\t}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1]);}break;}}}}// Apply converter (if not an equivalence)\n\tif(conv!==true){// Unless errors are allowed to bubble, catch and return them\n\tif(conv&&s.throws){response=conv(response);}else{try{response=conv(response);}catch(e){return{state:\"parsererror\",error:conv?e:\"No conversion from \"+prev+\" to \"+current};}}}}}}return{state:\"success\",data:response};}", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if (dataTypes[ 1 ]) {\n for (conv in s.converters) {\n converters[ conv.toLowerCase() ] = s.converters[ conv ];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while (current) {\n\n if (s.responseFields[ current ]) {\n jqXHR[ s.responseFields[ current ] ] = response;\n }\n\n // Apply the dataFilter if provided\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n\n // Seek a direct converter\n conv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n // If none found, seek a pair\n if (!conv) {\n for (conv2 in converters) {\n\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n if (tmp[ 1 ] === current) {\n\n // If prev can be converted to accepted input\n conv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n converters[ \"* \" + tmp[ 0 ] ];\n if (conv) {\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[ conv2 ];\n\n // Otherwise, insert the intermediate dataType\n } else if (converters[ conv2 ] !== true) {\n current = tmp[ 0 ];\n dataTypes.unshift(tmp[ 1 ]);\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if (conv !== true) {\n\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s[ \"throws\" ]) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current};\n }\n }\n }\n }\n }\n }\n\n return {state: \"success\", data: response};\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2,\n current,\n conv,\n tmp,\n prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys\n\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift(); // Convert to each sequential dataType\n\n while (current) {\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n } // Apply the dataFilter if provided\n\n\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n current = prev; // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current]; // If none found, seek a pair\n\n if (!conv) {\n for (conv2 in converters) {\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n\n if (tmp[1] === current) {\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n\n if (conv) {\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2]; // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n\n break;\n }\n }\n }\n } // Apply converter (if not an equivalence)\n\n\n if (conv !== true) {\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s[\"throws\"]) {\n // jscs:ignore requireDotNotation\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {\n state: \"success\",\n data: response\n };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2,\n current,\n conv,\n tmp,\n prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys\n\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift(); // Convert to each sequential dataType\n\n while (current) {\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n } // Apply the dataFilter if provided\n\n\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n current = prev; // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current]; // If none found, seek a pair\n\n if (!conv) {\n for (conv2 in converters) {\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n\n if (tmp[1] === current) {\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n\n if (conv) {\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2]; // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n\n break;\n }\n }\n }\n } // Apply converter (if not an equivalence)\n\n\n if (conv !== true) {\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s[\"throws\"]) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {\n state: \"success\",\n data: response\n };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2,\n current,\n conv,\n tmp,\n prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys\n\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift(); // Convert to each sequential dataType\n\n while (current) {\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n } // Apply the dataFilter if provided\n\n\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n current = prev; // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current]; // If none found, seek a pair\n\n if (!conv) {\n for (conv2 in converters) {\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n\n if (tmp[1] === current) {\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n\n if (conv) {\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2]; // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n\n break;\n }\n }\n }\n } // Apply converter (if not an equivalence)\n\n\n if (conv !== true) {\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s[\"throws\"]) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {\n state: \"success\",\n data: response\n };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2,\n current,\n conv,\n tmp,\n prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys\n\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift(); // Convert to each sequential dataType\n\n while (current) {\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n } // Apply the dataFilter if provided\n\n\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n current = prev; // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current]; // If none found, seek a pair\n\n if (!conv) {\n for (conv2 in converters) {\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n\n if (tmp[1] === current) {\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n\n if (conv) {\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2]; // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n\n break;\n }\n }\n }\n } // Apply converter (if not an equivalence)\n\n\n if (conv !== true) {\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s[\"throws\"]) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {\n state: \"success\",\n data: response\n };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2,\n current,\n conv,\n tmp,\n prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys\n\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift(); // Convert to each sequential dataType\n\n while (current) {\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n } // Apply the dataFilter if provided\n\n\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n current = prev; // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current]; // If none found, seek a pair\n\n if (!conv) {\n for (conv2 in converters) {\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n\n if (tmp[1] === current) {\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n\n if (conv) {\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2]; // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n\n break;\n }\n }\n }\n } // Apply converter (if not an equivalence)\n\n\n if (conv !== true) {\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s[\"throws\"]) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {\n state: \"success\",\n data: response\n };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2,\n current,\n conv,\n tmp,\n prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys\n\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift(); // Convert to each sequential dataType\n\n while (current) {\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n } // Apply the dataFilter if provided\n\n\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n current = prev; // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current]; // If none found, seek a pair\n\n if (!conv) {\n for (conv2 in converters) {\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n\n if (tmp[1] === current) {\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n\n if (conv) {\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2]; // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n\n break;\n }\n }\n }\n } // Apply converter (if not an equivalence)\n\n\n if (conv !== true) {\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s[\"throws\"]) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {\n state: \"success\",\n data: response\n };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2,\n current,\n conv,\n tmp,\n prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys\n\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift(); // Convert to each sequential dataType\n\n while (current) {\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n } // Apply the dataFilter if provided\n\n\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n current = prev; // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current]; // If none found, seek a pair\n\n if (!conv) {\n for (conv2 in converters) {\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n\n if (tmp[1] === current) {\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n\n if (conv) {\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2]; // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n\n break;\n }\n }\n }\n } // Apply converter (if not an equivalence)\n\n\n if (conv !== true) {\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s.throws) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {\n state: \"success\",\n data: response\n };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2,\n current,\n conv,\n tmp,\n prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys\n\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift(); // Convert to each sequential dataType\n\n while (current) {\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n } // Apply the dataFilter if provided\n\n\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n current = prev; // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current]; // If none found, seek a pair\n\n if (!conv) {\n for (conv2 in converters) {\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n\n if (tmp[1] === current) {\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n\n if (conv) {\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2]; // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n\n break;\n }\n }\n }\n } // Apply converter (if not an equivalence)\n\n\n if (conv !== true) {\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s.throws) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {\n state: \"success\",\n data: response\n };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2,\n current,\n conv,\n tmp,\n prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys\n\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift(); // Convert to each sequential dataType\n\n while (current) {\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n } // Apply the dataFilter if provided\n\n\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n current = prev; // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current]; // If none found, seek a pair\n\n if (!conv) {\n for (conv2 in converters) {\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n\n if (tmp[1] === current) {\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n\n if (conv) {\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2]; // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n\n break;\n }\n }\n }\n } // Apply converter (if not an equivalence)\n\n\n if (conv !== true) {\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s.throws) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {\n state: \"success\",\n data: response\n };\n }", "function ajaxConvert( s, response, jqXHR, isSuccess ) { // 8674\n\tvar conv2, current, conv, tmp, prev, // 8675\n\t\tconverters = {}, // 8676\n // 8677\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion // 8678\n\t\tdataTypes = s.dataTypes.slice(); // 8679\n // 8680\n\t// Create converters map with lowercased keys // 8681\n\tif ( dataTypes[ 1 ] ) { // 8682\n\t\tfor ( conv in s.converters ) { // 8683\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ]; // 8684\n\t\t} // 8685\n\t} // 8686\n // 8687\n\tcurrent = dataTypes.shift(); // 8688\n // 8689\n\t// Convert to each sequential dataType // 8690\n\twhile ( current ) { // 8691\n // 8692\n\t\tif ( s.responseFields[ current ] ) { // 8693\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response; // 8694\n\t\t} // 8695\n // 8696\n\t\t// Apply the dataFilter if provided // 8697\n\t\tif ( !prev && isSuccess && s.dataFilter ) { // 8698\n\t\t\tresponse = s.dataFilter( response, s.dataType ); // 8699\n\t\t} // 8700\n // 8701\n\t\tprev = current; // 8702\n\t\tcurrent = dataTypes.shift(); // 8703\n // 8704\n\t\tif ( current ) { // 8705\n // 8706\n\t\t\t// There's only work to do if current dataType is non-auto // 8707\n\t\t\tif ( current === \"*\" ) { // 8708\n // 8709\n\t\t\t\tcurrent = prev; // 8710\n // 8711\n\t\t\t// Convert response if prev dataType is non-auto and differs from current // 8712\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) { // 8713\n // 8714\n\t\t\t\t// Seek a direct converter // 8715\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ]; // 8716\n // 8717\n\t\t\t\t// If none found, seek a pair // 8718\n\t\t\t\tif ( !conv ) { // 8719\n\t\t\t\t\tfor ( conv2 in converters ) { // 8720\n // 8721\n\t\t\t\t\t\t// If conv2 outputs current // 8722\n\t\t\t\t\t\ttmp = conv2.split( \" \" ); // 8723\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) { // 8724\n // 8725\n\t\t\t\t\t\t\t// If prev can be converted to accepted input // 8726\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] || // 8727\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ]; // 8728\n\t\t\t\t\t\t\tif ( conv ) { // 8729\n // 8730\n\t\t\t\t\t\t\t\t// Condense equivalence converters // 8731\n\t\t\t\t\t\t\t\tif ( conv === true ) { // 8732\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ]; // 8733\n // 8734\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType // 8735\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) { // 8736\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ]; // 8737\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] ); // 8738\n\t\t\t\t\t\t\t\t} // 8739\n\t\t\t\t\t\t\t\tbreak; // 8740\n\t\t\t\t\t\t\t} // 8741\n\t\t\t\t\t\t} // 8742\n\t\t\t\t\t} // 8743\n\t\t\t\t} // 8744\n // 8745\n\t\t\t\t// Apply converter (if not an equivalence) // 8746\n\t\t\t\tif ( conv !== true ) { // 8747\n // 8748\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them // 8749\n\t\t\t\t\tif ( conv && s.throws ) { // 8750\n\t\t\t\t\t\tresponse = conv( response ); // 8751\n\t\t\t\t\t} else { // 8752\n\t\t\t\t\t\ttry { // 8753\n\t\t\t\t\t\t\tresponse = conv( response ); // 8754\n\t\t\t\t\t\t} catch ( e ) { // 8755\n\t\t\t\t\t\t\treturn { // 8756\n\t\t\t\t\t\t\t\tstate: \"parsererror\", // 8757\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current // 8758\n\t\t\t\t\t\t\t}; // 8759\n\t\t\t\t\t\t} // 8760\n\t\t\t\t\t} // 8761\n\t\t\t\t} // 8762\n\t\t\t} // 8763\n\t\t} // 8764\n\t} // 8765\n // 8766\n\treturn { state: \"success\", data: response }; // 8767\n} // 8768", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while (current) {\n\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n }\n\n // Apply the dataFilter if provided\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n // If none found, seek a pair\n if (!conv) {\n for (conv2 in converters) {\n\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n if (tmp[1] === current) {\n\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] ||\n converters[\"* \" + tmp[0]];\n if (conv) {\n\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2];\n\n // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if (conv !== true) {\n\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s.throws) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {state: \"success\", data: response};\n }", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if ( dataTypes[ 1 ] ) {\n for ( conv in s.converters ) {\n converters[ conv.toLowerCase() ] = s.converters[ conv ];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while ( current ) {\n\n if ( s.responseFields[ current ] ) {\n jqXHR[ s.responseFields[ current ] ] = response;\n }\n\n // Apply the dataFilter if provided\n if ( !prev && isSuccess && s.dataFilter ) {\n response = s.dataFilter( response, s.dataType );\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if ( current ) {\n\n // There's only work to do if current dataType is non-auto\n if ( current === \"*\" ) {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if ( prev !== \"*\" && prev !== current ) {\n\n // Seek a direct converter\n conv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n // If none found, seek a pair\n if ( !conv ) {\n for ( conv2 in converters ) {\n\n // If conv2 outputs current\n tmp = conv2.split( \" \" );\n if ( tmp[ 1 ] === current ) {\n\n // If prev can be converted to accepted input\n conv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n converters[ \"* \" + tmp[ 0 ] ];\n if ( conv ) {\n\n // Condense equivalence converters\n if ( conv === true ) {\n conv = converters[ conv2 ];\n\n // Otherwise, insert the intermediate dataType\n } else if ( converters[ conv2 ] !== true ) {\n current = tmp[ 0 ];\n dataTypes.unshift( tmp[ 1 ] );\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if ( conv !== true ) {\n\n // Unless errors are allowed to bubble, catch and return them\n if ( conv && s.throws ) {\n response = conv( response );\n } else {\n try {\n response = conv( response );\n } catch ( e ) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return { state: \"success\", data: response };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2,\n current,\n conv,\n tmp,\n prev,\n converters = {},\n\n\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while (current) {\n\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n }\n\n // Apply the dataFilter if provided\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n // If none found, seek a pair\n if (!conv) {\n for (conv2 in converters) {\n\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n if (tmp[1] === current) {\n\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n if (conv) {\n\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2];\n\n // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if (conv !== true) {\n\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s.throws) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return { state: \"success\", data: response };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while (current) {\n\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n }\n\n // Apply the dataFilter if provided\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n // If none found, seek a pair\n if (!conv) {\n for (conv2 in converters) {\n\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n if (tmp[1] === current) {\n\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n if (conv) {\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2];\n\n // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if (conv !== true) {\n\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s[\"throws\"]) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {\n state: \"success\",\n data: response\n };\n }", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if ( dataTypes[ 1 ] ) {\n for ( conv in s.converters ) {\n converters[ conv.toLowerCase() ] = s.converters[ conv ];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while ( current ) {\n\n if ( s.responseFields[ current ] ) {\n jqXHR[ s.responseFields[ current ] ] = response;\n }\n\n // Apply the dataFilter if provided\n if ( !prev && isSuccess && s.dataFilter ) {\n response = s.dataFilter( response, s.dataType );\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if ( current ) {\n\n // There's only work to do if current dataType is non-auto\n if ( current === \"*\" ) {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if ( prev !== \"*\" && prev !== current ) {\n\n // Seek a direct converter\n conv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n // If none found, seek a pair\n if ( !conv ) {\n for ( conv2 in converters ) {\n\n // If conv2 outputs current\n tmp = conv2.split( \" \" );\n if ( tmp[ 1 ] === current ) {\n\n // If prev can be converted to accepted input\n conv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n converters[ \"* \" + tmp[ 0 ] ];\n if ( conv ) {\n // Condense equivalence converters\n if ( conv === true ) {\n conv = converters[ conv2 ];\n\n // Otherwise, insert the intermediate dataType\n } else if ( converters[ conv2 ] !== true ) {\n current = tmp[ 0 ];\n dataTypes.unshift( tmp[ 1 ] );\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if ( conv !== true ) {\n\n // Unless errors are allowed to bubble, catch and return them\n if ( conv && s[ \"throws\" ] ) {\n response = conv( response );\n } else {\n try {\n response = conv( response );\n } catch ( e ) {\n return { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n }\n }\n }\n }\n }\n }\n\n return { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n \n // Create converters map with lowercased keys\n if ( dataTypes[ 1 ] ) {\n for ( conv in s.converters ) {\n converters[ conv.toLowerCase() ] = s.converters[ conv ];\n }\n }\n \n current = dataTypes.shift();\n \n // Convert to each sequential dataType\n while ( current ) {\n \n if ( s.responseFields[ current ] ) {\n jqXHR[ s.responseFields[ current ] ] = response;\n }\n \n // Apply the dataFilter if provided\n if ( !prev && isSuccess && s.dataFilter ) {\n response = s.dataFilter( response, s.dataType );\n }\n \n prev = current;\n current = dataTypes.shift();\n \n if ( current ) {\n \n // There's only work to do if current dataType is non-auto\n if ( current === \"*\" ) {\n \n current = prev;\n \n // Convert response if prev dataType is non-auto and differs from current\n } else if ( prev !== \"*\" && prev !== current ) {\n \n // Seek a direct converter\n conv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n \n // If none found, seek a pair\n if ( !conv ) {\n for ( conv2 in converters ) {\n \n // If conv2 outputs current\n tmp = conv2.split( \" \" );\n if ( tmp[ 1 ] === current ) {\n \n // If prev can be converted to accepted input\n conv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n converters[ \"* \" + tmp[ 0 ] ];\n if ( conv ) {\n // Condense equivalence converters\n if ( conv === true ) {\n conv = converters[ conv2 ];\n \n // Otherwise, insert the intermediate dataType\n } else if ( converters[ conv2 ] !== true ) {\n current = tmp[ 0 ];\n dataTypes.unshift( tmp[ 1 ] );\n }\n break;\n }\n }\n }\n }\n \n // Apply converter (if not an equivalence)\n if ( conv !== true ) {\n \n // Unless errors are allowed to bubble, catch and return them\n if ( conv && s[ \"throws\" ] ) {\n response = conv( response );\n } else {\n try {\n response = conv( response );\n } catch ( e ) {\n return { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n }\n }\n }\n }\n }\n }\n \n return { state: \"success\", data: response };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while (current) {\n\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n }\n\n // Apply the dataFilter if provided\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n // If none found, seek a pair\n if (!conv) {\n for (conv2 in converters) {\n\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n if (tmp[1] === current) {\n\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] ||\n converters[\"* \" + tmp[0]];\n if (conv) {\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2];\n\n // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if (conv !== true) {\n\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s[\"throws\"]) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {state: \"success\", data: response};\n }", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if ( dataTypes[ 1 ] ) {\n for ( conv in s.converters ) {\n converters[ conv.toLowerCase() ] = s.converters[ conv ];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while ( current ) {\n\n if ( s.responseFields[ current ] ) {\n jqXHR[ s.responseFields[ current ] ] = response;\n }\n\n // Apply the dataFilter if provided\n if ( !prev && isSuccess && s.dataFilter ) {\n response = s.dataFilter( response, s.dataType );\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if ( current ) {\n\n // There's only work to do if current dataType is non-auto\n if ( current === \"*\" ) {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if ( prev !== \"*\" && prev !== current ) {\n\n // Seek a direct converter\n conv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n // If none found, seek a pair\n if ( !conv ) {\n for ( conv2 in converters ) {\n\n // If conv2 outputs current\n tmp = conv2.split( \" \" );\n if ( tmp[ 1 ] === current ) {\n\n // If prev can be converted to accepted input\n conv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n converters[ \"* \" + tmp[ 0 ] ];\n if ( conv ) {\n\n // Condense equivalence converters\n if ( conv === true ) {\n conv = converters[ conv2 ];\n\n // Otherwise, insert the intermediate dataType\n } else if ( converters[ conv2 ] !== true ) {\n current = tmp[ 0 ];\n dataTypes.unshift( tmp[ 1 ] );\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if ( conv !== true ) {\n\n // Unless errors are allowed to bubble, catch and return them\n if ( conv && s.throws ) {\n response = conv( response );\n } else {\n try {\n response = conv( response );\n } catch ( e ) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if ( dataTypes[ 1 ] ) {\n for ( conv in s.converters ) {\n converters[ conv.toLowerCase() ] = s.converters[ conv ];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while ( current ) {\n\n if ( s.responseFields[ current ] ) {\n jqXHR[ s.responseFields[ current ] ] = response;\n }\n\n // Apply the dataFilter if provided\n if ( !prev && isSuccess && s.dataFilter ) {\n response = s.dataFilter( response, s.dataType );\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if ( current ) {\n\n // There's only work to do if current dataType is non-auto\n if ( current === \"*\" ) {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if ( prev !== \"*\" && prev !== current ) {\n\n // Seek a direct converter\n conv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n // If none found, seek a pair\n if ( !conv ) {\n for ( conv2 in converters ) {\n\n // If conv2 outputs current\n tmp = conv2.split( \" \" );\n if ( tmp[ 1 ] === current ) {\n\n // If prev can be converted to accepted input\n conv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n converters[ \"* \" + tmp[ 0 ] ];\n if ( conv ) {\n // Condense equivalence converters\n if ( conv === true ) {\n conv = converters[ conv2 ];\n\n // Otherwise, insert the intermediate dataType\n } else if ( converters[ conv2 ] !== true ) {\n current = tmp[ 0 ];\n dataTypes.unshift( tmp[ 1 ] );\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if ( conv !== true ) {\n\n // Unless errors are allowed to bubble, catch and return them\n if ( conv && s[ \"throws\" ] ) {\n response = conv( response );\n } else {\n try {\n response = conv( response );\n } catch ( e ) {\n return { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n }\n }\n }\n }\n }\n }\n\n return { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if ( dataTypes[ 1 ] ) {\n for ( conv in s.converters ) {\n converters[ conv.toLowerCase() ] = s.converters[ conv ];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while ( current ) {\n\n if ( s.responseFields[ current ] ) {\n jqXHR[ s.responseFields[ current ] ] = response;\n }\n\n // Apply the dataFilter if provided\n if ( !prev && isSuccess && s.dataFilter ) {\n response = s.dataFilter( response, s.dataType );\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if ( current ) {\n\n // There's only work to do if current dataType is non-auto\n if ( current === \"*\" ) {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if ( prev !== \"*\" && prev !== current ) {\n\n // Seek a direct converter\n conv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n // If none found, seek a pair\n if ( !conv ) {\n for ( conv2 in converters ) {\n\n // If conv2 outputs current\n tmp = conv2.split( \" \" );\n if ( tmp[ 1 ] === current ) {\n\n // If prev can be converted to accepted input\n conv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n converters[ \"* \" + tmp[ 0 ] ];\n if ( conv ) {\n // Condense equivalence converters\n if ( conv === true ) {\n conv = converters[ conv2 ];\n\n // Otherwise, insert the intermediate dataType\n } else if ( converters[ conv2 ] !== true ) {\n current = tmp[ 0 ];\n dataTypes.unshift( tmp[ 1 ] );\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if ( conv !== true ) {\n\n // Unless errors are allowed to bubble, catch and return them\n if ( conv && s[ \"throws\" ] ) {\n response = conv( response );\n } else {\n try {\n response = conv( response );\n } catch ( e ) {\n return { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n }\n }\n }\n }\n }\n }\n\n return { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if ( dataTypes[ 1 ] ) {\n for ( conv in s.converters ) {\n converters[ conv.toLowerCase() ] = s.converters[ conv ];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while ( current ) {\n\n if ( s.responseFields[ current ] ) {\n jqXHR[ s.responseFields[ current ] ] = response;\n }\n\n // Apply the dataFilter if provided\n if ( !prev && isSuccess && s.dataFilter ) {\n response = s.dataFilter( response, s.dataType );\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if ( current ) {\n\n // There's only work to do if current dataType is non-auto\n if ( current === \"*\" ) {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if ( prev !== \"*\" && prev !== current ) {\n\n // Seek a direct converter\n conv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n // If none found, seek a pair\n if ( !conv ) {\n for ( conv2 in converters ) {\n\n // If conv2 outputs current\n tmp = conv2.split( \" \" );\n if ( tmp[ 1 ] === current ) {\n\n // If prev can be converted to accepted input\n conv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n converters[ \"* \" + tmp[ 0 ] ];\n if ( conv ) {\n // Condense equivalence converters\n if ( conv === true ) {\n conv = converters[ conv2 ];\n\n // Otherwise, insert the intermediate dataType\n } else if ( converters[ conv2 ] !== true ) {\n current = tmp[ 0 ];\n dataTypes.unshift( tmp[ 1 ] );\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if ( conv !== true ) {\n\n // Unless errors are allowed to bubble, catch and return them\n if ( conv && s[ \"throws\" ] ) {\n response = conv( response );\n } else {\n try {\n response = conv( response );\n } catch ( e ) {\n return { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n }\n }\n }\n }\n }\n }\n\n return { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if ( dataTypes[ 1 ] ) {\n for ( conv in s.converters ) {\n converters[ conv.toLowerCase() ] = s.converters[ conv ];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while ( current ) {\n\n if ( s.responseFields[ current ] ) {\n jqXHR[ s.responseFields[ current ] ] = response;\n }\n\n // Apply the dataFilter if provided\n if ( !prev && isSuccess && s.dataFilter ) {\n response = s.dataFilter( response, s.dataType );\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if ( current ) {\n\n // There's only work to do if current dataType is non-auto\n if ( current === \"*\" ) {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if ( prev !== \"*\" && prev !== current ) {\n\n // Seek a direct converter\n conv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n // If none found, seek a pair\n if ( !conv ) {\n for ( conv2 in converters ) {\n\n // If conv2 outputs current\n tmp = conv2.split( \" \" );\n if ( tmp[ 1 ] === current ) {\n\n // If prev can be converted to accepted input\n conv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n converters[ \"* \" + tmp[ 0 ] ];\n if ( conv ) {\n // Condense equivalence converters\n if ( conv === true ) {\n conv = converters[ conv2 ];\n\n // Otherwise, insert the intermediate dataType\n } else if ( converters[ conv2 ] !== true ) {\n current = tmp[ 0 ];\n dataTypes.unshift( tmp[ 1 ] );\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if ( conv !== true ) {\n\n // Unless errors are allowed to bubble, catch and return them\n if ( conv && s[ \"throws\" ] ) {\n response = conv( response );\n } else {\n try {\n response = conv( response );\n } catch ( e ) {\n return { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n }\n }\n }\n }\n }\n }\n\n return { state: \"success\", data: response };\n}", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while (current) {\n\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n }\n\n // Apply the dataFilter if provided\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n // If none found, seek a pair\n if (!conv) {\n for (conv2 in converters) {\n\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n if (tmp[1] === current) {\n\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] ||\n converters[\"* \" + tmp[0]];\n if (conv) {\n\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2];\n\n // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if (conv !== true) {\n\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s.throws) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return { state: \"success\", data: response };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while (current) {\n\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n }\n\n // Apply the dataFilter if provided\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n // If none found, seek a pair\n if (!conv) {\n for (conv2 in converters) {\n\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n if (tmp[1] === current) {\n\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] ||\n converters[\"* \" + tmp[0]];\n if (conv) {\n\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2];\n\n // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if (conv !== true) {\n\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s.throws) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return { state: \"success\", data: response };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while (current) {\n\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n }\n\n // Apply the dataFilter if provided\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n // If none found, seek a pair\n if (!conv) {\n for (conv2 in converters) {\n\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n if (tmp[1] === current) {\n\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] ||\n converters[\"* \" + tmp[0]];\n if (conv) {\n\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2];\n\n // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if (conv !== true) {\n\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s.throws) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {state: \"success\", data: response};\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while (current) {\n\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n }\n\n // Apply the dataFilter if provided\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n // If none found, seek a pair\n if (!conv) {\n for (conv2 in converters) {\n\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n if (tmp[1] === current) {\n\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] ||\n converters[\"* \" + tmp[0]];\n if (conv) {\n\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2];\n\n // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if (conv !== true) {\n\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s[\"throws\"]) { // jscs:ignore requireDotNotation\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {\n state: \"success\",\n data: response\n };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while (current) {\n\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n }\n\n // Apply the dataFilter if provided\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n // If none found, seek a pair\n if (!conv) {\n for (conv2 in converters) {\n\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n if (tmp[1] === current) {\n\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] ||\n converters[\"* \" + tmp[0]];\n if (conv) {\n\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2];\n\n // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if (conv !== true) {\n\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s[\"throws\"]) { // jscs:ignore requireDotNotation\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {state: \"success\", data: response};\n }", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if ( dataTypes[ 1 ] ) {\n for ( conv in s.converters ) {\n converters[ conv.toLowerCase() ] = s.converters[ conv ];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while ( current ) {\n\n if ( s.responseFields[ current ] ) {\n jqXHR[ s.responseFields[ current ] ] = response;\n }\n\n // Apply the dataFilter if provided\n if ( !prev && isSuccess && s.dataFilter ) {\n response = s.dataFilter( response, s.dataType );\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if ( current ) {\n\n // There's only work to do if current dataType is non-auto\n if ( current === \"*\" ) {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if ( prev !== \"*\" && prev !== current ) {\n\n // Seek a direct converter\n conv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n // If none found, seek a pair\n if ( !conv ) {\n for ( conv2 in converters ) {\n\n // If conv2 outputs current\n tmp = conv2.split( \" \" );\n if ( tmp[ 1 ] === current ) {\n\n // If prev can be converted to accepted input\n conv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n converters[ \"* \" + tmp[ 0 ] ];\n if ( conv ) {\n\n // Condense equivalence converters\n if ( conv === true ) {\n conv = converters[ conv2 ];\n\n // Otherwise, insert the intermediate dataType\n } else if ( converters[ conv2 ] !== true ) {\n current = tmp[ 0 ];\n dataTypes.unshift( tmp[ 1 ] );\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if ( conv !== true ) {\n\n // Unless errors are allowed to bubble, catch and return them\n if ( conv && s[ \"throws\" ] ) { // jscs:ignore requireDotNotation\n response = conv( response );\n } else {\n try {\n response = conv( response );\n } catch ( e ) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return { state: \"success\", data: response };\n }", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2, current, conv, tmp, prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice();\n\n // Create converters map with lowercased keys\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift();\n\n // Convert to each sequential dataType\n while (current) {\n\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n }\n\n // Apply the dataFilter if provided\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n\n // There's only work to do if current dataType is non-auto\n if (current === \"*\") {\n\n current = prev;\n\n // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== \"*\" && prev !== current) {\n\n // Seek a direct converter\n conv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n // If none found, seek a pair\n if (!conv) {\n for (conv2 in converters) {\n\n // If conv2 outputs current\n tmp = conv2.split(\" \");\n if (tmp[1] === current) {\n\n // If prev can be converted to accepted input\n conv = converters[prev + \" \" + tmp[0]] ||\n converters[\"* \" + tmp[0]];\n if (conv) {\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2];\n\n // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n break;\n }\n }\n }\n }\n\n // Apply converter (if not an equivalence)\n if (conv !== true) {\n\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s[\"throws\"]) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: \"parsererror\",\n error: conv ? e : \"No conversion from \" + prev + \" to \" + current\n };\n }\n }\n }\n }\n }\n }\n\n return {\n state: \"success\",\n data: response\n };\n }", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n \tvar conv2, current, conv, tmp, prev,\n \t\tconverters = {},\n\n \t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n \t\tdataTypes = s.dataTypes.slice();\n\n \t// Create converters map with lowercased keys\n \tif ( dataTypes[ 1 ] ) {\n \t\tfor ( conv in s.converters ) {\n \t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n \t\t}\n \t}\n\n \tcurrent = dataTypes.shift();\n\n \t// Convert to each sequential dataType\n \twhile ( current ) {\n\n \t\tif ( s.responseFields[ current ] ) {\n \t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n \t\t}\n\n \t\t// Apply the dataFilter if provided\n \t\tif ( !prev && isSuccess && s.dataFilter ) {\n \t\t\tresponse = s.dataFilter( response, s.dataType );\n \t\t}\n\n \t\tprev = current;\n \t\tcurrent = dataTypes.shift();\n\n \t\tif ( current ) {\n\n \t\t\t// There's only work to do if current dataType is non-auto\n \t\t\tif ( current === \"*\" ) {\n\n \t\t\t\tcurrent = prev;\n\n \t\t\t// Convert response if prev dataType is non-auto and differs from current\n \t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n \t\t\t\t// Seek a direct converter\n \t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n \t\t\t\t// If none found, seek a pair\n \t\t\t\tif ( !conv ) {\n \t\t\t\t\tfor ( conv2 in converters ) {\n\n \t\t\t\t\t\t// If conv2 outputs current\n \t\t\t\t\t\ttmp = conv2.split( \" \" );\n \t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n \t\t\t\t\t\t\t// If prev can be converted to accepted input\n \t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n \t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n \t\t\t\t\t\t\tif ( conv ) {\n\n \t\t\t\t\t\t\t\t// Condense equivalence converters\n \t\t\t\t\t\t\t\tif ( conv === true ) {\n \t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n \t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n \t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n \t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n \t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n \t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\tbreak;\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\n \t\t\t\t// Apply converter (if not an equivalence)\n \t\t\t\tif ( conv !== true ) {\n\n \t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n \t\t\t\t\tif ( conv && s.throws ) {\n \t\t\t\t\t\tresponse = conv( response );\n \t\t\t\t\t} else {\n \t\t\t\t\t\ttry {\n \t\t\t\t\t\t\tresponse = conv( response );\n \t\t\t\t\t\t} catch ( e ) {\n \t\t\t\t\t\t\treturn {\n \t\t\t\t\t\t\t\tstate: \"parsererror\",\n \t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\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}\n\n \treturn { state: \"success\", data: response };\n }", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\r\n\tvar conv2, current, conv, tmp, prev,\r\n\t\tconverters = {},\r\n\r\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\r\n\t\tdataTypes = s.dataTypes.slice();\r\n\r\n\t// Create converters map with lowercased keys\r\n\tif ( dataTypes[ 1 ] ) {\r\n\t\tfor ( conv in s.converters ) {\r\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\r\n\t\t}\r\n\t}\r\n\r\n\tcurrent = dataTypes.shift();\r\n\r\n\t// Convert to each sequential dataType\r\n\twhile ( current ) {\r\n\r\n\t\tif ( s.responseFields[ current ] ) {\r\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\r\n\t\t}\r\n\r\n\t\t// Apply the dataFilter if provided\r\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\r\n\t\t\tresponse = s.dataFilter( response, s.dataType );\r\n\t\t}\r\n\r\n\t\tprev = current;\r\n\t\tcurrent = dataTypes.shift();\r\n\r\n\t\tif ( current ) {\r\n\r\n\t\t\t// There's only work to do if current dataType is non-auto\r\n\t\t\tif ( current === \"*\" ) {\r\n\r\n\t\t\t\tcurrent = prev;\r\n\r\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\r\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\r\n\r\n\t\t\t\t// Seek a direct converter\r\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\r\n\r\n\t\t\t\t// If none found, seek a pair\r\n\t\t\t\tif ( !conv ) {\r\n\t\t\t\t\tfor ( conv2 in converters ) {\r\n\r\n\t\t\t\t\t\t// If conv2 outputs current\r\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\r\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\r\n\r\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\r\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\r\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\r\n\t\t\t\t\t\t\tif ( conv ) {\r\n\r\n\t\t\t\t\t\t\t\t// Condense equivalence converters\r\n\t\t\t\t\t\t\t\tif ( conv === true ) {\r\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\r\n\r\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\r\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\r\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\r\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Apply converter (if not an equivalence)\r\n\t\t\t\tif ( conv !== true ) {\r\n\r\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\r\n\t\t\t\t\tif ( conv && s.throws ) {\r\n\t\t\t\t\t\tresponse = conv( response );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tresponse = conv( response );\r\n\t\t\t\t\t\t} catch ( e ) {\r\n\t\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\r\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn { state: \"success\", data: response };\r\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\r\n\tvar conv2, current, conv, tmp, prev,\r\n\t\tconverters = {},\r\n\r\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\r\n\t\tdataTypes = s.dataTypes.slice();\r\n\r\n\t// Create converters map with lowercased keys\r\n\tif ( dataTypes[ 1 ] ) {\r\n\t\tfor ( conv in s.converters ) {\r\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\r\n\t\t}\r\n\t}\r\n\r\n\tcurrent = dataTypes.shift();\r\n\r\n\t// Convert to each sequential dataType\r\n\twhile ( current ) {\r\n\r\n\t\tif ( s.responseFields[ current ] ) {\r\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\r\n\t\t}\r\n\r\n\t\t// Apply the dataFilter if provided\r\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\r\n\t\t\tresponse = s.dataFilter( response, s.dataType );\r\n\t\t}\r\n\r\n\t\tprev = current;\r\n\t\tcurrent = dataTypes.shift();\r\n\r\n\t\tif ( current ) {\r\n\r\n\t\t// There's only work to do if current dataType is non-auto\r\n\t\t\tif ( current === \"*\" ) {\r\n\r\n\t\t\t\tcurrent = prev;\r\n\r\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\r\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\r\n\r\n\t\t\t\t// Seek a direct converter\r\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\r\n\r\n\t\t\t\t// If none found, seek a pair\r\n\t\t\t\tif ( !conv ) {\r\n\t\t\t\t\tfor ( conv2 in converters ) {\r\n\r\n\t\t\t\t\t\t// If conv2 outputs current\r\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\r\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\r\n\r\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\r\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\r\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\r\n\t\t\t\t\t\t\tif ( conv ) {\r\n\r\n\t\t\t\t\t\t\t\t// Condense equivalence converters\r\n\t\t\t\t\t\t\t\tif ( conv === true ) {\r\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\r\n\r\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\r\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\r\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\r\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Apply converter (if not an equivalence)\r\n\t\t\t\tif ( conv !== true ) {\r\n\r\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\r\n\t\t\t\t\tif ( conv && s.throws ) {\r\n\t\t\t\t\t\tresponse = conv( response );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tresponse = conv( response );\r\n\t\t\t\t\t\t} catch ( e ) {\r\n\t\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\r\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn { state: \"success\", data: response };\r\n}", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n\t\tvar conv2,\n\t\t current,\n\t\t conv,\n\t\t tmp,\n\t\t prev,\n\t\t converters = {},\n\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t\t// Create converters map with lowercased keys\n\t\tif (dataTypes[1]) {\n\t\t\tfor (conv in s.converters) {\n\t\t\t\tconverters[conv.toLowerCase()] = s.converters[conv];\n\t\t\t}\n\t\t}\n\n\t\tcurrent = dataTypes.shift();\n\n\t\t// Convert to each sequential dataType\n\t\twhile (current) {\n\n\t\t\tif (s.responseFields[current]) {\n\t\t\t\tjqXHR[s.responseFields[current]] = response;\n\t\t\t}\n\n\t\t\t// Apply the dataFilter if provided\n\t\t\tif (!prev && isSuccess && s.dataFilter) {\n\t\t\t\tresponse = s.dataFilter(response, s.dataType);\n\t\t\t}\n\n\t\t\tprev = current;\n\t\t\tcurrent = dataTypes.shift();\n\n\t\t\tif (current) {\n\n\t\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\t\tif (current === \"*\") {\n\n\t\t\t\t\tcurrent = prev;\n\n\t\t\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t\t} else if (prev !== \"*\" && prev !== current) {\n\n\t\t\t\t\t// Seek a direct converter\n\t\t\t\t\tconv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n\t\t\t\t\t// If none found, seek a pair\n\t\t\t\t\tif (!conv) {\n\t\t\t\t\t\tfor (conv2 in converters) {\n\n\t\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\t\ttmp = conv2.split(\" \");\n\t\t\t\t\t\t\tif (tmp[1] === current) {\n\n\t\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\t\tconv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n\t\t\t\t\t\t\t\tif (conv) {\n\n\t\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\t\tif (conv === true) {\n\t\t\t\t\t\t\t\t\t\tconv = converters[conv2];\n\n\t\t\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t\t} else if (converters[conv2] !== true) {\n\t\t\t\t\t\t\t\t\t\tcurrent = tmp[0];\n\t\t\t\t\t\t\t\t\t\tdataTypes.unshift(tmp[1]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\t\tif (conv !== true) {\n\n\t\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\t\tif (conv && s.throws) {\n\t\t\t\t\t\t\tresponse = conv(response);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tresponse = conv(response);\n\t\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\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\n\t\treturn { state: \"success\", data: response };\n\t}", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n\t\tvar conv2,\n\t\t current,\n\t\t conv,\n\t\t tmp,\n\t\t prev,\n\t\t converters = {},\n\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t\t// Create converters map with lowercased keys\n\t\tif (dataTypes[1]) {\n\t\t\tfor (conv in s.converters) {\n\t\t\t\tconverters[conv.toLowerCase()] = s.converters[conv];\n\t\t\t}\n\t\t}\n\n\t\tcurrent = dataTypes.shift();\n\n\t\t// Convert to each sequential dataType\n\t\twhile (current) {\n\n\t\t\tif (s.responseFields[current]) {\n\t\t\t\tjqXHR[s.responseFields[current]] = response;\n\t\t\t}\n\n\t\t\t// Apply the dataFilter if provided\n\t\t\tif (!prev && isSuccess && s.dataFilter) {\n\t\t\t\tresponse = s.dataFilter(response, s.dataType);\n\t\t\t}\n\n\t\t\tprev = current;\n\t\t\tcurrent = dataTypes.shift();\n\n\t\t\tif (current) {\n\n\t\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\t\tif (current === \"*\") {\n\n\t\t\t\t\tcurrent = prev;\n\n\t\t\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t\t} else if (prev !== \"*\" && prev !== current) {\n\n\t\t\t\t\t// Seek a direct converter\n\t\t\t\t\tconv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n\t\t\t\t\t// If none found, seek a pair\n\t\t\t\t\tif (!conv) {\n\t\t\t\t\t\tfor (conv2 in converters) {\n\n\t\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\t\ttmp = conv2.split(\" \");\n\t\t\t\t\t\t\tif (tmp[1] === current) {\n\n\t\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\t\tconv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n\t\t\t\t\t\t\t\tif (conv) {\n\n\t\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\t\tif (conv === true) {\n\t\t\t\t\t\t\t\t\t\tconv = converters[conv2];\n\n\t\t\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t\t} else if (converters[conv2] !== true) {\n\t\t\t\t\t\t\t\t\t\tcurrent = tmp[0];\n\t\t\t\t\t\t\t\t\t\tdataTypes.unshift(tmp[1]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\t\tif (conv !== true) {\n\n\t\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\t\tif (conv && s.throws) {\n\t\t\t\t\t\t\tresponse = conv(response);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tresponse = conv(response);\n\t\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\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\n\t\treturn { state: \"success\", data: response };\n\t}", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n\t\tvar conv2,\n\t\t current,\n\t\t conv,\n\t\t tmp,\n\t\t prev,\n\t\t converters = {},\n\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t\t// Create converters map with lowercased keys\n\t\tif (dataTypes[1]) {\n\t\t\tfor (conv in s.converters) {\n\t\t\t\tconverters[conv.toLowerCase()] = s.converters[conv];\n\t\t\t}\n\t\t}\n\n\t\tcurrent = dataTypes.shift();\n\n\t\t// Convert to each sequential dataType\n\t\twhile (current) {\n\n\t\t\tif (s.responseFields[current]) {\n\t\t\t\tjqXHR[s.responseFields[current]] = response;\n\t\t\t}\n\n\t\t\t// Apply the dataFilter if provided\n\t\t\tif (!prev && isSuccess && s.dataFilter) {\n\t\t\t\tresponse = s.dataFilter(response, s.dataType);\n\t\t\t}\n\n\t\t\tprev = current;\n\t\t\tcurrent = dataTypes.shift();\n\n\t\t\tif (current) {\n\n\t\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\t\tif (current === \"*\") {\n\n\t\t\t\t\tcurrent = prev;\n\n\t\t\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t\t} else if (prev !== \"*\" && prev !== current) {\n\n\t\t\t\t\t// Seek a direct converter\n\t\t\t\t\tconv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n\t\t\t\t\t// If none found, seek a pair\n\t\t\t\t\tif (!conv) {\n\t\t\t\t\t\tfor (conv2 in converters) {\n\n\t\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\t\ttmp = conv2.split(\" \");\n\t\t\t\t\t\t\tif (tmp[1] === current) {\n\n\t\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\t\tconv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n\t\t\t\t\t\t\t\tif (conv) {\n\n\t\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\t\tif (conv === true) {\n\t\t\t\t\t\t\t\t\t\tconv = converters[conv2];\n\n\t\t\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t\t} else if (converters[conv2] !== true) {\n\t\t\t\t\t\t\t\t\t\tcurrent = tmp[0];\n\t\t\t\t\t\t\t\t\t\tdataTypes.unshift(tmp[1]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\t\tif (conv !== true) {\n\n\t\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\t\tif (conv && s.throws) {\n\t\t\t\t\t\t\tresponse = conv(response);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tresponse = conv(response);\n\t\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\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\n\t\treturn { state: \"success\", data: response };\n\t}", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n\t\tvar conv2,\n\t\t current,\n\t\t conv,\n\t\t tmp,\n\t\t prev,\n\t\t converters = {},\n\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t\t// Create converters map with lowercased keys\n\t\tif (dataTypes[1]) {\n\t\t\tfor (conv in s.converters) {\n\t\t\t\tconverters[conv.toLowerCase()] = s.converters[conv];\n\t\t\t}\n\t\t}\n\n\t\tcurrent = dataTypes.shift();\n\n\t\t// Convert to each sequential dataType\n\t\twhile (current) {\n\n\t\t\tif (s.responseFields[current]) {\n\t\t\t\tjqXHR[s.responseFields[current]] = response;\n\t\t\t}\n\n\t\t\t// Apply the dataFilter if provided\n\t\t\tif (!prev && isSuccess && s.dataFilter) {\n\t\t\t\tresponse = s.dataFilter(response, s.dataType);\n\t\t\t}\n\n\t\t\tprev = current;\n\t\t\tcurrent = dataTypes.shift();\n\n\t\t\tif (current) {\n\n\t\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\t\tif (current === \"*\") {\n\n\t\t\t\t\tcurrent = prev;\n\n\t\t\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t\t} else if (prev !== \"*\" && prev !== current) {\n\n\t\t\t\t\t// Seek a direct converter\n\t\t\t\t\tconv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n\t\t\t\t\t// If none found, seek a pair\n\t\t\t\t\tif (!conv) {\n\t\t\t\t\t\tfor (conv2 in converters) {\n\n\t\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\t\ttmp = conv2.split(\" \");\n\t\t\t\t\t\t\tif (tmp[1] === current) {\n\n\t\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\t\tconv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n\t\t\t\t\t\t\t\tif (conv) {\n\n\t\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\t\tif (conv === true) {\n\t\t\t\t\t\t\t\t\t\tconv = converters[conv2];\n\n\t\t\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t\t} else if (converters[conv2] !== true) {\n\t\t\t\t\t\t\t\t\t\tcurrent = tmp[0];\n\t\t\t\t\t\t\t\t\t\tdataTypes.unshift(tmp[1]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\t\tif (conv !== true) {\n\n\t\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\t\tif (conv && s[\"throws\"]) {\n\t\t\t\t\t\t\t// jscs:ignore requireDotNotation\n\t\t\t\t\t\t\tresponse = conv(response);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tresponse = conv(response);\n\t\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\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\n\t\treturn { state: \"success\", data: response };\n\t}", "function ajaxConvert(s, response, jqXHR, isSuccess) {\r\n\t\tvar conv2, current, conv, tmp, prev,\r\n\t\t\tconverters = {},\r\n\r\n\t\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\r\n\t\t\tdataTypes = s.dataTypes.slice();\r\n\r\n\t\t// Create converters map with lowercased keys\r\n\t\tif (dataTypes[1]) {\r\n\t\t\tfor (conv in s.converters) {\r\n\t\t\t\tconverters[conv.toLowerCase()] = s.converters[conv];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcurrent = dataTypes.shift();\r\n\r\n\t\t// Convert to each sequential dataType\r\n\t\twhile (current) {\r\n\r\n\t\t\tif (s.responseFields[current]) {\r\n\t\t\t\tjqXHR[s.responseFields[current]] = response;\r\n\t\t\t}\r\n\r\n\t\t\t// Apply the dataFilter if provided\r\n\t\t\tif (!prev && isSuccess && s.dataFilter) {\r\n\t\t\t\tresponse = s.dataFilter(response, s.dataType);\r\n\t\t\t}\r\n\r\n\t\t\tprev = current;\r\n\t\t\tcurrent = dataTypes.shift();\r\n\r\n\t\t\tif (current) {\r\n\r\n\t\t\t\t// There's only work to do if current dataType is non-auto\r\n\t\t\t\tif (current === \"*\") {\r\n\r\n\t\t\t\t\tcurrent = prev;\r\n\r\n\t\t\t\t\t// Convert response if prev dataType is non-auto and differs from current\r\n\t\t\t\t} else if (prev !== \"*\" && prev !== current) {\r\n\r\n\t\t\t\t\t// Seek a direct converter\r\n\t\t\t\t\tconv = converters[prev + \" \" + current] || converters[\"* \" + current];\r\n\r\n\t\t\t\t\t// If none found, seek a pair\r\n\t\t\t\t\tif (!conv) {\r\n\t\t\t\t\t\tfor (conv2 in converters) {\r\n\r\n\t\t\t\t\t\t\t// If conv2 outputs current\r\n\t\t\t\t\t\t\ttmp = conv2.split(\" \");\r\n\t\t\t\t\t\t\tif (tmp[1] === current) {\r\n\r\n\t\t\t\t\t\t\t\t// If prev can be converted to accepted input\r\n\t\t\t\t\t\t\t\tconv = converters[prev + \" \" + tmp[0]] ||\r\n\t\t\t\t\t\t\t\t\tconverters[\"* \" + tmp[0]];\r\n\t\t\t\t\t\t\t\tif (conv) {\r\n\r\n\t\t\t\t\t\t\t\t\t// Condense equivalence converters\r\n\t\t\t\t\t\t\t\t\tif (conv === true) {\r\n\t\t\t\t\t\t\t\t\t\tconv = converters[conv2];\r\n\r\n\t\t\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\r\n\t\t\t\t\t\t\t\t\t} else if (converters[conv2] !== true) {\r\n\t\t\t\t\t\t\t\t\t\tcurrent = tmp[0];\r\n\t\t\t\t\t\t\t\t\t\tdataTypes.unshift(tmp[1]);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Apply converter (if not an equivalence)\r\n\t\t\t\t\tif (conv !== true) {\r\n\r\n\t\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\r\n\t\t\t\t\t\tif (conv && s[\"throws\"]) { // jscs:ignore requireDotNotation\r\n\t\t\t\t\t\t\tresponse = conv(response);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tresponse = conv(response);\r\n\t\t\t\t\t\t\t} catch (e) {\r\n\t\t\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\t\t\tstate: \"parsererror\",\r\n\t\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\r\n\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn { state: \"success\", data: response };\r\n\t}", "function ajaxConvert(s, response, jqXHR, isSuccess) {\n\t\tvar conv2,\n\t\t current,\n\t\t conv,\n\t\t tmp,\n\t\t prev,\n\t\t converters = {},\n\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t\t// Create converters map with lowercased keys\n\t\tif (dataTypes[1]) {\n\t\t\tfor (conv in s.converters) {\n\t\t\t\tconverters[conv.toLowerCase()] = s.converters[conv];\n\t\t\t}\n\t\t}\n\n\t\tcurrent = dataTypes.shift();\n\n\t\t// Convert to each sequential dataType\n\t\twhile (current) {\n\n\t\t\tif (s.responseFields[current]) {\n\t\t\t\tjqXHR[s.responseFields[current]] = response;\n\t\t\t}\n\n\t\t\t// Apply the dataFilter if provided\n\t\t\tif (!prev && isSuccess && s.dataFilter) {\n\t\t\t\tresponse = s.dataFilter(response, s.dataType);\n\t\t\t}\n\n\t\t\tprev = current;\n\t\t\tcurrent = dataTypes.shift();\n\n\t\t\tif (current) {\n\n\t\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\t\tif (current === \"*\") {\n\n\t\t\t\t\tcurrent = prev;\n\n\t\t\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t\t} else if (prev !== \"*\" && prev !== current) {\n\n\t\t\t\t\t\t// Seek a direct converter\n\t\t\t\t\t\tconv = converters[prev + \" \" + current] || converters[\"* \" + current];\n\n\t\t\t\t\t\t// If none found, seek a pair\n\t\t\t\t\t\tif (!conv) {\n\t\t\t\t\t\t\tfor (conv2 in converters) {\n\n\t\t\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\t\t\ttmp = conv2.split(\" \");\n\t\t\t\t\t\t\t\tif (tmp[1] === current) {\n\n\t\t\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\t\t\tconv = converters[prev + \" \" + tmp[0]] || converters[\"* \" + tmp[0]];\n\t\t\t\t\t\t\t\t\tif (conv) {\n\n\t\t\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\t\t\tif (conv === true) {\n\t\t\t\t\t\t\t\t\t\t\tconv = converters[conv2];\n\n\t\t\t\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t\t\t} else if (converters[conv2] !== true) {\n\t\t\t\t\t\t\t\t\t\t\t\tcurrent = tmp[0];\n\t\t\t\t\t\t\t\t\t\t\t\tdataTypes.unshift(tmp[1]);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\t\t\tif (conv !== true) {\n\n\t\t\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\t\t\tif (conv && s.throws) {\n\t\t\t\t\t\t\t\tresponse = conv(response);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tresponse = conv(response);\n\t\t\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn { state: \"success\", data: response };\n\t}", "function done( status, statusText, responses, headers ) {\n\n\t\t\t// Called once\n\t\t\tif ( state === 2 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// State is \"done\" now\n\t\t\tstate = 2;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\tclearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status ? 4 : 0;\n\n\t\t\tvar isSuccess,\n\t\t\t\tsuccess,\n\t\t\t\terror,\n\t\t\t\tresponse = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined,\n\t\t\t\tlastModified,\n\t\t\t\tetag;\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( status >= 200 && status < 300 || status === 304 ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\n\t\t\t\t\tif ( ( lastModified = jqXHR.getResponseHeader( \"Last-Modified\" ) ) ) {\n\t\t\t\t\t\tjQuery.lastModified[ ifModifiedKey ] = lastModified;\n\t\t\t\t\t}\n\t\t\t\t\tif ( ( etag = jqXHR.getResponseHeader( \"Etag\" ) ) ) {\n\t\t\t\t\t\tjQuery.etag[ ifModifiedKey ] = etag;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If not modified\n\t\t\t\tif ( status === 304 ) {\n\n\t\t\t\t\tstatusText = \"notmodified\";\n\t\t\t\t\tisSuccess = true;\n\n\t\t\t\t// If we have data\n\t\t\t\t} else {\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsuccess = ajaxConvert( s, response );\n\t\t\t\t\t\tstatusText = \"success\";\n\t\t\t\t\t\tisSuccess = true;\n\t\t\t\t\t} catch(e) {\n\t\t\t\t\t\t// We have a parsererror\n\t\t\t\t\t\tstatusText = \"parsererror\";\n\t\t\t\t\t\terror = e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// We extract error from statusText\n\t\t\t\t// then normalize statusText and status for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif( !statusText || status ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = statusText;\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajax\" + ( isSuccess ? \"Success\" : \"Error\" ),\n\t\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.resolveWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s] );\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function done( status, statusText, responses, headers ) {\n\n\t\t\t// Called once\n\t\t\tif ( state === 2 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// State is \"done\" now\n\t\t\tstate = 2;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\tclearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status ? 4 : 0;\n\n\t\t\tvar isSuccess,\n\t\t\t\tsuccess,\n\t\t\t\terror,\n\t\t\t\tresponse = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined,\n\t\t\t\tlastModified,\n\t\t\t\tetag;\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( status >= 200 && status < 300 || status === 304 ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\n\t\t\t\t\tif ( ( lastModified = jqXHR.getResponseHeader( \"Last-Modified\" ) ) ) {\n\t\t\t\t\t\tjQuery.lastModified[ ifModifiedKey ] = lastModified;\n\t\t\t\t\t}\n\t\t\t\t\tif ( ( etag = jqXHR.getResponseHeader( \"Etag\" ) ) ) {\n\t\t\t\t\t\tjQuery.etag[ ifModifiedKey ] = etag;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If not modified\n\t\t\t\tif ( status === 304 ) {\n\n\t\t\t\t\tstatusText = \"notmodified\";\n\t\t\t\t\tisSuccess = true;\n\n\t\t\t\t// If we have data\n\t\t\t\t} else {\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsuccess = ajaxConvert( s, response );\n\t\t\t\t\t\tstatusText = \"success\";\n\t\t\t\t\t\tisSuccess = true;\n\t\t\t\t\t} catch(e) {\n\t\t\t\t\t\t// We have a parsererror\n\t\t\t\t\t\tstatusText = \"parsererror\";\n\t\t\t\t\t\terror = e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// We extract error from statusText\n\t\t\t\t// then normalize statusText and status for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif( !statusText || status ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = statusText;\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajax\" + ( isSuccess ? \"Success\" : \"Error\" ),\n\t\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.resolveWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s] );\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function done(status, nativeStatusText, responses, headers) {\n var isSuccess, success, error, response, modified,\n statusText = nativeStatusText;\n\n // Called once\n if (state === 2) {\n return;\n }\n\n // State is \"done\" now\n state = 2;\n\n // Clear timeout if it exists\n if (timeoutTimer) {\n clearTimeout(timeoutTimer);\n }\n\n // Dereference transport for early garbage collection\n // (no matter how long the jqXHR object will be used)\n transport = undefined;\n\n // Cache response headers\n responseHeadersString = headers || \"\";\n\n // Set readyState\n jqXHR.readyState = status > 0 ? 4 : 0;\n\n // Determine if successful\n isSuccess = status >= 200 && status < 300 || status === 304;\n\n // Get response data\n if (responses) {\n response = ajaxHandleResponses(s, jqXHR, responses);\n }\n\n // Convert no matter what (that way responseXXX fields are always set)\n response = ajaxConvert(s, response, jqXHR, isSuccess);\n\n // If successful, handle type chaining\n if (isSuccess) {\n\n // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n if (s.ifModified) {\n modified = jqXHR.getResponseHeader(\"Last-Modified\");\n if (modified) {\n jQuery.lastModified[ cacheURL ] = modified;\n }\n modified = jqXHR.getResponseHeader(\"etag\");\n if (modified) {\n jQuery.etag[ cacheURL ] = modified;\n }\n }\n\n // if no content\n if (status === 204 || s.type === \"HEAD\") {\n statusText = \"nocontent\";\n\n // if not modified\n } else if (status === 304) {\n statusText = \"notmodified\";\n\n // If we have data, let's convert it\n } else {\n statusText = response.state;\n success = response.data;\n error = response.error;\n isSuccess = !error;\n }\n } else {\n // We extract error from statusText\n // then normalize statusText and status for non-aborts\n error = statusText;\n if (status || !statusText) {\n statusText = \"error\";\n if (status < 0) {\n status = 0;\n }\n }\n }\n\n // Set data for the fake xhr object\n jqXHR.status = status;\n jqXHR.statusText = (nativeStatusText || statusText) + \"\";\n\n // Success/Error\n if (isSuccess) {\n deferred.resolveWith(callbackContext, [success, statusText, jqXHR]);\n } else {\n deferred.rejectWith(callbackContext, [jqXHR, statusText, error]);\n }\n\n // Status-dependent callbacks\n jqXHR.statusCode(statusCode);\n statusCode = undefined;\n\n if (fireGlobals) {\n globalEventContext.trigger(isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n [jqXHR, s, isSuccess ? success : error]);\n }\n\n // Complete\n completeDeferred.fireWith(callbackContext, [jqXHR, statusText]);\n\n if (fireGlobals) {\n globalEventContext.trigger(\"ajaxComplete\", [jqXHR, s]);\n // Handle the global AJAX counter\n if (!(--jQuery.active)) {\n jQuery.event.trigger(\"ajaxStop\");\n }\n }\n }", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}", "function ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\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}\n\n\treturn { state: \"success\", data: response };\n}" ]
[ "0.62714094", "0.62647414", "0.6205049", "0.6195484", "0.6194774", "0.6179257", "0.6179257", "0.6176538", "0.6153255", "0.60963935", "0.60910285", "0.60877764", "0.60877764", "0.60877764", "0.60877764", "0.60877764", "0.60756016", "0.60756016", "0.60756016", "0.6051014", "0.60196114", "0.6019427", "0.6013787", "0.598618", "0.5984647", "0.5983636", "0.59782046", "0.5972869", "0.5969668", "0.5969668", "0.5969668", "0.59673697", "0.5964635", "0.5964635", "0.5964635", "0.59586823", "0.59586823", "0.59544235", "0.5940206", "0.58385766", "0.5752641", "0.5751611", "0.57380694", "0.57380694", "0.57380694", "0.57380694", "0.5725038", "0.5718718", "0.570861", "0.570861", "0.570403", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104", "0.5695104" ]
0.0
-1
Callback for when everything is done
function done( status, nativeStatusText, responses, headers ) { var isSuccess, success, error, response, modified, statusText = nativeStatusText; // Ignore repeat invocations if ( completed ) { return; } completed = true; // Clear timeout if it exists if ( timeoutTimer ) { window.clearTimeout( timeoutTimer ); } // Dereference transport for early garbage collection // (no matter how long the jqXHR object will be used) transport = undefined; // Cache response headers responseHeadersString = headers || ""; // Set readyState jqXHR.readyState = status > 0 ? 4 : 0; // Determine if successful isSuccess = status >= 200 && status < 300 || status === 304; // Get response data if ( responses ) { response = ajaxHandleResponses( s, jqXHR, responses ); } // Convert no matter what (that way responseXXX fields are always set) response = ajaxConvert( s, response, jqXHR, isSuccess ); // If successful, handle type chaining if ( isSuccess ) { // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. if ( s.ifModified ) { modified = jqXHR.getResponseHeader( "Last-Modified" ); if ( modified ) { jQuery.lastModified[ cacheURL ] = modified; } modified = jqXHR.getResponseHeader( "etag" ); if ( modified ) { jQuery.etag[ cacheURL ] = modified; } } // if no content if ( status === 204 || s.type === "HEAD" ) { statusText = "nocontent"; // if not modified } else if ( status === 304 ) { statusText = "notmodified"; // If we have data, let's convert it } else { statusText = response.state; success = response.data; error = response.error; isSuccess = !error; } } else { // Extract error from statusText and normalize for non-aborts error = statusText; if ( status || !statusText ) { statusText = "error"; if ( status < 0 ) { status = 0; } } } // Set data for the fake xhr object jqXHR.status = status; jqXHR.statusText = ( nativeStatusText || statusText ) + ""; // Success/Error if ( isSuccess ) { deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); } else { deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); } // Status-dependent callbacks jqXHR.statusCode( statusCode ); statusCode = undefined; if ( fireGlobals ) { globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", [ jqXHR, s, isSuccess ? success : error ] ); } // Complete completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); if ( fireGlobals ) { globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); // Handle the global AJAX counter if ( !( --jQuery.active ) ) { jQuery.event.trigger( "ajaxStop" ); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function done() {}", "function finished(err){\n }", "onFinish() {}", "function AllDone(){\n \n}", "async onFinished() {}", "done() {}", "_onEnd() {}", "done () {}", "complete() {}", "function onFinish() {\n console.log('finished!');\n}", "function complete(){\r\n callbackCount++;\r\n if(callbackCount >= 3){\t\t\t\t//CHANGE IF FUNCTIONS BEING CALLED CHANGES!!\r\n res.render('search_topic', context);\r\n }\r\n\r\n }", "function allDone() {\n pub.stop();\n console.info('Alle Tests beendet.');\n console.info(app.persistence.getResults());\n $(document).trigger('testQueueDone');\n }", "function complete() {\n Y.log('complete');\n }", "function complete() {\n Y.log('complete');\n }", "function complete() {\n Y.log('complete');\n }", "function complete() {\n Y.log('complete');\n }", "function completelyDone() {\n _rdbConn.close();\n console.log(\"ALL DONE\");\n}", "function doDone() {\r\n // in FF this is empty.\r\n\r\n }", "function doDone() {\r\n // in FF this is empty.\r\n\r\n }", "function complete() {\n Y.log('complete');\n }", "function uploadCompleteHandler() {\n console.log(\"Upload finished.\");\n getAllFiles();\n /*\n Do what you like here.\n */\n}", "function finish(){\n if( settings.onFinish ) {\n settings.onFinish( data );\n }\n }", "function complete() {\n\t\t\tcallbackCount++;\n\t\t\tif(callbackCount >= 1) {\n\t\t\t\t//console.log(context);\n\t\t\t\tres.render('UpdateCoach', context);\n\t\t\t}\n\t\t}", "function onCompletion(err) {\n if (err) { return console.error(err);}\n else { console.log(\"All done.\") }\n}", "function callbackDone() {\n module.presentation.set('contents', module.contents);\n module.callback(module.command);\n }", "completed(data) {}", "function allDone(){\n\t\tinitCalculator(currenciesData,feesData,userData);\n\t}", "function all_done() {\n console.log('\\n------------------------------------------ All Done ------------------------------------------\\n');\n broadcast_state('registered_owners');\n process.env.app_first_setup = 'no';\n\n logger.debug('hash is', helper.getHash());\n helper.write({ hash: helper.getHash() });\t\t\t\t\t\t\t//write state file so we know we started before\n ws_server.check_for_updates(null);\t\t\t\t\t\t\t\t//call the periodic task to get the state of everything\n}", "function done() {\n\tupdateProgressById(\"uploadProgress\", 95)\n\n\t// console.log('finished');\n}", "function complete() {\n\tconsole.log('Completed');\n}", "function callback() {}", "function callback() {}", "function callback() {}", "function callback() {}", "function callback() {}", "function complete(){\r\n console.log(context.pokemon);\r\n callbackCount++;\r\n if(callbackCount >= 1){\r\n res.render('update-discord', context);\r\n }\r\n\r\n }", "function callback(){}", "function checkDone() {\r\n\t\t\tif (todo===0) {\r\n\t\t\t\tresultCallback(unmarshalledTable);\r\n\t\t\t}\r\n\t\t}", "function onAllFinished() {\n //we're finished crawling so we set the endtime to the current time and still crawling to false\n endTime = new Date().getTime();\n stillCrawling = false;\n //clear the console for final output since stillCrawling is now false reportCrawling will not write again\n console.clear();\n //output how many urls wer crawld and how long it took\n console.log(`Finished crawling ${crawler.crawledUrls.length} urls in ${(endTime - startTime) / 1000} seconds\\n`);\n //if pages have been added to errorPages we will print them\n if (errorPages.length > 0) {\n console.log('The Following Pages Had Errors:');\n printErrors();\n } \n //else we congratulate the user\n else {\n console.log('Congratulations There Were No Errors!');\n }\n}", "_done() {\n this.worker = this.task = -1;\n this.callbacks = []; this.callback = 0;\n }", "function onProcessFinal() {\n chai_1.expect(loopResult, 'LoopResult should contain 10').to.contain(10);\n chai_1.expect(loopResult, 'LoopResult should contain 5').to.contain(5);\n chai_1.expect(loopResult, 'LoopResult should contain 1').to.contain(1);\n done();\n }", "function done() {\n self._server = null;\n\n if (callback) {\n callback.apply(null, arguments);\n }\n }", "onEnd() {\n\t\tthis.debug('onEnd');\n\t}", "_finished( ) { \n\n\t\tif( this.verbose ) { this.log( \"All stages finished.\" ); }\n\n\t\tif( this.rollback ) {\n\t\t\tif( this.verbose ) { this.log( \"Processing failed.\" ); }\n\t\t\tthis.callback.failure( \"failed because of stage \\\"\" + this.failed + \"\\\"\" );\n\t\t} else {\n\t\t\tif( this.verbose ) { this.log( \"Processing succeeded.\" ); }\n\t\t\tthis.callback.success( this.results ); \n\t\t}\n\t\t\n\t}", "function complete(){\r\n callbackCount++;\r\n if(callbackCount >= 1){\r\n res.render('browsecustomerorders', context);\r\n }\r\n\r\n }", "function onAllCallbacksCreated() {\n allCallbacksCreated = true;\n tryOnComplete();\n }", "function my_callback(json_result) {\n console.log(\"Done\");\n }", "onend() {\n if (this.done)\n return;\n this.done = true;\n this.parser = null;\n this.handleCallback(null);\n }", "function complete() {\n callbackCount++;\n if(callbackCount >= 2) {\n res.render('charactersInFilms', context);\n }\n }", "function onFinish() {\n\t\tclbk();\n\t}", "function onFinished(notAborted, arr) {\n Machine.find(function(err, instances){\n console.log(\"Done with importing!\");\n });\n }", "_onTasksDone() {\n // meant to be implemented by subclass if needed\n }", "finish() {}", "function executeCallbacks(){\n\t\t\t\t\t\tcallbacks[lib].forEach(function(cb) {\n\t\t\t\t\t\t\tcb();\n\t\t\t\t\t\t});\n\t\t\t\t\t\tloading[lib].status = 1;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}", "_onComplete() {\n // Ensure worker queues for all paths are stopped at the end of the query\n this.stop();\n }", "function finalizeUploading() {\n\n}", "onloadend() {}", "loadComplete() {\n // Nothing\n }", "finish() {\n this.done = true;\n }", "function tellMeWhenDone(callback) {\n\tconsole.log('I\\'m done, now let\\'s run the call back!');\n\tconsole.log('------');\n\n\tcallback();\n}", "afterHandling() {}", "function _callComplete(){\n if( this.callback ){\n this.callback( this.response );\n }\n }", "onAllCompleted() {\n this.clearRefresher();\n }", "onComplete() {// Do nothing, this is defined for flow if extended classes implement this function\n }", "function final() { console.log('Done and Final'); process.exit() ; }", "function end(done) {\n done();\n}", "function finished (err) {\n\t\tif (err){\n\t\t\tconsole.error(\"oops, something went wrong.\");\n\t\t\tconsole.error(err);\n\t\t} else {\n\t\t\tconsole.log(\"Data saved successfully\");\n\t\t\tpickColor();\n\t\t}\n\t}", "function done () {\n //console.error(\"Finish ...\");\n session.output.write(DetailsArray);\n apim.output('application/json');\n apim.setvariable('message.status.code', 200);\n}", "function done(err, result) {\n callback(err, result);\n }", "function done(err, result) {\n callback(err, result);\n }", "function done() {\r\n\tif (verbose) console.log('done function')\r\n\tcurrentSong = tallyVotes()\r\n\tvotes = []\r\n}", "async end() { }", "function loadComplete() {\n cnt--;\n if (!cnt) {\n execComplete();\n }\n }", "function done(doneItem){\n \n}", "function finishProcess(){\n self.updateBars(callback);\n }", "function loadDone() {\n return true;\n }", "function done() {\n //if (count == ready && that.components + 1 >= _cmps.length) {\n if (count == ready ) {\n callback(null, that.template); //module return\n } else {\n return false;\n }\n }", "function tryOnComplete() {\n if (numCallbacks == numComplete && allCallbacksCreated) {\n onComplete();\n }\n }", "function cb () {\n\t\tcallback();\n\t}", "function finished(err) {\n if (err) {\n console.error('ooops, something went wrong.');\n console.error(err);\n } else {\n console.log('Data saved successfully');\n pickColor();\n }\n }", "onMessageEnd() { }", "function stateSetComplete()\n\t\t{\n\t\t\t_cb();\n\t\t}", "function check_done() {\n\t\t\tif (!controller_done || interface_source === undefined) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcallback(interface_source);\n\t\t}", "function complete(){\n callbackCount++;\n if(callbackCount >= 1){\n // console.log(context)\n res.render('users', context);\n }\n }", "function done() {\n if (!invoked) {\n invoked = true\n\n callback.apply(null, arguments)\n }\n }", "function done() {\n if (!invoked) {\n invoked = true\n\n callback.apply(null, arguments)\n }\n }", "function done() {\n if (!invoked) {\n invoked = true\n\n callback.apply(null, arguments)\n }\n }", "function done() {\n if (!invoked) {\n invoked = true\n\n callback.apply(null, arguments)\n }\n }", "function done() {\n if (!invoked) {\n invoked = true\n\n callback.apply(null, arguments)\n }\n }", "function done() {\n if (!invoked) {\n invoked = true\n\n callback.apply(null, arguments)\n }\n }", "function done() {\n if (!invoked) {\n invoked = true\n\n callback.apply(null, arguments)\n }\n }", "function done() {\n if (!invoked) {\n invoked = true\n\n callback.apply(null, arguments)\n }\n }", "function _onAllFilesProcessed()\n {\n process.exit(0);\n }", "function done() {\n if (!invoked) {\n invoked = true;\n\n callback.apply(null, arguments);\n }\n }", "function doneWithIt() {\n // the download was skipped and not an error, so call the progress callback; then either move on to the next one, or else call our success callback\n if (cbprog) cbprog(tile, { x: x, y: y, z: z });\n continueOnNext();\n }", "async end() {\n return;\n }", "function narrDone(){}", "function handleFinish(values) {\n job.current = getJob(values, job.current, writeMessage);\n setBusy(job.current.pendingTime);\n }", "onSuccess() {\n this.emit(\"success\");\n this.cleanup();\n }", "function complete()\n\t{\n\t\t_queryInProgress = false;\n\t\t_dispatcher.trigger(_options.completeEvent);\n\t}", "function maybeFinish() {\n if (waiting) return;\n callback();\n }" ]
[ "0.7607877", "0.73473793", "0.73289984", "0.7317956", "0.7304225", "0.72417575", "0.7235767", "0.69856775", "0.68565404", "0.6855536", "0.6845145", "0.6817738", "0.6773241", "0.6773241", "0.6773241", "0.6773241", "0.677228", "0.67654777", "0.67654777", "0.6763289", "0.6711056", "0.6708692", "0.6690419", "0.66873217", "0.6683349", "0.6678777", "0.667268", "0.66554224", "0.6632247", "0.66023386", "0.6590042", "0.6590042", "0.6590042", "0.6590042", "0.6590042", "0.65870875", "0.65709007", "0.65467453", "0.6541239", "0.653074", "0.65232486", "0.64992446", "0.6490515", "0.64667886", "0.6460307", "0.645314", "0.643666", "0.6432198", "0.6424091", "0.641224", "0.63919014", "0.6388806", "0.63845104", "0.6384352", "0.63568944", "0.6344052", "0.63423425", "0.63169664", "0.6292031", "0.6278252", "0.62615126", "0.62501496", "0.6240956", "0.62379813", "0.6237373", "0.6234511", "0.622723", "0.62248915", "0.622093", "0.622093", "0.6213284", "0.61970186", "0.6190086", "0.61857873", "0.6181972", "0.61767", "0.61761075", "0.6171341", "0.6165241", "0.6155899", "0.614456", "0.61438334", "0.6138033", "0.6123965", "0.61212635", "0.61212635", "0.61212635", "0.61212635", "0.61212635", "0.61212635", "0.61212635", "0.61212635", "0.6120697", "0.61173594", "0.6097582", "0.6082847", "0.60795003", "0.60784286", "0.6075249", "0.6064888", "0.60642475" ]
0.0
-1
Same as native getBoundingClientRect, except it takes into account parent offsets if the element lies within a nested document ( or like).
function getActualBoundingClientRect(node) { var boundingRect = node.getBoundingClientRect(); // The original object returned by getBoundingClientRect is immutable, so we clone it // We can't use extend because the properties are not considered part of the object by hasOwnProperty in IE9 var rect = {}; for (var k in boundingRect) { rect[k] = boundingRect[k]; } if (node.ownerDocument !== document) { var _frameElement = node.ownerDocument.defaultView.frameElement; if (_frameElement) { var frameRect = getActualBoundingClientRect(_frameElement); rect.top += frameRect.top; rect.bottom += frameRect.top; rect.left += frameRect.left; rect.right += frameRect.left; } } return rect; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getBoundingClientRect(element) {\n var el, parent, top;\n if (element.getBoundingClientRect != null) {\n return element.getBoundingClientRect();\n }\n top = 0;\n el = element;\n while (el) {\n top += el.offsetTop;\n el = el.offsetParent;\n }\n parent = element.parentElement;\n while (parent) {\n if (parent.scrollTop != null) {\n top -= parent.scrollTop;\n }\n parent = parent.parentElement;\n }\n return {\n top: top,\n bottom: top + element.offsetHeight\n };\n }", "function getLayoutRect$1(element){var clientRect=getBoundingClientRect$1(element);// Use the clientRect sizes if it's not been transformed.\n// Fixes https://github.com/popperjs/popper-core/issues/1223\nvar 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};}", "function getElRect($element) {\n var el = $element[0];\n var isBody = el.tagName === 'BODY';\n var elRect = el.getBoundingClientRect();\n var isSvg = window.SVGElement && el instanceof window.SVGElement;\n var elOffset = isBody ? {\n top: 0,\n left: 0\n } : isSvg ? null : $element.offset();\n var scroll = {\n scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop()\n };\n var outerDims = isBody ? {\n width: $(window).width(),\n height: $(window).height()\n } : null;\n return _.extend({}, elRect, scroll, outerDims, elOffset);\n}", "function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n }", "function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n }", "function getLayoutRect(element){var clientRect=getBoundingClientRect(element);// Use the clientRect sizes if it's not been transformed.\n// Fixes https://github.com/popperjs/popper-core/issues/1223\nvar 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};}", "function getLayoutRect(element){var clientRect=getBoundingClientRect(element);// Use the clientRect sizes if it's not been transformed.\n// Fixes https://github.com/popperjs/popper-core/issues/1223\nvar 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};}", "function getClientRect(el,origin){var offset=el.offset();var scrollbarWidths=getScrollbarWidths(el);var left=offset.left+getCssFloat(el,'border-left-width')+scrollbarWidths.left-(origin?origin.left:0);var top=offset.top+getCssFloat(el,'border-top-width')+scrollbarWidths.top-(origin?origin.top:0);return{left:left,right:left+el[0].clientWidth,top:top,bottom:top+el[0].clientHeight// clientHeight includes padding but NOT scrollbars\n};}", "function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 0.5) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 0.5) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getNestedBoundingClientRect(node, boundaryWindow) {\n const ownerIframe = getOwnerIframe(node);\n\n if (ownerIframe && ownerIframe !== boundaryWindow) {\n const rects = [node.getBoundingClientRect()];\n let currentIframe = ownerIframe;\n let onlyOneMore = false;\n\n while (currentIframe) {\n const rect = getBoundingClientRectWithBorderOffset(currentIframe);\n rects.push(rect);\n currentIframe = getOwnerIframe(currentIframe);\n\n if (onlyOneMore) {\n break;\n } // We don't want to calculate iframe offsets upwards beyond\n // the iframe containing the boundaryWindow, but we\n // need to calculate the offset relative to the boundaryWindow.\n\n if (\n currentIframe &&\n getOwnerWindow(currentIframe) === boundaryWindow\n ) {\n onlyOneMore = true;\n }\n }\n\n return mergeRectOffsets(rects);\n } else {\n return node.getBoundingClientRect();\n }\n}", "function getClientRect(el) {\n var offset = el.offset();\n var scrollbarWidths = getScrollbarWidths(el);\n var left = offset.left + getCssFloat(el, 'border-left-width') + scrollbarWidths.left;\n var top = offset.top + getCssFloat(el, 'border-top-width') + scrollbarWidths.top;\n\n return {\n left: left,\n right: left + el[0].clientWidth, // clientWidth includes padding but NOT scrollbars\n top: top,\n bottom: top + el[0].clientHeight // clientHeight includes padding but NOT scrollbars\n };\n }", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' ||\n // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n }", "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\nisScrollParent(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};}", "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\nisScrollParent(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};}", "function getLayoutRect(element) {\n var clientRect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element) {\n var clientRect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element) {\n var clientRect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "getRect() {\n this.rect = this.el.getBoundingClientRect();\n }", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement);\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n }", "function getLayoutRect(element) {\n var clientRect = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__.default)(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element) {\n var clientRect = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__.default)(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element) {\n var clientRect = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__.default)(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element) {\n var clientRect = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__.default)(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getClientRect(el) {\n\tvar offset = el.offset();\n\tvar scrollbarWidths = getScrollbarWidths(el);\n\tvar left = offset.left + getCssFloat(el, 'border-left-width') + scrollbarWidths.left;\n\tvar top = offset.top + getCssFloat(el, 'border-top-width') + scrollbarWidths.top;\n\n\treturn {\n\t\tleft: left,\n\t\tright: left + el[0].clientWidth, // clientWidth includes padding but NOT scrollbars\n\t\ttop: top,\n\t\tbottom: top + el[0].clientHeight // clientHeight includes padding but NOT scrollbars\n\t};\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (!isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement);\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement);\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "get boundingRect() {\n return this.element.getBoundingClientRect();\n }", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "getRects() {\n if (!this.moving) { return this.clientRects; }\n else { return this.DOMcontainer.getBoundingClientRect(); }\n }", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect$1(elementOrVirtualElement,offsetParent,isFixed){if(isFixed===void 0){isFixed=false;}var documentElement=getDocumentElement$1(offsetParent);var rect=getBoundingClientRect$1(elementOrVirtualElement);var isOffsetParentAnElement=isHTMLElement$1(offsetParent);var scroll={scrollLeft:0,scrollTop:0};var offsets={x:0,y:0};if(isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed){if(getNodeName$1(offsetParent)!=='body'||// https://github.com/popperjs/popper-core/issues/1078\nisScrollParent$1(documentElement)){scroll=getNodeScroll$1(offsetParent);}if(isHTMLElement$1(offsetParent)){offsets=getBoundingClientRect$1(offsetParent);offsets.x+=offsetParent.clientLeft;offsets.y+=offsetParent.clientTop;}else if(documentElement){offsets.x=getWindowScrollBarX$1(documentElement);}}return {x:rect.left+scroll.scrollLeft-offsets.x,y:rect.top+scroll.scrollTop-offsets.y,width:rect.width,height:rect.height};}", "function getOffsetRectangle(parent, elem) {\n return offsetRectangle(\n topLeftCorner(parent.getBoundingClientRect()),\n elem.getBoundingClientRect()\n );\n}", "function currentBounds(){var cntr=element?element.parent():null;var parent=cntr?cntr.parent():null;return parent?self.clientRect(parent):null;}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement;\n var rect = getBoundingClientRect(elementOrVirtualElement);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (!isFixed) {\n if (getNodeName(offsetParent) !== 'body') {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement = getDocumentElement(offsetParent)) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n }", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement;\n var rect = getBoundingClientRect(elementOrVirtualElement);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (!isFixed) {\n if (getNodeName(offsetParent) !== 'body') {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement = getDocumentElement(offsetParent)) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n }", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(offsetParent);\n var rect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(elementOrVirtualElement);\n var isOffsetParentAnElement = Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n Object(_isScrollParent_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(documentElement)) {\n scroll = Object(_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(offsetParent);\n }\n\n if (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent)) {\n offsets = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(offsetParent);\n var rect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(elementOrVirtualElement);\n var isOffsetParentAnElement = Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n Object(_isScrollParent_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(documentElement)) {\n scroll = Object(_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(offsetParent);\n }\n\n if (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent)) {\n offsets = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(offsetParent);\n var rect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(elementOrVirtualElement);\n var isOffsetParentAnElement = Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n Object(_isScrollParent_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(documentElement)) {\n scroll = Object(_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(offsetParent);\n }\n\n if (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent)) {\n offsets = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(offsetParent);\n var rect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(elementOrVirtualElement);\n var isOffsetParentAnElement = Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n Object(_isScrollParent_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(documentElement)) {\n scroll = Object(_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(offsetParent);\n }\n\n if (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent)) {\n offsets = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(offsetParent);\n var rect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(elementOrVirtualElement);\n var isOffsetParentAnElement = Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n Object(_isScrollParent_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(documentElement)) {\n scroll = Object(_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(offsetParent);\n }\n\n if (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent)) {\n offsets = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function currentBounds() {\n var cntr = element ? element.parent() : null;\n var parent = cntr ? cntr.parent() : null;\n\n return parent ? self.clientRect(parent) : null;\n }", "function currentBounds() {\n var cntr = element ? element.parent() : null;\n var parent = cntr ? cntr.parent() : null;\n\n return parent ? self.clientRect(parent) : null;\n }", "function currentBounds() {\n var cntr = element ? element.parent() : null;\n var parent = cntr ? cntr.parent() : null;\n\n return parent ? self.clientRect(parent) : null;\n }", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent);\n var offsetParentIsScaled = Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent) && isElementScaled(offsetParent);\n var documentElement = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(offsetParent);\n var rect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(elementOrVirtualElement, offsetParentIsScaled);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n Object(_isScrollParent_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(documentElement)) {\n scroll = Object(_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(offsetParent);\n }\n\n if (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent)) {\n offsets = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(offsetParent);\n var rect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(elementOrVirtualElement);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (!isFixed) {\n if (Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n Object(_isScrollParent_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(documentElement)) {\n scroll = Object(_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(offsetParent);\n }\n\n if (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent)) {\n offsets = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getBoundingClientRect (element, orig) {\n var source = angular.element((element || {}));\n if (source && source.length) {\n // Compute and save the target element's bounding rect, so that if the\n // element is hidden when the dialog closes, we can shrink the dialog\n // back to the same position it expanded from.\n //\n // Checking if the source is a rect object or a DOM element\n var bounds = {top:0,left:0,height:0,width:0};\n var hasFn = angular.isFunction(source[0].getBoundingClientRect);\n\n return angular.extend(orig || {}, {\n element : hasFn ? source : undefined,\n bounds : hasFn ? source[0].getBoundingClientRect() : angular.extend({}, bounds, source[0]),\n focus : angular.bind(source, source.focus),\n });\n }\n }", "function getBoundingClientRect (element, orig) {\n var source = angular.element((element || {}));\n if (source && source.length) {\n // Compute and save the target element's bounding rect, so that if the\n // element is hidden when the dialog closes, we can shrink the dialog\n // back to the same position it expanded from.\n //\n // Checking if the source is a rect object or a DOM element\n var bounds = {top:0,left:0,height:0,width:0};\n var hasFn = angular.isFunction(source[0].getBoundingClientRect);\n\n return angular.extend(orig || {}, {\n element : hasFn ? source : undefined,\n bounds : hasFn ? source[0].getBoundingClientRect() : angular.extend({}, bounds, source[0]),\n focus : angular.bind(source, source.focus),\n });\n }\n }", "function getBoundingClientRect (element, orig) {\n var source = angular.element((element || {}));\n if (source && source.length) {\n // Compute and save the target element's bounding rect, so that if the\n // element is hidden when the dialog closes, we can shrink the dialog\n // back to the same position it expanded from.\n //\n // Checking if the source is a rect object or a DOM element\n var bounds = {top:0,left:0,height:0,width:0};\n var hasFn = angular.isFunction(source[0].getBoundingClientRect);\n\n return angular.extend(orig || {}, {\n element : hasFn ? source : undefined,\n bounds : hasFn ? source[0].getBoundingClientRect() : angular.extend({}, bounds, source[0]),\n focus : angular.bind(source, source.focus),\n });\n }\n }", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = (0,_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__.default)(offsetParent);\n var rect = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_1__.default)(elementOrVirtualElement);\n var isOffsetParentAnElement = (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if ((0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_3__.default)(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n (0,_isScrollParent_js__WEBPACK_IMPORTED_MODULE_4__.default)(documentElement)) {\n scroll = (0,_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_5__.default)(offsetParent);\n }\n\n if ((0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(offsetParent)) {\n offsets = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_1__.default)(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = (0,_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_6__.default)(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = (0,_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__.default)(offsetParent);\n var rect = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_1__.default)(elementOrVirtualElement);\n var isOffsetParentAnElement = (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if ((0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_3__.default)(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n (0,_isScrollParent_js__WEBPACK_IMPORTED_MODULE_4__.default)(documentElement)) {\n scroll = (0,_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_5__.default)(offsetParent);\n }\n\n if ((0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(offsetParent)) {\n offsets = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_1__.default)(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = (0,_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_6__.default)(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = (0,_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__.default)(offsetParent);\n var rect = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_1__.default)(elementOrVirtualElement);\n var isOffsetParentAnElement = (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if ((0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_3__.default)(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n (0,_isScrollParent_js__WEBPACK_IMPORTED_MODULE_4__.default)(documentElement)) {\n scroll = (0,_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_5__.default)(offsetParent);\n }\n\n if ((0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(offsetParent)) {\n offsets = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_1__.default)(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = (0,_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_6__.default)(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = (0,_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__.default)(offsetParent);\n var rect = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_1__.default)(elementOrVirtualElement);\n var isOffsetParentAnElement = (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if ((0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_3__.default)(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n (0,_isScrollParent_js__WEBPACK_IMPORTED_MODULE_4__.default)(documentElement)) {\n scroll = (0,_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_5__.default)(offsetParent);\n }\n\n if ((0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(offsetParent)) {\n offsets = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_1__.default)(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = (0,_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_6__.default)(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function currentBounds() {\n var cntr = element ? element.parent() : null;\n var parent = cntr ? cntr.parent() : null;\n\n return parent ? self.clientRect(parent) : null;\n }", "function getBoundingClientRect (element, orig) {\n var source = angular.element((element || {}));\n if (source && source.length) {\n // Compute and save the target element's bounding rect, so that if the\n // element is hidden when the dialog closes, we can shrink the dialog\n // back to the same position it expanded from.\n //\n // Checking if the source is a rect object or a DOM element\n var bounds = {top:0,left:0,height:0,width:0};\n var hasFn = angular.isFunction(source[0].getBoundingClientRect);\n\n return angular.extend(orig || {}, {\n element : hasFn ? source : undefined,\n bounds : hasFn ? source[0].getBoundingClientRect() : angular.extend({}, bounds, source[0]),\n focus : angular.bind(source, source.focus),\n });\n }\n }", "function relativeBBox(elem, container) {\n var bb = elem.getBoundingClientRect()\n var ref = container.getBoundingClientRect()\n\n var left = bb.left - ref.left\n var top = bb.top - ref.top\n\n return {\n left: left, x: left,\n top: top, y: top,\n right: left + bb.width,\n down: top + bb.height,\n width: bb.width,\n height: bb.height,\n cx: left + bb.width / 2,\n cy: top + bb.height / 2\n }\n}", "function relativeBBox(elem, container) {\n var bb = elem.getBoundingClientRect()\n var ref = container.getBoundingClientRect()\n\n var left = bb.left - ref.left\n var top = bb.top - ref.top\n\n return {\n left: left, x: left,\n top: top, y: top,\n right: left + bb.width,\n down: top + bb.height,\n width: bb.width,\n height: bb.height,\n cx: left + bb.width / 2,\n cy: top + bb.height / 2\n }\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement;\n var rect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(elementOrVirtualElement);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (!isFixed) {\n if (Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent) !== 'body') {\n scroll = Object(_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(offsetParent);\n }\n\n if (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent)) {\n offsets = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(offsetParent)) {\n offsets.x = Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getBoundingClientObj(element) {\n var rect = element.getBoundingClientRect();\n return {\n bottom: rect.bottom,\n height: rect.height,\n left: rect.left,\n right: rect.right,\n top: rect.top,\n width: rect.width\n };\n}", "function getBoundingClientObj(element) {\n var rect = element.getBoundingClientRect();\n return {\n bottom: rect.bottom,\n height: rect.height,\n left: rect.left,\n right: rect.right,\n top: rect.top,\n width: rect.width\n };\n}", "function getBoundingClientObj(element) {\n var rect = element.getBoundingClientRect();\n return {\n bottom: rect.bottom,\n height: rect.height,\n left: rect.left,\n right: rect.right,\n top: rect.top,\n width: rect.width\n };\n}", "function getBoundingClientObj(element) {\n var rect = element.getBoundingClientRect();\n return {\n bottom: rect.bottom,\n height: rect.height,\n left: rect.left,\n right: rect.right,\n top: rect.top,\n width: rect.width\n };\n}", "function getBoundingClientObj(element) {\n var rect = element.getBoundingClientRect();\n return {\n bottom: rect.bottom,\n height: rect.height,\n left: rect.left,\n right: rect.right,\n top: rect.top,\n width: rect.width\n };\n}", "function getBoundingClientObj(element) {\n var rect = element.getBoundingClientRect();\n return {\n bottom: rect.bottom,\n height: rect.height,\n left: rect.left,\n right: rect.right,\n top: rect.top,\n width: rect.width\n };\n}", "function getBoundingClientObj(element) {\n var rect = element.getBoundingClientRect();\n return {\n bottom: rect.bottom,\n height: rect.height,\n left: rect.left,\n right: rect.right,\n top: rect.top,\n width: rect.width\n };\n}", "function getBoundingClientObj(element) {\n var rect = element.getBoundingClientRect();\n return {\n bottom: rect.bottom,\n height: rect.height,\n left: rect.left,\n right: rect.right,\n top: rect.top,\n width: rect.width\n };\n}", "function getBoundingClientObj(element) {\n var rect = element.getBoundingClientRect();\n return {\n bottom: rect.bottom,\n height: rect.height,\n left: rect.left,\n right: rect.right,\n top: rect.top,\n width: rect.width\n };\n}", "function getBoundingClientObj(element) {\n var rect = element.getBoundingClientRect();\n return {\n bottom: rect.bottom,\n height: rect.height,\n left: rect.left,\n right: rect.right,\n top: rect.top,\n width: rect.width\n };\n}", "function getElementAbsolutePos(element) {\n\tvar res = new Object();\n\tres.x = 0; res.y = 0;\n\tif (element !== null) {\n\t\tif (element.getBoundingClientRect) {\n\t\t\tvar viewportElement = document.documentElement;\n\t\t\tvar box = element.getBoundingClientRect();\n\t\t\tvar scrollLeft = viewportElement.scrollLeft;\n\t\t\tvar scrollTop = viewportElement.scrollTop;\n\n\t\t\tres.x = box.left + scrollLeft;\n\t\t\tres.y = box.top + scrollTop;\n\n\t\t}\n\t\telse { //for old browsers\n\t\t\tres.x = element.offsetLeft;\n\t\t\tres.y = element.offsetTop;\n\n\t\t\tvar parentNode = element.parentNode;\n\t\t\tvar borderWidth = null;\n\n\t\t\twhile (offsetParent != null) {\n\t\t\t\tres.x += offsetParent.offsetLeft;\n\t\t\t\tres.y += offsetParent.offsetTop;\n\n\t\t\t\tvar parentTagName =\n\t\t\t\toffsetParent.tagName.toLowerCase();\n\n\t\t\t\tif ((__isIEOld && parentTagName != \"table\") ||\n\t\t\t\t\t((__isFireFoxNew || __isChrome) &&\n\t\t\t\t\tparentTagName == \"td\")) {\n\t\t\t\t\tborderWidth = kGetBorderWidth\n\t\t\t\t\t(offsetParent);\n\t\t\t\t\tres.x += borderWidth.left;\n\t\t\t\t\tres.y += borderWidth.top;\n\t\t\t\t}\n\n\t\t\t\tif (offsetParent != document.body &&\n\t\t\t\t\toffsetParent != document.documentElement) {\n\t\t\t\t\tres.x -= offsetParent.scrollLeft;\n\t\t\t\t\tres.y -= offsetParent.scrollTop;\n\t\t\t\t}\n\n\n\t\t\t\t//next lines are necessary to fix the problem \n\t\t\t\t//with offsetParent\n\t\t\t\tif (!__isIE && !__isOperaOld || __isIENew) {\n\t\t\t\t\twhile (offsetParent != parentNode &&\n\t\t\t\t\tparentNode !== null) {\n\t\t\t\t\t\tres.x -= parentNode.scrollLeft;\n\t\t\t\t\t\tres.y -= parentNode.scrollTop;\n\t\t\t\t\t\tif (__isFireFoxOld || __isWebKit)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tborderWidth =\n\t\t\t\t\t\t\tkGetBorderWidth(parentNode);\n\t\t\t\t\t\t\tres.x += borderWidth.left;\n\t\t\t\t\t\t\tres.y += borderWidth.top;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tparentNode = parentNode.parentNode;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tparentNode = offsetParent.parentNode;\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\t\t}\n\t}\n\treturn res;\n}", "get getBoundingClientRects() {\n if (!this._boundingClientRects) {\n const innerBox = this._innerBoxHelper.nativeElement.getBoundingClientRect();\n const clientRect = this.element.getBoundingClientRect();\n this._boundingClientRects = {\n clientRect,\n innerWidth: innerBox.width,\n innerHeight: innerBox.height,\n scrollBarWidth: clientRect.width - innerBox.width,\n scrollBarHeight: clientRect.height - innerBox.height,\n };\n const resetCurrentBox = () => this._boundingClientRects = undefined;\n if (this._isScrolling) {\n this.scrolling.pipe(filter(scrolling => scrolling === 0), take(1)).subscribe(resetCurrentBox);\n }\n else {\n requestAnimationFrame(resetCurrentBox);\n }\n }\n return this._boundingClientRects;\n }", "getBoundingClientRect() {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\t\t\twidth: window.innerWidth,\n\t\t\t\t\t\t\t\theight: window.innerHeight,\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}", "function adjustedBoundingRect(el) {\n var ta;\n var rect = el.getBoundingClientRect();\n var style = getComputedStyle(el);\n var tx = style.transform;\n\n if (tx) {\n var sx, sy, dx, dy;\n\n if (tx.startsWith('matrix3d(')) {\n ta = tx.slice(9, -1).split(/, /);\n sx = +ta[0];\n sy = +ta[5];\n dx = +ta[12];\n dy = +ta[13];\n } else if (tx.startsWith('matrix(')) {\n ta = tx.slice(7, -1).split(/, /);\n sx = +ta[0];\n sy = +ta[3];\n dx = +ta[4];\n dy = +ta[5];\n } else {\n return rect;\n }\n\n var to = style.transformOrigin;\n var x = rect.x - dx - (1 - sx) * parseFloat(to);\n var y = rect.y - dy - (1 - sy) * parseFloat(to.slice(to.indexOf(' ') + 1));\n var w = sx ? rect.width / sx : el.offsetWidth;\n var h = sy ? rect.height / sy : el.offsetHeight;\n return {\n x: x,\n y: y,\n width: w,\n height: h,\n top: y,\n right: x + w,\n bottom: y + h,\n left: x\n };\n } else {\n return rect;\n }\n}", "function getElementPositionRelativeToLayoutViewport(element) {\n return element.getBoundingClientRect();\n}", "getBoundingClientRect() {\n return {top: 0, left: 0, width: window.innerWidth, height: window.innerHeight};\n }", "getBoundingClientRect() {\n return {\n top: 0,\n left: 0,\n width: window.innerWidth,\n height: window.innerHeight\n };\n }", "function getOuterRect(el,origin){var offset=el.offset();var left=offset.left-(origin?origin.left:0);var top=offset.top-(origin?origin.top:0);return{left:left,right:left+el.outerWidth(),top:top,bottom:top+el.outerHeight()};}", "function getBoundingClientRect(element,orig){var source=angular.element(element||{});if(source&&source.length){// Compute and save the target element's bounding rect, so that if the\n\t// element is hidden when the dialog closes, we can shrink the dialog\n\t// back to the same position it expanded from.\n\t//\n\t// Checking if the source is a rect object or a DOM element\n\tvar bounds={top:0,left:0,height:0,width:0};var hasFn=angular.isFunction(source[0].getBoundingClientRect);return angular.extend(orig||{},{element:hasFn?source:undefined,bounds:hasFn?source[0].getBoundingClientRect():angular.extend({},bounds,source[0]),focus:angular.bind(source,source.focus)});}}", "function getClientRect(el, origin) {\n var offset = el.offset();\n var scrollbarWidths = getScrollbarWidths(el);\n var left = offset.left + getCssFloat(el, 'border-left-width') + scrollbarWidths.left - (origin ? origin.left : 0);\n var top = offset.top + getCssFloat(el, 'border-top-width') + scrollbarWidths.top - (origin ? origin.top : 0);\n return {\n left: left,\n right: left + el[0].clientWidth,\n top: top,\n bottom: top + el[0].clientHeight // clientHeight includes padding but NOT scrollbars\n };\n}", "function getClientRect(el, origin) {\n var offset = el.offset();\n var scrollbarWidths = getScrollbarWidths(el);\n var left = offset.left + getCssFloat(el, 'border-left-width') + scrollbarWidths.left - (origin ? origin.left : 0);\n var top = offset.top + getCssFloat(el, 'border-top-width') + scrollbarWidths.top - (origin ? origin.top : 0);\n return {\n left: left,\n right: left + el[0].clientWidth,\n top: top,\n bottom: top + el[0].clientHeight // clientHeight includes padding but NOT scrollbars\n };\n}", "function getClientRect(el, origin) {\n var offset = el.offset();\n var scrollbarWidths = getScrollbarWidths(el);\n var left = offset.left + getCssFloat(el, 'border-left-width') + scrollbarWidths.left - (origin ? origin.left : 0);\n var top = offset.top + getCssFloat(el, 'border-top-width') + scrollbarWidths.top - (origin ? origin.top : 0);\n return {\n left: left,\n right: left + el[0].clientWidth,\n top: top,\n bottom: top + el[0].clientHeight // clientHeight includes padding but NOT scrollbars\n };\n}", "function getClientRect(el, origin) {\n var offset = el.offset();\n var scrollbarWidths = getScrollbarWidths(el);\n var left = offset.left + getCssFloat(el, 'border-left-width') + scrollbarWidths.left - (origin ? origin.left : 0);\n var top = offset.top + getCssFloat(el, 'border-top-width') + scrollbarWidths.top - (origin ? origin.top : 0);\n return {\n left: left,\n right: left + el[0].clientWidth,\n top: top,\n bottom: top + el[0].clientHeight // clientHeight includes padding but NOT scrollbars\n };\n}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n var html = _getDocumentElementJsDefault.default(element);\n var winScroll = _getWindowScrollJsDefault.default(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = _mathJs.max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = _mathJs.max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + _getWindowScrollBarXJsDefault.default(element);\n var y = -winScroll.scrollTop;\n if (_getComputedStyleJsDefault.default(body || html).direction === 'rtl') x += _mathJs.max(html.clientWidth, body ? body.clientWidth : 0) - width;\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n const width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n const height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n\n if (getComputedStyle$1(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width,\n height,\n x,\n y\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;}" ]
[ "0.7891227", "0.7073936", "0.6952669", "0.688801", "0.6880152", "0.6874782", "0.6874782", "0.68610895", "0.6841531", "0.6841531", "0.6841531", "0.6841531", "0.6835384", "0.6815901", "0.6804914", "0.6804137", "0.6781507", "0.6781507", "0.6771269", "0.6771269", "0.6771269", "0.67705774", "0.6767924", "0.674082", "0.674082", "0.674082", "0.674082", "0.6728308", "0.6726248", "0.6700305", "0.6700305", "0.66951966", "0.66877884", "0.66877884", "0.66877884", "0.6661035", "0.665929", "0.6659013", "0.66443163", "0.6636098", "0.66229594", "0.66229594", "0.6613551", "0.6613551", "0.6613551", "0.6613551", "0.6613551", "0.6612214", "0.6612214", "0.6612214", "0.66071", "0.660588", "0.6560202", "0.6560202", "0.6560202", "0.6546388", "0.6546388", "0.6546388", "0.6546388", "0.6534401", "0.652147", "0.6494702", "0.6494702", "0.6486462", "0.6482582", "0.6482582", "0.6482582", "0.6482582", "0.6482582", "0.6482582", "0.6482582", "0.6482582", "0.6482582", "0.6482582", "0.6477096", "0.6469953", "0.6441157", "0.6439022", "0.643341", "0.6431581", "0.642793", "0.6417801", "0.64057076", "0.6392303", "0.6392303", "0.6392303", "0.6392303", "0.63922936", "0.63749546", "0.63674814" ]
0.63515276
96
Updates the position of the popper, computing the new offsets and applying the new style. Prefer `scheduleUpdate` over `update` because of performance reasons.
function update() { // if popper is destroyed, don't perform any further update if (this.state.isDestroyed) { return; } var data = { instance: this, styles: {}, arrowStyles: {}, attributes: {}, flipped: false, offsets: {} }; // compute reference element offsets data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference); // compute auto placement, store placement inside the data object, // modifiers will be able to edit `placement` if needed // and refer to originalPlacement to know the original value data.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` data.originalPlacement = data.placement; // compute the popper offsets data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement); data.offsets.popper.position = 'absolute'; // run the modifiers data = runModifiers(this.modifiers, data); // the first `update` will call `onCreate` callback // the other ones will call `onUpdate` callback if (!this.state.isCreated) { this.state.isCreated = true; this.options.onCreate(data); } else { this.options.onUpdate(data); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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, this.options.positionFixed);\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 data.positionFixed = this.options.positionFixed;\n\t\n\t // compute the popper offsets\n\t data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\t\n\t data.offsets.popper.position = this.options.positionFixed ? 'fixed' : '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 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 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 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\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 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 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}", "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.81239015", "0.8096504", "0.80928975", "0.80928975", "0.80928975", "0.80928975", "0.8074649", "0.8074649", "0.8074649", "0.8074649", "0.8074649", "0.8074649", "0.8074649", "0.8074649", "0.8074649", "0.8074649", "0.8074649", "0.8074649", "0.8074649", "0.8074649", "0.8074649", "0.8074649", "0.8042016", "0.80394405", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102", "0.8020102" ]
0.0
-1
Setup needed event listeners used to update the popper position
function setupEventListeners(reference, options, state, updateBound) { // Resize event listener on window state.updateBound = updateBound; window.addEventListener('resize', state.updateBound, { passive: true }); // Scroll event listener on scroll parents var scrollElement = getScrollParent(reference); attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents); state.scrollElement = scrollElement; state.eventsEnabled = true; return state; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 setupListeners() {\n // handle mouse down and mouse move\n el.on('mousedown touchstart', handleMouseDown);\n\n // handle mouse up\n pEl.on('mouseup touchend', handleMouseUp);\n\n // handle window resize\n $(win).resize(handleWindowResize);\n\n $('body').on(opts['namespace'] + '-neighbour-resized', function(e) {\n if (e.target !== el[0]) {\n handleNeighbourSplitter();\n }\n });\n\n // destory, cleanup listeners\n scope.$on('$destroy', function() {\n el.off('mousedown touchstart', handleMouseDown);\n pEl.off('mouseup touchend', handleMouseUp);\n $(win).off('resize', handleWindowResize);\n });\n }", "setListeners() {\n $(document).on( \"cart-lower-third:opened\", this.createModal.bind(this))\n $(document).on( \"cart-lower-third:closed\", this.destroyModal.bind(this))\n }", "setEvents() {\n\t\t$('.fa-bars').click(() => {\n\t\t\t$('.top-nav').addClass('-active');\n\t\t});\n\n\t\tthis.$navToggle.on('click', (e) => {\n\t\t\te.preventDefault();\n\n\t\t\tthis.$navMenu.toggleClass('-active');\n\t\t\tthis.$navToggle.toggleClass('-close');\n\t\t});\n\n\t\t$(document).on('click', this.$countryToggle.selector, (e) => {\n\t\t\te.preventDefault();\n\n\t\t\tif (this.$countryMenu.hasClass('-active')) {\n\t\t\t\tthis.$countryToggle.removeClass('-close');\n\t\t\t\tthis.$countryMenu.removeClass('-active');\n\t\t\t} else {\n\t\t\t\tthis.$countryToggle.addClass('-close');\n\t\t\t\tthis.$countryMenu.addClass('-active');\n\t\t\t}\n\t\t});\n\n\t\t$(document).on('click', (e) => {\n\t\t\t// Closes country dropdown on desktop if clicked outside the dropdown\n\t\t\tif (!$(e.target).closest('.country-container').length && (e.target.className !== 'header-site-links' && !$(e.target).closest('.header-site-links').length)) {\n\t\t\t\t$('.country-dropdown').removeClass('-active');\n\t\t\t}\n\n\t\t\t// Closes country dropdown menu on mobile-only if clicked anywhere but one of the actual links\n\t\t\tif ((e.target.className !== 'country-dropdown-list' && !$(e.target).closest('.header-site-links').length) && (this.$countryMenu.hasClass('-active') && this.$navToggle.is(':visible'))) {\n\t\t\t\t$('.country-dropdown').removeClass('-active');\n\t\t\t}\n\t\t});\n\t}", "function setupEventListeners(reference,options,state,updateBound){ // Resize event listener on window\nstate.updateBound = updateBound;getWindow(reference).addEventListener('resize',state.updateBound,{passive:true}); // Scroll event listener on scroll parents\nvar scrollElement=getScrollParent(reference);attachToScrollParents(scrollElement,'scroll',state.updateBound,state.scrollParents);state.scrollElement = scrollElement;state.eventsEnabled = true;return state;}", "function setupEventListeners(dropdown, container) {\n container.hover(function() {\n position(dropdown, container);\n dropdown.show();\n });\n\n container.mouseleave(function() {\n dropdown.hide();\n });\n\n scope.$on('$destroy', function() {\n container.off('hover');\n container.off('mouseleave')\n });\n }", "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);}}", "update() {\n if (this._popper) {\n this._popper.update();\n }\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "addListeners() {\n // Event listener for watching window width and disabling our parent toggles\n window.addEventListener('resize', debounce(() => {\n this.handleDisablingToggles();\n }));\n\n // Event listener for toggling active class on menu\n this.menuToggle.addEventListener('click', () => {\n this.toggleMenuActiveClass();\n });\n\n // Event Listener for parent nav links to open their child list\n this.parentToggles.forEach(toggle => {\n toggle.addEventListener('click', e => {\n this.constructor.toggleParentActiveClass(e);\n });\n });\n }", "function popupHookListeners() {\n\tdocument.addEventListener(\"click\", function (event) {\n\t\t// saves last clicked element\n\t\t// currently used for shift-click select functionality\n\t\tpop.last_clicked_el = event.target;\n\t});\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 setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n window.addEventListener('resize', state.updateBound, {passive: true});\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupListeners() {\n setupAppHomeOpenedListener();\n setupClearGoalsButtonListener();\n}", "addMenuListeners() {\n this.htmlData.menuParents.forEach(el => {\n el.addEventListener(\"click\", () => this.submenuListener(event));\n });\n window.addEventListener(\"resize\", () => this.checkScreenSize(event));\n this.addOutsideListener();\n }", "setVariationListeners() {\n\t\tVariations.on('variation:detected:sho', (event, data) => {\n\t\t\t// console.log('|global_nav| sticky variations ready');\n\t\t\t\tif (data && data.sticky_global_navigation) {\n\t\t\t\tthis.setStickyGlobalNavListner();\n\t\t\t\t}\n\t\t});\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}", "setupResizeListeners() {\n window.addEventListener('resize', () => {\n this.calculateButtonVisibility();\n this.updateDOM();\n });\n }", "setupResizeListeners() {\n window.addEventListener('resize', () => {\n this.calculateButtonVisibility();\n this.updateDOM();\n });\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n\t // Resize event listener on window\n\t state.updateBound = updateBound;\n\t getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\t\n\t // Scroll event listener on scroll parents\n\t var scrollElement = getScrollParent(reference);\n\t attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n\t state.scrollElement = scrollElement;\n\t state.eventsEnabled = true;\n\t\n\t return state;\n\t}", "function setupEventListeners(reference, options, state, updateBound) {\n\t // Resize event listener on window\n\t state.updateBound = updateBound;\n\t getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\t\n\t // Scroll event listener on scroll parents\n\t var scrollElement = getScrollParent(reference);\n\t attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n\t state.scrollElement = scrollElement;\n\t state.eventsEnabled = true;\n\t\n\t return state;\n\t}", "setEventListeners() {\n $('body').on('touchend click','.menu__option--mode',this.onModeToggleClick.bind(this));\n $('body').on('touchend',this.onTouchEnd.bind(this));\n this.app.on('change:mode',this.onModeChange.bind(this));\n this.app.on('show:menu',this.show.bind(this));\n this.book.on('load:book',this.setTitleBar.bind(this));\n this.book.on('pageSet',this.onPageSet.bind(this));\n this.tutorial.on('done',this.onTutorialDone.bind(this));\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, {\n passive: true\n }); // Scroll event listener on scroll parents\n\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n return state;\n}", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, {\n passive: true\n }); // Scroll event listener on scroll parents\n\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n return state;\n}", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, {\n passive: true\n }); // Scroll event listener on scroll parents\n\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n return state;\n}", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, {\n passive: true\n }); // Scroll event listener on scroll parents\n\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n return state;\n}", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, {\n passive: true\n }); // Scroll event listener on scroll parents\n\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n return state;\n}", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, {\n passive: true\n }); // Scroll event listener on scroll parents\n\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n return state;\n}", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, {\n passive: true\n }); // Scroll event listener on scroll parents\n\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n return state;\n}", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, {\n passive: true\n }); // Scroll event listener on scroll parents\n\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n return state;\n}", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, {\n passive: true\n }); // Scroll event listener on scroll parents\n\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n return state;\n}", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, {\n passive: true\n }); // Scroll event listener on scroll parents\n\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n return state;\n}", "function setupEventListeners(reference, options, state, updateBound) {\n\t // Resize event listener on window\n\t state.updateBound = updateBound;\n\t getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n\t // Scroll event listener on scroll parents\n\t var scrollElement = getScrollParent(reference);\n\t attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n\t state.scrollElement = scrollElement;\n\t state.eventsEnabled = true;\n\n\t return state;\n\t}", "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, this.options.positionFixed);\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 data.positionFixed = this.options.positionFixed;\n\t\n\t // compute the popper offsets\n\t data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\t\n\t data.offsets.popper.position = this.options.positionFixed ? 'fixed' : '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 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 setupListeners(){\n const $amount = document.getElementById(\"amount\");\n const $sentOrder = document.getElementById(\"enviar-venda\");\n const $addProduct = document.getElementById(\"btn-add\");\n const $openCart = document.getElementById(\"btn-prod\");\n const $btnProduct = document.getElementById(\"btn-newOrder\");\n const $selectProduct = document.getElementById(\"select-products\");\n const $signOut = document.querySelector(\"#signOut\");\n\n $amount.onchange = resetMessages;\n $selectProduct.onchange = resetMessages;\n $openCart.onclick = resetMessages;\n $btnProduct.onclick = newOrder;\n $addProduct.onclick = addProductToCart;\n $sentOrder.onclick = sendNewOrder;\n $signOut.onclick = signOut;\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 }; // compute reference element offsets\n\n data.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\n\n data.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`\n\n data.originalPlacement = data.placement;\n data.positionFixed = this.options.positionFixed; // compute the popper offsets\n\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; // run the modifiers\n\n data = runModifiers(this.modifiers, data); // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n\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 }; // compute reference element offsets\n\n data.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\n\n data.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`\n\n data.originalPlacement = data.placement;\n data.positionFixed = this.options.positionFixed; // compute the popper offsets\n\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; // run the modifiers\n\n data = runModifiers(this.modifiers, data); // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n\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 }; // compute reference element offsets\n\n data.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\n\n data.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`\n\n data.originalPlacement = data.placement;\n data.positionFixed = this.options.positionFixed; // compute the popper offsets\n\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; // run the modifiers\n\n data = runModifiers(this.modifiers, data); // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n\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 }; // compute reference element offsets\n\n data.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\n\n data.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`\n\n data.originalPlacement = data.placement;\n data.positionFixed = this.options.positionFixed; // compute the popper offsets\n\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; // run the modifiers\n\n data = runModifiers(this.modifiers, data); // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n\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 }; // compute reference element offsets\n\n data.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\n\n data.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`\n\n data.originalPlacement = data.placement;\n data.positionFixed = this.options.positionFixed; // compute the popper offsets\n\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; // run the modifiers\n\n data = runModifiers(this.modifiers, data); // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n\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 }; // compute reference element offsets\n\n data.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\n\n data.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`\n\n data.originalPlacement = data.placement;\n data.positionFixed = this.options.positionFixed; // compute the popper offsets\n\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; // run the modifiers\n\n data = runModifiers(this.modifiers, data); // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n\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 }; // compute reference element offsets\n\n data.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\n\n data.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`\n\n data.originalPlacement = data.placement;\n data.positionFixed = this.options.positionFixed; // compute the popper offsets\n\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; // run the modifiers\n\n data = runModifiers(this.modifiers, data); // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n\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 }; // compute reference element offsets\n\n data.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\n\n data.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`\n\n data.originalPlacement = data.placement;\n data.positionFixed = this.options.positionFixed; // compute the popper offsets\n\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; // run the modifiers\n\n data = runModifiers(this.modifiers, data); // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n\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 }; // compute reference element offsets\n\n data.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\n\n data.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`\n\n data.originalPlacement = data.placement;\n data.positionFixed = this.options.positionFixed; // compute the popper offsets\n\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; // run the modifiers\n\n data = runModifiers(this.modifiers, data); // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n\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 }; // compute reference element offsets\n\n data.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\n\n data.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`\n\n data.originalPlacement = data.placement;\n data.positionFixed = this.options.positionFixed; // compute the popper offsets\n\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; // run the modifiers\n\n data = runModifiers(this.modifiers, data); // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "calculateAndSetPopupPosition() {\n this.measureDOMNodes();\n\n const { selfWidth, selfHeight, targetWidth, targetHeight, targetLeft, targetTop, viewportWidth, viewportHeight } = this;\n\n const newPositions = this.props.positionFunction(\n selfWidth,\n selfHeight,\n targetWidth,\n targetHeight,\n targetLeft,\n targetTop,\n viewportWidth,\n viewportHeight\n );\n\n const { newLeft, newTop } = newPositions;\n\n this.movePopover(newLeft, newTop);\n this.positioningValid = true;\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 }", "_registerEvents() {\n if(this.options.scrollTop){\n this._bindHandler = this._scrollTop.bind(this);\n this.$element.on('open.zf.drilldown hide.zf.drilldown closed.zf.drilldown',this._bindHandler);\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.6769328", "0.64210093", "0.64043796", "0.6225007", "0.61851645", "0.6183115", "0.61671126", "0.6155106", "0.6139235", "0.6106033", "0.6097217", "0.60809004", "0.60684043", "0.6066761", "0.6035161", "0.60333353", "0.60276574", "0.602691", "0.6025185", "0.6017188", "0.6017188", "0.6017188", "0.6017188", "0.6017188", "0.6017188", "0.6017188", "0.6017188", "0.6017188", "0.6017188", "0.6017188", "0.6017188", "0.6017188", "0.6017188", "0.6017188", "0.6017188", "0.6012089", "0.6012089", "0.6002493", "0.5996851", "0.5996851", "0.5996851", "0.5996851", "0.5996851", "0.5996851", "0.5996851", "0.5996851", "0.5996851", "0.5996851", "0.599034", "0.5989826", "0.5970849", "0.5970849", "0.5970849", "0.5970849", "0.5970849", "0.5970849", "0.5970849", "0.5970849", "0.5970849", "0.5970849", "0.5970849", "0.5970849", "0.5970849", "0.5970849", "0.5970849", "0.5970849", "0.5965747", "0.59574836", "0.59574836", "0.59574836", "0.59574836", "0.59574836", "0.59574836", "0.59574836", "0.59574836", "0.59574836", "0.59574836", "0.5948653", "0.59398925", "0.59333616", "0.59320945", "0.59238714", "0.59238714", "0.59238714", "0.59238714", "0.59238714", "0.59238714", "0.59238714", "0.59238714", "0.59238714", "0.59238714", "0.59238714", "0.59238714", "0.59238714", "0.59238714", "0.59238714", "0.59238714", "0.59238714", "0.59238714", "0.59238714", "0.59238714" ]
0.0
-1
It will add resize/scroll events and start recalculating position of the popper element when they are triggered.
function enableEventListeners() { if (!this.state.eventsEnabled) { this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "adoptPositionOnResize() {\n if (this.adoptOnResize) {\n\n /**\n * Get app event manager\n * @type {ApplicationEventManager|{subscribe, eventList}}\n */\n const appEventManager = this.view.controller.root().eventManager;\n\n appEventManager.subscribe({\n event: {name: appEventManager.eventList.resizeWindow},\n callback() {\n this.setPosition({\n $container: this.$container,\n $item: this.$,\n position: this.position\n });\n }\n }, false);\n }\n }", "_events() {\n $(window).on('resize.zf.interchange', Foundation.util.throttle(() => {\n this._reflow();\n }, 50));\n }", "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 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 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, this.options.positionFixed);\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 data.positionFixed = this.options.positionFixed;\n\t\n\t // compute the popper offsets\n\t data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\t\n\t data.offsets.popper.position = this.options.positionFixed ? 'fixed' : '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 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 startRepositioningOnResize() {\n\n var repositionMenu = (function(target, options) {\n return $$rAF.throttle(function() {\n if (opts.isRemoved) return;\n var position = calculateMenuPosition(target, options);\n\n target.css(animator.toCss(position));\n });\n })(element, opts);\n\n $window.addEventListener('resize', repositionMenu);\n $window.addEventListener('orientationchange', repositionMenu);\n\n return function stopRepositioningOnResize() {\n\n // Disable resizing handlers\n $window.removeEventListener('resize', repositionMenu);\n $window.removeEventListener('orientationchange', repositionMenu);\n\n };\n }", "function startRepositioningOnResize() {\n\n var repositionMenu = (function(target, options) {\n return $$rAF.throttle(function() {\n if (opts.isRemoved) return;\n var position = calculateMenuPosition(target, options);\n\n target.css(animator.toCss(position));\n });\n })(element, opts);\n\n $window.addEventListener('resize', repositionMenu);\n $window.addEventListener('orientationchange', repositionMenu);\n\n return function stopRepositioningOnResize() {\n\n // Disable resizing handlers\n $window.removeEventListener('resize', repositionMenu);\n $window.removeEventListener('orientationchange', repositionMenu);\n\n };\n }", "function startRepositioningOnResize() {\n\n var repositionMenu = (function(target, options) {\n return $$rAF.throttle(function() {\n if (opts.isRemoved) return;\n var position = calculateMenuPosition(target, options);\n\n target.css(animator.toCss(position));\n });\n })(element, opts);\n\n $window.addEventListener('resize', repositionMenu);\n $window.addEventListener('orientationchange', repositionMenu);\n\n return function stopRepositioningOnResize() {\n\n // Disable resizing handlers\n $window.removeEventListener('resize', repositionMenu);\n $window.removeEventListener('orientationchange', repositionMenu);\n\n }\n }", "function startRepositioningOnResize() {\n\n var repositionMenu = (function(target, options) {\n return $$rAF.throttle(function() {\n if (opts.isRemoved) return;\n var position = calculateMenuPosition(target, options);\n\n target.css(animator.toCss(position));\n });\n })(element, opts);\n\n $window.addEventListener('resize', repositionMenu);\n $window.addEventListener('orientationchange', repositionMenu);\n\n return function stopRepositioningOnResize() {\n\n // Disable resizing handlers\n $window.removeEventListener('resize', repositionMenu);\n $window.removeEventListener('orientationchange', repositionMenu);\n\n }\n }", "function startRepositioningOnResize() {\n\n var repositionMenu = (function(target, options) {\n return $$rAF.throttle(function() {\n if (opts.isRemoved) return;\n var position = calculateMenuPosition(target, options);\n\n target.css(animator.toCss(position));\n });\n })(element, opts);\n\n $window.addEventListener('resize', repositionMenu);\n $window.addEventListener('orientationchange', repositionMenu);\n\n return function stopRepositioningOnResize() {\n\n // Disable resizing handlers\n $window.removeEventListener('resize', repositionMenu);\n $window.removeEventListener('orientationchange', repositionMenu);\n\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 setupEventListeners(reference,options,state,updateBound){ // Resize event listener on window\nstate.updateBound = updateBound;getWindow(reference).addEventListener('resize',state.updateBound,{passive:true}); // Scroll event listener on scroll parents\nvar scrollElement=getScrollParent(reference);attachToScrollParents(scrollElement,'scroll',state.updateBound,state.scrollParents);state.scrollElement = scrollElement;state.eventsEnabled = true;return state;}", "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}", "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.6575021", "0.65694153", "0.653866", "0.6458037", "0.6440974", "0.6427518", "0.6427518", "0.6427518", "0.6427518", "0.6427518", "0.6427518", "0.6427518", "0.6427518", "0.6427518", "0.6427518", "0.6427518", "0.6427518", "0.6427518", "0.6427518", "0.6427518", "0.6427518", "0.639979", "0.639979", "0.6396205", "0.6396205", "0.6396205", "0.6393443", "0.6380992", "0.6355209", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951", "0.6351951" ]
0.0
-1
Remove event listeners used to update the popper position
function removeEventListeners(reference, state) { // Remove resize event listener on window window.removeEventListener('resize', state.updateBound); // Remove scroll event listener on scroll parents state.scrollParents.forEach(function (target) { target.removeEventListener('scroll', state.updateBound); }); // Reset state state.updateBound = null; state.scrollParents = []; state.scrollElement = null; state.eventsEnabled = false; return state; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_removeEvents () {\n this.container.classList.remove(\"tooltiped\");\n\n this.container.removeEventListener(\"mouseenter\", this._mouseOver);\n this.container.removeEventListener(\"mousemove\", this._mouseMove);\n this.container.removeEventListener(\"mouseleave\", this._mouseOut);\n }", "_removeTriggerEvents() {\n if (this._triggerElement) {\n pointerDownEvents.forEach((type) => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n if (this._pointerUpEventsRegistered) {\n pointerUpEvents.forEach((type) => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n }\n }\n }", "_removeTriggerEvents() {\n if (this._triggerElement) {\n pointerDownEvents.forEach((type) => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n if (this._pointerUpEventsRegistered) {\n pointerUpEvents.forEach((type) => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n }\n }\n }", "_removeTriggerEvents() {\n if (this._triggerElement) {\n pointerDownEvents.forEach((type) => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n if (this._pointerUpEventsRegistered) {\n pointerUpEvents.forEach((type) => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n }\n }\n }", "removeEventListeners_() {\n this.$button_.off(app.InputEvent.START, this.onDropClick);\n }", "function removeListeners() {\r\n gameOverModal.btn.removeEventListener(\"click\", backToMenu);\r\n }", "removeEventListeners() {\n const $hubblePlot = d3Select(this.svgEl.current);\n const $allPoints = d3Select(this.svgEl.current).selectAll('.data-point');\n\n $hubblePlot\n .on('click', null)\n .on('mousemove', null)\n .on('mouseout', null);\n $allPoints\n .on('mouseover', null)\n .on('mouseout', null)\n .on('click', null)\n .on('drag', null);\n }", "function removeListeners() {\r\n modal.yes.removeEventListener(\"click\", backToMenu);\r\n modal.no.removeEventListener(\"click\", backToGame);\r\n }", "removeEventListeners() {\n this.elementListener.removeEventListener(\"mouseenter\", this.onMouseEnterBind);\n this.elementListener.removeEventListener(\"mouseleave\", this.onMouseLeaveBind);\n this.elementListener.removeEventListener(\"mousemove\", this.onMouseMoveBind);\n\n if (this.gyroscope) {\n window.removeEventListener(\"deviceorientation\", this.onDeviceOrientationBind);\n }\n\n if (this.glare || this.fullPageListening) {\n window.removeEventListener(\"resize\", this.onWindowResizeBind);\n }\n }", "_removeEventListeners() {\n this.currentEventListeners.forEach(listener => {\n this.domElement.removeEventListener(listener.event, listener.callBack);\n });\n this.currentEventListeners = null;\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)}", "removeEventListeners() {\r\n this.elementListener.removeEventListener(\"mouseenter\", this.onMouseEnterBind);\r\n this.elementListener.removeEventListener(\"mouseleave\", this.onMouseLeaveBind);\r\n this.elementListener.removeEventListener(\"mousemove\", this.onMouseMoveBind);\r\n \r\n if (this.gyroscope) {\r\n window.removeEventListener(\"deviceorientation\", this.onDeviceOrientationBind);\r\n }\r\n \r\n if (this.glare || this.fullPageListening) {\r\n window.removeEventListener(\"resize\", this.onWindowResizeBind);\r\n }\r\n }", "removeEventListeners() {\n\t\twindow.removeEventListener('resize', this.bindResize);\n\t\tthis.domElement.removeEventListener('click', this.bindClick);\n\t\tTweenMax.ticker.removeEventListener('tick', this.bindRender);\n\t\tEmitter.off('LOADING_COMPLETE', this.bindEnter);\n\t\twindow.removeEventListener('mousemove', this.boundMouseMove);\n\t}", "_removeEventListeners() {\n this.el.removeEventListener('click', this._onClickBound);\n this.el.removeEventListener('keydown', this._onKeydownBound);\n }", "manageActiveListeners() {\n if (this.state.isDropdownOpen) {\n document.addEventListener('keydown', this.handleKeyboardEvents);\n document.addEventListener('mousedown', this.handleClickOutside);\n } else {\n document.removeEventListener('keydown', this.handleKeyboardEvents);\n document.removeEventListener('mousedown', this.handleClickOutside);\n }\n }", "removeEventListeners() {\n // Empty in base class.\n }", "function removeEventListeners(reference,state){ // Remove resize event listener on window\ngetWindow(reference).removeEventListener('resize',state.updateBound); // Remove scroll event listener on scroll parents\nstate.scrollParents.forEach(function(target){target.removeEventListener('scroll',state.updateBound);}); // Reset state\nstate.updateBound = null;state.scrollParents = [];state.scrollElement = null;state.eventsEnabled = false;return state;}", "function removeListeners() {\n $(\"#controls\").off(\"click\");\n $(\"#sequence\").off(\"click\");\n}", "_removeEventListeners() {\n\n if (this._isNative) {\n this.selectEl.removeEventListener('change', this._onInputBound);\n }\n else {\n this.el.removeEventListener('change', this._onInputBound, true);\n }\n }", "removeEventListeners() {\n this.leafletMap.removeEventListener('click', (event) => {\n this.clickLeafletMap(event);\n })\n this.leafletMap.removeEventListener('mousemove', (event) => {\n this.onMouseMove(event);\n });\n this.leafletMap.removeEventListener('keydown', (event) => {\n this.onKeyPress(event.originalEvent);\n });\n this.leafletMap.removeEventListener('mouseover', (event) => {\n this.onMouseOverLeaflet(event)\n });\n this.leafletMap.removeEventListener('mouseout', (event) => {\n this.onMouseOutLeaflet(event)\n });\n }", "removeHooks(): void {\n super.removeHooks();\n\n if (this._map) {\n if (this._marker) {\n this._marker.off('click', this._onClick, this);\n this._map\n .off('click', this._onClick, this)\n .off('click', this._onTouch, this)\n .removeLayer(this._marker);\n delete this._marker;\n }\n\n this._mouseMarker.off('click', this._onClick, this);\n this._map.removeLayer(this._mouseMarker);\n delete this._mouseMarker;\n\n this._map.off('mousemove', this._onMouseMove, this);\n }\n }", "detachHandlers() {\n this.templateNext.removeEventListener('click', this.handleNext);\n this.templatePrev.removeEventListener('click', this.handlePrev);\n window.removeEventListener('keydown', this.handleKeyDown);\n window.removeEventListener('resize', this.handleResize)\n }", "destroy () {\n // unbind event handlers and clear elements created\n }", "detachPointerEvents() {\n var paneElement = this._pane.getContentElement();\n paneElement.removeListener(\"pointerdown\", this.handlePointerDown, this);\n paneElement.removeListener(\"tap\", this.handleTap, this);\n paneElement.removeListener(\"pointerover\", this.handlePointerOver, this);\n paneElement.removeListener(\"pointermove\", this.handlePointerMove, this);\n paneElement.removeListener(\"losecapture\", this.handleLoseCapture, this);\n }", "removeAllEventListeners () {\n this.eventListeners = [];\n }", "_removeEventListeners() {\n\n this.el.removeEventListener('click', this._onClickBound);\n window.removeEventListener('scroll', this._onScrollBound);\n window.removeEventListener('orientationchange', this._onScrollBound);\n document.removeEventListener('spark.visible-children', this._onVisibleBound, true);\n\n if (canObserve)\n this._removeMutationObserver();\n else\n window.removeEventListener('resize', this._onResizeBound);\n }", "unlisten() {\n EventManager.off('resize', this.onResize)\n }", "function removeEventListeners(){\n _.forEach(unlistenCallbacks, function(unlisten){\n unlisten();\n });\n unlistenCallbacks = [];\n }", "_detachScrollSpy() {\n this._scrollCarrier.removeEventListener('scroll', this._scrollSpy);\n this._scrollCarrier.removeEventListener('resize', this._scrollSpy);\n }", "removeEvents()\n {\n if (!this.interactionDOMElement)\n {\n return;\n }\n\n ticker.shared.remove(this.update);\n\n if (window.navigator.msPointerEnabled)\n {\n this.interactionDOMElement.style['-ms-content-zooming'] = '';\n this.interactionDOMElement.style['-ms-touch-action'] = '';\n }\n else if (this.supportsPointerEvents)\n {\n this.interactionDOMElement.style['touch-action'] = '';\n }\n\n window.document.removeEventListener('mousemove', this.onMouseMove, true);\n this.interactionDOMElement.removeEventListener('mousedown', this.onMouseDown, true);\n this.interactionDOMElement.removeEventListener('mouseout', this.onMouseOut, true);\n this.interactionDOMElement.removeEventListener('mouseover', this.onMouseOver, true);\n window.removeEventListener('mouseup', this.onMouseUp, true);\n\n if (this.supportsTouchEvents)\n {\n this.interactionDOMElement.removeEventListener('touchstart', this.onTouchStart, true);\n this.interactionDOMElement.removeEventListener('touchend', this.onTouchEnd, true);\n this.interactionDOMElement.removeEventListener('touchmove', this.onTouchMove, true);\n }\n\n if (this.supportsPointerEvents)\n {\n window.document.removeEventListener('pointermove', this.onPointerMove, true);\n this.interactionDOMElement.removeEventListener('pointerdown', this.onPointerDown, true);\n this.interactionDOMElement.removeEventListener('pointerout', this.onPointerOut, true);\n this.interactionDOMElement.removeEventListener('pointerover', this.onPointerOver, true);\n window.removeEventListener('pointerup', this.onPointerUp, true);\n }\n else\n {\n /**\n * If pointer events aren't available on a device, this will turn either the touch or\n * mouse events into pointer events. This allows a developer to just listen for emitted\n * pointer events on interactive sprites\n */\n if (this.normalizeTouchEvents)\n {\n this.interactionDOMElement.removeEventListener('touchstart', this.onPointerDown, true);\n this.interactionDOMElement.removeEventListener('touchend', this.onPointerUp, true);\n this.interactionDOMElement.removeEventListener('touchmove', this.onPointerMove, true);\n }\n\n if (this.normalizeMouseEvents)\n {\n window.document.removeEventListener('mousemove', this.onPointerMove, true);\n this.interactionDOMElement.removeEventListener('mousedown', this.onPointerDown, true);\n this.interactionDOMElement.removeEventListener('mouseout', this.onPointerOut, true);\n window.removeEventListener('mouseup', this.onPointerUp, true);\n }\n }\n\n this.interactionDOMElement = null;\n\n this.eventsAdded = false;\n }", "destroy () {\n const mapElement = this._mapElement\n const isScrollElementEnabled = this._isScrollElementEnabled\n\n this._mutationObserver.disconnect()\n this._mutationObserver = null\n\n /* eslint-disable-next-line */\n mapElement.removeEventListener('click', DomVerticalMiniMap.scrollDocumentTo.bind(event))\n window.removeEventListener('resize', this._setMapPointStyles.bind(this))\n\n if (isScrollElementEnabled) {\n window.removeEventListener('scroll', this._setScrollElementStyle.bind(this))\n window.removeEventListener('resize', this._setScrollElementStyle.bind(this))\n\n this._scrollElement.remove()\n this._scrollElement = null\n }\n\n const mapPoints = this._mapPoints\n for (let i = 0, length = mapPoints.length; i < length; ++i) {\n const mapPoint = mapPoints[i]\n mapPoint['marker'].remove()\n }\n this._mapPoints = []\n\n mapElement.remove()\n this._mapElement = null\n }", "__unregisterEventListener() {\n qx.event.Registration.removeListener(\n window,\n \"resize\",\n this._updateSize,\n this\n );\n\n qx.event.Registration.removeListener(\n window,\n \"scroll\",\n this._onScroll,\n this\n );\n\n this.removeListener(\"pointerdown\", qx.bom.Event.preventDefault, this);\n this.removeListener(\"pointerup\", qx.bom.Event.preventDefault, this);\n }", "_removeListeners() {\n document.removeEventListener('click', this._handleWindowClick);\n window.removeEventListener('resize', this._handleResize);\n this.el.removeEventListener('keydown', this._handleKeyDown);\n document.removeEventListener('blur', this._handleBlur, true);\n document.removeEventListener('focus', this._handleFocus, true);\n document.removeEventListener('spark.visible-children', this._handleVisibleChildren, true);\n }", "function unwireEvents() {\n _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"EventHandler\"].remove(this.element, 'keydown', maskInputKeyDownHandler);\n _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"EventHandler\"].remove(this.element, 'keypress', maskInputKeyPressHandler);\n _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"EventHandler\"].remove(this.element, 'keyup', maskInputKeyUpHandler);\n _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"EventHandler\"].remove(this.element, 'input', maskInputHandler);\n _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"EventHandler\"].remove(this.element, 'focus', maskInputFocusHandler);\n _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"EventHandler\"].remove(this.element, 'blur', maskInputBlurHandler);\n _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"EventHandler\"].remove(this.element, 'paste', maskInputPasteHandler);\n _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"EventHandler\"].remove(this.element, 'cut', maskInputCutHandler);\n _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"EventHandler\"].remove(this.element, 'mousedown', maskInputMouseDownHandler);\n _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"EventHandler\"].remove(this.element, 'mouseup', maskInputMouseUpHandler);\n if (this.formElement) {\n _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"EventHandler\"].remove(this.formElement, 'reset', resetFormHandler);\n }\n}", "_removeEventListeners() {\n window.removeEventListener('deviceorientation', this._onOrientationFound);\n\n this._map\n .off('locationfound', this._onLocationFound, this)\n .off('locationerror', this._onLocationError, this)\n .off('dragstart', this._onDragStart, this)\n .off('moveend', this._onMoveEnd, this);\n }", "detach() {\n if (this.overlayRef) {\n this.overlayRef.detach();\n this.overlayRef.dispose();\n this.overlayRef = null;\n }\n this.unsubscribeFromClickEvents();\n if (this.closeSubscription) {\n this.closeSubscription.unsubscribe();\n this.closeSubscription = null;\n }\n if (this.positionChangesSubscription) {\n this.positionChangesSubscription.unsubscribe();\n this.positionChangesSubscription = null;\n }\n this.popover = null;\n }", "function cleanup () {\n angular.element($window).off('resize', positionDropdown);\n if ( elements ){\n var items = 'ul scroller scrollContainer input'.split(' ');\n angular.forEach(items, function(key){\n elements.$[key].remove();\n });\n }\n }", "removeDragListeners() {}", "removeDragListeners() {}", "removeEvents() {\n }", "removeClickAwayEvent() {\n $('main').off('click.atkPanel');\n $(document).off('keyup.atkPanel');\n }", "unMount() {\n this.removeListeners();\n SimpleBar.instances.delete(this.el);\n }", "manageActiveListeners() {\n if (ExecutionEnvironment.canUseDOM) {\n if (this.state.showAccountPopOver) {\n document.addEventListener('mousedown', this.handleClickOutside);\n } else {\n document.removeEventListener('mousedown', this.handleClickOutside);\n }\n }\n }", "function removeListeners() {\n\t\t\t$element.unbind(START_EV, touchStart);\n\t\t\t$element.unbind(CANCEL_EV, touchCancel);\n\t\t\t$element.unbind(MOVE_EV, touchMove);\n\t\t\t$element.unbind(END_EV, touchEnd);\n\n\t\t\t//we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n\t\t\tif(LEAVE_EV) {\n\t\t\t\t$element.unbind(LEAVE_EV, touchLeave);\n\t\t\t}\n\n\t\t\tsetTouchInProgress(false);\n\t\t}", "function removeListeners() {\n $element.unbind(START_EV, touchStart);\n $element.unbind(CANCEL_EV, touchCancel);\n $element.unbind(MOVE_EV, touchMove);\n $element.unbind(END_EV, touchEnd);\n \n //we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n if(LEAVE_EV) { \n $element.unbind(LEAVE_EV, touchLeave);\n }\n \n setTouchInProgress(false);\n }", "unMount() {\n this.removeListeners();\n SimpleBar.instances.delete(this.el);\n }", "destroy () {\n\t\tthis.options.element.removeEventListener('click', this.onClickToElement);\n\t\tthis.options.element.removeChild(this.options.element.querySelector('.pollsr'));\n\t}", "function removeButtonClickHandler(e) {\n removeTrigger(e.target.closest('.trigger'));\n }", "_removeTrackListeners() {\n var interactionRects = Px.d3.selectAll(Polymer.dom(this.$$('#sliderSVG')).querySelectorAll('.sliderTrack'));\n\n interactionRects.on('click', null);\n }", "function removeListeners() {\n\t\t\t$element.unbind(START_EV, touchStart);\n\t\t\t$element.unbind(CANCEL_EV, touchCancel);\n\t\t\t$element.unbind(MOVE_EV, touchMove);\n\t\t\t$element.unbind(END_EV, touchEnd);\n\t\t\t\n\t\t\t//we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n\t\t\tif(LEAVE_EV) { \n\t\t\t\t$element.unbind(LEAVE_EV, touchLeave);\n\t\t\t}\n\t\t\t\n\t\t\tsetTouchInProgress(false);\n\t\t}", "function removeListeners() {\n\t\t\t$element.unbind(START_EV, touchStart);\n\t\t\t$element.unbind(CANCEL_EV, touchCancel);\n\t\t\t$element.unbind(MOVE_EV, touchMove);\n\t\t\t$element.unbind(END_EV, touchEnd);\n\t\t\t\n\t\t\t//we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n\t\t\tif(LEAVE_EV) { \n\t\t\t\t$element.unbind(LEAVE_EV, touchLeave);\n\t\t\t}\n\t\t\t\n\t\t\tsetTouchInProgress(false);\n\t\t}", "function removeListeners() {\n debug(\"removeListeners\");\n cards().forEach(function(card) {\n card.removeEventListener('click', cardMagic)\n })\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "destroy() {\n this.removeDomListeners()\n // 238-4\n this.unsubscribers.forEach(unsub => unsub())\n }", "function removeListeners() {\n\t\t$(document).off(EVENT_NAME_KEYPRESS);\n\t\t$(document).off(EVENT_NAME_KEYUP);\n\t}", "unWireEvent() {\n this.viewerContainer.removeEventListener('scroll', this.scrollHandler);\n this.viewerContainer.removeEventListener('mousedown', this.onMouseDownInternal);\n this.viewerContainer.removeEventListener('mousemove', this.onMouseMoveInternal);\n if (!Browser.isDevice) {\n this.editableDiv.removeEventListener('keypress', this.onKeyPressInternal);\n if (Browser.info.name === 'chrome') {\n this.editableDiv.removeEventListener('textInput', this.onTextInput);\n }\n }\n else {\n this.editableDiv.removeEventListener('input', this.onTextInputInternal);\n }\n this.editableDiv.removeEventListener('paste', this.onPaste);\n this.viewerContainer.removeEventListener('contextmenu', this.onContextMenu);\n this.editableDiv.removeEventListener('blur', this.onFocusOut);\n this.editableDiv.removeEventListener('keydown', this.onKeyDownInternal);\n this.editableDiv.removeEventListener('compositionstart', this.compositionStart);\n this.editableDiv.removeEventListener('compositionupdate', this.compositionUpdated);\n this.editableDiv.removeEventListener('compositionend', this.compositionEnd);\n this.viewerContainer.removeEventListener('mouseup', this.onMouseUpInternal);\n if (!isNullOrUndefined(this.iframe)) {\n this.iframe.removeEventListener('load', this.onIframeLoad);\n }\n this.viewerContainer.removeEventListener('dblclick', this.onDoubleTap);\n window.removeEventListener('resize', this.onWindowResize);\n window.removeEventListener('keyup', this.onKeyUpInternal);\n window.removeEventListener('mouseup', this.onImageResizer);\n window.removeEventListener('touchend', this.onImageResizer);\n }", "__removeBroadcastEventListeners() {\n let bindEvents = this._bindBroadcastEvents;\n /* istanbul ignore next */\n if (!bindEvents) {\n return;\n }\n\n bindEvents.forEach(item => eventCenter.off(item[0], item[1]));\n this._bindBroadcastEvents = [];\n }", "function destroy() {\n $(config.popoverClass).remove();\n\n // Unbind all events.\n $.each(config.events, function(index, event) {\n $(document).unbind(event);\n });\n\n $(document).trigger(config.events.destroyed);\n }", "_destroy() {\n this.$element.off('click.zf.smoothScrollWithLinks', 'a[href*=\"#\"]', this._linkClickListener);\n }", "_events() {\n this.$element.off('.zf.reveal').on({\n 'open.zf.reveal': this.open.bind(this),\n 'closed.zf.reveal': this.close.bind(this)\n });\n\n this.$insert.off('click').on({\n 'click': this.insert.bind(this)\n });\n\n this.$menu.off('click', '[data-name]').on({\n 'click': this._loadShortcode.bind(this)\n }, '[data-name]');\n\n this.$form.off('input change', ':input').on({\n 'input': this._loadPreview.bind(this),\n 'change': this._loadPreview.bind(this)\n }, ':input');\n }", "update() {\n if (this._popper) {\n this._popper.update();\n }\n }", "function onRemove() {\n $(PanelManager).off(\"editorAreaResize\", _onEditorAreaResize);\n $(DocumentManager).off(\"fileNameChange\", _onFileNameChange);\n $(\"#img\").off(\"mousemove\", \"#img-preview\", _showImageTip)\n .off(\"mouseleave\", \"#img-preview\", _hideImageTip);\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeButtonListeners() {\n if (buttons.fw) {\n buttons.fw.removeEventListener('click', handleForwardButtonClick);\n }\n if (buttons.bk) {\n buttons.bk.removeEventListener('click', handleBackwardButtonClick);\n }\n }", "function removeEventHandlers() {\n $this.off('click.collapse', '> li > .collapsible-header');\n }", "function removeEventHandlers() {\n $this.off('click.collapse', '> li > .collapsible-header');\n }", "function removeEventHandlers() {\n $this.off('click.collapse', '> li > .collapsible-header');\n }", "function cleanup () {\n if(!ctrl.hidden) {\n $mdUtil.enableScrolling();\n }\n\n angular.element($window).off('resize', positionDropdown);\n if ( elements ){\n var items = 'ul scroller scrollContainer input'.split(' ');\n angular.forEach(items, function(key){\n elements.$[key].remove();\n });\n }\n }", "removeEventListeners(){\n\t\tif(!this.document) {\n\t\t\treturn;\n\t\t}\n\t\tDOM_EVENTS.forEach(function(eventName){\n\t\t\tthis.document.removeEventListener(eventName, this._triggerEvent, { passive: true });\n\t\t}, this);\n\t\tthis._triggerEvent = undefined;\n\t}", "detachKeyboardZoomEvents() {\n fabric.util.removeListener(document, KEY_DOWN, this._listeners.keydown);\n fabric.util.removeListener(document, KEY_UP, this._listeners.keyup);\n }", "function removeListeners() {\n $element.unbind(START_EV, touchStart);\n $element.unbind(CANCEL_EV, touchCancel);\n $element.unbind(MOVE_EV, touchMove);\n $element.unbind(END_EV, touchEnd);\n\n //we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n if (LEAVE_EV) {\n $element.unbind(LEAVE_EV, touchLeave);\n }\n\n setTouchInProgress(false);\n }", "destroy() {\n\t\tdocument.removeEventListener( 'click', this.onDocumentClick, true );\n\t\tthis.el.removeEventListener( 'click', this.onSubmenuToggleClick, false );\n\t\tthis.el.removeEventListener( 'mouseover', this.onMenuItemMouseEnter, false );\n\t\tthis.el.removeEventListener( 'mouseout', this.onMenuItemMouseLeave, false );\n\t\tthis.el.removeEventListener( 'focus', this.onMenuLinkFocus, true );\n\t\tthis.el.removeEventListener( 'blur', this.onMenuLinkBlur, true );\n\t}", "function removeEventHandlers() {\r\n $this.off('click.collapse', '> li > .collapsible-header');\r\n }", "undelegateEvents() {\n this.delegatedEventListeners.forEach(({ type, listener }) => {\n this.el.removeEventListener(type, listener);\n });\n\n this.delegatedEventListeners = [];\n }", "detach() {\n const that = this;\n that._removeEventListeners();\n }", "dettachListeners(){\n $(\".card-container\").find(\".card:first()\").off(\"click\");\n $(\".card-container\").find(\".card:nth-child(2)\").off(\"click\");\n $(\".card-container\").find(\".card:last()\").off(\"click\");\n $(\".center-info\").find(\"p:first()\").off(\"click\");\n $(\".center-info\").find(\"p:eq(1)\").off(\"click\");\n }", "destroy() {\n if(this.options.scrollTop) this.$element.off('.zf.drilldown',this._bindHandler);\n this._hideAll();\n\t this.$element.off('mutateme.zf.trigger');\n Foundation.Nest.Burn(this.$element, 'drilldown');\n this.$element.unwrap()\n .find('.js-drilldown-back, .is-submenu-parent-item').remove()\n .end().find('.is-active, .is-closing, .is-drilldown-submenu').removeClass('is-active is-closing is-drilldown-submenu')\n .end().find('[data-submenu]').removeAttr('aria-hidden tabindex role');\n this.$submenuAnchors.each(function() {\n $(this).off('.zf.drilldown');\n });\n\n this.$submenus.removeClass('drilldown-submenu-cover-previous');\n\n this.$element.find('a').each(function(){\n var $link = $(this);\n $link.removeAttr('tabindex');\n if($link.data('savedHref')){\n $link.attr('href', $link.data('savedHref')).removeData('savedHref');\n }else{ return; }\n });\n Foundation.unregisterPlugin(this);\n }", "destroy() {\n //this.unobserve(this.slider.selector);\n this.unobserve(window);\n const tx = document.documentElement;\n tx.removeEventListener(\"pointermove\", this.onpointermove);\n tx.removeEventListener(\"mousemove\", this.mousemoveUpdater);\n /*this.slider.selector.removeEventListener(\"touchend\", this.mtimerUpdater);\n this.slider.selector.removeEventListener(\"mouseup\", this.mtimerUpdater);\n this.slider.selector.removeEventListener(\"mousedown\", this.mtimerUpdater);\n this.slider.selector.removeEventListener(\"mousemove\", this.mousemoveHandler);*/\n\n this.coordinator = null;\n }", "_detachMapMoveHandlers() {\n this._maps.forEach((map, index) => {\n map.events.remove('move', this._syncEvents[index]);\n });\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound); // Remove scroll event listener on scroll parents\n\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n }); // Reset state\n\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound); // Remove scroll event listener on scroll parents\n\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n }); // Reset state\n\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound); // Remove scroll event listener on scroll parents\n\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n }); // Reset state\n\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound); // Remove scroll event listener on scroll parents\n\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n }); // Reset state\n\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound); // Remove scroll event listener on scroll parents\n\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n }); // Reset state\n\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound); // Remove scroll event listener on scroll parents\n\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n }); // Reset state\n\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound); // Remove scroll event listener on scroll parents\n\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n }); // Reset state\n\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}" ]
[ "0.6902162", "0.6785765", "0.6785765", "0.6785765", "0.6770545", "0.6743059", "0.6592434", "0.6507296", "0.6457278", "0.6452451", "0.6450113", "0.64127916", "0.63347775", "0.629248", "0.62742007", "0.62729037", "0.6259061", "0.62421805", "0.6237802", "0.62315637", "0.62195307", "0.62161916", "0.6199336", "0.6191355", "0.6177142", "0.6163619", "0.61624604", "0.6126676", "0.6117929", "0.61017114", "0.610114", "0.60997236", "0.60964173", "0.609053", "0.60865563", "0.6086161", "0.6075624", "0.60666543", "0.60666543", "0.60612535", "0.60607105", "0.6052495", "0.6028583", "0.6014693", "0.601379", "0.60137475", "0.6010497", "0.60104406", "0.60012054", "0.59996915", "0.59996915", "0.5999169", "0.5995357", "0.5985078", "0.5977093", "0.59751725", "0.5971537", "0.5969978", "0.59592795", "0.5954293", "0.5936196", "0.59333825", "0.5929358", "0.5929358", "0.5929358", "0.5929358", "0.5929358", "0.5929358", "0.5929358", "0.5929358", "0.5929358", "0.5929358", "0.5929358", "0.5929358", "0.5929358", "0.5929358", "0.5929358", "0.5929358", "0.5926295", "0.591468", "0.591468", "0.591468", "0.5913537", "0.5910617", "0.5903993", "0.5903651", "0.59033126", "0.59011763", "0.5900217", "0.5899949", "0.5898291", "0.5897141", "0.5893345", "0.58921355", "0.5891942", "0.5891942", "0.5891942", "0.5891942", "0.5891942", "0.5891942", "0.5891942" ]
0.0
-1
It will remove resize/scroll events and won't recalculate popper position when they are triggered. It also won't trigger onUpdate callback anymore, unless you call `update` method manually.
function disableEventListeners() { if (this.state.eventsEnabled) { window.cancelAnimationFrame(this.scheduleUpdate); this.state = removeEventListeners(this.reference, this.state); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 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}", "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.7482764", "0.7286201", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429", "0.7253429" ]
0.0
-1
TOOLTIP PLUGIN DEFINITION =========================
function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.tooltip') var options = typeof option == 'object' && option if (!data && /destroy|hide/.test(option)) return if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options))) if (typeof option == 'string') data[option]() }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_addTooltips() {\n $(this.el.querySelectorAll('[title]')).tooltip({\n delay: { show: 500, hide: 0 }\n });\n }", "function initInstanceInfoTooltip() {\n jQuery('#instance-tooltip').tooltip();\n}", "get tooltip() {}", "function tooltips() {\r\n\t$('.tooltip-link').tooltip();\r\n}", "function zoto_widget_tips(options) {\n\tthis.$uber(options);\n\tthis.type = 'zoto_widget_tips';\n\tthis.set_title('quick tips');\n}", "function bindTooltip(){\n bindTooltipSkin(\".b-tooltip, .b-panel-icons-item a,.b-tool, .b-image-nav, .b-help, .b-title\",\"qtip-light\");\n }", "applyTooltips() {\n tippy(\".tipped\", {\n arrow: true,\n animateFill: false,\n size: \"small\",\n maxWidth: 200,\n interactiveBorder: 8\n });\n }", "function SetupPlayerTooltip(){\n // http://qtip2.com/\n $('.icon').each(function() {\n $(this).qtip({\n content: {\n text: function (event, api) {\n $.ajax({\n url: '/players/tooltip/' + $(this).data('type') + '/' + $(this).data('id')\n })\n .then(function(content) {\n // Set the tooltip content upon successful retrieval\n api.set('content.text', content);\n }, function(xhr, status, error) {\n // Upon failure... set the tooltip content to error\n api.set('content.text', status + ': ' + error);\n });\n return '';\n }\n },\n position: { my: 'lefttop', at: 'rightmiddle' },\n style: { classes: 'playerTooltip' }\n });\n });\n}", "function initToolTips() {\n $(\"[title]:not([data-hasqtip])\").each(function() {\n var $this = $(this);\n $this.qtip({\n style: {\n classes: 'qtip-bootstrap',\n },\n position: {\n my: 'top center', // Position my top left...\n at: 'bottom center', // at the bottom right of...\n target: $this, // my target,\n viewport: $(window)\n },\n events: {\n render: function(event, api) {\n // Extract the title translation ID\n var transIDs = $this.data('i18n').split(';');\n var titleTransID = transIDs[0].split(']')[1];\n\n // Remove the translation data-i18ns for title (but not text node)\n if (transIDs.length === 1) {\n $this.removeAttr('data-i18n'); // Only had title, delete it\n } else if (transIDs.length === 2) {\n $this.attr('data-i18n', transIDs[1]); // Set to the main text ID\n }\n\n // Chuck the new title trans ID (without the [title]) onto the tooltip\n api.elements.content.attr('data-i18n', titleTransID);\n }\n }\n });\n });\n}", "set tooltip(value) {}", "addHighlighTooltip () {\n }", "function ShowHelp() {\n $('img').tooltip('show');\n}", "getTooltip(){return this.__tooltip}", "function ShowHelp() {\n $('img').tooltip('show');\n coursePlayer.pause();\n}", "function init() { \n \n posHTML.setDragnDrop()\n \n //Tooltip\n $(\"a\").tooltip('show')\n $('a').tooltip({html: true}) \n $(\"a\").tooltip('hide') \n}", "tooltipClicked() {}", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.tooltip');var options=(typeof option==='undefined'?'undefined':_typeof(option))=='object'&&option;if(!data&&/destroy|hide/.test(option))return;if(!data)$this.data('bs.tooltip',data=new Tooltip(this,options));if(typeof option=='string')data[option]();});}", "function tooltip(e,t,title) {\r\n\t\t$('<div id=\"tooltip\" />')\r\n .appendTo('body')\r\n .text(title)\r\n .hide()\r\n .css({\r\n backgroundImage : 'url(./assets/images/skins/'+settings.skin+'/'+settings.skin+'_controlpanel.png)',\r\n\t\t\tbackgroundPosition : 'top left',\r\n\t\t\tbackgroundRepeat : 'repeat-x',\r\n\t\t\tcolor : settings.label,\r\n\t\t\tborder: '1px solid ' + settings.label,\r\n\t\t\ttop: e.pageY - 20,\r\n left: e.pageX + 20\r\n })\r\n .fadeIn(350);\r\n\t\t\r\n\t\tt.mousemove(function(e) {\r\n\t\t $('#tooltip').css({\r\n\t\t\ttop: e.pageY - 20,\r\n\t\t\tleft: e.pageX + 20\r\n\t\t });\r\n\t\t});\r\n\t }", "function Tip() {\n tt_Tip(arguments, null);\n}", "function TipMenu()\n{\n\tm_tt_Tip(arguments, null);\n}", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.tooltip');var options=(typeof option===\"undefined\"?\"undefined\":_typeof2(option))=='object'&&option;if(!data&&/destroy|hide/.test(option))return;if(!data)$this.data('bs.tooltip',data=new Tooltip(this,options));if(typeof option=='string')data[option]();});}", "function doTooltip(e, msg) {\nif ( typeof Tooltip == \"undefined\" || !Tooltip.ready ) return;\nTooltip.show(e, msg);\n}", "function showHelpTooltip() {\n $('#tooltip_help').show();\n}", "function titleTooltip(elem){\n $(elem).hover(function(){\n /// Hover over code\n var title = $(this).attr('title');\n $(this).data('tipText', title).removeAttr('title');\n $('<p class=\"jtt\"></p>')\n .text(title)\n .appendTo('body')\n .fadeIn('slow');\n }, function() {\n /// Hover out code\n $(this).attr('title', $(this).data('tipText'));\n $('.jtt').remove();\n }).mousemove(function(e) {\n var mousex = e.pageX + 20; /// Get X coordinates\n var mousey = e.pageY + 10; /// Get Y coordinates\n $('.jtt').css({ top: mousey, left: mousex })\n });\n}", "function enableTooltip() {\n $('[v-tooltip]').tooltip({trigger: \"hover\", 'delay': {show: 1000, hide: 100}});\n}", "function init() {\n setUpToolTip();\n}", "function toolTip() {\n $('[data-toggle=\"tooltip\"]').tooltip();\n}", "function updateTooltips() {\n jQuery('.tooltip').tooltip({showURL: false });\n}", "_init() {\n var elemId = this.$element.attr('aria-describedby') || Foundation.GetYoDigits(6, 'tooltip');\n\n this.options.positionClass = this.options.positionClass || this._getPositionClass(this.$element);\n this.options.tipText = this.options.tipText || this.$element.attr('title');\n this.template = this.options.template ? $(this.options.template) : this._buildTemplate(elemId);\n\n if (this.options.allowHtml) {\n this.template.appendTo(document.body)\n .html(this.options.tipText)\n .hide();\n } else {\n this.template.appendTo(document.body)\n .text(this.options.tipText)\n .hide();\n }\n\n this.$element.attr({\n 'title': '',\n 'aria-describedby': elemId,\n 'data-yeti-box': elemId,\n 'data-toggle': elemId,\n 'data-resize': elemId\n }).addClass(this.options.triggerClass);\n\n //helper variables to track movement on collisions\n this.usedPositions = [];\n this.counter = 4;\n this.classChanged = false;\n\n this._events();\n }", "showToolTip_(event) {\n this.updateToolTip_(event);\n }", "toggleTooltips() {\n self.enableTooltips = !self.enableTooltips;\n }", "function tooltip(){\n $(\".waypoints-header\").tooltip({\n position: {\n my: \"center\", \n at: \"bottom\", \n of: \"#waypoints\"\n },\n show: {\n effect: \"slideDown\",\n delay: 1\n }, \n });\n}", "function initializeTooltips() {\n // Download document link\n $('.download-document').tooltip({\n 'show': true,\n 'placement': 'top',\n 'title': \"Download the document\"\n });\n\n // Delete document link\n $('.delete-document').tooltip({\n 'show': true,\n 'placement': 'top',\n 'title': \"Delete the document\"\n });\n\n // Upload document link\n $('.upload-document').tooltip({\n 'show': true,\n 'placement': 'top',\n 'title': \"Upload document\"\n });\n\n // Create new folder link\n $('.create-folder').tooltip({\n 'show': true,\n 'placement': 'top',\n 'title': \"Create new folder\"\n });\n}", "function ToolTips(){\n\tif(PlayerPrefs.GetInt(\"ToolTips\")==0){\n\t\tPlayerPrefs.SetInt(\"ToolTips\",1);\n\t\ttooltipstext.GetComponent (Text).text = \"on\";\n\t}\n\telse if(PlayerPrefs.GetInt(\"ToolTips\")==1){\n\t\tPlayerPrefs.SetInt(\"ToolTips\",0);\n\t\ttooltipstext.GetComponent (Text).text = \"off\";\n\t}\n}", "function updateTips(t) {\n\t\ttips.text(t)\n\t}", "showTip(context) {\n const me = this;\n\n if (me.showTooltip) {\n me.clockTemplate = new ClockTemplate({\n scheduler: me.client\n });\n me.tip = new Tooltip({\n id: `${me.client.id}-time-range-tip`,\n cls: 'b-interaction-tooltip',\n align: 'b-t',\n autoShow: true,\n updateContentOnMouseMove: true,\n forElement: context.element,\n getHtml: () => me.getTipHtml(context.record, context.element)\n });\n }\n }", "function display_tip() {\n if (pause_on_tile === true) {\n g.paused = true;\n }\n\n show_description(g.progress); //description.js\n\n g.progress = g.progress + 1;\n}", "function toolTipInit() {\n\t\n\t\t$('.menu li a').tooltip({\n\t\t\tplacement: 'right'\n\t\t});\n\t}", "function createTooltip(position, elem, ttContent)\r\n{\r\n\tvar myPosition = \"center top+20\";\r\n\tvar atPosition = \"center bottom\";\r\n\tvar arrowClass = \"arrow\";\r\n\t\r\n\tif(position == \"bottom\")\r\n\t{\r\n\t\tmyPosition = \"center top+15\";\r\n\t\tatPosition = \"center bottom\";\r\n\t}\r\n\telse if(position == \"top\")\r\n\t{\r\n\t\tmyPosition = \"center bottom-15\";\r\n\t\tatPosition = \"center top\";\r\n\t}\r\n\telse if(position == \"left\")\r\n\t{\r\n\t\tmyPosition = \"right-15 center\";\r\n\t\tatPosition = \"left center\";\r\n\t\t\r\n\t\tarrowClass = \"arrowHor\";\r\n\t}\r\n\telse if(position == \"right\")\r\n\t{\r\n\t\tmyPosition = \"left+15 center\";\r\n\t\tatPosition = \"right center\";\r\n\t\t\r\n\t\tarrowClass = \"arrowHor\";\r\n\t}\r\n\t\r\n\telem.tooltip({\r\n\t\titems: elem.prop(\"tagName\"),\r\n\t\tcontent: ttContent,\r\n\t\tdelay: 5000,\r\n\t position: {\r\n\t\t my: myPosition,\r\n\t\t at: atPosition,\r\n\t\t /*\r\n\t\t using: function( position, feedback ) {\r\n\t\t $( this ).css( position );\r\n\t\t $( \"<div>\" )\r\n\t\t .addClass( arrowClass )\r\n\t\t .addClass( feedback.vertical )\r\n\t\t .addClass( feedback.horizontal )\r\n\t\t .appendTo( this );\r\n\t\t }\r\n\t\t */\r\n\t },\r\n\t\topen: function(event, ui) {\r\n\t\t\tvar tooltip = ui.tooltip;\r\n\t\t\tsetTimeout(function(tooltip){tooltip.hide();}, 4000, tooltip);\r\n\t\t}\r\n\t});\r\n}", "showTip(context) {\n const me = this;\n\n if (me.showTooltip) {\n me.clockTemplate = new ClockTemplate({\n timeAxisViewModel: me.client.timeAxisViewModel\n });\n\n me.tip = new Tooltip({\n cls: 'b-interaction-tooltip',\n align: 'b-t',\n autoShow: true,\n forElement: context.element,\n getHtml: () => me.getTipHtml(context.record, context.element)\n });\n }\n }", "function loadTooltips() {\n $('.hover-tooltip').tooltip({\n title: hoverGetData,\n html: true,\n container: 'body',\n placement: 'left',\n delay: {\n \"show\": 100,\n \"hide\": 1500\n }\n });\n}", "function init_tooltips(){\n \n $(\".tooltip-bot, .tooltip-bot a, .nav-social-links a\").tooltip({\n placement: \"bottom\"\n });\n \n $(\".tooltip-top, .tooltip-top a\").tooltip({\n placement: \"top\"\n });\n \n \n $(\".tooltip-right, .tooltip-right a\").tooltip({\n placement: \"right\"\n });\n \n \n $(\".tooltip-left, .tooltip-left a\").tooltip({\n placement: \"left\"\n });\n \n }", "function toolTips(el,help) {\n\t\t$(el).on('mouseenter', function() {\n\t\t\t$(help).show();\n\t\t\t$(el).on('click', function() {\n\t\t\t\t$(help).hide();\n\t\t\t});\n\t\t\t$(el).on('mouseleave', function() {\n\t\t\t\t$(help).hide();\n\t\t\t});\n\t\t});\n\t}", "function setupBootstrapTooltips() {\n\t$('[data-toggle=\"tooltip\"], .conceptPoint, #recommendSection .panel-heading, .btn-info').tooltip({\n\t\tcontainer: 'body',\n\t\thtml: true\n\t});\n}", "function SetupCompetitionTooltip(){\n\n // http://qtip2.com/\n $('.icon1').each(function() {\n $(this).qtip({\n content: {\n text: '<div class=\"tooltipText\">' + $(this).data(\"summary\") + '</div>'\n },\n position: { my: 'lefttop', at: 'rightmiddle' },\n style: { classes: 'playerTooltip' }\n });\n });\n}", "function tooltipInit() {\n $('[data-toggle=\"tooltip\"]').tooltip();\n}", "function load_tooltips() {\n $('[data-toggle=\"tooltip\"]').tooltip()\n}", "function mouseOverHelp(i) {\n return function() {\n target.innerHTML = helperTags[i].tooltip\n };\n }", "get tooltipTemplate() {\n return html`<simple-tooltip\n id=\"tooltip\"\n for=\"button\"\n ?hidden=\"${!this.currentTooltip && !this.currentLabel}\"\n position=\"${this.tooltipDirection || \"bottom\"}\"\n >${this.currentTooltip || this.currentLabel}</simple-tooltip\n >`;\n }", "function init_tooltips(){\n\n $(\".tooltip-bot, .tooltip-bot a, .nav-social-links a\").tooltip({\n placement: \"bottom\"\n });\n\n $(\".tooltip-top, .tooltip-top a\").tooltip({\n placement: \"top\"\n });\n\n }", "function enableToolTipForHeader(){\r\n\t$('#merchantUpload').tooltip({title: \"Upload new set of images for an application.\", animation: true,placement: \"auto\"});\r\n\t$('[href=\"/search\"]').tooltip({title: \"Search existing or previously uploaded application from the system.\", animation: true,placement: \"auto\"});\r\n\t$('[href=\"/followup\"]').tooltip({title: \"Search applications for document followup from Head office.\", animation: true,placement: \"auto\"});\r\n\t$('[href=\"/signup\"]').tooltip({title: \"Register new merchant promoter or staff in Online Submission Application.\", animation: true,placement: \"auto\"});\r\n\t$('[href=\"#logout\"]').tooltip({title: \"Logout to OSA-PH.\", animation: true,placement: \"auto\"});\r\n}", "function initTooltip() {\n angular.element(elem).tooltip({\n title: scope.bsTip,\n placement: scope.bsTipPlacement\n });\n }", "function tp(poTag, psSelector)\n{\n\n if(psSelector)\n {\n var sHTML = \"\"+$(psSelector).html();\n sHTML = sHTML.split('\"').join(\"'\");\n\n $(poTag).attr('title', sHTML);\n }\n\n\n $(poTag).tooltip(\n {content: function()\n {\n if(!$(this).attr('title'))\n $(this).attr('title', $(this).text());\n\n return $(this).attr('title');\n }\n }).blur().mouseenter();\n\n return true;\n}", "function e(t){var e,i;this.qTipTitle=null,this.qTipText=null,this.qTipInnerHTML=null,null!=(i=/^\\(tooltip: ?(.+)\\|(.+)(?=\\))\\)$/.exec(t.text()))&&3==i.length?(this.qTipTitle=i[1],this.qTipText=i[2],e=/^(.+)\\|/,this.qTipInnerHTML=(i[1]+\"|\"+i[2]).replace(e,\"\")):null!=(i=/^(.+)\\|(.+)$/.exec(t.text()))&&3==i.length?(this.qTipTitle=i[1],this.qTipText=i[2],e=/^(.+)\\|/,this.qTipInnerHTML=t.html().replace(e,\"\")):(this.qTipText=t.text(),this.qTipInnerHTML=t.html())}", "function show() {\n tID = null;\n let isBrowsable = false;\n if ($.tooltip.current !== null) {\n isBrowsable = settings($.tooltip.current).isBrowsable;\n }\n\n if ((!IE || !$.fn.bgiframe) && settings($.tooltip.current).fade) {\n if (helper.parent.is(':animated'))\n helper.parent\n .stop()\n .show()\n .fadeTo(settings($.tooltip.current).fade, 100);\n else\n helper.parent.is(':visible')\n ? helper.parent.fadeTo(\n settings($.tooltip.current).fade,\n 100\n )\n : helper.parent.fadeIn(settings($.tooltip.current).fade);\n } else {\n helper.parent.show();\n }\n\n $(helper.parent[0])\n .unbind('mouseenter')\n .unbind('mouseleave')\n .mouseenter(function () {\n if (isBrowsable) {\n $.tooltip.currentHover = true;\n }\n })\n .mouseleave(function () {\n if (isBrowsable) {\n // if tooltip has scrollable content or selectionnable text - should be closed on mouseleave:\n $.tooltip.currentHover = false;\n helper.parent.hide();\n }\n });\n\n update();\n }", "_createToolTip () {\n const tip = d3.tip().attr('id', 'ets-tip')\n .html((d) => { return this._getTipContent(d); })\n .direction((d) => { return this._setTipDirection(d); });\n\n\n return tip;\n }", "function tooltipFunctions() {\n $('[data-toggle=\"tooltip\"]').tooltip(); //needed for tooltip\n $('[data-toggle=\"popover\"]').popover();\n $('.tdPlaylistButton').mouseenter(function(){\n setTimeout(function(){\n $('.tdPlaylistButton').tooltip('hide');\n },1000);\n });\n $('.browseChannelButton').mouseenter(function () {\n setTimeout(function () {\n $('.browseChannelButton').tooltip('hide');\n }, 1000);\n });\n $('.lightBoxMode').mouseenter(function () {\n setTimeout(function () {\n $('.lightBoxMode').tooltip('hide');\n }, 1000);\n });\n $('.channelSearchButton').mouseenter(function () {\n setTimeout(function () {\n $('.channelSearchButton').tooltip('hide');\n }, 1000);\n });\n $('.videoSearchButton').mouseenter(function () {\n setTimeout(function () {\n $('.videoSearchButton').tooltip('hide');\n }, 1000);\n });\n $('#videoStats .fa-bar-chart').mouseenter(function () {\n setTimeout(function () {\n $('#videoStats .fa-bar-chart').tooltip('hide');\n }, 1000);\n });\n $('#channelInfo .fa-list-alt').mouseenter(function () {\n setTimeout(function () {\n $('#channelInfo .fa-list-alt').tooltip('hide');\n }, 1000);\n });\n $('.listDropButton').mouseenter(function(){\n setTimeout(function(){\n $('.listDropButton').tooltip('hide');\n },1000);\n });\n $('.lastVideoButton').mouseenter(function(){\n setTimeout(function(){\n $('.lastVideoButton').tooltip('hide');\n },1000);\n });\n $('.rewindButton').mouseenter(function(){\n setTimeout(function(){\n $('.rewindButton').tooltip('hide');\n },1000);\n });\n $('.fastForwardButton').mouseenter(function(){\n setTimeout(function(){\n $('.fastForwardButton').tooltip('hide');\n },1000);\n });\n $('.nextVideoButton').mouseenter(function(){\n setTimeout(function(){\n $('.nextVideoButton').tooltip('hide');\n },1000);\n });\n $('.playButton').mouseenter(function(){\n setTimeout(function(){\n $('.playButton').tooltip('hide');\n },1000);\n });\n $('.pauseButton').mouseenter(function(){\n setTimeout(function() {\n $('.pauseButton').tooltip('hide');\n }, 1000);\n });\n $('.listUpButton').mouseenter(function(){\n setTimeout(function(){\n $('.listUpButton').tooltip('hide');\n },1000);\n });\n}", "function ActivateTooltip() {\n // creates the tooltip to display the y point\n $(\"<div id='tooltip'></div>\").css({\n position: \"absolute\",\n display: \"none\",\n border: \"1px solid #fdd\",\n padding: \"2px\",\n \"background-color\": \"#fee\",\n opacity: 0.80\n }).appendTo(\"body\");\n // displays the tooltip on hover\n $(\"#placeholder\").bind(\"plothover\", function (event, pos, item) {\n if (item) {\n var x = item.datapoint[0].toFixed(2), y = item.datapoint[1].toFixed(2);\n $(\"#tooltip\").html(y)\n .css({ top: item.pageY + 5, left: item.pageX + 5 })\n .fadeIn(200);\n }\n else {\n $(\"#tooltip\").hide();\n }\n });\n }", "function addTooltips() {\n //Pick a random message\n var activeMsgId = Math.floor(Math.random() * (Object.keys(messages).length));\n $('.task-input').attr('data-position', 'bottom center');\n $('.task-input.task').attr('data-html', '<div class=\"input-tooltip\">' + messages[activeMsgId].task.line1 + '<br><i>' + messages[activeMsgId].task.line2 + '</i></div>');\n $('.task-input.section').attr('data-html', '<div class=\"input-tooltip\">' + messages[activeMsgId].section.line1 + '<br><i>' + messages[activeMsgId].section.line2 + '</i></div>');\n $('.task-input.tags').attr('data-html', '<div class=\"input-tooltip\">' + messages[activeMsgId].tags.line1 + '<br><i>' + messages[activeMsgId].tags.line2 + '</i></div>');\n $('.task-input.points').attr('data-html', '<div class=\"input-tooltip\">' + messages[activeMsgId].points.line1 + '<br><i>' + messages[activeMsgId].points.line2 + '</i></div>');\n $('.task-input').popup({\n preserve: true,\n delay: {show: 350}\n });\n}", "function SetupPlayerMatchTooltip(){\n\n // http://qtip2.com/\n $('.matchIcon').each(function() {\n $(this).qtip({\n content: {\n text: function (event, api) {\n $.ajax({\n url: '/players/tooltip/matches/' + $(this).attr('id')\n })\n .then(function(content) {\n // Set the tooltip content upon successful retrieval\n api.set('content.text', content);\n }, function(xhr, status, error) {\n // Upon failure... set the tooltip content to error\n api.set('content.text', status + ': ' + error);\n });\n return '';\n }\n },\n position: { my: 'rightMiddle', at: 'leftMiddle' },\n style: { classes: 'matchTooltip' }\n });\n });\n}", "function showHelpStrip() {\n // loadInputControls();\n helpTip = $(document).tooltip({ disabled: false });\n helpTip = $(document).tooltip({ track: true });\n}", "function toolTipInit() {\r\n\t\r\n\t\t$('.social-icon-top ul li a, ul.footer-social li a').tooltip({\r\n\t\t\tplacement: 'bottom'\r\n\t\t});\r\n\t}", "function toolTipHTML() {\n return \"100\";\n }", "function setTooltips()\r\n{\r\n $(function()\r\n {\r\n if ($(\".tooltip\").length > 0)\r\n {\r\n $(\".tooltip\").tooltip({showURL: false});\r\n }\r\n });\r\n}", "initTooltip() {\n const me = this,\n {\n client\n } = me;\n\n if (me.showTooltip) {\n if (me.tip) {\n me.tip.showBy(me.getTooltipTarget());\n } else {\n me.clockTemplate = new ClockTemplate({\n scheduler: client\n });\n me.tip = new Tooltip({\n id: `${client.id}-drag-create-tip`,\n autoShow: true,\n trackMouse: false,\n updateContentOnMouseMove: true,\n getHtml: me.getTipHtml.bind(me),\n align: client.isVertical ? 't-b' : 'b100-t100',\n hideDelay: 0,\n axisLock: true // Don't want it flipping to the side where we are dragging\n\n });\n me.tip.on('innerhtmlupdate', me.updateDateIndicator, me);\n }\n }\n }", "function updateTooltips(){\r\n\t//Bind Tooltips with Buttons\r\n\t$(\"button[rel='tooltip']\").tooltip({\r\n\t\tplacement:'top',\r\n\t\ttrigger:'hover',\r\n\t\tanimation:'true'\r\n\t});\r\n}", "get tooltipClass() { return this._tooltipClass; }", "function tooltips ( ) {\r\n\r\n\t\t// Tooltips are added with options.tooltips in original order.\r\n\t\tvar tips = scope_Handles.map(addTooltip);\r\n\r\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\r\n\r\n\t\t\tif ( !tips[handleNumber] ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tvar formattedValue = values[handleNumber];\r\n\r\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\r\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\r\n\t\t\t}\r\n\r\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\r\n\t\t});\r\n\t}", "function initializeTooltips(){\n\t$('.tooltip').tooltipster({\n\t\tcontentAsHTML: true, // set title content to html\n\t\ttrigger: 'custom', // add custom trigger\n\t\ttriggerOpen: { // open tooltip when element is clicked, tapped (mobile) or hovered\n\t\t mouseenter: true\n\t\t},\n\t\ttriggerClose: { // close tooltip when element is clicked again, tapped or when the mouse leaves it\n\t\t\tmouseleave: true\n\t\t},\n\t\ttheme: ['tooltipster-light'/*, 'tooltipster-light-custom'*/]\n \t});\n}", "function ttMouseOver() {\nif (tooltipsOn && wgCanonicalNamespace != \"Special\" && (itemTooltips || npcTooltips || questTooltips || quickTooltips || abilityTooltips || otherTooltips)) {\n$(\"body\").mouseover(hideTip);\n$(\"#bodyContent\").append('<div id=\"tfb\" class=\"htt\"></div><div id=\"templatetfb\" class=\"htt\"><div>');\nif (itemTooltips) $(\"span.itemlink,span.setlink\").each(bindTT);\nif (npcTooltips) $(\"span.npclink\").each(bindTT);\nif (questTooltips) $(\"span.questlink\").each(bindTT);\nif (achievementTooltips) $(\"span.achievementlink\").each(bindTT);\nif (abilityTooltips) $(\"span.abilitylink\").each(bindTT);\nif (otherTooltips) $(\"span.ajaxttlink\").each(bindTT);\nif (quickTooltips) $(\"span.tttemplatelink\").each(function () {\n$(this).mouseover(showTemplateTip);\n$(this).mouseout(hideTemplateTip);\n$(this).mousemove(moveTip);\n});\n}\n}", "function responsiveTooltips() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t$('.nectar_image_with_hotspots').each(function () {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$(this).find('.nectar_hotspot_wrap').each(function () {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (nectarDOMInfo.winW > 690) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Remove click if applicable\r\n\t\t\t\t\t\t\t\tif ($(this).parents('.nectar_image_with_hotspots[data-tooltip-func=\"hover\"]').length > 0) {\r\n\t\t\t\t\t\t\t\t\t$(this).find('.nectar_hotspot').removeClass('click');\r\n\t\t\t\t\t\t\t\t\t$(this).find('.nttip').removeClass('open');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$(this).find('.nttip .inner a.tipclose').remove();\r\n\t\t\t\t\t\t\t\t$('.nttip').css('height', 'auto');\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Reset for positioning\r\n\t\t\t\t\t\t\t\t$(this).css({\r\n\t\t\t\t\t\t\t\t\t'width': 'auto',\r\n\t\t\t\t\t\t\t\t\t'height': 'auto'\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$(this).find('.nttip')\r\n\t\t\t\t\t\t\t\t\t.removeClass('force-right')\r\n\t\t\t\t\t\t\t\t\t.removeClass('force-left')\r\n\t\t\t\t\t\t\t\t\t.removeClass('force-top')\r\n\t\t\t\t\t\t\t\t\t.css('width', 'auto');\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tvar $tipOffset = $(this).find('.nttip').offset();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Against right side \r\n\t\t\t\t\t\t\t\tif ($tipOffset.left > $(this).parents('.nectar_image_with_hotspots').width() - 200) {\r\n\t\t\t\t\t\t\t\t\t$(this).find('.nttip').css('width', '250px');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t$(this).find('.nttip').css('width', 'auto');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Responsive\r\n\t\t\t\t\t\t\t\tif ($tipOffset.left < 0) {\r\n\t\t\t\t\t\t\t\t\t$(this).find('.nttip').addClass('force-right');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if ($tipOffset.left + $(this).find('.nttip').outerWidth(true) > nectarDOMInfo.winW) {\r\n\t\t\t\t\t\t\t\t\t$(this).find('.nttip').addClass('force-left').css('width', '250px');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if ($tipOffset.top + $(this).find('.nttip').height() + 35 > $window.height() && $('#nectar_fullscreen_rows').length > 0) {\r\n\t\t\t\t\t\t\t\t\t$(this).find('.nttip').addClass('force-top');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif ($(this).find('> .open').length == 0) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$(this).css({\r\n\t\t\t\t\t\t\t\t\t\t'width': '30px',\r\n\t\t\t\t\t\t\t\t\t\t'height': '30px'\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//fixed position\r\n\t\t\t\t\t\t\t\t$(this).find('.nttip')\r\n\t\t\t\t\t\t\t\t\t.removeClass('force-left')\r\n\t\t\t\t\t\t\t\t\t.removeClass('force-right')\r\n\t\t\t\t\t\t\t\t\t.removeClass('force-top');\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$(this).find('.nectar_hotspot').addClass('click');\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif ($(this).find('.nttip a.tipclose').length == 0) {\r\n\t\t\t\t\t\t\t\t\t$(this).find('.nttip .inner').append('<a href=\"#\" class=\"tipclose\"><span></span></a>');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Change height of fixed\r\n\t\t\t\t\t\t\t\t$('.nttip').css('height', $window.height());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t}", "initTooltip() {\n const me = this,\n client = me.client;\n\n if (me.showTooltip) {\n if (me.tip) {\n me.tip.showBy(me.getTooltipTarget());\n } else {\n me.clockTemplate = new ClockTemplate({\n timeAxisViewModel: client.timeAxisViewModel\n });\n\n me.tip = new Tooltip({\n id: `${client.id}-drag-create-tip`,\n autoShow: true,\n trackMouse: false,\n getHtml: me.getTipHtml.bind(me),\n align: client.isVertical ? 't-b' : 'b100-t100',\n hideDelay: 0,\n axisLock: true // Don't want it flipping to the side where we are dragging\n });\n\n me.tip.on('innerhtmlupdate', me.updateDateIndicator, me);\n }\n }\n }", "function QTip() {\n\n var myPos = {\n bot: { target: 'mouse', my: 'top left', at: 'bottom right', adjust: { x: 10, y: 20 } },\n top: { target: 'mouse', my: 'bottom left', at: 'top right', adjust: { x: 5, y: 0 } }\n };\n\n // destroy artifacts before creating again\n $('.qtip').each(function () {\n $(this).data('qtip').destroy();\n })\n\n // create tooltip\n $('[title]').each(function () {\n $(this).qtip({\n style: { classes: 'qtip-light qtip-shadow qtip-rounded' },\n position: ($(this).data('qtop')) ? myPos.top : myPos.bot,\n content: { text: '<span class=\"glyphicon ' + CD_Library.Icons[$(this).data('icon')] + '\"></span> &nbsp;' + $(this).attr('title') },\n suppress: true\n });\n\n });\n\n}", "function setupToolTips(id, msg) {\n let newID = id + 'tip';\n document.getElementById(newID).innerHTML = msg;\n document.getElementById(newID).style.visibility = \"hidden\";\n\n}", "function showTooltip(content, event) {\n tt.style('opacity', 1.0)\n .html(content);\n \n updatePosition(event);\n }", "function JT_init(){\n\t $(\"a.jTip\")\n\t\t .hover(function(){JT_show(this.href,this.id,this.name)},function(){$('#JT').remove()})\n .click(function(){return false});\t \n}", "function ttMouseOver(foo) {\nif (tooltipsOn && getCookie(\"wiki-tiploader\") != \"no\") {\n$(\"#WikiaArticle\").mouseover(hideTip);\n$(\"#WikiaArticle\").append('<div id=\"tfb\" class=\"htt\"></div><div id=\"templatetfb\" class=\"htt\"><div>');\n$tfb = $(\"#tfb\");\n$ttfb = $(\"#templatetfb\");\n$htt = $(\"#tfb,#templatetfb\");\nif(foo==1){\n$(\"#WikiaArticle span.ajaxttlink\").each(bindTT);\n}\n$(\"#WikiaArticle span.tttemplatelink\").mouseover(showTemplateTip).mouseout(hideTemplateTip).mousemove(moveTip);\n}\n}", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tooltip')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data && option == 'destroy') return\n\t if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function toggle_tooltip() {\n $('[data-toggle=\"tooltip\"]').tooltip(); \n}", "function showToolTipHelp() {\n\t\tvar link = tip.triggerElement;\n\t\tif (!link) {\n\t\t\treturn false;\n\t\t}\n\t\tvar table = link.getAttribute('data-table');\n\t\tvar field = link.getAttribute('data-field');\n\t\tvar key = table + '.' + field;\n\t\tvar response = cshHelp.key(key);\n\t\ttip.target = tip.triggerElement;\n\t\tif (response) {\n\t\t\tupdateTip(response);\n\t\t} else {\n\t\t\t\t// If a table is defined, use ExtDirect call to get the tooltip's content\n\t\t\tif (table) {\n\t\t\t\tvar description = '';\n\t\t\t\tif (typeof(top.TYPO3.LLL) !== 'undefined') {\n\t\t\t\t\tdescription = top.TYPO3.LLL.core.csh_tooltip_loading;\n\t\t\t\t} else if (opener && typeof(opener.top.TYPO3.LLL) !== 'undefined') {\n\t\t\t\t\tdescription = opener.top.TYPO3.LLL.core.csh_tooltip_loading;\n\t\t\t\t}\n\n\t\t\t\t\t// Clear old tooltip contents\n\t\t\t\tupdateTip({\n\t\t\t\t\tdescription: description,\n\t\t\t\t\tcshLink: '',\n\t\t\t\t\tmoreInfo: '',\n\t\t\t\t\ttitle: ''\n\t\t\t\t});\n\t\t\t\t\t// Load content\n\t\t\t\tTYPO3.CSH.ExtDirect.getTableContextHelp(table, function(response, options) {\n\t\t\t\t\tExt.iterate(response, function(key, value){\n\t\t\t\t\t\tcshHelp.add(value);\n\t\t\t\t\t\tif (key === field) {\n\t\t\t\t\t\t\tupdateTip(value);\n\t\t\t\t\t\t\t\t// Need to re-position because the height may have increased\n\t\t\t\t\t\t\ttip.show();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}, this);\n\n\t\t\t\t// No table was given, use directly title and description\n\t\t\t} else {\n\t\t\t\tupdateTip({\n\t\t\t\t\tdescription: link.getAttribute('data-description'),\n\t\t\t\t\tcshLink: '',\n\t\t\t\t\tmoreInfo: '',\n\t\t\t\t\ttitle: link.getAttribute('data-title')\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}", "function tooltips() {\n\n // Tooltips are added with options.tooltips in original order.\n var tips = scope_Handles.map(addTooltip);\n\n bindEvent('update', function (values, handleNumber, unencoded) {\n\n if (!tips[handleNumber]) {\n return;\n }\n\n var formattedValue = values[handleNumber];\n\n if (options.tooltips[handleNumber] !== true) {\n formattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n }\n\n tips[handleNumber].innerHTML = formattedValue;\n });\n }", "function showNotificationsTooltip() {\n $('#tooltip_content').show();\n}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this);\n var data = $this.data('bs.tooltip');\n var options = typeof option == 'object' && option;\n\n if (!data && /destroy|hide/.test(option)) return;\n if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)));\n if (typeof option == 'string') data[option]()\n })\n }", "function enableToolTipForContactTime(){\r\n\t$('[id^=\"contactFrom\"]').tooltip({title: \"Please follow military time format from 0800 to 1800.\", animation: true,placement: \"auto\"});\r\n\t$('[id^=\"contactTo\"]').tooltip({title: \"Please follow military time format from 0800 to 1800.\", animation: true,placement: \"auto\"});\r\n}", "function vtt_tooltip(e, id, contents){\r\n id = \"TTL_TTP_\"+id;\r\n div = document.createElement('div');\r\n div.setAttribute('id', id);\r\n div.setAttribute('style', 'position:absolute; top:120px; left:720px; padding:2px; z-index:200; border:solid 1px #000000; background-color:#FFFFFF; visibility:hidden;');\r\n div.innerHTML = contents;\r\n document.getElementById('ltop1').parentNode.appendChild(div);\r\n var timer;\r\n\r\n delay_mouseover = function (e){\r\n if (timer != undefined) window.clearTimeout(timer);\r\n timer = window.setTimeout(function(){\r\n x = document.getElementById(id);\r\n x.style.visibility = 'visible';\r\n x.style.left = (e.pageX+12)+'px';\r\n x.style.top = (e.pageY+1)+'px';\r\n }, 500);\r\n }\r\n delay_mouseout = function (){\r\n if (timer != undefined) window.clearTimeout(timer);\r\n timer = window.setTimeout(function(){\r\n document.getElementById(id).style.visibility = 'hidden';\r\n }, 300);\r\n }\r\n\r\n e.addEventListener('mouseover', delay_mouseover, false);\r\n e.addEventListener('mouseout', delay_mouseout, false);\r\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('sia.siatooltip')\n var options = typeof option == 'object' && option\n\n if (!data && /destroy|hide/.test(option)) return\n if (!data) $this.data('sia.siatooltip', (data = new SIATooltip(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.tooltip')\n var options = typeof option == 'object' && option\n\n if (!data && /destroy|hide/.test(option)) return\n if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tooltip')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data && /destroy|hide/.test(option)) return\n\t if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tooltip')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data && /destroy|hide/.test(option)) return\n\t if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tooltip')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data && /destroy|hide/.test(option)) return\n\t if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tooltip')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data && /destroy|hide/.test(option)) return\n\t if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }" ]
[ "0.7193489", "0.7177543", "0.71230096", "0.7107687", "0.7008811", "0.69535863", "0.6937391", "0.6877154", "0.685422", "0.68206614", "0.6799643", "0.6799365", "0.6754513", "0.6752117", "0.6705143", "0.6687539", "0.6659539", "0.66462636", "0.6641098", "0.66409045", "0.66404915", "0.6611428", "0.6608622", "0.6594933", "0.6592712", "0.65761316", "0.65433455", "0.65401727", "0.6527606", "0.65178484", "0.65150297", "0.6510025", "0.65094393", "0.65028816", "0.6496666", "0.64965194", "0.649273", "0.6485682", "0.64811736", "0.6477993", "0.64776117", "0.6469281", "0.646133", "0.64574623", "0.6453759", "0.6445739", "0.6444742", "0.64437234", "0.6426604", "0.639941", "0.6391769", "0.6386628", "0.6367319", "0.63651425", "0.6359108", "0.6346714", "0.633354", "0.6333151", "0.6327206", "0.6318585", "0.63076884", "0.6291495", "0.62852436", "0.62798256", "0.6275705", "0.6274838", "0.62658226", "0.62657225", "0.62482256", "0.6234168", "0.623285", "0.6229015", "0.62260425", "0.62075704", "0.6204771", "0.6198483", "0.6198381", "0.6192908", "0.6191854", "0.61916745", "0.6188208", "0.61783534", "0.6177515", "0.6177515", "0.6177515", "0.6177515", "0.6177515", "0.6177515", "0.6177515", "0.6177515", "0.6177515", "0.6177515", "0.6169931", "0.6169874", "0.6168413", "0.61625046", "0.6158275", "0.6143102", "0.6143102", "0.6143102", "0.6143102" ]
0.0
-1
POPOVER PLUGIN DEFINITION =========================
function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.popover') var options = typeof option == 'object' && option if (!data && /destroy|hide/.test(option)) return if (!data) $this.data('bs.popover', (data = new Popover(this, options))) if (typeof option == 'string') data[option]() }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function PopoverConfig() { }", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.popover');var options=(typeof option==='undefined'?'undefined':_typeof(option))=='object'&&option;if(!data&&/destroy|hide/.test(option))return;if(!data)$this.data('bs.popover',data=new Popover(this,options));if(typeof option=='string')data[option]();});}", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.popover');var options=(typeof option===\"undefined\"?\"undefined\":_typeof2(option))=='object'&&option;if(!data&&/destroy|hide/.test(option))return;if(!data)$this.data('bs.popover',data=new Popover(this,options));if(typeof option=='string')data[option]();});}", "function Popout() {\n\tthis._scrX = 0;\n\tthis._scrY = 0;\n\tthis._$ = $(this);\n}", "_setPopOver() {\n const $content = this._getContent();\n if (!$content) {\n return;\n }\n const options = {\n content: $content,\n html: true,\n placement: 'left',\n title: _t('Availability'),\n trigger: 'focus',\n delay: {'show': 0, 'hide': 100 },\n };\n this.$el.popover(options);\n }", "function porfolio_detail_popup() {\r\n $('.portfolio-detail-popup').magnificPopup({\r\n type: 'inline',\r\n mainClass: 'mfp-fade',\r\n preloader: true,\r\n gallery: {\r\n enabled: true\r\n }\r\n });\r\n }", "function init() {\n $(\".boxart\").popover({\n content: getPopoverContent,\n trigger: 'hover',\n html: true,\n container: 'body',\n viewport: \".content-wrap\",\n placement: \"auto\"\n });\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this);\n var data = $this.data(DataKey);\n if (!data) {\n var options = $.extend({}, Default, $this.data(), typeof option === 'object' && option);\n $this.data(DataKey, (data = new PushMenu(options)));\n }\n if (option === 'toggle') {\n data.toggle();\n }\n });\n }", "static get tag() {\n return \"simple-popover\";\n }", "static get tag() {\n return \"simple-popover\";\n }", "function popover(){\n var bootstrap = require('bootstrap');\n $(\"[data-toggle='popover']\").popover();\n $(document).on('mouseout','.omit',function(){\n $(\".popover\").delay(800).hide();\n }).on('mouseover','.popover',function(){\n $(this).show();\n }).on('mouseout','.popover',function(){\n $(this).hide();\n });\n }", "function popUp()\n{\n}", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.popover')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data && option == 'destroy') return\n\t if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function initPopups() {\r\n jQuery('.social-popup').contentPopup({\r\n mode: 'click',\r\n hideOnClickLink: false,\r\n hideOnClickOutside: false\r\n });\r\n}", "function blog_detail_popup() {\r\n $('.blog-detail-popup').magnificPopup({\r\n type: 'inline',\r\n mainClass: 'mfp-fade',\r\n preloader: true,\r\n gallery: {\r\n enabled: true\r\n }\r\n });\r\n }", "getPopover() {\n return jQuery(this.link).data(bootstrap.Popover.DATA_KEY);\n }", "function createPopUp() {\n\n}", "function Highpop(refpatt,id)\n{\n Popup.call(this,refpatt,id); // Call parent constructor\n\n this.revealTime = false;\n}", "function hidePopOver(){\r\n\t\t$('.popover').hide();\r\n\t}", "modalBgClick() {\n PubSub.publish('modal.bgClick');\n }", "function Plugin( option ) {\n return this.each( function() {\n var $this = $( this )\n var data = $this.data( 'bs.popover' )\n var options = typeof option == 'object' && option\n var selector = options && options.selector\n if ( !data && option == 'destroy' ) return\n if ( selector ) {\n if ( !data ) $this.data( 'bs.popover', ( data = {} ) )\n if ( !data[ selector ] ) data[ selector ] = new Popover( this, options )\n } else {\n if ( !data ) $this.data( 'bs.popover', ( data = new Popover( this, options ) ) )\n }\n if ( typeof option == 'string' ) data[ option ]()\n } )\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this);\n var data = $this.data('bs.popover');\n var options = typeof option == 'object' && option;\n\n if (!data && /destroy|hide/.test(option)) return;\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)));\n if (typeof option == 'string') data[option]()\n })\n }", "function autopop() {\n $(\"#autopop-modal\").modal('show');\n}", "displayMoreInformationPopup (item) {\n $(item).popup('show')\n }", "function ShowPopover()\n{\n $('#cover').css('display', 'block');\n popoverOpen = true;\n}", "function video_soundcloud() {\r\n $('.magnific-youtube,.magnific-vimeo,.magnific-soundcloud').magnificPopup({\r\n type: 'iframe',\r\n mainClass: 'mfp-fade',\r\n removalDelay: 300,\r\n preloader: true,\r\n fixedContentPos: false\r\n });\r\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this);\n var data = $this.data('bs.popover');\n var options = typeof option == 'object' && option;\n var selector = options && options.selector;\n\n if (!data && option == 'destroy') return;\n if (selector) {\n if (!data) $this.data('bs.popover', (data = {}));\n if (!data[selector]) data[selector] = new Popover(this, options);\n } else {\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)));\n }\n if (typeof option == 'string') data[option]();\n });\n }", "function pop_in_out(e){\n\t\t\t\t\tif($panel.is_popped_in()){\n\t\t\t\t\t\t$mainContainer.removeClass(\"lyrics_visible\");\n\t\t\t\t\t}else {\n\t\t\t\t\t\t$mainContainer.addClass(\"lyrics_visible\");\n\t\t\t\t\t}\n\t\t\t\t\t$panel.pop_in_out($panel.is_popped_in() ? '400px' : '100%', e, site);\n\t\t\t\t}", "function pop_in_out(e){\n\t\t\t\t\tif($panel.is_popped_in()){\n\t\t\t\t\t\t$mainContainer.removeClass(\"lyrics_visible\");\n\t\t\t\t\t}else {\n\t\t\t\t\t\t$mainContainer.addClass(\"lyrics_visible\");\n\t\t\t\t\t}\n\t\t\t\t\t$panel.pop_in_out($panel.is_popped_in() ? '400px' : '100%', e, site);\n\t\t\t\t}", "function init_ZIPmodal_popup() {\n let cityPopup = $('.modal-popover .data-list');\n cityPopup.scrollTop(0);\n\n cityPopup.niceScroll({\n cursorcolor: \"rgba(100, 100, 100,.2)\",\n autohidemode: false,\n bouncescroll: true,\n cursorwidth: \"4px\",\n cursorborder: \"4px\",\n grabcursorenabled: false,\n horizrailenabled: false,\n touchbehavior: true,\n preventmultitouchscrolling: false,\n cursordragontouch: true,\n railpadding: {top: 0, right: 2, left: 0, bottom: 0}, // set padding for rail bar\n });\n }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.popover')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data && /destroy|hide/.test(option)) return\n\t if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.popover')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data && /destroy|hide/.test(option)) return\n\t if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.popover')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data && /destroy|hide/.test(option)) return\n\t if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && /destroy|hide/.test(option)) return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if ( !data && option == 'destroy') return\n if ( !data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.popover')\n\t var options = typeof option == 'object' && option\n\n\t if (!data && /destroy|hide/.test(option)) return\n\t if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.popover')\n\t var options = typeof option == 'object' && option\n\n\t if (!data && /destroy|hide/.test(option)) return\n\t if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.popover')\n\t var options = typeof option == 'object' && option\n\n\t if (!data && /destroy|hide/.test(option)) return\n\t if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.popover')\n\t var options = typeof option == 'object' && option\n\n\t if (!data && /destroy|hide/.test(option)) return\n\t if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.popover')\n\t var options = typeof option == 'object' && option\n\n\t if (!data && /destroy|hide/.test(option)) return\n\t if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n var selector = options && options.selector\n\n if (!data && option == 'destroy') return\n if (selector) {\n if (!data) $this.data('bs.popover', (data = {}))\n if (!data[selector]) data[selector] = new Popover(this, options)\n } else {\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n }\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n var selector = options && options.selector\n\n if (!data && option == 'destroy') return\n if (selector) {\n if (!data) $this.data('bs.popover', (data = {}))\n if (!data[selector]) data[selector] = new Popover(this, options)\n } else {\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n }\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n var selector = options && options.selector\n\n if (!data && option == 'destroy') return\n if (selector) {\n if (!data) $this.data('bs.popover', (data = {}))\n if (!data[selector]) data[selector] = new Popover(this, options)\n } else {\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n }\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n var selector = options && options.selector\n\n if (!data && option == 'destroy') return\n if (selector) {\n if (!data) $this.data('bs.popover', (data = {}))\n if (!data[selector]) data[selector] = new Popover(this, options)\n } else {\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n }\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n var selector = options && options.selector\n\n if (!data && option == 'destroy') return\n if (selector) {\n if (!data) $this.data('bs.popover', (data = {}))\n if (!data[selector]) data[selector] = new Popover(this, options)\n } else {\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n }\n if (typeof option == 'string') data[option]()\n })\n }", "function showSharePopUp () {\r\n\r\n // Trigger share pop up since we were in last slide\r\n if ( !isSharePopUpShowing && EM.scenemanager.presentation.userInfo.isPublic ){\r\n $('.pop-container').show();\r\n isSharePopUpShowing = true;\r\n\r\n $('.rightButton').prop('disabled', true);\r\n $('.leftButton').prop('disabled', false);\r\n\r\n var scale_factor = $('#slide-box').attr('scale-factor') || ( $(window).width() / 1920);\r\n\r\n $('.wrap-pop').css('-webkit-transform', 'scale(' + scale_factor + ')');\r\n $('.wrap-pop').css('-moz-transform', 'scale(' + scale_factor + ')');\r\n $('.wrap-pop').css('-ms-transform', 'scale(' + scale_factor + ')');\r\n $('.wrap-pop').css('transform', 'scale(' + scale_factor + ')');\r\n }\r\n }", "function look_ruby_single_page_featured_popup() {\r\n $('.page-template-default .post-thumb.is-image-single a').magnificPopup({\r\n type: 'image',\r\n removalDelay: 500,\r\n mainClass: 'mfp-fade',\r\n closeOnContentClick: true,\r\n closeBtnInside: true\r\n });\r\n }", "function look_ruby_sb_widget_instagram_popup() {\r\n if ('undefined' != typeof (look_ruby_sb_instagram_popup) && 1 == look_ruby_sb_instagram_popup) {\r\n $('.instagram-content-wrap .instagram-el a').magnificPopup({\r\n type: 'image',\r\n removalDelay: 200,\r\n mainClass: 'mfp-fade',\r\n closeOnContentClick: true,\r\n closeBtnInside: true,\r\n gallery: {\r\n enabled: true,\r\n navigateByImgClick: true,\r\n preload: [0, 1]\r\n }\r\n });\r\n }\r\n }", "openPopUp(){\r\n // Hide the back panel.\r\n const element = document.getElementsByClassName(StylesPane.HideBackPanel)[0]\r\n element.className = StylesPane.BackPanel\r\n // Show the settings panel.\r\n }", "function partenza()\n{\t\n\tjQuery.support.cors = true;\n\n\t//per il tooltip (notifiche)\n\t$('.notifiche').popover({\n\t\t'html': 'true',\n 'selector': '',\n 'placement': 'bottom',\n 'title': 'Notifiche',\n 'content': '<div class=\"well well-small\">Guarda il tutorial di Local Job</div>'+\n '<div class=\"well well-small\">Aggiorna il tuo profilo per iniziare</div>',\n 'container': '.contNotifiche'\n });\n\n\t//Listen for orientation changes\n\twindow.addEventListener(\"orientationchange\", function() {\n \t\t\n \t\t//Announce the new orientation number\n \t\tif(window.orientation == 0 && (location.href).indexOf(\"home\") == -1)\n \t\t{\n \t\t\t//Non sono nella mappa, quindi non faccio niente\n \t\t\tlocation.href = 'interventi-attivi.html';\n \t\t}\n \t\tif(window.orientation == 90 && (location.href).indexOf(\"home\") == -1)\n \t\t{\n \t\t\t//orientamento verso sinistra\n \t\t\tlocation.href = 'map-landscape.html';\n \t\t}\n \t\tif(window.orientation == -90 && (location.href).indexOf(\"home\") == -1)\n \t\t{\n\t\t\t//orientamento verso destra\n \t\t\tlocation.href = 'map-landscape.html';\n \t\t}\n\t}, false);\n}", "function updateMemberPopover(idNum) {\n $(\"#mPill_\" + idNum).data('popover').options.content = \"\";\n}", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && /destroy|hide/.test(option)) return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function popItems(mode) {\n if (mpg.lightbox) {\n mpg.lightbox.dismiss();\n }\n var lb = mpg.chooser_lightbox;\n lb.pop(undefined,undefined,true);//without topline\n var fsrc = om.useMinified?\"chooser2.html\":\"chooser2d.html\"; // go to dev version from dev version\n lb.setHtml('<iframe width=\"100%\" height=\"100%\" scrolling=\"no\" id=\"chooser\" src=\"'+fsrc+'?mode='+mode+'\"/>');\n }", "function Poppy (cfg) {\n if (controller) return controller;\n\n if (browserIsNotSupported(window.navigator)) return this.fallback();\n\n cfg = cfg || {};\n this.cfg = {\n theme: cfg.theme || \"default\"\n };\n\n this.injectStyle();\n this.createOverlay();\n this.bind();\n modals = this.modals = {};\n count = 0;\n controller = this;\n return this;\n}", "function makePopupSolicitud(){ \n\n}", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.popover')\r\n var options = typeof option == 'object' && option\r\n\r\n if (!data && /destroy|hide/.test(option)) return\r\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\r\n if (typeof option == 'string') data[option]()\r\n })\r\n }", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.popover')\r\n var options = typeof option == 'object' && option\r\n\r\n if (!data && /destroy|hide/.test(option)) return\r\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\r\n if (typeof option == 'string') data[option]()\r\n })\r\n }", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.popover')\r\n var options = typeof option == 'object' && option\r\n\r\n if (!data && /destroy|hide/.test(option)) return\r\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\r\n if (typeof option == 'string') data[option]()\r\n })\r\n }", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.popover')\r\n var options = typeof option == 'object' && option\r\n\r\n if (!data && /destroy|hide/.test(option)) return\r\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\r\n if (typeof option == 'string') data[option]()\r\n })\r\n }", "function popup(msg,bak)\n{\n delay(800);\n\n var content=\"<table class=\\\"tooltip\\\"><tr><td class=\\\"tooltip\\\">\"+msg+\"</td></tr></table>\";\n\n if(old)\n {\n alert(msg);\n return;\n } \n \n yyy=Yoffset; \n skin.width=popwidth;\n\n if(nav)\n { \n skin.document.open();\n skin.document.write(content);\n skin.document.close();\n skin.visibility=\"visible\";\n }\n\n if(iex)\n { \n pup.innerHTML=content;\n skin.visibility=\"visible\";\n } \n\n if(n_6)\n { \n document.getElementById(\"pup\").innerHTML=content;\n skin.visibility=\"visible\";\n }\n}", "function notify_popup(){//called from popup window when popup window has opened!\n\t//console.log('notify_popup');\n\tif(hap_popup && hap_popup.initPopup != undefined){//dont do anything if we are not going to be able to open popup!\n\t\tif(hap_settings.autoUpdateWindowData)updatePlayerData();\n\t\n\t\tif(hap_players && hap_players[0]){\n\t\t\tif(hap_players[0].destroyPlaylist != undefined)hap_players[0].destroyPlaylist();\n\t\t}\n\t\tjQuery('#componentWrapper').css('display','none');//hide player in parent page (we cant clear html because we dont dynamically append componentWrapper html with jquery! Only if we save the player html prior to this action so we can reinstantiate it later.)\n\t\t\n\t\ttry {\n\t\t\tif(hap_popup.initPopup != undefined)hap_popup.initPopup(hap_settings);\n\t\t\tif(hap_players[0])hap_players[0].find('.popup_open').css('display','none');\n\t\t}catch(e){\n\t\t\talert('parent notify_popup error: ' + e.message);\n\t\t\treturn false;\n\t\t}\n\t}\n}" ]
[ "0.65172714", "0.6155215", "0.614206", "0.60616994", "0.6005223", "0.59905416", "0.59692305", "0.58698756", "0.58214915", "0.58214915", "0.5795073", "0.5791303", "0.5788668", "0.57536405", "0.5745262", "0.572578", "0.5721664", "0.57004213", "0.5683987", "0.5673775", "0.56450665", "0.562796", "0.56140083", "0.56118774", "0.5611822", "0.5611256", "0.5601729", "0.5596869", "0.5596869", "0.55966145", "0.55949515", "0.55949515", "0.55949515", "0.55833876", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.55724996", "0.55706817", "0.5565676", "0.5565676", "0.5565676", "0.5565676", "0.5565676", "0.5562148", "0.5562148", "0.5562148", "0.5562148", "0.5562148", "0.55405176", "0.5518634", "0.5504538", "0.54761374", "0.5474267", "0.54522055", "0.5447434", "0.5395847", "0.53904444", "0.5384788", "0.53787214", "0.53787214", "0.53787214", "0.53787214", "0.5378135", "0.5376093" ]
0.0
-1
Start of use strict
function menuzordActive () { if ($("#menuzord").length) { $("#menuzord").menuzord({ indicatorFirstLevel: '<i class="fa fa-angle-down"></i>' }); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function strictly() {\n 'use strict';\n\n}", "function strictMode() {\n 'use strict';\n\n //..\n //..\n }", "function forUseStrict() {\n \"use strict\";\n // start coding from here\n console.log(\"hello world\");\n}", "function foo() {\n \"use strict\";\n}", "function __strict(x) {return x}", "function __strict(x) {return x}", "function bar() {\n // this code is also strict mode.\n }", "transient private protected internal function m182() {}", "function nonStrictMode() {\n let x = 34;\n\n //..\n 'use strict';\n //..\n }", "transient protected internal function m189() {}", "transient private internal function m185() {}", "private public function m246() {}", "static private internal function m121() {}", "function strict() {\n for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n args[_key6] = arguments[_key6];\n }\n\n innerOk.apply(void 0, [strict, args.length].concat(args));\n}", "function strict() {\n for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n args[_key6] = arguments[_key6];\n }\n\n innerOk.apply(void 0, [strict, args.length].concat(args));\n}", "private internal function m248() {}", "static transient final private internal function m43() {}", "static final private internal function m106() {}", "transient final private protected internal function m167() {}", "static transient private protected internal function m55() {}", "static transient final protected function m44() {}", "function catTalk() {\n \"use strict\"\n\n}", "transient final protected internal function m174() {}", "function foo() {\n\t\"use strict\";\n\n\tconsole.log( this.a );\n}", "function run() {\n 'use strict';\n}", "function StupidBug() {}", "transient private protected public internal function m181() {}", "static private protected internal function m118() {}", "protected internal function m252() {}", "static transient final private protected internal function m40() {}", "static transient private protected public internal function m54() {}", "static transient final private public function m41() {}", "static transient final protected public internal function m46() {}", "function doSomething(a, b) {\n \"use strict\";\n return a * b;\n}", "static final private protected internal function m103() {}", "transient final private protected public internal function m166() {}", "function sum (x, y, z){\n \"use strict\";\n\n}", "static private protected public internal function m117() {}", "transient private public function m183() {}", "static transient private public function m56() {}", "function sum() {\n // \"use strict\"\n var number = 5;\n console.log(number);\n}", "function sum(a, a, c) { // !!! syntax error\n  'use strict';\n  return a + b + c; // wrong if this code ran\n}", "static transient final protected internal function m47() {}", "function greet() {\n 'use strict';\n console.log('hi');\n}", "function foo() {\n //\"use strict\"\n console.log(this.bar);\n}", "static final protected internal function m110() {}", "function sum (){\n //\"use strict\"\n number = 23;\n console.log(number + 1);\n}", "function hooks() {\n \"use strict\";\n}", "function strict() {\n // Function-level strict mode syntax\n 'use strict';\n function nested() { return 'And so am I!'; }\n return \"Hi! I'm a strict mode function! \" + nested();\n}", "function isUseStrict(stmt) {\n return options.ecmaVersion >= 6 && stmt.type === \"ExpressionStatement\" &&\n stmt.expression.type === \"Literal\" && stmt.expression.value === \"use strict\";\n }", "function this_in_strict() {\n log(this)\n}", "function doSomething(val) {\n \"use strict\";\n x = val + 10; // let x = val + 10;\n}", "static transient final private protected public internal function m39() {}", "static transient final private public internal function m42() {}", "function strict(value,message){if(!value)fail(value,true,message,'==',strict);}", "transient final private internal function m170() {}", "function reserved(){}", "function f() { \"use strict\"; return this;}", "function forgettingDeclaringVariablesBeforeUseingDeclaresThemOnTheGlobalObject(){\n i = 1;//ReferenceError in strict mode.\n}", "function Config() {\n \"use strict\";\n}", "function _____SHARED_functions_____(){}", "function withStrict() {\n 'use strict';\n bar = 'bar'; // throws a ReferenceError, bar not defined\n return bar;\n}", "static transient final private protected public function m38() {}", "function strictModeInsideFunction()\n{\n\t\"use strict\";\n\td = 8; // This will cause an error (d is not defined).\n\tdocument.getElementById(\"strictModeInsideFunction\").innerHTML = \"c Is \" + c + \" \" + \"d Is \" + d;\n}", "function SS() {}", "static final private public function m104() {}", "function duplicatepropertynamesinstrictmode() {\n 'use strict';\n return this === undefined && ({ a:1, a:1 }).a === 1;\n}", "function useStrictToBeginning (code) {\n if (!code.match(/['\"]use strict['\"]/)) {\n return code\n }\n return \"'use strict';\" + code\n}", "function Bare() {}", "function Bare() {}", "function Constr() {}", "function SafeStyle() { }", "function SafeStyle() { }", "function SafeStyle() { }", "function fff() {\n \"use strict\";\n console.log(this); //vrishta ni undefined\n}", "function foo(){\n 'use strict';\n var undefined = 2;\n console.log( undefined ); // 2\n}", "function SafeStyle() {}", "function SafeStyle() {}", "function SafeStyle() {}", "function SafeStyle() {}", "function SafeStyle() {}", "function Ha(){}", "function MainFunction()\n{\n 'use strict';\n\n Steps(7);\n\n}", "function teste() {\n \"use strict\"\n let testando = 'teste';\n}", "function wa(){}", "static transient protected internal function m62() {}", "allow() {\n throw new Error(\"Not implemented.\");\n }", "function isStrictModeReservedWord(id) {\n switch (id) {\n case 'implements':\n case 'interface':\n case 'package':\n case 'private':\n case 'protected':\n case 'public':\n case 'static':\n case 'yield':\n case 'let':\n return true;\n default:\n return false;\n }\n }", "function isStrictModeReservedWord(id) {\n switch (id) {\n case 'implements':\n case 'interface':\n case 'package':\n case 'private':\n case 'protected':\n case 'public':\n case 'static':\n case 'yield':\n case 'let':\n return true;\n default:\n return false;\n }\n }", "_loosyGoosy(string) {\n // let useStrictRE = /[\"']use strict[\"']\\;?/g\n return string.split('use strict').join('')\n }", "function l(data) {\n 'use strict';\n console.log(data);\n}", "function l(data) {\n 'use strict';\n console.log(data);\n}", "function TMP(){return;}", "function TMP(){return;}", "function findLongestWord(words) {\n \"use strict\";\n //...\n \n}", "function addStrict(moduleMeta) {\n console.log(\"transform '\" + moduleMeta.name + \"'\");\n moduleMeta.configure({source: \"'use strict;'\\n\" + moduleMeta.source});\n}", "function maybeDoSomething(p1, p1) {\n // \"use strict\"; // comment this back in to test;\n console.log(p1);\n return p1;\n}", "function s(){}", "function Config() {\n\t\"use strict\";\n}", "function Config() {\n\t\"use strict\";\n}", "static protected internal function m125() {}" ]
[ "0.7287052", "0.71162987", "0.6859894", "0.6771674", "0.67700136", "0.67700136", "0.66755503", "0.6630454", "0.65875006", "0.6533388", "0.6468096", "0.6466857", "0.64557034", "0.64051884", "0.64051884", "0.63961536", "0.6391159", "0.63859975", "0.63765", "0.63653886", "0.63544637", "0.633895", "0.6331143", "0.63043743", "0.6283277", "0.6278106", "0.62219715", "0.6169801", "0.6164649", "0.61521983", "0.6129886", "0.61228424", "0.61217326", "0.61160934", "0.61153936", "0.6089858", "0.6073821", "0.60714114", "0.6009954", "0.60035986", "0.6000288", "0.59947485", "0.59600335", "0.5952501", "0.59421986", "0.59379745", "0.5932602", "0.5929934", "0.59248996", "0.58823496", "0.5878004", "0.58609277", "0.5855904", "0.5814074", "0.58032155", "0.5785497", "0.5776413", "0.57646906", "0.5757287", "0.5746891", "0.57134044", "0.57059515", "0.5701412", "0.56963766", "0.5690192", "0.56901467", "0.5687728", "0.56738245", "0.5643864", "0.5643864", "0.5641385", "0.5630394", "0.5630394", "0.5630394", "0.5627229", "0.5621096", "0.5605009", "0.5605009", "0.5605009", "0.5605009", "0.5605009", "0.5599117", "0.55883855", "0.5573883", "0.5561663", "0.5558666", "0.55503535", "0.5549898", "0.5549898", "0.5539554", "0.55301774", "0.55301774", "0.5528609", "0.5528609", "0.55181396", "0.55145645", "0.55069923", "0.54971564", "0.5492689", "0.5492689", "0.5483077" ]
0.0
-1
Demo Scripts for Bootstrap Carousel and Animate.css article on SitePoint by Maria Antonietta Perna Function to animate slider captions
function doAnimations(elems) { //Cache the animationend event in a variable var animEndEv = 'webkitAnimationEnd animationend'; elems.each(function() { var $this = $(this), $animationType = $this.data('animation'); $this.addClass($animationType).one(animEndEv, function() { $this.removeClass($animationType); }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mhome_slider() {\n //Function to animate slider captions \n function doAnimations(elems) {\n //Cache the animationend event in a variable\n var animEndEv = 'webkitAnimationEnd animationend';\n elems.each(function() {\n var $this = $(this),\n $animationType = $this.data('animation');\n $this.addClass($animationType).one(animEndEv, function() {\n $this.removeClass($animationType);\n });\n });\n }\n //Variables on page load \n var $myCarousel = $('#sg-carousel'),\n $firstAnimatingElems = $myCarousel.find('.item:first').find(\"[data-animation ^= 'animated']\");\n //Initialize carousel \n $myCarousel.carousel();\n //Animate captions in first slide on page load \n doAnimations($firstAnimatingElems);\n //Pause carousel \n $myCarousel.carousel('pause');\n //Other slides to be animated on carousel slide event \n $myCarousel.on('slide.bs.carousel', function(e) {\n var $animatingElems = $(e.relatedTarget).find(\"[data-animation ^= 'animated']\");\n doAnimations($animatingElems);\n });\n }", "function animateTheCaptions(nextli, opt, actli) {\n\n\n //if (jQuery(\"body\").find('#debug').length==0)\n //\t\tjQuery(\"body\").append('<div id=\"debug\" style=\"background:#000;z-index:1000;position:fixed;top:5px;left:5px;width:100px;height:500px;color:#fff;font-size:10px;font-family:Arial;\"</div>');\n\n\n var offsetx = 0;\n var offsety = 0;\n\n nextli.find('.tp-caption').each(function(i) {\n\n offsetx = opt.width / 2 - opt.startwidth / 2;\n\n\n\n if (opt.bh > 1) {\n opt.bw = 1;\n opt.bh = 1;\n }\n\n if (opt.bw > 1) {\n opt.bw = 1;\n opt.bh = 1;\n }\n\n var xbw = opt.bw;\n var xbh = opt.bh;\n\n\n if (opt.fullScreen == \"on\")\n offsety = opt.height / 2 - (opt.startheight * opt.bh) / 2;\n\n if (offsety < 0)\n offsety = 0;\n\n\n\n var nextcaption = nextli.find('.tp-caption:eq(' + i + ')');\n\n var handlecaption = 0;\n\n // HIDE CAPTION IF RESOLUTION IS TOO LOW\n if (opt.width < opt.hideCaptionAtLimit && nextcaption.data('captionhidden') == \"on\") {\n nextcaption.addClass(\"tp-hidden-caption\")\n handlecaption = 1;\n } else {\n if (opt.width < opt.hideAllCaptionAtLilmit) {\n nextcaption.addClass(\"tp-hidden-caption\")\n handlecaption = 1;\n } else {\n nextcaption.removeClass(\"tp-hidden-caption\")\n }\n }\n\n\n\n\n nextcaption.stop(true, true);\n if (handlecaption == 0) {\n if (nextcaption.data('linktoslide') != undefined) {\n nextcaption.css({'cursor': 'pointer'});\n if (nextcaption.data('linktoslide') != \"no\") {\n nextcaption.click(function() {\n var nextcaption = jQuery(this);\n var dir = nextcaption.data('linktoslide');\n if (dir != \"next\" && dir != \"prev\") {\n opt.container.data('showus', dir);\n opt.container.parent().find('.tp-rightarrow').click();\n } else\n if (dir == \"next\")\n opt.container.parent().find('.tp-rightarrow').click();\n else\n if (dir == \"prev\")\n opt.container.parent().find('.tp-leftarrow').click();\n });\n }\n }\n\n\n if (nextcaption.hasClass(\"coloredbg\"))\n offsetx = 0;\n if (offsetx < 0)\n offsetx = 0;\n\n //var offsety = 0; //opt.height/2 - (opt.startheight*xbh)/2;\n\n clearTimeout(nextcaption.data('timer'));\n clearTimeout(nextcaption.data('timer-end'));\n\n\n\n // YOUTUBE AND VIMEO LISTENRES INITIALISATION\n\n var frameID = \"iframe\" + Math.round(Math.random() * 1000 + 1);\n\n if (nextcaption.find('iframe').length > 0) {\n\n nextcaption.find('iframe').each(function() {\n var ifr = jQuery(this);\n\n if (ifr.attr('src').toLowerCase().indexOf('youtube') >= 0) {\n opt.nextslideatend = nextcaption.data('nextslideatend');\n if (!ifr.hasClass(\"HasListener\")) {\n try {\n ifr.attr('id', frameID);\n\n var player;\n if (nextcaption.data('autoplay') == true)\n player = new YT.Player(frameID, {\n events: {\n \"onStateChange\": onPlayerStateChange,\n 'onReady': onPlayerReady\n }\n });\n else\n player = new YT.Player(frameID, {\n events: {\n \"onStateChange\": onPlayerStateChange\n }\n });\n ifr.addClass(\"HasListener\");\n\n nextcaption.data('player', player);\n\n if (nextcaption.data('autoplay') == true) {\n var bt = jQuery('body').find('#' + opt.container.attr('id')).find('.tp-bannertimer');\n setTimeout(function() {\n bt.stop();\n opt.videoplaying = true;\n }, 200);\n\n\n //console.log(\"VideoPlay set to True due youtube 1st load AutoPlay\");\n }\n } catch (e) {\n }\n } else {\n if (nextcaption.data('autoplay') == true) {\n\n\n var player = nextcaption.data('player');\n player.playVideo();\n var bt = jQuery('body').find('#' + opt.container.attr('id')).find('.tp-bannertimer');\n setTimeout(function() {\n bt.stop();\n opt.videoplaying = true;\n }, 200);\n\n\n //console.log(\"VideoPlay set to True due youtube 2nd load AutoPlay\");\n }\n }\n\n } else {\n if (ifr.attr('src').toLowerCase().indexOf('vimeo') >= 0) {\n opt.nextslideatend = nextcaption.data('nextslideatend');\n if (!ifr.hasClass(\"HasListener\")) {\n ifr.addClass(\"HasListener\");\n ifr.attr('id', frameID);\n var isrc = ifr.attr('src');\n var queryParameters = {}, queryString = isrc,\n re = /([^&=]+)=([^&]*)/g, m;\n // Creates a map with the query string parameters\n while (m = re.exec(queryString)) {\n queryParameters[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);\n }\n\n\n if (queryParameters['player_id'] != undefined) {\n\n isrc = isrc.replace(queryParameters['player_id'], frameID);\n } else {\n isrc = isrc + \"&player_id=\" + frameID;\n }\n\n try {\n isrc = isrc.replace('api=0', 'api=1');\n } catch (e) {\n }\n\n isrc = isrc + \"&api=1\";\n\n\n\n ifr.attr('src', isrc);\n var player = nextcaption.find('iframe')[0];\n if (nextcaption.data('autoplay') == true) {\n\n $f(player).addEvent('ready', vimeoready_auto);\n var bt = jQuery('body').find('#' + opt.container.attr('id')).find('.tp-bannertimer');\n setTimeout(function() {\n bt.stop();\n opt.videoplaying = true;\n }, 200);\n\n\n //console.log(\"VideoPlay set to True due vimeo 1st load AutoPlay\");\n } else {\n $f(player).addEvent('ready', vimeoready);\n }\n\n\n } else {\n if (nextcaption.data('autoplay') == true) {\n\n var ifr = nextcaption.find('iframe');\n var id = ifr.attr('id');\n var froogaloop = $f(id);\n froogaloop.api(\"pause\");\n var bt = jQuery('body').find('#' + opt.container.attr('id')).find('.tp-bannertimer');\n setTimeout(function() {\n bt.stop();\n opt.videoplaying = true;\n }, 200);\n\n\n //console.log(\"VideoPlay set to True due youtube 2nd load AutoPlay\");\n }\n }\n\n }\n }\n });\n }\n\n // IF HTML5 VIDEO IS EMBEDED\n if (nextcaption.find('video').length > 0) {\n nextcaption.find('video').each(function(i) {\n var html5vid = jQuery(this).parent();\n\n if (html5vid.hasClass(\"video-js\")) {\n opt.nextslideatend = nextcaption.data('nextslideatend');\n if (!html5vid.hasClass(\"HasListener\")) {\n html5vid.addClass(\"HasListener\");\n var videoID = \"videoid_\" + Math.round(Math.random() * 1000 + 1);\n html5vid.attr('id', videoID);\n videojs(videoID).ready(function() {\n html5vidready(this)\n });\n } else {\n videoID = html5vid.attr('id');\n }\n if (nextcaption.data('autoplay') == true) {\n\n var bt = jQuery('body').find('#' + opt.container.attr('id')).find('.tp-bannertimer');\n setTimeout(function() {\n bt.stop();\n opt.videoplaying = true;\n }, 200);\n\n //console.log(\"VideoPlay set to True due HTML5 VIDEO 1st/2nd load AutoPlay\");\n\n videojs(videoID).ready(function() {\n var myPlayer = this;\n html5vid.data('timerplay', setTimeout(function() {\n myPlayer.play();\n }, nextcaption.data('start')));\n });\n }\n\n\n if (html5vid.data('ww') == undefined)\n html5vid.data('ww', html5vid.width());\n if (html5vid.data('hh') == undefined)\n html5vid.data('hh', html5vid.height());\n\n videojs(videoID).ready(function() {\n if (!nextcaption.hasClass(\"fullscreenvideo\")) {\n var myPlayer = videojs(videoID);\n\n try {\n myPlayer.width(html5vid.data('ww') * opt.bw);\n myPlayer.height(html5vid.data('hh') * opt.bh);\n } catch (e) {\n }\n }\n });\n\n\n }\n\n });\n } // END OF VIDEO JS FUNCTIONS\n\n\n\n if (nextcaption.hasClass(\"randomrotate\") && (opt.ie || opt.ie9))\n nextcaption.removeClass(\"randomrotate\").addClass(\"sfb\");\n nextcaption.removeClass('noFilterClass');\n\n\n\n var imw = 0;\n var imh = 0;\n\n if (nextcaption.find('img').length > 0) {\n var im = nextcaption.find('img');\n if (im.data('ww') == undefined)\n im.data('ww', im.width());\n if (im.data('hh') == undefined)\n im.data('hh', im.height());\n\n var ww = im.data('ww');\n var hh = im.data('hh');\n\n\n im.width(ww * opt.bw);\n im.height(hh * opt.bh);\n imw = im.width();\n imh = im.height();\n } else {\n\n if (nextcaption.find('iframe').length > 0) {\n\n var im = nextcaption.find('iframe');\n if (nextcaption.data('ww') == undefined) {\n nextcaption.data('ww', im.width());\n }\n if (nextcaption.data('hh') == undefined)\n nextcaption.data('hh', im.height());\n\n var ww = nextcaption.data('ww');\n var hh = nextcaption.data('hh');\n\n var nc = nextcaption;\n if (nc.data('fsize') == undefined)\n nc.data('fsize', parseInt(nc.css('font-size'), 0) || 0);\n if (nc.data('pt') == undefined)\n nc.data('pt', parseInt(nc.css('paddingTop'), 0) || 0);\n if (nc.data('pb') == undefined)\n nc.data('pb', parseInt(nc.css('paddingBottom'), 0) || 0);\n if (nc.data('pl') == undefined)\n nc.data('pl', parseInt(nc.css('paddingLeft'), 0) || 0);\n if (nc.data('pr') == undefined)\n nc.data('pr', parseInt(nc.css('paddingRight'), 0) || 0);\n\n if (nc.data('mt') == undefined)\n nc.data('mt', parseInt(nc.css('marginTop'), 0) || 0);\n if (nc.data('mb') == undefined)\n nc.data('mb', parseInt(nc.css('marginBottom'), 0) || 0);\n if (nc.data('ml') == undefined)\n nc.data('ml', parseInt(nc.css('marginLeft'), 0) || 0);\n if (nc.data('mr') == undefined)\n nc.data('mr', parseInt(nc.css('marginRight'), 0) || 0);\n\n if (nc.data('bt') == undefined)\n nc.data('bt', parseInt(nc.css('borderTop'), 0) || 0);\n if (nc.data('bb') == undefined)\n nc.data('bb', parseInt(nc.css('borderBottom'), 0) || 0);\n if (nc.data('bl') == undefined)\n nc.data('bl', parseInt(nc.css('borderLeft'), 0) || 0);\n if (nc.data('br') == undefined)\n nc.data('br', parseInt(nc.css('borderRight'), 0) || 0);\n\n if (nc.data('lh') == undefined)\n nc.data('lh', parseInt(nc.css('lineHeight'), 0) || 0);\n\n var fvwidth = opt.width;\n var fvheight = opt.height;\n if (fvwidth > opt.startwidth)\n fvwidth = opt.startwidth;\n if (fvheight > opt.startheight)\n fvheight = opt.startheight;\n\n if (!nextcaption.hasClass('fullscreenvideo'))\n nextcaption.css({\n 'font-size': (nc.data('fsize') * opt.bw) + \"px\",\n 'padding-top': (nc.data('pt') * opt.bh) + \"px\",\n 'padding-bottom': (nc.data('pb') * opt.bh) + \"px\",\n 'padding-left': (nc.data('pl') * opt.bw) + \"px\",\n 'padding-right': (nc.data('pr') * opt.bw) + \"px\",\n 'margin-top': (nc.data('mt') * opt.bh) + \"px\",\n 'margin-bottom': (nc.data('mb') * opt.bh) + \"px\",\n 'margin-left': (nc.data('ml') * opt.bw) + \"px\",\n 'margin-right': (nc.data('mr') * opt.bw) + \"px\",\n 'border-top': (nc.data('bt') * opt.bh) + \"px\",\n 'border-bottom': (nc.data('bb') * opt.bh) + \"px\",\n 'border-left': (nc.data('bl') * opt.bw) + \"px\",\n 'border-right': (nc.data('br') * opt.bw) + \"px\",\n 'line-height': (nc.data('lh') * opt.bh) + \"px\",\n 'height': (hh * opt.bh) + 'px',\n 'white-space': \"nowrap\"\n });\n else\n nextcaption.css({\n 'width': opt.startwidth * opt.bw,\n 'height': opt.startheight * opt.bh\n });\n\n\n im.width(ww * opt.bw);\n im.height(hh * opt.bh);\n imw = im.width();\n imh = im.height();\n } else {\n\n\n nextcaption.find('.tp-resizeme, .tp-resizeme *').each(function() {\n calcCaptionResponsive(jQuery(this), opt);\n });\n\n calcCaptionResponsive(nextcaption, opt);\n\n imh = nextcaption.outerHeight(true);\n imw = nextcaption.outerWidth(true);\n\n // NEXTCAPTION FRONTCORNER CHANGES\n var ncch = nextcaption.outerHeight();\n var bgcol = nextcaption.css('backgroundColor');\n nextcaption.find('.frontcorner').css({\n 'borderWidth': ncch + \"px\",\n 'left': (0 - ncch) + 'px',\n 'borderRight': '0px solid transparent',\n 'borderTopColor': bgcol\n });\n\n nextcaption.find('.frontcornertop').css({\n 'borderWidth': ncch + \"px\",\n 'left': (0 - ncch) + 'px',\n 'borderRight': '0px solid transparent',\n 'borderBottomColor': bgcol\n });\n\n // NEXTCAPTION BACKCORNER CHANGES\n nextcaption.find('.backcorner').css({\n 'borderWidth': ncch + \"px\",\n 'right': (0 - ncch) + 'px',\n 'borderLeft': '0px solid transparent',\n 'borderBottomColor': bgcol\n });\n\n // NEXTCAPTION BACKCORNER CHANGES\n nextcaption.find('.backcornertop').css({\n 'borderWidth': ncch + \"px\",\n 'right': (0 - ncch) + 'px',\n 'borderLeft': '0px solid transparent',\n 'borderTopColor': bgcol\n });\n\n }\n }\n\n if (nextcaption.data('voffset') == undefined)\n nextcaption.data('voffset', 0);\n if (nextcaption.data('hoffset') == undefined)\n nextcaption.data('hoffset', 0);\n\n var vofs = nextcaption.data('voffset') * xbw;\n var hofs = nextcaption.data('hoffset') * xbw;\n\n var crw = opt.startwidth * xbw;\n var crh = opt.startheight * xbw;\n\n\n // CENTER THE CAPTION HORIZONTALLY\n if (nextcaption.data('x') == \"center\" || nextcaption.data('xcenter') == 'center') {\n nextcaption.data('xcenter', 'center');\n nextcaption.data('x', (crw / 2 - nextcaption.outerWidth(true) / 2) / xbw + hofs);\n\n }\n\n // ALIGN LEFT THE CAPTION HORIZONTALLY\n if (nextcaption.data('x') == \"left\" || nextcaption.data('xleft') == 'left') {\n nextcaption.data('xleft', 'left');\n nextcaption.data('x', (0) / xbw + hofs);\n\n }\n\n // ALIGN RIGHT THE CAPTION HORIZONTALLY\n if (nextcaption.data('x') == \"right\" || nextcaption.data('xright') == 'right') {\n nextcaption.data('xright', 'right');\n nextcaption.data('x', ((crw - nextcaption.outerWidth(true)) + hofs) / xbw);\n //console.log(\"crw:\"+crw+\" width:\"+nextcaption.outerWidth(true)+\" xbw:\"+xbw);\n //console.log(\"x-pos:\"+nextcaption.data('x'))\n }\n\n\n // CENTER THE CAPTION VERTICALLY\n if (nextcaption.data('y') == \"center\" || nextcaption.data('ycenter') == 'center') {\n nextcaption.data('ycenter', 'center');\n nextcaption.data('y', (crh / 2 - nextcaption.outerHeight(true) / 2) / opt.bh + vofs);\n\n }\n\n // ALIGN TOP THE CAPTION VERTICALLY\n if (nextcaption.data('y') == \"top\" || nextcaption.data('ytop') == 'top') {\n nextcaption.data('ytop', 'top');\n nextcaption.data('y', (0) / opt.bh + vofs);\n\n }\n\n // ALIGN BOTTOM THE CAPTION VERTICALLY\n if (nextcaption.data('y') == \"bottom\" || nextcaption.data('ybottom') == 'bottom') {\n nextcaption.data('ybottom', 'bottom');\n nextcaption.data('y', ((crh - nextcaption.outerHeight(true)) + vofs) / xbw);\n }\n\n\n if (nextcaption.hasClass('fade')) {\n\n nextcaption.css({'opacity': 0, 'left': (xbw * nextcaption.data('x') + offsetx) + 'px', 'top': (opt.bh * nextcaption.data('y') + offsety) + \"px\"});\n }\n\n if (nextcaption.hasClass(\"randomrotate\")) {\n\n nextcaption.css({'left': (xbw * nextcaption.data('x') + offsetx) + 'px', 'top': ((xbh * nextcaption.data('y')) + offsety) + \"px\"});\n var sc = Math.random() * 2 + 1;\n var ro = Math.round(Math.random() * 200 - 100);\n var xx = Math.round(Math.random() * 200 - 100);\n var yy = Math.round(Math.random() * 200 - 100);\n nextcaption.data('repx', xx);\n nextcaption.data('repy', yy);\n nextcaption.data('repo', nextcaption.css('opacity'));\n nextcaption.data('rotate', ro);\n nextcaption.data('scale', sc);\n\n nextcaption.transition({opacity: 0, scale: sc, rotate: ro, x: xx, y: yy, duration: '0ms'});\n } else {\n if (opt.ie || opt.ie9)\n {\n }\n else {\n if (nextcaption.find('iframe').length == 0)\n nextcaption.transition({scale: 1, rotate: 0});\n }\n }\n\n if (nextcaption.hasClass('lfr')) {\n\n nextcaption.css({'opacity': 1, 'left': (15 + opt.width) + 'px', 'top': (opt.bh * nextcaption.data('y') + offsety) + \"px\"});\n\n }\n\n if (nextcaption.hasClass('lfl')) {\n\n nextcaption.css({'opacity': 1, 'left': (-15 - imw) + 'px', 'top': (opt.bh * nextcaption.data('y') + offsety) + \"px\"});\n\n }\n\n if (nextcaption.hasClass('sfl')) {\n\n nextcaption.css({'opacity': 0, 'left': ((xbw * nextcaption.data('x')) - 50 + offsetx) + 'px', 'top': (opt.bh * nextcaption.data('y') + offsety) + \"px\"});\n }\n\n if (nextcaption.hasClass('sfr')) {\n nextcaption.css({'opacity': 0, 'left': ((xbw * nextcaption.data('x')) + 50 + offsetx) + 'px', 'top': (opt.bh * nextcaption.data('y') + offsety) + \"px\"});\n }\n\n\n\n\n if (nextcaption.hasClass('lft')) {\n\n nextcaption.css({'opacity': 1, 'left': (xbw * nextcaption.data('x') + offsetx) + 'px', 'top': (-25 - imh) + \"px\"});\n\n }\n\n if (nextcaption.hasClass('lfb')) {\n nextcaption.css({'opacity': 1, 'left': (xbw * nextcaption.data('x') + offsetx) + 'px', 'top': (25 + opt.height) + \"px\"});\n\n }\n\n if (nextcaption.hasClass('sft')) {\n nextcaption.css({'opacity': 0, 'left': (xbw * nextcaption.data('x') + offsetx) + 'px', 'top': ((opt.bh * nextcaption.data('y') + offsety) - 50) + \"px\"});\n }\n\n if (nextcaption.hasClass('sfb')) {\n nextcaption.css({'opacity': 0, 'left': (xbw * nextcaption.data('x') + offsetx) + 'px', 'top': ((opt.bh * nextcaption.data('y') + offsety) + 50) + \"px\"});\n }\n\n\n\n\n nextcaption.data('timer', setTimeout(function() {\n var easetype = nextcaption.data('easing');\n if (easetype == undefined)\n easetype = \"linear\";\n\n nextcaption.css({'visibility': 'visible'});\n if (nextcaption.hasClass('fade')) {\n nextcaption.data('repo', nextcaption.css('opacity'));\n\n //nextcaption.animate({'opacity':1},{duration:nextcaption.data('speed'),complete:function() { if (opt.ie) jQuery(this).addClass('noFilterClass');}});\n nextcaption.transition({'opacity': 1, duration: nextcaption.data('speed')});\n //if (opt.ie) nextcaption.addClass('noFilterClass');\n }\n\n if (nextcaption.hasClass(\"randomrotate\")) {\n\n easetype = easetype.replace('Elastic', 'Back');\n easetype = easetype.replace('Bounce', 'Back');\n nextcaption.transition({opacity: 1, scale: 1, 'left': (xbw * nextcaption.data('x') + offsetx) + 'px', 'top': (xbh * (nextcaption.data('y')) + offsety) + \"px\", rotate: 0, x: 0, y: 0, duration: nextcaption.data('speed'), easing: easetype});\n if (opt.ie)\n nextcaption.addClass('noFilterClass');\n }\n\n if (nextcaption.hasClass('lfr') ||\n nextcaption.hasClass('lfl') ||\n nextcaption.hasClass('sfr') ||\n nextcaption.hasClass('sfl') ||\n nextcaption.hasClass('lft') ||\n nextcaption.hasClass('lfb') ||\n nextcaption.hasClass('sft') ||\n nextcaption.hasClass('sfb')\n )\n {\n\n nextcaption.data('repx', nextcaption.position().left);\n nextcaption.data('repy', nextcaption.position().top);\n\n nextcaption.data('repo', nextcaption.css('opacity'));\n if (easetype.indexOf(\"Bounce\") >= 0 || easetype.indexOf(\"Elastic\") >= 0)\n nextcaption.animate({'opacity': 1, 'left': (xbw * nextcaption.data('x') + offsetx) + 'px', 'top': opt.bh * (nextcaption.data('y')) + offsety + \"px\"}, {duration: nextcaption.data('speed'), easing: easetype, complete: function() {\n if (opt.ie)\n jQuery(this).addClass('noFilterClass');\n }});\n else\n nextcaption.transition({'opacity': 1, 'left': (xbw * nextcaption.data('x') + offsetx) + 'px', 'top': opt.bh * (nextcaption.data('y')) + offsety + \"px\", duration: nextcaption.data('speed'), easing: easetype});\n //if (opt.ie) nextcaption.addClass('noFilterClass');\n }\n }, nextcaption.data('start')));\n\n\n // IF THERE IS ANY EXIT ANIM DEFINED\n if (nextcaption.data('end') != undefined)\n nextcaption.data('timer-end', setTimeout(function() {\n\n if ((opt.ie || opt.ie9) && (nextcaption.hasClass(\"randomrotate\") || nextcaption.hasClass(\"randomrotateout\"))) {\n nextcaption.removeClass(\"randomrotate\").removeClass(\"randomrotateout\").addClass('fadeout');\n }\n\n endMoveCaption(nextcaption, opt);\n\n }, nextcaption.data('end')));\n }\n })\n\n var bt = jQuery('body').find('#' + opt.container.attr('id')).find('.tp-bannertimer');\n bt.data('opt', opt);\n }", "function carouselTextSlide() {\n var $contentCarouselItemCategory = $('.content__carousel-item-category');\n var $contentCarouselItemTitle = $('.content__carousel-item-title');\n var $contentCarouselItemSubtitle = $('.content__carousel-item-subtitle');\n var $contentCarouselItemDetails = $('.content__carousel-item-details');\n\n setTimeout(function(){\n $contentCarouselItemCategory.addClass('animated slideInLeft d-block');\n $contentCarouselItemTitle.addClass('animated slideInLeft d-block');\n }, 400);\n setTimeout(function(){\n $contentCarouselItemSubtitle.addClass('animated slideInLeft d-block');\n $contentCarouselItemDetails.addClass('animated fadeIn d-block');\n }, 700);\n }", "function OsSlider() {\r\n $(\".slider\").each(function () {\r\n\r\n var option = {\r\n autoplay: !($(this).hasClass('no-autoplay')),\r\n fade: !$(this).hasClass('slide'),\r\n speed: $(this).data('animation-speed') || 400,\r\n dots: $(this).hasClass('control-nav'),\r\n arrows: ($(this).hasClass('direction-nav') ? true : false),\r\n autoplaySpeed: $(this).data('autoplay-speed') || 5000,\r\n adaptiveHeight: ($(this).hasClass('auto-height') ? true : false),\r\n swipeToSlide: ($(this).hasClass('swipe-to-slide') ? true : false),\r\n infinite: ($(this).hasClass('no-loop') ? false : true)\r\n };\r\n\r\n if ($(this).data('item-width')) {\r\n var CarouselBaseWidth = parseInt($(this).data('item-width'), 10);\r\n option.respondTo = 'slider';\r\n if ($(this).hasClass('slide-all')) {\r\n option.responsive = OsCarouselResponsiveCalculator(CarouselBaseWidth, true);\r\n }\r\n\r\n else {\r\n option.responsive = OsCarouselResponsiveCalculator(CarouselBaseWidth);\r\n }\r\n }\r\n\r\n if ($(this).hasClass(\"caption-slider\")) {\r\n //on start\r\n $(this).on('init', function (event, slick) {\r\n OsSliderCaptionInit($(this));\r\n OsSliderCaptionShow($(this));\r\n });\r\n\r\n //on before slide\r\n $(this).on('beforeChange', function (event, slick, currentSlide, nextSlide) {\r\n OsSliderCaptionHide($(this));\r\n });\r\n //on after slide done\r\n $(this).on('afterChange', function (event, slick, currentSlide) {\r\n OsSliderCaptionShow($(this));\r\n });\r\n }\r\n\r\n $(this).slick(option);\r\n\r\n //Caption slider support function\r\n function OsSliderCaptionInit(container) {\r\n var $sliderElement = container.find('.caption');\r\n $sliderElement.each(function () {\r\n var $captionAnimation = $(this);\r\n var animationDuration = \"1000ms\";\r\n\r\n if ($(this).data(\"animation-duration\")) {\r\n animationDuration = $(this).data(\"animation-duration\") + \"ms\";\r\n }\r\n\r\n $(this).css(\"animation-duration\", animationDuration);\r\n $captionAnimation.addClass('caption-hide');\r\n });\r\n }\r\n\r\n function OsSliderCaptionShow(container) {\r\n var $sliderElement = container.find('.slick-active .caption');\r\n $sliderElement.each(function (index) {\r\n var $captionAnimation = $(this);\r\n var delayTime = $(this).data(\"caption-delay\") || (index * 350 + 400);\r\n var captionAnimationData = $captionAnimation.data('caption-animation') || \"fadeInUp\";\r\n setTimeout(function () {\r\n $captionAnimation.removeClass('caption-hide').addClass(captionAnimationData);\r\n }, delayTime);\r\n });\r\n }\r\n\r\n function OsSliderCaptionHide(container) {\r\n var $sliderElement = container.find('.slick-active .caption');\r\n $sliderElement.each(function () {\r\n var $captionAnimation = $(this);\r\n var captionAnimationData = $captionAnimation.data('caption-animation') || \"fadeInUp\";\r\n $captionAnimation.removeClass(captionAnimationData).addClass('caption-hide');\r\n });\r\n }\r\n });\r\n\r\n /**\r\n * Calculator for support OsSlider\r\n * @param CarouselBaseWidth\r\n * @returns {Array}\r\n * @constructor\r\n */\r\n function OsCarouselResponsiveCalculator(CarouselBaseWidth, slideAll) {\r\n\r\n var CarouselMaxWidth = 1920;\r\n var CarouselNumberBreakppoint = Math.floor(CarouselMaxWidth / CarouselBaseWidth);\r\n var CarouselBreakpoint = [];\r\n for (var i = 1; i < CarouselNumberBreakppoint + 1; i++) {\r\n CarouselBreakpoint.push({\r\n breakpoint: CarouselBaseWidth * i,\r\n settings: {\r\n slidesToShow: i,\r\n slidesToScroll: ((slideAll === true) ? i : 1)\r\n }\r\n });\r\n }\r\n CarouselBreakpoint.push({\r\n breakpoint: 9999,\r\n settings: {\r\n slidesToShow: CarouselNumberBreakppoint + 1,\r\n slidesToScroll: ((slideAll === true) ? i : 1)\r\n }\r\n });\r\n return CarouselBreakpoint;\r\n }\r\n }", "function showCaption(){\n\n\tvar childInFocus = $('div#carousel').data('roundabout').childInFocus;\n\tvar setCaption = $('.carousel_data .carousel_item .caption:eq('+childInFocus+')').html();\n $('#captions').html(setCaption);\n var newHeight = $('#captions').height()+'px';\n $('.caption_container').animate({'height':newHeight},500, function(){\n $('#captions').animate({'opacity':1},250);\n\n });\n\n}", "function animateTheCaptions(nextli, opt,recalled) {\n\n\t\t\t\t\t\tvar offsetx=0;\n\t\t\t\t\t\tvar offsety=0;\n\n\t\t\t\t\t\tnextli.find('.tp-caption').each(function(i) {\n\n\n\t\t\t\t\t\t\t\toffsetx = opt.width/2 - (opt.startwidth*opt.bw)/2;\n\n\n\n\t\t\t\t\t\t\t\tvar xbw = opt.bw;\n\t\t\t\t\t\t\t\tvar xbh = opt.bh;\n\n\n\t\t\t\t\t\t\t\tif (opt.fullScreen==\"on\")\n\t\t\t\t\t\t\t\t\t offsety = opt.height/2 - (opt.startheight*opt.bh)/2;\n\n\t\t\t\t\t\t\t\tif (opt.autoHeight==\"on\")\n\t\t\t\t\t\t\t\t\t offsety = opt.container.height()/2 - (opt.startheight*opt.bh)/2;;\n\n\t\t\t\t\t\t\t\tif (offsety<0) offsety=0;\n\n\t\t\t\t\t\t\t\tvar nextcaption=jQuery(this);//nextli.find('.tp-caption:eq('+i+')');\n\n\t\t\t\t\t\t\t\tvar handlecaption=0;\n\n\t\t\t\t\t\t\t\t// HIDE CAPTION IF RESOLUTION IS TOO LOW\n\t\t\t\t\t\t\t\tif (opt.width<opt.hideCaptionAtLimit && nextcaption.data('captionhidden')==\"on\") {\n\t\t\t\t\t\t\t\t\tnextcaption.addClass(\"tp-hidden-caption\")\n\t\t\t\t\t\t\t\t\thandlecaption=1;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif (opt.width<opt.hideAllCaptionAtLimit || opt.width<opt.hideAllCaptionAtLilmit)\t{\n\t\t\t\t\t\t\t\t\t\tnextcaption.addClass(\"tp-hidden-caption\")\n\t\t\t\t\t\t\t\t\t\thandlecaption=1;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tnextcaption.removeClass(\"tp-hidden-caption\")\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\tif (handlecaption==0) {\n\n\t\t\t\t\t\t\t\t\t// ADD A CLICK LISTENER TO THE CAPTION\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('linktoslide')!=undefined && !nextcaption.hasClass(\"hasclicklistener\")) {\n\t\t\t\t\t\t\t\t\t\tnextcaption.addClass(\"hasclicklistener\")\n\t\t\t\t\t\t\t\t\t\tnextcaption.css({'cursor':'pointer'});\n\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('linktoslide')!=\"no\") {\n\t\t\t\t\t\t\t\t\t\t\tnextcaption.click(function() {\n\t\t\t\t\t\t\t\t\t\t\t\tvar nextcaption=jQuery(this);\n\t\t\t\t\t\t\t\t\t\t\t\tvar dir = nextcaption.data('linktoslide');\n\t\t\t\t\t\t\t\t\t\t\t\tif (dir!=\"next\" && dir!=\"prev\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.data('showus',dir);\n\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.parent().find('.tp-rightarrow').click();\n\t\t\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (dir==\"next\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.parent().find('.tp-rightarrow').click();\n\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (dir==\"prev\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.parent().find('.tp-leftarrow').click();\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}// END OF CLICK LISTENER\n\n\n\t\t\t\t\t\t\t\t\tif (offsetx<0) offsetx=0;\n\n\n\t\t\t\t\t\t\t\t\t// YOUTUBE AND VIMEO LISTENRES INITIALISATION\n\n\t\t\t\t\t\t\t\t\tvar frameID = \"iframe\"+Math.round(Math.random()*1000+1);\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.find('iframe').length>0 || nextcaption.find('video').length>0) {\n\n\n\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplayonlyfirsttime') == true || nextcaption.data('autoplayonlyfirsttime')==\"true\" ) {\n\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('autoplay',true);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tnextcaption.find('iframe').each(function() {\n\t\t\t\t\t\t\t\t\t\t\t\tvar ifr=jQuery(this);\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (is_mobile()) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar oldsrc = ifr.attr('src');\n\t\t\t\t\t\t\t\t\t\t\t\t\tifr.attr('src',\"\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tifr.attr('src',oldsrc);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t// START YOUTUBE HANDLING\n\t\t\t\t\t\t\t\t\t\t\t\topt.nextslideatend = nextcaption.data('nextslideatend');\n\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('thumbimage')!=undefined && nextcaption.data('thumbimage').length>2 && nextcaption.data('autoplay')!=true && !recalled) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.tp-thumb-image').remove();\n\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.append('<div class=\"tp-thumb-image\" style=\"cursor:pointer; position:absolute;top:0px;left:0px;width:100%;height:100%;background-image:url('+nextcaption.data('thumbimage')+'); background-size:cover\"></div>');\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (ifr.attr('src').toLowerCase().indexOf('youtube')>=0) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t//\tif (is_mobile()) ifr.attr('src',ifr.attr('src').replace(\"enablejsapi=1\",\"\"));\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (!ifr.hasClass(\"HasListener\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.attr('id',frameID);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar player;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar ytint = setInterval(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (YT !=undefined)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (typeof YT.Player != undefined && typeof YT.Player !=\"undefined\") {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer = new YT.Player(frameID, {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tevents: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"onStateChange\": onPlayerStateChange,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'onReady': function(event) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tevent.target.playVideo();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer = new YT.Player(frameID, {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tevents: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"onStateChange\": onPlayerStateChange\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.addClass(\"HasListener\");\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('player',player);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclearInterval(ytint);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t, 100)\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} catch(e) {}\n\t\t\t\t\t\t\t\t\t\t\t\t\t } else {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar player=nextcaption.data('player');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('timerplay',setTimeout(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('forcerewind')==\"on\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer.seekTo(0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer.playVideo();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},nextcaption.data('start')));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t } // END YOUTUBE HANDLING\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t // PLAY VIDEO IF THUMBNAIL HAS BEEN CLICKED\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.find('.tp-thumb-image').click(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t TweenLite.to(jQuery(this),0.3,{opacity:0,ease:Power3.easeInOut,onComplete: function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.find('.tp-thumb-image').remove();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var player=nextcaption.data('player');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t player.playVideo();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// START VIMEO HANDLING\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (ifr.attr('src').toLowerCase().indexOf('vimeo')>=0) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (!ifr.hasClass(\"HasListener\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.addClass(\"HasListener\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.attr('id',frameID);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar isrc = ifr.attr('src');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar queryParameters = {}, queryString = isrc,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tre = /([^&=]+)=([^&]*)/g, m;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Creates a map with the query string parameters\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twhile (m = re.exec(queryString)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tqueryParameters[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (queryParameters['player_id']!=undefined)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisrc = isrc.replace(queryParameters['player_id'],frameID);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisrc=isrc+\"&player_id=\"+frameID;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry{ isrc = isrc.replace('api=0','api=1'); } catch(e) {}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisrc=isrc+\"&api=1\";\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.attr('src',isrc);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar player = nextcaption.find('iframe')[0];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar vimint = setInterval(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($f !=undefined)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (typeof $f(frameID).api != undefined && typeof $f(frameID).api !=\"undefined\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$f(player).addEvent('ready', function(){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvimeoready_auto(frameID,nextcaption.data('autoplay'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclearInterval(vimint);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},100);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar ifr = nextcaption.find('iframe');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar id = ifr.attr('id');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar vimint = setInterval(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($f !=undefined)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (typeof $f(id).api != undefined && typeof $f(id).api !=\"undefined\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar froogaloop = $f(id);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('timerplay',setTimeout(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('forcerewind')==\"on\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfroogaloop.api(\"seekTo\",0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfroogaloop.api(\"play\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},nextcaption.data('start')));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclearInterval(vimint);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},100);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }// END HAS LISTENER HANDLING\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // PLAY VIDEO IF THUMBNAIL HAS BEEN CLICKED\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.find('.tp-thumb-image').click(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t TweenLite.to(jQuery(this),0.3,{opacity:0,ease:Power3.easeInOut,onComplete: function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.find('.tp-thumb-image').remove();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var ifr = nextcaption.find('iframe');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var id = ifr.attr('id');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var vimint = setInterval(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($f !=undefined)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (typeof $f(id).api != undefined && typeof $f(id).api !=\"undefined\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var froogaloop = $f(id);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t froogaloop.api(\"play\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t clearInterval(vimint);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t },100);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t })\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t} // END OF VIMEO HANDLING\n\t\t\t\t\t\t\t\t\t\t\t} // END OF CHOOSE BETWEEN YOUTUBE AND VIMEO\n\t\t\t\t\t\t\t\t\t\t}); // END OF LOOP THROUGH IFRAMES\n\n\t\t\t\t\t\t\t\t\t\t// START OF VIDEO JS\n\t\t\t\t\t\t\t\t\t\tif (nextcaption.find('video').length>0) {\n\n\n\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('video').each(function(i) {\n\n\t\t\t\t\t\t\t\t\t\t\t\tvar jvideo = jQuery(this);\n\t\t\t\t\t\t\t\t\t\t\t\tvar video = this;\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (!jvideo.parent().hasClass(\"html5vid\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tjvideo.wrap('<div class=\"html5vid\" style=\"position:relative;top:0px;left:0px;width:auto;height:auto\"></div>');\n\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tvar html5vid = jQuery(this).parent();\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (video.addEventListener)\n\t\t\t\t\t\t\t\t\t\t\t\t\tvideo.addEventListener(\"loadedmetadata\",function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.data('metaloaded',1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\tvideo.attachEvent(\"loadedmetadata\",function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.data('metaloaded',1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (!jvideo.hasClass(\"HasListener\")) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjvideo.addClass(\"HasListener\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideo.addEventListener(\"play\",function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.addClass(\"videoisplaying\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.find('.tp-poster').remove();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('volume')==\"mute\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t video.muted=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.trigger('revolution.slide.onvideoplay');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.videoplaying=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.trigger('stoptimer');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideo.addEventListener(\"pause\",function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.removeClass(\"videoisplaying\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.videoplaying=false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.trigger('playtimer');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.trigger('revolution.slide.onvideostop');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideo.addEventListener(\"ended\",function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.removeClass(\"videoisplaying\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.videoplaying=false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.trigger('playtimer');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.trigger('revolution.slide.onvideostop');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (opt.nextslideatend==true)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.revnext();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (jvideo.attr('poster')!=undefined && html5vid.find('.tp-poster').length==0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.append('<div class=\"tp-poster\" style=\"position:absolute;z-index:1;width:100%;height:100%;top:0px;left:0px;background:url('+jvideo.attr('poster')+'); background-position:center center;background-size:100%;background-repeat:no-repeat;\"></div>');\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (jvideo.attr('control') == undefined && html5vid.find('.tp-video-play-button').length==0) {\n\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.append('<div class=\"tp-video-play-button\"><i class=\"revicon-right-dir\"></i><div class=\"tp-revstop\"></div></div>');\n\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.find('.tp-video-play-button').click(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.hasClass(\"videoisplaying\"))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideo.pause();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideo.play();\n\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (jvideo.attr('control') == undefined) {\n\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.find('video, .tp-poster').click(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.hasClass(\"videoisplaying\"))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideo.pause();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideo.play();\n\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('forcecover')==1) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tupdateHTML5Size(html5vid,opt.container);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.addClass(\"fullcoveredvideo\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.addClass(\"fullcoveredvideo\");\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('forcecover')==1 || nextcaption.hasClass('fullscreenvideo')) {\n\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.css({width:\"100%\", height:\"100%\"});\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\t\t\tvar autoplaywason = false;\n\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplayonlyfirsttime') == true || nextcaption.data('autoplayonlyfirsttime')==\"true\")\n\t\t\t\t\t\t\t\t\t\t\t\t\tautoplaywason = true;\n\n\t\t\t\t\t\t\t\t\t\t\t\tclearInterval(html5vid.data('interval'));\n\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.data('interval',setInterval(function() {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.data('metaloaded')==1 || video.duration!=NaN) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclearInterval(html5vid.data('interval'));\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('dottedoverlay')!=\"none\" && nextcaption.data('dottedoverlay')!=undefined)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.find('.tp-dottedoverlay').length!=1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.append('<div class=\"tp-dottedoverlay '+nextcaption.data('dottedoverlay')+'\"></div>');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar mediaaspect=16/9;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('aspectratio')==\"4:3\") mediaaspect=4/3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.data('mediaAspect',mediaaspect);\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.closest('.tp-caption').data('forcecover')==1) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tupdateHTML5Size(html5vid,opt.container);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.addClass(\"fullcoveredvideo\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjvideo.css({display:\"block\"});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.nextslideatend = nextcaption.data('nextslideatend');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// IF VIDEO SHOULD BE AUTOPLAYED\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true || autoplaywason==true) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar bt=jQuery('body').find('#'+opt.container.attr('id')).find('.tp-bannertimer');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.videoplaying=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.trigger('stoptimer');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},200);\n\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('forcerewind')==\"on\" && !html5vid.hasClass(\"videoisplaying\"))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (video.currentTime>0) video.currentTime=0;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('volume')==\"mute\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideo.muted = true;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.data('timerplay',setTimeout(function() {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('forcerewind')==\"on\" && !html5vid.hasClass(\"videoisplaying\"))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (video.currentTime>0) video.currentTime=0;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('volume')==\"mute\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideo.muted = true;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function() {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideo.play();\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},500);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},10+nextcaption.data('start')));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.data('ww') == undefined) html5vid.data('ww',jvideo.attr('width'));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.data('hh') == undefined) html5vid.data('hh',jvideo.attr('height'));\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!nextcaption.hasClass(\"fullscreenvideo\") && nextcaption.data('forcecover')==1) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.width(html5vid.data('ww')*opt.bw);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.height(html5vid.data('hh')*opt.bh);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} catch(e) {}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclearInterval(html5vid.data('interval'));\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}),100);\n\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t} // END OF VIDEO JS FUNCTIONS\n\n\t\t\t\t\t\t\t\t\t\t\t// IF AUTOPLAY IS ON, WE NEED SOME STOP FUNCTION ON\n\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar bt=jQuery('body').find('#'+opt.container.attr('id')).find('.tp-bannertimer');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function() {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.videoplaying=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.trigger('stoptimer');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t},200)\n\t\t\t\t\t\t\t\t\t\t\t\t\topt.videoplaying=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.trigger('stoptimer');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplayonlyfirsttime') == true || nextcaption.data('autoplayonlyfirsttime')==\"true\" ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('autoplay',false);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('autoplayonlyfirsttime',false);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\n\n\n\t\t\t\t\t\t\t\t\t// NEW ENGINE\n\t\t\t\t\t\t\t\t\t//if (nextcaption.hasClass(\"randomrotate\") && (opt.ie || opt.ie9)) nextcaption.removeClass(\"randomrotate\").addClass(\"sfb\");\n\t\t\t\t\t\t\t\t\t//\tnextcaption.removeClass('noFilterClass');\n\n\n\n\t\t\t\t\t\t\t\t var imw =0;\n\t\t\t\t\t\t\t\t var imh = 0;\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.find('img').length>0) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar im = nextcaption.find('img');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (im.data('ww') == undefined) im.data('ww',im.width());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (im.data('hh') == undefined) im.data('hh',im.height());\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar ww = im.data('ww');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar hh = im.data('hh');\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.width(ww*opt.bw);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.height(hh*opt.bh);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\timw = im.width();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\timh = im.height();\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.find('iframe').length>0 || nextcaption.find('video').length>0) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar html5vid = false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar im = nextcaption.find('iframe');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (im.length==0) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tim = nextcaption.find('video');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid = true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.css({display:\"block\"});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('ww') == undefined) nextcaption.data('ww',im.width());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('hh') == undefined) nextcaption.data('hh',im.height());\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar ww = nextcaption.data('ww');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar hh = nextcaption.data('hh');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar nc =nextcaption;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('fsize') == undefined) nc.data('fsize',parseInt(nc.css('font-size'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('pt') == undefined) nc.data('pt',parseInt(nc.css('paddingTop'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('pb') == undefined) nc.data('pb',parseInt(nc.css('paddingBottom'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('pl') == undefined) nc.data('pl',parseInt(nc.css('paddingLeft'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('pr') == undefined) nc.data('pr',parseInt(nc.css('paddingRight'),0) || 0);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('mt') == undefined) nc.data('mt',parseInt(nc.css('marginTop'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('mb') == undefined) nc.data('mb',parseInt(nc.css('marginBottom'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('ml') == undefined) nc.data('ml',parseInt(nc.css('marginLeft'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('mr') == undefined) nc.data('mr',parseInt(nc.css('marginRight'),0) || 0);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('bt') == undefined) nc.data('bt',parseInt(nc.css('borderTop'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('bb') == undefined) nc.data('bb',parseInt(nc.css('borderBottom'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('bl') == undefined) nc.data('bl',parseInt(nc.css('borderLeft'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('br') == undefined) nc.data('br',parseInt(nc.css('borderRight'),0) || 0);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('lh') == undefined) nc.data('lh',parseInt(nc.css('lineHeight'),0) || 0);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar fvwidth=opt.width;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar fvheight=opt.height;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (fvwidth>opt.startwidth) fvwidth=opt.startwidth;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (fvheight>opt.startheight) fvheight=opt.startheight;\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!nextcaption.hasClass('fullscreenvideo'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'font-size': (nc.data('fsize') * opt.bw)+\"px\",\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'padding-top': (nc.data('pt') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'padding-bottom': (nc.data('pb') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'padding-left': (nc.data('pl') * opt.bw) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'padding-right': (nc.data('pr') * opt.bw) + \"px\",\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'margin-top': (nc.data('mt') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'margin-bottom': (nc.data('mb') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'margin-left': (nc.data('ml') * opt.bw) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'margin-right': (nc.data('mr') * opt.bw) + \"px\",\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'border-top': (nc.data('bt') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'border-bottom': (nc.data('bb') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'border-left': (nc.data('bl') * opt.bw) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'border-right': (nc.data('br') * opt.bw) + \"px\",\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'line-height': (nc.data('lh') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'height':(hh*opt.bh)+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t offsetx=0; offsety=0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.data('x',0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.data('y',0)\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var ovhh = opt.height\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (opt.autoHeight==\"on\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\tovhh = opt.container.height()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'width':opt.width,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'height':ovhh\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid == false) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.width(ww*opt.bw);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.height(hh*opt.bh);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('forcecover')!=1 && !nextcaption.hasClass('fullscreenvideo')) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.width(ww*opt.bw);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.height(hh*opt.bh);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\timw = im.width();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\timh = im.height();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\telse {\n\n\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.tp-resizeme, .tp-resizeme *').each(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcalcCaptionResponsive(jQuery(this),opt);\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"tp-resizeme\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('*').each(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcalcCaptionResponsive(jQuery(this),opt);\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tcalcCaptionResponsive(nextcaption,opt);\n\n\t\t\t\t\t\t\t\t\t\t\t\timh=nextcaption.outerHeight(true);\n\t\t\t\t\t\t\t\t\t\t\t\timw=nextcaption.outerWidth(true);\n\n\t\t\t\t\t\t\t\t\t\t\t\t// NEXTCAPTION FRONTCORNER CHANGES\n\t\t\t\t\t\t\t\t\t\t\t\tvar ncch = nextcaption.outerHeight();\n\t\t\t\t\t\t\t\t\t\t\t\tvar bgcol = nextcaption.css('backgroundColor');\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.frontcorner').css({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderWidth':ncch+\"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'left':(0-ncch)+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderRight':'0px solid transparent',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderTopColor':bgcol\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.frontcornertop').css({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderWidth':ncch+\"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'left':(0-ncch)+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderRight':'0px solid transparent',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderBottomColor':bgcol\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t// NEXTCAPTION BACKCORNER CHANGES\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.backcorner').css({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderWidth':ncch+\"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'right':(0-ncch)+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderLeft':'0px solid transparent',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderBottomColor':bgcol\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t// NEXTCAPTION BACKCORNER CHANGES\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.backcornertop').css({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderWidth':ncch+\"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'right':(0-ncch)+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderLeft':'0px solid transparent',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderTopColor':bgcol\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t }\n\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (opt.fullScreenAlignForce == \"on\") {\n\t\t\t\t\t\t\t\t\t\t//xbw = 1;\n\t\t\t\t\t\t\t\t\t\t//xbh = 1;\n\t\t\t\t\t\t\t\t\t\toffsetx=0;\n\t\t\t\t\t\t\t\t\t\toffsety=0;\n\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('voffset')==undefined) nextcaption.data('voffset',0);\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('hoffset')==undefined) nextcaption.data('hoffset',0);\n\n\t\t\t\t\t\t\t\t\tvar vofs= nextcaption.data('voffset')*xbw;\n\t\t\t\t\t\t\t\t\tvar hofs= nextcaption.data('hoffset')*xbw;\n\n\t\t\t\t\t\t\t\t\tvar crw = opt.startwidth*xbw;\n\t\t\t\t\t\t\t\t\tvar crh = opt.startheight*xbw;\n\n\t\t\t\t\t\t\t\t\tif (opt.fullScreenAlignForce == \"on\") {\n\t\t\t\t\t\t\t\t\t\tcrw = opt.container.width();\n\t\t\t\t\t\t\t\t\t\tcrh = opt.container.height();\n\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t\t// CENTER THE CAPTION HORIZONTALLY\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('x')==\"center\" || nextcaption.data('xcenter')=='center') {\n\t\t\t\t\t\t\t\t\t\tnextcaption.data('xcenter','center');\n\t\t\t\t\t\t\t\t\t\t//nextcaption.data('x',(crw/2 - nextcaption.outerWidth(true)/2)/xbw+ hofs);\n\t\t\t\t\t\t\t\t\t\tnextcaption.data('x',(crw/2 - nextcaption.outerWidth(true)/2) + hofs);\n\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// ALIGN LEFT THE CAPTION HORIZONTALLY\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('x')==\"left\" || nextcaption.data('xleft')=='left') {\n\t\t\t\t\t\t\t\t\t\tnextcaption.data('xleft','left');\n\n\t\t\t\t\t\t\t\t\t\tnextcaption.data('x',(0)/xbw+hofs);\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// ALIGN RIGHT THE CAPTION HORIZONTALLY\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('x')==\"right\" || nextcaption.data('xright')=='right') {\n\t\t\t\t\t\t\t\t\t\tnextcaption.data('xright','right');\n\t\t\t\t\t\t\t\t\t\tnextcaption.data('x',((crw - nextcaption.outerWidth(true))+hofs)/xbw);\n\t\t\t\t\t\t\t\t\t\t//konsole.log(\"crw:\"+crw+\" width:\"+nextcaption.outerWidth(true)+\" xbw:\"+xbw);\n\t\t\t\t\t\t\t\t\t\t//konsole.log(\"x-pos:\"+nextcaption.data('x'))\n\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t// CENTER THE CAPTION VERTICALLY\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('y')==\"center\" || nextcaption.data('ycenter')=='center') {\n\t\t\t\t\t\t\t\t\t\tnextcaption.data('ycenter','center');\n\t\t\t\t\t\t\t\t\t\tnextcaption.data('y',(crh/2 - nextcaption.outerHeight(true)/2) + vofs);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// ALIGN TOP THE CAPTION VERTICALLY\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('y')==\"top\" || nextcaption.data('ytop')=='top') {\n\t\t\t\t\t\t\t\t\t\tnextcaption.data('ytop','top');\n\t\t\t\t\t\t\t\t\t\tnextcaption.data('y',(0)/opt.bh+vofs);\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// ALIGN BOTTOM THE CAPTION VERTICALLY\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('y')==\"bottom\" || nextcaption.data('ybottom')=='bottom') {\n\t\t\t\t\t\t\t\t\t\tnextcaption.data('ybottom','bottom');\n\t\t\t\t\t\t\t\t\t\tnextcaption.data('y',((crh - nextcaption.outerHeight(true))+vofs)/xbw);\n\n\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t\t// THE TRANSITIONS OF CAPTIONS\n\t\t\t\t\t\t\t\t\t// MDELAY AND MSPEED\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('start') == undefined) nextcaption.data('start',1000);\n\n\n\n\t\t\t\t\t\t\t\t\tvar easedata=nextcaption.data('easing');\n\t\t\t\t\t\t\t\t\tif (easedata==undefined) easedata=\"Power1.easeOut\";\n\n\n\t\t\t\t\t\t\t\t\tvar mdelay = nextcaption.data('start')/1000;\n\t\t\t\t\t\t\t\t\tvar mspeed = nextcaption.data('speed')/1000;\n\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('x')==\"center\" || nextcaption.data('xcenter')=='center')\n\t\t\t\t\t\t\t\t\t\tvar calcx = (nextcaption.data('x')+offsetx);\n\t\t\t\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\t\t\t\tvar calcx = (xbw*nextcaption.data('x')+offsetx);\n\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('y')==\"center\" || nextcaption.data('ycenter')=='center')\n\t\t\t\t\t\t\t\t\t\tvar calcy = (nextcaption.data('y')+offsety);\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t//if (opt.fullScreenAlignForce == \"on\" && (nextcaption.data('y')==\"bottom\" || nextcaption.data('ybottom')=='bottom'))\n\t\t\t\t\t\t\t\t\t\t//\topt.bh = 1;\n\n\t\t\t\t\t\t\t\t\t\tvar calcy = (opt.bh*nextcaption.data('y')+offsety);\n\t\t\t\t\t\t\t\t\t}\n\n\n\n\n\t\t\t\t\t\t\tTweenLite.set(nextcaption,{top:calcy,left:calcx,overwrite:\"auto\"});\n\n\t\t\t\t\t\t\tif (!recalled) {\n\n\n\n\t\t\t\t\t\t\t\t\t// CLEAR THE TIMELINE, SINCE IT CAN BE DAMAGED, OR PAUSED AT A FEW PART\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('timeline')!=undefined)\n\t\t\t\t\t\t\t\t\t nextcaption.data('timeline').clear();\n\n\t\t\t\t\t\t\t\t\t// MAKE SURE THE ANIMATION ENDS WITH A CLEANING ON MOZ TRANSFORMS\n\t\t\t\t\t\t\t\t\tfunction animcompleted() {\n\t\t\t\t\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({transform:\"none\",'-moz-transform':'none','-webkit-transform':'none'});\n\t\t\t\t\t\t\t\t\t\t},100)\n\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t function tlstart() {\n\t\t\t\t\t\t\t\t\t nextcaption.data('timer',setTimeout(function() {\n\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"fullscreenvideo\"))\n\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({'display':'block'});\n\n\t\t\t\t\t\t\t\t\t },nextcaption.data('start')));\n\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t\tvar tl = new TimelineLite({smoothChildTiming:true,onStart:tlstart});\n\n\n\n\t\t\t\t\t\t\t\t\tif (opt.fullScreenAlignForce == \"on\") {\n\t\t\t\t\t\t\t\t\t\t//calcy = nextcaption.data('y')+offsety;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tvar animobject = nextcaption;\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('mySplitText') !=undefined) nextcaption.data('mySplitText').revert();\n\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('splitin') == \"chars\" || nextcaption.data('splitin') == \"words\" || nextcaption.data('splitin') == \"lines\" || nextcaption.data('splitout') == \"chars\" || nextcaption.data('splitout') == \"words\" || nextcaption.data('splitout') == \"lines\") {\n\t\t\t\t\t\t\t\t\t\tif (nextcaption.find('a').length>0)\n\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('mySplitText',new SplitText(nextcaption.find('a'),{type:\"lines,words,chars\",charsClass:\"tp-splitted\",wordsClass:\"tp-splitted\",linesClass:\"tp-splitted\"}));\n\t\t\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('mySplitText',new SplitText(nextcaption,{type:\"lines,words,chars\",charsClass:\"tp-splitted\",wordsClass:\"tp-splitted\",linesClass:\"tp-splitted\"}));\n\n\t\t\t\t\t\t\t\t\t\tnextcaption.addClass(\"splitted\");\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('splitin') == \"chars\")\n\t\t\t\t\t\t\t\t\t\tanimobject = nextcaption.data('mySplitText').chars;\n\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('splitin') == \"words\")\n\t\t\t\t\t\t\t\t\t\tanimobject = nextcaption.data('mySplitText').words;\n\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('splitin') == \"lines\")\n\t\t\t\t\t\t\t\t\t\tanimobject = nextcaption.data('mySplitText').lines;\n\n\n\n\t\t\t\t\t\t\t\t\tvar frm = newAnimObject();\n\t\t\t\t\t\t\t\t\tvar endfrm = newAnimObject();\n\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('repeat')!=undefined) repeatV = nextcaption.data('repeat');\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('yoyo')!=undefined) yoyoV = nextcaption.data('yoyo');\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('repeatdelay')!=undefined) repeatdelayV = nextcaption.data('repeatdelay');\n\n\t\t\t\t\t\t\t\t\t// WHICH ANIMATION TYPE SHOULD BE USED\n\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"customin\")) frm = getAnimDatas(frm,nextcaption.data('customin'));\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"randomrotate\")) {\n\n\t\t\t\t\t\t\t\t\t\t\t\tfrm.scale = Math.random()*3+1;\n\t\t\t\t\t\t\t\t\t\t\t\tfrm.rotation = Math.round(Math.random()*200-100);\n\t\t\t\t\t\t\t\t\t\t\t\tfrm.x = Math.round(Math.random()*200-100);\n\t\t\t\t\t\t\t\t\t\t\t\tfrm.y = Math.round(Math.random()*200-100);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('lfr') || nextcaption.hasClass('skewfromright')) frm.x = 15+opt.width;\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('lfl') || nextcaption.hasClass('skewfromleft')) frm.x = -15-imw;\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('sfl') || nextcaption.hasClass('skewfromleftshort')) frm.x = -50;\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('sfr') || nextcaption.hasClass('skewfromrightshort')) frm.x = 50;\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('lft')) frm.y = -25 - imh;\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('lfb')) frm.y = 25 + opt.height;\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('sft')) frm.y = -50;\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('sfb')) frm.y = 50;\n\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('skewfromright') || nextcaption.hasClass('skewfromrightshort')) frm.skewX = -85\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('skewfromleft') || nextcaption.hasClass('skewfromleftshort')) frm.skewX = 85\n\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"fade\") || nextcaption.hasClass('sft') || nextcaption.hasClass('sfl') || nextcaption.hasClass('sfb') || nextcaption.hasClass('skewfromleftshort') || nextcaption.hasClass('sfr') || nextcaption.hasClass('skewfromrightshort'))\n\t\t\t\t\t\t\t\t\t\tfrm.opacity = 0;\n\n\t\t\t\t\t\t\t\t\t// FOR SAFARI WE NEED TO REMOVE 3D ROTATIONS\n\t\t\t\t\t\t\t\t\tif (get_browser().toLowerCase()==\"safari\") {\n\t\t\t\t\t\t\t\t\t\tfrm.rotationX=0;frm.rotationY=0;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tvar elemdelay = (nextcaption.data('elementdelay') == undefined) ? 0 : nextcaption.data('elementdelay');\n\t\t\t\t\t\t\t\t\tendfrm.ease = frm.ease = (nextcaption.data('easing') == undefined) ? Power1.easeInOut : nextcaption.data('easing');\n\n\n\t\t\t\t\t\t\t\t\t// DISTANCES SHOULD BE RESIZED ALSO\n\n\t\t\t\t\t\t\t\t\tfrm.data = new Object();\n\t\t\t\t\t\t\t\t\tfrm.data.oldx = frm.x;\n\t\t\t\t\t\t\t\t\tfrm.data.oldy = frm.y;\n\n\t\t\t\t\t\t\t\t\tendfrm.data = new Object();\n\t\t\t\t\t\t\t\t\tendfrm.data.oldx = endfrm.x;\n\t\t\t\t\t\t\t\t\tendfrm.data.oldy = endfrm.y;\n\n\t\t\t\t\t\t\t\t\tfrm.x = frm.x * xbw;\n\t\t\t\t\t\t\t\t\tfrm.y = frm.y * xbw;\n\n\t\t\t\t\t\t\t\t\tvar newtl = new TimelineLite();\n\n\n\n\t\t\t\t\t\t\t\t\t// CHANGE to TweenLite. if Yoyo and Repeat is used. Dont forget to laod the Right Tools for it !!\n\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"customin\")) {\n\t\t\t\t\t\t\t\t\t\t if (animobject != nextcaption)\n\t\t\t\t\t\t\t\t\t\t\t tl.add(TweenLite.set(nextcaption, { opacity:1,scaleX:1,scaleY:1,rotationX:0,rotationY:0,rotationZ:0,skewX:0,skewY:0,z:0,x:0,y:0,visibility:'visible',opacity:1,delay:0,overwrite:\"all\"}));\n\t\t\t\t\t\t\t\t\t\t frm.visibility = \"hidden\";\n\t\t\t\t\t\t\t\t\t\t endfrm.visibility = \"visible\";\n\t\t\t\t\t\t\t\t\t\t endfrm.overwrite = \"all\";\n\t\t\t\t\t\t\t\t\t\t endfrm.opacity = 1;\n\t\t\t\t\t\t\t\t\t\t endfrm.onComplete = animcompleted();\n\t\t\t\t\t\t\t\t\t\t endfrm.delay = mdelay;\n\n\t\t\t\t\t\t\t\t\t\t tl.add(newtl.staggerFromTo(animobject,mspeed,frm,endfrm,elemdelay),\"frame0\");\n\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\tfrm.visibility = \"visible\";\n\t\t\t\t\t\t\t\t\t\t\tfrm.transformPerspective = 600;\n\t\t\t\t\t\t\t\t\t\t\tif (animobject != nextcaption)\n\t\t\t\t\t\t\t\t\t\t\t tl.add(TweenLite.set(nextcaption, { opacity:1,scaleX:1,scaleY:1,rotationX:0,rotationY:0,rotationZ:0,skewX:0,skewY:0,z:0,x:0,y:0,visibility:'visible',opacity:1,delay:0,overwrite:\"all\"}));\n\n\t\t\t\t\t\t\t\t\t\t\tendfrm.visibility = \"visible\";\n\t\t\t\t\t\t\t\t\t\t\tendfrm.delay = mdelay;\n\t\t\t\t\t\t\t\t\t\t\tendfrm.onComplete = animcompleted();\n\t\t\t\t\t\t\t\t\t\t\tendfrm.opacity = 1;\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"randomrotate\") && animobject != nextcaption) {\n\n\t\t\t\t\t\t\t\t\t\t\t\tfor (var i=0;i<animobject.length;i++) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar obj =new Object();\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar endobj = new Object();\n\t\t\t\t\t\t\t\t\t\t\t\t\tjQuery.extend(obj,frm);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjQuery.extend(endobj,endfrm);\n\t\t\t\t\t\t\t\t\t\t\t\t\tfrm.scale = Math.random()*3+1;\n\t\t\t\t\t\t\t\t\t\t\t\t\tfrm.rotation = Math.round(Math.random()*200-100);\n\t\t\t\t\t\t\t\t\t\t\t\t\tfrm.x = Math.round(Math.random()*200-100);\n\t\t\t\t\t\t\t\t\t\t\t\t\tfrm.y = Math.round(Math.random()*200-100);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (i!=0) endobj.delay = mdelay + (i*elemdelay);\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\ttl.append(TweenLite.fromTo(animobject[i],mspeed,obj,endobj),\"frame0\");\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t}\telse\n\t\t\t\t\t\t\t\t\t\t\ttl.add(newtl.staggerFromTo(animobject,mspeed,frm,endfrm,elemdelay),\"frame0\");\n\t\t\t\t\t\t\t\t\t\t\t//tl.add(TweenLite.fromTo(nextcaption,mspeed,frm,endfrm),\"frame0\");\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// SAVE IT TO NCAPTION BEFORE NEW STEPS WILL BE ADDED\n\t\t\t\t\t\t\t\t\tnextcaption.data('timeline',tl);\n\n\t\t\t\t\t\t\t\t\t// FURTHER ANIMATIONS IN CASE THERE ARE MORE THAN ONE STEP IN THE ANIMATION CHAIN\n\t\t\t\t\t\t\t\t\tvar frames = new Array();\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('frames')!=undefined) {\n\t\t\t\t\t\t\t\t\t\tvar rowtext = nextcaption.data('frames');\n\t\t\t\t\t\t\t\t\t\trowtext = rowtext.replace(/\\s+/g, '');\n\t\t\t\t\t\t\t\t\t\trowtext = rowtext.replace(\"{\",\"\");\n\t\t\t\t\t\t\t\t\t\tvar spframes = rowtext.split('}');\n\t\t\t\t\t\t\t\t\t\tjQuery.each(spframes,function(index,spframe){\n\t\t\t\t\t\t\t\t\t\t\tif (spframe.length>0) {\n\t\t\t\t\t\t\t\t\t\t\t\tvar params = getAnimSteps(spframe);\n\n\t\t\t\t\t\t\t\t\t\t\t\taddMoveCaption(nextcaption,opt,params,\"frame\"+(index+10),xbw)\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t} // END OF ANIMATION STEPS\n\n\t\t\t\t\t\t\t\t\ttl = nextcaption.data('timeline');\n\n\t\t\t\t\t\t\t\t\t// IF THERE IS ANY EXIT ANIM DEFINED\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('end')!=undefined) {\n\n\t\t\t\t\t\t\t\t\t\tendMoveCaption(nextcaption,opt,nextcaption.data('end')/1000,frm,\"frame99\",xbw);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tendMoveCaption(nextcaption,opt,999999,frm,\"frame99\",xbw);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// SAVE THE TIMELINE IN DOM ELEMENT\n\t\t\t\t\t\t\t\t\ttl = nextcaption.data('timeline');\n\t\t\t\t\t\t\t\t\tnextcaption.data('timeline',tl);\n\n\t\t\t\t\t\t\t\t\t// SOME LOOPING ANIMATION ON INTERNAL ELEMENTS\n\t\t\t\t\t\t\t\t\tnextcaption.find('.rs-pendulum').each(function() {\n\t\t\t\t\t\t\t\t\t\tvar el = jQuery(this);\n\t\t\t\t\t\t\t\t\t\tif (el.data('timeline')==undefined) {\n\t\t\t\t\t\t\t\t\t\t\tel.data('timeline',new TimelineLite);\n\t\t\t\t\t\t\t\t\t\t\tvar startdeg = el.data('startdeg')==undefined ? -20 : el.data('startdeg'),\n\t\t\t\t\t\t\t\t\t\t\t\tenddeg = el.data('enddeg')==undefined ? 20 : el.data('enddeg');\n\t\t\t\t\t\t\t\t\t\t\t\tspeed = el.data('speed')==undefined ? 2 : el.data('speed'),\n\t\t\t\t\t\t\t\t\t\t\t\torigin = el.data('origin')==undefined ? \"50% 50%\" : el.data('origin'),\n\t\t\t\t\t\t\t\t\t\t\t\teasing = el.data('ease')==undefined ? Power2.easeInOut : el.data('ease');\n\t\t\t\t\t\t\t\t\t\t\tel.data('timeline').append(new TweenLite.fromTo(el,speed,{rotation:startdeg,transformOrigin:origin},{rotation:enddeg,ease:easing}));\n\t\t\t\t\t\t\t\t\t\t\tel.data('timeline').append(new TweenLite.fromTo(el,speed,{rotation:enddeg,transformOrigin:origin},{rotation:startdeg,ease:easing,onComplete:function() {\n\t\t\t\t\t\t\t\t\t\t\t\tel.data('timeline').restart();\n\t\t\t\t\t\t\t\t\t\t\t}}));\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t\t\t\t// SOME LOOPING ANIMATION ON INTERNAL ELEMENTS\n\t\t\t\t\t\t\t\t\tnextcaption.find('.rs-slideloop').each(function() {\n\t\t\t\t\t\t\t\t\t\tvar el = jQuery(this);\n\t\t\t\t\t\t\t\t\t\tif (el.data('timeline')==undefined) {\n\t\t\t\t\t\t\t\t\t\t\tel.data('timeline',new TimelineLite);\n\t\t\t\t\t\t\t\t\t\t\tvar xs = el.data('xs')==undefined ? 0 : el.data('xs'),\n\t\t\t\t\t\t\t\t\t\t\t\tys = el.data('ys')==undefined ? 0 : el.data('ys');\n\t\t\t\t\t\t\t\t\t\t\t\txe = el.data('xe')==undefined ? 0 : el.data('xe'),\n\t\t\t\t\t\t\t\t\t\t\t\tye = el.data('ye')==undefined ? 0 : el.data('ye'),\n\t\t\t\t\t\t\t\t\t\t\t\tspeed = el.data('speed')==undefined ? 2 : el.data('speed'),\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\teasing = el.data('ease')==undefined ? Power2.easeInOut : el.data('ease');\n\t\t\t\t\t\t\t\t\t\t\tel.data('timeline').append(new TweenLite.fromTo(el,speed,{x:xs,y:ys},{x:xe,y:ye,ease:easing}));\n\t\t\t\t\t\t\t\t\t\t\tel.data('timeline').append(new TweenLite.fromTo(el,speed,{x:xe,y:ye},{x:xs,y:ys,onComplete:function() {\n\t\t\t\t\t\t\t\t\t\t\t\tel.data('timeline').restart();\n\t\t\t\t\t\t\t\t\t\t\t}}));\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// SOME LOOPING ANIMATION ON INTERNAL ELEMENTS\n\t\t\t\t\t\t\t\t\tnextcaption.find('.rs-pulse').each(function() {\n\t\t\t\t\t\t\t\t\t\tvar el = jQuery(this);\n\t\t\t\t\t\t\t\t\t\tif (el.data('timeline')==undefined) {\n\t\t\t\t\t\t\t\t\t\t\tel.data('timeline',new TimelineLite);\n\t\t\t\t\t\t\t\t\t\t\tvar zoomstart = el.data('zoomstart')==undefined ? 0 : el.data('zoomstart'),\n\t\t\t\t\t\t\t\t\t\t\t\tzoomend = el.data('zoomend')==undefined ? 0 : el.data('zoomend');\n\t\t\t\t\t\t\t\t\t\t\t\tspeed = el.data('speed')==undefined ? 2 : el.data('speed'),\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\teasing = el.data('ease')==undefined ? Power2.easeInOut : el.data('ease');\n\t\t\t\t\t\t\t\t\t\t\tel.data('timeline').append(new TweenLite.fromTo(el,speed,{scale:zoomstart},{scale:zoomend,ease:easing}));\n\t\t\t\t\t\t\t\t\t\t\tel.data('timeline').append(new TweenLite.fromTo(el,speed,{scale:zoomend},{scale:zoomstart,onComplete:function() {\n\t\t\t\t\t\t\t\t\t\t\t\tel.data('timeline').restart();\n\t\t\t\t\t\t\t\t\t\t\t}}));\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tnextcaption.find('.rs-wave').each(function() {\n\t\t\t\t\t\t\t\t\t\tvar el = jQuery(this);\n\t\t\t\t\t\t\t\t\t\tif (el.data('timeline')==undefined) {\n\t\t\t\t\t\t\t\t\t\t\tel.data('timeline',new TimelineLite);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tvar angle= el.data('angle')==undefined ? 10 : el.data('angle'),\n\t\t\t\t\t\t\t\t\t\t\t\tradius = el.data('radius')==undefined ? 10 : el.data('radius'),\n\t\t\t\t\t\t\t\t\t\t\t\tspeed = el.data('speed')==undefined ? -20 : el.data('speed'),\n\t\t\t\t\t\t\t\t\t\t\t\torigin = el.data('origin')==undefined ? -20 : el.data('origin'),\n\t\t\t\t\t\t\t\t\t\t\t\tangobj = {a:0, ang : angle, element:el, unit:radius}; \n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tel.data('timeline').append(new TweenLite.fromTo(angobj,speed,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\ta:360\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\ta:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tease:Linear.easeNone,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonUpdate:function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar rad = angobj.a * (Math.PI / 180);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t TweenLite.to(angobj.element,0.1,{x:Math.cos(rad) * angobj.unit, y:angobj.unit * (1 - Math.sin(rad))});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonComplete:function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tel.data('timeline').restart();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t }\n\n\t\t\t\t\t\t if (recalled) {\n\t\t\t\t\t\t\t \t\tif (nextcaption.data('timeline') != undefined) {\n\t\t\t\t\t\t\t\t \t\tvar tweens = nextcaption.data('timeline').getTweensOf();\n\t\t\t\t\t\t\t\t \t\tjQuery.each(tweens,function(index,tween) {\n\t\t\t\t\t\t\t\t\t \t\tif (tween.vars.data != undefined) {\n\t\t\t\t\t\t\t\t\t \t\t\tvar newx = tween.vars.data.oldx * xbw;\n\t\t\t\t\t\t\t\t\t \t\t\tvar newy = tween.vars.data.oldy * xbw;\n\t\t\t\t\t\t\t\t\t \t\t\tif (tween.progress() !=1 && tween.progress()!=0) {\n\t\t\t\t\t\t\t\t\t \t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t \t\t\t//tween.updateTo({x:newx, y:newy},true);\n\t\t\t\t\t\t\t\t\t\t\t \t\t\ttween.vars.x = newx;\n\t\t\t\t\t\t\t\t\t\t\t \t\t\ttween.vary.y = newy;\n\t\t\t\t\t\t\t\t\t\t\t \t\t } catch(e) {\n\n\t\t\t\t\t\t\t\t\t\t\t \t\t }\n\t\t\t\t\t\t\t\t\t\t \t\t} else {\n\t\t\t\t\t\t\t\t\t\t \t\t\tif (tween.progress()==1) {\n\t\t\t\t\t\t\t\t\t\t\t \t\t\t\tTweenLite.set(tween.target,{x:newx,y:newy});\n\t\t\t\t\t\t\t\t\t\t\t \t\t}\n\t\t\t\t\t\t\t\t\t\t\t \t}\n\t\t\t\t\t\t\t\t\t \t\t}\n\t\t\t\t\t\t\t\t \t\t})\n\t\t\t\t\t\t\t\t \t}\n\t\t\t\t\t\t }\n\t\t\t\t\t})\n\n\t\t\t\t\t\tvar bt=jQuery('body').find('#'+opt.container.attr('id')).find('.tp-bannertimer');\n\t\t\t\t\t\tbt.data('opt',opt);\n\n\n\t\t\t\t}", "function animateTheCaptions(nextli, opt,recalled) {\n\n\t\t\t\t\t\tvar offsetx=0;\n\t\t\t\t\t\tvar offsety=0;\n\n\t\t\t\t\t\tnextli.find('.tp-caption').each(function(i) {\n\n\n\t\t\t\t\t\t\t\toffsetx = opt.width/2 - (opt.startwidth*opt.bw)/2;\n\n\n\n\t\t\t\t\t\t\t\tvar xbw = opt.bw;\n\t\t\t\t\t\t\t\tvar xbh = opt.bh;\n\n\n\t\t\t\t\t\t\t\tif (opt.fullScreen==\"on\")\n\t\t\t\t\t\t\t\t\t offsety = opt.height/2 - (opt.startheight*opt.bh)/2;\n\n\t\t\t\t\t\t\t\tif (opt.autoHeight==\"on\")\n\t\t\t\t\t\t\t\t\t offsety = opt.container.height()/2 - (opt.startheight*opt.bh)/2;;\n\n\t\t\t\t\t\t\t\tif (offsety<0) offsety=0;\n\n\t\t\t\t\t\t\t\tvar nextcaption=jQuery(this);//nextli.find('.tp-caption:eq('+i+')');\n\n\t\t\t\t\t\t\t\tvar handlecaption=0;\n\n\t\t\t\t\t\t\t\t// HIDE CAPTION IF RESOLUTION IS TOO LOW\n\t\t\t\t\t\t\t\tif (opt.width<opt.hideCaptionAtLimit && nextcaption.data('captionhidden')==\"on\") {\n\t\t\t\t\t\t\t\t\tnextcaption.addClass(\"tp-hidden-caption\")\n\t\t\t\t\t\t\t\t\thandlecaption=1;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif (opt.width<opt.hideAllCaptionAtLimit || opt.width<opt.hideAllCaptionAtLilmit)\t{\n\t\t\t\t\t\t\t\t\t\tnextcaption.addClass(\"tp-hidden-caption\")\n\t\t\t\t\t\t\t\t\t\thandlecaption=1;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tnextcaption.removeClass(\"tp-hidden-caption\")\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\tif (handlecaption==0) {\n\n\t\t\t\t\t\t\t\t\t// ADD A CLICK LISTENER TO THE CAPTION\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('linktoslide')!=undefined && !nextcaption.hasClass(\"hasclicklistener\")) {\n\t\t\t\t\t\t\t\t\t\tnextcaption.addClass(\"hasclicklistener\")\n\t\t\t\t\t\t\t\t\t\tnextcaption.css({'cursor':'pointer'});\n\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('linktoslide')!=\"no\") {\n\t\t\t\t\t\t\t\t\t\t\tnextcaption.click(function() {\n\t\t\t\t\t\t\t\t\t\t\t\tvar nextcaption=jQuery(this);\n\t\t\t\t\t\t\t\t\t\t\t\tvar dir = nextcaption.data('linktoslide');\n\t\t\t\t\t\t\t\t\t\t\t\tif (dir!=\"next\" && dir!=\"prev\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.data('showus',dir);\n\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.parent().find('.tp-rightarrow').click();\n\t\t\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (dir==\"next\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.parent().find('.tp-rightarrow').click();\n\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (dir==\"prev\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.parent().find('.tp-leftarrow').click();\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}// END OF CLICK LISTENER\n\n\n\t\t\t\t\t\t\t\t\tif (offsetx<0) offsetx=0;\n\n\n\t\t\t\t\t\t\t\t\t// YOUTUBE AND VIMEO LISTENRES INITIALISATION\n\n\t\t\t\t\t\t\t\t\tvar frameID = \"iframe\"+Math.round(Math.random()*1000+1);\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.find('iframe').length>0 || nextcaption.find('video').length>0) {\n\n\n\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplayonlyfirsttime') == true || nextcaption.data('autoplayonlyfirsttime')==\"true\" ) {\n\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('autoplay',true);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tnextcaption.find('iframe').each(function() {\n\t\t\t\t\t\t\t\t\t\t\t\tvar ifr=jQuery(this);\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (is_mobile()) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar oldsrc = ifr.attr('src');\n\t\t\t\t\t\t\t\t\t\t\t\t\tifr.attr('src',\"\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tifr.attr('src',oldsrc);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t// START YOUTUBE HANDLING\n\t\t\t\t\t\t\t\t\t\t\t\topt.nextslideatend = nextcaption.data('nextslideatend');\n\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('thumbimage')!=undefined && nextcaption.data('thumbimage').length>2 && nextcaption.data('autoplay')!=true && !recalled) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.tp-thumb-image').remove();\n\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.append('<div class=\"tp-thumb-image\" style=\"cursor:pointer; position:absolute;top:0px;left:0px;width:100%;height:100%;background-image:url('+nextcaption.data('thumbimage')+'); background-size:cover\"></div>');\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (ifr.attr('src').toLowerCase().indexOf('youtube')>=0) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t//\tif (is_mobile()) ifr.attr('src',ifr.attr('src').replace(\"enablejsapi=1\",\"\"));\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (!ifr.hasClass(\"HasListener\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.attr('id',frameID);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar player;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar ytint = setInterval(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (YT !=undefined)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (typeof YT.Player != undefined && typeof YT.Player !=\"undefined\") {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer = new YT.Player(frameID, {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tevents: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"onStateChange\": onPlayerStateChange,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'onReady': function(event) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tevent.target.playVideo();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer = new YT.Player(frameID, {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tevents: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"onStateChange\": onPlayerStateChange\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.addClass(\"HasListener\");\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('player',player);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclearInterval(ytint);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t, 100)\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} catch(e) {}\n\t\t\t\t\t\t\t\t\t\t\t\t\t } else {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar player=nextcaption.data('player');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('timerplay',setTimeout(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('forcerewind')==\"on\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer.seekTo(0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer.playVideo();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},nextcaption.data('start')));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t } // END YOUTUBE HANDLING\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t // PLAY VIDEO IF THUMBNAIL HAS BEEN CLICKED\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.find('.tp-thumb-image').click(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t TweenLite.to(jQuery(this),0.3,{opacity:0,ease:Power3.easeInOut,onComplete: function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.find('.tp-thumb-image').remove();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var player=nextcaption.data('player');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t player.playVideo();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// START VIMEO HANDLING\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (ifr.attr('src').toLowerCase().indexOf('vimeo')>=0) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (!ifr.hasClass(\"HasListener\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.addClass(\"HasListener\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.attr('id',frameID);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar isrc = ifr.attr('src');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar queryParameters = {}, queryString = isrc,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tre = /([^&=]+)=([^&]*)/g, m;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Creates a map with the query string parameters\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twhile (m = re.exec(queryString)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tqueryParameters[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (queryParameters['player_id']!=undefined)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisrc = isrc.replace(queryParameters['player_id'],frameID);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisrc=isrc+\"&player_id=\"+frameID;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry{ isrc = isrc.replace('api=0','api=1'); } catch(e) {}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisrc=isrc+\"&api=1\";\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.attr('src',isrc);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar player = nextcaption.find('iframe')[0];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar vimint = setInterval(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($f !=undefined)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (typeof $f(frameID).api != undefined && typeof $f(frameID).api !=\"undefined\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$f(player).addEvent('ready', function(){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvimeoready_auto(frameID,nextcaption.data('autoplay'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclearInterval(vimint);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},100);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar ifr = nextcaption.find('iframe');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar id = ifr.attr('id');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar vimint = setInterval(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($f !=undefined)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (typeof $f(id).api != undefined && typeof $f(id).api !=\"undefined\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar froogaloop = $f(id);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('timerplay',setTimeout(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('forcerewind')==\"on\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfroogaloop.api(\"seekTo\",0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfroogaloop.api(\"play\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},nextcaption.data('start')));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclearInterval(vimint);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},100);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }// END HAS LISTENER HANDLING\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // PLAY VIDEO IF THUMBNAIL HAS BEEN CLICKED\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.find('.tp-thumb-image').click(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t TweenLite.to(jQuery(this),0.3,{opacity:0,ease:Power3.easeInOut,onComplete: function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.find('.tp-thumb-image').remove();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var ifr = nextcaption.find('iframe');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var id = ifr.attr('id');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var vimint = setInterval(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($f !=undefined)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (typeof $f(id).api != undefined && typeof $f(id).api !=\"undefined\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var froogaloop = $f(id);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t froogaloop.api(\"play\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t clearInterval(vimint);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t },100);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t })\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t} // END OF VIMEO HANDLING\n\t\t\t\t\t\t\t\t\t\t\t} // END OF CHOOSE BETWEEN YOUTUBE AND VIMEO\n\t\t\t\t\t\t\t\t\t\t}); // END OF LOOP THROUGH IFRAMES\n\n\t\t\t\t\t\t\t\t\t\t// START OF VIDEO JS\n\t\t\t\t\t\t\t\t\t\tif (nextcaption.find('video').length>0) {\n\n\n\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('video').each(function(i) {\n\n\t\t\t\t\t\t\t\t\t\t\t\tvar jvideo = jQuery(this);\n\t\t\t\t\t\t\t\t\t\t\t\tvar video = this;\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (!jvideo.parent().hasClass(\"html5vid\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tjvideo.wrap('<div class=\"html5vid\" style=\"position:relative;top:0px;left:0px;width:auto;height:auto\"></div>');\n\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tvar html5vid = jQuery(this).parent();\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (video.addEventListener)\n\t\t\t\t\t\t\t\t\t\t\t\t\tvideo.addEventListener(\"loadedmetadata\",function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.data('metaloaded',1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\tvideo.attachEvent(\"loadedmetadata\",function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.data('metaloaded',1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (!jvideo.hasClass(\"HasListener\")) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjvideo.addClass(\"HasListener\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideo.addEventListener(\"play\",function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.addClass(\"videoisplaying\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.find('.tp-poster').remove();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('volume')==\"mute\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t video.muted=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.trigger('revolution.slide.onvideoplay');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.videoplaying=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.trigger('stoptimer');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideo.addEventListener(\"pause\",function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.removeClass(\"videoisplaying\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.videoplaying=false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.trigger('playtimer');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.trigger('revolution.slide.onvideostop');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideo.addEventListener(\"ended\",function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.removeClass(\"videoisplaying\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.videoplaying=false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.trigger('playtimer');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.trigger('revolution.slide.onvideostop');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (opt.nextslideatend==true)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.revnext();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (jvideo.attr('poster')!=undefined && html5vid.find('.tp-poster').length==0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.append('<div class=\"tp-poster\" style=\"position:absolute;z-index:1;width:100%;height:100%;top:0px;left:0px;background:url('+jvideo.attr('poster')+'); background-position:center center;background-size:100%;background-repeat:no-repeat;\"></div>');\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (jvideo.attr('control') == undefined && html5vid.find('.tp-video-play-button').length==0) {\n\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.append('<div class=\"tp-video-play-button\"><i class=\"revicon-right-dir\"></i><div class=\"tp-revstop\"></div></div>');\n\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.find('.tp-video-play-button').click(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.hasClass(\"videoisplaying\"))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideo.pause();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideo.play();\n\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (jvideo.attr('control') == undefined) {\n\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.find('video, .tp-poster').click(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.hasClass(\"videoisplaying\"))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideo.pause();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideo.play();\n\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('forcecover')==1) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tupdateHTML5Size(html5vid,opt.container);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.addClass(\"fullcoveredvideo\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.addClass(\"fullcoveredvideo\");\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('forcecover')==1 || nextcaption.hasClass('fullscreenvideo')) {\n\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.css({width:\"100%\", height:\"100%\"});\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\t\t\tvar autoplaywason = false;\n\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplayonlyfirsttime') == true || nextcaption.data('autoplayonlyfirsttime')==\"true\")\n\t\t\t\t\t\t\t\t\t\t\t\t\tautoplaywason = true;\n\n\t\t\t\t\t\t\t\t\t\t\t\tclearInterval(html5vid.data('interval'));\n\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.data('interval',setInterval(function() {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.data('metaloaded')==1 || video.duration!=NaN) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclearInterval(html5vid.data('interval'));\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('dottedoverlay')!=\"none\" && nextcaption.data('dottedoverlay')!=undefined)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.find('.tp-dottedoverlay').length!=1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.append('<div class=\"tp-dottedoverlay '+nextcaption.data('dottedoverlay')+'\"></div>');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar mediaaspect=16/9;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('aspectratio')==\"4:3\") mediaaspect=4/3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.data('mediaAspect',mediaaspect);\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.closest('.tp-caption').data('forcecover')==1) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tupdateHTML5Size(html5vid,opt.container);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.addClass(\"fullcoveredvideo\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjvideo.css({display:\"block\"});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.nextslideatend = nextcaption.data('nextslideatend');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// IF VIDEO SHOULD BE AUTOPLAYED\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true || autoplaywason==true) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar bt=jQuery('body').find('#'+opt.container.attr('id')).find('.tp-bannertimer');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.videoplaying=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.trigger('stoptimer');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},200);\n\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('forcerewind')==\"on\" && !html5vid.hasClass(\"videoisplaying\"))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (video.currentTime>0) video.currentTime=0;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('volume')==\"mute\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideo.muted = true;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.data('timerplay',setTimeout(function() {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('forcerewind')==\"on\" && !html5vid.hasClass(\"videoisplaying\"))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (video.currentTime>0) video.currentTime=0;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('volume')==\"mute\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideo.muted = true;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function() {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideo.play();\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},500);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},10+nextcaption.data('start')));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.data('ww') == undefined) html5vid.data('ww',jvideo.attr('width'));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.data('hh') == undefined) html5vid.data('hh',jvideo.attr('height'));\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!nextcaption.hasClass(\"fullscreenvideo\") && nextcaption.data('forcecover')==1) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.width(html5vid.data('ww')*opt.bw);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.height(html5vid.data('hh')*opt.bh);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} catch(e) {}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclearInterval(html5vid.data('interval'));\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}),100);\n\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t} // END OF VIDEO JS FUNCTIONS\n\n\t\t\t\t\t\t\t\t\t\t\t// IF AUTOPLAY IS ON, WE NEED SOME STOP FUNCTION ON\n\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar bt=jQuery('body').find('#'+opt.container.attr('id')).find('.tp-bannertimer');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function() {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.videoplaying=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.trigger('stoptimer');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t},200)\n\t\t\t\t\t\t\t\t\t\t\t\t\topt.videoplaying=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.trigger('stoptimer');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplayonlyfirsttime') == true || nextcaption.data('autoplayonlyfirsttime')==\"true\" ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('autoplay',false);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('autoplayonlyfirsttime',false);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\n\n\n\t\t\t\t\t\t\t\t\t// NEW ENGINE\n\t\t\t\t\t\t\t\t\t//if (nextcaption.hasClass(\"randomrotate\") && (opt.ie || opt.ie9)) nextcaption.removeClass(\"randomrotate\").addClass(\"sfb\");\n\t\t\t\t\t\t\t\t\t//\tnextcaption.removeClass('noFilterClass');\n\n\n\n\t\t\t\t\t\t\t\t var imw =0;\n\t\t\t\t\t\t\t\t var imh = 0;\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.find('img').length>0) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar im = nextcaption.find('img');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (im.data('ww') == undefined) im.data('ww',im.width());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (im.data('hh') == undefined) im.data('hh',im.height());\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar ww = im.data('ww');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar hh = im.data('hh');\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.width(ww*opt.bw);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.height(hh*opt.bh);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\timw = im.width();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\timh = im.height();\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.find('iframe').length>0 || nextcaption.find('video').length>0) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar html5vid = false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar im = nextcaption.find('iframe');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (im.length==0) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tim = nextcaption.find('video');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid = true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.css({display:\"block\"});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('ww') == undefined) nextcaption.data('ww',im.width());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('hh') == undefined) nextcaption.data('hh',im.height());\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar ww = nextcaption.data('ww');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar hh = nextcaption.data('hh');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar nc =nextcaption;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('fsize') == undefined) nc.data('fsize',parseInt(nc.css('font-size'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('pt') == undefined) nc.data('pt',parseInt(nc.css('paddingTop'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('pb') == undefined) nc.data('pb',parseInt(nc.css('paddingBottom'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('pl') == undefined) nc.data('pl',parseInt(nc.css('paddingLeft'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('pr') == undefined) nc.data('pr',parseInt(nc.css('paddingRight'),0) || 0);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('mt') == undefined) nc.data('mt',parseInt(nc.css('marginTop'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('mb') == undefined) nc.data('mb',parseInt(nc.css('marginBottom'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('ml') == undefined) nc.data('ml',parseInt(nc.css('marginLeft'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('mr') == undefined) nc.data('mr',parseInt(nc.css('marginRight'),0) || 0);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('bt') == undefined) nc.data('bt',parseInt(nc.css('borderTop'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('bb') == undefined) nc.data('bb',parseInt(nc.css('borderBottom'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('bl') == undefined) nc.data('bl',parseInt(nc.css('borderLeft'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('br') == undefined) nc.data('br',parseInt(nc.css('borderRight'),0) || 0);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('lh') == undefined) nc.data('lh',parseInt(nc.css('lineHeight'),0) || 0);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar fvwidth=opt.width;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar fvheight=opt.height;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (fvwidth>opt.startwidth) fvwidth=opt.startwidth;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (fvheight>opt.startheight) fvheight=opt.startheight;\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!nextcaption.hasClass('fullscreenvideo'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'font-size': (nc.data('fsize') * opt.bw)+\"px\",\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'padding-top': (nc.data('pt') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'padding-bottom': (nc.data('pb') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'padding-left': (nc.data('pl') * opt.bw) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'padding-right': (nc.data('pr') * opt.bw) + \"px\",\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'margin-top': (nc.data('mt') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'margin-bottom': (nc.data('mb') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'margin-left': (nc.data('ml') * opt.bw) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'margin-right': (nc.data('mr') * opt.bw) + \"px\",\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'border-top': (nc.data('bt') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'border-bottom': (nc.data('bb') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'border-left': (nc.data('bl') * opt.bw) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'border-right': (nc.data('br') * opt.bw) + \"px\",\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'line-height': (nc.data('lh') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'height':(hh*opt.bh)+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t offsetx=0; offsety=0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.data('x',0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.data('y',0)\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var ovhh = opt.height\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (opt.autoHeight==\"on\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\tovhh = opt.container.height()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'width':opt.width,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'height':ovhh\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid == false) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.width(ww*opt.bw);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.height(hh*opt.bh);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('forcecover')!=1 && !nextcaption.hasClass('fullscreenvideo')) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.width(ww*opt.bw);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.height(hh*opt.bh);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\timw = im.width();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\timh = im.height();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\telse {\n\n\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.tp-resizeme, .tp-resizeme *').each(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcalcCaptionResponsive(jQuery(this),opt);\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"tp-resizeme\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('*').each(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcalcCaptionResponsive(jQuery(this),opt);\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tcalcCaptionResponsive(nextcaption,opt);\n\n\t\t\t\t\t\t\t\t\t\t\t\timh=nextcaption.outerHeight(true);\n\t\t\t\t\t\t\t\t\t\t\t\timw=nextcaption.outerWidth(true);\n\n\t\t\t\t\t\t\t\t\t\t\t\t// NEXTCAPTION FRONTCORNER CHANGES\n\t\t\t\t\t\t\t\t\t\t\t\tvar ncch = nextcaption.outerHeight();\n\t\t\t\t\t\t\t\t\t\t\t\tvar bgcol = nextcaption.css('backgroundColor');\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.frontcorner').css({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderWidth':ncch+\"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'left':(0-ncch)+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderRight':'0px solid transparent',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderTopColor':bgcol\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.frontcornertop').css({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderWidth':ncch+\"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'left':(0-ncch)+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderRight':'0px solid transparent',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderBottomColor':bgcol\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t// NEXTCAPTION BACKCORNER CHANGES\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.backcorner').css({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderWidth':ncch+\"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'right':(0-ncch)+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderLeft':'0px solid transparent',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderBottomColor':bgcol\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t// NEXTCAPTION BACKCORNER CHANGES\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.backcornertop').css({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderWidth':ncch+\"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'right':(0-ncch)+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderLeft':'0px solid transparent',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderTopColor':bgcol\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t }\n\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (opt.fullScreenAlignForce == \"on\") {\n\t\t\t\t\t\t\t\t\t\t//xbw = 1;\n\t\t\t\t\t\t\t\t\t\t//xbh = 1;\n\t\t\t\t\t\t\t\t\t\toffsetx=0;\n\t\t\t\t\t\t\t\t\t\toffsety=0;\n\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('voffset')==undefined) nextcaption.data('voffset',0);\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('hoffset')==undefined) nextcaption.data('hoffset',0);\n\n\t\t\t\t\t\t\t\t\tvar vofs= nextcaption.data('voffset')*xbw;\n\t\t\t\t\t\t\t\t\tvar hofs= nextcaption.data('hoffset')*xbw;\n\n\t\t\t\t\t\t\t\t\tvar crw = opt.startwidth*xbw;\n\t\t\t\t\t\t\t\t\tvar crh = opt.startheight*xbw;\n\n\t\t\t\t\t\t\t\t\tif (opt.fullScreenAlignForce == \"on\") {\n\t\t\t\t\t\t\t\t\t\tcrw = opt.container.width();\n\t\t\t\t\t\t\t\t\t\tcrh = opt.container.height();\n\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t\t// CENTER THE CAPTION HORIZONTALLY\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('x')==\"center\" || nextcaption.data('xcenter')=='center') {\n\t\t\t\t\t\t\t\t\t\tnextcaption.data('xcenter','center');\n\t\t\t\t\t\t\t\t\t\t//nextcaption.data('x',(crw/2 - nextcaption.outerWidth(true)/2)/xbw+ hofs);\n\t\t\t\t\t\t\t\t\t\tnextcaption.data('x',(crw/2 - nextcaption.outerWidth(true)/2) + hofs);\n\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// ALIGN LEFT THE CAPTION HORIZONTALLY\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('x')==\"left\" || nextcaption.data('xleft')=='left') {\n\t\t\t\t\t\t\t\t\t\tnextcaption.data('xleft','left');\n\n\t\t\t\t\t\t\t\t\t\tnextcaption.data('x',(0)/xbw+hofs);\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// ALIGN RIGHT THE CAPTION HORIZONTALLY\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('x')==\"right\" || nextcaption.data('xright')=='right') {\n\t\t\t\t\t\t\t\t\t\tnextcaption.data('xright','right');\n\t\t\t\t\t\t\t\t\t\tnextcaption.data('x',((crw - nextcaption.outerWidth(true))+hofs)/xbw);\n\t\t\t\t\t\t\t\t\t\t//konsole.log(\"crw:\"+crw+\" width:\"+nextcaption.outerWidth(true)+\" xbw:\"+xbw);\n\t\t\t\t\t\t\t\t\t\t//konsole.log(\"x-pos:\"+nextcaption.data('x'))\n\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t// CENTER THE CAPTION VERTICALLY\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('y')==\"center\" || nextcaption.data('ycenter')=='center') {\n\t\t\t\t\t\t\t\t\t\tnextcaption.data('ycenter','center');\n\t\t\t\t\t\t\t\t\t\tnextcaption.data('y',(crh/2 - nextcaption.outerHeight(true)/2) + vofs);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// ALIGN TOP THE CAPTION VERTICALLY\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('y')==\"top\" || nextcaption.data('ytop')=='top') {\n\t\t\t\t\t\t\t\t\t\tnextcaption.data('ytop','top');\n\t\t\t\t\t\t\t\t\t\tnextcaption.data('y',(0)/opt.bh+vofs);\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// ALIGN BOTTOM THE CAPTION VERTICALLY\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('y')==\"bottom\" || nextcaption.data('ybottom')=='bottom') {\n\t\t\t\t\t\t\t\t\t\tnextcaption.data('ybottom','bottom');\n\t\t\t\t\t\t\t\t\t\tnextcaption.data('y',((crh - nextcaption.outerHeight(true))+vofs)/xbw);\n\n\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t\t// THE TRANSITIONS OF CAPTIONS\n\t\t\t\t\t\t\t\t\t// MDELAY AND MSPEED\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('start') == undefined) nextcaption.data('start',1000);\n\n\n\n\t\t\t\t\t\t\t\t\tvar easedata=nextcaption.data('easing');\n\t\t\t\t\t\t\t\t\tif (easedata==undefined) easedata=\"Power1.easeOut\";\n\n\n\t\t\t\t\t\t\t\t\tvar mdelay = nextcaption.data('start')/1000;\n\t\t\t\t\t\t\t\t\tvar mspeed = nextcaption.data('speed')/1000;\n\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('x')==\"center\" || nextcaption.data('xcenter')=='center')\n\t\t\t\t\t\t\t\t\t\tvar calcx = (nextcaption.data('x')+offsetx);\n\t\t\t\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\t\t\t\tvar calcx = (xbw*nextcaption.data('x')+offsetx);\n\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('y')==\"center\" || nextcaption.data('ycenter')=='center')\n\t\t\t\t\t\t\t\t\t\tvar calcy = (nextcaption.data('y')+offsety);\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t//if (opt.fullScreenAlignForce == \"on\" && (nextcaption.data('y')==\"bottom\" || nextcaption.data('ybottom')=='bottom'))\n\t\t\t\t\t\t\t\t\t\t//\topt.bh = 1;\n\n\t\t\t\t\t\t\t\t\t\tvar calcy = (opt.bh*nextcaption.data('y')+offsety);\n\t\t\t\t\t\t\t\t\t}\n\n\n\n\n\t\t\t\t\t\t\tTweenLite.set(nextcaption,{top:calcy,left:calcx,overwrite:\"auto\"});\n\n\t\t\t\t\t\t\tif (!recalled) {\n\n\n\n\t\t\t\t\t\t\t\t\t// CLEAR THE TIMELINE, SINCE IT CAN BE DAMAGED, OR PAUSED AT A FEW PART\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('timeline')!=undefined)\n\t\t\t\t\t\t\t\t\t nextcaption.data('timeline').clear();\n\n\t\t\t\t\t\t\t\t\t// MAKE SURE THE ANIMATION ENDS WITH A CLEANING ON MOZ TRANSFORMS\n\t\t\t\t\t\t\t\t\tfunction animcompleted() {\n\t\t\t\t\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({transform:\"none\",'-moz-transform':'none','-webkit-transform':'none'});\n\t\t\t\t\t\t\t\t\t\t},100)\n\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t function tlstart() {\n\t\t\t\t\t\t\t\t\t nextcaption.data('timer',setTimeout(function() {\n\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"fullscreenvideo\"))\n\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({'display':'block'});\n\n\t\t\t\t\t\t\t\t\t },nextcaption.data('start')));\n\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t\tvar tl = new TimelineLite({smoothChildTiming:true,onStart:tlstart});\n\n\n\n\t\t\t\t\t\t\t\t\tif (opt.fullScreenAlignForce == \"on\") {\n\t\t\t\t\t\t\t\t\t\t//calcy = nextcaption.data('y')+offsety;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tvar animobject = nextcaption;\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('mySplitText') !=undefined) nextcaption.data('mySplitText').revert();\n\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('splitin') == \"chars\" || nextcaption.data('splitin') == \"words\" || nextcaption.data('splitin') == \"lines\" || nextcaption.data('splitout') == \"chars\" || nextcaption.data('splitout') == \"words\" || nextcaption.data('splitout') == \"lines\") {\n\t\t\t\t\t\t\t\t\t\tif (nextcaption.find('a').length>0)\n\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('mySplitText',new SplitText(nextcaption.find('a'),{type:\"lines,words,chars\",charsClass:\"tp-splitted\",wordsClass:\"tp-splitted\",linesClass:\"tp-splitted\"}));\n\t\t\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('mySplitText',new SplitText(nextcaption,{type:\"lines,words,chars\",charsClass:\"tp-splitted\",wordsClass:\"tp-splitted\",linesClass:\"tp-splitted\"}));\n\n\t\t\t\t\t\t\t\t\t\tnextcaption.addClass(\"splitted\");\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('splitin') == \"chars\")\n\t\t\t\t\t\t\t\t\t\tanimobject = nextcaption.data('mySplitText').chars;\n\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('splitin') == \"words\")\n\t\t\t\t\t\t\t\t\t\tanimobject = nextcaption.data('mySplitText').words;\n\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('splitin') == \"lines\")\n\t\t\t\t\t\t\t\t\t\tanimobject = nextcaption.data('mySplitText').lines;\n\n\n\n\t\t\t\t\t\t\t\t\tvar frm = newAnimObject();\n\t\t\t\t\t\t\t\t\tvar endfrm = newAnimObject();\n\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('repeat')!=undefined) repeatV = nextcaption.data('repeat');\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('yoyo')!=undefined) yoyoV = nextcaption.data('yoyo');\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('repeatdelay')!=undefined) repeatdelayV = nextcaption.data('repeatdelay');\n\n\t\t\t\t\t\t\t\t\t// WHICH ANIMATION TYPE SHOULD BE USED\n\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"customin\")) frm = getAnimDatas(frm,nextcaption.data('customin'));\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"randomrotate\")) {\n\n\t\t\t\t\t\t\t\t\t\t\t\tfrm.scale = Math.random()*3+1;\n\t\t\t\t\t\t\t\t\t\t\t\tfrm.rotation = Math.round(Math.random()*200-100);\n\t\t\t\t\t\t\t\t\t\t\t\tfrm.x = Math.round(Math.random()*200-100);\n\t\t\t\t\t\t\t\t\t\t\t\tfrm.y = Math.round(Math.random()*200-100);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('lfr') || nextcaption.hasClass('skewfromright')) frm.x = 15+opt.width;\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('lfl') || nextcaption.hasClass('skewfromleft')) frm.x = -15-imw;\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('sfl') || nextcaption.hasClass('skewfromleftshort')) frm.x = -50;\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('sfr') || nextcaption.hasClass('skewfromrightshort')) frm.x = 50;\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('lft')) frm.y = -25 - imh;\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('lfb')) frm.y = 25 + opt.height;\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('sft')) frm.y = -50;\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('sfb')) frm.y = 50;\n\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('skewfromright') || nextcaption.hasClass('skewfromrightshort')) frm.skewX = -85\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('skewfromleft') || nextcaption.hasClass('skewfromleftshort')) frm.skewX = 85\n\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"fade\") || nextcaption.hasClass('sft') || nextcaption.hasClass('sfl') || nextcaption.hasClass('sfb') || nextcaption.hasClass('skewfromleftshort') || nextcaption.hasClass('sfr') || nextcaption.hasClass('skewfromrightshort'))\n\t\t\t\t\t\t\t\t\t\tfrm.opacity = 0;\n\n\t\t\t\t\t\t\t\t\t// FOR SAFARI WE NEED TO REMOVE 3D ROTATIONS\n\t\t\t\t\t\t\t\t\tif (get_browser().toLowerCase()==\"safari\") {\n\t\t\t\t\t\t\t\t\t\tfrm.rotationX=0;frm.rotationY=0;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tvar elemdelay = (nextcaption.data('elementdelay') == undefined) ? 0 : nextcaption.data('elementdelay');\n\t\t\t\t\t\t\t\t\tendfrm.ease = frm.ease = (nextcaption.data('easing') == undefined) ? Power1.easeInOut : nextcaption.data('easing');\n\n\n\t\t\t\t\t\t\t\t\t// DISTANCES SHOULD BE RESIZED ALSO\n\n\t\t\t\t\t\t\t\t\tfrm.data = new Object();\n\t\t\t\t\t\t\t\t\tfrm.data.oldx = frm.x;\n\t\t\t\t\t\t\t\t\tfrm.data.oldy = frm.y;\n\n\t\t\t\t\t\t\t\t\tendfrm.data = new Object();\n\t\t\t\t\t\t\t\t\tendfrm.data.oldx = endfrm.x;\n\t\t\t\t\t\t\t\t\tendfrm.data.oldy = endfrm.y;\n\n\t\t\t\t\t\t\t\t\tfrm.x = frm.x * xbw;\n\t\t\t\t\t\t\t\t\tfrm.y = frm.y * xbw;\n\n\t\t\t\t\t\t\t\t\tvar newtl = new TimelineLite();\n\n\n\n\t\t\t\t\t\t\t\t\t// CHANGE to TweenLite. if Yoyo and Repeat is used. Dont forget to laod the Right Tools for it !!\n\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"customin\")) {\n\t\t\t\t\t\t\t\t\t\t if (animobject != nextcaption)\n\t\t\t\t\t\t\t\t\t\t\t tl.add(TweenLite.set(nextcaption, { opacity:1,scaleX:1,scaleY:1,rotationX:0,rotationY:0,rotationZ:0,skewX:0,skewY:0,z:0,x:0,y:0,visibility:'visible',opacity:1,delay:0,overwrite:\"all\"}));\n\t\t\t\t\t\t\t\t\t\t frm.visibility = \"hidden\";\n\t\t\t\t\t\t\t\t\t\t endfrm.visibility = \"visible\";\n\t\t\t\t\t\t\t\t\t\t endfrm.overwrite = \"all\";\n\t\t\t\t\t\t\t\t\t\t endfrm.opacity = 1;\n\t\t\t\t\t\t\t\t\t\t endfrm.onComplete = animcompleted();\n\t\t\t\t\t\t\t\t\t\t endfrm.delay = mdelay;\n\n\t\t\t\t\t\t\t\t\t\t tl.add(newtl.staggerFromTo(animobject,mspeed,frm,endfrm,elemdelay),\"frame0\");\n\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\tfrm.visibility = \"visible\";\n\t\t\t\t\t\t\t\t\t\t\tfrm.transformPerspective = 600;\n\t\t\t\t\t\t\t\t\t\t\tif (animobject != nextcaption)\n\t\t\t\t\t\t\t\t\t\t\t tl.add(TweenLite.set(nextcaption, { opacity:1,scaleX:1,scaleY:1,rotationX:0,rotationY:0,rotationZ:0,skewX:0,skewY:0,z:0,x:0,y:0,visibility:'visible',opacity:1,delay:0,overwrite:\"all\"}));\n\n\t\t\t\t\t\t\t\t\t\t\tendfrm.visibility = \"visible\";\n\t\t\t\t\t\t\t\t\t\t\tendfrm.delay = mdelay;\n\t\t\t\t\t\t\t\t\t\t\tendfrm.onComplete = animcompleted();\n\t\t\t\t\t\t\t\t\t\t\tendfrm.opacity = 1;\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"randomrotate\") && animobject != nextcaption) {\n\n\t\t\t\t\t\t\t\t\t\t\t\tfor (var i=0;i<animobject.length;i++) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar obj =new Object();\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar endobj = new Object();\n\t\t\t\t\t\t\t\t\t\t\t\t\tjQuery.extend(obj,frm);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjQuery.extend(endobj,endfrm);\n\t\t\t\t\t\t\t\t\t\t\t\t\tfrm.scale = Math.random()*3+1;\n\t\t\t\t\t\t\t\t\t\t\t\t\tfrm.rotation = Math.round(Math.random()*200-100);\n\t\t\t\t\t\t\t\t\t\t\t\t\tfrm.x = Math.round(Math.random()*200-100);\n\t\t\t\t\t\t\t\t\t\t\t\t\tfrm.y = Math.round(Math.random()*200-100);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (i!=0) endobj.delay = mdelay + (i*elemdelay);\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\ttl.append(TweenLite.fromTo(animobject[i],mspeed,obj,endobj),\"frame0\");\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t}\telse\n\t\t\t\t\t\t\t\t\t\t\ttl.add(newtl.staggerFromTo(animobject,mspeed,frm,endfrm,elemdelay),\"frame0\");\n\t\t\t\t\t\t\t\t\t\t\t//tl.add(TweenLite.fromTo(nextcaption,mspeed,frm,endfrm),\"frame0\");\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// SAVE IT TO NCAPTION BEFORE NEW STEPS WILL BE ADDED\n\t\t\t\t\t\t\t\t\tnextcaption.data('timeline',tl);\n\n\t\t\t\t\t\t\t\t\t// FURTHER ANIMATIONS IN CASE THERE ARE MORE THAN ONE STEP IN THE ANIMATION CHAIN\n\t\t\t\t\t\t\t\t\tvar frames = new Array();\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('frames')!=undefined) {\n\t\t\t\t\t\t\t\t\t\tvar rowtext = nextcaption.data('frames');\n\t\t\t\t\t\t\t\t\t\trowtext = rowtext.replace(/\\s+/g, '');\n\t\t\t\t\t\t\t\t\t\trowtext = rowtext.replace(\"{\",\"\");\n\t\t\t\t\t\t\t\t\t\tvar spframes = rowtext.split('}');\n\t\t\t\t\t\t\t\t\t\tjQuery.each(spframes,function(index,spframe){\n\t\t\t\t\t\t\t\t\t\t\tif (spframe.length>0) {\n\t\t\t\t\t\t\t\t\t\t\t\tvar params = getAnimSteps(spframe);\n\n\t\t\t\t\t\t\t\t\t\t\t\taddMoveCaption(nextcaption,opt,params,\"frame\"+(index+10),xbw)\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t} // END OF ANIMATION STEPS\n\n\t\t\t\t\t\t\t\t\ttl = nextcaption.data('timeline');\n\n\t\t\t\t\t\t\t\t\t// IF THERE IS ANY EXIT ANIM DEFINED\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('end')!=undefined) {\n\n\t\t\t\t\t\t\t\t\t\tendMoveCaption(nextcaption,opt,nextcaption.data('end')/1000,frm,\"frame99\",xbw);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tendMoveCaption(nextcaption,opt,999999,frm,\"frame99\",xbw);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// SAVE THE TIMELINE IN DOM ELEMENT\n\t\t\t\t\t\t\t\t\ttl = nextcaption.data('timeline');\n\t\t\t\t\t\t\t\t\tnextcaption.data('timeline',tl);\n\n\t\t\t\t\t\t\t\t\t// SOME LOOPING ANIMATION ON INTERNAL ELEMENTS\n\t\t\t\t\t\t\t\t\tnextcaption.find('.rs-pendulum').each(function() {\n\t\t\t\t\t\t\t\t\t\tvar el = jQuery(this);\n\t\t\t\t\t\t\t\t\t\tif (el.data('timeline')==undefined) {\n\t\t\t\t\t\t\t\t\t\t\tel.data('timeline',new TimelineLite);\n\t\t\t\t\t\t\t\t\t\t\tvar startdeg = el.data('startdeg')==undefined ? -20 : el.data('startdeg'),\n\t\t\t\t\t\t\t\t\t\t\t\tenddeg = el.data('enddeg')==undefined ? 20 : el.data('enddeg');\n\t\t\t\t\t\t\t\t\t\t\t\tspeed = el.data('speed')==undefined ? 2 : el.data('speed'),\n\t\t\t\t\t\t\t\t\t\t\t\torigin = el.data('origin')==undefined ? \"50% 50%\" : el.data('origin'),\n\t\t\t\t\t\t\t\t\t\t\t\teasing = el.data('ease')==undefined ? Power2.easeInOut : el.data('ease');\n\t\t\t\t\t\t\t\t\t\t\tel.data('timeline').append(new TweenLite.fromTo(el,speed,{rotation:startdeg,transformOrigin:origin},{rotation:enddeg,ease:easing}));\n\t\t\t\t\t\t\t\t\t\t\tel.data('timeline').append(new TweenLite.fromTo(el,speed,{rotation:enddeg,transformOrigin:origin},{rotation:startdeg,ease:easing,onComplete:function() {\n\t\t\t\t\t\t\t\t\t\t\t\tel.data('timeline').restart();\n\t\t\t\t\t\t\t\t\t\t\t}}));\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t\t\t\t// SOME LOOPING ANIMATION ON INTERNAL ELEMENTS\n\t\t\t\t\t\t\t\t\tnextcaption.find('.rs-slideloop').each(function() {\n\t\t\t\t\t\t\t\t\t\tvar el = jQuery(this);\n\t\t\t\t\t\t\t\t\t\tif (el.data('timeline')==undefined) {\n\t\t\t\t\t\t\t\t\t\t\tel.data('timeline',new TimelineLite);\n\t\t\t\t\t\t\t\t\t\t\tvar xs = el.data('xs')==undefined ? 0 : el.data('xs'),\n\t\t\t\t\t\t\t\t\t\t\t\tys = el.data('ys')==undefined ? 0 : el.data('ys');\n\t\t\t\t\t\t\t\t\t\t\t\txe = el.data('xe')==undefined ? 0 : el.data('xe'),\n\t\t\t\t\t\t\t\t\t\t\t\tye = el.data('ye')==undefined ? 0 : el.data('ye'),\n\t\t\t\t\t\t\t\t\t\t\t\tspeed = el.data('speed')==undefined ? 2 : el.data('speed'),\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\teasing = el.data('ease')==undefined ? Power2.easeInOut : el.data('ease');\n\t\t\t\t\t\t\t\t\t\t\tel.data('timeline').append(new TweenLite.fromTo(el,speed,{x:xs,y:ys},{x:xe,y:ye,ease:easing}));\n\t\t\t\t\t\t\t\t\t\t\tel.data('timeline').append(new TweenLite.fromTo(el,speed,{x:xe,y:ye},{x:xs,y:ys,onComplete:function() {\n\t\t\t\t\t\t\t\t\t\t\t\tel.data('timeline').restart();\n\t\t\t\t\t\t\t\t\t\t\t}}));\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// SOME LOOPING ANIMATION ON INTERNAL ELEMENTS\n\t\t\t\t\t\t\t\t\tnextcaption.find('.rs-pulse').each(function() {\n\t\t\t\t\t\t\t\t\t\tvar el = jQuery(this);\n\t\t\t\t\t\t\t\t\t\tif (el.data('timeline')==undefined) {\n\t\t\t\t\t\t\t\t\t\t\tel.data('timeline',new TimelineLite);\n\t\t\t\t\t\t\t\t\t\t\tvar zoomstart = el.data('zoomstart')==undefined ? 0 : el.data('zoomstart'),\n\t\t\t\t\t\t\t\t\t\t\t\tzoomend = el.data('zoomend')==undefined ? 0 : el.data('zoomend');\n\t\t\t\t\t\t\t\t\t\t\t\tspeed = el.data('speed')==undefined ? 2 : el.data('speed'),\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\teasing = el.data('ease')==undefined ? Power2.easeInOut : el.data('ease');\n\t\t\t\t\t\t\t\t\t\t\tel.data('timeline').append(new TweenLite.fromTo(el,speed,{scale:zoomstart},{scale:zoomend,ease:easing}));\n\t\t\t\t\t\t\t\t\t\t\tel.data('timeline').append(new TweenLite.fromTo(el,speed,{scale:zoomend},{scale:zoomstart,onComplete:function() {\n\t\t\t\t\t\t\t\t\t\t\t\tel.data('timeline').restart();\n\t\t\t\t\t\t\t\t\t\t\t}}));\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tnextcaption.find('.rs-wave').each(function() {\n\t\t\t\t\t\t\t\t\t\tvar el = jQuery(this);\n\t\t\t\t\t\t\t\t\t\tif (el.data('timeline')==undefined) {\n\t\t\t\t\t\t\t\t\t\t\tel.data('timeline',new TimelineLite);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tvar angle= el.data('angle')==undefined ? 10 : el.data('angle'),\n\t\t\t\t\t\t\t\t\t\t\t\tradius = el.data('radius')==undefined ? 10 : el.data('radius'),\n\t\t\t\t\t\t\t\t\t\t\t\tspeed = el.data('speed')==undefined ? -20 : el.data('speed'),\n\t\t\t\t\t\t\t\t\t\t\t\torigin = el.data('origin')==undefined ? -20 : el.data('origin'),\n\t\t\t\t\t\t\t\t\t\t\t\tangobj = {a:0, ang : angle, element:el, unit:radius}; \n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tel.data('timeline').append(new TweenLite.fromTo(angobj,speed,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\ta:360\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\ta:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tease:Linear.easeNone,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonUpdate:function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar rad = angobj.a * (Math.PI / 180);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t TweenLite.to(angobj.element,0.1,{x:Math.cos(rad) * angobj.unit, y:angobj.unit * (1 - Math.sin(rad))});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonComplete:function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tel.data('timeline').restart();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t }\n\n\t\t\t\t\t\t if (recalled) {\n\t\t\t\t\t\t\t \t\tif (nextcaption.data('timeline') != undefined) {\n\t\t\t\t\t\t\t\t \t\tvar tweens = nextcaption.data('timeline').getTweensOf();\n\t\t\t\t\t\t\t\t \t\tjQuery.each(tweens,function(index,tween) {\n\t\t\t\t\t\t\t\t\t \t\tif (tween.vars.data != undefined) {\n\t\t\t\t\t\t\t\t\t \t\t\tvar newx = tween.vars.data.oldx * xbw;\n\t\t\t\t\t\t\t\t\t \t\t\tvar newy = tween.vars.data.oldy * xbw;\n\t\t\t\t\t\t\t\t\t \t\t\tif (tween.progress() !=1 && tween.progress()!=0) {\n\t\t\t\t\t\t\t\t\t \t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t \t\t\t//tween.updateTo({x:newx, y:newy},true);\n\t\t\t\t\t\t\t\t\t\t\t \t\t\ttween.vars.x = newx;\n\t\t\t\t\t\t\t\t\t\t\t \t\t\ttween.vary.y = newy;\n\t\t\t\t\t\t\t\t\t\t\t \t\t } catch(e) {\n\n\t\t\t\t\t\t\t\t\t\t\t \t\t }\n\t\t\t\t\t\t\t\t\t\t \t\t} else {\n\t\t\t\t\t\t\t\t\t\t \t\t\tif (tween.progress()==1) {\n\t\t\t\t\t\t\t\t\t\t\t \t\t\t\tTweenLite.set(tween.target,{x:newx,y:newy});\n\t\t\t\t\t\t\t\t\t\t\t \t\t}\n\t\t\t\t\t\t\t\t\t\t\t \t}\n\t\t\t\t\t\t\t\t\t \t\t}\n\t\t\t\t\t\t\t\t \t\t})\n\t\t\t\t\t\t\t\t \t}\n\t\t\t\t\t\t }\n\t\t\t\t\t})\n\n\t\t\t\t\t\tvar bt=jQuery('body').find('#'+opt.container.attr('id')).find('.tp-bannertimer');\n\t\t\t\t\t\tbt.data('opt',opt);\n\n\n\t\t\t\t}", "function animateTheCaptions(nextli, opt,recalled) {\n\n\t\t\t\t\t\tvar offsetx=0;\n\t\t\t\t\t\tvar offsety=0;\n\n\t\t\t\t\t\tnextli.find('.tp-caption').each(function(i) {\n\n\n\t\t\t\t\t\t\t\toffsetx = opt.width/2 - (opt.startwidth*opt.bw)/2;\n\n\n\n\t\t\t\t\t\t\t\tvar xbw = opt.bw;\n\t\t\t\t\t\t\t\tvar xbh = opt.bh;\n\n\n\t\t\t\t\t\t\t\tif (opt.fullScreen==\"on\")\n\t\t\t\t\t\t\t\t\t offsety = opt.height/2 - (opt.startheight*opt.bh)/2;\n\n\t\t\t\t\t\t\t\tif (opt.autoHeight==\"on\")\n\t\t\t\t\t\t\t\t\t offsety = opt.container.height()/2 - (opt.startheight*opt.bh)/2;;\n\n\t\t\t\t\t\t\t\tif (offsety<0) offsety=0;\n\n\t\t\t\t\t\t\t\tvar nextcaption=jQuery(this);//nextli.find('.tp-caption:eq('+i+')');\n\n\t\t\t\t\t\t\t\tvar handlecaption=0;\n\n\t\t\t\t\t\t\t\t// HIDE CAPTION IF RESOLUTION IS TOO LOW\n\t\t\t\t\t\t\t\tif (opt.width<opt.hideCaptionAtLimit && nextcaption.data('captionhidden')==\"on\") {\n\t\t\t\t\t\t\t\t\tnextcaption.addClass(\"tp-hidden-caption\")\n\t\t\t\t\t\t\t\t\thandlecaption=1;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif (opt.width<opt.hideAllCaptionAtLimit || opt.width<opt.hideAllCaptionAtLilmit)\t{\n\t\t\t\t\t\t\t\t\t\tnextcaption.addClass(\"tp-hidden-caption\")\n\t\t\t\t\t\t\t\t\t\thandlecaption=1;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tnextcaption.removeClass(\"tp-hidden-caption\")\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (handlecaption==0) {\n\n\t\t\t\t\t\t\t\t\t// ADD A CLICK LISTENER TO THE CAPTION\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('linktoslide')!=undefined && !nextcaption.hasClass(\"hasclicklistener\")) {\n\t\t\t\t\t\t\t\t\t\tnextcaption.addClass(\"hasclicklistener\")\n\t\t\t\t\t\t\t\t\t\tnextcaption.css({'cursor':'pointer'});\n\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('linktoslide')!=\"no\") {\n\t\t\t\t\t\t\t\t\t\t\tnextcaption.click(function() {\n\t\t\t\t\t\t\t\t\t\t\t\tvar nextcaption=jQuery(this);\n\t\t\t\t\t\t\t\t\t\t\t\tvar dir = nextcaption.data('linktoslide');\n\t\t\t\t\t\t\t\t\t\t\t\tif (dir!=\"next\" && dir!=\"prev\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.data('showus',dir);\n\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.parent().find('.tp-rightarrow').click();\n\t\t\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (dir==\"next\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.parent().find('.tp-rightarrow').click();\n\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (dir==\"prev\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.parent().find('.tp-leftarrow').click();\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}// END OF CLICK LISTENER\n\n\n\t\t\t\t\t\t\t\t\tif (offsetx<0) offsetx=0;\n\n\n\t\t\t\t\t\t\t\t\t// YOUTUBE AND VIMEO LISTENRES INITIALISATION\n\n\t\t\t\t\t\t\t\t\tvar frameID = \"iframe\"+Math.round(Math.random()*1000+1);\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.find('iframe').length>0 || nextcaption.find('video').length>0) {\n\n\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplayonlyfirsttime') == true || nextcaption.data('autoplayonlyfirsttime')==\"true\" ) {\n\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('autoplay',true);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tnextcaption.find('iframe').each(function() {\n\t\t\t\t\t\t\t\t\t\t\t\tvar ifr=jQuery(this);\n\n\t\t\t\t\t\t\t\t\t\t\t\t// START YOUTUBE HANDLING\n\t\t\t\t\t\t\t\t\t\t\t\topt.nextslideatend = nextcaption.data('nextslideatend');\n\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('thumbimage')!=undefined && nextcaption.data('thumbimage').length>2 && nextcaption.data('autoplay')!=true && !recalled) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.tp-thumb-image').remove();\n\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.append('<div class=\"tp-thumb-image\" style=\"cursor:pointer; position:absolute;top:0px;left:0px;width:100%;height:100%;background-image:url('+nextcaption.data('thumbimage')+'); background-size:cover\"></div>');\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (ifr.attr('src').toLowerCase().indexOf('youtube')>=0) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (!ifr.hasClass(\"HasListener\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.attr('id',frameID);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar player;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer = new YT.Player(frameID, {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tevents: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"onStateChange\": onPlayerStateChange,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'onReady': function(event) {event.target.playVideo()}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer = new YT.Player(frameID, {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tevents: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"onStateChange\": onPlayerStateChange\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.addClass(\"HasListener\");\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('player',player);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} catch(e) {}\n\t\t\t\t\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar player=nextcaption.data('player');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('timerplay',setTimeout(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('forcerewind')==\"on\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer.seekTo(0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer.playVideo();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},nextcaption.data('start')));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t } // END YOUTUBE HANDLING\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t // PLAY VIDEO IF THUMBNAIL HAS BEEN CLICKED\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.find('.tp-thumb-image').click(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t TweenLite.to(jQuery(this),0.3,{opacity:0,ease:Power3.easeInOut,onComplete: function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.find('.tp-thumb-image').remove();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var player=nextcaption.data('player');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t player.playVideo();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// START VIMEO HANDLING\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (ifr.attr('src').toLowerCase().indexOf('vimeo')>=0) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (!ifr.hasClass(\"HasListener\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.addClass(\"HasListener\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.attr('id',frameID);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar isrc = ifr.attr('src');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar queryParameters = {}, queryString = isrc,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tre = /([^&=]+)=([^&]*)/g, m;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Creates a map with the query string parameters\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twhile (m = re.exec(queryString)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tqueryParameters[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (queryParameters['player_id']!=undefined)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisrc = isrc.replace(queryParameters['player_id'],frameID);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisrc=isrc+\"&player_id=\"+frameID;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry{ isrc = isrc.replace('api=0','api=1'); } catch(e) {}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisrc=isrc+\"&api=1\";\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.attr('src',isrc);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar player = nextcaption.find('iframe')[0];\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$f(player).addEvent('ready', function() {vimeoready_auto(frameID,nextcaption.data('autoplay'))});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar ifr = nextcaption.find('iframe');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar id = ifr.attr('id');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar froogaloop = $f(id);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('timerplay',setTimeout(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('forcerewind')==\"on\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfroogaloop.api(\"seekTo\",0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfroogaloop.api(\"play\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},nextcaption.data('start')));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }// END HAS LISTENER HANDLING\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // PLAY VIDEO IF THUMBNAIL HAS BEEN CLICKED\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.find('.tp-thumb-image').click(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t TweenLite.to(jQuery(this),0.3,{opacity:0,ease:Power3.easeInOut,onComplete: function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.find('.tp-thumb-image').remove();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var ifr = nextcaption.find('iframe');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var id = ifr.attr('id');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var froogaloop = $f(id);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t froogaloop.api(\"play\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t })\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t} // END OF VIMEO HANDLING\n\t\t\t\t\t\t\t\t\t\t\t} // END OF CHOOSE BETWEEN YOUTUBE AND VIMEO\n\t\t\t\t\t\t\t\t\t\t}); // END OF LOOP THROUGH IFRAMES\n\n\t\t\t\t\t\t\t\t\t\t// START OF VIDEO JS\n\t\t\t\t\t\t\t\t\t\tif (nextcaption.find('video').length>0) {\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('video').each(function(i) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar html5vid = jQuery(this).parent();\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('dottedoverlay')!=\"none\" && nextcaption.data('dottedoverlay')!=undefined)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.find('.tp-dottedoverlay').length!=1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.append('<div class=\"tp-dottedoverlay '+nextcaption.data('dottedoverlay')+'\"></div>');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar mediaaspect=16/9;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('aspectratio')==\"4:3\") mediaaspect=4/3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.data('mediaAspect',mediaaspect);\n\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tupdateHTML5Size(html5vid,opt.container);\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.hasClass(\"video-js\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.nextslideatend = nextcaption.data('nextslideatend');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!html5vid.hasClass(\"HasListener\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.addClass(\"HasListener\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar videoID = \"videoid_\"+Math.round(Math.random()*1000+1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.attr('id',videoID);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideojs(videoID).ready(function(){\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vidready(this,videoID)\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideoID = html5vid.attr('id');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.find('.vjs-poster').css({display:\"block\"});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar bt=jQuery('body').find('#'+opt.container.attr('id')).find('.tp-bannertimer');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbt.stop();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.videoplaying=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},200);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//konsole.log(\"VideoPlay set to True due HTML5 VIDEO 1st/2nd load AutoPlay\");\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideojs(videoID).ready(function(){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar myPlayer = this;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('forcerewind')==\"on\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t myPlayer.currentTime(0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} catch(e) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.data('timerplay',setTimeout(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('forcerewind')==\"on\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t myPlayer.currentTime(0);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.closest('.tp-caption').data('volume')==\"mute\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t myPlayer.volume(0);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmyPlayer.play(0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.find('.vjs-poster').css({display:\"none\"});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},50);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},10+nextcaption.data('start')));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.data('ww') == undefined) html5vid.data('ww',html5vid.width());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.data('hh') == undefined) html5vid.data('hh',html5vid.height());\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideojs(videoID).ready(function(){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!nextcaption.hasClass(\"fullscreenvideo\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar myPlayer = videojs(videoID);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmyPlayer.width(html5vid.data('ww')*opt.bw);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmyPlayer.height(html5vid.data('hh')*opt.bh);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} catch(e) {}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.closest('.tp-caption').data('forcecover')==1) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tupdateHTML5Size(html5vid,opt.container);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.addClass(\"fullcoveredvideo\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t} // END OF VIDEO JS FUNCTIONS\n\n\t\t\t\t\t\t\t\t\t\t\t// IF AUTOPLAY IS ON, WE NEED SOME STOP FUNCTION ON\n\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar bt=jQuery('body').find('#'+opt.container.attr('id')).find('.tp-bannertimer');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbt.stop();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.videoplaying=true;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t},200)\n\t\t\t\t\t\t\t\t\t\t\t\t\topt.videoplaying=true;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplayonlyfirsttime') == true || nextcaption.data('autoplayonlyfirsttime')==\"true\" ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('autoplay',false);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('autoplayonlyfirsttime',false);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\n\n\n\t\t\t\t\t\t\t\t\t\t// NEW ENGINE\n\t\t\t\t\t\t\t\t\t\t//if (nextcaption.hasClass(\"randomrotate\") && (opt.ie || opt.ie9)) nextcaption.removeClass(\"randomrotate\").addClass(\"sfb\");\n\t\t\t\t\t\t\t\t\t\t//\tnextcaption.removeClass('noFilterClass');\n\n\n\n\t\t\t\t\t\t\t\t\t\t var imw =0;\n\t\t\t\t\t\t\t\t\t\t var imh = 0;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.find('img').length>0) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar im = nextcaption.find('img');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (im.data('ww') == undefined) im.data('ww',im.width());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (im.data('hh') == undefined) im.data('hh',im.height());\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar ww = im.data('ww');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar hh = im.data('hh');\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.width(ww*opt.bw);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.height(hh*opt.bh);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\timw = im.width();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\timh = im.height();\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.find('iframe').length>0 || nextcaption.find('.video-js').length>0) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar im = nextcaption.find('iframe');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.css({display:\"block\"});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('ww') == undefined) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('ww',im.width());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('hh') == undefined) nextcaption.data('hh',im.height());\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar ww = nextcaption.data('ww');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar hh = nextcaption.data('hh');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar nc =nextcaption;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('fsize') == undefined) nc.data('fsize',parseInt(nc.css('font-size'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('pt') == undefined) nc.data('pt',parseInt(nc.css('paddingTop'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('pb') == undefined) nc.data('pb',parseInt(nc.css('paddingBottom'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('pl') == undefined) nc.data('pl',parseInt(nc.css('paddingLeft'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('pr') == undefined) nc.data('pr',parseInt(nc.css('paddingRight'),0) || 0);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('mt') == undefined) nc.data('mt',parseInt(nc.css('marginTop'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('mb') == undefined) nc.data('mb',parseInt(nc.css('marginBottom'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('ml') == undefined) nc.data('ml',parseInt(nc.css('marginLeft'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('mr') == undefined) nc.data('mr',parseInt(nc.css('marginRight'),0) || 0);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('bt') == undefined) nc.data('bt',parseInt(nc.css('borderTop'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('bb') == undefined) nc.data('bb',parseInt(nc.css('borderBottom'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('bl') == undefined) nc.data('bl',parseInt(nc.css('borderLeft'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('br') == undefined) nc.data('br',parseInt(nc.css('borderRight'),0) || 0);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('lh') == undefined) nc.data('lh',parseInt(nc.css('lineHeight'),0) || 0);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar fvwidth=opt.width;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar fvheight=opt.height;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (fvwidth>opt.startwidth) fvwidth=opt.startwidth;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (fvheight>opt.startheight) fvheight=opt.startheight;\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!nextcaption.hasClass('fullscreenvideo'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'font-size': (nc.data('fsize') * opt.bw)+\"px\",\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'padding-top': (nc.data('pt') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'padding-bottom': (nc.data('pb') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'padding-left': (nc.data('pl') * opt.bw) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'padding-right': (nc.data('pr') * opt.bw) + \"px\",\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'margin-top': (nc.data('mt') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'margin-bottom': (nc.data('mb') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'margin-left': (nc.data('ml') * opt.bw) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'margin-right': (nc.data('mr') * opt.bw) + \"px\",\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'border-top': (nc.data('bt') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'border-bottom': (nc.data('bb') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'border-left': (nc.data('bl') * opt.bw) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'border-right': (nc.data('br') * opt.bw) + \"px\",\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'line-height': (nc.data('lh') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'height':(hh*opt.bh)+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'white-space':\"nowrap\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t offsetx=0; offsety=0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.data('x',0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.data('y',0)\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var ovhh = opt.height\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (opt.autoHeight==\"on\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\tovhh = opt.container.height()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'width':opt.width,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'height':ovhh\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.width(ww*opt.bw);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.height(hh*opt.bh);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\timw = im.width();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\timh = im.height();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.tp-resizeme, .tp-resizeme *').each(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcalcCaptionResponsive(jQuery(this),opt);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"tp-resizeme\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('*').each(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcalcCaptionResponsive(jQuery(this),opt);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcalcCaptionResponsive(nextcaption,opt);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\timh=nextcaption.outerHeight(true);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\timw=nextcaption.outerWidth(true);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// NEXTCAPTION FRONTCORNER CHANGES\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar ncch = nextcaption.outerHeight();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar bgcol = nextcaption.css('backgroundColor');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.frontcorner').css({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderWidth':ncch+\"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'left':(0-ncch)+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderRight':'0px solid transparent',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderTopColor':bgcol\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.frontcornertop').css({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderWidth':ncch+\"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'left':(0-ncch)+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderRight':'0px solid transparent',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderBottomColor':bgcol\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// NEXTCAPTION BACKCORNER CHANGES\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.backcorner').css({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderWidth':ncch+\"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'right':(0-ncch)+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderLeft':'0px solid transparent',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderBottomColor':bgcol\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// NEXTCAPTION BACKCORNER CHANGES\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.backcornertop').css({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderWidth':ncch+\"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'right':(0-ncch)+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderLeft':'0px solid transparent',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderTopColor':bgcol\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tif (opt.fullScreenAlignForce == \"on\") {\n\t\t\t\t\t\t\t\t\t\t\t\txbw = 1;\n\t\t\t\t\t\t\t\t\t\t\t\txbh = 1;\n\t\t\t\t\t\t\t\t\t\t\t\toffsetx=0;\n\t\t\t\t\t\t\t\t\t\t\t\toffsety=0;\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('voffset')==undefined) nextcaption.data('voffset',0);\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('hoffset')==undefined) nextcaption.data('hoffset',0);\n\n\t\t\t\t\t\t\t\t\t\t\tvar vofs= nextcaption.data('voffset')*xbw;\n\t\t\t\t\t\t\t\t\t\t\tvar hofs= nextcaption.data('hoffset')*xbw;\n\n\t\t\t\t\t\t\t\t\t\t\tvar crw = opt.startwidth*xbw;\n\t\t\t\t\t\t\t\t\t\t\tvar crh = opt.startheight*xbw;\n\n\t\t\t\t\t\t\t\t\t\t\tif (opt.fullScreenAlignForce == \"on\") {\n\t\t\t\t\t\t\t\t\t\t\t\tcrw = opt.container.width();\n\t\t\t\t\t\t\t\t\t\t\t\tcrh = opt.container.height();\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t// CENTER THE CAPTION HORIZONTALLY\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('x')==\"center\" || nextcaption.data('xcenter')=='center') {\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('xcenter','center');\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('x',(crw/2 - nextcaption.outerWidth(true)/2)/xbw+ hofs);\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// ALIGN LEFT THE CAPTION HORIZONTALLY\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('x')==\"left\" || nextcaption.data('xleft')=='left') {\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('xleft','left');\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('x',(0)/xbw+hofs);\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// ALIGN RIGHT THE CAPTION HORIZONTALLY\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('x')==\"right\" || nextcaption.data('xright')=='right') {\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('xright','right');\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('x',((crw - nextcaption.outerWidth(true))+hofs)/xbw);\n\t\t\t\t\t\t\t\t\t\t\t\t//konsole.log(\"crw:\"+crw+\" width:\"+nextcaption.outerWidth(true)+\" xbw:\"+xbw);\n\t\t\t\t\t\t\t\t\t\t\t\t//konsole.log(\"x-pos:\"+nextcaption.data('x'))\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\t\t// CENTER THE CAPTION VERTICALLY\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('y')==\"center\" || nextcaption.data('ycenter')=='center') {\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('ycenter','center');\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('y',(crh/2 - nextcaption.outerHeight(true)/2)/xbh + vofs);\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// ALIGN TOP THE CAPTION VERTICALLY\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('y')==\"top\" || nextcaption.data('ytop')=='top') {\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('ytop','top');\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('y',(0)/opt.bh+vofs);\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// ALIGN BOTTOM THE CAPTION VERTICALLY\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('y')==\"bottom\" || nextcaption.data('ybottom')=='bottom') {\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('ybottom','bottom');\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('y',((crh - nextcaption.outerHeight(true))+vofs)/xbw);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t// THE TRANSITIONS OF CAPTIONS\n\t\t\t\t\t\t\t\t\t\t\t// MDELAY AND MSPEED\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('start') == undefined) nextcaption.data('start',1000);\n\n\n\n\t\t\t\t\t\t\t\t\t\t\tvar easedata=nextcaption.data('easing');\n\t\t\t\t\t\t\t\t\t\t\tif (easedata==undefined) easedata=\"Power1.easeOut\";\n\n\n\n\n\t\t\t\t\t\t\t\t\t\t\tvar mdelay = nextcaption.data('start')/1000;\n\t\t\t\t\t\t\t\t\t\t\tvar mspeed = nextcaption.data('speed')/1000;\n\t\t\t\t\t\t\t\t\t\t\tvar calcx = (xbw*nextcaption.data('x')+offsetx);\n\t\t\t\t\t\t\t\t\t\t\tvar calcy = (opt.bh*nextcaption.data('y')+offsety);\n\n\n\n\n\t\t\t\t\t\t\t\t\t\t\tif (opt.fullScreenAlignForce == \"on\")\n\t\t\t\t\t\t\t\t\t\t\t\tcalcy = nextcaption.data('y')+offsety;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tTweenLite.killTweensOf(nextcaption,false);\n\t\t\t\t\t\t\t\t\t\t\t\t\tclearTimeout(nextcaption.data('reversetimer'));\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar tlop = 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \ttlxx = calcx, tlyy = calcy, tlzz = 2,\n\t\t\t\t\t\t\t\t\t\t\t\t\t tlsc = 1,tlro = 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t sc=1,scX=1,scY= 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t ro=0,roX=0,roY=0,roZ = 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tskwX=0, skwY = 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\topa = 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttrorig = \"center,center\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttper = 300,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\trepeatV = 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tyoyoV = false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t repeatdelayV = 0;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('repeat')!=undefined) repeatV = nextcaption.data('repeat');\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('yoyo')!=undefined) yoyoV = nextcaption.data('yoyo');\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('repeatdelay')!=undefined) repeatdelayV = nextcaption.data('repeatdelay');\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"customin\")) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar customarray = nextcaption.data('customin').split(';');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjQuery.each(customarray,function(index,param) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tparam = param.split(\":\")\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar w = param[0],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tv = param[1];\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"rotationX\") roX = parseInt(v,0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"rotationY\") roY = parseInt(v,0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"rotationZ\") roZ = parseInt(v,0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"scaleX\") scX = parseFloat(v);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"scaleY\") scY = parseFloat(v);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"opacity\") opa = parseFloat(v);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"skewX\") skwX = parseInt(v,0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"skewY\") skwY = parseInt(v,0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"x\") tlxx = calcx + parseInt(v,0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"y\") tlyy = calcy + parseInt(v,0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"z\") tlzz = parseInt(v,0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"transformOrigin\") trorig = v.toString();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"transformPerspective\") tper=parseInt(v,0);\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"randomrotate\")) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsc = Math.random()*3+1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tro = Math.round(Math.random()*200-100);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlxx = calcx + Math.round(Math.random()*200-100);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlyy = calcy + Math.round(Math.random()*200-100);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('lfr') || nextcaption.hasClass('skewfromright'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlxx = 15+opt.width;\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('lfl') || nextcaption.hasClass('skewfromleft'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlxx = -15-imw;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('sfl') | nextcaption.hasClass('skewfromleftshort'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlxx = calcx-50;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('sfr') | nextcaption.hasClass('skewfromrightshort'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlxx = calcx+50;\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('lft'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlyy = -25 - imh;\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('lfb'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlyy = 25 + opt.height;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('sft'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlyy = calcy-50;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('sfb'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlyy = calcy+50;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('skewfromright') || nextcaption.hasClass('skewfromrightshort'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tskwX = -85\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('skewfromleft') || nextcaption.hasClass('skewfromleftshort'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tskwX = 85\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (get_browser().toLowerCase()==\"safari\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\troX=0;roY=0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttlxx=Math.round(tlxx);\n\t\t\t\t\t\t\t\t\t\t\t\t\ttlyy=Math.round(tlyy);\n\t\t\t\t\t\t\t\t\t\t\t\t\tcalcx=Math.round(calcx);\n\t\t\t\t\t\t\t\t\t\t\t\t\tcalcy=Math.round(calcy);\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// CHANGE to TweenMax. if Yoyo and Repeat is used. Dont forget to laod the Right Tools for it !!\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"customin\")) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('anim',TweenLite.fromTo(nextcaption,mspeed,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ scaleX:scX,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t scaleY:scY,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t rotationX:roX,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t rotationY:roY,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t rotationZ:roZ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t x:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t y:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t left:tlxx,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t top:tlyy,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t z:tlzz,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t opacity:opa,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t transformPerspective:tper,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t transformOrigin:trorig,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t visibility:'hidden'},\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t left:calcx,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t top:calcy,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t scaleX:1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t scaleY:1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t rotationX:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t rotationY:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t rotationZ:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t skewX:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t skewY:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t z:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t x:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t y:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t visibility:'visible',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t opacity:1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t delay:mdelay,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ease:easedata,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t overwrite:\"all\",\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t /*yoyo:yoyoV,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t repeat:repeatV,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t repeatDelay:repeatdelayV*/\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}));\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('anim',TweenLite.fromTo(nextcaption,mspeed,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ scale:sc,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t rotationX:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t rotationY:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t skewY:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t rotation:ro,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t left:tlxx+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t top:tlyy+\"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t opacity:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t z:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t x:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t y:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t skewX:skwX,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t transformPerspective:600,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t visibility:'visible',\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t },\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ left:calcx+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t top:calcy+\"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t scale:1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t skewX:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t rotation:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t z:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t visibility:'visible',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t opacity:1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t delay:mdelay,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ease:easedata,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t overwrite:\"all\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t yoyo:yoyoV,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t repeat:repeatV,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t repeatDelay:repeatdelayV,\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t nextcaption.data('killall',setTimeout(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.css({transform:\"none\",'-moz-transform':'none','-webkit-transform':'none'});\n\t\t\t\t\t\t\t\t\t\t\t },(mspeed*1000)+(mdelay*1000)+20))\n\n\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('timer',setTimeout(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"fullscreenvideo\"))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({'display':'block'});\n\n\t\t\t\t\t\t\t\t\t\t\t\t},nextcaption.data('start')));\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t// IF THERE IS ANY EXIT ANIM DEFINED\n\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('end')!=undefined)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tendMoveCaption(nextcaption,opt,nextcaption.data('end')/1000);\n\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t})\n\n\t\t\t\t\t\tvar bt=jQuery('body').find('#'+opt.container.attr('id')).find('.tp-bannertimer');\n\t\t\t\t\t\tbt.data('opt',opt);\n\t\t\t\t}", "function Slider() {\n return (\n <div id=\"carouselExampleIndicators\" class=\"carousel slide carousel-fade \" data-ride=\"carousel\">\n <ol class=\"carousel-indicators\">\n <li data-target=\"#carouselExampleIndicators\" data-slide-to=\"0\" class=\"active\"></li>\n <li data-target=\"#carouselExampleIndicators\" data-slide-to=\"1\"></li>\n <li data-target=\"#carouselExampleIndicators\" data-slide-to=\"2\"></li>\n </ol>\n <div class=\"carousel-inner\">\n <div class=\"carousel-item active\">\n </div>\n <div class=\"carousel-item\">\n <img class=\"d-block w-100\" src=\"https://source.unsplash.com/random\" alt=\"Second slide\" />\n </div>\n <div class=\"carousel-item\">\n <img class=\"d-block w-100\" src=\"https://source.unsplash.com/800x500/?rent, home\" alt=\"Third slide\" />\n </div>\n </div>\n <a class=\"carousel-control-prev\" href=\"#carouselExampleIndicators\" role=\"button\" data-slide=\"prev\">\n <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span class=\"sr-only\">Previous</span>\n </a>\n <a class=\"carousel-control-next\" href=\"#carouselExampleIndicators\" role=\"button\" data-slide=\"next\">\n <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span class=\"sr-only\">Next</span>\n </a>\n </div>\n );\n}", "function OsSliderCaptionInit(container) {\r\n var $sliderElement = container.find('.caption');\r\n $sliderElement.each(function () {\r\n var $captionAnimation = $(this);\r\n var animationDuration = \"1000ms\";\r\n\r\n if ($(this).data(\"animation-duration\")) {\r\n animationDuration = $(this).data(\"animation-duration\") + \"ms\";\r\n }\r\n\r\n $(this).css(\"animation-duration\", animationDuration);\r\n $captionAnimation.addClass('caption-hide');\r\n });\r\n }", "function animateTheCaptions(nextli, opt,recalled) {\n\n\t\t\t\t\t\tvar offsetx=0;\n\t\t\t\t\t\tvar offsety=0;\n\n\t\t\t\t\t\tnextli.find('.tp-caption').each(function(i) {\n\n\n\t\t\t\t\t\t\t\toffsetx = opt.width/2 - (opt.startwidth*opt.bw)/2;\n\n\n\n\t\t\t\t\t\t\t\tvar xbw = opt.bw;\n\t\t\t\t\t\t\t\tvar xbh = opt.bh;\n\n\n\t\t\t\t\t\t\t\tif (opt.fullScreen==\"on\")\n\t\t\t\t\t\t\t\t\t offsety = opt.height/2 - (opt.startheight*opt.bh)/2;\n\n\t\t\t\t\t\t\t\tif (opt.autoHeight==\"on\")\n\t\t\t\t\t\t\t\t\t offsety = opt.container.height()/2 - (opt.startheight*opt.bh)/2;;\n\n\t\t\t\t\t\t\t\tif (offsety<0) offsety=0;\n\n\t\t\t\t\t\t\t\tvar nextcaption=jQuery(this);//nextli.find('.tp-caption:eq('+i+')');\n\n\t\t\t\t\t\t\t\tvar handlecaption=0;\n\n\t\t\t\t\t\t\t\t// HIDE CAPTION IF RESOLUTION IS TOO LOW\n\t\t\t\t\t\t\t\tif (opt.width<opt.hideCaptionAtLimit && nextcaption.data('captionhidden')==\"on\") {\n\t\t\t\t\t\t\t\t\tnextcaption.addClass(\"tp-hidden-caption\")\n\t\t\t\t\t\t\t\t\thandlecaption=1;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif (opt.width<opt.hideAllCaptionAtLilmit)\t{\n\t\t\t\t\t\t\t\t\t\tnextcaption.addClass(\"tp-hidden-caption\")\n\t\t\t\t\t\t\t\t\t\thandlecaption=1;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tnextcaption.removeClass(\"tp-hidden-caption\")\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (handlecaption==0) {\n\n\t\t\t\t\t\t\t\t\t// ADD A CLICK LISTENER TO THE CAPTION\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('linktoslide')!=undefined && !nextcaption.hasClass(\"hasclicklistener\")) {\n\t\t\t\t\t\t\t\t\t\tnextcaption.addClass(\"hasclicklistener\")\n\t\t\t\t\t\t\t\t\t\tnextcaption.css({'cursor':'pointer'});\n\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('linktoslide')!=\"no\") {\n\t\t\t\t\t\t\t\t\t\t\tnextcaption.click(function() {\n\t\t\t\t\t\t\t\t\t\t\t\tvar nextcaption=jQuery(this);\n\t\t\t\t\t\t\t\t\t\t\t\tvar dir = nextcaption.data('linktoslide');\n\t\t\t\t\t\t\t\t\t\t\t\tif (dir!=\"next\" && dir!=\"prev\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.data('showus',dir);\n\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.parent().find('.tp-rightarrow').click();\n\t\t\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (dir==\"next\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.parent().find('.tp-rightarrow').click();\n\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (dir==\"prev\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.parent().find('.tp-leftarrow').click();\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}// END OF CLICK LISTENER\n\n\n\t\t\t\t\t\t\t\t\tif (offsetx<0) offsetx=0;\n\n\n\t\t\t\t\t\t\t\t\t// YOUTUBE AND VIMEO LISTENRES INITIALISATION\n\n\t\t\t\t\t\t\t\t\tvar frameID = \"iframe\"+Math.round(Math.random()*1000+1);\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.find('iframe').length>0 || nextcaption.find('video').length>0) {\n\n\t\t\t\t\t\t\t\t\t\tnextcaption.find('iframe').each(function() {\n\t\t\t\t\t\t\t\t\t\t\t\tvar ifr=jQuery(this);\n\n\t\t\t\t\t\t\t\t\t\t\t\t// START YOUTUBE HANDLING\n\t\t\t\t\t\t\t\t\t\t\t\topt.nextslideatend = nextcaption.data('nextslideatend');\n\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('thumbimage')!=undefined && nextcaption.data('thumbimage').length>2 && nextcaption.data('autoplay')!=true) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.tp-thumb-image').remove();\n\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.append('<div class=\"tp-thumb-image\" style=\"cursor:pointer; position:absolute;top:0px;left:0px;width:100%;height:100%;background-image:url('+nextcaption.data('thumbimage')+'); background-size:cover\"></div>');\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (ifr.attr('src').toLowerCase().indexOf('youtube')>=0) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (!ifr.hasClass(\"HasListener\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.attr('id',frameID);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar player;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer = new YT.Player(frameID, {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tevents: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"onStateChange\": onPlayerStateChange,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'onReady': function(event) {event.target.playVideo()}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer = new YT.Player(frameID, {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tevents: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"onStateChange\": onPlayerStateChange\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.addClass(\"HasListener\");\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('player',player);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} catch(e) {}\n\t\t\t\t\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar player=nextcaption.data('player');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('timerplay',setTimeout(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer.playVideo();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},nextcaption.data('start')));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t } // END YOUTUBE HANDLING\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t // PLAY VIDEO IF THUMBNAIL HAS BEEN CLICKED\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.find('.tp-thumb-image').click(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t TweenLite.to(jQuery(this),0.3,{opacity:0,ease:Power3.easeInOut,onComplete: function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.find('.tp-thumb-image').remove();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var player=nextcaption.data('player');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t player.playVideo();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// START VIMEO HANDLING\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (ifr.attr('src').toLowerCase().indexOf('vimeo')>=0) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (!ifr.hasClass(\"HasListener\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.addClass(\"HasListener\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.attr('id',frameID);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar isrc = ifr.attr('src');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar queryParameters = {}, queryString = isrc,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tre = /([^&=]+)=([^&]*)/g, m;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Creates a map with the query string parameters\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twhile (m = re.exec(queryString)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tqueryParameters[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (queryParameters['player_id']!=undefined)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisrc = isrc.replace(queryParameters['player_id'],frameID);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisrc=isrc+\"&player_id=\"+frameID;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry{ isrc = isrc.replace('api=0','api=1'); } catch(e) {}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisrc=isrc+\"&api=1\";\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.attr('src',isrc);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar player = nextcaption.find('iframe')[0];\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$f(player).addEvent('ready', function() {vimeoready_auto(frameID,nextcaption.data('autoplay'))});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar ifr = nextcaption.find('iframe');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar id = ifr.attr('id');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar froogaloop = $f(id);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('timerplay',setTimeout(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfroogaloop.api(\"play\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},nextcaption.data('start')));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }// END HAS LISTENER HANDLING\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // PLAY VIDEO IF THUMBNAIL HAS BEEN CLICKED\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.find('.tp-thumb-image').click(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t TweenLite.to(jQuery(this),0.3,{opacity:0,ease:Power3.easeInOut,onComplete: function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.find('.tp-thumb-image').remove();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var ifr = nextcaption.find('iframe');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var id = ifr.attr('id');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var froogaloop = $f(id);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t froogaloop.api(\"play\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t })\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t} // END OF VIMEO HANDLING\n\t\t\t\t\t\t\t\t\t\t\t} // END OF CHOOSE BETWEEN YOUTUBE AND VIMEO\n\t\t\t\t\t\t\t\t\t\t}); // END OF LOOP THROUGH IFRAMES\n\n\t\t\t\t\t\t\t\t\t\t// START OF VIDEO JS\n\t\t\t\t\t\t\t\t\t\tif (nextcaption.find('video').length>0) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('video').each(function(i) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar html5vid = jQuery(this).parent();\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.hasClass(\"video-js\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.nextslideatend = nextcaption.data('nextslideatend');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!html5vid.hasClass(\"HasListener\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.addClass(\"HasListener\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar videoID = \"videoid_\"+Math.round(Math.random()*1000+1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.attr('id',videoID);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideojs(videoID).ready(function(){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vidready(this)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideoID = html5vid.attr('id');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar bt=jQuery('body').find('#'+opt.container.attr('id')).find('.tp-bannertimer');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbt.stop();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.videoplaying=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},200);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//konsole.log(\"VideoPlay set to True due HTML5 VIDEO 1st/2nd load AutoPlay\");\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideojs(videoID).ready(function(){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar myPlayer = this;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.data('timerplay',setTimeout(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmyPlayer.play();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},nextcaption.data('start')));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.data('ww') == undefined) html5vid.data('ww',html5vid.width());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.data('hh') == undefined) html5vid.data('hh',html5vid.height());\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideojs(videoID).ready(function(){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!nextcaption.hasClass(\"fullscreenvideo\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar myPlayer = videojs(videoID);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmyPlayer.width(html5vid.data('ww')*opt.bw);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmyPlayer.height(html5vid.data('hh')*opt.bh);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} catch(e) {}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t} // END OF VIDEO JS FUNCTIONS\n\n\t\t\t\t\t\t\t\t\t\t\t// IF AUTOPLAY IS ON, WE NEED SOME STOP FUNCTION ON\n\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar bt=jQuery('body').find('#'+opt.container.attr('id')).find('.tp-bannertimer');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbt.stop();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.videoplaying=true;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t},200)\n\t\t\t\t\t\t\t\t\t\t\t\t\topt.videoplaying=true;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplayonlyfirsttime') == true)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('autoplay',false)\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\n\n\n\t\t\t\t\t\t\t\t\t\t// NEW ENGINE\n\t\t\t\t\t\t\t\t\t\t//if (nextcaption.hasClass(\"randomrotate\") && (opt.ie || opt.ie9)) nextcaption.removeClass(\"randomrotate\").addClass(\"sfb\");\n\t\t\t\t\t\t\t\t\t\t//\tnextcaption.removeClass('noFilterClass');\n\n\n\n\t\t\t\t\t\t\t\t\t\t var imw =0;\n\t\t\t\t\t\t\t\t\t\t var imh = 0;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.find('img').length>0) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar im = nextcaption.find('img');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (im.data('ww') == undefined) im.data('ww',im.width());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (im.data('hh') == undefined) im.data('hh',im.height());\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar ww = im.data('ww');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar hh = im.data('hh');\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.width(ww*opt.bw);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.height(hh*opt.bh);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\timw = im.width();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\timh = im.height();\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.find('iframe').length>0) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar im = nextcaption.find('iframe');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('ww') == undefined) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('ww',im.width());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('hh') == undefined) nextcaption.data('hh',im.height());\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar ww = nextcaption.data('ww');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar hh = nextcaption.data('hh');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar nc =nextcaption;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('fsize') == undefined) nc.data('fsize',parseInt(nc.css('font-size'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('pt') == undefined) nc.data('pt',parseInt(nc.css('paddingTop'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('pb') == undefined) nc.data('pb',parseInt(nc.css('paddingBottom'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('pl') == undefined) nc.data('pl',parseInt(nc.css('paddingLeft'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('pr') == undefined) nc.data('pr',parseInt(nc.css('paddingRight'),0) || 0);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('mt') == undefined) nc.data('mt',parseInt(nc.css('marginTop'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('mb') == undefined) nc.data('mb',parseInt(nc.css('marginBottom'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('ml') == undefined) nc.data('ml',parseInt(nc.css('marginLeft'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('mr') == undefined) nc.data('mr',parseInt(nc.css('marginRight'),0) || 0);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('bt') == undefined) nc.data('bt',parseInt(nc.css('borderTop'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('bb') == undefined) nc.data('bb',parseInt(nc.css('borderBottom'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('bl') == undefined) nc.data('bl',parseInt(nc.css('borderLeft'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('br') == undefined) nc.data('br',parseInt(nc.css('borderRight'),0) || 0);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('lh') == undefined) nc.data('lh',parseInt(nc.css('lineHeight'),0) || 0);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar fvwidth=opt.width;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar fvheight=opt.height;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (fvwidth>opt.startwidth) fvwidth=opt.startwidth;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (fvheight>opt.startheight) fvheight=opt.startheight;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!nextcaption.hasClass('fullscreenvideo'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'font-size': (nc.data('fsize') * opt.bw)+\"px\",\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'padding-top': (nc.data('pt') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'padding-bottom': (nc.data('pb') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'padding-left': (nc.data('pl') * opt.bw) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'padding-right': (nc.data('pr') * opt.bw) + \"px\",\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'margin-top': (nc.data('mt') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'margin-bottom': (nc.data('mb') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'margin-left': (nc.data('ml') * opt.bw) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'margin-right': (nc.data('mr') * opt.bw) + \"px\",\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'border-top': (nc.data('bt') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'border-bottom': (nc.data('bb') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'border-left': (nc.data('bl') * opt.bw) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'border-right': (nc.data('br') * opt.bw) + \"px\",\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'line-height': (nc.data('lh') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'height':(hh*opt.bh)+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'white-space':\"nowrap\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t offsetx=0; offsety=0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.data('x',0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.data('y',0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var ovhh = opt.height\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (opt.autoHeight==\"on\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\tovhh = opt.container.height()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'width':opt.width,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'height':ovhh\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.width(ww*opt.bw);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.height(hh*opt.bh);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\timw = im.width();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\timh = im.height();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.tp-resizeme, .tp-resizeme *').each(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcalcCaptionResponsive(jQuery(this),opt);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"tp-resizeme\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('*').each(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcalcCaptionResponsive(jQuery(this),opt);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcalcCaptionResponsive(nextcaption,opt);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\timh=nextcaption.outerHeight(true);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\timw=nextcaption.outerWidth(true);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// NEXTCAPTION FRONTCORNER CHANGES\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar ncch = nextcaption.outerHeight();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar bgcol = nextcaption.css('backgroundColor');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.frontcorner').css({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderWidth':ncch+\"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'left':(0-ncch)+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderRight':'0px solid transparent',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderTopColor':bgcol\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.frontcornertop').css({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderWidth':ncch+\"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'left':(0-ncch)+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderRight':'0px solid transparent',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderBottomColor':bgcol\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// NEXTCAPTION BACKCORNER CHANGES\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.backcorner').css({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderWidth':ncch+\"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'right':(0-ncch)+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderLeft':'0px solid transparent',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderBottomColor':bgcol\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// NEXTCAPTION BACKCORNER CHANGES\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.backcornertop').css({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderWidth':ncch+\"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'right':(0-ncch)+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderLeft':'0px solid transparent',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderTopColor':bgcol\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tif (opt.fullScreenAlignForce == \"on\") {\n\t\t\t\t\t\t\t\t\t\t\t\txbw = 1;\n\t\t\t\t\t\t\t\t\t\t\t\txbh = 1;\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\toffsetx=0;\n\t\t\t\t\t\t\t\t\t\t\t\toffsety=0;\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('voffset')==undefined) nextcaption.data('voffset',0);\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('hoffset')==undefined) nextcaption.data('hoffset',0);\n\n\t\t\t\t\t\t\t\t\t\t\tvar vofs= nextcaption.data('voffset')*xbw;\n\t\t\t\t\t\t\t\t\t\t\tvar hofs= nextcaption.data('hoffset')*xbw;\n\t\n\t\t\t\t\t\t\t\t\t\t\tvar crw = opt.startwidth*xbw;\n\t\t\t\t\t\t\t\t\t\t\tvar crh = opt.startheight*xbw;\n\n\t\t\t\t\t\t\t\t\t\t\tif (opt.fullScreenAlignForce == \"on\") {\n\t\t\t\t\t\t\t\t\t\t\t\tcrw = opt.container.width();\n\t\t\t\t\t\t\t\t\t\t\t\tcrh = opt.container.height();\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\n\t\t\t\t\t\t\t\t\t\t\t// CENTER THE CAPTION HORIZONTALLY\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('x')==\"center\" || nextcaption.data('xcenter')=='center') {\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('xcenter','center');\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('x',(crw/2 - nextcaption.outerWidth(true)/2)/xbw+ hofs);\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// ALIGN LEFT THE CAPTION HORIZONTALLY\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('x')==\"left\" || nextcaption.data('xleft')=='left') {\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('xleft','left');\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('x',(0)/xbw+hofs);\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// ALIGN RIGHT THE CAPTION HORIZONTALLY\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('x')==\"right\" || nextcaption.data('xright')=='right') {\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('xright','right');\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('x',((crw - nextcaption.outerWidth(true))+hofs)/xbw);\n\t\t\t\t\t\t\t\t\t\t\t\t//konsole.log(\"crw:\"+crw+\" width:\"+nextcaption.outerWidth(true)+\" xbw:\"+xbw);\n\t\t\t\t\t\t\t\t\t\t\t\t//konsole.log(\"x-pos:\"+nextcaption.data('x'))\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\t\t// CENTER THE CAPTION VERTICALLY\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('y')==\"center\" || nextcaption.data('ycenter')=='center') {\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('ycenter','center');\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('y',(crh/2 - nextcaption.outerHeight(true)/2)/opt.bh + vofs);\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// ALIGN TOP THE CAPTION VERTICALLY\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('y')==\"top\" || nextcaption.data('ytop')=='top') {\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('ytop','top');\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('y',(0)/opt.bh+vofs);\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// ALIGN BOTTOM THE CAPTION VERTICALLY\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('y')==\"bottom\" || nextcaption.data('ybottom')=='bottom') {\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('ybottom','bottom');\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('y',((crh - nextcaption.outerHeight(true))+vofs)/xbw);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t// THE TRANSITIONS OF CAPTIONS\n\t\t\t\t\t\t\t\t\t\t\t// MDELAY AND MSPEED\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('start') == undefined) nextcaption.data('start',1000);\n\n\n\n\t\t\t\t\t\t\t\t\t\t\tvar easedata=nextcaption.data('easing');\n\t\t\t\t\t\t\t\t\t\t\tif (easedata==undefined) easedata=\"Power1.easeOut\";\n\n\n\n\n\t\t\t\t\t\t\t\t\t\t\tvar mdelay = nextcaption.data('start')/1000;\n\t\t\t\t\t\t\t\t\t\t\tvar mspeed = nextcaption.data('speed')/1000;\n\t\t\t\t\t\t\t\t\t\t\tvar calcx = (xbw*nextcaption.data('x')+offsetx);\n\t\t\t\t\t\t\t\t\t\t\tvar calcy = (opt.bh*nextcaption.data('y')+offsety);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif (opt.fullScreenAlignForce == \"on\") \n\t\t\t\t\t\t\t\t\t\t\t\tcalcy = nextcaption.data('y')+offsety;\n\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tTweenLite.killTweensOf(nextcaption,false);\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tclearTimeout(nextcaption.data('reversetimer'));\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar tlop = 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \ttlxx = calcx, tlyy = calcy, tlzz = 2,\n\t\t\t\t\t\t\t\t\t\t\t\t\t tlsc = 1,tlro = 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t sc=1,scX=1,scY= 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t ro=0,roX=0,roY=0,roZ = 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tskwX=0, skwY = 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\topa = 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttrorig = \"center,center\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttper = 300;\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"customin\")) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar customarray = nextcaption.data('customin').split(';');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjQuery.each(customarray,function(index,param) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tparam = param.split(\":\")\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar w = param[0],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tv = param[1];\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"rotationX\") roX = parseInt(v,0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"rotationY\") roY = parseInt(v,0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"rotationZ\") roZ = parseInt(v,0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"scaleX\") scX = parseInt(v,0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"scaleY\") scY = parseInt(v,0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"opacity\") opa = parseInt(v,0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"skewX\") skwX = parseInt(v,0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"skewY\") skwY = parseInt(v,0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"x\") tlxx = calcx + parseInt(v,0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"y\") tlyy = calcy + parseInt(v,0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"z\") tlzz = parseInt(v,0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"transformOrigin\") trorig = v;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"transformPerspective\") tper=parseInt(v,0);\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"randomrotate\")) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsc = Math.random()*3+1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tro = Math.round(Math.random()*200-100);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlxx = calcx + Math.round(Math.random()*200-100);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlyy = calcy + Math.round(Math.random()*200-100);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('lfr') || nextcaption.hasClass('skewfromright'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlxx = 15+opt.width;\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('lfl') || nextcaption.hasClass('skewfromleft'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlxx = -15-imw;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('sfl') | nextcaption.hasClass('skewfromleftshort'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlxx = calcx-50;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('sfr') | nextcaption.hasClass('skewfromrightshort'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlxx = calcx+50;\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('lft'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlyy = -25 - imh;\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('lfb'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlyy = 25 + opt.height;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('sft'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlyy = calcy-50;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('sfb'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlyy = calcy+50;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('skewfromright') || nextcaption.hasClass('skewfromrightshort'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tskwX = -60\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('skewfromleft') || nextcaption.hasClass('skewfromleftshort'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tskwX = 60\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"customin\")) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('anim',TweenLite.fromTo(nextcaption,mspeed,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ scaleX:scX,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t scaleY:scY,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t rotationX:roX,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t rotationY:roY,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t rotationZ:roZ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t x:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t y:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t left:tlxx,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t top:tlyy,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t z:tlzz+1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t opacity:opa,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t transformPerspective:tper,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t transformOrigin:trorig,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t visibility:'hidden'},\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t left:calcx,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t top:calcy,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t scaleX:1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t scaleY:1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t rotationX:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t rotationY:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t rotationZ:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t skewX:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t skewY:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t z:1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t visibility:'visible',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t opacity:1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t delay:mdelay,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ease:easedata,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t overwrite:\"all\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}));\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('anim',TweenLite.fromTo(nextcaption,mspeed,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ scale:sc,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t rotation:ro,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t left:tlxx+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t top:tlyy+\"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t opacity:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t z:1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t skewX:skwX,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t transformPerspective:600,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t visibility:'visible'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t },\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ left:calcx+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t top:calcy+\"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t scale:1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t skewX:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t rotation:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t z:1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t visibility:'visible',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t opacity:1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t delay:mdelay,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ease:easedata,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t overwrite:\"all\",\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\n\n\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('timer',setTimeout(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"fullscreenvideo\"))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({'display':'block'});\n\n\t\t\t\t\t\t\t\t\t\t\t\t},nextcaption.data('start')));\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// IF THERE IS ANY EXIT ANIM DEFINED\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('end')!=undefined)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tendMoveCaption(nextcaption,opt,nextcaption.data('end')/1000);\n\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t})\n\n\t\t\t\t\t\tvar bt=jQuery('body').find('#'+opt.container.attr('id')).find('.tp-bannertimer');\n\t\t\t\t\t\tbt.data('opt',opt);\n\t\t\t\t}", "function show_carousel(){\n\n var carousel_content = \"<div id='carousel' class='carousel slide'>\";\n carousel_content += \"<ol class='carousel-indicators'>\";\n for(var i = 0; i < eatery_marker_list.length; i++){\n carousel_content += \"<li data-target='#carousel' data-slide-to='\" + i + \"'\" + ((i==0)?\" class='active'\":\"\") + \"></li>\";\n }\n carousel_content += \"</ol><div class='carousel-inner'>\";\n for(var i = 0; i < eatery_marker_list.length; i++){\n var m = eatery_marker_list[i];\n carousel_content += \"<div class='item\" + ((i==0)?\" active\":\"\") + \"'>\";\n carousel_content += \"<div class='row'><center><h2>\" + m.name + \"</h2>\";\n carousel_content += m.street + \"<br>\" + ((m.street_2==\"\")?\"\":m.street_2);\n carousel_content += m.city + \", \" + m.state + \" \" + m.zipcode + \"<br>\";\n carousel_content += \"<font size='3'>\" + m.food_info + \"</font>\" + \"<br>\";\n carousel_content += ((m.website==\"\")?\"\":\"<a href='\" + m.website + \"' target='_blank'>\" + m.website + \"</a>\")\n carousel_content += \"</center></div></div>\";\n }\n carousel_content += \"</div>\";\n\n carousel_content += \"<div id='carousel_arrows' class='row'>\" +\n \"<div class='col-md-4'></div><div class='col-md-2'><a class='left' href='#carousel' data-slide='prev'>\" +\n \"<span class='glyphicon glyphicon-chevron-left'></span></a></div>\";\n carousel_content += \"<div class='col-md-2'><a class='right' href='#carousel' data-slide='next'>\" + \n \"<span class='glyphicon glyphicon-chevron-right'></span></a></div><div class='col-md-4'></div>\";\n\n carousel_content += \"</div></div><br><div id='carousel_text_link'><a href='javascript:show_list();' class='text-center'>View List</a>\";\n document.getElementById(\"list_overlay\").innerHTML = carousel_content;\n document.getElementById(\"list_overlay\").style.display = \"inherit\";\n $('.carousel').carousel({\n interval: false\n })\n}", "addCaption (){\n\n$(\".carousel__cell\").append(\"<figure><figcaption><p></p></figcaption></figure>\");\n$(\"figure\").css({height:\"400px\",position:'relative'});\n$(\"figcaption\").css({height:\"400px\",background:\"rgba(0,0,0,0.4)\",position:'relative'});\n$(\"#one p\").append(document.createTextNode(\"Bonjour et bienvenue sur Cy'Clic.\"));\n$(\"#two p\").append(document.createTextNode(\"Suivez les instructions pour réserver votre vélo.\"));\n$(\"#three p\").append(document.createTextNode(\"Pour commencer cliquez sur un point de la carte ci-dessous, un panneau s'ouvrira alors sur le côté droit de la carte avec les informations concernant la station.\"));\n$(\"#four p\").append(document.createTextNode(\"sur ce panneau vous verrez toutes les infos sur la station selectioné, le nombre de vélo disponible,l'adresse. Vous pouvez alors cliquez sur le bouton reserver.\"));\n$(\"#five p\").append(document.createTextNode(\"Remplisser le formulaire et signez dans le cadre blanc , vous aurez alors 20 min pour récupérer votre vélo. Au delà du temps imparti votre réservation sera annulez.\"));\n$(\"#six p\").append(document.createTextNode(\"Attention !! une seule réservation par session et par nom est autoriser. Cy'Clic vous souhaite une bonne journée.\"));\n\n}", "function Carousel(element) {\n\t\n\t\tvar self = this;\n\t\telement = $(element);\n\n\t\tvar container = $(\">.slides\", element);\n\t\tvar panes = $(\">.slides>.slide\", element);\n\n\t\tvar pane_width = 0;\n\t\tvar pane_count = panes.length;\n\n\t\tvar current_pane = 0;\n\n\n\t\t/* initial */\n\t\tthis.init = function() {\n\t\tsetPaneDimensions();\n\t\n\t\t$(window).on(\"load resize orientationchange\", function() {\n\t\t\tsetPaneDimensions();\n\t\t})\n\t\t};\n\n\n\t\t/* set the pane dimensions and scale the container */\n\t\tfunction setPaneDimensions() {\n\t\tpane_width = element.width();\n\t\tpanes.each(function() {\n\t\t\t$(this).width(pane_width);\n\t\t});\n\t\tcontainer.width(pane_width*pane_count);\n\t\t};\n\n\n\t\t/* show pane by index */\n\t\tthis.showPane = function(index, animate) {\n\t\t// between the bounds\n\t\tindex = Math.max(0, Math.min(index, pane_count-1));\n\t\tcurrent_pane = index;\n\t\n\t\tvar offset = -((100/pane_count)*current_pane);\n\t\tsetContainerOffset(offset, animate);\n\t\t};\n\n\n\t\tfunction setContainerOffset(percent, animate) {\n\t\tcontainer.removeClass(\"animate\");\n\t\n\t\tif(animate) {\n\t\t\tcontainer.addClass(\"animate\");\n\t\t}\n\t\n\t\tif(Modernizr.csstransforms3d) {\n\t\t\tcontainer.css(\"transform\", \"translate3d(\"+ percent +\"%,0,0) scale3d(1,1,1)\");\n\t\t}\n\t\telse if(Modernizr.csstransforms) {\n\t\t\tcontainer.css(\"transform\", \"translate(\"+ percent +\"%,0)\");\n\t\t}\n\t\telse {\n\t\t\tvar px = ((pane_width*pane_count) / 100) * percent;\n\t\t\tcontainer.css(\"left\", px+\"px\");\n\t\t}\n\t\t}\n\n\t\tthis.next = function() { return this.showPane(current_pane+1, true); };\n\t\tthis.prev = function() { return this.showPane(current_pane-1, true); };\n\t\n\t$( \".btn-slidenav\" ).click(function(e){\n\t\te.preventDefault();\n\t\tvar dir = $(this).attr( \"data-dir\" );\n\t\n\t\tif( dir == \"prev\" ) {\n\t\t\tself.prev();\n\t\t} else if ( dir == \"next\" ) {\n\t\t\tself.next();\n\t\t}\n\t});\n\t\n\t$( \".mcs-link\" ).click(function(e){\n\t\tvar i = $(this).attr( \"data-index\" );\n\t\t\n\t\tmodalClose( $(this) );\n\t\tself.showPane( i, true );\n\t});\n\n\n\t\tfunction handleHammer(ev) {\n\t\t// disable browser scrolling\n\t\tev.gesture.preventDefault();\n\t\n\t\tswitch(ev.type) {\n\t\t\tcase 'dragright':\n\t\t\tcase 'dragleft':\n\t\t\t\t// stick to the finger\n\t\t\t\tvar pane_offset = -(100/pane_count)*current_pane;\n\t\t\t\tvar drag_offset = ((100/pane_width)*ev.gesture.deltaX) / pane_count;\n\t\n\t\t\t\t// slow down at the first and last pane\n\t\t\t\tif((current_pane == 0 && ev.gesture.direction == \"right\") ||\n\t\t\t\t(current_pane == pane_count-1 && ev.gesture.direction == \"left\")) {\n\t\t\t\t\tdrag_offset *= .4;\n\t\t\t\t}\n\t\n\t\t\t\tsetContainerOffset(drag_offset + pane_offset);\n\t\t\t\tbreak;\n\t\n\t\t\tcase 'swipeleft':\n\t\t\t\tself.next();\n\t\t\t\tev.gesture.stopDetect();\n\t\t\t\tbreak;\n\t\n\t\t\tcase 'swiperight':\n\t\t\t\tself.prev();\n\t\t\t\tev.gesture.stopDetect();\n\t\t\t\tbreak;\n\t\n\t\t\tcase 'release':\n\t\t\t\t// more then 50% moved, navigate\n\t\t\t\tif(Math.abs(ev.gesture.deltaX) > pane_width/2) {\n\t\t\t\t\tif(ev.gesture.direction == 'right') {\n\t\t\t\t\t\tself.prev();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.next();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tself.showPane(current_pane, true);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\t}\n\n\t\tnew Hammer(element[0], { dragLockToAxis: true }).on(\"release dragleft dragright swipeleft swiperight\", handleHammer);\n}", "function setCaption(){\n\t$('.marquee_caption').delay(100).animate({left: 0}, 750);\n\n}", "function animateTheCaptions(nextli, opt) {\n\n\n\n\n nextli.find('.caption').each(function(i) {\n\n offsetx = opt.width / 2 - opt.startwidth / 2;\n\n if (opt.bh > 1) {\n opt.bw = 1;\n opt.bh = 1;\n }\n\n if (opt.bw > 1) {\n opt.bw = 1;\n opt.bh = 1;\n }\n\n var xbw = opt.bw;\n\n\n\n\n var nextcaption = nextli.find('.caption:eq(' + i + ')');\n nextcaption.stop(true, true);\n\n\n if (nextcaption.hasClass(\"coloredbg\")) offsetx = 0;\n if (offsetx < 0) offsetx = 0;\n\n clearTimeout(nextcaption.data('timer'));\n\n\n\n // YOUTUBE AND VIMEO LISTENRES INITIALISATION\n\n var frameID = \"iframe\" + Math.round(Math.random() * 1000 + 1);\n\n if (nextcaption.find('iframe').length > 0) {\n var ifr = nextcaption.find('iframe');\n\n if (ifr.attr('src').toLowerCase().indexOf('youtube') >= 0) {\n\n ifr.attr('id', frameID);\n ifr.addClass(\"HasListener\");\n var player;\n player = new YT.Player(frameID, {\n events: {\n \"onStateChange\": onPlayerStateChange\n }\n });\n\n } else {\n if (ifr.attr('src').toLowerCase().indexOf('vimeo') >= 0) {\n\n if (!ifr.hasClass(\"HasListener\")) {\n ifr.addClass(\"HasListener\");\n ifr.attr('id', frameID);\n var isrc = ifr.attr('src');\n var queryParameters = {},\n queryString = isrc,\n re = /([^&=]+)=([^&]*)/g,\n m;\n // Creates a map with the query string parameters\n while (m = re.exec(queryString)) {\n queryParameters[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);\n }\n\n\n if (queryParameters['player_id'] != undefined) {\n\n isrc = isrc.replace(queryParameters['player_id'], frameID);\n } else {\n isrc = isrc + \"&player_id=\" + frameID;\n }\n\n try {\n isrc = isrc.replace('api=0', 'api=1');\n } catch (e) {}\n\n isrc = isrc + \"&api=1\";\n\n\n\n ifr.attr('src', isrc);\n var player = nextcaption.find('iframe')[0];\n $f(player).addEvent('ready', vimeoready);\n\n }\n\n }\n }\n }\n\n\n\n\n\n\n var imw = 0;\n var imh = 0;\n\n if (nextcaption.find('img').length > 0) {\n var im = nextcaption.find('img');\n if (im.data('ww') == undefined) im.data('ww', im.width());\n if (im.data('hh') == undefined) im.data('hh', im.height());\n\n var ww = im.data('ww');\n var hh = im.data('hh');\n\n\n im.width(ww * opt.bw);\n im.height(hh * opt.bh);\n imw = im.width();\n imh = im.height();\n } else {\n\n if (nextcaption.find('iframe').length > 0) {\n var im = nextcaption.find('iframe');\n if (nextcaption.data('ww') == undefined) {\n nextcaption.data('ww', im.width());\n }\n if (nextcaption.data('hh') == undefined) nextcaption.data('hh', im.height());\n\n var ww = nextcaption.data('ww');\n var hh = nextcaption.data('hh');\n\n var nc = nextcaption;\n if (nc.data('fsize') == undefined) nc.data('fsize', parseInt(nc.css('font-size'), 0) || 0);\n if (nc.data('pt') == undefined) nc.data('pt', parseInt(nc.css('paddingTop'), 0) || 0);\n if (nc.data('pb') == undefined) nc.data('pb', parseInt(nc.css('paddingBottom'), 0) || 0);\n if (nc.data('pl') == undefined) nc.data('pl', parseInt(nc.css('paddingLeft'), 0) || 0);\n if (nc.data('pr') == undefined) nc.data('pr', parseInt(nc.css('paddingRight'), 0) || 0);\n\n if (nc.data('mt') == undefined) nc.data('mt', parseInt(nc.css('marginTop'), 0) || 0);\n if (nc.data('mb') == undefined) nc.data('mb', parseInt(nc.css('marginBottom'), 0) || 0);\n if (nc.data('ml') == undefined) nc.data('ml', parseInt(nc.css('marginLeft'), 0) || 0);\n if (nc.data('mr') == undefined) nc.data('mr', parseInt(nc.css('marginRight'), 0) || 0);\n\n if (nc.data('bt') == undefined) nc.data('bt', parseInt(nc.css('borderTop'), 0) || 0);\n if (nc.data('bb') == undefined) nc.data('bb', parseInt(nc.css('borderBottom'), 0) || 0);\n if (nc.data('bl') == undefined) nc.data('bl', parseInt(nc.css('borderLeft'), 0) || 0);\n if (nc.data('br') == undefined) nc.data('br', parseInt(nc.css('borderRight'), 0) || 0);\n\n if (nc.data('lh') == undefined) nc.data('lh', parseInt(nc.css('lineHeight'), 0) || 0);\n\n\n nextcaption.css({\n 'font-size': (nc.data('fsize') * opt.bw) + \"px\",\n\n 'padding-top': (nc.data('pt') * opt.bh) + \"px\",\n 'padding-bottom': (nc.data('pb') * opt.bh) + \"px\",\n 'padding-left': (nc.data('pl') * opt.bw) + \"px\",\n 'padding-right': (nc.data('pr') * opt.bw) + \"px\",\n\n 'margin-top': (nc.data('mt') * opt.bh) + \"px\",\n 'margin-bottom': (nc.data('mb') * opt.bh) + \"px\",\n 'margin-left': (nc.data('ml') * opt.bw) + \"px\",\n 'margin-right': (nc.data('mr') * opt.bw) + \"px\",\n\n 'border-top': (nc.data('bt') * opt.bh) + \"px\",\n 'border-bottom': (nc.data('bb') * opt.bh) + \"px\",\n 'border-left': (nc.data('bl') * opt.bw) + \"px\",\n 'border-right': (nc.data('br') * opt.bw) + \"px\",\n\n 'line-height': (nc.data('lh') * opt.bh) + \"px\",\n 'height': (hh * opt.bh) + 'px',\n 'white-space': \"nowrap\"\n\n\n });\n\n im.width(ww * opt.bw);\n im.height(hh * opt.bh);\n imw = im.width();\n imh = im.height();\n } else {\n\n var nc = nextcaption;\n if (nc.data('fsize') == undefined) nc.data('fsize', parseInt(nc.css('font-size'), 0) || 0);\n if (nc.data('pt') == undefined) nc.data('pt', parseInt(nc.css('paddingTop'), 0) || 0);\n if (nc.data('pb') == undefined) nc.data('pb', parseInt(nc.css('paddingBottom'), 0) || 0);\n if (nc.data('pl') == undefined) nc.data('pl', parseInt(nc.css('paddingLeft'), 0) || 0);\n if (nc.data('pr') == undefined) nc.data('pr', parseInt(nc.css('paddingRight'), 0) || 0);\n\n if (nc.data('mt') == undefined) nc.data('mt', parseInt(nc.css('marginTop'), 0) || 0);\n if (nc.data('mb') == undefined) nc.data('mb', parseInt(nc.css('marginBottom'), 0) || 0);\n if (nc.data('ml') == undefined) nc.data('ml', parseInt(nc.css('marginLeft'), 0) || 0);\n if (nc.data('mr') == undefined) nc.data('mr', parseInt(nc.css('marginRight'), 0) || 0);\n\n if (nc.data('bt') == undefined) nc.data('bt', parseInt(nc.css('borderTop'), 0) || 0);\n if (nc.data('bb') == undefined) nc.data('bb', parseInt(nc.css('borderBottom'), 0) || 0);\n if (nc.data('bl') == undefined) nc.data('bl', parseInt(nc.css('borderLeft'), 0) || 0);\n if (nc.data('br') == undefined) nc.data('br', parseInt(nc.css('borderRight'), 0) || 0);\n\n if (nc.data('lh') == undefined) nc.data('lh', parseInt(nc.css('lineHeight'), 0) || 0);\n\n\n nextcaption.css({\n 'font-size': (nc.data('fsize') * opt.bw) + \"px\",\n\n 'padding-top': (nc.data('pt') * opt.bh) + \"px\",\n 'padding-bottom': (nc.data('pb') * opt.bh) + \"px\",\n 'padding-left': (nc.data('pl') * opt.bw) + \"px\",\n 'padding-right': (nc.data('pr') * opt.bw) + \"px\",\n\n 'margin-top': (nc.data('mt') * opt.bh) + \"px\",\n 'margin-bottom': (nc.data('mb') * opt.bh) + \"px\",\n 'margin-left': (nc.data('ml') * opt.bw) + \"px\",\n 'margin-right': (nc.data('mr') * opt.bw) + \"px\",\n\n 'border-top': (nc.data('bt') * opt.bh) + \"px\",\n 'border-bottom': (nc.data('bb') * opt.bh) + \"px\",\n 'border-left': (nc.data('bl') * opt.bw) + \"px\",\n 'border-right': (nc.data('br') * opt.bw) + \"px\",\n\n 'line-height': (nc.data('lh') * opt.bh) + \"px\",\n 'white-space': \"nowrap\"\n\n\n });\n imh = nextcaption.outerHeight(true);\n imw = nextcaption.outerWidth(true);\n }\n }\n\n\n\n if (nextcaption.hasClass('fade')) {\n\n nextcaption.css({ 'opacity': 0, 'left': (xbw * nextcaption.data('x') + offsetx) + 'px', 'top': (opt.bh * nextcaption.data('y')) + \"px\" });\n }\n\n\n\n if (nextcaption.hasClass('lfr')) {\n\n nextcaption.css({ 'opacity': 1, 'left': (5 + opt.width) + 'px', 'top': (opt.bh * nextcaption.data('y')) + \"px\" });\n\n }\n\n if (nextcaption.hasClass('lfl')) {\n\n nextcaption.css({ 'opacity': 1, 'left': (-5 - imw) + 'px', 'top': (opt.bh * nextcaption.data('y')) + \"px\" });\n\n }\n\n if (nextcaption.hasClass('sfl')) {\n\n nextcaption.css({ 'opacity': 0, 'left': ((xbw * nextcaption.data('x')) - 50 + offsetx) + 'px', 'top': (opt.bh * nextcaption.data('y')) + \"px\" });\n }\n\n if (nextcaption.hasClass('sfr')) {\n nextcaption.css({ 'opacity': 0, 'left': ((xbw * nextcaption.data('x')) + 50 + offsetx) + 'px', 'top': (opt.bh * nextcaption.data('y')) + \"px\" });\n }\n\n\n\n\n if (nextcaption.hasClass('lft')) {\n\n nextcaption.css({ 'opacity': 1, 'left': (xbw * nextcaption.data('x') + offsetx) + 'px', 'top': (-5 - imh) + \"px\" });\n\n }\n\n if (nextcaption.hasClass('lfb')) {\n nextcaption.css({ 'opacity': 1, 'left': (xbw * nextcaption.data('x') + offsetx) + 'px', 'top': (5 + opt.height) + \"px\" });\n\n }\n\n if (nextcaption.hasClass('sft')) {\n nextcaption.css({ 'opacity': 0, 'left': (xbw * nextcaption.data('x') + offsetx) + 'px', 'top': ((opt.bh * nextcaption.data('y')) - 50) + \"px\" });\n }\n\n if (nextcaption.hasClass('sfb')) {\n nextcaption.css({ 'opacity': 0, 'left': (xbw * nextcaption.data('x') + offsetx) + 'px', 'top': ((opt.bh * nextcaption.data('y')) + 50) + \"px\" });\n }\n\n\n\n\n nextcaption.data('timer', setTimeout(function() {\n if (nextcaption.hasClass('fade')) {\n nextcaption.data('repo', nextcaption.css('opacity'));\n nextcaption.animate({ 'opacity': 1 });\n }\n if (nextcaption.hasClass('lfr') ||\n nextcaption.hasClass('lfl') ||\n nextcaption.hasClass('sfr') ||\n nextcaption.hasClass('sfl') ||\n nextcaption.hasClass('lft') ||\n nextcaption.hasClass('lfb') ||\n nextcaption.hasClass('sft') ||\n nextcaption.hasClass('sfb')\n ) {\n var easetype = nextcaption.data('easing');\n if (easetype == undefined) easetype = \"linear\";\n nextcaption.data('repx', nextcaption.position().left);\n nextcaption.data('repy', nextcaption.position().top);\n\n nextcaption.data('repo', nextcaption.css('opacity'));\n nextcaption.animate({ 'opacity': 1, 'left': (xbw * nextcaption.data('x') + offsetx) + 'px', 'top': opt.bh * (nextcaption.data('y')) + \"px\" }, { duration: nextcaption.data('speed'), easing: easetype });\n }\n }, nextcaption.data('start')));\n\n })\n }", "function handleBootstrap() {\n /*Bootstrap Carousel*/\n jQuery('.carousel').carousel({\n interval: 15000,\n pause: 'hover'\n });\n\n /*Tooltips*/\n jQuery('.tooltips').tooltip();\n jQuery('.tooltips-show').tooltip('show'); \n jQuery('.tooltips-hide').tooltip('hide'); \n jQuery('.tooltips-toggle').tooltip('toggle'); \n jQuery('.tooltips-destroy').tooltip('destroy'); \n\n /*Popovers*/\n jQuery('.popovers').popover();\n jQuery('.popovers-show').popover('show');\n jQuery('.popovers-hide').popover('hide');\n jQuery('.popovers-toggle').popover('toggle');\n jQuery('.popovers-destroy').popover('destroy');\n }", "function captionTransition(caption, duration) { // 3264\n if (caption.hasClass(\"center-align\")) { // 3265\n caption.velocity({opacity: 0, translateY: -100}, {duration: duration, queue: false}); // 3266\n } // 3267\n else if (caption.hasClass(\"right-align\")) { // 3268\n caption.velocity({opacity: 0, translateX: 100}, {duration: duration, queue: false}); // 3269\n } // 3270\n else if (caption.hasClass(\"left-align\")) { // 3271\n caption.velocity({opacity: 0, translateX: -100}, {duration: duration, queue: false}); // 3272\n } // 3273\n } // 3274", "function creatCarosel2() {\n $(\".cont0\").append(\"<div id=\\\"carouselExampleControls\\\" class=\\\"carousel slide\\\" data-ride=\\\"carousel\\\">\\n <div class=\\\"carousel-inner d-none d-md-block\\\">\\n <div class=\\\"carousel-item active\\\">\\n <img class=\\\"d-block w-100\\\" src=\\\"./img/starTrek_logo1.png\\\" alt=\\\"First slide\\\">\\n\\n <div class=\\\"carousel-caption d-none d-md-block\\\">\\n <h3>Star Trek</h3>\\n <p>\\u201CLive long and prosper\\u201D</p>\\n </div>\\n </div>\\n <div class=\\\"carousel-item\\\">\\n <img class=\\\"d-block w-100\\\" src=\\\"./img/vulcan_planet.jpg\\\" alt=\\\"Third slide\\\">\\n <div class=\\\"carousel-caption d-none d-md-block\\\">\\n <h1>Vulcan</h1>\\n <p>\\u201CThe Vulcans, or Vulcanians, were a warp-capable humanoid species from the planet Vulcan\\u201C</p>\\n </div>\\n </div>\\n <div class=\\\"carousel-item\\\">\\n <img class=\\\"d-block w-100 \\\" src=\\\"./img/kling_planet.jpg\\\" alt=\\\"Second slide\\\">\\n <div class=\\\"carousel-caption d-none d-md-block\\\">\\n <h3>Qo'noS</h3>\\n <p>\\u201CRevenge is a dish best served cold\\u201D</p>\\n </div>\\n </div>\\n <div class=\\\"carousel-item\\\">\\n <img class=\\\"d-block w-100 \\\" src=\\\"./img/romu_planet.jpg\\\" alt=\\\"Fourth slide\\\">\\n <div class=\\\"carousel-caption d-none d-md-block\\\">\\n <h3>Romulus</h3>\\n <p>\\u201CRomulus was the inhabited second planet of the Romulan system in Sector Z-6\\u201D</p>\\n </div>\\n </div>\\n </div>\\n <a class=\\\"carousel-control-prev\\\" href=\\\"#carouselExampleControls\\\" role=\\\"button\\\" data-slide=\\\"prev\\\">\\n <!--made a button insted of a-->\\n <span class=\\\"carousel-control-prev-icon d-none d-md-block\\\" aria-hidden=\\\"true\\\"></span>\\n <span class=\\\"sr-only\\\">Previous</span>\\n </a>\\n <a class=\\\"carousel-control-next\\\" href=\\\"#carouselExampleControls\\\" role=\\\"button\\\" data-slide=\\\"next\\\">\\n <span class=\\\"carousel-control-next-icon d-none d-md-block\\\" aria-hidden=\\\"true\\\"></span>\\n <span class=\\\"sr-only\\\">Next</span>\\n </a>\\n </div>\");\n }", "function buildCarouselHtml() {\n $(\"<div>\", {class: \"item\"}).append(\n $(\"<a href =\" + link + \">\").append(\n $(\"<img src =\" + image + \" alt = ''>\")\n ),\n $(\"<div>\", {class:\"carousel-caption\"}).append(\n $(\"<h3>\").text(title), \n $(\"<h6>\").text(attribution)\n )\n )\n .appendTo(\".carousel-inner\");\n $(\".carousel-inner .item:first\").addClass(\"active\");\n $(\".loader\").addClass(\"hidden\");\n}", "function changeCarousel() {\n $slider.find(\".show\").removeClass(\"show\").fadeOut();\n $slider\n .find(\"> div\")\n .eq(position)\n .fadeIn(set.fadeSpeed)\n .addClass(\"show\");\n // The Dots\n $slider.find(\"> ul\").find(\".showli\").removeClass(\"showli\");\n $slider.find(\"> ul > li\").eq(position).addClass(\"showli\");\n }", "function verCaption2 (){\n\tvar childInFocus2 = $('div#carousel2').data('roundabout').childInFocus;\n\tvar setCaption2 = $('.carousel_data2 .carousel_item2 .caption2:eq('+childInFocus2+')').html();\n\t\n\t$('#captions2').html(setCaption2);\n\t$('#captions2').animate({'opacity':1}, 230);\n}", "function generateLabCarousel() {\r\n\r\n\t\tvar defaultCss = {\r\n\t\t\twidth: 100,\r\n\t\t\theight: 100,\r\n\t\t\tmarginTop: 50,\r\n\t\t\tmarginRight: 0,\r\n\t\t\tmarginLeft: 0,\r\n\t\t\topacity: 0.2\r\n\t\t};\r\n\t\tvar selectedCss = {\r\n\t\t\twidth: 150,\r\n\t\t\theight: 150,\r\n\t\t\tmarginTop: 30,\r\n\t\t\tmarginRight: -25,\r\n\t\t\tmarginLeft: -25,\r\n\t\t\topacity: 1\r\n\t\t};\r\n\t\tvar aniOpts = {\r\n\t\t\tqueue: false,\r\n\t\t\tduration: 300,\r\n\t\t\t//easing: 'cubic'\r\n\t\t};\r\n\t\tvar $car = $('#lab-carousel');\r\n\t\t$car.find('img').css('zIndex', 1).css( defaultCss );\r\n\r\n\t\t$car.children('div').each(function(i){\r\n\t\t\t$(this).data('index',i);\r\n\t\t});\r\n\r\n\t\t$car.carouFredSel({\r\n\t\t\tcircular: true,\r\n\t\t\tinfinite: true,\r\n\t\t\twidth: '100%',\r\n\t\t\theight: 250,\r\n\t\t\titems: {\r\n\t\t\t\tvisible:3,\r\n\t\t\t\tstart:1\r\n\t\t\t},\r\n\t\t\tprev: '#prev',\r\n\t\t\tnext: '#next',\r\n\t\t\tauto: false,\r\n\t\t\tswipe : {\r\n\t\t\t\tonTouch :true,\r\n\t\t\t\tonMouse :true\r\n\t\t\t},\r\n\t\t\tscroll: {\r\n\t\t\t\titems: 1,\r\n\t\t\t\tduration: 300,\r\n\t\t\t\t//easing: 'cubic',\r\n\t\t\t\tonBefore: function( data ) {\r\n\t\t\t\t\tvar $comming = data.items.visible.eq(1),\r\n\t\t\t\t\t\t$going = data.items.old.eq(1),\r\n\t\t\t\t\t\t$commingdetail = $(\"div#lab-details div\").eq($comming.data('index')),\r\n\t\t\t\t\t\t$goingdetail = $(\"div#lab-details div\").eq($going.data('index'));\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\t$goingdetail.fadeOut(100,function(){\r\n\t\t\t\t\t\t$goingdetail.siblings().hide();\r\n\t\t\t\t\t\t$commingdetail.fadeIn(300);\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\t$comming.find('img').css('zIndex', 2).animate( selectedCss, aniOpts );\r\n\t\t\t\t\tdata.items.old.eq(1).find('img').css('zIndex', 1).animate( defaultCss, aniOpts );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}", "function addBootstrapPhotoGallery(images) {\n // TODO: MODULE_ADVENTURE_DETAILS\n // 1. Add the bootstrap carousel to show the Adventure images\n\n // parent\n // carousel\n // ol\n // li....\n // carouselInner\n // a\n // prevBtn\n // a\n // nextBtn\n\n let parent = document.getElementById(\"photo-gallery\");\n parent.textContent = \"\";\n\n let carousel = document.createElement(\"div\");\n carousel.id = \"imageCarousel\";\n carousel.className = \"carousel slide\";\n carousel.setAttribute(\"data-ride\", \"carousel\");\n\n parent.appendChild(carousel);\n\n let ol = document.createElement(\"ol\");\n ol.className = \"carousel-indicators\";\n for (let i = 0; i < images.length; ++i) {\n let li = document.createElement(\"li\");\n li.setAttribute(\"data-target\", \"#imageCarousel\");\n li.setAttribute(\"data-slide-to\", `${i}`);\n\n if (i == 0) {\n li.className = \"active\";\n }\n ol.appendChild(li);\n }\n\n carousel.appendChild(ol);\n\n let carouselInner = document.createElement(\"div\");\n carouselInner.className = \"carousel-inner\";\n for (let i = 0; i < images.length; ++i) {\n let div = document.createElement(\"div\");\n div.className = \"carousel-item\";\n let img = document.createElement(\"img\");\n img.className = \"d-block w-100 img-fluid activity-card-image\";\n img.src = images[i];\n img.alt = `slide-${i + 1}`;\n\n if (i == 0) {\n div.className = \"carousel-item active\";\n }\n div.appendChild(img);\n carouselInner.appendChild(div);\n }\n carousel.appendChild(carouselInner);\n\n let prevBtn = document.createElement(\"a\");\n prevBtn.setAttribute(\"data-slide\", \"prev\");\n prevBtn.className = \"carousel-control-prev\";\n prevBtn.href = \"#imageCarousel\";\n prevBtn.role = \"button\";\n $(prevBtn)\n .append(`<span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span class=\"sr-only\">Previous</span>`);\n\n let nextBtn = document.createElement(\"a\");\n nextBtn.setAttribute(\"data-slide\", \"next\");\n nextBtn.className = \"carousel-control-next\";\n nextBtn.href = \"#imageCarousel\";\n nextBtn.role = \"button\";\n $(nextBtn)\n .append(`<span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span class=\"sr-only\">Next</span>`);\n\n carousel.appendChild(prevBtn);\n carousel.appendChild(nextBtn);\n\n parent.appendChild(carousel);\n}", "function carousel_slider() {\n\t\t$('.carousel_slider').each(function () {\n\t\t\tvar $carousel = $(this);\n\t\t\t$carousel.owlCarousel({\n\t\t\t\tdots: $carousel.data(\"dots\"),\n\t\t\t\tloop: $carousel.data(\"loop\"),\n\t\t\t\titems: $carousel.data(\"items\"),\n\t\t\t\tmargin: $carousel.data(\"margin\"),\n\t\t\t\tmouseDrag: $carousel.data(\"mouse-drag\"),\n\t\t\t\ttouchDrag: $carousel.data(\"touch-drag\"),\n\t\t\t\tautoHeight: $carousel.data(\"autoheight\"),\n\t\t\t\tcenter: $carousel.data(\"center\"),\n\t\t\t\tnav: $carousel.data(\"nav\"),\n\t\t\t\trewind: $carousel.data(\"rewind\"),\n\t\t\t\tnavText: ['<i class=\"ion-ios-arrow-left\"></i>', '<i class=\"ion-ios-arrow-right\"></i>'],\n\t\t\t\tautoplay: $carousel.data(\"autoplay\"),\n\t\t\t\tanimateIn: $carousel.data(\"animate-in\"),\n\t\t\t\tanimateOut: $carousel.data(\"animate-out\"),\n\t\t\t\tautoplayTimeout: $carousel.data(\"autoplay-timeout\"),\n\t\t\t\tsmartSpeed: $carousel.data(\"smart-speed\"),\n\t\t\t\tresponsive: $carousel.data(\"responsive\")\n\t\t\t});\n\t\t});\n\t}", "function initTestimonialsCarousel(){\n\t\"use strict\";\n\n if($j('.testimonials_c_carousel').length){\n $j('.testimonials_c_carousel').each(function(){\n var interval = 5000;\n var $this = $j(this);\n\n if(typeof $this.data('auto-rotate-slides') !== 'undefined' && $this.data('auto-rotate-slides') !== false) {\n interval = parseFloat($this.data('auto-rotate-slides')) * 1000;\n }\n\n var slideshow = true;\n if(interval === 0) {\n slideshow = false;\n }\n\n var controlNav = true;\n if(typeof $this.data('show-navigation') !== 'undefined') {\n controlNav = $this.data('show-navigation') == 'no' ? false : true;\n }\n\n var animationSpeed = 600;\n if(typeof $this.data('animation-speed') !== 'undefined' && $this.data('animation-speed') !== false) {\n animationSpeed = $this.data('animation-speed');\n } \n\n var numberPerPage = qodeNumberOfTestimonialsItems($this);\n var itemWidth = 0;\n var itemMargin = 0;\n if(typeof numberPerPage !== 'undefined' && numberPerPage !== 1) {\n itemWidth = 300; \n itemMargin = 30;\n }\n\n $this.flexslider({\n animationLoop: true,\n controlNav: controlNav,\n directionNav: false,\n useCSS: false,\n pauseOnAction: true,\n pauseOnHover: false,\n slideshow: slideshow,\n animation: 'slide',\n itemMargin: itemMargin,\n minItems: numberPerPage,\n maxItems: numberPerPage,\n itemWidth: itemWidth,\n animationSpeed: animationSpeed,\n slideshowSpeed: interval\n });\n });\n\n }\n}", "function slidetweaks()\n{\n\tvar $ = jQuery;\n\n\t// Because of where this callback function is executed within \n\t// SlidesJS code I don't have access to sjs variable in here :(\n\n\t// put prev & next inside of main slide area so they can be positioned relative to it.\n\t$('.slidesjs-navigation').appendTo('.slidesjs-container');\n\n\t$('.slidesjs-slide').css('display','block');\n\t$('.slidesjs-slide img').each( function(index,element){ centerImage(element); } );\n\t$('.slidesjs-slide').css('display','none');\n\t$('.slidesjs-slide').first().css('display','block');\n}", "function ShowcaseCarousel() {\r\n\t\t\r\n\t\r\n\t\tif( $('#showcase-carousel').length > 0 ){\t\r\n\t\t\r\n\t\t\tvar interleaveOffset = 0;\r\n\r\n\t\t\tvar swiperOptions = {\r\n\t\t\t\tdirection: \"horizontal\",\r\n\t\t\t\tloop: false,\r\n\t\t\t\tgrabCursor: true,\r\n\t\t\t\tresistance : true,\r\n\t\t\t\tresistanceRatio : 0.6,\r\n\t\t\t\tspeed:1000,\r\n\t\t\t\tspaceBetween: 40,\r\n\t\t\t\tslidesPerView: 3,\r\n\t\t\t\tbreakpoints: {\r\n\t\t\t\t\t1466: {\r\n\t\t\t\t\t slidesPerView: 2,\r\n\t\t\t\t\t spaceBetween: 40\r\n\t\t\t\t\t},\r\n\t\t\t\t\t1024: {\r\n\t\t\t\t\t slidesPerView: 2,\r\n\t\t\t\t\t spaceBetween: 30\r\n\t\t\t\t\t},\r\n\t\t\t\t\t767: {\r\n\t\t\t\t\t slidesPerView: 1,\r\n\t\t\t\t\t spaceBetween: 30\r\n\t\t\t\t\t},\r\n\t\t\t\t\t479: {\r\n\t\t\t\t\t slidesPerView: 1,\r\n\t\t\t\t\t spaceBetween: 20\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tautoplay: false,\r\n\t\t\t\teffect: \"slide\",\r\n\t\t\t\tmousewheel: true,\t\t\t\t\r\n\t\t\t\tscrollbar: {\r\n\t\t\t\t\tel: '.swiper-scrollbar',\r\n\t\t\t\t\tdraggable: true,\r\n\t\t\t\t },\r\n\t\t\t\tnavigation: {\r\n\t\t\t\t\tnextEl: '.swiper-button-next',\r\n\t\t\t\t\tprevEl: '.swiper-button-prev',\r\n\t\t\t\t},\r\n\t\t\t\ton: {\r\n\t\t\t\t\tprogress: function() {\r\n\t\t\t\t\t var swiper = this;\r\n\t\t\t\t\t for (var i = 0; i < swiper.slides.length; i++) {\r\n\t\t\t\t\t\tvar slideProgress = swiper.slides[i].progress;\r\n\t\t\t\t\t\tvar innerOffset = swiper.width * interleaveOffset;\r\n\t\t\t\t\t\tvar innerTranslate = slideProgress * innerOffset;\r\n\t\t\t\t\t\tswiper.slides[i].querySelector(\".img-mask\").style.transform = \"translate3d(\" + innerTranslate + \"px,0, 0)\";\r\n\t\t\t\t\t }\r\n\t\t\t\t\t},\r\n\t\t\t\t\ttouchStart: function() {\r\n\t\t\t\t\t var swiper = this;\r\n\t\t\t\t\t for (var i = 0; i < swiper.slides.length; i++) {\r\n\t\t\t\t\t\tswiper.slides[i].style.transition = \"\";\r\n\t\t\t\t\t }\r\n\t\t\t\t\t},\r\n\t\t\t\t\tsetTransition: function(speed) {\r\n\t\t\t\t\t var swiper = this;\r\n\t\t\t\t\t for (var i = 0; i < swiper.slides.length; i++) {\r\n\t\t\t\t\t\tswiper.slides[i].style.transition = speed + \"ms\";\r\n\t\t\t\t\t\tswiper.slides[i].querySelector(\".img-mask\").style.transition = speed + \"ms\";\r\n\t\t\t\t\t } \r\n\t\t\t\t }\r\n \t\t\t\t}\r\n\t\t\t};\r\n\t\t\t\t\r\n\t\t\tvar swiper = new Swiper(\".swiper-container\", swiperOptions);\r\n\t\t\t\r\n\t\t\t$(\".swiper-slide\").on('mouseenter', function(event) {\r\n\t\t\t\tTweenMax.to('#ball', 0.2,{transformOrigin: '15px 15px', borderWidth: '1px', scale: 1.8});\r\n\t\t\t\tTweenMax.to('#ball-loader', 0.2,{borderWidth: '1px', top: 1, left: 1});\r\n\t\t\t\t$( \"#ball\" ).addClass(\"with-icon\").append( '<i class=\"fa fa-plus\"></i>' );\r\n\t\t\t\t$(this).find('video').each(function() {\r\n\t\t\t\t\t$(this).get(0).play();\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t$('.swiper-slide').on('mousedown', function(event) {\r\n\t\t\t\treturn false;\r\n\t\t\t});\r\n\t\t\t\t\r\n\t\t\t$(\".swiper-slide\").on('mouseleave', function(event) {\r\n\t\t\t\tTweenMax.to('#ball', 0.2,{borderWidth: '2px', scale:1, x: -15, y: -15});\r\n\t\t\t\tTweenMax.to('#ball-loader', 0.2,{borderWidth: '2px', top: 0, left: 0});\r\n\t\t\t\t$(\"#ball\").removeClass(\"with-icon\");\r\n\t\t\t\t$('#ball i').remove();\r\n\t\t\t\t$(this).find('video').each(function() {\r\n\t\t\t\t\t$(this).get(0).pause();\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t$('#showcase-carousel').on('mousedown touchstart', function(event) {\t\t\t\t\r\n\t\t\t\t$('body').addClass('scale-up');\r\n\t\t\t\tTweenMax.to('#ball', 0.1,{transformOrigin: '15px 15px', borderWidth: '1px', scale: 2});\r\n\t\t\t\t\r\n\t\t\t});\t\t\t\r\n\t\t\t$('#showcase-carousel').on('mouseup touchend', function(event) {\t\t\t\t\r\n\t\t\t\t$('body').removeClass('scale-up');\r\n\t\t\t\tTweenMax.to('#ball', 0.1,{borderWidth: '2px', scale:1, x: -15, y: -15});\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t$('body').on('mouseup touchend', function(event) {\t\t\t\t\r\n\t\t\t\t$('body').removeClass('scale-up');\r\n\t\t\t\tTweenMax.to('#ball', 0.1,{borderWidth: '2px', scale:1, x: -15, y: -15});\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tFitSlideScreen();\r\n\t\t}\t\r\n\t\t\r\n\t\t\t\r\n\t}", "function slider_sucks(argument) {\n\n var nextButton = document.getElementById('next');\n var prevButton = document.getElementById('prev');\n\n var slides = document.getElementsByClassName('slide');\n var currentSlide = 0;\n slides[currentSlide].style.display = 'block';\n\n var prev = slides.length - 1;\n var next = currentSlide + 1;\n\n nextButton.onclick = function () {\n slides[currentSlide].style.display = 'none';\n\n prev = currentSlide;\n currentSlide = next;\n next++;\n\n if (next >= slides.length) {\n next = 0;\n }\n\n slides[currentSlide].style.display = 'block';\n }\n\n\n prevButton.onclick = function () {\n slides[currentSlide].style.display = 'none';\n\n next = currentSlide;\n currentSlide = prev;\n prev--;\n\n if (prev < 0) {\n prev = slides.length - 1;\n }\n\n slides[currentSlide].style.display = 'block';\n }\n}", "function mainSlider(){\n\n\n\t//SLIDER 1\n\t$('#carousel-example-generic').carousel({\n\t\tinterval: 10000\n\t});\n\n\t\t$('.carousel-indicators li').click(function(){\n\t\t\t$('#carousel-example-generic').carousel('pause');\n\t\t});\n\n\n\t\t//URL HASH\n\t\tvar url = document.location.toString();\n\t\tif (url.match('#')) {\n\t\t // Clear active item\n\t\t $('#carousel-example-generic .carousel-inner .item.active').removeClass('active');\n\t\t $('#carousel-example-generic .carousel-indicators li.active').removeClass('active');\n\n\t\t // Activate item number #hash\n\t\t $('.carousel-inner div:nth-child(' + url.split('#')[1] + ')').addClass('active');\n\t\t $('.carousel-indicators li:nth-child(' + url.split('#')[1] + ')').addClass('active');\n\t\t}\n\n\t\t$('#carousel-example-generic').bind('slid', function (e) {\n\t\t // Update location based on slide (index is 0-based)\n\t\t window.location.hash = \"#\"+ parseInt($('#carousel-example-generic .carousel-inner .item.active').index()+1);\n\t\t});\n\n\n}", "function experiment() {\r\n\t\t\t// 101 - 123\r\n\t\t\tvar sequence = [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123]\r\n\r\n\t\t\t// function to random generate a sequence\r\n\t\t\tfunction shuffle(array) {\r\n\t\t\t\tvar currentIndex = array.length,\r\n\t\t\t\t\ttemporaryValue, randomIndex;\r\n\r\n\t\t\t\t// While there remain elements to shuffle...\r\n\t\t\t\twhile (0 !== currentIndex) {\r\n\r\n\t\t\t\t\t// Pick a remaining element...\r\n\t\t\t\t\trandomIndex = Math.floor(Math.random() * currentIndex);\r\n\t\t\t\t\tcurrentIndex -= 1;\r\n\r\n\t\t\t\t\t// And swap it with the current element.\r\n\t\t\t\t\ttemporaryValue = array[currentIndex];\r\n\t\t\t\t\tarray[currentIndex] = array[randomIndex];\r\n\t\t\t\t\tarray[randomIndex] = temporaryValue;\r\n\t\t\t\t}\r\n\t\t\t\treturn array;\r\n\t\t\t}\r\n\r\n\t\t\tsequence = shuffle(sequence);\r\n\t\t\tvar inner = \"<div class='carousel-inner'>\"\r\n\r\n\t\t\tvar first = true;\r\n\t\t\tsequence.forEach(function (value_random) {\r\n\t\t\t\tif (first) {\r\n\t\t\t\t\tinner += \"<div class='carousel-item active'>\"\r\n\t\t\t\t\tfirst = false\r\n\t\t\t\t} else inner += \"<div class='carousel-item'>\"\r\n\t\t\t\tinner += \"<img class='d-block h-100' style='margin-left: auto; margin-right: auto; height:150%; width:auto;' src='/static/images/floor1/\"\r\n\t\t\t\tinner += value_random + \".jpg'>\"\r\n\r\n\t\t\t\tinner += \"</div>\";\r\n\t\t\t});\r\n\t\t\tinner += \"</div><a class='carousel-control-prev' href='#experimentRunning' role='button' data-slide='prev'><span class='carousel-control-prev-icon' aria-hidden='true'></span><span class='sr-only'>Previous</span></a><a class='carousel-control-next' href='#experimentRunning' role='button' data-slide='next'><span class='carousel-control-next-icon' aria-hidden='true'></span><span class='sr-only'>Next</span></a>\";\r\n\r\n\t\t\t$(\"#slideShowExperiment\")[0].innerHTML = inner;\r\n\r\n\t\t\t$(\"#slideShowExperiment\").carousel({\r\n\t\t\t\tpause: true,\r\n\t\t\t\tinterval: false,\r\n\t\t\t\tkeyboard: false\r\n\t\t\t})\r\n\r\n\t\t\treturn sequence;\r\n\t\t}", "function case_carousel() {\n var owl = $(\"#case-slider\");\n owl.owlCarousel({\n loop: true,\n margin: 10,\n smartSpeed: 2000,\n animateIn: 'fadeIn',\n animateOut: 'fadeOut',\n responsiveClass: true,\n navigation: true,\n navText: [\"<i class='fa fa-angle-left'></i>\", \"<i class='fa fa-angle-right'></i>\"],\n nav: true,\n items: 1,\n addClassActive: true,\n dots: false,\n autoplay: false,\n autoplayTimeout: 7000,\n responsive: {\n 0: {\n nav: false,\n },\n 760: {\n nav: true,\n\n }\n }\n });\n }", "function carousel() {\n var i;\n var x = document.getElementsByClassName(\"slide\");\n for (i = 0; i < x.length; i++) \n { \n x[i].style.display = \"none\";\n if(slideIndex!=0)\n {\n if(i==slideIndex-1)\n {\n x[i].style.display = \"block\";//keeps the previous image shown\n x[i].style.zIndex = \"1\"; //puts it infront of all images except the next one\n }\n }\n else\n {\n x[x.length-1].style.zIndex = \"1\";//if slide index is 0 it shows the last image in the carousel\n }\n }\n slideIndex++;\n if (slideIndex > x.length) {slideIndex = 1}//reverses the slide index\n x[slideIndex-1].style.display = \"block\";//shows the next image \n x[slideIndex-1].style.zIndex = \"2\";//puts it in front \n x[slideIndex-1].style.animation=\"fade 1000ms linear 0s 1 \";//activates the animation\n setTimeout(carousel, 5000);//rince and repeat\n}", "function tst_carousel() {\n $('.tst-carousel').owlCarousel({\n margin: 0,\n items: 1,\n loop: true,\n autoplay: true,\n autoplayTimeout: 4000,\n nav:false,\n// navText: ['<i class=\"fa fa-angle-left\"></i>', '<i class=\"fa fa-angle-right\"></i>']\n });\n }", "function captionTransition(caption, duration) {\n\t if (caption.hasClass(\"center-align\")) {\n\t caption.velocity({opacity: 0, translateY: -100}, {duration: duration, queue: false});\n\t }\n\t else if (caption.hasClass(\"right-align\")) {\n\t caption.velocity({opacity: 0, translateX: 100}, {duration: duration, queue: false});\n\t }\n\t else if (caption.hasClass(\"left-align\")) {\n\t caption.velocity({opacity: 0, translateX: -100}, {duration: duration, queue: false});\n\t }\n\t }", "function ws_caption_parallax(d, c, h, f, g, b) {\n var e = jQuery;\n c.parent().css({\n position: \"absolute\",\n top: 0,\n left: 0,\n width: \"100%\",\n height: \"100%\",\n overflow: \"hidden\"\n });\n c.html(f).css(\"width\", \"100%\").stop(1, 1);\n h.html(g).css(\"width\", \"100%\").stop(1, 1);\n (function a(n, j, v, r, s, w) {\n var p = 15;\n var m = d.$this.width();\n p *= m / 100;\n function q(z, A) {\n return z.css(d.support.transform ? {\n transform: \"translate3d(\" + A + \"px,0px,0px)\"\n } : {\n marginLeft: A\n }).css(\"display\", \"inline-block\")\n }\n if (d.prevIdx == d.curIdx) {\n q(n, 0).fadeIn(s / 3);\n q(e(\">div,>span\", n), 0)\n } else {\n var l = e(\">div\", n);\n var y = e(\">div\", j);\n var o = e(\">span\", n);\n var i = e(\">span\", j);\n var u = p + m * (w ? -1 : 1)\n , x = p + m * (w ? 1 : -1)\n , t = (w ? -1 : 1) * p;\n q(n, u).show();\n q(j, 0).show();\n q(l, t);\n q(y, 0);\n q(o, 2 * t);\n q(i, 0);\n wowAnimate(function(z) {\n z = e.easing.swing(z);\n q(n, (1 - z) * u);\n q(j, z * x)\n }, 0, 1, d.duration);\n var k = 0.8;\n wowAnimate(function(z) {\n z *= k;\n q(o, (1 - z) * 2 * t);\n q(l, (1 - z) * t);\n q(i, z * (-2 * t));\n q(y, z * (-t))\n }, 0, 1, d.duration, function() {\n i.css(\"opacity\", 0);\n y.css(\"opacity\", 0);\n wowAnimate(function(z) {\n z = e.easing.easeOutCubic(1, z, 0, 1, 1, 1);\n var A = (1 - k) * 2 * t\n , C = (1 - k) * t\n , B = k * (-2 * t)\n , D = k * (-t);\n q(o, (1 - z) * A);\n q(l, (1 - z) * C);\n q(i, (1 - z) * B + z * (-2 * t));\n q(y, (1 - z) * D + z * (-t))\n }, 0, 1, (/Firefox/g.test(navigator.userAgent) ? 1500 : d.delay))\n })\n }\n }(c, h, f, g, d.captionDuration, b))\n}", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.carousel');var options=$.extend({},Carousel.DEFAULTS,$this.data(),(typeof option==='undefined'?'undefined':_typeof(option))=='object'&&option);var action=typeof option=='string'?option:options.slide;if(!data)$this.data('bs.carousel',data=new Carousel(this,options));if(typeof option=='number')data.to(option);else if(action)data[action]();else if(options.interval)data.pause().cycle();});}", "function owl_carousel_animate() {\r\n\t\t\t\r\n\t\t\t$($fullscreenSelector + '.owl-carousel[data-enable-animation=\"true\"]').each(function () {\r\n\t\t\t\t\r\n\t\t\t\tvar $owlOffsetPos \t= ($('#nectar_fullscreen_rows').length > 0) ? '200%' : 'bottom-in-view';\r\n\t\t\t\tvar $animationDelay = 0; \r\n\t\t\t\t\r\n\t\t\t\tif($(this).is('[data-animation-delay]') && \r\n\t\t\t\t$(this).attr('data-animation-delay').length > 0 && \r\n\t\t\t\t$(this).attr('data-animation') != 'false') {\r\n\t\t\t\t\t$animationDelay = $(this).attr('data-animation-delay');\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tvar $that = $(this);\r\n\t\t\t\tvar waypoint = new Waypoint({\r\n\t\t\t\t\telement: $that,\r\n\t\t\t\t\thandler: function () {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($that.parents('.wpb_tab').length > 0 && $that.parents('.wpb_tab').css('visibility') == 'hidden' || $that.hasClass('animated-in')) {\r\n\t\t\t\t\t\t\twaypoint.destroy();\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\t$that.find('.owl-stage > .owl-item').each(function (i) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tvar $that = $(this);\r\n\t\t\t\t\t\t\t\t$that.delay(i * 200).transition({\r\n\t\t\t\t\t\t\t\t\t'opacity': '1',\r\n\t\t\t\t\t\t\t\t\t'y': '0'\r\n\t\t\t\t\t\t\t\t}, 600, 'easeOutQuart');\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t$that.addClass('animated-in');\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}, $animationDelay);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\twaypoint.destroy();\r\n\t\t\t\t\t},\r\n\t\t\t\t\toffset: $owlOffsetPos\r\n\t\t\t\t\t\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t});\r\n\t\t\t\r\n\t\t}", "function init_testimonialcarousel()\n {\n $(\"#Testimonial\").owlCarousel(\n {\n navigation: true,\n navigationText: [\n '<i class=\"fa fa-arrow-left\"></i>',\n '<i class=\"fa fa-arrow-right\"></i>'\n ],\n singleItem: true,\n autoPlay: true,\n pagination: false\n });\n }", "function carouI(){\r\n\r\n $('.carousel').carousel({\r\n interval: 7000\r\n \r\n }) \r\n }", "function carousel() {\n for (const element of mySlides) { //pour chaque élément de $mySlides \n element.style.display = \"none\";//appliquer le style css \"display: none\" à chaque élement\n };\n\n slideIndex++; // ajoute un à la valeure actuelle de slideIndex\n\n if (slideIndex > mySlides.length) { //si slideIndex est supérieur au nombre d'objet dans $mySlides\n slideIndex = 1 //alors slideIndex est égale à 1\n };\n\n mySlides[slideIndex - 1].style.display = \"block\"; //applique le style css \"display: block\" à l'élement correspondant à l'index $mySlides. Le nombre insérré dans l'index correspond à la variable slideIndex -1\n \n setTimeout(carousel, 5000); //execute la fonction carousel tout les X secondes\n}", "function prepareSlides(container, opt) {\n\n container.find('.tp-caption').each(function() {\n jQuery(this).addClass(jQuery(this).data('transition'));\n jQuery(this).addClass('start')\n });\n // PREPARE THE UL CONTAINER TO HAVEING MAX HEIGHT AND HEIGHT FOR ANY SITUATION\n container.find('>ul:first').css({overflow: 'hidden', width: '100%', height: '100%', maxHeight: container.parent().css('maxHeight')});\n\n container.find('>ul:first >li').each(function(j) {\n var li = jQuery(this);\n\n // MAKE LI OVERFLOW HIDDEN FOR FURTHER ISSUES\n li.css({'width': '100%', 'height': '100%', 'overflow': 'hidden'});\n\n if (li.data('link') != undefined) {\n var link = li.data('link');\n var target = \"_self\";\n var zindex = 2;\n if (li.data('slideindex') == \"back\")\n zindex = 0;\n\n var linktoslide = li.data('linktoslide');\n if (li.data('target') != undefined)\n target = li.data('target');\n\n if (link == \"slide\") {\n li.append('<div class=\"tp-caption sft slidelink\" style=\"z-index:' + zindex + ';\" data-x=\"0\" data-y=\"0\" data-linktoslide=\"' + linktoslide + '\" data-start=\"0\"><a><div></div></a></div>');\n } else {\n linktoslide = \"no\";\n li.append('<div class=\"tp-caption sft slidelink\" style=\"z-index:' + zindex + ';\" data-x=\"0\" data-y=\"0\" data-linktoslide=\"' + linktoslide + '\" data-start=\"0\"><a target=\"' + target + '\" href=\"' + link + '\"><div></div></a></div>');\n }\n\n }\n });\n\n // RESOLVE OVERFLOW HIDDEN OF MAIN CONTAINER\n container.parent().css({'overflow': 'visible'});\n\n\n container.find('>ul:first >li >img').each(function(j) {\n\n var img = jQuery(this);\n img.addClass('defaultimg');\n if (img.data('lazyload') != undefined && img.data('lazydone') != 1) {\n } else {\n setSize(img, opt);\n setSize(img, opt);\n }\n img.wrap('<div class=\"slotholder\"></div>');\n img.css({'opacity': 0});\n img.data('li-id', j);\n\n });\n }", "function createModal(propiedad, index) {\n $(\"#description-casas\").html(\"\");\n\n var modal_casa = '<div class=\"col-md-6 hola_description\" id=\"house_description_' + index + '\" style=\"display: block\">' +\n\n '<div class=\"col-md-12\">' +\n '<div id=\"myCarousel_' + index + '\" class=\"carousel slide\" data-ride=\"carousel\">' +\n '<!-- Indicators -->' +\n '<ol class=\"carousel-indicators\">';\n\n var main_photo = \"images/700x420.jpg\";\n if (!jQuery.isEmptyObject(propiedad.fotoPrincipal)) {\n main_photo = propiedad.fotoPrincipal;\n }\n\n if (propiedad.files.length > 0) {\n var ind = 0;\n propiedad.files.forEach(function (file) {\n if (re.exec(file.nombre)[1] != \"mp4\") {\n if (ind === 0) {\n modal_casa = modal_casa + '<li data-target=\"#myCarousel_' + index + '\" data-slide-to=\"0\" class=\"active\"></li>';\n } else {\n modal_casa = modal_casa + '<li data-target=\"#myCarousel_' + index + '\" data-slide-to=\"' + ind + '\"></li>';\n }\n ind += 1;\n }\n\n });\n } else {\n modal_casa = modal_casa + '<li data-target=\"#myCarousel_' + index + '\" data-slide-to=\"0\" class=\"active\"></li>';\n }\n\n\n modal_casa = modal_casa +\n '</ol>' +\n\n '<!-- Corazón de Like -->' +\n '<div style=\"position: absolute; z-index: 4; padding-right: : 10px; padding-top: 15px; margin-left: 90%\">' +\n '<img height=\"13%\" id=\"heart_' + index + '\" src=\"images/ICON-PIC-HEART.png\" \"></i>' +\n '</div>' +\n\n '<!-- Regreso a Cards -->' +\n '<div style=\"position: absolute; z-index: 4; padding-left: 15px; padding-top: 15px;\">' +\n '<img height=\"13%\" id=\"card_cubes_' + index + '\" src=\"images/ICON-PIC-RETURN.png\" \"></i>' +\n '</div>' +\n\n '<!-- Wrapper for slides -->' +\n '<div class=\"carousel-inner\">' +\n\n '<div class=\"caption\" id=\"modalFavoritos' + index + '\" style=\"background-color:White;display:none;position:absolute;z-index:3;margin-left: 38%;margin-top:8%; height:200px;width:180px;border-style:solid;border-color:#49BEEF\">' +\n '<center>' +\n '<br>' +\n '<button id = \"GoToFavorites_' + index + '\" class=\"bg-primary\">Ir a favoritos</button>' +\n '<br>' +\n '<br>' +\n '<br>' +\n '<button id = \"KeepWhatching_' + index + '\" class=\"bg-primary\">Seguir viendo</button>' +\n '</center>' +\n '</div>';\n\n if (propiedad.files.length > 0) {\n ind = 0;\n propiedad.files.forEach(function (file) {\n if (re.exec(file.nombre)[1] != \"mp4\") {\n if (ind === 0) {\n modal_casa = modal_casa +\n '<div class=\"item active\">' +\n '<center>' +\n '<img class=\"imgt\" src=\"' + file.linkPublico + '\" alt=\"' + file.nombre + '\">' +\n '<center>' +\n '<div class=\"carousel-caption\">' +\n '</div>' +\n '</div>';\n } else {\n modal_casa = modal_casa +\n '<div class=\"item\">' +\n '<center>' +\n '<img class=\"imgt\" src=\"' + file.linkPublico + '\" alt=\"' + file.nombre + '\">' +\n '</center>' +\n '<div class=\"carousel-caption\">' +\n '</div>' +\n '</div>';\n }\n ind += 1;\n\n\n }\n });\n } else {\n modal_casa = modal_casa +\n '<div class=\"item active\">' +\n '<center>' +\n\n '<img class=\"imgt\" src=\"images/700x420.jpg\" alt=\"Imagen no disponible\">' +\n '<center>' +\n '<div class=\"carousel-caption\">' +\n '</div>' +\n '</div>';\n }\n\n\n modal_casa = modal_casa +\n '</div>' +\n '<!-- Left and right controls -->' +\n '<a class=\"left carousel-control\" href=\"#myCarousel_' + index + '\" data-slide=\"prev\">' +\n '<span class=\"glyphicon glyphicon-chevron-left\"></span>' +\n '<span class=\"sr-only\">Anterior</span>' +\n '</a>' +\n\n '<a class=\"right carousel-control\" href=\"#myCarousel_' + index + '\" data-slide=\"next\">' +\n '<span class=\"glyphicon glyphicon-chevron-right\"></span>' +\n '<span class=\"sr-only\">Siguiente</span>' +\n '</a>' +\n '</div>' +\n '<center>' +\n '<div class=\"revimexBlue\"><br>' +\n\n '<i class=\"capitalize\">' + nombreMunicipio(propiedad.Municipio__c) + propiedad.Estado__c + '<br>' +\n '' + propiedad.Calle__c +\n ', Col. ' + propiedad.Colonia__c + '<br>' +\n\n '</div>' +\n '</center>' +\n '</div>' +\n\n '<div class=\"row\" align=\"center\">' +\n '<div class=\"col-md-4 col-md-offset-4 detelle\">' +\n '<button class=\"boton_detalles_auto\" class=\"btn btn-primary\" data-toggle=\"modal\" id=\"back_to_' + index + '\" style=\" margin-bottom: 4%;\">Regresar</button>' +\n '</div>' +\n '</div>' +\n\n // INFORMACION CASAS\n '<div class=\"row revimexBlue\">' +\n // Caracteristicas\n '<div class=\"col-md-6\"><br>' +\n\n '<div class=\"row\">' +\n '<p class=\"bg-primary\" align=\"center\">Características</p>' +\n '<ul><br>' +\n '<li><strong>ID: </strong>' + propiedad.oferta + '</li>' +\n '<li><strong>Precio:</strong> $' + propiedad.PrecioVenta__c + '</li>' +\n\n '<li><div><strong> Terreno:</strong> ' + propiedad.Terreno_m2__c + '&nbsp;m<sup>2</sup></div>' + '</li>' +\n '<li><strong>Construcción:</strong> ' + propiedad.Construccion_m2__c + '&nbsp;m<sup>2</sup>' + '</li>' +\n '<li><strong>Niveles:</strong> ' + propiedad.Niveles_Plantas__c + '</li>' +\n\n '<li><strong>Habitaciones: </strong>' + propiedad.N_de_Habitaciones__c + '</li>' +\n '<li><strong>Baños: </strong>' + propiedad.N_de_Ba_os__c + '</li>' +\n '<li><strong>Estacionamientos: </strong> ' + propiedad.Estacionamiento__c + '</li>' +\n\n '</ul>' +\n '</div>' +\n\n '<div class=\"row\" align=\"center\">' +\n '<div class=\"col-md-4\">' +\n\n '</div>' +\n '<div class=\"col-md-4\">' +\n\n '</div>' +\n '<div class=\"col-md-4\">' +\n\n '</div>' +\n '</div>' +\n '<br><br>' +\n '</div>' +\n\n // Lugares Cercanos\n '<div class=\"col-md-6\" align=\"center\"><br>' +\n '<p class=\"bg-primary\">Lugares cercanos</p>' +\n '<br>' +\n '<div class=\"row\" align=\"center\">' +\n '<div class=\"col-md-4\">' +\n '<button id=\"restaurantes_' + index + '\" class=\"btn btn-default\"><img id=\"img_restaurantes_' + index + '\" class=\"img_borde\" class=\"IconTarjeta\" src=\"images/IconoTarjetaDinamica/ICONS-PROPIEDADES-WEB_RESTAURANTES-OFF.png\"></button><i class=\"numTarjeta\"></i>' +\n '</div>' +\n\n '<div class=\"col-md-4\">' +\n '<button id=\"escuelas_' + index + '\" class=\"btn btn-default\"><img id=\"img_escuelas_' + index + '\" class=\"img_borde\" class=\"IconTarjeta\" src=\"images/IconoTarjetaDinamica/ICONS-PROPIEDADES-WEB_ESCUELAS-OFF.png\"></button><i class=\"numTarjeta\"></i>' +\n '</div>' +\n\n '<div class=\"col-md-4\">' +\n '<button id=\"hospitales_' + index + '\" class=\"btn btn-default\"><img id=\"img_hospitales_' + index + '\" class=\"img_borde\" class=\"IconTarjeta\" src=\"images/IconoTarjetaDinamica/ICONS-PROPIEDADES-WEB_HOSPITALES-OFF.png\"></button><i class=\"numTarjeta\"></i>' +\n '</div>' +\n '</div>' +\n '</br></br>' +\n '<div class=\"row\" align=\"center\">' +\n '<div class=\"col-md-4\">' +\n '<button id=\"cormercio_' + index + '\" class=\"btn btn-default\"><img id=\"img_cormercio_' + index + '\" class=\"img_borde\" class=\"IconTarjeta\" src=\"images/IconoTarjetaDinamica/ICONS-PROPIEDADES-WEB_COMERCIALES-OFF.png\"></button><i class=\"numTarjeta\"></i>' +\n '</div>' +\n\n '<div class=\"col-md-4\">' +\n '<button id=\"super_' + index + '\" class=\"btn btn-default\"><img id=\"img_super_' + index + '\" class=\"img_borde\" class=\"IconTarjeta\" src=\"images/IconoTarjetaDinamica/ICONS-PROPIEDADES-WEB_SUPER-OFF.png\"></button><i class=\"numTarjeta\"></i>' +\n '</div>' +\n\n '<div class=\"col-md-4\">' +\n '<button id=\"parques_' + index + '\" class=\"btn btn-default\"><img id=\"img_parques_' + index + '\" class=\"img_borde\" class=\"IconTarjeta\" src=\"images/IconoTarjetaDinamica/ICONS-PROPIEDADES-WEB_PARQUES-OFF.png\"></button><i class=\"numTarjeta\"></i>' +\n '</div>' +\n '</div>' +\n '</div>' +\n '</div>' +\n\n '<div class=\"row\" align=\"center\">' +\n '<div class=\"col-md-4 col-md-offset-4 detelle\" style=\"margin-top: -4%;\">' +\n '<button class=\"boton_detalles_auto\" class=\"btn btn-primary\" onclick=\"modal_variables(\\'' +\n propiedad.Calle__c +\n '\\', \\'' + propiedad.Colonia__c +\n '\\', \\'' + propiedad.Municipio__c +\n '\\', \\'' + propiedad.Estado__c +\n '\\', \\'' + propiedad.Terreno_m2__c +\n '\\', \\'' + propiedad.Construccion_m2__c +\n '\\', \\'' + propiedad.N_de_Habitaciones__c +\n '\\', \\'' + propiedad.N_de_Ba_os__c +\n '\\', \\'' + propiedad.Patios__c +\n '\\', \\'' + propiedad.Estacionamiento__c +\n '\\', \\'' + propiedad.PrecioVenta__c +\n '\\', \\'' + main_photo +\n '\\', \\'' + propiedad.oferta +\n\n '\\');\" data-toggle=\"modal\" data-target=\"#pdf-modal\" >Detalles</button>' +\n '</div>' +\n '</div>' +\n\n '</br></br>' +\n\n //SECCION GERENTE\n '<div class=\"row\">' +\n '<div class=\"col-md-12\" style=\"margin-top: -3%;\">' +\n '<p class=\"bg-primary\" align=\"center\">Ejecutivo de Ventas</p>' +\n '<div class=\"row revimexBlue\" style=\"margin-top: -4%;\">' +\n '<div class=\"col-md-7\" style=\"padding-left: 0%;\">' +\n '<p style=\"font-size: 15px; margin-top:13%;\">' +\n\n\n '<b><img id=\"heart\" class=\"logos\" src=\"images/CONTACT-PROPIEDADES-WEB-MAIL.png\">&nbsp; &nbsp;<a href=\"mailto:info@revimex.mx\" style=\"font-size:.78em; text-transform:lowercase;font-size: 16px;\">info@revimex.mx</a></b><br><br>' +\n\n '<b><img id=\"heart\" class=\"logos\" src=\"images/CONTACT-PROPIEDADES-WEB-PHONE.png\">&nbsp; &nbsp;01 800 200 0440</b><br><br>' +\n\n '<b><a target=\"_blank\" href=\"https://www.facebook.com/REVIMEXOFICIAL/\"><img id=\"facebook\" class=\"logos redes_sociales\" src=\"images/CONTACT-PROPIEDADES-WEB-FACEBOOK.png\"\"></a>' +\n\n '<b><a target=\"_blank\" href=\"https://www.instagram.com/revimex_oficial/\"><img id=\"instagram\" class=\"logos redes_sociales\" src=\"images/CONTACT-PROPIEDADES-WEB-INSTAGRAM.png\"\"></a>' +\n\n '<b><a target=\"_blank\" href=\"https://twitter.com/oficialrevimex\"><img id=\"twitter\" class=\"logos redes_sociales\" src=\"images/CONTACT-PROPIEDADES-WEB-TWITTER.png\"\"></a>' +\n\n '<b><a target=\"_blank\" href=\"https://www.youtube.com/channel/UCdn2VMwAvrJ_Te9nJqFYHYg/videos\"><img id=\"youtube\" class=\"logos redes_sociales\" src=\"images/CONTACT-PROPIEDADES-WEB-YOUTUBE.png\"\"></a>' +\n\n\n '<br>' +\n\n '</p>' +\n '</div>' +\n\n '<div class=\"col-md-5\">' +\n '<form>' +\n '<div class=\"form-group\">' +\n '<br><br>' +\n '<input type=\"text\" class=\"input_borde\" class=\"form-control\" id=\"form_nombre_' + propiedad.Id + '\" placeholder=\" Nombre\" aria-describedby=\"sizing-addon2\">' +\n '<br></br>' +\n '<input type=\"text\" class=\"input_borde\" class=\"form-control\" id=\"form_telefono_' + propiedad.Id + '\" placeholder=\" Telefono\" aria-describedby=\"sizing-addon2\">' +\n '<br></br>' +\n '<input type=\"text\" class=\"input_borde\" class=\"form-control\" placeholder=\" E-mail\" id=\"form_email_' + propiedad.Id + '\" aria-describedby=\"sizing-addon2\">' +\n '<br></br></br>' +\n '<textarea class=\"input_borde\" class=\"form-control\" placeholder=\" Comentarios\" id=\"form_mensaje_' + propiedad.Id + '\"></textarea><br>' +\n '</div>' +\n '</form>' +\n '</div>' +\n '</div>' +\n '<br>' +\n '</div>' +\n '</div>' +\n\n '<div class=\"row\" align=\"center\">' +\n '<div class=\"col-md-4 col-md-offset-4\">' +\n '<button type=\"button\" onclick=\"sendMail(\\'' + propiedad.Id + '\\');\" class =\"boton_detalles_auto\" class=\"btn btn-primary\">Enviar</button>' +\n '</div>' +\n '</div>' +\n\n '</br>';\n\n $(\"#description-casas\").append(modal_casa);\n modalListeners(index);\n}", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.carousel');var options=$.extend({},Carousel.DEFAULTS,$this.data(),(typeof option===\"undefined\"?\"undefined\":_typeof2(option))=='object'&&option);var action=typeof option=='string'?option:options.slide;if(!data)$this.data('bs.carousel',data=new Carousel(this,options));if(typeof option=='number')data.to(option);else if(action)data[action]();else if(options.interval)data.pause().cycle();});}", "function PortfolioCarousel() {\n const [index, setIndex] = useState(0);\n\n const handleSelect = (selectedIndex, e) => {\n setIndex(selectedIndex);\n };\n\n return (\n <Carousel activeIndex={index} onSelect={handleSelect}>\n\n <Carousel.Item>\n <img\n className=\"d-block w-100\"\n src={require('./noatsBanner.png')}\n alt=\"Noats\"\n />\n <Carousel.Caption>\n <h3>Noats</h3>\n <p>SQL powered recipe app.</p>\n </Carousel.Caption>\n </Carousel.Item>\n\n <Carousel.Item>\n <img\n className=\"d-block w-100\"\n src=\"https://placebear.com/800/200\"\n alt=\"Third slide\"\n />\n <Carousel.Caption>\n <h3>Second slide label</h3>\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>\n </Carousel.Caption>\n </Carousel.Item>\n\n <Carousel.Item>\n <img\n className=\"d-block w-100\"\n src=\"https://placebear.com/800/200\"\n alt=\"Third slide\"\n />\n <Carousel.Caption>\n <h3>Third slide label</h3>\n <p>\n Praesent commodo cursus magna, vel scelerisque nisl consectetur.\n </p>\n </Carousel.Caption>\n </Carousel.Item>\n\n </Carousel>\n );\n}", "function ws_caption_parallax(d,c,h,f,g,b){var e=jQuery;c.parent().css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",overflow:\"hidden\"});c.html(f).css(\"width\",\"100%\").stop(1,1);h.html(g).css(\"width\",\"100%\").stop(1,1);(function a(n,j,v,r,s,w){var p=15;var m=d.$this.width();p*=m/100;function q(z,A){return z.css(d.support.transform?{transform:\"translate3d(\"+A+\"px,0px,0px)\"}:{marginLeft:A}).css(\"display\",\"inline-block\")}if(d.prevIdx==d.curIdx){q(n,0).fadeIn(s/3);q(e(\">div,>span\",n),0)}else{var l=e(\">div\",n);var y=e(\">div\",j);var o=e(\">span\",n);var i=e(\">span\",j);var u=p+m*(w?-1:1),x=p+m*(w?1:-1),t=(w?-1:1)*p;q(n,u).show();q(j,0).show();q(l,t);q(y,0);q(o,2*t);q(i,0);wowAnimate(function(z){z=e.easing.swing(z);q(n,(1-z)*u);q(j,z*x)},0,1,d.duration);var k=0.8;wowAnimate(function(z){z*=k;q(o,(1-z)*2*t);q(l,(1-z)*t);q(i,z*(-2*t));q(y,z*(-t))},0,1,d.duration,function(){i.css(\"opacity\",0);y.css(\"opacity\",0);wowAnimate(function(z){z=e.easing.easeOutCubic(1,z,0,1,1,1);var A=(1-k)*2*t,C=(1-k)*t,B=k*(-2*t),D=k*(-t);q(o,(1-z)*A);q(l,(1-z)*C);q(i,(1-z)*B+z*(-2*t));q(y,(1-z)*D+z*(-t))},0,1,(/Firefox/g.test(navigator.userAgent)?1500:d.delay))})}}(c,h,f,g,d.captionDuration,b))}", "function captionTransition(caption, duration) {\r\n if (caption.hasClass(\"center-align\")) {\r\n caption.velocity({ opacity: 0, translateY: -100 }, { duration: duration, queue: false });\r\n } else if (caption.hasClass(\"right-align\")) {\r\n caption.velocity({ opacity: 0, translateX: 100 }, { duration: duration, queue: false });\r\n } else if (caption.hasClass(\"left-align\")) {\r\n caption.velocity({ opacity: 0, translateX: -100 }, { duration: duration, queue: false });\r\n }\r\n }", "function portfolioClick(obj) {\n var index = obj.id.replace('portfolio', '');\n var portfolio = getPortfolio(index);\n //console.log();\n $('#projectTitle').text(portfolio.name);\n $('#myCarousel > ol').html('');\n $('.carousel-inner').html('');\n portfolio.images.forEach(function(url, i) {\n if (i == 0) {\n $('#myCarousel > ol').append(\"<li data-target=\\'#myCarousel\\' data-slide-to=\" + i + \" class='active'></li>\");\n $('.carousel-inner').append(\"<div class='item active'><img src=\"+url+\" alt='Chania' /></div>\");\n } else {\n $('#myCarousel > ol').append(\"<li data-target=\\'#myCarousel\\' data-slide-to=\" +i+ \"></li>\");\n $('.carousel-inner').append(\"<div class='item'><img src=\"+url+\" alt='Chania' /></div>\"); \n }\n });\n}", "function sliderSuperSlidesText() {\n if ($('#height_slider_text').length > 0) {\n var slides = $('#height_slider_text').superslides({\n hashchange: false,\n animation: 'fade',\n play: 10000\n });\n }\n if ($('#owl-main-text').length > 0) {\n $('#owl-main-text').owlCarousel({\n autoPlay: 10000,\n goToFirst: true,\n goToFirstSpeed: 2000,\n navigation: false,\n slideSpeed: 700,\n pagination: false,\n transitionStyle: 'fadeUp',\n singleItem: true\n });\n };\n}", "function CarouselDemoCtrl($scope) {\n $scope.myInterval = 5000;\n var slides = $scope.slides = [];\n $scope.addSlide = function () {\n var newWidth = 200 + ((slides.length + (25 * slides.length)) % 150);\n slides.push({\n image: 'http://placekitten.com/' + newWidth + '/200',\n text: ['More', 'Extra', 'Lots of', 'Surplus'][slides.length % 4] + ' ' +\n ['Cats', 'Kittys', 'Felines', 'Cutes'][slides.length % 4]\n });\n };\n for (var i = 0; i < 4; i++) {\n $scope.addSlide();\n }\n}", "function testimoninals_carousel(){\r\n if ( $('.testimonials_slider').length ){\r\n $('.testimonials_slider').owlCarousel({\r\n loop:true,\r\n margin: 0,\r\n items: 1,\r\n nav:true,\r\n autoplay: true,\r\n smartSpeed: 1500,\r\n dots:false,\r\n navContainer: '.testimonials_slider',\r\n navText: ['<i class=\"ti-angle-left\" aria-hidden=\"true\"></i>','<i class=\"ti-angle-right\" aria-hidden=\"true\"></i>'],\r\n })\r\n }\r\n }", "function testimoninals_carousel(){\r\n if ( $('.testimonials_slider').length ){\r\n $('.testimonials_slider').owlCarousel({\r\n loop:true,\r\n margin: 0,\r\n items: 1,\r\n nav:true,\r\n autoplay: true,\r\n smartSpeed: 1500,\r\n dots:false,\r\n navContainer: '.testimonials_slider',\r\n navText: ['<i class=\"ti-angle-left\" aria-hidden=\"true\"></i>','<i class=\"ti-angle-right\" aria-hidden=\"true\"></i>'],\r\n })\r\n }\r\n }", "function ws_caption_move(t,e,n,i){var a=[{left1:\"100%\",top2:\"100%\"},{left1:\"80%\",left2:\"-50%\"},{top1:\"-100%\",top2:\"100%\",distance:.7,easing:\"easeOutBack\"},{top1:\"-80%\",top2:\"-80%\",distance:.3,easing:\"easeOutBack\"},{top1:\"-80%\",left2:\"80%\"},{left1:\"80%\",left2:\"80%\"}];a=a[Math.floor(Math.random()*a.length)];var s=.5,o=\"easeOutElastic1\";e.stop(1,1).fadeOut(t.captionDuration/3,function(){function n(e){var n=$(r[e]).css(\"opacity\");$(r[e]).css({visibility:\"visible\"}).css({opacity:0}).animate({opacity:n},t.captionDuration,\"easeOutCirc\").animate({top:0,left:0},{duration:t.captionDuration,easing:a.easing||o,queue:!1})}e.html(i);var r=e.find(\">span,>div\").get();$(r).css({position:\"relative\",visibility:\"hidden\"}),e.show();for(var u in a)if(/\\%/.test(a[u])){a[u]=parseInt(a[u])/100;var l=e.offset()[/left/.test(u)?\"left\":\"top\"],c=/left/.test(u)?\"width\":\"height\";a[u]*=a[u]<0?l:t.$this[c]()-e[c]()-l}$(r[0]).css({left:(a.left1||0)+\"px\",top:(a.top1||0)+\"px\"}),$(r[1]).css({left:(a.left2||0)+\"px\",top:(a.top2||0)+\"px\"}),n(0),setTimeout(function(){n(1)},t.captionDuration*(a.distance||s))})}", "function showSlide()\r\n{\r\n // create objects\r\n const image1 = {file: \"ocean_beach_2.jpg\", description: \"Ocean Beach\", alt: \"Ocean Beach\"};\r\n const image2 = {file: \"back_beach_sorrento.jpg\", description: \"Sorrento Back Beach\", alt: \"Sorrento Back Beach\"};\r\n const image3 = {file: \"ocean_beach.jpg\", description: \"Ocean Beach\", alt: \"Ocean Beach\"};\r\n \r\n // using an array\r\n const images = [image1, image2, image3];\r\n \r\n // limit slideshow\r\n if (slideIndex >= images.length)\r\n {\r\n slideIndex = 0; // reset to the start\r\n }\r\n if (slideIndex === -1)\r\n {\r\n slideIndex = images.length-1; // reset to last slide \r\n }\r\n\r\n // display the slide\r\n const slideImage = document.querySelector(\".slides img\");\r\n slideImage.src = \"ICTWEB431_AE_Pro_1of2_SR1/\" + images[slideIndex].file;\r\n slideImage.alt = images[slideIndex].alt;\r\n\r\n // slides[slideIndex - 1].style.display = \"block\";\r\n\r\n // display description\r\n const description = document.querySelector(\".description\");\r\n description.innerHTML = images[slideIndex].description;\r\n\r\n // display the slide dot as the current dot\r\n // remove the class active from all dots\r\n const dotsList = document.getElementsByClassName(\"dot\");\r\n\r\n for (let i = 0; i < dotsList.length; i++)\r\n {\r\n dotsList[i].classList.remove(\"active\");\r\n }\r\n \r\n // set the class for the slide as \"active\" \r\n dotsList[slideIndex].classList.add(\"active\");\r\n\r\n}", "function animate() {\r\n // set the direction of animation.\r\n if(currentIndex == 0) {\r\n RIGHT_DIRECTION = false;\r\n LEFT_DIRECTION = true;\r\n }else if(currentIndex == IMAGE_COUNT - 1) {\r\n LEFT_DIRECTION = false;\r\n RIGHT_DIRECTION = true;\r\n }\r\n\r\n // animate the carousel depending on the direction.\r\n if(LEFT_DIRECTION) {\r\n nextIndex = currentIndex + 1;\r\n transition(currentIndex, nextIndex)\r\n currentIndex++;\r\n }\r\n if(RIGHT_DIRECTION) {\r\n nextIndex = currentIndex - 1;\r\n transition(currentIndex, nextIndex)\r\n currentIndex--;\r\n } \r\n\r\n}", "function initCarousel3up() {\n var galleryPrev = '<a href=\"\" class=\"icon icon-arrow-left no-bg\"><span class=\"is-vishidden\">Previous</span><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 500 500\" enable-background=\"new 0 0 500 500\"><path d=\"M344.5 5.3l31.7 31.6L163.1 250l213.1 213.1-31.7 31.6L99.8 250z\"/></svg></a>';\n var galleryNext = '<a href=\"\" class=\"icon icon-arrow-right no-bg\"><span class=\"is-vishidden\">Next</span><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 500 500\" enable-background=\"new 0 0 500 500\"><path d=\"M153.5 5.3l-31.7 31.6L334.9 250 121.8 463.1l31.7 31.6L398.2 250z\"/></svg></a>';\n\n $carousel3up.show().owlCarousel({\n autoPlay: 4000,\n slideSpeed: 300,\n lazyLoad: true,\n paginationSpeed: 400,\n pagination: false,\n navigation: true,\n stopOnHover: true,\n navigationText: [galleryPrev, galleryNext],\n itemsCustom: [[0,2], [730,3], [800,2], [930,3]]\n });\n }", "function Sliders() {\r\n\t\t\r\n\t\t$('.slider').owlCarousel({\r\n\t\t\tloop:true,\r\n\t\t\tmargin:500,\r\n\t\t\tcenter: true,\r\n\t\t\tautoHeight:false,\r\n\t\t\tnav:true,\r\n\t\t\tnavSpeed: 500,\r\n\t\t\titems:1,\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\t$( \".slider .owl-prev\" ).removeClass( \"parallax-wrap\" );\r\n\t\t$( \".slider .owl-next\" ).removeClass( \"parallax-wrap\" );\r\n\t\t\r\n\t\tif( $('.carousel').length > 0 ){\r\n\t\t\r\n\t\t\t$('.carousel').owlCarousel({\r\n\t\t\t\tloop:true,\r\n\t\t\t\tmargin:20,\r\n\t\t\t\tautoHeight:false,\r\n\t\t\t\tnavSpeed: 600,\r\n\t\t\t\tnav:true,\r\n\t\t\t\tresponsive:{\r\n\t\t\t\t\t0:{\r\n\t\t\t\t\t\titems:1\r\n\t\t\t\t\t},\r\n\t\t\t\t\t479:{\r\n\t\t\t\t\t\titems:2\r\n\t\t\t\t\t},\r\n\t\t\t\t\t1024:{\r\n\t\t\t\t\t\titems:3\r\n\t\t\t\t\t},\r\n\t\t\t\t\t1466:{\r\n\t\t\t\t\t\titems:3\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t$( \".carousel .owl-prev\" ).removeClass( \"parallax-wrap\" );\r\n\t\t\t$( \".carousel .owl-next\" ).removeClass( \"parallax-wrap\" );\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\t\r\n\t\t$(\".owl-prev\").mouseenter(function(e) {\t\r\n\t\t\tTweenMax.to('#ball', 0.1,{transformOrigin: '15px 15px', borderWidth: '1px', scale: 2});\r\n\t\t\tTweenMax.to('#ball-loader', 0.1,{borderWidth: '1px', top: 1, left: 1});\r\n\t\t\t$( \"#ball\" ).addClass(\"with-icon\").append( '<i class=\"fa fa-chevron-left\"></i>' );\r\n\t\t});\r\n\t\t\t\r\n\t\t$(\".owl-prev\").mouseleave(function(e) {\r\n\t\t\tTweenMax.to('#ball', 0.1,{borderWidth: '2px', scale:1, x: -15, y: -15});\r\n\t\t\tTweenMax.to('#ball-loader', 0.1,{borderWidth: '2px', top: 0, left: 0});\r\n\t\t\t$(\"#ball\").removeClass(\"with-icon\");\r\n\t\t\t$('#ball i').remove();\r\n\t\t});\r\n\t\t\r\n\t\t$(\".owl-next\").mouseenter(function(e) {\t\r\n\t\t\tTweenMax.to('#ball', 0.1,{transformOrigin: '15px 15px', borderWidth: '1px', scale: 2});\r\n\t\t\tTweenMax.to('#ball-loader', 0.1,{borderWidth: '1px', top: 1, left: 1});\r\n\t\t\t$( \"#ball\" ).addClass(\"with-icon\").append( '<i class=\"fa fa-chevron-right\"></i>' );\r\n\t\t});\r\n\t\t\t\r\n\t\t$(\".owl-next\").mouseleave(function(e) {\r\n\t\t\tTweenMax.to('#ball', 0.1,{borderWidth: '2px', scale:1, x: -15, y: -15});\r\n\t\t\tTweenMax.to('#ball-loader', 0.1,{borderWidth: '2px', top: 0, left: 0});\r\n\t\t\t$(\"#ball\").removeClass(\"with-icon\");\r\n\t\t\t$('#ball i').remove();\r\n\t\t});\t\t\r\n\t\t\r\n\t\tif( $('.text-carousel').length > 0 ){\t\t\r\n\t\t\t$(\".text-carousel\").owlCarousel({\t\r\n\t\t\t\tloop:true,\r\n\t\t\t\tdots:false,\r\n\t\t\t\titems:1,\r\n\t\t\t\tautoplay:false,\r\n\t\t\t\tsmartSpeed: 750,\r\n\t\t\t\tautoHeight:true,\r\n\t\t\t\tautoplayHoverPause:true,\r\n\t\t\t\tnav:true,\r\n\t\t\t\tnavText: [\"<div class='prev-testimonial parallax-element'><i class='fa fa-chevron-left' aria-hidden='true'></i></div>\",\"<div class='next-testimonial parallax-element'><i class='fa fa-chevron-right' aria-hidden='true'></i></div>\"],\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "function sliderSetup(){\n var imgs = document.getElementsByClassName(\"slider-picture\");\n if (imgs.length <= 1){ return; }\n for (var i=1; i<imgs.length; i++){\n imgs[i].style.opacity = 0;\n }\n var first_img = imgs[0];\n setTimeout(animateSlider.bind(null,first_img),(slider_delay-slider_fade)*1000);\n}", "function addSliderEventListeners() {\n\nconst sliderPrev = document.getElementById('slider-prev');\nconst sliderNext = document.getElementById('slider-next');\nconst sliderFrame = document.getElementById('slider-frame');\nconst sliderCaption = document.getElementById('slider-caption');\n\nconst slides =\n Array.from(sliderFrame.querySelectorAll('div[data-src]'))\n .map(div => {\n return {\n imageUrl: div.getAttribute('data-src'),\n caption: div.textContent.trim(),\n };\n });\n\nlet sliderIndex = 0;\ndisplaySliderImage();\n\nfunction displaySliderImage() {\n let { imageUrl, caption } = slides[sliderIndex];\n sliderFrame.style.backgroundImage = `url('${imageUrl}')`;\n let count = `(${sliderIndex+1}/${slides.length}) `;\n sliderCaption.innerHTML = count + caption;\n sliderCaption.classList.add('flash');\n setTimeout(() => {\n sliderCaption.classList.remove('flash');\n }, 0);\n}\n\nfunction displayPrevSliderImage() {\n sliderIndex--;\n if (sliderIndex < 0) {\n sliderIndex = slides.length - 1;\n }\n displaySliderImage();\n}\n\nfunction displayNextSliderImage() {\n sliderIndex++;\n if (sliderIndex === slides.length) {\n sliderIndex = 0;\n }\n displaySliderImage();\n}\n\nsliderPrev.addEventListener('click', function() {\n clearInterval(interval);\n displayPrevSliderImage()\n});\nsliderNext.addEventListener('click', displayNextSliderImage);\n\nsetInterval(function() {\n displayNextSliderImage();\n}, 6000);\n}", "function toggleText() {\n $('.slideshow-container').slideToggle(300, function() {\n $('.slideshow-caption h3').html($('.slideshow-current img').attr('title'));\n $('.slideshow-caption p').html($('.slideshow-current img').attr('alt'));\n $('.slideshow-container').slideToggle(500);\n });\n}", "function ARIAInit() {\n\t\t// add class 'carousel-inner' to testimonials container\n\t\tcarousel.firstElementChild.className = \"carousel-inner\";\n\t\t// display hidden control elements\n\t\tdocument.getElementById(\"carousel-controls\").style.display = \"block\";\n\t\t$(\".carousel-indicators\").css(\"display\",\"block\");\n\n\t\tvar timeout = setTimeout(function() {\n\t\t\trunCarousel();\n\t\t}, 60000);\n\n\t}", "function prepareSlides(container,opt) {\n\n\t\t\tcontainer.find('.tp-caption').each(function() { jQuery(this).addClass(jQuery(this).data('transition')); jQuery(this).addClass('start') });\n\n\t\t\t// PREPARE THE UL CONTAINER TO HAVEING MAX HEIGHT AND HEIGHT FOR ANY SITUATION\n\t\t\tcontainer.find('>ul:first').css({overflow:'hidden',width:'100%',height:'100%',maxHeight:container.parent().css('maxHeight')});\n\t\t\tif (opt.autoHeight==\"on\") {\n\t\t\t container.find('>ul:first').css({overflow:'hidden',width:'100%',height:'100%',maxHeight:\"none\"});\n\t\t\t container.css({'maxHeight':'none'});\n\t\t\t container.parent().css({'maxHeight':'none'});\n\t\t\t }\n\n\t\t\tcontainer.find('>ul:first >li').each(function(j) {\n\t\t\t\tvar li=jQuery(this);\n\n\t\t\t\t// MAKE LI OVERFLOW HIDDEN FOR FURTHER ISSUES\n\t\t\t\tli.css({'width':'100%','height':'100%','overflow':'hidden'});\n\n\t\t\t\tif (li.data('link')!=undefined) {\n\t\t\t\t\tvar link = li.data('link');\n\t\t\t\t\tvar target=\"_self\";\n\t\t\t\t\tvar zindex=60;\n\t\t\t\t\tif (li.data('slideindex')==\"back\") zindex=0;\n\n\t\t\t\t\tvar linktoslide=li.data('linktoslide');\n\t\t\t\t\tif (li.data('target')!=undefined) target=li.data('target');\n\n\t\t\t\t\tif (link==\"slide\") {\n\t\t\t\t\t\tli.append('<div class=\"tp-caption sft slidelink\" style=\"width:100%;height:100%;z-index:'+zindex+';\" data-x=\"0\" data-y=\"0\" data-linktoslide=\"'+linktoslide+'\" data-start=\"0\"><a style=\"width:100%;height:100%;display:block\"><span style=\"width:100%;height:100%;display:block\"></span></a></div>');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlinktoslide=\"no\";\n\t\t\t\t\t\tli.append('<div class=\"tp-caption sft slidelink\" style=\"width:100%;height:100%;z-index:'+zindex+';\" data-x=\"0\" data-y=\"0\" data-linktoslide=\"'+linktoslide+'\" data-start=\"0\"><a style=\"width:100%;height:100%;display:block\" target=\"'+target+'\" href=\"'+link+'\"><span style=\"width:100%;height:100%;display:block\"></span></a></div>');\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// RESOLVE OVERFLOW HIDDEN OF MAIN CONTAINER\n\t\t\tcontainer.parent().css({'overflow':'visible'});\n\n\n\t\t\tcontainer.find('>ul:first >li >img').each(function(j) {\n\n\t\t\t\tvar img=jQuery(this);\n\n\t\t\t\timg.addClass('defaultimg');\n\t\t\t\tif (img.data('lazyload')!=undefined && img.data('lazydone') != 1) {\n\n\t\t\t\t} else {\n\t\t\t\t\tsetSize(img,opt);\n\t\t\t\t}\n\n\n\n\t\t\t\timg.wrap('<div class=\"slotholder\" style=\"width:100%;height:100%;\"'+\n\t\t\t\t\t\t 'data-duration=\"'+img.data('duration')+'\"'+\n\t\t\t\t\t\t 'data-zoomstart=\"'+img.data(\"zoomstart\")+'\"'+\n\t\t\t\t\t\t 'data-zoomend=\"'+img.data(\"zoomend\")+'\"'+\n\t\t\t\t\t\t 'data-rotationstart=\"'+img.data(\"rotationstart\")+'\"'+\n\t\t\t\t\t\t 'data-rotationend=\"'+img.data(\"rotationend\")+'\"'+\n\t\t\t\t\t\t 'data-ease=\"'+img.data(\"ease\")+'\"'+\n\t\t\t\t\t\t 'data-duration=\"'+img.data(\"duration\")+'\"'+\n\t\t\t\t\t\t 'data-bgpositionend=\"'+img.data(\"bgpositionend\")+'\"'+\n\t\t\t\t\t\t 'data-bgposition=\"'+img.data(\"bgposition\")+'\"'+\n\t\t\t\t\t\t 'data-duration=\"'+img.data(\"duration\")+'\"'+\n\t\t\t\t\t\t 'data-kenburns=\"'+img.data(\"kenburns\")+'\"'+\n\t\t\t\t\t\t 'data-easeme=\"'+img.data(\"ease\")+'\"'+\n\t\t\t\t\t\t 'data-bgfit=\"'+img.data(\"bgfit\")+'\"'+\n\t\t\t\t\t\t 'data-bgfitend=\"'+img.data(\"bgfitend\")+'\"'+\n\t\t\t\t\t\t 'data-owidth=\"'+img.data(\"owidth\")+'\"'+\n\t\t\t\t\t\t 'data-oheight=\"'+img.data(\"oheight\")+'\"'+\n\t\t\t\t\t\t '></div>');\n\n\t\t\t\tif (opt.dottedOverlay!=\"none\" && opt.dottedOverlay!=undefined)\n\t\t\t\t\t\timg.closest('.slotholder').append('<div class=\"tp-dottedoverlay '+opt.dottedOverlay+'\"></div>');\n\n\t\t\t\tvar src=img.attr('src');\n\t\t\t\tvar ll = img.data('lazyload');\n\t\t\t\tvar bgfit = img.data('bgfit');\n\t\t\t\tvar bgrepeat = img.data('bgrepeat');\n\t\t\t\tvar bgposition = img.data('bgposition');\n\n\n\t\t\t\tif (bgfit==undefined) bgfit=\"cover\";\n\t\t\t\tif (bgrepeat==undefined) bgrepeat=\"no-repeat\";\n\t\t\t\tif (bgposition==undefined) bgposition=\"center center\"\n\n\n\t\t\t\tvar pari = img.closest('.slotholder');\n\t\t\t\timg.replaceWith('<div class=\"tp-bgimg defaultimg\" data-lazyload=\"'+img.data('lazyload')+'\" data-bgfit=\"'+bgfit+'\"data-bgposition=\"'+bgposition+'\" data-bgrepeat=\"'+bgrepeat+'\" data-lazydone=\"'+img.data('lazydone')+'\" src=\"'+src+'\" data-src=\"'+src+'\" style=\"background-color:'+img.css(\"backgroundColor\")+';background-repeat:'+bgrepeat+';background-image:url('+src+');background-size:'+bgfit+';background-position:'+bgposition+';width:100%;height:100%;\"></div>');\n\n\t\t\t\tif (isIE(8)) {\n\t\t\t\t\tpari.find('.tp-bgimg').css({backgroundImage:\"none\",'background-image':'none'});\n\t\t\t\t\tpari.find('.tp-bgimg').append('<img class=\"ieeightfallbackimage defaultimg\" src=\"'+src+'\" style=\"width:100%\">');\n\t\t\t\t}\n\n\n\n\n\t\t\t\timg.css({'opacity':0});\n\t\t\t\timg.data('li-id',j);\n\n\t\t\t});\n\t\t}", "function prepareSlides(container,opt) {\n\n\t\t\tcontainer.find('.tp-caption').each(function() { jQuery(this).addClass(jQuery(this).data('transition')); jQuery(this).addClass('start') });\n\n\t\t\t// PREPARE THE UL CONTAINER TO HAVEING MAX HEIGHT AND HEIGHT FOR ANY SITUATION\n\t\t\tcontainer.find('>ul:first').css({overflow:'hidden',width:'100%',height:'100%',maxHeight:container.parent().css('maxHeight')});\n\t\t\tif (opt.autoHeight==\"on\") {\n\t\t\t container.find('>ul:first').css({overflow:'hidden',width:'100%',height:'100%',maxHeight:\"none\"});\n\t\t\t container.css({'maxHeight':'none'});\n\t\t\t container.parent().css({'maxHeight':'none'});\n\t\t\t }\n\n\t\t\tcontainer.find('>ul:first >li').each(function(j) {\n\t\t\t\tvar li=jQuery(this);\n\n\t\t\t\t// MAKE LI OVERFLOW HIDDEN FOR FURTHER ISSUES\n\t\t\t\tli.css({'width':'100%','height':'100%','overflow':'hidden'});\n\n\t\t\t\tif (li.data('link')!=undefined) {\n\t\t\t\t\tvar link = li.data('link');\n\t\t\t\t\tvar target=\"_self\";\n\t\t\t\t\tvar zindex=60;\n\t\t\t\t\tif (li.data('slideindex')==\"back\") zindex=0;\n\n\t\t\t\t\tvar linktoslide=li.data('linktoslide');\n\t\t\t\t\tif (li.data('target')!=undefined) target=li.data('target');\n\n\t\t\t\t\tif (link==\"slide\") {\n\t\t\t\t\t\tli.append('<div class=\"tp-caption sft slidelink\" style=\"width:100%;height:100%;z-index:'+zindex+';\" data-x=\"0\" data-y=\"0\" data-linktoslide=\"'+linktoslide+'\" data-start=\"0\"><a style=\"width:100%;height:100%;display:block\"><span style=\"width:100%;height:100%;display:block\"></span></a></div>');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlinktoslide=\"no\";\n\t\t\t\t\t\tli.append('<div class=\"tp-caption sft slidelink\" style=\"width:100%;height:100%;z-index:'+zindex+';\" data-x=\"0\" data-y=\"0\" data-linktoslide=\"'+linktoslide+'\" data-start=\"0\"><a style=\"width:100%;height:100%;display:block\" target=\"'+target+'\" href=\"'+link+'\"><span style=\"width:100%;height:100%;display:block\"></span></a></div>');\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// RESOLVE OVERFLOW HIDDEN OF MAIN CONTAINER\n\t\t\tcontainer.parent().css({'overflow':'visible'});\n\n\n\t\t\tcontainer.find('>ul:first >li >img').each(function(j) {\n\n\t\t\t\tvar img=jQuery(this);\n\n\t\t\t\timg.addClass('defaultimg');\n\t\t\t\tif (img.data('lazyload')!=undefined && img.data('lazydone') != 1) {\n\n\t\t\t\t} else {\n\t\t\t\t\tsetSize(img,opt);\n\t\t\t\t}\n\n\n\n\t\t\t\timg.wrap('<div class=\"slotholder\" style=\"width:100%;height:100%;\"'+\n\t\t\t\t\t\t 'data-duration=\"'+img.data('duration')+'\"'+\n\t\t\t\t\t\t 'data-zoomstart=\"'+img.data(\"zoomstart\")+'\"'+\n\t\t\t\t\t\t 'data-zoomend=\"'+img.data(\"zoomend\")+'\"'+\n\t\t\t\t\t\t 'data-rotationstart=\"'+img.data(\"rotationstart\")+'\"'+\n\t\t\t\t\t\t 'data-rotationend=\"'+img.data(\"rotationend\")+'\"'+\n\t\t\t\t\t\t 'data-ease=\"'+img.data(\"ease\")+'\"'+\n\t\t\t\t\t\t 'data-duration=\"'+img.data(\"duration\")+'\"'+\n\t\t\t\t\t\t 'data-bgpositionend=\"'+img.data(\"bgpositionend\")+'\"'+\n\t\t\t\t\t\t 'data-bgposition=\"'+img.data(\"bgposition\")+'\"'+\n\t\t\t\t\t\t 'data-duration=\"'+img.data(\"duration\")+'\"'+\n\t\t\t\t\t\t 'data-kenburns=\"'+img.data(\"kenburns\")+'\"'+\n\t\t\t\t\t\t 'data-easeme=\"'+img.data(\"ease\")+'\"'+\n\t\t\t\t\t\t 'data-bgfit=\"'+img.data(\"bgfit\")+'\"'+\n\t\t\t\t\t\t 'data-bgfitend=\"'+img.data(\"bgfitend\")+'\"'+\n\t\t\t\t\t\t 'data-owidth=\"'+img.data(\"owidth\")+'\"'+\n\t\t\t\t\t\t 'data-oheight=\"'+img.data(\"oheight\")+'\"'+\n\t\t\t\t\t\t '></div>');\n\n\t\t\t\tif (opt.dottedOverlay!=\"none\" && opt.dottedOverlay!=undefined)\n\t\t\t\t\t\timg.closest('.slotholder').append('<div class=\"tp-dottedoverlay '+opt.dottedOverlay+'\"></div>');\n\n\t\t\t\tvar src=img.attr('src');\n\t\t\t\tvar ll = img.data('lazyload');\n\t\t\t\tvar bgfit = img.data('bgfit');\n\t\t\t\tvar bgrepeat = img.data('bgrepeat');\n\t\t\t\tvar bgposition = img.data('bgposition');\n\n\n\t\t\t\tif (bgfit==undefined) bgfit=\"cover\";\n\t\t\t\tif (bgrepeat==undefined) bgrepeat=\"no-repeat\";\n\t\t\t\tif (bgposition==undefined) bgposition=\"center center\"\n\n\n\t\t\t\tvar pari = img.closest('.slotholder');\n\t\t\t\timg.replaceWith('<div class=\"tp-bgimg defaultimg\" data-lazyload=\"'+img.data('lazyload')+'\" data-bgfit=\"'+bgfit+'\"data-bgposition=\"'+bgposition+'\" data-bgrepeat=\"'+bgrepeat+'\" data-lazydone=\"'+img.data('lazydone')+'\" src=\"'+src+'\" data-src=\"'+src+'\" style=\"background-color:'+img.css(\"backgroundColor\")+';background-repeat:'+bgrepeat+';background-image:url('+src+');background-size:'+bgfit+';background-position:'+bgposition+';width:100%;height:100%;\"></div>');\n\n\t\t\t\tif (isIE(8)) {\n\t\t\t\t\tpari.find('.tp-bgimg').css({backgroundImage:\"none\",'background-image':'none'});\n\t\t\t\t\tpari.find('.tp-bgimg').append('<img class=\"ieeightfallbackimage defaultimg\" src=\"'+src+'\" style=\"width:100%\">');\n\t\t\t\t}\n\n\n\n\n\t\t\t\timg.css({'opacity':0});\n\t\t\t\timg.data('li-id',j);\n\n\t\t\t});\n\t\t}", "function onLoad() {\n carousel = new Carousel();\n carousel.centerSelected();\n}", "function Sliders() {\r\n\t\t\r\n\t\t$('.slider').owlCarousel({\r\n\t\t\tloop:true,\r\n\t\t\tmargin:500,\r\n\t\t\tcenter: true,\r\n\t\t\tautoHeight:false,\r\n\t\t\tnav:true,\r\n\t\t\tnavSpeed: 500,\r\n\t\t\titems:1,\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\t$( \".slider .owl-prev\" ).removeClass( \"parallax-wrap\" );\r\n\t\t$( \".slider .owl-next\" ).removeClass( \"parallax-wrap\" );\r\n\t\t\r\n\t\t$('.carousel').owlCarousel({\r\n\t\t\tloop:true,\r\n\t\t\tmargin:20,\r\n\t\t\tautoHeight:false,\r\n\t\t\tnavSpeed: 600,\r\n\t\t\tnav:true,\r\n\t\t\tresponsive:{\r\n\t\t\t\t0:{\r\n\t\t\t\t\titems:1\r\n\t\t\t\t},\r\n\t\t\t\t479:{\r\n\t\t\t\t\titems:2\r\n\t\t\t\t},\r\n\t\t\t\t1024:{\r\n\t\t\t\t\titems:3\r\n\t\t\t\t},\r\n\t\t\t\t1466:{\r\n\t\t\t\t\titems:3\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t$( \".carousel .owl-prev\" ).removeClass( \"parallax-wrap\" );\r\n\t\t$( \".carousel .owl-next\" ).removeClass( \"parallax-wrap\" );\t\r\n\t\t\t\r\n\t\t$(\".owl-prev\").mouseenter(function(e) {\t\r\n\t\t\tTweenMax.to('#ball', 0.1,{transformOrigin: '15px 15px', borderWidth: '1px', backgroundColor : 'rgba(0, 0, 0, 1)', scale: 1.8});\r\n\t\t\tTweenMax.to('#ball-loader', 0.1,{borderWidth: '1px', top: 1, left: 1});\r\n\t\t\t$( \"#ball\" ).addClass(\"with-icon\").append( '<i class=\"fa fa-chevron-left\"></i>' );\r\n\t\t});\r\n\t\t\t\r\n\t\t$(\".owl-prev\").mouseleave(function(e) {\r\n\t\t\tTweenMax.to('#ball', 0.1,{borderWidth: '2px', scale:1, backgroundColor : 'rgba(0, 0, 0, 0)', x: -15, y: -15});\r\n\t\t\tTweenMax.to('#ball-loader', 0.1,{borderWidth: '2px', top: 0, left: 0});\r\n\t\t\t$(\"#ball\").removeClass(\"with-icon\");\r\n\t\t\t$('#ball i').remove();\r\n\t\t});\r\n\t\t\r\n\t\t$(\".owl-next\").mouseenter(function(e) {\t\r\n\t\t\tTweenMax.to('#ball', 0.1,{transformOrigin: '15px 15px', borderWidth: '1px', backgroundColor : 'rgba(0, 0, 0, 1)', scale: 1.8});\r\n\t\t\tTweenMax.to('#ball-loader', 0.1,{borderWidth: '1px', top: 1, left: 1});\r\n\t\t\t$( \"#ball\" ).addClass(\"with-icon\").append( '<i class=\"fa fa-chevron-right\"></i>' );\r\n\t\t});\r\n\t\t\t\r\n\t\t$(\".owl-next\").mouseleave(function(e) {\r\n\t\t\tTweenMax.to('#ball', 0.1,{borderWidth: '2px', scale:1, backgroundColor : 'rgba(0, 0, 0, 0)', x: -15, y: -15});\r\n\t\t\tTweenMax.to('#ball-loader', 0.1,{borderWidth: '2px', top: 0, left: 0});\r\n\t\t\t$(\"#ball\").removeClass(\"with-icon\");\r\n\t\t\t$('#ball i').remove();\r\n\t\t});\r\n\t\t\r\n\t\t$('.slider').on('click', function() {\r\n\t\t\t\r\n\t\t\tvar $window = $(window),\r\n\t\t\t\t$element = $('.slider'),\r\n\t\t\t\telementTop = $element.offset().top,\r\n\t\t\t\telementHeight = $element.height(),\r\n\t\t\t\tviewportHeight = $window.height(),\r\n\t\t\t\tscrollIt = elementTop - ((viewportHeight - elementHeight) / 2 + 20);\r\n\t\t\t\t\t\t\t\r\n\t\t\t$(\"html, body\").animate({ scrollTop: scrollIt }, 300);\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\tif( $('.text-carousel').length > 0 ){\t\t\r\n\t\t\t$(\".text-carousel\").owlCarousel({\t\r\n\t\t\t\tloop:true,\r\n\t\t\t\tdots:false,\r\n\t\t\t\titems:1,\r\n\t\t\t\tautoplay:true,\r\n\t\t\t\tsmartSpeed: 750,\r\n\t\t\t\tautoHeight:true,\r\n\t\t\t\tautoplayHoverPause:true,\r\n\t\t\t\tnav:true,\r\n\t\t\t\tnavText: [\"<div class='prev-testimonial parallax-element'><i class='fa fa-chevron-left' aria-hidden='true'></i></div>\",\"<div class='next-testimonial parallax-element'><i class='fa fa-chevron-right' aria-hidden='true'></i></div>\"],\r\n\t\t\t});\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "function _text_slider( container ) {\n\t\tif ( $( '.text-slider', container ).length <= 0 ) {\n\t\t\treturn;\n\t\t} \n\n\t\t// For each instance\n\t\t$( '.text-slider', container ).each( function(){\n\t\t\tvar $this = $( this ),\n\t\t\t\tdelay = parseInt( $this.attr( 'data-delay' ), 10 ),\n\t\t\t\thandle,\n\t\t\t\tindex = 1,\n\t\t\t\tl = $( this ).find( '.text-slide' ).length-1,\n\t\t\t\tdelay = delay * 1000;\n\t\t\tif ( l == 0 ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tvar _change_slide = function() {\n\t\t\t\t$this.find( '.text-slide:eq( ' + index + ' )' ).hide().removeClass( 'visible' ).find( '.on' ).removeClass( 'on' );\n\t\t\t\tindex ++;\n\t\t\t\tif ( index > l ) {\n\t\t\t\t\tindex = 0;\n\t\t\t\t}\n\t\t\t\t$this.find( '.text-slide:eq( ' + index + ' )' ).show().addClass( 'visible' );\n\t\t\t\t$this.find( '.visible h2' ).addClassDelay( 'on', 100 );\n\t\t\t\t$this.find( '.visible h6' ).addClassDelay( 'on', 300 );\n\t\t\t}\n\t\t\t_change_slide();\n\t\t\thandle = setInterval( _change_slide, delay );\n\t\t\tdelay = delay * 1000;\n\t\t});\n\n\t}", "function init_appslide()\n {\n $('.join-us .carousel').carousel(\n {\n navigation: true,\n navigationText: [\n '<i class=\"fa fa-arrow-left\"></i>',\n '<i class=\"fa fa-arrow-right\"></i>'\n ],\n singleItem: true,\n autoPlay: true,\n pagination: false\n });\n }", "function carousel() {\n\n $('.carousel').carousel({\n interval: 5000 //changes the speed\n });\n\n\n}", "function mainSlider() {\n\tvar BasicSlider = $('.hero-slider');\n\tBasicSlider.on('init', function (e, slick) {\n\t\tvar $firstAnimatingElements = $('.single-slide:first-child').find('[data-animation]');\n\t\tdoAnimations($firstAnimatingElements);\n\t});\n\tBasicSlider.on('beforeChange', function (e, slick, currentSlide, nextSlide) {\n\t\tvar $animatingElements = $('.single-slide[data-slick-index=\"' + nextSlide + '\"]').find('[data-animation]');\n\t\tdoAnimations($animatingElements);\n\t});\n\tBasicSlider.slick({\n\t\tautoplay: false,\n\t\tautoplaySpeed: 10000,\n\t\tdots: true,\n\t\tfade: true,\n\t\tarrows: false,\n\t\t// nextArrow: '<div class=\"next\"><i class=\"las la-long-arrow-alt-right\"></i></div>',\n // prevArrow: '<div class=\"prev\"><i class=\"las la-long-arrow-alt-left\"></i></div>',\n\t\tresponsive: [\n\t\t\t\t{\n\t\t\t\t\tbreakpoint: 1024,\n\t\t\t\t\tsettings: {\n\t\t\t\t\t\tslidesToShow: 1,\n\t\t\t\t\t\tslidesToScroll: 1,\n\t\t\t\t\t\tinfinite: true,\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tbreakpoint: 991,\n\t\t\t\t\tsettings: {\n\t\t\t\t\t\tslidesToShow: 1,\n\t\t\t\t\t\tslidesToScroll: 1,\n\t\t\t\t\t\tarrows: false\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tbreakpoint: 767,\n\t\t\t\t\tsettings: {\n\t\t\t\t\t\tslidesToShow: 1,\n\t\t\t\t\t\tslidesToScroll: 1,\n\t\t\t\t\t\tarrows: false\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t]\n\t});\n\n\tfunction doAnimations(elements) {\n\t\tvar animationEndEvents = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';\n\t\telements.each(function () {\n\t\t\tvar $this = $(this);\n\t\t\tvar $animationDelay = $this.data('delay');\n\t\t\tvar $animationType = 'animated ' + $this.data('animation');\n\t\t\t$this.css({\n\t\t\t\t'animation-delay': $animationDelay,\n\t\t\t\t'-webkit-animation-delay': $animationDelay\n\t\t\t});\n\t\t\t$this.addClass($animationType).one(animationEndEvents, function () {\n\t\t\t\t$this.removeClass($animationType);\n\t\t\t});\n\t\t});\n\t}\n}", "function captionTransition(caption, duration) {\n if (caption.hasClass(\"center-align\")) {\n caption.velocity({ opacity: 0, translateY: -100 }, { duration: duration, queue: false });\n } else if (caption.hasClass(\"right-align\")) {\n caption.velocity({ opacity: 0, translateX: 100 }, { duration: duration, queue: false });\n } else if (caption.hasClass(\"left-align\")) {\n caption.velocity({ opacity: 0, translateX: -100 }, { duration: duration, queue: false });\n }\n }", "function captionTransition(caption, duration) {\n if (caption.hasClass(\"center-align\")) {\n caption.velocity({ opacity: 0, translateY: -100 }, { duration: duration, queue: false });\n } else if (caption.hasClass(\"right-align\")) {\n caption.velocity({ opacity: 0, translateX: 100 }, { duration: duration, queue: false });\n } else if (caption.hasClass(\"left-align\")) {\n caption.velocity({ opacity: 0, translateX: -100 }, { duration: duration, queue: false });\n }\n }", "function captionTransition(caption, duration) {\n if (caption.hasClass(\"center-align\")) {\n caption.velocity({ opacity: 0, translateY: -100 }, { duration: duration, queue: false });\n } else if (caption.hasClass(\"right-align\")) {\n caption.velocity({ opacity: 0, translateX: 100 }, { duration: duration, queue: false });\n } else if (caption.hasClass(\"left-align\")) {\n caption.velocity({ opacity: 0, translateX: -100 }, { duration: duration, queue: false });\n }\n }", "function initCarousel() {\n\t\tjQuery('.bscarousel').carousel({\n\t\t\tinterval: 2000\n\t\t\t})\n\t}", "function makeCarousel(content){\n\t\tvar length = content.images.length - 1;\n\t\tvar current = 0;\n\t\taddContent(content, current);\n\t\t$(\"#carousel-surf .fa-long-arrow-right\").on(\"click\", function() {\n\t\t\tcurrent = current + 1;\n\t\t\taddContent(content, current);\n\n\t\t\tif( current > length){\n\t\t\t\tcurrent = 0;\n\t\t\t\taddContent(content, current);\n\t\t\t} \n\t\t});\n\n\t\t//when click on an arrow - slide\n\t\t//making slideshow for the carousel\n\t\t$(\"#carousel-surf .fa-long-arrow-left\").on(\"click\", function() {\n\t\t\tif( current == 0 ){\n\t\t\t\tcurrent = length;\n\t\t\t\taddContent(content, current);\n\t\t\t} else {\n\t\t\t\tcurrent = current - 1;\n\t\t\t\taddContent(content, current);\n\t\t\t}\n\t\t});\n\n\t\t//tabs\n\t\tvar text = $(\".surf-tab-text p\");\n\t\t$(\".surf-tab a\").on('click', function() {\n\t\t\t$(\".surf-tab a\").removeClass('tab-active');\n\t\t\t$(\".surf-tab-text p\").addClass('d-none');\n\n\t\t\tfor(var i = 0; i < text.length; i++){\n\t\t\t\tif( $(this).attr('data-href') == ( \"#\" + $(text[i]).attr('id')) ) {\n\t\t\t\t\t$(this).addClass('tab-active');\n\t\t\t\t\t$(text[i]).removeClass(\"d-none\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "function initCarousel() {\n \"use strict\";\n try {\n var slides,\n leftButton = '<button class=\"carouselLeft\" type=\"button\" aria-label=\"Previous slide\">&#x276c;</button>',\n rightButton = '<button class=\"carouselRight\" type=\"button\" aria-label=\"Next slide\">&#x276d;</button>',\n navDotContainer,\n navDots,\n i,\n j;\n\n for (i = 0; i < carousels.length; i += 1) {\n carousels[i].classList.add(\"active\");\n carousels[i].setAttribute(\"aria-live\", \"polite\");\n // Insert buttons and attach event handlers\n carousels[i].insertAdjacentHTML(\"afterbegin\", leftButton);\n carousels[i].insertAdjacentHTML(\"beforeend\", rightButton);\n carousels[i].querySelector(\".carouselLeft\").onclick = function() {\n jumpToSlide(this.parentElement, \"previous\");\n };\n carousels[i].querySelector(\".carouselRight\").onclick = function() {\n jumpToSlide(this.parentElement, \"next\");\n };\n // Set up slides with classes to control position\n slides = carousels[i].querySelectorAll(\".slide\");\n navDotContainer = '<p class=\"navDots\">';\n for (j = 0; j < slides.length; j += 1) {\n if (j === 0) {\n slides[j].className = \"slide selected\";\n slides[j].setAttribute(\"aria-hidden\", false);\n } else {\n slides[j].className = \"slide right\";\n slides[j].setAttribute(\"aria-hidden\", true);\n }\n slides[j].dataset.index = j;\n navDotContainer += '<button type=\"button\" value=\"' + j +'\" aria-label=\"Slide ' + (j+1) +'\"></button>';\n }\n navDotContainer += '</p>';\n carousels[i].insertAdjacentHTML(\"beforeend\", navDotContainer);\n carousels[i].querySelector(\".navDots button:first-child\").className = \"current\";\n navDots = carousels[i].querySelectorAll(\".navDots button\");\n for (j = 0; j < navDots.length; j += 1) {\n navDots[j].onclick = function() {\n jumpToSlide(this.parentElement.parentElement, this.value);\n };\n }\n }\n setCarouselHeight();\n window.addEventListener(\"resize\", setCarouselHeight);\n } catch (ex) {\n console.log(ex.name + \": \" + ex.message);\n }\n }", "function Banner(props) {\n console.log(\"Banner\", props);\n return (\n <>\n <Carousel className=\"hsuancarousel\">\n <Carousel.Item>\n <img\n className=\"d-block w-100\"\n src={require(\"../icon/horizontal.jpg\")}\n alt=\"Third slide\"\n />\n\n <Carousel.Caption>\n {/* <h3>Second slide label</h3>\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p> */}\n </Carousel.Caption>\n {/* src=\"holder.js/800x400?text=First slide&bg=373940\" */}\n\n \n </Carousel.Item>\n <Carousel.Item>\n <img\n className=\"d-block w-100\"\n src={require(\"../icon/horizontal4.jpg\")}\n alt=\"Third slide\"\n />\n\n <Carousel.Caption>\n {/* <h3>Second slide label</h3>\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p> */}\n </Carousel.Caption>\n </Carousel.Item>\n <Carousel.Item>\n <img\n className=\"d-block w-100\"\n src={require(\"../icon/horizontal2.jpg\")}\n alt=\"Third slide\"\n />\n\n <Carousel.Caption>\n {/* <h3>Third slide label</h3>\n <p>\n Praesent commodo cursus magna, vel scelerisque nisl consectetur.\n </p> */}\n </Carousel.Caption>\n </Carousel.Item>\n <Carousel.Item>\n <img\n className=\"d-block w-100\"\n src={require(\"../icon/horizontal5.jpg\")}\n alt=\"Third slide\"\n \n />\n\n <Carousel.Caption>\n {/* <h3>Third slide label</h3>\n <p>\n Praesent commodo cursus magna, vel scelerisque nisl consectetur.\n </p> */}\n </Carousel.Caption>\n </Carousel.Item>\n </Carousel>\n </>\n );\n}", "function moveToSlide(index) { // 3277\n // Wrap around indices. // 3278\n if (index >= $slides.length) index = 0; // 3279\n else if (index < 0) index = $slides.length -1; // 3280\n // 3281\n $active_index = $slider.find('.active').index(); // 3282\n // 3283\n // Only do if index changes // 3284\n if ($active_index != index) { // 3285\n $active = $slides.eq($active_index); // 3286\n $caption = $active.find('.caption'); // 3287\n // 3288\n $active.removeClass('active'); // 3289\n $active.velocity({opacity: 0}, {duration: options.transition, queue: false, easing: 'easeOutQuad', // 3290\n complete: function() { // 3291\n $slides.not('.active').velocity({opacity: 0, translateX: 0, translateY: 0}, {duration: 0, queue: false});\n } }); // 3293\n captionTransition($caption, options.transition); // 3294\n // 3295\n // 3296\n // Update indicators // 3297\n if (options.indicators) { // 3298\n $indicators.eq($active_index).removeClass('active'); // 3299\n } // 3300\n // 3301\n $slides.eq(index).velocity({opacity: 1}, {duration: options.transition, queue: false, easing: 'easeOutQuad'});\n $slides.eq(index).find('.caption').velocity({opacity: 1, translateX: 0, translateY: 0}, {duration: options.transition, delay: options.transition, queue: false, easing: 'easeOutQuad'});\n $slides.eq(index).addClass('active'); // 3304\n // 3305\n // 3306\n // Update indicators // 3307\n if (options.indicators) { // 3308\n $indicators.eq(index).addClass('active'); // 3309\n } // 3310\n } // 3311\n } // 3312", "function buildCarousel(slides){\n // return empty string if no slides\n if (slides.length<1) return '';\n\n // build the carousel content\n var html = '';\n html += '<div id=\"myCarousel\" class=\"carousel slide\" data-ride=\"carousel\">';\n html += indicators(slides);\n html += items(slides); \n html += arrows(); \n html += '</div> ';\n return html; \n}", "function main() {\n\n(function () {\n 'use strict';\n\n /* ==============================================\n \tTestimonial Slider\n \t=============================================== */ \n\n \t$('a.page-scroll').click(function() {\n if (location.pathname.replace(/^\\//,'') == this.pathname.replace(/^\\//,'') && location.hostname == this.hostname) {\n var target = $(this.hash);\n target = target.length ? target : $('[name=' + this.hash.slice(1) +']');\n if (target.length) {\n $('html,body').animate({\n scrollTop: target.offset().top - 40\n }, 900);\n return false;\n }\n }\n });\n\n /*====================================\n Show Menu on Book\n ======================================*/\n $(window).bind('scroll', function() {\n var navHeight = $(window).height() - 100;\n if ($(window).scrollTop() > navHeight) {\n $('.navbar-default').addClass('on');\n } else {\n $('.navbar-default').removeClass('on');\n }\n });\n\n $('body').scrollspy({ \n target: '.navbar-default',\n offset: 80\n })\n\n \t$(document).ready(function() {\n\n \t $(\"#clients\").owlCarousel({\n \t \n \t navigation : false, // Show next and prev buttons\n \t slideSpeed : 300,\n \t paginationSpeed : 400,\n \t autoHeight : true,\n \t itemsCustom : [\n\t\t\t\t [0, 1],\n\t\t\t\t [450, 2],\n\t\t\t\t [600, 2],\n\t\t\t\t [700, 2],\n\t\t\t\t [1000, 4],\n\t\t\t\t [1200, 5],\n\t\t\t\t [1400, 5],\n\t\t\t\t [1600, 5]\n\t\t\t\t ],\n \t });\n\n $(\"#skill\").owlCarousel({\n navigation : false, // Show next and prev buttons\n slideSpeed : 300,\n paginationSpeed : 400,\n singleItem:true\n });\n\n \t});\n\n \t/*====================================\n Portfolio Isotope Filter\n ======================================*/\n $(window).load(function() {\n var $container = $('#lightbox');\n $container.isotope({\n filter: '*',\n animationOptions: {\n duration: 750,\n easing: 'linear',\n queue: false\n }\n });\n $('.cat a').click(function() {\n $('.cat .active').removeClass('active');\n $(this).addClass('active');\n var selector = $(this).attr('data-filter');\n $container.isotope({\n filter: selector,\n animationOptions: {\n duration: 750,\n easing: 'linear',\n queue: false\n }\n });\n return false;\n });\n\n });\n\n /*====================================\n Letter Animate\n ======================================*/\n\n $('.ml4 .letters').each(function(){\n $(this).html($(this).text().replace(/([^\\x00-\\x80]|\\w)/g, \"<span class='letter'>$&</span>\"));\n });\n\n anime.timeline({loop: true})\n .add({\n targets: '.ml4 .line',\n scaleY: [0,1],\n opacity: [0.5,1],\n easing: \"easeOutExpo\",\n duration: 700\n })\n .add({\n targets: '.ml4 .line',\n translateX: [0,$(\".ml4 .letters-1\").width()],\n easing: \"easeOutExpo\",\n duration: 700,\n delay: 100\n }).add({\n targets: '.ml4 .letters-1 .letter',\n opacity: [0,1],\n easing: \"easeOutExpo\",\n duration: 600,\n offset: '-=775',\n delay: function(el, i) {\n return 34 * (i+1)\n }\n })\n .add({\n targets: '.ml4 .letters-1, .ml4 .line',\n opacity: 0,\n easing: \"easeOutExpo\",\n })\n .add({\n targets: '.ml4 .line',\n scaleY: [0,1],\n opacity: [0.5,1],\n easing: \"easeOutExpo\",\n duration: 700\n })\n .add({\n targets: '.ml4 .line',\n translateX: [0,$(\".ml4 .letters-2\").width()],\n easing: \"easeOutExpo\",\n duration: 700,\n delay: 100\n }).add({\n targets: '.ml4 .letters-2 .letter',\n opacity: [0,1],\n easing: \"easeOutExpo\",\n duration: 600,\n offset: '-=775',\n delay: function(el, i) {\n return 34 * (i+1)\n }\n })\n .add({\n targets: '.ml4 .letters-2, .ml4 .line',\n opacity: 0,\n easing: \"easeOutExpo\",\n })\n .add({\n targets: '.ml4 .line',\n scaleY: [0,1],\n opacity: [0.5,1],\n easing: \"easeOutExpo\",\n duration: 700\n })\n .add({\n targets: '.ml4 .line',\n translateX: [0,$(\".ml4 .letters-3\").width()],\n easing: \"easeOutExpo\",\n duration: 700,\n delay: 100\n }).add({\n targets: '.ml4 .letters-3 .letter',\n opacity: [0,1],\n easing: \"easeOutExpo\",\n duration: 600,\n offset: '-=775',\n delay: function(el, i) {\n return 34 * (i+1)\n }\n })\n .add({\n targets: '.ml4 .letters-3, .ml4 .line',\n opacity: 0,\n easing: \"easeOutExpo\",\n })\n .add({\n targets: '.ml4 .line',\n scaleY: [0,1],\n opacity: [0.5,1],\n easing: \"easeOutExpo\",\n duration: 700\n })\n .add({\n targets: '.ml4 .line',\n translateX: [0,$(\".ml4 .letters-4\").width()],\n easing: \"easeOutExpo\",\n duration: 700,\n delay: 100\n }).add({\n targets: '.ml4 .letters-4 .letter',\n opacity: [0,1],\n easing: \"easeOutExpo\",\n duration: 600,\n offset: '-=775',\n delay: function(el, i) {\n return 34 * (i+1)\n }\n })\n .add({\n targets: '.ml4 .letters-4, .ml4 .line',\n opacity: 0,\n easing: \"easeOutExpo\",\n })\n .add({\n targets: '.ml4 .line',\n scaleY: [0,1],\n opacity: [0.5,1],\n easing: \"easeOutExpo\",\n duration: 700\n })\n .add({\n targets: '.ml4 .line',\n translateX: [0,$(\".ml4 .letters-5\").width()],\n easing: \"easeOutExpo\",\n duration: 700,\n delay: 100\n }).add({\n targets: '.ml4 .letters-5 .letter',\n opacity: [0,1],\n easing: \"easeOutExpo\",\n duration: 600,\n offset: '-=775',\n delay: function(el, i) {\n return 34 * (i+1)\n }\n })\n .add({\n targets: '.ml4 .letters-5, .ml4 .line',\n opacity: 0,\n easing: \"easeOutExpo\",\n });\n\n anime.timeline({loop: true})\n .add({\n targets: '.button-container .fa-angle-down',\n translateY:[-15,0],\n duration:600\n })\n .add({\n targets: '.button-container .fa-angle-down',\n translateY:[0,-15],\n duration:600\n });\n\n\n // var ml4 = {};\n // ml4.opacityIn = [0,1];\n // ml4.scaleIn = [0.2, 1];\n // ml4.scaleOut = 3;\n // ml4.durationIn = 800;\n // ml4.durationOut = 600;\n // ml4.delay = 500;\n\n // anime.timeline({loop: true})\n // .add({\n // targets: '.ml4 .letters-1',\n // opacity: ml4.opacityIn,\n // scale: ml4.scaleIn,\n // duration: ml4.durationIn\n // }).add({\n // targets: '.ml4 .letters-1',\n // opacity: 0,\n // scale: ml4.scaleOut,\n // duration: ml4.durationOut,\n // easing: \"easeInExpo\",\n // delay: ml4.delay\n // }).add({\n // targets: '.ml4 .letters-2',\n // opacity: ml4.opacityIn,\n // scale: ml4.scaleIn,\n // duration: ml4.durationIn\n // }).add({\n // targets: '.ml4 .letters-2',\n // opacity: 0,\n // scale: ml4.scaleOut,\n // duration: ml4.durationOut,\n // easing: \"easeInExpo\",\n // delay: ml4.delay\n // }).add({\n // targets: '.ml4 .letters-3',\n // opacity: ml4.opacityIn,\n // scale: ml4.scaleIn,\n // duration: ml4.durationIn\n // }).add({\n // targets: '.ml4 .letters-3',\n // opacity: 0,\n // scale: ml4.scaleOut,\n // duration: ml4.durationOut,\n // easing: \"easeInExpo\",\n // delay: ml4.delay\n // }).add({\n // targets: '.ml4 .letters-4',\n // opacity: ml4.opacityIn,\n // scale: ml4.scaleIn,\n // duration: ml4.durationIn\n // }).add({\n // targets: '.ml4 .letters-4',\n // opacity: 0,\n // scale: ml4.scaleOut,\n // duration: ml4.durationOut,\n // easing: \"easeInExpo\",\n // delay: ml4.delay\n // }).add({\n // targets: '.ml4',\n // opacity: 0,\n // duration: 500,\n // delay: 500\n // });\n\n}());\n\n\n}", "function loadCarousel() {\n var carousel = document.getElementById(\"carousel\");\n var prev = document.getElementById(\"prev\");\n var next = document.getElementById(\"next\");\n var items = carousel.querySelectorAll('.content li');\n var counter = 0;\n var amount = items.length;\n var current = items[0];\n for (var i = 0; i < amount; ++i) {\n if (items[i].classList.contains('current')) {\n current = items[i];\n counter = i;\n break;\n }\n }\n function navigate(direction) {\n current && current.classList.remove('current');\n counter += direction;\n if (counter <= 0) {\n counter = 0;\n prev.disabled = true;\n } else {\n prev.disabled = false;\n }\n if (counter >= amount - 1) {\n counter = amount - 1;\n next.disabled = true;\n } else {\n next.disabled = false;\n }\n current = items[counter];\n if (current) {\n current.classList.add('current');\n selectedHistory = current.textContent;\n }\n }\n next.addEventListener('click', function(ev) {\n navigate(1);\n });\n prev.addEventListener('click', function(ev) {\n navigate(-1);\n });\n if (current) {\n current.classList.add('current');\n selectedHistory = current.textContent;\n }\n navigate(0);\n}", "function showSlides() {//Cusom function - 2%\n let i; //Use local scope variable - 2%\n let slides = document.getElementsByClassName(\"mySlides\");\n let dots = document.getElementsByClassName(\"dot\");\n for (i = 0; i < slides.length; i++) { //Use for statement - 5%\n slides[i].style.display = \"none\"; \n }\n slideIndex++;\n if (slideIndex > slides.length) {slideIndex = 1} \n for (i = 0; i < dots.length; i++) {\n dots[i].className = dots[i].className.replace(\" active\", \"\"); //Access an objects method using dot notation - 2% + Access an objects method using dot notation - 2%\n }\n slides[slideIndex-1].style.display = \"block\"; //Use an array - 2%\n dots[slideIndex-1].className += \" active\";\n setTimeout(showSlides, 7500); //Change image every 7,5 seconds\n}", "function slider( container_class, slide_class, interval_length, cross_fade, show_slide_callback ) {\n jQuery( '.' + container_class ).each(function() {\n var container = this;\n var min_height = 0;\n var min_height_container;\n jQuery( this ).find( '.' + slide_class ).each(function() {\n var height = jQuery( this ).outerHeight();\n if ( height > min_height ) min_height = height;\n if ( !min_height_container ) min_height_container = jQuery( this ).parent();\n this.container = container;\n jQuery( this ).parents( '.' + container_class ).find( '.slider-nav-previous' ).append( jQuery( '<span/>' ).append( jQuery( '<a/>', { href: '#' + this.id } ).html( 'Previous' ) ) );\n jQuery( this ).parents( '.' + container_class ).find( '.slider-nav-next' ).append( jQuery( '<span/>' ).append( jQuery( '<a/>', { href: '#' + this.id } ).html( 'Next' ) ) );\n // When a nav link is clicked, show its slide.\n jQuery( '[href$=\"#' + this.id + '\"]' ).each(function() {\n jQuery( this ).click(function(event) {\n var id = this.href.split('#')[1];\n jQuery( '#' + id )[0].show_slide();\n event.preventDefault();\n });\n });\n // Attach the callback function, if present.\n if ( show_slide_callback ) this.callback = show_slide_callback;\n // Shows this slide and hides its siblings.\n this.show_slide = function( speed ) {\n // Cross fade or slide the slides.\n speed = ( speed != undefined ) ? speed : 'medium';\n if ( cross_fade ) {\n jQuery( '.' + slide_class + ':not(\"#' + this.id + '\")' ).fadeOut( speed );\n jQuery( this ).fadeIn( speed );\n }\n else {\n var move_left = 0;\n jQuery( this ).prevAll().each(function() {\n move_left += jQuery( this ).innerWidth();\n })\n jQuery( this ).parent().animate(\n { 'margin-left': -move_left },\n speed\n );\n }\n // Highlight the nav links to this slide.\n jQuery( this.container ).find( '.nav-current' ).removeClass( 'nav-current' );\n jQuery( '[href$=\"#' + this.id + '\"]' ).parent().addClass( 'nav-current' );\n if ( this.callback ) this.callback( this );\n // Show links to the previous or next slides.\n jQuery( this.container ).find( '.slider-nav-previous a, .slider-nav-next a' ).css( 'display', 'none' );\n jQuery( '.slider-nav-previous' ).find( '[href$=\"#' + jQuery( this ).prev().attr( 'id' ) + '\"]' ).css( 'display', 'block' );\n jQuery( '.slider-nav-next' ).find( '[href$=\"#' + jQuery( this ).next().attr( 'id' ) + '\"]' ).css( 'display', 'block' );\n }\n });\n // Set the min-height of the container to the height of the tallest slide.\n jQuery( min_height_container ).css( 'min-height', min_height + 'px' );\n // Show the first slide by default.\n var first_slide = jQuery( this ).find( '.' + slide_class )[0];\n if ( first_slide ) first_slide.show_slide( 0 );\n // Shows the next slide in this slider.\n this.next_slide = function() {\n var current_slide = jQuery( this ).find( '.' + slide_class + ':visible' )[0];\n var next_slide = jQuery( current_slide ).next()[0];\n if ( jQuery( current_slide ).is( ':last-child' ) ) next_slide = jQuery( current_slide ).siblings()[0];\n next_slide.show_slide();\n }\n // If there is an interval_length, rotate through the slides, but only if there is more than one slide.\n if ( jQuery( this ).find( '.' + slide_class ).length > 1 ) {\n if ( interval_length ) {\n // Automatically rotate through the slides.\n /* This breaks scope in IE:\n this.interval = setInterval( function( slider ) { slider.next_slide(); }, interval_length, this );\n so for now, we must do this: */\n var slider = this;\n this.interval = setInterval( function() { slider.next_slide(); }, interval_length, this );\n // When the user clicks anywhere in the slider, stop the slide rotation.\n jQuery( this ).click(function() { clearInterval( this.interval ); })\n }\n }\n jQuery( this ).addClass( 'slider-initiated' );\n });\n}", "function callback() {\n const images = document.getElementsByClassName(\"carousel-image\");\n const prevBttn = document.getElementById(\"prev-bttn\");\n const nextBttn = document.getElementById(\"next-bttn\");\n const totalImgs = images.length;\n let slide = 0;\n let moving = false;\n\n function disableInteraction() {\n moving = true;\n setTimeout(() => {\n moving = false;\n }, 500);\n }\n\n function moveCarouselTo() {\n if (!moving) {\n disableInteraction();\n images[0].classList.remove(\"initial\");\n for (let i = 0; i < totalImgs; i += 1) {\n images[i].classList.remove(\"prev\");\n images[i].classList.remove(\"next\");\n images[i].classList.remove(\"active\");\n }\n\n const nextSlide = slide === totalImgs - 1 ? 0 : slide + 1;\n const prevSlide = slide === 0 ? totalImgs - 1 : slide - 1;\n images[slide].classList.add(\"active\");\n images[nextSlide].classList.add(\"next\");\n images[prevSlide].classList.add(\"prev\");\n }\n }\n\n function moveToNext() {\n if (!moving) {\n if (slide === totalImgs - 1) {\n slide = 0;\n } else {\n slide += 1;\n }\n }\n moveCarouselTo(slide);\n }\n\n function moveToPrev() {\n if (!moving) {\n if (slide === 0) {\n slide = totalImgs - 1;\n } else {\n slide -= 1;\n }\n }\n moveCarouselTo(slide);\n }\n\n if (images[0]) {\n nextBttn.addEventListener(\"click\", moveToPrev);\n prevBttn.addEventListener(\"click\", moveToNext);\n }\n }", "function captionTransition(caption, duration) {\n if (caption.hasClass(\"center-align\")) {\n caption.velocity({opacity: 0, translateY: -100}, {duration: duration, queue: false});\n }\n else if (caption.hasClass(\"right-align\")) {\n caption.velocity({opacity: 0, translateX: 100}, {duration: duration, queue: false});\n }\n else if (caption.hasClass(\"left-align\")) {\n caption.velocity({opacity: 0, translateX: -100}, {duration: duration, queue: false});\n }\n }", "function captionTransition(caption, duration) {\n if (caption.hasClass(\"center-align\")) {\n caption.velocity({opacity: 0, translateY: -100}, {duration: duration, queue: false});\n }\n else if (caption.hasClass(\"right-align\")) {\n caption.velocity({opacity: 0, translateX: 100}, {duration: duration, queue: false});\n }\n else if (caption.hasClass(\"left-align\")) {\n caption.velocity({opacity: 0, translateX: -100}, {duration: duration, queue: false});\n }\n }", "function captionTransition(caption, duration) {\n if (caption.hasClass(\"center-align\")) {\n caption.velocity({opacity: 0, translateY: -100}, {duration: duration, queue: false});\n }\n else if (caption.hasClass(\"right-align\")) {\n caption.velocity({opacity: 0, translateX: 100}, {duration: duration, queue: false});\n }\n else if (caption.hasClass(\"left-align\")) {\n caption.velocity({opacity: 0, translateX: -100}, {duration: duration, queue: false});\n }\n }", "function captionTransition(caption, duration) {\n if (caption.hasClass(\"center-align\")) {\n caption.velocity({opacity: 0, translateY: -100}, {duration: duration, queue: false});\n }\n else if (caption.hasClass(\"right-align\")) {\n caption.velocity({opacity: 0, translateX: 100}, {duration: duration, queue: false});\n }\n else if (caption.hasClass(\"left-align\")) {\n caption.velocity({opacity: 0, translateX: -100}, {duration: duration, queue: false});\n }\n }", "function addMoveCaption(nextcaption,opt,params,frame,downscale) {\n\t\t\t\t\t\t\tvar tl = nextcaption.data('timeline');\n\n\t\t\t\t\t\t\tvar newtl = new TimelineLite();\n\n\t\t\t\t\t\t\tvar animobject = nextcaption;\n\n\t\t\t\t\t\t\tif (params.typ == \"chars\") animobject = nextcaption.data('mySplitText').chars;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\tif (params.typ == \"words\") animobject = nextcaption.data('mySplitText').words;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\tif (params.typ == \"lines\") animobject = nextcaption.data('mySplitText').lines;\n\t\t\t\t\t\t\tparams.animation.ease = params.ease;\n\n\t\t\t\t\t\t\tif (params.animation.rotationZ !=undefined) params.animation.rotation = params.animation.rotationZ;\n\t\t\t\t\t\t\tparams.animation.data = new Object();\n\t\t\t\t\t\t\tparams.animation.data.oldx = params.animation.x;\n\t\t\t\t\t\t\tparams.animation.data.oldy = params.animation.y;\n\n\t\t\t\t\t\t\tparams.animation.x = params.animation.x * downscale;\n\t\t\t\t\t\t\tparams.animation.y = params.animation.y * downscale;\n\n\n\t\t\t\t\t\t\ttl.add(newtl.staggerTo(animobject,params.speed,params.animation,params.elementdelay),params.start);\n\t\t\t\t\t\t\ttl.addLabel(frame,params.start);\n\n\t\t\t\t\t\t\tnextcaption.data('timeline',tl);\n\n\t\t\t\t}", "function addMoveCaption(nextcaption,opt,params,frame,downscale) {\n\t\t\t\t\t\t\tvar tl = nextcaption.data('timeline');\n\n\t\t\t\t\t\t\tvar newtl = new TimelineLite();\n\n\t\t\t\t\t\t\tvar animobject = nextcaption;\n\n\t\t\t\t\t\t\tif (params.typ == \"chars\") animobject = nextcaption.data('mySplitText').chars;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\tif (params.typ == \"words\") animobject = nextcaption.data('mySplitText').words;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\tif (params.typ == \"lines\") animobject = nextcaption.data('mySplitText').lines;\n\t\t\t\t\t\t\tparams.animation.ease = params.ease;\n\n\t\t\t\t\t\t\tif (params.animation.rotationZ !=undefined) params.animation.rotation = params.animation.rotationZ;\n\t\t\t\t\t\t\tparams.animation.data = new Object();\n\t\t\t\t\t\t\tparams.animation.data.oldx = params.animation.x;\n\t\t\t\t\t\t\tparams.animation.data.oldy = params.animation.y;\n\n\t\t\t\t\t\t\tparams.animation.x = params.animation.x * downscale;\n\t\t\t\t\t\t\tparams.animation.y = params.animation.y * downscale;\n\n\n\t\t\t\t\t\t\ttl.add(newtl.staggerTo(animobject,params.speed,params.animation,params.elementdelay),params.start);\n\t\t\t\t\t\t\ttl.addLabel(frame,params.start);\n\n\t\t\t\t\t\t\tnextcaption.data('timeline',tl);\n\n\t\t\t\t}", "function mainSlider() {\n var BannerSlider = $('.banner-slider');\n BannerSlider.on('init', function (e, slick) {\n var $firstAnimatingElements = $('.slider-item').find('[data-animation]');\n doAnimations($firstAnimatingElements);\n });\n BannerSlider.on('beforeChange', function (e, slick, currentSlide, nextSlide) {\n var $animatingElements = $('.slider-item[data-slick-index=\"' + nextSlide + '\"]').find('[data-animation]');\n doAnimations($animatingElements);\n });\n BannerSlider.slick({\n dots: true,\n infinite: true,\n speed: 1000,\n fade: true,\n autoplay: true,\n autoplaySpeed:1500,\n arrows: false,\n slidesToShow: 1,\n slidesToScroll: 1,\n responsive: [\n {\n breakpoint: 1550,\n settings: {\n slidesToShow: 1,\n slidesToScroll: 1,\n infinite: true,\n dots: false\n }\n },\n {\n breakpoint: 1024,\n settings: {\n slidesToShow: 1,\n slidesToScroll: 1,\n infinite: true,\n dots: false\n }\n },\n {\n breakpoint: 600,\n settings: {\n slidesToShow: 1,\n slidesToScroll: 1,\n dots: false\n }\n },\n {\n breakpoint: 480,\n settings: {\n slidesToShow: 1,\n slidesToScroll: 1,\n dots: false\n }\n }\n ]\n });\n \n function doAnimations(elements) {\n var animationEndEvents = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';\n elements.each(function () {\n var $this = $(this);\n var $animationDelay = $this.data('delay');\n var $animationType = 'animated ' + $this.data('animation');\n $this.css({\n 'animation-delay': $animationDelay,\n '-webkit-animation-delay': $animationDelay\n });\n $this.addClass($animationType).one(animationEndEvents, function () {\n $this.removeClass($animationType);\n });\n });\n }\n }", "function main() {\n\n(function () {\n 'use strict';\n\n /* ==============================================\n \tTestimonial Slider\n \t=============================================== */ \n\n \t$('a.page-scroll').click(function() {\n if (location.pathname.replace(/^\\//,'') == this.pathname.replace(/^\\//,'') && location.hostname == this.hostname) {\n var target = $(this.hash);\n target = target.length ? target : $('[name=' + this.hash.slice(1) +']');\n if (target.length) {\n $('html,body').animate({\n scrollTop: target.offset().top - 40\n }, 900);\n return false;\n }\n }\n });\n\n /*====================================\n Show Menu on Book\n ======================================*/\n $(window).bind('scroll', function() {\n var navHeight = $(window).height() - 100;\n if ($(window).scrollTop() > navHeight) {\n $('.navbar-default').addClass('on');\n } else {\n $('.navbar-default').removeClass('on');\n }\n });\n\n $('body').scrollspy({ \n target: '.navbar-default',\n offset: 80\n })\n\n \t$(document).ready(function() {\n\n \t $(\"#clients\").owlCarousel({\n \t \n \t navigation : false, // Show next and prev buttons\n \t slideSpeed : 300,\n \t paginationSpeed : 400,\n \t autoHeight : true,\n \t itemsCustom : [\n\t\t\t\t [0, 1],\n\t\t\t\t [450, 2],\n\t\t\t\t [600, 2],\n\t\t\t\t [700, 2],\n\t\t\t\t [1000, 3],\n\t\t\t\t [1200, 3],\n\t\t\t\t [1400, 3],\n\t\t\t\t [1600, 3]\n\t\t\t\t ],\n \t });\n\n $(\"#testimonial\").owlCarousel({\n navigation : false, // Show next and prev buttons\n slideSpeed : 300,\n paginationSpeed : 400,\n singleItem:true\n });\n\n \t});\n\n \t/*====================================\n Portfolio Isotope Filter\n ======================================*/\n $(window).load(function() {\n var $container = $('#lightbox');\n $container.isotope({\n filter: '*',\n animationOptions: {\n duration: 750,\n easing: 'linear',\n queue: false\n }\n });\n $('.cat a').click(function() {\n $('.cat .active').removeClass('active');\n $(this).addClass('active');\n var selector = $(this).attr('data-filter');\n $container.isotope({\n filter: selector,\n animationOptions: {\n duration: 750,\n easing: 'linear',\n queue: false\n }\n });\n return false;\n });\n\n });\n\t\n\tvar form = $('#contactform');\n\tvar submit = $('#contactForm_submit');\t\n\tvar alertx = $('.form-respond'); \n\t$(document).on('submit', '#contactform', function(e) {\n\t\te.preventDefault(); // prevent default form submit\n\t\tsubmit.html('Sending....'); // change submit button text\n\t\t// sending ajax request through jQuery\n\t\t$.ajax({\n\t\t\turl: 'mail.php',\n\t\t\ttype: 'POST', \n\t\t\tdataType: 'html',\n\t\t\tdata: $('#contactform').serialize(), \n\t\t\tbeforeSend: function() {\n\t\t\t\talertx.fadeOut();\n\t\t\t\tsubmit.html('Sending....'); // change submit button text\n\t\t\t},\n\t\t\tsuccess: function(data) {\n\t\t\t\t$('#contactform').fadeOut(300);\n\t\t\t\talertx.html(data).fadeIn(1000); // fade in response data \n\t\t\t\tsetTimeout(function() {\n\t\t\t\t alertx.html(data).fadeOut(300);\n\t\t\t\t $('#sujet, #email, #message').val('')\n\t\t\t\t $('#contactform').fadeIn(1800);\n\t\t\t\t submit.html('Envoyer'); // change submit button text\n\t\t\t }, 4000 ); \n\n\t\t\t},\n\t\t\terror: function(e) {\n\t\t\t\tconsole.log(e)\n\t\t\t}\n\t\t});\n\t});\n\n\n\n}());\n\n\n}", "function onAfter(curr,next,opts) {\n var caption = (opts.currSlide + 1) + ' / ' + opts.slideCount;\n $('#caption1').html(caption);\n}", "function myFunction(){\n //console.log(carousel.getActiveIndex());\n addClass();\n setTimeout(myFunction, 500);\n}", "_animateCSS() {\n console.debug('Animate CSS');\n let container = this.shadowRoot.getElementById('container');\n let slides = container.querySelector(\".slider__slides\");\n slides.style.transform = \"translateX(-\" + 100 * this.position + \"%)\";\n // console.debug('Animate CSS: slider__slides: ', slides);\n // console.debug('Animate CSS: slides.style.transform: ', slides.style.transform);\n // console.debug('Animate CSS: indSel.style.left: ', indSel.style.left);\n // console.debug('Animate CSS: indSel.style.right: ', indSel.style.right);\n }", "function LargeShowcaseCarousel() {\r\n\t\t\r\n\t\r\n\t\tif( $('#large-showcase-carousel').length > 0 ){\t\r\n\t\t\r\n\t\t\tvar interleaveOffset = 0;\r\n\r\n\t\t\tvar swiperOptions = {\r\n\t\t\t\tdirection: \"horizontal\",\r\n\t\t\t\tloop: false,\r\n\t\t\t\tgrabCursor: true,\r\n\t\t\t\tresistance : true,\r\n\t\t\t\tresistanceRatio : 0.6,\r\n\t\t\t\tspeed:1000,\r\n\t\t\t\tcenteredSlides: true,\r\n\t\t\t\tspaceBetween: 300,\r\n\t\t\t\tslidesPerView: 'auto',\r\n\t\t\t\tbreakpoints: {\r\n\t\t\t\t\t1466: {\r\n\t\t\t\t\t slidesPerView: 'auto',\r\n\t\t\t\t\t spaceBetween: 200\r\n\t\t\t\t\t},\r\n\t\t\t\t\t1024: {\r\n\t\t\t\t\t slidesPerView: 'auto',\r\n\t\t\t\t\t spaceBetween: 80\r\n\t\t\t\t\t},\r\n\t\t\t\t\t767: {\r\n\t\t\t\t\t slidesPerView: 'auto',\r\n\t\t\t\t\t spaceBetween: 50\r\n\t\t\t\t\t},\r\n\t\t\t\t\t479: {\r\n\t\t\t\t\t slidesPerView: 'auto',\r\n\t\t\t\t\t spaceBetween: 2\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tautoplay: false,\r\n\t\t\t\teffect: \"slide\",\r\n\t\t\t\tmousewheel: true,\t\t\t\t\r\n\t\t\t\tscrollbar: {\r\n\t\t\t\t\tel: '.swiper-scrollbar',\r\n\t\t\t\t\tdraggable: true,\r\n\t\t\t\t },\r\n\t\t\t\tnavigation: {\r\n\t\t\t\t\tnextEl: '.swiper-button-next',\r\n\t\t\t\t\tprevEl: '.swiper-button-prev',\r\n\t\t\t\t},\r\n\t\t\t\ton: {\r\n\t\t\t\t\tprogress: function() {\r\n\t\t\t\t\t\tvar swiper = this;\r\n\t\t\t\t\t\tfor (var i = 0; i < swiper.slides.length; i++) {\r\n\t\t\t\t\t\t\tvar slideProgress = swiper.slides[i].progress;\r\n\t\t\t\t\t\t\tvar innerOffset = swiper.width * interleaveOffset;\r\n\t\t\t\t\t\t\tvar innerTranslate = slideProgress * innerOffset;\r\n\t\t\t\t\t\t\tswiper.slides[i].querySelector(\".img-mask\").style.transform = \"translate3d(\" + innerTranslate + \"px,0, 0)\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\ttouchStart: function() {\r\n\t\t\t\t\t\tvar swiper = this;\r\n\t\t\t\t\t\tfor (var i = 0; i < swiper.slides.length; i++) {\r\n\t\t\t\t\t\t\tswiper.slides[i].style.transition = \"\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tsetTransition: function(speed) {\r\n\t\t\t\t\t\tvar swiper = this;\r\n\t\t\t\t\t\tfor (var i = 0; i < swiper.slides.length; i++) {\r\n\t\t\t\t\t\t\tswiper.slides[i].style.transition = speed + \"ms\";\r\n\t\t\t\t\t\t\tswiper.slides[i].querySelector(\".img-mask\").style.transition = speed + \"ms\";\r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t},\r\n\t\t\t\t\tinit: function () {\r\n\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\tTweenMax.to($('.swiper-slide-active').nextAll().find('.slide-title span'), 0,{scale:1.1, x:100, opacity:0, ease:Power2.easeInOut});\r\n\t\t\t\t\t\t\tTweenMax.to($('.swiper-slide-active').nextAll().find('.slide-cat'), 0,{x:20, opacity:0, delay:0.3, ease:Power2.easeIn});\r\n\t\t\t\t\t\t} , 100 );\t\r\n\t\t\t\t\t},\r\n\t\t\t\t\tslideNextTransitionStart: function () {\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar prevslidetitle = new TimelineLite();\t\t\t\t\t\t\r\n\t\t\t\t\t\tprevslidetitle.staggerTo($('.swiper-slide-active').prevAll().find('.slide-title span'), 0.5, {scale:0.9, x:-100, opacity:0, ease:Power2.easeInOut}, 0.02)\r\n\t\t\t\t\t\tvar prevslidecaption = new TimelineLite();\r\n\t\t\t\t\t\tprevslidecaption.staggerTo($('.swiper-slide-active').prevAll().find('.slide-cat'), 0.5, {x:-20, opacity:0, delay:0.3, ease:Power2.easeIn}, 0.02)\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar activeslidetitle = new TimelineLite();\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tactiveslidetitle.staggerTo($('.swiper-slide-active').find('.slide-title span'), 0.5, {scale:1, x:0, opacity:1, scale:1, delay:0.3, ease:Power2.easeOut}, 0.02)\r\n\t\t\t\t\t\tvar activeslidecaption = new TimelineLite();\r\n\t\t\t\t\t\tactiveslidecaption.staggerTo($('.swiper-slide-active').find('.slide-cat'), 0.5, {x:0, opacity:1, scale:1, delay:0.6, ease:Power2.easeOut}, 0.02)\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar nextslidetitle = new TimelineLite();\t\t\t\t\t\t\r\n\t\t\t\t\t\tnextslidetitle.staggerTo($('.swiper-slide-active').nextAll().find('.slide-title span'), 0.5, {scale:1.1, x:100, opacity:0, ease:Power2.easeInOut}, 0.02)\r\n\t\t\t\t\t\tvar nextslidecaption = new TimelineLite();\t\r\n\t\t\t\t\t\tnextslidecaption.staggerTo($('.swiper-slide-active').nextAll().find('.slide-cat'), 0.5, {x:20, opacity:0, delay:0.3, ease:Power2.easeIn}, 0.02)\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t},\r\n\t\t\t\t\tslidePrevTransitionStart: function () {\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//TweenMax.set($(\".swiper-slide\"), {transform:\"skew(-10deg, 0deg)\"});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar prevslidetitle = new TimelineLite();\t\t\t\t\t\t\r\n\t\t\t\t\t\tprevslidetitle.staggerTo($('.swiper-slide-active').prevAll().find('.slide-title span'), 0.5, {scale:1.1, x:-100, opacity:0, ease:Power2.easeInOut}, -0.02)\r\n\t\t\t\t\t\tvar prevslidecaption = new TimelineLite();\r\n\t\t\t\t\t\tprevslidecaption.staggerTo($('.swiper-slide-active').prevAll().find('.slide-cat'), 0.5, {x:-40, opacity:0, delay:0.2, ease:Power2.easeIn}, -0.02)\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar activeslidetitle = new TimelineLite();\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tactiveslidetitle.staggerTo($('.swiper-slide-active').find('.slide-title span'), 0.5, {scale:1, x:0, opacity:1, scale:1, delay:0.5, ease:Power2.easeOut}, -0.02)\r\n\t\t\t\t\t\tvar activeslidecaption = new TimelineLite();\r\n\t\t\t\t\t\tactiveslidecaption.staggerTo($('.swiper-slide-active').find('.slide-cat'), 0.5, {x:0, opacity:1, scale:1, delay:0.6, ease:Power2.easeOut}, -0.02)\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar nextslidetitle = new TimelineLite();\t\t\t\t\t\t\r\n\t\t\t\t\t\tnextslidetitle.staggerTo($('.swiper-slide-active').next().find('.slide-title span'), 0.5, {scale:0.9, x:100, opacity:0, ease:Power2.easeInOut}, -0.02)\r\n\t\t\t\t\t\tvar nextslidecaption = new TimelineLite();\t\r\n\t\t\t\t\t\tnextslidecaption.staggerTo($('.swiper-slide-active').next().find('.slide-cat'), 0.5, {x:40, opacity:0, delay:0, ease:Power2.easeIn}, -0.02)\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t},\r\n\t\t\t\t}, \r\n\t\t\t};\r\n\t\t\t\t\r\n\t\t\tvar swiper = new Swiper(\".swiper-container\", swiperOptions);\r\n\t\t\t\r\n\t\t\t$('.slide-title').each(function(){\r\n\t\t\t\tvar words = $(this).text().slice(\" \");\r\n\t\t\t\tvar total = words.length;\r\n\t\t\t\t$(this).empty();\r\n\t\t\t\tfor (index = 0; index < total; index ++){\r\n\t\t\t\t\t$(this).append($(\"<span /> \").text(words[index]));\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t$(\".swiper-slide\").on('mouseenter', function(event) {\r\n\t\t\t\tTweenMax.to('#ball', 0.2,{transformOrigin: '15px 15px', borderWidth: '1px', scale: 1.8});\r\n\t\t\t\tTweenMax.to('#ball-loader', 0.2,{borderWidth: '1px', top: 1, left: 1});\r\n\t\t\t\t$( \"#ball\" ).addClass(\"with-icon\").append( '<i class=\"fa fa-plus\"></i>' );\r\n\t\t\t\t$(this).find('video').each(function() {\r\n\t\t\t\t\t$(this).get(0).play();\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t$('.swiper-slide').on('mousedown', function(event) {\r\n\t\t\t\treturn false;\r\n\t\t\t});\r\n\t\t\t\t\r\n\t\t\t$(\".swiper-slide\").on('mouseleave', function(event) {\r\n\t\t\t\tTweenMax.to('#ball', 0.2,{borderWidth: '2px', scale:1, x: -15, y: -15});\r\n\t\t\t\tTweenMax.to('#ball-loader', 0.2,{borderWidth: '2px', top: 0, left: 0});\r\n\t\t\t\t$(\"#ball\").removeClass(\"with-icon\");\r\n\t\t\t\t$('#ball i').remove();\r\n\t\t\t\t$(this).find('video').each(function() {\r\n\t\t\t\t\t$(this).get(0).pause();\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t$('#large-showcase-carousel').on('mousedown touchstart', function(event) {\t\t\t\t\r\n\t\t\t\t$('body').addClass('scale-up');\r\n\t\t\t\tTweenMax.to('#ball', 0.1,{transformOrigin: '15px 15px', borderWidth: '1px', scale: 2});\t\r\n\t\t\t});\t\t\t\r\n\t\t\t$('#large-showcase-carousel').on('mouseup touchend', function(event) {\t\t\t\t\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t$('body').removeClass('scale-up');\r\n\t\t\t\t} , 0 );\t\r\n\t\t\t\tTweenMax.to('#ball', 0.1,{borderWidth: '2px', scale:1, x: -15, y: -15});\t\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t$('body').on('mouseup touchend', function(event) {\t\t\t\t\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t$('body').removeClass('scale-up');\r\n\t\t\t\t} , 0 );\t\r\n\t\t\t\tTweenMax.to('#ball', 0.1,{borderWidth: '2px', scale:1, x: -15, y: -15});\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tFitSlideScreen();\r\n\t\t}\t\r\n\t\t\r\n\t\t\t\r\n\t}", "function buildCarouselItem(persona) {\n var goals = '<b>' + gettext('Goals:') + '</b><br>';\n var frustrations = '<b>' + gettext('Frustrations:') + '</b><br>';\n for (var x=0; x < persona.goals.length; x++) {\n goals += '&ndash; ' + persona.goals[x] + '<br>';\n }\n for (var y=0; y < persona.frustrations.length; y++) {\n frustrations += '&ndash; ' + persona.frustrations[y] + '<br>';\n }\n\n var displayHtml = '<div class=\"row\">\\n'\n + ' <div class=\"col-12 col-lg-6\">\\n'\n + ' <img src=\"' + base + 'interactives/persona-carousel/img/' + persona.carousel_id + '.jpg\" class=\"persona-portrait\">\\n'\n + ' </div>\\n'\n + ' <div id=\"' + persona.carousel_id + '-about\" class=\"col-12 col-lg-6\">\\n'\n + ' <b>' + persona.name + '</b>, ' + persona.age + '<br><sup>' + persona.title + '</sup><br>' + persona.about + '\\n'\n + ' </div>\\n'\n + '</div>\\n'\n + '<div class=\"row\">\\n'\n + ' <div id=\"' + persona.carousel_id + '-goals\" class=\"col-12 col-lg-6 bottom-row\">\\n'\n + ' ' + goals + '\\n'\n + ' </div>\\n'\n + ' <div id=\"' + persona.carousel_id + '-frustrations\" class=\"col-12 col-lg-6 bottom-row\">\\n'\n + ' ' + frustrations + '\\n';\n + ' </div>\\n'\n + '</div>\\n';\n $('#' + persona.carousel_id).html(displayHtml);\n}", "function create_carousel(current){\n var newId = current.name.split(\" \").join(\"-\").toLowerCase();\n var newCaro = $('#item-placeholder').clone();\n newCaro.removeAttr(\"id\");\n newCaro.removeAttr(\"data-target\");\n newCaro.attr(\"data-target\", \"#\"+newId);\n newCaro.find('h1.name').html(current.name);\n var numOfItems = $('#pic_display .item').length;\n var newIndicator = $('<li/>').attr(\"data-slide-to\", numOfItems).attr('data-target',\"#carousel\");\n $('.carousel-indicators').append(newIndicator);\n $('#pic_display').append(newCaro);\n}", "function autoSliders() {\r\n setTimeout(function autoSlider() {\r\n const track = document.querySelector(\".carousel__tracker\");\r\n const currentSlide = track.querySelector(\".current-slide\"); // For the function of the slide = moveToSlide and restartCurrentSlide\r\n const nextSlide = currentSlide.nextElementSibling;\r\n\r\n const dots = document.querySelector(\".carousel__nav\");\r\n const currentNavBtn = dots.querySelector(\".current-slide\"); // For the function of the dots = updateDots and restartCurrentSlide\r\n const nextNavBtn = currentNavBtn.nextElementSibling;\r\n\r\n counter++; // to make the counter = 1 before executing\r\n if (counter === slider.length) {\r\n // if the length of the slider is equal, it restarts.\r\n restartCurrentSlide(track, dots); // Restarting the currentslide in the firstchild of dots and track;\r\n } else {\r\n // Next slides\r\n track.style.transition = \"ease 700ms\";\r\n moveToSlide(track, currentSlide, nextSlide);\r\n updateDots(currentNavBtn, nextNavBtn);\r\n // console.log(counter);\r\n }\r\n if (counter === 0) {\r\n // for the button to hide and show\r\n prevBtn.classList.add(\"set-hidden\");\r\n nextBtn.classList.remove(\"set-hidden\");\r\n } else if (counter === slider.length - 1) {\r\n prevBtn.classList.remove(\"set-hidden\");\r\n nextBtn.classList.add(\"set-hidden\");\r\n } else {\r\n prevBtn.classList.remove(\"set-hidden\");\r\n nextBtn.classList.remove(\"set-hidden\");\r\n }\r\n }, 3000); // Set the time before executing autosliders for autoslider\r\n setTimeout(autoSliders, 8000); // Set the time before the track go next\r\n}", "function Testimonials() {\r\n return (\r\n <div >\r\n \r\n\r\n<section id=\"testimonials\">\r\n\r\n {/* <div id=\"testimonial-carousel\" class=\"carousel slide\" data-ride=\"carousel\">\r\n <div class=\"carousel-inner\">\r\n <div class=\"carousel-item active\">\r\n <h2>I no longer have to sniff other dogs for love. I've found the hottest Corgi on TinDog. Woof.</h2>\r\n <img class=\"testimonial-img\" src=\"images/dog-img.jpg\" alt=\"dog-profile\"/>\r\n <p class=\"testimonial-imgtext\"><em>Pebbles, New York</em></p>\r\n </div>\r\n\r\n <div class=\"carousel-item\">\r\n <h2 class=\"testimonial-text\">My dog used to be so lonely, but with TinDog's help, they've found the love of their life. I think.</h2>\r\n <img class=\"testimonial-img\" src=\"images/lady-img.jpg\" alt=\"lady-profile\"/>\r\n <p class=\"testimonial-imgtext\"><em>Beverly, Illinois</em></p>\r\n </div>\r\n <a class=\"carousel-control-prev\" href=\"#testimonial-carousel\" role=\"button\" data-slide=\"prev\">\r\n <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>\r\n <span class=\"sr-only\">Previous</span>\r\n </a>\r\n <a class=\"carousel-control-next\" href=\"#testimonial-carousel\" role=\"button\" data-slide=\"next\">\r\n <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>\r\n <span class=\"sr-only\">Next</span>\r\n </a>\r\n </div>\r\n </div> */}\r\n{/* -------------------------------------------------------------- */}\r\n<Carousel className=\"carousel-inner\">\r\n\r\n <Carousel.Item >\r\n <img className=\" testimonial-img\" src=\"images/dog-img.jpg\" alt=\"dog-profile\" />\r\n <Carousel.Caption>\r\n <h3 className=\"bigtext\" >I no longer have to sniff other dogs for love. I've found the hottest Corgi on TinDog. Woof.</h3>\r\n <p className=\"imgtext\" ><em>Pebbles, New York</em></p>\r\n </Carousel.Caption>\r\n </Carousel.Item>\r\n\r\n <Carousel.Item >\r\n <img className=\"testimonial-img\" src=\"images/lady-img.jpg\" alt=\"lady-profile\"/>\r\n\r\n <Carousel.Caption>\r\n <h3 className=\"bigtext\" >My dog used to be so lonely, but with TinDog's help, they've found the love of their life. I think.</h3>\r\n <p className=\"imgtext\" ><em>Beverly, Illinois</em></p>\r\n </Carousel.Caption>\r\n </Carousel.Item>\r\n \r\n \r\n</Carousel>\r\n{/* \r\n<Carousel>\r\n <div>\r\n <img src=\"assets/1.jpeg\" />\r\n <p className=\"legend\">Legend 1</p>\r\n </div>\r\n <div>\r\n <img src=\"assets/2.jpeg\" />\r\n <p className=\"legend\">Legend 2</p>\r\n </div>\r\n <div>\r\n <img src=\"assets/3.jpeg\" />\r\n <p className=\"legend\">Legend 3</p>\r\n </div>\r\n </Carousel> */}\r\n{/* --------------------------------------------------------------- */}\r\n</section>\r\n \r\n </div>\r\n );\r\n}", "function carousel(){\r\n var i;\r\n var x = document.getElementsByClassName(\"projIMG\");\r\n for(i = 0; i< x.length; i++){\r\n x[i].style.display = \"none\";\r\n }\r\n index++;\r\n if(index > x.length){\r\n index = 1\r\n }\r\n x[index-1].style.display = \"block\";\r\n setTimeout(carousel,3500);\r\n}", "function galleryRunSlideShow() {\n var current = ($('#gallery a.show')? $('#gallery a.show') : $('#gallery a:first'));\n var next = ((current.next().length) ? ((current.next().hasClass('caption'))? $('#gallery a:first') :current.next()) : $('#gallery a:first'));\n var caption = next.find('img').attr('alt');\n\n next.css({opacity: 0.0})\n .addClass('show')\n .animate({opacity: 1.0}, 500);\n\n current.animate({opacity: 0.0}, 100)\n .removeClass('show');\n\n\n $('#gallery .caption').animate({opacity: 0.0}, { queue:false, duration:0 }).animate({height: '1px'}, { queue:true, duration:300 });\n $('#gallery .caption').animate({opacity: 0.9},1 ).animate({height: '60px'},500 );\n $('#gallery .img').animate({opacity: 0.8},1 ).animate({width: 'auto'},500 );\n $('#gallery .content').html(caption);\n}" ]
[ "0.7483857", "0.6853174", "0.6811745", "0.6604594", "0.66032684", "0.6597424", "0.6597424", "0.659365", "0.65914416", "0.6587788", "0.6587006", "0.64317006", "0.64129376", "0.64031065", "0.6194856", "0.6177388", "0.61410666", "0.6130886", "0.6097333", "0.60883355", "0.6085014", "0.6077264", "0.6069236", "0.60628915", "0.60437524", "0.6025352", "0.6015103", "0.5993098", "0.5949054", "0.59463274", "0.5940644", "0.59327155", "0.59298337", "0.59254414", "0.59239554", "0.5922318", "0.59220463", "0.59202325", "0.59187496", "0.5909223", "0.59077775", "0.5903938", "0.58994985", "0.5895142", "0.588991", "0.5881566", "0.5878352", "0.5874484", "0.58723587", "0.5870476", "0.586813", "0.586813", "0.58630824", "0.58613616", "0.5857722", "0.5851547", "0.58475924", "0.5843479", "0.58412766", "0.58383864", "0.5833563", "0.58289266", "0.58289266", "0.5826469", "0.5823007", "0.58205134", "0.58146954", "0.58118707", "0.5805109", "0.5804588", "0.5804588", "0.5804588", "0.57981074", "0.57954574", "0.5791767", "0.57840997", "0.57654244", "0.57599777", "0.5755692", "0.5750529", "0.5747091", "0.5742914", "0.5742244", "0.57367164", "0.57367164", "0.57367164", "0.57367164", "0.57308847", "0.57308847", "0.572554", "0.57171434", "0.571646", "0.5713996", "0.57071096", "0.5703929", "0.57025516", "0.5696713", "0.56942", "0.5693247", "0.56919694", "0.5689732" ]
0.0
-1
Fetch Figma exported pngs.
function run() { return new Promise((resolve, reject) => { if (map.length == 0) { reject() } for (let i = 0; i < map.length; i++) { promises.push(() => { console.log('Fetching pngs into', `${map[i].destination_path}/png`, 'dir.') return fetchPngs(map[i]) }) } runSync(promises).then(() => {}) resolve() }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static formImages() {\n let mainfsDirCount = PP64.fs.mainfs.getDirectoryCount();\n for (let d = 0; d < mainfsDirCount; d++) {\n let dirFileCount = PP64.fs.mainfs.getFileCount(d);\n for (let f = 0; f < dirFileCount; f++) {\n let fileBuffer = PP64.fs.mainfs.get(d, f);\n if (!PP64.utils.FORM.isForm(fileBuffer))\n continue;\n\n try {\n let formUnpacked = PP64.utils.FORM.unpack(fileBuffer);\n if (formUnpacked.BMP1.length) {\n formUnpacked.BMP1.forEach(bmpEntry => {\n let dataUri = PP64.utils.arrays.arrayBufferToDataURL(bmpEntry.parsed.src, bmpEntry.parsed.width, bmpEntry.parsed.height);\n console.log(`${d}/${f}:`);\n console.log(dataUri);\n });\n }\n }\n catch (e) {}\n }\n }\n }", "function fetchImages() {\n const numPhotos = 18;\n const graphicPromises = [];\n const baseUrl =\n \"https://arcgis.github.io/arcgis-samples-javascript/sample-data/featurelayer-collection/photo-\";\n\n for (let i = 1; i <= numPhotos; i++) {\n const url = baseUrl + i.toString() + \".jpg\";\n const graphicPromise = exifToGraphic(url, i);\n graphicPromises.push(graphicPromise);\n }\n\n return promiseUtils.eachAlways(graphicPromises);\n}", "function fetchImages(){\n const imgUrl = \"https://dog.ceo/api/breeds/image/random/4\";\n fetch(imgUrl)\n .then(response => response.json())\n .then(json => displayImages(json.message));\n}", "function PixFileDownload() {\n}", "function getImage() {\n send(json_get_image_message());\n}", "function cargaImagenes() {\n for (var i = 0; i < 12; i++) {\n fuentesNotas[i] = p.loadImage(\"fuentes/\" + i + \".png\");\n }\n }", "function fetchImage() {\n // TODO\n fetch('examples/fetching.jpg')\n\t.then(validateResponse)\n\t.then(readResponseAsBlob)\n\t.then(showImage)\n\t.catch(logError);\n}", "downloadVisuals() {\n let imgArray = [];\n this.currentOrder.content.forEach((order) => {\n order.visual.forEach((visual) => {\n if (visual.fullsizeimage !== undefined) {\n imgArray.push(visual.fullsizeimage);\n }\n });\n });\n downloadAll(imgArray);\n }", "function fetchImages(){\n fetch(\"https://dog.ceo/api/breeds/image/random/4\")\n .then(res => res.json())\n .then(result => {\n result.message.map( img => Addimage(img))\n });\n}", "function loadImageUrls() {\n fetch(\"https://api.imgflip.com/get_memes\")\n .then((result) => result.json())\n .then(({ data: { memes: loadedMemes } = {} }) => {\n memes = loadedMemes;\n showImage(0);\n });\n }", "async function descargamodal() {\n\n let url = document.getElementById(\"maxGif\").src;\n let blob = await fetch(url).then(r => r.blob());\n invokeSaveAsDialog(blob, \"archivo.gif\");\n}", "function getImages() {\n alert(\"Page will reload once images are finished loading\");\n // runs 1540photo.py, which collects images from Gmail\n exec(\"python 1540photo.py\");\n loaded_images_from_tba = 0;\n // for each team, loads media\n for (let team_id in teams) {\n loadMediaFromTBA(teams[team_id]);\n }\n // gets local files\n let local_dir = fs.readdirSync(\"./data/images/\");\n for (let team_id in local_dir) {\n try {\n let file = local_dir[team_id];\n if (manifest_images.indexOf(file) < 0) {\n manifest_images.push(file);\n }\n } catch (_) {}\n }\n // checks to see if all images are loaded, and saves a manifest if true\n window.setInterval(saveImageManifest, 3000);\n}", "function fetchImgs() {\n const imgUrl = \"https://dog.ceo/api/breeds/image/random/4\";\n fetch(imgUrl)\n .then(resp => resp.json())\n .then(results => insertImgs(results)) \n}", "function screengrab( sketchfab_api, img_type = 'image/png', width = 1920, height = 1080 ) {\n return new Promise(( resolve, reject ) => {\n sketchfab_api.getScreenShot( width, height, img_type, function( err, result ) {\n var img_data = atob( result.split( ',' )[ 1 ]);\n var buffer = new ArrayBuffer( img_data.length );\n var view = new Uint8Array( buffer );\n for ( var i = 0; i < img_data.length; i++ ) {\n view[ i ] = img_data.charCodeAt( i ) & 0xff;\n }\n var img_blob = new Blob( [ buffer ], { type: img_type });\n resolve( img_blob );\n });\n });\n}", "async function loadMisGuifos(){\n for(let i = 0; i<arrayGallery.length; i++){\n let url = `https://api.giphy.com/v1/gifs/${arrayGallery[i]}?api_key=${APIKey}`\n let responseLoad = await fetch(url);\n let dataLoad = await responseLoad.json();\n \n misGuifoscardGenerator(dataLoad.data.images.original.url)\n };\n}", "async function getCattts() {\n const response = await fetch('https://api.giphy.com/v1/gifs/translate?api_key=MA7ohxIYwTdEkW4gq9ieDD4NzeQmKE9k&s=cat', { mode: 'cors' })\n const parseData = await response.json()\n img3.src = parseData.data.images.original.url\n}", "async function getImgs() {\n\tconst mediadiv = document.getElementById('media');\n\tconst medianodes = mediadiv.childNodes;\n\tlet dlpath = await getPath();\n\tconsole.log(dlpath);\n\tdlpath = dlpath.path.toString();\n\tconst getimgs = new Getimg(dlpath);\n\tgetimgs.on('tvelem', data => {\n\t\tgetImgDB(data).then(res => {\n\n\t\t});\n\t});\n\tgetimgs.on('episode', data => {\n\t\tconst db = new PouchDB(require('path').join(require('electron').remote.app.getPath('userData'), 'dbImg').toString());\n\t\tconsole.log('ep');\n\t\tconst elem = data[0];\n\t\tconst tvelem = data[1];\n\t\tconst elempath = data[2];\n\t\tmedianodes.forEach((img, ind) => {\n\t\t\tif (img.id === elempath) {\n\t\t\t\ttvdb.getEpisodeById(elem.id)\n\t\t\t\t\t.then(res => {\n\t\t\t\t\t\tif (ind === medianodes.length - 1) {\n\t\t\t\t\t\t\tindeterminateProgress.end();\n\t\t\t\t\t\t\tdocument.getElementById('Loading').style.display = 'none';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (res.filename !== '') {\n\t\t\t\t\t\t\timg.children[0].src = `http://thetvdb.com/banners/${res.filename}`;\n\t\t\t\t\t\t\tconvertImgToBlob(img.children[0], blob => {\n\t\t\t\t\t\t\t\tdb.put({\n\t\t\t\t\t\t\t\t\t_id: `img${tvelem.show.replace(' ', '')}S${tvelem.season}E${tvelem.episode}`,\n\t\t\t\t\t\t\t\t\telempath: data[2],\n\t\t\t\t\t\t\t\t\telem: data[0],\n\t\t\t\t\t\t\t\t\ttvelem: data[1],\n\t\t\t\t\t\t\t\t\t_attachments: {\n\t\t\t\t\t\t\t\t\t\timg: {\n\t\t\t\t\t\t\t\t\t\t\tcontent_type: 'image/jpeg', // eslint-disable-line\n\t\t\t\t\t\t\t\t\t\t\tdata: Buffer.from(blob, 'base64')\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else if (res.filename === '') {\n\t\t\t\t\t\t\timg.children[0].src = `file:///${__dirname}/404.png`;\n\t\t\t\t\t\t\timg.children[0].parentNode.style.display = 'inline-block';\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\t.catch(err => {\n\t\t\t\t\t\tconsole.log(err);\n\t\t\t\t\t\tbugsnag.notify(new Error(err), {\n\t\t\t\t\t\t\tsubsystem: {\n\t\t\t\t\t\t\t\tname: 'Viewer'\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}\n\t\t});\n\t});\n}", "function getImageFiles(elem) {\n\tvar pic_set = [];\t\n\tfor (var j = 1; j <= NUM_PICS; j++) {\n\t\tpic_set.push('final-images/' + elem.noun + '_' + elem.order[j-1] + '.png');\n\t\t\t}\n\t\n\n return pic_set;\n}", "function getAllImages() {\n printLog('Requiring all images the user solved from the server.');\n IMAGES = [];\n // IMAGES_ON_CLIENT = 0;\n send(json_get_all_images_message());\n}", "function getPic() {\n fetch(baseUrl)\n .then(function (response) {\n if (!response.ok) {\n console.log(response);\n return new Error(response);\n }\n console.log(\"Response:\", response);\n\n console.log(\"Meep:\", response.url);\n\n //GRAB PHOTOGRAPHER\n\n var deepest = new URL(response.url).pathname.split('/')\n var id = deepest[2]\n console.log(\"Deepest:\", id);\n var idUrl = 'https://picsum.photos/id/0/info';\n var rep = idUrl.replace(\"0\", id);\n console.log(\"Replaced:\", rep);\n var grayscaleUrl = 'https://picsum.photos/id/0/450/350.jpg?grayscale';\n var repGrayscale = grayscaleUrl.replace(\"0\", id);\n console.log(\"repGrayscale:\", repGrayscale);\n var blurURL = 'https://picsum.photos/id/0/450/350.jpg?blur';\n var repBlur = blurURL.replace(\"0\", id);\n console.log(\"repBlur:\", repBlur);\n\n document.getElementById(\"photographer\").innerHTML = \"\"\n const section = document.querySelector('#photographer');\n fetch(rep)\n .then(function (result) {\n console.log(\"photographer:\", result)\n return result.json()\n })\n .then(function (json) {\n console.log(\"photographer:\", json.author);\n displayResults(json.author);\n })\n\n //GRAYSCALE FETCH\n\n document.getElementById('button2').addEventListener(\"click\", function () {\n fetch(repGrayscale)\n .then(function (response2) {\n if (!response2.ok) {\n console.log(response2);\n return new Error(response2);\n }\n console.log(\"Response2:\", response2);\n\n console.log(\"Meep2:\", response2.url);\n return response2.blob();\n })\n\n .then(function (photoBlob) {\n console.log(\"My Blob2:\", photoBlob)\n var objectURL = URL.createObjectURL(photoBlob);\n console.log(\"Object URL2:\", objectURL);\n randomImage.src = objectURL;\n\n console.log(\"randomImage2.src:\", randomImage.src);\n\n\n })\n })\n\n //BLUR FETCH\n document.getElementById('button3').addEventListener(\"click\", function () {\n fetch(repBlur)\n .then(function (response2) {\n if (!response2.ok) {\n console.log(response2);\n return new Error(response2);\n }\n console.log(\"Response2:\", response2);\n\n console.log(\"Meep2:\", response2.url);\n return response2.blob();\n })\n\n .then(function (photoBlob) {\n console.log(\"My Blob3:\", photoBlob)\n var objectURL = URL.createObjectURL(photoBlob);\n console.log(\"Object URL3:\", objectURL);\n randomImage.src = objectURL;\n\n console.log(\"randomImage3.src:\", randomImage.src);\n\n })\n })\n\n //END GRAYSCALE FETCH, BACK TO GRAB PHOTOGRAPHER\n\n\n function displayResults(json) {\n let photographer = json;\n let heading = document.createElement('h1');\n section.appendChild(heading);\n heading.textContent = photographer;\n }\n\n //END GRAB PHOTOGRAPHER \n\n return response.blob();\n })\n\n .then(function (photoBlob) {\n console.log(\"My Blob:\", photoBlob)\n var objectURL = URL.createObjectURL(photoBlob);\n console.log(\"Object URL:\", objectURL);\n randomImage.src = objectURL;\n\n console.log(\"randomImage.src:\", randomImage.src);\n\n })\n\n .catch(function (err) {\n console.log(err);\n })\n}", "function downloadImage(url) {}", "function downloadPic() {\n console.log(\"itemNum Downloading: \" + itemNumToDownload);\n var hiddenImage = document.getElementById(\"hidden-image\");\n hiddenImage.addEventListener(\"load\", downloadNextPic);\n var cdate = changeFormate(date);\n var img_url = \"https://api.nasa.gov/EPIC/archive/natural/\" + cdate + \"/png/\" + data[itemNumToDownload].image + \".png?api_key=\" + API_KEY;\n hiddenImage.src = img_url;\n}", "static images() {\n let zip = new JSZip();\n\n let mainfs = zip.folder(\"mainfs\");\n let mainfsDirCount = PP64.fs.mainfs.getDirectoryCount();\n for (let d = 0; d < mainfsDirCount; d++) {\n let dirFolder = mainfs.folder(d.toString());\n let dirFileCount = PP64.fs.mainfs.getFileCount(d);\n for (let f = 0; f < dirFileCount; f++) {\n try {\n let fileBuffer = PP64.fs.mainfs.get(d, f);\n if (PP64.utils.FORM.isForm(fileBuffer)) {\n let formUnpacked = PP64.utils.FORM.unpack(fileBuffer);\n if (formUnpacked.BMP1.length) {\n formUnpacked.BMP1.forEach((bmpEntry, idx) => {\n let dataUri = PP64.utils.arrays.arrayBufferToDataURL(bmpEntry.parsed.src, bmpEntry.parsed.width, bmpEntry.parsed.height);\n dirFolder.file(`${f}.${idx}.png`, dataUri.substr(dataUri.indexOf(',') + 1), { base64: true });\n });\n }\n }\n else {\n // Maybe an ImgPack?\n let imgs = _readImgsFromMainFS(d, f);\n imgs.forEach((imgInfo, idx) => {\n let dataUri = PP64.utils.arrays.arrayBufferToDataURL(imgInfo.src, imgInfo.width, imgInfo.height);\n dirFolder.file(`${f}.${idx}.png`, dataUri.substr(dataUri.indexOf(',') + 1), { base64: true });\n });\n if (imgs.length > 1) {\n let tilesBuf = PP64.utils.img.tiler.fromTiles(_readPackedFromMainFS(d, f), imgs.length, 1, imgs[0].width * 4, imgs[0].height);\n let tilesUrl = PP64.utils.arrays.arrayBufferToDataURL(tilesBuf, imgs[0].width * imgs.length, imgs[0].height);\n dirFolder.file(`${f}.all.png`, tilesUrl.substr(tilesUrl.indexOf(',') + 1), { base64: true });\n }\n }\n }\n catch (e) {}\n }\n }\n\n zip.generateAsync({type: \"blob\"}).then((blob) => {\n saveAs(blob, `mp${PP64.romhandler.getGameVersion()}-images.zip`);\n });\n\n function _readPackedFromMainFS(dir, file) {\n let imgPackBuffer = PP64.fs.mainfs.get(dir, file);\n let imgArr = PP64.utils.img.ImgPack.fromPack(imgPackBuffer);\n if (!imgArr || !imgArr.length)\n return;\n\n let dataViews = imgArr.map(imgInfo => {\n return new DataView(imgInfo.src);\n });\n\n return dataViews;\n }\n\n function _readImgsFromMainFS(dir, file) {\n let imgPackBuffer = PP64.fs.mainfs.get(dir, file);\n let imgArr = PP64.utils.img.ImgPack.fromPack(imgPackBuffer);\n if (!imgArr || !imgArr.length)\n return;\n\n return imgArr;\n }\n }", "function asyncGetSkyboxFile(url, face) {\n console.log(\"Getting image\");\n return new Promise((resolve, reject) => {\n SkyboxImages[face] = new Image();\n SkyboxImages[face].onload = () => resolve({\n url,\n status: 'ok'\n });\n SkyboxImages[face].onerror = () => reject({\n url,\n status: 'error'\n });\n SkyboxImages[face].src = url\n console.log(\"Made promise\");\n });\n }", "async function getTeamImg(position, id) {\n // Set image URL, using xsmall images\n let imageUrl = encodeURI(apiBaseUrl + \"/images/team/\" + id + \"_xsmall\");\n let image;\n try {\n image = await new Request(imageUrl).loadImage();\n // If image successfully retrieved, write to cache\n fm.writeImage(fm.joinPath(offlinePath, \"badge_\" + position + \".png\"), image);\n } catch (err) {\n console.log(\"Badge Image \" + err + \" Trying to read cached data.\");\n try {\n // If image not successfully retrieved, read from cache\n await fm.downloadFileFromiCloud(fm.joinPath(offlinePath, \"badge_\" + position + \".png\"));\n image = fm.readImage(fm.joinPath(offlinePath, \"badge_\" + position + \".png\"));\n } catch (err) {\n console.log(\"Badge Image \" + err);\n }\n }\n return image;\n}", "async function fetchPixabayData(destination) {\n const api_url = `https://pixabay.com/api/?q=${destination}&image_type=photo&pretty=true&key=${PIXABAY_API_KEY}`;\n const fetchResponse = await fetch(api_url);\n\n const jsonData = await fetchResponse.json();\n\n return jsonData.hits[0].webformatURL;\n}", "async function getApicture() {\n\n const apiInfo = await fetch(pictureApi + '/' + pictureGenerator.value)\n const apiData = await apiInfo.json()\n\n apiData.message.forEach(pic => {\n const newPicture = document.createElement('div')\n newPicture.classList = 'pic'\n let text = 'url(' + pic + ')'\n newPicture.style.backgroundImage = text\n picture.appendChild(newPicture)\n })\n}", "async function download(url) {\n return Jimp.read(url)\n .then(image => {\n const width = image.bitmap.width;\n const height = image.bitmap.height;\n const format = image.getExtension();\n const uniqueName = uid();\n const smallFileName = uniqueName + '.png';\n const fileName = uniqueName + '.' + format;\n\n return image\n // Save original\n .writeAsync(`${outputFolder}/original/${fileName}`)\n .then(() => image\n // Do stuff with the image.\n .resize(120, Jimp.AUTO)\n // Save small image\n .writeAsync(`${outputFolder}/small/${smallFileName}`)\n )\n .then(() => {\n return {\n url,\n fileName,\n smallFileName,\n width,\n height,\n format\n }\n })\n }\n )\n .catch(err => {\n console.log('ERROR', err)\n })\n}", "function fetchWithOne() {\n\tconst url1 = 'http://127.0.0.1:5000/process/togrey';\n\tconst url2 = 'http://127.0.0.1:5000/process/detectface';\n\tlet url = '';\n\tif (mode == 'GS') {\n\t\turl = url1;\n\t} else if (mode == 'FD') {\n\t\turl = url2;\n\t}\n\n\tconst formData = new FormData();\n\tformData.append('image1', image1.files[0]);\n\n\tconst request = new Request(url, {\n\t\tmethod: 'post',\n\t\tbody: formData\n\t});\n\tfetch(request)\n\t\t.then((res) => {\n\t\t\tconsole.log('2312312');\n\t\t\treturn res.blob();\n\t\t})\n\t\t.then((blob) => {\n\t\t\tconsole.log('blob');\n\t\t\tvar output = document.getElementById('output');\n\t\t\tvar objectURL = URL.createObjectURL(blob);\n\t\t\toutput.src = objectURL;\n\t\t})\n\t\t.catch((error) => {\n\t\t\t// if an error occured it will be logged to the JavaScript console here.\n\t\t\tconsole.log('An error occured with fetch:', error);\n\t\t});\n}", "function downloadPNG() {\n var image = createPNG(1.3, 550, 550);\n window.location.href=image; // it will save locally\n}", "function getGifURL() {\n // Empty array with URL of cards\n cardsArray = [];\n\n //////////////////////// superheroapi ////////////////////////\n const KEY = '10161297457820113';\n\n var queryURL = `https://cors-anywhere.herokuapp.com/http://superheroapi.com/api.php/${KEY}/search/man`;\n // var queryURL = `https://cors-anywhere.herokuapp.com/http://superheroapi.com/api.php/10161297457820113/search/man`;\n // var queryURL = `http://superheroapi.com/api.php/${KEY}/search/man`;\n\n $.ajax({\n url: queryURL,\n method: \"GET\"\n }).then(function (response) {\n\n // Get the URL to the image into the cardsArray... twice!\n // note to [22,23,50,57] Numbers to avoid(no Imgs)????\n\n // Built carsArray with URL to character images\n for (let p = 0; p < pairs; p++) {\n\n // Generate random number between 1 and 63 - to randomize character image\n var index = Math.floor(Math.random() * 63) + 1;\n\n // Confirm the index is not one of th eones with missing images\n switch (index) {\n case 22:\n case 23:\n case 50:\n case 57:\n // Yup... no images for these indexes... try again.\n\n //console.log(\"Selected: \" + index + \" Trying again\");\n\n // Reduce the iteration variable so to get a new value\n p--;\n break;\n\n default:\n // For all other cases push the URL to the image into cardsArray... twice! \n cardsArray.push(response.results[index].image.url);\n cardsArray.push(response.results[index].image.url);\n break;\n }\n }\n\n // Randomize the positions of the cardsArray\n shuffleArray(cardsArray);\n\n // Show the BACK of the cards\n displayCards();\n });\n //////////////////////////////////////////////////////////////\n\n }", "function getNasaPhoto() {\n const parameters = {\n url: 'https://api.nasa.gov/planetary/apod',\n qs: {\n api_key: process.env.NASA_KEY\n },\n encoding: 'binary'\n }\n\n request.get(parameters, (err, response, body) => {\n if (err) console.log(err)\n else\n body = JSON.parse(body)\n saveFile(body, 'nasa.jpg')\n })\n}", "async function getCardImages(cards) {\n console.log('Getting card images');\n\n for (const card of cards) {\n const url = `https://www.ygoprodeck.com/pics/${card.id}.jpg`;\n // const imagePath = `scripts/images/${card.id}.jpg`;\n\n if (fs.existsSync(`scripts/images/${card.id}.jpg`)) {\n console.log('Not getting image for card ', card.id);\n continue;\n }\n\n try {\n const response = await Axios({\n method: 'GET',\n url,\n responseType: 'stream',\n });\n\n // pipe the result stream into a file on disc\n const path = `scripts/images/${card.id}.jpg`;\n response.data.pipe(fs.createWriteStream(path));\n\n // return a promise and resolve when download finishes\n await new Promise((resolve, reject) => {\n response.data.on('end', () => {\n resolve();\n });\n\n response.data.on('error', () => {\n reject();\n });\n });\n } catch (ex) {\n console.log(ex);\n }\n }\n}", "function downloadGif(event) {\r\n let firstMatch = false;\r\n let idGifToDownload = event.target.name;\r\n resultsListModal.map(async function (gif) {\r\n if (gif.id === idGifToDownload && !firstMatch) {\r\n firstMatch = true;\r\n let blob = await fetch(gif.images.downsized.url).then((img) => {\r\n img.blob().then((file) => {\r\n let a = document.createElement(\"a\");\r\n a.href = URL.createObjectURL(file);\r\n a.download = gif.title;\r\n a.click();\r\n });\r\n });\r\n }\r\n });\r\n}", "async function getNewImage() {\n let randomNumber = Math.floor(Math.random() * 10);\n return fetch(unsplashURL)\n .then((response) => response.json())\n .then((data) => {\n let allImages = data.results[randomNumber];\n return allImages.urls.regular;\n });\n}", "async function getImages(idsg) {\n return await Actions.find({ sgame: idsg })\n .sort('prog_nr')\n .select('group_photo')\n .lean();\n}", "function downloadPalette(){\n var x = activePalette;\n //check palette is ready for download\n if(palettes[x] && palettes[x].colours.length > 0)\n {\n if(palettes[x].bytes.length > 0)\n {\n //ready\n Utils.download(palettes[x].bytes,\"palette\"+x+\".bin\", \"text/plain\");\n }\n else\n {\n palettes[x].genBytes(function(data){\n Utils.download(data,\"palette\"+x+\".bin\", \"text/plain\");\n });\n }\n }\n else\n {\n alert(\"Something went wrong! This palette doesn't exist or has no colours.\");\n }\n\n}", "function GetRandomImage() {\n var files = imgAccess.GetImage();\n var filePath = util.ExtractFilePath(files);\n return (filePath);\n\n}", "function actionPdfToImage(url){\n\n\tvar remote = new Request.JSON({\n\t\turl: myPath+'ressource/lib/media.action.php',\n\t\tonComplete:function(r){\n\t\t//\tif(r.message != null) log_(r.message);\n\t\t//\tif(r.callBack != null) eval(r.callBack);\n\n\t\t\tif(r.success == true){\n\t\t\t\tfolderNav(folder);\n\t\t\t}\n\t\t}\n\t}).get({\n\t\t'action'\t: 'pdfToImage',\n\t\t'src'\t\t: url\n\t});\n\n}", "function getDogImage(chosenBreed) {\n let dogURL=`https://dog.ceo/api/breed/${chosenBreed}/images/random`;\n fetch(dogURL)\n .then(response => response.json())\n .then(responseJson => displayImage(responseJson, chosenBreed))\n .catch(error=>alert('Something is not working, please try again in a bit.'));\n }", "function FetchImages(){\n\t\n\tvar fiveHundred = \"https://api.500px.com/v1/photos?feature=fresh_day&sdk_key=7131207245727241ad25174950e82fc41cb572f3\";\n\t\n\t$.ajax({\n\t\ttype:\"GET\",\n\t\turl: fiveHundred,\n\t})\n\t.done(function(result){\n\t\tfor(var i = 0; i <result.photos.length; i++) {\t\t\n\t\t\timageArray.push(result.photos[i].image_url);\t\n\t\t}\n\t\t\n\t\t\n\t\t//console.log(imageArray.length);PASS\n\t\tConvertToColor(0);\n\t});\t\n}", "async function getImages() {\n var gallery = await getGallery();\n var featured = [];\n for (var i = 0; i < 5; i++) {\n featured.push(gallery.results[i].thumbs[1].src);\n }\n return featured;\n }", "function getImages(options) {\n var smoothen = options.smoothen;\n var isRgb = options.isRgb;\n var bounds = options.bounds;\n var start = options.start;\n var stop = options.stop;\n\n var bands = ['red', 'green', 'blue'];\n var bandsL8 = ['B6', 'B5', 'B3']\n var bandsL7 = ['B5', 'B4', 'B2']\n var bandsS2 = ['B11', 'B8', 'B3']\n\n if(isRgb) {\n bands = ['swir1', 'nir', 'green'];\n bandsL8 = ['B4', 'B3', 'B2']\n bandsL7 = ['B3', 'B2', 'B1']\n bandsS2 = ['B4', 'B3', 'B2']\n }\n \n var s2 = new ee.ImageCollection('COPERNICUS/S2').filterDate(start, stop).select(bandsL8, bands)\n if(bounds) {\n s2 = s2.filterBounds(bounds)\n }\n if(smoothen) {\n s2 = s2.map(function(i) { return i.resample('bicubic') });\n }\n s2 = s2.map(function(i) { return i.multiply(0.0001) });\n\n var l8 = new ee.ImageCollection('LANDSAT/LC08/C01/T1_TOA').filterDate(start, stop).select(bandsL8, bands);\n var l7 = new ee.ImageCollection('LANDSAT/LE07/C01/T1_RT_TOA').filterDate(start, stop).select(bandsL7, bands);\n var l5 = new ee.ImageCollection('LANDSAT/LT05/C01/T1_TOA').filterDate(start, stop).select(bandsL7, bands);\n var l4 = new ee.ImageCollection('LANDSAT/LT04/C01/T1_TOA').filterDate(start, stop).select(bandsL7, bands);\n\n //var images = ee.ImageCollection(l8.merge(l7).merge(l5).merge(l4).merge(s2))\n var images = ee.ImageCollection(l8.merge(l5).merge(l4).merge(s2))\n \n if(bounds) {\n images = images.filterBounds(bounds)\n }\n \n images = images\n .map(function(i) { return i.mask(i.gt(0.0001).and(i.lt(1)))}) // filter-out crappy TOA images\n\n if(smoothen) {\n images = images.map(function(i) { return i.resample('bicubic'); })\n }\n\n return images\n}", "function downloadPNG(){\r\n\tcrackPoint.remove();\r\n\tpaper.view.update();\r\n var canvas = document.getElementById(\"paperCanvas\");\r\n var downloadLink = document.createElement(\"a\");\r\n downloadLink.href = canvas.toDataURL(\"image/png;base64\");\r\n downloadLink.download = simText+'.png';\r\n document.body.appendChild(downloadLink);\r\n downloadLink.click();\r\n document.body.removeChild(downloadLink);\r\n\tcrackPoint.insertAbove(concreteObjects[concreteObjects.length-1]);\r\n}", "findMedalImage(medal) {\n const host = \"https://bungie.net/\";\n\n let iconPath = MedalsDefinition[medal].iconImage;\n let fullIconPath = host + iconPath;\n\n return (fullIconPath);\n }", "function fetchImg(){\n fetch(imgUrl)\n .then(resp => resp.json())\n .then(json => json.message.forEach(element => \n addImgToDom(element)\n ));\n}", "async WebGetImage(url) {\n var img = new Image();\n var p = new Promise((resolve, reject) => {\n img.onload = () => {\n resolve(img);\n };\n img.onerror = () => {\n reject();\n }\n });\n img.src = url;\n return p;\n }", "function downloadImage() {\n var data = canvas.toDataURL('image/png');\n download.href = data;\n }", "function fetchImg() {\n fetch(\"https://xkcd.now.sh/?comic=latest\")\n .then((response) => response.json())\n .then((data) => {\n console.log(data);\n img.src = data.img;\n })\n //logs if an error occurs\n .catch((err) => console.log(err));\n}", "function getGifURL() {\n\t\t// Empty array with URL of cards\n\t\tcardsArray = [];\n\n\t\t//////////////////////// superheroapi ////////////////////////\n\t\tconst KEY = \"10161297457820113\";\n\n\t\tvar queryURL = `https://superheroapi.com/api.php/${KEY}/search/man`;\n\t\t// var queryURL = `https://cors-anywhere.herokuapp.com/http://superheroapi.com/api.php/10161297457820113/search/man`;\n\t\t//var queryURL = `http://superheroapi.com/api.php/${KEY}/search/man`;\n\n\t\t$.ajax({\n\t\t\turl: queryURL,\n\t\t\tmethod: \"GET\",\n\t\t}).then(function (response) {\n\t\t\t// Get the URL to the image into the cardsArray... twice!\n\t\t\t// note to [22,23,50,57] Numbers to avoid(no Imgs)????\n\n\t\t\t// Built carsArray with URL to character images\n\t\t\tfor (let p = 0; p < pairs; p++) {\n\t\t\t\t// Generate random number between 1 and 63 - to randomize character image\n\t\t\t\tvar index = Math.floor(Math.random() * 63) + 1;\n\n\t\t\t\t// Confirm the index is not one of th eones with missing images\n\t\t\t\tswitch (index) {\n\t\t\t\t\tcase 22:\n\t\t\t\t\tcase 23:\n\t\t\t\t\tcase 50:\n\t\t\t\t\tcase 57:\n\t\t\t\t\t\t// Yup... no images for these indexes... try again.\n\n\t\t\t\t\t\t//console.log(\"Selected: \" + index + \" Trying again\");\n\n\t\t\t\t\t\t// Reduce the iteration variable so to get a new value\n\t\t\t\t\t\tp--;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// For all other cases push the URL to the image into cardsArray... twice!\n\t\t\t\t\t\tcardsArray.push(response.results[index].image.url);\n\t\t\t\t\t\tcardsArray.push(response.results[index].image.url);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Randomize the positions of the cardsArray\n\t\t\tshuffleArray(cardsArray);\n\n\t\t\t// Show the BACK of the cards\n\t\t\tdisplayCards();\n\t\t});\n\t\t//////////////////////////////////////////////////////////////\n\t}", "function getImageInfo() {\n\n}", "function downloadPng(ideo) {\n var ideoSvg = document.querySelector(ideo.selector);\n\n // Create a hidden canvas. This will contain the raster image to download.\n var canvas = document.createElement('canvas');\n var canvasId = '_ideo-undisplayed-dl-canvas';\n canvas.setAttribute('style', 'display: none');\n canvas.setAttribute('id', canvasId);\n var width = ideoSvg.width.baseVal.value + 30;\n canvas.setAttribute('width', width);\n document.body.appendChild(canvas);\n\n // Called after PNG image is created from data URL\n function triggerDownload(imgUrl) {\n var evt = new MouseEvent('click', {\n view: window,\n bubbles: false,\n cancelable: true\n });\n\n var a = document.createElement('a');\n a.setAttribute('download', 'ideogram.png');\n a.setAttribute('href', imgUrl);\n a.setAttribute('target', '_blank');\n\n // Enables easy testing\n a.setAttribute('id', '_ideo-undisplayed-dl-image-link');\n a.setAttribute('style', 'display: none;');\n document.body.appendChild(a);\n\n a.dispatchEvent(evt);\n }\n\n var canvas = document.getElementById(canvasId);\n\n // Enlarge canvas and disable smoothing, for higher resolution PNG\n canvas.width *= 2;\n canvas.height *= 2;\n var ctx = canvas.getContext('2d');\n ctx.setTransform(2, 0, 0, 2, 0, 0);\n ctx.imageSmoothingEnabled = false;\n\n var data = (new XMLSerializer()).serializeToString(ideoSvg);\n var domUrl = window.URL || window.webkitURL || window;\n\n var img = new Image();\n var svgBlob = new Blob([data], {type: 'image/svg+xml;charset=utf-8'});\n var url = domUrl.createObjectURL(svgBlob);\n\n img.onload = function() {\n ctx.drawImage(img, 0, 0);\n domUrl.revokeObjectURL(url);\n\n var imgUrl = canvas\n .toDataURL('image/png')\n .replace('image/png', 'image/octet-stream');\n\n triggerDownload(imgUrl);\n };\n\n img.src = url;\n}", "function getImage(imagename, imagesizetype) {\n return fetch(fetchMovieUrl)\n .then(\n function (response) {\n if (response.status !== 200) {\n alert('Looks like there was a problem. Status Code: ' +\n response.status);\n }\n return response.json().then(function (data) {\n baseUrl = data.images.base_url\n imagesize = data.images[imagesizetype][2];\n finalurl = baseUrl + imagesize + imagename;\n return finalurl;\n });\n }\n )\n .catch(function (err) {\n alert('Fetch Error :-S', err);\n });\n}", "_getPNGURIGenerator() {\n//------------------\n// Result: a function returning the URL generator for a given PNG\n// file name.\nreturn (pngName) => {\nvar pngEntry;\npngEntry = this.pngEntries[pngName];\n// Result: PNG URI generator for the given PNG file:\nreturn function(pngHandler) {\nif (pngEntry) {\n// Asynchronous delivery of PNG data.\npngEntry.getData(new zip.Data64URIWriter(\"image/png\"), (function(pngURI) {\nreturn pngHandler(pngURI);\n}));\n} else {\n// Asynchronous delivery of null PNG.\nsetTimeout((function() {\nreturn pngHandler(null);\n}), 0);\n}\nreturn void 0; // void result from PNG URI generator\n};\n};\n}", "function getDisplayImage(){\n //html2canvas実行\n html2canvas(document.getElementById(\"target\")).then(function(canvas) {\n downloadImage(canvas.toDataURL());\n });\n}", "async function getCats() {\n fetch('https://api.giphy.com/v1/gifs/translate?api_key=MA7ohxIYwTdEkW4gq9ieDD4NzeQmKE9k&s=cat', { mode: 'cors' })\n .then(response => {\n return response.json()\n })\n .then(response => {\n img1.src = response.data.images.original.url\n })\n}", "function fetchImageData() {\n // fetch request to the url\n // collect the image url info (if not copyright)\n // return that image url\n \n // Thank you, \n // https://stackoverflow.com/questions/55469230/set-header-in-http-geturl \n // https://www.w3schools.com/js/js_json_parse.asp\n let responseJSON = JSON.parse(\n http.getUrl(API_URL, null)\n );\n\n // Please disregard code style smh\n let date = responseJSON['date'];\n let explanation = responseJSON['explanation'];\n let hdurl = responseJSON['hdurl'];\n let media_type = responseJSON['media_type'];\n let service_version = responseJSON['service_version'];\n let title = responseJSON['title'];\n let url = responseJSON['url'];\n \n // If copyright === true, do not display image and instead display \n // copyright message\n // Additionally, prompt the user to visit the webpage\n let copyright = responseJSON['copyright'];\n \n // TODO Clicking on the image should just open the site u feel me\n if (copyright) {\n // Show a placeholder image\n hdurl = 'https://www.jpl.nasa.gov/spaceimages/images/largesize/PIA12567_hires.jpg';\n \n // Prompt the user to visit the webpage\n title = 'Please visit apod.nasa.gov to view today\\'s (copyrighted) content'\n }\n \n // TODO Add video media type handling\n // For now, prompt the user to visit the website to view the video\n // TODO Bixby has a native video player? YouTube URLs most likely...\n if (media_type === 'video') {\n // Show a placeholder image\n hdurl = 'https://www.jpl.nasa.gov/spaceimages/images/largesize/PIA12567_hires.jpg';\n \n // Prompt the user to visit the webpage\n title = 'Please visit apod.nasa.gov to view today\\'s video!'\n }\n\n // Thank you,\n // https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch\n// fetch(API_URL)\n// .then(function(response) {\n// return response.json();\n// })\n// .then(function(myJson) {\n// title = myJson['title'];\n// \n// return {\n// ImageTitle: title\n// };\n// });\n \n // ImageResult\n return {\n ImageDate: date,\n ImageExplanation: explanation,\n ImageHDUrl: hdurl,\n ImageMedia_Type: media_type,\n ImageService_Version: service_version,\n ImageTitle: title,\n ImageUrl: url\n }\n}", "function getPicture() {\n navigator.camera.getPicture(getPictureSuccess, getPictureError, {\n resQual: 50,\n destinationType: Camera.DestinationType.FILE_URI,\n correctOrientation: true\n })\n}", "function loadImagesSeq() {\n\t\t const button = document.querySelector('#loadImagesSeq');\n\t\t const container = document.querySelector('#image-container');\n\t\t const promises = [];\n\t\t button.addEventListener(\"click\", (event) => {\n\n\t\t const images = imageNames();\n\n\t\t images.forEach((image) => {\n\t\t promises.push(requestInSeq(image, container));\n\t\t });\n\t\t console.log(promises);\n\t\t // when all promises are resolved then this promise is resolved.\n\t\t Promise.all(promises).then((imageDataObjs) => {\n\t\t console.log(imageDataObjs);\n\t\t imageDataObjs.forEach((imageData) => {\n\t\t const imageElement = imageData.imageElement;\n\t\t const imageSrc = imageData.objectURL;\n\t\t imageElement.src = imageSrc;\n\t\t });\n\n\t\t });\n\t\t });\n\n\n\t\t}", "function preload(){\n getBcgImg();\n}", "function getAndDisplayGuideImage(){\n\tconsole.log('getAndDisplayGuideImage ran');\n\tgetAnimations(displayGuideImage);\n}", "async function getApiImages(name) {\n const url = `https://api.unsplash.com/photos/random/?query=${name}`;\n const images = axios\n .get(url, {\n headers: {\n \"Accept-Version\": \"v1\",\n Authorization: `Client-ID ${process.env.unSplashKey}`,\n },\n })\n .then((res) => {\n cache.name = res.data;\n cache.name.default = false;\n return cache.name;\n })\n .catch((error) => {\n const defaultResponse = {\n image: \"assets/images/brian-mcgowan-weY3ecoNSZw-unsplash.jpg\",\n default: true,\n };\n return defaultResponse;\n });\n return images;\n}", "function getMarsPic() {\n $.ajax({\n url: marsUrl + key,\n type: 'GET',\n dataType: 'json'\n }).done(function(r) {\n showMarsGallery(r);\n }).fail(function(error) {\n console.error(error);\n });\n }", "async function downloadGifos3(guardarFavorito) {\n\n let elementA = document.createElement('a');\n let response = await fetch(guardarFavorito.src);\n let file = await response.blob();\n elementA.download = 'newGif.gif';\n elementA.href = window.URL.createObjectURL(file);\n elementA.dataset.downloadurl = ['application/octet-stream', elementA.download, elementA.href].join(':');\n elementA.click();\n}", "function getImage(AURL, breed) {\n return new Promise((resolve, reject) => {\n caller.callAPI(AURL + breed).then((res) => {\n return parser.searchJSON(res, \"url\");\n }).then((url) => {\n let imgobj = {};\n imgobj[breed] = url;\n resolve(imgobj);\n }).catch((err) => {\n resolve(null);\n })\n });\n}", "async function getImage(url){\n const link = new URL(url)\n\n // local filesystem\n if (link.protocol === 'file:'){\n const filepath = path.resolve(path.normalize(url.replace('file://','')))\n return new Promise(function(resolve, reject){\n fs.readFile(filepath, (err, localImage)=>{\n if (err) reject(err)\n resolve(localImage)\n })\n })\n }\n\n // download from web\n const response = await fetch(link.href)\n const type = response.headers.get('Content-Type')\n if (type.includes('image/') || !type.includes('text/html'))\n return Buffer.from(await response.arrayBuffer())\n\n // parse html\n const { image } = scraper( link.href, await response.text() )\n if (!image)\n return null\n\n return Buffer.from( await (await fetch(image)).arrayBuffer() )\n}", "function getDataURI()\n {\n var canvas = document.createElement('canvas');\n var ctx = canvas.getContext( '2d' );\n Object.keys( imagesRack.loadedImages ).forEach( function( key ) {\n var rack = imagesRack.loadedImages[ key ];\n var bImg = rack.img;\n canvas.width = bImg.naturalWidth;\n canvas.height = bImg.naturalHeight;\n ctx.drawImage( bImg, 0, 0, canvas.width, canvas.height );\n rack.dataURI = canvas.toDataURL();\n });\n }", "function library(halaman)\n{\n navigator.camera.getPicture(onSuccess, onFail, {\n quality: 50,\n destinationType: Camera.DestinationType.FILE_URI,\n sourceType: Camera.PictureSourceType.PHOTOLIBRARY,\n encodingType: Camera.EncodingType.PNG,\n mediaType: Camera.MediaType.PICTURE,\n correctOrientation: true\n }); \n function onSuccess(imageData) { \n $$(\"#\"+ halaman +\"_propic\").attr('src', imageData);\n $$(\"#\"+ halaman +\"_propic\").css({'width':'100px', 'height':'100px'});\n }\n function onFail(message) { \n app.dialog.alert('Failed because: ' + message);\n }\n TutupModal('modgambar_' + halaman);\n}", "async function createImage( page, filename){\n await new Promise((resolve,reject)=>{\n scissors(filePath).range(page).pngStream(200)\n .pipe(fs.createWriteStream(\"./tmp/\" + filename))\n .on(\"close\", ()=>{ resolve() })\n .on(\"error\", (e)=>{ reject(e) });\n });\n }", "async function downloadImages()\n{\n if ( !await fileExists( `${advTitle}/images` ) ) {\n await fs.mkdir( `${advTitle}/images` );\n }\n\n let imgPath = `${advTitle}/images`;\n for ( let image of myImages ) {\n if ( !await fileExists( `${imgPath}/${image.img}` ) ) {\n console.log( ` download: image ${image.base}` );\n if ( image.url.match( /^http/ ) ) {\n\tawait downloadFile( image.url, `${imgPath}/${image.base}` );\n\tawait convertWebp( `${imgPath}/${image.base}`, `${imgPath}/${image.img}` );\n } else {\n\t// simply copy\n\tlet fname = findFullPath( image.url );\n\tawait fs.copyFile( fname, `${imgPath}/${image.base}` );\n\tawait convertWebp( `${imgPath}/${image.base}`, `${imgPath}/${image.img}` );\n }\n }\n }\n}", "function startDownload(){\n localStorage = window.localStorage;\n creations = JSON.parse(myLocalStorage.getItem(\"myOwnGifos\"));\n selectedGif = creations[creations.length - 1];\n downloadImage();\n}", "generateImages(){const fullDeferred=new $.Deferred;const thumbDeferred=new $.Deferred;const resolveFullBlob=blob=>fullDeferred.resolve(blob);const resolveThumbBlob=blob=>thumbDeferred.resolve(blob);const displayPicture=url=>{const image=new Image;image.src=url;// Generate thumb.\nconst maxThumbDimension=friendlyPix.Uploader.THUMB_IMAGE_SPECS.maxDimension;const thumbCanvas=friendlyPix.Uploader._getScaledCanvas(image,maxThumbDimension);thumbCanvas.toBlob(resolveThumbBlob,'image/jpeg',friendlyPix.Uploader.THUMB_IMAGE_SPECS.quality);// Generate full sized image.\nconst maxFullDimension=friendlyPix.Uploader.FULL_IMAGE_SPECS.maxDimension;const fullCanvas=friendlyPix.Uploader._getScaledCanvas(image,maxFullDimension);fullCanvas.toBlob(resolveFullBlob,'image/jpeg',friendlyPix.Uploader.FULL_IMAGE_SPECS.quality)};const reader=new FileReader;reader.onload=e=>displayPicture(e.target.result);reader.readAsDataURL(this.currentFile);return Promise.all([fullDeferred.promise(),thumbDeferred.promise()]).then(results=>{return{full:results[0],thumb:results[1]}})}", "function loadImageUrls() {\n let XMLHTTP = new XMLHttpRequest();\n XMLHTTP.open(\"GET\",\"https://mymultimediamememaker.herokuapp.com/get_backgrounds\");\n XMLHTTP.addEventListener(\"readystatechange\",function() {\n // Bei Erfolg:\n if (XMLHTTP.readyState == 4) {\n // wandle in JSON um\n const j = JSON.parse(XMLHTTP.response)\n memes = j;\n var length = memes.length;\n // wähle Bild aus wenn Bildliste nicht \"0\" ist.\n if(length != 0)\n document.getElementById(\"backImage\").src = memes[length-1].Url;\n }\n }, false);\n\n XMLHTTP.send(null);\n\n}", "function obtenerImagen(idNoticia) {\r\n var src=\"\"\r\n $.ajax({\r\n url: ENDPOINTIMAGES+$.md5(idNoticia)+\".jpg\",\r\n type: 'GET',\r\n async:false,\r\n success: function(data) {\r\n src=ENDPOINTIMAGES+$.md5(idNoticia)+\".jpg\";\r\n },\r\n error: function(data) {\r\n src=ENDPOINTIMAGES+\"default.jpg\";\r\n }\r\n });\r\n\r\n return src;\r\n }", "async function fetchFigmaComponents() {\n if (utils.$data.figma) {\n var componentArray = [];\n\n await apiRequest('/files/' + getFileKey(utils.$data.figma.url))\n .then(function (apiResponse) {\n // console.log(apiResponse);\n for (nodeID in apiResponse.components) {\n let component = {};\n\n if (nodeID.charAt(0) != '-') {\n component.nodeID = nodeID;\n component.title = formatName(apiResponse.components[nodeID].name);\n componentArray.push(component);\n }\n }\n }\n );\n\n await componentArray.forEach(function(component) {\n buildComponent(component);\n // console.log(\"Built \" + component.title);\n });\n\n } else {\n console.log(chalk.red('No Figma settings found!'));\n editFigmaSettings();\n }\n}", "function getImagery(aop) {\n var $screenshot = $('.screenshot');\n var $preview = $('.preview');\n var $phone = $('#feature-phone');\n \n for (var index = 0; index < $screenshot.length; index++) {\n $screenshot[index].src = \"https://s3.amazonaws.com/officite-eblast/2018-global/landingPage/screenshots/\" + aop + \"/0\" + [index + 1] + \".png\";\n $preview [index].src = \"https://s3.amazonaws.com/officite-eblast/2018-global/landingPage/screenshots/\" + aop + \"/0\" + [index + 1] + \".png\";\n }\n \n $phone.attr('src', 'https://s3.amazonaws.com/officite-eblast/2018-global/landingPage/screenshots/' + aop + '/' + aop + 'Phone.png')\n }", "function getPngs(converter, browser) {\n\tlogStep('Generating/copying in PNG files...')\n\tbrowserPngSizes[browser].forEach((size) => {\n\t\tconst pngPath = converter.getPngPath(size)\n\t\tconst basename = path.basename(pngPath)\n\t\tfse.copySync(pngPath, path.join(pathToBuild(browser), basename))\n\t})\n}", "function load_image(){\n\tvar url_string = window.location.href\n\tvar url = new URL(url_string);\n\tvar nasa_id = url.searchParams.get(\"nasa_id\");\n\t\n\tvar query = \"https://images-api.nasa.gov/asset/\" + nasa_id;\n\tvar result = httpGetAsync(query, large_image);\n}", "function scrapeimg(name,element){\n var globalurl;\n var scraperes = [];\n element.forEach(function(img){\n scraperes.push($(document).find(img));\n });\n var search=name.split(\"-\")[0].split(\"&\")[0].trim().split(\",\")[0].trim().split(\"ft.\")[0].trim().split(\"vs\")[0].trim().split(\"Ft.\")[0].trim().split(\"feat.\")[0].trim().split(\"Feat.\")[0].trim().split(' ').join('-');\n search = deUmlaut(search);\n var url = encodeURIComponent('https://genius.com/artists/' + search);\n ////console.log(search);\n ////console.log(url);\n ////////console.log(name);\n ////////console.log(search);\n ////////console.log(url);\n fetch(`https://api.allorigins.win/get?url=${url}`)\n .then(response => {\n if (response.ok) return response.json()\n throw new Error('Network response was not ok.')\n })\n .then(function(data){\n //var res = data.find();\n var base64;\n var quick = data.contents;\n ////////console.log(quick);\n var index = quick.search(\"user_avatar\");\n var quick = quick.substring(index,quick.lenght);\n index = quick.search(\"url\\\\('\");\n quick = quick.substring(index+5,quick.lenght);\n var imgurl = quick.split(\"'\")[0];\n //imgurl='https://api.allorigins.win/get?url=${url' + imgurl + '}';\n ////////console.log(imgurl);\n globalurl = imgurl;\n /*\n try{\n toDataURL(\n imgurl,\n function(dataUrl) {\n base64 = dataUrl;\n scraperes.forEach(image => {\n if(dataUrl){\n image.attr(\"src\",dataUrl);\n //console.log(\"base64\");\n }\n else{\n image.attr(\"src\",imgurl);\n //console.log(\"img source\");\n }\n\n }); \n });\n }\n catch(e){\n //console.log(\"getting dominant color failed\");\n }\n */\n scraperes.forEach( image => image.attr(\"src\",imgurl) ); \n //////console.log(scraperes);\n\n ////console.log(imgurl);\n //scraperes.each(function() {\n // $(this).prop(\"src\",imgurl))\n // $(this).children('.time').after($('.inner'));\n //});\n //$(scraperes).prop(\"src\",imgurl);\n });\n $(element[0])\n .on('load', function() { \n\n })\n .on('error', function(){\n setTimeout(function(){\n $(this).prop(\"src\",\"https://cdn.discordapp.com/attachments/331151226756530176/725817255484719124/AURFavicon.webp\");\n },5000);\n });\n}", "function preload(){\n M = loadImage(\"https://image.ibb.co/mYwzje/m.jpg\");\n}", "async function getPhoto(files){\n var rnd = Math.random().toString(36).substring(2, 9) + Math.random().toString(36).substring(2, 9);//salt\n return new Promise(function(resolve, reject){\n if (files) {\n files.map(file => {\n if(file.filename != \"\"){\n const saveTo = path.join(__dirname,\"/uploads/\" ,rnd + path.basename(file.filename))\n var face = \"http://157.245.127.122/\" + rnd + file.filename\n file.pipe(fs.createWriteStream(saveTo))\n resolve(face)\n }else{\n resolve(\"fuck\")\n }\n })}\n })\n}", "async function getCatts() {\n const response = await fetch('https://api.giphy.com/v1/gifs/translate?api_key=MA7ohxIYwTdEkW4gq9ieDD4NzeQmKE9k&s=cat', { mode: 'cors' })\n response.json().then(response => {\n img2.src = response.data.images.original.url\n })\n}", "function onGetPNGPalette() {\r\n \r\n}", "function main(){\n preloadExternalPage(getUrl())\n .then(getScreenCapture)\n .then(function(stream){\n return showExternalPage(200).then(function(){ return stream; }); // show the page for at least 200 ms\n })\n .then(getImageFromStream)\n .then(function(image){\n removeExternalPage();\n return image;\n })\n .then(function(image){\n return analyzeImageText(image, getKeywords())\n })\n .then(showResults)\n .catch(console.error);\n}", "function getDogImage(dogNum) {\n fetch(`https://dog.ceo/api/breeds/image/random/${dogNum}`)\n .then(response => response.json())\n .then(responseJson => console.log(responseJson))\n .catch(error => alert('Something went wrong. Try again later.'));\n}", "function obtainExternalPhotos() {\n const random = Math.floor(Math.random() * (paths.length));\n const pathImage = path.join(__dirname, \"../images/\" + paths[random])\n return pathImage;\n}", "async function fetchPicture(req, res) {\n try {\n let location = encodeURIComponent(req.body.location);\n let response = await fetch(`https://pixabay.com/api/?key=XXXX&q=${location}&per_page=25&image_type=photo`);\n let data = await response.json();\n res.status(200).send(data);\n } catch (error) {\n console.log(error);\n res.status(400).send(error);\n }\n}", "async setImage() {\n try {\n if (this.hasProperty(this.parsedMessage, \"metadata\")) {\n const metadata = this.parsedMessage.metadata;\n const injectedObject = metadata[\"@injected\"];\n if (\n injectedObject &&\n this.hasProperty(injectedObject, \"extensions\")\n ) {\n const extensionsObject = injectedObject[\"extensions\"];\n if (\n extensionsObject &&\n this.hasProperty(extensionsObject, \"thumbnail-generation\")\n ) {\n const thumbnailGenerationObject =\n extensionsObject[\"thumbnail-generation\"];\n\n const imageToDownload = this.chooseImage(\n thumbnailGenerationObject\n );\n\n try {\n const response = await this.downloadImage(imageToDownload);\n const url = URL.createObjectURL(response);\n let img = new Image();\n img.src = url;\n img.onload = () => (this.imageUrl = img.src);\n } catch (error) {\n logger(\"error\", error);\n }\n }\n }\n } else {\n let img = new Image();\n img.src = this.parsedMessage.data.url;\n img.onload = () => (this.imageUrl = img.src);\n }\n } catch (error) {\n logger(\"error\", error);\n }\n }", "function query_random_image_from_unsplash(){\n read_dom();\n\n fetch('https://api.unsplash.com/photos/random/?client_id=632c1d73955fbf286b85e73d858e8f82a583655b90426b2d914810912474a180&w=1920&h=1080')\n .then((response) => response.json())\n .then(function(response_json){\n inject_image_into_background(response_json.urls.custom)\n inject_unsplash_info_links(\n response_json.user.name, \n response_json.user.links.html\n );\n })\n .catch(function(error){\n console.log(error);\n });\n}", "precargar(){\r\n this.gif = this.app.createImg('./Recursos/Balon.gif');\r\n this.gif.size(95, 95);\r\n }", "async function descargarFotos() {\n let arreglofotos = []\n for (let i = 0; i < props.url.length; i++) {\n let storageRef = storage.refFromURL(props.url[i])\n await storageRef.getDownloadURL().then(direc => {\n arreglofotos.push(direc)\n }).catch((error) => {\n console.log(\"ERROR: \" + error)\n })\n }\n setFotos(arreglofotos)\n }", "downloadPNGs()\n {\n\t\t\n var directory = this.dir;\n\t\t\n\t\t//Get HTML from URL provided\n https.get(this.url, function(response)\n {\n parseResponse(response);\n })\n\n var parseResponse = function(response)\n {\n\t\t\t//Concatenate site HTML\n var data = \"\";\n response.on('data', function(chunk)\n {\n data += chunk;\n });\n var count = 0;\n var imgPaths = [];\n response.on('end', function(chunk)\n {\n\t\t\t\t//Initialize HTMLParser\n var parsedData = new htmlparser.Parser(\n {\n onattribute: function(name, value)\n {\n\t\t\t\t\t\t//Check src tags to check if the source image is a .png file\n if (name === \"src\" && value.substr(value.length - 3) === \"png\")\n {\n imgPaths.push(value);\n count++;\n }\n },\n onend: function()\n {\n console.log('Downloading...');\n }\n },\n {\n decodeEntities: true\n });\n parsedData.write(data);\n parsedData.end();\n\n var file;\n var fileName;\n var download;\n\n\t\t\t\t//Create function to download image\n\t\t\t\tdownload = function(uri, filename, callback)\n {\n request(uri).pipe(fs.createWriteStream(filename)).on('close', callback);\n };\n\t\t\t\t\n\t\t\t\t//Loop to download all images in url to local directory\n for (var i = 0; i < imgPaths.length ; i++)\n {\n\t\t\t\t\t//Split to get the last part of the image path(fileName)\n fileName = imgPaths[i].split('/');\n file = fs.createWriteStream(directory + \"/\" + fileName[fileName.length - 1]);\n\t\t\t\t\t\n download(imgPaths[i], directory + \"/\" + fileName[fileName.length - 1], function(){});\n }\n\t\t\t\t//Display amount of images as well as the directory downloaded to\n\t\t\t\tconsole.log( count + ' png images saved to : ' + directory);\n });\n }\n }", "async GET_IMAGES() {\n const user = state.currentUser;\n if (!user.odors)\n throw new Error(\n `User ${user.id} has no odors listed in Firebase profile`\n );\n\n const odorNames = Object.keys(user.odors).map((name) => ({ name }));\n if (!user.studyArm || user.studyArm !== \"photo\") return odorNames;\n\n // Get random image from any number of <odor>_<number>.jpg named files in Google Cloud storage\n const storage = initializedApp.storage();\n for (let i = 0; i < odorNames.length; i++) {\n const url = process.env.VUE_APP_STORAGE_URL;\n const name = odorNames[i].name.replace(/ /g, \"\").toLowerCase();\n const imgPath = `${url}/${name}-${getRand(name)}.jpg`;\n odorNames[i].src = await storage.refFromURL(imgPath).getDownloadURL();\n }\n return odorNames;\n }", "function fetchGif(searchTerm) {\n // This sets up our Giphy search with the given searchTerm.\n let query = `${url}?api_key=${apiKey}&q=${searchTerm}&limit=1`;\n\n // Fetch the data from the Giphy API...\n window.fetch(query).then(data => {\n return data.json();\n\n // Then try to turn the response into valid JSON...\n }).then(json => {\n // Then get the correct URL from the JSON and pass it to createImage.\n let results = json.data;\n let result = results[0];\n let imageUrl = result.images.downsized.url;\n createImage(imageUrl);\n });\n}", "function getFlickrImg(urlGallery){\n let url = `https://www.flickr.com/services/rest/?method=flickr.galleries.getPhotos&api_key=${keyAPI}&gallery_id=${urlGallery}&format=json&nojsoncallback=1?secret=${keySecret}`;\n\n// Fetching the data from the selected url\nfetch(url)\n.then(function (response) {\n if (response.status >= 200 && response.status < 300) {\n return response.json();\n // Shows an error alert and throws the error to the error handler\n } else {\n throw 'An error occured'\n }\n})\n.then(\n function (data) {\n console.log(data)\n\n // Getting the total number of photos from data\n let total = data.photos.total;\n\n // Creating array for the memory cards\n let cardDeck = []; \n\n // Creating a loop for getting the photos two times\n for (let i = 0; i<2; i++){ \n\n //Creating a loop for putting the photos inside the 'cardDeck'-array\n for (let j = 0; j < total; j++){ \n\n // Collecting the data from API\n let id = data.photos.photo[j].id;\n let serverId = data.photos.photo[j].server;\n let secret = data.photos.photo[j].secret;\n \n // Creating an instance object for 'Card'\n let card = new Card(j, serverId, id, secret);\n\n // Pushing the cards to the 'cardDeck'-array\n cardDeck.push(card);\n\n\n }\n }\n // Mixing the 'cardDeck' randomly\n cardDeck.sort( (a, b) => 0.5 - Math.random() ); \n\n // Creating a loop for creating a memory card for every photo\n for (let i = 0; i < cardDeck.length; i++){\n let memoryCard = document.createElement('aside');\n // \n memoryCard.dataset.num = cardDeck[i].imageNumber;\n memoryCard.classList.add('card', 'card-hidden');\n memoryCard.style.backgroundImage = `url(${cardDeck[i].imageLink()})`;\n gameWrap.appendChild(memoryCard);\n };\n\n // select the cards\n const card = document.querySelectorAll('aside');\n // make varibels for fliping the cards \n let hasFlippedCard = false;\n let firstCard, secondCard;\n let score = 1;\n let tries = 1;\n // varible for locke the board and fix the bugs \n let lockBoard = false;\n //function for flipping the cards\n function flipCard() {\n //we need to lock the board to avoid two sets of cards being turned at the same time, otherwise the flipping will fail.\n if (lockBoard) return;\n //There is still the case where the player can click twice on the same card. The matching condition would evaluate to true, removing the event listener from that card.\n if(this === firstCard) return;\n this.classList = '';\n this.classList.add('card');\n if (!hasFlippedCard) {\n hasFlippedCard = true;\n firstCard = this;\n }else{\n hasFlippedCard = false;\n secondCard = this;\n \n\n // if statment for matching cards\n if (firstCard.dataset.num === secondCard.dataset.num){\n firstCard.removeEventListener('click', flipCard)\n secondCard.removeEventListener('click', flipCard)\n let scoreCounter = document.querySelector('.score');\n scoreCounter.innerHTML = `Pairs found: ${score} / 12`\n score++;\n console.log(score)\n let triesCounter = document.querySelector('.tries');\n triesCounter.innerHTML = `Tries: ${tries}`\n tries++;\n } else{\n //When the player clicks the second card, lockBoard will be set to true and the condition if (lockBoard) return; will prevent any card flipping before the cards are hidden or match\n lockBoard=true;\n setTimeout(function(){\n firstCard.classList.add('card-hidden')\n secondCard.classList.add('card-hidden')\n let triesCounter = document.querySelector('.tries');\n triesCounter.innerHTML = `Tries: ${tries}`\n tries++;\n lockBoard=false;\n }, 1000);\n }\n }\n // Shows an alert with numbers of tries, when completing the game \n if (score === 13) {\n setTimeout(function(){\n alert(`Congratulations! You completed the game with ${tries-1} tries`);\n }, 500);\n }\n }\n\n \n \n card.forEach(card => card.addEventListener('click', flipCard));\n }\n // Catchese the error thrown in the respons function\n).catch(\n error => {\n console.log('Fel: ', error);\n\n }\n);\n}", "function retrocederFoto() {\r\n // se incrementa el indice (posicionActual)\r\n\r\n // ...y se muestra la imagen que toca.\r\n }", "function image_result_streamization() {\r\n \r\n}", "async function downloadBackground() {\n let searchQuery = document.getElementsByClassName('search-query')[0].value.trim();\n let urlImage = `https://api.unsplash.com/photos/random?orientation=landscape&per_page=1&query=town&${searchQuery}&client_id=e34189ae187e8dc5d9267764526130431bca2accce797c8784643857a532d8fd`;\n\n let response = await fetch(urlImage);\n if (response.ok) {\n let answer = await response.json();\n\n let bodyElement = document.getElementsByTagName(\"body\")[0];\n bodyElement.setAttribute(\"style\", \"background-image: url('\" + answer.urls.full + \"')\");\n } else {\n alert(\"Ошибка HTTP: \" + response.status);\n }\n\n determineСurrentTemperature(searchQuery);\n}", "function getImage(name) {\n const image = images[name];\n\n if (image.includes('https')) return image;\n\n return imageMap[image];\n }", "function GETAll (app) {\n return app.$axios.$get(\n 'oferta'\n ).then(oferta => {\n return imagecontroller.GETAll(app).then(imagen => {\n let imagenes = {}\n oferta.data.forEach(offer => {\n imagenes[offer.IDEN_PUBLICACION] = imagen.imagen.data.find(img => img.IDEN_PUBLICACION === offer.IDEN_PUBLICACION)\n })\n return {\n offers: oferta.data,\n images: imagenes\n }\n })\n }).catch(errors => {\n console.log(errors)\n })\n}", "async function getCameraInfo() {\n let res = await fetch(url);\n let data = await res.json();\n data.map((camera) => displayAllCameras(camera));\n}" ]
[ "0.66665214", "0.6033683", "0.6020922", "0.6012707", "0.60096014", "0.60054624", "0.5959849", "0.5909616", "0.5904622", "0.58940345", "0.58809626", "0.58610386", "0.5841207", "0.58067113", "0.5760935", "0.5748609", "0.57395506", "0.5739411", "0.57222533", "0.5695491", "0.56879926", "0.56612706", "0.5652097", "0.56507033", "0.5640499", "0.56212735", "0.5604773", "0.5599013", "0.55795395", "0.55735433", "0.55362517", "0.5525487", "0.5522637", "0.55218595", "0.55214435", "0.55196655", "0.55086315", "0.5504538", "0.54999983", "0.5498869", "0.5494646", "0.548803", "0.54829127", "0.54792655", "0.5475046", "0.54702276", "0.5469632", "0.5469348", "0.5467656", "0.54655737", "0.5461171", "0.5447116", "0.5442304", "0.5441957", "0.54405934", "0.5434712", "0.5434609", "0.54345095", "0.54194933", "0.5418794", "0.54146385", "0.54125136", "0.54120684", "0.5410718", "0.54088134", "0.5405212", "0.54021096", "0.54019564", "0.53883076", "0.53846276", "0.5382779", "0.537651", "0.53736645", "0.5372405", "0.5370546", "0.536902", "0.53670406", "0.53626204", "0.536099", "0.5360381", "0.5360285", "0.5355795", "0.53487974", "0.5343429", "0.5343306", "0.5335792", "0.5325713", "0.5321445", "0.5318653", "0.531775", "0.5316051", "0.53105634", "0.53032625", "0.53027105", "0.5296013", "0.52888864", "0.5287909", "0.5284531", "0.52824676", "0.5279894", "0.5276243" ]
0.0
-1
getComputedStyle is preferred here because it preserves subpixel values, while jQuery's .width() rounds to an integer.
function setWidth() { var width; var style = window.getComputedStyle ? window.getComputedStyle(ta, null) : null; if (style) { width = parseFloat(style.width); if (style.boxSizing === 'border-box' || style.webkitBoxSizing === 'border-box' || style.mozBoxSizing === 'border-box') { $.each(['paddingLeft', 'paddingRight', 'borderLeftWidth', 'borderRightWidth'], function(i,val){ width -= parseFloat(style[val]); }); } } else { width = $ta.width(); } mirror.style.width = Math.max(width,0) + 'px'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _getComputedStyle(el, style) {\n var computedStyle;\n if (typeof el.currentStyle != 'undefined') {\n computedStyle = el.currentStyle;\n } else {\n // In case of Firefox throwing\n // \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMWindow.getComputedStyle]\".\n try {\n computedStyle = getComputedStyle(el, null)\n } catch (e) {\n return undefined;\n }\n }\n\n return computedStyle[style];\n }", "function getCssWidth(childSelector) {\n return 100 * $(childSelector).width() / $(childSelector).offsetParent().width();\n}", "function getElementWidth(element) {\n // Optimization: Check style.width first as we probably set it already before reading\n // offsetWidth which triggers layout.\n return coercePixelsFromCssValue(element.style.width) || element.offsetWidth;\n }", "_getComputedStyle(_elem, _key) {\n return document\n .defaultView\n .getComputedStyle(_elem, null)\n .getPropertyValue(_key);\n }", "_getComputedStyle(_elem, _key) {\n return document\n .defaultView\n .getComputedStyle(_elem, null)\n .getPropertyValue(_key);\n }", "function getWidth(self) {\r\n return (\r\n parseInt(self.clientWidth) -\r\n parseInt(window.getComputedStyle(self).getPropertyValue(\"padding-left\")) -\r\n parseInt(window.getComputedStyle(self).getPropertyValue(\"padding-right\"))\r\n );\r\n}", "function i(t){return getComputedStyle(t)}", "function i(t){return getComputedStyle(t)}", "function i(t){return getComputedStyle(t)}", "function i(e){return getComputedStyle(e)}", "getWidth() {\n return this._executeAfterInitialWait(() => this.currently.getWidth());\n }", "function r(t){return getComputedStyle(t)}", "function r(t){return getComputedStyle(t)}", "function r(t){return getComputedStyle(t)}", "function r(t){return getComputedStyle(t)}", "function xGetComputedStyle(oEle, sProp, bInt)\r\n{\r\n var s, p = 'undefined';\r\n var dv = document.defaultView;\r\n if(dv && dv.getComputedStyle){\r\n s = dv.getComputedStyle(oEle,'');\r\n if (s) p = s.getPropertyValue(sProp);\r\n }\r\n else if(oEle.currentStyle) {\r\n // convert css property name to object property name for IE\r\n var i, c, a = sProp.split('-');\r\n sProp = a[0];\r\n for (i=1; i<a.length; ++i) {\r\n c = a[i].charAt(0);\r\n sProp += a[i].replace(c, c.toUpperCase());\r\n }\r\n p = oEle.currentStyle[sProp];\r\n }\r\n else return null;\r\n return bInt ? (parseInt(p) || 0) : p;\r\n}", "function f_clientWidth() {\n\treturn $(window).width();\n}", "function r(e){return getComputedStyle(e)}", "function r(e){return getComputedStyle(e)}", "function r(e){return getComputedStyle(e)}", "function r(e){return getComputedStyle(e)}", "function r(e){return getComputedStyle(e)}", "function r(e){return getComputedStyle(e)}", "function r(e){return getComputedStyle(e)}", "function r(e){return getComputedStyle(e)}", "function r(e){return getComputedStyle(e)}", "function styleWidth(elem, x){\n elem.style.width=x;\n}", "function get(element){return getComputedStyle(element)}", "function n(e){return getComputedStyle(e)}", "function dim(el, key) {\r\n\t\tvar v = parseInt(el.css(key), 10);\r\n\t\tif (v) { return v; }\r\n\t\tvar s = el[0].currentStyle; \r\n\t\treturn s && s.width && parseInt(s.width, 10);\t\r\n\t}", "function dim(el, key) {\r\n\t\tvar v = parseInt(el.css(key), 10);\r\n\t\tif (v) { return v; }\r\n\t\tvar s = el[0].currentStyle; \r\n\t\treturn s && s.width && parseInt(s.width, 10);\t\r\n\t}", "function lisha_get_el_offsetWidth(el)\r\n{\r\n\treturn document.getElementById(el).offsetWidth;\r\n}", "function a(t){return getComputedStyle(t)}", "function getStyles( elem ) {\n return window.getComputedStyle( elem, null );\n}", "function rc(e){return getComputedStyle(e)}", "function dim(el, key) {\n\t\tvar v = parseInt(el.css(key), 10);\n\t\tif (v) { return v; }\n\t\tvar s = el[0].currentStyle; \n\t\treturn s && s.width && parseInt(s.width, 10);\t\n\t}", "function dim(el, key) {\nvar v = parseInt(el.css(key), 10);\nif (v) { return v; }\nvar s = el[0].currentStyle;\nreturn s && s.width && parseInt(s.width, 10);\t\n}", "function s(e){return getComputedStyle(e)}", "function getComputedStyles(elem) {\n return ownerDocument(elem).defaultView.getComputedStyle(elem, null);\n}", "function getCardWidth() {\r\n return (newsCardWidth = newsCards[0].getBoundingClientRect().width);\r\n}", "function computePropertyValue (element, property) {\n\t\t /* When box-sizing isn't set to border-box, height and width style values are incorrectly computed when an\n\t\t element's scrollbars are visible (which expands the element's dimensions). Thus, we defer to the more accurate\n\t\t offsetHeight/Width property, which includes the total dimensions for interior, border, padding, and scrollbar.\n\t\t We subtract border and padding to get the sum of interior + scrollbar. */\n\t\t var computedValue = 0;\n\t\t\n\t\t /* IE<=8 doesn't support window.getComputedStyle, thus we defer to jQuery, which has an extensive array\n\t\t of hacks to accurately retrieve IE8 property values. Re-implementing that logic here is not worth bloating the\n\t\t codebase for a dying browser. The performance repercussions of using jQuery here are minimal since\n\t\t Velocity is optimized to rarely (and sometimes never) query the DOM. Further, the $.css() codepath isn't that slow. */\n\t\t if (IE <= 8) {\n\t\t computedValue = $.css(element, property); /* GET */\n\t\t /* All other browsers support getComputedStyle. The returned live object reference is cached onto its\n\t\t associated element so that it does not need to be refetched upon every GET. */\n\t\t } else {\n\t\t /* Browsers do not return height and width values for elements that are set to display:\"none\". Thus, we temporarily\n\t\t toggle display to the element type's default value. */\n\t\t var toggleDisplay = false;\n\t\t\n\t\t if (/^(width|height)$/.test(property) && CSS.getPropertyValue(element, \"display\") === 0) {\n\t\t toggleDisplay = true;\n\t\t CSS.setPropertyValue(element, \"display\", CSS.Values.getDisplayType(element));\n\t\t }\n\t\t\n\t\t function revertDisplay () {\n\t\t if (toggleDisplay) {\n\t\t CSS.setPropertyValue(element, \"display\", \"none\");\n\t\t }\n\t\t }\n\t\t\n\t\t if (!forceStyleLookup) {\n\t\t if (property === \"height\" && CSS.getPropertyValue(element, \"boxSizing\").toString().toLowerCase() !== \"border-box\") {\n\t\t var contentBoxHeight = element.offsetHeight - (parseFloat(CSS.getPropertyValue(element, \"borderTopWidth\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"borderBottomWidth\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"paddingTop\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"paddingBottom\")) || 0);\n\t\t revertDisplay();\n\t\t\n\t\t return contentBoxHeight;\n\t\t } else if (property === \"width\" && CSS.getPropertyValue(element, \"boxSizing\").toString().toLowerCase() !== \"border-box\") {\n\t\t var contentBoxWidth = element.offsetWidth - (parseFloat(CSS.getPropertyValue(element, \"borderLeftWidth\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"borderRightWidth\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"paddingLeft\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"paddingRight\")) || 0);\n\t\t revertDisplay();\n\t\t\n\t\t return contentBoxWidth;\n\t\t }\n\t\t }\n\t\t\n\t\t var computedStyle;\n\t\t\n\t\t /* For elements that Velocity hasn't been called on directly (e.g. when Velocity queries the DOM on behalf\n\t\t of a parent of an element its animating), perform a direct getComputedStyle lookup since the object isn't cached. */\n\t\t if (Data(element) === undefined) {\n\t\t computedStyle = window.getComputedStyle(element, null); /* GET */\n\t\t /* If the computedStyle object has yet to be cached, do so now. */\n\t\t } else if (!Data(element).computedStyle) {\n\t\t computedStyle = Data(element).computedStyle = window.getComputedStyle(element, null); /* GET */\n\t\t /* If computedStyle is cached, use it. */\n\t\t } else {\n\t\t computedStyle = Data(element).computedStyle;\n\t\t }\n\t\t\n\t\t /* IE and Firefox do not return a value for the generic borderColor -- they only return individual values for each border side's color.\n\t\t Also, in all browsers, when border colors aren't all the same, a compound value is returned that Velocity isn't setup to parse.\n\t\t So, as a polyfill for querying individual border side colors, we just return the top border's color and animate all borders from that value. */\n\t\t if (property === \"borderColor\") {\n\t\t property = \"borderTopColor\";\n\t\t }\n\t\t\n\t\t /* IE9 has a bug in which the \"filter\" property must be accessed from computedStyle using the getPropertyValue method\n\t\t instead of a direct property lookup. The getPropertyValue method is slower than a direct lookup, which is why we avoid it by default. */\n\t\t if (IE === 9 && property === \"filter\") {\n\t\t computedValue = computedStyle.getPropertyValue(property); /* GET */\n\t\t } else {\n\t\t computedValue = computedStyle[property];\n\t\t }\n\t\t\n\t\t /* Fall back to the property's style value (if defined) when computedValue returns nothing,\n\t\t which can happen when the element hasn't been painted. */\n\t\t if (computedValue === \"\" || computedValue === null) {\n\t\t computedValue = element.style[property];\n\t\t }\n\t\t\n\t\t revertDisplay();\n\t\t }\n\t\t\n\t\t /* For top, right, bottom, and left (TRBL) values that are set to \"auto\" on elements of \"fixed\" or \"absolute\" position,\n\t\t defer to jQuery for converting \"auto\" to a numeric value. (For elements with a \"static\" or \"relative\" position, \"auto\" has the same\n\t\t effect as being set to 0, so no conversion is necessary.) */\n\t\t /* An example of why numeric conversion is necessary: When an element with \"position:absolute\" has an untouched \"left\"\n\t\t property, which reverts to \"auto\", left's value is 0 relative to its parent element, but is often non-zero relative\n\t\t to its *containing* (not parent) element, which is the nearest \"position:relative\" ancestor or the viewport (and always the viewport in the case of \"position:fixed\"). */\n\t\t if (computedValue === \"auto\" && /^(top|right|bottom|left)$/i.test(property)) {\n\t\t var position = computePropertyValue(element, \"position\"); /* GET */\n\t\t\n\t\t /* For absolute positioning, jQuery's $.position() only returns values for top and left;\n\t\t right and bottom will have their \"auto\" value reverted to 0. */\n\t\t /* Note: A jQuery object must be created here since jQuery doesn't have a low-level alias for $.position().\n\t\t Not a big deal since we're currently in a GET batch anyway. */\n\t\t if (position === \"fixed\" || (position === \"absolute\" && /top|left/i.test(property))) {\n\t\t /* Note: jQuery strips the pixel unit from its returned values; we re-add it here to conform with computePropertyValue's behavior. */\n\t\t computedValue = $(element).position()[property] + \"px\"; /* GET */\n\t\t }\n\t\t }\n\t\t\n\t\t return computedValue;\n\t\t }", "function xGetComputedStyle(e, p, i)\n{\n if(!(e=xGetElementById(e))) return null;\n var s, v = 'undefined', dv = document.defaultView;\n if(dv && dv.getComputedStyle){\n s = dv.getComputedStyle(e,'');\n if (s) v = s.getPropertyValue(p);\n }\n else if(e.currentStyle) {\n v = e.currentStyle[xCamelize(p)];\n }\n else return null;\n return i ? (parseInt(v) || 0) : v;\n}", "function xGetComputedStyle(e, p, i)\n{\n if(!(e=xGetElementById(e))) return null;\n var s, v = 'undefined', dv = document.defaultView;\n if(dv && dv.getComputedStyle){\n s = dv.getComputedStyle(e,'');\n if (s) v = s.getPropertyValue(p);\n }\n else if(e.currentStyle) {\n v = e.currentStyle[xCamelize(p)];\n }\n else return null;\n return i ? (parseInt(v) || 0) : v;\n}", "function a(e){return getComputedStyle(e)}", "function n(t){return getComputedStyle(t)}", "function n(t){return getComputedStyle(t)}", "function n(t){return getComputedStyle(t)}", "function n(t){return getComputedStyle(t)}", "function n(t){return getComputedStyle(t)}", "function n(t){return getComputedStyle(t)}", "function sz(el, p) { \n return parseInt($.css(el,p))||0; \n}", "function computeStyleTests(){div.style.cssText= // Support: Firefox<29, Android 2.3\n// Vendor-prefix box-sizing\n\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;\"+\"position:relative;display:block;\"+\"margin:auto;border:1px;padding:1px;\"+\"top:1%;width:50%\";div.innerHTML=\"\";documentElement.appendChild(container);var divStyle=window.getComputedStyle(div);pixelPositionVal=divStyle.top!==\"1%\";reliableMarginLeftVal=divStyle.marginLeft===\"2px\";boxSizingReliableVal=divStyle.width===\"4px\"; // Support: Android 4.0 - 4.3 only\n// Some styles come back with percentage values, even though they shouldn't\ndiv.style.marginRight=\"50%\";pixelMarginRightVal=divStyle.marginRight===\"4px\";documentElement.removeChild(container);}", "function get(n){return getComputedStyle(n)}", "async function getElementWidth(selector) {\n const elementStyle = await page.evaluate(sel => {\n const element = document.querySelector(sel);\n return JSON.parse(JSON.stringify(getComputedStyle(element)));\n }, selector);\n return parseInt(elementStyle.width);\n }", "function computeStyleTests() {\r\n\t\tdiv.style.cssText =\r\n\r\n\t\t\t// Support: Firefox<29, Android 2.3\r\n\t\t\t// Vendor-prefix box-sizing\r\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;\" +\r\n\t\t\t\"position:relative;display:block;\" +\r\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\r\n\t\t\t\"top:1%;width:50%\";\r\n\t\tdiv.innerHTML = \"\";\r\n\t\tdocumentElement.appendChild( container );\r\n\r\n\t\tvar divStyle = window.getComputedStyle( div );\r\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\r\n\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\r\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\r\n\r\n\t\t// Support: Android 4.0 - 4.3 only\r\n\t\t// Some styles come back with percentage values, even though they shouldn't\r\n\t\tdiv.style.marginRight = \"50%\";\r\n\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\r\n\r\n\t\tdocumentElement.removeChild( container );\r\n\t}", "function computeStyleTests(){div.style.cssText= // Support: Firefox<29, Android 2.3\n\t// Vendor-prefix box-sizing\n\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;\"+\"position:relative;display:block;\"+\"margin:auto;border:1px;padding:1px;\"+\"top:1%;width:50%\";div.innerHTML=\"\";documentElement.appendChild(container);var divStyle=window.getComputedStyle(div);pixelPositionVal=divStyle.top!==\"1%\";reliableMarginLeftVal=divStyle.marginLeft===\"2px\";boxSizingReliableVal=divStyle.width===\"4px\"; // Support: Android 4.0 - 4.3 only\n\t// Some styles come back with percentage values, even though they shouldn't\n\tdiv.style.marginRight=\"50%\";pixelMarginRightVal=divStyle.marginRight===\"4px\";documentElement.removeChild(container);}", "function computePropertyValue (element, property) {\n /* When box-sizing isn't set to border-box, height and width style values are incorrectly computed when an element's scrollbars are visible (which expands the element's dimensions). Thus, we defer\n to the more accurate offsetHeight/Width property, which includes the total dimensions for interior, border, padding, and scrollbar. We subtract border and padding to get the sum of interior + scrollbar. */\n if (!forceStyleLookup) {\n if (property === \"height\" && CSS.getPropertyValue(element, \"boxSizing\").toLowerCase() !== \"border-box\") {\n return element.offsetHeight - (parseFloat(CSS.getPropertyValue(element, \"borderTopWidth\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"borderBottomWidth\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"paddingTop\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"paddingBottom\")) || 0);\n } else if (property === \"width\" && CSS.getPropertyValue(element, \"boxSizing\").toLowerCase() !== \"border-box\") {\n return element.offsetWidth - (parseFloat(CSS.getPropertyValue(element, \"borderLeftWidth\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"borderRightWidth\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"paddingLeft\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"paddingRight\")) || 0);\n }\n }\n\n var computedValue = 0;\n\n /* IE<=8 doesn't support window.getComputedStyle, thus we defer to jQuery, which has an extensive array of hacks to accurately retrieve IE8 property values.\n Re-implementing that logic here is not worth bloating the codebase for a dying browser. The performance repercussions of using jQuery here are minimal since\n Velocity is optimized to rarely (and sometimes never) query the DOM. Further, the $.css() codepath isn't that slow. */\n if (IE <= 8) {\n computedValue = $.css(element, property); /* GET */\n /* All other browsers support getComputedStyle. The returned live object reference is cached onto its associated element so that it does not need to be refetched upon every GET. */\n } else {\n var computedStyle;\n\n /* For elements that Velocity hasn't been called on directly (e.g. when Velocity queries the DOM on behalf of a parent of an element its animating), perform a direct getComputedStyle lookup since the object isn't cached. */\n if ($.data(element, NAME) === undefined) {\n computedStyle = window.getComputedStyle(element, null); /* GET */\n /* If the computedStyle object has yet to be cached, do so now. */\n } else if (!$.data(element, NAME).computedStyle) {\n computedStyle = $.data(element, NAME).computedStyle = window.getComputedStyle(element, null); /* GET */\n /* If computedStyle is cached, use it. */\n } else {\n computedStyle = $.data(element, NAME).computedStyle;\n }\n\n /* IE doesn't return a value for borderColor -- it only returns individual values for each border side's color. As a polyfill, default to querying for just the top border's color. */\n if (IE && property === \"borderColor\") {\n property = \"borderTopColor\";\n }\n\n /* IE9 has a bug in which the \"filter\" property must be accessed from computedStyle using the getPropertyValue method instead of a direct property lookup. \n The getPropertyValue method is slower than a direct lookup, which is why we avoid it by default. */\n if (IE === 9 && property === \"filter\") {\n computedValue = computedStyle.getPropertyValue(property); /* GET */\n } else {\n computedValue = computedStyle[property];\n } \n\n /* Fall back to the property's style value (if defined) when computedValue returns nothing, which can happen when the element hasn't been painted. */\n if (computedValue === \"\") {\n computedValue = element.style[property];\n }\n }\n\n /* For top, right, bottom, and left (TRBL) values that are set to \"auto\" on elements of \"fixed\" or \"absolute\" position, defer to jQuery for converting \"auto\" to a numeric value.\n (For elements with a \"static\" or \"relative\" position, \"auto\" has the same effect as being set to 0, so no conversion is necessary.) */\n /* An example of why numeric conversion is necessary: When an element with \"position:absolute\" has an untouched \"left\" property, which reverts to \"auto\", left's value is 0 relative to its parent element,\n but is often non-zero relative to its *containing* (not parent) element, which is the nearest \"position:relative\" ancestor or the viewport (and always the viewport in the case of \"position:fixed\"). */\n if (computedValue === \"auto\" && /^(top|right|bottom|left)$/i.test(property)) {\n var position = computePropertyValue(element, \"position\"); /* GET */\n\n /* For absolute positioning, jQuery's $.position() only returns values for top and left; right and bottom will have their \"auto\" value reverted to 0. */\n /* Note: A jQuery object must be created here since jQuery doesn't have a low-level alias for $.position(). Not a big deal since we're currently in a GET batch anyway. */\n if (position === \"fixed\" || (position === \"absolute\" && /top|left/i.test(property))) {\n /* Note: jQuery strips the pixel unit from its returned values; we re-add it here to conform with computePropertyValue's behavior. */\n computedValue = $(element).position()[property] + \"px\"; /* GET */\n }\n }\n\n return computedValue;\n }", "function getStyles(elem) {\n return window.getComputedStyle(elem, null);\n }", "function getRealWidth( element )\n {\n var width = 0;\n var $target = element;\n var style = 'position: absolute !important; top: -1000 !important; ';\n\n $target = $target.clone().attr('style', style).appendTo('body');\n width = $target.width(true);\n $target.remove();\n\n return width;\n }", "function getStyles( elem ) {\n\treturn window.getComputedStyle( elem, null );\n}", "function getStyles( elem ) {\n\treturn window.getComputedStyle( elem, null );\n}", "function getStyles( elem ) {\n\treturn window.getComputedStyle( elem, null );\n}", "function getStyles( elem ) {\n\treturn window.getComputedStyle( elem, null );\n}", "function getStyles( elem ) {\n\treturn window.getComputedStyle( elem, null );\n}", "function getStyles( elem ) {\n\treturn window.getComputedStyle( elem, null );\n}", "function getStyles( elem ) {\n\treturn window.getComputedStyle( elem, null );\n}", "function getStyles( elem ) {\n\treturn window.getComputedStyle( elem, null );\n}", "function getStyles( elem ) {\n\treturn window.getComputedStyle( elem, null );\n}", "function getStyles( elem ) {\n\treturn window.getComputedStyle( elem, null );\n}", "function computePropertyValue(element, property) {\n /* When box-sizing isn't set to border-box, height and width style values are incorrectly computed when an\r\n element's scrollbars are visible (which expands the element's dimensions). Thus, we defer to the more accurate\r\n offsetHeight/Width property, which includes the total dimensions for interior, border, padding, and scrollbar.\r\n We subtract border and padding to get the sum of interior + scrollbar. */\n var computedValue = 0;\n /* IE<=8 doesn't support window.getComputedStyle, thus we defer to jQuery, which has an extensive array\r\n of hacks to accurately retrieve IE8 property values. Re-implementing that logic here is not worth bloating the\r\n codebase for a dying browser. The performance repercussions of using jQuery here are minimal since\r\n Velocity is optimized to rarely (and sometimes never) query the DOM. Further, the $.css() codepath isn't that slow. */\n\n if (IE <= 8) {\n computedValue = $.css(element, property);\n /* GET */\n\n /* All other browsers support getComputedStyle. The returned live object reference is cached onto its\r\n associated element so that it does not need to be refetched upon every GET. */\n } else {\n /* Browsers do not return height and width values for elements that are set to display:\"none\". Thus, we temporarily\r\n toggle display to the element type's default value. */\n var toggleDisplay = false;\n\n if (/^(width|height)$/.test(property) && CSS.getPropertyValue(element, \"display\") === 0) {\n toggleDisplay = true;\n CSS.setPropertyValue(element, \"display\", CSS.Values.getDisplayType(element));\n }\n\n var revertDisplay = function revertDisplay() {\n if (toggleDisplay) {\n CSS.setPropertyValue(element, \"display\", \"none\");\n }\n };\n\n if (!forceStyleLookup) {\n if (property === \"height\" && CSS.getPropertyValue(element, \"boxSizing\").toString().toLowerCase() !== \"border-box\") {\n var contentBoxHeight = element.offsetHeight - (parseFloat(CSS.getPropertyValue(element, \"borderTopWidth\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"borderBottomWidth\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"paddingTop\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"paddingBottom\")) || 0);\n revertDisplay();\n return contentBoxHeight;\n } else if (property === \"width\" && CSS.getPropertyValue(element, \"boxSizing\").toString().toLowerCase() !== \"border-box\") {\n var contentBoxWidth = element.offsetWidth - (parseFloat(CSS.getPropertyValue(element, \"borderLeftWidth\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"borderRightWidth\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"paddingLeft\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"paddingRight\")) || 0);\n revertDisplay();\n return contentBoxWidth;\n }\n }\n\n var computedStyle;\n /* For elements that Velocity hasn't been called on directly (e.g. when Velocity queries the DOM on behalf\r\n of a parent of an element its animating), perform a direct getComputedStyle lookup since the object isn't cached. */\n\n if (Data(element) === undefined) {\n computedStyle = window.getComputedStyle(element, null);\n /* GET */\n\n /* If the computedStyle object has yet to be cached, do so now. */\n } else if (!Data(element).computedStyle) {\n computedStyle = Data(element).computedStyle = window.getComputedStyle(element, null);\n /* GET */\n\n /* If computedStyle is cached, use it. */\n } else {\n computedStyle = Data(element).computedStyle;\n }\n /* IE and Firefox do not return a value for the generic borderColor -- they only return individual values for each border side's color.\r\n Also, in all browsers, when border colors aren't all the same, a compound value is returned that Velocity isn't setup to parse.\r\n So, as a polyfill for querying individual border side colors, we just return the top border's color and animate all borders from that value. */\n\n\n if (property === \"borderColor\") {\n property = \"borderTopColor\";\n }\n /* IE9 has a bug in which the \"filter\" property must be accessed from computedStyle using the getPropertyValue method\r\n instead of a direct property lookup. The getPropertyValue method is slower than a direct lookup, which is why we avoid it by default. */\n\n\n if (IE === 9 && property === \"filter\") {\n computedValue = computedStyle.getPropertyValue(property);\n /* GET */\n } else {\n computedValue = computedStyle[property];\n }\n /* Fall back to the property's style value (if defined) when computedValue returns nothing,\r\n which can happen when the element hasn't been painted. */\n\n\n if (computedValue === \"\" || computedValue === null) {\n computedValue = element.style[property];\n }\n\n revertDisplay();\n }\n /* For top, right, bottom, and left (TRBL) values that are set to \"auto\" on elements of \"fixed\" or \"absolute\" position,\r\n defer to jQuery for converting \"auto\" to a numeric value. (For elements with a \"static\" or \"relative\" position, \"auto\" has the same\r\n effect as being set to 0, so no conversion is necessary.) */\n\n /* An example of why numeric conversion is necessary: When an element with \"position:absolute\" has an untouched \"left\"\r\n property, which reverts to \"auto\", left's value is 0 relative to its parent element, but is often non-zero relative\r\n to its *containing* (not parent) element, which is the nearest \"position:relative\" ancestor or the viewport (and always the viewport in the case of \"position:fixed\"). */\n\n\n if (computedValue === \"auto\" && /^(top|right|bottom|left)$/i.test(property)) {\n var position = computePropertyValue(element, \"position\");\n /* GET */\n\n /* For absolute positioning, jQuery's $.position() only returns values for top and left;\r\n right and bottom will have their \"auto\" value reverted to 0. */\n\n /* Note: A jQuery object must be created here since jQuery doesn't have a low-level alias for $.position().\r\n Not a big deal since we're currently in a GET batch anyway. */\n\n if (position === \"fixed\" || position === \"absolute\" && /top|left/i.test(property)) {\n /* Note: jQuery strips the pixel unit from its returned values; we re-add it here to conform with computePropertyValue's behavior. */\n computedValue = $(element).position()[property] + \"px\";\n /* GET */\n }\n }\n\n return computedValue;\n }", "function getRealWidth(element) {\n var width = 0;\n var $target = element;\n var style = 'position: absolute !important; top: -1000 !important; ';\n\n $target = $target.clone().attr('style', style).appendTo('body');\n width = $target.width(true);\n $target.remove();\n\n return width;\n }", "function elementWidth(element) {\n return element.getBoundingClientRect().width || element.offsetWidth;\n }", "function computePropertyValue (element, property) {\n\t /* When box-sizing isn't set to border-box, height and width style values are incorrectly computed when an\n\t element's scrollbars are visible (which expands the element's dimensions). Thus, we defer to the more accurate\n\t offsetHeight/Width property, which includes the total dimensions for interior, border, padding, and scrollbar.\n\t We subtract border and padding to get the sum of interior + scrollbar. */\n\t var computedValue = 0;\n\t\n\t /* IE<=8 doesn't support window.getComputedStyle, thus we defer to jQuery, which has an extensive array\n\t of hacks to accurately retrieve IE8 property values. Re-implementing that logic here is not worth bloating the\n\t codebase for a dying browser. The performance repercussions of using jQuery here are minimal since\n\t Velocity is optimized to rarely (and sometimes never) query the DOM. Further, the $.css() codepath isn't that slow. */\n\t if (IE <= 8) {\n\t computedValue = $.css(element, property); /* GET */\n\t /* All other browsers support getComputedStyle. The returned live object reference is cached onto its\n\t associated element so that it does not need to be refetched upon every GET. */\n\t } else {\n\t /* Browsers do not return height and width values for elements that are set to display:\"none\". Thus, we temporarily\n\t toggle display to the element type's default value. */\n\t var toggleDisplay = false;\n\t\n\t if (/^(width|height)$/.test(property) && CSS.getPropertyValue(element, \"display\") === 0) {\n\t toggleDisplay = true;\n\t CSS.setPropertyValue(element, \"display\", CSS.Values.getDisplayType(element));\n\t }\n\t\n\t function revertDisplay () {\n\t if (toggleDisplay) {\n\t CSS.setPropertyValue(element, \"display\", \"none\");\n\t }\n\t }\n\t\n\t if (!forceStyleLookup) {\n\t if (property === \"height\" && CSS.getPropertyValue(element, \"boxSizing\").toString().toLowerCase() !== \"border-box\") {\n\t var contentBoxHeight = element.offsetHeight - (parseFloat(CSS.getPropertyValue(element, \"borderTopWidth\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"borderBottomWidth\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"paddingTop\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"paddingBottom\")) || 0);\n\t revertDisplay();\n\t\n\t return contentBoxHeight;\n\t } else if (property === \"width\" && CSS.getPropertyValue(element, \"boxSizing\").toString().toLowerCase() !== \"border-box\") {\n\t var contentBoxWidth = element.offsetWidth - (parseFloat(CSS.getPropertyValue(element, \"borderLeftWidth\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"borderRightWidth\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"paddingLeft\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"paddingRight\")) || 0);\n\t revertDisplay();\n\t\n\t return contentBoxWidth;\n\t }\n\t }\n\t\n\t var computedStyle;\n\t\n\t /* For elements that Velocity hasn't been called on directly (e.g. when Velocity queries the DOM on behalf\n\t of a parent of an element its animating), perform a direct getComputedStyle lookup since the object isn't cached. */\n\t if (Data(element) === undefined) {\n\t computedStyle = window.getComputedStyle(element, null); /* GET */\n\t /* If the computedStyle object has yet to be cached, do so now. */\n\t } else if (!Data(element).computedStyle) {\n\t computedStyle = Data(element).computedStyle = window.getComputedStyle(element, null); /* GET */\n\t /* If computedStyle is cached, use it. */\n\t } else {\n\t computedStyle = Data(element).computedStyle;\n\t }\n\t\n\t /* IE and Firefox do not return a value for the generic borderColor -- they only return individual values for each border side's color.\n\t Also, in all browsers, when border colors aren't all the same, a compound value is returned that Velocity isn't setup to parse.\n\t So, as a polyfill for querying individual border side colors, we just return the top border's color and animate all borders from that value. */\n\t if (property === \"borderColor\") {\n\t property = \"borderTopColor\";\n\t }\n\t\n\t /* IE9 has a bug in which the \"filter\" property must be accessed from computedStyle using the getPropertyValue method\n\t instead of a direct property lookup. The getPropertyValue method is slower than a direct lookup, which is why we avoid it by default. */\n\t if (IE === 9 && property === \"filter\") {\n\t computedValue = computedStyle.getPropertyValue(property); /* GET */\n\t } else {\n\t computedValue = computedStyle[property];\n\t }\n\t\n\t /* Fall back to the property's style value (if defined) when computedValue returns nothing,\n\t which can happen when the element hasn't been painted. */\n\t if (computedValue === \"\" || computedValue === null) {\n\t computedValue = element.style[property];\n\t }\n\t\n\t revertDisplay();\n\t }\n\t\n\t /* For top, right, bottom, and left (TRBL) values that are set to \"auto\" on elements of \"fixed\" or \"absolute\" position,\n\t defer to jQuery for converting \"auto\" to a numeric value. (For elements with a \"static\" or \"relative\" position, \"auto\" has the same\n\t effect as being set to 0, so no conversion is necessary.) */\n\t /* An example of why numeric conversion is necessary: When an element with \"position:absolute\" has an untouched \"left\"\n\t property, which reverts to \"auto\", left's value is 0 relative to its parent element, but is often non-zero relative\n\t to its *containing* (not parent) element, which is the nearest \"position:relative\" ancestor or the viewport (and always the viewport in the case of \"position:fixed\"). */\n\t if (computedValue === \"auto\" && /^(top|right|bottom|left)$/i.test(property)) {\n\t var position = computePropertyValue(element, \"position\"); /* GET */\n\t\n\t /* For absolute positioning, jQuery's $.position() only returns values for top and left;\n\t right and bottom will have their \"auto\" value reverted to 0. */\n\t /* Note: A jQuery object must be created here since jQuery doesn't have a low-level alias for $.position().\n\t Not a big deal since we're currently in a GET batch anyway. */\n\t if (position === \"fixed\" || (position === \"absolute\" && /top|left/i.test(property))) {\n\t /* Note: jQuery strips the pixel unit from its returned values; we re-add it here to conform with computePropertyValue's behavior. */\n\t computedValue = $(element).position()[property] + \"px\"; /* GET */\n\t }\n\t }\n\t\n\t return computedValue;\n\t }", "function computePropertyValue (element, property) {\n\t /* When box-sizing isn't set to border-box, height and width style values are incorrectly computed when an\n\t element's scrollbars are visible (which expands the element's dimensions). Thus, we defer to the more accurate\n\t offsetHeight/Width property, which includes the total dimensions for interior, border, padding, and scrollbar.\n\t We subtract border and padding to get the sum of interior + scrollbar. */\n\t var computedValue = 0;\n\t\n\t /* IE<=8 doesn't support window.getComputedStyle, thus we defer to jQuery, which has an extensive array\n\t of hacks to accurately retrieve IE8 property values. Re-implementing that logic here is not worth bloating the\n\t codebase for a dying browser. The performance repercussions of using jQuery here are minimal since\n\t Velocity is optimized to rarely (and sometimes never) query the DOM. Further, the $.css() codepath isn't that slow. */\n\t if (IE <= 8) {\n\t computedValue = $.css(element, property); /* GET */\n\t /* All other browsers support getComputedStyle. The returned live object reference is cached onto its\n\t associated element so that it does not need to be refetched upon every GET. */\n\t } else {\n\t /* Browsers do not return height and width values for elements that are set to display:\"none\". Thus, we temporarily\n\t toggle display to the element type's default value. */\n\t var toggleDisplay = false;\n\t\n\t if (/^(width|height)$/.test(property) && CSS.getPropertyValue(element, \"display\") === 0) {\n\t toggleDisplay = true;\n\t CSS.setPropertyValue(element, \"display\", CSS.Values.getDisplayType(element));\n\t }\n\t\n\t function revertDisplay () {\n\t if (toggleDisplay) {\n\t CSS.setPropertyValue(element, \"display\", \"none\");\n\t }\n\t }\n\t\n\t if (!forceStyleLookup) {\n\t if (property === \"height\" && CSS.getPropertyValue(element, \"boxSizing\").toString().toLowerCase() !== \"border-box\") {\n\t var contentBoxHeight = element.offsetHeight - (parseFloat(CSS.getPropertyValue(element, \"borderTopWidth\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"borderBottomWidth\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"paddingTop\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"paddingBottom\")) || 0);\n\t revertDisplay();\n\t\n\t return contentBoxHeight;\n\t } else if (property === \"width\" && CSS.getPropertyValue(element, \"boxSizing\").toString().toLowerCase() !== \"border-box\") {\n\t var contentBoxWidth = element.offsetWidth - (parseFloat(CSS.getPropertyValue(element, \"borderLeftWidth\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"borderRightWidth\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"paddingLeft\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"paddingRight\")) || 0);\n\t revertDisplay();\n\t\n\t return contentBoxWidth;\n\t }\n\t }\n\t\n\t var computedStyle;\n\t\n\t /* For elements that Velocity hasn't been called on directly (e.g. when Velocity queries the DOM on behalf\n\t of a parent of an element its animating), perform a direct getComputedStyle lookup since the object isn't cached. */\n\t if (Data(element) === undefined) {\n\t computedStyle = window.getComputedStyle(element, null); /* GET */\n\t /* If the computedStyle object has yet to be cached, do so now. */\n\t } else if (!Data(element).computedStyle) {\n\t computedStyle = Data(element).computedStyle = window.getComputedStyle(element, null); /* GET */\n\t /* If computedStyle is cached, use it. */\n\t } else {\n\t computedStyle = Data(element).computedStyle;\n\t }\n\t\n\t /* IE and Firefox do not return a value for the generic borderColor -- they only return individual values for each border side's color.\n\t Also, in all browsers, when border colors aren't all the same, a compound value is returned that Velocity isn't setup to parse.\n\t So, as a polyfill for querying individual border side colors, we just return the top border's color and animate all borders from that value. */\n\t if (property === \"borderColor\") {\n\t property = \"borderTopColor\";\n\t }\n\t\n\t /* IE9 has a bug in which the \"filter\" property must be accessed from computedStyle using the getPropertyValue method\n\t instead of a direct property lookup. The getPropertyValue method is slower than a direct lookup, which is why we avoid it by default. */\n\t if (IE === 9 && property === \"filter\") {\n\t computedValue = computedStyle.getPropertyValue(property); /* GET */\n\t } else {\n\t computedValue = computedStyle[property];\n\t }\n\t\n\t /* Fall back to the property's style value (if defined) when computedValue returns nothing,\n\t which can happen when the element hasn't been painted. */\n\t if (computedValue === \"\" || computedValue === null) {\n\t computedValue = element.style[property];\n\t }\n\t\n\t revertDisplay();\n\t }\n\t\n\t /* For top, right, bottom, and left (TRBL) values that are set to \"auto\" on elements of \"fixed\" or \"absolute\" position,\n\t defer to jQuery for converting \"auto\" to a numeric value. (For elements with a \"static\" or \"relative\" position, \"auto\" has the same\n\t effect as being set to 0, so no conversion is necessary.) */\n\t /* An example of why numeric conversion is necessary: When an element with \"position:absolute\" has an untouched \"left\"\n\t property, which reverts to \"auto\", left's value is 0 relative to its parent element, but is often non-zero relative\n\t to its *containing* (not parent) element, which is the nearest \"position:relative\" ancestor or the viewport (and always the viewport in the case of \"position:fixed\"). */\n\t if (computedValue === \"auto\" && /^(top|right|bottom|left)$/i.test(property)) {\n\t var position = computePropertyValue(element, \"position\"); /* GET */\n\t\n\t /* For absolute positioning, jQuery's $.position() only returns values for top and left;\n\t right and bottom will have their \"auto\" value reverted to 0. */\n\t /* Note: A jQuery object must be created here since jQuery doesn't have a low-level alias for $.position().\n\t Not a big deal since we're currently in a GET batch anyway. */\n\t if (position === \"fixed\" || (position === \"absolute\" && /top|left/i.test(property))) {\n\t /* Note: jQuery strips the pixel unit from its returned values; we re-add it here to conform with computePropertyValue's behavior. */\n\t computedValue = $(element).position()[property] + \"px\"; /* GET */\n\t }\n\t }\n\t\n\t return computedValue;\n\t }", "function computeStyleTests(){// This is a singleton, we need to execute it only once\nif(!div){return;}div.style.cssText=\"box-sizing:border-box;\"+\"position:relative;display:block;\"+\"margin:auto;border:1px;padding:1px;\"+\"top:1%;width:50%\";div.innerHTML=\"\";documentElement.appendChild(container);var divStyle=window.getComputedStyle(div);pixelPositionVal=divStyle.top!==\"1%\";// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\nreliableMarginLeftVal=divStyle.marginLeft===\"2px\";boxSizingReliableVal=divStyle.width===\"4px\";// Support: Android 4.0 - 4.3 only\n// Some styles come back with percentage values, even though they shouldn't\ndiv.style.marginRight=\"50%\";pixelMarginRightVal=divStyle.marginRight===\"4px\";documentElement.removeChild(container);// Nullify the div so it wouldn't be stored in the memory and\n// it will also be a sign that checks already performed\ndiv=null;}", "function computePropertyValue (element, property) {\n\t /* When box-sizing isn't set to border-box, height and width style values are incorrectly computed when an\n\t element's scrollbars are visible (which expands the element's dimensions). Thus, we defer to the more accurate\n\t offsetHeight/Width property, which includes the total dimensions for interior, border, padding, and scrollbar.\n\t We subtract border and padding to get the sum of interior + scrollbar. */\n\t var computedValue = 0;\n\n\t /* IE<=8 doesn't support window.getComputedStyle, thus we defer to jQuery, which has an extensive array\n\t of hacks to accurately retrieve IE8 property values. Re-implementing that logic here is not worth bloating the\n\t codebase for a dying browser. The performance repercussions of using jQuery here are minimal since\n\t Velocity is optimized to rarely (and sometimes never) query the DOM. Further, the $.css() codepath isn't that slow. */\n\t if (IE <= 8) {\n\t computedValue = $.css(element, property); /* GET */\n\t /* All other browsers support getComputedStyle. The returned live object reference is cached onto its\n\t associated element so that it does not need to be refetched upon every GET. */\n\t } else {\n\t /* Browsers do not return height and width values for elements that are set to display:\"none\". Thus, we temporarily\n\t toggle display to the element type's default value. */\n\t var toggleDisplay = false;\n\n\t if (/^(width|height)$/.test(property) && CSS.getPropertyValue(element, \"display\") === 0) {\n\t toggleDisplay = true;\n\t CSS.setPropertyValue(element, \"display\", CSS.Values.getDisplayType(element));\n\t }\n\n\t function revertDisplay () {\n\t if (toggleDisplay) {\n\t CSS.setPropertyValue(element, \"display\", \"none\");\n\t }\n\t }\n\n\t if (!forceStyleLookup) {\n\t if (property === \"height\" && CSS.getPropertyValue(element, \"boxSizing\").toString().toLowerCase() !== \"border-box\") {\n\t var contentBoxHeight = element.offsetHeight - (parseFloat(CSS.getPropertyValue(element, \"borderTopWidth\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"borderBottomWidth\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"paddingTop\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"paddingBottom\")) || 0);\n\t revertDisplay();\n\n\t return contentBoxHeight;\n\t } else if (property === \"width\" && CSS.getPropertyValue(element, \"boxSizing\").toString().toLowerCase() !== \"border-box\") {\n\t var contentBoxWidth = element.offsetWidth - (parseFloat(CSS.getPropertyValue(element, \"borderLeftWidth\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"borderRightWidth\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"paddingLeft\")) || 0) - (parseFloat(CSS.getPropertyValue(element, \"paddingRight\")) || 0);\n\t revertDisplay();\n\n\t return contentBoxWidth;\n\t }\n\t }\n\n\t var computedStyle;\n\n\t /* For elements that Velocity hasn't been called on directly (e.g. when Velocity queries the DOM on behalf\n\t of a parent of an element its animating), perform a direct getComputedStyle lookup since the object isn't cached. */\n\t if (Data(element) === undefined) {\n\t computedStyle = window.getComputedStyle(element, null); /* GET */\n\t /* If the computedStyle object has yet to be cached, do so now. */\n\t } else if (!Data(element).computedStyle) {\n\t computedStyle = Data(element).computedStyle = window.getComputedStyle(element, null); /* GET */\n\t /* If computedStyle is cached, use it. */\n\t } else {\n\t computedStyle = Data(element).computedStyle;\n\t }\n\n\t /* IE and Firefox do not return a value for the generic borderColor -- they only return individual values for each border side's color.\n\t Also, in all browsers, when border colors aren't all the same, a compound value is returned that Velocity isn't setup to parse.\n\t So, as a polyfill for querying individual border side colors, we just return the top border's color and animate all borders from that value. */\n\t if (property === \"borderColor\") {\n\t property = \"borderTopColor\";\n\t }\n\n\t /* IE9 has a bug in which the \"filter\" property must be accessed from computedStyle using the getPropertyValue method\n\t instead of a direct property lookup. The getPropertyValue method is slower than a direct lookup, which is why we avoid it by default. */\n\t if (IE === 9 && property === \"filter\") {\n\t computedValue = computedStyle.getPropertyValue(property); /* GET */\n\t } else {\n\t computedValue = computedStyle[property];\n\t }\n\n\t /* Fall back to the property's style value (if defined) when computedValue returns nothing,\n\t which can happen when the element hasn't been painted. */\n\t if (computedValue === \"\" || computedValue === null) {\n\t computedValue = element.style[property];\n\t }\n\n\t revertDisplay();\n\t }\n\n\t /* For top, right, bottom, and left (TRBL) values that are set to \"auto\" on elements of \"fixed\" or \"absolute\" position,\n\t defer to jQuery for converting \"auto\" to a numeric value. (For elements with a \"static\" or \"relative\" position, \"auto\" has the same\n\t effect as being set to 0, so no conversion is necessary.) */\n\t /* An example of why numeric conversion is necessary: When an element with \"position:absolute\" has an untouched \"left\"\n\t property, which reverts to \"auto\", left's value is 0 relative to its parent element, but is often non-zero relative\n\t to its *containing* (not parent) element, which is the nearest \"position:relative\" ancestor or the viewport (and always the viewport in the case of \"position:fixed\"). */\n\t if (computedValue === \"auto\" && /^(top|right|bottom|left)$/i.test(property)) {\n\t var position = computePropertyValue(element, \"position\"); /* GET */\n\n\t /* For absolute positioning, jQuery's $.position() only returns values for top and left;\n\t right and bottom will have their \"auto\" value reverted to 0. */\n\t /* Note: A jQuery object must be created here since jQuery doesn't have a low-level alias for $.position().\n\t Not a big deal since we're currently in a GET batch anyway. */\n\t if (position === \"fixed\" || (position === \"absolute\" && /top|left/i.test(property))) {\n\t /* Note: jQuery strips the pixel unit from its returned values; we re-add it here to conform with computePropertyValue's behavior. */\n\t computedValue = $(element).position()[property] + \"px\"; /* GET */\n\t }\n\t }\n\n\t return computedValue;\n\t }", "function Ki(t){return getComputedStyle(t)}", "function testWidth(val, assert) {\n\t\tassert.expect(9);\n\t\tvar $div, $empty;\n\n\t\t$div = jQuery(\"#nothiddendiv\");\n\t\t$div.width(val(30));\n\t\tassert.equal($div.width(), 30, \"Test set to 30 correctly\");\n\t\t$div.css(\"display\", \"none\");\n\t\tassert.equal($div.width(), 30, \"Test hidden div\");\n\t\t$div.css(\"display\", \"\");\n\t\t$div.width(val(-1)); // handle negative numbers by setting to 0 #11604\n\t\tassert.equal($div.width(), 0, \"Test negative width normalized to 0\");\n\t\t$div.css(\"padding\", \"20px\");\n\t\tassert.equal($div.width(), 0, \"Test padding specified with pixels\");\n\t\t$div.css(\"border\", \"2px solid #fff\");\n\t\tassert.equal($div.width(), 0, \"Test border specified with pixels\");\n\n\t\t$div.css({ \"display\": \"\", \"border\": \"\", \"padding\": \"\" });\n\n\t\tjQuery(\"#nothiddendivchild\").css({ \"width\": 20, \"padding\": \"3px\", \"border\": \"2px solid #fff\" });\n\t\tassert.equal(jQuery(\"#nothiddendivchild\").width(), 20, \"Test child width with border and padding\");\n\t\tjQuery(\"#nothiddendiv, #nothiddendivchild\").css({ \"border\": \"\", \"padding\": \"\", \"width\": \"\" });\n\n\t\t$empty = jQuery();\n\t\tassert.equal($empty.width(val(10)), $empty, \"Make sure that setting a width on an empty set returns the set.\");\n\t\tassert.strictEqual($empty.width(), undefined, \"Make sure 'undefined' is returned on an empty set\");\n\n\t\tassert.equal(jQuery(window).width(),\n\t\t\tdocument.documentElement.clientWidth,\n\t\t\t\"Window width is equal to width reported by window/document.\");\n\t}", "function computeStyleTests(){// This is a singleton, we need to execute it only once\n\tif(!div){return;}div.style.cssText=\"box-sizing:border-box;\"+\"position:relative;display:block;\"+\"margin:auto;border:1px;padding:1px;\"+\"top:1%;width:50%\";div.innerHTML=\"\";documentElement.appendChild(container);var divStyle=window.getComputedStyle(div);pixelPositionVal=divStyle.top!==\"1%\";// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\treliableMarginLeftVal=divStyle.marginLeft===\"2px\";boxSizingReliableVal=divStyle.width===\"4px\";// Support: Android 4.0 - 4.3 only\n\t// Some styles come back with percentage values, even though they shouldn't\n\tdiv.style.marginRight=\"50%\";pixelMarginRightVal=divStyle.marginRight===\"4px\";documentElement.removeChild(container);// Nullify the div so it wouldn't be stored in the memory and\n\t// it will also be a sign that checks already performed\n\tdiv=null;}", "function vc_getBorderWidth(element) { \n var res = new Object(); \n res.left = 0; res.top = 0; res.right = 0; res.bottom = 0; \n if (window.getComputedStyle) { \n //for Firefox \n var elStyle = window.getComputedStyle(element, null); \n res.left = parseInt(elStyle.borderLeftWidth.slice(0, -2)); \n res.top = parseInt(elStyle.borderTopWidth.slice(0, -2)); \n res.right = parseInt(elStyle.borderRightWidth.slice(0, -2)); \n res.bottom = parseInt(elStyle.borderBottomWidth.slice(0, -2)); \n } \n else { \n //for other browsers \n res.left = vc_parseBorderWidth(element.style.borderLeftWidth); \n res.top = vc_parseBorderWidth(element.style.borderTopWidth); \n res.right = vc_parseBorderWidth(element.style.borderRightWidth); \n res.bottom = vc_parseBorderWidth(element.style.borderBottomWidth); \n } \n \n return res; \n}", "function getDimensionsEx(element) {\n element = $(element);\n var display = Element.getStyle(element, 'display');\n if (display && display != 'none') { // Safari bug\n return {width: element.clientWidth, height: element.clientHeight};\n }\n return getDimensions(element);\n }", "function getRealWidth( element )\n\t{\n\t\tvar width = 0;\n\t\tvar $target = element;\n\t\tvar style = 'position: absolute !important; top: -1000 !important; ';\n\n\t\t$target = $target.clone().attr('style', style).appendTo('body');\n\t\twidth = $target.width(true);\n\t\t$target.remove();\n\n\t\treturn width;\n\t}", "function computeStyleTests(){// This is a singleton, we need to execute it only once\r\n\tif(!div){return;}div.style.cssText=\"box-sizing:border-box;\"+\"position:relative;display:block;\"+\"margin:auto;border:1px;padding:1px;\"+\"top:1%;width:50%\";div.innerHTML=\"\";documentElement.appendChild(container);var divStyle=window.getComputedStyle(div);pixelPositionVal=divStyle.top!==\"1%\";// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\r\n\treliableMarginLeftVal=divStyle.marginLeft===\"2px\";boxSizingReliableVal=divStyle.width===\"4px\";// Support: Android 4.0 - 4.3 only\r\n\t// Some styles come back with percentage values, even though they shouldn't\r\n\tdiv.style.marginRight=\"50%\";pixelMarginRightVal=divStyle.marginRight===\"4px\";documentElement.removeChild(container);// Nullify the div so it wouldn't be stored in the memory and\r\n\t// it will also be a sign that checks already performed\r\n\tdiv=null;}", "function computeStyleTests() {\n\t\tdiv.style.cssText =\n\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;\" +\n\t\t\t\"position:relative;display:block;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"top:1%;width:50%\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocumentElement.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t// Support: Android 4.0 - 4.3 only\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.marginRight = \"50%\";\n\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\tdocumentElement.removeChild( container );\n\t}", "function computeStyleTests() {\n\t\tdiv.style.cssText =\n\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;\" +\n\t\t\t\"position:relative;display:block;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"top:1%;width:50%\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocumentElement.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t// Support: Android 4.0 - 4.3 only\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.marginRight = \"50%\";\n\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\tdocumentElement.removeChild( container );\n\t}", "function computeStyleTests() {\n\t\tdiv.style.cssText =\n\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;\" +\n\t\t\t\"position:relative;display:block;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"top:1%;width:50%\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocumentElement.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t// Support: Android 4.0 - 4.3 only\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.marginRight = \"50%\";\n\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\tdocumentElement.removeChild( container );\n\t}", "function computeStyleTests() {\n\t\tdiv.style.cssText =\n\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;\" +\n\t\t\t\"position:relative;display:block;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"top:1%;width:50%\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocumentElement.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t// Support: Android 4.0 - 4.3 only\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.marginRight = \"50%\";\n\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\tdocumentElement.removeChild( container );\n\t}", "function computeStyleTests() {\n\t\tdiv.style.cssText =\n\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;\" +\n\t\t\t\"position:relative;display:block;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"top:1%;width:50%\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocumentElement.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t// Support: Android 4.0 - 4.3 only\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.marginRight = \"50%\";\n\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\tdocumentElement.removeChild( container );\n\t}", "function computeStyleTests() {\n\t\tdiv.style.cssText =\n\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;\" +\n\t\t\t\"position:relative;display:block;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"top:1%;width:50%\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocumentElement.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t// Support: Android 4.0 - 4.3 only\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.marginRight = \"50%\";\n\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\tdocumentElement.removeChild( container );\n\t}", "function computeStyleTests() {\n\t\tdiv.style.cssText =\n\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;\" +\n\t\t\t\"position:relative;display:block;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"top:1%;width:50%\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocumentElement.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t// Support: Android 4.0 - 4.3 only\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.marginRight = \"50%\";\n\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\tdocumentElement.removeChild( container );\n\t}", "function computeStyleTests() {\n\t\tdiv.style.cssText =\n\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;\" +\n\t\t\t\"position:relative;display:block;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"top:1%;width:50%\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocumentElement.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t// Support: Android 4.0 - 4.3 only\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.marginRight = \"50%\";\n\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\tdocumentElement.removeChild( container );\n\t}", "function computeStyleTests() {\n\t\tdiv.style.cssText =\n\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;\" +\n\t\t\t\"position:relative;display:block;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"top:1%;width:50%\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocumentElement.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t// Support: Android 4.0 - 4.3 only\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.marginRight = \"50%\";\n\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\tdocumentElement.removeChild( container );\n\t}", "function computeStyleTests() {\n\t\tdiv.style.cssText =\n\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;\" +\n\t\t\t\"position:relative;display:block;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"top:1%;width:50%\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocumentElement.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t// Support: Android 4.0 - 4.3 only\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.marginRight = \"50%\";\n\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\tdocumentElement.removeChild( container );\n\t}", "function computeStyleTests() {\n\t\tdiv.style.cssText =\n\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;\" +\n\t\t\t\"position:relative;display:block;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"top:1%;width:50%\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocumentElement.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t// Support: Android 4.0 - 4.3 only\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.marginRight = \"50%\";\n\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\tdocumentElement.removeChild( container );\n\t}", "function computeStyleTests() {\n\t\tdiv.style.cssText =\n\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;\" +\n\t\t\t\"position:relative;display:block;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"top:1%;width:50%\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocumentElement.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t// Support: Android 4.0 - 4.3 only\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.marginRight = \"50%\";\n\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\tdocumentElement.removeChild( container );\n\t}", "function computeStyleTests() {\n\t\tdiv.style.cssText =\n\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;\" +\n\t\t\t\"position:relative;display:block;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"top:1%;width:50%\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocumentElement.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t// Support: Android 4.0 - 4.3 only\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.marginRight = \"50%\";\n\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\tdocumentElement.removeChild( container );\n\t}", "function computeStyleTests() {\n\t\tdiv.style.cssText =\n\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;\" +\n\t\t\t\"position:relative;display:block;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"top:1%;width:50%\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocumentElement.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t// Support: Android 4.0 - 4.3 only\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.marginRight = \"50%\";\n\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\tdocumentElement.removeChild( container );\n\t}", "function computeStyleTests() {\n\t\tdiv.style.cssText =\n\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;\" +\n\t\t\t\"position:relative;display:block;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"top:1%;width:50%\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocumentElement.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t// Support: Android 4.0 - 4.3 only\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.marginRight = \"50%\";\n\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\tdocumentElement.removeChild( container );\n\t}", "function computeStyleTests() {\n\t\tdiv.style.cssText =\n\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;\" +\n\t\t\t\"position:relative;display:block;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"top:1%;width:50%\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocumentElement.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t// Support: Android 4.0 - 4.3 only\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.marginRight = \"50%\";\n\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\tdocumentElement.removeChild( container );\n\t}", "function computeStyleTests() {\n\t\tdiv.style.cssText =\n\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;\" +\n\t\t\t\"position:relative;display:block;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"top:1%;width:50%\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocumentElement.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t// Support: Android 4.0 - 4.3 only\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.marginRight = \"50%\";\n\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\tdocumentElement.removeChild( container );\n\t}", "function computeStyleTests() {\n\t\tdiv.style.cssText =\n\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;\" +\n\t\t\t\"position:relative;display:block;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"top:1%;width:50%\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocumentElement.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t// Support: Android 4.0 - 4.3 only\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.marginRight = \"50%\";\n\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\tdocumentElement.removeChild( container );\n\t}" ]
[ "0.64492387", "0.64413935", "0.64183706", "0.6353362", "0.6353362", "0.62457746", "0.62238926", "0.62238926", "0.62238926", "0.61197215", "0.6103333", "0.6066923", "0.6066923", "0.6066923", "0.6066923", "0.60458344", "0.60310006", "0.60276747", "0.60276747", "0.60276747", "0.60276747", "0.60276747", "0.60276747", "0.60276747", "0.60276747", "0.60276747", "0.60227907", "0.60185313", "0.6006355", "0.6005195", "0.6005195", "0.5984584", "0.59782463", "0.59635025", "0.5962112", "0.5953667", "0.59505564", "0.5949549", "0.59472436", "0.5945139", "0.5920273", "0.5911478", "0.5911478", "0.5910979", "0.59085786", "0.59085786", "0.59085786", "0.59085786", "0.59085786", "0.59085786", "0.59042656", "0.5902755", "0.58668214", "0.5865909", "0.58570266", "0.58555317", "0.58530176", "0.5851403", "0.5837883", "0.5833099", "0.5833099", "0.5833099", "0.5833099", "0.5833099", "0.5833099", "0.5833099", "0.5833099", "0.5833099", "0.5833099", "0.5831087", "0.58298147", "0.58187526", "0.5818533", "0.5818533", "0.5817118", "0.5816429", "0.5815148", "0.5809162", "0.580412", "0.57931477", "0.5787367", "0.57847095", "0.57837176", "0.5776815", "0.5776815", "0.5776815", "0.5776815", "0.5776815", "0.5776815", "0.5776815", "0.5776815", "0.5776815", "0.5776815", "0.5776815", "0.5776815", "0.5776815", "0.5776815", "0.5776815", "0.5776815", "0.5776815", "0.5776815" ]
0.0
-1
Using mainly bare JS in this function because it is going to fire very often while typing, and needs to very efficient.
function adjust() { var height, originalHeight; if (mirrored !== ta) { initMirror(); } else { setWidth(); } if (!ta.value && options.placeholder) { // If the textarea is empty, copy the placeholder text into // the mirror control and use that for sizing so that we // don't end up with placeholder getting trimmed. mirror.value = ($ta.attr("placeholder") || ''); } else { mirror.value = ta.value; } mirror.value += options.append || ''; mirror.style.overflowY = ta.style.overflowY; originalHeight = parseFloat(ta.style.height) || 0; // Setting scrollTop to zero is needed in IE8 and lower for the next step to be accurately applied mirror.scrollTop = 0; mirror.scrollTop = 9e4; // Using scrollTop rather than scrollHeight because scrollHeight is non-standard and includes padding. height = mirror.scrollTop; if (maxHeight && height > maxHeight) { ta.style.overflowY = 'scroll'; height = maxHeight; } else { ta.style.overflowY = 'hidden'; if (height < minHeight) { height = minHeight; } } height += boxOffset; if (Math.abs(originalHeight - height) > 1/100) { ta.style.height = height + 'px'; // Trigger a repaint for IE8 for when ta is nested 2 or more levels inside an inline-block mirror.className = mirror.className; if (callback) { options.callback.call(ta,ta); } $ta.trigger('autosize.resized'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function autoType(elementClass, typingSpeed){\n var thhis = $(elementClass);\n thhis.css({\n \"position\": \"relative\",\n \"display\": \"inline-block\"\n });\n thhis.prepend('<div class=\"cursor\" style=\"right: initial; left:0;\"></div>');\n thhis = thhis.find(\".text-js\");\n var text = thhis.text().trim().split('');\n var amntOfChars = text.length;\n var newString = \"\";\n thhis.text(\"|\");\n setTimeout(function(){\n thhis.css(\"opacity\",1);\n thhis.prev().removeAttr(\"style\");\n thhis.text(\"\");\n for(var i = 0; i < amntOfChars; i++){\n (function(i,char){\n setTimeout(function() { \n newString += char;\n thhis.text(newString);\n },i*typingSpeed);\n })(i+1,text[i]);\n }\n },1500);\n}", "function _delayed_type_change() {\n try {\n if (n.type != \"text\") { \n n.type = \"text\";\n \n function _delayed_focus() {\n // XXX: this hack is needed for Safari, for some reason\n var n2 = document.getElementById(id);\n if (n2) {\n try {\n //n2.blur();\n n2.focus();\n n2.select(); // Safari\n //set_selection_range(n2, 0, n2.value.length);\n } catch(e) {\n ;\n }\n }\n\n // no longer active, stop blocking events\n __semihidden_replacement_active[id] = \"\";\n }\n setTimeout(_delayed_focus, 50);\n }\n } catch(e) {\n ;\n }\n }", "function but(){\n console.log(\"Hey you are typing something\");\n}", "function typeText(text){\n var chars = text.split('');\n chars.forEach(function(char, index){\n $(settings.el).delay(settings.speed).queue(function (next){\n var text = $(this).html() + char;\n $(this).html(text);\n next();\n\n // we are done, remove from queue\n if(index === chars.length - 1){\n settings.queue = settings.queue - 1;\n $(settings.mainel).trigger('typewriteTyped', text);\n }\n });\n }, this);\n }", "function typeWriter() {\n if (i < txt.length) {\n document.getElementById(\"typing\").innerHTML += txt.charAt(i);\n i++;\n setTimeout(typeWriter, speed);\n }\n}", "function autoCheckTyping() {\n checkIsTyping();\n setTimeout(autoCheckTyping, 3000);\n}", "function altFunctionForTypingSenderFxPlusplus()\n{\n return;\n}", "function typing() {\n let options = {\n strings: [\"Hello, Adventurer... ^1000\", \"Shall we begin?\"],\n loop: false,\n smartBackspace: true,\n backSpeed: 50,\n typeSpeed: 100,\n showCursor: false\n }\n let typed = new Typed(\".type-intro\", options);\n \n setTimeout(function(){\n $(\".formy\").fadeIn(8000);\n }, 5000)\n}", "function bindToTypingEvents(func) {\n bind('input', func);\n bind('keydown', func);\n bind('keyup', func);\n bindToTypingEventsInShittyBrowser(func);\n }", "function begin_typing() {\t\t\t\t\t\t/*FUNCTION CONTROLLING TYPEWRITING EFFECT ---- */\r\n\tif (i < txt[type_flag].length) {\r\n\t\tdocument.getElementById(\"my_info_p\").innerHTML += txt[type_flag].charAt(i);\r\n\t\ti++;\r\n\t\tsetTimeout(begin_typing, speed);\r\n\t}\r\n\tif (i == txt[type_flag].length) {\r\n\t\tdocument.getElementById(\"my_info_p\").innerHTML += '<br>';\r\n\t\ttype_flag++;\r\n\t\ti = 0;\r\n\t\tbegin_typing();\r\n\t}\r\n\r\n}", "function type() {\n // Type as long as there are characters left in phrase\n if (char_index <= text[text_index].length) {\n if (!typing) set_typing(true);\n set_typed_text(text[text_index].substring(0, char_index++));\n setTimeout(type, type_delay);\n }\n // Call erase when finished\n else {\n set_typing(false);\n setTimeout(erase, new_delay);\n }\n }", "function doneTyping () {\n //do something\n }", "function begin_typing_2() {\t\t\t\t\t\t/*FUNCTION CONTROLLING TYPEWRITING EFFECT ---- */\r\n\tif (i_2 < txt_2[type_flag_2].length) {\r\n\t\tdocument.getElementById(\"looking_for_info_p\").innerHTML += txt_2[type_flag_2].charAt(i_2);\r\n\t\ti_2++;\r\n\t\tsetTimeout(begin_typing_2, speed_2);\r\n\t}\r\n\tif (i_2 == txt_2[type_flag_2].length) {\r\n\t\tdocument.getElementById(\"looking_for_info_p\").innerHTML += '<br>';\r\n\t\ttype_flag_2++;\r\n\t\ti_2 = 0;\r\n\t\tbegin_typing_2();\r\n\t}\r\n\r\n}", "function typistUpdateHtml(element, state) {\n var text = state.texts[state.currentTextIndex];\n var typed = text.substring(0, state.currentTypedChars);\n var untyped = text.substring(state.currentTypedChars);\n \n element.innerHTML = typed + \" <span class=\\\"typist-untyped\\\">\" + untyped + \"</span>\";\n}", "function doneTyping () {\n //do something\n}", "_triggerTyping() {\n // If there is a current timeout set to dispatch teh event\n if (this._timeout !== null) {\n // Then cancel it\n window.clearTimeout(this._timeout);\n }\n\n this._timeout = window.setTimeout(() => {\n let event = DOM.createCustomEvent('typing', { bubbles: true });\n\n this.element.dispatchEvent(event);\n }, this._debounceTime);\n }", "function startTyping(){\n start++;\n $('.speed').show();\n $('.startt').hide();\n $('.guidelines').hide();\n $('.answer').show();\n $('.accuracy').hide();\n generateRandomParagraph();\n startTime= new Date().getTime();\n words=0;\n document.getElementById('paragraphInput').value= null;\n inputLen=0;\n y= setInterval(timer,600);\n document.querySelector('#paragraphInput').focus();\n console.log(inputUnit.innerText);\n}", "function doneTyping() {\r\n search();\r\n}", "function startGame(){\n runTyping(\"Immer einmal mehr wie du...\");\n inputTextElement.value ='sag was'; \n}", "function typeWriter() {\n if (u < txt.length) {\n var x = document.getElementById(\"typed\").textContent += txt.charAt(u);\n u++;\n setTimeout(typeWriter, speed);\n console.log(x);\n }\n}", "function typeIt() {\n clearCanvas();\n disableCanvas();\n $(settings.typed, context).show();\n $(settings.drawIt, context).bind('click.signaturepad', function (e) {\n e.preventDefault();\n drawIt();\n });\n $(settings.typeIt, context).unbind('click.signaturepad');\n $(settings.typeIt, context).bind('click.signaturepad', function (e) {\n e.preventDefault();\n });\n $(settings.output, context).val('');\n $(settings.drawIt, context).removeClass(settings.currentClass);\n $(settings.typeIt, context).addClass(settings.currentClass);\n $(settings.sig, context).removeClass(settings.currentClass);\n $(settings.drawItDesc, context).hide();\n $(settings.clear, context).hide();\n $(settings.typeItDesc, context).show();\n }", "function postingVkWallMob(text) {iimDisplay('Капчта! Пытаемся с моб версии..'); window.document.querySelector('TEXTAREA.textfield').focus = function(){window.document.querySelector(\"TEXTAREA.textfield\").style.backgroundColor='red'; window.document.querySelector('TEXTAREA.textfield').click(); iimSet('text',text); iim(`SET !REPLAYSPEED medium \\n EVENT TYPE=KEYPRESS SELECTOR=\"TEXTAREA.textfield\" Char=\"a\" MODIFIERS=\"ctrl\" \\n EVENTS TYPE=KEYPRESS SELECTOR=\"TEXTAREA.textfield\" CHARS={{text}}\\nEVENT TYPE=CLICK SELECTOR=\".cp_buttons_block>INPUT\" BUTTON=0 \\n wait seconds=3`);}()}", "typeAnimation(){\n\t\t//preserve a copy of all the text we're about to display incase we need to save\n\t\tthis.saveCopy();\n\t\t\n\t\tFileManager.writing = false; \n\t\t\n\t\t//figure out how fast we want to type the screen based on how much content needs typing \n\t\tvar letters = 0;\n\t\tfor (i=0; i< this.state.toShowText.length; i++){\t\t\t \n\t\t\tletters += this.state.toShowText[i].text.length;\n\t\t}\n\t\tvar scale = Math.floor(letters/20);\n\t\tif(scale < 1){\n\t\t\tscale = 1;\n\t\t}\n\t\t\n\t\t\n\t\t//do the actual typing\n\t\tthis.typeAnimationActual(scale);\n\t\t\n\t}", "function text_check(target,displayed,current,buffer,emmit_wrong){\n if(((current.value.charAt(0)==target.innerHTML.charAt(0)) && started==0)){\n number_of_errors=0;\n d= new Date();\n start_time=d.getTime();\n target0=target.innerHTML.trim();\n started=1;\n }\n if(started==1){\n if(target0.indexOf(current.value)==0){\n target.innerHTML=target0.slice(current.value.length+1);\n displayed.innerHTML=current.value;\n buffer.innerHTML=target0.substr(current.value.length,1);\n buffer.style.color='lime';\n }else{\n buffer.style.color='red';\n number_of_errors=number_of_errors+1;\n if(emmit_wrong==\"1\"){\n current.value=current.value.slice(0,current.value.length-1);\n }\n }\n if(target0==current.value){\n d= new Date();\n end_time=d.getTime();\n var typing_time=end_time-start_time;\n if(emmit_wrong==\"1\"){\n var errors=number_of_errors;\n }else{\n var errors=number_of_errors/2;\n errors=Math.round(errors);\n };\n finished_attempt = new attempt(typing_time,errors);\n $(document).ready(()=>{\n $.post('_save', {time: finished_attempt.time(),time_sec: finished_attempt.time_spent, err: finished_attempt.errors(), text_ref: document.getElementById('text_id').value}, (res)=>{\n $('#myModal').html(res);\n redo();\n })\n });\n }\n }\n}", "type() {\n const current = this.wordIndex % this.words.length; // current Index of Word\n const fullTxt = this.words[current]; // get full text of current word\n\n // CHECK IF DELETING\n if (this.isDeleting) { \n this.txt = fullTxt.substring(0, this.txt.length - 1); // remove characters\n } else {\n this.txt = fullTxt.substring(0, this.txt.length + 1); // add characters\n }\n\n // INSERT TEXT INTO ELEMENT\n this.txtElement.html(`<span class=\"txt\">${this.txt}</span>`);\n let typeSpeed = \"255\"; // SET Typing Speed\n\n if (this.isDeleting) {\n typeSpeed = typeSpeed / 3; // SET Deleting Speed\n }\n\n // ON WORD COMPLETION\n if (!this.isDeleting && this.txt === fullTxt) {\n typeSpeed = this.wait; // makes pause at end\n this.isDeleting = true; // set delete to true\n } else if (this.isDeleting && this.txt === '') {\n this.isDeleting = false;\n // move to next word...\n this.wordIndex++;\n // Pause before restart typing \n typeSpeed = 500;\n }\n setTimeout(() => this.type(), typeSpeed);\n }", "function typingCursor() {\n if (document.getElementById('typeCursor')) {\n document.getElementById('typeCursor').classList.toggle(\"typeCursorDefault\");\n setTimeout(typingCursor, 530);\n }\n }", "function doneTyping () {\nvar content = document.getElementById(\"first\");\ncontent.textContent += \"and I am from\";\ncontent.innerHTML += \"&nbsp;\"\n\n\n\nconsole.log(\"im typinggggg\");\nvar newSpan = document.createElement('span');\ndocument.getElementById('first').appendChild(newSpan);\nnewSpan.contentEditable =\"true\";\nnewSpan.setAttribute(\"contenteditable\" , \"true\");\nnewSpan.setAttribute(\"id\", \"edit2\");\nnewSpan.onkeyup = myListener;\n}", "typeCharacter() {\n if (this.running_) {\n this.queryCursor_++;\n this.textElement_.innerHTML = this.query_.substring(0, this.queryCursor_);\n if (this.queryCursor_ > this.query_.length) {\n this.stop();\n this.grid_.createNewCell(this.rowIndex_, this.colIndex_);\n } else {\n this.typeDelay().then(this.typeCharacter.bind(this));\n }\n }\n }", "function type()\n{\ndocument.getElementById('screen').innerHTML +=text.charAt(index);\nindex += 1;\nvar t = setTimeout('type()',100);\n// The time taken for each character here is 100ms. You can change it if you want.\n}", "function typeWriter() {\n if (i < txt.length) {\n document.getElementById(\"no\").innerHTML += txt.charAt(i);\n i++;\n setTimeout(typeWriter, speed);\n }\n }", "function typeWriter() {\n if (i < txt.length) {\n document.getElementById(\"no\").innerHTML += txt.charAt(i);\n i++;\n setTimeout(typeWriter, speed);\n }\n }", "function typeWriter(text, i, fnCallback) {\n\t // check if text isn't finished yet\n\t if (i < (text.length)) {\n\t\t// add next character to #top\n\t document.querySelector(\"#cursor\").innerHTML = text.substring(0, i+1) +'<span aria-hidden=\"true\"></span>';\n \n\t\t// wait for a while and call this function again for next character\n\t\tsetTimeout(function() {\n\t\t typeWriter(text, i + 1, fnCallback)\n\t\t}, 250); //this controls speed of the typing and the delay in between\n\t }\n\t // text finished, call callback if there is a callback function\n\t else if (typeof fnCallback == 'function') {\n\t\t// call callback after timeout\n\t\tsetTimeout(fnCallback, 700);\n\t }\n\t}", "function bindToTypingEvents(func) {\n bind('input', func);\n bind('keydown', func);\n bind('keyup', func);\n }", "function typeText(id, text) {\n if (i < text.length) {\n document.getElementById(id).innerHTML += text.charAt(i);\n i++;\n setTimeout(typeText.bind(null, id, text), speed);\n }\n}", "addText(code){\n let textBar = document.querySelector(\".text\").innerHTML;\n switch (code) {\n case \"Backspace\":\n\n textBar.innerHTML.strike();\n\n }\n if(code != \"Enter\"){\n textBar += code;\n } else {\n let command = textBar.innerHTML;\n console.log(command);\n }\n }", "function gText(e) {\n displayValue = (document.all) ? document.selection.createRange().text : document.getSelection();\n document.getElementById('input').value = displayValue \n}", "function doneTyping (event) {\n\t\t\t\treo_update_properties( r , $(event.target).siblings().html() , $(event.target).val() );\n\t\t\t\tconsole.log( $(event.target).siblings().html() );\n\t\t\t}", "function typing_effect_subfunc(caption,boxed,end,captionLength) {\r\n\taudio_cursor.play();\r\n boxed.html(caption.substr(0, captionLength++));\r\n if(captionLength < caption.length+1 ) {\r\n\t\tsetTimeout(function() {typing_effect_subfunc(caption,boxed,end,captionLength);},100);\r\n //setTimeout('typero(caption,boxed)', 100);\r\n } else if (end==false){\r\n\t\tboxed.html(caption+'<br\\>');\r\n //captionLength = 0;\r\n //caption = '';\r\n\t\t//console.log(\"was here1\");\r\n }\r\n\telse{\r\n\t\t//boxed.html(caption+'<br\\>');\r\n //captionLength = 0;\r\n //caption = '';\r\n\t\t//console.log(\"was here2\");\r\n }\r\n}", "function storyTyping() {\n if (i < txt.length) {\n document.querySelector(\".story-title\").innerHTML += txt.charAt(i);\n i++;\n setTimeout(storyTyping, speed);\n }\n}", "function editor_tools_handle_s() {\n editor_tools_add_tags('[s]', '[/s]');\n editor_tools_focus_textarea();\n}", "function type(elem, txt, speed) {\n if (i < txt.length) {\n document.getElementById(elem).innerHTML += txt.charAt(i);\n i++;\n timeouts.push(setTimeout(function(){type(elem, txt, speed)}, speed));\n }\n}", "function insertBBCode(e,t,s){var a=document.querySelector(s),o=$(s),i=a.selectionStart,r=a.selectionEnd,l=o.val(),n=l.substring(i,r),c=e,d=t;o.val(l.substring(0,i)+c+n+d+l.substring(r)),a.focus(),a.selectionStart=i+c.length+n.length+d.length,a.selectionEnd=i+c.length+n.length+d.length}", "function typeWriter() {\n if (i < txt.length) {\n document.getElementById(\"typewrited\").innerHTML += txt.charAt(i);\n i++;\n setTimeout(typeWriter, speed);\n }\n}", "function typeWriter(text, i, fnCallback) {\n // Chekc if text isn't finished yet\n if (i < (text.length)) {\n // Add next character to h1\n document.getElementById(\"typing\").innerHTML = text.substring(0, i+1) +'<span aria-hidden=\"true\"></span>';\n\n // Wait for a while and call this function again for next character\n setTimeout(function() {\n typeWriter(text, i + 1, fnCallback)\n }, 50);\n }\n // Text finished, call callback if there is a callback function\n else if (typeof fnCallback == 'function') {\n // call callback after timeout\n setTimeout(fnCallback, 2000);\n }\n }", "checkTyping() {\n const self = this;\n\n const typingTimer = (new Date()).getTime();\n const duration = typingTimer - self.lastTypingTime;\n if (self.didReachTypingTimeout(duration, self.typingTimeout, self.isTyping)) {\n self.isTyping = false;\n }\n }", "function typeWriter() {\n if (i < txt.length) {\n document.getElementById(\"animated-text\").innerHTML += txt.charAt(i);\n i++;\n setTimeout(typeWriter, speed);\n }\n}", "function typeWriter() {\r\n if (i < txt.length) {\r\n document.getElementById(\"demo\").innerHTML += txt.charAt(i);\r\n i++;\r\n setTimeout(typeWriter, speed);\r\n }\r\n}", "function typeWriter() {\n if (i < txt.length) {\n document.getElementById(\"demo\").innerHTML += txt.charAt(i);\n i++;\n setTimeout(typeWriter, speed);\n }\n}", "function typeWriter() {\n if (i < txt.length) {\n document.getElementById(\"demo\").innerHTML += txt.charAt(i);\n i++;\n setTimeout(typeWriter, speed);\n }\n}", "function update() {\n // give browser time to add current letter\n setTimeout(function() {\n // prevent whitespace from being collapsed\n tag.html(element.val().replace(/ /g, '&nbsp'));\n // clamp length and prevent text from scrolling\n var size = Math.max(min, Math.min(max, tag.width() + offset));\n if (size < max)\n element.scrollLeft(0);\n // apply width to element\n element.width(size);\n settings_resize();\n }, 0);\n }", "function typeEmptyChar(element) {\n var textEvent = document.createEvent('TextEvent'); \n textEvent.initTextEvent('textInput', true, true, window, EMPTY_CHAR);;\n element.dispatchEvent(textEvent); \n}", "function ______TEXT_QUERIES______() {}", "function keywordBlur(){\n\tclearContent();\n}", "function timer(){\n typingTimer = false;\n}", "function traceChange(event) {\n var text = event.target.value;\n var actualText = para.split(\" \");\n var currentWord = actualText[cursor];\n\n if (cursor < actualText.length && text !== \" \" && !toRefreshPara) {\n document.getElementById(wordIndex).style.backgroundColor = \"#E2E2E2\";\n if (wordIndex > 1) {\n document.getElementById(wordIndex - 2).style.backgroundColor = \"white\";\n }\n if (!endedTyping) {\n startedTyping(true);\n }\n endTyping(false);\n if (keyCode == 32) {\n // hit whitespace\n if (cursor == actualText.length - 1) {\n startedTyping((typing) => false);\n endTyping(true);\n }\n if (text.trim() == currentWord.substring(0, text.length)) {\n document.getElementById(wordIndex).style.color = \"green\";\n } else {\n document.getElementById(wordIndex).style.color = \"red\";\n addMisspelledWords([...misspelledWords, currentWord]);\n console.log(\"WRONG : \" + currentWord);\n }\n changeWordIndex((wordIndex) => wordIndex + 2);\n clearInput();\n changeCursor(cursor + 1);\n } else {\n // checking while typing\n if (text !== currentWord.substring(0, text.length)) {\n document.getElementById(wordIndex).style.color = \"red\";\n } else {\n document.getElementById(wordIndex).style.color = \"green\";\n }\n changeTypedText(text);\n }\n }\n }", "function initTypedJs() {\r\n new Typed(\".typed\", {\r\n strings: [\"A Coder.\",\"Frontend.\", \"Analytical.\", \"A Web Developer.\", \"A Gamer.\"],\r\n typeSpeed: 85,\r\n loop: true,\r\n });\r\n}", "function allowTextSelection() {\n var styles='*,p,div{user-select:text !important;-moz-user-select:text !important;-webkit-user-select:text !important;}';\n jQuery('head').append(jQuery('<style />').html(styles));\n \n window.console && console.log('allowTextSelection');\n \n var allowNormal = function(){\n return true;\n };\n \n window.console && console.log('Elements unbound: '+\n jQuery('*[onselectstart], *[ondragstart], *[oncontextmenu], #songLyricsDiv'\n ).unbind('contextmenu').unbind('selectstart').unbind('dragstart'\n ).unbind('mousedown').unbind('mouseup').unbind('click'\n ).attr('onselectstart',allowNormal).attr('oncontextmenu',allowNormal\n ).attr('ondragstart',allowNormal).size());\n}", "function TextEditor() {}", "function typeWriter() {\n if (i < txt.length) {\n document.getElementById(\"question\").innerHTML += txt.charAt(i);\n i++;\n setTimeout(typeWriter, speed);\n }\n}", "function regolit_com_lj_quoter_test()\n{\n var text = document.selection.createRange().text;\n if (\"\" != text) {\n // format text\n text = '<div style=\"padding-left: 3pt; margin-left: 10px; border-color: blue; border-style: none none none solid; border-width: 4px;\"><i>' + text + '</i></div>';\n var ta = document.getElementById(\"body\");\n ta.value += text;\n }\n}", "function typewriter(txt, id, ind = 0) {\n // console.log(txt, i);\n if (ind < txt.length) {\n document.getElementById(id).innerHTML += txt.charAt(ind);\n ind++;\n setTimeout(typewriter, speed, txt, id, ind);\n }\n}", "function annoyed(){\n vm.input = vm.input.concat(\"😒\");\n }", "function update_text()\n\t{\n\t\tmathjax_running = true;\n\t\tupdate_required = false;\n\n\t\t// Parse BBCode\n\t\t$('#' + buffer).html(BBCodeParser.parse(PageUtil.h(raw_text)));\n\n\t\t// Enqueue\n\t\tMathJax.Hub.Queue([\"Typeset\", MathJax.Hub, buffer], [mathjax_callback]);\n\t}", "function txtInputChange(a){\n\tif (document.getElementById(\"text-input\").value.length === 1){\n\t\tstartTypingDate = +new Date();\n\t\tconsole.log(startTypingDate);\n\t}\n\tif (this.value.length-previousLength>1){this.value=''; alert('copy pasting not allowed!')} //reset the input if something gets copy pasted into it\n\tif (currentText.indexOf(this.value) === 0){ //input is congruent with the text\n\t\tdocument.getElementById(\"text-was-typed\").innerHTML = this.value;\n\t\tdocument.getElementById(\"text-wrong\").innerHTML = '';\n\t\tdocument.getElementById(\"text-next-char\").innerHTML = currentText.slice(this.value.length,this.value.length+1);\n\t\tdocument.getElementById(\"text-to-type\").innerHTML = currentText.slice(this.value.length+1);\n\t\tdocument.getElementById(\"text-input\").classList.remove('error');\n\t\tif (this.value.length===currentText.length-1){//input equals text (ie. race complete)\n\t\t\tdocument.getElementById(\"scribo-box\").classList.add('complete');\n\t\t\tdocument.getElementById(\"text-input\").hidden = true;\n\t\t\tdocument.getElementById(\"main-menu\").hidden = false;\n\t\t\tclearInterval(wpmInterval)\n\t\t\tdocument.getElementById('race-info-box').hidden = false;\n\t\t\tdocument.getElementById('race-info-time').innerHTML=Math.floor(((+new Date() - startTypingDate)/1e3)/60)+\"m \"+(Math.floor((+new Date() - startTypingDate)/1e3)%60)+'s';\n\t\t\tdocument.getElementById('race-info-wpm').innerHTML= Math.round(document.getElementById(\"text-input\").value.length*12/((+new Date() - startTypingDate)/1e3));\n\t\t} else {//input does not equal text\n\t\t\tdocument.getElementById(\"scribo-box\").classList.remove('complete');\n\t\t}\n\t} else { //input does not match text\n\t\tdocument.getElementById(\"scribo-box\").classList.remove('complete');\n\t\tdocument.getElementById(\"text-next-char\").innerHTML = '';\n\t\tdocument.getElementById(\"text-input\").classList.add('error');\n\t\tfor (let i = 0; i<currentText.length; i++){\n\t\t\tif (currentText.charAt(i)!==this.value.charAt(i)){//find the first character where text does not match input\n\t\t\t\tdocument.getElementById(\"text-was-typed\").innerHTML = this.value.slice(0,i);\n\t\t\t\tdocument.getElementById(\"text-wrong\").innerHTML = currentText.slice(i,this.value.length)\n\t\t\t\tdocument.getElementById(\"text-to-type\").innerHTML = currentText.slice(this.value.length)\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tpreviousLength = this.value.length;\n}", "function changeText() {\n \n }", "function doneTyping () {\n buscarVaga()\n}", "function tagboxTypingHandler(event) {\n if (event.keyCode != 40 && event.keyCode != 38 && event.keyCode != 13) {\n\n var substring = $('#tagSelection').val();\n if (substring.length > 1) {\n $.get(\"/tag/search/\" + substring, returnedTagsHandler);\n }\n }\n }", "textEnter() {}", "function autoEdFunctions() {\n var txt = document.editform.wpTextbox1;\n txt.value = autoEdUnicodify(txt.value);\n txt.value = autoEdISBN(txt.value);\n txt.value = autoEdWhitespace(txt.value);\n txt.value = autoEdUnicodeHex(txt.value);\n txt.value = autoEdWikilinks(txt.value);\n txt.value = autoEdHTMLtoWikitext(txt.value);\n txt.value = autoEdHeadlines(txt.value);\n txt.value = autoEdUnicodeControlChars(txt.value);\n txt.value = autoEdTemplates(txt.value);\n txt.value = autoEdTablestoWikitext(txt.value);\n txt.value = autoEdExtraBreaks(txt.value);\n txt.value = autoEdLinks(txt.value);\n}", "function winkle(){\n vm.input = vm.input.concat(\"😉\");\n }", "function typeWriter() {\n if (i < txt.length) {\n document.getElementById(\"demo\").innerHTML += txt.charAt(i);\n i++;\n setTimeout(typeWriter, speed);\n }\n /*\n else{\n \ti=0;\n \tdocument.getElementById(\"demo\").innerHTML = \"\";\n \tthis.typeWriter();\n }\n */\n}", "function typeWriter() {\n var txt = document.getElementById(\"demo1\").textContent;\n var length = txt.length;\n if (i < length) {\n document.getElementById(\"demo\").innerHTML += txt.charAt(i);\n i++;\n setTimeout(typeWriter, speed);\n }\n}", "function typeWriter(){\n if (i < txt.length) {\n typeBox.innerHTML += txt.charAt(i);\n console.log(txt.charAt(i));\n i++;\n setTimeout(typeWriter, speed);\n }\n}", "_ackTypingHandler(json){\n \n var playTyping = false;\n this.isTyping = true;\n this.updateScroll();\n \n if ((this.countTypingMessages === 16) || \n (this.countTypingMessages === 32))\n playTyping = true;\n if (this.countTypingMessages === 50){\n playTyping = true;\n this.countTypingMessages--;\n }\n else{\n this.countTypingMessages--;\n if (this.countTypingMessages === -1)\n this.countTypingMessages = 50;\n }\n \n if ((json.user !== CooperativeEditorParticipants.userName) && (playTyping)){\n this.domHost.playSound(\"typing\", json.effect, json.position);\n }\n }", "function typeWriter() {\n\n if (i < txt.length) {\n document.getElementById('name').innerHTML += txt.charAt(i);\n i++;\n setTimeout(typeWriter, speed);\n }\n}", "function typing(title_index){\n\t\t if(isType == true){\n\t\t\t if($('.title')[0].innerHTML.length <= title_list[title_index].length){\n\t\t\t\t $('.title')[0].append(title_list[title_index][pnt++]);\n\t\t\t }\n\t\t\t else {\n\t\t\t\t isErase = true;\n\t\t\t\t isType = false;\n\t\t\t\t pnt=0;\n\t\t\t\t clearInterval(tyItv);\n\t\t\t\t setTimeout(function(){\n\t\t\t\t\t tyItv = setInterval(erase,100,0);\n\t\t\t\t }, 5000);\n\t\t\t }\n\t\t }\n\t }", "onTyping(handler) {\n return this.on('Typing', handler);\n }", "function pressIt()\n{\n $('#typing').keydown(function(keyPressed){\n if(keyPressed.which == 71)\n {\n window.alert(\"You have pressed g/G key!!\");\n }\n });\n \n}", "function stoptyping(){\n\t\t\tsocket.emit('typing:stop');\n\t\t}", "function typeEffect(element, speed) {\n var text = $(element).text();\n $(element).html('');\n \n var i = 0;\n var timer = setInterval(function() {\n if (i < text.length) {\n $(element).append(text.charAt(i));\n i++;\n } else {\n clearInterval(timer);\n }\n }, speed);\n}", "function inputChange() {\n\n /* \n Om inputfältet är tomt break/return vad det nu heter i js.\n\n 1.kolla om vi har ett active words.\n 1.a om vi har active words kolla stavning\n 1.aa om korektstavning return/break vad det nu hetter i js\n 1.ab om fel gör rött eller något sätt som fel\n\n 2. om vi har flera i active\n 2.a kolla input och ta bort active words som inte passar\n \n\n 3.om vi inte har active word\n 2.a kolla alla som har bokstaven och lägg till i active\n\n\n words.forEach(word => {\n //\n }); */\n}", "function allowTextSelectionWhenPossible() { \n window.console && console.log('allowTextSelectionWhenPossible');\n if (window.jQuery) {\n window.console && console.log('jQuery has now loaded');\n allowTextSelection();\n } else {\n window.console && console.log('jQuery still not loaded.');\n window.setTimeout(allowTextSelectionWhenPossible, 100);\n }\n}", "function typeString($target, index, cursorPosition, callback) {\n // Get text\n var text = settings.text[index];\n // Get placeholder, type next character\n var placeholder = $target.attr('placeholder');\n $target.attr('placeholder', placeholder + text[cursorPosition]);\n // Type next character\n if (cursorPosition < text.length - 1) {\n setTimeout(function () {\n typeString($target, index, cursorPosition + 1, callback);\n }, settings.delay);\n return true;\n }\n // Callback if animation is finished\n callback();\n }", "function typeWriter() {\n if (i < txt.length) {\n document.getElementById(\"name\").innerHTML += txt.charAt(i);\n i++;\n setTimeout(typeWriter, speed);\n }\n}", "function editor_tools_handle_code() {\n editor_tools_add_tags('[code]\\n', '\\n[/code]\\n');\n editor_tools_focus_textarea();\n}", "function onInput(){\n\t\n\tvar value = cliptext.value\n\t// we seem to have pressed backspace on android\t\n\tif(value.length === 4 && value === androidBackspace){\n\t\tcliptext.value = magicClip\n\t\tcliptext.selectionStart = defaultStart\n\t\tcliptext.selectionEnd = defaultEnd\n\t\tif(keyDownTriggered){\n\t\t\tkeyDownTriggered = false\n\t\t\tbus.postMessage({\n\t\t\t\tfn:'onKeyDown',\n\t\t\t\trepeat: 1,\n\t\t\t\tcode: 8\n\t\t\t})\n\t\t\tbus.postMessage({\n\t\t\t\tfn:'onKeyUp',\n\t\t\t\trepeat: 1,\n\t\t\t\tcode: 8\n\t\t\t})\n\t\t}\n\t\treturn\n\t}\n\t// Something changed from our clipboard-set to now\n\tif(value !== lastClipboard){\n\t\tlastClipboard = ''\n\t\tcliptext.value = magicClip\n\t\tlastStart = cliptext.selectionStart = defaultStart\n\t\tlastEnd = cliptext.selectionEnd = defaultEnd\n\t\t// special character accent popup \n\t\tif(defaultStart === 3 && value.charCodeAt(2) !== magicClip.charCodeAt(1)){\n\t\t\tbus.postMessage({\n\t\t\t\tfn:'onKeyPress',\n\t\t\t\tchar:value.charCodeAt(2),\n\t\t\t\tspecial:1,\n\t\t\t\trepeat: 1\n\t\t\t})\n\t\t}\n\t\t// the main keypress entry including multiple characters\n\t\t// like swipe android keyboards \n\t\telse for(var i = 0, len = value.length - 2 - defaultStart; i < len; i++){\n\t\t\tvar charcode = value.charCodeAt(i + defaultStart)\n\n\t\t\tvar msg = {\n\t\t\t\tfn:'onKeyPress',\n\t\t\t\tchar:charcode,\n\t\t\t\trepeat: 1\n\t\t\t}\n\t\t\t// if we are more than one character let the otherside know\n\t\t\t// about this (for instance for undo handling)\n\t\t\tif(len>1){\n\t\t\t\tmsg.groupIndex = i\n\t\t\t\tmsg.groupLen = len\n\t\t\t}\n\t\t\t// ignore newlines and magicClip values\n\t\t\tif(charcode !== 10 && charcode !== magicClip.charCodeAt(1)) bus.postMessage(msg)\n\t\t}\n\t}\n}", "function ontext (text) {\n return text;\n}", "function typeWriter() {\n if (i < txt.length) {\n $(\"#myname\").html($(\"#myname\").html() + txt.charAt(i));\n i++;\n setTimeout(typeWriter, speed);\n }\n}", "function typeWriter() {\n if (i < txt.length) {\n document.getElementById(\"heading\").innerHTML += txt.charAt(i);\n i++;\n setTimeout(typeWriter, speed);\n }\n }", "function typing()\n\n\t{\n\t\tsocket.emit('typing', true)\n\t}", "function typeWriter() {\n if (i == -1) {\n setTimeout(typeWriter, 2000);\n i = 0;\n } else {\n if (i < txt.length) {\n document.getElementById(\"name\").innerHTML += txt.charAt(i);\n i++;\n setTimeout(typeWriter, speed);\n }\n }\n }", "typingLogic() {\n if (this.searchField.value != this.previousValue) {\n clearTimeout(this.typingTimer);\n\n if (this.searchField.value) {\n if (!this.isSpinnerVisible) {\n this.resultsDiv.innerHTML = '<div class=\"spinner-loader\"></div>';\n this.isSpinnerVisible = true;\n }\n\n this.typingTimer = setTimeout(this.getResults.bind(this), 750);\n } else {\n this.resultsDiv.innerHTML = \"\";\n this.isSpinnerVisible = false;\n }\n }\n\n this.previousValue = this.searchField.value;\n }", "function Input(){\n\tvar inputFields=$('[type=\"text\"]')\n\tfor(var i=0;i<inputFields.length;i++){\n\t\tinputFields[i].value=randomString({maxLen:30,minLen:1,charSet:nums.splice(centerKybd.splice(centerKybd.splice(centerKybd.splice(centerKybd)))),embed:''});\n\t}\n}", "function handleKeyUp(e) {\n clearTimeout(typingTimer);\n //when last key up was 400ms ago trigger search\n if ($(\"#Search\").val()) {\n typingTimer = setTimeout(handleFinnishType, doneTypingInterval);\n }\n}", "function SmileIT(smile){\r\n document.forms['chatForm'].elements['chatbarText'].value = document.forms['chatForm'].elements['chatbarText'].value+\" \"+smile+\" \"; //this non standard attribute prevents firefox' autofill function to clash with this script\r\n document.forms['chatForm'].elements['chatbarText'].focus();\r\n}", "function listenForChars() {\r\n\t\tfor (let i = 0; i < chars.length; i++) {\r\n\t\t $(\"#Char_\" + chars[i]).click(function() {\r\n\t\t \tkeyDown(chars[i]);\r\n\t\t });\r\n\t\t}\r\n\t}", "__typewriter() {\n let arr = this.options.text.split('');\n\n for (let i = 0, len = arr.length; i < len; i++) {\n let char = arr[i];\n let el = this.__createElement();\n \n char = char === ' ' ? el.innerHTML = '&nbsp;' : el.innerText = char;\n \n setTimeout(() => { \n setTimeout(() => {\n el.classList.add('active'); \n }, this.options.delay);\n \n document.querySelector(this.options.selector).insertAdjacentElement('beforeend', el);\n }, i * this.options.interval);\n }\n }", "nameChange(event) {\n /*console.log(event); in the console open event ->target->validity->value*/\n this.text = event.target.value;\n //console.log(this.textChange);\n this.text = this.text.replace(/i/g, \"!\");\n this.text = this.text.replace(/s/g, \"$\");\n this.text = this.text.replace(/a/g, \"@\");\n }", "function cute(){\n vm.input = vm.input.concat(\"😊\");\n }", "function checkUserInput() {\n var userInput = document\n .querySelector(\".type-area\")\n .value.replace(minusString, \"\");\n if (userInput[userInput.length - 1] === \" \") {\n handleSpace();\n return;\n }\n let startword = modifiedpara.substr(0, modifiedpara.indexOf(\" \") + 1);\n\n if (document.querySelector(\".type-area\").value == \"\") {\n document.querySelector(\".para-type\").innerText = infinityPara;\n } else if (startword.includes(userInput)) {\n text = modifiedpara;\n text = text.replace(\n userInput,\n '<span class=\"highlight\">' + userInput + \"</span>\"\n );\n document.querySelector(\".para-type\").innerHTML = text;\n } else {\n return;\n }\n}", "function monitorText(event){\r\n\tvar frame = frames['editorText'];\r\n\tvar text = document.getElementById('htmlText');\r\n\r\n\tframe.srcdoc = \"<!DOCTYPE html><html><head><link href='editor/embedded.css' rel='stylesheet' type='text/css'></head><body><pre class='postTextPre'>\" + text.value + \"</pre></body></html>\";\r\n}" ]
[ "0.63782066", "0.6187655", "0.61184615", "0.61086214", "0.60925686", "0.60610926", "0.60143197", "0.59713656", "0.59592235", "0.595546", "0.5937028", "0.5860903", "0.5839465", "0.5824016", "0.580592", "0.58027625", "0.5765744", "0.5713633", "0.5699032", "0.5671903", "0.56638837", "0.5655192", "0.56457937", "0.56276006", "0.5590447", "0.55870044", "0.5573357", "0.5572248", "0.5569759", "0.5550936", "0.5550936", "0.5547615", "0.5543159", "0.5539349", "0.5535368", "0.55319124", "0.55065167", "0.5503231", "0.5503082", "0.5497573", "0.54926556", "0.5483901", "0.5470101", "0.5467102", "0.5429957", "0.5426528", "0.54236895", "0.5423661", "0.5423661", "0.5422176", "0.542125", "0.5417743", "0.54070485", "0.5406353", "0.53955704", "0.53912544", "0.5389052", "0.5388056", "0.53866094", "0.5382778", "0.53820974", "0.5376196", "0.53578955", "0.5357061", "0.53566825", "0.53487974", "0.5345895", "0.5342231", "0.5337661", "0.5336922", "0.5329441", "0.5328779", "0.5324284", "0.53112507", "0.5310942", "0.5306733", "0.5303247", "0.5298003", "0.52975035", "0.52962995", "0.52938837", "0.52901244", "0.52812326", "0.52764237", "0.5276129", "0.5275891", "0.52709365", "0.5264545", "0.52631265", "0.52617824", "0.52453554", "0.5240755", "0.52355415", "0.52339983", "0.52336246", "0.5232357", "0.52302194", "0.5224835", "0.5224116", "0.5218804", "0.5217876" ]
0.0
-1
This is done to register the method called with moment() without creating circular dependencies.
function setHookCallback (callback) { hookCallback = callback; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(moment) {\n this.moment = moment;\n }", "moment(date) {\n return moment(date);\n }", "viewDateMoment () {\n const m = moment(this.props.viewDate)\n return function () {\n return m.clone()\n }\n }", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\n return null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\n return null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\n return null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function DateHelper() {}", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function Rb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(x(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Mb(c,d),Sb(this,e,a),this}}", "function Rb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(x(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Mb(c,d),Sb(this,e,a),this}}", "function Rb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(x(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Mb(c,d),Sb(this,e,a),this}}", "function Rb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(x(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Mb(c,d),Sb(this,e,a),this}}", "function Rb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(x(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Mb(c,d),Sb(this,e,a),this}}", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function Rb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(x(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Nb(c,d),Sb(this,e,a),this}}", "function Rb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(x(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"===typeof c?+c:c,e=Nb(c,d),Sb(this,e,a),this}}", "function Rb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\n return null===d||isNaN(+d)||(x(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Nb(c,d),Sb(this,e,a),this}}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(\n\t name,\n\t 'moment().' +\n\t name +\n\t '(period, number) is deprecated. Please use moment().' +\n\t name +\n\t '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n\t );\n\t tmp = val;\n\t val = period;\n\t period = tmp;\n\t }\n\t\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function oldMomentFormat(mom,formatStr){return oldMomentProto.format.call(mom,formatStr);// oldMomentProto defined in moment-ext.js\n}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(\n\t name,\n\t 'moment().' +\n\t name +\n\t '(period, number) is deprecated. Please use moment().' +\n\t name +\n\t '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n\t );\n\t tmp = val;\n\t val = period;\n\t period = tmp;\n\t }\n\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(\n\t name,\n\t 'moment().' +\n\t name +\n\t '(period, number) is deprecated. Please use moment().' +\n\t name +\n\t '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n\t );\n\t tmp = val;\n\t val = period;\n\t period = tmp;\n\t }\n\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "resetCalendarMoment(date =\"\"){\n if(date && /^([0-9]{4}-[0-9]{2}-[0-9]{2})/.test(date)){\n //if there is date string\n //and it is in date pattern\n //then create that moment\n this._moment = moment(date);\n }else{\n this._moment = moment();\n }\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val;\n val = period;\n period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = create__createDuration(val, period);\n\t add_subtract__addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = create__createDuration(val, period);\n\t add_subtract__addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "calcCurrentMoment() {\n return moment();\n }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = create__createDuration(val, period);\n\t add_subtract__addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = create__createDuration(val, period);\n\t add_subtract__addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = create__createDuration(val, period);\n\t add_subtract__addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = create__createDuration(val, period);\n\t add_subtract__addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = create__createDuration(val, period);\n\t add_subtract__addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val;\n val = period;\n period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function makeShortcut(name, key) {\n moment.fn[name] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function Sb(a, b) {\n return function (c, d) {\n var e, f;\n //invert the arguments, but complain about it\n return null === d || isNaN(+d) || (y(b, \"moment().\" + b + \"(period, number) is deprecated. Please use moment().\" + b + \"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"), f = c, c = d, d = f), c = \"string\" == typeof c ? +c : c, e = Ob(c, d), Tb(this, e, a), this\n }\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n\treturn function (val, period) {\n\t\tvar dur, tmp;\n\t\t//invert the arguments, but complain about it\n\t\tif (period !== null && !isNaN(+period)) {\n\t\t\tdeprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t\t\t'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t\t\ttmp = val; val = period; period = tmp;\n\t\t}\n\n\t\tval = typeof val === 'string' ? +val : val;\n\t\tdur = createDuration(val, period);\n\t\taddSubtract(this, dur, direction);\n\t\treturn this;\n\t};\n}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period).');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = moment.duration(val, period);\n\t addOrSubtractDurationFromMoment(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val; val = period; period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period).');\n\t tmp = val;val = period;period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = moment.duration(val, period);\n\t addOrSubtractDurationFromMoment(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }" ]
[ "0.6808374", "0.6107414", "0.59236145", "0.574654", "0.574654", "0.574654", "0.574654", "0.574654", "0.574654", "0.574654", "0.574654", "0.574654", "0.574654", "0.574654", "0.574654", "0.574654", "0.5738129", "0.5738129", "0.5738129", "0.57364327", "0.57364327", "0.57364327", "0.57364327", "0.57364327", "0.57263243", "0.56985706", "0.56661767", "0.56661767", "0.56661767", "0.56661767", "0.56661767", "0.56437504", "0.56437504", "0.56437504", "0.56437504", "0.56437504", "0.56437504", "0.56437504", "0.56437504", "0.56437504", "0.56437504", "0.56437504", "0.56437504", "0.5641565", "0.5625612", "0.56130105", "0.55873626", "0.55733854", "0.5560408", "0.5560408", "0.5475946", "0.5475946", "0.5475946", "0.5475946", "0.54575545", "0.54575545", "0.5453677", "0.54349136", "0.5429771", "0.5429771", "0.54221237", "0.54121745", "0.54121745", "0.54121745", "0.54121745", "0.54121745", "0.5410727", "0.5410727", "0.5410727", "0.5410727", "0.5410727", "0.5408019", "0.53984845", "0.537523", "0.5370279", "0.5370279", "0.5370279", "0.5370279", "0.5370279", "0.5370279", "0.5370279", "0.5370279", "0.5370279", "0.5369424", "0.53611726", "0.5355769", "0.5332611", "0.5331182", "0.5329359", "0.5327584", "0.5320359", "0.5320359", "0.5320359", "0.5320359", "0.5320359", "0.5320359", "0.5320359", "0.5320359", "0.5320359", "0.5320359", "0.5320359" ]
0.0
-1
compare two arrays, return the number of differences
function compareArrays(array1, array2, dontConvert) { var len = Math.min(array1.length, array2.length), lengthDiff = Math.abs(array1.length - array2.length), diffs = 0, i; for (i = 0; i < len; i++) { if ((dontConvert && array1[i] !== array2[i]) || (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) { diffs++; } } return diffs + lengthDiff; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function countDifferences(a, b) {\n let diffs = 0;\n for (let i = 0; i < a.length; ++i) {\n if (a[i] !== b[i]) {\n ++diffs;\n }\n }\n return diffs;\n}", "function howmany_diff(ary1, ary2){\n for (var i = 0; i < ary1.length; i++){\n var a = ary1[i]\n var b = ary2[i]\n if (a != b){\n diff++\n }\n }\n }", "function howmany_diff(ary1, ary2) {\n for (var i = 0; i < ary1.length; i++) {\n var a = ary1[i]\n var b = ary2[i]\n if (a != b) {\n diff++\n }\n }\n }", "function arrayDiff(a1, a2) {\n\tvar totalDiff = 0;\n\ta2.forEach((elem, index) => {\n\t\ttotalDiff += Math.abs(elem - a1[index]);\n\t});\n\treturn totalDiff;\n}", "function compatibility(arr1, arr2) {\n var totalDiff = 0;\n for (let i in arr1) {\n totalDiff = totalDiff + difference(arr1[i], arr2[i])\n }\n return totalDiff\n}", "function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length);\n var lengthDiff = Math.abs(array1.length - array2.length);\n var diffs = 0;\n var i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i])\n || (!dontConvert && Object(__WEBPACK_IMPORTED_MODULE_0__type_checks__[\"k\" /* toInt */])(array1[i]) !== Object(__WEBPACK_IMPORTED_MODULE_0__type_checks__[\"k\" /* toInt */])(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}", "function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }" ]
[ "0.82791424", "0.82791424", "0.82791424", "0.82791424", "0.82791424", "0.82791424", "0.82791424", "0.82791424", "0.82791424", "0.82791424", "0.82791424", "0.79984933", "0.79866725", "0.79537725", "0.7922521", "0.77097225", "0.75572866", "0.75463253", "0.75318825", "0.7503132", "0.7503132", "0.7503132", "0.7503132", "0.7503132", "0.7503132", "0.7503132", "0.7503132", "0.7503132", "0.7503132", "0.7503132", "0.7503132", "0.7503132", "0.7503132", "0.749946", "0.749946", "0.749946", "0.749946", "0.749946", "0.749946", "0.749946", "0.749946", "0.749946", "0.749946", "0.749946", "0.749946", "0.749946", "0.749946", "0.749946", "0.749946", "0.749946", "0.7497887", "0.7497887", "0.7497887", "0.74965256", "0.74871886" ]
0.0
-1
pick the locale from the array try ['enau', 'engb'] as 'enau', 'engb', 'en', as in move through the list trying each substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
function chooseLocale(names) { var i = 0, j, next, locale, split; while (i < names.length) { split = normalizeLocale(names[i]).split('-'); j = split.length; next = normalizeLocale(names[i + 1]); next = next ? next.split('-') : null; while (j > 0) { locale = loadLocale(split.slice(0, j).join('-')); if (locale) { return locale; } if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { //the next array item is better than a shallower substring of this one break; } j--; } i++; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n \n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n }", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}" ]
[ "0.7080607", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.7076074", "0.70720136" ]
0.0
-1
This function will load locale and then set the global locale. If no arguments are passed in, it will simply return the current global locale key.
function locale_locales__getSetGlobalLocale (key, values) { var data; if (key) { if (isUndefined(values)) { data = locale_locales__getLocale(key); } else { data = defineLocale(key, values); } if (data) { // moment.duration._locale = moment._locale = data; globalLocale = data; } } return globalLocale._abbr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data = getLocale(key);}else {data = defineLocale(key,values);}if(data){ // moment.duration._locale = moment._locale = data;\nglobalLocale = data;}else {if(typeof console !== 'undefined' && console.warn){ //warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale ' + key + ' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined$1(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\r\n var data;\r\n if (key) {\r\n if (isUndefined(values)) {\r\n data = getLocale(key);\r\n }\r\n else {\r\n data = defineLocale(key, values);\r\n }\r\n\r\n if (data) {\r\n // moment.duration._locale = moment._locale = data;\r\n globalLocale = data;\r\n }\r\n else {\r\n if ((typeof console !== 'undefined') && console.warn) {\r\n //warn user if arguments are passed but the locale could not be set\r\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\r\n }\r\n }\r\n }\r\n\r\n return globalLocale._abbr;\r\n }", "function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t else {\n\t if ((typeof console !== 'undefined') && console.warn) {\n\t //warn user if arguments are passed but the locale could not be set\n\t console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n\t }\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t }", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t else {\n\t if ((typeof console !== 'undefined') && console.warn) {\n\t //warn user if arguments are passed but the locale could not be set\n\t console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n\t }\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t }", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t else {\n\t if ((typeof console !== 'undefined') && console.warn) {\n\t //warn user if arguments are passed but the locale could not be set\n\t console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n\t }\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t }", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t else {\n\t if ((typeof console !== 'undefined') && console.warn) {\n\t //warn user if arguments are passed but the locale could not be set\n\t console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n\t }\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t }", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn User if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }" ]
[ "0.7326281", "0.7298282", "0.72949594", "0.7249536", "0.7249536", "0.7249536", "0.7249536", "0.7249536", "0.7249536", "0.7241694", "0.7241694", "0.7230461", "0.721812", "0.72144645", "0.72104096", "0.72104096", "0.72104096", "0.72104096", "0.7206585", "0.72062016", "0.72061193", "0.72061193", "0.72061193", "0.72061193", "0.72061193", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374", "0.72010374" ]
0.0
-1
format date using native date object
function formatMoment(m, format) { if (!m.isValid()) { return m.localeData().invalidDate(); } format = expandFormat(format, m.localeData()); formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); return formatFunctions[format](m); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "formatDate(date) {\n\t\treturn date.toString()\n\t\t.replace(/(\\d{4})(\\d{2})(\\d{2})/, (string, year, month, day) => `${year}-${month}-${day}`);\n\t}", "static formatDate(date) {\n return new Date(date).toLocaleDateString();\n }", "formatTheDate(date, format) {\n const [ year, month, day ] = (date.toISOString()).substr(0, 10).split('-');\n return dateFns.format(new Date(\n year,\n (month - 1),\n day,\n ), format);\n }", "function formatDate(obj) {\n const date = new Date(obj.date).toLocaleString(\"default\", {\n day: \"numeric\",\n month: \"long\",\n year: \"numeric\",\n });\n obj.date = date;\n return obj;\n}", "function formatDate(date) {\n return format(new Date(date), 'yyyy-MM-dd')\n}", "getFormattedDate(date) {\n return dayjs(date).format(\"MMM MM, YYYY\");\n }", "function formatDate(date) {\n var d = new Date(date);\n d = d.toLocaleString();\n return d;\n }", "function formatDate(d) {\n return `${d.year}-${d.month}-${d.day}`\n }", "_format(dtf, date) {\n // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\n // To work around this we use `setUTCFullYear` and `setUTCHours` instead.\n const d = new Date();\n d.setUTCFullYear(date.getFullYear(), date.getMonth(), date.getDate());\n d.setUTCHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n return dtf.format(d);\n }", "_format(dtf, date) {\n // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\n // To work around this we use `setUTCFullYear` and `setUTCHours` instead.\n const d = new Date();\n d.setUTCFullYear(date.getFullYear(), date.getMonth(), date.getDate());\n d.setUTCHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n return dtf.format(d);\n }", "_format(dtf, date) {\n // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\n // To work around this we use `setUTCFullYear` and `setUTCHours` instead.\n const d = new Date();\n d.setUTCFullYear(date.getFullYear(), date.getMonth(), date.getDate());\n d.setUTCHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n return dtf.format(d);\n }", "function _getFormattedDate(date) {\n var year = date.getFullYear();\n var month = (1 + date.getMonth()).toString();\n month = month.length > 1 ? month : '0' + month;\n var day = date.getDate().toString();\n day = day.length > 1 ? day : '0' + day;\n return month + '/' + day + '/' + year;\n }", "function formatDate(date, format) {\n return format\n .replace(/yyyy/i, util_toString(date.getFullYear()))\n .replace(/MM/i, lpad(date.getMonth() + 1))\n .replace(/M/i, util_toString(date.getMonth()))\n .replace(/dd/i, lpad(date.getDate()))\n .replace(/d/i, util_toString(date.getDate()));\n}", "function formatDate(date) {\n var day = date.getDate();\n var month = date.getMonth() + 1; //Months are zero based\n var year = date.getFullYear();\n var formattedDate = year + \"-\" + month + \"-\" + day;\n return formattedDate;\n }", "function formatDate(date) {\n\tif (date == null) {\n\t\treturn null;\n\t}\n\tvar d = date.getDate();\n\tvar m = date.getMonth() + 1;\n\tvar y = date.getFullYear();\n\treturn '' + (d <= 9 ? '0' + d : d) + '-' + (m <= 9 ? '0' + m : m) + '-' + y;\n}", "function formatDate(date) {\n let source = new Date(date);\n let day = source.getDate();\n let month = source.getMonth() + 1;\n let year = source.getFullYear();\n\n return `${day}/${month}/${year}`;\n }", "function formatDate(date) {\n\treturn new Date(date.split(' ').join('T'))\n}", "function formatDate(date) {\r\n date = new Date(date);\r\n let DD = date.getDate();\r\n if (DD < 10) {\r\n DD = \"0\" + DD;\r\n }\r\n let MM = date.getMonth() +1;\r\n if (MM < 10) {\r\n MM = \"0\" + MM;\r\n }\r\n const YYYY = date.getFullYear();\r\n return DD + \"/\" + MM + \"/\" + YYYY;\r\n }", "getFormattedDate(date) {\n const year = date.getFullYear();\n const month = (date.getUTCMonth() + 1).toString().padStart(2, '0');\n const day = (date.getUTCDate()).toString().padStart(2, '0');\n // Logger.log(`Day: ${day}, Month: ${month}, Year:${year}`)\n const dateFormatted = `${year}-${month}-${day}`;\n return dateFormatted;\n }", "function formatDate(date) {\n \n var dd = date.getDate();\n if (dd < 10) {\n dd = '0' + dd;\n }\n \n var mm = date.getMonth() + 1;\n if (mm < 10) {\n mm = '0' + mm;\n }\n \n var yy = date.getFullYear();\n if (yy < 10) {\n yy = '0' + yy;\n }\n \n return mm + '/' + dd + '/' + yy;\n }", "function formatDate(date) {\r\n\r\n let dd = date.getDate();\r\n if (dd < 10) dd = '0' + dd;\r\n\r\n let mm = date.getMonth() + 1;\r\n if (mm < 10) mm = '0' + mm;\r\n\r\n let yy = date.getFullYear() % 100;\r\n if (yy < 10) yy = '0' + yy;\r\n\r\n return dd + '.' + mm + '.' + yy;\r\n}", "function formatDate(date) {\r\n date = new Date(date);\r\n let DD = date.getDate();\r\n if (DD < 10) {\r\n DD = \"0\" + DD;\r\n }\r\n let MM = date.getMonth() +1;\r\n if (MM < 10) {\r\n MM = \"0\" + MM;\r\n }\r\n const YYYY = date.getFullYear();\r\n return DD + \"/\" + MM + \"/\" + YYYY;\r\n}", "function formatDate(date){\n\t\tvar formatted = {\n\t\t\tdate:date,\n\t\t\tyear:date.getFullYear().toString().slice(2),\n\t\t\tmonth:s.months[date.getMonth()],\n\t\t\tmonthAbv:s.monthsAbv[date.getMonth()],\n\t\t\tmonthNum:date.getMonth() + 1,\n\t\t\tday:date.getDate(),\n\t\t\tslashDate:undefined,\n\t\t\ttime:formatTime(date)\n\t\t}\n\t\tformatted.slashDate = formatted.monthNum + '/' + formatted.day + '/' + formatted.year;\n\t\treturn formatted;\n\t}", "function formatDate(date) {\n var day = (\"0\" + date.getDate()).slice(-2);\n var month = (\"0\" + (date.getMonth() + 1)).slice(-2);\n var year = date.getFullYear().toString().slice(-2);\n return day + month + year;\n}", "function formatDate(date,formatStr){return renderFakeFormatString(getParsedFormatString(formatStr).fakeFormatString,date);}", "function formatDate(date)\n{\n g_date=date.getDate();\n if(g_date <=9)\n {\n g_date=\"0\"+g_date;\n }\n g_month=date.getMonth();\n g_year=date.getFullYear();\n if (g_year < 2000) g_year += 1900;\n return todaysMonthName(date)+\" \"+g_date+\", \"+g_year;\n}", "function getFormattedDate(date) {\n return $filter('date')(date, 'yyyy-MM-dd');\n }", "_stringify(date){\n date = date.toLocaleDateString();\n return date;\n }", "function formatDate(date, format){\n if(!date){\n return '0000-00-00';\n }\n var dd = date.substring(0, 2);\n var mm = date.substring(3, 5);\n var yy = date.substring(6);\n if (format == 'dmy') {\n return dd + '-' + mm + '-' + yy;\n } else {\n return yy + '-' + mm + '-' + dd;\n }\n }", "function formatDate(date) {\n var day = date.getDate();\n if (day < 10) {\n day = \"0\" + day;\n }\n\n var month = date.getMonth() + 1;\n if (month < 10) {\n month = \"0\" + month;\n }\n\n var year = date.getFullYear();\n\n return day + \".\" + month + \".\" + year;\n}", "formatDate (date){\n var d = new Date(date),\n month = (d.getMonth() + 1),\n day = d.getDate(),\n year = d.getFullYear();\n if (month.length < 2)\n month = '0' + month;\n if (day.length < 2)\n day = '0' + day;\n return [year, month, day].join('-');\n }", "function convertToFormat (dateObj, dateFormat) {\r\n var month = dateObj.getMonth() + 1;\r\n var date = dateObj.getDate();\r\n var year = dateObj.getFullYear();\r\n var dateString;\r\n switch (dateFormat) {\r\n case 'yyyy.m.d':\r\n dateString = year + '.' + month + '.' + date;\r\n break;\r\n case 'yyyy-m-d':\r\n dateString = year + '-' + month + '-' + date;\r\n break;\r\n case 'yyyy/m/d':\r\n dateString = year + '/' + month + '/' + date;\r\n break;\r\n case 'yyyy/mm/dd':\r\n dateString = year + '/' + _makeTwoDigits(month) + '/' + _makeTwoDigits(date);\r\n break;\r\n case 'dd/mm/yyyy':\r\n dateString = _makeTwoDigits(date) + '/' + _makeTwoDigits(month) + '/' + year;\r\n break;\r\n case 'dd-mm-yyyy':\r\n dateString = _makeTwoDigits(date) + '-' + _makeTwoDigits(month) + '-' + year;\r\n break;\r\n case 'd-m-yyyy':\r\n dateString = date + '-' + month + '-' + year;\r\n break;\r\n case 'd/m/yyyy':\r\n dateString = date + '/' + month + '/' + year;\r\n break;\r\n case 'd/mm/yyyy':\r\n dateString = date + '/' + _makeTwoDigits(month) + '/' + year;\r\n break;\r\n case 'dd.mm.yyyy':\r\n dateString = _makeTwoDigits(date) + '.' + _makeTwoDigits(month) + '.' + year;\r\n break;\r\n case 'm/d/yyyy':\r\n dateString = month + '/' + date + '/' + year;\r\n break;\r\n default:\r\n dateString = _makeTwoDigits(date) + '.' + _makeTwoDigits(month) + '.' + year;\r\n }\r\n return dateString;\r\n }", "function formatDate(){\n if (!Date.prototype.toISODate) {\n Date.prototype.toISODate = function() {\n return this.getFullYear() + '-' +\n ('0'+ (this.getMonth()+1)).slice(-2) + '-' +\n ('0'+ this.getDate()).slice(-2);\n }\n }\n }", "function formatDate(date) {\n const d = new Date(date);\n return d.getFullYear() + \"-\" + twoDigits(d.getMonth() + 1) + \"-\" + twoDigits(d.getDate());\n}", "function formattedDate(d) {\n let month = String(d.getMonth() + 1);\n let day = String(d.getDate());\n const year = String(d.getFullYear());\n\n if (month.length < 2) month = '0' + month;\n if (day.length < 2) day = '0' + day;\n\n return `${year}-${month}-${day}`;\n }", "function formatDate(d) {\n if (d === undefined){\n d = (new Date()).toISOString()\n }\n let currDate = new Date(d);\n let year = currDate.getFullYear();\n let month = currDate.getMonth() + 1;\n let dt = currDate.getDate();\n let time = currDate.toLocaleTimeString('en-SG')\n\n if (dt < 10) {\n dt = '0' + dt;\n }\n if (month < 10) {\n month = '0' + month;\n }\n\n return dt + \"/\" + month + \"/\" + year + \" \" + time ;\n }", "function formattedDate(date) {\r\n\t\t\t\t\tvar d = new Date(date),\r\n\t\t\t\t\t\tmonth = '' + (d.getMonth() + 1),\r\n\t\t\t\t\t\tday = '' + d.getDate(),\r\n\t\t\t\t\t\tyear = d.getFullYear();\r\n\r\n\t\t\t\t\tif (month.length < 2) month = '0' + month;\r\n\t\t\t\t\tif (day.length < 2) day = '0' + day;\r\n\t\t\t\t\treturn [year, month, day].join('-');\r\n\t\t\t\t}", "function formatDate(date) {\r\n var d = date ? new Date(date) : new Date()\r\n month = '' + (d.getMonth() + 1),\r\n day = '' + d.getDate(),\r\n year = d.getFullYear();\r\n if (month.length < 2)\r\n month = '0' + month;\r\n if (day.length < 2)\r\n day = '0' + day;\r\n\r\n return `${day}${month}${year}`;\r\n}", "function getFormattDate(date) {\n let month = (1 + date.getMonth()).toString();\n month = month.length > 1 ? month : \"0\" + month;\n\n let day = date.getDate().toString();\n day = day.length > 1 ? day : \"0\" + day;\n\n return (date.getFullYear() + \"-\" + month + \"-\" + day);\n}", "function getFormattDate(date) {\n let month = (1 + date.getMonth()).toString();\n month = month.length > 1 ? month : \"0\" + month;\n\n let day = date.getDate().toString();\n day = day.length > 1 ? day : \"0\" + day;\n\n return (date.getFullYear() + \"-\" + month + \"-\" + day);\n}", "function _formatDate(date) {\n\t//remove timezone GMT otherwise move time\n\tvar offset = date.getTimezoneOffset() * 60000;\n\tvar dateFormatted = new Date(date - offset);\n dateFormatted = dateFormatted.toISOString();\n if (dateFormatted.indexOf(\"T\") > 0)\n dateFormatted = dateFormatted.split('T')[0];\n return dateFormatted;\n}", "function formatDate(date) {\n const month = date.getMonth() + 1;\n const day = date.getDate();\n const year = date.getFullYear();\n \n return `${month}/${day}/${year}`;\n }", "function formatDate(date) {\r\n return date.getFullYear().toString() + (date.getMonth() + 1).toString().padStart(2, '0') + date.getDate().toString() \r\n + date.getHours().toString().padStart(2, '0') + date.getMinutes().toString().padStart(2, '0');\r\n }", "function formatDate(date) {\n var dd = date.getDate()\n if (dd < 10) dd = '0' + dd;\n var mm = date.getMonth() + 1\n if (mm < 10) mm = '0' + mm;\n var yy = date.getFullYear();\n if (yy < 10) yy = '0' + yy;\n return dd + '.' + mm + '.' + yy;\n}", "formatDate(date) {\n var d = new Date(date),\n month = '' + (d.getMonth() + 1),\n day = '' + d.getDate(),\n year = d.getFullYear();\n if (month.length < 2) \n month = '0' + month;\n if (day.length < 2) \n day = '0' + day;\n return [year, month, day].join('-');\n }", "function formatDate(date) {\n // date is a date object\n const options = { year: 'numeric', month: 'short', day: 'numeric', timeZone: 'UTC' };\n return date.toLocaleString('en-US', options);\n}", "function formatDate(date) {\n // date is a date object\n const options = { year: 'numeric', month: 'long', day: 'numeric', timeZone: 'UTC' };\n return date.toLocaleDateString('en-US', options);\n}", "function _date(obj) {\n return exports.PREFIX.date + ':' + obj.toISOString();\n}", "function get_formatted_date(date) {\n function get_formatted_num(num, expected_length) {\n var str = \"\";\n var num_str = num.toString();\n var num_zeros = expected_length - num_str.length;\n for (var i = 0; i < num_zeros; ++i) {\n str += '0';\n }\n str += num_str;\n return str;\n }\n var msg = get_formatted_num(date.getFullYear(), 4) + \"-\";\n msg += get_formatted_num(date.getMonth() + 1, 2) + \"-\";\n msg += get_formatted_num(date.getDate(), 2) + \" \";\n msg += get_formatted_num(date.getHours(), 2) + \":\";\n msg += get_formatted_num(date.getMinutes(), 2) + \":\";\n msg += get_formatted_num(date.getSeconds(), 2);\n return msg;\n}", "function formatDate(date) {\n var d = new Date(date),\n month = '' + (d.getMonth() + 1),\n day = '' + d.getDate(),\n year = d.getFullYear();\n \n if (month.length < 2) month = '0' + month;\n if (day.length < 2) day = '0' + day;\n \n return [year, month, day].join('-');\n }", "function formattedDate(date) {\n\n // Récupération\n var month = String(date.getMonth() + 1);\n var day = String(date.getDate());\n var year = String(date.getFullYear());\n\n // Ajout du 0\n if (month.length < 2) \n month = '0' + month;\n\n // Ajout du 0\n if (day.length < 2) \n day = '0' + day;\n\n return day+'/'+month+'/'+year;\n }", "function formatDate(date,format) {\n if (!format){\n format = \"yyyy-MM-dd\";\n }\n if (date === null){\n return null;\n }\n if (!(date instanceof Date)){\n date = new Date(date);\n }\n let day = date.getDate();\n let month = date.getMonth();\n let year = date.getFullYear();\n let hour = date.getHours();\n let min = date.getMinutes();\n let sec = date.getSeconds();\n\n let str = format.replace(\"yyyy\",year)\n .replace(\"MM\",fillString(month+1,2,-1,\"0\"))\n .replace(\"dd\",fillString(day,2,-1,\"0\"))\n .replace(\"HH\",fillString(hour,2,-1,\"0\"))\n .replace(\"mm\",fillString(min,2,-1,\"0\"))\n .replace(\"ss\",fillString(sec,2,-1,\"0\"))\n ;\n return str;\n }", "function prettyFormatDate(date) {\n return Utilities.formatDate(new Date(date), \"GMT-7\", \"MM/dd/yy\").toString();\n}", "function formatDate(date) {\n var newDate = new Date(date);\n var dd = newDate.getDate();\n var mm = newDate.getMonth() + 1; // January is 0!\n\n var yyyy = newDate.getFullYear();\n\n if (dd < 10) {\n dd = \"0\".concat(dd);\n }\n\n if (mm < 10) {\n mm = \"0\".concat(mm);\n }\n\n var formatedDate = \"\".concat(dd, \"/\").concat(mm, \"/\").concat(yyyy);\n return formatedDate;\n}", "function formatDate(date) {\n var day = date.getDate();\n var month = date.getMonth();\n var year = date.getFullYear();\n month++;\n if (month < 10)\n month = '0' + month;\n if (day < 10)\n day = '0' + day;\n return [year, month, day].join('-').toString();\n}", "formatDate(date) {\n return date.toISOString().replaceAll(\"-\", \"\").substring(0, 8);\n }", "function formatDate(date) {\n\t\tvar day = date.getDate();\n\t\t\n\t\t// Add '0' if needed\n\t\tif (parseInt(day / 10) == 0) {\n\t\t\tday = \"0\" + day;\n\t\t}\n\t\t\n\t\tvar month = date.getMonth() + 1; // months start at 0\n\t\t\n\t\t// Add '0' if needed\n\t\tif (parseInt(month / 10) == 0) {\n\t\t\tmonth = \"0\" + month;\n\t\t}\n\t\t\n\t\tvar year = date.getFullYear();\n\t\t\n\t\treturn day + \"/\" + month + \"/\" + year;\n\t}", "function formatDate(date) {\n\t\treturn (date.getMonth() + 1 + '/' + date.getDate() + '/' + date.getFullYear() + ' - ' + formatTime([date.getHours(), date.getMinutes()]));\n\t}", "function formatDate(date)\n{\n date = new Date(date * 1000);\n return '' + date.getFullYear() + '/' + lpad(date.getMonth(), 2, '0') + '/' + lpad(date.getDate(), 2, '0') + ' ' + lpad(date.getHours(), 2, '0') + ':' + lpad(date.getMinutes(), 2, '0');\n}", "function formatDate(date) {\n var d = new Date(date),\n month = '' + (d.getMonth() + 1),\n day = '' + d.getDate(),\n year = d.getFullYear();\n\n if (month.length < 2) {\n month = '0' + month;\n }\n if (day.length < 2) {\n day = '0' + day;\n }\n\n return [year, month, day].join('-');\n}", "_convertDateObjToString(obj) {\n\n let date = \"\";\n\n if (obj && obj.day && obj.month && obj.year) {\n let month = String(obj.month);\n let day = String(obj.day);\n let year = String(obj.year);\n\n if (month.length < 2) {\n month = \"0\" + month;\n }\n\n if (day.length < 2) {\n day = \"0\" + day;\n }\n\n if (year.length < 4) {\n var l = 4 - year.length;\n for (var i = 0; i < l; i++) {\n year = \"0\" + year;\n }\n }\n date = year + \"-\" + month + \"-\" + day;\n }\n\n return date;\n }", "formatDate(x) {\n let date = new Date(x)\n let _month = date.getMonth() + 1 < 10 ? `0${date.getMonth() + 1}` : date.getMonth() + 1\n let _date = date.getDate() < 10 ? `0${date.getDate()}` : date.getDate()\n let _hour = date.getHours() < 10 ? `0${date.getHours()}` : date.getHours()\n let _minute = date.getMinutes() < 10 ? `0${date.getMinutes()}` : date.getMinutes()\n let _second = date.getSeconds() < 10 ? `0${date.getSeconds()}` : date.getSeconds()\n let dateStr = `${date.getFullYear()}-${_month}-${_date} ${_hour}:${_minute}:${_second}`\n return dateStr\n }", "returnDateFormat(date){\n var day = new Date(date);\n return day.toDateString();\n }", "function formatDate (date) {\n if (date) {\n const year = date.getFullYear()\n const month = date.getMonth() + 1\n const day = date.getDate()\n return year + '-' + month.toString().padStart(2, '0') + '-' + day.toString().padStart(2, '0')\n } else {\n return ''\n }\n}", "formatDateTime(date, format) {\n date = new Date(date);\n var result = format || 'y-m-d h:i:s';\n result = result.replace('y', date.getFullYear());\n result = result.replace('m', this.pad(date.getMonth() + 1, 2));\n result = result.replace('d', this.pad(date.getDate(), 2));\n result = result.replace('h', this.pad(date.getHours(), 2));\n result = result.replace('i', this.pad(date.getMinutes(), 2));\n result = result.replace('s', this.pad(date.getSeconds(), 2));\n return result;\n }", "function formatDate(date) {\n var date = new Date(date * 1000);\n return `${date.getMonth() + 1}/${date.getDate()}/${date.getUTCFullYear()}`;\n}", "static formatDate(date) {\n let formattedDate = '';\n\n formattedDate += date.getUTCFullYear();\n formattedDate += '-' + ('0' + (date.getUTCMonth() + 1)).substr(-2);\n formattedDate += '-' + ('0' + date.getUTCDate()).substr(-2);\n\n return formattedDate;\n }", "formatted_date() {\n return this.created_at.toLocaleDateString()\n }", "function formatDate(date) {\n var year = date.getFullYear()\n var month = (1 + date.getMonth()).toString()\n var day = date.getUTCDate()\n return month + \"/\" + day + \"/\" + year\n}", "function formatDate(date){\n var yr = date.getFullYear();\n var mnth = date.getMonth()+1;\n if(mnth < 10){\n mnth = `0${mnth}`;\n }\n var day = date.getDate()\n if(day < 10){\n day = `0${day}`;\n }\n return yr+\"-\"+mnth+\"-\"+day;\n}", "function formatDate(date){\n var dd = date.getDate(),\n mm = date.getMonth()+1, //January is 0!\n yyyy = date.getFullYear();\n\n if(dd<10) dd='0'+dd;\n if(mm<10) mm='0'+mm;\n\n return yyyy+'-'+mm+'-'+dd;\n}", "function dateformat(date) {\n \n // Main array that will be used to sort out the date.\n let dateArray = date.split('-');\n // Sorts days\n let dayArray = dateArray[2].split('T');\n let day = dayArray[0];\n // Sets up month and year months\n let month = dateArray[1];\n let year = dateArray[0];\n // Using the global standard or writing DOB\n let formatedDOB = [day, month, year].join('-');\n // Retuns the data from the formatted DOB.\n return formatedDOB;\n }", "function formatDate ( date ) {\n return date.getDate() + nth(date.getDate()) + \" \" +\n months[date.getMonth()] + \" \" +\n date.getFullYear();\n}", "function formatDate(date) {\n if (date) {\n var formattedDate = new Date(date);\n return formattedDate.toLocaleDateString();\n } else {\n return null;\n }\n}", "function formatDate(date) {\n return date.getFullYear() + '-' +\n (date.getMonth() < 9 ? '0' : '') + (date.getMonth()+1) + '-' +\n (date.getDate() < 10 ? '0' : '') + date.getDate();\n}", "function formatDate(date, formatStr) {\n\t\treturn formatDateWithChunks(date, getFormatStringChunks(formatStr));\n\t}", "function formatDate(date) {\n\t\t\t\treturn date.getDate() + \"-\" + (date.getMonth()+1) + \"-\" + date.getFullYear();\n\t\t\t}", "function pgFormatDate(date) {\n /* Via http://stackoverflow.com/questions/3605214/javascript-add-leading-zeroes-to-date */\n return String(date.getFullYear()+'-'+(date.getMonth()+1)+'-'+date.getDate()); \n}", "function setFormatoDate(data) {\n let dd = (\"0\" + (data.getDate())).slice(-2);\n let mm = (\"0\" + (data.getMonth() + 1)).slice(-2);\n let yyyy = data.getFullYear();\n return dd + '/' + mm + '/' + yyyy;\n}", "function formatDate(date, format, options) {\n\treturn formatDates(date, null, format, options);\n}", "function formatDate(date, format, options) {\n\treturn formatDates(date, null, format, options);\n}", "function formatDate(date, format, options) {\n\treturn formatDates(date, null, format, options);\n}", "prettyBirthday() {//Can be put in method\n return dayjs(this.person.dob.date)\n .format('DD MMMM YYYY')//change in assignment to different format not default\n }", "function dateFormatter(date){\n var year = date.getFullYear();\n var month = date.getMonth() + 1;\n var day = date.getDate();\n return year + '-' + ('0' + month).slice(-2) + '-' + day; // the '0' and the slicing is for left padding\n}", "static formatDate (date, format) {\n let year = date.getFullYear(),\n month = Timer.zero(date.getMonth()+1),\n day = Timer.zero(date.getDate()),\n hours = Timer.zero(date.getHours()),\n minute = Timer.zero(date.getMinutes()),\n second = Timer.zero(date.getSeconds()),\n week = date.getDay();\n return format.replace(/yyyy/g, year)\n .replace(/MM/g, month)\n .replace(/dd/g, day)\n .replace(/hh/g, hours)\n .replace(/mm/g, minute)\n .replace(/ss/g, second)\n .replace(/ww/g, Timer.weekName(week));\n }", "function formatDate(date){\n var yyyy = date.getFullYear();\n var mm = date.getMonth() + 1;\n var dd = date.getDate();\n //console.log(\"This is dd\" + dd);\n if(dd<10){\n dd='0'+ dd;\n }\n if(mm<10){\n mm='0'+mm;\n } \n return ( mm + '/' + dd + '/' + yyyy);\n \n }", "function format(d) {\n const month = d.getMonth() >= 9 ? d.getMonth() + 1 : `0${d.getMonth() + 1}`;\n const day = d.getDate() >= 10 ? d.getDate() : `0${d.getDate()}`;\n const year = d.getFullYear();\n return `${month}/${day}/${year}`;\n}", "function formatDate(dateToConvert) {\n\treturn format(new Date(dateToConvert));\n}", "function formatDate(date) {\n var d = new Date(date),\n month = '' + (d.getMonth() + 1),\n day = '' + d.getDate(),\n year = d.getFullYear();\n if (month.length < 2) month = '0' + month;\n if (day.length < 2) day = '0' + day;\n return [year, month, day].join('-');\n }", "dateFormate(d) {\n const date = new Date(d)\n const j = date.getDate()\n const m = (date.getUTCMonth() + 1)\n const a = date.getUTCFullYear()\n return (\"0\" + j).slice(-2) + '/' + (\"0\" + m).slice(-2) + '/' + a\n }", "function formatDate(date) {\n let year = date.getFullYear();\n let month = date.getMonth() + 1;\n let day = date.getDate();\n return [year, month, day].join('-');\n}", "formatDate(value, format) {\n format = format || '';\n if (value) {\n return window.moment(value)\n .format(format);\n }\n return \"n/a\";\n }", "function formatDate(date) {\n result = \"\";\n if (date) {\n result += date.getDate() + \"/\"; // Day\n result += (date.getMonth() + 1) + \"/\";\n result += (date.getYear() + 1900);\n }\n return result;\n}", "formatDate(d) {\n return moment(d).format('DD/MM/YYYY')\n }", "function formattedDate(d = new Date()) {\n return [d.getDate(), d.getMonth() + 1, d.getFullYear()]\n .map((n) => (n < 10 ? `0${n}` : `${n}`))\n .join(\"/\")\n .concat(` at ${getTime(d)}`);\n }", "_formatDate(date, tzOffset) {\n let str = window.iotlg.dateFormat;\n let actualDate = new Date();\n actualDate.setTime(date.getTime() + this._getMilliseconds(tzOffset, UNIT_HOUR));\n let hours = (actualDate.getUTCHours());\n let day = (actualDate.getUTCDate());\n\n str = str.replace(\"yyyy\", actualDate.getUTCFullYear());\n str = str.replace(\"mm\", this._fillUp(actualDate.getUTCMonth() + 1, 2));\n str = str.replace(\"dd\", this._fillUp(day, 2));\n str = str.replace(\"hh\", this._fillUp(hours, 2));\n str = str.replace(\"MM\", this._fillUp(actualDate.getUTCMinutes(), 2));\n str = str.replace(\"ss\", this._fillUp(actualDate.getUTCSeconds(), 2));\n str = str.replace(\" \", \"\\n\");\n return str;\n }", "function formatDate(rawDate) {\n return rawDate.replace(/(\\d{4})[-/](\\d{2})[-/](\\d{2})/, '$3.$2.$1');\n}", "getDateFormated(date) {\n const formatDate = new Intl.DateTimeFormat('en-GB', {\n day: 'numeric',\n month: 'short',\n year: 'numeric'\n }).format;\n return formatDate(date);\n }", "function formatDate(val) {\n var d = new Date(val),\n day = d.getDate(),\n month = d.getMonth() + 1,\n year = d.getFullYear();\n\n if (day < 10) {\n day = \"0\" + day;\n }\n if (month < 10) {\n month = \"0\" + month;\n }\n return month + \"/\" + day + \"/\" + year;\n}", "function formattedDate(d = new Date) {\n\treturn [d.getDate(), d.getMonth()+1, d.getFullYear()]\n\t\t.map(n => n < 10 ? `0${n}` : `${n}`).join('/');\n }", "function reFormatDate(date) {\n const d= new Date(Date.parse(date));\n let mm = d.getMonth() + 1;\n const yyyy = d.getFullYear();\n let dd = d.getDate();\n\n if (dd < 10) {\n dd = `0${dd}`;\n }\n if (mm < 10) {\n mm = `0${mm}`;\n }\n return `${yyyy}-${mm}-${dd}`;\n }" ]
[ "0.7533655", "0.74216735", "0.73876154", "0.7384637", "0.73507214", "0.73370844", "0.73058504", "0.73006034", "0.72939163", "0.72939163", "0.72939163", "0.72215176", "0.7214274", "0.7211496", "0.7188798", "0.7183839", "0.717959", "0.71692467", "0.7167987", "0.71589184", "0.7137147", "0.7135941", "0.71159315", "0.70949113", "0.7062155", "0.7061702", "0.704997", "0.7048362", "0.7034888", "0.70273125", "0.7026322", "0.7014272", "0.700237", "0.69954133", "0.6985144", "0.69849676", "0.69846827", "0.69787604", "0.69786507", "0.69786507", "0.6977408", "0.69765383", "0.6970331", "0.696398", "0.6961488", "0.69580483", "0.6957751", "0.695213", "0.69506496", "0.6950212", "0.6943233", "0.6942603", "0.6942313", "0.6939577", "0.6935892", "0.6935427", "0.6934596", "0.6923221", "0.69163024", "0.6915547", "0.6912714", "0.6909236", "0.6897164", "0.68900824", "0.6888288", "0.6875787", "0.68712664", "0.6871072", "0.68708396", "0.686862", "0.68656", "0.686376", "0.68518955", "0.68477577", "0.6845531", "0.6839856", "0.68355703", "0.6835418", "0.6826715", "0.682562", "0.682562", "0.682562", "0.6824185", "0.68192273", "0.68173563", "0.68150216", "0.6811136", "0.68110794", "0.6810618", "0.68104863", "0.6809468", "0.6802738", "0.6802076", "0.67934597", "0.6791835", "0.6789839", "0.6787855", "0.6785557", "0.6785338", "0.67844766", "0.67791575" ]
0.0
-1
date from iso format
function configFromISO(config) { var i, l, string = config._i, match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), allowTime, dateFormat, timeFormat, tzFormat; if (match) { getParsingFlags(config).iso = true; for (i = 0, l = isoDates.length; i < l; i++) { if (isoDates[i][1].exec(match[1])) { dateFormat = isoDates[i][0]; allowTime = isoDates[i][2] !== false; break; } } if (dateFormat == null) { config._isValid = false; return; } if (match[3]) { for (i = 0, l = isoTimes.length; i < l; i++) { if (isoTimes[i][1].exec(match[3])) { // match[2] should be 'T' or space timeFormat = (match[2] || ' ') + isoTimes[i][0]; break; } } if (timeFormat == null) { config._isValid = false; return; } } if (!allowTime && timeFormat != null) { config._isValid = false; return; } if (match[4]) { if (tzRegex.exec(match[4])) { tzFormat = 'Z'; } else { config._isValid = false; return; } } config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); configFromStringAndFormat(config); } else { config._isValid = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isoDate(date)\n{\n\treturn date.getFullYear() + \"-\" + (date.getMonth() + 1) + \"-\" + date.getDate()\n}", "function dateFromISO8601(isostr) {\n var parts = isostr.match(/\\d+/g);\n var date = new Date(parts[0], parts[1] - 1, parts[2], parts[3], parts[4], parts[5]);\n var mm = date.getMonth() + 1;\n mm = (mm < 10) ? '0' + mm : mm;\n var dd = date.getDate();\n dd = (dd < 10) ? '0' + dd : dd;\n var yyyy = date.getFullYear();\n var finaldate = mm + '/' + dd + '/' + yyyy;\n return finaldate;\n }", "function parseIsoDate(dateStr) {\n \tif(dateStr.length <10) return null;\n \tvar d = dateStr.substring(0,10).split('-');\t\n \tfor(var i in d) { \n \t\td[i]=parseInt(d[i]);\n \t};\n \td[1] = d[1] -1;//month;\n \tvar t = dateStr.substring(11,19).split(':');\n \treturn new Date(d[0],d[1],d[2],t[0],t[1],t[2]);\n }", "function ISOdate(d) {\r\n\ttry {\r\n\t\treturn d.toISOString().slice(0,10);\r\n\t}catch(e){\r\n\t\treturn 'Invalid ';\r\n\t}\r\n}", "function isoStringToDate(match){var date=new Date(0);var tzHour=0;var tzMin=0;// match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\nvar dateSetter=match[8]?date.setUTCFullYear:date.setFullYear;var timeSetter=match[8]?date.setUTCHours:date.setHours;// if there is a timezone defined like \"+01:00\" or \"+0100\"\nif(match[9]){tzHour=Number(match[9]+match[10]);tzMin=Number(match[9]+match[11]);}dateSetter.call(date,Number(match[1]),Number(match[2])-1,Number(match[3]));var h=Number(match[4]||0)-tzHour;var m=Number(match[5]||0)-tzMin;var s=Number(match[6]||0);var ms=Math.round(parseFloat('0.'+(match[7]||0))*1000);timeSetter.call(date,h,m,s,ms);return date;}", "function datetoisostring() { // @return String:\r\n return uudate(this).ISO();\r\n}", "function parseISODate(str) {\n pieces = /(\\d{4})-(\\d{2})-(\\d{2})/g.exec(str);\n if (pieces === null)\n return null;\n var year = parseInt(pieces[1], 10),\n month = parseInt(pieces[2], 10),\n day = parseInt(pieces[3], 10);\n return new Date(year, month - 1, day); // In ISO, months are 1-12; in JavaScript, months are 0-11.\n }", "function toISODate(date) {\n return date.toISOString().split('T')[0];\n }", "convertISOToCalendarFormat(ISOdate) {\n const isoArray = ISOdate.toString().split(' ');\n let day = isoArray[2];\n const monthStr = isoArray[1];\n const year = isoArray[3];\n\n const month = convertMonthStringtoNumber(monthStr);\n\n day = day.length === 2 ? day : '0' + day;\n\n return year + '-' + month + '-' + day;\n }", "function dateFromIsoString(isoDateString) {\r\n return fastDateParse.apply(null, isoDateString.split(/\\D/));\r\n }", "function isoToDate(s) {\n if (s instanceof Date) { return s; }\n if (typeof s === 'string') { return new Date(s); }\n}", "function iso8601Decoder(isoStr) {\n return Date.parse(isoStr);\n }", "function formatIso(date) {\n\t return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n\t}", "function formatIso(date) {\n\t return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n\t}", "function formatIso(date) {\n\t return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n\t}", "function formatIso(date) {\n\t return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n\t}", "function parseIsoToTimestamp(_date) {\n if ( _date !== null ) {\n var s = $.trim(_date);\n s = s.replace(/-/, \"/\").replace(/-/, \"/\");\n s = s.replace(/-/, \"/\").replace(/-/, \"/\");\n s = s.replace(/:00.000/, \"\");\n s = s.replace(/T/, \" \").replace(/Z/, \" UTC\");\n s = s.replace(/([\\+\\-]\\d\\d)\\:?(\\d\\d)/, \" $1$2\"); // -04:00 -> -0400\n return Number(new Date(s));\n }\n return null;\n }", "function convertDate( date ){\n\tvar day;\n\tvar month;\n\tvar year;\n\n\t//Extract year, month and day\n\tmonth = date.substr(0,2);\n\tday = date.substr(3,2);\n\tyear = date.substr(6);\n\n\t//compile the ynab compatible format\n\tdate = (year + \"-\" + month + \"-\" + day);\n\t\n\treturn date;\n}", "function amzDate(date, short) {\n const result = date.toISOString().replace(/[:\\-]|\\.\\d{3}/g, '').substr(0, 17)\n if (short) {\n return result.substr(0, 8)\n }\n return result\n}", "function parseISOString(s) {\n var b = s.split(/\\D+/);\n return new Date(Date.UTC(b[0], --b[1], b[2], b[3], b[4], 0, 0));\n}", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function convertDate(date) {\n let day = date.substr(8, 2);\n let month = date.substr(5, 2);\n let year = date.substr(0, 4);\n date = day + \"/\" + month + \"/\" + year;\n return date;\n }", "function parseDate(isoString) {\n // Parse isoDateTimeString to JavaScript date object\n isoString = isoString.split('.', 1);\n return new Date(isoString[0] + '+00:00');\n }", "function isoDateFormat(strDateView) {\n return moment(strDateView, \"DD/MM/YYYY HH:mm\").format(\"YYYY-MM-DD HH:mm\")\n}", "function formatIso(date) {\n return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n}", "function formatIso(date) {\n return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n}", "function formatIso(date) {\n return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n}", "function formatIso(date) {\n return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n}", "function formatIso(date) {\n return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n}", "function formatIso(date) {\n return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n}", "function formatIso(date) {\n return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n}", "function _dateCoerce(obj) {\n return obj.toISOString();\n}", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 4; i > 0; i--) {\n if (match[i]) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i - 1] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 4; i > 0; i--) {\n if (match[i]) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i - 1] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 4; i > 0; i--) {\n if (match[i]) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i - 1] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function formatDateIso(date) {\n\tif (!date || date == null) {\n\t\treturn \"\";\n\t}\n\t\n\tvar jsDate = new Date(date);\n\t\n\t// get the calendar-date components of the iso date. \n\tvar YYYY = jsDate.getFullYear();\n\tvar MM = (jsDate.getMonth() + 1) < 10 ? '0' + (jsDate.getMonth() + 1) : (jsDate.getMonth() + 1); // month should be in the form 'MM'.\n\tvar DD = jsDate.getDate() < 10 ? '0' + jsDate.getDate() : jsDate.getDate(); // day should be in the form 'DD'.\n\t\n\t// get the clock-time components of the iso date.\n\tvar hh = jsDate.getHours() < 10 ? '0' + jsDate.getHours() : jsDate.getHours(); // hours should be in the form 'hh'.\n\tvar mm = jsDate.getMinutes() < 10 ? '0' + jsDate.getMinutes() : jsDate.getMinutes(); // minutes should be in the form 'mm'.\n\tvar ss = jsDate.getSeconds() < 10 ? '0' + jsDate.getSeconds() : jsDate.getSeconds(); // seconds should be in the form 'ss'.\n\tvar sss = '000'; //just hardcoded 000 for milliseconds...\n\t\n\t// assemble the iso date from the date and time components.\n\tvar isoDate = YYYY + '-' + MM + '-' + DD + 'T' + // add the date components.\n\t\thh + ':' + mm + ':' + ss + '.' + sss + 'Z'; // add the time components.\n\t\t\n\t// return the iso-formatted version of the date.\n\treturn isoDate;\n}", "function getDate(dateISO){ \n let appointmentDate = new Date(dateISO);\n const date = appointmentDate.getDate() +'/' + appointmentDate.getMonth() + '/'+ appointmentDate.getFullYear();\n return date;\n }", "static isoDateTime(date) {\n var pad;\n console.log('Util.isoDatetime()', date);\n console.log('Util.isoDatetime()', date.getUTCMonth().date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes, date.getUTCSeconds);\n pad = function(n) {\n if (n < 10) {\n return '0' + n;\n } else {\n return n;\n }\n };\n return date.getFullYear()(+'-' + pad(date.getUTCMonth() + 1) + '-' + pad(date.getUTCDate()) + 'T' + pad(date.getUTCHours()) + ':' + pad(date.getUTCMinutes()) + ':' + pad(date.getUTCSeconds()) + 'Z');\n }", "makeDateRFC3339(date) {\n var ret = this.dateStrings(date)\n return ret.year + \"-\" + ret.month + \"-\" + ret.day\n }", "function dateConverter(date){\r\n dateF = date.trim();\r\n let d = dateF.substring(0, 2);\r\n let m = dateF.substring(3,5);\r\n let y = dateF.substring(6,10);\r\n return(y +\"-\"+m+\"-\"+d);\r\n}", "function formatDateToISO(date) {\n return date.toISOString().split('T')[0];\n}", "function ISODateString(a){function b(a){return a<10?\"0\"+a:a}return a.getUTCFullYear()+\"-\"+b(a.getUTCMonth()+1)+\"-\"+b(a.getUTCDate())+\"T\"+b(a.getUTCHours())+\":\"+b(a.getUTCMinutes())+\":\"+b(a.getUTCSeconds())+\"Z\"}", "function isoToFormattedDate(timestamp) {\n\tvar date = new Date(timestamp);\n\treturn (date.getMonth() + 1) + '/' + date.getDate() + '/' + date.getFullYear();\n}", "isIsoFormat(value) {\n let dateRegex = RegExp('[0-9][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9]$');\n return dateRegex.test(value);\n }", "function parseDateFormat(date) {\n return $filter('date')(date, 'yyyy-MM-dd');\n }", "function isoDateString(date, extended) {\n date = (date === undefined ? new Date() : date);\n var dash = (extended === 1 ? \"-\" : \"\");\n var yr = date.getFullYear();\n var dd = (\"0\" + date.getDate()).slice(-2);\n var mm = (\"0\" + (date.getMonth()+1)).slice(-2);\n \n return yr.toString() + dash +\n mm.toString() + dash +\n dd.toString();\n}", "function ISO_2022() {}", "function ISO_2022() {}", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(string) {\n var format = 'YYYY-MM-DDT',\n i;\n if (isoRegex.exec(string)) {\n for (i = 0; i < 3; i++) {\n if (isoTimes[i][1].exec(string)) {\n format += isoTimes[i][0];\n break;\n }\n }\n return makeDateFromStringAndFormat(string, format + 'Z');\n }\n return new Date(string);\n }", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0; // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours; // if there is a timezone defined like \"+01:00\" or \"+0100\"\n\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0); // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n\n var ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function get_date(d) {\n var date1 = new Date(d.substr(0, 4), d.substr(5, 2) - 1, d.substr(8, 2), d.substr(11, 2), d.substr(14, 2), d.substr(17, 2));\n return date1;\n }", "function convert_date(str){var tmp=str.split(\".\");return new Date(tmp[1]+\"/\"+tmp[0]+\"/\"+tmp[2])}", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n moment.createFromInputFallback(config);\n }\n }", "function convertBritishToISO(date) {\r\n dateF = date.trim();\r\n let d = dateF.substring(0, 2);\r\n let m = dateF.substring(3,5);\r\n let y = dateF.substring(6,10);\r\n return(y +\"/\"+m+\"/\"+d);\r\n}", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n \n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function toISODate(date) { // yyyy-mm-dd\n \"use strict\";\n var yyyy, mm, dd;\n // JavaScript provides no simple way to format a date-only\n yyyy = \"\" + date.getFullYear();\n mm = date.getMonth() + 1; // Months go from 0 .. 11\n dd = date.getDate();\n // Need leading zeroes to form the yyyy-mm-dd pattern.\n if (mm < 10) {\n mm = \"0\" + mm; // This converts it to a string\n }\n if (dd < 10) {\n dd = \"0\" + dd; // This converts it to a string\n }\n return \"\" + yyyy + \"-\" + mm + \"-\" + dd;\n}", "function formatDate(isoDateStr) {\n var date = new Date(isoDateStr);\n var monthNames = [\n \"Jan\", \"Feb\", \"Mar\",\n \"Apr\", \"May\", \"Jun\", \"Jul\",\n \"Aug\", \"September\", \"Oct\",\n \"Nov\", \"Dec\"\n ];\n\n var day = date.getDate();\n var monthIndex = date.getMonth();\n var year = date.getFullYear();\n var yearStr = \"\";\n if (year != (new Date()).getFullYear()) {\n yearStr = \", \" + String(year);\n }\n\n return \" \" + monthNames[monthIndex] + \" \" + day + \" \" + yearStr;\n}", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function parseDate (date) {\n var d = '';\n var t = date.indexOf('T');\n let index = date.indexOf('-');\n \n if(index === -1 && t === 8){\n d += date.substring(0, 4) + '-';\n d += date.substring(4, 6) + '-';\n d += date.substring(6, 8) + date.substr(8);\n } else if (index > -1 && t === 10) {\n return date;\n } else {\n console.error('invalid date');\n return null;\n }\n return d;\n }", "function iso8601date() {\n var date = new Date();\n\n function pad(number) {\n return (number < 10 ? '0' : '') + number;\n }\n function pad3(number) {\n return (number < 10 ? '0' : (number < 100 ? '00' : '')) + number;\n }\n\n return date.getUTCFullYear() + '-' +\n pad(date.getUTCMonth() + 1) + '-' +\n pad(date.getUTCDay()) + ' ' +\n pad(date.getUTCHours()) + ':' +\n pad(date.getUTCMinutes()) + ':' +\n pad(date.getUTCSeconds()) + '.' +\n pad3(date.getUTCMilliseconds());\n}", "function toIsoDate(dateString) {\n var splitted = dateString.split(\"/\");\n return new Date(splitted[2], splitted[1] - 1, splitted[0]);\n}", "extractDateFormat() {\n const isoString = '2018-12-31T12:00:00.000Z' // example date\n\n const intlString = this.props.intl.formatDate(isoString) // generate a formatted date\n const dateParts = isoString.split('T')[0].split('-') // prepare to replace with pattern parts\n\n return intlString\n .replace(dateParts[2], 'dd')\n .replace(dateParts[1], 'MM')\n .replace(dateParts[0], 'yyyy')\n }", "makeDateObjectFromCompact(datestring) {\n if (datestring !== undefined && datestring.length === 8) {\n let year = parseInt(datestring.substring(0, 4))\n let month = parseInt(datestring.substring(4, 6)) - 1\n let day = parseInt(datestring.substring(6, 8))\n return new Date(year, month, day)\n } else {\n return \"\"\n }\n }", "function ISODateString(d){\n function pad(n){return n<10 ? '0'+n : n}\n return d.getUTCFullYear()+'-'\n + pad(d.getUTCMonth()+1)+'-'\n + pad(d.getUTCDate())+'T'\n + pad(d.getUTCHours())+':'\n + pad(d.getUTCMinutes())+':'\n + pad(d.getUTCSeconds())+'Z'}", "getFormattedDate ({ date }) {\n if (typeof date === 'string') {\n return format(parseISO(date), \"d 'de' MMMM', às' HH'h'mm\", {\n locale: ptBR\n })\n }\n return format(date, \"d 'de' MMMM', às' HH'h'mm\", {\n locale: ptBR\n })\n }", "function makeDateFromString(config) {\n\t parseISO(config);\n\t if (config._isValid === false) {\n\t delete config._isValid;\n\t moment.createFromInputFallback(config);\n\t }\n\t }", "function makeDateFromString(config) {\n\t parseISO(config);\n\t if (config._isValid === false) {\n\t delete config._isValid;\n\t moment.createFromInputFallback(config);\n\t }\n\t }", "function FormatDate(date) {\n return new Date( parseInt( date.substr(6) ) );\n}", "function convertDate(dateIn)\n{\n let dateYear = dateIn.charAt(0);\n dateYear += dateIn.charAt(1);\n dateYear += dateIn.charAt(2);\n dateYear += dateIn.charAt(3);\n\n let dateMonth = dateIn.charAt(5) + dateIn.charAt(6);\n let dateDay = dateIn.charAt(8) + dateIn.charAt(9);\n\n let dateOut = dateDay + '-' + dateMonth + '-' + dateYear;\n return dateOut;\n}", "function convertDate(date) {\n let day = date.substring(8);\n let month = date.substring(5, 7);\n let year = date.substring(2,4);\n let newDate = `${month} /${day} /${year}`;\n return newDate;\n}", "function to_date(x){\n return new Date(x.substring(0,4), x.substring(5,7)-1, x.substring(8,10), x.substring(11,13), x.substring(14,16), x.substring(17,19));\n}", "function getISOLocalDate(value) {\n if (!value) {\n return value;\n }\n\n var date = new Date(value);\n\n if (isNaN(date.getTime())) {\n throw new Error(\"Invalid date: \".concat(value));\n }\n\n var year = getYear(date);\n var month = \"0\".concat(getMonth(date)).slice(-2);\n var day = \"0\".concat(getDay(date)).slice(-2);\n return \"\".concat(year, \"-\").concat(month, \"-\").concat(day);\n}", "function getISOLocalDate(value) {\n if (!value) {\n return value;\n }\n\n var date = new Date(value);\n\n if (isNaN(date.getTime())) {\n throw new Error(\"Invalid date: \".concat(value));\n }\n\n var year = getYear(date);\n var month = \"0\".concat(getMonth(date)).slice(-2);\n var day = \"0\".concat(getDay(date)).slice(-2);\n return \"\".concat(year, \"-\").concat(month, \"-\").concat(day);\n}", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }" ]
[ "0.7161587", "0.7084152", "0.69561076", "0.68181574", "0.66757625", "0.66372114", "0.6559707", "0.6525335", "0.6466161", "0.6465599", "0.644205", "0.64171946", "0.6406543", "0.6406543", "0.6406543", "0.6406543", "0.63656497", "0.63241196", "0.6322188", "0.62742394", "0.62635076", "0.62635076", "0.62635076", "0.62635076", "0.6256379", "0.62237656", "0.6219025", "0.6201553", "0.6201553", "0.6201553", "0.6201553", "0.6201553", "0.6201553", "0.6201553", "0.6187698", "0.6187633", "0.618634", "0.618634", "0.61794", "0.61792564", "0.6172095", "0.613812", "0.61320627", "0.6129032", "0.609373", "0.6090011", "0.6071324", "0.60647243", "0.6062863", "0.60613644", "0.60613644", "0.606091", "0.606091", "0.606091", "0.606091", "0.606091", "0.6034974", "0.6000997", "0.5995632", "0.5995632", "0.5995632", "0.5995632", "0.5985886", "0.59761006", "0.5967464", "0.5967464", "0.59647685", "0.59567374", "0.59377056", "0.5936541", "0.5930827", "0.5930827", "0.5930827", "0.5930827", "0.5930827", "0.5930065", "0.5928079", "0.59234697", "0.5912456", "0.5900138", "0.5890115", "0.5882479", "0.58786935", "0.58786935", "0.58709115", "0.58588386", "0.5855063", "0.585465", "0.58419347", "0.58419347", "0.5841354", "0.5841354", "0.5841354", "0.5841354", "0.5841354", "0.5841354", "0.5841354", "0.5841354", "0.5841354", "0.5841354", "0.5841354" ]
0.0
-1
date from iso format or fallback
function configFromString(config) { var matched = aspNetJsonRegex.exec(config._i); if (matched !== null) { config._d = new Date(+matched[1]); return; } configFromISO(config); if (config._isValid === false) { delete config._isValid; utils_hooks__hooks.createFromInputFallback(config); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isoToDate(s) {\n if (s instanceof Date) { return s; }\n if (typeof s === 'string') { return new Date(s); }\n}", "function isoStringToDate(match){var date=new Date(0);var tzHour=0;var tzMin=0;// match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\nvar dateSetter=match[8]?date.setUTCFullYear:date.setFullYear;var timeSetter=match[8]?date.setUTCHours:date.setHours;// if there is a timezone defined like \"+01:00\" or \"+0100\"\nif(match[9]){tzHour=Number(match[9]+match[10]);tzMin=Number(match[9]+match[11]);}dateSetter.call(date,Number(match[1]),Number(match[2])-1,Number(match[3]));var h=Number(match[4]||0)-tzHour;var m=Number(match[5]||0)-tzMin;var s=Number(match[6]||0);var ms=Math.round(parseFloat('0.'+(match[7]||0))*1000);timeSetter.call(date,h,m,s,ms);return date;}", "function parseIsoDate(dateStr) {\n \tif(dateStr.length <10) return null;\n \tvar d = dateStr.substring(0,10).split('-');\t\n \tfor(var i in d) { \n \t\td[i]=parseInt(d[i]);\n \t};\n \td[1] = d[1] -1;//month;\n \tvar t = dateStr.substring(11,19).split(':');\n \treturn new Date(d[0],d[1],d[2],t[0],t[1],t[2]);\n }", "function makeDateFromString(config) {\n\t parseISO(config);\n\t if (config._isValid === false) {\n\t delete config._isValid;\n\t moment.createFromInputFallback(config);\n\t }\n\t }", "function makeDateFromString(config) {\n\t parseISO(config);\n\t if (config._isValid === false) {\n\t delete config._isValid;\n\t moment.createFromInputFallback(config);\n\t }\n\t }", "function ISOdate(d) {\r\n\ttry {\r\n\t\treturn d.toISOString().slice(0,10);\r\n\t}catch(e){\r\n\t\treturn 'Invalid ';\r\n\t}\r\n}", "function isoDate(date)\n{\n\treturn date.getFullYear() + \"-\" + (date.getMonth() + 1) + \"-\" + date.getDate()\n}", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "isIsoFormat(value) {\n let dateRegex = RegExp('[0-9][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9]$');\n return dateRegex.test(value);\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 4; i > 0; i--) {\n if (match[i]) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i - 1] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 4; i > 0; i--) {\n if (match[i]) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i - 1] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 4; i > 0; i--) {\n if (match[i]) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i - 1] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n\t\tparseISO(config);\n\t\tif (config._isValid === false) {\n\t\t\tdelete config._isValid;\n\t\t\tmoment.createFromInputFallback(config);\n\t\t}\n\t}", "function parseISODate(str) {\n pieces = /(\\d{4})-(\\d{2})-(\\d{2})/g.exec(str);\n if (pieces === null)\n return null;\n var year = parseInt(pieces[1], 10),\n month = parseInt(pieces[2], 10),\n day = parseInt(pieces[3], 10);\n return new Date(year, month - 1, day); // In ISO, months are 1-12; in JavaScript, months are 0-11.\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function dateFromISO8601(isostr) {\n var parts = isostr.match(/\\d+/g);\n var date = new Date(parts[0], parts[1] - 1, parts[2], parts[3], parts[4], parts[5]);\n var mm = date.getMonth() + 1;\n mm = (mm < 10) ? '0' + mm : mm;\n var dd = date.getDate();\n dd = (dd < 10) ? '0' + dd : dd;\n var yyyy = date.getFullYear();\n var finaldate = mm + '/' + dd + '/' + yyyy;\n return finaldate;\n }", "function validateDateFormat(sDateToBeProcressed) {\r\n \"use strict\";\r\n var oDates = new Date(sDateToBeProcressed);\r\n if (isNaN(oDates)) {\r\n var arrSplitedDate = sDateToBeProcressed.replace(/[-]/g, \"/\");\r\n arrSplitedDate = arrSplitedDate.split(\"/\");\r\n var sFormattedDate = arrSplitedDate[1] + \"-\" + arrSplitedDate[0] + \"-\" + arrSplitedDate[2];\r\n oDates = new Date(sFormattedDate);\r\n }\r\n return oDates.toISOString();\r\n}", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function parseIsoToTimestamp(_date) {\n if ( _date !== null ) {\n var s = $.trim(_date);\n s = s.replace(/-/, \"/\").replace(/-/, \"/\");\n s = s.replace(/-/, \"/\").replace(/-/, \"/\");\n s = s.replace(/:00.000/, \"\");\n s = s.replace(/T/, \" \").replace(/Z/, \" UTC\");\n s = s.replace(/([\\+\\-]\\d\\d)\\:?(\\d\\d)/, \" $1$2\"); // -04:00 -> -0400\n return Number(new Date(s));\n }\n return null;\n }", "function dateFromIsoString(isoDateString) {\r\n return fastDateParse.apply(null, isoDateString.split(/\\D/));\r\n }", "deserialize(value) {\n if (typeof value === 'string') {\n if (!value) {\n return null;\n }\n // The `Date` constructor accepts formats other than ISO 8601, so we need to make sure the\n // string is the right format first.\n if (ISO_8601_REGEX.test(value)) {\n let date = new Date(value);\n if (this.isValid(date)) {\n return date;\n }\n }\n }\n return super.deserialize(value);\n }", "deserialize(value) {\n if (typeof value === 'string') {\n if (!value) {\n return null;\n }\n // The `Date` constructor accepts formats other than ISO 8601, so we need to make sure the\n // string is the right format first.\n if (ISO_8601_REGEX.test(value)) {\n let date = new Date(value);\n if (this.isValid(date)) {\n return date;\n }\n }\n }\n return super.deserialize(value);\n }", "deserialize(value) {\n if (typeof value === 'string') {\n if (!value) {\n return null;\n }\n // The `Date` constructor accepts formats other than ISO 8601, so we need to make sure the\n // string is the right format first.\n if (ISO_8601_REGEX.test(value)) {\n let date = new Date(value);\n if (this.isValid(date)) {\n return date;\n }\n }\n }\n return super.deserialize(value);\n }", "getFormattedDate ({ date }) {\n if (typeof date === 'string') {\n return format(parseISO(date), \"d 'de' MMMM', às' HH'h'mm\", {\n locale: ptBR\n })\n }\n return format(date, \"d 'de' MMMM', às' HH'h'mm\", {\n locale: ptBR\n })\n }", "function universal() {\n return doFormat(date, {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n weekday: 'long',\n hour: 'numeric',\n minute: '2-digit',\n second: '2-digit'\n });\n }", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0; // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours; // if there is a timezone defined like \"+01:00\" or \"+0100\"\n\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0); // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n\n var ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n }", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function getISOLocalDate(value) {\n if (!value) {\n return value;\n }\n\n var date = new Date(value);\n\n if (isNaN(date.getTime())) {\n throw new Error(\"Invalid date: \".concat(value));\n }\n\n var year = getYear(date);\n var month = \"0\".concat(getMonth(date)).slice(-2);\n var day = \"0\".concat(getDay(date)).slice(-2);\n return \"\".concat(year, \"-\").concat(month, \"-\").concat(day);\n}", "function getISOLocalDate(value) {\n if (!value) {\n return value;\n }\n\n var date = new Date(value);\n\n if (isNaN(date.getTime())) {\n throw new Error(\"Invalid date: \".concat(value));\n }\n\n var year = getYear(date);\n var month = \"0\".concat(getMonth(date)).slice(-2);\n var day = \"0\".concat(getDay(date)).slice(-2);\n return \"\".concat(year, \"-\").concat(month, \"-\").concat(day);\n}", "function configFromISO(config) {\n if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__utils_type_checks__[\"b\" /* isString */])(config._i)) {\n return config;\n }\n var input = config._i;\n var match = extendedIsoRegex.exec(input) || basicIsoRegex.exec(input);\n var allowTime;\n var dateFormat;\n var timeFormat;\n var tzFormat;\n if (!match) {\n config._isValid = false;\n return config;\n }\n // getParsingFlags(config).iso = true;\n var i;\n var l;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return config;\n }\n if (match[3]) {\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return config;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return config;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n }\n else {\n config._isValid = false;\n return config;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__from_string_and_format__[\"a\" /* configFromStringAndFormat */])(config);\n}", "function parseDateFormat(date) {\n return $filter('date')(date, 'yyyy-MM-dd');\n }", "function configFromISO(config) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_1__utils_type_checks__[\"i\" /* isString */])(config._i)) {\n return config;\n }\n var input = config._i;\n var match = extendedIsoRegex.exec(input) || basicIsoRegex.exec(input);\n var allowTime;\n var dateFormat;\n var timeFormat;\n var tzFormat;\n if (!match) {\n config._isValid = false;\n return config;\n }\n // getParsingFlags(config).iso = true;\n var i;\n var l;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return config;\n }\n if (match[3]) {\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return config;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return config;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n }\n else {\n config._isValid = false;\n return config;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n return Object(__WEBPACK_IMPORTED_MODULE_2__from_string_and_format__[\"a\" /* configFromStringAndFormat */])(config);\n}", "function makeDateFromString(string) {\n var format = 'YYYY-MM-DDT',\n i;\n if (isoRegex.exec(string)) {\n for (i = 0; i < 3; i++) {\n if (isoTimes[i][1].exec(string)) {\n format += isoTimes[i][0];\n break;\n }\n }\n return makeDateFromStringAndFormat(string, format + 'Z');\n }\n return new Date(string);\n }", "normalize(str) {\n if (str && !CommonUtils.isDate(str)) {\n var match = str.match(/^(\\d{1,2})\\/(\\d{1,2})\\/(\\d{4})$/);\n if (match) {\n return new Date(match[3], match[2] - 1, match[1]);\n }\n match = str.match(/^(\\d{4})-(\\d{1,2})-(\\d{1,2})$/);\n if (match) {\n return new Date(match[1], match[2] - 1, match[3]);\n }\n }\n }", "function parseDate (date) {\n var d = '';\n var t = date.indexOf('T');\n let index = date.indexOf('-');\n \n if(index === -1 && t === 8){\n d += date.substring(0, 4) + '-';\n d += date.substring(4, 6) + '-';\n d += date.substring(6, 8) + date.substr(8);\n } else if (index > -1 && t === 10) {\n return date;\n } else {\n console.error('invalid date');\n return null;\n }\n return d;\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0; // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours; // if there is a timezone defined like \"+01:00\" or \"+0100\"\n\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0); // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "convertDateToISOString(date) {\n if (date) return moment(date, defaultDateFormat).toISOString();\n return date;\n }", "function isoDateFormat(strDateView) {\n return moment(strDateView, \"DD/MM/YYYY HH:mm\").format(\"YYYY-MM-DD HH:mm\")\n}", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n \n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0; // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours; // if there is a timezone defined like \"+01:00\" or \"+0100\"\n\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0); // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n\n var ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function _dateCoerce(obj) {\n return obj.toISOString();\n}", "function configFromISO(config){var i,l,string=config._i,match=extendedIsoRegex.exec(string)||basicIsoRegex.exec(string),allowTime,dateFormat,timeFormat,tzFormat;if(match){getParsingFlags(config).iso=true;for(i=0,l=isoDates.length;i<l;i++){if(isoDates[i][1].exec(match[1])){dateFormat=isoDates[i][0];allowTime=isoDates[i][2]!==false;break;}}if(dateFormat==null){config._isValid=false;return;}if(match[3]){for(i=0,l=isoTimes.length;i<l;i++){if(isoTimes[i][1].exec(match[3])){// match[2] should be 'T' or space\r\n\ttimeFormat=(match[2]||' ')+isoTimes[i][0];break;}}if(timeFormat==null){config._isValid=false;return;}}if(!allowTime&&timeFormat!=null){config._isValid=false;return;}if(match[4]){if(tzRegex.exec(match[4])){tzFormat='Z';}else{config._isValid=false;return;}}config._f=dateFormat+(timeFormat||'')+(tzFormat||'');configFromStringAndFormat(config);}else{config._isValid=false;}}// date from iso format or fallback", "function configFromISO(config){var i,l,string=config._i,match=extendedIsoRegex.exec(string)||basicIsoRegex.exec(string),allowTime,dateFormat,timeFormat,tzFormat;if(match){getParsingFlags(config).iso=true;for(i=0,l=isoDates.length;i<l;i++){if(isoDates[i][1].exec(match[1])){dateFormat=isoDates[i][0];allowTime=isoDates[i][2]!==false;break;}}if(dateFormat==null){config._isValid=false;return;}if(match[3]){for(i=0,l=isoTimes.length;i<l;i++){if(isoTimes[i][1].exec(match[3])){// match[2] should be 'T' or space\r\n\ttimeFormat=(match[2]||' ')+isoTimes[i][0];break;}}if(timeFormat==null){config._isValid=false;return;}}if(!allowTime&&timeFormat!=null){config._isValid=false;return;}if(match[4]){if(tzRegex.exec(match[4])){tzFormat='Z';}else{config._isValid=false;return;}}config._f=dateFormat+(timeFormat||'')+(tzFormat||'');configFromStringAndFormat(config);}else{config._isValid=false;}}// date from iso format or fallback", "function ISO_2022() {}", "function ISO_2022() {}", "function iso8601Decoder(isoStr) {\n return Date.parse(isoStr);\n }", "function parseISO(config) {\n\t var i, l,\n\t string = config._i,\n\t match = isoRegex.exec(string);\n\n\t if (match) {\n\t config._pf.iso = true;\n\t for (i = 0, l = isoDates.length; i < l; i++) {\n\t if (isoDates[i][1].exec(string)) {\n\t // match[5] should be 'T' or undefined\n\t config._f = isoDates[i][0] + (match[6] || ' ');\n\t break;\n\t }\n\t }\n\t for (i = 0, l = isoTimes.length; i < l; i++) {\n\t if (isoTimes[i][1].exec(string)) {\n\t config._f += isoTimes[i][0];\n\t break;\n\t }\n\t }\n\t if (string.match(parseTokenTimezone)) {\n\t config._f += 'Z';\n\t }\n\t makeDateFromStringAndFormat(config);\n\t } else {\n\t config._isValid = false;\n\t }\n\t }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }" ]
[ "0.69151974", "0.66991687", "0.6643978", "0.65537083", "0.65537083", "0.6520427", "0.6492825", "0.64871174", "0.6448661", "0.64316744", "0.64316744", "0.64103484", "0.64103484", "0.6407205", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.63858414", "0.6371779", "0.63675845", "0.63675845", "0.63675845", "0.63675845", "0.63675845", "0.6310807", "0.63043165", "0.6296922", "0.6296922", "0.6296922", "0.6296922", "0.62956905", "0.62956905", "0.62956905", "0.62956905", "0.62367827", "0.62285906", "0.62221026", "0.62221026", "0.62221026", "0.62183875", "0.61820984", "0.6167017", "0.6166754", "0.6166754", "0.6166754", "0.6166754", "0.6166754", "0.61617094", "0.61617094", "0.6147587", "0.61250347", "0.61188406", "0.611831", "0.6112176", "0.61092424", "0.6103642", "0.6103642", "0.6103642", "0.6103642", "0.6103642", "0.6071104", "0.60573643", "0.60538405", "0.60504943", "0.60102975", "0.60096854", "0.60056126", "0.60056126", "0.5989161", "0.5989161", "0.5979461", "0.5974252", "0.5971357", "0.5971357", "0.5971357", "0.5971161", "0.5971161", "0.5971161", "0.5971161", "0.5971161", "0.5971161" ]
0.0
-1
Pick the first defined of two or three arguments.
function defaults(a, b, c) { if (a != null) { return a; } if (b != null) { return b; } return c; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pick() {\n\tvar args = arguments,\n\t\ti,\n\t\targ,\n\t\tlength = args.length;\n\tfor (i = 0; i < length; i++) {\n\t\targ = args[i];\n\t\tif (typeof arg !== 'undefined' && arg !== null) {\n\t\t\treturn arg;\n\t\t}\n\t}\n}", "function pick() {\n\t\tvar args = arguments,\n\t\t\ti,\n\t\t\targ,\n\t\t\tlength = args.length;\n\t\tfor (i = 0; i < length; i++) {\n\t\t\targ = args[i];\n\t\t\tif (arg !== UNDEFINED && arg !== null) {\n\t\t\t\treturn arg;\n\t\t\t}\n\t\t}\n\t}", "function firstArg() {\n\treturn arguments != \"\" ? [...arguments].shift() : undefined;\n}", "function pick() {\n var args = arguments,\n i,\n arg,\n length = args.length;\n for (i = 0; i < length; i++) {\n arg = args[i];\n if (arg !== UNDEFINED && arg !== null) {\n return arg;\n }\n }\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", "function $pick() {\r\n\t\tfor (var i=0,l=arguments.length; i<l; i++) {\r\n\t\t\tif ($chk(arguments[i])) return arguments[i];\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "function v1() {\r\n for (var args = arguments, i = 0, l = args.length; i < l && args[i] == undefined; i++);\r\n return has(args, i) ? args[i] : args[l - 1];\r\n }", "function or() {\r\n\t\t\tvar remain = _.without(arguments, undefined); \r\n\t\t\tif (remain.length === 0)\r\n\t\t\t\treturn undefined;\r\n\t\t\treturn remain[0];\r\n\t\t}", "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}", "function f(x) {\n let firstArg = arguments[0];\n\n return firstArg;\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 }", "function get_arg_2() { return arguments[2]; }", "function mrcPick(arg, def) {\n return (typeof arg !== \"undefined\" ? arg : def);\n}", "function firstString() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n for (var i = 0; i < args.length; i++) {\n var arg = args[i];\n if (typeof arg === \"string\") {\n return arg;\n }\n }\n}", "function firstString() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n for (var i = 0; i < args.length; i++) {\r\n var arg = args[i];\r\n if (typeof arg === \"string\") {\r\n return arg;\r\n }\r\n }\r\n}", "function f(a, b, c, d, e, f) {\n let sixthArg = arguments[5];\n let thirdArg = arguments[2];\n\n return sixthArg;\n}", "function myOtherFunction (first_argument = second_argument, second_argument) {}", "function RandomArg()\n{\n\tvar r = Math.floor(Math.random()*arguments.length);\n\treturn arguments[r];\n}", "function getArg(aArgs,aName,aDefaultValue){if(aName in aArgs){return aArgs[aName];}else if(arguments.length===3){return aDefaultValue;}else{throw new Error('\"'+aName+'\" is a required argument.');}}", "function doWhat(first, second, third) {\n if (arguments.length != 3) {\n throw new Error(\"Excepts 3 arguments, but invoke with \" +\n arguments.length + \" arguments\");\n }\n}", "function randomChoice()\n{\n assert (\n arguments.length > 0,\n 'must supply at least one possible choice'\n );\n\n var idx = randomInt(0, arguments.length - 1);\n\n return arguments[idx];\n}", "function isTwoPassed(){\n var args = Array.prototype.slice.call(arguments);\n return args.indexOf(2) != -1;\n}", "function getArg(args, type, number) {\n var count = 1, number = (number || 1);\n for (var i = 0; i < args.length; i++) {\n //Check for type, If function then ensure \"callee\" is excluded\n if (typeof args[i] == type && !(type == \"function\" && args[i].name == \"callee\")) {\n if (number == 1) return args[i];\n else number++;\n }\n }\n }", "function abc(a,b) {\n var c = 6;\n return arguments[0] + b + c;\n}", "function foo() {\n\tvar a = arguments[0] !== (void 0) ? arguments[0] : 2;\n\tconsole.log( a );\n}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t }", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t }", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t }", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName]\n } else if (arguments.length === 3) {\n return aDefaultValue\n } else {\n throw new Error('\"' + aName + '\" is a required argument.')\n }\n }", "function getFirstElement ([a, b]) {\n let getArray = [a, b] \n return getArray[0]\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function one(a,...rest){\n console.log(a,rest)\n}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t\t if (aName in aArgs) {\n\t\t return aArgs[aName];\n\t\t } else if (arguments.length === 3) {\n\t\t return aDefaultValue;\n\t\t } else {\n\t\t throw new Error('\"' + aName + '\" is a required argument.');\n\t\t }\n\t\t}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function sayArguments(first, second) {\n first = first || 'first';\n second = second || 'second'; // || Значение по умолчанию\n let args = '';\n\n for (let i = 0; i < arguments.length; i++) {\n args += arguments[i] + ' ';\n }\n console.log( 'Arguments: ' + args );\n}", "function smallestValue(){\n return Math.min(...arguments);\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n }\n throw new Error('\"' + aName + '\" is a required argument.');\n\n}", "function test() {\n return arguments.slice(arguments.length - 1)[0]; //ERROR, there is not slice method\n}", "function getThirdArgument() {\n\n // Stores all possible arguments in array\n argumentArray = process.argv;\n\n // Loops through words in node argument\n for (var i = 3; i < argumentArray.length; i++) {\n argument += argumentArray[i];\n }\n return argument;\n}", "function oneOf(args) { }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}" ]
[ "0.7629042", "0.75575334", "0.74523604", "0.7447829", "0.6875494", "0.6672635", "0.6649544", "0.66400206", "0.65779024", "0.6487554", "0.64760274", "0.64054173", "0.62996894", "0.62969613", "0.62835485", "0.61632556", "0.61517835", "0.5961853", "0.59598327", "0.5933788", "0.5932596", "0.5919368", "0.588653", "0.58661693", "0.5844922", "0.5843471", "0.5843471", "0.5843471", "0.5843471", "0.5819852", "0.5816442", "0.5788889", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5775556", "0.57646376", "0.57646376", "0.57646376", "0.57646376", "0.57646376", "0.57646376", "0.57646376", "0.57646376", "0.57646376", "0.57646376", "0.57646376", "0.57646376", "0.5755687", "0.57524157", "0.5742633", "0.5736218", "0.572891", "0.57214624", "0.5666182", "0.5661547", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525" ]
0.0
-1
convert an array to a date. the array should mirror the parameters below note: all values past the year are optional and will default to the lowest possible value. [year, month, day , hour, minute, second, millisecond]
function configFromArray (config) { var i, date, input = [], currentDate, yearToUse; if (config._d) { return; } currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { dayOfYearFromWeekInfo(config); } //if the day of the year is set, figure out what it is if (config._dayOfYear) { yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); if (config._dayOfYear > daysInYear(yearToUse)) { getParsingFlags(config)._overflowDayOfYear = true; } date = createUTCDate(yearToUse, 0, config._dayOfYear); config._a[MONTH] = date.getUTCMonth(); config._a[DATE] = date.getUTCDate(); } // Default to current date. // * if no year, month, day of month are given, default to today // * if day of month is given, default month and year // * if month is given, default only year // * if year is given, don't default anything for (i = 0; i < 3 && config._a[i] == null; ++i) { config._a[i] = input[i] = currentDate[i]; } // Zero out whatever was not defaulted, including time for (; i < 7; i++) { config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i]; } // Check for 24:00:00.000 if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) { config._nextDay = true; config._a[HOUR] = 0; } config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); // Apply timezone offset from input. The actual utcOffset can be changed // with parseZone. if (config._tzm != null) { config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); } if (config._nextDay) { config._a[HOUR] = 24; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dateFromArray(input) {\n return new Date(input[0], input[1] || 0, input[2] || 1, input[3] || 0, input[4] || 0, input[5] || 0, input[6] || 0);\n }", "function dateFromArray(input) {\n return new Date(input[0], input[1] || 0, input[2] || 1, input[3] || 0, input[4] || 0, input[5] || 0, input[6] || 0);\n }", "function datearray(num)\n{\n var ret = []\n var day = Math.floor(num/1000000)\n ret.push(day)\n num = num-(day*1000000)\n var month = Math.floor(num/10000)\n ret.push(month)\n num = num-(month*10000)\n var year = Math.floor(num)\n ret.push(year)\n return ret\n}", "function SP_CreateDateObject(arrDate)\n{\n\tvar oDate;\n\t\n\tif(arrDate.length == 3)\n\t{\n\t\t// Check First Element is either day or year\n\t\t\n\t\tif(arrDate[0].length == 4) //means year , passing array date is of format yyyy-mmm-dd\n\t\t{\n\t\t\toDate = new Date(arrDate[0], --arrDate[1], arrDate[2]);\n\t\t}\n\t\telse //means day, passing array date is of format dd-mmm-yyyy \n\t\t{\n\t\t\toDate = new Date(arrDate[2], SP_GetMonthNumber(arrDate[1]), arrDate[0]);\t\t\n\t\t}\n\t}\n\telse\n\t{\n\t\toDate = new Date();\n\t}\n\t\n\treturn oDate;\n}", "function formArray (array, oneRMArray) {\n var data = []\n for (var i = 0; i < array.length; i++) {\n var d;\n var monthString = array[i].month.toString();\n var dayString = array[i].day.toString();\n var yearString = array[i].year.toString();\n var d = new Date(monthString + \"-\" + dayString + \"-\" + yearString);\n var dParsed = Date.parse(d);\n\n data[i] = {\n x: dParsed,\n y: oneRMArray[i]\n } \n }\n return data\n }", "function formatDATADate(dateArr) {\r\n\r\n var val = [];\r\n\r\n for (date in dateArr) {\r\n val.push(new Date(formatDate(date)).getTime());\r\n }\r\n\r\n return val;\r\n}", "makeArray(d) {\n var da = new Date(d);\n return [da.getUTCFullYear(), da.getUTCMonth() + 1, da.getUTCDate(), 0, 0, 0, 0];\n }", "function fillDate(array) {\n var last = array.length - 1;\n var firstDate = array[0].datestamp;\n var lastDate = array[last].datestamp;\n\n var fullarray = betweenDate(firstDate, lastDate);\n\n return fullarray;\n }", "fromArray(a) {\n var d = [].concat(a);\n d[1]--;\n return Date.UTC.apply(null, d);\n }", "function dateFromArray(config) {\n var i, date, input = [];\n\n if (config._d) {\n return;\n }\n\n for (i = 0; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // add the offsets to the time to be parsed so that we can have a clean array for checking isValid\n input[3] += config._tzh || 0;\n input[4] += config._tzm || 0;\n\n date = new Date(0);\n\n if (config._useUTC) {\n date.setUTCFullYear(input[0], input[1], input[2]);\n date.setUTCHours(input[3], input[4], input[5], input[6]);\n } else {\n date.setFullYear(input[0], input[1], input[2]);\n date.setHours(input[3], input[4], input[5], input[6]);\n }\n\n config._d = date;\n }", "function dateFromArray(config) {\n var i, date, input = [];\n\n if (config._d) {\n return;\n }\n\n for (i = 0; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // add the offsets to the time to be parsed so that we can have a clean array for checking isValid\n input[3] += config._tzh || 0;\n input[4] += config._tzm || 0;\n\n date = new Date(0);\n\n if (config._useUTC) {\n date.setUTCFullYear(input[0], input[1], input[2]);\n date.setUTCHours(input[3], input[4], input[5], input[6]);\n } else {\n date.setFullYear(input[0], input[1], input[2]);\n date.setHours(input[3], input[4], input[5], input[6]);\n }\n\n config._d = date;\n }", "function dateFromArray(config) {\n var i, date, input = [];\n\n if (config._d) {\n return;\n }\n\n for (i = 0; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // add the offsets to the time to be parsed so that we can have a clean array for checking isValid\n input[3] += config._tzh || 0;\n input[4] += config._tzm || 0;\n\n date = new Date(0);\n\n if (config._useUTC) {\n date.setUTCFullYear(input[0], input[1], input[2]);\n date.setUTCHours(input[3], input[4], input[5], input[6]);\n } else {\n date.setFullYear(input[0], input[1], input[2]);\n date.setHours(input[3], input[4], input[5], input[6]);\n }\n\n config._d = date;\n }", "function dateFromArray(config) {\n var i, date, input = [];\n\n if (config._d) {\n return;\n }\n\n for (i = 0; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // add the offsets to the time to be parsed so that we can have a clean array for checking isValid\n input[3] += config._tzh || 0;\n input[4] += config._tzm || 0;\n\n date = new Date(0);\n\n if (config._useUTC) {\n date.setUTCFullYear(input[0], input[1], input[2]);\n date.setUTCHours(input[3], input[4], input[5], input[6]);\n } else {\n date.setFullYear(input[0], input[1], input[2]);\n date.setHours(input[3], input[4], input[5], input[6]);\n }\n\n config._d = date;\n }", "function dateFromArray(config) {\n var i, date, input = [];\n\n if (config._d) {\n return;\n }\n\n for (i = 0; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // add the offsets to the time to be parsed so that we can have a clean array for checking isValid\n input[3] += config._tzh || 0;\n input[4] += config._tzm || 0;\n\n date = new Date(0);\n\n if (config._useUTC) {\n date.setUTCFullYear(input[0], input[1], input[2]);\n date.setUTCHours(input[3], input[4], input[5], input[6]);\n } else {\n date.setFullYear(input[0], input[1], input[2]);\n date.setHours(input[3], input[4], input[5], input[6]);\n }\n\n config._d = date;\n }", "function dateFromArray(config) {\n var i, date, input = [];\n\n if (config._d) {\n return;\n }\n\n for (i = 0; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // add the offsets to the time to be parsed so that we can have a clean array for checking isValid\n input[3] += ~~((config._tzm || 0) / 60);\n input[4] += ~~((config._tzm || 0) % 60);\n\n date = new Date(0);\n\n if (config._useUTC) {\n date.setUTCFullYear(input[0], input[1], input[2]);\n date.setUTCHours(input[3], input[4], input[5], input[6]);\n } else {\n date.setFullYear(input[0], input[1], input[2]);\n date.setHours(input[3], input[4], input[5], input[6]);\n }\n\n config._d = date;\n }", "function dateFromArray(config) {\n var i, date, input = [];\n\n if (config._d) {\n return;\n }\n\n for (i = 0; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // add the offsets to the time to be parsed so that we can have a clean array for checking isValid\n input[3] += ~~((config._tzm || 0) / 60);\n input[4] += ~~((config._tzm || 0) % 60);\n\n date = new Date(0);\n\n if (config._useUTC) {\n date.setUTCFullYear(input[0], input[1], input[2]);\n date.setUTCHours(input[3], input[4], input[5], input[6]);\n } else {\n date.setFullYear(input[0], input[1], input[2]);\n date.setHours(input[3], input[4], input[5], input[6]);\n }\n\n config._d = date;\n }", "function dateFromArray(config) {\n var i, date, input = [];\n\n if (config._d) {\n return;\n }\n\n for (i = 0; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // add the offsets to the time to be parsed so that we can have a clean array for checking isValid\n input[3] += ~~((config._tzm || 0) / 60);\n input[4] += ~~((config._tzm || 0) % 60);\n\n date = new Date(0);\n\n if (config._useUTC) {\n date.setUTCFullYear(input[0], input[1], input[2]);\n date.setUTCHours(input[3], input[4], input[5], input[6]);\n } else {\n date.setFullYear(input[0], input[1], input[2]);\n date.setHours(input[3], input[4], input[5], input[6]);\n }\n\n config._d = date;\n }", "function BuildDates(date){\r\n var array = new Array();\r\n array['day'] = (date.getDate() < 10) ?\r\n '0' + date.getDate().toString() :\r\n date.getDate().toString();\r\n \r\n array['month'] = (date.getMonth() < 9) ?\r\n '0' + (date.getMonth()+1).toString() :\r\n (date.getMonth()+1).toString();\r\n \r\n array['year'] = date.getFullYear().toString();\r\n return array;\r\n}", "function date() {\n return new Date(year, ...arguments)\n }", "function dateFromArray(config) {\n var i, date, input = [], currentDate;\n\n if (config._d) {\n return;\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n currentDate = currentDateArray(config);\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // add the offsets to the time to be parsed so that we can have a clean array for checking isValid\n input[3] += ~~((config._tzm || 0) / 60);\n input[4] += ~~((config._tzm || 0) % 60);\n\n date = new Date(0);\n\n if (config._useUTC) {\n date.setUTCFullYear(input[0], input[1], input[2]);\n date.setUTCHours(input[3], input[4], input[5], input[6]);\n } else {\n date.setFullYear(input[0], input[1], input[2]);\n date.setHours(input[3], input[4], input[5], input[6]);\n }\n\n config._d = date;\n }", "function createDateArray( date ) {\r\n return date.split( '-' ).map(function( value ) { return +value })\r\n }", "function makeFriendlyDates(arr) {\n var months = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\n var start = arr[0].split('-'), startStr = '';\n var end = arr[1].split('-'), endStr = '';\n var result = [];\n function toNum(str) {\n return +str;\n }\n // convert to readable day formant\n function dayFormat(day) {\n switch (day) {\n case 1:\n case 21:\n return day + 'st';\n case 2:\n case 22:\n return day + 'nd';\n case 3:\n case 23:\n return day + 'rd';\n default:\n return day + 'th';\n }\n }\n start = start.map(toNum);\n end = end.map(toNum);\n var startYear = start[0], startMonth = start[1], startDay = start[2];\n var endYear = end[0], endMonth = end[1], endDay = end[2];\n // ending date equals to starting date\n if (arr[0] === arr[1]) {\n result.push(months[startMonth - 1] + ' ' + dayFormat(startDay) + ', ' + startYear);\n return result;\n }\n startStr += months[startMonth - 1] + ' ' + dayFormat(startDay);\n if (endYear === startYear) {\n if (startYear !== 2016) {\n startStr += ', ' + startYear; \n }\n if (endMonth === startMonth ) {\n endStr += dayFormat(endDay); // two dates within a month, just output ending day\n } else {\n endStr += months[endMonth - 1] + ' ' + dayFormat(endDay);\n }\n } else if (endYear - startYear === 1) {\n if (endMonth === startMonth && endDay < startDay || endMonth < startMonth) { // within one year\n endStr += months[endMonth - 1] + ' ' + dayFormat(endDay);\n if (startYear !== 2016) {\n startStr += ', ' + startYear; \n }\n } else if (endMonth >= startMonth) { // exceed one year\n startStr += ', ' + startYear;\n endStr += months[endMonth - 1] + ' ' + dayFormat(endDay) + ', ' + endYear;\n }\n } else if (endYear - startYear > 1) { // exceed one year\n startStr += ', ' + startYear;\n endStr += months[endMonth - 1] + ' ' + dayFormat(endDay) + ', ' + endYear;\n }\n\n result.push(startStr, endStr);\n return result;\n}", "function makeDateArray(weatherData, array){\n weatherData.data.forEach((item, index) => {\n Object.keys(item).forEach(key => {\n if(key === \"datetime\") {\n array.push(dateFormat(weatherData.data[index][key]));\n return array;\n }\n });\n });\n}", "formatDateForArray(date, month, year) {\n //console.log('month-->'+month+'date-->'+date);\n if (month <= 9 ) \n month = '0' + (month+1);\n if (date <= 9) \n date = '0' + (date);\n\n return [year, month, date].join('-');\n }", "parseDate(arrayOfStrings)\n {\n let newStr=arrayOfStrings[3];\n newStr += '-';\n switch(arrayOfStrings[1])\n {\n case 'Jan':\n newStr+='01';\n break;\n case 'Feb':\n newStr+='02';\n break;\n case 'Mar':\n newStr+='03';\n break;\n case 'Apr':\n newStr+='04';\n break;\n case 'May':\n newStr+='05';\n break;\n case 'Jun':\n newStr+='06';\n break;\n case 'Jul':\n newStr+='07';\n break;\n case 'Aug':\n newStr+='08';\n break;\n case 'Sep':\n newStr+='09';\n break;\n case 'Oct':\n newStr+='10';\n break;\n case 'Nov':\n newStr+='11';\n break;\n case 'Dec':\n newStr+='12';\n break;\n default:\n break;\n }\n newStr+='-';\n newStr+=arrayOfStrings[2];\n\n return newStr;\n }", "function sortByYear\n(\n array\n) \n{\n return array.sort(function(a,b)\n {\n var x = parseInt(a.number.split('-')[1]);\n var y = parseInt(b.number.split('-')[1]);\n return ((x < y) ? -1 : ((x > y) ? 0 : 1));\n }).reverse();\n}", "function frmt_date(a,field) {\n for(var i=0; i < a.length; i++){\n if( ! a[i][field] ) { continue }\n var d = new Date(a[i][field] * 1000)\n a[i][field] = d.toISOString().substr(0,16).replace('T',' ')\n }\n return(a)\n}", "function date2arr(date)\r\n{\r\n\t//\tdate = yyyy-mm-dd\r\n\tif(date != null && date.length > 0 && date.toLowerCase() != \"null\")\r\n\t{\r\n\t\tvar tmp = date.split(\"-\");\r\n\t\tvar arr = new Array();\r\n\t\tarr[0] = tmp[2];\r\n\t\tarr[1] = tmp[1];\r\n\t\tarr[2] = Number(tmp[0]);\r\n\t\treturn arr;\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn null;\r\n\t}\r\n}", "function normalizeDate(year, month, day) {\n return [year.padStart(4, '2000'), month.padStart(2, '0'), day.padStart(2, '0')];\n }", "function transformSortDate(arr) {\n const sortedArray = arr.sort((a, b) => {\n return b.timestamp + a.timestamp;\n });\n return sortedArray;\n}", "function dateStringToObject(date){\n var splitString = date.split(\"-\");// gonna set up our YYYY-MM-DD format\n var dateObject = {}; // object variable we will push results to\n // date should have a year(1), month(2), day(3) array input\n dateObject.year = splitString[0];\n dateObject.month = splitString[1];\n dateObject.day = splitString[2];\n return dateObject;\n} //(OPTION 1)", "function textifyDates(myArr){\n \n \n for(var r=0; r < myArr.length; r++){\n for(var c=0; c < myArr[r].length; c++){\n if (Object.prototype.toString.call(myArr[r][c]) === '[object Date]'){\n try { \n //myArr[r] = myArr[r].toString();\n myArr[r] = Utilities.formatDate(myArr[r], \"GMT+08:00\", \"dd-MMM-yyyy\")\n } \n catch(err) { myArr[r][c] = err};\n }\n }\n }\n return myArr;\n}", "function dateToUnix(dateArr){\n var d = new Date(dateArr[2],months.indexOf(getMonth(dateArr)),dateArr[1].substr(0,dateArr[1].length-1),0,0,0,0);\n return d.valueOf() / 1000 -18000;\n}", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function gregorianDateArrToStr([year, month, day]): string {\n return moment.utc([year, month - 1, day]).format('YYYY-MM-DD');\n}", "function toDate(value){if(isDate(value)){return value;}if(typeof value==='number'&&!isNaN(value)){return new Date(value);}if(typeof value==='string'){value=value.trim();var parsedNb=parseFloat(value);// any string that only contains numbers, like \"1234\" but not like \"1234hello\"\nif(!isNaN(value-parsedNb)){return new Date(parsedNb);}if(/^(\\d{4}-\\d{1,2}-\\d{1,2})$/.test(value)){/* For ISO Strings without time the day, month and year must be extracted from the ISO String\n before Date creation to avoid time offset and errors in the new Date.\n If we only replace '-' with ',' in the ISO String (\"2015,01,01\"), and try to create a new\n date, some browsers (e.g. IE 9) will throw an invalid Date error.\n If we leave the '-' (\"2015-01-01\") and try to create a new Date(\"2015-01-01\") the timeoffset\n is applied.\n Note: ISO months are 0 for January, 1 for February, ... */var _a=Object(tslib__WEBPACK_IMPORTED_MODULE_1__[\"__read\"])(value.split('-').map(function(val){return+val;}),3),y=_a[0],m=_a[1],d=_a[2];return new Date(y,m-1,d);}var match=void 0;if(match=value.match(ISO8601_DATE_REGEX)){return isoStringToDate(match);}}var date=new Date(value);if(!isDate(date)){throw new Error(\"Unable to convert \\\"\"+value+\"\\\" into a date\");}return date;}", "function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== config._d.getDay()) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }", "function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== config._d.getDay()) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }", "function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== config._d.getDay()) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }", "function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function convertDates(d) {\n\tfor (var i = d.length; i--;)\n\t\tconvertDateObj(d[i]);\n\treturn d;\n}", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray(config) {\n var i, date, input = [],\n currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray(config) {\n var i, date, input = [],\n currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray(config) {\n var i, date, input = [],\n currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray(config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function makeDateObjects(data){\r\n\t\tconsole.log(\"makeDateObjects\");\r\n\t\tfor (i = 0; i < data.length; i++){\r\n\t\t\tvar datestring = data[i][selectedOptions.dateField];\r\n\t\t\tvar thisYear = parseInt(datestring.substring(0,4));\r\n\t\t\tvar thisMonth = parseInt(datestring.substring(5,7));\r\n\t\t\tvar thisDay = parseInt(datestring.substring(8,10));\r\n\t\t\tvar thisDateComplete = new Date(thisYear, thisMonth-1, thisDay); // JS-Date Month begins at 0\r\n\t\t\tzaehlstellen_data[i][selectedOptions.dateField] = thisDateComplete;\r\n\t\t}\r\n\t}" ]
[ "0.7056393", "0.7056393", "0.69695306", "0.68494344", "0.6635454", "0.64599293", "0.6130074", "0.61271924", "0.6068227", "0.6014711", "0.6014711", "0.6014711", "0.6014711", "0.6014711", "0.5961244", "0.5961244", "0.5961244", "0.59004784", "0.5884784", "0.58764523", "0.58684814", "0.58021784", "0.57677615", "0.56831115", "0.5650784", "0.56165034", "0.5613269", "0.55993587", "0.55606776", "0.5517379", "0.55024403", "0.5437908", "0.53872424", "0.52927345", "0.52906287", "0.5288975", "0.52865374", "0.52865374", "0.52865374", "0.52865374", "0.52737993", "0.5259408", "0.5259159", "0.5258298", "0.5258298", "0.5258298", "0.52558404", "0.5255027" ]
0.0
-1
date from string and format string
function configFromStringAndFormat(config) { // TODO: Move this to another part of the creation flow to prevent circular deps if (config._f === utils_hooks__hooks.ISO_8601) { configFromISO(config); return; } config._a = []; getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC` var string = '' + config._i, i, parsedInput, tokens, token, skipped, stringLength = string.length, totalParsedInputLength = 0; tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; for (i = 0; i < tokens.length; i++) { token = tokens[i]; parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; // console.log('token', token, 'parsedInput', parsedInput, // 'regex', getParseRegexForToken(token, config)); if (parsedInput) { skipped = string.substr(0, string.indexOf(parsedInput)); if (skipped.length > 0) { getParsingFlags(config).unusedInput.push(skipped); } string = string.slice(string.indexOf(parsedInput) + parsedInput.length); totalParsedInputLength += parsedInput.length; } // don't parse if it's not a known token if (formatTokenFunctions[token]) { if (parsedInput) { getParsingFlags(config).empty = false; } else { getParsingFlags(config).unusedTokens.push(token); } addTimeToArrayFromToken(token, parsedInput, config); } else if (config._strict && !parsedInput) { getParsingFlags(config).unusedTokens.push(token); } } // add remaining unparsed input length to the string getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; if (string.length > 0) { getParsingFlags(config).unusedInput.push(string); } // clear _12h flag if hour is <= 12 if (getParsingFlags(config).bigHour === true && config._a[HOUR] <= 12 && config._a[HOUR] > 0) { getParsingFlags(config).bigHour = undefined; } // handle meridiem config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); configFromArray(config); checkOverflow(config); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeDateFromStringAndFormat(string, format) {\n var datePartArray = [0, 0, 1, 0, 0, 0, 0],\n config = {\n tzh : 0, // timezone hour offset\n tzm : 0 // timezone minute offset\n },\n tokens = format.match(formattingTokens),\n i, parsedInput;\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0];\n string = string.replace(getParseRegexForToken(tokens[i]), '');\n addTimeToArrayFromToken(tokens[i], parsedInput, datePartArray, config);\n }\n // handle am pm\n if (config.isPm && datePartArray[3] < 12) {\n datePartArray[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config.isPm === false && datePartArray[3] === 12) {\n datePartArray[3] = 0;\n }\n // handle timezone\n datePartArray[3] += config.tzh;\n datePartArray[4] += config.tzm;\n // return\n return config.isUTC ? new Date(Date.UTC.apply({}, datePartArray)) : dateFromArray(datePartArray);\n }", "function format_date(d_str) {\n return new Date(d_str.replace(/(\\d{2}).(\\d{2}).(\\d{4})/, \"$2/$1/$3\"))\n}", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens);\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i], config).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n\n // add remaining unparsed input to the string\n if (string) {\n config._il = string;\n }\n\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function get_date_from_string(date_str){\n var parts =date_str.split('-');\n if(parts[0].length == 6){\n // working with date format DDMMYY\n var date_list = parts[0].match(/.{1,2}/g);\n var result_date = new Date(date_list[2].padStart(4, '20'), date_list[1]-1, date_list[0])\n return result_date;\n }else if(parts[0].length == 2){\n var result_date = new Date(parts[2].padStart(4, '20'), parts[1]-1, parts[0]);\n return result_date;\n }else{\n // unknown format. Do nothing\n return\n }\n}", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i], config).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n\n // add remaining unparsed input to the string\n if (string) {\n config._il = string;\n }\n\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i], config).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n\n // add remaining unparsed input to the string\n if (string) {\n config._il = string;\n }\n\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i], config).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n\n // add remaining unparsed input to the string\n if (string) {\n config._il = string;\n }\n\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function parseDate(str) {\n var m = str.match(/^(\\d{4})\\-(\\d{1,2})\\-(\\d{1,2})/);\n return (m) ? `${m[2]}/${m[3]}/${m[1]}` : null;\n}", "function convert_date(str){var tmp=str.split(\".\");return new Date(tmp[1]+\"/\"+tmp[0]+\"/\"+tmp[2])}", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 4; i > 0; i--) {\n if (match[i]) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i - 1] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 4; i > 0; i--) {\n if (match[i]) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i - 1] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function str2date(str) {\n\t\t\ttry {\n\t\t\t\tvar t = (str).split(/[- :]/);\n\t\t\t\treturn new Date(t[0], t[1]-1, t[2], t[3], t[4], t[5]);\n\t\t\t} catch (err) {\n\t\t\t\talert(err);\n\t\t\t}\n\t\t}", "function str2date(str) {\n\t\t\ttry {\n\t\t\t\tvar t = (str).split(/[- :]/);\n\t\t\t\treturn new Date(t[0], t[1]-1, t[2], t[3], t[4], t[5]);\n\t\t\t} catch (err) {\n\t\t\t\talert(err);\n\t\t\t}\n\t\t}", "function makeDateFromStringAndFormat(string, format) {\n var inArray = [0, 0, 1, 0, 0, 0, 0],\n timezoneHours = 0,\n timezoneMinutes = 0,\n isUsingUTC = false,\n inputParts = string.match(inputCharacters),\n formatParts = format.match(tokenCharacters),\n len = Math.min(inputParts.length, formatParts.length),\n i,\n isPm;\n\n // function to convert string input to date\n function addTime(format, input) {\n var a;\n switch (format) {\n // MONTH\n case 'M' :\n // fall through to MM\n case 'MM' :\n inArray[1] = ~~input - 1;\n break;\n case 'MMM' :\n // fall through to MMMM\n case 'MMMM' :\n for (a = 0; a < 12; a++) {\n if (moment.monthsParse[a].test(input)) {\n inArray[1] = a;\n break;\n }\n }\n break;\n // DAY OF MONTH\n case 'D' :\n // fall through to DDDD\n case 'DD' :\n // fall through to DDDD\n case 'DDD' :\n // fall through to DDDD\n case 'DDDD' :\n inArray[2] = ~~input;\n break;\n // YEAR\n case 'YY' :\n input = ~~input;\n inArray[0] = input + (input > 70 ? 1900 : 2000);\n break;\n case 'YYYY' :\n inArray[0] = ~~Math.abs(input);\n break;\n // AM / PM\n case 'a' :\n // fall through to A\n case 'A' :\n isPm = (input.toLowerCase() === 'pm');\n break;\n // 24 HOUR\n case 'H' :\n // fall through to hh\n case 'HH' :\n // fall through to hh\n case 'h' :\n // fall through to hh\n case 'hh' :\n inArray[3] = ~~input;\n break;\n // MINUTE\n case 'm' :\n // fall through to mm\n case 'mm' :\n inArray[4] = ~~input;\n break;\n // SECOND\n case 's' :\n // fall through to ss\n case 'ss' :\n inArray[5] = ~~input;\n break;\n // TIMEZONE\n case 'Z' :\n // fall through to ZZ\n case 'ZZ' :\n isUsingUTC = true;\n a = (input || '').match(timezoneParseRegex);\n if (a && a[1]) {\n timezoneHours = ~~a[1];\n }\n if (a && a[2]) {\n timezoneMinutes = ~~a[2];\n }\n // reverse offsets\n if (a && a[0] === '+') {\n timezoneHours = -timezoneHours;\n timezoneMinutes = -timezoneMinutes;\n }\n break;\n }\n }\n for (i = 0; i < len; i++) {\n addTime(formatParts[i], inputParts[i]);\n }\n // handle am pm\n if (isPm && inArray[3] < 12) {\n inArray[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (isPm === false && inArray[3] === 12) {\n inArray[3] = 0;\n }\n // handle timezone\n inArray[3] += timezoneHours;\n inArray[4] += timezoneMinutes;\n // return\n return isUsingUTC ? new Date(Date.UTC.apply({}, inArray)) : dateFromArray(inArray);\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 4; i > 0; i--) {\n if (match[i]) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i - 1] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function dateParser(strDate, format){\nif(!checkValidDate(strDate))\nreturn new Date();\n\nvar slash1 = strDate.indexOf(\"/\");\nif (slash1 == -1) { slash1 = strDate.indexOf(\"-\"); }\n// if no slashes or dashes, invalid date\nif (slash1 == -1) { return false; }\nvar dateYear = strDate.substring(0, slash1);\nvar dateYearAndMonth = strDate.substring(slash1+1, strDate.length);\nvar slash2 = dateYearAndMonth.indexOf(\"/\");\nif (slash2 == -1) { slash2 = dateYearAndMonth.indexOf(\"-\"); }\n// if not a second slash or dash, invalid date\nif (slash2 == -1) { return false; }\nvar dateMonth = dateYearAndMonth.substring(0, slash2);\nvar dateDay = dateYearAndMonth.substring(slash2+1, dateYearAndMonth.length);\nvar retDate = new Date(dateYear,dateMonth-1,dateDay);\nreturn retDate;\n}", "function stringToDate(_date,_format,_delimiter)\r\n{\r\n var formatLowerCase=_format.toLowerCase();\r\n var formatItems=formatLowerCase.split(_delimiter);\r\n var dateItems=_date.split(_delimiter);\r\n var monthIndex=formatItems.indexOf(\"mm\");\r\n var dayIndex=formatItems.indexOf(\"dd\");\r\n var yearIndex=formatItems.indexOf(\"yyyy\");\r\n var month=parseInt(dateItems[monthIndex]);\r\n month-=1;\r\n var formatedDate = new Date(dateItems[yearIndex],month,dateItems[dayIndex]);\r\n return formatedDate;\r\n}", "function makeDateFromString(string) {\n var format = 'YYYY-MM-DDT',\n i;\n if (isoRegex.exec(string)) {\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n format += isoTimes[i][0];\n break;\n }\n }\n return parseTokenTimezone.exec(string) ? \n makeDateFromStringAndFormat(string, format + ' Z') :\n makeDateFromStringAndFormat(string, format);\n }\n return new Date(string);\n }", "function stringToDate(_date,_format,_delimiter)\n{\n var formatLowerCase=_format.toLowerCase();\n var formatItems=formatLowerCase.split(_delimiter);\n var dateItems=_date.split(_delimiter);\n var monthIndex=formatItems.indexOf(\"mm\");\n var dayIndex=formatItems.indexOf(\"dd\");\n var yearIndex=formatItems.indexOf(\"yyyy\");\n var month=parseInt(dateItems[monthIndex]);\n month-=1;\n var formatedDate = new Date(dateItems[yearIndex],month,dateItems[dayIndex]);\n return formatedDate;\n}", "function makeDateFromString(string) {\n var format = 'YYYY-MM-DDT',\n i;\n if (isoRegex.exec(string)) {\n for (i = 0; i < 3; i++) {\n if (isoTimes[i][1].exec(string)) {\n format += isoTimes[i][0];\n break;\n }\n }\n return makeDateFromStringAndFormat(string, format + 'Z');\n }\n return new Date(string);\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function $dateFromString(obj, expr, options) {\n var args = core_1.computeValue(obj, expr, null, options);\n args.format = args.format || _internal_1.DATE_FORMAT;\n args.onNull = args.onNull || null;\n var dateString = args.dateString;\n if (util_1.isNil(dateString))\n return args.onNull;\n // collect all separators of the format string\n var separators = args.format.split(/%[YGmdHMSLuVzZ]/);\n separators.reverse();\n var matches = args.format.match(/(%%|%Y|%G|%m|%d|%H|%M|%S|%L|%u|%V|%z|%Z)/g);\n var dateParts = {};\n // holds the valid regex of parts that matches input date string\n var expectedPattern = \"\";\n for (var i = 0, len = matches.length; i < len; i++) {\n var formatSpecifier = matches[i];\n var props = _internal_1.DATE_SYM_TABLE[formatSpecifier];\n if (util_1.isObject(props)) {\n // get pattern and alias from table\n var m = props.re.exec(dateString);\n // get the next separtor\n var delimiter = separators.pop() || \"\";\n if (m !== null) {\n // store and cut out matched part\n dateParts[props.name] = /^\\d+$/.exec(m[0]) ? parseInt(m[0]) : m[0];\n dateString =\n dateString.substr(0, m.index) +\n dateString.substr(m.index + m[0].length);\n // construct expected pattern\n expectedPattern +=\n _internal_1.regexQuote(delimiter) + _internal_1.regexStrip(props.re.toString());\n }\n else {\n dateParts[props.name] = null;\n }\n }\n }\n // 1. validate all required date parts exists\n // 2. validate original dateString against expected pattern.\n if (util_1.isNil(dateParts.year) ||\n util_1.isNil(dateParts.month) ||\n util_1.isNil(dateParts.day) ||\n !new RegExp(\"^\" + expectedPattern + \"$\").exec(args.dateString))\n return args.onError;\n var tz = _internal_1.parseTimezone(args.timezone);\n // create the date. month is 0-based in Date\n var d = new Date(Date.UTC(dateParts.year, dateParts.month - 1, dateParts.day, 0, 0, 0));\n if (!util_1.isNil(dateParts.hour))\n d.setUTCHours(dateParts.hour);\n if (!util_1.isNil(dateParts.minute))\n d.setUTCMinutes(dateParts.minute);\n if (!util_1.isNil(dateParts.second))\n d.setUTCSeconds(dateParts.second);\n if (!util_1.isNil(dateParts.millisecond))\n d.setUTCMilliseconds(dateParts.millisecond);\n // The minute part is unused when converting string.\n // This was observed in the tests on MongoDB site but not officially stated anywhere\n tz.minute = 0;\n _internal_1.adjustDate(d, tz);\n return d;\n}", "formatDate(str) {\n let string = str.slice(0, str.lastIndexOf('T'))\n let fields = string.split('-');\n let finalString = fields[2] + '-' + fields[1] + '-' + fields[0]\n return finalString\n }", "formatDate(str) {\n let string = str.slice(0, str.lastIndexOf('T'))\n let fields = string.split('-');\n let finalString = fields[2] + '-' + fields[1] + '-' + fields[0]\n return finalString\n }", "function formatDate(date, formatStr) {\n\t\treturn formatDateWithChunks(date, getFormatStringChunks(formatStr));\n\t}", "function format_date(date_string, data_source) {\n var date = new Date(date_string);\n return {v: date, f: date_string};\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n \n config._a = [];\n config._pf.empty = true;\n \n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n \n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n \n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n \n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n \n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (getParseRegexForToken(token, config).exec(string) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (getParseRegexForToken(token, config).exec(string) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function formatDate(date, formatStr) {\n return formatDateWithChunks(date, getFormatStringChunks(formatStr));\n }", "function formatDate(string){\n var options = { year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric' };\n return new Date(string).toLocaleDateString([],options);\n}", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function formatDate(date, formatStr) {\n\treturn formatDateWithChunks(date, getFormatStringChunks(formatStr));\n}", "function formatDate(date, formatStr) {\n\treturn formatDateWithChunks(date, getFormatStringChunks(formatStr));\n}", "function formatDate(date, formatStr) {\n\treturn formatDateWithChunks(date, getFormatStringChunks(formatStr));\n}", "function formatDate(date, formatStr) {\n\treturn formatDateWithChunks(date, getFormatStringChunks(formatStr));\n}", "function formatDate(date, formatStr) {\n\treturn formatDateWithChunks(date, getFormatStringChunks(formatStr));\n}", "function getFormatDate(date) {\n\t\tvar arr = date.split('/');\n\t\treturn new Date(parseInt(arr[2]), parseInt(arr[1])-1, parseInt(arr[0]));\n\t}", "function makeDateFromStringAndFormat(config) {\n\t if (config._f === moment.ISO_8601) {\n\t parseISO(config);\n\t return;\n\t }\n\n\t config._a = [];\n\t config._pf.empty = true;\n\n\t // This array is used to make a Date, either with `new Date` or `Date.UTC`\n\t var string = '' + config._i,\n\t i, parsedInput, tokens, token, skipped,\n\t stringLength = string.length,\n\t totalParsedInputLength = 0;\n\n\t tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n\t for (i = 0; i < tokens.length; i++) {\n\t token = tokens[i];\n\t parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n\t if (parsedInput) {\n\t skipped = string.substr(0, string.indexOf(parsedInput));\n\t if (skipped.length > 0) {\n\t config._pf.unusedInput.push(skipped);\n\t }\n\t string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n\t totalParsedInputLength += parsedInput.length;\n\t }\n\t // don't parse if it's not a known token\n\t if (formatTokenFunctions[token]) {\n\t if (parsedInput) {\n\t config._pf.empty = false;\n\t }\n\t else {\n\t config._pf.unusedTokens.push(token);\n\t }\n\t addTimeToArrayFromToken(token, parsedInput, config);\n\t }\n\t else if (config._strict && !parsedInput) {\n\t config._pf.unusedTokens.push(token);\n\t }\n\t }\n\n\t // add remaining unparsed input length to the string\n\t config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n\t if (string.length > 0) {\n\t config._pf.unusedInput.push(string);\n\t }\n\n\t // handle am pm\n\t if (config._isPm && config._a[HOUR] < 12) {\n\t config._a[HOUR] += 12;\n\t }\n\t // if is 12 am, change hours to 0\n\t if (config._isPm === false && config._a[HOUR] === 12) {\n\t config._a[HOUR] = 0;\n\t }\n\n\t dateFromConfig(config);\n\t checkOverflow(config);\n\t }", "function makeDateFromStringAndFormat(config) {\n\t\tif (config._f === moment.ISO_8601) {\n\t\t\tparseISO(config);\n\t\t\treturn;\n\t\t}\n\n\t\tconfig._a = [];\n\t\tconfig._pf.empty = true;\n\n\t\t// This array is used to make a Date, either with `new Date` or `Date.UTC`\n\t\tvar string = '' + config._i, i, parsedInput, tokens, token, skipped, stringLength = string.length, totalParsedInputLength = 0;\n\n\t\ttokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n\t\tfor (i = 0; i < tokens.length; i++) {\n\t\t\ttoken = tokens[i];\n\t\t\tparsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n\t\t\tif (parsedInput) {\n\t\t\t\tskipped = string.substr(0, string.indexOf(parsedInput));\n\t\t\t\tif (skipped.length > 0) {\n\t\t\t\t\tconfig._pf.unusedInput.push(skipped);\n\t\t\t\t}\n\t\t\t\tstring = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n\t\t\t\ttotalParsedInputLength += parsedInput.length;\n\t\t\t}\n\t\t\t// don't parse if it's not a known token\n\t\t\tif (formatTokenFunctions[token]) {\n\t\t\t\tif (parsedInput) {\n\t\t\t\t\tconfig._pf.empty = false;\n\t\t\t\t} else {\n\t\t\t\t\tconfig._pf.unusedTokens.push(token);\n\t\t\t\t}\n\t\t\t\taddTimeToArrayFromToken(token, parsedInput, config);\n\t\t\t} else if (config._strict && !parsedInput) {\n\t\t\t\tconfig._pf.unusedTokens.push(token);\n\t\t\t}\n\t\t}\n\n\t\t// add remaining unparsed input length to the string\n\t\tconfig._pf.charsLeftOver = stringLength - totalParsedInputLength;\n\t\tif (string.length > 0) {\n\t\t\tconfig._pf.unusedInput.push(string);\n\t\t}\n\n\t\t// clear _12h flag if hour is <= 12\n\t\tif (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n\t\t\tconfig._pf.bigHour = undefined;\n\t\t}\n\t\t// handle am pm\n\t\tif (config._isPm && config._a[HOUR] < 12) {\n\t\t\tconfig._a[HOUR] += 12;\n\t\t}\n\t\t// if is 12 am, change hours to 0\n\t\tif (config._isPm === false && config._a[HOUR] === 12) {\n\t\t\tconfig._a[HOUR] = 0;\n\t\t}\n\t\tdateFromConfig(config);\n\t\tcheckOverflow(config);\n\t}", "function makeDateFromStringAndFormat(config) {\n\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\t if (config._f === moment.ISO_8601) {\n\t parseISO(config);\n\t return;\n\t }\n\n\t config._a = [];\n\t config._pf.empty = true;\n\n\t // This array is used to make a Date, either with `new Date` or `Date.UTC`\n\t var string = '' + config._i,\n\t i,\n\t parsedInput,\n\t tokens,\n\t token,\n\t skipped,\n\t stringLength = string.length,\n\t totalParsedInputLength = 0;\n\n\t tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n\t for (i = 0; i < tokens.length; i++) {\n\t token = tokens[i];\n\t parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n\t if (parsedInput) {\n\t skipped = string.substr(0, string.indexOf(parsedInput));\n\t if (skipped.length > 0) {\n\t config._pf.unusedInput.push(skipped);\n\t }\n\t string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n\t totalParsedInputLength += parsedInput.length;\n\t }\n\t // don't parse if it's not a known token\n\t if (formatTokenFunctions[token]) {\n\t if (parsedInput) {\n\t config._pf.empty = false;\n\t } else {\n\t config._pf.unusedTokens.push(token);\n\t }\n\t addTimeToArrayFromToken(token, parsedInput, config);\n\t } else if (config._strict && !parsedInput) {\n\t config._pf.unusedTokens.push(token);\n\t }\n\t }\n\n\t // add remaining unparsed input length to the string\n\t config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n\t if (string.length > 0) {\n\t config._pf.unusedInput.push(string);\n\t }\n\n\t // clear _12h flag if hour is <= 12\n\t if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n\t config._pf.bigHour = undefined;\n\t }\n\t // handle meridiem\n\t config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n\t dateFromConfig(config);\n\t checkOverflow(config);\n\t }", "function unformatDate(datestr) {\n var y = parseInt(datestr.slice(0, 4)),\n m = parseInt(datestr.slice(5, 7)) - 1,\n dy = parseInt(datestr.slice(8));\n\n return (new Date(y, m, dy));\n}", "function unformatDate(datestr) {\n var y = parseInt(datestr.slice(0, 4)),\n m = parseInt(datestr.slice(5, 7)) - 1,\n dy = parseInt(datestr.slice(8));\n\n return (new Date(y, m, dy));\n}", "function parseDate(str) {\n \t\t//var m = str.match(/^(\\d{1,2})-(\\d{1,2})-(\\d{4})$/);\n \t\tvar m = str.match(/^(0?[1-9]|[12][0-9]|3[01])[\\.\\-](0?[1-9]|1[012])[\\.\\-]\\d{4}$/);\n \t\treturn (m) ? new Date(m[3], m[2]-1, m[1]) : null;\n\t}", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function getDateFromString(str)\n{\n var dateRE1 = /([0-9]{1,4})(?:\\-|\\/|\\.|\\u5e74|\\u6708|\\u65e5)([0-9]{1,2})(?:\\-|\\/|\\.|\\u5e74|\\u6708|\\u65e5)*([0-9]{1,4})*/i;\n var dateRE2 = /(on)?\\s*(([0-9]*)(?:st|th|rd|nd)*(?:\\s|of|\\-a|\\-|,|\\.)*(january|jan|february|feb|march|mar|april|apr|may|june|jun|july|jul|august|aug|september|sept|sep|october|oct|november|nov|december|dec)(?:\\s|\\-|\\.)*([0-9]*))/i;\n var dateRE3 = /(on)?\\s*((january|jan|february|feb|march|mar|april|apr|may|june|jun|july|jul|august|aug|september|sept|sep|october|oct|november|nov|december|dec)(?:\\s|,|\\.|\\-)*([0-9]+)(?:st|th|rd|nd)*(?:\\s|,|\\.|\\-a|\\-)*([0-9]*))/i;\n var dateRE4 = /(on)?\\s*((next)?\\s*(monday|mon|tuesday|tue|wednesday|wed|thursday|thu|friday|fri|saturday|sat|sunday|sun))/i;\n var dateRE5 = /(in)?\\s*(one|two|three|four|five|six|seven|eight|nine|ten|[0-9]+)\\s*(years|year|yrs|yr|months|month|mons|mon|weeks|week|wks|wk|days|day)/i;\n var dateRE6 = /end\\s*of\\s*(?:the)*\\s*(week|w|month|m)/i;\n var dateRE7 =/(on)?\\s*([0-9]+)(?:st|th|rd|nd)/i;\n var dateRE8 = /\\s*(yesterday|tod|today|tom|tomorrow)/i;\n \n \n if (DEBUG) log(\"getDateFromString: Looking for date in '\" + str + \"'\");\n var dateRE1match = dateRE1.exec(str);\n var dateRE2match = dateRE2.exec(str);\n var dateRE3match = dateRE3.exec(str);\n var dateRE4match = dateRE4.exec(str);\n var dateRE5match = dateRE5.exec(str);\n var dateRE6match = dateRE6.exec(str);\n var dateRE7match = dateRE7.exec(str);\n var dateRE8match = dateRE8.exec(str);\n \n if (dateRE1match)\n {\n if (DEBUG) log(\"dateRE1 match for '\" + str + \"' = '\" + dateRE1match[0] + \"'\");\n return dateRE1match[0];\n }\n \n if (dateRE2match)\n {\n if (DEBUG) log(\"dateRE2 match for '\" + str + \"' = '\" + dateRE2match[0] + \"'\");\n return dateRE2match[0];\n }\n \n if (dateRE3match)\n {\n if (DEBUG) log(\"dateRE3 match for '\" + str + \"' = '\" + dateRE3match[0] + \"'\");\n return dateRE3match[0];\n }\n \n if (dateRE4match)\n {\n if (DEBUG) log(\"dateRE4 match for '\" + str + \"' = '\" + dateRE4match[0] + \"'\");\n return dateRE4match[0];\n }\n \n if (dateRE5match)\n {\n if (DEBUG) log(\"dateRE5 match for '\" + str + \"' = '\" + dateRE5match[0] + \"'\");\n return dateRE5match[0];\n }\n \n if (dateRE6match)\n {\n if (DEBUG) log(\"dateRE6 match for '\" + str + \"' = '\" + dateRE6match[0] + \"'\");\n return dateRE6match[0];\n }\n \n if (dateRE7match)\n {\n if (DEBUG) log(\"dateRE7 match for '\" + str + \"' = '\" + dateRE7match[0] + \"'\");\n return dateRE7match[0];\n }\n \n if (dateRE8match)\n {\n if (DEBUG) log(\"dateRE8 match for '\" + str + \"' = '\" + dateRE8match[0] + \"'\");\n return dateRE8match[0];\n }\n \n if (DEBUG) log(\"NO MATCH FOR DATE STRING '\" + str + \"'!!!!!\");\n return;\n}", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n dateFromConfig(config);\n checkOverflow(config);\n }", "function parseStringToDate(string) {\n if (string) {\n var parts = string.match(/(\\d+)/g);\n // new Date(year, month [, date [, hours[, minutes[, seconds[, ms]]]]])\n return new Date(parts[0], parts[1] - 1, parts[2]); // months are 0-based\n }\n }", "function formatDate(string) {\n var date = new Date(string);\n let options = {\n day: \"numeric\",\n month: \"long\",\n };\n return date.toLocaleString(\"en-US\", options);\n }", "function formatDate(date, format){\n if(!date){\n return '0000-00-00';\n }\n var dd = date.substring(0, 2);\n var mm = date.substring(3, 5);\n var yy = date.substring(6);\n if (format == 'dmy') {\n return dd + '-' + mm + '-' + yy;\n } else {\n return yy + '-' + mm + '-' + dd;\n }\n }", "function castStringToDate(str) {\n if (str !== undefined && str.length === 16) {\n let day = str.slice(0, 2);\n let month = str.slice(3, 5);\n let americanDateString = month + '-' + day + str.slice(5); // MM-DD-YYYY HH:MM\n return new Date(americanDateString);\n } else {\n console.error('Error casting ' + str + ' to date.')\n }\n return new Date()\n}", "normalize(str) {\n if (str && !CommonUtils.isDate(str)) {\n var match = str.match(/^(\\d{1,2})\\/(\\d{1,2})\\/(\\d{4})$/);\n if (match) {\n return new Date(match[3], match[2] - 1, match[1]);\n }\n match = str.match(/^(\\d{4})-(\\d{1,2})-(\\d{1,2})$/);\n if (match) {\n return new Date(match[1], match[2] - 1, match[3]);\n }\n }\n }", "function formatDate(date,formatStr){return renderFakeFormatString(getParsedFormatString(formatStr).fakeFormatString,date);}", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }" ]
[ "0.7544057", "0.7378126", "0.71777546", "0.71777546", "0.71777546", "0.71777546", "0.71671367", "0.7163808", "0.7163808", "0.7163808", "0.7163808", "0.7163808", "0.71498096", "0.71486294", "0.71486294", "0.71486294", "0.70893186", "0.7086403", "0.70293576", "0.70293576", "0.70195943", "0.70195943", "0.70195943", "0.70195943", "0.70195943", "0.7002717", "0.7002717", "0.69697803", "0.6963666", "0.69486713", "0.6941472", "0.6931618", "0.69212186", "0.68995607", "0.68969715", "0.68969715", "0.68969715", "0.68969715", "0.68969715", "0.6896638", "0.68942904", "0.68942904", "0.68848205", "0.6881519", "0.68802357", "0.68802357", "0.6860201", "0.68580484", "0.68580484", "0.68559957", "0.68525356", "0.68521965", "0.68521965", "0.68521965", "0.68521965", "0.68521965", "0.68521965", "0.68521965", "0.68521965", "0.6838409", "0.6838409", "0.6838409", "0.6838409", "0.6838409", "0.6829404", "0.6784215", "0.6758764", "0.6727878", "0.6727878", "0.6727878", "0.6726412", "0.6726379", "0.6726379", "0.6725158", "0.6717375", "0.6717375", "0.6717375", "0.6717375", "0.6717375", "0.6717375", "0.6695233", "0.66870695", "0.66870695", "0.6683349", "0.6683229", "0.6678988", "0.66708475", "0.66647357", "0.6660571", "0.66551495", "0.66551495", "0.66551495", "0.66551495", "0.66551495", "0.66551495", "0.66551495", "0.66551495", "0.66551495", "0.66551495", "0.66551495", "0.66551495" ]
0.0
-1
date from string and array of format strings
function configFromStringAndArray(config) { var tempConfig, bestMoment, scoreToBeat, i, currentScore; if (config._f.length === 0) { getParsingFlags(config).invalidFormat = true; config._d = new Date(NaN); return; } for (i = 0; i < config._f.length; i++) { currentScore = 0; tempConfig = copyConfig({}, config); if (config._useUTC != null) { tempConfig._useUTC = config._useUTC; } tempConfig._f = config._f[i]; configFromStringAndFormat(tempConfig); if (!valid__isValid(tempConfig)) { continue; } // if there is any input that was not parsed add a penalty for that format currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; getParsingFlags(tempConfig).score = currentScore; if (scoreToBeat == null || currentScore < scoreToBeat) { scoreToBeat = currentScore; bestMoment = tempConfig; } } extend(config, bestMoment || tempConfig); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeDateFromStringAndArray(string, formats) {\n var output,\n inputParts = string.match(parseMultipleFormatChunker) || [],\n formattedInputParts,\n scoreToBeat = 99,\n i,\n currentDate,\n currentScore;\n for (i = 0; i < formats.length; i++) {\n currentDate = makeDateFromStringAndFormat(string, formats[i]);\n formattedInputParts = formatMoment(new Moment(currentDate), formats[i]).match(parseMultipleFormatChunker) || [];\n currentScore = compareArrays(inputParts, formattedInputParts);\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n output = currentDate;\n }\n }\n return output;\n }", "function makeDateFromStringAndFormat(string, format) {\n var datePartArray = [0, 0, 1, 0, 0, 0, 0],\n config = {\n tzh : 0, // timezone hour offset\n tzm : 0 // timezone minute offset\n },\n tokens = format.match(formattingTokens),\n i, parsedInput;\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0];\n string = string.replace(getParseRegexForToken(tokens[i]), '');\n addTimeToArrayFromToken(tokens[i], parsedInput, datePartArray, config);\n }\n // handle am pm\n if (config.isPm && datePartArray[3] < 12) {\n datePartArray[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config.isPm === false && datePartArray[3] === 12) {\n datePartArray[3] = 0;\n }\n // handle timezone\n datePartArray[3] += config.tzh;\n datePartArray[4] += config.tzm;\n // return\n return config.isUTC ? new Date(Date.UTC.apply({}, datePartArray)) : dateFromArray(datePartArray);\n }", "function makeDateFromStringAndArray(string, formats) {\n var output,\n inputParts = string.match(inputCharacters),\n scores = [],\n scoreToBeat = 99,\n i,\n curDate,\n curScore;\n for (i = 0; i < formats.length; i++) {\n curDate = makeDateFromStringAndFormat(string, formats[i]);\n curScore = compareArrays(inputParts, formatMoment(new Moment(curDate), formats[i]).match(inputCharacters));\n if (curScore < scoreToBeat) {\n scoreToBeat = curScore;\n output = curDate;\n }\n }\n return output;\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i], config).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n\n // add remaining unparsed input to the string\n if (string) {\n config._il = string;\n }\n\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i], config).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n\n // add remaining unparsed input to the string\n if (string) {\n config._il = string;\n }\n\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i], config).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n\n // add remaining unparsed input to the string\n if (string) {\n config._il = string;\n }\n\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens);\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i], config).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n\n // add remaining unparsed input to the string\n if (string) {\n config._il = string;\n }\n\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "parseDate(arrayOfStrings)\n {\n let newStr=arrayOfStrings[3];\n newStr += '-';\n switch(arrayOfStrings[1])\n {\n case 'Jan':\n newStr+='01';\n break;\n case 'Feb':\n newStr+='02';\n break;\n case 'Mar':\n newStr+='03';\n break;\n case 'Apr':\n newStr+='04';\n break;\n case 'May':\n newStr+='05';\n break;\n case 'Jun':\n newStr+='06';\n break;\n case 'Jul':\n newStr+='07';\n break;\n case 'Aug':\n newStr+='08';\n break;\n case 'Sep':\n newStr+='09';\n break;\n case 'Oct':\n newStr+='10';\n break;\n case 'Nov':\n newStr+='11';\n break;\n case 'Dec':\n newStr+='12';\n break;\n default:\n break;\n }\n newStr+='-';\n newStr+=arrayOfStrings[2];\n\n return newStr;\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (getParseRegexForToken(token, config).exec(string) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (getParseRegexForToken(token, config).exec(string) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function $dateFromString(obj, expr, options) {\n var args = core_1.computeValue(obj, expr, null, options);\n args.format = args.format || _internal_1.DATE_FORMAT;\n args.onNull = args.onNull || null;\n var dateString = args.dateString;\n if (util_1.isNil(dateString))\n return args.onNull;\n // collect all separators of the format string\n var separators = args.format.split(/%[YGmdHMSLuVzZ]/);\n separators.reverse();\n var matches = args.format.match(/(%%|%Y|%G|%m|%d|%H|%M|%S|%L|%u|%V|%z|%Z)/g);\n var dateParts = {};\n // holds the valid regex of parts that matches input date string\n var expectedPattern = \"\";\n for (var i = 0, len = matches.length; i < len; i++) {\n var formatSpecifier = matches[i];\n var props = _internal_1.DATE_SYM_TABLE[formatSpecifier];\n if (util_1.isObject(props)) {\n // get pattern and alias from table\n var m = props.re.exec(dateString);\n // get the next separtor\n var delimiter = separators.pop() || \"\";\n if (m !== null) {\n // store and cut out matched part\n dateParts[props.name] = /^\\d+$/.exec(m[0]) ? parseInt(m[0]) : m[0];\n dateString =\n dateString.substr(0, m.index) +\n dateString.substr(m.index + m[0].length);\n // construct expected pattern\n expectedPattern +=\n _internal_1.regexQuote(delimiter) + _internal_1.regexStrip(props.re.toString());\n }\n else {\n dateParts[props.name] = null;\n }\n }\n }\n // 1. validate all required date parts exists\n // 2. validate original dateString against expected pattern.\n if (util_1.isNil(dateParts.year) ||\n util_1.isNil(dateParts.month) ||\n util_1.isNil(dateParts.day) ||\n !new RegExp(\"^\" + expectedPattern + \"$\").exec(args.dateString))\n return args.onError;\n var tz = _internal_1.parseTimezone(args.timezone);\n // create the date. month is 0-based in Date\n var d = new Date(Date.UTC(dateParts.year, dateParts.month - 1, dateParts.day, 0, 0, 0));\n if (!util_1.isNil(dateParts.hour))\n d.setUTCHours(dateParts.hour);\n if (!util_1.isNil(dateParts.minute))\n d.setUTCMinutes(dateParts.minute);\n if (!util_1.isNil(dateParts.second))\n d.setUTCSeconds(dateParts.second);\n if (!util_1.isNil(dateParts.millisecond))\n d.setUTCMilliseconds(dateParts.millisecond);\n // The minute part is unused when converting string.\n // This was observed in the tests on MongoDB site but not officially stated anywhere\n tz.minute = 0;\n _internal_1.adjustDate(d, tz);\n return d;\n}", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n \n scoreToBeat,\n i,\n currentScore;\n \n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n \n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n \n if (!isValid(tempConfig)) {\n continue;\n }\n \n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n \n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n \n tempConfig._pf.score = currentScore;\n \n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n \n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromStringAndFormat(config) {\n\t\tif (config._f === moment.ISO_8601) {\n\t\t\tparseISO(config);\n\t\t\treturn;\n\t\t}\n\n\t\tconfig._a = [];\n\t\tconfig._pf.empty = true;\n\n\t\t// This array is used to make a Date, either with `new Date` or `Date.UTC`\n\t\tvar string = '' + config._i, i, parsedInput, tokens, token, skipped, stringLength = string.length, totalParsedInputLength = 0;\n\n\t\ttokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n\t\tfor (i = 0; i < tokens.length; i++) {\n\t\t\ttoken = tokens[i];\n\t\t\tparsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n\t\t\tif (parsedInput) {\n\t\t\t\tskipped = string.substr(0, string.indexOf(parsedInput));\n\t\t\t\tif (skipped.length > 0) {\n\t\t\t\t\tconfig._pf.unusedInput.push(skipped);\n\t\t\t\t}\n\t\t\t\tstring = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n\t\t\t\ttotalParsedInputLength += parsedInput.length;\n\t\t\t}\n\t\t\t// don't parse if it's not a known token\n\t\t\tif (formatTokenFunctions[token]) {\n\t\t\t\tif (parsedInput) {\n\t\t\t\t\tconfig._pf.empty = false;\n\t\t\t\t} else {\n\t\t\t\t\tconfig._pf.unusedTokens.push(token);\n\t\t\t\t}\n\t\t\t\taddTimeToArrayFromToken(token, parsedInput, config);\n\t\t\t} else if (config._strict && !parsedInput) {\n\t\t\t\tconfig._pf.unusedTokens.push(token);\n\t\t\t}\n\t\t}\n\n\t\t// add remaining unparsed input length to the string\n\t\tconfig._pf.charsLeftOver = stringLength - totalParsedInputLength;\n\t\tif (string.length > 0) {\n\t\t\tconfig._pf.unusedInput.push(string);\n\t\t}\n\n\t\t// clear _12h flag if hour is <= 12\n\t\tif (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n\t\t\tconfig._pf.bigHour = undefined;\n\t\t}\n\t\t// handle am pm\n\t\tif (config._isPm && config._a[HOUR] < 12) {\n\t\t\tconfig._a[HOUR] += 12;\n\t\t}\n\t\t// if is 12 am, change hours to 0\n\t\tif (config._isPm === false && config._a[HOUR] === 12) {\n\t\t\tconfig._a[HOUR] = 0;\n\t\t}\n\t\tdateFromConfig(config);\n\t\tcheckOverflow(config);\n\t}", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n\t var tempConfig, bestMoment, scoreToBeat, i, currentScore;\n\n\t if (config._f.length === 0) {\n\t config._pf.invalidFormat = true;\n\t config._d = new Date(NaN);\n\t return;\n\t }\n\n\t for (i = 0; i < config._f.length; i++) {\n\t currentScore = 0;\n\t tempConfig = copyConfig({}, config);\n\t if (config._useUTC != null) {\n\t tempConfig._useUTC = config._useUTC;\n\t }\n\t tempConfig._pf = defaultParsingFlags();\n\t tempConfig._f = config._f[i];\n\t makeDateFromStringAndFormat(tempConfig);\n\n\t if (!_isValid(tempConfig)) {\n\t continue;\n\t }\n\n\t // if there is any input that was not parsed add a penalty for that format\n\t currentScore += tempConfig._pf.charsLeftOver;\n\n\t //or tokens\n\t currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n\t tempConfig._pf.score = currentScore;\n\n\t if (scoreToBeat == null || currentScore < scoreToBeat) {\n\t scoreToBeat = currentScore;\n\t bestMoment = tempConfig;\n\t }\n\t }\n\n\t extend(config, bestMoment || tempConfig);\n\t }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n initializeParsingFlags(tempConfig);\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n initializeParsingFlags(tempConfig);\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n initializeParsingFlags(tempConfig);\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "parseDate(value, format) {\n if (format == null || value == null) {\n throw \"Invalid arguments\";\n }\n value = (typeof value === \"object\" ? value.toString() : value + \"\");\n if (value === \"\") {\n return null;\n }\n let iFormat, dim, extra, iValue = 0, shortYearCutoff = (typeof this.shortYearCutoff !== \"string\" ? this.shortYearCutoff : new Date().getFullYear() % 100 + parseInt(this.shortYearCutoff, 10)), year = -1, month = -1, day = -1, doy = -1, literal = false, date, lookAhead = (match) => {\n let matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);\n if (matches) {\n iFormat++;\n }\n return matches;\n }, getNumber = (match) => {\n let isDoubled = lookAhead(match), size = (match === \"@\" ? 14 : (match === \"!\" ? 20 :\n (match === \"y\" && isDoubled ? 4 : (match === \"o\" ? 3 : 2)))), minSize = (match === \"y\" ? size : 1), digits = new RegExp(\"^\\\\d{\" + minSize + \",\" + size + \"}\"), num = value.substring(iValue).match(digits);\n if (!num) {\n throw \"Missing number at position \" + iValue;\n }\n iValue += num[0].length;\n return parseInt(num[0], 10);\n }, getName = (match, shortNames, longNames) => {\n let index = -1;\n let arr = lookAhead(match) ? longNames : shortNames;\n let names = [];\n for (let i = 0; i < arr.length; i++) {\n names.push([i, arr[i]]);\n }\n names.sort((a, b) => {\n return -(a[1].length - b[1].length);\n });\n for (let i = 0; i < names.length; i++) {\n let name = names[i][1];\n if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {\n index = names[i][0];\n iValue += name.length;\n break;\n }\n }\n if (index !== -1) {\n return index + 1;\n }\n else {\n throw \"Unknown name at position \" + iValue;\n }\n }, checkLiteral = () => {\n if (value.charAt(iValue) !== format.charAt(iFormat)) {\n throw \"Unexpected literal at position \" + iValue;\n }\n iValue++;\n };\n if (this.view === 'month') {\n day = 1;\n }\n for (iFormat = 0; iFormat < format.length; iFormat++) {\n if (literal) {\n if (format.charAt(iFormat) === \"'\" && !lookAhead(\"'\")) {\n literal = false;\n }\n else {\n checkLiteral();\n }\n }\n else {\n switch (format.charAt(iFormat)) {\n case \"d\":\n day = getNumber(\"d\");\n break;\n case \"D\":\n getName(\"D\", this.getTranslation(primeng_api__WEBPACK_IMPORTED_MODULE_6__[\"TranslationKeys\"].DAY_NAMES_SHORT), this.getTranslation(primeng_api__WEBPACK_IMPORTED_MODULE_6__[\"TranslationKeys\"].DAY_NAMES));\n break;\n case \"o\":\n doy = getNumber(\"o\");\n break;\n case \"m\":\n month = getNumber(\"m\");\n break;\n case \"M\":\n month = getName(\"M\", this.getTranslation(primeng_api__WEBPACK_IMPORTED_MODULE_6__[\"TranslationKeys\"].MONTH_NAMES_SHORT), this.getTranslation(primeng_api__WEBPACK_IMPORTED_MODULE_6__[\"TranslationKeys\"].MONTH_NAMES));\n break;\n case \"y\":\n year = getNumber(\"y\");\n break;\n case \"@\":\n date = new Date(getNumber(\"@\"));\n year = date.getFullYear();\n month = date.getMonth() + 1;\n day = date.getDate();\n break;\n case \"!\":\n date = new Date((getNumber(\"!\") - this.ticksTo1970) / 10000);\n year = date.getFullYear();\n month = date.getMonth() + 1;\n day = date.getDate();\n break;\n case \"'\":\n if (lookAhead(\"'\")) {\n checkLiteral();\n }\n else {\n literal = true;\n }\n break;\n default:\n checkLiteral();\n }\n }\n }\n if (iValue < value.length) {\n extra = value.substr(iValue);\n if (!/^\\s+/.test(extra)) {\n throw \"Extra/unparsed characters found in date: \" + extra;\n }\n }\n if (year === -1) {\n year = new Date().getFullYear();\n }\n else if (year < 100) {\n year += new Date().getFullYear() - new Date().getFullYear() % 100 +\n (year <= shortYearCutoff ? 0 : -100);\n }\n if (doy > -1) {\n month = 1;\n day = doy;\n do {\n dim = this.getDaysCountInMonth(year, month - 1);\n if (day <= dim) {\n break;\n }\n month++;\n day -= dim;\n } while (true);\n }\n date = this.daylightSavingAdjust(new Date(year, month - 1, day));\n if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {\n throw \"Invalid date\"; // E.g. 31/02/00\n }\n return date;\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n\t\tvar tempConfig, bestMoment,\n\n\t\tscoreToBeat, i, currentScore;\n\n\t\tif (config._f.length === 0) {\n\t\t\tconfig._pf.invalidFormat = true;\n\t\t\tconfig._d = new Date(NaN);\n\t\t\treturn;\n\t\t}\n\n\t\tfor (i = 0; i < config._f.length; i++) {\n\t\t\tcurrentScore = 0;\n\t\t\ttempConfig = copyConfig({}, config);\n\t\t\tif (config._useUTC != null) {\n\t\t\t\ttempConfig._useUTC = config._useUTC;\n\t\t\t}\n\t\t\ttempConfig._pf = defaultParsingFlags();\n\t\t\ttempConfig._f = config._f[i];\n\t\t\tmakeDateFromStringAndFormat(tempConfig);\n\n\t\t\tif (!isValid(tempConfig)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// if there is any input that was not parsed add a penalty for that format\n\t\t\tcurrentScore += tempConfig._pf.charsLeftOver;\n\n\t\t\t//or tokens\n\t\t\tcurrentScore += tempConfig._pf.unusedTokens.length * 10;\n\n\t\t\ttempConfig._pf.score = currentScore;\n\n\t\t\tif (scoreToBeat == null || currentScore < scoreToBeat) {\n\t\t\t\tscoreToBeat = currentScore;\n\t\t\t\tbestMoment = tempConfig;\n\t\t\t}\n\t\t}\n\n\t\textend(config, bestMoment || tempConfig);\n\t}", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n\t var tempConfig,\n\t bestMoment,\n\n\t scoreToBeat,\n\t i,\n\t currentScore;\n\n\t if (config._f.length === 0) {\n\t config._pf.invalidFormat = true;\n\t config._d = new Date(NaN);\n\t return;\n\t }\n\n\t for (i = 0; i < config._f.length; i++) {\n\t currentScore = 0;\n\t tempConfig = copyConfig({}, config);\n\t if (config._useUTC != null) {\n\t tempConfig._useUTC = config._useUTC;\n\t }\n\t tempConfig._pf = defaultParsingFlags();\n\t tempConfig._f = config._f[i];\n\t makeDateFromStringAndFormat(tempConfig);\n\n\t if (!isValid(tempConfig)) {\n\t continue;\n\t }\n\n\t // if there is any input that was not parsed add a penalty for that format\n\t currentScore += tempConfig._pf.charsLeftOver;\n\n\t //or tokens\n\t currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n\t tempConfig._pf.score = currentScore;\n\n\t if (scoreToBeat == null || currentScore < scoreToBeat) {\n\t scoreToBeat = currentScore;\n\t bestMoment = tempConfig;\n\t }\n\t }\n\n\t extend(config, bestMoment || tempConfig);\n\t }", "function makeDateFromStringAndFormat(config) {\n\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\t if (config._f === moment.ISO_8601) {\n\t parseISO(config);\n\t return;\n\t }\n\n\t config._a = [];\n\t config._pf.empty = true;\n\n\t // This array is used to make a Date, either with `new Date` or `Date.UTC`\n\t var string = '' + config._i,\n\t i, parsedInput, tokens, token, skipped,\n\t stringLength = string.length,\n\t totalParsedInputLength = 0;\n\n\t tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n\t for (i = 0; i < tokens.length; i++) {\n\t token = tokens[i];\n\t parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n\t if (parsedInput) {\n\t skipped = string.substr(0, string.indexOf(parsedInput));\n\t if (skipped.length > 0) {\n\t config._pf.unusedInput.push(skipped);\n\t }\n\t string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n\t totalParsedInputLength += parsedInput.length;\n\t }\n\t // don't parse if it's not a known token\n\t if (formatTokenFunctions[token]) {\n\t if (parsedInput) {\n\t config._pf.empty = false;\n\t }\n\t else {\n\t config._pf.unusedTokens.push(token);\n\t }\n\t addTimeToArrayFromToken(token, parsedInput, config);\n\t }\n\t else if (config._strict && !parsedInput) {\n\t config._pf.unusedTokens.push(token);\n\t }\n\t }\n\n\t // add remaining unparsed input length to the string\n\t config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n\t if (string.length > 0) {\n\t config._pf.unusedInput.push(string);\n\t }\n\n\t // handle am pm\n\t if (config._isPm && config._a[HOUR] < 12) {\n\t config._a[HOUR] += 12;\n\t }\n\t // if is 12 am, change hours to 0\n\t if (config._isPm === false && config._a[HOUR] === 12) {\n\t config._a[HOUR] = 0;\n\t }\n\n\t dateFromConfig(config);\n\t checkOverflow(config);\n\t }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 4; i > 0; i--) {\n if (match[i]) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i - 1] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 4; i > 0; i--) {\n if (match[i]) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i - 1] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n dateFromConfig(config);\n checkOverflow(config);\n }", "function stringToDate(_date,_format,_delimiter)\r\n{\r\n var formatLowerCase=_format.toLowerCase();\r\n var formatItems=formatLowerCase.split(_delimiter);\r\n var dateItems=_date.split(_delimiter);\r\n var monthIndex=formatItems.indexOf(\"mm\");\r\n var dayIndex=formatItems.indexOf(\"dd\");\r\n var yearIndex=formatItems.indexOf(\"yyyy\");\r\n var month=parseInt(dateItems[monthIndex]);\r\n month-=1;\r\n var formatedDate = new Date(dateItems[yearIndex],month,dateItems[dayIndex]);\r\n return formatedDate;\r\n}", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n \n config._a = [];\n config._pf.empty = true;\n \n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n \n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n \n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n \n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n \n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function stringToDate(_date,_format,_delimiter)\n{\n var formatLowerCase=_format.toLowerCase();\n var formatItems=formatLowerCase.split(_delimiter);\n var dateItems=_date.split(_delimiter);\n var monthIndex=formatItems.indexOf(\"mm\");\n var dayIndex=formatItems.indexOf(\"dd\");\n var yearIndex=formatItems.indexOf(\"yyyy\");\n var month=parseInt(dateItems[monthIndex]);\n month-=1;\n var formatedDate = new Date(dateItems[yearIndex],month,dateItems[dayIndex]);\n return formatedDate;\n}" ]
[ "0.6992324", "0.6912437", "0.6811143", "0.67375225", "0.67375225", "0.67375225", "0.67375225", "0.67375225", "0.67109895", "0.67109895", "0.67109895", "0.66975677", "0.65970886", "0.65863997", "0.65863997", "0.65736145", "0.65736145", "0.65736145", "0.65736145", "0.65736145", "0.65736145", "0.65736145", "0.65736145", "0.65625644", "0.6480043", "0.64605933", "0.64605933", "0.64605933", "0.64605933", "0.64605933", "0.6419801", "0.6419801", "0.6419801", "0.6419801", "0.6419088", "0.640779", "0.640779", "0.640779", "0.640779", "0.640779", "0.640779", "0.640779", "0.640779", "0.640779", "0.640779", "0.6400969", "0.6393603", "0.6393603", "0.6393603", "0.6392714", "0.6371693", "0.6371693", "0.6371693", "0.6371693", "0.6371693", "0.6371693", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6356297", "0.6350513", "0.6350513", "0.6350513", "0.6350513", "0.6350513", "0.6350513", "0.6350513", "0.6350513", "0.6350513", "0.6350513", "0.6350513", "0.6350513", "0.6349246", "0.6341507", "0.63415045", "0.63415045", "0.63415045", "0.6331202", "0.63261753", "0.63261753", "0.6323412", "0.6323412", "0.6299627", "0.6275333", "0.62741286" ]
0.0
-1
Pick a moment m from moments so that m[fn](other) is true for all other. This relies on the function fn to be transitive. moments should either be an array of moment objects or an array, whose first element is an array of moment objects.
function pickBy(fn, moments) { var res, i; if (moments.length === 1 && isArray(moments[0])) { moments = moments[0]; } if (!moments.length) { return local__createLocal(); } res = moments[0]; for (i = 1; i < moments.length; ++i) { if (!moments[i].isValid() || moments[i][fn](res)) { res = moments[i]; } } return res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n\t\tvar res, i;\n\t\tif (moments.length === 1 && isArray(moments[0])) {\n\t\t\tmoments = moments[0];\n\t\t}\n\t\tif (!moments.length) {\n\t\t\treturn moment();\n\t\t}\n\t\tres = moments[0];\n\t\tfor (i = 1; i < moments.length; ++i) {\n\t\t\tif (moments[i][fn](res)) {\n\t\t\t\tres = moments[i];\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}", "function pickBy(fn, moments) {\n\t var res, i;\n\t if (moments.length === 1 && isArray(moments[0])) {\n\t moments = moments[0];\n\t }\n\t if (!moments.length) {\n\t return moment();\n\t }\n\t res = moments[0];\n\t for (i = 1; i < moments.length; ++i) {\n\t if (moments[i][fn](res)) {\n\t res = moments[i];\n\t }\n\t }\n\t return res;\n\t }", "function pickBy(fn, moments) {\n\t var res, i;\n\t if (moments.length === 1 && isArray(moments[0])) {\n\t moments = moments[0];\n\t }\n\t if (!moments.length) {\n\t return moment();\n\t }\n\t res = moments[0];\n\t for (i = 1; i < moments.length; ++i) {\n\t if (moments[i][fn](res)) {\n\t res = moments[i];\n\t }\n\t }\n\t return res;\n\t }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }" ]
[ "0.76112604", "0.76112604", "0.76112604", "0.76112604", "0.76112604", "0.76112604", "0.76112604", "0.76112604", "0.76112604", "0.76112604", "0.76112604", "0.76112604", "0.76112604", "0.76112604", "0.76112604", "0.76112604", "0.76112604", "0.76112604", "0.76112604", "0.76112604", "0.76112604", "0.76112604", "0.76112604", "0.75756973", "0.7551799", "0.7439789", "0.7439789", "0.7294666", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968", "0.7290968" ]
0.0
-1
TODO: Use [].sort instead?
function min () { var args = [].slice.call(arguments, 0); return pickBy('isBefore', args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sort() {\n\t}", "sort() {\n\t}", "function Sort() {}", "sort(){\n\n }", "function sortItems(arr) {\r\n return arr.sort();\r\n}", "function sort(theArray){\n\n}", "function arrangeElements( array ) {\r\n\tarray = array.sort();\r\n\treturn array;\r\n}", "function alfa (arr){\n\tfor (var i = 0; i< arr.length;i++){\n\t\tarr[i].sort();\n\t}\n\treturn arr;\n}", "Sort() {\n\n }", "function Sort(arr)\n{\n\n}", "sort() {\n const ret = [].sort.apply(this, arguments);\n this._registerAtomic('$set', this);\n return ret;\n }", "sort() {\n const ret = [].sort.apply(this, arguments);\n this._registerAtomic('$set', this);\n return ret;\n }", "function sortFunction(val){\n return val.sort();\n}", "function dd(a){a=a.ob();for(var b=[],c=[],d=0;d<a.length;d++){var e=a[d].Lf;e&&(e=e.call(a[d]))&&(e[2]?b.push(e):c.push(e))}c.sort(ed);b.sort(ed);return[c,b]}", "function sort() {\n // // parse arguments into an array\n var args = [].slice.call(arguments);\n\n // // .. do something with each element of args\n // // YOUR CODE HERE\n var sortedargs = args.sort(function(a, b) {\n return a > b ? 1 : -1\n })\n return sortedargs\n}", "function Zc(a){a=a.Xb();for(var b=[],c=[],d=0;d<a.length;d++){var e=a[d].Zg;e&&(e=e.call(a[d]))&&(e[2]?b.push(e):c.push(e))}c.sort($c);b.sort($c);return[c,b]}", "function yg(a){a=a.Zb();for(var b=[],c=[],d=0;d<a.length;d++){var e=a[d].ah;e&&(e=e.call(a[d]))&&(e[2]?b.push(e):c.push(e))}c.sort(zg);b.sort(zg);return[c,b]}", "function sortArr(a, b){\n return a - b ;\n }", "function sort(argument) {\r\n return argument.sort();\r\n}", "function copySorted(arr) {\n return arr.slice().sort();\n}", "function sortData(data)\n\t{\n\t\tfor (let i = 0; i < data.length; i++)\n \t{\n\t \tfor (let j = 0; j < data.length - i - 1; j++)\n\t \t{\n\t \t\tif (+data[j].subCount < +data[j + 1].subCount)\n\t \t\t{\n\t \t\t\tlet tmp = data[j];\n\t \t\t\tdata[j] = data[j + 1];\n\t \t\t\tdata[j + 1] = tmp;\n\t \t\t}\n\t \t}\n \t}\n \treturn data;\n\t}", "function sortMyList() {\n seanBeanMovies.forEach(function(movie) {\n newar.push(movie);\n });\n console.log(newar.sort());\n}", "function sortArray(arr) {\r\n var temp = 0;\r\n for (var i = 0; i < arr.length; ++i) {\r\n for (var j = 0; j < arr.length - 1; ++j) {\r\n if (arr[j].name.charCodeAt(0) < arr[j + 1].name.charCodeAt(0)) {\r\n temp = arr[j + 1];\r\n arr[j + 1] = arr[j];\r\n arr[j] = temp;\r\n }\r\n }\r\n }\r\n console.log(arr);\r\n}", "function sortFunction(){\r\n // parse arguments into an array\r\n var args = [].slice.call(arguments);\r\n return args.sort();\r\n}", "sortBy(arr, compare) {\n let sorted = [];\n sorted = arr.sort(compare);\n return sorted;\n }", "function sortedUUIDs(arr) {\n return arr.map(function (el) {\n return el.uuid;\n }).sort();\n}", "function sortNameUp(arr) {\n return arr.sort()\n }", "function subSort(arr) {\n // didnt get this one. try again\n}", "function mergeSort(array) {\n\n}", "getSortArray() {\n const sortable = []; // {\"1\": 10, \"49\": 5}\n for (const key in this.numberPool) \n sortable.push([Number(key), this.numberPool[key]]);\n \n sortable.sort((a, b) => b[1] - a[1]); // Descending\n return sortable;\n }", "__getArray (sort) {\n sort = sort || 'id'\n\n let items = []\n\n this.state.data.forEach((item) => items.push(item))\n\n items.sort((a, b) => {\n if (a[sort] > b[sort]) return -1\n if (a[sort] < b[sort]) return 1\n return 0\n })\n\n return items\n }", "sort(callback) {\r\n return this.array.sort(callback);\r\n }", "function show(a) {\n a.sort();\n a.map( e => console.log(e) );\n}", "function sortArr2(arr) {\n console.table(arr.sort((a, b) => a - b)\n );\n}", "function mergeSort(arr) {\n\n}", "sortSpecies() {\n //Sortira igrace po vrsti\n for (let s of this.species) {\n s.sortSpecies();\n }\n\n //Sortira vrste po fitnesu najboljeg igraca\n let temp = [];\n for (let i = 0; i < this.species.length; i++) {\n let max = 0;\n let maxIndex = 0;\n for (let j = 0; j < this.species.length; j++) {\n if (this.species[j].bestFitness > max) {\n max = this.species[j].bestFitness;\n maxIndex = j;\n }\n }\n temp.push(this.species[maxIndex]);\n this.species.splice(maxIndex, 1);\n i--;\n }\n this.species = [];\n arrayCopy(temp, this.species);\n }", "function sortArray1(arr) {\n return arr.sort((a, b) => a-b)\n}", "function Ob(){for(var a=J.vb(),b=[],c=[],d=0;d<a.length;d++){var e=a[d].Ak;e&&(e=e.call(a[d]))&&(e[2]?b.push(e):c.push(e))}c.sort(Pb);b.sort(Pb);return[c,b]}", "sort() {\n for (let i = 0; i < this.values.length - 1; i++) {\n let min = i;\n for (let j = i + 1; j < this.values.length; j++) {\n if (this.values[j] < this.values[min]) min = j;\n }\n\n this.swap(i, min);\n }\n }", "_sortBy(array, selectors) {\n return array.concat().sort((a, b) => {\n for (let selector of selectors) {\n let reverse = selector.order ? -1 : 1;\n\n a = selector.value ? JP.query(a, selector.value)[0] : JP.query(a,selector)[0];\n b = selector.value ? JP.query(b, selector.value)[0] : JP.query(b,selector)[0];\n\n if (a.toUpperCase() > b.toUpperCase()) {\n return reverse;\n }\n if (a.toUpperCase() < b.toUpperCase()) {\n return -1 * reverse;\n }\n }\n return 0;\n });\n }", "function sortData (data) {\n ...\n}", "function start()\n{\n var a = [ 10, 1, 9, 2, 8, 3, 7, 4, 6, 5 ];\n\n outputArray( \"Data items in original order: \", a,\n document.getElementById( \"originalArray\" ) ); \n a.sort( compareIntegers ); // sort the array\n outputArray( \"Data items in ascending order: \", a,\n document.getElementById( \"sortedArray\" ) ); \n} // end function start", "sortedItems() {\n return this.childItems.slice().sort((i1, i2) => {\n return i1.index - i2.index;\n });\n }", "function sortJson() {\r\n\t \r\n}", "function myarrayresult(){\r\narray2.sort(function (a,b) {\r\n return a-b; //For assending order \r\n return b-a; //For descendening Order // Correct \r\n});\r\n}", "sort() {\n let a = this.array;\n const step = 1;\n let compares = 0;\n for (let i = 0; i < a.length; i++) {\n let tmp = a[i];\n for (var j = i; j >= step; j -= step) {\n this.store(step, i, j, tmp, compares);\n compares++;\n if (a[j - step] > tmp) {\n a[j] = a[j - step];\n this.store(step, i, j, tmp, compares);\n } else {\n break;\n }\n }\n a[j] = tmp;\n this.store(step, i, j, tmp, compares);\n }\n this.array = a;\n }", "function task14_16_10(){\n var scores =[320,230,480,120];\n document.write(\"Scores of Students : \"+scores + \"<br>\");\n scores.sort();\n document.write(\"Ordered Score of Students : \"+scores);\n}", "function baseSortBy(array, comparer) {\n var length = array.length;\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n}", "function copySorted(arr){\n let a=arr.slice(0);\n return a.sort();\n}", "function sortKids(mmdKidsList) {\r\n\t\tvar sortedList = [];\r\n\t\tif (mmdKidsList && mmdKidsList instanceof Array) {\r\n\t\t\tfor (var i = 0; i < mmdKidsList.length; i++){\r\n\t\t\t\tif (mmdKidsList[i].scalar){\r\n\t\t\t\t\tsortedList.push(mmdKidsList[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (var j = 0; j < mmdKidsList.length; j++){\r\n\t\t\t\tif (!mmdKidsList[j].scalar){\r\n\t\t\t\t\tsortedList.push(mmdKidsList[j]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sortedList;\r\n \t}", "function sortVersionArray(arr) {\n return arr.map( a => a.replace(/\\d+/g, n => +n+100000 ) ).sort()\n .map( a => a.replace(/\\d+/g, n => +n-100000 ) );\n}", "function sortArray() {\n\n //PRZYPISANIE WARTOSCI DO TABLICY\n var points = [41, 3, 6, 1, 114, 54, 64];\n\n //SORTOWANIE OD NAJMNIEJSZEJ DO NAJWIEKSZEJ\n points.sort(function (a, b) {\n //POROWNANIE DWOCH ELEM. TABLICY - MNIEJSZY STAWIA PO LEWEJ, WIEKSZY PO PRAWEJ\n return a - b;\n });\n\n //ZWROCENIE POSORTOWANEJ TABLICY\n return points;\n}", "function sort(unsortedArray) {\n // Your code here\n}", "function testSorts()\n{\n\n\tconsole.log(\"============= original googleResults =============\");\n\tconsole.log(googleResults);\n\t\n\tconsole.log(\"==== before sort array element index name rating ====\");\n\t\n\tgoogleResults.forEach(function(element,index)\n\t{\n\t\t console.log(index + \": name: \" + element.name + \" rating: \" + element.rating);\n\n\t});\n\n\t\t// commented for testing\n\t\t//googleResults.sortByRatingAscending();\n\t\t\n\t\t// commented for testing\n\t\tgoogleResults.sortByRatingDescending();\n\t\t\n\t//===============================================================\t\n\n\tconsole.log(\"============= after sort =============\");\n\n\tgoogleResults.forEach(function(element,index)\n\t{\n\t\t console.log(index + \": name: \" + element.name + \" rating: \" + element.rating);\n\n\t});\n\t\n}//END test", "function sort(arr) {\n return null; \n}", "nameSort() {\n orders.sort( \n function(a,b) {\n return (a[0] < b[0]) ? -1 : (a[0] > b[0]) ? 1 : 0; \n }\n ); \n }", "function alphabeticalOrder(arr) {\n // Add your code below this line\n return arr.sort()\n\n // Add your code above this line\n}", "sort(){\n\t\tvar sortable = [];\n\t\tfor (var vehicle in this.primes) {\n\t\t sortable.push([vehicle, this.primes[vehicle]]);\n\t\t}\n\t\treturn sortable.sort(function(a, b) {\n\t\t return a[1] - b[1];\n\t\t});\n\t}", "itemsToSort() {\n return [];\n }", "function sortContacts(arr){\n arr.sort(function(a,b){\n if (a < b) return -1;\n else if (a > b) return 1;\n return 0;\n });\n return arr;\n }", "function sortMin(arr){\n arr = arr.sort(function(a, b){\n return a>b;\n });\n return arr; \n}", "sort() {\n const a = this.dict;\n const n = a.length;\n\n if( n < 2 ) { // eslint-disable-line \n } else if( n < 100 ) {\n // insertion sort\n for( let i = 1; i < n; i += 1 ) {\n const item = a[ i ];\n let j = i - 1;\n while( j >= 0 && item[ 0 ] < a[ j ][ 0 ] ) {\n a[ j + 1 ] = a[ j ];\n j -= 1;\n }\n a[ j + 1 ] = item;\n }\n } else {\n /**\n * Bottom-up iterative merge sort\n */\n for( let c = 1; c <= n - 1; c = 2 * c ) {\n for( let l = 0; l < n - 1; l += 2 * c ) {\n const m = l + c - 1;\n const r = Math.min( l + 2 * c - 1, n - 1 );\n if( m > r ) continue;\n merge( a, l, m, r );\n }\n }\n }\n }", "function sortArray(arr)\n{\n var abc = 'abcdefghijklmnopqrstuvwxyz';\n var dummy = [];\n\n var assignPriority = function (e)\n {\n if (e === \"...\")\n return ((27 + 1) * 26);\n\n var content = e.split('');\n if (isNaN(content[1]))\n return (((abc.indexOf(content[0]) + 1) * 26) * 100);\n\n return (content[1] * 10) + abc.indexOf(content[0]);\n }\n\n arr.forEach(function (e)\n {\n dummy.push(e);\n dummy.sort(function (a, b)\n {\n return assignPriority(a) - assignPriority(b);\n })\n });\n\n arr.length = 0;\n dummy.forEach(function (e)\n {\n if (arr.indexOf(e) === -1)\n {\n arr.push(e);\n }\n });\n}", "function treatArray(raw_arr)\n{\n var arr;\narr=sortArray(raw_arr)\narr=filterArray(arr)\nreturn arr\n}", "function sortedArr(arr) {\n const sortedArray = arr.slice().sort((a, b) => a - b)\n return sortedArray\n}", "function sortArguments(...args) {\n return args.sort();\n}", "sort() {\n if(this.data.length >= 2){\n for (var i = 0; i < this.data.length - 1; i++){\n for (var j = i + 1; j < this.data.length; j++){\n if (this.data[i].users.length < this.data[j].users.length){\n let tmp = this.data[i];\n this.data[i] = this.data[j];\n this.data[j] = tmp;\n \n }\n }\n \n }\n }\n }", "function sortArray() {\n //Twoj komentarz ...\n //deklaracje tablicy z elemtami\n var points = [41, 3, 6, 1, 114, 54, 64];\n\n //Twoj komentarz ...\n points.sort(function(a, b) {\n //Twoj komentarz ...\n\n return a - b;\n });\n\n //Twoj komentarz ...\n //zwrócenie tablicy points\n return points;\n}", "function bc(){for(var a=B.Za(),b=[],c=[],d=0;d<a.length;d++){var e=a[d].Hf;e&&(e=e.call(a[d]))&&(e[2]?b.push(e):c.push(e))}c.sort(cc);b.sort(cc);return[c,b]}", "sorted(x) {\n super.sorted(0, x);\n }", "sort () {\r\n this._data.sort((a, b) => a.sortOrder !== b.sortOrder ? b.sortOrder - a.sortOrder : a.value.localeCompare(b.value))\r\n }", "sortListItems() {\n let sortedItems = this.props.listItems.slice();\n return sortedItems.sort((a, b) => {\n if (a.value > b.value) {\n return -1;\n } else if (a.value < b.value) {\n return 1;\n }\n return 0;\n });\n }", "function sortPlaylist() {\n playlistArr = Object.entries(livePlaylist);\n\n if (playlistArr.length > 2) {\n var sorted = false;\n while (!sorted) {\n sorted = true;\n for (var i = 1; i < playlistArr.length - 1; i++) {\n if ((playlistArr[i][1].upvote < playlistArr[i + 1][1].upvote)) {\n sorted = false;\n var temp = playlistArr[i];\n playlistArr[i] = playlistArr[i + 1];\n playlistArr[i + 1] = temp;\n // })\n }\n // playlistArr[i][1].index = i;\n }\n }\n }\n return playlistArr;\n}", "function alphabetSort(){\n const tilesArr = [\"Caribbean\", \"The Bahamans\", \"Mexico\", \"Europe\", \"Bermuda\", \"Alaska\", \"Canada & New England\", \"Hawaii\", \"Panama Canal\", \"Transatlantic\", \"Transpacific\", \"Australia\"];\n tilesArr.sort()\n console.log(tilesArr);\n}", "function _sort(array) {\n array.sort(function (a, b) {\n return b.length - a.length;\n });\n }", "function sort() {\n elementArray.sort(function (x, y) {\n return x.elem - y.elem;\n });\n render(elementArray);\n }", "function sort(compare, elements) {\n //let property = elements[property];\n \n if (Array.isArray(elements)) {\n if (elements.length <= 1) {\n return elements;\n }\n else {\n const middle = Math.floor(elements.length /2);\n \n const left = elements.slice(0, middle);\n const right = elements.slice(middle, elements.length);\n \n const leftSorted = sort(compare, left);\n const rightSorted = sort(compare, right);\n return merge(compare, leftSorted, rightSorted);\n }\n }\n return elements;\n}", "function byAge(arr){\n return arr.sort(function(a, b){\n return a.age - b.age;\n });\n}", "function sort() {\n renderContent(numArray.sort());\n}", "function ed(a){a=a.tc();for(var b=[],c=[],d=0;d<a.length;d++){var e=a[d].cA;e&&(e=e.call(a[d]))&&(e[2]?b.push(e):c.push(e))}c.sort(fd);b.sort(fd);return[c,b]}", "_orderSort(l, r) {\n return l.order - r.order;\n }", "function sortList(a,b) {\n if (a.total < b.total)\n return -1;\n if (a.total > b.total)\n return 1;\n return 0;\n }", "function sortList(a,b) {\n if (a.total < b.total)\n return -1;\n if (a.total > b.total)\n return 1;\n return 0;\n }", "function ls (lista) {\nreturn lista.sort(function(x, y) {\n return y.length - x.length; \n })\n}", "function solution(nums){\n return Array.isArray(nums) ? nums.sort((a, b) => a - b) : [];\n}", "serialize() {\n //creates array with spread syntax, then sorts\n //not cross-compatible with some older versions of browsers like IE11\n const sorted = [...this.data];\n sorted.sort((a , b) => {\n return a.comparator - b.comparator;\n });\n return JSON.stringify(sorted);\n }", "serialize() {\n //creates array with spread syntax, then sorts\n //not cross-compatible with some older versions of browsers like IE11\n const sorted = [...this.data];\n sorted.sort((a , b) => {\n return a.comparator - b.comparator;\n });\n return JSON.stringify(sorted);\n }", "function qsort(l){\r\n return sortBy(compare, l);\r\n}", "function quickersort(a){\n var left = []\n , right = []\n , pivot = a[0]\n if(a.length == 0){\n return []\n }\n for(var i = 1; i < a.length; i++){\n a[i] < pivot ? left.push(a[i]) : right.push(a[i])\n }\n return quickersort(left).concat(pivot, quickersort(right))\n}", "function sort(a, b) {\n return a - b;\n}", "function sort(array) {\n var buf;\n\n for (var j = 0; j < array.length-1; j++)\n for (var i = 0; i < array.length-j; i++) {\n if (array[i] > array[i+1]) {\n buf = array[i];\n array[i] = array[i+1];\n array[i+1] = buf;\n }\n }\n\n return array;\n }", "function urutAscending(array) {\r\n array.sort((a, b) => {\r\n return a - b\r\n })\r\nreturn array;\r\n}", "function mSort (array) {\n if (array.length === 1) {\n return array // return once we hit an array with a single item\n }\n const middle = Math.floor(array.length / 2) // get the middle item of the array rounded down\n const left = array.slice(0, middle) // items on the left side\n const right = array.slice(middle) // items on the right side\n return merge(\n mSort(left),\n mSort(right)\n )\n }", "function sortAsc(a, b) {\n return a[1] - b[1];\n }", "function sortScores(){\n //basically this function will take the two arrays, sort the scores, and set the index of the other\n //To print the high score page in order\n var tempScores = highScoreScores.slice(0);\n var tempNames = highScoreNames.slice(0);\n\n highScoreScores.sort(function(a,b){return b-a});\n for(i=0;i<tempNames.length;i++){\n //Have to admit, the following line of code gave me a headache, but I got it to work\n highScoreNames[i] = tempNames[tempScores.indexOf(highScoreScores[i])];\n }\n}", "async function TopologicalSort(){}", "sorted(matches) {\n // sort on i primary, j secondary\n return matches.sort((m1, m2) => (m1.i - m2.i) || (m1.j - m2.j));\n }", "function asc(arr) {\n\t arr.sort(function (a, b) {\n\t return a - b;\n\t });\n\t return arr;\n\t }", "function sortArray(){\n\n /*Uses the built in sort -method that can accept a function that specifies\n how the array should be sorted. In this case we want the array to be sorted\n based on the object's price. Lower priced cars go first.*/\n function compare(a,b) {\n if (a.price < b.price) return -1;\n if (a.price > b.price) return 1;\n return 0;\n }\n listOfCars.sort(compare);\n console.table(listOfCars);\n\n }", "function rankitup(array) {\narray.sort(function(a, b){return a-b});\n}", "function sortUnique(a, aRef) {\n return a.filter(function (s, i) {\n return (s && a.indexOf(s) === i);\n }).sort((aRef instanceof Array) ? function (a, b) {\n // Sort by reference string array\n var nA = aRef.indexOf(a),\n nB = aRef.indexOf(b);\n if (nA > -1 && nB > -1)\n return nA - nB;\n else\n return ascendNumeric(a, b);\n } : ascendNumeric);\n}" ]
[ "0.76896363", "0.76896363", "0.7431174", "0.7381352", "0.7223031", "0.7044736", "0.7002338", "0.697896", "0.69405884", "0.68795085", "0.6870758", "0.6870758", "0.68334246", "0.68275315", "0.6821634", "0.67999935", "0.6789589", "0.67690444", "0.6720508", "0.67083323", "0.67058194", "0.67039376", "0.6700412", "0.6697119", "0.6688845", "0.6673332", "0.6653218", "0.66435057", "0.66203755", "0.6614913", "0.66057926", "0.65821624", "0.65745586", "0.6573785", "0.657377", "0.65668243", "0.6564629", "0.6563167", "0.6546535", "0.65367883", "0.653225", "0.6480524", "0.6477283", "0.64771694", "0.64656717", "0.6437952", "0.6422067", "0.6411035", "0.64067", "0.6404812", "0.6391857", "0.6390683", "0.638328", "0.6378063", "0.6364115", "0.63592887", "0.63579386", "0.63530433", "0.6351624", "0.63512295", "0.6348263", "0.6342214", "0.63359976", "0.6334614", "0.63318104", "0.6331063", "0.6330091", "0.63279617", "0.631836", "0.6315173", "0.6310934", "0.63080466", "0.63073653", "0.6305542", "0.6304096", "0.6303879", "0.63032264", "0.630265", "0.6302476", "0.6296374", "0.62940747", "0.6293306", "0.6293306", "0.6291778", "0.6284418", "0.62799466", "0.62799466", "0.62742066", "0.6273841", "0.62726045", "0.6268466", "0.62684375", "0.6263077", "0.62618864", "0.62481016", "0.6246355", "0.6242385", "0.6242021", "0.62397605", "0.6236279", "0.6235783" ]
0.0
-1
Return a moment from input, that is local/utc/zone equivalent to model.
function cloneWithOffset(input, model) { var res, diff; if (model._isUTC) { res = model.clone(); diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res); // Use low-level api, because this fn is low-level api. res._d.setTime(+res._d + diff); utils_hooks__hooks.updateOffset(res, false); return res; } else { return local__createLocal(input).local(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeAs(input, model) {\n\t return model._isUTC ? moment(input).zone(model._offset || 0) :\n\t moment(input).local();\n\t }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n\t var res, diff;\n\t if (model._isUTC) {\n\t res = model.clone();\n\t diff = (moment.isMoment(input) || isDate(input) ? +input : +moment(input)) - +res;\n\t // Use low-level api, because this fn is low-level api.\n\t res._d.setTime(+res._d + diff);\n\t moment.updateOffset(res, false);\n\t return res;\n\t } else {\n\t return moment(input).local();\n\t }\n\t }", "function makeAs(input, model) {\n\t\tvar res, diff;\n\t\tif (model._isUTC) {\n\t\t\tres = model.clone();\n\t\t\tdiff = (moment.isMoment(input) || isDate(input) ? +input : +moment(input)) - (+res);\n\t\t\t// Use low-level api, because this fn is low-level api.\n\t\t\tres._d.setTime(+res._d + diff);\n\t\t\tmoment.updateOffset(res, false);\n\t\t\treturn res;\n\t\t} else {\n\t\t\treturn moment(input).local();\n\t\t}\n\t}", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function momentify(source) {\r\n return moment.utc(source);\r\n}", "parse(value) {\n return +moment.utc(value);\n }", "function makeMoment(args, parseAsUTC, parseZone) {\n var input = args[0];\n var isSingleString = args.length == 1 && typeof input === 'string';\n var isAmbigTime;\n var isAmbigZone;\n var ambigMatch;\n var mom;\n\n if (moment.isMoment(input)) {\n mom = moment.apply(null, args); // clone it\n transferAmbigs(input, mom); // the ambig flags weren't transfered with the clone\n }\n else if (isNativeDate(input) || input === undefined) {\n mom = moment.apply(null, args); // will be local\n }\n else { // \"parsing\" is required\n isAmbigTime = false;\n isAmbigZone = false;\n\n if (isSingleString) {\n if (ambigDateOfMonthRegex.test(input)) {\n // accept strings like '2014-05', but convert to the first of the month\n input += '-01';\n args = [input]; // for when we pass it on to moment's constructor\n isAmbigTime = true;\n isAmbigZone = true;\n }\n else if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n isAmbigTime = !ambigMatch[5]; // no time part?\n isAmbigZone = true;\n }\n }\n else if ($.isArray(input)) {\n // arrays have no timezone information, so assume ambiguous zone\n isAmbigZone = true;\n }\n // otherwise, probably a string with a format\n\n if (parseAsUTC || isAmbigTime) {\n mom = moment.utc.apply(moment, args);\n }\n else {\n mom = moment.apply(null, args);\n }\n\n if (isAmbigTime) {\n mom._ambigTime = true;\n mom._ambigZone = true; // ambiguous time always means ambiguous zone\n }\n else if (parseZone) { // let's record the inputted zone somehow\n if (isAmbigZone) {\n mom._ambigZone = true;\n }\n else if (isSingleString) {\n if (mom.utcOffset) {\n mom.utcOffset(input); // if not a valid zone, will assign UTC\n }\n else {\n mom.zone(input); // for moment-pre-2.9\n }\n }\n }\n }\n\n mom._fullCalendar = true; // flag for extended functionality\n\n return mom;\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function makeMoment(args, parseAsUTC, parseZone) {\n\t\tvar input = args[0];\n\t\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\t\tvar isAmbigTime;\n\t\tvar isAmbigZone;\n\t\tvar ambigMatch;\n\t\tvar mom;\n\n\t\tif (moment.isMoment(input) || isNativeDate(input) || input === undefined) {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\t\telse { // \"parsing\" is required\n\t\t\tisAmbigTime = false;\n\t\t\tisAmbigZone = false;\n\n\t\t\tif (isSingleString) {\n\t\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\t\tinput += '-01';\n\t\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\t\tisAmbigTime = true;\n\t\t\t\t\tisAmbigZone = true;\n\t\t\t\t}\n\t\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\t\tisAmbigZone = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ($.isArray(input)) {\n\t\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\t// otherwise, probably a string with a format\n\n\t\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\t\tmom = moment.utc.apply(moment, args);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmom = moment.apply(null, args);\n\t\t\t}\n\n\t\t\tif (isAmbigTime) {\n\t\t\t\tmom._ambigTime = true;\n\t\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t\t}\n\t\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\t\tif (isAmbigZone) {\n\t\t\t\t\tmom._ambigZone = true;\n\t\t\t\t}\n\t\t\t\telse if (isSingleString) {\n\t\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tmom._fullCalendar = true; // flag for extended functionality\n\n\t\treturn mom;\n\t}", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input) || isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args);\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input) || isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args);\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input) || isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args);\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input) || isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args);\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input) || isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args);\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar output; // an object with fields for the new FCMoment object\n\n\tif (moment.isMoment(input)) {\n\t\toutput = moment.apply(null, args); // clone it\n\n\t\t// the ambig properties have not been preserved in the clone, so reassign them\n\t\tif (input._ambigTime) {\n\t\t\toutput._ambigTime = true;\n\t\t}\n\t\tif (input._ambigZone) {\n\t\t\toutput._ambigZone = true;\n\t\t}\n\t}\n\telse if (isNativeDate(input) || input === undefined) {\n\t\toutput = moment.apply(null, args); // will be local\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC) {\n\t\t\toutput = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\toutput = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\toutput._ambigTime = true;\n\t\t\toutput._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\toutput._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\toutput.zone(input); // if not a valid zone, will assign UTC\n\t\t\t}\n\t\t}\n\t}\n\n\treturn new FCMoment(output);\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar output; // an object with fields for the new FCMoment object\n\n\tif (moment.isMoment(input)) {\n\t\toutput = moment.apply(null, args); // clone it\n\n\t\t// the ambig properties have not been preserved in the clone, so reassign them\n\t\tif (input._ambigTime) {\n\t\t\toutput._ambigTime = true;\n\t\t}\n\t\tif (input._ambigZone) {\n\t\t\toutput._ambigZone = true;\n\t\t}\n\t}\n\telse if (isNativeDate(input) || input === undefined) {\n\t\toutput = moment.apply(null, args); // will be local\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC) {\n\t\t\toutput = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\toutput = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\toutput._ambigTime = true;\n\t\t\toutput._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\toutput._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\toutput.zone(input); // if not a valid zone, will assign UTC\n\t\t\t}\n\t\t}\n\t}\n\n\treturn new FCMoment(output);\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input)) {\n\t\tmom = moment.apply(null, args); // clone it\n\t\ttransferAmbigs(input, mom); // the ambig flags weren't transfered with the clone\n\t}\n\telse if (isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args); // will be local\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tif (mom.utcOffset) {\n\t\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmom.zone(input); // for moment-pre-2.9\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input)) {\n\t\tmom = moment.apply(null, args); // clone it\n\t\ttransferAmbigs(input, mom); // the ambig flags weren't transfered with the clone\n\t}\n\telse if (isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args); // will be local\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tif (mom.utcOffset) {\n\t\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmom.zone(input); // for moment-pre-2.9\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input)) {\n\t\tmom = moment.apply(null, args); // clone it\n\t\ttransferAmbigs(input, mom); // the ambig flags weren't transfered with the clone\n\t}\n\telse if (isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args); // will be local\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tif (mom.utcOffset) {\n\t\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmom.zone(input); // for moment-pre-2.9\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "function cloneWithOffset(input, model) {\n\tvar res, diff;\n\tif (model._isUTC) {\n\t\tres = model.clone();\n\t\tdiff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n\t\t// Use low-level api, because this fn is low-level api.\n\t\tres._d.setTime(res._d.valueOf() + diff);\n\t\thooks.updateOffset(res, false);\n\t\treturn res;\n\t} else {\n\t\treturn createLocal(input).local();\n\t}\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n if (parseAsUTC === void 0) { parseAsUTC = false; }\n if (parseZone === void 0) { parseZone = false; }\n var input = args[0];\n var isSingleString = args.length === 1 && typeof input === 'string';\n var isAmbigTime;\n var isAmbigZone;\n var ambigMatch;\n var mom;\n if (moment.isMoment(input) || util_1.isNativeDate(input) || input === undefined) {\n mom = moment.apply(null, args);\n }\n else { // \"parsing\" is required\n isAmbigTime = false;\n isAmbigZone = false;\n if (isSingleString) {\n if (ambigDateOfMonthRegex.test(input)) {\n // accept strings like '2014-05', but convert to the first of the month\n input += '-01';\n args = [input]; // for when we pass it on to moment's constructor\n isAmbigTime = true;\n isAmbigZone = true;\n }\n else if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n isAmbigTime = !ambigMatch[5]; // no time part?\n isAmbigZone = true;\n }\n }\n else if ($.isArray(input)) {\n // arrays have no timezone information, so assume ambiguous zone\n isAmbigZone = true;\n }\n // otherwise, probably a string with a format\n if (parseAsUTC || isAmbigTime) {\n mom = moment.utc.apply(moment, args);\n }\n else {\n mom = moment.apply(null, args);\n }\n if (isAmbigTime) {\n mom._ambigTime = true;\n mom._ambigZone = true; // ambiguous time always means ambiguous zone\n }\n else if (parseZone) { // let's record the inputted zone somehow\n if (isAmbigZone) {\n mom._ambigZone = true;\n }\n else if (isSingleString) {\n mom.utcOffset(input); // if not a valid zone, will assign UTC\n }\n }\n }\n mom._fullCalendar = true; // flag for extended functionality\n return mom;\n}", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function makeMoment(args, parseAsUTC, parseZone) {\n if (parseAsUTC === void 0) { parseAsUTC = false; }\n if (parseZone === void 0) { parseZone = false; }\n var input = args[0];\n var isSingleString = args.length === 1 && typeof input === 'string';\n var isAmbigTime;\n var isAmbigZone;\n var ambigMatch;\n var mom;\n if (moment.isMoment(input) || util_1.isNativeDate(input) || input === undefined) {\n mom = moment.apply(null, args);\n }\n else {\n isAmbigTime = false;\n isAmbigZone = false;\n if (isSingleString) {\n if (ambigDateOfMonthRegex.test(input)) {\n // accept strings like '2014-05', but convert to the first of the month\n input += '-01';\n args = [input]; // for when we pass it on to moment's constructor\n isAmbigTime = true;\n isAmbigZone = true;\n }\n else if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n isAmbigTime = !ambigMatch[5]; // no time part?\n isAmbigZone = true;\n }\n }\n else if ($.isArray(input)) {\n // arrays have no timezone information, so assume ambiguous zone\n isAmbigZone = true;\n }\n // otherwise, probably a string with a format\n if (parseAsUTC || isAmbigTime) {\n mom = moment.utc.apply(moment, args);\n }\n else {\n mom = moment.apply(null, args);\n }\n if (isAmbigTime) {\n mom._ambigTime = true;\n mom._ambigZone = true; // ambiguous time always means ambiguous zone\n }\n else if (parseZone) {\n if (isAmbigZone) {\n mom._ambigZone = true;\n }\n else if (isSingleString) {\n mom.utcOffset(input); // if not a valid zone, will assign UTC\n }\n }\n }\n mom._fullCalendar = true; // flag for extended functionality\n return mom;\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n if (parseAsUTC === void 0) { parseAsUTC = false; }\n if (parseZone === void 0) { parseZone = false; }\n var input = args[0];\n var isSingleString = args.length === 1 && typeof input === 'string';\n var isAmbigTime;\n var isAmbigZone;\n var ambigMatch;\n var mom;\n if (moment.isMoment(input) || util_1.isNativeDate(input) || input === undefined) {\n mom = moment.apply(null, args);\n }\n else {\n isAmbigTime = false;\n isAmbigZone = false;\n if (isSingleString) {\n if (ambigDateOfMonthRegex.test(input)) {\n // accept strings like '2014-05', but convert to the first of the month\n input += '-01';\n args = [input]; // for when we pass it on to moment's constructor\n isAmbigTime = true;\n isAmbigZone = true;\n }\n else if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n isAmbigTime = !ambigMatch[5]; // no time part?\n isAmbigZone = true;\n }\n }\n else if ($.isArray(input)) {\n // arrays have no timezone information, so assume ambiguous zone\n isAmbigZone = true;\n }\n // otherwise, probably a string with a format\n if (parseAsUTC || isAmbigTime) {\n mom = moment.utc.apply(moment, args);\n }\n else {\n mom = moment.apply(null, args);\n }\n if (isAmbigTime) {\n mom._ambigTime = true;\n mom._ambigZone = true; // ambiguous time always means ambiguous zone\n }\n else if (parseZone) {\n if (isAmbigZone) {\n mom._ambigZone = true;\n }\n else if (isSingleString) {\n mom.utcOffset(input); // if not a valid zone, will assign UTC\n }\n }\n }\n mom._fullCalendar = true; // flag for extended functionality\n return mom;\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n if (parseAsUTC === void 0) { parseAsUTC = false; }\n if (parseZone === void 0) { parseZone = false; }\n var input = args[0];\n var isSingleString = args.length === 1 && typeof input === 'string';\n var isAmbigTime;\n var isAmbigZone;\n var ambigMatch;\n var mom;\n if (moment.isMoment(input) || util_1.isNativeDate(input) || input === undefined) {\n mom = moment.apply(null, args);\n }\n else {\n isAmbigTime = false;\n isAmbigZone = false;\n if (isSingleString) {\n if (ambigDateOfMonthRegex.test(input)) {\n // accept strings like '2014-05', but convert to the first of the month\n input += '-01';\n args = [input]; // for when we pass it on to moment's constructor\n isAmbigTime = true;\n isAmbigZone = true;\n }\n else if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n isAmbigTime = !ambigMatch[5]; // no time part?\n isAmbigZone = true;\n }\n }\n else if ($.isArray(input)) {\n // arrays have no timezone information, so assume ambiguous zone\n isAmbigZone = true;\n }\n // otherwise, probably a string with a format\n if (parseAsUTC || isAmbigTime) {\n mom = moment.utc.apply(moment, args);\n }\n else {\n mom = moment.apply(null, args);\n }\n if (isAmbigTime) {\n mom._ambigTime = true;\n mom._ambigZone = true; // ambiguous time always means ambiguous zone\n }\n else if (parseZone) {\n if (isAmbigZone) {\n mom._ambigZone = true;\n }\n else if (isSingleString) {\n mom.utcOffset(input); // if not a valid zone, will assign UTC\n }\n }\n }\n mom._fullCalendar = true; // flag for extended functionality\n return mom;\n}", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (constructor_1.isMoment(input) || is_date_1.default(input) ? input.valueOf() : local_1.createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks_1.hooks.updateOffset(res, false);\n return res;\n }\n else {\n return local_1.createLocal(input).local();\n }\n}", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }" ]
[ "0.8499712", "0.84169763", "0.84169763", "0.84169763", "0.84169763", "0.84169763", "0.84169763", "0.84169763", "0.84169763", "0.84169763", "0.84169763", "0.84169763", "0.84169763", "0.84169763", "0.84169763", "0.84169763", "0.84169763", "0.84169763", "0.79524314", "0.79352164", "0.7898495", "0.78502786", "0.78502786", "0.78502786", "0.78502786", "0.78502786", "0.78502786", "0.78502786", "0.78502786", "0.78502786", "0.78502786", "0.78502786", "0.78502786", "0.78502786", "0.78502786", "0.7114993", "0.66000724", "0.6559659", "0.65427214", "0.65152353", "0.6510451", "0.6510451", "0.6510451", "0.6510451", "0.6510451", "0.6510451", "0.6510451", "0.6510451", "0.6510451", "0.6510451", "0.6510451", "0.6510451", "0.6510451", "0.64754784", "0.64754784", "0.64754784", "0.64754784", "0.64754784", "0.64042675", "0.64042675", "0.6384567", "0.6384567", "0.6384567", "0.6376212", "0.63655853", "0.6363708", "0.6363708", "0.63438624", "0.63289106", "0.63289106", "0.63289106", "0.6322308", "0.632179", "0.632179", "0.632179", "0.632179", "0.632179", "0.632179", "0.632179", "0.632179", "0.632179", "0.632179", "0.632179", "0.632179", "0.632179", "0.632179", "0.632179", "0.632179", "0.632179", "0.632179", "0.632179", "0.632179", "0.632179", "0.632179", "0.632179", "0.632179", "0.632179", "0.632179", "0.632179", "0.632179", "0.632179" ]
0.0
-1
MOMENTS keepLocalTime = true means only change the timezone, without affecting the local hour. So 5:31:26 +0300 [utcOffset(2, true)]> 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset +0200, so we adjust the time as needed, to be valid. Keeping the time actually adds/subtracts (one hour) from the actual represented time. That is why we call updateOffset a second time. In case it wants us to change the offset again _changeInProgress == true case, then we have to adjust, because there is no such time in the given timezone.
function getSetOffset (input, keepLocalTime) { var offset = this._offset || 0, localAdjust; if (!this.isValid()) { return input != null ? this : NaN; } if (input != null) { if (typeof input === 'string') { input = offsetFromString(matchShortOffset, input); } else if (Math.abs(input) < 16) { input = input * 60; } if (!this._isUTC && keepLocalTime) { localAdjust = getDateOffset(this); } this._offset = input; this._isUTC = true; if (localAdjust != null) { this.add(localAdjust, 'm'); } if (offset !== input) { if (!keepLocalTime || this._changeInProgress) { add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false); } else if (!this._changeInProgress) { this._changeInProgress = true; utils_hooks__hooks.updateOffset(this, true); this._changeInProgress = null; } } return this; } else { return this._isUTC ? offset : getDateOffset(this); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSetOffset(input,keepLocalTime){var offset=this._offset||0,localAdjust;if(!this.isValid()){return input!=null?this:NaN;}if(input!=null){if(typeof input==='string'){input=offsetFromString(matchShortOffset,input);}else if(Math.abs(input)<16){input=input*60;}if(!this._isUTC&&keepLocalTime){localAdjust=getDateOffset(this);}this._offset=input;this._isUTC=true;if(localAdjust!=null){this.add(localAdjust,'m');}if(offset!==input){if(!keepLocalTime||this._changeInProgress){add_subtract__addSubtract(this,create__createDuration(input-offset,'m'),1,false);}else if(!this._changeInProgress){this._changeInProgress=true;utils_hooks__hooks.updateOffset(this,true);this._changeInProgress=null;}}return this;}else{return this._isUTC?offset:getDateOffset(this);}}", "function getSetOffset(input,keepLocalTime){var offset=this._offset||0,localAdjust;if(!this.isValid()){return input!=null?this:NaN;}if(input!=null){if(typeof input==='string'){input=offsetFromString(matchShortOffset,input);}else if(Math.abs(input)<16){input=input*60;}if(!this._isUTC&&keepLocalTime){localAdjust=getDateOffset(this);}this._offset=input;this._isUTC=true;if(localAdjust!=null){this.add(localAdjust,'m');}if(offset!==input){if(!keepLocalTime||this._changeInProgress){add_subtract__addSubtract(this,create__createDuration(input-offset,'m'),1,false);}else if(!this._changeInProgress){this._changeInProgress=true;utils_hooks__hooks.updateOffset(this,true);this._changeInProgress=null;}}return this;}else{return this._isUTC?offset:getDateOffset(this);}}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\r\n var offset = this._offset || 0,\r\n localAdjust;\r\n if (input != null) {\r\n if (typeof input === 'string') {\r\n input = offsetFromString(input);\r\n }\r\n if (Math.abs(input) < 16) {\r\n input = input * 60;\r\n }\r\n if (!this._isUTC && keepLocalTime) {\r\n localAdjust = getDateOffset(this);\r\n }\r\n this._offset = input;\r\n this._isUTC = true;\r\n if (localAdjust != null) {\r\n this.add(localAdjust, 'm');\r\n }\r\n if (offset !== input) {\r\n if (!keepLocalTime || this._changeInProgress) {\r\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\r\n } else if (!this._changeInProgress) {\r\n this._changeInProgress = true;\r\n utils_hooks__hooks.updateOffset(this, true);\r\n this._changeInProgress = null;\r\n }\r\n }\r\n return this;\r\n } else {\r\n return this._isUTC ? offset : getDateOffset(this);\r\n }\r\n }", "function getSetOffset(input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(input);\n\t }\n\t if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(input);\n\t }\n\t if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset(input,keepLocalTime,keepMinutes){var offset=this._offset||0,localAdjust;if(!this.isValid()){return input!=null?this:NaN;}if(input!=null){if(typeof input==='string'){input=offsetFromString(matchShortOffset,input);if(input===null){return this;}}else if(Math.abs(input)<16&&!keepMinutes){input=input*60;}if(!this._isUTC&&keepLocalTime){localAdjust=getDateOffset(this);}this._offset=input;this._isUTC=true;if(localAdjust!=null){this.add(localAdjust,'m');}if(offset!==input){if(!keepLocalTime||this._changeInProgress){addSubtract(this,createDuration(input-offset,'m'),1,false);}else if(!this._changeInProgress){this._changeInProgress=true;hooks.updateOffset(this,true);this._changeInProgress=null;}}return this;}else{return this._isUTC?offset:getDateOffset(this);}}", "function getSetOffset(input,keepLocalTime,keepMinutes){var offset=this._offset||0,localAdjust;if(!this.isValid()){return input!=null?this:NaN;}if(input!=null){if(typeof input==='string'){input=offsetFromString(matchShortOffset,input);if(input===null){return this;}}else if(Math.abs(input)<16&&!keepMinutes){input=input*60;}if(!this._isUTC&&keepLocalTime){localAdjust=getDateOffset(this);}this._offset=input;this._isUTC=true;if(localAdjust!=null){this.add(localAdjust,'m');}if(offset!==input){if(!keepLocalTime||this._changeInProgress){addSubtract(this,createDuration(input-offset,'m'),1,false);}else if(!this._changeInProgress){this._changeInProgress=true;hooks.updateOffset(this,true);this._changeInProgress=null;}}return this;}else{return this._isUTC?offset:getDateOffset(this);}}", "function getSetOffset(input,keepLocalTime,keepMinutes){var offset=this._offset || 0,localAdjust;if(!this.isValid()){return input != null?this:NaN;}if(input != null){if(typeof input === 'string'){input = offsetFromString(matchShortOffset,input);if(input === null){return this;}}else if(Math.abs(input) < 16 && !keepMinutes){input = input * 60;}if(!this._isUTC && keepLocalTime){localAdjust = getDateOffset(this);}this._offset = input;this._isUTC = true;if(localAdjust != null){this.add(localAdjust,'m');}if(offset !== input){if(!keepLocalTime || this._changeInProgress){addSubtract(this,createDuration(input - offset,'m'),1,false);}else if(!this._changeInProgress){this._changeInProgress = true;hooks.updateOffset(this,true);this._changeInProgress = null;}}return this;}else {return this._isUTC?offset:getDateOffset(this);}}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\r\n var offset = this._offset || 0,\r\n localAdjust;\r\n if (!this.isValid()) {\r\n return input != null ? this : NaN;\r\n }\r\n if (input != null) {\r\n if (typeof input === 'string') {\r\n input = offsetFromString(matchShortOffset, input);\r\n } else if (Math.abs(input) < 16) {\r\n input = input * 60;\r\n }\r\n if (!this._isUTC && keepLocalTime) {\r\n localAdjust = getDateOffset(this);\r\n }\r\n this._offset = input;\r\n this._isUTC = true;\r\n if (localAdjust != null) {\r\n this.add(localAdjust, 'm');\r\n }\r\n if (offset !== input) {\r\n if (!keepLocalTime || this._changeInProgress) {\r\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\r\n } else if (!this._changeInProgress) {\r\n this._changeInProgress = true;\r\n utils_hooks__hooks.updateOffset(this, true);\r\n this._changeInProgress = null;\r\n }\r\n }\r\n return this;\r\n } else {\r\n return this._isUTC ? offset : getDateOffset(this);\r\n }\r\n }", "function getSetOffset(input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset(input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset(input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset(input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset(input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}" ]
[ "0.6657913", "0.6657913", "0.66179025", "0.66179025", "0.66179025", "0.66179025", "0.66179025", "0.66179025", "0.66179025", "0.66179025", "0.66179025", "0.66179025", "0.66179025", "0.66179025", "0.66179025", "0.66179025", "0.66179025", "0.66179025", "0.66179025", "0.66179025", "0.66179025", "0.66179025", "0.66179025", "0.66179025", "0.66179025", "0.66179025", "0.66179025", "0.66179025", "0.6591536", "0.65908915", "0.6588045", "0.65457696", "0.65457696", "0.65362406", "0.65362406", "0.643752", "0.6433005", "0.64319104", "0.64248264", "0.6422654", "0.6422654", "0.6387958", "0.6387958", "0.6387958", "0.6387958", "0.6387958", "0.6387958", "0.6387958", "0.6387958", "0.6387958", "0.6387958", "0.6378216", "0.63603", "0.63535935", "0.63535935", "0.63535935", "0.63535935", "0.63535935", "0.63535935", "0.63535935", "0.63535935", "0.63535935", "0.63535935", "0.63535935", "0.63535935" ]
0.64416885
66
TODO: remove 'name' arg after deprecation is removed
function createAdder(direction, name) { return function (val, period) { var dur, tmp; //invert the arguments, but complain about it if (period !== null && !isNaN(+period)) { deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period).'); tmp = val; val = period; period = tmp; } val = typeof val === 'string' ? +val : val; dur = create__createDuration(val, period); add_subtract__addSubtract(this, dur, direction); return this; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setName(name) { }", "constructor(name) {\n super(name);\n this.name = name;\n }", "constructor(name) {\n this.name = name;\n }", "constructor(name) {\n this.name = name;\n }", "constructor(name) {\n this.name = name;\n }", "constructor(name) {\n this.name = name;\n }", "constructor(name) {\n this._name = name;\n }", "constructor(name) {\n this._name = name;\n }", "constructor(name) {\n this._name = name;\n }", "constructor(name){\n this._name = name;\n }", "setName( name ) {\n this.name = name;\n }", "getName(newName) {\n this.name = newName;\n }", "setName(name) {\n\t\tthis.name = name;\n\t}", "constructor(name){\n this.name = name\n }", "constructor(name){\n this.name = name;\n }", "setName(name) {\n this.name = name;\n }", "setName(name) {\n this._name = name;\n }", "set type(name) {\n console.warn(\"prototype.type = 'ModelName' is deprecated, use static __name__ instead\");\n this.constructor.__name__ = name;\n }", "set name(x) { this._name = x; }", "get name() {return this._name;}", "get name() { return this._name; }", "get name() { return this._name; }", "get name() { return this._name; }", "get name() { return this._name; }", "get name() { return this._name; }", "get name() { return this._name; }", "get name() { return this._name; }", "get name() { return this._name; }", "setName(name){\n this.name = name;\n }", "set name(value) { this._name = value || \"unknown\"; }", "constructor({ name }) { // { name } is bringing in a object and deconstructing/ unpacking the object into the class \n this.name = name // name is the object you bring in, and this.name is this specific instance of the class is the name of it \n }", "getName() {}", "function getName() { return name; }", "get name() {\n return this.use().name;\n }", "function name(name) {\n return name;\n }", "setName(value){\n\t\tthis.name = value;\n\t}", "constructor(name='test') {\n this.name = name;\n }", "constructor() {\n super();\n this.name = 'none';\n }", "set setName(name){\n _name=name;\n }", "set name(newName) {\n this.setName(newName);\n }", "get name(): string { throw new Error(\"Member class not implemented\"); }", "set name(value) {\n\t\tthis._name = value;\n\t}", "name(name) {\n\t\tthis._name = name;\n\t\treturn this;\n\t}", "get name() {\r\n\t\treturn this._name;\r\n\t}", "name() { }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "getName() {\r\n return this.name;\r\n }", "name(str) {\n this._name = str;\n return this;\n }", "constructor(name) { // méthode constructor avec pour paramètre name\n super(name); // utiliser super pour appeler name\n this.name = \"Kuma\"; // le name devient Kuma\n }", "get name() {\n\t\treturn this.__name;\n\t}", "get name() {\n\t\treturn this.__name;\n\t}", "get name() {\n\t\treturn this.__name;\n\t}", "get name() {\n\t\treturn this.__name;\n\t}", "get name() {\n\t\treturn this.__name;\n\t}", "get name() {\n\t\treturn this.__name;\n\t}", "get name() {\n\t\treturn this.__name;\n\t}", "get name () {\n console.warn(\n 'Deprecation warning: \"channel.name\" is deprecated, use channel.channelName instead'\n )\n return this.channelName\n }", "get name() {\n \treturn 'Stephanie';\n }", "get name() {\r\n return this._name;\r\n }", "get name() {\n\t return this._name;\n\t }", "function getName() {\n\treturn name;\n}", "setName(namePicked) {\n this.name = namePicked; //refer to the object itself using 'this'\n }", "set name(newName) {\n if (newName) {\n this._name = newName;\n }\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "set name(newName) {\n this.setName(newName);\n }", "get name() {\n\t\treturn this._name;\n\t}", "get name() {\n\t\treturn this._name;\n\t}", "get name () {\n\t\treturn this._name;\n\t}", "get name () {\n\t\treturn this._name;\n\t}", "get name () {\n\t\treturn this._name;\n\t}", "get name () {\n\t\treturn this._name;\n\t}", "get name () {\n\t\treturn this._name;\n\t}", "get name () {\n\t\treturn this._name;\n\t}", "_$name() {\n super._$name();\n this._value.name = this._node.key.name;\n }", "function getName(name) {\n return name\n}", "constructor(transport, name) {\n super(transport);\n this.name = name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "function ensureNameField(desc) {\n desc.name = '';\n }", "get getName() {\n return this._name;\n }", "get name () {\n return this._name;\n }", "['@_name']() {\n super['@_name']();\n if (this._value.name) return;\n\n this._value.name = this._node.declarations[0].id.name;\n }", "function name() {}", "set name(newName) {\n\t this.setName(newName);\n\t }", "constructor () {\n this._name = 'u1';\n }", "get name() {}", "get name() {}", "get name() {}", "get name() {}" ]
[ "0.67782986", "0.6759405", "0.67381084", "0.67381084", "0.67381084", "0.67381084", "0.6733258", "0.6733258", "0.67120683", "0.66484624", "0.6612438", "0.6540716", "0.65202653", "0.65195", "0.6489472", "0.6465985", "0.6462259", "0.6415414", "0.6381141", "0.6297654", "0.6276111", "0.6276111", "0.6276111", "0.6276111", "0.6276111", "0.6276111", "0.6276111", "0.6276111", "0.6185439", "0.6112878", "0.60964316", "0.60552776", "0.6050006", "0.60477877", "0.60141873", "0.5992784", "0.5989703", "0.5979093", "0.5960276", "0.59392995", "0.5917421", "0.5909178", "0.5909035", "0.59078485", "0.59005576", "0.5888179", "0.5888179", "0.5888179", "0.5888179", "0.58705187", "0.58636767", "0.5862385", "0.5862183", "0.5862183", "0.5862183", "0.5862183", "0.5862183", "0.5862183", "0.5862183", "0.58525527", "0.58471906", "0.5845746", "0.58370185", "0.58324045", "0.5831436", "0.5828061", "0.5827184", "0.5827184", "0.58205706", "0.5813581", "0.5813581", "0.5809684", "0.5809684", "0.5809684", "0.5809684", "0.5809684", "0.5809684", "0.5802686", "0.58016807", "0.57931566", "0.57724303", "0.57724303", "0.57724303", "0.57724303", "0.57724303", "0.57724303", "0.57724303", "0.57724303", "0.57724303", "0.57724303", "0.5757861", "0.575781", "0.5756826", "0.5755341", "0.57532394", "0.5749995", "0.57188797", "0.5716756", "0.5716756", "0.5716756", "0.5716756" ]
0.0
-1
If passed a locale key, it will set the locale for this instance. Otherwise, it will return the locale configuration variables for this instance.
function locale (key) { var newLocaleData; if (key === undefined) { return this._locale._abbr; } else { newLocaleData = locale_locales__getLocale(key); if (newLocaleData != null) { this._locale = newLocaleData; } return this; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function locale(key){var newLocaleData;if(key===undefined){return this._locale._abbr;}else{newLocaleData=getLocale(key);if(newLocaleData!=null){this._locale=newLocaleData;}return this;}}", "function locale(key){var newLocaleData;if(key===undefined){return this._locale._abbr;}else{newLocaleData=getLocale(key);if(newLocaleData!=null){this._locale=newLocaleData;}return this;}}", "function locale(key){var newLocaleData;if(key === undefined){return this._locale._abbr;}else {newLocaleData = getLocale(key);if(newLocaleData != null){this._locale = newLocaleData;}return this;}}", "function locale(key){var newLocaleData;if(key===undefined){return this._locale._abbr;}else{newLocaleData=locale_locales__getLocale(key);if(newLocaleData!=null){this._locale=newLocaleData;}return this;}}", "function locale(key){var newLocaleData;if(key===undefined){return this._locale._abbr;}else{newLocaleData=locale_locales__getLocale(key);if(newLocaleData!=null){this._locale=newLocaleData;}return this;}}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}" ]
[ "0.7284988", "0.7284988", "0.723156", "0.7204643", "0.7204643", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104", "0.70898104" ]
0.0
-1
supports only 2.0style add(1, 's') or add(duration)
function duration_add_subtract__add (input, value) { return duration_add_subtract__addSubtract(this, input, value, 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Duration(time) {\n var d = document.createElement('span');\n d.classList.add('duration');\n d.innerText = time;\n return d;\n}", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add(input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function addTwoSeconds(time){\n // Transform time to milliseconds\n var timeInMilliseconds = formattedTimeToMilliseconds(time);\n if (timeInMilliseconds == 0 || isNaN(timeInMilliseconds)){\n return 'ERROR';\n }\n // Add 2000 milliseconds\n var twoSecondsAdded = timeInMilliseconds + 2000;\n // Transform time to formatted time\n return millisecondsToFullTime(twoSecondsAdded);\n}", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "handleDurationChange() {\n this.setState({taskDuration: this.state.taskDuration.add(1, 's')});\n }", "function duration_add_subtract__add (input, value) {\r\n return duration_add_subtract__addSubtract(this, input, value, 1);\r\n }", "function duration_add_subtract__add (input, value) {\r\n return duration_add_subtract__addSubtract(this, input, value, 1);\r\n }", "setDuration(dur) {\nreturn this.duration = dur;\n}", "function duration_add_subtract__add(input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add(input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add(input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function formatDuration(duration) {\n if (duration < 1000) {\n duration += 'ms';\n } else if (duration > 1000) {\n duration /= 1000;\n duration += 's';\n }\n return duration;\n}", "parseDurationProp(newValue) {\n this.innerDuration = newValue ? newValue : \"2000ms\";\n }", "function add() {\n seconds++;\n if (seconds >= 60) {\n seconds = 0;\n minutes++;\n if (minutes >= 60) {\n minutes = 0;\n hours++;\n }\n }\n h2.textContent = (hours ? (hours > 9 ? hours : \"0\" + hours) : \"00\") + \":\" + (minutes ? (minutes > 9 ? minutes : \"0\" + minutes) : \"00\") + \":\" + (seconds > 9 ? seconds : \"0\" + seconds);\n timer();\n}", "addAttoseconds(value, createNew) {\n return this.addFractionsOfSecond(value, createNew, '_attosecond', '_femtosecond', 'addFemtoseconds');\n }", "function add(a,b) {\n\treturn a + b + new Date().getSeconds();\n}", "function add() {\n seconds++;\n if (seconds >= 60) {\n seconds = 0;\n minutes++;\n if (minutes >= 60) {\n minutes = 0;\n }\n }\n timer.textContent = (minutes ? (minutes > 9 ? minutes : \"0\" + minutes) : \"00\") +\n \":\" + (seconds > 9 ? seconds : \"0\" + seconds);\n startTimer();\n}", "function duration(s) {\n if (typeof(s) == 'number') return s;\n var units = {\n days: { rx:/(\\d+)\\s*d/, mul:86400 },\n hours: { rx:/(\\d+)\\s*h/, mul:3600 },\n minutes: { rx:/(\\d+)\\s*m/, mul:60 },\n seconds: { rx:/(\\d+)\\s*s/, mul:1 }\n };\n var result = 0, unit, match;\n if (typeof(s) == 'string') for (var key in units) {\n unit = units[key];\n match = s.match(unit.rx);\n if (match) result += parseInt(match[1])*unit.mul;\n }\n return result*1000;\n}", "function addOneSec() {\n sec += 1;\n updateTimer();\n waitOneSec();\n}", "function duration_ms(durations) {\n\n durations = durations.toString();\n durations = durations.replace(/ms/g, \"\");\n\n // result\n var duration = 0;\n var ms;\n\n // Is multi durations?\n if (durations.indexOf(\",\") != -1) {\n\n var durationsArray = durations.split(\",\");\n\n for (var i = 0; i < durationsArray.length; i++) {\n\n var val = durationsArray[i];\n\n // Has dot?\n if (val.indexOf(\".\") != -1) {\n\n ms = parseFloat(val).toString().split(\".\")[1].length;\n val = val.replace(\".\", \"\").toString();\n\n if (ms == 2) {\n val = val.replace(/s/g, \"0\");\n } else if (ms == 1) {\n val = val.replace(/s/g, \"00\");\n }\n\n } else {\n val = val.replace(/s/g, \"000\");\n }\n\n duration = parseFloat(duration) + parseFloat(val);\n\n }\n\n return duration;\n\n } else {\n\n // Has dot?\n if (durations.indexOf(\".\") != -1) {\n\n ms = parseFloat(durations).toString().split(\".\")[1].length;\n durations = durations.replace(\".\", \"\").toString();\n\n if (ms == 2) {\n durations = durations.replace(/s/g, \"0\");\n } else if (ms == 1) {\n durations = durations.replace(/s/g, \"00\");\n }\n\n } else {\n durations = durations.replace(/s/g, \"000\");\n }\n\n return durations;\n\n }\n\n }", "function timeAdd(element, start,stop){\n if(typeof(start)!=='number' && typeof(stop)!=='number' || start === stop){\n return;\n }\n start++;\n element.text(start);\n setTimeout(function(){timeAdd(element, start,stop);}, 25);\n}", "function parseDuration(duration) {\n if (!duration) {\n return {second: 1};\n } else if (typeof(duration) == \"string\") {\n var start = 0;\n var isReciprocal = false;\n if (duration.charAt(0) == \"/\") {\n isReciprocal = true;\n start = 1;\n }\n function complete(value) {\n if (isReciprocal)\n value.reciprocal = true;\n return value;\n }\n var type = duration.charAt(duration.length - 1);\n if (/\\d/.test(type)) {\n return complete({milli: Number(type)});\n } else {\n var count;\n if (start == duration.length - 1) {\n count = 1;\n } else {\n count = Number(duration.slice(start, duration.length - 1));\n }\n switch (type) {\n case \"s\":\n return complete({second: count});\n case \"m\":\n return complete({minute: count});\n case \"h\":\n return complete({hour: count});\n default:\n throw new Error(\"Couldn't parse duration \" + duration);\n }\n }\n } else {\n return duration;\n }\n }", "function Seconds() {\r\n}", "function getSecondsTime(duration) {\n if(typeof duration === \"number\") return duration;\n if(typeof duration !== \"string\") return 0;\n\n duration = duration.split(\":\");\n let time = 0;\n\n if(duration.length === 2) {\n time += Number(duration[0]) * 60;\n time += Number(duration[1]);\n } else if(duration.length === 3) {\n time += Number(duration[0]) * 3600;\n time += Number(duration[1]) * 60;\n time += Number(duration[2]);\n }\n\n return time;\n}", "addTime(s){\n if (timer.minutes === 59 && (timer.secondes + s) >= 60){\n timer.hours++\n timer.minutes = 0\n timer.secondes = (timer.secondes + s) - 60\n } else if (timer.secondes + s >= 60){\n timer.minutes++\n timer.secondes = (timer.secondes + s) - 60 \n } else {\n timer.secondes = timer.secondes + s\n }\n }", "set time(value) {}" ]
[ "0.6431088", "0.6105697", "0.6105697", "0.6105697", "0.6105697", "0.6105697", "0.6105697", "0.6105697", "0.6105697", "0.6105697", "0.6105697", "0.6105697", "0.6105697", "0.60822755", "0.60589874", "0.6012247", "0.6012247", "0.6010167", "0.5885506", "0.5885506", "0.5885185", "0.58429486", "0.58429486", "0.58429486", "0.5814524", "0.5787522", "0.576465", "0.5761014", "0.57297313", "0.57159704", "0.56481624", "0.56387097", "0.56210756", "0.5615932", "0.56059957", "0.5591416", "0.55873525", "0.5557526", "0.5449807" ]
0.58918107
77
supports only 2.0style subtract(1, 's') or subtract(duration)
function duration_add_subtract__subtract (input, value) { return duration_add_subtract__addSubtract(this, input, value, -1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract(input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\r\n return duration_add_subtract__addSubtract(this, input, value, -1);\r\n }", "function duration_add_subtract__subtract (input, value) {\r\n return duration_add_subtract__addSubtract(this, input, value, -1);\r\n }", "function duration_add_subtract__subtract(input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract(input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract(input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add(input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\r\n return duration_add_subtract__addSubtract(this, input, value, 1);\r\n }", "function duration_add_subtract__add (input, value) {\r\n return duration_add_subtract__addSubtract(this, input, value, 1);\r\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }" ]
[ "0.7399791", "0.7399791", "0.7399791", "0.7399791", "0.7399791", "0.7399791", "0.7399791", "0.7399791", "0.7399791", "0.7399791", "0.7399791", "0.7399791", "0.7379759", "0.7362836", "0.7362836", "0.7267587", "0.7267587", "0.7232643", "0.7232643", "0.7232643", "0.66817045", "0.66817045", "0.667517", "0.667517", "0.667517", "0.667517", "0.667517", "0.667517", "0.667517", "0.667517", "0.667517", "0.667517", "0.667517", "0.667517", "0.6611627", "0.661101", "0.661101", "0.658784", "0.658784" ]
0.72733253
67
helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(vf=c)),vf._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(vf=c)),vf._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(vf=c)),vf._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(vf=c)),vf._abbr}", "function formatHuman(value) {\n var time = moment(value).fromNow();\n time = time === 'a few seconds ago' ? 'seconds ago' : time;\n return time;\n }", "labelFunction(date) {\n return moment(date).fromNow();\n }", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function humanizeDuration(duration) {\n const months = duration.months();\n const weeks = duration.weeks();\n let days = duration.days();\n const hours = duration.hours();\n const minutes = duration.minutes();\n const seconds = duration.seconds();\n\n // console.log(duration);\n\n const str = [];\n\n if (weeks > 0) {\n const weekTitle = pluralize('week', weeks);\n str.push(`${weeks} ${weekTitle}`);\n }\n\n if (days > 0) {\n if (weeks > 0) days -= 7 * weeks;\n\n const dayTitle = pluralize('day', days);\n str.push(`${days} ${dayTitle}`);\n }\n\n if (hours > 0 && (weeks < 1 && days < 2)) {\n const hourTitle = pluralize('hour', hours);\n str.push(`${hours} ${hourTitle}`);\n }\n\n if (minutes > 0 && (weeks < 1 && days < 1)) {\n const minuteTitle = pluralize('minute', minutes);\n str.push(`${minutes} ${minuteTitle}`);\n }\n\n if (seconds > 0 && (weeks < 1 && hours < 1)) {\n const secondTitle = pluralize('second', seconds);\n str.push(`${seconds} ${secondTitle}`);\n }\n\n return str.join(' ');\n}", "function Za(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=o(b)?ab(a):$a(a,b),c&&(qf=c)),qf._abbr}", "function Za(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=o(b)?ab(a):$a(a,b),c&&(qf=c)),qf._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\n return a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\n return a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\n return a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function T(a,b,c,d,e){var f;// works with moment-pre-2.8\n// Expand localized format strings, like \"LL\" -> \"MMMM D YYYY\"\n// BTW, this is not important for `formatDate` because it is impossible to put custom tokens\n// or non-zero areas in Moment's localized format strings.\nreturn a=Ia.moment.parseZone(a),b=Ia.moment.parseZone(b),f=(a.localeData||a.lang).call(a),c=f.longDateFormat(c)||c,d=d||\" - \",U(a,b,W(c),d,e)}// expose", "dateForHumans(item) {\n if (!item.date) return \"\";\n let startDate = DateTime.fromISO(item.date).toFormat(\"d LLLL yyyy\");\n if (!item.time && !item.enddate) return startDate;\n if (item.time) return `${startDate} at ${item.time}`;\n if (!item.enddate) return startDate;\n\n let endDate = DateTime.fromISO(item.enddate).toFormat(\"d LLLL yyyy\");\n return `${startDate} to ${endDate}`;\n }", "function humanizeStr(nd, s, en, o) {\n var r = Math.round,\n dir = en ? ' ago' : '前',\n pl = function(v, n) {\n return (s === undefined) ? n + (en ? ' ' : '') + v + (n > 1 && en ? 's' : '') + dir : n + v.substring(0, 1)\n },\n ts = Date.now() - new Date(nd).getTime(),\n ii;\n if( ts < 0 )\n {\n ts *= -1;\n dir = en ? ' from now' : '後';\n }\n for (var i in o) {\n if (r(ts) < o[i]) return pl(ii || 'm', r(ts / (o[ii] || 1)))\n ii = i;\n }\n return pl(i, r(ts / o[i]));\n}", "function Za(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=o(b)?ab(a):$a(a,b),c&&(se=c)),se._abbr}", "function Za(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=o(b)?ab(a):$a(a,b),c&&(se=c)),se._abbr}", "function Za(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=o(b)?ab(a):$a(a,b),c&&(se=c)),se._abbr}", "function Za(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=o(b)?ab(a):$a(a,b),c&&(se=c)),se._abbr}", "function Za(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=o(b)?ab(a):$a(a,b),c&&(se=c)),se._abbr}", "function oldMomentFormat(mom,formatStr){return oldMomentProto.format.call(mom,formatStr);// oldMomentProto defined in moment-ext.js\n}", "function relativeTimeWithPlural(number,withoutSuffix,key){var format={ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},separator=\" \";return(number%100>=20||number>=100&&number%100===0)&&(separator=\" de \"),number+separator+format[key]}", "function humanizeDate(date) {\n return moment(date).format('lll');\n}", "fromNow(date /* , locale*/) {\n if (typeof date !== 'object') date = new Date(date);\n return moment(date).fromNow();\n }", "changeTimeFormatByTime(time) {\n if(time > moment().subtract(1, 'minutes')) {\n return time.startOf('second').fromNow();\n } else if(time > moment().subtract(1, 'hours')) {\n return time.startOf('minute').fromNow();\n } else if(time > moment().subtract(1, 'days')) {\n return time.format('h:mm:ss a');\n } else if(time > moment().subtract(1, 'years')) {\n return time.format(\"MMM Do\");\n } else {\n return time.format(\"MMM Do YYYY\");\n }\n }", "createdAgo(date) { return moment(date).fromNow() }", "function substituteTimeAgo(string,number,withoutSuffix,isFuture,locale){return locale.relativeTime(number||1,!!withoutSuffix,string,isFuture);}", "function substituteTimeAgo(string,number,withoutSuffix,isFuture,locale){return locale.relativeTime(number||1,!!withoutSuffix,string,isFuture);}", "function substituteTimeAgo(string,number,withoutSuffix,isFuture,locale){return locale.relativeTime(number||1,!!withoutSuffix,string,isFuture);}", "function substituteTimeAgo(string,number,withoutSuffix,isFuture,locale){return locale.relativeTime(number||1,!!withoutSuffix,string,isFuture);}", "function Za(a,b){var c;\n// moment.duration._locale = moment._locale = data;\n return a&&(c=o(b)?ab(a):$a(a,b),c&&(se=c)),se._abbr}", "function substituteTimeAgo(string,number,withoutSuffix,isFuture,locale){return locale.relativeTime(number || 1,!!withoutSuffix,string,isFuture);}", "function relativeTimeWithMutation(number,withoutSuffix,key){var format={'mm':'munutenn','MM':'miz','dd':'devezh'};return number + ' ' + mutation(format[key],number);}", "function relativeTimeWithPlural$2(number,withoutSuffix,key){var format={'ss':'secunde','mm':'minute','hh':'ore','dd':'zile','MM':'luni','yy':'ani'},separator=' ';if(number % 100 >= 20 || number >= 100 && number % 100 === 0){separator = ' de ';}return number + separator + format[key];}", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n\t var result = number + ' ';\n\t switch (key) {\n\t case 's':\n\t return withoutSuffix || isFuture\n\t ? 'nekaj sekund'\n\t : 'nekaj sekundami';\n\t case 'ss':\n\t if (number === 1) {\n\t result += withoutSuffix ? 'sekundo' : 'sekundi';\n\t } else if (number === 2) {\n\t result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n\t } else if (number < 5) {\n\t result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n\t } else {\n\t result += 'sekund';\n\t }\n\t return result;\n\t case 'm':\n\t return withoutSuffix ? 'ena minuta' : 'eno minuto';\n\t case 'mm':\n\t if (number === 1) {\n\t result += withoutSuffix ? 'minuta' : 'minuto';\n\t } else if (number === 2) {\n\t result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n\t } else if (number < 5) {\n\t result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n\t } else {\n\t result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n\t }\n\t return result;\n\t case 'h':\n\t return withoutSuffix ? 'ena ura' : 'eno uro';\n\t case 'hh':\n\t if (number === 1) {\n\t result += withoutSuffix ? 'ura' : 'uro';\n\t } else if (number === 2) {\n\t result += withoutSuffix || isFuture ? 'uri' : 'urama';\n\t } else if (number < 5) {\n\t result += withoutSuffix || isFuture ? 'ure' : 'urami';\n\t } else {\n\t result += withoutSuffix || isFuture ? 'ur' : 'urami';\n\t }\n\t return result;\n\t case 'd':\n\t return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n\t case 'dd':\n\t if (number === 1) {\n\t result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n\t } else if (number === 2) {\n\t result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n\t } else {\n\t result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n\t }\n\t return result;\n\t case 'M':\n\t return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n\t case 'MM':\n\t if (number === 1) {\n\t result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n\t } else if (number === 2) {\n\t result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n\t } else if (number < 5) {\n\t result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n\t } else {\n\t result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n\t }\n\t return result;\n\t case 'y':\n\t return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n\t case 'yy':\n\t if (number === 1) {\n\t result += withoutSuffix || isFuture ? 'leto' : 'letom';\n\t } else if (number === 2) {\n\t result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n\t } else if (number < 5) {\n\t result += withoutSuffix || isFuture ? 'leta' : 'leti';\n\t } else {\n\t result += withoutSuffix || isFuture ? 'let' : 'leti';\n\t }\n\t return result;\n\t }\n\t }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture ?\n 'nekaj sekund' :\n 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;}\n\n }", "function formatMoment(m, inputString) {\n var currentMonth = m.month(),\n currentDate = m.date(),\n currentYear = m.year(),\n currentDay = m.day(),\n currentHours = m.hours(),\n currentMinutes = m.minutes(),\n currentSeconds = m.seconds(),\n currentMilliseconds = m.milliseconds(),\n currentZone = -m.zone(),\n ordinal = moment.ordinal,\n meridiem = moment.meridiem;\n // check if the character is a format\n // return formatted string or non string.\n //\n // uses switch/case instead of an object of named functions (like http://phpjs.org/functions/date:380)\n // for minification and performance\n // see http://jsperf.com/object-of-functions-vs-switch for performance comparison\n function replaceFunction(input) {\n // create a couple variables to be used later inside one of the cases.\n var a, b;\n switch (input) {\n // MONTH\n case 'M' :\n return currentMonth + 1;\n case 'Mo' :\n return (currentMonth + 1) + ordinal(currentMonth + 1);\n case 'MM' :\n return leftZeroFill(currentMonth + 1, 2);\n case 'MMM' :\n return moment.monthsShort[currentMonth];\n case 'MMMM' :\n return moment.months[currentMonth];\n // DAY OF MONTH\n case 'D' :\n return currentDate;\n case 'Do' :\n return currentDate + ordinal(currentDate);\n case 'DD' :\n return leftZeroFill(currentDate, 2);\n // DAY OF YEAR\n case 'DDD' :\n a = new Date(currentYear, currentMonth, currentDate);\n b = new Date(currentYear, 0, 1);\n return ~~ (((a - b) / 864e5) + 1.5);\n case 'DDDo' :\n a = replaceFunction('DDD');\n return a + ordinal(a);\n case 'DDDD' :\n return leftZeroFill(replaceFunction('DDD'), 3);\n // WEEKDAY\n case 'd' :\n return currentDay;\n case 'do' :\n return currentDay + ordinal(currentDay);\n case 'ddd' :\n return moment.weekdaysShort[currentDay];\n case 'dddd' :\n return moment.weekdays[currentDay];\n // WEEK OF YEAR\n case 'w' :\n a = new Date(currentYear, currentMonth, currentDate - currentDay + 5);\n b = new Date(a.getFullYear(), 0, 4);\n return ~~ ((a - b) / 864e5 / 7 + 1.5);\n case 'wo' :\n a = replaceFunction('w');\n return a + ordinal(a);\n case 'ww' :\n return leftZeroFill(replaceFunction('w'), 2);\n // YEAR\n case 'YY' :\n return leftZeroFill(currentYear % 100, 2);\n case 'YYYY' :\n return currentYear;\n // AM / PM\n case 'a' :\n return meridiem ? meridiem(currentHours, currentMinutes, false) : (currentHours > 11 ? 'pm' : 'am');\n case 'A' :\n return meridiem ? meridiem(currentHours, currentMinutes, true) : (currentHours > 11 ? 'PM' : 'AM');\n // 24 HOUR\n case 'H' :\n return currentHours;\n case 'HH' :\n return leftZeroFill(currentHours, 2);\n // 12 HOUR\n case 'h' :\n return currentHours % 12 || 12;\n case 'hh' :\n return leftZeroFill(currentHours % 12 || 12, 2);\n // MINUTE\n case 'm' :\n return currentMinutes;\n case 'mm' :\n return leftZeroFill(currentMinutes, 2);\n // SECOND\n case 's' :\n return currentSeconds;\n case 'ss' :\n return leftZeroFill(currentSeconds, 2);\n // MILLISECONDS\n case 'S' :\n return ~~ (currentMilliseconds / 100);\n case 'SS' :\n return leftZeroFill(~~(currentMilliseconds / 10), 2);\n case 'SSS' :\n return leftZeroFill(currentMilliseconds, 3);\n // TIMEZONE\n case 'Z' :\n return (currentZone < 0 ? '-' : '+') + leftZeroFill(~~(Math.abs(currentZone) / 60), 2) + ':' + leftZeroFill(~~(Math.abs(currentZone) % 60), 2);\n case 'ZZ' :\n return (currentZone < 0 ? '-' : '+') + leftZeroFill(~~(10 * Math.abs(currentZone) / 6), 4);\n // LONG DATES\n case 'L' :\n case 'LL' :\n case 'LLL' :\n case 'LLLL' :\n case 'LT' :\n return formatMoment(m, moment.longDateFormat[input]);\n // DEFAULT\n default :\n return input.replace(/(^\\[)|(\\\\)|\\]$/g, \"\");\n }\n }\n return inputString.replace(formattingTokens, replaceFunction);\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n\n switch (key) {\n case 's':\n return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';\n\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n\n return result;\n\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n\n return result;\n\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n\n return result;\n\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n\n return result;\n\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n\n return result;\n\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number,withoutSuffix,key,isFuture){var format={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return withoutSuffix?format[key][0]:format[key][1]}", "function toAgo(time){\n var strings = {\n suffixAgo: \"ago\",\n suffixFromNow: \"from now\",\n seconds: \"less than a minute\",\n minute: \"about a minute\",\n minutes: \"%d minutes\",\n hour: \"about an hour\",\n hours: \"about %d hours\",\n day: \"a day\",\n days: \"%d days\",\n month: \"about a month\",\n months: \"%d months\",\n year: \"about a year\",\n years: \"%d years\"\n };\n var $l = strings;\n var prefix = $l.prefixAgo;\n var suffix = $l.suffixAgo;\n\n var distanceMillis = new Date().getTime() - time;\n\n var seconds = distanceMillis / 1000;\n var minutes = seconds / 60;\n var hours = minutes / 60;\n var days = hours / 24;\n var years = days / 365;\n\n function substitute(string, number) {\n var value = ($l.numbers && $l.numbers[number]) || number;\n return string.replace(/%d/i, value);\n }\n\n var words = seconds < 45 && substitute($l.seconds, Math.round(seconds)) ||\n seconds < 90 && substitute($l.minute, 1) ||\n minutes < 45 && substitute($l.minutes, Math.round(minutes)) ||\n minutes < 90 && substitute($l.hour, 1) ||\n hours < 24 && substitute($l.hours, Math.round(hours)) ||\n hours < 48 && substitute($l.day, 1) ||\n days < 30 && substitute($l.days, Math.floor(days)) ||\n days < 60 && substitute($l.month, 1) ||\n days < 365 && substitute($l.months, Math.floor(days / 30)) ||\n years < 2 && substitute($l.year, 1) ||\n substitute($l.years, Math.floor(years));\n\n return [prefix, words, suffix].join(\" \").trim();\n}", "function formatMoment(m, inputString) {\n var currentMonth = m.month(),\n currentDate = m.date(),\n currentYear = m.year(),\n currentDay = m.day(),\n currentHours = m.hours(),\n currentMinutes = m.minutes(),\n currentSeconds = m.seconds(),\n currentZone = -m.zone(),\n ordinal = moment.ordinal,\n meridiem = moment.meridiem;\n // check if the character is a format\n // return formatted string or non string.\n //\n // uses switch/case instead of an object of named functions (like http://phpjs.org/functions/date:380)\n // for minification and performance\n // see http://jsperf.com/object-of-functions-vs-switch for performance comparison\n function replaceFunction(input) {\n // create a couple variables to be used later inside one of the cases.\n var a, b;\n switch (input) {\n // MONTH\n case 'M' :\n return currentMonth + 1;\n case 'Mo' :\n return (currentMonth + 1) + ordinal(currentMonth + 1);\n case 'MM' :\n return leftZeroFill(currentMonth + 1, 2);\n case 'MMM' :\n return moment.monthsShort[currentMonth];\n case 'MMMM' :\n return moment.months[currentMonth];\n // DAY OF MONTH\n case 'D' :\n return currentDate;\n case 'Do' :\n return currentDate + ordinal(currentDate);\n case 'DD' :\n return leftZeroFill(currentDate, 2);\n // DAY OF YEAR\n case 'DDD' :\n a = new Date(currentYear, currentMonth, currentDate);\n b = new Date(currentYear, 0, 1);\n return ~~ (((a - b) / 864e5) + 1.5);\n case 'DDDo' :\n a = replaceFunction('DDD');\n return a + ordinal(a);\n case 'DDDD' :\n return leftZeroFill(replaceFunction('DDD'), 3);\n // WEEKDAY\n case 'd' :\n return currentDay;\n case 'do' :\n return currentDay + ordinal(currentDay);\n case 'ddd' :\n return moment.weekdaysShort[currentDay];\n case 'dddd' :\n return moment.weekdays[currentDay];\n // WEEK OF YEAR\n case 'w' :\n a = new Date(currentYear, currentMonth, currentDate - currentDay + 5);\n b = new Date(a.getFullYear(), 0, 4);\n return ~~ ((a - b) / 864e5 / 7 + 1.5);\n case 'wo' :\n a = replaceFunction('w');\n return a + ordinal(a);\n case 'ww' :\n return leftZeroFill(replaceFunction('w'), 2);\n // YEAR\n case 'YY' :\n return leftZeroFill(currentYear % 100, 2);\n case 'YYYY' :\n return currentYear;\n // AM / PM\n case 'a' :\n return currentHours > 11 ? meridiem.pm : meridiem.am;\n case 'A' :\n return currentHours > 11 ? meridiem.PM : meridiem.AM;\n // 24 HOUR\n case 'H' :\n return currentHours;\n case 'HH' :\n return leftZeroFill(currentHours, 2);\n // 12 HOUR\n case 'h' :\n return currentHours % 12 || 12;\n case 'hh' :\n return leftZeroFill(currentHours % 12 || 12, 2);\n // MINUTE\n case 'm' :\n return currentMinutes;\n case 'mm' :\n return leftZeroFill(currentMinutes, 2);\n // SECOND\n case 's' :\n return currentSeconds;\n case 'ss' :\n return leftZeroFill(currentSeconds, 2);\n // TIMEZONE\n case 'zz' :\n // depreciating 'zz' fall through to 'z'\n case 'z' :\n return (m._d.toString().match(timezoneRegex) || [''])[0].replace(nonuppercaseLetters, '');\n case 'Z' :\n return (currentZone < 0 ? '-' : '+') + leftZeroFill(~~(Math.abs(currentZone) / 60), 2) + ':' + leftZeroFill(~~(Math.abs(currentZone) % 60), 2);\n case 'ZZ' :\n return (currentZone < 0 ? '-' : '+') + leftZeroFill(~~(10 * Math.abs(currentZone) / 6), 4);\n // LONG DATES\n case 'L' :\n case 'LL' :\n case 'LLL' :\n case 'LLLL' :\n case 'LT' :\n return formatMoment(m, moment.longDateFormat[input]);\n // DEFAULT\n default :\n return input.replace(/(^\\[)|(\\\\)|\\]$/g, \"\");\n }\n }\n return inputString.replace(charactersToReplace, replaceFunction);\n }", "function durationFormat() {\n\n var args = [].slice.call(arguments);\n var settings = extend({}, this.format.defaults);\n\n // Keep a shadow copy of this moment for calculating remainders.\n // Perform all calculations on positive duration value, handle negative\n // sign at the very end.\n var asMilliseconds = this.asMilliseconds();\n var asMonths = this.asMonths();\n\n // Treat invalid durations as having a value of 0 milliseconds.\n if (typeof this.isValid === \"function\" && this.isValid() === false) {\n asMilliseconds = 0;\n asMonths = 0;\n }\n\n var isNegative = asMilliseconds < 0;\n\n // Two shadow copies are needed because of the way moment.js handles\n // duration arithmetic for years/months and for weeks/days/hours/minutes/seconds.\n var remainder = moment.duration(Math.abs(asMilliseconds), \"milliseconds\");\n var remainderMonths = moment.duration(Math.abs(asMonths), \"months\");\n\n // Parse arguments.\n each(args, function (arg) {\n if (typeof arg === \"string\" || typeof arg === \"function\") {\n settings.template = arg;\n return;\n }\n\n if (typeof arg === \"number\") {\n settings.precision = arg;\n return;\n }\n\n if (isObject(arg)) {\n extend(settings, arg);\n }\n });\n\n var momentTokens = {\n years: \"y\",\n months: \"M\",\n weeks: \"w\",\n days: \"d\",\n hours: \"h\",\n minutes: \"m\",\n seconds: \"s\",\n milliseconds: \"S\"\n };\n\n var tokenDefs = {\n escape: /\\[(.+?)\\]/,\n years: /\\*?[Yy]+/,\n months: /\\*?M+/,\n weeks: /\\*?[Ww]+/,\n days: /\\*?[Dd]+/,\n hours: /\\*?[Hh]+/,\n minutes: /\\*?m+/,\n seconds: /\\*?s+/,\n milliseconds: /\\*?S+/,\n general: /.+?/\n };\n\n // Types array is available in the template function.\n settings.types = types;\n\n var typeMap = function (token) {\n return find(types, function (type) {\n return tokenDefs[type].test(token);\n });\n };\n\n var tokenizer = new RegExp(map(types, function (type) {\n return tokenDefs[type].source;\n }).join(\"|\"), \"g\");\n\n // Current duration object is available in the template function.\n settings.duration = this;\n\n // Eval template function and cache template string.\n var template = typeof settings.template === \"function\" ? settings.template.apply(settings) : settings.template;\n\n // outputTypes and returnMomentTypes are settings to support durationsFormat().\n\n // outputTypes is an array of moment token types that determines\n // the tokens returned in formatted output. This option overrides\n // trim, largest, stopTrim, etc.\n var outputTypes = settings.outputTypes;\n\n // returnMomentTypes is a boolean that sets durationFormat to return\n // the processed momentTypes instead of formatted output.\n var returnMomentTypes = settings.returnMomentTypes;\n\n var largest = settings.largest;\n\n // Setup stopTrim array of token types.\n var stopTrim = [];\n\n if (!outputTypes) {\n if (isArray(settings.stopTrim)) {\n settings.stopTrim = settings.stopTrim.join(\"\");\n }\n\n // Parse stopTrim string to create token types array.\n if (settings.stopTrim) {\n each(settings.stopTrim.match(tokenizer), function (token) {\n var type = typeMap(token);\n\n if (type === \"escape\" || type === \"general\") {\n return;\n }\n\n stopTrim.push(type);\n });\n }\n }\n\n // Cache moment's locale data.\n var localeData = moment.localeData();\n\n if (!localeData) {\n localeData = {};\n }\n\n // Fall back to this plugin's `eng` extension.\n each(keys(engLocale), function (key) {\n if (typeof engLocale[key] === \"function\") {\n if (!localeData[key]) {\n localeData[key] = engLocale[key];\n }\n\n return;\n }\n\n if (!localeData[\"_\" + key]) {\n localeData[\"_\" + key] = engLocale[key];\n }\n });\n\n // Replace Duration Time Template strings.\n // For locale `eng`: `_HMS_`, `_HM_`, and `_MS_`.\n each(keys(localeData._durationTimeTemplates), function (item) {\n template = template.replace(\"_\" + item + \"_\", localeData._durationTimeTemplates[item]);\n });\n\n // Determine user's locale.\n var userLocale = settings.userLocale || moment.locale();\n\n var useLeftUnits = settings.useLeftUnits;\n var usePlural = settings.usePlural;\n var precision = settings.precision;\n var forceLength = settings.forceLength;\n var useGrouping = settings.useGrouping;\n var trunc = settings.trunc;\n\n // Use significant digits only when precision is greater than 0.\n var useSignificantDigits = settings.useSignificantDigits && precision > 0;\n var significantDigits = useSignificantDigits ? settings.precision : 0;\n var significantDigitsCache = significantDigits;\n\n var minValue = settings.minValue;\n var isMinValue = false;\n\n var maxValue = settings.maxValue;\n var isMaxValue = false;\n\n // formatNumber fallback options.\n var useToLocaleString = settings.useToLocaleString;\n var groupingSeparator = settings.groupingSeparator;\n var decimalSeparator = settings.decimalSeparator;\n var grouping = settings.grouping;\n\n useToLocaleString = useToLocaleString && (toLocaleStringWorks || intlNumberFormatWorks);\n\n // Trim options.\n var trim = settings.trim;\n\n if (isArray(trim)) {\n trim = trim.join(\" \");\n }\n\n if (trim === null && (largest || maxValue || useSignificantDigits)) {\n trim = \"all\";\n }\n\n if (trim === null || trim === true || trim === \"left\" || trim === \"right\") {\n trim = \"large\";\n }\n\n if (trim === false) {\n trim = \"\";\n }\n\n var trimIncludes = function (item) {\n return item.test(trim);\n };\n\n var rLarge = /large/;\n var rSmall = /small/;\n var rBoth = /both/;\n var rMid = /mid/;\n var rAll = /^all|[^sm]all/;\n var rFinal = /final/;\n\n var trimLarge = largest > 0 || any([rLarge, rBoth, rAll], trimIncludes);\n var trimSmall = any([rSmall, rBoth, rAll], trimIncludes);\n var trimMid = any([rMid, rAll], trimIncludes);\n var trimFinal = any([rFinal, rAll], trimIncludes);\n\n // Parse format string to create raw tokens array.\n var rawTokens = map(template.match(tokenizer), function (token, index) {\n var type = typeMap(token);\n\n if (token.slice(0, 1) === \"*\") {\n token = token.slice(1);\n\n if (type !== \"escape\" && type !== \"general\") {\n stopTrim.push(type);\n }\n }\n\n return {\n index: index,\n length: token.length,\n text: \"\",\n\n // Replace escaped tokens with the non-escaped token text.\n token: (type === \"escape\" ? token.replace(tokenDefs.escape, \"$1\") : token),\n\n // Ignore type on non-moment tokens.\n type: ((type === \"escape\" || type === \"general\") ? null : type)\n };\n });\n\n // Associate text tokens with moment tokens.\n var currentToken = {\n index: 0,\n length: 0,\n token: \"\",\n text: \"\",\n type: null\n };\n\n var tokens = [];\n\n if (useLeftUnits) {\n rawTokens.reverse();\n }\n\n each(rawTokens, function (token) {\n if (token.type) {\n if (currentToken.type || currentToken.text) {\n tokens.push(currentToken);\n }\n\n currentToken = token;\n\n return;\n }\n\n if (useLeftUnits) {\n currentToken.text = token.token + currentToken.text;\n } else {\n currentToken.text += token.token;\n }\n });\n\n if (currentToken.type || currentToken.text) {\n tokens.push(currentToken);\n }\n\n if (useLeftUnits) {\n tokens.reverse();\n }\n\n // Find unique moment token types in the template in order of\n // descending magnitude.\n var momentTypes = intersection(types, unique(compact(pluck(tokens, \"type\"))));\n\n // Exit early if there are no moment token types.\n if (!momentTypes.length) {\n return pluck(tokens, \"text\").join(\"\");\n }\n\n // Calculate values for each moment type in the template.\n // For processing the settings, values are associated with moment types.\n // Values will be assigned to tokens at the last step in order to\n // assume nothing about frequency or order of tokens in the template.\n momentTypes = map(momentTypes, function (momentType, index) {\n // Is this the least-magnitude moment token found?\n var isSmallest = ((index + 1) === momentTypes.length);\n\n // Is this the greatest-magnitude moment token found?\n var isLargest = (!index);\n\n // Get the raw value in the current units.\n var rawValue;\n\n if (momentType === \"years\" || momentType === \"months\") {\n rawValue = remainderMonths.as(momentType);\n } else {\n rawValue = remainder.as(momentType);\n }\n\n var wholeValue = Math.floor(rawValue);\n var decimalValue = rawValue - wholeValue;\n\n var token = find(tokens, function (token) {\n return momentType === token.type;\n });\n\n if (isLargest && maxValue && rawValue > maxValue) {\n isMaxValue = true;\n }\n\n if (isSmallest && minValue && Math.abs(settings.duration.as(momentType)) < minValue) {\n isMinValue = true;\n }\n\n // Note the length of the largest-magnitude moment token:\n // if it is greater than one and forceLength is not set,\n // then default forceLength to `true`.\n //\n // Rationale is this: If the template is \"h:mm:ss\" and the\n // moment value is 5 minutes, the user-friendly output is\n // \"5:00\", not \"05:00\". We shouldn't pad the `minutes` token\n // even though it has length of two if the template is \"h:mm:ss\";\n //\n // If the minutes output should always include the leading zero\n // even when the hour is trimmed then set `{ forceLength: true }`\n // to output \"05:00\". If the template is \"hh:mm:ss\", the user\n // clearly wanted everything padded so we should output \"05:00\";\n //\n // If the user wants the full padded output, they can use\n // template \"hh:mm:ss\" and set `{ trim: false }` to output\n // \"00:05:00\".\n if (isLargest && forceLength === null && token.length > 1) {\n forceLength = true;\n }\n\n // Update remainder.\n remainder.subtract(wholeValue, momentType);\n remainderMonths.subtract(wholeValue, momentType);\n\n return {\n rawValue: rawValue,\n wholeValue: wholeValue,\n // Decimal value is only retained for the least-magnitude\n // moment type in the format template.\n decimalValue: isSmallest ? decimalValue : 0,\n isSmallest: isSmallest,\n isLargest: isLargest,\n type: momentType,\n // Tokens can appear multiple times in a template string,\n // but all instances must share the same length.\n tokenLength: token.length\n };\n });\n\n var truncMethod = trunc ? Math.floor : Math.round;\n var truncate = function (value, places) {\n var factor = Math.pow(10, places);\n return truncMethod(value * factor) / factor;\n };\n\n var foundFirst = false;\n var bubbled = false;\n\n var formatValue = function (momentType, index) {\n var formatOptions = {\n useGrouping: useGrouping,\n groupingSeparator: groupingSeparator,\n decimalSeparator: decimalSeparator,\n grouping: grouping,\n useToLocaleString: useToLocaleString\n };\n\n if (useSignificantDigits) {\n if (significantDigits <= 0) {\n momentType.rawValue = 0;\n momentType.wholeValue = 0;\n momentType.decimalValue = 0;\n } else {\n formatOptions.maximumSignificantDigits = significantDigits;\n momentType.significantDigits = significantDigits;\n }\n }\n\n if (isMaxValue && !bubbled) {\n if (momentType.isLargest) {\n momentType.wholeValue = maxValue;\n momentType.decimalValue = 0;\n } else {\n momentType.wholeValue = 0;\n momentType.decimalValue = 0;\n }\n }\n\n if (isMinValue && !bubbled) {\n if (momentType.isSmallest) {\n momentType.wholeValue = minValue;\n momentType.decimalValue = 0;\n } else {\n momentType.wholeValue = 0;\n momentType.decimalValue = 0;\n }\n }\n\n if (momentType.isSmallest || momentType.significantDigits && momentType.significantDigits - momentType.wholeValue.toString().length <= 0) {\n // Apply precision to least significant token value.\n if (precision < 0) {\n momentType.value = truncate(momentType.wholeValue, precision);\n } else if (precision === 0) {\n momentType.value = truncMethod(momentType.wholeValue + momentType.decimalValue);\n } else { // precision > 0\n if (useSignificantDigits) {\n if (trunc) {\n momentType.value = truncate(momentType.rawValue, significantDigits - momentType.wholeValue.toString().length);\n } else {\n momentType.value = momentType.rawValue;\n }\n\n if (momentType.wholeValue) {\n significantDigits -= momentType.wholeValue.toString().length;\n }\n } else {\n formatOptions.fractionDigits = precision;\n\n if (trunc) {\n momentType.value = momentType.wholeValue + truncate(momentType.decimalValue, precision);\n } else {\n momentType.value = momentType.wholeValue + momentType.decimalValue;\n }\n }\n }\n } else {\n if (useSignificantDigits && momentType.wholeValue) {\n // Outer Math.round required here to handle floating point errors.\n momentType.value = Math.round(truncate(momentType.wholeValue, momentType.significantDigits - momentType.wholeValue.toString().length));\n\n significantDigits -= momentType.wholeValue.toString().length;\n } else {\n momentType.value = momentType.wholeValue;\n }\n }\n\n if (momentType.tokenLength > 1 && (forceLength || foundFirst)) {\n formatOptions.minimumIntegerDigits = momentType.tokenLength;\n\n if (bubbled && formatOptions.maximumSignificantDigits < momentType.tokenLength) {\n delete formatOptions.maximumSignificantDigits;\n }\n }\n\n if (!foundFirst && (momentType.value > 0 || trim === \"\" /* trim: false */ || find(stopTrim, momentType.type) || find(outputTypes, momentType.type))) {\n foundFirst = true;\n }\n\n momentType.formattedValue = formatNumber(momentType.value, formatOptions, userLocale);\n\n formatOptions.useGrouping = false;\n formatOptions.decimalSeparator = \".\";\n momentType.formattedValueEn = formatNumber(momentType.value, formatOptions, \"en\");\n\n if (momentType.tokenLength === 2 && momentType.type === \"milliseconds\") {\n momentType.formattedValueMS = formatNumber(momentType.value, {\n minimumIntegerDigits: 3,\n useGrouping: false\n }, \"en\").slice(0, 2);\n }\n\n return momentType;\n };\n\n // Calculate formatted values.\n momentTypes = map(momentTypes, formatValue);\n momentTypes = compact(momentTypes);\n\n // Bubble rounded values.\n if (momentTypes.length > 1) {\n var findType = function (type) {\n return find(momentTypes, function (momentType) {\n return momentType.type === type;\n });\n };\n\n var bubbleTypes = function (bubble) {\n var bubbleMomentType = findType(bubble.type);\n\n if (!bubbleMomentType) {\n return;\n }\n\n each(bubble.targets, function (target) {\n var targetMomentType = findType(target.type);\n\n if (!targetMomentType) {\n return;\n }\n\n if (parseInt(bubbleMomentType.formattedValueEn, 10) === target.value) {\n bubbleMomentType.rawValue = 0;\n bubbleMomentType.wholeValue = 0;\n bubbleMomentType.decimalValue = 0;\n targetMomentType.rawValue += 1;\n targetMomentType.wholeValue += 1;\n targetMomentType.decimalValue = 0;\n targetMomentType.formattedValueEn = targetMomentType.wholeValue.toString();\n bubbled = true;\n }\n });\n };\n\n each(bubbles, bubbleTypes);\n }\n\n // Recalculate formatted values.\n if (bubbled) {\n foundFirst = false;\n significantDigits = significantDigitsCache;\n momentTypes = map(momentTypes, formatValue);\n momentTypes = compact(momentTypes);\n }\n\n if (outputTypes && !(isMaxValue && !settings.trim)) {\n momentTypes = map(momentTypes, function (momentType) {\n if (find(outputTypes, function (outputType) {\n return momentType.type === outputType;\n })) {\n return momentType;\n }\n\n return null;\n });\n\n momentTypes = compact(momentTypes);\n } else {\n // Trim Large.\n if (trimLarge) {\n momentTypes = rest(momentTypes, function (momentType) {\n // Stop trimming on:\n // - the smallest moment type\n // - a type marked for stopTrim\n // - a type that has a whole value\n return !momentType.isSmallest && !momentType.wholeValue && !find(stopTrim, momentType.type);\n });\n }\n\n // Largest.\n if (largest && momentTypes.length) {\n momentTypes = momentTypes.slice(0, largest);\n }\n\n // Trim Small.\n if (trimSmall && momentTypes.length > 1) {\n momentTypes = initial(momentTypes, function (momentType) {\n // Stop trimming on:\n // - a type marked for stopTrim\n // - a type that has a whole value\n // - the largest momentType\n return !momentType.wholeValue && !find(stopTrim, momentType.type) && !momentType.isLargest;\n });\n }\n\n // Trim Mid.\n if (trimMid) {\n momentTypes = map(momentTypes, function (momentType, index) {\n if (index > 0 && index < momentTypes.length - 1 && !momentType.wholeValue) {\n return null;\n }\n\n return momentType;\n });\n\n momentTypes = compact(momentTypes);\n }\n\n // Trim Final.\n if (trimFinal && momentTypes.length === 1 && !momentTypes[0].wholeValue && !(!trunc && momentTypes[0].isSmallest && momentTypes[0].rawValue < minValue)) {\n momentTypes = [];\n }\n }\n\n if (returnMomentTypes) {\n return momentTypes;\n }\n\n // Localize and pluralize unit labels.\n each(tokens, function (token) {\n var key = momentTokens[token.type];\n\n var momentType = find(momentTypes, function (momentType) {\n return momentType.type === token.type;\n });\n\n if (!key || !momentType) {\n return;\n }\n\n var values = momentType.formattedValueEn.split(\".\");\n\n values[0] = parseInt(values[0], 10);\n\n if (values[1]) {\n values[1] = parseFloat(\"0.\" + values[1], 10);\n } else {\n values[1] = null;\n }\n\n var pluralKey = localeData.durationPluralKey(key, values[0], values[1]);\n\n var labels = durationGetLabels(key, localeData);\n\n var autoLocalized = false;\n\n var pluralizedLabels = {};\n\n // Auto-Localized unit labels.\n each(localeData._durationLabelTypes, function (labelType) {\n var label = find(labels, function (label) {\n return label.type === labelType.type && label.key === pluralKey;\n });\n\n if (label) {\n pluralizedLabels[label.type] = label.label;\n\n if (stringIncludes(token.text, labelType.string)) {\n token.text = token.text.replace(labelType.string, label.label);\n autoLocalized = true;\n }\n }\n });\n\n // Auto-pluralized unit labels.\n if (usePlural && !autoLocalized) {\n labels.sort(durationLabelCompare);\n\n each(labels, function (label) {\n if (pluralizedLabels[label.type] === label.label) {\n if (stringIncludes(token.text, label.label)) {\n // Stop checking this token if its label is already\n // correctly pluralized.\n return false;\n }\n\n // Skip this label if it is correct, but not present in\n // the token's text.\n return;\n }\n\n if (stringIncludes(token.text, label.label)) {\n // Replece this token's label and stop checking.\n token.text = token.text.replace(label.label, pluralizedLabels[label.type]);\n return false;\n }\n });\n }\n });\n\n // Build ouptut.\n tokens = map(tokens, function (token) {\n if (!token.type) {\n return token.text;\n }\n\n var momentType = find(momentTypes, function (momentType) {\n return momentType.type === token.type;\n });\n\n if (!momentType) {\n return \"\";\n }\n\n var out = \"\";\n\n if (useLeftUnits) {\n out += token.text;\n }\n\n if (isNegative && isMaxValue || !isNegative && isMinValue) {\n out += \"< \";\n isMaxValue = false;\n isMinValue = false;\n }\n\n if (isNegative && isMinValue || !isNegative && isMaxValue) {\n out += \"> \";\n isMaxValue = false;\n isMinValue = false;\n }\n\n if (isNegative && (momentType.value > 0 || trim === \"\" || find(stopTrim, momentType.type) || find(outputTypes, momentType.type))) {\n out += \"-\";\n isNegative = false;\n }\n\n if (token.type === \"milliseconds\" && momentType.formattedValueMS) {\n out += momentType.formattedValueMS;\n } else {\n out += momentType.formattedValue;\n }\n\n if (!useLeftUnits) {\n out += token.text;\n }\n\n return out;\n });\n\n // Trim leading and trailing comma, space, colon, and dot.\n return tokens.join(\"\").replace(/(,| |:|\\.)*$/, \"\").replace(/^(,| |:|\\.)*/, \"\");\n }", "function millisecondsToStr(a){\"use strict\";function b(a){return a>1?\"s ago\":\" ago\"}var c=Math.floor(a/1e3),d=Math.floor(c/31536e3);if(d)return d+\" year\"+b(d);var e=Math.floor((c%=31536e3)/2592e3);if(e)return e+\" month\"+b(e);var f=Math.floor((c%=2592e3)/86400);if(f)return f+\" day\"+b(f);var g=Math.floor((c%=86400)/3600);if(g)return\"about \"+g+\" hour\"+b(g);var h=Math.floor((c%=3600)/60);if(h)return h+\" minute\"+b(h);var i=c%60;return i?i+\" second\"+b(i):\"just now\"}", "function processRelativeTime$5(number,withoutSuffix,key,isFuture){var format={'m':['eng Minutt','enger Minutt'],'h':['eng Stonn','enger Stonn'],'d':['een Dag','engem Dag'],'M':['ee Mount','engem Mount'],'y':['ee Joer','engem Joer']};return withoutSuffix?format[key][0]:format[key][1];}", "function relativeTimeWithMutation(number,withoutSuffix,key){var format={mm:\"munutenn\",MM:\"miz\",dd:\"devezh\"};return number+\" \"+mutation(format[key],number)}", "function processRelativeTime(number,withoutSuffix,key,isFuture){var format={s:[\"mõne sekundi\",\"mõni sekund\",\"paar sekundit\"],ss:[number+\"sekundi\",number+\"sekundit\"],m:[\"ühe minuti\",\"üks minut\"],mm:[number+\" minuti\",number+\" minutit\"],h:[\"ühe tunni\",\"tund aega\",\"üks tund\"],hh:[number+\" tunni\",number+\" tundi\"],d:[\"ühe päeva\",\"üks päev\"],M:[\"kuu aja\",\"kuu aega\",\"üks kuu\"],MM:[number+\" kuu\",number+\" kuud\"],y:[\"ühe aasta\",\"aasta\",\"üks aasta\"],yy:[number+\" aasta\",number+\" aastat\"]};return withoutSuffix?format[key][2]?format[key][2]:format[key][1]:isFuture?format[key][0]:format[key][1]}", "function humanizer(passedOptions) {\n\n var result = function humanizer(ms, humanizerOptions) {\n var options = extend({}, result, humanizerOptions || {});\n return doHumanization(ms, options);\n };\n\n return extend(result, {\n language: \"en\",\n delimiter: \", \",\n spacer: \" \",\n units: [\"year\", \"month\", \"week\", \"day\", \"hour\", \"minute\", \"second\"],\n languages: {},\n halfUnit: true,\n round: false\n }, passedOptions);\n\n }", "function processRelativeTime$6(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += withoutSuffix || isFuture ? 'sekund' : 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function momentify(value, options) {\n\t\tvar parser = options.parser;\n\t\tvar format = options.parser || options.format;\n\n\t\tif (typeof parser === 'function') {\n\t\t\treturn parser(value);\n\t\t}\n\n\t\tif (typeof value === 'string' && typeof format === 'string') {\n\t\t\treturn moment(value, format);\n\t\t}\n\n\t\tif (!(value instanceof moment)) {\n\t\t\tvalue = moment(value);\n\t\t}\n\n\t\tif (value.isValid()) {\n\t\t\treturn value;\n\t\t}\n\n\t\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t\t// The user might still use the deprecated `format` option to convert his inputs.\n\t\tif (typeof format === 'function') {\n\t\t\treturn format(value);\n\t\t}\n\n\t\treturn value;\n\t}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}" ]
[ "0.6559213", "0.6559213", "0.6559213", "0.6559213", "0.64766085", "0.6381961", "0.6326815", "0.6326815", "0.6326815", "0.6326815", "0.6326815", "0.6326815", "0.6326815", "0.6326815", "0.6326815", "0.6215613", "0.6122844", "0.6122844", "0.6097173", "0.6097173", "0.6097173", "0.60871726", "0.6032461", "0.60211927", "0.6011923", "0.6011923", "0.6011923", "0.6011923", "0.6011923", "0.6007203", "0.5950699", "0.5895646", "0.58818245", "0.5864715", "0.5838875", "0.58143145", "0.58143145", "0.58143145", "0.58143145", "0.5811177", "0.57793826", "0.57672596", "0.57636124", "0.5733725", "0.5720592", "0.56956285", "0.56899124", "0.56834894", "0.56834894", "0.56834894", "0.56834894", "0.56834894", "0.56834894", "0.56834894", "0.56834894", "0.56834894", "0.56834894", "0.56834894", "0.56834894", "0.56834894", "0.56834894", "0.56834894", "0.56834894", "0.56834894", "0.56834894", "0.56834894", "0.56834894", "0.56834894", "0.56834894", "0.56834894", "0.56834894", "0.56834894", "0.56834894", "0.56834894", "0.56834894", "0.56834894", "0.56834894", "0.56834894", "0.5679499", "0.56461453", "0.5622599", "0.5622176", "0.56084263", "0.5602041", "0.5574665", "0.55629194", "0.5538981", "0.5538135", "0.55224735", "0.55208534", "0.55208534", "0.55208534", "0.55208534", "0.55208534", "0.55208534", "0.55208534", "0.55208534", "0.55208534", "0.55208534", "0.55208534", "0.55208534" ]
0.0
-1
This function allows you to set a threshold for relative time strings
function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) { if (thresholds[threshold] === undefined) { return false; } if (limit === undefined) { return thresholds[threshold]; } thresholds[threshold] = limit; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t }", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t }", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t }", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t }", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t }", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t }", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t}", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t}", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t}", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t}", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t}", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t}", "function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n\tif (thresholds[threshold] === undefined) {\n\t\treturn false;\n\t}\n\tif (limit === undefined) {\n\t\treturn thresholds[threshold];\n\t}\n\tthresholds[threshold] = limit;\n\tif (threshold === 's') {\n\t\tthresholds.ss = limit - 1;\n\t}\n\treturn true;\n}", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function getSetRelativeTimeThreshold(threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t }", "function getSetRelativeTimeThreshold(threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t }", "function getSetRelativeTimeThreshold(threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t }", "function getSetRelativeTimeThreshold (threshold, limit) {\r\n if (thresholds[threshold] === undefined) {\r\n return false;\r\n }\r\n if (limit === undefined) {\r\n return thresholds[threshold];\r\n }\r\n thresholds[threshold] = limit;\r\n if (threshold === 's') {\r\n thresholds.ss = limit - 1;\r\n }\r\n return true;\r\n }", "function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }" ]
[ "0.69783336", "0.69343334", "0.69072294", "0.69072294", "0.69072294", "0.69072294", "0.69072294", "0.69072294", "0.6901369", "0.6901369", "0.6901369", "0.6901369", "0.6901369", "0.6901369", "0.6895151", "0.68865347", "0.6871718", "0.6841288", "0.6824244", "0.6824244", "0.6824244", "0.6824244", "0.6824244", "0.6824244", "0.6824244", "0.6824244", "0.6824244", "0.6824244", "0.6824244", "0.6824244", "0.6820637", "0.6820637", "0.6820637", "0.68154883", "0.6812607", "0.68008447", "0.68008447", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034", "0.67660034" ]
0.0
-1
arrayToList version 1 progressive verison Array elements are added to the list in the order that they appear in the array, from the 0th element to the .length 1th element.
function arrayToList_v1(array) { if (array.length == 0) return null; let list = {value: array[0], rest: null}; let node = list; for (let i = 1; i < array.length; i++) { node.rest = {value: array[i], rest: null}; node = node.rest; } return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function arrayToList(array) {\n var result = null;\n \n for (var i = array.length - 1; i >= 0; i--) {\n result = prepend(array[i], result);\n }\n \n return result;\n}", "function arrayToList(array = []) {\n let list = null;\n let i = array.length;\n while (i > 0) list = prepend(array[--i], list);\n return list;\n}", "function arrayToList(anArray) {\n var aList = null;\n var arraySize = anArray.length;\n\t \n for (var i = arraySize - 1; i >= 0; --i) {\n\taList = prepend(anArray[i], aList);\n }\n \n return aList;\n}", "function arrayToList() {\n\n}", "function arrayToList(arrayInput){\n var newList, \n tmp;\n for(var i=arrayInput.length-1; i>=0; i-=1){\n tmp= arrayInput[i];\n newList={ value: tmp,\n rest: newList\n }\n }\n return newList; \n }", "function arrayToList(anArray) {\n\tif (anArray.length == 0) {\n\t\treturn null;\n\t}\n\telse {\n\t\treturn prepend(anArray[0], arrayToList(anArray.slice(1)));\n\t}\n}", "function arrayToList( array ) {\n\tvar list = { value: array[array.length-1], reference: null }; // set 1st value in this new list == last value in array\n\tfor ( var i = array.length-2; i >= 0; i-- ) { // start iterating downwards starting at end of array remainder\n\t\tlist = prepend( array[i], list ); // call prepend() to add each new element to top of the list\n\t}\n\treturn list;\n}", "function arrayToList_v2(array) {\r\n let list = null;\r\n for (let i = array.length - 1; i >=0 ; i--) {\r\n list = {value: array[i], rest: list};\r\n }\r\n return list;\r\n}", "arrayToList(arr, list=null) {\n if(arr.length > 0) {\n const node = { \n value: arr[arr.length-1],\n rest: list\n }\n\n // Instead of a for loop going backwards we can just keep slicing off the arr from 2nd to last element to first\n return this.arrayToList(arr.slice(0, arr.length-1), node);\n }\n\n return list;\n }", "function arrayToList (array) {\n var list = null;\n for (var i = array.length - 1; i >= 0; i--) {\n list = { value: array[i], rest: list };\n }\n return list;\n}", "listToList(arr) {\n var items = [];\n arr.forEach(i => {\n items.push(i);\n });\n return items;\n }", "function arrayToList(array) {\n // Your code here\n var list = null;\n for (var i = array.length - 1; i >= 0; i--)\n list = { value: array[i], rest: list };\n return list;\n}", "function arrayToList(array) {\n var list = null;\n for (i = array.length - 1; i >= 0; i--) {\n list = {\n value: array[i],\n rest: list\n };\n }\n return list;\n}", "function arrayToList(array) {\n let list = null;\n\n for (let i = array.length - 1; i >= 0; i--) {\n list = {value: array[i], rest: list}; \n }\n return list;\n}", "function arrayToList(array) {\n // Your code here\n var remain = [];\n var temp = {};\n if(array[0] === undefined){\n return null;\n }else{\n for(var i = 1; i<array.length; i++){\n remain[i-1] = array[i];\n }\n temp = arrayToList(remain);\n }\n var list = {\n value: array[0],\n rest: temp\n }\n return list;\n}", "function arrayToList(array) {\n // Your code here\n var list = null;\n for(var i = array.length-1; i>=0; i--){\n list = {\n value: array[i],\n rest: list\n };\n\n }\n return list;\n }", "function arrayAsList (inputArray) {\n return reverseList(\n inputArray.reduce(\n Object(__WEBPACK_IMPORTED_MODULE_0__functional__[\"e\" /* flip */])(cons),\n emptyList\n )\n )\n}", "function arrayToList(input) {\n var list = null;\n for (var count = 0; count < input.length; count++) {\n list = { value: input[i], rest: list };\n }\n return list;\n}", "function arrayToList(arr) {\n var list = null; // not [] bc it's not an array!!\n for(var i = arr.length -1 ; i >= 0; i--){\n list = {value: arr[i], rest: list}\n }\n return list;\n}", "function arrayAsList(inputArray){\n\n return reverseList( \n inputArray.reduce(\n flip(cons),\n emptyList \n )\n );\n}", "function arrayAsList(inputArray){\n\n return reverseList( \n inputArray.reduce(\n flip(cons),\n emptyList \n )\n );\n}", "function arrayAsList(inputArray){\n\n return reverseList( \n inputArray.reduce(\n flip(cons),\n emptyList \n )\n );\n}", "function arrayAsList(inputArray){\n\n return reverseList( \n inputArray.reduce(\n flip(cons),\n emptyList \n )\n );\n}", "function arrayAsList(inputArray){\n\n return reverseList( \n inputArray.reduce(\n flip(cons),\n emptyList \n )\n );\n}", "function arrayAsList(inputArray){\n\n return reverseList( \n inputArray.reduce(\n flip(cons),\n emptyList \n )\n );\n}", "function arrayAsList(inputArray){\n\n return reverseList( \n inputArray.reduce(\n flip(cons),\n emptyList \n )\n );\n}", "function arrayAsList(inputArray){\n\n return reverseList( \n inputArray.reduce(\n flip(cons),\n emptyList \n )\n );\n}", "function arrayAsList(inputArray){\n\n return reverseList( \n inputArray.reduce(\n flip(cons),\n emptyList \n )\n );\n}", "function arrayAsList(inputArray){\n\n return reverseList( \n inputArray.reduce(\n flip(cons),\n emptyList \n )\n );\n}", "function arrayAsList(inputArray){\n\n return reverseList( \n inputArray.reduce(\n flip(cons),\n emptyList \n )\n );\n}", "function arrayAsList(inputArray){\n\n return reverseList( \n inputArray.reduce(\n flip(cons),\n emptyList \n )\n );\n}", "function arrayAsList(inputArray){\n\n return reverseList( \n inputArray.reduce(\n flip(cons),\n emptyList \n )\n );\n}", "function arrayToList(array) {\n let list = null;\n for (let i = 0; i < array.length; i++) {\n list = { value: array[array.length - 1 - i], rest: list };\n }\n return list;\n}", "function arrayToList(array) {\n var list = null\n for (var i=array.length-1;i>=0;i--) {\n var tempList = {}\n tempList.value = array[i]\n tempList.rest = list\n list = tempList\n // list.value = array[i]\n // list.rest = \n }\n return list;\n}", "function arrayToList(array) {\n // Checking whether user has passed a non-empty array as an argument.\n if (!array.length) {\n return {};\n }\n\n // Create a node for the first element of the array.\n let list = {\n value: array[0]\n };\n\n // Base step: `array` only contains a single element.\n // It is both the HEAD & TAIL of the list.\n if (array.length == 1) {\n list.rest = null;\n return list;\n }\n\n // Recursive Step: Create a List with the remaining elements of `array`.\n list.rest = arrayToList(array.slice(1));\n\n return list;\n}", "function ex_array2list(array) {\n var list = null;\n for (var i = array.length - 1; i >= 0; i--) {\n list = {\n value: array[i],\n rest: list\n };\n }\n\n return list;\n}", "function arrayToList(array) {\n // Your code here\n var list = {};\n var node = list;\n if(array.length > 0) {\n list = {\n value: array[0],\n rest: {}\n };\n node = list;\n }\n\n for(var i = 1; i < array.length; ++i) {\n if(i != array.length - 1){\n node.rest = {\n value: array[i],\n rest: {}\n };\n }\n else {\n node.rest = {\n value: array[i],\n rest: null\n };\n }\n node = node.rest;\n }\n\n return list;\n}", "function array_to_list(A) {\n const len = array_length(A);\n let L = null;\n for (let i = len - 1; i >= 0; i = i - 1) {\n L = pair(A[i], L);\n }\n return L;\n}", "function listToArray() {\n\n}", "function arrToList(array) {\n var listStr = ''\n array.forEach(item => listStr += `${item}\\n`)\n return listStr;\n}", "function addToArray(array) {\n return array.concat(0);\n}", "function addToArray(array) {\n return array.concat(0);\n}", "function arrayToList(array){\n var list = {};\n list.rest = null;\n for (var i = array.length - 1; i >= 0; i--){\n object = {\n value: array[i],\n rest: list.rest\n }\n\n if (i != 0){\n list.rest = object\n } else {\n list.value = array[i]\n }\n }\n return list;\n}", "function arrayToList(arr){\n var head ={ value:arr[0], rest:null};\n temp = head;\n for (i = 1; i < arr.length; i++){\n obj = {value: arr[i], rest:null};\n temp.rest = obj;\n temp = obj;\n }\n return head;\n}", "function listAsArray(list){\n\n return foldR( function(arraySoFar, listItem){\n \n arraySoFar.unshift(listItem);\n return arraySoFar;\n \n }, [], list );\n \n}", "function listAsArray(list){\n\n return foldR( function(arraySoFar, listItem){\n \n arraySoFar.unshift(listItem);\n return arraySoFar;\n \n }, [], list );\n \n}", "function listAsArray(list){\n\n return foldR( function(arraySoFar, listItem){\n \n arraySoFar.unshift(listItem);\n return arraySoFar;\n \n }, [], list );\n \n}", "function listAsArray(list){\n\n return foldR( function(arraySoFar, listItem){\n \n arraySoFar.unshift(listItem);\n return arraySoFar;\n \n }, [], list );\n \n}", "function listAsArray(list){\n\n return foldR( function(arraySoFar, listItem){\n \n arraySoFar.unshift(listItem);\n return arraySoFar;\n \n }, [], list );\n \n}", "function listAsArray(list){\n\n return foldR( function(arraySoFar, listItem){\n \n arraySoFar.unshift(listItem);\n return arraySoFar;\n \n }, [], list );\n \n}", "function listAsArray(list){\n\n return foldR( function(arraySoFar, listItem){\n \n arraySoFar.unshift(listItem);\n return arraySoFar;\n \n }, [], list );\n \n}", "function listAsArray(list){\n\n return foldR( function(arraySoFar, listItem){\n \n arraySoFar.unshift(listItem);\n return arraySoFar;\n \n }, [], list );\n \n}", "function listAsArray(list){\n\n return foldR( function(arraySoFar, listItem){\n \n arraySoFar.unshift(listItem);\n return arraySoFar;\n \n }, [], list );\n \n}", "function listAsArray(list){\n\n return foldR( function(arraySoFar, listItem){\n \n arraySoFar.unshift(listItem);\n return arraySoFar;\n \n }, [], list );\n \n}", "function listAsArray(list){\n\n return foldR( function(arraySoFar, listItem){\n \n arraySoFar.unshift(listItem);\n return arraySoFar;\n \n }, [], list );\n \n}", "function listAsArray(list){\n\n return foldR( function(arraySoFar, listItem){\n \n arraySoFar.unshift(listItem);\n return arraySoFar;\n \n }, [], list );\n \n}", "function listAsArray(list){\n\n return foldR( function(arraySoFar, listItem){\n \n arraySoFar.unshift(listItem);\n return arraySoFar;\n \n }, [], list );\n \n}", "function addAllToArray(items,arr){for(var i=0;i<items.length;i++){arr.push(items[i]);}}", "function arrayToList(array) {\n // write a loop that runs as many times as there are elements in the array\n // asign the value of the current item to the value in the array\n // give the last element a rest value of 'null'\n var output = {};\n for (var i = array.length - 1; i >= 0; i--) {\n var outputPrev = output;\n output = {};\n output.value = array[i];\n\n if (i === array.length - 1) {\n output.rest = null;\n } else {\n output.rest = outputPrev;\n }\n }\n return output;\n}", "array_add_items(from_array, to_array) {\n for (let i = 0; i < from_array.length; i++) {\n to_array.push(from_array[i]);\n }\n }", "function arrayToList(arr) {\n let ul = document.createElement('ul'),\n li;\n for (let i = 0; i < arr.length; i++) {\n if (Array.isArray(arr[i])) {\n li.appendChild(arrayToList(arr[i]));\n } else {\n li = document.createElement('li');\n li.appendChild(document.createTextNode(arr[i]));\n ul.appendChild(li);\n }\n }\n return ul;\n}", "function arrayToList(arr) {\n let list = {}\n list.value = arr[arr.length - 1];\n list.rest = null;\n\n for (let i = arr.length - 2; i >= 0; i--) {\n let cur_obj = {}\n cur_obj.value = arr[i];\n cur_obj.rest = list;\n list = cur_obj;\n }\n return list;\n}", "function prependArray(element, array) {\n \n array.unshift(element);\n\n return array;\n // let newList = [];\n\n // for (let i = 0; i < list.length; i++) {\n // newList.push(list[i]);\n // }\n // newList.unshift(element);\n\n // return newList;\n}", "function listAsArray (list) {\n return foldR(function (arraySoFar, listItem) {\n arraySoFar.unshift(listItem)\n return arraySoFar\n }, [], list)\n}", "listToArray(list) {\n let arr = [];\n\n // Walk a list using while\n while(list) {\n arr.push(list.value);\n list = list.rest;\n }\n\n return arr;\n }", "function addToArray(array) {\n return array.concat(10); // concat creates a copy of the array, then mutates that copy\n}", "function addElementToBeginningOfArray(array,element){\n return [element,...array]\n}", "function toArray(list){\n var array = Array(list.length);\n for(let i=0; i < list.length; i++){\n array[i] = list[i];\n }\n return array;\n}", "function listToArray(aList) {\n var anArray = [];\n \n var i = 0;\n var value = nth(aList, i); \n \n while (value != undefined) {\n\tanArray[i] = value;\n\t++i;\n\tvalue = nth(aList, i);\n }\n \n return anArray;\n}", "function toArray (list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret\n }", "function toArray (list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret\n }", "function toArray (list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret\n }", "function toArray (list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret\n }", "function toArray (list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret\n }", "function addElementToEndOfArray(array, element){\narray = [...array, element];\nreturn(array);\n}", "function toArray(list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret;\n }", "function addElementToBeginningOfArray(array, element){\nreturn [element,...array];\n}", "function toArray(list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret;\n }", "function toArray (list, start) {\n\t start = start || 0\n\t var i = list.length - start\n\t var ret = new Array(i)\n\t while (i--) {\n\t ret[i] = list[i + start]\n\t }\n\t return ret\n\t}", "function listToArray(list){\n var array = [];\n var loop = list;\n while (loop != null){\n array.push(loop.value);\n loop = loop.rest;\n }\n return array;\n}", "function addElementToEndOfArray(array, element) {\n \n var newArray = [ ...array, element]\n\n return( newArray)\n\n}", "function toArray(list, start) {\n\t\t start = start || 0;\n\t\t var i = list.length - start;\n\t\t var ret = new Array(i);\n\t\t while (i--) {\n\t\t ret[i] = list[i + start];\n\t\t }\n\t\t return ret;\n\t\t}", "function toArray(list,start){start=start||0;var i=list.length-start;var ret=new Array(i);while(i--){ret[i]=list[i+start];}return ret;}", "function toArray(list,start){start=start||0;var i=list.length-start;var ret=new Array(i);while(i--){ret[i]=list[i+start];}return ret;}", "function toArray(list,start){start=start||0;var i=list.length-start;var ret=new Array(i);while(i--){ret[i]=list[i+start];}return ret;}", "function toArray(list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n\n while (i--) {\n ret[i] = list[i + start];\n }\n\n return ret;\n }", "function toArray (list, start) {\n\t start = start || 0;\n\t var i = list.length - start;\n\t var ret = new Array(i);\n\t while (i--) {\n\t ret[i] = list[i + start];\n\t }\n\t return ret\n\t}", "function toArray (list, start) {\n\t start = start || 0;\n\t var i = list.length - start;\n\t var ret = new Array(i);\n\t while (i--) {\n\t ret[i] = list[i + start];\n\t }\n\t return ret\n\t}", "function toArray (list, start) {\n\t start = start || 0;\n\t var i = list.length - start;\n\t var ret = new Array(i);\n\t while (i--) {\n\t ret[i] = list[i + start];\n\t }\n\t return ret\n\t}", "function toArray (list, start) {\n\t start = start || 0;\n\t var i = list.length - start;\n\t var ret = new Array(i);\n\t while (i--) {\n\t ret[i] = list[i + start];\n\t }\n\t return ret\n\t}", "function toArray (list, start) {\n\t start = start || 0;\n\t var i = list.length - start;\n\t var ret = new Array(i);\n\t while (i--) {\n\t ret[i] = list[i + start];\n\t }\n\t return ret\n\t}", "function toArray (list, start) {\n\t start = start || 0;\n\t var i = list.length - start;\n\t var ret = new Array(i);\n\t while (i--) {\n\t ret[i] = list[i + start];\n\t }\n\t return ret\n\t}", "function toArray (list, start) {\n\t start = start || 0;\n\t var i = list.length - start;\n\t var ret = new Array(i);\n\t while (i--) {\n\t ret[i] = list[i + start];\n\t }\n\t return ret\n\t}", "function toArray (list, start) {\n\t start = start || 0;\n\t var i = list.length - start;\n\t var ret = new Array(i);\n\t while (i--) {\n\t ret[i] = list[i + start];\n\t }\n\t return ret\n\t}", "function toArray (list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret\n}", "function toArray (list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret\n}", "function toArray (list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret\n}", "function toArray (list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret\n}", "function toArray (list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret\n}", "function toArray (list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret\n}" ]
[ "0.78120786", "0.77586645", "0.7687061", "0.76714367", "0.75177866", "0.7390571", "0.7143325", "0.7072136", "0.70287097", "0.7025907", "0.69670063", "0.6927238", "0.6916796", "0.68336266", "0.6806871", "0.6758736", "0.67371994", "0.6722723", "0.67137796", "0.6666359", "0.6666359", "0.6666359", "0.6666359", "0.6666359", "0.6666359", "0.6666359", "0.6666359", "0.6666359", "0.6666359", "0.6666359", "0.6666359", "0.6666359", "0.65368587", "0.6466618", "0.64621645", "0.63881284", "0.6352821", "0.63333046", "0.633098", "0.61775684", "0.6164018", "0.6164018", "0.61626583", "0.61588573", "0.61192536", "0.61192536", "0.61192536", "0.61192536", "0.61192536", "0.61192536", "0.61192536", "0.61192536", "0.61192536", "0.61192536", "0.61192536", "0.61192536", "0.61192536", "0.61012924", "0.6097506", "0.6071576", "0.6067775", "0.6041579", "0.602065", "0.5957741", "0.5950028", "0.58917594", "0.5877432", "0.5859733", "0.5810627", "0.58099973", "0.5801094", "0.5801094", "0.5801094", "0.5801094", "0.5783121", "0.5783035", "0.5782883", "0.57752466", "0.57579565", "0.5754627", "0.5751616", "0.5744697", "0.57422626", "0.57422626", "0.57422626", "0.57393473", "0.5737375", "0.5737375", "0.5737375", "0.5737375", "0.5737375", "0.5737375", "0.5737375", "0.5737375", "0.57302356", "0.57302356", "0.57302356", "0.57302356", "0.57302356", "0.57302356" ]
0.6918549
12
arrayToList version 2 regressive version Array elements are added to the list in reversed order, that is from the .length 1th element of the array to the 0th one. However, this does not change the order of list nodes, as the references to the rest node were set to the previously created node, instead of the newly created one.
function arrayToList_v2(array) { let list = null; for (let i = array.length - 1; i >=0 ; i--) { list = {value: array[i], rest: list}; } return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "arrayToList(arr, list=null) {\n if(arr.length > 0) {\n const node = { \n value: arr[arr.length-1],\n rest: list\n }\n\n // Instead of a for loop going backwards we can just keep slicing off the arr from 2nd to last element to first\n return this.arrayToList(arr.slice(0, arr.length-1), node);\n }\n\n return list;\n }", "function arrayToList(arrayInput){\n var newList, \n tmp;\n for(var i=arrayInput.length-1; i>=0; i-=1){\n tmp= arrayInput[i];\n newList={ value: tmp,\n rest: newList\n }\n }\n return newList; \n }", "function arrayToList_v1(array) {\r\n if (array.length == 0) return null;\r\n let list = {value: array[0], rest: null};\r\n let node = list;\r\n for (let i = 1; i < array.length; i++) {\r\n node.rest = {value: array[i], rest: null};\r\n node = node.rest;\r\n }\r\n return list;\r\n}", "function arrayToList( array ) {\n\tvar list = { value: array[array.length-1], reference: null }; // set 1st value in this new list == last value in array\n\tfor ( var i = array.length-2; i >= 0; i-- ) { // start iterating downwards starting at end of array remainder\n\t\tlist = prepend( array[i], list ); // call prepend() to add each new element to top of the list\n\t}\n\treturn list;\n}", "function arrayToList(array) {\n var list = null\n for (var i=array.length-1;i>=0;i--) {\n var tempList = {}\n tempList.value = array[i]\n tempList.rest = list\n list = tempList\n // list.value = array[i]\n // list.rest = \n }\n return list;\n}", "function arrayToList(array) {\n // Your code here\n var list = null;\n for (var i = array.length - 1; i >= 0; i--)\n list = { value: array[i], rest: list };\n return list;\n}", "function arrayToList (array) {\n var list = null;\n for (var i = array.length - 1; i >= 0; i--) {\n list = { value: array[i], rest: list };\n }\n return list;\n}", "function arrayToList(array) {\n let list = null;\n for (let i = 0; i < array.length; i++) {\n list = { value: array[array.length - 1 - i], rest: list };\n }\n return list;\n}", "function arrayToList(array) {\n let list = null;\n\n for (let i = array.length - 1; i >= 0; i--) {\n list = {value: array[i], rest: list}; \n }\n return list;\n}", "function arrayToList(array) {\n var list = null;\n for (i = array.length - 1; i >= 0; i--) {\n list = {\n value: array[i],\n rest: list\n };\n }\n return list;\n}", "function arrayToList(array) {\n // Your code here\n var list = null;\n for(var i = array.length-1; i>=0; i--){\n list = {\n value: array[i],\n rest: list\n };\n\n }\n return list;\n }", "function arrayToList(array) {\n var result = null;\n \n for (var i = array.length - 1; i >= 0; i--) {\n result = prepend(array[i], result);\n }\n \n return result;\n}", "function arrayToList(array) {\n // Your code here\n var list = {};\n var node = list;\n if(array.length > 0) {\n list = {\n value: array[0],\n rest: {}\n };\n node = list;\n }\n\n for(var i = 1; i < array.length; ++i) {\n if(i != array.length - 1){\n node.rest = {\n value: array[i],\n rest: {}\n };\n }\n else {\n node.rest = {\n value: array[i],\n rest: null\n };\n }\n node = node.rest;\n }\n\n return list;\n}", "function arrayToList(array) {\n // Your code here\n var remain = [];\n var temp = {};\n if(array[0] === undefined){\n return null;\n }else{\n for(var i = 1; i<array.length; i++){\n remain[i-1] = array[i];\n }\n temp = arrayToList(remain);\n }\n var list = {\n value: array[0],\n rest: temp\n }\n return list;\n}", "function arrayToList(arr) {\n var list = null; // not [] bc it's not an array!!\n for(var i = arr.length -1 ; i >= 0; i--){\n list = {value: arr[i], rest: list}\n }\n return list;\n}", "function arrayToList(array = []) {\n let list = null;\n let i = array.length;\n while (i > 0) list = prepend(array[--i], list);\n return list;\n}", "function reverseList(arr) {\n var length = Math.ceil(arr.length / 2);\n var temp;\n for (var i = 0; i < length; i++) {\n temp = arr[i];\n arr[i] = arr[arr.length - 1 - i];\n arr[arr.length - 1 - i] = temp;\n }\n return arr;\n}", "function arrayAsList (inputArray) {\n return reverseList(\n inputArray.reduce(\n Object(__WEBPACK_IMPORTED_MODULE_0__functional__[\"e\" /* flip */])(cons),\n emptyList\n )\n )\n}", "function arrayToList(arr) {\n let list = {}\n list.value = arr[arr.length - 1];\n list.rest = null;\n\n for (let i = arr.length - 2; i >= 0; i--) {\n let cur_obj = {}\n cur_obj.value = arr[i];\n cur_obj.rest = list;\n list = cur_obj;\n }\n return list;\n}", "function arrayToList(anArray) {\n var aList = null;\n var arraySize = anArray.length;\n\t \n for (var i = arraySize - 1; i >= 0; --i) {\n\taList = prepend(anArray[i], aList);\n }\n \n return aList;\n}", "function arrayToList() {\n\n}", "function convertListToRevArray(node) {\n let res = [];\n while (node) {\n res.unshift(node.val);\n node = node.next;\n }\n return res;\n}", "function arrayToList(anArray) {\n\tif (anArray.length == 0) {\n\t\treturn null;\n\t}\n\telse {\n\t\treturn prepend(anArray[0], arrayToList(anArray.slice(1)));\n\t}\n}", "function arrayAsList(inputArray){\n\n return reverseList( \n inputArray.reduce(\n flip(cons),\n emptyList \n )\n );\n}", "function arrayAsList(inputArray){\n\n return reverseList( \n inputArray.reduce(\n flip(cons),\n emptyList \n )\n );\n}", "function arrayAsList(inputArray){\n\n return reverseList( \n inputArray.reduce(\n flip(cons),\n emptyList \n )\n );\n}", "function arrayAsList(inputArray){\n\n return reverseList( \n inputArray.reduce(\n flip(cons),\n emptyList \n )\n );\n}", "function arrayAsList(inputArray){\n\n return reverseList( \n inputArray.reduce(\n flip(cons),\n emptyList \n )\n );\n}", "function arrayAsList(inputArray){\n\n return reverseList( \n inputArray.reduce(\n flip(cons),\n emptyList \n )\n );\n}", "function arrayAsList(inputArray){\n\n return reverseList( \n inputArray.reduce(\n flip(cons),\n emptyList \n )\n );\n}", "function arrayAsList(inputArray){\n\n return reverseList( \n inputArray.reduce(\n flip(cons),\n emptyList \n )\n );\n}", "function arrayAsList(inputArray){\n\n return reverseList( \n inputArray.reduce(\n flip(cons),\n emptyList \n )\n );\n}", "function arrayAsList(inputArray){\n\n return reverseList( \n inputArray.reduce(\n flip(cons),\n emptyList \n )\n );\n}", "function arrayAsList(inputArray){\n\n return reverseList( \n inputArray.reduce(\n flip(cons),\n emptyList \n )\n );\n}", "function arrayAsList(inputArray){\n\n return reverseList( \n inputArray.reduce(\n flip(cons),\n emptyList \n )\n );\n}", "function arrayAsList(inputArray){\n\n return reverseList( \n inputArray.reduce(\n flip(cons),\n emptyList \n )\n );\n}", "function ex_array2list(array) {\n var list = null;\n for (var i = array.length - 1; i >= 0; i--) {\n list = {\n value: array[i],\n rest: list\n };\n }\n\n return list;\n}", "function arrayToList(array) {\n // Checking whether user has passed a non-empty array as an argument.\n if (!array.length) {\n return {};\n }\n\n // Create a node for the first element of the array.\n let list = {\n value: array[0]\n };\n\n // Base step: `array` only contains a single element.\n // It is both the HEAD & TAIL of the list.\n if (array.length == 1) {\n list.rest = null;\n return list;\n }\n\n // Recursive Step: Create a List with the remaining elements of `array`.\n list.rest = arrayToList(array.slice(1));\n\n return list;\n}", "function arrayToList(array){\n var list = {};\n list.rest = null;\n for (var i = array.length - 1; i >= 0; i--){\n object = {\n value: array[i],\n rest: list.rest\n }\n\n if (i != 0){\n list.rest = object\n } else {\n list.value = array[i]\n }\n }\n return list;\n}", "function arrayToList(arr){\n var head ={ value:arr[0], rest:null};\n temp = head;\n for (i = 1; i < arr.length; i++){\n obj = {value: arr[i], rest:null};\n temp.rest = obj;\n temp = obj;\n }\n return head;\n}", "function arrayToList(input) {\n var list = null;\n for (var count = 0; count < input.length; count++) {\n list = { value: input[i], rest: list };\n }\n return list;\n}", "function reverseArray(arr){\n //your code here\n \n\n\nvar arr2 = [];\nfor(i=0; i<arr.length; i++) {\n\tvar element = arr[i];\n\tarr2.unshift(element);\n }\n return arr2;\n}", "function reverserArr(arr){\n var newArr = []\n for(var i = arr.length-1; i >=0 ;i--){\n newArr.push(arr[i])\n }\n return newArr\n}", "function arrayToList(array) {\n // write a loop that runs as many times as there are elements in the array\n // asign the value of the current item to the value in the array\n // give the last element a rest value of 'null'\n var output = {};\n for (var i = array.length - 1; i >= 0; i--) {\n var outputPrev = output;\n output = {};\n output.value = array[i];\n\n if (i === array.length - 1) {\n output.rest = null;\n } else {\n output.rest = outputPrev;\n }\n }\n return output;\n}", "function reverse(nums){\n let newArr = []\n nums.map(item => newArr.unshift(item))\n return newArr\n }", "function reverseArr(array) {\n\tvar newArr = [];\n for(var i = 0; i < array.length; i++) {\n \tnewArr.unshift(array[i]);\n console.log(newArr);\n }\n return newArr;\n}", "function reverseList(ll) {\n //need to create a variable to hold the previous\n let currNode = ll.head;\n let previous = null;\n //loop throuhg the arr\n while (currNode) {\n //create a variable to hold the next node \n let saveNode = currNode.next;\n //set node.next to previous\n currNode.next = previous;\n //set previous to node\n previous = currNode;\n //set node to save\n currNode = saveNode;\n }\n ll.head = previous;\n return ll;\n}", "function reverseArray2(array) {\n let output = [];\n\n for (let i = array.length - 1; i >= 0; i--) {\n output.push(array[i]);\n }\n return output;\n}", "function reverseInPlace(array) {\n let len = array.length;\n for (let i = len - 1; i >= 0; i -= 1) {\n array.push(array[i]);\n }\n while (len > 0) {\n array.shift();\n len -= 1;\n }\n return array;\n}", "function reversearr(arr){\n // for(var i=0;i<arr.length/2;i++){\n // var temp=arr[i];\n // arr[i]=arr[arr.length-1-i];\n // arr[arr.length-1-i]=temp;\n for(var i=0;i<arr.length;i++){\n arr[i]=arr[i+1];\n \n }\n return arr;\n}", "function reverseArray(array) {\n // Your code here\n var arr1 = [];\n var x = array.length-1;\n\n for(var i = 0; i<array.length; i++){\n arr1[i] = array[x--];\n }\n return arr1;\n }", "function reverseArrayInPlace (arr) {\n\tvar initLen = Math.floor(arr.length / 2),\n\t\tremoveIndex,\n valStore;\n print(\"Number of Iterations: \" + initLen);\n\tfor (var i = 0; i < initLen; i += 1) {\n valStore = arr[i]; // 1\n\t\tarr[i] = arr[arr.length - 1 - i]; // 5 to front\n arr[arr.length - 1 - i] = valStore;\n print(\"current array length: \" + arr.length);\n print(\"Iteration \" + i);\n print(\"Array: \" + arr);\n\t}\n\treturn arr;\n}", "function reverseOrder (array) {\n console.log ('Array before reverse order manipulation: ');\n console.log (array); \n for(let idx = 0; idx < array.length / 2; idx++){\n console.log (\"idx value: \" + idx);\n\n // for each pair, idx positions are generic at\n // array.length-1-idx and idx\n // idx=0 -> array.length-1 and 0\n // idx=1 -> array.length-1-1 and 1\n // idx=2 -> array.length-1-2 and 2\n // swap by holding on value as temp and then shifting\n\n let temp = array[(array.length-1)-idx];\n array[(array.length-1) - idx] = array[idx];\n array[idx] = temp;\n console.log (\"temp:\" + temp);\n }\n console.log ('Array after reverse order manipulation: ');\n // console.log(array);\n return array;\n}", "function reverseArrayInPlace(arr) {\n for (let i = 0; i <= arr.length / 2; i++) {\n let element = arr[i];\n arr[i] = arr[arr.length - 1 - i];\n arr[arr.length - 1 - i] = element;\n }\n return arr;\n}", "function reverseArrayInPlace(el){\n return [...el].map(el.pop, el); //? why the second arg?*\n }", "function reverseArray(arr){\n var newArr = [];\n for(var i=arr.length-1; i>=0; i--){\n newArr += arr;\n }\n return newArr;\n }", "function reverseArray(arr) {\n\n for (var i = 0; i < arr.length/2; i++) {\n \n var temp = arr[i];\n \n arr[i] = arr[arr.length-1 - i]; \n \n arr[arr.length-1 - i] = temp;\n }\n \n return arr;\n }", "function reverseArrayInPlace(array){\n\n let end = array.length - 1;\n let start = 0;\n while(end > start){\n \n let tmp = array[start]\n\n array[start] = array[end]\n array[end] = tmp\n\n end--;\n start++;\n }\n return array;\n}", "function reverseArray(input){\n\tvar output = [];\n\tfor (var i=0; i<input.length; i++){\n\t\toutput.unshift(input[i]);\n\t}\n\treturn output;\n}", "function reverseArray(array) {\n var newArray = [];\n for (var i = 0; i < array.length; i++) {\n newArray.unshift(array[i]); // insert each element at its start\n } \n return newArray;\n}", "function reverseArray(array){\n let array1 = []\n for (let i=array.length - 1;i>=0;i--){\n array1.push(array[i])\n }\n return array1\n}", "reverse(){\n if(this.length < 1) return null;\n let node = this.head; // switches the head and tail\n this.head = this.tail;\n this.tail = node;\n let prev = null; // assigns prev to start as null\n let next;\n for(let i = 0; i < this.length; i++) {\n next = node.next; // updates next up to be the node.next, this is put at the start of the block, to prevent an extra loop\n node.next = prev; // redirects the next pointers to reverse the list.\n prev = node; // updates previous up to be the node\n node = next; // updates node up to be next\n }\n return list;\n }", "function reverse(arr)\n{\n var temp;\n var end=arr.length-1\n for(var i=0; i<arr.length/2; i++)\n {\n \n temp=arr[i];\n arr[i]=arr[end-i];\n arr[end-i]=temp;\n }\n return arr\n}", "function reverseArray(arr) {\n let newArr = [];\n for (item of arr) {\n newArr.unshift(item);\n }\n return newArr;\n}", "function reverseArrayInPlace2(arr){\n for(var i = 0; i < arr.length / 2; i++){\n var tempVar = arr[i];\n arr[i] = arr[arr.length - 1 - i];\n arr[arr.length - 1 - i] = tempVar;\n }\n return arr;\n}", "function reverseArrayInPlace(arr) {\n const newArr = [];\n\n for (let i = 0; i < arr.length; i++) {\n newArr.unshift(arr[i]);\n }\n return console.log(newArr);\n}", "function reverse(list) {\n var t=0;\n j=list.length-1;\n for (let i = 0; i < list.length-1; i++) {\n t = list[j];\n list[j]=list[i];\n list[i]=t;\n j=j-1;\n }\n return list;\n}", "function reverseArrayInPlace(array) {\n for (let i = 0; i < Math.floor(array.length / 2); i++) {\n let old = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = old;\n }\n return array;\n}", "function arrayToList(array) {\n // starting with the first element in the array, make that our first \"value's\" value\n // create an additional rest key who's value is a nested object\n // set a default value for my list\n// let list = null;\n \n// for(let i = array.length - 1; i >= 0; i--) {\n// if(array[i - 1]) {\n// list = {value: array[i -1], rest: list};\n// }\n// }\n// return list;\n// }\n// if there are no eements in the array, return \n// stopping recursing when we have no more element in the array\n// if(!array.length) {\n// return null\n// }\n\n// if(array.length === 1) {\n// return {value: array[0], rest: null}\n// }\n// return {value: array[0], rest: arrayToList(array.slice(1))};\n\n let list = null;\n for (let i = array.length - 1; i >= 0; i--) {\n list = {value: array[i], rest: list};\n }\n return list;\n}", "function reverse(arr) {\n var newarr = [];\n for (i = arr.length-1; i > -1; i--) {\n newarr.push(arr[i]);\n }\n arr = newarr;\n return arr;\n}", "function reverse(arr) {\n for(var i =0; i<arr.length/2;i++){\n temp = arr[i];\n arr[i]= arr[arr.length-1-i];\n arr[arr.length-1-i] = temp;\n }\n return arr;\n}", "function reverseArray(array){\n let temp = 0;\n for(let i = 0; i <= (array.length/2); i++){\n temp = array[i]; // 0 = 1;\n array[i] = array[array.length - 1 - i]; // 1 = arrays length - i, which is 1 = 4\n array[array.length - 1 - i] = temp; // \n console.log(array);\n }\n return array;\n}", "function reverse (arr) {\n if (arr.length === 0) {\n return []\n }\n return [arr.pop(), ...reverse(arr)]\n}", "function arrReverse(arr){\n\tlet temp=[];\n\tfor(let i=arr.length-1; i >=0; i--){\n\t\ttemp.push(arr[i]);\n\t}\n\treturn temp;\n}", "function func12(inputArray){\n var temp=inputArray[0];\n inputArray[0]=inputArray[inputArray.length-1];\n inputArray[inputArray.length-1]=temp;\n return inputArray;\n}", "function fun1(){\nvar arry=[\"abc\",\"def\",\"ghi\"];\ndocument.write(arry);\n\nvar new_arry=arry.reverse()\ndocument.write(\"<br>\");\ndocument.write(new_arry);\n}", "function reverse(arr) {\n var newArr = [];\n\n for (i = 0; i < arr.length; i++) {\n newArr.unshift(arr[i]);\n }\n}", "function reverse(array){\n\tresult =[];\n\tiLen = array.length-1;\n\tarray.forEach(function(item,i){\n\t\tresult[i]=array[iLen-i];\n\t});\n\treturn result;\n}", "function reverseArray(array){\n let newArray=[];\n for(let i=array.lenght -1;i>=0;i--){\n newArray.push(array[i])\n }\n return newArray\n}", "function reverseArrayInPlace(array) {\n for (i = 0; i <= Math.floor(array.length / 2); i++) {\n a = array[i];\n b = array[array.length - 1 - i];\n array[i] = b;\n array[array.length - 1 - i] = a;\n }\n return array;\n}", "function reverseArray1(x) {\n let reverse = [];\n for (let i = x.length-1; i >= 0; i--) {\n reverse.push(x[i]);\n }\n return reverse;\n}", "function reverseArray(arr){\n for(let i = 0; i < Math.floor(arr.length/2); i++){\n let temp = arr[i]\n arr[i] = arr[arr.length - 1 - i]\n arr[arr.length - 1 - i] = temp\n }\n return arr\n}", "function listToArray() {\n\n}", "function mirrorArray(array) {\n let newArray = array.slice(0, array.length);\n\n for (let i = array.length - 1; i >= 0; i -= 1) {\n let el = array[i];\n newArray.push(el);\n }\n\n return newArray;\n}", "function reverse(arr) {\n for(var i = 0; i < arr.length/2; i++) {\n var temp = arr[i];\n arr[i] = arr[arr.length - 1 - i];\n arr[arr.length - 1 - i] = temp;\n }\n return arr;\n}", "function reverseArray(array){\n newArray = []\n while (array.length > 0){\n newArray.push(array.pop())\n }\n return newArray\n}", "function mirroredArray(arr) {\n return arr.concat([].concat(arr).reverse());\n}", "function f3(arr) {\n // return [...arr].concat(arr.reverse());\n return arr.concat(arr.slice().reverse());\n}", "function reverseArray(arr){\n var temp = 0\n for(i = 0; i < Math.floor(arr.length/2); i++){\n temp = arr[arr.length-i-1];\n arr[arr.length-i-1] = arr[i];\n arr[i] = temp;\n }\n return arr;\n}", "function reverseList(list) {\n let buf = [];\n\n for (let n = list; n != null; n = n.next) {\n buf.push(n.data);\n }\n\n return revArrayToList(buf);\n}", "function reverseArray(input_arr) {\n // Your code here\n var new_arr = [];\n for (var i = input_arr.length; i > 0; --i) {\n new_arr.push(input_arr[i - 1]);\n }\n return new_arr;\n}", "function Reverse (arr){\n let newarr = []\n for (let i = arr.length -1; i >= 0; i--){\n newarr.push(arr[i])\n } \n return newarr\n}", "function reverse (arr) {\n newArr = []\n for (var i = arr.length - 1; i >= 0; --i){\n newArr.push(arr[i])\n }\n return newArr\n}", "function reverseArrayInPlace(array) {\n for (let i = 0; i < Math.floor(array.length/2); i++) {\n let oldIndexValue = array[i];\n array[i] = array[(array.length - 1) - i];\n array[(array.length - 1) - i] = oldIndexValue;\n } \n return array;\n}", "function reverseArray(arr) {\n for (var i = 0; i <= (arr.length / 2); i++) {\n var temp = arr[i];\n arr[i] = arr[arr.length - 1 - i];\n arr[arr.length - 1 - i] = temp;\n }\n return arr;\n}", "function reverseArrayPlain(arr) {\n\n var swap;\n\n window.performance.mark('pStart');\n\n for (var i = 0; i < arr.length / 2; i++) {\n swap = arr[i];\n arr[i] = arr[arr.length - i];\n arr[arr.length - i] = swap;\n }\n\n window.performance.mark('pEnd');\n console.log(\"reverseArrayPlain done!\");\n\n }", "function reverseArray(arr){\n var arrRev = []\n for(var i=0; i<arr.length;i++){\n arrRev.unshift(arr[i]);\n };\n console.log(arrRev);\n}", "function reverse(arr) {\n if (arr.length <= 1) return arr;\n for (let idx = 0; idx <= Math.floor(arr.length / 2) - 1; idx++) {\n [arr[idx], arr[arr.length - 1 - idx]] =\n [arr[arr.length - 1 - idx], arr[idx]];\n }\n return arr;\n}", "function reverseArray(array) {\n // Your code here\n let newArr = [];\n for (let i = 0; i < array.length; i++) {\n newArr.push(array[array.length - i - 1]);\n }\n return newArr;\n}", "function reverseInPlace(arr) {\n\tlet p1 = 0;\n\tlet p2 = arr.length - 1;\n\n\twhile (p1 < p2) {\n\t\t[arr[p1], arr[p2]] = [arr[p2], arr[p1]];\n\t\tp1++;\n\t\tp2--;\n\t}\n\treturn arr;\n}" ]
[ "0.7525814", "0.74638516", "0.7239143", "0.7234324", "0.7216905", "0.7145329", "0.7142038", "0.7064695", "0.70497984", "0.70473033", "0.70433974", "0.7032031", "0.69376284", "0.6856255", "0.68446505", "0.6816118", "0.6728805", "0.6721094", "0.6690347", "0.6653071", "0.65941507", "0.65358263", "0.6531458", "0.6531124", "0.6531124", "0.6531124", "0.6531124", "0.6531124", "0.6531124", "0.6531124", "0.6531124", "0.6531124", "0.6531124", "0.6531124", "0.6531124", "0.6531124", "0.65137404", "0.6458551", "0.64040077", "0.6382113", "0.6379026", "0.63577616", "0.63372725", "0.63211817", "0.630292", "0.63018435", "0.62937117", "0.6269455", "0.61905986", "0.6178008", "0.6149983", "0.61245596", "0.61125857", "0.6108284", "0.61068964", "0.6094387", "0.6089074", "0.6086879", "0.6066873", "0.60451216", "0.6044084", "0.6034075", "0.6033532", "0.6032377", "0.6025125", "0.6021263", "0.60174716", "0.6009806", "0.6003137", "0.59900874", "0.59789056", "0.59789044", "0.59728926", "0.59717345", "0.5966016", "0.59638745", "0.59621173", "0.5958629", "0.59576035", "0.5950632", "0.5948099", "0.59459245", "0.59439623", "0.59406817", "0.5938812", "0.5936808", "0.5934488", "0.5932052", "0.5928313", "0.592722", "0.5922872", "0.5918245", "0.5917298", "0.5916682", "0.59142464", "0.5912844", "0.5912151", "0.5911708", "0.5906503", "0.590175" ]
0.74151886
2
function that checks if clicked on the boardmaker
function checkIn(i,j){ g_checker = true; var index = document.getElementsByClassName('row-'+i)[0].children[j]; g_newBoard[i][j] += 1; if(g_newBoard[i][j] > 3){ index.setAttribute("style", "background-color:white;"); g_newBoard[i][j] = 0; } if(g_newBoard[i][j] === 3){ index.setAttribute("style", "background-color:#D79922;"); } if(g_newBoard[i][j] === 1){ index.setAttribute("style", "background-color:#4056A1;"); } if(g_newBoard[i][j] === 2){ index.setAttribute("style", "background-color:#F13C20;"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkVictoryClick() {\n\t// Dazu muss die gesamte Matrix durchlaufen werden\n\tfor(var i = 0; i < arrayDimensionLine; i++) {\n\t\tfor(var j = 0; j < arrayDimensionColumn; j++) {\n\t\t\t// Und fuer jede Zelle muss geprueft werden, ob sie auf der Map ist\n\t\t\tif(hexatileOnMap(i,j))\n\t\t\t\t// Dann wird geprueft, ob diese Zelle noch verdeckt und keine Mine ist\n\t\t\t\tif(!gameField[i][j].isOpen && !gameField[i][j].isMine)\n\t\t\t\t\t// in diesem Fall hat man noch nicht durch aufdecken aller leeren Felder gewonnen\n\t\t\t\t\treturn false;\n\t\t}\n\t}\n\n\t// An dieser Stelle ist klar, dass alle leeren Felder aufgedeckt wurden \n\treturn true;\n}", "function checkClicked() {\n \n}", "function Clicked(CellClicked){ \n if (typeof originalBoard[CellClicked.target.id]=='number'){\n if(PlayerDecide%2==1) {\n Show(CellClicked.target.id,FirstPlayer);\n PlayerDecide=PlayerDecide+1;\n }\n else { \n Show(CellClicked.target.id,SecondPlayer);\n PlayerDecide=PlayerDecide+1;\n }\n }\n}", "function onCanvasClick(event) {\n let x = event.offsetX;\n let y = event.offsetY;\n var pos = getPosition(x, y);\n var valid = gameBoard.handleClick(pos.x, pos.y);\n if (valid == -1) {\n return;\n }\n updateBoard();\n var result = gameBoard.checkWin(\"b\");\n if(result == -1) {\n return;\n }\n else if (result == \"w\") {\n console.log(\"White wins!\");\n }\n else if (result == \"b\") {\n console.log(\"Black wins!\");\n }\n}", "function boardClick(event) {\n clearSpaces();\n var destCol = Math.floor((event.pageX - document.getElementById(clickedCheckerId).parentElement.offsetLeft) / 50);\n var destRow = Math.floor((event.pageY - document.getElementById(clickedCheckerId).parentElement.offsetTop) / 50);\n if ((clickedCheckerId != null) && isLegalMove(destRow, destCol, clickedCheckerId, currentColor)) {\n event.preventDefault();\n if (Math.abs(destRow - srcRow) == 1) {\n makeSimpleMove(destRow, destCol, clickedCheckerId);\n }\n else if (Math.abs(destRow - srcRow) == 2) {\n makeJumpMove(destRow, destCol, clickedCheckerId, currentColor);\n }\n if (((destRow == 7) || (destRow == 0)) && (!isAKing(clickedCheckerId))) {\n kingAPiece(destRow, destCol, clickedCheckerId);\n }\n var winner = checkForWinner();\n var previousBoard = document.getElementById(\"boardInput\").value;\n document.getElementById(\"boardInput\").value = getBoard();\n //topLeftToRight(previousBoard, document.getElementById(\"boardInput\").value);\n if (findIfChecked()) {\n getComputersMove();\n }\n }\n\n clickedCheckerId = null;\n}", "function onBoardClick() {\n if (!hasStarted) {\n startGame();\n } else {\n startPause();\n }\n }", "function cellsClicked(e) {\n if (gameOver == true) {\n clearBoard();\n return;\n } else if (event.target.textContent) {\n messageBox.textContent = \"That square is already taken!\";\n return;\n }\n if (playersTurn % 2 == 0) {\n e.target.textContent = ' X ';\n } else {\n e.target.textContent = ' 0 ';\n }\n //Run the function to check who turn it is every click\n checkPlayersTurn();\n //Run function to check if their is a winner every click\n checkWinner();\n}", "handleBoardClick(owner, event) {\n if (this.container.getAttribute('data-focus') !== owner) return;//if the container does not match the owner parameter, end the function\n\n event.cell.children[0].disabled = true;//make it so we can't click on this square again\n if (owner === 'opponent') this.checkOffenceResult(event);\n else {\n this.turn('opponent');\n this.checkWin('player');\n }\n }", "function clickedEl(event) {\n //while (board != null) {\n \n if (event.target.id === 'board0') {\n index = 0;\n }\n else if (event.target.id === 'board1') {\n index = 1;\n }\n else if (event.target.id === 'board2') {\n index = 2;\n }\n else if (event.target.id === 'board3') {\n index = 3;\n }\n else if (event.target.id === 'board4') {\n index = 4;\n }\n else if (event.target.id === 'board5') {\n index = 5;\n }\n else if (event.target.id === 'board6') {\n index = 6;\n }\n else if (event.target.id === 'board7') {\n index = 7;\n }\n else if (event.target.id === 'board8') {\n index = 8;\n }\n }", "function clickCheck() {\r\n\t//if user has completed their entry, deactivates buttons and calls compare()\r\n\tif (userClicks.length === playList.length) { colorsActive = false; compare(); }\r\n}", "function onClick() { //This function is called on row 194\n if (!(event.target.classList.contains('clicked'))) {\n if (player1.classList.contains('active')) {\n event.target.classList.add('box-filled-1');\n event.target.classList.add('clicked');\n player1Moves.push(event.target.id);\n checkForActive(player1, player2);\n checkForWin(player1Moves);\n } else if (blockXMoves()) {\n event.target.classList.add('box-filled-2');\n event.target.classList.add('clicked');\n player2Moves.push(event.target.id);\n player2Selections.push(event.target);\n checkForActive(player2, player1);\n checkForWin(player2Moves);\n }\n }\n}", "function registerClick(boardClicked) {\n\n var answer = sequence[this.activeIndex];\n \n if (boardClicked == answer)\n {\n this.activeIndex++;\n checkEnd();\n }\n\n //if its not correct\n else {\n\n lockBoard();\n gameOver();\n }\n}", "function respondToBoardClick(event) {\n clickLocation = event.target.dataset.location;\n\n if (isValidMove()) {\n currentBoardArray[blankIndex] = currentBoardArray[clickLocation];\n currentBoardArray[clickLocation] = \"\";\n updateUI(clickLocation, blankIndex);\n checkForWinner();\n blankIndex = clickLocation;\n }\n }", "function CheckClick () {\n\tif((Input.GetMouseButtonDown(1) || Input.GetKeyDown(playerData.keySettings[14])) && currentHealths[1] >= 1)\t{\n\t\t//if((Input.mousePosition.y < Camera.main.pixelHeight - playerData.topScrollPadding) && (Input.mousePosition.y > playerData.botScrollPadding))\n\t\tif(minimap.pixelRect.Contains(Input.mousePosition)) {\n\t\t\tPlayerTarget(minimap);\n\t\t}\n\t\telse {\n\t\t\tPlayerTarget(Camera.main);\n\t\t}\n\t}\n}", "function mouseClicked() {\n // If it has been clicked return true\n return true;\n }", "function checkClick(tile) {\n\tif (tile.type === 0) {\n\t\trevealTile(tile)\n\t\trevealBlanks(tile) \n\t} else if (tile.type > 0) \n\t\trevealTile(tile)\n\telse {\n\t\trevealMines(tile)\n\t\tdisplayLose(tile)\n\t}\n}", "function click(cell, col){\n //console.log(\"clicked cell # \"+cell.id);\n if(cell.hasValue)\n {\n alert(\"Cannot click here.\");\n return;\n }\n\n if(playerRed==true) //player red\n {\n\n let cellSelected=selectCell(cell, col); //finds next available cell at bottom of column and adds emoji to the board\n\n if(winChoice())\n {\n printWinner();\n return;\n }\n }\n else //player yellow\n {\n let cellSelected=selectCell(cell, col);\n\n if(winChoice())\n {\n printWinner();\n return;\n }\n }\n switchPlayer();\n}", "function clickBoard() {\n var board = document.querySelector(\"#board\");\n board.classList.add(\"clicky\");\n }", "function give_up(){\n // if button on line \n}", "function checkPieceClicked(){\n var i;\n var piece;\n for(i = 0; i < _pieces.length; i ++){\n piece = _pieces[i];\n if(_mouse.x < piece.xPos || _mouse.x > (piece.xPos + _pieceWidth) || _mouse.y < piece.yPos || _mouse.y > (piece.yPos + _pieceHeight)){\n // This Piece is not selected \n }else{\n return piece;\n }\n }\n return null;\n}", "function checkRedPressed() {\n isRedElementClicked = true;\n}", "function checkClick(cell){\n if(!cell.textContent && gameStarted){\n if(playerTurn){\n cell.textContent = 'X';\n checkforWinner();\n playerTurn = false; //Changes variable to check if it's the player's turn\n status.textContent = `Player O's turn`;\n if(!gameOver){\n computerPicks();\n }\n }else{ //otherwise it's the computer's turn\n cell.textContent = 'O'\n checkforWinner();\n playerTurn = true;\n status.textContent = `Player X's turn`;\n }\n }else if(gameStarted == false){\n alert('Please press Start')\n }else{ //if a cell with a value is being clicked on\n blink(cell);\n status.textContent = `Please select an empty cell`;\n }\n}", "function win(clicked) {\n // Get all cell classes\n // var memberOf = clicked.className.split(/\\s+/);\n // for (var i = 0; i < memberOf.length; i++) {\n // var testClass = '.' + memberOf[i];\n // var items = contains('#tictactoe ' + testClass, turn);\n // // winning condition: turn == N_SIZE\n // if (items.length == N_SIZE) {\n // return true;\n // }\n // }\n return false;\n}", "function clickCell(x,y) {\n if (grid[x][y]>0) {\n alert(\"Dont Try To Cheat Bud!!!!!\");\n } \n\n\n// Clicking Of Boxes\n else {\n if (currentPlayer==1) {\n document.getElementById(\"cell_\"+x+\"_\"+y).style.color=\"#3F88C5\";\n document.getElementById(\"cell_\"+x+\"_\"+y).innerHTML=\"X\";\n grid[x][y]=1;\n currentPlayer=2;\n } else {\n document.getElementById(\"cell_\"+x+\"_\"+y).style.color=\"#E2C290\";\n document.getElementById(\"cell_\"+x+\"_\"+y).innerHTML=\"O\";\n grid[x][y]=2;\n currentPlayer=1;\n }\n }\n}", "function win(clicked) {\r\n var clickFunction = clicked.className.split(/\\s+/);\r\n\r\n for (var i = 0; i < clickFunction.length; i++) {\r\n var winTest = '.' + clickFunction[i];\r\n var items = contains('#tictactoe ' + winTest, turn);\r\n\r\n if (items.length == BoardSize) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function onClick(click) {\n // if there's a winner, do nothing except alert\n if (gameBoard.gameOver === true) {\n alert(\"Game is over, silly! Restart the game!\")\n } else {\n // gets the locations of gameboard.boxes in html & makesMove in the innerText\n const box = click.target\n if (box.innerText === \"\") {\n makeMove(box)\n }\n }\n}", "function click() {\n\t// If clicking on a cell with your piece in it, highlight the cell\n\tif (!selectedBox) { // 1st click\n\t\tif ((!blueTurn && this.hasClassName(\"red\")) || (blueTurn && this.hasClassName(\"blue\"))) {\n\t\t\tthis.addClassName(\"selected\");\n\t\t\tselectedBox = this;\n\t\t}\n\t}\n\t\n\t// Player is trying to move a piece\n\telse { // 2nd click\n\t\tselectedBox.removeClassName(\"selected\");\n\t\tthis.onmouseout();\n\t\t\n\t\t// If there are forced jumps and player is not jumping, highlight forced jumps\n\t\tif (forcedJumps != false) {\n\t\t\tif (!jump(this)) {\n\t\t\t\thighlightForcedJumps(forcedJumps);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Try moving, then try jumping\n\t\telse if (!move(this))\n\t\t\tjump(this);\n\t\t\t\n\t\tselectedBox = null;\n\t\tcheckVictory();\n\t}\n}", "function getUserClickOnBoard(e) {\n if (!game) {\n var boundary = canvas.getBoundingClientRect();\n board.changeSquarePixels(e.clientX - boundary.left, e.clientY - boundary.top);\n }\n}", "clickTile(row, col, button){\n //If left mouse button\n if (button == 0){\n if(this.grid[row][col].isBomb && !this.grid[row][col].isFlagged){\n this.grid[row][col].isTrigger = true;\n this.gameOver = true;\n this.drawSmiley(this.smileyCtx, 'dead')\n }\n this.revealTile(row, col);\n\n } else if(button == 2 && !this.grid[row][col].isRevealed){\n this.flagTile(row,col);\n\n }\n if (this.gameWon()){\n this.gameOver = true;\n this.draw();\n this.drawSmiley(this.smileyCtx, 'shades');\n return true;\n }\n this.draw();\n this.drawBombsLeft();\n return false;\n }", "function handleClick(i){\n //making a copy of the current status of the board\n const boardCopy = [...board];\n // If user click an occupied square or if game is won, return\n if (winner || boardCopy[i]) return;\n // Put an X or an O in the clicked square\n boardCopy[i] = xIsNext ? \"Gray Cat\" : \"White Cat\";\n setBoard(boardCopy);\n setXisNext(!xIsNext);\n }", "function click(e)\n{\n\tvar pos = findPos(this);\n\txCord = findCord(e.pageX - pos.x);\n\tyCord = findCord(e.pageY - pos.y);\n\n\t//checks to make sure click was on the board\n\tif (xCord + 1 && yCord + 1) {\n\t\t//checks to make sure a piece isn't covering up another\n\t\tif (validMove(xCord, yCord)) {\n\t\t\tif (xTurn) {\n\t\t\t\txArray[xArray.length] = [xCord, yCord];\n\t\t\t}\n\t\t\telse {\n\t\t\t\toArray[oArray.length] = [xCord, yCord];\n\t\t\t}\n\t\t\txTurn = !xTurn;\n\t\t\tdrawXandOs();\n\t\t}\n\t}\n}", "clicked(x, y) {}", "function isValidClick(numberOnCell) {\n var emptyRow = getRowNumber(NUMBER_ON_EMPTY_CELL), emptyCol = getColumnNumber(NUMBER_ON_EMPTY_CELL);\n var clickRow = getRowNumber(numberOnCell), clickCol = getColumnNumber(numberOnCell);\n // console.log(\"number on cell: \" + numberOnCell + \", erow: \" + emptyRow + \", ecol: \" + emptyCol + \", cRow: \" + clickRow + \", cCol: \" + clickCol);\n return (emptyRow == clickRow) || (emptyCol == clickCol);\n }", "function humanClicked(event)\n{\n if( origBoard[event.target.id] !== 'O' && origBoard[event.target.id] !== 'X' )\n {\n var status = gameAdvance(event.target.id,human);\n if(status==0 && !checkTie())\n {\n gameAdvance(bestSpot(),computer);\n }\n }\n}", "function cellClick(cells){\n console.log('clicked'+cells.target.id);\n var cellid;\n if(isChallenge){\ncellid=cells.target.id.substr(5);\n }else{\n cellid=cells.target.id;\n }\n if(typeof boardList[cellid]=='number'){\n Currcell=cellid;\n if(emptycells().length==boardSize){\n startTimer();\n }\n gameTurn(cellid,currPlayer);\n if(($(\".endgame\").css('display')=='none')){\n if(!checkDraw()){\n if($(\".endgame\").css('display')=='none'){\n if(isTwoMode){\n if(currPlayer==player){\n currPlayer=secondPlayer;\n }else{\n currPlayer=player;\n } \n }else{\n gameTurn(bestMove(),computer);\n if(emptycells().length==0&&($(\".endgame\").css('display')=='none')){\n checkDraw();\n }\n \n } \n }\n }\n } \n } \n}", "function notifyClick(event) {\n var $cell = $(this);\n var numberOnCell = parseInt($cell.text(), 10);\n\n // Ignore the invalid click\n if(! isValidClick(numberOnCell))\n return;\n\n // Move the cells\n moveCell(getRowNumber(numberOnCell), getColumnNumber(numberOnCell));\n var isBoardSolved = isSolvedFn();\n\n if(isBoardSolved) {\n if (confirm('Yay! You solved the puzzle. \\n Want to play another game?')) {\n initializeboard();\n drawBoard();\n } else {\n return;\n }\n }\n\n }", "function isHowToClicked(x,y) {\n return x >= buttonX - buttonWidth/2 &&\n x <= buttonX + buttonWidth/2 &&\n y >= buttonY - buttonHeight/2 &&\n y <= buttonY + buttonHeight/2;\n\n}", "handleClick(colID) {\n //this only works when the game is still going and no one has won \n if(this.state.winner === ''){\n this.makeMove(colID)\n }\n }", "clickedOn(xPos, yPos) {\n return(xPos > this.x && xPos < this.x + this.w && yPos > this.y && yPos < this.y +this.w);\n }", "function listenForClick() {\n loopThroughGrid();\n clickTurnBtn();\n }", "function boardWin() {\r\n}", "function canvasClickEvent(e){\n\t\t\tvar mouseX = $(this).offset().left, mouseY = $(this).offset().top;\n\t\t\tconsole.log(\"clicked the canvas\");\n\t\t\tswitch(Math.floor((e.pageX - mouseX)/(this.width/5)%5)){\n\t\t\tcase 0:\n\t\t\t\t$(\"#holdbutton_1\").trigger(\"click\");\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\t$(\"#holdbutton_2\").trigger(\"click\");\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$(\"#holdbutton_3\").trigger(\"click\");\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$(\"#holdbutton_4\").trigger(\"click\");\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t$(\"#holdbutton_5\").trigger(\"click\");\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tconsole.log(\"error didn't detect where the click came from\");\n\t\t\t\tbreak\n\t\t\t}\n\t\t\treturn false;\n\t}", "function clickEvent(){ \r\n const execCode = new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnDoublePickTrigger, (event) => {\r\n if(event.meshUnderPointer.value === null ){\r\n console.log(board.indexOf(event.meshUnderPointer));\r\n if(canPlay){ \r\n if (turn){\r\n event.meshUnderPointer.value = 'x';\r\n makeX(event.meshUnderPointer); \r\n win();\r\n }else{\r\n event.meshUnderPointer.value = 'o';\r\n makeO(event.meshUnderPointer);\r\n win();\r\n }\r\n }\r\n }\r\n });\r\n return execCode;\r\n }", "function turnClick(cell) {\n if (typeof origBoard[cell.target.id] == \"number\") {\n turn(cell.target.id, human);\n if (!checkWin(origBoard, human) && !checkTie()) turn(bestSpot(), com);\n }\n}", "BoardClick (nn, bb)\r\n {//style\r\n //nn = 0..63\r\n\r\n try\r\n {\r\n let ii0, jj0, ii1, jj1, mm, nnn, vv, ffull, ssearch, llst, ttmp, mmove0;\r\n let pp, ffst = 0, ssub;\r\n\r\n if (this.isSetupBoard) { this.SetupBoardClick(nn); return; }\r\n\r\n if (!this.isRecording) return;\r\n //if (this.isAutoPlay)\r\n this.SetAutoPlay(false);//TODO: to remove if, let just SetAutoPlay\r\n if (this.MoveCount == this.MaxMove) return;\r\n if (this.BoardClickMove (nn)) return;\r\n if (this.isDragDrop && (!bb)) return; //TODO: don't allow first click while drag & drop?\r\n\r\n //TODO: no need to check, there are only IDs now, no more indexes\r\n /*if (isRotated) nnn = 63 - nn;\r\n else */ nnn = nn;\r\n\r\n if (this.BoardClicked == nnn) { this.SetBoardClicked(-1); return; } //same pozition, reset and do nothing\r\n\r\n if (this.BoardClicked < 0) //click from\r\n {\r\n ii0 = nnn % 8;\r\n jj0 = 7 - (nnn - ii0) / 8;\r\n if (Math.sign(this.Board[ii0][jj0]) == 0) return;\r\n if (Math.sign(this.Board[ii0][jj0]) != ((this.MoveCount + 1) % 2) * 2 - 1)\r\n {\r\n mm=\"---\";\r\n if ((this.xdocument.BoardForm)&&(this.xdocument.BoardForm.PgnMoveText))\r\n this.ShortPgnMoveText[0][this.CurVar]=this.Uncomment(this.xdocument.BoardForm.PgnMoveText.value);\r\n ssearch=Math.floor(this.MoveCount/2+1)+\".\";\r\n ffst=this.ShortPgnMoveText[0][this.CurVar].indexOf(ssearch);\r\n if (ffst>=0)\r\n ssub=this.ShortPgnMoveText[0][this.CurVar].substring(0, ffst);\r\n else\r\n ssub=this.ShortPgnMoveText[0][this.CurVar];\r\n if (this.ParseMove(mm, false)==0) { this.SetBoardClicked(-1); return; } //TODO: throws error\r\n if (!isNullMove) return;\r\n if (this.MoveCount%2==0) { if (!confirm(\"White nullmove?\")) return; }\r\n else { if (!confirm(\"Black nullmove?\")) return; }\r\n for (vv=this.CurVar; vv<this.ShortPgnMoveText[0].length; vv++)\r\n {\r\n if ((vv==this.CurVar)||((this.ShortPgnMoveText[1][vv]==this.CurVar)&&(this.ShortPgnMoveText[2][vv]==this.MoveCount)))\r\n {\r\n ffull=this.Uncomment(this.ShortPgnMoveText[0][vv]);\r\n ssearch=Math.floor(this.MoveCount/2+2)+\".\";\r\n llst=ffull.indexOf(ssearch);\r\n ssearch=Math.floor(this.MoveCount/2+1)+\".\";\r\n ffst=ffull.indexOf(ssearch);\r\n if (ffst>=0)\r\n {\r\n ffst+=ssearch.length;\r\n if (llst<0) ttmp=ffull.substring(ffst);\r\n else ttmp=ffull.substring(ffst, llst);\r\n mmove0=this.GetMove(ttmp,this.MoveType);\r\n if ((mmove0.indexOf(mm)<0)&&(this.MoveType==1))\r\n {\r\n ttmp=Math.floor(this.MoveCount/2+1);\r\n ssearch=ttmp+\"....\";\r\n ffst=ffull.indexOf(ssearch);\r\n if (ffst < 0) { ssearch = ttmp + \". ...\"; ffst = ffull.indexOf (ssearch); }//TODO: isn't regex much better here?\r\n if (ffst < 0) { ssearch = ttmp + \". ..\"; ffst = ffull.indexOf (ssearch); }\r\n if (ffst < 0) { ssearch = ttmp + \" ...\"; ffst = ffull.indexOf (ssearch); }\r\n if (ffst < 0) { ssearch = ttmp + \"...\" ; ffst = ffull.indexOf (ssearch); }\r\n if (ffst < 0) { ssearch = ttmp + \" ..\" ; ffst = ffull.indexOf (ssearch); }\r\n if (ffst >= 0)\r\n {\r\n ffst+=ssearch.length;\r\n if (llst<0) ttmp=ffull.substring(ffst);\r\n else ttmp=ffull.substring(ffst, llst);\r\n mmove0=this.GetMove(ttmp,0);\r\n }\r\n }\r\n if (mmove0.indexOf(mm)==0)\r\n {\r\n this.SetMove(this.MoveCount+1, vv);\r\n vv=this.ShortPgnMoveText[0].length+1;\r\n //if (window.UserMove) setTimeout(\"UserMove(1,'\"+mmove0+\"')\",this.Delay/2, this); //TODO: review and remove\r\n }\r\n }\r\n }\r\n }\r\n if (vv<this.ShortPgnMoveText[0].length+1)\r\n {\r\n if ((this.RecordCount==0)&&(!((this.xdocument.BoardForm)&&(this.xdocument.BoardForm.PgnMoveText))))\r\n {\r\n vv=this.ShortPgnMoveText[0].length;\r\n this.ShortPgnMoveText[0][vv]=\"\";\r\n this.ShortPgnMoveText[1][vv]=this.CurVar;\r\n this.ShortPgnMoveText[2][vv]=this.MoveCount;\r\n this.CurVar=vv;\r\n }\r\n this.ParseMove(mm,true);\r\n //if (window.UserMove) setTimeout(\"UserMove(0,'\"+mm+\"')\",this.Delay/2, this); //TODO: review and remove\r\n if (this.MoveType==0)\r\n {\r\n this.HistMove[this.MoveCount-this.StartMove]=Math.floor((this.MoveCount+2)/2)+\".\"+mm;\r\n ssub+=Math.floor((this.MoveCount+2)/2)+\".\";\r\n }\r\n else\r\n {\r\n this.HistMove[this.MoveCount-this.StartMove]=Math.floor((this.MoveCount+2)/2)+\". ... \"+mm;\r\n if (this.MoveCount==this.StartMove) ssub+=Math.floor((this.MoveCount+2)/2)+\". ... \";\r\n else ssub+=this.HistMove[this.MoveCount-this.StartMove-1]+\" \";\r\n }\r\n if (this.RecordCount==0) this.RecordedMoves=this.HistMove[this.MoveCount-this.StartMove];\r\n else\r\n {\r\n ttmp=this.RecordedMoves.split(\" \");\r\n ttmp.length=this.RecordCount+((this.MoveCount-this.RecordCount)%2)*2;\r\n this.RecordedMoves=ttmp.join(\" \");\r\n if (this.MoveType==0) this.RecordedMoves+=\" \"+this.HistMove[this.MoveCount-this.StartMove];\r\n else this.RecordedMoves+=\" \"+mm;\r\n }\r\n this.RecordCount++;\r\n this.MoveCount++;\r\n this.MoveType=1-this.MoveType;\r\n if (this.xdocument.BoardForm)\r\n {\r\n if (this.xdocument.BoardForm.PgnMoveText) this.xdocument.BoardForm.PgnMoveText.value=ssub+mm+\" \";\r\n if (this.xdocument.BoardForm.Position)\r\n this.xdocument.BoardForm.Position.value=this.TransformSAN(this.HistMove[this.MoveCount-this.StartMove-1]);\r\n this.NewCommands.length=0;\r\n this.ExecCommands();\r\n this.RefreshBoard(); //TODO: what this does?\r\n }\r\n }\r\n }\r\n this.SetBoardClicked(nnn);\r\n return;\r\n } // this.BoardClicked < 0 => click from\r\n ii0=this.BoardClicked%8;\r\n jj0=7-(this.BoardClicked-ii0)/8;\r\n ii1=nnn%8;\r\n jj1=7-(nnn-ii1)/8;\r\n if (Math.abs(this.Board[ii0][jj0])==6)\r\n {\r\n if (ii0!=ii1) mm=String.fromCharCode(ii0+97)+\"x\";\r\n else mm=\"\";\r\n }\r\n else\r\n {\r\n mm=this.PieceName.charAt(Math.abs(this.Board[ii0][jj0])-1);\r\n if (this.Board[ii1][jj1]!=0) mm+=\"x\";\r\n }\r\n this.SetBoardClicked(-1);\r\n mm+=String.fromCharCode(ii1+97)+(jj1+1);\r\n if (Math.abs(this.Board[ii0][jj0])==1)\r\n {\r\n if (this.Piece[this.MoveType][0].Pos.Y==jj1)\r\n {\r\n if (this.Piece[this.MoveType][0].Pos.X+2==ii1) mm=\"O-O\";\r\n if (this.Piece[this.MoveType][0].Pos.X-2==ii1) mm=\"O-O-O\";\r\n if (this.Board[ii1][jj1]==(1-2*this.MoveType)*3) //for Chess960\r\n {\r\n if (ii1>ii0) mm=\"O-O\";\r\n if (ii1<ii0) mm=\"O-O-O\";\r\n }\r\n }\r\n }\r\n if ((this.xdocument.BoardForm)&&(this.xdocument.BoardForm.PgnMoveText))\r\n this.ShortPgnMoveText[0][this.CurVar]=this.Uncomment(this.xdocument.BoardForm.PgnMoveText.value);\r\n ssearch=Math.floor(this.MoveCount/2+1)+\".\";\r\n ffst=this.ShortPgnMoveText[0][this.CurVar].indexOf(ssearch);\r\n if (ffst>=0)\r\n ssub=this.ShortPgnMoveText[0][this.CurVar].substring(0, ffst);\r\n else\r\n ssub=this.ShortPgnMoveText[0][this.CurVar];\r\n if ((jj1==(1-this.MoveType)*7)&&(Math.abs(this.Board[ii0][jj0])==6)&&(Math.abs(jj0-jj1)<=1)&&(Math.abs(ii0-ii1)<=1))\r\n {\r\n pp=0;\r\n while(pp==0)\r\n {\r\n if (pp==0) { if (confirm(\"Queen \"+this.PieceName.charAt(1)+\" ?\")) pp=1; }\r\n if (pp==0) { if (confirm(\"Rook \"+this.PieceName.charAt(2)+\" ?\")) pp=2; }\r\n if (pp==0) { if (confirm(\"Bishop \"+this.PieceName.charAt(3)+\" ?\")) pp=3; }\r\n if (pp==0) { if (confirm(\"Knight \"+this.PieceName.charAt(4)+\" ?\")) pp=4; }\r\n }\r\n mm=mm+\"=\"+this.PieceName.charAt(pp);\r\n }\r\n pp=this.ParseMove(mm, false);\r\n if (pp==0) return;\r\n if (Math.abs(this.Board[ii0][jj0])!=1)\r\n {\r\n let mmm;\r\n if (Math.abs(this.Board[ii0][jj0])==6)\r\n {\r\n if (mm.charAt(1)==\"x\") mmm=mm.substr(0,1)+(jj0+1)+mm.substr(1,11);\r\n else mmm=String.fromCharCode(ii0+97)+(jj0+1)+mm;\r\n }\r\n else mmm=mm.substr(0,1)+String.fromCharCode(ii0+97)+(jj0+1)+mm.substr(1,11);\r\n if (this.ParseMove(mmm, false)==0) return;\r\n }\r\n if (pp > 1)\r\n {\r\n mm = mm.substr(0, 1) + String.fromCharCode (ii0 + 97) + mm.substr(1, 11);\r\n if (this.ParseMove(mm, false) != 1)\r\n {\r\n mm=mm.substr(0,1)+(jj0+1)+mm.substr(2,11);\r\n if (this.ParseMove(mm, false)!=1)\r\n mm=mm.substr(0,1)+String.fromCharCode(ii0+97)+(jj0+1)+mm.substr(2,11);\r\n }\r\n }\r\n for (vv = this.CurVar; vv<this.ShortPgnMoveText[0].length; vv++)\r\n {\r\n if ((vv==this.CurVar)||((this.ShortPgnMoveText[1][vv]==this.CurVar)&&(this.ShortPgnMoveText[2][vv]==this.MoveCount)))\r\n {\r\n ffull=this.Uncomment(this.ShortPgnMoveText[0][vv]);\r\n ssearch=Math.floor(this.MoveCount/2+2)+\".\";\r\n llst=ffull.indexOf(ssearch);\r\n ssearch=Math.floor(this.MoveCount/2+1)+\".\";\r\n ffst=ffull.indexOf(ssearch);\r\n if (ffst>=0)\r\n {\r\n ffst += ssearch.length;\r\n if (llst<0)\r\n ttmp=ffull.substring(ffst);\r\n else\r\n ttmp=ffull.substring(ffst, llst);\r\n mmove0=this.GetMove(ttmp,this.MoveType);\r\n if ((mmove0.indexOf(mm)<0)&&(this.MoveType==1))\r\n {\r\n ttmp=Math.floor(this.MoveCount/2+1);\r\n ssearch = ttmp + \"....\";\r\n ffst=ffull.indexOf(ssearch);\r\n if (ffst < 0 ) { ssearch = ttmp + \". ...\"; ffst=ffull.indexOf(ssearch); }\r\n if (ffst < 0 ) { ssearch = ttmp + \". ..\"; ffst=ffull.indexOf(ssearch); }\r\n if (ffst < 0 ) { ssearch = ttmp + \" ...\"; ffst=ffull.indexOf(ssearch); }\r\n if (ffst < 0 ) { ssearch = ttmp + \"...\"; ffst=ffull.indexOf(ssearch); }\r\n if (ffst < 0 ) { ssearch = ttmp + \" ..\"; ffst=ffull.indexOf(ssearch); }\r\n if (ffst >= 0 )\r\n {\r\n ffst+=ssearch.length;\r\n if (llst<0) ttmp=ffull.substring(ffst);\r\n else ttmp=ffull.substring(ffst, llst);\r\n mmove0=this.GetMove(ttmp,0);\r\n }\r\n }\r\n if ((mmove0.indexOf(mm)==0)&&(mmove0.indexOf(mm+mm.substr(1))!=0))\r\n {\r\n this.SetMove(this.MoveCount+1, vv);\r\n //if (window.UserMove) setTimeout(\"UserMove(1,'\"+mmove0+\"')\",this.Delay/2, this); //TODO: review and remove\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n if ((this.RecordCount==0)&&(!((this.xdocument.BoardForm)&&(this.xdocument.BoardForm.PgnMoveText))))\r\n {\r\n vv=this.ShortPgnMoveText[0].length;\r\n this.ShortPgnMoveText[0][vv] = \"\";\r\n this.ShortPgnMoveText[1][vv] = this.CurVar;\r\n this.ShortPgnMoveText[2][vv] = this.MoveCount;\r\n this.CurVar = vv;\r\n }\r\n this.ParseMove(mm, true);\r\n if (this.IsCheck(this.Piece[1-this.MoveType][0].Pos.X, this.Piece[1-this.MoveType][0].Pos.Y, 1-this.MoveType)) mm+=\"+\";\r\n //if (window.UserMove) setTimeout(\"UserMove(0,'\"+mm+\"')\",this.Delay/2, this); //TODO: review and remove\r\n if (this.MoveType==0)\r\n {\r\n this.HistMove[this.MoveCount-this.StartMove]=Math.floor((this.MoveCount+2)/2)+\".\"+mm;\r\n ssub+=Math.floor((this.MoveCount+2)/2)+\".\";\r\n }\r\n else\r\n {\r\n this.HistMove[this.MoveCount-this.StartMove]=Math.floor((this.MoveCount+2)/2)+\". ... \"+mm;\r\n if (this.MoveCount==this.StartMove) ssub+=Math.floor((this.MoveCount+2)/2)+\". ... \";\r\n else ssub+=this.HistMove[this.MoveCount-this.StartMove-1]+\" \";\r\n }\r\n if (this.RecordCount==0) this.RecordedMoves=this.HistMove[this.MoveCount-this.StartMove];\r\n else\r\n {\r\n ttmp=this.RecordedMoves.split(\" \");\r\n ttmp.length=this.RecordCount+((this.MoveCount-this.RecordCount)%2)*2;\r\n this.RecordedMoves=ttmp.join(\" \");\r\n if (this.MoveType==0) this.RecordedMoves+=\" \"+this.HistMove[this.MoveCount-this.StartMove];\r\n else this.RecordedMoves+=\" \"+mm;\r\n }\r\n this.RecordCount++;\r\n this.MoveCount++;\r\n this.MoveType=1-this.MoveType;\r\n if (this.xdocument.BoardForm)\r\n {\r\n if (this.xdocument.BoardForm.PgnMoveText) this.xdocument.BoardForm.PgnMoveText.value=ssub+mm+\" \";\r\n if (this.xdocument.BoardForm.Position)\r\n this.xdocument.BoardForm.Position.value=this.TransformSAN(this.HistMove[this.MoveCount-this.StartMove-1]);\r\n this.NewCommands.length=0;\r\n this.ExecCommands();\r\n this.RefreshBoard(); //TODO: what this does?\r\n }\r\n }catch(e)\r\n {\r\n //alert(\"currentIVFChessGame.BoardClick>>error\" + e)\r\n throw(\"currentIVFChessGame.BoardClick>>rethrow error: \\n\" + e);\r\n }\r\n }", "function handleClick(e) {\n\tconst cell = e.target\n\tconst currentClass = oTurn ? oClass : xClass \n\tplaceMark(cell, currentClass)\n\tif (checkWin(currentClass)) {\n\t\tendGame(false)\n\t} else if (isDraw()) {\n\t\tendGame(true)\n\t} else {\n\t\tswapTurns()\n\t}\n}", "function noCheat(){\n console.log(\"already clicked!\");\n }", "squareClick(){\n this.props.boardClick(this.props.rowIndex, this.props.columnIndex);\n }", "function mouseClicked(){\n sim.checkMouseClick();\n}", "function onClick(id) {\n if (board[coords[id][0]][coords[id][1]] == BLANK) {\n //If x turn\n if (x_Turn) {\n board[coords[id][0]][coords[id][1]] = X_PIECE;\n document.getElementById(id).innerHTML = \"X\";\n checkTie();\n checkWin(X_PIECE);\n //Else if o turn\n } else {\n board[coords[id][0]][coords[id][1]] = O_PIECE;\n document.getElementById(id).innerHTML = \"O\";\n checkTie();\n checkWin(O_PIECE);\n }\n x_Turn = !x_Turn;\n document.getElementById(\"turn_Display\").innerHTML = x_Turn ? \"X\" : \"O\";\n }\n}", "clicked(key, e){\r\n let k = this.keyToPoint(key)\r\n let j = this.state.prevClick\r\n let moved = false\r\n let cellClicked = this.state.rows[k.x][k.y]\r\n let prevClicked = j !== null ? this.state.rows[j.x][j.y] : null\r\n let nextTurn = this.state.turn\r\n\r\n if (this.sameCell(k, j))\r\n return\r\n \r\n //first click since last turn\r\n //Make sure white doesnt click black pieces and vice versa\r\n //Cells without pieces are not highlighted either\r\n if(prevClicked === null){\r\n if(!cellClicked.holdsPiece() || \r\n this.state.turn !== cellClicked.piece.player){\r\n return\r\n }\r\n else\r\n cellClicked.hl = \"true\"\r\n }\r\n else{\r\n if(cellClicked.holdsPiece() && \r\n prevClicked.piece.player === cellClicked.piece.player){\r\n cellClicked.hl = \"true\"\r\n prevClicked.hl = \"false\"\r\n }\r\n else{\r\n moved = prevClicked.piece.move(cellClicked, this.state.rows)\r\n if(moved){\r\n nextTurn = this.state.moveCount % 2 === 0 ? \"black\" : \"white\"\r\n prevClicked.hl = \"false\"\r\n }\r\n }\r\n }\r\n this.setState(prevState => ({\r\n rows : prevState.rows.map(row => ([...row])),\r\n prevClick : moved ? null : cellClicked.hl === \"true\" ? {...k} : prevState.prevClick,\r\n moveCount : moved ? prevState.moveCount + 1 : prevState.moveCount,\r\n turn : nextTurn\r\n }))\r\n\r\n if(moved){\r\n let mover = this.state.turn === \"white\" ? player1 : player2\r\n let moved = mover === player1 ? player2 : player1\r\n console.log(`${moved.name} is checked: ${mover.checkedOpponent(moved.kingLocation,\r\n this.state.rows)}`)\r\n }\r\n \r\n }", "function squareClicked(e) {\n let square = e.target;\n let alreadyClicked = square.dataset.clicked !== \"-1\";\n if (alreadyClicked) {\n // if the square has been clicked\n console.log(\"You must select a different square\");\n } else {\n if (playerTurn == 0) {\n // if the red player clicks a square\n playerClickedHandle(\n square,\n playerTurn,\n \"Red\",\n \"Blue\",\n \"redPlayerClicked\",\n redPlayerScore,\n \"redPlayerColor\",\n \"bluePlayerColor\"\n );\n } else if (playerTurn == 1) {\n // if the blue player clicks a square\n playerClickedHandle(\n square,\n playerTurn,\n \"Blue\",\n \"Red\",\n \"bluePlayerClicked\",\n bluePlayerScore,\n \"bluePlayerColor\",\n \"redPlayerColor\"\n );\n }\n }\n}", "function checkPieceClicked(e){\r\n var i;\r\n var piece;\r\n if((e.pageX > 500 && e.pageX < (500 + _puzzleWidth)) && (e.pageY > 210 && e.pageY < (210 + _puzzleHeight))){\r\n for(i = 0;i < _pieces.length;i++){\r\n piece = _pieces[i];\r\n if(_mouse.x > piece.xPos && _mouse.x < (piece.xPos + _pieceWidth) && _mouse.y > piece.yPos && _mouse.y < (piece.yPos + _pieceHeight)){\r\n return piece;\r\n }\r\n }\r\n }\r\n return null;\r\n}", "function sqClick(e) {\n\tconsole.log(board[e.target.id])\n\tif(playerWin === 3 || playerWin === -3) return\n\tif(board[e.target.id] !== 0) return\n\t\n\tif (e.target.tagName !== 'DIV') {\n\t return; \n\t}\n\t board[parseInt(e.target.id)] = turn;\n\t if (turn === 1) {\n\t\te.target.textContent = 'X'\n\t\t// console.log('win )\n\t\t\n\t} else {\n\t\te.target.textContent = 'O'\n\t\t\n\t}\n\tcheckWin();\n\tturn *= -1;\n\tmoves += 1;\n}", "function check() {\n if (document.getElementById(\"checkit\").clicked === true) {\n alert(\"button was clicked\");\n }\n}", "function handleClick(evt) {\n // get x from ID of clicked cell\n let x = +evt.target.id;\n\n // get next spot in column (if none, ignore click)\n // create pointer to keep track of lowest empty cell\n\n let y = findSpotForCol(x);\n if (y === null) {\n return;\n }\n\n // place piece in board and add to HTML table\n board[y][x] = currPlayer\n placeInTable(y, x);\n\n // check for win\n if (checkForWin()) {\n return endGame(`Player ${currPlayer} won!`);\n }\n\n // check for tie\n //check if there is an available spot\n // consider .every function to check top\n let spotAvailable = false\n console.log(board)\n for(let i = 0; i < WIDTH; i++){\n for(let j = 0; j < HEIGHT; j++){\n if (!(board[j][i] === 1 || board[j][i] === 2)){\n spotAvailable = true\n }\n }\n }\n if (!spotAvailable){\n endGame(\"It's a tie guys :(\")\n }\n\n // switch players\n currPlayer = (currPlayer === 1) ? 2 : 1\n \n console.log(currPlayer)\n}", "function validClick(x,y){\n if (compArray[x][y] == 0 || compArray[x][y] == 2) return true;\n else return false \n}", "function _handleClickEvent(e){\n const cellID = e.target.getAttribute('id');\n const cellIndex = cellID.slice(5);\n\n if(gameBoard.state[cellIndex]){\n return;\n }\n\n //deciding turn based on how many cells were actually filled\n let filledCells = gameBoard.state.filter(cell => cell);\n let cellValue = filledCells.length % 2 === 0 ? 'X' : 'O';\n\n //updating the array and the display\n gameBoard.state[cellIndex] = cellValue;\n e.target.textContent = cellValue;\n\n gameFlow.checkWinner();\n }", "function mousePressed() {\n\n CheckButtons(Buttons);\n CheckHover(Buttons);\n\n}", "function checkCell() {\n console.log(this)\n var id = this.getAttribute('id');\n var row = id.substr(id.length - 2, 1);\n var col = id.substr(id.length - 1, 1);\n // Execute if two player mode is active\n if (board[row][col] == '_' && playerMode == 'two') {\n printShape(this, currentShape);\n updateBoard(this, currentShape);\n checkVictory();\n changeShapes();\n }\n // Execute if one player mode is active\n else if (board[row][col] == '_' && playerMode == 'one') {\n printShape(this, opponent);\n updateBoard(this, opponent);\n // Initiate AI\n findBestMove();\n checkVictory(); // Checks for victory\n }\n \n}", "isValidClick (col, row, new_owner, type){\n\t\tif (new_owner !== this.turn){\n\t\t\tthis.clickError = \"It's not your turn!\";\n\t\t\treturn false;\n\t\t}\n\t\tif (col < 0 || col >= this.tiles.length || row < 0 || row >= this.tiles[0].length) {\n\t\t\tthis.clickError = \"Click is out of bounds\";\n\t\t\treturn false;\n\t\t}\n\n\t\tlet old_owner = this.tiles[col][row].owner;\n\t\tlet old_type = this.tiles[col][row].type;\n\n\t\t//Special return case for Virus placement\n\t\tif (type == 4){\n\t\t\tif (old_owner != -1 && old_type != 4) //Some sort of non-wall cell occupies this tile\n\t\t\t\treturn true;\n\t\t}\n\n\t\tconsole.log(\"Checking click: \"+[old_owner,old_type]+\" --> \"+[new_owner,type]);\n\t\t//If empty cell\n\t\tif (old_owner == -1) return true;\n\t\t\n\t\t//If owned\n\t\tif (old_owner === new_owner){\n\t\t\t//Action must be an upgrade\n\t\t\tif (old_type <= type)\n\t\t\t\treturn true;\n\t\t\telse { //i.e. no B-cell onto C-cell\n\t\t\t\tthis.clickError = \"Cannot place a \"+type+\" on a \"+old_type;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//If not owned\n\t\tif (old_owner !== new_owner){\n\t\t\tconsole.log(\"Trying to take oppoenent's tile\")\n\t\t\t//Action must be a force upgrade\n\t\t\tif (old_type < type)\n\t\t\t\treturn true;\n\t\t\telse {\n\t\t\t\tthis.clickError = \"Cannot place a \"+type+\" on an enemies \"+old_type;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\n\t}", "function clickOnGameButton(event)\n{\n // Hier coderen we alles wat moet worden gedaan zodra een speler op de game button clicked\n // @TODO: Click event van de game button programmeren. Wat moet er allemaal gebeuren na een klik?\n}", "function handleClick() {\n // prendere il contenuto della cell\n const cellNumber = parseInt(this.innerText)\n console.log(cellNumber);\n // verifica se la cella é una bomba\n if (is_a_bomb(cellNumber, bombs)) {\n // your code here\n // se é una bomba colorala di rosso\n this.style.backgroundColor = '#E56399'\n // GAME OVER\n console.log('GAME OVER');\n // mostra tutte le bombe\n showBombs(bombs)\n // disabilita tutti gli event listener\n gameOver()\n } else {\n // contiuna a giocare\n // colora la cella di azzurro\n this.style.backgroundColor = '#7FD1B9'\n console.log('Keep trying');\n }\n}", "function isClicked(mouse) {\n for(var i=0;i<Object.keys(icons).length;i++) {\n curr_x = icons[Object.keys(icons)[i]][1];\n curr_y = icons[Object.keys(icons)[i]][2];\n curr_height = icons[Object.keys(icons)[i]][3];\n curr_width = icons[Object.keys(icons)[i]][4];\n if (mouse[0] < curr_x + curr_width && mouse[0] > curr_x - curr_width) {\n if (mouse[1] < curr_y + curr_height && mouse[1] > curr_y - curr_height) {\n return (icons[Object.keys(icons)[i]][0]);\n }\n }\n else {\n }\n }\n return false;\n }", "function win(clicked) {\n //every time I will get all the cell classes and slipt them \n var memberOf = clicked.className.split(\" \");\n for (var i = 0; i < memberOf.length; i++) {\n //I am just appending a '.' so that I can query easily\n var testClass = '.' + memberOf[i];\n //this will return me the number of cells with the turn\n var items = contains('#TicTacToe ' + testClass, turn);\n // winning condition: turn == N_SIZE\n if (items.length == N_SIZE) {\n return true;\n }\n }\n //return false otherwise\n return false;\n}", "function isDancingClicked(x,y) {\n return x >= buttonX - buttonWidth/2 &&\n x <= buttonX + buttonWidth/2 &&\n y >= secondButtonYpos - buttonHeight/2 &&\n y <= secondButtonYpos + buttonHeight/2;\n}", "function giveCellsClick() {\n if(turn)\n {\n player = whitePlayer;\n }\n else\n {\n player = blackPlayer;\n }\n cells.forEach(cell => {\n cell.addEventListener('click', () =>\n { \n i = cell.closest('tr').rowIndex;\n j = cell.cellIndex;\n if(board[i][j] == 0 && player.possiblemoves[i][j] == 1)\n { \n if(HumanIsWhite)\n {\n placePiece(i, j, \"white\");\n }\n else\n {\n placePiece(i, j, \"black\");\n }\n \n }\n }); \n });\n}", "clickablePressed(clickableName) {\n // this will be = the clickable pressed\n // go through each row, look for a match to the current state\n for (let i = 0; i < this.interactionTable.getRowCount(); i++) {\n\n // the .name property of a function will convert function to string for comparison\n if(this.currentStateName === this.interactionTable.getString(i, 'CurrentState') ) {\n // now, look for a match with the key typed, converting it to a string\n if( this.interactionTable.getString(i, 'ClickableName') === clickableName ) {\n // if a match, set the drawFunction to the next state, eval() converts\n // string to function\n this.changeState(this.interactionTable.getString(i, 'NextState') );\n break;\n }\n }\n }\n }", "function mouse_clicked(){\n\t\treturn M.mouse_clicked;\n\t}", "addClick(e) {\n //console.log(this.m.gameOver)\n if (!this.m.gameOver) {\n let player;\n if (e.target.innerText == \"\") {\n if (!this.m.gameOver) {\n //if tiled has been clicked or not\n if (this.m.beenClicked % 2 == 0) {\n // console.log('x clicked')\n e.target.innerText = \"X\";\n player = this.m.firstPlayer;\n } else {\n e.target.innerText = \"O\";\n //console.log('o clicked')\n player = this.m.secondPlayer;\n }\n\n this.m.beenClicked++;\n // console.log(e);\n // console.log('clicked on', e.target.id)\n //was clicked=true\n if (this.m.beenClicked > 4) {\n this.checkWin();\n }\n this.playerTurn(player);\n\n }\n }\n }\n }", "mouseClicked(){\n //If we are highlighted and we clicked, return true\n if(this.highlighted){\n return true\n }\n //Else return false\n return false;\n }", "function clickmovetake(ctrname){\n\ttry{\n\t\tif(Territori[ctrname].jugador==Jugador['jugador'+Turn.turn]){\n\t\t\tdocument.getElementById(ctrname+'less').click();\n\t\t}\n\t}\n\tcatch (err){}\n}", "function handleClick(evt) { \n //get index of sqaure clicked\n let idx = parseInt(evt.target.id.replace('sq', ''));\n console.log(idx);\n\n //check if the square is taken, return of it is\n if(board[idx]) return; \n //set value to current player\n board[idx] = turn\n //switch players\n turn *= -1;\n\n //check for winner\n winner = getWinner();\n\n render();\n}", "function handleClickOnCell(event) {\n let cell = event.target;\n \n currentOnTurn = circleTurn ? CIRCLE : X;\n \n placeMark(cell, currentOnTurn); \n\n // check if have a winner Game is over!\n if (checkForWin(currentOnTurn)) { \n return endGame(false);\n } else if (isDraw()) {\n return endGame(true);\n } \n switchTurns();\n setHoverClass(); \n}", "function clicktarget(evt){\n setopen(evt); //sets card to open state\n addcardtoList(evt);// adds card to list to be check for match\n removeclickevent(evt);// removes the click listener\n\n if (cardlist.length ==2){ //if 2 cards exists it will compare via Checkmatch()\n\n setTimeout(checkmatch,200); //delay so users can see the 2nd card clicked\n\n }\n else {\n\n }\n }", "function click1(letter) {\r\n // console.log(letter);\r\n\r\n\r\n let newCell = checkForEmptyCellInTheColum(letter); //into the newcell we enter the show of the specific circle\r\n console.log(newCell.id);\r\n if (counter % 2 == 0) {\r\n newCell.style.backgroundColor = \"red\";\r\n player = 'red';\r\n document.getElementById(\"cursor\").style.backgroundColor = \"yellow\";\r\n } else {\r\n newCell.style.backgroundColor = \"yellow\";\r\n player = 'yellow';\r\n document.getElementById(\"cursor\").style.backgroundColor = \"red\";\r\n }\r\n\r\n counter++; //to know which player is playing right now\r\n checkWin(letter, newCell.id, newCell.getAttribute(\"data-row\"), newCell.getAttribute(\"data-Col\"), newCell, player);\r\n\r\n // checkvictory(newCell);\r\n}", "function mousePressed() {\n for (var i = 0; i < cols; i++) {\n for (var j = 0; j < rows; j++) {\n if (grid[i][j].contains(mouseX, mouseY)) { // checks every spot to see if it contains a mouse click\n grid[i][j].reveal(); // shows what's inside the clicked cell\n \n // if clicked on a mine\n if (grid[i][j].mine) {\n gameOver(); // game over\n alert(\"You lose... :(\");\n }\n }\n }\n }\n}", "function mouseClicked() {\n if (mouseY >= 620 && mouseY <= 720 && mouseX >= 1040 && mouseX <= 1280) {\n aanvalActie = false;\n aanvalKnopStatus = false;\n beweegActie = false;\n beweegKnopStatus = false;\n beurtVeranderen();\n veranderKleur(donkerblauw,wit);\n veranderKleur(lichtblauw,wit);\n }\n}", "function selectBoardCells (args) {\n for(var i=0; i<args.length; i++){\n TicTacToePage.boardCells[args[i]].click()\n } \n }", "function handleBoardClick(id) {\n game.playerSelect = id.substring(1);\n}", "function checkIfAllClicked() {\n for (let i = 0; i < squares.length; i++) {\n if (squares[i].dataset.clicked == \"-1\") {\n return false;\n }\n }\n return true;\n}", "is_clicked(image, event) {\n var width = image.width\n var height = image.height\n var begin_x = image.x\n var begin_y = image.y\n var end_x = begin_x + width\n var end_y = begin_y + height \n var buffer = 10\n var click_x = event.offsetX\n var click_y = event.offsetY\n var has_been_clicked = false\n\n if (click_x >= begin_x - buffer && click_x <= end_x + buffer && click_y >= begin_y - buffer && click_y <= end_y + buffer) {\n has_been_clicked = true\n } else {\n has_been_clicked = false\n }\n\n return has_been_clicked\n }", "function handleClick(evt) {\n //if the game is ended, no more action\n if (gameEnded === true) {\n return false;\n }\n // get x from ID of clicked cell\n const x = +evt.target.id;\n\n // get next spot in column (if none, ignore click)\n const y = findSpotForCol(x);\n if (y === null) {\n return false;\n }\n\n // place piece in board and add to HTML table\n placeInTable(y, x);\n\n //update the board\n board[y][x] = currPlayer;\n\n // check for win\n if (checkForWin()) {\n return endGame(`Player ${currPlayer} won!`);\n }\n\n // check for tie\n // TODO: check if all cells in board are filled; if so call, call endGame\n if (isEntireBoardFilled()) {\n return endGame(`Game tie!`);\n }\n\n // switch players\n // TODO: switch currPlayer 1 <-> 2\n currPlayer = currPlayer === 1 ? 2 : 1;\n}", "function mousePressed() {\n if (!playerAlive || !canPlay)\n return;\n\n // First, check if mouse is within bounds of board\n if (mouseX <= width && mouseY <= height && mouseY > headerHeight) {\n // Use x and y of mouse to determine which square the mouse is over\n const i = floor((mouseY - headerHeight) / yIncrement);\n const j = floor(mouseX / xIncrement);\n \n // Select correct square from array\n const clickedSquare = board[i][j];\n \n // Left click = click the square\n if (mouseButton == LEFT) {\n // if (firstClick)\n // setMines(j, i);\n \n clickedSquare.click(true, true, playerColor);\n sendExplore(i, j);\n \n // Right click = flag the square\n } else if (mouseButton == RIGHT) {\n clickedSquare.flag(playerColor, true);\n sendFlag(i, j);\n }\n }\n}", "function checkIfDraw(){\r\n if(currentStateOfTheBoard.includes(\"\")){\r\n return false;\r\n }\r\n else{\r\n return true;\r\n }\r\n \r\n}", "function noweKonto(){\r\n clicked = true;\r\n}", "clicked(mx,my){\n\n //if( (my == this.y) && (mx <= (this.begin+5)) && (mx >= this.begin) ){\n if( (my <= this.y) && (my >= (this.y)-8) && (mx <= (this.begin+8)) && (mx >= this.begin) ){\n if(this.pressed==0){\n this.pressed = 1;\n console.log(this.begin);\n console.log(this.mirna_sequence);\n console.log(this.mirna_id);\n }\n else{\n this.pressed = 0;\n console.log(this.end);\n }\n }\n }", "function handleCellClick(event, rowIndex, cellIndex){\n\n if(gameState.board[rowIndex][cellIndex] == null ){\n gameState.board[rowIndex][cellIndex] = gameState.players[gameState.currentPlayerIndex];\n changeTurn();\n renderBoard();\n if(checkWin()){\n //do something\n alert(\"We; have a winner\")\n console.log(gameState)\n } else if(checkDraw()){\n alert(`We have a draw`)\n }\n }\n\n}", "function clickOnBoardItem() {\n let tempActiveTag;\n\n return function userClick(event) {\n let currentActiveTag = event.target;\n\n if (currentActiveTag !== tempActiveTag && activeExists()) {\n activeExists().classList.remove('active');\n }\n event.target.classList.toggle('active');\n showCurrentTag(event.target);\n tempActiveTag = event.target;\n }\n}", "detectClicks() {\n if (\n hand.x > this.x &&\n hand.y > this.y &&\n hand.x < this.x + this.markerW &&\n hand.y < this.y + this.markerH\n ) {\n return true;\n } else {\n return false;\n }\n }", "function clickHandler(){ // declare a function that updates the state\n elementIsClicked = true;\n isElementClicked();\n }", "function onClick(x,y){\n if($scope.timer==undefined){ // Start the timer if has not been started yet\n $scope.timer = $interval(timer, 100);\n }\n if($scope.grid[x][y].state == -1){ // If the case is a mine\n $scope.play = false; // The game stops\n $interval.cancel($scope.timer); // The timer stops\n }\n else if ($scope.grid[x][y].state >= 0) { // Otherwise\n revealCase(x,y); // Potential empty neighbors are also revealed\n $scope.success = isSuccess(); // Test if the game is completed\n }\n }", "function mousePressed(){\r\n let bx = Math.floor(mouseY/boxHeight);\r\n let by = Math.floor(mouseX/boxWidth);\r\n mouseBoard[bx][by] =true;\r\n \r\n //if([bx][by] ==)\r\n}", "function cellClick(clickedCellEvent) {\n\n const clickedCell = clickedCellEvent.target; // saves clicked html in a variable for future use\n\n const clickedCellIndex = parseInt(clickedCell.getAttribute('data-cell-index')); // grabs the 'data-cell-index' attribute from clicked cell\n if (board[clickedCellIndex] !== \"\" || !gameActive) { //checks if the cell has been clicked before or if the game has been paused. If true will ignore the click\n return;\n }\n cellPlayed(clickedCell, clickedCellIndex);\n resultValidation();\n}", "function clickButton(e) {\n click++;\n for(let i=0; i<buttonArray.length; i++) {\n if (buttonArray[i].name == e.target.id){\n let tBut = buttonArray[i];\n\n // IS IT RIGHT\n if (tBut == pattern[click-1]){\n tBut.highlight(true);\n } else {\n tBut.highlight(false);\n if (useStrict) {\n gameOver();\n } else {\n showPattern();\n turn() \n }\n }\n \n // Is It End\n if (click == pattern.length && gameOn == true) {\n if(pattern.length >= 5) {\n gameWin();\n }\n console.log(pattern);\n document.getElementById('counter').innerText = pattern.length;\n whoseTurn = \"cpu\";\n turn();\n }\n }\n }\n}", "function clickOn1(){if(goodAnswer == 1){ correctAnswerClick(1); }else{ badAnswerClick(1); }}", "function click(square) {\n\tlet currentId = square.id\n\tif (isGameOver) return\n\tif (square.classList.contains('checked') || square.classList.contains('flag')) return\n\tif (square.classList.contains('bomb')) {\n\t\tgameOver(square)\n\t} else {\n\t\tlet total = square.getAttribute('data')\n\t\tif (total != 0) {\n\t\t\tsquare.classList.add('checked')\n\t\t\tif (total == 1) square.classList.add('one') //adding classes to style numbers differently\n\t\t\tif (total == 2) square.classList.add('two') //adding classes to style numbers differently\n\t\t\tif (total == 3) square.classList.add('three') //adding classes to style numbers differently\n\t\t\tif (total == 4) square.classList.add('four') //adding classes to style numbers differently\n\t\t\tsquare.innerHTML = total\n\t\t\treturn\n\t\t}\n\t\tcheckSquare(square, currentId) // If the total is 0(zero) , only then ,this function will be called to\n\t\t\t\t\t\t\t\t\t //check the neighouring elements and showing them if they are valid. \n\t}\n\tsquare.classList.add('checked')\n}", "function clicked(card) {\n if (card.classList.contains(\"show\") || card.classList.contains(\"open\")) {\n return true;\n }\n return false;\n}", "function cellClicked(elCell, i, j) {\r\n if (!gGame.isOn) return;\r\n if (gGame.isFirstClick) {\r\n gGame.isOn = true;\r\n setMinesRand(gBoard, { i, j })\r\n setMinesNegsCount(gBoard)\r\n gGame.isFirstClick = false\r\n }\r\n if (gBoard[i][j].isShown) return;\r\n\r\n gBoard[i][j].isShown = true;\r\n elCell.innerText = gBoard[i][j].type;\r\n}", "function cardClick(){\n\tthis.classList.add('show', 'open');\n\tclickedCards.push(event.target);\n\tif(clickedCards.length === 2){\n\t\tmoves++;\n\t\tif(moves === 1){\n\t\t\ttimerStart();\n\t\t\tmovesCounter.innerHTML = `<span class=\"moves green\">${moves} Move</span>`;\n\t\t} else if(moves >= 2 && moves <= 20) {\n\t\t\tmovesCounter.innerHTML = `<span class=\"moves green\">${moves} Moves</span>`;\n\t\t} else if(moves >= 21 && moves <= 29){\n\t\t\tmovesCounter.innerHTML = `<span class=\"moves gold\">${moves} Moves</span>`;\n\t\t} else {\n\t\t\tmovesCounter.innerHTML = `<span class=\"moves red\">${moves} Moves</span>`;\n\t\t}\n\t\tif(clickedCards[0].innerHTML === clickedCards[1].innerHTML){\n\t\t\tmatching();\n\t\t\twinCheck();\n\t\t} else {\n\t\t\tnotMatching();\n\t\t}\n\t}\n\tcheckRating(moves);\n}", "function playerClick(square){\n //Check if player's turn\n if (document.getElementById(\"game-turn\").innerHTML === \"Your\"){\n\n //Check if square is taken\n if (squareFree(square)) {\n\n //Set the square in the game\n setSquare(`${square}`,\"O\");\n\n } else {\n //Square already taken\n shakey();\n }\n } else {\n //It's not the player's turn!\n shakey();\n }\n}" ]
[ "0.7146314", "0.70943004", "0.7029384", "0.6993009", "0.6847714", "0.6830517", "0.68197036", "0.66940683", "0.669376", "0.6692744", "0.6690104", "0.66809297", "0.6678638", "0.6634238", "0.663058", "0.662401", "0.65964884", "0.6536326", "0.6522827", "0.6517985", "0.6512543", "0.6485052", "0.6454516", "0.6452852", "0.64431393", "0.64376056", "0.6422658", "0.6417716", "0.6407251", "0.6396548", "0.6389529", "0.63864636", "0.6381439", "0.6375215", "0.6357521", "0.6349843", "0.634769", "0.63420117", "0.6332346", "0.63175297", "0.63099456", "0.6304963", "0.6299226", "0.62911236", "0.62754303", "0.62745416", "0.62700605", "0.62695575", "0.6264956", "0.62491643", "0.62450063", "0.62396747", "0.623283", "0.6228848", "0.6219629", "0.62164676", "0.62058854", "0.62035394", "0.6201934", "0.6193636", "0.6191721", "0.61894023", "0.6187672", "0.61685324", "0.6166991", "0.61633396", "0.6160945", "0.6160268", "0.6144639", "0.61341715", "0.613061", "0.6124308", "0.61241937", "0.61218315", "0.6121514", "0.61212814", "0.6119952", "0.60993063", "0.60905683", "0.60896814", "0.6088779", "0.60799986", "0.60787374", "0.6075269", "0.6069395", "0.6067499", "0.60652965", "0.6062738", "0.6060837", "0.605984", "0.6056519", "0.6056494", "0.6056466", "0.6056242", "0.6055777", "0.6052121", "0.604377", "0.60379666", "0.60369766", "0.60298514", "0.6026769" ]
0.0
-1
change the board according to the selection
function change(i,j){ if(g_checker){ var index = document.getElementsByClassName('row-'+i)[0].children[j]; g_newBoard[i][j] += 1; if(g_newBoard[i][j] > 3){ index.setAttribute("style", "background-color:white;"); g_newBoard[i][j] = 0; } if(g_newBoard[i][j] === 3){ index.setAttribute("style", "background-color:#D79922;"); } if(g_newBoard[i][j] === 1){ index.setAttribute("style", "background-color:#4056A1;"); } if(g_newBoard[i][j] === 2){ index.setAttribute("style", "background-color:#F13C20;"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "selectCell() {\n if(this.check_Reset())\n return;\n if (this.view.getCurrentSelectedPiece() != this.selectedPiece) {\n this.state = 'PROCESS_PIECE';\n }\n else {\n if (this.view.board.selectedCell != null) {\n this.state = 'REQUEST_PLAY_P';\n }\n }\n }", "function handleBoardClick(id) {\n game.playerSelect = id.substring(1);\n}", "function selectBoard(event) {\n document.querySelectorAll(\".qwant-panel__boards-container__element--active\")[0]\n .classList.remove(\"qwant-panel__boards-container__element--active\");\n event.target.classList.add(\"qwant-panel__boards-container__element--active\");\n currentBoard = event.target.textContent;\n}", "set board(value) {\n this._board = value;\n }", "function selection_update() {\n\n // if the new selection is not in the valid moves area don't update the last_selection var\n if (selection.row != '') {\n last_selection = selection;\n }\n\n $(\"#log\").html(\"clicked: \" + clicked.row + \"x\" + clicked.col + \"<br />\" + clicked.piece);\n\n\n}", "function selectPiece(){\n\tfor(i=1;i<10;i++) {\n\t\tfor(j=1;j<10;j++) {\n\t\t\t_root[\"piece\"+i+j].onPress = function() {\n\t\t\t\tI = +this._name.substr(5,1); \t\n\t\t\t\tJ = +this._name.substr(6,1);\n\t\t\t\tif (state[I][J]==0 && freeze==0 && (turn==1 || opponent==0)){\n\t\t\t\t\tif (turn==1) {\n\t\t\t\t\t\tstate[I][J]=1;\n\t\t\t\t\t\tcol = new Color(_root[\"piece\"+I+J]);\n\t\t\t\t\t\tcol.setRGB(0xcc0000);\n\t\t\t\t\t\tsquareTest(1);\n\t\t\t\t\t}\n\t\t\t\t\tif (turn==2) {\n\t\t\t\t\t\tstate[I][J]=2;\n\t\t\t\t\t\tcol = new Color(_root[\"piece\"+I+J]);\n\t\t\t\t\t\tcol.setRGB(0x009966);\n\t\t\t\t\t\tsquareTest(2);\n\t\t\t\t\t}\n\t\t\t\t\t_root[\"piece\"+I+J]._xscale=_root[\"piece\"+I+J]._xscale * 1.5;\n\t\t\t\t\t_root[\"piece\"+I+J]._yscale=_root[\"piece\"+I+J]._yscale * 1.5;\n\t\t\t\t\tturn= (turn % 2)+1;\n\t\t\t\t\tgo++; \n\t\t\t\t\tif (go==n*n && freeze==0){\n\t\t\t\t\t\tgotSquare=1;\n\t\t\t\t\t\t_root.conclusion._visible = true;\n\t\t\t\t\t\t_root.conclusion.text = \"Draw!\";\n\t\t\t\t\t}\n\t\t\t\t\tif (opponent==1 && gotSquare==0){\n\t\t\t\t\t\tcomputerGo();\n\t\t\t\t\t\tsquareTest(2);\n\t\t\t\t\t\tturn= (turn % 2)+1;\n\t\t\t\t\t\tgo++; \n\t\t\t\t\t\tif (go==n*n && freeze==0){\n\t\t\t\t\t\t\t_root.conclusion._visible = true;\n\t\t\t\t\t\t\t_root.conclusion.text = \"Draw!\";\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}\n}", "choice(i, j) {\n // state variables\n const { board, turn, won } = this.state;\n // as long as position has not been played and no one has won...\n if (board[i][j] === '' && !won) {\n // update specific board position in array\n board[i][j] = turn;\n // set state for new board and swap turn\n this.setState({\n board: board,\n turn: turn === \"X\" ? 'O' : 'X'\n });\n // check for a winner\n this.checkWin(turn);\n }\n }", "function setBoard(b){\n\tboard = b;\n}", "function setPieces() {\r\n that.pieces = Array();\r\n for (var i in board.pieces) {\r\n var piece = board.pieces[i];\r\n updateSelectionState(piece);\r\n if (piece.selected)\r\n that.pieces.push(piece);\r\n }\r\n }", "function selectBoardCells (args) {\n for(var i=0; i<args.length; i++){\n TicTacToePage.boardCells[args[i]].click()\n } \n }", "function renderBoard() {\n let move = $(this);\n let index = $(this).attr('id');\n if( gameState.gameBoard[index] == null ) {\n if( currentPlayer == 1 ) {\n currentPlayer = 2;\n move.text('x') ;\n move.attr('data-score', 'x')\n } else {\n currentPlayer = 1;\n move.text('o');\n move.attr('data-score', 'o')\n }\n score = move.attr('data-score');\n gameState.gameBoard.splice(index, 1, score)\n checkWin()\n message.text(`Player ${ currentPlayer } Goes Next...`);\n }\n}", "function switchToGameBoard(){\n\tremoveMenu();\n\tshowColorSchemeButtons();\n\t// Change canvas size\n\tg_canvasWidth = g_canvasHtmlElement.width = window.innerWidth;\n\tg_canvasHeight = g_canvasHtmlElement.height = window.innerHeight;\n}", "function chooseBox(index) {\n if (self.gameBoard.gameStatus === \"Game in progress\") {\n if ((self.gameBoard.boxes[index].isX) \n || (self.gameBoard.boxes[index].isO)) \n {\n alert(\"Oops! This cell is already taken. Please select a different cell.\");\n return;\n }\n var myTurn = takeTurns();\n if (myTurn === \"o\") {\n if (self.myId === \"player 2\") {\n self.gameBoard.boxes[index].isO = true;\n }\n else {\n self.gameBoard.turn--;\n } \n\n }\n else if (myTurn === \"x\") {\n if (self.myId === \"player 1\") {\n self.gameBoard.boxes[index].isX = true;\n }\n else {\n self.gameBoard.turn--; \n }\n }\n self.gameBoard.$save(self.gameBoard.boxes);\n self.getWinner();\n }\n\n }", "setBoard(board) {\r\n\t\tthis.board = board;\r\n\t}", "function setBoard(player) {\n // set board\n board.classList.remove(X_CLASS);\n board.classList.remove(O_CLASS);\n board.classList.add(player);\n}", "function playGame(clickedCell) {\r\n \r\n \r\n var changeText=\"#cell-\"+clickedCell;\r\n if (clickedCell == '1') {\r\n if (matrix[0][0] != -1) {\r\n return;\r\n } else {\r\n $(changeText).text(\"0\");\r\n // console.log(changeText)\r\n matrix[0][0] = 1;\r\n if (playerwon(1)) { \r\n gameOver = true;\r\n $(\".verdict\").text(\"Congrats You Won \");\r\n return;\r\n }\r\n var best = bestMove(matrix);\r\n console.log(\"Best move was\"+best);\r\n matrix[best[0]][best[1]] = 0;\r\n botmove(best);\r\n }\r\n\r\n } else if (clickedCell == '2') {\r\n if (matrix[0][1] != -1) {\r\n return;\r\n } else {\r\n $(changeText).text(\"0\");\r\n // console.log(changeText)\r\n \r\n matrix[0][1] = 1;\r\n if (playerwon(1)) { \r\n gameOver = true;\r\n $(\".verdict\").text(\"Congrats You Won \");\r\n return;\r\n }\r\n var best = bestMove(matrix);\r\n \r\n console.log(\"Best move was\"+best);\r\n matrix[best[0]][best[1]] = 0;\r\n botmove(best);\r\n }\r\n\r\n } else if (clickedCell == '3') {\r\n if (matrix[0][2] != -1) {\r\n return;\r\n } else {\r\n $(changeText).text(\"0\");\r\n // console.log(changeText)\r\n \r\n matrix[0][2] = 1;\r\n if (playerwon(1)) { \r\n gameOver = true;\r\n $(\".verdict\").text(\"Congrats You Won\"); \r\n \r\n $(\"#player-point\").text(parseInt($(\"#player-point\").text())+1);\r\n return;\r\n }\r\n var best = bestMove(matrix);\r\n \r\n console.log(\"Best move was\"+best);\r\n matrix[best[0]][best[1]] = 0;\r\n botmove(best);\r\n }\r\n } else if (clickedCell == '4') {\r\n if (matrix[1][0] != -1) {\r\n return;\r\n } else {\r\n $(changeText).text(\"0\");\r\n // console.log(changeText)\r\n\r\n \r\n matrix[1][0] = 1;\r\n if (playerwon(1)) { \r\n gameOver = true;\r\n $(\".verdict\").text(\"Congrats You Won\"); \r\n \r\n $(\"#player-point\").text(parseInt($(\"#player-point\").text())+1);\r\n return;\r\n }\r\n var best = bestMove(matrix);\r\n \r\n console.log(\"Best move was\"+best);\r\n matrix[best[0]][best[1]] = 0;\r\n botmove(best);\r\n }\r\n } else if (clickedCell == '5') {\r\n if (matrix[1][1] != -1) {\r\n return;\r\n } else {\r\n $(changeText).text(\"0\");\r\n // console.log(changeText)\r\n \r\n matrix[1][1] = 1;\r\n if (playerwon(1)) { \r\n gameOver = true;\r\n $(\".verdict\").text(\"Congrats You Won\"); \r\n \r\n $(\"#player-point\").text(parseInt($(\"#player-point\").text())+1);\r\n return;\r\n }\r\n var best = bestMove(matrix);\r\n \r\n console.log(\"Best move was\"+best);\r\n matrix[best[0]][best[1]] = 0;\r\n botmove(best);\r\n }\r\n } else if (clickedCell == '6') {\r\n if (matrix[1][2] != -1) {\r\n return;\r\n } else {\r\n matrix[1][2] = 1;\r\n $(changeText).text(\"0\");\r\n // console.log(changeText)\r\n \r\n if (playerwon(1)) { \r\n gameOver = true;\r\n $(\".verdict\").text(\"Congrats You Won \"); \r\n \r\n $(\"#player-point\").text(parseInt($(\"#player-point\").text())+1);\r\n return;\r\n }\r\n var best = bestMove(matrix);\r\n \r\n console.log(\"Best move was\"+best);\r\n matrix[best[0]][best[1]] = 0;\r\n botmove(best);\r\n }\r\n } else if (clickedCell == '7') {\r\n if (matrix[2][0] != -1) {\r\n return;\r\n } else {\r\n $(changeText).text(\"0\");\r\n // console.log(changeText)\r\n \r\n matrix[2][0] = 1;\r\n if (playerwon(1)) { \r\n gameOver = true;\r\n $(\".verdict\").text(\"Congrats You Won\"); \r\n \r\n $(\"#player-point\").text(parseInt($(\"#player-point\").text())+1);\r\n return;\r\n }\r\n var best = bestMove(matrix);\r\n \r\n console.log(\"Best move was\"+best);\r\n matrix[best[0]][best[1]] = 0;\r\n botmove(best);\r\n }\r\n } else if (clickedCell == '8') {\r\n if (matrix[2][1] != -1) {\r\n return;\r\n } else {\r\n $(changeText).text(\"0\");\r\n\r\n // console.log(changeText)\r\n \r\n matrix[2][1] = 1;\r\n if (playerwon(1)) { \r\n gameOver = true;\r\n $(\".verdict\").text(\"Congrats You Won \"); \r\n \r\n $(\"#player-point\").text(parseInt($(\"#player-point\").text())+1);\r\n return;\r\n }\r\n var best = bestMove(matrix);\r\n \r\n console.log(\"Best move was\"+best);\r\n matrix[best[0]][best[1]] = 0;\r\n botmove(best);\r\n }\r\n } else if (clickedCell == '9') {\r\n if (matrix[2][2] != -1) {\r\n return;\r\n } else {\r\n $(changeText).text(\"0\");\r\n // console.log(changeText)\r\n \r\n matrix[2][2] = 1;\r\n if (playerwon(1)) { \r\n gameOver = true;\r\n $(\".verdict\").text(\"Congrats You Won \"); \r\n $(\"#player-point\").text(parseInt($(\"#player-point\").text())+1);\r\n return;\r\n }\r\n var best = bestMove(matrix);\r\n \r\n console.log(\"Best move was\"+best);\r\n matrix[best[0]][best[1]] = 0;\r\n botmove(best);\r\n }\r\n }\r\n \r\n}", "function updateBoard() {\n\tfor (let i = 0; i < gameState.boardArr.length; i++) {\n\t\tif(gameState.boardArr[i] === \"x\"){\n\t\t\tdocument.getElementById(\"box\" + i).style.backgroundImage = xIconPath;\n\t\t} else if( gameState.boardArr[i] === \"o\") {\n\t\t\tdocument.getElementById(\"box\" + i).style.backgroundImage = oIconPath;\n\n\t\t} else {\n\t\t\tdocument.getElementById(\"box\" + i).style.backgroundImage = \"\";\n\t\t}\n\t\t\n\t}\n}", "place_piece(index) {\n this.board_spaces[index].place_piece(this.selected_piece.get_top(), this.selected_piece.remove_top());\n //clear the selected piece\n for (let i = 0; i < this.board_spaces.length; i++) {\n this.board_spaces[i].selected = false;\n }\n for (let i = 0; i < this.reserve_spaces.length; i++) {\n this.reserve_spaces[i].selected = false;\n }\n this.selected_piece = null;\n //todo use modules or something smarter here\n if (this.current_player === 1) {\n this.current_player = 2;\n } else {\n this.current_player = 1;\n }\n this.check_winner()\n }", "function computerTurn(){\n compChoice = movesArr[Math.floor(Math.random() * movesArr.length)];\n for(var i =0; i < board.length; i ++){\n for(var j =0; j < board[i].length;j++){\n if(compChoice == board[i][j]){\n board[i][j] = \"y\";\n }\n }\n }\n}", "function startGame()\n{\n //Initialize selected and wonCells for a blank board\n //selected (also game board)): outerx by innerx by outery by innery\n /*\n\t\t ox0 | ox1 | ox2\n\t\t\t ix0 ix1 ix2 | ix0 ix1 ix2 | ix0 ix1 ix2\n\t\t iy0 0 0 0 | 0 0 0 | 0 0 0\n\t\toy0 iy1 0 0 0 | 0 0 0 | 0 0 0\n\t\t iy2 0 0 0 | 0 0 0 | 0 0 0\n\t\t ------------------------------------------\n\t\t iy0 0 0 0 | 0 0 0 | 0 0 0\n\t\toy1 iy1 0 0 0 | 0 0 0 | 0 0 0\n\t\t iy2 0 0 0 | 0 0 0 | 0 0 0\n\t\t ------------------------------------------\n\t\t iy0 0 0 0 | 0 0 0 | 0 0 0\n\t\toy2 iy1 0 0 0 | 0 0 0 | 0 0 0\n\t\t iy2 0 0 0 | 0 0 0 | 0 0 0\n */\n selected = [\n [\n [[0, 0, 0], [0, 0, 0], [0, 0, 0]],\n [[0, 0, 0], [0, 0, 0], [0, 0, 0]],\n [[0, 0, 0], [0, 0, 0], [0, 0, 0]]\n ],\n [\n [[0, 0, 0], [0, 0, 0], [0, 0, 0]],\n [[0, 0, 0], [0, 0, 0], [0, 0, 0]],\n [[0, 0, 0], [0, 0, 0], [0, 0, 0]]\n ],\n [\n [[0, 0, 0], [0, 0, 0], [0, 0, 0]],\n [[0, 0, 0], [0, 0, 0], [0, 0, 0]],\n [[0, 0, 0], [0, 0, 0], [0, 0, 0]]\n ]\n ];\n //Won cells: x by y\n /*\n\t\t x0 x1 x2\n\t\ty0 0 0 0\n\t\ty1 0 0 0\n\t\ty2 0 0 0\n */\n wonCells = [[0, 0, 0], [0, 0, 0], [0, 0, 0]];\n //Highlight all cells to indicate first player can pick one\n for(var i = 0; i < 3; i++)\n {\n for(var j = 0; j < 3; j++)\n {\n //Get rect for cell ixj and set its fill-opacity to 0.2\n document.getElementById(\"cell\" + i + \"x\" + j).setAttributeNS(null, \"fill-opacity\", 0.2);\n }\n }\n\n addLog(\"Click a square to start.\");\n //Set on click functions for each cell so player 1 can select one of them\n\tsetInitialOnClickFunctions();\n}", "switchTurn(x,y,lx,ly){\n console.log(\"switching current turn\")\n game.isXTurn = !game.isXTurn\n game.turns++\n game.boardTurns[x][y] = game.boardTurns[x][y] + 1 // Now the turns for each mini board are updated\n console.log(\"Board turns:\", game.boardTurns[x][y])\n console.log(\"turn count: \" + game.turns)\n\n // Set Logic for piece placement next time around (needs alpha changes)\n for (var i = 0; i < 3; i++)\n {\n for (var j = 0; j < 3; j++)\n {\n for (var k = 0; k < 3; k++)\n {\n for (var l = 0; l < 3; l++)\n {\n if(i == x && j == y && k == lx && l == ly)\n game.redSquares[i][j][k][l].alpha = .7\n else\n game.redSquares[i][j][k][l].alpha = 0\n }\n }\n }\n }\n\n var connectedSquare = false\n\n for (var i = 0; i < 3; i++)\n {\n for (var j = 0; j < 3; j++)\n {\n //Normal functionality, just assign one open spot\n if(i == lx && j == ly && game.magicBoardLogic[i][j] != \"magic\")\n {\n console.log(\"i: \", i)\n console.log(\"j: \", j)\n console.log(\"lx: \", lx)\n console.log(\"ly: \", ly)\n game.bigBoardLogic[i][j] = \"open\"\n\n game.cursorSquares[i][j].alpha = .7\n\n }\n // If the click on a open spot sends you to magic board\n else if (i == lx && j == ly && game.magicBoardLogic[i][j] === \"magic\")\n {\n for (var i = 0; i < 3; i++)\n {\n for (var j = 0; j < 3; j++)\n {\n // Set all squares to closed\n game.bigBoardLogic[i][j] = \"closed\"\n game.cursorSquares[i][j].alpha = 0\n }\n }\n\n if (lx+1 < 3) {\n game.bigBoardLogic[lx+1][ly] = \"open\" // Right\n game.cursorSquares[lx+1][ly].alpha = .7\n if (lx+1 == x && ly == y)\n connectedSquare = true\n }\n\n if (lx-1 > -1) {\n game.bigBoardLogic[lx-1][ly] = \"open\" // Left\n game.cursorSquares[lx-1][ly].alpha = .7\n if (lx-1 == x && ly == y)\n connectedSquare = true\n }\n\n if (ly+1 < 3) {\n game.bigBoardLogic[lx][ly+1] = \"open\" // Bottom\n game.cursorSquares[lx][ly+1].alpha = .7\n if (lx == x && ly+1 == y)\n connectedSquare = true\n }\n\n if (ly-1 > -1) {\n game.bigBoardLogic[lx][ly-1] = \"open\" // Top\n game.cursorSquares[lx][ly-1].alpha = .7\n if (lx == x && ly-1 == y)\n connectedSquare = true\n }\n\n if (lx+1 < 3 && ly-1 > -1) {\n game.bigBoardLogic[lx+1][ly-1] = \"open\" // Top right\n game.cursorSquares[lx+1][ly-1].alpha = .7\n if (lx+1 == x && ly-1 == y)\n connectedSquare = true\n }\n\n if (lx-1 > -1 && ly-1 > -1) {\n game.bigBoardLogic[lx-1][ly-1] = \"open\" // Top left\n game.cursorSquares[lx-1][ly-1].alpha = .7\n if (lx-1 == x && ly-1 == y)\n connectedSquare = true\n }\n\n if (lx+1 < 3 && ly+1 < 3) {\n game.bigBoardLogic[lx+1][ly+1] = \"open\" // Bottom right\n game.cursorSquares[lx+1][ly+1].alpha = .7\n if (lx+1 == x && ly+1 == y)\n connectedSquare = true\n }\n\n if (lx-1 > -1 && ly+1 < 3) {\n game.bigBoardLogic[lx-1][ly+1] = \"open\" // Bottom left\n game.cursorSquares[lx-1][ly+1].alpha = .7\n if (lx-1 == x && ly+1 == y)\n connectedSquare = true\n }\n\n for (var i = 0; i < 3; i++)\n {\n for (var j = 0; j < 3; j++)\n {\n\n if (game.magicBoardLogic[i][j] === \"magic\")\n game.cursorSquares[i][j].alpha = 0\n }\n }\n\n // If you get stuck, open up outer layer\n var stuck = true\n for (var i = 0; i < 3; i++)\n {\n for (var j = 0; j < 3; j++)\n {\n if (game.bigBoardLogic[i][j] === \"open\" && game.magicBoardLogic[i][j] != \"magic\")\n stuck = false\n }\n }\n\n if (stuck == true) {\n console.log(\"STUCK\");\n if (lx+2 < 3) {\n console.log(\"A\");\n game.bigBoardLogic[lx+2][ly] = \"open\" // Right\n game.cursorSquares[lx+2][ly].alpha = .7\n if (lx+2 == x && ly == y)\n connectedSquare = true\n }\n\n if (lx+2 < 3 && ly-1 > -1) {\n console.log(\"A1\");\n game.bigBoardLogic[lx+2][ly-1] = \"open\" // Right 2 up 1\n game.cursorSquares[lx+2][ly-1].alpha = .7\n if (lx+2 == x && ly-1 == y)\n connectedSquare = true\n }\n\n if (lx+1 < 3 && ly-2 > -1) {\n console.log(\"A2\");\n game.bigBoardLogic[lx+1][ly-2] = \"open\" // Right 1 up 2\n game.cursorSquares[lx+1][ly-2].alpha = .7\n if (lx+1 == x && ly-2 == y)\n connectedSquare = true\n }\n\n if (lx+1 < 3 && ly+2 < 3) {\n console.log(\"A3\");\n game.bigBoardLogic[lx+1][ly+2] = \"open\" // Right 1 down 2\n game.cursorSquares[lx+1][ly+2].alpha = .7\n if (lx+1 == x && ly+2 == y)\n connectedSquare = true\n }\n\n if (lx+2 < 3 && ly+1 < 3) {\n console.log(\"A4\");\n game.bigBoardLogic[lx+2][ly+1] = \"open\" // Right 2 down 1\n game.cursorSquares[lx+2][ly+1].alpha = .7\n if (lx+2 == x && ly+1 == y)\n connectedSquare = true\n }\n\n if (lx-2 > -1) {\n console.log(\"B\");\n game.bigBoardLogic[lx-2][ly] = \"open\" // Left\n game.cursorSquares[lx-2][ly].alpha = .7\n if (lx-2 == x && ly == y)\n connectedSquare = true\n }\n\n if (lx-2 > -1 && ly-1 > -1) {\n console.log(\"B1\");\n game.bigBoardLogic[lx-2][ly-1] = \"open\" // Left 2 up 1\n game.cursorSquares[lx-2][ly-1].alpha = .7\n if (lx-2 == x && ly-1 == y)\n connectedSquare = true\n }\n\n if (lx-1 > -1 && ly-2 > -1) {\n console.log(\"B2\");\n game.bigBoardLogic[lx-1][ly-2] = \"open\" // Left 1 up 2\n game.cursorSquares[lx-1][ly-2].alpha = .7\n if (lx-1 == x && ly-2 == y)\n connectedSquare = true\n }\n\n if (lx-1 > -1 && ly+2 < 3) {\n console.log(\"B3\");\n game.bigBoardLogic[lx-1][ly+2] = \"open\" // Left 1 down 2\n game.cursorSquares[lx-1][ly+2].alpha = .7\n if (lx-1 == x && ly+2 == y)\n connectedSquare = true\n }\n\n if (lx-2 > -1 && ly+1 < 3) {\n console.log(\"B4\");\n game.bigBoardLogic[lx-2][ly+1] = \"open\" // Left 2 down 1\n game.cursorSquares[lx-2][ly+1].alpha = .7\n if (lx-2 == x && ly+1 == y)\n connectedSquare = true\n }\n\n if (ly+2 < 3) {\n console.log(\"C\");\n game.bigBoardLogic[lx][ly+2] = \"open\" // Bottom\n game.cursorSquares[lx][ly+2].alpha = .7\n if (lx == x && ly+2 == y)\n connectedSquare = true\n }\n\n if (ly-2 > -1) {\n console.log(\"D\");\n game.bigBoardLogic[lx][ly-2] = \"open\" // Top\n game.cursorSquares[lx][ly-2].alpha = .7\n if (lx == x && ly-2 == y)\n connectedSquare = true\n }\n\n if (lx+2 < 3 && ly-2 > -1) {\n console.log(\"E\");\n game.bigBoardLogic[lx+2][ly-2] = \"open\" // Top right\n game.cursorSquares[lx+2][ly-2].alpha = .7\n if (lx+2 == x && ly-2 == y)\n connectedSquare = true\n }\n\n if (lx-2 > -1 && ly-2 > -1) {\n console.log(\"F\");\n game.bigBoardLogic[lx-2][ly-2] = \"open\" // Top left\n game.cursorSquares[lx-2][ly-2].alpha = .7\n if (lx-2 == x && ly-2 == y)\n connectedSquare = true\n }\n\n if (lx+2 < 3 && ly+2 < 3) {\n console.log(\"g\");\n game.bigBoardLogic[lx+2][ly+2] = \"open\" // Bottom right\n game.cursorSquares[lx+2][ly+2].alpha = .7\n if (lx+2 == x && ly+2 == y)\n connectedSquare = true\n }\n\n if (lx-2 > -1 && ly+2 < 3) {\n console.log(\"H\");\n game.bigBoardLogic[lx-2][ly+2] = \"open\" // Bottom left\n game.cursorSquares[lx-2][ly+2].alpha = .7\n if (lx-2 == x && ly+2 == y)\n connectedSquare = true\n }\n }\n\n for (var i = 0; i < 3; i++)\n {\n for (var j = 0; j < 3; j++)\n {\n\n if (game.magicBoardLogic[i][j] === \"magic\")\n game.cursorSquares[i][j].alpha = 0\n }\n }\n\n }\n else\n {\n game.bigBoardLogic[i][j] = \"closed\"\n game.cursorSquares[i][j].alpha = 0\n }\n }\n }\n\n game.printBoardLogic() //this is printing weird but logic is fine\n\n var turn = game.isXTurn ? \"x\" : \"o\"\n if(game.singleplayer || game.vsAi)\n game.turnStatusText.setText(\"Current Turn: \" + turn.toUpperCase())\n // Below is for multiplayer\n else if(game.player === turn)\n game.turnStatusText.setText(\"Your Turn\")\n else\n game.turnStatusText.setText(game.opponent + \"'s turn\")\n }", "function drawBoard() {\n $(\"#board\").html('');\n for (var i = 0; i < board.length; i++) {\n var rowDiv;\n if (i % DIM == 0) {\n rowDiv = $(\"<div>\").attr(\"id\", getRowId(i)).addClass(\"row\").appendTo(\"#board\");\n }\n\n $('<div/>')\n .attr(\"id\", getCellId(board[i]))\n .addClass(\"btn btn-primary\")\n .text(board[i])\n .appendTo(rowDiv)\n .css(\"width\", WIDTH).css(\"height\", HEIGHT)\n .on(\"click\", notifyClick);\n }\n\n // Hide the empty cell.\n $(\"#cell-0\").invisible();\n }", "function selectSquare(square) {\n // Square status\n var playerFigure;\n\n if (playerOne.turn) {\n square.value = playerOne.figure;\n playerFigure = playerOne.figure;\n } else if (playerTwo.turn) {\n square.value = playerTwo.figure;\n playerFigure = playerTwo.figure;\n } else {\n console.log(\"Error: No player selected\");\n }\n\n customSquare(square, playerFigure);\n nextTurn();\n square.disabled = \"disabled\";\n\n // Win Condition\n let row_index = parseInt(square.getAttribute(\"data-row-index\"));\n let col_index = parseInt(square.getAttribute(\"data-col-index\"));\n evaluateBoard(row_index, col_index, playerFigure);\n}", "function selectCell() {\n let highlighting = false;\n OUTER: for (let row of grid) {\n for (let cell of row) {\n if (cell.highlight != null) {\n highlighting = true;\n cell.highlight = null;\n cell.owner = playersTurn;\n if (checkWin(cell.row, cell.col)) {\n gameOver = true;\n }\n break OUTER;\n }\n }\n }\n\n //do not allow selection if no highlighting\n if (!highlighting) {\n return;\n }\n\n //checks for a tied game\n if (!gameOver) {\n gameTied = true;\n OUTER: for (let row of grid) {\n for (let cell of row) {\n if (cell.owner == null) {\n gameTied = false;\n break OUTER;\n }\n }\n }\n\n if (gameTied) {\n gameOver = true;\n }\n }\n\n //switch the player if the game is not over\n if (!gameOver) {\n playersTurn = !playersTurn;\n }\n}", "function changeStateForSelection(selection) {\n const temp = statesBody.select(\"#temp\");\n\n const $selected = $body.querySelector(\"div.selected\");\n const stateNew = +$selected.dataset.id;\n const color = pack.states[stateNew].color || \"#ffffff\";\n\n selection.forEach(function (i) {\n const exists = temp.select(\"polygon[data-cell='\" + i + \"']\");\n const stateOld = exists.size() ? +exists.attr(\"data-state\") : pack.cells.state[i];\n if (stateNew === stateOld) return;\n if (i === pack.states[stateOld].center) return;\n\n // change of append new element\n if (exists.size()) exists.attr(\"data-state\", stateNew).attr(\"fill\", color).attr(\"stroke\", color);\n else\n temp\n .append(\"polygon\")\n .attr(\"data-cell\", i)\n .attr(\"data-state\", stateNew)\n .attr(\"points\", getPackPolygon(i))\n .attr(\"fill\", color)\n .attr(\"stroke\", color);\n });\n}", "selectSquare(currPlayer, color,nxtPlayer ){\n this.element.querySelector(\".face-container\").querySelector(\".facedown\").innerHTML = '<p>'+currPlayer.toUpperCase()+'</p>';\n this.element.querySelector(\".face-container\").querySelector(\".facedown\").style.color = color;\n this.choice = currPlayer;\n this.checkForWinner();\n this.checkForDraw();\n player = nxtPlayer;\n turn ++;\n }", "function selectCell(cell) {\n\n\tvar x = cell.id.split(\"\")[0];\n\tvar y = cell.id.split(\"\")[1];\n\t\n\t// You clicked .. ?\n\tif(who == 1 && gameIsDone == false) {\n\t\tvar move = placeMove(x, y, YOU);\n\t\tif (move == true) {\n\t\t\tif(document.getElementById(\"btnStart\").disabled == false) {\n\t\t\t\tdocument.getElementById(\"btnStart\").innerHTML = \"Restart\"\n\t\t\t\tdocument.getElementById(\"btnStart\").setAttribute( \"onClick\", \"restartGame()\" );\n\t\t\t}\n\t\t\tcell.innerHTML = \"X\";\n\t\t\twho = 0;\n\t\t}\n\t}\n\n\tcheckGameState()\n\n\tif(cellsAvailable(board).length == 0 && gameIsOver(board) == 0) {\n\t\tvar mess = document.getElementById(\"message\");\n\t\tmess.innerHTML = \"DRAW\";\n\n\t\tdocument.getElementById(\"btnStart\").innerHTML = \"Restart\"\n\t\tdocument.getElementById(\"btnStart\").setAttribute( \"onClick\", \"restartGame()\" );\n\n\t\tgameIsDone = true;\n\t}\n\n\tif(who == 0 && cellsAvailable(this.board).length != 0) {\n\t\tbotTurn();\n\t}\n}", "function boardWin() {\r\n}", "function clearBoard(){\n reset();\n dom.selectOption.querySelector(\"#custom\").selected = 'selected';\n}", "function selectSym(sym){\r\n huPlayer = sym;\r\n aiPlayer = sym==='O' ? 'X' :'O';\r\n origBoard = Array.from(Array(9).keys());\r\n for (let i = 0; i < cells.length; i++) {\r\n cells[i].addEventListener('click', turnClick, false);\r\n };\r\n if (aiPlayer === 'X') {\r\n turn(bestSpot(),aiPlayer);\r\n };\r\n document.querySelector('.selectSym').style.display = \"none\";\r\n}", "function setCell(row, column, value) {\n \t$scope.game.board[row][column] = value;\n $scope.game.$save();\n\n }", "function render() {\n board.forEach(function(move, index) {\n if (move === 1) {\n move = 'x';\n } if (move === -1) {\n move = 'o';\n }\n cells[index].textContent = move;\n cells[index].style.background = colors[cells];\n });\n}", "updateBoard() {\r\n for (let tile in this.gameState.state) {\r\n if (this.gameState.state[tile] !== 0) {\r\n $(\"#\"+tile).html((this.gameState.state[tile] === 1) ? this.playerSymbols[0] : this.playerSymbols[1]);\r\n } else {\r\n $(\"#\"+tile).html(\"\");\r\n }\r\n }\r\n //Check for winner, otherwise check for no free spaces (tie)\r\n let winState = this.gameState.checkWin();\r\n if (winState.win) {\r\n this.winner(winState);\r\n } else if(this.gameState.freeSpaces().length === 0) {\r\n this.tie();\r\n }\r\n }", "function updateBoard(event, column, row){\n let spot = boardState.board[row][column];\n if(spot === '( )'){\n if(boardState.whosTurn === 'x'){\n boardState.board[row][column] = '(x)';\n event.target.innerHTML = '(x)';\n boardState.whosTurn = 'o';\n document.getElementById('whosturn').innerHTML = \"its O's turn..\";\n boardState.turns++;\n } else {\n boardState.board[row][column] = '(o)';\n event.target.innerHTML = '(o)';\n boardState.whosTurn = 'x';\n document.getElementById('whosturn').innerHTML = \"its X's turn..\";\n boardState.turns++;\n }\n checkWinConditions();\n checkForWin();\n } else {\n console.log('that spot is taken...');\n }\n}", "selectSquare(currPlayer, color,nxtPlayer ){\n this.element.querySelector(\".face-container\").querySelector(\".facedown\").innerHTML = '<p>'+currPlayer.toUpperCase()+'</p>';\n this.element.querySelector(\".face-container\").querySelector(\".facedown\").style.color = color;\n this.choice = currPlayer;\n this.checkForWinner();\n this.checkForDraw();\n player = nxtPlayer\n turn ++;\n }", "function placePiece(row, col, color){\n //start and end are arrays with the starting and ending indices of the pieces boxing in those to be changed\n if(color == \"white\")\n { \n cells[row*8+col].innerHTML = '<w class=\"white-piece\" id=\"'+nextwhitePieceId+'\"></w>';\n //console.log(\"THIS IS CELL:\" + cells[row*8+col])\n whitesPieces = document.querySelectorAll(\"w\");\n board[row][col] = nextwhitePieceId;\n nextwhitePieceId+=2; \n }\n else{\n cells[row*8+col].innerHTML = '<b class=\"black-piece\" id=\"'+nextblackPieceId+'\"></b>';\n blacksPieces = document.querySelectorAll(\"b\");\n board[row][col] = nextblackPieceId;\n nextblackPieceId+=2;\n } \n replaceMiddlePieces(row,col)\n changePlayer(true);\n}", "function changeCurrentRow(){\r\n currentRow -= 1;\r\n var mult = 4;\r\n\r\n currentBoardCells = [\r\n \"board\" + (currentRow*mult-4), \r\n \"board\" + (currentRow*mult-3), \r\n \"board\" + (currentRow*mult-2), \r\n \"board\" + (currentRow*mult-1)];\r\n currentPegCells = [\r\n \"peg\" + (currentRow*mult-4), \r\n \"peg\" + (currentRow*mult-3), \r\n \"peg\" + (currentRow*mult-2), \r\n \"peg\" + (currentRow*mult-1)];\r\n }", "function spaceSelectO(e){\n\n if (w >= 551){\n\n e.target.style.cssText = 'color: white; margin: 0px; padding: 0px; font-size: 100px;';\n } else if (w <= 550) {\n e.target.style.cssText = 'color: white; margin: 0px; padding: 0px; font-size: 75px;';\n } \n e.target.textContent = 'O';\n gameBoard.push('O')\n \n }", "function updateBoard() {\n // Clear the canvas\n board.clear();\n\n // Draw older gen ghosts\n var colors = [\"#777777\", \"#999999\", \"#BBBBBB\", \"#DDDDDD\", \"#EEEEEE\"];\n for (var gen = 0; gen < genGhosts.length; gen++) {\n drawGen(genGhosts[gen], colors[gen]);\n }\n\n // Draw current gen\n drawGen(currentGen, \"#555555\");\n }", "function resetBoard() {\n // reset any colored cells\n $(\"#chessboard td\").removeClass(\"start\");\n $(\"#chessboard td\").removeClass(\"end\");\n $(\"#chessboard td\").removeClass(\"path\");\n\n // remove any path counters on the board\n $(\".counter\").remove();\n\n // reset start and end points\n start = null;\n end = null;\n\n // reset displayed cell number\n $(\"#output\").html('Please select a source and destination cell.');\n}", "function updateBoard(player, approvedMove){\n let activeCell;\n for(let i = 1; i <= 100; i++){\n activeCell = document.getElementById(i);\n if(approvedMove[i]){\n activeCell.classList.remove('permission');\n }\n if(i === player.colIdWarrior){\n if (activeCell.className === 'knife') {\n activeCell.classList.remove('knife');\n activeCell.classList.add(player.weapon);\n player.weapon = 'knife';\n } else if (activeCell.className === 'star') {\n activeCell.classList.remove('star');\n activeCell.classList.add(player.weapon);\n player.weapon = 'star';\n } else if (activeCell.className === 'star2') {\n activeCell.classList.remove('star2');\n activeCell.classList.add(player.weapon);\n player.weapon = 'star2';\n } else if (activeCell.className === 'tool') {\n activeCell.classList.remove('tool');\n activeCell.classList.add(player.weapon);\n player.weapon = 'tool';\n } else if (activeCell.className === 'sword') {\n activeCell.classList.remove('sword');\n activeCell.classList.add(player.weapon);\n player.weapon = 'sword';\n } else {\n }\n\n activeCell.style.backgroundImage = `url('img/${player.img}.png'), url('img/${player.weapon}.png')`;\n }\n }\n }", "changeDifficulty(rows, cols) {\n \n this.setState(() => ({\n theBoard: this.initTempBoard(rows, cols),\n gameStarted: false\n }))\n\n this.props.stopTimer();\n this.props.resetTimer();\n }", "function addBoard(boardId, height, width) {\n var hCanvas = (parseInt(height)-120);\n var wCanvas = (parseInt((parseInt(width) / 100) * 98));\n /*set column height of board to equal screen height*/\n $('#bord').before('<div class=\"board-col\" id = \"bord' + boardId + '\" style=\"width: '+ wCanvas +'px; height: '+ hCanvas + 'px; position: absolute; z-index: 1000001;\">'\n + '<div id=\"menu' + boardId + '\" class=\"board_menu\"><div style=\"float: left;padding-bottom:0px;padding-left: 10px;\">Whiteboard</div>'\n + '<a type=\"button\" style=\"float:right;\" id = \"delete_board' + boardId + '\"><i class=\"fas fa-times boardicon\" style=\"padding:5px 5px 3px 5px;\"></i></a>'\n + '<a type=\"button\" style=\"float:right;\" id = \"max_board' + boardId + '\"><i class=\"fas fa-window-restore boardicon\" style=\"padding:5px 5px 0px 5px;\"></i></a>'\n + '<a type=\"button\" style=\"float:right;\" id = \"min_board' + boardId + '\"><i class=\"fas fa-window-minimize boardicon\" style=\"padding:5px 5px 3px 15px;\"></i></a>'\n + '<div class=\"dropdown\"><button class=\"dropbtn-menu dropdown-whiteboard\" id = \"clr_board' + boardId + '\">Colour</button>'\n + '<div class=\"dropdown-content dropdown-whiteboard\" style=\"min-width: 100px;\">'\n + '<a type=\"button\" id = \"color_blue\"><i class=\"fas fa-tint boardicon-blue\" style=\"padding:5px 10px 5px 5px;\"></i>Blue</a>'\n + '<a type=\"button\" id = \"color_red\"><i class=\"fas fa-tint boardicon-red\" style=\"padding:5px 10px 5px 5px;\"></i>Red</a>'\n + '<a type=\"button\" id = \"color_yellow\"><i class=\"fas fa-tint boardicon-yellow\" style=\"padding:5px 10px 5px 5px;\"></i>Yellow</a>'\n + '<a type=\"button\" id = \"color_green\"><i class=\"fas fa-tint boardicon-green\" style=\"padding:5px 10px 5px 5px;\"></i>Green</a>'\n + '<a type=\"button\" id = \"color_black\"><i class=\"fas fa-tint boardicon-black\" style=\"padding:5px 10px 5px 5px;\"></i>Black</a>'\n + '</div>'\n + '</div>'\n + '<div class=\"dropdown\"><button class=\"dropbtn-menu dropdown-whiteboard\" id = \"clr_board' + boardId + '\">Size</button>'\n + '<div class=\"dropdown-content dropdown-whiteboard\" style=\"min-width: 100px;\">'\n + '<a type=\"button\" id = \"width5\"><i class=\"fas fa-pen boardicon-pen5\" style=\"padding:5px 10px 5px 5px;\"></i>50</a>'\n + '<a type=\"button\" id = \"width4\"><i class=\"fas fa-pen boardicon-pen4\" style=\"padding:5px 11px 5px 5px;\"></i>40</a>'\n + '<a type=\"button\" id = \"width3\"><i class=\"fas fa-pen boardicon-pen3\" style=\"padding:5px 12px 5px 5px;\"></i>30</a>'\n + '<a type=\"button\" id = \"width2\"><i class=\"fas fa-pen boardicon-pen2\" style=\"padding:5px 13px 5px 5px;\"></i>20</a>'\n + '<a type=\"button\" id = \"width1\"><i class=\"fas fa-pen boardicon-pen1\" style=\"padding:5px 14px 5px 5px;\"></i>10</a>'\n + '</div>'\n + '</div>'\n + '<div class=\"dropdown\"><button class=\"dropbtn-menu dropdown-whiteboard\" id = \"clr_board' + boardId + '\">Eraser</button>'\n + '<div class=\"dropdown-content dropdown-whiteboard\" style=\"min-width: 100px;\">'\n + '<a type=\"button\" id = \"erase5\"><i class=\"fas fa-eraser boardicon-pen5\" style=\"padding:5px 10px 5px 5px;\"></i>50</a>'\n + '<a type=\"button\" id = \"erase4\"><i class=\"fas fa-eraser boardicon-pen4\" style=\"padding:5px 11px 5px 5px;\"></i>40</a>'\n + '<a type=\"button\" id = \"erase3\"><i class=\"fas fa-eraser boardicon-pen3\" style=\"padding:5px 12px 5px 5px;\"></i>30</a>'\n + '<a type=\"button\" id = \"erase2\"><i class=\"fas fa-eraser boardicon-pen2\" style=\"padding:5px 13px 5px 5px;\"></i>20</a>'\n + '<a type=\"button\" id = \"erase1\"><i class=\"fas fa-eraser boardicon-pen1\" style=\"padding:5px 14px 5px 5px;\"></i>10</a>'\n + '</div>'\n + '</div>'\n + '<div class=\"dropdown\"><button class=\"dropbtn-menu dropdown-whiteboard\" id = \"clr_board' + boardId + '\">Draw</button>'\n + '<div class=\"dropdown-content dropdown-whiteboard\" style=\"min-width: 100px;\">'\n + '<a type=\"button\" id = \"line7\"><i class=\"fas fa-arrows-alt-h boardicon-pen5\" style=\"padding:5px 10px 5px 5px;\"></i>Arrow</a>'\n + '<a type=\"button\" id = \"line6\"><i class=\"fas fa-arrow-right boardicon-pen5\" style=\"padding:5px 10px 5px 5px;\"></i>Arrow</a>'\n + '<a type=\"button\" id = \"line5\"><i class=\"fas fa-circle boardicon-pen4\" style=\"padding:5px 11px 5px 5px;\"></i>Circle</a>'\n + '<a type=\"button\" id = \"line4\"><i class=\"fas fa-square boardicon-pen3\" style=\"padding:5px 12px 5px 5px;\"></i>Square</a>'\n + '<a type=\"button\" id = \"line3\"><i class=\"fas fa-slash boardicon-pen2\" style=\"padding:5px 13px 5px 5px;\"></i>Line</a>'\n + '<a type=\"button\" id = \"line2\"><i class=\"fas fa-signature boardicon-pen1\" style=\"padding:5px 14px 5px 5px;\"></i>Draw</a>'\n + '<a type=\"button\" id = \"line1\"><i class=\"fas fa-caret-up boardicon-pen0\" style=\"padding:5px 14px 5px 5px;\"></i>Triangle</a>'\n + '</div>'\n + '</div>'\n + '<label class=\"color-picker\"><input type=\"color\" id=\"selectColor\" style=\"float:right; visibility: hidden;\"/><div id=\"selectClr\" class=\"fas fa-eye-dropper boardicon-select\" style=\"padding: 5px 5px 3px 5px; color: #000000\"></div></label>'\n + '<a type=\"button\" style=\"float:right;\" id = \"board_BG\"><i class=\"fas fa-clone boardicon-clone\" style=\"padding:5px 5px 3px 5px;\"></i></a>'\n + '<a type=\"button\" style=\"float:right;\" id = \"resize\"><i class=\"fas fa-compress boardicon-save\" style=\"padding:5px 5px 3px 5px;\"></i></a>'\n + '<a type=\"button\" style=\"float:right;\" id = \"downloadLnk\"><i class=\"fas fa-save boardicon-save\" style=\"padding:5px 5px 3px 5px;\"></i></a>'\n + '<input type=\"text\" style=\"float:right; font-weight: 100; font-size: 10pt; width: 150px; display: none;\" id=\"fileName\" name=\"fileName\"/>'\n + '<label class=\"color-picker\"><input type=\"file\" style=\"float:right; font-weight: 100; font-size: 10pt; width: 5px; visibility: hidden;\" id=\"imageLoader\" name=\"imageLoader\"/><div id=\"selectClr\" class=\"fas fa-file boardicon-select\" style=\"padding: 5px 5px 3px 5px; color: #000000\"></div></label>'\n + '<div style=\"padding: 0px;\"><BR>'\n + '<canvas id=\"canvas\" width = ' + parseInt(wCanvas-3) + ' height = ' + parseInt(hCanvas-45) + ' onmouseout=\"clearMousePositions()\"></canvas>'\n + '</div></div></div>');\n\n /*Set column dragable*/\n $('#bord' + boardId).attr('draggable', 'false');\n\n var imageLoader = document.getElementById('imageLoader');\n imageLoader.addEventListener('change', loadImage, false);\n\n downloadLnk.addEventListener('click', downloadFiles, false);\n\n var selectColor = document.getElementById('selectColor');\n selectColor.addEventListener('change', userColor, false);\n\n /*Delete selected column. */\n $('a[id ^= \"delete_board' + boardId + '\"]').on('click', function (event) {\n var column = $(this).parent().parent().attr('id');\n $('#' + column).remove();\n });\n\n $('a[id ^= \"min_board' + boardId + '\"]').on('click', function (event) {\n var column = $(this).parent().parent().attr('id');\n $('#' + column).css({ \"height\": \"150px\" });\n });\n\n $('a[id ^= \"max_board' + boardId + '\"]').on('click', function (event) {\n var column = $(this).parent().parent().attr('id');\n $('#' + column).css({ \"height\": \"\" });\n });\n\n canvas = $(\"#canvas\");\n ctx = canvas[0].getContext('2d');\n var hCanvas = (parseInt(pageHeight));\n var wCanvas = ((parseInt(pageWidth) / 100) * 98.5);\n ctx.fillStyle = \"#ffffff\";\n ctx.fillRect(0, 0, wCanvas, hCanvas);\n clr = 'black'; type = 'source-over'; drawType ='random';\n\n /*Set Colour of line*/\n $('a[id ^= \"color_black\"]').on('click', function (event) {\n clr = 'black';\n type = 'source-over';\n });\n $('a[id ^= \"color_red\"]').on('click', function (event) {\n clr = 'red';\n type = 'source-over';\n });\n $('a[id ^= \"color_yellow\"]').on('click', function (event) {\n clr = 'yellow';\n type = 'source-over';\n });\n $('a[id ^= \"color_green\"]').on('click', function (event) {\n clr = 'green';\n type = 'source-over';\n });\n $('a[id ^= \"color_blue\"]').on('click', function (event) {\n clr = 'blue';\n type = 'source-over';\n });\n /*Set width of line*/\n $('a[id ^= \"width1\"]').on('click', function (event) {\n wth = 1;\n type = 'source-over';\n });\n $('a[id ^= \"width2\"]').on('click', function (event) {\n wth = 3;\n type = 'source-over';\n });\n $('a[id ^= \"width3\"]').on('click', function (event) {\n wth = 5;\n type = 'source-over';\n });\n $('a[id ^= \"width4\"]').on('click', function (event) {\n wth = 8;\n type = 'source-over';\n });\n $('a[id ^= \"width5\"]').on('click', function (event) {\n wth = 10;\n type = 'source-over';\n });\n /*Set the action to erase and line width 10*/\n $('a[id ^= \"erase5\"]').on('click', function (event) {\n type = 'destination-out';\n wth = 12;\n drawType = 'random';\n });\n $('a[id ^= \"erase4\"]').on('click', function (event) {\n type = 'destination-out';\n wth = 10;\n drawType = 'random';\n });\n $('a[id ^= \"erase3\"]').on('click', function (event) {\n type = 'destination-out';\n wth = 8;\n drawType = 'random';\n });\n $('a[id ^= \"erase2\"]').on('click', function (event) {\n type = 'destination-out';\n wth = 6;\n drawType = 'random';\n });\n $('a[id ^= \"erase1\"]').on('click', function (event) {\n type = 'destination-out';\n wth = 4;\n drawType = 'random';\n });\n/*Set the action to select drawing tool*/\n $('a[id ^= \"line7\"]').on('click', function (event) {\n type = 'source-over';\n drawType = 'arrow2';\n });\n $('a[id ^= \"line6\"]').on('click', function (event) {\n type = 'source-over';\n drawType = 'arrow1';\n });\n $('a[id ^= \"line5\"]').on('click', function (event) {\n type = 'source-over';\n drawType = 'circle';\n });\n $('a[id ^= \"line4\"]').on('click', function (event) {\n wth = 1;\n type = 'source-over';\n drawType = 'square';\n });\n $('a[id ^= \"line3\"]').on('click', function (event) {\n type = 'source-over';\n drawType = 'straight';\n });\n $('a[id ^= \"line2\"]').on('click', function (event) {\n type = 'source-over';\n drawType = 'random';\n });\n $('a[id ^= \"line1\"]').on('click', function (event) {\n type = 'source-over';\n drawType = 'triangle';\n });\n /*Set background color between white and transparent*/\n $('a[id ^= \"board_BG\"]').on('click', function (event) {\n $(\"#bord\" + boardId).toggleClass(\"board-col-bg\");\n\n var hCanvas = (parseInt(pageHeight));\n var wCanvas = ((parseInt(pageWidth) / 100) * 98.5);\n ctx.clearRect(0, 0, wCanvas, hCanvas);\n });\n /*Set resize of image and canvas*/\n $('a[id ^= \"resize\"]').on('click', function (event) {\n var hCanvas = (parseInt(pageHeight));\n var wCanvas = ((parseInt(pageWidth) / 100) * 98.5);\n var pDiv = 'bord' + boardId;\n resizeWhiteBoard(hCanvas, wCanvas, pDiv);\n\n });\n\n $(function () {\n $('.board-col').css('border', '1px solid grey');\n /*move the work area to the top as the item is dragged over the other work areas by increasing the z-index*/\n $(\"#bord\" + boardId).droppable({\n over: function (event, ui) {\n $(\"#\" + dragFrom).css(\"z-index\", colUAZindex++);\n }\n });\n });\n\n \"use strict\";\n\n var CLIPBOARD = new CLIPBOARD_CLASS(\"canvas\", false);\n\n connection = new signalR.HubConnectionBuilder()\n .withUrl('/draw')\n .build();\n\n /*connection.on('draw', function (prev_x, prev_y, x, y, clr, wth, type) {\n rawCanvas(prev_x, prev_y, x, y, clr, wth, type);\n });*/\n connection.start();\n\n // calculate where the canvas is on the window these vars will hold the starting mouse position\n var $canvas = $(\"#canvas\");\n var canvasOffset = $canvas.offset();\n var offsetX = canvasOffset.left;\n var offsetY = canvasOffset.top;\n var canvasx = $(canvas).offset().left;\n var canvasy = $(canvas).offset().top;\n var mousex = mousey = 0;\n // listen for mouse events\n $(\"#canvas\").mousedown(function (e) {\n if (drawType == 'square') {\n squareMouseDown(e, canvasOffset, offsetX, offsetY);\n }\n else if (drawType == 'random') {\n randomMouseDown(e, canvasOffset, canvasx, canvasy);\n }\n else if (drawType == 'circle') {\n circleMouseDown(e, canvasOffset, offsetX, offsetY);\n }\n else if (drawType == 'triangle') {\n triangleMouseDown(e, canvasOffset, offsetX, offsetY);\n }\n else if (drawType == 'straight') {\n lineMouseDown(e, canvasOffset, offsetX, offsetY);\n }\n else if (drawType == 'arrow1') {\n arrowLineMouseDown(e, offsetX, offsetY);\n }\n else if (drawType == 'arrow2') {\n arrowLineMouseDown(e, offsetX, offsetY);\n }\n });\n $(\"#canvas\").mousemove(function (e) {\n if (drawType == 'square') {\n squareMouseMove(e, canvasOffset, startX, startY, offsetX, offsetY);\n }\n else if (drawType == 'random') {\n randomMouseMove(e, canvasOffset, canvasx, canvasy, mousex, mousey);\n }\n else if (drawType == 'circle') {\n circleMouseMove(e, canvasOffset, offsetX, offsetY);\n }\n else if (drawType == 'triangle') {\n triangleMouseMove(e, canvasOffset, offsetX, offsetY);\n }\n else if (drawType == 'straight') {\n lineMouseMove(e, canvasOffset, offsetX, offsetY);\n }\n else if (drawType == 'arrow1') {\n arrowLineMouseMove(e);\n }\n else if (drawType == 'arrow2') {\n arrowLineMouseMove(e);\n }\n });\n $(\"#canvas\").mouseup(function (e) {\n if (drawType == 'square') {\n squareMouseUp(e);\n }\n else if (drawType == 'random') {\n randomMouseUp(e);\n }\n else if (drawType == 'circle') {\n circleMouseUp(e);\n }\n else if (drawType == 'triangle') {\n triangleMouseUp(e);\n }\n else if (drawType == 'straight') {\n lineMouseUp(e, offsetX, offsetY);\n }\n else if (drawType == 'arrow1') {\n arrowLineMouseUp(e, offsetX, offsetY, 5, 8, false, true);\n }\n else if (drawType == 'arrow2') {\n arrowLineMouseUp(e, offsetX, offsetY, 5, 8, true, true);\n }\n });\n $(\"#canvas\").mouseout(function (e) {\n if (drawType == 'square') {\n squareMouseOut(e);\n }\n else if (drawType == 'random') {\n randomMouseOut(e);\n }\n else if (drawType == 'circle') {\n circleMouseOut(e);\n }\n else if (drawType == 'triangle') {\n triangleMouseOut(e);\n }\n else if (drawType == 'straight') {\n lineMouseOut(e);\n }\n else if (drawType == 'arrow1') {\n arrowLineMouseOut(e);\n }\n else if (drawType == 'arrow2') {\n arrowLineMouseOut(e);\n }\n });\n\n //reset last mouse position back to home \n clearMousePositions = function () {\n last_mousex = 0;\n last_mousey = 0;\n }\n}", "function makeMove(number) {\n document.getElementById(selectedPiece.pieceId).remove();\n cells[selectedPiece.indexOfBoardPiece].innerHTML = \"\";\n if (turn) {\n if (selectedPiece.isKing) {\n cells[selectedPiece.indexOfBoardPiece + number].innerHTML = `<p class=\"red-piece king\" id=\"${selectedPiece.pieceId}\"></p>`;\n redsPieces = document.querySelectorAll(\"p\");\n } else {\n cells[selectedPiece.indexOfBoardPiece + number].innerHTML = `<p class=\"red-piece\" id=\"${selectedPiece.pieceId}\"></p>`;\n redsPieces = document.querySelectorAll(\"p\");\n }\n } else {\n if (selectedPiece.isKing) {\n cells[selectedPiece.indexOfBoardPiece + number].innerHTML = `<span class=\"blue-piece king\" id=\"${selectedPiece.pieceId}\"></span>`;\n bluecksPieces = document.querySelectorAll(\"span\");\n } else {\n cells[selectedPiece.indexOfBoardPiece + number].innerHTML = `<span class=\"blue-piece\" id=\"${selectedPiece.pieceId}\"></span>`;\n bluecksPieces = document.querySelectorAll(\"span\");\n }\n }\n\n let indexOfPiece = selectedPiece.indexOfBoardPiece\n if (number === 14 || number === -14 || number === 18 || number === -18) {\n changeData(indexOfPiece, indexOfPiece + number, indexOfPiece + number / 2);\n } else {\n changeData(indexOfPiece, indexOfPiece + number);\n }\n}", "function turnBased() {\n newBoard.highlightMoves(newBoard.activePlayer.character);\n $('.col').click((event) => {\n if ($(event.target).hasClass('highlight')) {\n let currentPlayerCell = Number($(`#${newBoard.activePlayer.character}`).attr('cell'));\n newBoard.movePlayer(newBoard.activePlayer.character);\n $(event.target).addClass('player').attr('id', `${newBoard.activePlayer.character}`);\n let newPlayerCell = Number($(`#${newBoard.activePlayer.character}`).attr('cell'));\n collectWeapon(newBoard.activePlayer, currentPlayerCell, newPlayerCell);\n newBoard.switchPlayer();\n if (fightCondition(newPlayerCell) === true) {\n alert('The fight starts now');\n startFight(newBoard.activePlayer, newBoard.passivePlayer);\n }\n else {\n newBoard.highlightMoves(newBoard.activePlayer.character);\n }\n }\n })\n }", "squareSelected (index) {\n if (this.isActive) {\n this.availableMoves = {}\n if (this.selectedIndex === index) {\n this.selectedIndex = -1\n } else if (this.selectedIndex > 0) {\n this.movePiece(this.selectedIndex, index)\n } else {\n this.selectedIndex = index\n this.displayAvailableMoves()\n }\n }\n }", "function setUpBoard () {\n makeCrystalScores();\n makeCrystalButtons();\n }", "function add_selected_class() {\n if(clicked.piece != '' & clicked.piece != null){\n selection = clicked;\n console.log('updated selection to clicked spot');\n }\n\n // remove the \"selected\" class from the last selection\n if (last_selector != '') {\n last_selector.removeClass(\"selected\");\n }\n\n\n\n //if selection is defined add the \"selected\" class to the div that was clicked\n if (clicked.piece != '') {\n\n \n last_selector = selector;\n\n selector = $(\"[column=\" + selection.col + \"][row=\" + selection.row + \"]\");\n\n selector.addClass(\"selected\");\n\n // how to update the piece on the newly clicked square\n // selector.attr(\"piece\", \"b_queen\");\n\n // remove the \"selected\" class from the last selection\n if (last_selector != '') {\n last_selector.removeClass(\"selected\");\n remove_moves = true;\n }\n\n piece= true;\n \n\n }\n\n // update last selector to remove \"selected\" class\n\n}", "function buildBoard(){\n self.ttt.boxes = [{select: false, status: \"\"},\n {select: false, status: \"\"},\n {select: false, status: \"\"},\n {select: false, status: \"\"},\n {select: false, status: \"\"},\n {select: false, status: \"\"},\n {select: false, status: \"\"},\n {select: false, status: \"\"},\n {select: false, status: \"\"}];\n self.ttt.$save();\n }", "function handleDivotSelection(pos)\n{\n var divot_col = Math.round((pos.x -30)/30); // divot, as in hole in the board for a marble.\n var divot_row = Math.round((pos.y -30)/30);\n if (board_grid[divot_col][divot_row]) {\n marbles(divot_col, divot_row);\n }\n}", "function ticTacToe(board) {\n\n}", "changeTurn() {\n let view = new View();\n\n if (moveMadeCount % 2 == 0) {\n this.move = 'X';\n view.togglePlayerActiveTurn(this.playerOne, this.playerTwo);\n } else {\n this.move = 'O';\n view.togglePlayerActiveTurn(this.playerTwo, this.playerOne);\n }\n }", "function Clicked(CellClicked){ \n if (typeof originalBoard[CellClicked.target.id]=='number'){\n if(PlayerDecide%2==1) {\n Show(CellClicked.target.id,FirstPlayer);\n PlayerDecide=PlayerDecide+1;\n }\n else { \n Show(CellClicked.target.id,SecondPlayer);\n PlayerDecide=PlayerDecide+1;\n }\n }\n}", "function changeTile(board, coordinates) {\n console.log(\"Entered changeTile\");\n if (board[coordinates.y][coordinates.x] === 1) {\n board[coordinates.y][coordinates.x] = 0;\n console.log(`Swapped x:${coordinates.x} y:${coordinates.y} to 0`);\n } else {\n board[coordinates.y][coordinates.x] = 1;\n console.log(`Swapped x:${coordinates.x} y:${coordinates.y} to 1`);\n }\n }", "tick() {\n let newBoard = this.makeBoard();\n let oldBoard = this.board;\n for(let z = 0; z<oldBoard.length; z++){\n let minArr = oldBoard[z];\n for(let x = 0; x<minArr.length; x++){\n if(this.livingNeighbors(z,x) < 2){\n newBoard[z][x] = 0;\n }\n else if(this.livingNeighbors(z,x) > 3){\n newBoard[z][x] = 0;\n }\n else if(oldBoard[z][x] === 0 && this.livingNeighbors(z,x) === 3){\n newBoard[z][x] = 1;\n } else {\n newBoard[z][x] = oldBoard[z][x]\n }\n }\n }\n this.board = newBoard;\n }", "function drawNewBoard (game) {\n ticTacToeGrid.style.opacity = ticTacToeCellTable.style.opacity = 1\n ticTacToeGrid.style.transform = ticTacToeGrid.style.webkitTransform =\n ticTacToeCellTable.style.transform = ticTacToeCellTable.style.webkitTransform = null\n displayMessage.style.opacity = winnerMessage.style.opacity = drawMessage.style.opacity = '0'\n displayMessage.style.transform = displayMessage.style.webkitTransform = null\n ticTacToeCellTable.removeEventListener('click', addMove)\n ticTacToeCellTable.removeEventListener('click', addMinimaxMove)\n Array.prototype.forEach.call(cells, function (cell) {\n cell.style.opacity = null\n cell.style.webkitTransform = null\n })\n var winningCells = document.getElementsByClassName('winning-cell')\n Array.prototype.forEach.call(winningCells, function (winningCell) {\n winningCell.classList.remove('winning-cell')\n })\n lines.forEach(function (line) {\n resetsLine(line, '120')\n drawLine(line, '0')\n })\n if (game.mode === '1') {\n ticTacToeCellTable.addEventListener('click', addMove)\n } else {\n ticTacToeCellTable.addEventListener('click', addMinimaxMove)\n }\n var symbols = document.querySelectorAll('.tic-tac-toe-cross-left, .tic-tac-toe-cross-right, .tic-tac-toe-nought')\n symbols.forEach(function (symbol) {\n resetsLine(symbol, '130')\n })\n var strikeThrough = document.getElementById('strikeThrough')\n if ((strikeThrough = document.getElementById('strikeThrough')) !== null) {\n strikeThrough.remove()\n }\n }", "function setBoard() {\n\n\t\tvar $parent = _$parent.find('#board-area');\n\t\tvar $input = $parent.find('#board-input');\n\t\tvar $btn = $parent.find('#board-write');\n\t \n\t\tajax('show');\n\t\tfunction ajax(action,val) {\n\n\t\t\t$.ajax({\n\t\t\t\ttype: 'GET',\n\t\t\t\tdataType: 'json',\n\t\t\t\turl : \"http://192.168.0.134:8888/tokyo/browser-insert/onigiri/data/board.php?act=\"+action+\"&content=\"+val,\n\t\t\t})\n\t\t\t.done(function(response) {\n\n\t\t\t\tvar json = $.parseJSON(response);\n\t\t\t\tif (json == null) return;\n\n\t\t\t\tconsole.log(json);\n\t\t\t\tvar html = \"\";\n\n\t\t\t\thtml += json['name'] + ':' + json['content'];\n\t\t\t\t$parent.append(html);\n\t\t\t});\n \n\t\t}\n\n\n\t\t$btn.on('click',function() {\n\n\t\t\tajax('write',$input.val());\n\n\t\t});\n\n\t}", "makePickingCells() {\n this.scene.pushMatrix();\n this.scene.rotate(Math.PI, 1, 0, 0);\n for (let i = 0; i < this.view.board.cells.length; i++) {\n this.scene.registerForPick(++this.scene.pickIndex, this.view.board.cells[i]);\n this.view.board.cells[i].display();\n }\n this.scene.popMatrix();\n }", "function printboard(board, x=-1, y=-1, change=\".\") {\n\tvar boardstr = \"\"\n\tfor (var i = 0; i < board.length; i++) {\n\t\tfor (var j = 0; j < board[i].length; j++){\n\t\t\tif (x == j && y == i) {\n\t\t\t\tboardstr += change+\" \";\n\t\t\t} else {\n\t\t\t\tboardstr += board[i][j]+\" \";\n\t\t\t}\n\t\t}\n\t\tboardstr += \"\\n\";\n\t}\n\tconsole.log(boardstr)\n}", "function handleSetupBoardClick(event) {\r\n //The only purpose of this event handler is to handle the setUp stage on the player's side of the board, so do nothing if it's not even in the set up stage.\r\n if (state.phase !== 'setup' || event.target.tagName !== 'DIV') {\r\n \r\n return;\r\n }\r\n \r\n let index = [parseInt(event.target.id[3]), parseInt(event.target.id[5])];\r\n\r\n //If there is no ship selected, and we click on a ship on the board that has already been placed, remove it and set it as shipPrimed.\r\n if (!state.shipPrimed) {\r\n \r\n if (event.target.classList.contains('active')) {\r\n \r\n let shipType = findShipType(event.target);\r\n //Re render the mouse over effects on the grid since when you click on a square, it doesn't move out of the square so it won't derender the squares that were activated before. Make it manually rerender.\r\n handlePlayerBoardMouseOut(event);\r\n removeShip(playerShipState, shipType);\r\n primeShip(shipType);\r\n handlePlayerBoardMouseOver(event);\r\n //We only need to render here because if a ship is removed and all the ships are used is the only case when the ready button's state should be set to unclickable again. If a ship was just merely replaced with another ship, it should have never been ready to begin with.\r\n render();\r\n return;\r\n }\r\n else {\r\n return;\r\n }\r\n } \r\n\r\n //Assuming the ship is primed, if the player clicks on a square in which the ship would overlap the edges of the game board, return and end function.\r\n //NOTE: I don't replace any ships that are already on the coordinate here, because if it does replace, it would be placed on a square that overlap the edges of the gameboard. I am making it so that the currently primed ship overlapping the edges has a higher priority than if there is already a ship there that needs to be replaced to make room for the primed ship.\r\n \r\n if (((state.orientation === 'horizontal') && (index[1] + playerShipState[state.shipPrimed].health.length - 1) > 9) ||\r\n ((state.orientation === 'vertical') && (index[0] + playerShipState[state.shipPrimed].health.length - 1) > 9)) {\r\n\r\n return;\r\n }\r\n \r\n\r\n //Assuming the ship is Primed and doesn't overlap, If the elements that the ship would have taken up are already taken by another ship, then replace that ship with the currently primed ship and set the ship that was previously there to shipPrimed. HOWEVER, if multiple ships exist on the squares it would take up, have it do nothing. If there are no ships there, just add the ship.\r\n // let neighborIndexes = getNeighborIndexes(index[0], index[1]);\r\n let neighboringShips = [];\r\n\r\n //This will loop through each neighboring element and push each unique ship type that exists in the neighboring elements into the neighboringShips Array.\r\n loopEachShipSquare(playerShipState, state.shipPrimed, (element) => {\r\n let shipType = findShipType(element);\r\n if (shipType) {\r\n if (neighboringShips.length === 0) {\r\n neighboringShips.push(shipType)\r\n } else if (neighboringShips.length > 0 && !neighboringShips.includes(shipType)) {\r\n neighboringShips.push(shipType);\r\n }\r\n };\r\n }, index[0], index[1]);\r\n\r\n //If there are multiple ships already on the square that the ship would take up, do nothing.\r\n if (neighboringShips.length > 1) {\r\n return;\r\n //If there are no ships on the neighboring squares, just add the ship.\r\n } else if (neighboringShips.length === 0 ) {\r\n addShip(playerShipState, state.shipPrimed, index[0], index[1]);\r\n //NOTE: We do not need to rerender mouse over effects because in this case, If a ship is added on an empty square, the squares that are animated are still the same even after placement. And it will be deanimated as long as we mouse out.\r\n //we only need to render here because, if the game is ready, the last ship should only be placed and not replaced.\r\n render();\r\n //If there is only 1 ship on the neighboring squares, replace the ship.\r\n } else if (neighboringShips.length === 1) {\r\n //Re render the mouse over effects.\r\n handlePlayerBoardMouseOut(event);\r\n removeShip(playerShipState, neighboringShips[0]);\r\n addShip(playerShipState, state.shipPrimed, index[0], index[1]);\r\n primeShip(neighboringShips[0]);\r\n handlePlayerBoardMouseOver(event);\r\n render();\r\n } \r\n\r\n \r\n}", "function turn(squareId, player){\n \n //the selected cell take the symbole of the current player (X or O)\n originalBoard[squareId] = player;\n document.getElementById(squareId).innerText = player;\n \n //test if Game is Won\n let gameWon = checkWin(originalBoard, player);\n //call Game Over if the game is Won\n if(gameWon) gameOver(gameWon);\n}", "function respondToBoardClick(event) {\n clickLocation = event.target.dataset.location;\n\n if (isValidMove()) {\n currentBoardArray[blankIndex] = currentBoardArray[clickLocation];\n currentBoardArray[clickLocation] = \"\";\n updateUI(clickLocation, blankIndex);\n checkForWinner();\n blankIndex = clickLocation;\n }\n }", "function setPiece() {\n clearCompleteRows();\n\n // To prevent dis-orientation, keep\n // the column where the user left it,\n // otherwise, put the new piece near\n // the top of the playfield.\n GameData.row = 3;\n GameData.activePiece = generatePiece();\n GameData.activePiece.reset();\n var grid = null;\n for(grid of GameData.activePiece.getOrientation()) {\n GameData.mainPlayField.setBlock(\n GameData.row + grid.getRow(),\n correctColumn(GameData.column + grid.getColumn()),\n GameData.activePiece.getType()\n );\n }\n}", "function move(i,j,piece) {\n\ti = Number(i);\n\tj = Number(j);\n\tconsole.log(i,j,piece);\n\tif ((piece.charAt(0) == 'b' && isWhite || piece.charAt(0) == 'w' && !isWhite) && !lookupTile(2,i,j).highlighted) {\n\t\treturn;\n\t} else if (lookupTile(2,i,j).highlighted) {\n\t\thandleSpecialMoveCheck(lookupTile(2,currSelectedPiece.i,currSelectedPiece.j),i,j);\n\t} else if (currSelectedPiece.i == i && currSelectedPiece.j == j) {\n\t\tresetHighlight();\n\t\tcurrSelectedPiece = {i:null, j:null};\n\t} else {\n\t\tresetHighlight();\n\t\tcurrSelectedPiece.i = i;\n\t\tcurrSelectedPiece.j = j;\n\t\tcurrSelectedPiece.piece = piece;\n\t\tswitch(piece.charAt(1)) {\n\t\t\tcase 'b':\n\t\t\t\thighlightBishop(i,j);\n\t\t\t\tbreak;\n\t\t\tcase 'h':\n\t\t\t\thighlightKnight(i,j);\n\t\t\t\tbreak;\n\t\t\tcase 'k':\n\t\t\t\thighlightKing(i,j);\n\t\t\t\tbreak;\n\t\t\tcase 'p':\n\t\t\t\thighlightPawn(i,j);\n\t\t\t\tbreak;\n\t\t\tcase 'q':\n\t\t\t\thighlightQueen(i,j);\n\t\t\t\tbreak;\n\t\t\tcase 'r':\n\t\t\t\thighlightRook(i,j);\n\t\t\t\tbreak;\n\t\t}\n\t}\n}", "function selectCell() {\n let highlighting = false;\n\n // Allow player to place a token in a cell.\n OUTER: for (let row of grid) {\n for (let cell of row) {\n if (cell.highlight !== null) {\n highlighting = true;\n cell.highlight = null;\n cell.owner = playerTurn;\n\n if (checkWin(cell.row, cell.col)) {\n gameOver = true;\n }\n\n break OUTER;\n }\n }\n }\n\n // Prohibit clicking on cells which are not empty.\n if (!highlighting) {\n return;\n }\n\n // Check to see if there is a draw.\n if (!gameOver) {\n gameTied = true;\n OUTER: for (let row of grid) {\n for (let cell of row) {\n if (cell.owner === null) {\n gameTied = false;\n break OUTER;\n }\n }\n }\n\n // Set game over.\n if (gameTied) {\n gameOver = true;\n }\n }\n\n // Switch player.\n if (!gameOver) {\n playerTurn = !playerTurn;\n }\n}", "setOriginalBoard(obj) {\r\n\t\tthis.originalBoard = SudokuBoard.cloneBoard(obj);\r\n\t}", "function drawboard(state, gstate, sstate){\n if (whoView == \"G\"){\n for (i in state){\n document.getElementById(i).innerHTML = \"<img src='images/\"+piecelang+\"Pieces/\"+switchPiece(state[i])+\".png' style='display:block;' width='99%' height='auto'>\"\n }\n for (i in gstate){\n if (gstate[i] != 0){\n document.getElementById(gstnc[i]).innerHTML = \"<img src='images/\"+piecelang+\"Pieces/\"+switchPiece(gstp[i])+\".png' style='display:block;' width='99%' height='auto'>\"\n document.getElementById(gstcnc[i]).innerHTML = gstate[i]\n } else {\n document.getElementById(gstnc[i]).innerHTML = \"<img src='images/\"+piecelang+\"Pieces/E.png' style='display:block;' width='99%' height='auto'>\"\n document.getElementById(gstcnc[i]).innerHTML = \"\"\n }\n }\n for (i in sstate){\n if (sstate[i] != 0){\n document.getElementById(sstnc[i]).innerHTML = \"<img src='images/\"+piecelang+\"Pieces/\"+switchPiece(sstp[i])+\".png' style='display:block;' width='99%' height='auto'>\"\n document.getElementById(sstcnc[i]).innerHTML = sstate[i]\n } else {\n document.getElementById(sstnc[i]).innerHTML = \"<img src='images/\"+piecelang+\"Pieces/E.png' style='display:block;' width='99%' height='auto'>\"\n document.getElementById(sstcnc[i]).innerHTML = \"\"\n }\n }\n } else {\n for (i in state){\n document.getElementById(i).innerHTML = \"<img src='images/\"+piecelang+\"Pieces/\"+state[i]+\".png' style='display:block;' width='99%' height='auto'>\"\n }\n for (i in gstate){\n if (gstate[i] != 0){\n document.getElementById(gstnc[i]).innerHTML = \"<img src='images/\"+piecelang+\"Pieces/\"+gstp[i]+\".png' style='display:block;' width='99%' height='auto'>\"\n document.getElementById(gstcnc[i]).innerHTML = gstate[i]\n } else {\n document.getElementById(gstnc[i]).innerHTML = \"<img src='images/\"+piecelang+\"Pieces/E.png' style='display:block;' width='99%' height='auto'>\"\n document.getElementById(gstcnc[i]).innerHTML = \"\"\n }\n }\n for (i in sstate){\n if (sstate[i] != 0){\n document.getElementById(sstnc[i]).innerHTML = \"<img src='images/\"+piecelang+\"Pieces/\"+sstp[i]+\".png' style='display:block;' width='99%' height='auto'>\"\n document.getElementById(sstcnc[i]).innerHTML = sstate[i]\n } else {\n document.getElementById(sstnc[i]).innerHTML = \"<img src='images/\"+piecelang+\"Pieces/E.png' style='display:block;' width='99%' height='auto'>\"\n document.getElementById(sstcnc[i]).innerHTML = \"\"\n }\n }\n }\n}", "SetBoardClicked (nn) //TODO: redundant drag effects and calculations to be removed, make it HTML5 compatible\r\n {\r\n try\r\n {\r\n if (! this.xdocument.BoardForm) return;\r\n if (! this.xdocument.images[this.ImageOffset].style) { this.BoardClicked = nn; return; }\r\n if (this.CandidateStyle != \"\") this.HighlightCandidates(nn, this.CandidateStyle);\r\n if (this.isDragDrop) { this.BoardClicked = nn; return; }\r\n //if (this.BoardClicked >= 0) //really needed styles processing?\r\n //{\r\n // if (this.BoardClicked < 64)\r\n // {\r\n // if (isRotated)\r\n // this.xdocument.images[this.ImageOffset + 63 - this.BoardClicked].style.borderColor = this.BorderColor;\r\n // else\r\n // this.xdocument.images[this.ImageOffset + this.BoardClicked].style.borderColor = this.BorderColor;\r\n // }\r\n // else this.xdocument.images[this.ImageOffset + this.BoardClicked + 3].style.borderColor = this.BorderColor;\r\n //}\r\n this.BoardClicked = nn;\r\n //if (this.BoardClicked >= 0)\r\n //{\r\n // if (this.BoardClicked < 64)\r\n // {\r\n // if (isRotated)\r\n // this.xdocument.images[this.ImageOffset + 63 - this.BoardClicked].style.borderColor=\"#FF0000\";\r\n // else\r\n // this.xdocument.images[this.ImageOffset + this.BoardClicked].style.borderColor = \"#FF0000\";\r\n // }\r\n // else this.xdocument.images[this.ImageOffset + this.BoardClicked + 3].style.borderColor = \"#FF0000\";\r\n //}\r\n\r\n } catch (err)\r\n {\r\n throw \"SetBoardClicked (\" + nn + \")>>rethrow error: \" + err + \"\\n\";\r\n }\r\n }", "rightClickHandler(board, row, col) {\n board[row][col].marked = !board[row][col].marked;\n var gameBoard = this.createRows();\n this.state.gameBoard = gameBoard;\n this.setState({\n gameBoard: this.state.gameBoard\n });\n return;\n }", "function set() {\n\t\tif ($(this).html() !== EMPTY) {\n\t\t\treturn;\n\t\t}\n\t\t$(this).html(turn);\n\t\tmoves += 1;\n\t\tscore[turn] += $(this)[0].identifier;\n\t\tif (win($(this))) {\n\t\t\talert('Wygrał: Gracz ' + turn);\n\t\t\tstartNewGame();\n\t\t} else if (moves === N_SIZE * N_SIZE) {\n\t\t\talert(\"Remis\");\n\t\t\tstartNewGame();\n\t\t} else {\n\t\t\tturn = turn === \"X\" ? \"O\" : \"X\";\n\t\t\t$('#turn').text('Gracz ' + turn);\n\t\t}\n\t}", "function boardClick(event) {\n clearSpaces();\n var destCol = Math.floor((event.pageX - document.getElementById(clickedCheckerId).parentElement.offsetLeft) / 50);\n var destRow = Math.floor((event.pageY - document.getElementById(clickedCheckerId).parentElement.offsetTop) / 50);\n if ((clickedCheckerId != null) && isLegalMove(destRow, destCol, clickedCheckerId, currentColor)) {\n event.preventDefault();\n if (Math.abs(destRow - srcRow) == 1) {\n makeSimpleMove(destRow, destCol, clickedCheckerId);\n }\n else if (Math.abs(destRow - srcRow) == 2) {\n makeJumpMove(destRow, destCol, clickedCheckerId, currentColor);\n }\n if (((destRow == 7) || (destRow == 0)) && (!isAKing(clickedCheckerId))) {\n kingAPiece(destRow, destCol, clickedCheckerId);\n }\n var winner = checkForWinner();\n var previousBoard = document.getElementById(\"boardInput\").value;\n document.getElementById(\"boardInput\").value = getBoard();\n //topLeftToRight(previousBoard, document.getElementById(\"boardInput\").value);\n if (findIfChecked()) {\n getComputersMove();\n }\n }\n\n clickedCheckerId = null;\n}", "function setBoardForPlayer(outerX, outerY, innerX, innerY, nextPlayer)\n{\n //Clear onclick functions for all of the cells\n clearOnClick();\n\n //Clear all yellow highlighting of cells\n clearHighlighting();\n\n //If board to play next isn't won, highlight and set onclicks for that board, otherwise allow playing of any board\n if(wonCells[innerX][innerY] == 0)\n {\n //Highlight inner board corresponsing to cell that was selected by last player\n document.getElementById(\"cell\" + innerX + \"x\" + innerY).setAttributeNS(null, \"fill-opacity\", .6);\n\n //Call setOnClickFunctionsForBoard for baord corresponding to cell that lastPlayer just played\n setOnClickFunctionsForBoard(innerX, innerY, nextPlayer);\n\n }\n else\n {\n //Highlight all boards and set onclick functions if they have not been won yet\n for(var i = 0; i < 3; i++)\n {\n for(var j = 0; j < 3; j++)\n {\n if(wonCells[i][j] == 0)\n {\n document.getElementById(\"cell\" + i + \"x\" + j).setAttributeNS(null, \"fill-opacity\", .2);\n setOnClickFunctionsForBoard(i, j, nextPlayer);\n }\n\n }\n }\n }\n\n}", "function setBoard() {\n for (i = 0; i <= vessels.length; i++) {\n if (i % 2 === 0) {\n isShipInRangeH(vessels[i]);\n isShipInRangeHPlayerTwo(vessels[i]);\n }\n else if (i % 2 !== 0) {\n isShipInRangeV(vessels[i]);\n isShipInRangeVPlayerTwo(vessels[i]);\n }\n }\n}", "function setUpComputerBoard(computer){\n let row, column\n for(let i = 0; i < AMOUNT_SHIPS; i++){\n //Checks to prevent same coordinate from being chosen\n do{\n row = getRandomGridValue()\n column = getRandomGridValue()\n } while(hasShip(computer.grid, row, column))\n computer.grid[row][column] = 1\n }\n}", "function storeArr(id){\n switch(id){\n case \"box1\":\n arr1[0][0]=\"O\";// store the value in the board\n $(\"#box1\").text(\"O\");//select box1 and raplace the text by O\n // code block\n break;\n case \"box2\":\n arr1[0][1]=\"O\";\n $(\"#box2\").text(\"O\");\n // code block\n break;\n case \"box3\":\n arr1[0][2]=\"O\";\n $(\"#box3\").text(\"O\");\n // code block\n break;\n case \"box4\":\n arr1[1][0]=\"O\";\n $(\"#box4\").text(\"O\");\n // code block\n break;\n case \"box5\":\n arr1[1][1]=\"O\";\n $(\"#box5\").text(\"O\");\n // code block\n break;\n case \"box6\":\n arr1[1][2]=\"O\";\n $(\"#box6\").text(\"O\");\n // code block\n break;\n case \"box7\":\n arr1[2][0]=\"O\";\n $(\"#box7\").text(\"O\");\n // code block\n break;\n case \"box8\":\n arr1[2][1]=\"O\";\n $(\"#box8\").text(\"O\");\n break;\n case \"box9\":\n arr1[2][2]=\"O\";\n $(\"#box9\").text(\"O\");}\n }", "function update_board(id){\n\t \tvar t = $('#'+id);\n\t \tfor (var k = parseInt(t.attr('col'))-1; k < parseInt(t.attr('col'))+parseInt(t.attr('sizex'))-1; k++) {\n\t \t\tfor (var j = parseInt(t.attr('row'))-1; j < parseInt(t.attr('row'))+parseInt(t.attr('sizey'))-1; j++) {\n\t \t\t\tboard[k][j].occupied = 1;\n\t \t\t\tboard[k][j].tile = id;\n\t \t\t};\n\t \t};\n\t }", "updateUI() {\n this.clear();\n this.context.beginPath();\n let cells = this.automaton.cells;\n for(let x = 0; x < cells.length; x++) {\n for(let y = 0; y < cells[x].length; y++) {\n if(cells[x][y]) {\n this.context.fillRect(x*this.cellSize, y*this.cellSize, this.cellSize, this.cellSize);\n }\n }\n }\n this.context.stroke();\n }", "toggleCell(row, col) {\n const board = this.state.board;\n if (board[row][col] === deadCell) {\n board[row][col] = newCell;\n } else {\n board[row][col] = deadCell;\n }\n this.setState({ board });\n }", "function choosesquere(evt) {\n var mousePos = getMousePos(canvas, evt);\n var message = 'Mouse position: ' + mousePos.x + ',' + mousePos.y;\n var board_left=canvas.width-(canvas.width*9.5/10);\n var board_top=canvas.width-(canvas.width*9.25/10);\n var board_size=canvas.width*9/10;\n var leftspace=canvas.width-(canvas.width*9/10);\n\n if((mousePos.x>=board_left)&&(mousePos.x<=board_size+board_left)&&(mousePos.y>=board_top)&&(mousePos.y<=board_size+board_top)){\n //pastaudimu fiksavimas\n // 1-langelis\n //btclicksound.play();\n gamesounds(\"click\",mute);\n if((mousePos.x<=board_size/3+board_left)&&(mousePos.y<=board_size/3+board_top)){\n ejimai++;\n if(which_player==1){\n if(kur_piesti_x_ir_o[0]==2){\n kur_piesti_x_ir_o[0]=1;\n which_player=0;\n kas_eina=\"O\";\n turn_count++;\n }\n \n }\n else{\n if(kur_piesti_x_ir_o[0]==2){\n kur_piesti_x_ir_o[0]=0;\n which_player=1;\n kas_eina=\"X\";\n turn_count++;\n }\n \n }\n }\n //2-as langelis\n else if((mousePos.x>=board_size/3+board_left)&&(mousePos.y<board_size/3+board_top)&&(mousePos.x<=board_size/3*2+board_left)&&(mousePos.y<board_size/3+board_top)){\n ejimai++;\n if(which_player==1){\n if(kur_piesti_x_ir_o[1]==2){\n kur_piesti_x_ir_o[1]=1;\n which_player=0;\n kas_eina=\"O\"; \n turn_count++;\n }\n \n }\n else{\n if(kur_piesti_x_ir_o[1]==2){\n kur_piesti_x_ir_o[1]=0;\n which_player=1;\n kas_eina=\"X\";\n turn_count++;\n }\n \n }\n }\n //3-as langelis\n else if((mousePos.x>board_size/3*2+board_left)&&(mousePos.y<=board_size/3+board_top)&&(mousePos.x<board_size+board_left)){\n ejimai++;\n if(which_player==1){\n if(kur_piesti_x_ir_o[2]==2){\n kur_piesti_x_ir_o[2]=1;\n which_player=0;\n kas_eina=\"O\"; \n turn_count++;\n }\n \n }\n else{\n if(kur_piesti_x_ir_o[2]==2){\n kur_piesti_x_ir_o[2]=0;\n which_player=1;\n kas_eina=\"X\";\n turn_count++;\n }\n \n }\n }\n //4-as langelis\n else if((mousePos.x<=board_size/3+board_left)&&(mousePos.y<board_size/3*2+board_top)&&(mousePos.x<=board_size/3*2+board_left)&&(mousePos.y>board_size/3+board_top)){\n ejimai++;\n if(which_player==1){\n if(kur_piesti_x_ir_o[3]==2){\n kur_piesti_x_ir_o[3]=1;\n which_player=0;\n kas_eina=\"O\"; \n turn_count++;\n }\n \n }\n else{\n if(kur_piesti_x_ir_o[3]==2){\n kur_piesti_x_ir_o[3]=0;\n which_player=1;\n kas_eina=\"X\";\n turn_count++;\n }\n \n }\n }\n\n //5-as langelis\n else if((mousePos.x>board_size/3+board_left)&&(mousePos.y<=board_size/3*2+board_top)&&(mousePos.x<board_size/3*2+board_left)&&(mousePos.y>=board_size/3+board_top)){\n ejimai++;\n if(which_player==1){\n if(kur_piesti_x_ir_o[4]==2){\n kur_piesti_x_ir_o[4]=1;\n which_player=0;\n kas_eina=\"O\";\n turn_count++; \n }\n \n }\n else{\n if(kur_piesti_x_ir_o[4]==2){\n kur_piesti_x_ir_o[4]=0;\n which_player=1;\n kas_eina=\"X\";\n turn_count++;\n }\n \n }\n }\n //6-as langelis\n else if((mousePos.x<=board_size+board_left)&&(mousePos.y<board_size/3*2+board_top)&&(mousePos.x>=board_size/3*2+board_left)&&(mousePos.y>board_size/3+board_top)){\n ejimai++;\n if(which_player==1){\n if(kur_piesti_x_ir_o[5]==2){\n kur_piesti_x_ir_o[5]=1;\n which_player=0;\n kas_eina=\"O\"; \n turn_count++;\n }\n \n }\n else{\n if(kur_piesti_x_ir_o[5]==2){\n kur_piesti_x_ir_o[5]=0;\n which_player=1;\n kas_eina=\"X\";\n turn_count++;\n }\n \n }\n }\n //7-as langelis\n else if((mousePos.x<board_size/3+board_left)&&(mousePos.y>=board_size/3*2+board_top)){\n ejimai++;\n if(which_player==1){\n if(kur_piesti_x_ir_o[6]==2){\n kur_piesti_x_ir_o[6]=1;\n which_player=0;\n kas_eina=\"O\"; \n turn_count++;\n }\n \n }\n else{\n if(kur_piesti_x_ir_o[6]==2){\n kur_piesti_x_ir_o[6]=0;\n which_player=1;\n kas_eina=\"X\";\n turn_count++;\n }\n \n }\n }\n //8-as langelis\n else if((mousePos.x>=board_size/3+board_left)&&(mousePos.y>board_size/3*2+board_top)&&(mousePos.x<=board_size/3*2+board_left)&&(mousePos.y>board_size/3*2+board_top)){\n ejimai++;\n if(which_player==1){\n if(kur_piesti_x_ir_o[7]==2){\n kur_piesti_x_ir_o[7]=1;\n which_player=0;\n kas_eina=\"O\"; \n turn_count++;\n }\n \n }\n else{\n if(kur_piesti_x_ir_o[7]==2){\n kur_piesti_x_ir_o[7]=0;\n which_player=1;\n kas_eina=\"X\";\n turn_count++;\n }\n \n }\n }\n\n else{\n ejimai++;\n if(which_player==1){\n if(kur_piesti_x_ir_o[8]==2){\n kur_piesti_x_ir_o[8]=1;\n which_player=0;\n kas_eina=\"O\"; \n turn_count++;\n }\n \n }\n else{\n if(kur_piesti_x_ir_o[8]==2){\n kur_piesti_x_ir_o[8]=0;\n which_player=1;\n kas_eina=\"X\";\n turn_count++;\n } \n }\n }\n //--------\n thetimeleft=45;\n } \n socket.emit('turn',{\n xo0: kur_piesti_x_ir_o[0],\n xo1: kur_piesti_x_ir_o[1],\n xo2: kur_piesti_x_ir_o[2],\n xo3: kur_piesti_x_ir_o[3],\n xo4: kur_piesti_x_ir_o[4],\n xo5: kur_piesti_x_ir_o[5],\n xo6: kur_piesti_x_ir_o[6],\n xo7: kur_piesti_x_ir_o[7],\n xo8: kur_piesti_x_ir_o[8],\n turn_count: turn_count,\n kas_eina: kas_eina,\n which_player: which_player,\n end_rezult: end_rezult,\n thetimeleft: thetimeleft,\n turn_text_color: turn_text_color,\n end_card_text_size: end_card_text_size \n }); \n on_off_ingame_click(which_player);\n gamelogic(turn_count);\n }", "setBlack (x,y) {\r\n this.board[x][y] = 2;\r\n }", "_select(num) {\n this.selectedIndex = num;\n this._switcherList.highlight(num);\n\n // on item selected, switch/move to the workspace\n let workspaceManager = global.workspace_manager;\n let wm = Main.wm;\n let newWs = workspaceManager.get_workspace_by_index(this.selectedIndex);\n wm.actionMoveWorkspace(newWs);\n }", "function Board () {\n const [grid, dispatch] = useReducer(reducer, generatePuzzle());\n const [selectedNum, setSelectedNum] = useState(1);\n const [checked, setChecked] = useState('');\n\n function updateCell (payload) {\n dispatch({ type: 'update', payload: payload });\n }\n\n return (\n <div className='container'>\n <div className='grid-sudoku'>\n {grid.map((col, i) => (\n <div className='col-s' key={i}>\n {grid[i].map((cell, j) => {\n // if input cell\n if (grid[i][j] === '.') {\n const updatePayload = [grid, i, j, selectedNum];\n return (\n <Cell className='cell-s' key={Math.random()} val=' ' onClick={() => updateCell(updatePayload)} />\n );\n }\n // if previously edited cell\n if (Number.isInteger(grid[i][j])) {\n const updatePayload = [grid, i, j, selectedNum];\n return (\n <Cell className='cell-s' key={Math.random()} val={grid[i][j]} onClick={() => updateCell(updatePayload)} />\n );\n }\n // if default cell\n return (\n <Cell className='cell-s def' key={Math.random()} val={grid[i][j]} />\n );\n })}\n </div>\n ))}\n </div>\n <MappingNums setSelectedNum={setSelectedNum} />\n <div className='menu'>\n <button\n className={`menu-btn ${checked ? 'green' : checked === '' ? 'black' : 'red'}`}\n onClick={() => setChecked(validatePuzzle(grid))}\n >check progress\n </button>\n <button className='menu-btn' onClick={() => { dispatch({ type: 'reset' }); }}>new board</button>\n <button className='menu-btn' onClick={() => dispatch({ type: 'solve' })}>solve</button>\n </div>\n <p role='img' aria-label='' className='bottomText'>\n Click main title to change games &#128070;\n </p>\n </div>\n );\n}", "function pickSquare() {\n if (gameover || this.innerHTML !== '') return; \n this.innerHTML = selectTurn.value;\n if (selectTurn.value == 'X') {\n selectTurn.value = 'O';\n } else {\n selectTurn.value = 'X';\n }\n checkWin();\n }", "setBoardPosition() {\n\n this.forEach((arr, rowIndex) => {\n arr.forEach((block, colIndex) => {\n\n if (block === 0) return;\n\n let absPos = this._getAbsolutePosition(rowIndex, colIndex);\n\n this.board[absPos.row][absPos.col] = this.pieceType;\n });\n });\n }", "function update_selection(cellView,paper,graph) {\n deselect_all_elements(paper,graph);\n select_element(cellView,graph);\n}", "function clickCell(x,y) {\n if (grid[x][y]>0) {\n alert(\"Dont Try To Cheat Bud!!!!!\");\n } \n\n\n// Clicking Of Boxes\n else {\n if (currentPlayer==1) {\n document.getElementById(\"cell_\"+x+\"_\"+y).style.color=\"#3F88C5\";\n document.getElementById(\"cell_\"+x+\"_\"+y).innerHTML=\"X\";\n grid[x][y]=1;\n currentPlayer=2;\n } else {\n document.getElementById(\"cell_\"+x+\"_\"+y).style.color=\"#E2C290\";\n document.getElementById(\"cell_\"+x+\"_\"+y).innerHTML=\"O\";\n grid[x][y]=2;\n currentPlayer=1;\n }\n }\n}", "function reset_board() {\n $.each(cells, function (i, v) {\n v.className = \"\";\n $(v).addClass(cell + \" \" + empty_cell);\n });\n final_message_str = \"\";\n $(message_element_id).html(\"Keep playing!!\");\n computer_first_move = true;\n computer_second_move = true;\n }", "displayBoard() {\n this.translateBoard();\n // if (this.states == STATES.DISPLAYED)\n this.updateScore();\n //}\n }", "function refresh_board(loadedboard){\n\tcounter = 1;\n\tfor (i=0; i<3; i++){\n\t\tfor (j=0; j<3; j++){\n\t\t\tif (loadedboard[i][j] == \"X\" || loadedboard[i][j] == \"O\"){\n\t\t\t\t$(\"#\"+counter+\" p\").replaceWith(\"<p>\"+loadedboard[i][j]+\"</p>\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$(\"#\"+counter+\" p\").replaceWith(\"<p>+</p>\");\n\t\t\t}\n\t\t\tcounter++;\n\t\t}\n\t}\n}", "runBot(){\r\n let botMove = this.randomMove();\r\n if(!this.XO[botMove].classList.contains(\"selected\") && !this.XO[botMove].classList.contains(\"grayed\")){\r\n this.board.selClass = this.board.XTurn? \"XSelect\" : \"OSelect\";\r\n this.board.XTurn = !this.board.XTurn;\r\n if(this.board.selClass == \"XSelect\"){\r\n this.board.tiles[botMove] = \"X\";\r\n }\r\n else if(this.board.selClass == \"OSelect\"){\r\n this.board.tiles[botMove] = \"O\";\r\n }\r\n this.board.checkBoardStatus(botMove);\r\n this.board.checkGameWin();\r\n this.page.updateBoard(false, botMove, this.board.selClass);\r\n this.page.grayOthers(botMove);\r\n if(this.board.checkBoardFull(botMove%9)){\r\n this.page.removeGrayedAll();\r\n }\r\n if(this.board.checkGameWin() != false){\r\n this.page.updateBoard(true, botMove, this.board.selClass);\r\n this.page.finishGame(this.board.winner);\r\n }\r\n }\r\n }", "function compMove() {\r\n\tvar possibles = [];\r\n\tif (playersTurn === false) {\r\n\t\tfor (var i = 0; i < options.length; i++) {\r\n\t\t\tfor (var j = 0; j < squaresChosenByComputer.length; j++){\r\n\t\t\t\tif (options[i].indexOf(squaresChosenByComputer[j]) > 0){\r\n\t\t\t\t\tpossibles = options[i].filter(function(value) { \r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\t//3 o o danh sach thang co den 2 kha nang de danh\r\n\t\t\t\tif (j === squaresChosenByComputer.length - 1 && possibles.length === 2){\r\n\t\t\t\t\tfor (var k = 0; k < possibles.length; k++) {\r\n\t\t\t\t\t\tif (checkMove(squaresChosenByPlayer, possibles[k])){\r\n\t\t\t\t\t\t\tif (checkMove(squaresChosenByComputer, possibles[k])) {\r\n\t\t\t\t\t\t\t\t$(\"#\" + possibles[k]).html(compChoice); \r\n\t\t\t\t\t\t\t\tsquaresChosenByComputer.push(possibles[k]);\r\n\t\t\t\t\t\t\t\tremoveOption(possibles[k]);\r\n\t\t\t\t\t\t\t\tfinished(\"Computer\", squaresChosenByComputer);\r\n\t\t\t\t\t\t\t\tpossibles.length = 0; \r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\tif (j === squaresChosenByComputer.length - 1 && possibles.length === 1){ //TH chi co 1 kha nang danh\r\n\t\t\t\t\tif (checkMove(squaresChosenByPlayer, possibles[0])){\r\n\t\t\t\t\t\t$(\"#\" + possibles[0]).html(compChoice);\r\n\t\t\t\t\t\tsquaresChosenByComputer.push(possibles[0]);\r\n\t\t\t\t\t\tremoveOption(possibles[0]);\r\n\t\t\t\t\t\tfinished(\"Computer\", squaresChosenByComputer);\r\n\t\t\t\t\t\tpossibles.length = 0;\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//return random luot di cua comp\r\n\t\tvar move = array[Math.floor(Math.random() * array.length)];\r\n\t\t$(\"#\" + move).html(compChoice);\r\n\t\tsquaresChosenByComputer.push(move);\r\n\t\tremoveOption(move);\r\n\t\tfinished(\"Computer\", squaresChosenByComputer);\r\n\t}\r\n}", "function optionChanged(selected){\n\tmakeBar(selected);\n\tmakeTable(selected);\n\tmakeBubbleMap(selected);\n}", "function updateBoardState(game) {\n let $board = $('td');\n $.each(game.state, function(index, value) {\n let $target = $($board[index]);\n $target.html(value);\n });\n}", "function drawBoard() {\n var height = cellside * sidelength;\n var width = cellside * sidelength;\n from_to(0, height, cellside, function (i) {\n ctx.moveTo(i, 0);\n ctx.lineTo(i, width);\n ctx.moveTo(0, i);\n ctx.lineTo(height, i);\n });\n ctx.strokeStyle = \"black\";\n ctx.stroke();\n}", "function clickedEl(event) {\n //while (board != null) {\n \n if (event.target.id === 'board0') {\n index = 0;\n }\n else if (event.target.id === 'board1') {\n index = 1;\n }\n else if (event.target.id === 'board2') {\n index = 2;\n }\n else if (event.target.id === 'board3') {\n index = 3;\n }\n else if (event.target.id === 'board4') {\n index = 4;\n }\n else if (event.target.id === 'board5') {\n index = 5;\n }\n else if (event.target.id === 'board6') {\n index = 6;\n }\n else if (event.target.id === 'board7') {\n index = 7;\n }\n else if (event.target.id === 'board8') {\n index = 8;\n }\n }", "function toggle_currently_selected(old_index, cur_index){ \n if (old_index != cur_index){\n coord_array[6*old_index] = 0; //turn off old index\n coord_array[6*cur_index] = 1; //turn on new index\n } else {\n coord_array[6*cur_index] = (coord_array[6*cur_index] == 1) ? 0 : 1; //toggle old index\n };\n saved_index = cur_index;\n // context.fillText(coord_array[6*old_index], 10+160*foobar, 10);\n // context.fillText(coord_array[6*cur_index], 40+160*foobar, 10);\n // context.fillText(old_index, 70+160*foobar, 10);\n // context.fillText(cur_index, 100+160*foobar, 10);\n // foobar++;\n}", "update_board(copy_board, action) {\n if (action.type == 'c') {\n copy_board[action.y1][action.x1].no_soldiers++;\n \n // If move action\n } else {\n copy_board[action.y1][action.x1].no_soldiers--;\n if(copy_board[action.y2][action.x2].faction != this.faction ) {\n // empty tile \n if(copy_board[action.y2][action.x2].soldiers == 0) {\n copy_board[action.y2][action.x2].no_soldiers++;\n copy_board[action.y2][action.x2].faction = this.faction;\n } else {\n copy_board[action.y2][action.x2].no_soldiers--;\n }\n } else {\n copy_board[action.y2][action.x2].no_soldiers++;\n }\n }\n }", "function setMove( start, player ) {\n\tfor( var i = 1; i <= 9; i++ ) {\n\t\tif ( start.board[ i - 1 ] === -1 ){\n\t\t\tif( player === \"x\" )\n\t\t\t\t$(\".cellp\" + i ).text( \"x\" ).css( \"color\", \"white\" );\n\t\t\telse\n\t\t\t\t$(\".cellp\" + i ).text( \"o\" ).css( \"color\", \"white\" );\n\t\t}\n\t\telse if ( start.board[ i - 1 ] === 1 ){\n\t\t\tif( player === \"x\" )\n\t\t\t\t$(\".cellp\" + i ).text( \"o\" ).css( \"color\", \"white\" );\n\t\t\telse\n\t\t\t\t$(\".cellp\" + i ).text( \"x\" ).css( \"color\", \"white\" );\n\t\t}\n\t\telse if ( start.board[ i - 1 ] === 0 )\n\t\t\t$(\".cellp\" + i ).text( \".\" ).css( \"color\", \"black\" );\n\t}\n\tif ( start.risk.riskIndex === 3 ) {\n\t\tcheckGameEnd( start );\n\t\tvar initialState = new game([ 0, 0, 0,\n\t\t\t\t\t\t\t\t0, 0, 0, \n\t\t\t\t\t\t\t\t0, 0, 0],-1, 0);\n\t\tsetMove( initialState );\n\t\treturn initialState;\n\t}\n\treturn start;\n}", "function toggleWhiteboard()\n {\n if ( boardMode )\n {\n closeWhiteboard();\n }\n else\n {\n showWhiteboard();\n }\n updateGUI();\n }", "toggle(row, column) {\r\n // we only want to change a box's value if its value is '-' and if no one has won yet\r\n if (this.state[row][column] === '-' && this.state.winningPlayer === '') {\r\n // when an update to state depends on the previous state, it's best practice to use a callback and return the new state from the callback\r\n this.setState(state => {\r\n const newRow = [...state[row]];\r\n newRow[column] = state.currentPlayer;\r\n return {\r\n [row]: newRow,\r\n currentPlayer: state.currentPlayer === 'X' ? 'O' : 'X'\r\n };\r\n });\r\n }\r\n }" ]
[ "0.6392018", "0.6380117", "0.6371731", "0.6338184", "0.62731093", "0.6271433", "0.6251563", "0.62507546", "0.61907345", "0.61677444", "0.61514395", "0.6148816", "0.61216956", "0.6117032", "0.6114959", "0.61141115", "0.61108667", "0.6079392", "0.60660064", "0.6064135", "0.60497713", "0.60458267", "0.60297877", "0.6011559", "0.6006138", "0.60036725", "0.600163", "0.60002214", "0.5990854", "0.5990818", "0.59871924", "0.59796715", "0.597602", "0.5975874", "0.59741473", "0.5968487", "0.59673876", "0.5963589", "0.5953392", "0.59468156", "0.59454954", "0.5945117", "0.59444106", "0.5943478", "0.59367853", "0.59320194", "0.59282106", "0.5926954", "0.59262663", "0.59241873", "0.59176403", "0.59106493", "0.5895091", "0.58917373", "0.5885973", "0.587742", "0.5866925", "0.58640176", "0.58627135", "0.5850379", "0.58487487", "0.5842451", "0.5835376", "0.58314216", "0.58229643", "0.5812261", "0.5797223", "0.57939184", "0.57891655", "0.5788903", "0.57817554", "0.5778475", "0.5776531", "0.5775728", "0.5774409", "0.5767365", "0.57642394", "0.5763934", "0.5763804", "0.57619536", "0.57618606", "0.5756176", "0.5754396", "0.5752488", "0.5746772", "0.573952", "0.57343113", "0.57324034", "0.5732158", "0.5729815", "0.57192993", "0.5718677", "0.57125485", "0.57106864", "0.5709325", "0.57041067", "0.5702759", "0.57023185", "0.5700213", "0.5698713" ]
0.59229475
50
apply the new board
function applyBoard(){ g_wall = new Wall(g_newBoard,0,0); reset(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateBoard(board) {\n\tvar newBoard = copyArray(board);\n\tfor (var i = 0; i < getHeight(board); i++) {\n\t\tfor (var j = 0; j < getWidth(board); j++) {\n\t\t\tvar neighborCount = countNeighbors(board, j, i);\n\t\t\tif (neighborCount === 3) {\n\t\t\t\tnewBoard[j][i] = 1;\n\t\t\t}\n\t\t\telse if (neighborCount === 4){\n\t\t\t}\n\t\t\telse {\n\t\t\t\tnewBoard[j][i] = 0;\n\t\t\t}\n\t\t}\n\t}\n\treturn newBoard;\n}", "updateBoard(piecesToMove, newIndices) {\r\n let newBoard = this.copyOfBoard();\r\n\r\n // for each piece to move\r\n for (let index in piecesToMove) {\r\n const pieceToMove = piecesToMove[index];\r\n const indexToMove = newIndices[index];\r\n\r\n // update newBoard and indices of pieceToMove\r\n newBoard.moveTo(indexToMove[0], indexToMove[1], pieceToMove);\r\n }\r\n\r\n return newBoard;\r\n }", "function drawBoard() {\n $(\"#board\").html('');\n for (var i = 0; i < board.length; i++) {\n var rowDiv;\n if (i % DIM == 0) {\n rowDiv = $(\"<div>\").attr(\"id\", getRowId(i)).addClass(\"row\").appendTo(\"#board\");\n }\n\n $('<div/>')\n .attr(\"id\", getCellId(board[i]))\n .addClass(\"btn btn-primary\")\n .text(board[i])\n .appendTo(rowDiv)\n .css(\"width\", WIDTH).css(\"height\", HEIGHT)\n .on(\"click\", notifyClick);\n }\n\n // Hide the empty cell.\n $(\"#cell-0\").invisible();\n }", "applyNewMove (newMove) {\n const srcIndex = this.chessGame.getIndexForPositionString(newMove.from)\n const targetIndex = this.chessGame.getIndexForPositionString(newMove.to)\n this.movePiece(srcIndex, targetIndex)\n }", "function newBoard(){\n return 0;\n }", "applyMove(move) {\n const { piece: pieceToMove, direction: { dx, dy } } = move;\n\n const clonedPieces = this.pieces.map(piece => {\n const newPiece = clonePiece(piece);\n if (newPiece.id === pieceToMove.id) {\n newPiece.pos.x += dx;\n newPiece.pos.y += dy;\n }\n return newPiece;\n });\n\n return new Board({\n pieces: clonedPieces,\n height: this.height,\n width: this.width,\n });\n }", "tick() {\n let newBoard = this.makeBoard();\n let oldBoard = this.board;\n for(let z = 0; z<oldBoard.length; z++){\n let minArr = oldBoard[z];\n for(let x = 0; x<minArr.length; x++){\n if(this.livingNeighbors(z,x) < 2){\n newBoard[z][x] = 0;\n }\n else if(this.livingNeighbors(z,x) > 3){\n newBoard[z][x] = 0;\n }\n else if(oldBoard[z][x] === 0 && this.livingNeighbors(z,x) === 3){\n newBoard[z][x] = 1;\n } else {\n newBoard[z][x] = oldBoard[z][x]\n }\n }\n }\n this.board = newBoard;\n }", "applyDecision(board, decision) {\n let wReq;\n let newBoard = board.copy();\n\n decision.forEach((d) => {\n if (d[0] === \"move\") {\n wReq = d[1];\n newBoard.moveWorker(wReq, d[2]);\n } else {\n // Need to check if the build is valid. A MoveBuild can be valid if the Move leads to a win, but the subsequent\n // Build may not be valid so we must check it.\n if (this.ruleChecker.isValidBuild(newBoard, wReq, d[1])) {\n newBoard.buildWithWorker(wReq, d[1]);\n }\n }\n });\n\n return newBoard;\n }", "applyChanges() {\n for (let i = 0; i < this.statusList.length; i++) {\n this.board.updateCell(...this.statusList[i]);\n }\n\n this.statusList = [];\n }", "execute() {\n const width = this.board.getWidth();\n const heigth = this.board.getHeigth();\n\n for (let i = 0; i < heigth; i++) {\n for (let j = 0; j < width; j++) {\n this.rule1(i, j);\n this.rule2(i, j);\n }\n }\n\n this.applyChanges();\n }", "function UpdateBoard(){\n for(var i = 0; i < activeBlock.shapeMatrix[0].length; ++i){\n for(var j = 0; j < activeBlock.shapeMatrix[0].length; ++j){\n if(activeBlock.shapeMatrix[i][j] != 0){\n board[activeBlock.position.y + i][activeBlock.position.x + j] = activeBlock.shapeMatrix[i][j];\n\n }\n }\n }\n updateGrid();\n}", "mergeNewPiece(){\n\t\t//First assign a copy of board to mergedBoard\n\t\tthis.mergedBoard = [...this.board];\n\t\t//Then merge the new piece to mergedBoard\n\t\tthis.mergeNewPieceTo(this.mergedBoard);\n\t}", "function makeNewBoard(board) {\n var oldBoard = $scope.gameBoard.slice(0);\n\n for (var i = oldBoard.length; i > 0; i--)\n {\n var randChar = oldBoard[Math.floor(Math.random() * oldBoard.length)];\n board.push(randChar);\n var index = oldBoard.indexOf(randChar);\n\n if (index > -1)\n oldBoard.splice(index, 1);\n }\n }", "function addBoard(boardId, height, width) {\n var hCanvas = (parseInt(height)-120);\n var wCanvas = (parseInt((parseInt(width) / 100) * 98));\n /*set column height of board to equal screen height*/\n $('#bord').before('<div class=\"board-col\" id = \"bord' + boardId + '\" style=\"width: '+ wCanvas +'px; height: '+ hCanvas + 'px; position: absolute; z-index: 1000001;\">'\n + '<div id=\"menu' + boardId + '\" class=\"board_menu\"><div style=\"float: left;padding-bottom:0px;padding-left: 10px;\">Whiteboard</div>'\n + '<a type=\"button\" style=\"float:right;\" id = \"delete_board' + boardId + '\"><i class=\"fas fa-times boardicon\" style=\"padding:5px 5px 3px 5px;\"></i></a>'\n + '<a type=\"button\" style=\"float:right;\" id = \"max_board' + boardId + '\"><i class=\"fas fa-window-restore boardicon\" style=\"padding:5px 5px 0px 5px;\"></i></a>'\n + '<a type=\"button\" style=\"float:right;\" id = \"min_board' + boardId + '\"><i class=\"fas fa-window-minimize boardicon\" style=\"padding:5px 5px 3px 15px;\"></i></a>'\n + '<div class=\"dropdown\"><button class=\"dropbtn-menu dropdown-whiteboard\" id = \"clr_board' + boardId + '\">Colour</button>'\n + '<div class=\"dropdown-content dropdown-whiteboard\" style=\"min-width: 100px;\">'\n + '<a type=\"button\" id = \"color_blue\"><i class=\"fas fa-tint boardicon-blue\" style=\"padding:5px 10px 5px 5px;\"></i>Blue</a>'\n + '<a type=\"button\" id = \"color_red\"><i class=\"fas fa-tint boardicon-red\" style=\"padding:5px 10px 5px 5px;\"></i>Red</a>'\n + '<a type=\"button\" id = \"color_yellow\"><i class=\"fas fa-tint boardicon-yellow\" style=\"padding:5px 10px 5px 5px;\"></i>Yellow</a>'\n + '<a type=\"button\" id = \"color_green\"><i class=\"fas fa-tint boardicon-green\" style=\"padding:5px 10px 5px 5px;\"></i>Green</a>'\n + '<a type=\"button\" id = \"color_black\"><i class=\"fas fa-tint boardicon-black\" style=\"padding:5px 10px 5px 5px;\"></i>Black</a>'\n + '</div>'\n + '</div>'\n + '<div class=\"dropdown\"><button class=\"dropbtn-menu dropdown-whiteboard\" id = \"clr_board' + boardId + '\">Size</button>'\n + '<div class=\"dropdown-content dropdown-whiteboard\" style=\"min-width: 100px;\">'\n + '<a type=\"button\" id = \"width5\"><i class=\"fas fa-pen boardicon-pen5\" style=\"padding:5px 10px 5px 5px;\"></i>50</a>'\n + '<a type=\"button\" id = \"width4\"><i class=\"fas fa-pen boardicon-pen4\" style=\"padding:5px 11px 5px 5px;\"></i>40</a>'\n + '<a type=\"button\" id = \"width3\"><i class=\"fas fa-pen boardicon-pen3\" style=\"padding:5px 12px 5px 5px;\"></i>30</a>'\n + '<a type=\"button\" id = \"width2\"><i class=\"fas fa-pen boardicon-pen2\" style=\"padding:5px 13px 5px 5px;\"></i>20</a>'\n + '<a type=\"button\" id = \"width1\"><i class=\"fas fa-pen boardicon-pen1\" style=\"padding:5px 14px 5px 5px;\"></i>10</a>'\n + '</div>'\n + '</div>'\n + '<div class=\"dropdown\"><button class=\"dropbtn-menu dropdown-whiteboard\" id = \"clr_board' + boardId + '\">Eraser</button>'\n + '<div class=\"dropdown-content dropdown-whiteboard\" style=\"min-width: 100px;\">'\n + '<a type=\"button\" id = \"erase5\"><i class=\"fas fa-eraser boardicon-pen5\" style=\"padding:5px 10px 5px 5px;\"></i>50</a>'\n + '<a type=\"button\" id = \"erase4\"><i class=\"fas fa-eraser boardicon-pen4\" style=\"padding:5px 11px 5px 5px;\"></i>40</a>'\n + '<a type=\"button\" id = \"erase3\"><i class=\"fas fa-eraser boardicon-pen3\" style=\"padding:5px 12px 5px 5px;\"></i>30</a>'\n + '<a type=\"button\" id = \"erase2\"><i class=\"fas fa-eraser boardicon-pen2\" style=\"padding:5px 13px 5px 5px;\"></i>20</a>'\n + '<a type=\"button\" id = \"erase1\"><i class=\"fas fa-eraser boardicon-pen1\" style=\"padding:5px 14px 5px 5px;\"></i>10</a>'\n + '</div>'\n + '</div>'\n + '<div class=\"dropdown\"><button class=\"dropbtn-menu dropdown-whiteboard\" id = \"clr_board' + boardId + '\">Draw</button>'\n + '<div class=\"dropdown-content dropdown-whiteboard\" style=\"min-width: 100px;\">'\n + '<a type=\"button\" id = \"line7\"><i class=\"fas fa-arrows-alt-h boardicon-pen5\" style=\"padding:5px 10px 5px 5px;\"></i>Arrow</a>'\n + '<a type=\"button\" id = \"line6\"><i class=\"fas fa-arrow-right boardicon-pen5\" style=\"padding:5px 10px 5px 5px;\"></i>Arrow</a>'\n + '<a type=\"button\" id = \"line5\"><i class=\"fas fa-circle boardicon-pen4\" style=\"padding:5px 11px 5px 5px;\"></i>Circle</a>'\n + '<a type=\"button\" id = \"line4\"><i class=\"fas fa-square boardicon-pen3\" style=\"padding:5px 12px 5px 5px;\"></i>Square</a>'\n + '<a type=\"button\" id = \"line3\"><i class=\"fas fa-slash boardicon-pen2\" style=\"padding:5px 13px 5px 5px;\"></i>Line</a>'\n + '<a type=\"button\" id = \"line2\"><i class=\"fas fa-signature boardicon-pen1\" style=\"padding:5px 14px 5px 5px;\"></i>Draw</a>'\n + '<a type=\"button\" id = \"line1\"><i class=\"fas fa-caret-up boardicon-pen0\" style=\"padding:5px 14px 5px 5px;\"></i>Triangle</a>'\n + '</div>'\n + '</div>'\n + '<label class=\"color-picker\"><input type=\"color\" id=\"selectColor\" style=\"float:right; visibility: hidden;\"/><div id=\"selectClr\" class=\"fas fa-eye-dropper boardicon-select\" style=\"padding: 5px 5px 3px 5px; color: #000000\"></div></label>'\n + '<a type=\"button\" style=\"float:right;\" id = \"board_BG\"><i class=\"fas fa-clone boardicon-clone\" style=\"padding:5px 5px 3px 5px;\"></i></a>'\n + '<a type=\"button\" style=\"float:right;\" id = \"resize\"><i class=\"fas fa-compress boardicon-save\" style=\"padding:5px 5px 3px 5px;\"></i></a>'\n + '<a type=\"button\" style=\"float:right;\" id = \"downloadLnk\"><i class=\"fas fa-save boardicon-save\" style=\"padding:5px 5px 3px 5px;\"></i></a>'\n + '<input type=\"text\" style=\"float:right; font-weight: 100; font-size: 10pt; width: 150px; display: none;\" id=\"fileName\" name=\"fileName\"/>'\n + '<label class=\"color-picker\"><input type=\"file\" style=\"float:right; font-weight: 100; font-size: 10pt; width: 5px; visibility: hidden;\" id=\"imageLoader\" name=\"imageLoader\"/><div id=\"selectClr\" class=\"fas fa-file boardicon-select\" style=\"padding: 5px 5px 3px 5px; color: #000000\"></div></label>'\n + '<div style=\"padding: 0px;\"><BR>'\n + '<canvas id=\"canvas\" width = ' + parseInt(wCanvas-3) + ' height = ' + parseInt(hCanvas-45) + ' onmouseout=\"clearMousePositions()\"></canvas>'\n + '</div></div></div>');\n\n /*Set column dragable*/\n $('#bord' + boardId).attr('draggable', 'false');\n\n var imageLoader = document.getElementById('imageLoader');\n imageLoader.addEventListener('change', loadImage, false);\n\n downloadLnk.addEventListener('click', downloadFiles, false);\n\n var selectColor = document.getElementById('selectColor');\n selectColor.addEventListener('change', userColor, false);\n\n /*Delete selected column. */\n $('a[id ^= \"delete_board' + boardId + '\"]').on('click', function (event) {\n var column = $(this).parent().parent().attr('id');\n $('#' + column).remove();\n });\n\n $('a[id ^= \"min_board' + boardId + '\"]').on('click', function (event) {\n var column = $(this).parent().parent().attr('id');\n $('#' + column).css({ \"height\": \"150px\" });\n });\n\n $('a[id ^= \"max_board' + boardId + '\"]').on('click', function (event) {\n var column = $(this).parent().parent().attr('id');\n $('#' + column).css({ \"height\": \"\" });\n });\n\n canvas = $(\"#canvas\");\n ctx = canvas[0].getContext('2d');\n var hCanvas = (parseInt(pageHeight));\n var wCanvas = ((parseInt(pageWidth) / 100) * 98.5);\n ctx.fillStyle = \"#ffffff\";\n ctx.fillRect(0, 0, wCanvas, hCanvas);\n clr = 'black'; type = 'source-over'; drawType ='random';\n\n /*Set Colour of line*/\n $('a[id ^= \"color_black\"]').on('click', function (event) {\n clr = 'black';\n type = 'source-over';\n });\n $('a[id ^= \"color_red\"]').on('click', function (event) {\n clr = 'red';\n type = 'source-over';\n });\n $('a[id ^= \"color_yellow\"]').on('click', function (event) {\n clr = 'yellow';\n type = 'source-over';\n });\n $('a[id ^= \"color_green\"]').on('click', function (event) {\n clr = 'green';\n type = 'source-over';\n });\n $('a[id ^= \"color_blue\"]').on('click', function (event) {\n clr = 'blue';\n type = 'source-over';\n });\n /*Set width of line*/\n $('a[id ^= \"width1\"]').on('click', function (event) {\n wth = 1;\n type = 'source-over';\n });\n $('a[id ^= \"width2\"]').on('click', function (event) {\n wth = 3;\n type = 'source-over';\n });\n $('a[id ^= \"width3\"]').on('click', function (event) {\n wth = 5;\n type = 'source-over';\n });\n $('a[id ^= \"width4\"]').on('click', function (event) {\n wth = 8;\n type = 'source-over';\n });\n $('a[id ^= \"width5\"]').on('click', function (event) {\n wth = 10;\n type = 'source-over';\n });\n /*Set the action to erase and line width 10*/\n $('a[id ^= \"erase5\"]').on('click', function (event) {\n type = 'destination-out';\n wth = 12;\n drawType = 'random';\n });\n $('a[id ^= \"erase4\"]').on('click', function (event) {\n type = 'destination-out';\n wth = 10;\n drawType = 'random';\n });\n $('a[id ^= \"erase3\"]').on('click', function (event) {\n type = 'destination-out';\n wth = 8;\n drawType = 'random';\n });\n $('a[id ^= \"erase2\"]').on('click', function (event) {\n type = 'destination-out';\n wth = 6;\n drawType = 'random';\n });\n $('a[id ^= \"erase1\"]').on('click', function (event) {\n type = 'destination-out';\n wth = 4;\n drawType = 'random';\n });\n/*Set the action to select drawing tool*/\n $('a[id ^= \"line7\"]').on('click', function (event) {\n type = 'source-over';\n drawType = 'arrow2';\n });\n $('a[id ^= \"line6\"]').on('click', function (event) {\n type = 'source-over';\n drawType = 'arrow1';\n });\n $('a[id ^= \"line5\"]').on('click', function (event) {\n type = 'source-over';\n drawType = 'circle';\n });\n $('a[id ^= \"line4\"]').on('click', function (event) {\n wth = 1;\n type = 'source-over';\n drawType = 'square';\n });\n $('a[id ^= \"line3\"]').on('click', function (event) {\n type = 'source-over';\n drawType = 'straight';\n });\n $('a[id ^= \"line2\"]').on('click', function (event) {\n type = 'source-over';\n drawType = 'random';\n });\n $('a[id ^= \"line1\"]').on('click', function (event) {\n type = 'source-over';\n drawType = 'triangle';\n });\n /*Set background color between white and transparent*/\n $('a[id ^= \"board_BG\"]').on('click', function (event) {\n $(\"#bord\" + boardId).toggleClass(\"board-col-bg\");\n\n var hCanvas = (parseInt(pageHeight));\n var wCanvas = ((parseInt(pageWidth) / 100) * 98.5);\n ctx.clearRect(0, 0, wCanvas, hCanvas);\n });\n /*Set resize of image and canvas*/\n $('a[id ^= \"resize\"]').on('click', function (event) {\n var hCanvas = (parseInt(pageHeight));\n var wCanvas = ((parseInt(pageWidth) / 100) * 98.5);\n var pDiv = 'bord' + boardId;\n resizeWhiteBoard(hCanvas, wCanvas, pDiv);\n\n });\n\n $(function () {\n $('.board-col').css('border', '1px solid grey');\n /*move the work area to the top as the item is dragged over the other work areas by increasing the z-index*/\n $(\"#bord\" + boardId).droppable({\n over: function (event, ui) {\n $(\"#\" + dragFrom).css(\"z-index\", colUAZindex++);\n }\n });\n });\n\n \"use strict\";\n\n var CLIPBOARD = new CLIPBOARD_CLASS(\"canvas\", false);\n\n connection = new signalR.HubConnectionBuilder()\n .withUrl('/draw')\n .build();\n\n /*connection.on('draw', function (prev_x, prev_y, x, y, clr, wth, type) {\n rawCanvas(prev_x, prev_y, x, y, clr, wth, type);\n });*/\n connection.start();\n\n // calculate where the canvas is on the window these vars will hold the starting mouse position\n var $canvas = $(\"#canvas\");\n var canvasOffset = $canvas.offset();\n var offsetX = canvasOffset.left;\n var offsetY = canvasOffset.top;\n var canvasx = $(canvas).offset().left;\n var canvasy = $(canvas).offset().top;\n var mousex = mousey = 0;\n // listen for mouse events\n $(\"#canvas\").mousedown(function (e) {\n if (drawType == 'square') {\n squareMouseDown(e, canvasOffset, offsetX, offsetY);\n }\n else if (drawType == 'random') {\n randomMouseDown(e, canvasOffset, canvasx, canvasy);\n }\n else if (drawType == 'circle') {\n circleMouseDown(e, canvasOffset, offsetX, offsetY);\n }\n else if (drawType == 'triangle') {\n triangleMouseDown(e, canvasOffset, offsetX, offsetY);\n }\n else if (drawType == 'straight') {\n lineMouseDown(e, canvasOffset, offsetX, offsetY);\n }\n else if (drawType == 'arrow1') {\n arrowLineMouseDown(e, offsetX, offsetY);\n }\n else if (drawType == 'arrow2') {\n arrowLineMouseDown(e, offsetX, offsetY);\n }\n });\n $(\"#canvas\").mousemove(function (e) {\n if (drawType == 'square') {\n squareMouseMove(e, canvasOffset, startX, startY, offsetX, offsetY);\n }\n else if (drawType == 'random') {\n randomMouseMove(e, canvasOffset, canvasx, canvasy, mousex, mousey);\n }\n else if (drawType == 'circle') {\n circleMouseMove(e, canvasOffset, offsetX, offsetY);\n }\n else if (drawType == 'triangle') {\n triangleMouseMove(e, canvasOffset, offsetX, offsetY);\n }\n else if (drawType == 'straight') {\n lineMouseMove(e, canvasOffset, offsetX, offsetY);\n }\n else if (drawType == 'arrow1') {\n arrowLineMouseMove(e);\n }\n else if (drawType == 'arrow2') {\n arrowLineMouseMove(e);\n }\n });\n $(\"#canvas\").mouseup(function (e) {\n if (drawType == 'square') {\n squareMouseUp(e);\n }\n else if (drawType == 'random') {\n randomMouseUp(e);\n }\n else if (drawType == 'circle') {\n circleMouseUp(e);\n }\n else if (drawType == 'triangle') {\n triangleMouseUp(e);\n }\n else if (drawType == 'straight') {\n lineMouseUp(e, offsetX, offsetY);\n }\n else if (drawType == 'arrow1') {\n arrowLineMouseUp(e, offsetX, offsetY, 5, 8, false, true);\n }\n else if (drawType == 'arrow2') {\n arrowLineMouseUp(e, offsetX, offsetY, 5, 8, true, true);\n }\n });\n $(\"#canvas\").mouseout(function (e) {\n if (drawType == 'square') {\n squareMouseOut(e);\n }\n else if (drawType == 'random') {\n randomMouseOut(e);\n }\n else if (drawType == 'circle') {\n circleMouseOut(e);\n }\n else if (drawType == 'triangle') {\n triangleMouseOut(e);\n }\n else if (drawType == 'straight') {\n lineMouseOut(e);\n }\n else if (drawType == 'arrow1') {\n arrowLineMouseOut(e);\n }\n else if (drawType == 'arrow2') {\n arrowLineMouseOut(e);\n }\n });\n\n //reset last mouse position back to home \n clearMousePositions = function () {\n last_mousex = 0;\n last_mousey = 0;\n }\n}", "createBoard() {\n\t\tfor (let i = 0; i < 6; i++) {\n\t\t\tfor (let j = 0; j < 6; j++) {\n\t\t\t\tlet tile = new MyTile(this.scene, this);\n\t\t\t\tlet pieceSize = 0.395 + 0.005;\n\t\t\t\ttile.addTransformation(['translation', -3 * pieceSize + pieceSize * j, -3 * pieceSize + pieceSize * i, 0]);\n\t\t\t\tthis.tiles.push(tile);\n\t\t\t}\n\t\t}\n\t\tfor (let i = 0; i < 8; i++) {\n\t\t\tthis.whitePieces.push(new MyPieceWhite(this.scene, 'whitePiece'));\n\t\t\tthis.blackPieces.push(new MyPieceBlack(this.scene, 'blackPiece'));\n\t\t}\n\t}", "initBoard () {\n\t\tthis.clearBoard();\n\t\t/* Init piece-list */\n\t\t/* White */\n\t\tthis.pieces = [\n\t\t\tnew Lance(COLOR.WHITE, position.toIdx(1, 'a')),\n\t\t\tnew Knight(COLOR.WHITE, position.toIdx(2, 'a')),\n\t\t\tnew Silver(COLOR.WHITE, position.toIdx(3, 'a')),\n\t\t\tnew Gold(COLOR.WHITE, position.toIdx(4, 'a')),\n\t\t\tnew King(COLOR.WHITE, position.toIdx(5, 'a')),\n\t\t\tnew Gold(COLOR.WHITE, position.toIdx(6, 'a')),\n\t\t\tnew Silver(COLOR.WHITE, position.toIdx(7, 'a')),\n\t\t\tnew Knight(COLOR.WHITE, position.toIdx(8, 'a')),\n\t\t\tnew Lance(COLOR.WHITE, position.toIdx(9, 'a')),\n\t\t\tnew Rook(COLOR.WHITE, position.toIdx(2, 'b')),\n\t\t\tnew Bishop(COLOR.WHITE, position.toIdx(8, 'b')),\n\t\t];\n\t\tfor (let i = 1; i <= NUM_COLS; i++) {\n\t\t\tthis.pieces.push(new Pawn(COLOR.WHITE, position.toIdx(i, 'c')));\n\t\t}\n\t\t/* Black */\n\t\tthis.pieces = this.pieces.concat([\n\t\t\tnew Lance(COLOR.BLACK, position.toIdx(1, 'i')),\n\t\t\tnew Knight(COLOR.BLACK, position.toIdx(2, 'i')),\n\t\t\tnew Silver(COLOR.BLACK, position.toIdx(3, 'i')),\n\t\t\tnew Gold(COLOR.BLACK, position.toIdx(4, 'i')),\n\t\t\tnew King(COLOR.BLACK, position.toIdx(5, 'i')),\n\t\t\tnew Gold(COLOR.BLACK, position.toIdx(6, 'i')),\n\t\t\tnew Silver(COLOR.BLACK, position.toIdx(7, 'i')),\n\t\t\tnew Knight(COLOR.BLACK, position.toIdx(8, 'i')),\n\t\t\tnew Lance(COLOR.BLACK, position.toIdx(9, 'i')),\n\t\t\tnew Rook(COLOR.BLACK, position.toIdx(2, 'h')),\n\t\t\tnew Bishop(COLOR.BLACK, position.toIdx(8, 'h')),\n\t\t]);\n\t\tfor (let i = 1; i <= NUM_COLS; i++) {\n\t\t\tthis.pieces.push(new Pawn(COLOR.BLACK, position.toIdx(i, 'g')));\n\t\t}\n\n\t\t/* Put pieces on board */\n\t\tthis.pieces.forEach((piece) => {\n\t\t\tthis.putPiece(piece, piece.pos);\n\t\t});\n\t}", "fillInBoard(pieces) {\r\n for (let piece of pieces) {\r\n this.fillAt(piece.row, piece.col, piece);\r\n }\r\n }", "updateBoard() {\n var tempBoard = this.duplicateBoardWithoutActive()\n var allMovesValid = true\n var x, y\n for (y = 0; y < Y_SPACES; y++) {\n for (x = 0; x < X_SPACES; x++) {\n if (this.board[y][x].activePiece) {\n let valid = this.validPlacement(x, y+1, tempBoard)\n if(valid) {\n tempBoard[y+1][x] = this.board[y][x]\n } else {\n allMovesValid = false\n }\n }\n }\n }\n if (allMovesValid){\n this.board = tempBoard.slice() \n this.tetrinoQuadrant.startY += 1\n } else {\n this.setInactiveTetrinos()\n }\n }", "function updateChessground(board) {\n const columns = [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\"];\n const files = [ 1, 2, 3, 4, 5, 6, 7, 8];\n let allMoves = new Map();\n for(const col of columns) {\n for(const file of files) {\n const square = col + file;\n const squareMoves = boardInternal.moves({ square: square, verbose: true }).map(x => x.to);\n if(squareMoves.length > 0) {\n allMoves.set(square, squareMoves);\n }\n }\n }\n board.set(\n {\n turnColor: boardInternal.turn() === \"w\" ? \"white\" : \"black\",\n orientation: color,\n movable: {\n free: false,\n color: color,\n dests: allMoves,\n events: {\n after: function(orig, dest) { webSocket.send(orig + dest); boardInternal.move({ from: orig, to: dest }); }\n }\n },\n }\n );\n}", "function updateBoard(data){\n // clears player hand once so it can be repopulated from the database\n clearPlayerHand();\n // clears opponents hand so it can be repopulated from the database\n clearOpponentsHand();\n // clears neutral deck 'stock' so it can be repopulated from the database\n clearNeutralDeck();\n // clears played cards areas\n clearPlayedCards();\n // populates scores\n tallyScore(data);\n // clears scored cards\n clearScoredCards();\n\n // THIS NEEDS TO MOVE THE CARDS OVER TO THE RIGHT\n\n // loops over hand array from database to populate both hands\n for (var i = 0; i < data.hand.length; i++) {\n // if the array value is zero (played card), skip that array iteration\n if (data.hand[i] === 0) {\n continue;\n }\n // updates players hand with correct cards\n updatePlayerHand(parseCardValues(data.hand[i]));\n // updates opponents hand with correct AMOUNT of cards\n updateOpponentHand();\n // updates neutral deck size\n updateNeutralDeck();\n }\n // flips over a neutral card\n flipNeutralCard(parseCardValues(data.neutral));\n // removeOneNeutralDeckCard();\n // reloads event handers on fresh player hand\n loadEventHanders();\n }", "tick() {\n const newBoard = this.makeBoard();\n\n this.iterate((row, col) => {\n const alive = !!this.board[row][col];\n const dead = !alive;\n const living = this.livingNeighbors(row, col);\n\n if ((alive && living < 2) || (alive && living > 3)) {\n newBoard[row][col] = 0;\n } else if (dead && living === 3) {\n newBoard[row][col] = 1;\n } else if (alive) {\n newBoard[row][col] = 1;\n }\n });\n this.board = newBoard;\n }", "function setUpBoard () {\n makeCrystalScores();\n makeCrystalButtons();\n }", "populateBoard() {\n // add a bubble at every row, col\n for (let row = 0; row < this.rows; row++) {\n for (let col = 0; col < this.cols; col++) {\n let pos = this.getBubbleLocAt(row, col);\n this.pieces[row][col] = this.drawBubbleAt(pos.x, pos.y, row, col);\n }\n }\n this.pieces.forEach(row => {\n row.forEach(bubble => {\n bubble.getNeighbors();\n });\n });\n }", "function updateBoard() {\n\t\tlet board_index = 0;\n\n\t\trows.forEach((row) => {\n\t\t\t// console.log(board_index);\n\t\t\twhile(row.firstChild) {\n\t\t\t\trow.removeChild(row.firstChild);\n\t\t\t}\n\t\t\tfor(i=0; i<3; i++) {\n\t\t\t\tlet box = document.createElement('div');\n\t\t\t\tbox.textContent = board[board_index];\n\t\t\t\tbox.className = `box-${board[board_index]}`;\n\t\t\t\trow.appendChild(box);\n\t\t\t\tboard_index++;\n\t\t\t\t// console.log(row.textContent);\n\t\t\t}\n\t\t});\n\t}", "function boardWin() {\r\n}", "function drawBoard() {\n board = $(\"#board\");\n board.attr(\"width\", nCols * 30);\n board.attr(\"height\", nRows * 30);\n cnv = $(\"#board\").get(0);\n ctx = cnv.getContext(\"2d\");\n ctx.strokeRect(0, 0, nCols * 30, nRows * 30);\n for (var i = 1; i < nCols; i++) {\n ctx.beginPath();\n ctx.moveTo(i * 30, 0);\n ctx.lineTo(i * 30, nRows * 30);\n ctx.stroke();\n }\n for (var j = 1; j < nRows; j++) {\n ctx.beginPath();\n ctx.moveTo(0, j * 30);\n ctx.lineTo(nCols * 30, j * 30);\n ctx.stroke();\n }\n}", "fillAt(row, col, piece) {\r\n this.board[row][col] = piece;\r\n }", "update(board) {\n globalWidth = $(window).width();\n observer.updateHistory(globalWidth);\n if (observer.shouldWidthUpdate()){\n gameStyles.adjustStyles();\n }\n this.setState({tile1: board[0][0]});\n this.setState({tile2: board[0][1]});\n this.setState({tile3: board[0][2]});\n this.setState({tile4: board[0][3]});\n this.setState({tile5: board[1][0]});\n this.setState({tile6: board[1][1]});\n this.setState({tile7: board[1][2]});\n this.setState({tile8: board[1][3]});\n this.setState({tile9: board[2][0]});\n this.setState({tile10: board[2][1]});\n this.setState({tile11: board[2][2]});\n this.setState({tile12: board[2][3]});\n this.setState({tile13: board[3][0]});\n this.setState({tile14: board[3][1]});\n this.setState({tile15: board[3][2]});\n this.setState({tile16: board[3][3]});\n this.setState({scores: grid.get_score()});\n this.setState({hist_num: grid.history.length});\n }", "update_board(copy_board, action) {\n if (action.type == 'c') {\n copy_board[action.y1][action.x1].no_soldiers++;\n \n // If move action\n } else {\n copy_board[action.y1][action.x1].no_soldiers--;\n if(copy_board[action.y2][action.x2].faction != this.faction ) {\n // empty tile \n if(copy_board[action.y2][action.x2].soldiers == 0) {\n copy_board[action.y2][action.x2].no_soldiers++;\n copy_board[action.y2][action.x2].faction = this.faction;\n } else {\n copy_board[action.y2][action.x2].no_soldiers--;\n }\n } else {\n copy_board[action.y2][action.x2].no_soldiers++;\n }\n }\n }", "refreshBoard() {\n this.Canvas.clearLayer(this.Canvas.layerContexts[0], this.Canvas.layerElements[0]);\n this.Canvas.drawListOfForms(this.Canvas.layerContexts[0], this.generateSnakeForm());\n }", "refreshWholeBoard(board) {\n for (let i = 0; i < (board.size * board.size); i++) {\n var co = getCoordinate(i);\n this.refreshPoint(co, board);\n }\n }", "function applyMove(move) {\n\tmove = move.trim();\n\t// move = d2->d4 = column,row,column,row\n\t// move = 33xx55xx77\n\tvar start_col = move.charCodeAt(0)-48;\n\tvar start_row = move.charCodeAt(1) - 48;\n\tvar jump = (move.charAt(2)=='x')?true:false;\n\tvar end_col = move.charCodeAt(4) - 48;\n\tvar end_row = move.charCodeAt(5) -48;\n\n\t// console.log(\"applying move starting from \" + start_col + start_row)\n\n\tvar temp = current_board[7-start_row][start_col];\n\tcurrent_board[7-start_row][start_col] = 0; // test this\n\t\n\tif (jump) {\n\t\tvar index = 4;\n\t\t// console.log(\"move.length:\"+move.length);\n\t\tvar numJumps = (move.length-2)/4; // the number of jumps made\n\t\tvar row,file,drow,dfile,rrow,rfile;\n\t\trow = start_row;\n\t\tfile = start_col;\n\t\t// console.log(\"number of jumps=\" + numJumps);\n\t\tfor (var i=0; i<numJumps; i++) {\n\t\t\tdrow = move.charCodeAt(index+1)-48;\n\t\t\tdfile = move.charCodeAt(index)-48;\n\t\t\t// console.log(\"dfile,drow:\" + dfile + \"\" + drow);\n\n\t\t\trrow = (row+drow)/2;\n\t\t\trfile = (file+dfile)/2;\n\n\t\t\t// console.log(\"removing piece at \" + rfile + \"\" + rrow);\n\t\t\tcurrent_board[7-rrow][rfile] = 0;\n\n\t\t\trow = drow;\n\t\t\tfile = dfile;\n\t\t\tindex+=4;\n\t\t}\n\n\t\t// current_board[7-drow][dfile] = temp;\n\n\t\tend_row=drow;\n\t\tend_col=dfile;\n\n\t\t\n\t}\n\n\tif (temp==1&&end_row==7) {\n\t\tconsole.log(\"king me!\");\n\t\ttemp=2;\n\t} else if (temp==-1&&end_row==0) {\n\t\ttemp=-2;\n\t\tconsole.log(\"king me!\");\n\t}\n\n\tcurrent_board[7-end_row][end_col] = temp;\n\n}", "updateBoardPiece(piece, move) {\r\n return this.updateBoard([piece], [move]);\r\n }", "function placePiece(row, col, color){\n //start and end are arrays with the starting and ending indices of the pieces boxing in those to be changed\n if(color == \"white\")\n { \n cells[row*8+col].innerHTML = '<w class=\"white-piece\" id=\"'+nextwhitePieceId+'\"></w>';\n //console.log(\"THIS IS CELL:\" + cells[row*8+col])\n whitesPieces = document.querySelectorAll(\"w\");\n board[row][col] = nextwhitePieceId;\n nextwhitePieceId+=2; \n }\n else{\n cells[row*8+col].innerHTML = '<b class=\"black-piece\" id=\"'+nextblackPieceId+'\"></b>';\n blacksPieces = document.querySelectorAll(\"b\");\n board[row][col] = nextblackPieceId;\n nextblackPieceId+=2;\n } \n replaceMiddlePieces(row,col)\n changePlayer(true);\n}", "update() {\n this.drawBoard();\n }", "function Board(){}", "placeNewTile(board) {\n const emptyTiles = this.getEmptyTiles(board)\n const indices = emptyTiles[Math.floor(Math.random() * emptyTiles.length)]\n\n board[indices[0]][indices[1]] = Math.random() < 0.5 ? 2 : 4\n\n return board\n }", "makeMove(colID){\n //copy of the board gets created\n const boardCopy = this.state.boardState.map(function(arr) {\n return arr.slice();\n });\n //confirms that the column isnt full \n if( boardCopy[colID].indexOf(null) !== -1 ){\n //player token gets added to the column on the board \n let newColumn = boardCopy[colID].reverse()\n newColumn[newColumn.indexOf(null)] = this.state.playerTurn\n newColumn.reverse()\n //board updates when move is made, now its the next players turn \n this.setState({\n playerTurn: (this.state.playerTurn === 'Red') ? 'Yellow' : 'Red',\n boardState: boardCopy,\n full:this.state.full+1\n })\n }\n\n }", "function update_board(id){\n\t \tvar t = $('#'+id);\n\t \tfor (var k = parseInt(t.attr('col'))-1; k < parseInt(t.attr('col'))+parseInt(t.attr('sizex'))-1; k++) {\n\t \t\tfor (var j = parseInt(t.attr('row'))-1; j < parseInt(t.attr('row'))+parseInt(t.attr('sizey'))-1; j++) {\n\t \t\t\tboard[k][j].occupied = 1;\n\t \t\t\tboard[k][j].tile = id;\n\t \t\t};\n\t \t};\n\t }", "addNewBoard(board) {\n loadAllRows().then((response) => this.appendNewBoard(board, response));\n }", "function drawNewBoard (game) {\n ticTacToeGrid.style.opacity = ticTacToeCellTable.style.opacity = 1\n ticTacToeGrid.style.transform = ticTacToeGrid.style.webkitTransform =\n ticTacToeCellTable.style.transform = ticTacToeCellTable.style.webkitTransform = null\n displayMessage.style.opacity = winnerMessage.style.opacity = drawMessage.style.opacity = '0'\n displayMessage.style.transform = displayMessage.style.webkitTransform = null\n ticTacToeCellTable.removeEventListener('click', addMove)\n ticTacToeCellTable.removeEventListener('click', addMinimaxMove)\n Array.prototype.forEach.call(cells, function (cell) {\n cell.style.opacity = null\n cell.style.webkitTransform = null\n })\n var winningCells = document.getElementsByClassName('winning-cell')\n Array.prototype.forEach.call(winningCells, function (winningCell) {\n winningCell.classList.remove('winning-cell')\n })\n lines.forEach(function (line) {\n resetsLine(line, '120')\n drawLine(line, '0')\n })\n if (game.mode === '1') {\n ticTacToeCellTable.addEventListener('click', addMove)\n } else {\n ticTacToeCellTable.addEventListener('click', addMinimaxMove)\n }\n var symbols = document.querySelectorAll('.tic-tac-toe-cross-left, .tic-tac-toe-cross-right, .tic-tac-toe-nought')\n symbols.forEach(function (symbol) {\n resetsLine(symbol, '130')\n })\n var strikeThrough = document.getElementById('strikeThrough')\n if ((strikeThrough = document.getElementById('strikeThrough')) !== null) {\n strikeThrough.remove()\n }\n }", "board() {\n console.log(`Problem : ${this.string}\\n`);\n\n for (let i = 0; i < 9; i++) {\n this.unsolved[i].splice(3, 0, \"|\");\n this.unsolved[i].splice(7, 0, \"|\");\n this.unsolved[i] = this.unsolved[i].join(\" \");\n\n this.solved[i].splice(3, 0, \"|\");\n this.solved[i].splice(7, 0, \"|\");\n this.solved[i] = this.solved[i].join(\" \");\n }\n\n let line = [];\n for (let j = 0; j < 21; j++) {\n line.push(\"-\");\n }\n\n line = line.join(\"\");\n\n for (let k = 0; k < 16; k += 4) {\n this.unsolved.splice(k, 0, line);\n this.solved.splice(k, 0, line);\n }\n\n console.log(\"Init Board :\");\n console.log(this.unsolved.join(\"\\n\"));\n console.log(\"\\n\");\n console.log(\"Solve :\");\n console.log(this.solved.join(\"\\n\"));\n }", "function generateBoard(board)\n {\n for(var i = 0; i < board.length; i++)\n {\n var newChar = board[i];\n $scope.gameBoard[i] = newChar;\n };\n }", "addTo(board) {\n board.add(this.el);\n }", "setBoardPosition() {\n\n this.forEach((arr, rowIndex) => {\n arr.forEach((block, colIndex) => {\n\n if (block === 0) return;\n\n let absPos = this._getAbsolutePosition(rowIndex, colIndex);\n\n this.board[absPos.row][absPos.col] = this.pieceType;\n });\n });\n }", "function resetBoard() {\n board = [];\n $(__BOARD__).children().remove();\n let nbTilesBuilt = 0;\n let arrayTmp = [];\n board.push(arrayTmp);\n let index1D = 0;\n let index2D = -1;\n while(nbTilesBuilt < nbTiles) {\n if(index2D !== 0 && index2D % (nbColumns - 1) === 0) {\n arrayTmp = [];\n board.push(arrayTmp);\n index1D++;\n index2D = 0;\n } else {\n index2D++;\n }\n arrayTmp.push(__BLACK_TILE_CLASS__);\n $(__BOARD__).append(\"<div data-index-1d='\" + index1D + \"' data-index-2d='\" + index2D + \"' class='\" + __BLACK_TILE_CLASS__ +\n \"' style='width:\"+ sizeTile +\"px; height:\"+ sizeTile +\"px;'></div>\");\n nbTilesBuilt++;\n }\n}", "function updateBoard() {\n // Clear the canvas\n board.clear();\n\n // Draw older gen ghosts\n var colors = [\"#777777\", \"#999999\", \"#BBBBBB\", \"#DDDDDD\", \"#EEEEEE\"];\n for (var gen = 0; gen < genGhosts.length; gen++) {\n drawGen(genGhosts[gen], colors[gen]);\n }\n\n // Draw current gen\n drawGen(currentGen, \"#555555\");\n }", "write(board) {\n this.foreach( (x, y) => { board.setCell(x, y, this.id); } );\n }", "setBoard(board) {\r\n\t\tthis.board = board;\r\n\t}", "function newBoard(){ \n\t // Reset the counter\n\t for(var i = 0; i < 16; i++)\n\t\t\ttileClickCount[i] = 0;\n\t // Reset the variables\n\t last_flipped_id = -1;\n\n\t tiles_flipped = 0; \n\t tiles_cleared = []; \n\n\t // Shuffle the formulas\n\t var formulasAndXValues = [];\n\t for (var i = 0; i < formulas.length; i++)\n\t\t\tformulasAndXValues.push({\"id\": i, \"formula\": formulas[i], \"xval\": xvalues[i]});\n\n\t // Shuffle the order\n\t //formulasAndXValues = shuffle(formulasAndXValues);\n\n\t var output = ''; \n\t for(var i = 0; i < formulas.length; i++)\n\t {\n\t\t\tvar obj = formulasAndXValues[i];\n\t\t\toutput += '<div id=\"tile_' +obj[\"id\"]+ '\" onclick=\"memoryFlipTile(this,\\''+obj[\"id\"]+'\\')\"></div>'; \n\t }\n\n\t document.getElementById('memory_board').innerHTML = output; \n}", "populateBoard() {\n for (let col = 0; col < this.board.getSize(); col++) {\n for (let row = 0; row < this.board.getSize(); row++) {\n // Check the empty candy position (hole), fill with new candy\n if (this.board.getCandyAt(row, col) == null) {\n this.board.addRandomCandy(row, col);\n }\n }\n }\n }", "newTile(board) {\n let num = this.getRandom(this.boardSize);\n let r = Math.random();\n do {\n num = this.getRandom(this.boardSize);\n } while (board[num] != 0);\n if (r < 0.9) {\n board[num] = 2;\n } else {\n board[num] = 4;\n }\n }", "function drawBoard() {\r\n board.setAttribute(\"width\", boardSize);\r\n board.setAttribute(\"height\", boardSize);\r\n let isBlack = true;\r\n // fill board with alternating color\r\n for (let i = 0; i < boardSize; i += cellSize) {\r\n for (let j = 0; j < boardSize; j += cellSize) {\r\n if (isBlack) {\r\n boardContext.fillStyle = \"#000000\";\r\n } else {\r\n boardContext.fillStyle = \"#AAAAAA\";\r\n }\r\n boardContext.fillRect(i, j, cellSize, cellSize);\r\n isBlack = !isBlack;\r\n }\r\n isBlack = !isBlack;\r\n }\r\n}", "update() {\r\n\t\tthis.matrix.forEach((row, y) => row.forEach((tile, x) => {\r\n\t\t\tif (tile && !tile.isEmpty) {\r\n\t\t\t\tlet temp = tile.top;\r\n\t\t\t\ttile.contents.shift();\r\n\t\t\t\tthis.insert(temp);\r\n\t\t\t}\r\n\t\t}));\r\n\t}", "translateBoard() {\n this.pieces = [];\n for (var i = 0; i < this.board.length; i++) {\n \n for (var j = 0; j < this.board[i].length; j++) {\n\n if (this.board[i][j] != \"empty\") {\n var tmp = new Piece(this.scene);\n tmp.active = true;\n tmp.colour = this.board[i][j];\n tmp.id = i * this.board[j].length + j;\n tmp.x = offsetX - incX * parseInt(i);\n tmp.y = offsetY;\n tmp.z = offsetZ - incZ * parseInt(j % 5);\n tmp.line = parseInt(i);\n tmp.column = parseInt(j % 5);\n this.pieces.push(tmp);\n }\n }\n\n }\n // this.scene.displayBoard();\n this.state = STATES.READY_TO_PICK_PIECE;\n\n }", "set board(value) {\n this._board = value;\n }", "function drawBoard(board, height) {\r\n heightLimit = height\r\n let htmlBoard = $('.board')\r\n let boardCells = $('.board .cell')\r\n for (let x = 0; x < boardCells.length; x++) {\r\n boardCells.remove()\r\n }\r\n htmlBoard.css({\r\n 'display': 'grid',\r\n 'grid-template-columns': `repeat(${board.length}, 1fr)`,\r\n 'grid-template-rows': `repeat(${heightLimit}, 1fr)`,\r\n 'height': `${heightLimit * 75 + (2 * heightLimit)}`,\r\n 'width': `${board.length * 75 + (2 * heightLimit)}`,\r\n })\r\n for (let column = 0; column < heightLimit; column++) {\r\n for (let row = 0; row < board.length; row++){\r\n createCell(row, column)\r\n if (board[row][column] === 1) {\r\n getCell(row, column).css('background-color', 'red')\r\n } else if (board[row][column] === 2) {\r\n getCell(row, column).css('background-color', 'yellow')\r\n }\r\n }\r\n }\r\n}", "create_board() {\n console.log(\"creating board\")\n const $board = $(this.selector)\n for (let i = 0; i < this.row; i++) {\n let $row = $('<div>').addClass('row')\n for (let j = 0; j < this.col; j++) {\n let $col = $('<div>').addClass('col empty').attr('row', i).attr('col', j)\n $row.append($col)\n }\n $board.append($row)\n }\n }", "function paintBoard(pos, dropped) {\n x = pos.cellIndex;\n y = pos.parentNode.rowIndex;\n figure = pos.firstChild;\n //Check what are we painting, then update the image, then update the matrix\n if (buttonClicked === 1 || dropped) {\n var img = document.createElement(\"img\");\n img.setAttribute(\"src\", \"water.png\");\n img.setAttribute(\"width\", \"50\");\n if (!figure.hasChildNodes()) {\n figure.appendChild(img);\n } else {\n figure.replaceChild(img, figure.firstChild);\n }\n board[y][x] = 0;\n } else if (buttonClicked === 2) {\n var img = document.createElement(\"img\");\n img.setAttribute(\"src\", \"battleship.png\");\n img.setAttribute(\"width\", \"50\");\n img.setAttribute(\"id\", \"draggable\");\n img.setAttribute(\"x\", x);\n img.setAttribute(\"y\", y);\n $(document).ready(function () {\n $(\"#draggable\").draggable();\n });\n if (!figure.hasChildNodes()) {\n figure.appendChild(img);\n } else {\n figure.replaceChild(img, figure.firstChild);\n }\n board[y][x] = 1;\n\n }\n if (checkShipIntegrity(maxShips, shipCounter)) {\n $(document).ready(function () {\n $(\"#dialog\").dialog(\"open\");\n });\n }\n}", "function drawBoard()\r\n {\r\n //horizontal lines on board \r\n //40 is the size of each block on board \r\n for (var x = 0; x <= boardWidth; x += 40) {\r\n //x & y corrdinates on drawing -- each block in loop + margin until the margin on the other side of canvas\r\n context.moveTo(x + p, p);\r\n //what draws the lines\r\n context.lineTo(x + p, boardHeight + p);\r\n }\r\n //vertical lines on board\r\n for (var x = 0; x <= boardHeight; x += 40) {\r\n context.moveTo(p, x + p);\r\n context.lineTo(boardWidth + p,x + p);\r\n }\r\n //sets the color \r\n context.strokeStyle = \"#7247FF\";\r\n //actually draws the above defines lines \r\n context.stroke();\r\n }", "function draw() {\r\n\t$('#board').empty();\r\n\tfor (var i = 0; i < 4; i++) {\r\n\t\tfor (var j = 0; j < 4; j++) {\r\n\t\t\tif (grid[i][j] != 0) {\r\n\t\t\t\tvar divToAppend = \"<div class='cell'>\"+grid[i][j]+\"</div>\";\r\n\t\t\t\t$(\"#board\").append(divToAppend).show('slow');\r\n\t\t\t\tapplyBackground($('#board div:last-child'));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\t$(\"#board\").append(\"<div class='cell'></div>\");\r\n\t\t}\r\n\t}\r\n\t$(\"#score\").empty().append(score);\r\n}", "function _Board() {\r\n const [history, setHistory] = useState([[]])\r\n const [hasWon, setHasWon] = useState(false)\r\n const [rows, setRows] = useState(3)\r\n const [columns, setColumns] = useState(3)\r\n const [colorAmount, setColorAmount] = useState(3)\r\n //deep deep copy of current board\r\n let board = history[history.length - 1].map(row => [...row])\r\n\r\n // const colors = ['#7800ff', '#FF7800', '#00FF78'].slice(0, colorAmount)\r\n const palettes = [\r\n ['#CE3141', '#31CEBE'],\r\n ['#7800ff', '#FF7800', '#00FF78'],\r\n ['#66D926', '#26BFD9', '#9926D9', '#D94026'],\r\n ]\r\n let colors = palettes[colorAmount - 2]\r\n\r\n function updateHistory(board) {\r\n const localHistory = [...history, board]\r\n setHistory(localHistory)\r\n }\r\n\r\n useEffect(() => {\r\n initBoard(rows, columns, colors[0], setHistory)\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [columns, rows, colorAmount, hasWon])\r\n\r\n /* handleFunctions are the only non pure functions due to amount of parameter*/\r\n function handelChange(row, column) {\r\n changeTile(row, column, board, colorAmount, colors, updateHistory)\r\n\r\n const win = checkWin(board, rows, columns)\r\n if (win) {\r\n //flashes the background green and removes it afterwards\r\n setHasWon(true)\r\n setTimeout(() => setHasWon(false), 1000)\r\n }\r\n }\r\n function handleRows(rows) {\r\n setRows(rows)\r\n }\r\n function handleColumns(columns) {\r\n setColumns(columns)\r\n }\r\n function handleColorAmount(colorAmount) {\r\n setColorAmount(colorAmount)\r\n }\r\n function handleUndo() {\r\n undoMove(history, setHistory)\r\n }\r\n function handleShuffle(shuffleAmount = 20) {\r\n shuffleBoard(\r\n shuffleAmount,\r\n board,\r\n rows,\r\n columns,\r\n history,\r\n colorAmount,\r\n colors,\r\n updateHistory,\r\n )\r\n }\r\n function handleReset() {\r\n initBoard(rows, columns, colors[0], setHistory)\r\n }\r\n\r\n return (\r\n <div className='board-wrapper'>\r\n <div className='control-wrapper'>\r\n <StyledButton\r\n text={hasWon ? 'You did it!' : 'Shuffle'}\r\n onClick={() => handleShuffle()}\r\n />\r\n <StyledButton text={'Undo'} onClick={() => handleUndo()} />\r\n <StyledButton text={'Reset'} onClick={() => handleReset()} />\r\n <div className='input-wrapper'>\r\n <label>\r\n Rows:\r\n <input\r\n placeholder='Rows'\r\n value={rows}\r\n onChange={e => handleRows(e.target.value)}\r\n type='number'\r\n min='2'\r\n max='10'\r\n />\r\n </label>\r\n <label>\r\n Columns:{' '}\r\n <input\r\n placeholder='Columns'\r\n value={columns}\r\n onChange={e => handleColumns(e.target.value)}\r\n type='number'\r\n min='2'\r\n max='10'\r\n />\r\n </label>\r\n <label>\r\n Colors:\r\n <input\r\n placeholder='Colors'\r\n value={colorAmount}\r\n onChange={e => handleColorAmount(e.target.value)}\r\n type='number'\r\n min='2'\r\n max='4'\r\n />\r\n </label>\r\n </div>\r\n </div>\r\n <div className={`board ${hasWon ? 'bg-green' : ''}`}>\r\n {board.map((row, index) => (\r\n <TileRow\r\n rowNumber={index}\r\n row={row}\r\n onClick={handelChange}\r\n key={index}\r\n />\r\n ))}\r\n </div>\r\n </div>\r\n )\r\n}", "function updateBoard(player, approvedMove){\n let activeCell;\n for(let i = 1; i <= 100; i++){\n activeCell = document.getElementById(i);\n if(approvedMove[i]){\n activeCell.classList.remove('permission');\n }\n if(i === player.colIdWarrior){\n if (activeCell.className === 'knife') {\n activeCell.classList.remove('knife');\n activeCell.classList.add(player.weapon);\n player.weapon = 'knife';\n } else if (activeCell.className === 'star') {\n activeCell.classList.remove('star');\n activeCell.classList.add(player.weapon);\n player.weapon = 'star';\n } else if (activeCell.className === 'star2') {\n activeCell.classList.remove('star2');\n activeCell.classList.add(player.weapon);\n player.weapon = 'star2';\n } else if (activeCell.className === 'tool') {\n activeCell.classList.remove('tool');\n activeCell.classList.add(player.weapon);\n player.weapon = 'tool';\n } else if (activeCell.className === 'sword') {\n activeCell.classList.remove('sword');\n activeCell.classList.add(player.weapon);\n player.weapon = 'sword';\n } else {\n }\n\n activeCell.style.backgroundImage = `url('img/${player.img}.png'), url('img/${player.weapon}.png')`;\n }\n }\n }", "setOriginalBoard(obj) {\r\n\t\tthis.originalBoard = SudokuBoard.cloneBoard(obj);\r\n\t}", "function updateBoard(entity) {\n board[entity.position.row][entity.position.column].pop();\n board[entity.position.row][entity.position.column].push(entity);\n}", "placeOn(board) {\n board.place(this.el, this.gridPosition);\n }", "function addPosToBoard() {\r\n let blockPos = getPosOnBoard();\r\n blockPos.forEach(block => { //change the matching board pos to the colour code\r\n board[block.y][block.x] = currentTetromino.colourCode;\r\n });\r\n}", "tick() {\n // debugger;\n const newBoard = this.makeBoard();\n console.log(newBoard);\n\n // TODO: Here is where you want to loop through all the cells\n // on the existing board and determine, based on it's neighbors,\n // whether the cell should be dead or alive in the new board\n // (the next iteration of the game)\n //\n // You need to:\n // 1. Count alive neighbors for all cells\n // 2. Set the next state of all cells in newBoard,\n // based on their current alive neighbors\n\n\n for (let i = 0; i < this.height; i++) {\n for (let j = 0; j< this.width; j++) {\n let livingNum = this.livingNeighbors(i, j);\n //if current cell is alive\n if (this.board[i][j] === 1) {\n //current cell has either 2 or 3 living neighbors - LIVE CONDITION\n if (livingNum === 2 || livingNum === 3) {\n newBoard[i][j] = 1;\n }\n } // current cell is dead\n else if (this.board[i][j] === 0) {\n //if cell has exactly 3 live neighbors\n if (livingNum === 3) {\n newBoard[i][j] = 1;\n }\n }\n }\n }\n\n this.board = newBoard;\n }", "updateBoard(){\r\n for(let x = 0; x<13; ++x) {\r\n if(this.hasWinner){break;}\r\n for (let y = 0; y < 13; ++y) {\r\n if(this.hasWinner){break;}\r\n if(this.getColor(x,y) !== 0){\r\n this.removeSandwich(x,y);\r\n if (this.hasFiveInARow(x,y)) {\r\n this.hasWinner = true;\r\n this.declareWinner(x,y);\r\n }\r\n }\r\n }\r\n }\r\n this.updateTurn();\r\n }", "_cloneBoard(board) {\n let newBoard = [];\n board.forEach(row => {\n let newRow = [];\n row.forEach(sq => newRow.push(sq));\n newBoard.push(newRow);\n });\n return newBoard;\n }", "function refresh_board(loadedboard){\n\tcounter = 1;\n\tfor (i=0; i<3; i++){\n\t\tfor (j=0; j<3; j++){\n\t\t\tif (loadedboard[i][j] == \"X\" || loadedboard[i][j] == \"O\"){\n\t\t\t\t$(\"#\"+counter+\" p\").replaceWith(\"<p>\"+loadedboard[i][j]+\"</p>\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$(\"#\"+counter+\" p\").replaceWith(\"<p>+</p>\");\n\t\t\t}\n\t\t\tcounter++;\n\t\t}\n\t}\n}", "function updatePiece(checkerPos, tilePos, takenPos, takeThisPiece){\n\n anotherMove = false;\n\n for(var i = 0; i < boardArr.length;i++){\n if(checkerPos.tileLocation == boardArr[i].tileLocation){\n boardArr[i].currPieceLight = 0;\n boardArr[i].empty = true;\n }\n }\n\n document.getElementById(checkerPos.tileLocation+'Tile').removeChild(document.getElementById(checkerPos.tileLocation+'Tile').childNodes[0]);\n checkerPos.tileLocation = tilePos.tileLocation;\n checkerPos.x = tilePos.x;\n checkerPos.y = tilePos.y;\n\n\n for(var i = 0; i < highlightedTiles.length; i++){\n document.getElementById(highlightedTiles[i].tileLocation+'Tile').style.backgroundColor=\"#A67D5D\";\n let el = document.getElementById(highlightedTiles[i].tileLocation+'Tile');\n let elClone = el.cloneNode(true);\n boardApp.replaceChild(elClone, el);\n }\n\n for(var i = 0; i < anotherMoveArr.length; i++){\n document.getElementById(anotherMoveArr[i].tileLocation+'Tile').style.backgroundColor=\"#A67D5D\";\n let el = document.getElementById(anotherMoveArr[i].tileLocation+'Tile');\n let elClone = el.cloneNode(true);\n boardApp.replaceChild(elClone, el);\n }\n\n if(takenPos){\n document.getElementById(takenPos.tileLocation+'Tile').removeChild(document.getElementById(takenPos.tileLocation+'Tile').childNodes[0]);\n takenPos.empty = true;\n takenPos.currPieceLight = 0;\n }\n\n if(checkerPos.color == 'light' && checkerPos.x == 8){checkerPos.crowned = true;}\n if(checkerPos.color == 'dark' && checkerPos.x == 1){checkerPos.crowned = true;}\n tilePos.empty = false;\n highlightedTiles = [];\n anotherMoveArr = [];\n anotherMoveArrTaken = [];\n takenPieceArr = [];\n pieceSelectedBool = false;\n pieceSelectedInfo = undefined;\n\n\n\n\n if(takenPos){\n if(checkerPos.color == 'light'){darkArr.splice(takeThisPiece, 1);}\n else{lightArr.splice(takeThisPiece, 1);}\n }\n\n if(takenPos){\n currScan(checkerPos);\n }\n\n buildPiece(checkerPos);\n\n\n\n //New Stuff\n if(lightArr.length == 0){\n alert('Dark Wins');\n }\n else if(darkArr.length == 0){\n alert('Light Wins');\n }\n else{\n if(!anotherMove){\n whiteTurn = !whiteTurn;\n textHelp();\n if(whiteTurn){scanner(lightArr)}\n else{scanner(darkArr)}\n }\n else {\n captureAgain(checkerPos);\n }\n }\n\n}", "function createBoard() {\n window.board = new Board(4, 13);\n createCards();\n window.board.placeCards();\n}", "function drawBoard() {\n var height = cellside * sidelength;\n var width = cellside * sidelength;\n from_to(0, height, cellside, function (i) {\n ctx.moveTo(i, 0);\n ctx.lineTo(i, width);\n ctx.moveTo(0, i);\n ctx.lineTo(height, i);\n });\n ctx.strokeStyle = \"black\";\n ctx.stroke();\n}", "update_board(coordinates_before, coordinates_after) {\r\n this.listOfMoves.push([[coordinates_before[0],coordinates_before[1]], [coordinates_after[0], coordinates_after[1]]]);\r\n var pawn = this.currBoard[coordinates_before[0]][coordinates_before[1]+1];\r\n this.currBoard[coordinates_before[0]][coordinates_before[1]+1] = 0;\r\n this.currBoard[coordinates_after[0]][coordinates_after[1]+1] = pawn;\r\n\r\n var dummy_board = [];\r\n for(var i = 0; i < this.currBoard.length; i++){\r\n var dummy_line=[];\r\n for(var j = 0; j < this.currBoard[i].length; j++){\r\n dummy_line.push(this.currBoard[i][j]);\r\n }\r\n dummy_board.push(dummy_line);\r\n }\r\n this.listOfBoards.push(dummy_board);\r\n this.indexBoard = this.indexBoard+1;\r\n }", "createBoard() {\n this.board.style.width = String(this.width * 10) + \"px\";\n this.board.style.height = String(this.height * 10) + \"px\";\n var numberOfElements = this.width * this.height;\n for (var i=0; i < numberOfElements; i++) {\n var newDiv = document.createElement(\"div\");\n this.board.appendChild(newDiv);\n }\n this.cells = document.querySelectorAll(\"#board div\");\n //adding eventlistener to the board elements for mouseover change the class thus the color of the element\n for (var j=0; j < this.cells.length; j++) {\n this.cells[j].addEventListener(\"mouseover\", function() {\n if (this.className.indexOf(\"live\") == -1) {\n this.classList.toggle(\"live\");\n }\n });\n }\n }", "function update_board(data){\n if(data == void(0)){ Promise.reject(data);return;}// not difined => ignore\n var save_player = player;\n for(var i = 0;i<=length-1;i++){\n for(var j = 0;j<=length-1;j++){\n if(data.board[i][j] === 'dark'){ state[i][j] = 1; player = 1;change_color(i,j);}\n else if(data.board[i][j] === 'light'){ state[i][j] = 2; player = 2;change_color(i,j);}\n }\n }\n piecesp1 = data.count.dark;\n piecesp2 = data.count.light;\n update_scores();\n player = save_player;\n}", "function drawBoard(state){\n\n var canvas = $(\"#canvas\");\n //height and width of the board\n var W = 600, H = 600;\n canvas.css(\"height\", H);\n canvas.css(\"width\", W);\n\n var svg = $(makeSVG(W, H));\n svg.append(makeRectangle(0, 0, H, W, colorBoard));\n\n\n var numOfPix = ((W-100)/(state.size-1));//so that the board has 50 pix of room on each side\n\n //token size\n var tsize;\n if(state.size == 9)\n tsize = 20;\n else if(state.size == 13)\n tsize = 15;\n else//size is 13\n\ttsize = 13;\n\n\n var x1 = 0;\n var y1 = 0;\n\n //makes the majority of the board\n for(x = 50; x<(W-50); x += numOfPix){//50 to 550 with a 50 pix boarder\n\n for(y = 50; y<(W-50);y += numOfPix){\n\n svg.append(makeLine(x, y, x+numOfPix, y));\n svg.append(makeLine(x, y, x, y+numOfPix));\n\n svg.append(makeCircle(x, y, tsize, state.board[y1][x1]));//makes a board\n y1++;\n }\n y1 = 0;\n x1++;\n }\n\n\n\t//makes the last x line (bottom line)\n\tvar x1 = 0;\n\tfor(x = 50; x<(W-50); x += numOfPix){//50 to 550 with a 50 pix boarder\n \tsvg.append(makeLine(x, W-50, x+numOfPix, W-50));\n\n svg.append(makeCircle(x, W-50, tsize, state.board[state.size-1][x1]));//bottom of the y array\n x1++;\n }\n\n //makes the last y line (right line)\n\tvar y1 = 0;\n\tfor(y = 50; y<(W-50); y += numOfPix){//50 to 550 with a 50 pix boarder\n \tsvg.append(makeLine(W-50, y,W-50, y+numOfPix));\n\n svg.append(makeCircle(W-50,y, tsize, state.board[y1][state.size-1]));//right of the x array\n y1++;\n }\n\n //makes the last circle at the bottom right\n svg.append(makeCircle(W-50,W-50, tsize, state.board[state.size-1][state.size-1]));\n\n\n canvas.empty().append(svg);\n}", "function buildBoard(size){\n\t\t\t$(\"#board\").append( $(\"<table id='boardId'>\").addClass(\"boardTable\") );\n\t\t\tfor (i = 0; i < size; ++i) {\n\t\t\t\t$(\".boardTable\").append( $(\"<tr>\").addClass(\"boardRow\") );\n\t\t\t\tfor (j = 0; j < size; ++j) {\n\t\t\t\t\t$(\".boardRow:last\").append( $(\"<td>\").addClass(\"boardCell\").data(\"column\",j)\n\t\t\t\t\t.click(function() {\n var __this = this;\n\t\t\t\t\t\tif(turn==0) {\n if (firstMove) {\n persistNewGame(function(err,game){\n if (err) {\n Materialize.toast('Sorry, something went wrong with creating the new game.', 4000);\n }\n firstMove = false;\n gameId = game.id;\n playColumn(jQuery.data(__this,\"column\"));\n });\n } else {\n playColumn(jQuery.data(__this,\"column\"));\n }\n }\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function movePiece(curWhiteSpace,newSpace,currentBoard) {\n\n // update input board\n currentBoard[curWhiteSpace-1] = 'x';\n currentBoard[newSpace-1] = 'W';\n $('#chessboardInput').val(currentBoard.join('')); \n \n // update display board \n $('#chessboard td[data-pos='+(curWhiteSpace)+']').children('div').remove();\n $('#chessboard td[data-pos='+(curWhiteSpace)+']').addClass('gone');\n $('#chessboard td[data-pos='+(newSpace)+']').append(\"<div class='whiteKnight'><img src='white.png' /></div>\");\n $(\"#chessboard td\").removeClass('movableGreenSpaces'); \n \n // notify computer to move\n return true;\n \n}", "placePiece(row, square) {\n let piece = this.piece;\n this.board[row][square] = this.piece;\n if ( this.checkForWin(row, square, piece) ) {\n return true;\n }\n this.togglePiece();\n return;\n }", "function buildBoard(){\n\t \t\tvar mineCount = 0;\n\t \t\tfor (var i = 0; i < ROWS; i+=1) {\n\t\t\t\tfor (var j = 0; j < COLS; j+=1) {\n\t\t\t\t\tvar x_shift = Math.floor(0.5*start) + i*stepW;\n\t\t\t\t\tvar y_shift = Math.floor(0.5*start) + j*stepH;\n\t\t\t\t\tvar circleCol = randomColorGenerator(x_shift,y_shift);\n\t\t\t\t\tvar invertedCol = getInvertedColors(circleCol);\n\t\t\t\t\tvar myCircle = new Path.Circle(new Point(x_shift+circleSize,y_shift+circleSize),circleSize).fillColor = circleCol;\n\t\t\t\t\t//initialise space object\n\n\n\t\t\t\t\tvar spaceObj = {\n\t\t\t\t\t\t\t\t\tindex: n, \n\t\t\t\t\t\t\t\t\tcolor: circleCol,\n\t\t\t\t\t\t\t\t\toutline: invertedCol,\n\t\t\t\t\t\t\t\t\tcircleRef: myCircle,\n\t\t\t\t\t\t\t\t\tpos_x: 0, pos_y: 0, \n\t\t\t\t\t\t\t\t\tholdsMine: 0, \n\t\t\t\t\t\t\t\t\tadjacentNeighbours: 0, \n\t\t\t\t\t\t\t\t\tclicked: false,\n\t\t\t\t\t\t\t\t\tflagged: false,\n\t\t\t\t\t\t\t\t\tneighbourIndexList: []\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\tspaceObj.pos_x = x_shift+circleSize;\n\t\t\t\t\tspaceObj.pos_y = y_shift+circleSize;\n\t\t\t\t\tspaceObj.holdsMine = assignMine();\n\n\t\t\t\t\tif(spaceObj.holdsMine){\n\t\t\t\t\t\tmineCount++;\n\t\t\t\t\t}\n\n\t\t\t\t\tspaces.push(spaceObj);\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tplayerStats.totalMines = mineCount;\n\t\t\tplayerStats.flags = mineCount;\n\t \t}", "function displayboard() {\n //recall board is 7x6\n for (var row = 0; row < 6; row++) {\n for (var col = 0; col < 7; col ++) {\n if (board[row][col] != 0) {\n //https://www.w3schools.com/tags/tag_tr.asp\n //https://www.w3schools.com/tags/tag_td.asp\n var cell = $(\"tr:eq(\" + row + \")\").find('td').eq(col);\n cell.children('button').addClass(board[row][col]);\n }\n }\n }\n}", "function drawCurrentGameBoard(movepieces){\n var k = 0;\n for(var i = 0; i<8; i++){\n for(var j = 0; j<8; j++){\n var cell = gameboard.rows[i].cells[j];\n if (movepieces[k] == 1) {\n //piece is a red piece, set class to redPC\n cell.className = \"redPC\";\n }\n else if (movepieces[k] == 2) {\n //piece is a white piece, set class to whitePC\n cell.className = \"whitePC\";\n }\n else if (movepieces[k] == 3) {\n //piece is a red King, set class to redPCKing\n cell.className = \"redPCKing\";\n }\n else if (movepieces[k] == 4) {\n //piece is a white King, set class to whitePCKing\n cell.className = \"whitePCKing\";\n }\n else if (movepieces[k] == 0) {\n //board is empty, see if should be a white square or black.\n if (ValidMove[k] == 1) {\n cell.className = \"black\";\n }\n else{\n cell.className = \"white\";\n }\n }\n k++;\n }\n }\n}", "function updateInternalBoard() {\n const inputs = document.querySelectorAll('.cell');\n for (let i = 0, rowAndCol, row, col; i < inputs.length; i++) {\n rowAndCol = getRowAndCol(inputs[i].id);\n row = rowAndCol[0];\n col = rowAndCol[1];\n board[row][col] = parseInt(inputs[i].value);\n }\n}", "syncBoard () {\n /**\n * Why not just use \"this.board = this.chessGame.getBoard()\"? It has to do with\n * how Vuejs handles reactivity within arrays. Long-story-short, in order to sync\n * any side-effects from the move, such as castles, promotions, and captures, it is best\n * for our purposes to manually assign the changed pieces within the array item.\n */\n const updatedBoard = this.chessGame.getBoard()\n for (let i = 0; i < updatedBoard.length; i++) {\n if (this.board[i].piece !== updatedBoard[i].piece) {\n this.board[i].piece = updatedBoard[i].piece\n }\n }\n }", "function renderBoard() {\n let move = $(this);\n let index = $(this).attr('id');\n if( gameState.gameBoard[index] == null ) {\n if( currentPlayer == 1 ) {\n currentPlayer = 2;\n move.text('x') ;\n move.attr('data-score', 'x')\n } else {\n currentPlayer = 1;\n move.text('o');\n move.attr('data-score', 'o')\n }\n score = move.attr('data-score');\n gameState.gameBoard.splice(index, 1, score)\n checkWin()\n message.text(`Player ${ currentPlayer } Goes Next...`);\n }\n}", "updateBoard(board, id, coordInfo)\n {\n if(game.state.current===\"win\")\n return\n\n\n game.board = board\n console.log('BOARD: ', game.board)\n //rub out pieces, so we don't draw multiple on top of each other\n for(var i in game.placedPieces)\n {\n game.placedPieces[i].kill();\n }\n game.placedPieces = []\n //draw the pieces on the screen\n for(var i=0; i < game.n; i++) {\n for (var j=0; j < game.n; j ++) {\n\n var bx = game.startingX + i*game.squareSize*3;\n var by = game.startingY + j * game.squareSize*3;\n if(game.board[j][i] === \"x\"){\n var bigPiece = game.addSpriteWithWidth(bx, by, 'X', game.squareSize*3, game.squareSize*3)\n bigPiece.big = true\n }\n if(game.board[j][i] === \"o\"){\n var bigPiece = game.addSpriteWithWidth(bx, by, 'O', game.squareSize*3, game.squareSize*3)\n bigPiece.big = true\n\n }\n // Needs draw logic\n if (game.board[j][i] === 'Draw')\n {\n\n var bigPiece1 = game.addSpriteWithWidth(bx, by, 'poopemoji', game.squareSize*3, game.squareSize*3)\n bigPiece1.big = true\n }\n\n for (var k=0; k < game.n; k++) {\n for (var l=0; l < game.n; l++) {\n var lx = game.startingX + i*game.squareSize*3 + k*game.squareSize;\n var ly = game.startingY + j*game.squareSize*3 + l*game.squareSize;\n if(typeof game.board[j][i] === 'string')\n {\n //if magic overwrites closed, then if you click on a \"supposed\" closed board and it is magic itll loop)\n //Do nothing (continue)\n }\n else if(game.board[j][i][l][k] === \"x\"){\n game.addSprite(lx, ly, 'X');\n\n }\n else if(game.board[j][i][l][k] === \"o\"){\n game.addSprite(lx, ly, 'O');\n }\n }\n }\n }\n }\n }", "applyTo(state) {\n let nextState = new State(state)\n\n //put the letter on the board\n nextState.board[this.movePosition] = state.turn\n\n if (state.turn === 'O') nextState.oMovesCount++\n\n nextState.advanceTurn()\n\n return nextState\n }", "function updateBoard(guess) {\n\n if (lettersRemaining > 0) {\n if (isNew(guess)) {\n context.fillText(event.key, cursor, 550);\n cursor += 20;\n if (isMatch(guess)) {\n reveal(guess);\n guessed.push(guess);\n } else {\n guessed.push(guess);\n gamestate++;\n drawgallows(gamestate);\n }\n }\n }\n }", "function makeMove(player, row, col) {\n\n // access uuid of the playing board\n var uuid = $('table').data('uuid');\n\n var currentGameRef = fb.child(uuid);\n\n // get the current board from firebase\n currentGameRef.once('value', function(snapshot) {\n \tvar currentGame = snapshot.val();\n \tvar currentBoard = currentGame.board;\n\n\n \t// update the board, and push new board to firebase\n \tcurrentBoard[row][col] = player;\n \tcurrentGameRef.update({board: currentBoard});\n\n // flip player turns\n \tif (player === 'X'){\n \t\tcurrentGameRef.update({whoseTurn: 'O'});\n \t}\n \telse {\n \t currentGameRef.update({whoseTurn: 'X'});\n \t}\n\n\n\n // update num of free playing spaces left on board\n \tvar freeSpaces = currentGame.freeSpaces;\n \tfreeSpaces--;\n \tcurrentGameRef.update({freeSpaces: freeSpaces});\n\n \t// render updated board on screen\n updatePlayingBoard(currentBoard);\n\n\n // check for winner\n if ((currentBoard[0][0] === 'X' && currentBoard[0][1] === 'X' && currentBoard[0][2] === 'X') ||(currentBoard[1][0] === 'X' && currentBoard[1][1] === 'X' && currentBoard[1][2] === 'X') ||(currentBoard[2][0] === 'X' && currentBoard[2][1] === 'X' && currentBoard[2][2] === 'X') ||(currentBoard[0][0] === 'X' && currentBoard[1][0] === 'X' && currentBoard[2][0] === 'X') ||(currentBoard[0][1] === 'X' && currentBoard[1][1] === 'X' && currentBoard[2][1] === 'X') || (currentBoard[0][2] === 'X' && currentBoard[1][2] === 'X' && currentBoard[2][2] === 'X') |(currentBoard[0][0] === 'X' && currentBoard[1][1] === 'X' && currentBoard[2][2] === 'X') ||(currentBoard[2][0] === 'X' && currentBoard[1][1] === 'X' && currentBoard[0][2] === 'X') ||(currentBoard[0][0] === 'O' && currentBoard[0][1] === 'O' && currentBoard[0][2] === 'O') ||(currentBoard[1][0] === 'O' && currentBoard[1][1] === 'O' && currentBoard[1][2] === 'O') ||(currentBoard[2][0] === 'O' && currentBoard[2][1] === 'O' && currentBoard[2][2] === 'O') ||(currentBoard[0][0] === 'O' && currentBoard[1][0] === 'O' && currentBoard[2][0] === 'O') ||(currentBoard[0][1] === 'O' && currentBoard[1][1] === 'O' && currentBoard[2][1] === 'O') ||(currentBoard[0][2] === 'O' && currentBoard[1][2] === 'O' && currentBoard[2][2] === 'O') ||(currentBoard[0][0] === 'O' && currentBoard[1][1] === 'O' && currentBoard[2][2] === 'O') ||(currentBoard[2][0] === 'O' && currentBoard[1][1] === 'O' && currentBoard[0][2] === 'O') ){\n\t var winner;\n\n\t // winner is opposite of last player\n if (player === 'X'){\n \t winner = 'O';\n \t }\n \t else {\n \t\twinner='X'\n\t }\n\n showScore('WIN', winner);\n\n // make a new board\n\t var newGame = {\n\t board: [['b', 'b', 'b'],['b', 'b', 'b'],['b', 'b', 'b']],\n\t whoseTurn: 'X',\n\t freeSpaces: 9\n };\n currentGameRef.update(newGame);\n updatePlayingBoard(newGame.board);\n }\n\n\n\n // if no winner yet, check for a tie\n \tif(freeSpaces<= 0){\n\t var newGame = {\n\t board: [['b', 'b', 'b'],['b', 'b', 'b'],['b', 'b', 'b']],\n\t whoseTurn: 'X',\n\t freeSpaces: 9\n };\n currentGameRef.update(newGame);\n updatePlayingBoard(newGame.board);\n showScore('TIE', '');\n \t }\n });\n}", "function initTestBoard(board) {\n\tboard = board.map((v, i) => i);\n}", "function regenerateBoard() {\n //create new board\n let newBoard = new Board(dimension.value, split.value, vacant.value);\n newBoard.randomlyPopulateBoard();\n let newTable = newBoard.toHTML();\n //replace\n let oldTable = document.getElementById(\"table\");\n oldTable.replaceWith(newTable);\n //update references\n gameBoard = newBoard;\n}", "getPossibleMoves( board ) {\n\n }", "function initiateBoard(){\n\tblankx=wid-1;\n\tblanky=height-1;\n\tfor(i=0;i<=numTiles;i++) position[i]=i;\n}", "function createBoard() {\n\tfor (let i = 0; i < layout.length; i++) {\n\t\tconst square = document.createElement('div')\n\t\tgrid.appendChild(square)\n\t\tsquares.push(square)\n\n\t\t//add layout to the board\n\t\t//we want to check what is on the board on every position :\n\t\tif (layout[i] === 0) {\n\t\t\tsquares[i].classList.add('pac-dot')\n\t\t} else if (layout[i] === 1) {\n\t\t\tsquares[i].classList.add('wall')\n\t\t} else if (layout[i] === 2) {\n\t\t\tsquares[i].classList.add('ghost-lair')\n\t\t} else if (layout[i] === 3) {\n\t\t\tsquares[i].classList.add('power-pellet')\n\t\t}\n\t}\n}", "copyOfBoard() {\r\n const rawBoard = this.getRawBoard();\r\n const rawBoardCopy = rawBoard.map(function(arr) {\r\n return arr.slice();\r\n });\r\n\r\n return new Board(8, 8, rawBoardCopy);\r\n }", "function createNewPuzzle(rows, cols) {\n xw[\"clues\"] = {};\n xw[\"title\"] = DEFAULT_TITLE;\n xw[\"author\"] = DEFAULT_AUTHOR;\n xw[\"rows\"] = rows || DEFAULT_SIZE;\n xw[\"cols\"] = cols || xw.rows;\n xw[\"fill\"] = [];\n for (let i = 0; i < xw.rows; i++) {\n xw.fill.push(\"\");\n for (let j = 0; j < xw.cols; j++) {\n xw.fill[i] += BLANK;\n }\n }\n console.log(xw.fill);\n updateInfoUI();\n document.getElementById(\"main\").innerHTML = \"\";\n createGrid(xw.rows, xw.cols);\n\n isSymmetrical = true;\n current = {\n \"row\": 0,\n \"col\": 0,\n \"acrossWord\": '',\n \"downWord\": '',\n \"acrossStartIndex\":0,\n \"acrossEndIndex\": DEFAULT_SIZE,\n \"downStartIndex\": 0,\n \"downEndIndex\": DEFAULT_SIZE,\n \"direction\": ACROSS\n };\n\n grid = document.getElementById(\"grid\");\n squares = grid.querySelectorAll('td');\n\n updateActiveWords();\n updateGridHighlights();\n updateSidebarHighlights();\n updateCluesUI();\n\n for (const square of squares) {\n square.addEventListener('click', mouseHandler);\n }\n grid.addEventListener('keydown', keyboardHandler);\n}", "function mergeBoard() {\n for(var i = 0; i < piece.pieceName.length; i++)\n for(var j = 0;j < piece.pieceName[0].length; j++)\n if( piece.pieceName[i][j] == 1) {\n if( i + piece.yPos < 0) {\n gameOver();\n return;\n }\n board[ i + piece.yPos][ j + piece.xPos] = piece.colour;\n }\n sound.fall.play();\n holdLock = false; /* Releasing swap lock */\n}", "apply(mutableBoardData, cloneSquare){\n //5..2...4....6.3....3...9..7..3..7.....7..8...6......2..8......3...4..6.....1..5..\n let mutations = 0;\n this.cellIndexes.forEach( (cellIdx, index, array) => {\n let immutableSquare = mutableBoardData[cellIdx];\n let replacementCandidates = [...immutableSquare.candidates];\n \n \n // unlike cage, littleKiller can have repeats in other boxes.\n\n \n let otherCellIndexes = this.cellIndexes.filter( i=> i!== cellIdx);\n replacementCandidates.forEach( (candidate, cIndex, cArray) => {\n if( candidate > 0 ){\n if( ! this.cageValidates(mutableBoardData, this.value-candidate, otherCellIndexes)){\n replacementCandidates[cIndex] = 0;\n mutations = mutations+1;\n }\n \n\n }\n });\n \n\n \n \n \n\n // if the region has a candidate that exists in the intersection of two regions, \n // and the candidate only exists in that intersection on the Other rule, \n //then this candidate must also exist within said intersection on this rule!\n\n\n if( mutations>0 ){\n let newSquareData = cloneSquare(immutableSquare);\n console.log(\"Removing value from square\");\n newSquareData.candidates = replacementCandidates;\n \n mutableBoardData[cellIdx]=newSquareData;\n }\n\n \n \n\n });\n return mutations;\n \n }" ]
[ "0.66442454", "0.6634518", "0.64425874", "0.6410926", "0.6409043", "0.6390954", "0.63543725", "0.6344303", "0.6341869", "0.63381916", "0.6297657", "0.6277048", "0.62498033", "0.62179506", "0.62153035", "0.6211329", "0.6207918", "0.6198665", "0.6193621", "0.61816263", "0.6179123", "0.617455", "0.6170189", "0.61514103", "0.6141279", "0.6133833", "0.60991883", "0.6097159", "0.60925597", "0.6077763", "0.60727274", "0.6067975", "0.6056207", "0.605601", "0.60511386", "0.60432565", "0.6032617", "0.60319424", "0.6027566", "0.6015579", "0.6006969", "0.6003907", "0.5999719", "0.59991515", "0.59907717", "0.5971788", "0.5967236", "0.59661955", "0.5962503", "0.59420836", "0.5942064", "0.5938759", "0.5936708", "0.5917103", "0.59044206", "0.5896253", "0.5895373", "0.5881679", "0.58752674", "0.5875003", "0.58551764", "0.5847156", "0.5841456", "0.5835143", "0.58299327", "0.5824021", "0.582162", "0.58204025", "0.5817411", "0.5810643", "0.5802904", "0.58013624", "0.57985777", "0.57972765", "0.57961565", "0.57847536", "0.5778796", "0.5775193", "0.5768597", "0.57540923", "0.5751494", "0.5746416", "0.57463115", "0.5730107", "0.57276094", "0.5726835", "0.57268167", "0.57158196", "0.57051826", "0.5704312", "0.5696637", "0.5695633", "0.56929314", "0.56929165", "0.5691845", "0.5691372", "0.5690817", "0.56905884", "0.56888926", "0.56828964" ]
0.7477831
0
'auth' is from 'combineReducers' from 'reducers/index.js'
function mapStateToProps({ auth }) { return { token: auth.token } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function combineReducers ($ngReduxProvider,\n productReducer,\n userReducer,\n middlewares) {\n\n console.log(productReducer);\n console.log(userReducer);\n\n var reducers = {\n product: productReducer,\n user: userReducer\n };\n\n var rootReducer = Redux.combineReducers(reducers);\n\n // var actions = userActions();\n // actions.action1();\n // actions.action2();\n\n // $ngReduxProvider.createStoreWith(rootReducer);\n\n $ngReduxProvider.createStoreWith(rootReducer, middlewares);\n }", "function mapStateToProps(state){\n return{\n //!!!!!!!!!!CREATE REDUCER FOR HANDLING REDUC'S AUTH-TOKEN 'STATE' AND MAP HERE\n isAuthenticated: state.authReducer1.isAuthenticated,\n // userProfile: state.userReducer1.userProfile\n };\n}", "function mapStateToProps(state) {\n return {auth: state.auth};\n}", "function mapStateToProps({auth}) {\n return {\n auth\n };\n}", "function mapStateToProps({ auth }) {\n //drog piece info from state\n return { auth };\n}", "function rootReducer() {\n return combineReducers({\n accounts: accountReducer,\n })\n}", "function mapStateToProps({ auth }) {\n\treturn { auth };\n}", "function mapStateToProps(state) {\n return {\n auth: state.auth\n };\n}", "function mapStateToProps(state) {\n return {\n auth: state.auth,\n }\n}", "function mapStateToProps(state) {\n return {\n auth: state.auth,\n }\n}", "function mapStateToProps(state) {\n return {\n auth: state.auth,\n }\n}", "function mapStateToProps(state) {\n return {\n auth: state.auth,\n };\n}", "function mapStateToProps(state) {\n return {\n auth: state.auth,\n };\n}", "function mapStateToProps({ auth }) {\n return { auth: auth.authenticated };\n }", "function mapStateToProps(state) {\n return {\n auth: state.auth,\n }\n}", "function mapStateToProps(state) {\n return {\n auth: state.auth,\n }\n}", "function mapStateToProps(state) {\n return {\n auth: state.auth,\n }\n}", "function mapStateToProps(state) {\nconst { loading, connected } = state.Auth.toJS();\n\nreturn {\nloading, connected,\n\ntoken: state.Auth.get('token'), \nuser: state.Auth.get('user'),\nuser_type: state.Auth.get('user_type'),\nchildrens:state.Auth.get('childrens'),\nclass:state.Auth.get('class')\n};\n}", "function mapStateToProps({auth}) {\n return { isAuthenticated: auth.isAuthenticated }\n}", "function mapStateToProps({ usersReducer }) {\n return {};\n}", "function mapStateToProps(state) {\n\treturn {\n\t\timmtblUsr: state.authReducer.user\n\t};\n}", "function mapStateToProps(state) {\n return {\n auth: state.auth,\n user: state.user\n };\n}", "function mapStateToProps({ authUser }) {\n return {\n authUser\n }\n}", "function combineReducers(reducers) {\n\t return redux.combineReducers(reducers);\n\t}", "function mapStateToProps(state) {\n // const { db_token,user } = state;\n return { db_token: state['auth']['db_token'], user: state['auth']['user'] }\n}", "function mapStateToProps(state){\n\treturn {\n\t\tauth: state.auth\n\t}\n}", "function buildRootReducer () {\n return combineReducers({\n ...require('./reducers').default, // eslint-disable-line global-require\n routing: routerReducer\n })\n}", "function mapStateToProps({ auth, messages }) {\n return {\n \n };\n}", "function mapStateToProps(state) {\n const { auth } = state;\n\n return {\n\t\tauth\n };\n}", "function mapStateToProps(store) {\n return {\n intl: store.intl,\n auth: store.auth\n };\n}", "function mapStateToProps(state, ownProps) {\n return {\n redux: state.auth\n };\n}", "function mapStateToProps(state) {\n return { auth: state.auth.authenticated };\n }", "function mapStateToProps(state) {\n return {\n placeholder: state.loginReducer.isAuthenticated, //placeholder\n };\n}", "function reduxStateToProps(state) {\n // const reduxState = (state) => {\n console.log('redux staettt', state.redux_session.user_data.user_type)\n return {\n\t\tredux_state: state.redux_state,\n\t\tredux_session: state.redux_session\n\t\t// si MyGlobalReducer kay makit an sa reducers folder\n }\n}", "function mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators({ ...authActions }, dispatch)\n }\n}", "function mapReduxToProps(state) {\n\treturn {\n staffProfile: state.auth.staff_profile\n\t}\n}", "function persistCombineReducers(config, reducers) {\n config.stateReconciler = config.stateReconciler === undefined ? __WEBPACK_IMPORTED_MODULE_2__stateReconciler_autoMergeLevel2__[\"a\" /* default */] : config.stateReconciler;\n return Object(__WEBPACK_IMPORTED_MODULE_1__persistReducer__[\"a\" /* default */])(config, Object(__WEBPACK_IMPORTED_MODULE_0_redux__[\"c\" /* combineReducers */])(reducers));\n}", "function persistCombineReducers(config, reducers) {\n config.stateReconciler = config.stateReconciler === undefined ? __WEBPACK_IMPORTED_MODULE_2__stateReconciler_autoMergeLevel2__[\"a\" /* default */] : config.stateReconciler;\n return Object(__WEBPACK_IMPORTED_MODULE_1__persistReducer__[\"a\" /* default */])(config, Object(__WEBPACK_IMPORTED_MODULE_0_redux__[\"combineReducers\"])(reducers));\n}", "function persistCombineReducers(config, reducers) {\n config.stateReconciler = config.stateReconciler === undefined ? __WEBPACK_IMPORTED_MODULE_2__stateReconciler_autoMergeLevel2__[\"a\" /* default */] : config.stateReconciler;\n return Object(__WEBPACK_IMPORTED_MODULE_1__persistReducer__[\"a\" /* default */])(config, Object(__WEBPACK_IMPORTED_MODULE_0_redux__[\"combineReducers\"])(reducers));\n}", "function persistCombineReducers(config, reducers) {\n config.stateReconciler = config.stateReconciler === undefined ? __WEBPACK_IMPORTED_MODULE_2__stateReconciler_autoMergeLevel2__[\"a\" /* default */] : config.stateReconciler;\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__persistReducer__[\"a\" /* default */])(config, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_redux__[\"d\" /* combineReducers */])(reducers));\n}", "function reducer() {\n\t var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n\t isFetching: false,\n\t isAuthenticated: _utils.webStorage.getItem('token') ? true : false,\n\t token: _utils.webStorage.getItem('token'),\n\t userId: _utils.webStorage.getItem('userId'),\n\t account: {}\n\t };\n\t var action = arguments[1];\n\t\n\t switch (action.type) {\n\t case _loginActions.LOGIN_REQUEST:\n\t return Object.assign({}, state, {\n\t isFetching: true,\n\t isAuthenticated: false\n\t });\n\t case _loginActions.LOGIN_SUCCESS:\n\t return Object.assign({}, state, {\n\t isFetching: false,\n\t isAuthenticated: true,\n\t errorMessage: ''\n\t });\n\t case _loginActions.LOGIN_FAILURE:\n\t return Object.assign({}, state, {\n\t isFetching: false,\n\t isAuthenticated: false,\n\t errorMessage: action.message\n\t });\n\t case _logoutActions.LOGOUT_SUCCESS:\n\t return Object.assign({}, state, {\n\t isFetching: true,\n\t isAuthenticated: false\n\t });\n\t case _getAccountActions.GET_ACCOUNT_REQUEST:\n\t return Object.assign({}, state, {\n\t isFetching: true\n\t });\n\t case _getAccountActions.GET_ACCOUNT_SUCCESS:\n\t return Object.assign({}, state, {\n\t isFetching: false,\n\t account: action.account,\n\t errorMessage: ''\n\t });\n\t case _getAccountActions.GET_ACCOUNT_FAILURE:\n\t return Object.assign({}, state, {\n\t isFetching: false,\n\t errorMessage: action.message\n\t });\n\t default:\n\t return state;\n\t }\n\t}", "function mapStateToProps(state) {\n return {\n token: state.auth.token,\n isAuthenticated: state.auth.isAuthenticated,\n message: state.flash.message\n }\n}", "function persistCombineReducers(config, reducers) {\n config.stateReconciler = config.stateReconciler === undefined ? _stateReconciler_autoMergeLevel2__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : config.stateReconciler;\n return Object(_persistReducer__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(config, Object(redux__WEBPACK_IMPORTED_MODULE_0__[\"combineReducers\"])(reducers));\n}", "function mapStateToProps(state){\n return {\n login: state.login,\n user: state.user\n }\n}", "function mapStateToProps(state) {\n return {\n user: state.auth.user,\n signin: state.auth.isAuth,\n error: state.auth.isError,\n type: state.auth.acc\n }\n}", "function mapStateToProps(state) {\n return {\n git_auth: state.git_auth\n };\n}", "function authReducer(state = authReducerDefaultState, action) {\n // Should switch based on the actionCreator and return the application state.\n switch (action.type) {\n case LOGIN_USER:\n // IF THERE IS NOT AN EMPTY DATA OBJ. THEN UPDATE THE STATE\n if (action.payload.data !== \"\") {\n return {\n ...state,\n email: action.payload.data.email,\n status: \"Your login attempt was successful.\"\n };\n } else {\n return {\n ...state,\n status: \"Your login attempt was unsuccessful. Try again.\"\n };\n }\n\n case SUBSCRIBE_NEW_USER:\n return {\n ...state,\n email: action.payload.data.user,\n successmessage: action.payload.data.successmessage,\n errormessage: action.payload.data.errormessage\n };\n case LOGOFF_USER:\n window.sessionStorage.clear();\n return {\n ...state,\n email: \"\",\n session: \"\"\n };\n default:\n return authReducerDefaultState;\n }\n}", "function mapStateToProps(store) {\n return {\n isAuthenticated: store.auth.isAuthenticated,\n role: store.auth.role,\n }\n}", "function mapDispatchToProps(dispatch) {\n return {\n actions: {\n Auth: bindActionCreators(AuthAction, dispatch),\n }\n }\n}", "function mapDispatchToProps(dispatch) {\n return {\n actions: {\n Auth: bindActionCreators(AuthAction, dispatch),\n }\n }\n}", "function mapDispatchToProps(dispatch) {\n return {\n actions: {\n Auth: bindActionCreators(AuthAction, dispatch),\n }\n }\n}", "function mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators({ ...authActions, ...globalActions }, dispatch),\n };\n}", "function mapStateToProps(state) {\n return {\n authenticated: state.auth.authenticated\n }\n}", "function mapStateToProps(state) {\n return {\n jwt: state.jwt\n };\n}", "function mapDispatchToProps(dispatch) {\n\treturn {\n\t\tauthActions: bindActionCreators(authenticationActions, dispatch)\n\t};\n}", "function mapStateToProps(state, props) {\n return {\n loggedIn: state.userReducer.loggedIn\n };\n}", "function mapStateToProps(state, ownProps) {\n return {\n user: state.LoginReducer.user\n };\n}", "function mapStateToProps(state) {\n return { authenticated: state.auth.authenticated };\n }", "function App() {\n const reducer = combineReducers({\n moduleReducer: moduleReducer,\n lessonReducer: lessonReducer,\n topicReducer: topicReducer,\n widgetReducer: widgetReducer,\n questionReducer: questionReducer,\n quizReducer: quizReducer\n })\n \n // const store = createStore(moduleReducer)\n // const store = createStore(lessonReducer)\n const store = createStore(reducer)\n return (\n <Provider store={store}>\n <BrowserRouter>\n <div className=\"container-fluid\">\n <CourseManager/>\n </div>\n </BrowserRouter>\n </Provider>\n );\n}", "function reduxStateToProps(state) {\n // const reduxState = (state) => {\n // console.log('redaux stae ', state)\n return {\n\t\tredux_state: state.redux_state\n\t\t// si MyGlobalReducer kay makit an sa reducers folder\n }\n}", "function mapDispatchToProps(dispatch) {\n return {\n actions: {\n Auth: bindActionCreators(AuthAction, dispatch),\n }\n }\n}", "function mapDispatchToProps(dispatch) {\n return {\n actions: {\n Auth: bindActionCreators(AuthAction, dispatch),\n }\n }\n}", "function mapDispatchToProps(dispatch) {\n return {\n actions: {\n Auth: bindActionCreators(AuthAction, dispatch),\n }\n }\n}", "function mapStateToProps(state) {\n return {\n loggedIn: state.auth.loggedIn\n };\n }", "function mapStoreToProps(store) {\n\n return {\n \n email: store.login.email,\n password: store.login.password,\n userToken: store.login.userToken,\n userId: store.login.userId\n}\n}", "function reduxStateToProps(state) {\n\t// const reduxState = (state) => {\n\t// console.log('redaux stae ', state)\n\treturn {\n\t\tredux_state: state.redux_state,\n\t\tredux_session: state.redux_session,\n\t\tmy_config: state.my_config,\n\t\t// si MyGlobalReducer kay makit an sa reducers folder\n\t}\n}", "function mapStateToProps(state) {\n\n return {\n userCommon: state.user\n }\n}", "componentDidMount() {\n this.props.getUser(this.props.reducerApp.token);\n }", "function mapStateToProps(state, props) {\n return {\n token: state.authReducer.token,\n \n moji_stack: state.navReducer.moji_stack\n };\n}", "function mapStateToProps(state) {\n const { user } = state.projectCreationReducer\n return { user }\n}", "function mapStateToProps(state) {\n const { authentication } = state\n\n return {\n authenticated: authentication.authenticated,\n errors: authentication.error,\n }\n}", "function mapStateToProps(state){\n return {\n login: state.hasil_login\n };\n}", "function combineReducers(reducerMap = {}) {\n\treturn reducerMap;\n}", "function auth(state:REDUCER_STATE_TYPE = initState, action:AUTH_UPDATE_FIELD): REDUCER_STATE_TYPE {\n const { type, payload } = action;\n if (type === AUTH_UPDATE_FIELD_TYPE) {\n return {\n ...state,\n ...payload,\n };\n }\n return state;\n}", "function mapStateToProps(state) {\n return {\n login : state.User\n }\n}", "function mapDispatchToProps(dispatch){\n return{\n signup:(userInfo)=>{\n dispatch(SignupMiddleware.asyncSignup(userInfo))\n }\n }\n}", "function mapStateToProps(state){\n return{user: state}\n}", "function reducer(){\n\n}", "function mapStateToProps(state) {\n console.log(state.authentication.loggedUser)\n \n const { isLoggedIn,loggedUser } = state.authentication;\n const {users} = state.users\n return { isLoggedIn,loggedUser,users };\n}", "function mapStateToProps({ authedUser }) {\n return {\n authedUser,\n };\n}", "function mapStateToProps(state) {\n const { authReducer } = state\n let alias = ((authReducer.user || {}).language || {}).alias || \"da\"\n \n console.log(alias)\n return {\n locale: alias,\n messages: messages[alias] || messages.en,\n key: alias,\n }\n}", "function getAppReducer() {\n return __webpack_require__(/*! ../reducers */ \"./reducers/index.js\"); // eslint-disable-line global-require\n}", "function mapStateToProps(state) {\n\treturn {\n\t\tisLoggedIn: state.userReducer.isLoggedIn //<=== shouldnt have to do this...? \n\t};\n}", "function persistCombineReducers(config, reducers) {\n config.stateReconciler = config.stateReconciler === undefined ? _autoMergeLevel2.default : config.stateReconciler;\n return (0, _persistReducer2.default)(config, (0, _redux.combineReducers)(reducers));\n}", "function mapStateToProps(state) {\n return {\n token: state.token,\n group: state.group\n };\n}", "mapStateToProps(state) {\n return {\n name: state.login.name,\n password: state.login.password,\n errors: state.login.errors\n }\n }", "function mapStateToProps(state) {\n const { userReducer, configureSelected } = state;\n return {\n user: userReducer, //User Auth info, including token\n selected: configureSelected, //Sets a react store for the category or item selected\n };\n}", "function mapStateToProps({ user: { loggedIn } }) {\n return { loggedIn };\n}", "function authReducer(state = null, action) {\n console.log(action)\n switch (action.type) {\n case FETCH_USER:\n // false was introduced if payload is empty\n return action.payload || false;\n default:\n return state;\n }\n}", "function buildRootReducer(appReducers, history) {\n return combineReducers({\n router: connectRouter(history),\n ...appReducers\n });\n}", "function mapDispatchToProps(dispatch) {\n return {\n loginUser: (credentials) => {\n dispatch(loginUser(credentials));\n },\n };\n}", "function mapStateToProps ({userReducer}) {\n return {\n //Object.keys gives us access to all users in array\n users: Object.keys(userReducer)\n //map over all users, found by ID\n .map((id)=> {\n const {name, avatarURL, polls, answers} = userReducer[id]\n\n return {\n name, \n avatarURL, \n polls: polls.length,\n answers: answers.length\n }\n })\n }\n}", "function rootReducer(state = {\n user: {\n username: '',\n password: '',\n contacts: []\n },\n loading: false\n}, action) {\n switch(action.type) {\n case 'LOADING':\n return {\n ...state,\n loading: true\n }\n case 'FAILED_REQUEST':\n return {\n ...state,\n loading: false\n }\n case 'LOGOUT':\n return {\n user: {\n username: '',\n password: '',\n contacts: []\n },\n loading: false\n }\n case 'LOGIN':\n return {\n user: action.response,\n loading: false\n }\n case 'ADD_CONTACT':\n return {\n user: action.response,\n loading: false\n }\n case 'DELETE_CONTACT':\n return {\n user: action.response,\n loading: false\n }\n case 'UPDATE_CONTACT':\n return {\n user: action.response,\n loading: false\n }\n case 'ADD_NOTE':\n return {\n user: action.response,\n loading: false\n }\n case 'DELETE_NOTE':\n return {\n user: action.response,\n loading: false\n }\n default:\n return state;\n }\n}", "function mapStateToProps(state) {\n\treturn {\n tenant_profile: state.auth.tenant_profile,\n authenticated: state.auth.authenticated,\n\t}\n}", "function select(state) {\n return {\n auth: state.AuthReducer.auth,\n id_user: state.AuthReducer.id_user,\n };\n}", "function mapStateToProps(state) {\n return {\n user: state.security.user\n };\n}", "reducer(res) {\n return res;\n }", "function mapDispatchToProps(dispatch) {\n\treturn {\n\t\tactions: bindActionCreators(signinActions, dispatch)\n\t};\n}", "function mapDispatchToProps(dispatch) {\n return {\n signUp: (username, name, password, role) =>\n dispatch(signUpUser(username, name, password, role)),\n };\n}", "function greetingReducer() {}" ]
[ "0.70234966", "0.6873373", "0.6849703", "0.6824132", "0.67862964", "0.67722094", "0.674233", "0.6687406", "0.6621628", "0.6621628", "0.6621628", "0.66134816", "0.66134816", "0.6605632", "0.6585326", "0.6585326", "0.6585326", "0.6554817", "0.6460225", "0.64466524", "0.639111", "0.6368616", "0.6343048", "0.6341705", "0.6320922", "0.6316136", "0.62758505", "0.6269244", "0.6261821", "0.6213156", "0.6164778", "0.615456", "0.61498016", "0.61410904", "0.60646206", "0.6006625", "0.6006576", "0.6002124", "0.6002124", "0.60020906", "0.600167", "0.5994975", "0.5981003", "0.59797186", "0.59741986", "0.59369665", "0.59308124", "0.592781", "0.5916579", "0.5916579", "0.5916579", "0.59154886", "0.59137195", "0.59125036", "0.59057355", "0.58950096", "0.5892399", "0.5877286", "0.5873664", "0.58707136", "0.58688945", "0.58688945", "0.58688945", "0.5865564", "0.5855051", "0.5844983", "0.5837213", "0.583329", "0.58202934", "0.58155334", "0.5812288", "0.5803639", "0.5802521", "0.5775084", "0.5766572", "0.576649", "0.5761434", "0.57595646", "0.575309", "0.5752283", "0.5751364", "0.5734704", "0.5715229", "0.5709142", "0.57012385", "0.5700179", "0.56841433", "0.56739694", "0.56640905", "0.5661548", "0.5635679", "0.5629381", "0.56179255", "0.5616121", "0.5590357", "0.5565655", "0.55639505", "0.5554071", "0.55372286", "0.55272055" ]
0.6761776
6
Accesses the appropriate property or calls its getter, depending on language
function callGetter(obj, propertyName) { if(language == 'objc') { return obj[propertyName]; } else if(language == 'cs') { propertyName = propertyName.charAt(0).toUpperCase() + propertyName.slice(1); return obj[propertyName]; } // Else, call a getter function var args = Array.prototype.slice.call(arguments, 2), methodName = propertyName.charAt(0).toUpperCase() + propertyName.slice(1); if('get'+methodName in obj) { methodName = 'get'+methodName; } else { methodName = 'is'+methodName; } return obj[methodName].apply(obj, args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get property(){}", "static get property(){}", "get language() { \n\t\treturn this.#currentLanguage;\n\t}", "get(property) {\n return this[property];\n }", "get lang() {\n return this.getAttribute('lang');\n }", "get lang () { return this._.recog.lang }", "getProperty(name) {\n return this._properties[name];\n }", "get language() {\n return this._data.language;\n }", "get(name) {\n return getters[name]();\n }", "get( target, prop, receiver ){\n //console.log( \"GET\", \"target\", target, \"prop\", prop, \"rec\", receiver ); \n if( prop == \"$\" ) return this;\n \n return Reflect.get( target, prop, receiver ); //target[ prop ];\n }", "get language() { return 'all'; }", "function get(object, prop) {\n var propVal = null;\n if (object.hasOwnProperty(prop)) {\n propVal = object[prop];\n }\n else if (typeof object[\"get\"] == \"function\") {\n propVal = object.get(prop);\n }\n return propVal;\n }", "get language () {\n\t\treturn this._language;\n\t}", "get language() {\n\t\treturn this.__language;\n\t}", "get language() {\n\t\treturn this.__language;\n\t}", "get_localization(accessors, lang_id = default_lang) {\n //\n //\n {\n if (!this.texts[lang_id]) {\n logger.warn =\n \"No texts loaded for requested language \" +\n lang_id +\n \" ; returning texts from default language : \" +\n default_lang;\n return this.get_localization(accessors);\n }\n }\n //\n // Must return all texts resources\n {\n if (!accessors) {\n return this.texts[lang_id];\n }\n }\n let access_arr;\n {\n if (!(accessors instanceof Array)) {\n access_arr = json.get_accessor_parts(accessors);\n }\n else {\n access_arr = accessors;\n }\n //\n // Reach the last requested acessor\n let texts = this.texts[lang_id];\n const nb_accessors = access_arr.length;\n for (let access_idx = 0; access_idx < nb_accessors; access_idx++) {\n const prop_name = access_arr[access_idx];\n if (!texts[prop_name]) {\n const msg = \"Property \" +\n prop_name +\n \" does not exist \" +\n \" (requested with language \" +\n lang_id +\n \" and accessor \" +\n access_arr.join(\".\") +\n \")\";\n logger.error = msg;\n throw ReferenceError(msg);\n }\n texts = texts[prop_name];\n }\n return texts;\n }\n }", "get(obj, propertyName) {\n // this get(a trap of proxy api) takes two arguments which are provided by the proxy api\n console.log(propertyName);\n return obj[propertyName];\n }", "function getValue(target, property) {\n var value;\n // the see if there is an explicit getter function for the property\n var getter = target[\"get_\" + property];\n if (getter) {\n value = getter.call(target);\n if (value === undefined) {\n value = null;\n }\n }\n // otherwise search for the property\n else {\n if ((isObject(target) && property in target) ||\n Object.prototype.hasOwnProperty.call(target, property) ||\n (target.constructor === String && /^[0-9]+$/.test(property) && parseInt(property, 10) < target.length)) {\n value = target[property];\n if (value === undefined) {\n value = null;\n }\n }\n else if (/\\./.test(property)) ;\n }\n return value;\n}", "getLanguage() {\n return this.language;\n }", "getString(key, language) {\n try {\n return this.props[language][key];\n } catch (ex) {\n console.log(\"No localization found for key \" + key + \" and language \" + language);\n }\n return null;\n }", "getLang(){\n\t\treturn data.lang;\n\t}", "_readProperty(obj, key) {\n try {\n this._startAccess(obj);\n return obj[key];\n }\n catch (err) {\n this._onAccessError(obj, this._readErrorsByType);\n const msg = `ERROR: accessing ${Object.getPrototypeOf(obj)}.${key} caused exception`;\n VerboseErrors && this.logger.debug(msg, err.message);\n return `(${msg})`;\n }\n finally {\n this._endAccess(obj);\n }\n }", "get() {\n const value = this.properties[name].get_value();\n return value;\n }", "get( target, prop, receiver ) {\n let hasProp = true, \n device = null, \n upper = prop[0].toUpperCase() + prop.slice( 1 ), // convert lowercase to camelcase\n useUpper = false\n\n // if the property is undefined...\n if( target[ prop ] === undefined && target[ upper ] === undefined && prop !== 'markup' && prop !== 'seq' && prop !== 'sequences' ) {\n //target[ prop ] = Max.namespace( prop, target )\n //target[ prop ].address = addr + ' ' + prop\n for( let __device of target.devices ) {\n if( typeof __device !== 'object' ) continue\n\n if( __device[ prop ] !== undefined ) {\n device = __device\n break\n }else if( __device[ upper ] !== undefined ) {\n device = __device\n useUpper = true\n break\n }\n }\n\n hasProp = false\n }\n\n\n let propName = useUpper ? upper : prop\n\n let property = null\n if( hasProp ) {\n property = target[ prop ]\n }else{\n if( device !== null ) {\n property = device[ propName ]\n }\n }\n\n return property \n }", "get propertyType() {}", "get(target, prop, receiver) {\n // referencing proxiedStore directly saves us some computation from get(base)\n return target[prop] || proxiedStore[prop];\n }", "getProperty() {\n return this.property;\n }", "getValue(language) {\n\t\treturn this.#languageModels[language].getValue();\n\t}", "function gSgetProperty(item,nameProperty) {\n\n //console.log('item->'+item+' property->'+nameProperty);\n\n //It's a get with safe operator as item?.data\n if (arguments.length == 3) {\n if (item == null || item == undefined) {\n return null;\n }\n }\n\n if (!gShasFunc(item,'getProperty')) {\n\n var nameFunction = 'get' + nameProperty.charAt(0).toUpperCase() + nameProperty.slice(1);\n //console.log('Name func->'+nameFunction);\n if (!gShasFunc(item,nameFunction)) {\n if (typeof item[nameProperty] === \"function\" && nameProperty == 'size') {\n return item[nameProperty]();\n } else {\n //console.log('property------'+nameProperty+' = '+item[nameProperty]);\n if (item[nameProperty]!=undefined) {\n return item[nameProperty];\n } else {\n if (item['gSdefaultValue']!=undefined && (typeof item['gSdefaultValue'] === \"function\")) {\n item[nameProperty] = item['gSdefaultValue']();\n }\n return item[nameProperty];\n }\n }\n } else {\n //console.log('Got it! Name func->'+nameFunction);\n return item[nameFunction]();\n }\n } else {\n //console.log('ah');\n return item.getProperty(nameProperty)\n }\n\n}", "function getProperty(obj, key) {\n return obj[key];\n}", "function getterForProp(prop) {\r\n if (prop == null)\r\n return emptyStringGetter;\r\n if (typeof prop === 'number') {\r\n return numericIndexGetter;\r\n }\r\n else {\r\n // deep or simple\r\n if (prop.indexOf('.') !== -1) {\r\n return deepValueGetter;\r\n }\r\n else {\r\n return shallowValueGetter;\r\n }\r\n }\r\n}", "getLanguage() {\n\t\treturn this.language;\n\t}", "get(theObject, propertyName) {\n return theObject[propertyName] + 'FOO';\n }", "get(key, default_value, type_value = \"var\", type_template = \"\")\n\t{\n\t\tkey = this.toString(key);\n\t\tvar val = super.get(key);\n\t\tif (val == undefined) return default_value;\n\t\t/*if (isBrowser()) return Runtime.rtl.convert(val, type_value, default_value, type_template);*/\n\t\treturn use(\"Runtime.rtl\").convert(val, type_value, default_value, type_template);\n\t}", "function getterForProp(prop) {\n if (prop == null)\n return emptyStringGetter;\n if (typeof prop === 'number') {\n return numericIndexGetter;\n }\n else {\n // deep or simple\n if (prop.indexOf('.') !== -1) {\n return deepValueGetter;\n }\n else {\n return shallowValueGetter;\n }\n }\n}", "function get(obj, prop, defaultValue) {\n\t return (hasOwn(obj, prop) ? obj[prop] : defaultValue)\n\t}", "visitPropertyRead(ast, context) {\n this.maybeMap(context, ast, ast.name);\n return super.visitPropertyRead(ast, context);\n }", "visitPropertyRead(ast, context) {\n this.maybeMap(context, ast, ast.name);\n return super.visitPropertyRead(ast, context);\n }", "visitPropertyRead(ast, context) {\n this.maybeMap(context, ast, ast.name);\n return super.visitPropertyRead(ast, context);\n }", "visitPropertyRead(ast, context) {\n this.maybeMap(context, ast, ast.name);\n return super.visitPropertyRead(ast, context);\n }", "function translateProperty(text, variables) {\n return text;\n}", "function getProperty(version, type, prop) {\n\t\tvar p = property(version, type, prop);\n\t\treturn _.get(p.version, p.path);\n\t}", "getTranslation() {\nreturn this.translation;\n}", "get foo () {\n return \"foo\";\n }", "function get(obj, prop){\n\t var parts = prop.split('.'),\n\t last = parts.pop();\n\n\t while (prop = parts.shift()) {\n\t obj = obj[prop];\n\t if (obj == null) return;\n\t }\n\n\t return obj[last];\n\t }", "get() {\n // no arrow functions here, need `this` to change to instance\n // noinspection JSPotentiallyInvalidUsageOfClassThis\n return this.get(fieldName);\n }", "function getGeneralProperty(path, member) {\n const value = visitUI.getGeneralProperty({ path, member });\n return value;\n }", "function getPropertyInternal(context, object, key) {\n var items = object.meta.properties[getHashCode(context, key)]\n if(items === undefined)\n return undefined\n\n for(var n=0; n<items.length; n++) {\n var itemKey = items[n].key\n if(limaEquals(context, key, itemKey)) {\n return items[n].value\n }\n }\n // else\n return undefined\n}", "get value() {}", "get value() {}", "_get () {\n throw new Error('_get not implemented')\n }", "function evaluate_property_access(input_text,statement,env) {\n\tvar objec = evaluate(input_text,property_access_object(statement),env);\n\tvar property = evaluate(input_text,property_access_property(statement),env);\n\treturn evaluate_object_property_access(objec, property);\n}", "get property() {\n return super.property;\n }", "function get_language() {\r\n return _lang_code;\r\n }", "get(target, property, receiver) {\n const newPath = [...inputPath, property];\n // Don't proceed if the hook says no\n if (!hook({\n kind: \"__$$_PROXY_GET\" /* GET */,\n policy,\n path: stringifyPath(newPath),\n target\n })) {\n return;\n }\n const match = Reflect.get(target, property, receiver);\n const config = Reflect.getOwnPropertyDescriptor(currentItem, property);\n if (config != null && config.configurable === false && config.writable === false) {\n return currentItem[property];\n }\n return createAccessTrap(newPath, match);\n }", "getProp(obj, index) {\n return this._propGetters[index](obj);\n }", "function sc_getprop(sym, key) {\n var ht = sc_properties[sym];\n if (ht) {\n\tif (key in ht)\n\t return ht[key];\n\telse\n\t return false;\n } else\n\treturn false;\n}", "function _get(e,t,n){return(_get=\"undefined\"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=_superPropBase(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}", "static get properties() {}", "get otherName(){\n return 'lubega';\n }", "get propertyPath() {}", "function PropertyDetection() {}", "function evaluate_object_property_access(object, property) {\n\tvar result = object[property];\n\n\t//We need to post-process the return value. Because objects can be native\n\t//we need to marshal native member functions into our primitive tag.\n\treturn wrap_native_value(result);\n}", "get speechRecognizerLanguage() {\n return this.application.speech_recognizer_language;\n }", "function safeGet(obj, prop) {\n var result;\n\n try {\n result = obj[prop];\n } catch (err) {// pass\n }\n\n return result;\n}", "function lookupGetter(object, prop) {\n while (object !== null) {\n var desc = getOwnPropertyDescriptor(object, prop);\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n\n object = getPrototypeOf(object);\n }\n\n function fallbackValue(element) {\n console.warn('fallback value for', element);\n return null;\n }\n\n return fallbackValue;\n }", "function lookupGetter(object, prop) {\n while (object !== null) {\n var desc = getOwnPropertyDescriptor(object, prop);\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n\n object = getPrototypeOf(object);\n }\n\n function fallbackValue(element) {\n console.warn('fallback value for', element);\n return null;\n }\n\n return fallbackValue;\n }", "function lookupGetter(object, prop) {\n while (object !== null) {\n var desc = getOwnPropertyDescriptor(object, prop);\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n\n object = getPrototypeOf(object);\n }\n\n function fallbackValue(element) {\n console.warn('fallback value for', element);\n return null;\n }\n\n return fallbackValue;\n }", "function Get(O, P) { // eslint-disable-line no-unused-vars\n\t\t// 1. Assert: Type(O) is Object.\n\t\t// 2. Assert: IsPropertyKey(P) is true.\n\t\t// 3. Return ? O.[[Get]](P, O).\n\t\treturn O[P];\n\t}", "get displayLanguage() {\n\t\treturn this.__displayLanguage;\n\t}", "get language() {\n\t\t\treturn this._language;\n\t\t}", "get Automatic() {}", "get languageCode() {\n\t\treturn this.__languageCode;\n\t}", "function InitObjectProperty_Framework_L0(){\n // You must make some text.\n}", "function InitObjectProperty_Framework_L0(){\n // You must make some text.\n}", "locale(key) {\n //Open and read JSON file\n console.log(\"Locale OBJ: \", this.obj);\n let val = null;\n //Find and Return Value of specified Key\n return this.obj[key];\n }", "function getPropertyValue( propertyName ) {\n const data = _data.get( this );\n return data.get( propertyName );\n}", "function getLanguage() {\n return 'en-us';\n}", "function getProp(name) {\n\treturn function (obj) {\n\t\treturn obj[name];\n\t};\n}", "function lookupGetter(object, prop) {\n while (object !== null) {\n var desc = getOwnPropertyDescriptor(object, prop);\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n\n object = getPrototypeOf(object);\n }\n\n function fallbackValue(element) {\n console.warn('fallback value for', element);\n return null;\n }\n\n return fallbackValue;\n}", "get Custom() {}", "get(option, options){\n return options.hasOwnProperty(option) ? options[option] : this[option];\n }", "function languagePropertyName(propertyName, fileTag) {\n if (!fileTag)\n fileTag = \"common\";\n\n var asm = {\n \"flags\": \"assemblerFlags\",\n \"platformFlags\": \"platformAssemblerFlags\"\n };\n\n var map = {\n \"c\": {\n \"flags\": \"cFlags\",\n \"platformFlags\": \"platformCFlags\",\n \"usePrecompiledHeader\": \"useCPrecompiledHeader\"\n },\n \"cpp\": {\n \"flags\": \"cxxFlags\",\n \"platformFlags\": \"platformCxxFlags\",\n \"usePrecompiledHeader\": \"useCxxPrecompiledHeader\"\n },\n \"objc\": {\n \"flags\": \"objcFlags\",\n \"platformFlags\": \"platformObjcFlags\",\n \"usePrecompiledHeader\": \"useObjcPrecompiledHeader\"\n },\n \"objcpp\": {\n \"flags\": \"objcxxFlags\",\n \"platformFlags\": \"platformObjcxxFlags\",\n \"usePrecompiledHeader\": \"useObjcxxPrecompiledHeader\"\n },\n \"common\": {\n \"flags\": \"commonCompilerFlags\",\n \"platformFlags\": \"platformCommonCompilerFlags\"\n },\n \"asm\": asm,\n \"asm_cpp\": asm\n };\n\n var lang = map[fileTag];\n if (!lang)\n return propertyName;\n\n return lang[propertyName] || propertyName;\n}", "async getProperty(name) {\n await this._stabilize();\n return this._executeScript((element, property) => element[property], this.element(), name);\n }", "function getProperty(propertyName){\n return PropertiesService.getScriptProperties().getProperty(propertyName);\n}", "function Get(O, P) { // eslint-disable-line no-unused-vars\n\t// 1. Assert: Type(O) is Object.\n\t// 2. Assert: IsPropertyKey(P) is true.\n\t// 3. Return ? O.[[Get]](P, O).\n\treturn O[P];\n}", "get_string(stringFor){\n let language=''\n if(this.state.language===''){\n if(this.props.location.state)\n language = this.props.location.state.language\n else\n language='en'\n }\n else\n language=this.state.language\n return (Translate.find({stringFor}).fetch()[0]?Translate.find({stringFor}).fetch()[0].langArray[language]:undefined)\n }", "get_string(stringFor){\n let language=''\n if(this.state.language===''){\n if(this.props.location.state)\n language = this.props.location.state.language\n else\n language='en'\n }\n else\n language=this.state.language\n return (Translate.find({stringFor}).fetch()[0]?Translate.find({stringFor}).fetch()[0].langArray[language]:undefined)\n }", "function getter(obj, prop, fn) {\n Object.defineProperty(obj, prop, {\n configurable: true,\n enumerable: true,\n get: fn\n });\n}", "function prop(name){\n\t return function(obj){\n\t return obj[name];\n\t };\n\t }", "function getterForProp(prop) {\n if ((0, column_helper_1.isNullOrUndefined)(prop)) {\n return emptyStringGetter;\n }\n if (typeof prop === 'number') {\n return numericIndexGetter;\n }\n // deep or simple\n if (prop.indexOf('.') !== -1) {\n return deepValueGetter;\n }\n return shallowValueGetter;\n}", "function Get(O, P) { // eslint-disable-line no-unused-vars\n // 1. Assert: Type(O) is Object.\n // 2. Assert: IsPropertyKey(P) is true.\n // 3. Return ? O.[[Get]](P, O).\n return O[P];\n }", "function getGeneralProperty(path) {\n let value = visitUI.getGeneralProperty({ path: path });\n return value;\n }", "function getGeneralProperty(path) {\n let value = visitUI.getGeneralProperty({ path: path });\n return value;\n }", "function getGeneralProperty(path) {\n let value = visitUI.getGeneralProperty({ path: path });\n return value;\n }", "function getter (value, properties) {\n // Most calculations happen within the typecast and the value passed is typically the value we want to use.\n // Typically, the getter just returns the value.\n // Modifications to the value within the getter are not written to the object.\n\n // Getter can transform value after typecast.\n if (properties.get) {\n value = properties.get.call(this, value)\n }\n\n return value\n}", "get theProperty() { return this.theField; }", "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 }", "getCurrentLanguage() {\n return this.currentLanguage;\n }", "get prop() {\n return this.config.prop;\n }" ]
[ "0.70705736", "0.65450746", "0.6493775", "0.6403127", "0.6349279", "0.6328018", "0.6156472", "0.6054255", "0.60532093", "0.60490006", "0.5967677", "0.5953486", "0.5895462", "0.586992", "0.586992", "0.586531", "0.584619", "0.58447534", "0.5811859", "0.5811497", "0.5791696", "0.5787441", "0.5746851", "0.57404464", "0.5669351", "0.5618294", "0.56157535", "0.55959934", "0.5590333", "0.5567903", "0.5537994", "0.5531574", "0.552663", "0.5501367", "0.54899925", "0.54849297", "0.5480463", "0.5480463", "0.5480463", "0.5480463", "0.5461009", "0.5459127", "0.5458765", "0.54500777", "0.5436731", "0.54246676", "0.5402878", "0.53963196", "0.5394838", "0.5394838", "0.53922796", "0.5391018", "0.53723985", "0.5364761", "0.53603745", "0.5356901", "0.53448415", "0.53372663", "0.5325844", "0.5314774", "0.531114", "0.53044367", "0.5290918", "0.5267759", "0.5263394", "0.52617073", "0.52617073", "0.52617073", "0.52570647", "0.5254938", "0.52504605", "0.5246848", "0.52463096", "0.5244365", "0.5244365", "0.52420557", "0.524119", "0.52396524", "0.5235894", "0.523465", "0.52305317", "0.5229386", "0.5221951", "0.5220459", "0.5217901", "0.5217663", "0.5213189", "0.5213189", "0.52123976", "0.5211294", "0.52112037", "0.52088046", "0.5207382", "0.5207382", "0.5207382", "0.52034193", "0.5197915", "0.5197384", "0.5195519", "0.519419" ]
0.61921066
6
Assert that a certain series of operations come out of the queue
function expect(q) { for(var i = 1; i < arguments.length; i++) { callMethod(q, 'expect', arguments[i]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "checkQueue() {\n if (this._locked === false && this._stack.length > 0 && this._current < this._numberOfExecution) {\n this._locked = true;\n console.log('Received new item');\n let items = [];\n let remainSlots = this._numberOfExecution - this._current;\n let max = this._stack.length > remainSlots ? remainSlots : this._stack.length;\n for (let i = 0; i < max; i++) {\n items.push(this._stack[i]);\n }\n this._stack.splice(0, max);\n this._current += max;\n this.execute(items).then(function () {\n }, function (error) {\n console.log(error);\n });\n this._locked = false;\n }\n }", "async executeQueuedOperations() {\n try {\n if (!this.thingyController.getExecutingQueuedOperations()) {\n if (this.thingyController.getNumQueuedOperations() !== 0) {\n if (this.thingyController.getGattStatus()) {\n this.thingyController.setExecutingQueuedOperations(true);\n\n const triedOperations = {};\n let operation;\n\n let totalOperationsExecutedUntilLastIteration = 0;\n let totalOperationsExecutedSinceLastIteration = 0;\n\n while (this.thingyController.getNumQueuedOperations() !== 0) {\n if (!this.getConnected()) {\n break;\n }\n\n totalOperationsExecutedSinceLastIteration = this.thingyController.getNumExecutedOperations() - totalOperationsExecutedUntilLastIteration;\n totalOperationsExecutedUntilLastIteration = this.thingyController.getNumExecutedOperations();\n operation = this.thingyController.dequeue();\n\n if (!(operation.feature in triedOperations)) {\n triedOperations[operation.feature] = {};\n }\n\n if (!(operation.method in triedOperations[operation.feature])) {\n triedOperations[operation.feature][operation.method] = 0;\n }\n\n triedOperations[operation.feature][operation.method]++;\n\n const successful = await operation.f();\n\n // this condition will hopefully never be met\n if (triedOperations[operation.feature][operation.method] === 10 && successful !== true) {\n this.thingyController.removeQueuedOperation(operation);\n this.utilities.processEvent(\"operationdiscarded\", \"thingy\", operation);\n }\n\n if (triedOperations[operation.feature][operation.method] >= 3) {\n if (successful !== true) {\n if (totalOperationsExecutedSinceLastIteration < 2) {\n if (totalOperationsExecutedSinceLastIteration === 1) {\n const op = this.thingyController.getExecutedOperation(this.thingyController.getNumExecutedOperations() - 1);\n\n if (op.feature !== operation.feature || op.method !== operation.method) {\n continue;\n }\n }\n\n // we have now tried this particular operation three times.\n // It's still not completing successfully, and no other operations\n // are going through. We are therefore discarding it.\n this.thingyController.removeQueuedOperation(operation);\n this.utilities.processEvent(\"operationdiscarded\", \"thingy\", operation);\n }\n }\n }\n }\n\n this.thingyController.setExecutingQueuedOperations(false);\n }\n }\n }\n } catch (error) {\n this.thingyController.setExecutingQueuedOperations(false);\n this.utilities.processEvent(\"error\", \"thingy\", error);\n }\n }", "function testUnderflow() {\r\n var hpq = createQueue();\r\n try {\r\n pop(hpq);\r\n fail();\r\n } catch (ex) {\r\n }\r\n}", "function testComplete() {\n process.nextTick(function() {\n if (testQueue.length > 0) {\n testQueue.shift()();\n }\n else {\n t.equal(async, expectAsync, \"captured all expected async callbacks\");\n t.equal(testQueue.length, 0, \"all tests have been processed\");\n }\n });\n }", "function testSimpleSeries() {\r\n var hpq = createQueue();\r\n push(hpq, 7);\r\n assertFalse(hpq.empty());\r\n push(hpq, 5);\r\n push(hpq, 1);\r\n push(hpq, 3);\r\n push(hpq, 4);\r\n push(hpq, 1);\r\n push(hpq, 2);\r\n push(hpq, 1);\r\n assertEquals(1, pop(hpq));\r\n assertEquals(1, pop(hpq));\r\n assertEquals(1, pop(hpq));\r\n assertEquals(2, pop(hpq));\r\n assertEquals(3, pop(hpq));\r\n assertEquals(4, pop(hpq));\r\n assertEquals(5, pop(hpq));\r\n assertFalse(hpq.empty());\r\n assertEquals(7, pop(hpq));\r\n assertTrue(hpq.empty());\r\n}", "function checkQueue(){\n\tif(notificationQueue.length && alertComplete){\n\t\talertComplete = false;\n\t\tdoAlert(notificationQueue.shift());\n\t}\n}", "checkQueue() {\n if (this.queue.length > 0) {\n var self = this;\n\n var floor = this.queue[0].floor;\n var building = this.queue[0].building;\n\n var elevator = this.closestIdleElevator(building, floor);\n console.log(`Closest elevator to ${floor} is: ${elevator} `);\n if (elevator >= 0) {\n this.queue.shift();\n return this.moveElevator(building, elevator, floor).then((()=> {\n return self.clearButton(building, floor);\n }).bind(self));\n }\n }\n }", "checkPreviousBoards (board, queue, cb) {\n if (queue.length === 1) return cb();\n let results, fireCb = false;\n\n results = queue.every((state) => {\n let boardCheck = board.equals(state.board.board); // should be false for \"no matches\"\n\n if (boardCheck === false) {\n fireCb = true;\n return true;\n }\n\n return false;\n });\n\n if (results === true) {\n return cb();\n }\n\n return results;\n }", "function testMixedPushAndPop() {\r\n var hpq = createQueue();\r\n push(hpq, -7);\r\n assertFalse(hpq.empty());\r\n assertEquals(-7, pop(hpq));\r\n assertTrue(hpq.empty());\r\n push(hpq, 5);\r\n assertEquals(5, pop(hpq));\r\n assertTrue(hpq.empty());\r\n push(hpq, 4);\r\n push(hpq, -1);\r\n push(hpq, 0);\r\n push(hpq, 6);\r\n push(hpq, 100);\r\n assertEquals(-1, pop(hpq));\r\n push(hpq, 9);\r\n assertEquals(0, pop(hpq));\r\n assertEquals(4, pop(hpq));\r\n assertEquals(6, pop(hpq));\r\n assertEquals(9, pop(hpq));\r\n assertFalse(hpq.empty());\r\n assertEquals(100, pop(hpq));\r\n assertTrue(hpq.empty());\r\n}", "function check_queue_write() {\n\tif (intf.intf.queue_write.length < 1) {\n\t\tintf.intf.writing = false;\n\t\treturn false;\n\t}\n\n\tintf.intf.writing = true;\n\treturn true;\n}", "answeredQuestionIncorrectly() {\n //move the card to the end of the queue\n let failedCard = this.shift('now');\n failedCard.currentStack = 'now';\n this.fetchEnd('now').child = failedCard;\n }", "function processQueue() {\n var queue = nextTick.queue;\n var digest = nextTick.digest;\n\n nextTick.queue = [];\n nextTick.timeout = null;\n nextTick.digest = false;\n\n queue.forEach(function(queueItem) {\n var skip = queueItem.scope && queueItem.scope.$$destroyed;\n if (!skip) {\n queueItem.callback();\n }\n });\n\n if (digest) $rootScope.$digest();\n }", "function processQueue() {\n var queue = nextTick.queue;\n var digest = nextTick.digest;\n\n nextTick.queue = [];\n nextTick.timeout = null;\n nextTick.digest = false;\n\n queue.forEach(function(queueItem) {\n var skip = queueItem.scope && queueItem.scope.$$destroyed;\n if (!skip) {\n queueItem.callback();\n }\n });\n\n if (digest) $rootScope.$digest();\n }", "function flush_queues() {\n var trades_queued;\n do {\n trades_queued = _.some(instruments_state, instr_state => instr_state.queue.length > 0);\n if (trades_queued) {\n var has_waiting = _.values(instruments_state).filter(instr_state => instr_state.queue.length > 0);\n var next = _.head(_.sortBy(has_waiting, instr_state => {\n return _.head(instr_state.queue).date.getTime();\n })).queue.shift();\n\n trades.push(next);\n insert_trade_row(next);\n }\n } while (trades_queued);\n }", "function processQueue() {\n var queue = nextTick.queue;\n var digest = nextTick.digest;\n\n nextTick.queue = [];\n nextTick.timeout = null;\n nextTick.digest = false;\n\n queue.forEach(function(queueItem) {\n var skip = queueItem.scope && queueItem.scope.$$destroyed;\n if (!skip) {\n queueItem.callback();\n }\n });\n\n if (digest) $rootScope.$digest();\n }", "function checkDone() {\n if (queue.length() == 0 && listObjectsDone) {\n console.log('Tada! All objects have been copied :)');\n }\n}", "_m_queue_empty() {\n const lo_this = this;\n\n if (lo_this._ai_call_count_pushed_total) {\n f_console_verbose(1, `${lo_this.m_get_context(\"empty\")} - total of [${lo_this._ai_call_count_pushed_total}] calls submitted to the queue`);\n }\n\n // is there a call-back associated to the event [queue_empty] ?\n const pf_queue_empty = lo_this.m_pick_option(null, \"pf_queue_empty\", true);\n if (pf_queue_empty) {\n pf_queue_empty();\n }\n }", "queueIsFull() {\n return this.queue.length >= this.maxSize\n }", "_processQueue() {\n // eslint-disable-next-line no-empty\n while (this._tryToStartAnother()) {}\n }", "clearWaitingQueue() {\n this._waitingQueue.forEach((queueItem) => { queueItem.reject(); });\n }", "function checkPendingInvocations() {\n for (var ii = 0; ii < updateJobs.length; ii++) {\n if (updateJobs[ii].pendingInvocations().length === 0) {\n updateJobs.splice(ii, 1);\n break;\n }\n }\n if (updateJobs.length === 0) {\n return end();\n } else {\n nextTick();\n }\n}", "exit() {\n if (!this._length) {\n throw new Error(\n 'cannot exit limited concurrency: all slots are available already');\n }\n this._length--;\n if (!this._queue.length) {\n return;\n }\n const handler = this._queue.shift();\n handler();\n }", "checkQueue() {\n\t\tif (this.queueCheckFlag) return\n\n\t\tthis.queueCheckFlag = true\n\t\tthis.logger.info(`checkQueue planned - interval ${this.RabbitMQ.checkQueue.interval}`)\n\n\t\tsetTimeout(() => {\n\t\t\tthis.logger.info(`checkQueue`)\n\t\t\tthis.getMQChannel()\n\n\t\t\tif (this.RabbitMQ.checkQueue.repeat) {\n\t\t\t\tthis.queueCheckFlag = false\n\t\t\t\tthis.checkQueue()\n\t\t\t}\n\t\t}, this.RabbitMQ.checkQueue.interval)\n\t}", "receivedOp (op) {\n if (this.awaiting <= 0) {\n this.onevent(op)\n } else if (op.struct === 'Delete') {\n var self = this\n var checkDelete = function checkDelete (d) {\n if (d.length == null) {\n throw new Error('This shouldn\\'t happen! d.length must be defined!')\n }\n // we check if o deletes something in self.waiting\n // if so, we remove the deleted operation\n for (var w = 0; w < self.waiting.length; w++) {\n var i = self.waiting[w]\n if (i.struct === 'Insert' && i.id[0] === d.target[0]) {\n var iLength = i.hasOwnProperty('content') ? i.content.length : 1\n var dStart = d.target[1]\n var dEnd = d.target[1] + (d.length || 1)\n var iStart = i.id[1]\n var iEnd = i.id[1] + iLength\n // Check if they don't overlap\n if (iEnd <= dStart || dEnd <= iStart) {\n // no overlapping\n continue\n }\n // we check all overlapping cases. All cases:\n /*\n 1) iiiii\n ddddd\n --> modify i and d\n 2) iiiiiii\n ddddd\n --> modify i, remove d\n 3) iiiiiii\n ddd\n --> remove d, modify i, and create another i (for the right hand side)\n 4) iiiii\n ddddddd\n --> remove i, modify d\n 5) iiiiiii\n ddddddd\n --> remove both i and d (**)\n 6) iiiiiii\n ddddd\n --> modify i, remove d\n 7) iii\n ddddddd\n --> remove i, create and apply two d with checkDelete(d) (**)\n 8) iiiii\n ddddddd\n --> remove i, modify d (**)\n 9) iiiii\n ddddd\n --> modify i and d\n (**) (also check if i contains content or type)\n */\n // TODO: I left some debugger statements, because I want to debug all cases once in production. REMEMBER END TODO\n if (iStart < dStart) {\n if (dStart < iEnd) {\n if (iEnd < dEnd) {\n // Case 1\n // remove the right part of i's content\n i.content.splice(dStart - iStart)\n // remove the start of d's deletion\n d.length = dEnd - iEnd\n d.target = [d.target[0], iEnd]\n continue\n } else if (iEnd === dEnd) {\n // Case 2\n i.content.splice(dStart - iStart)\n // remove d, we do that by simply ending this function\n return\n } else { // (dEnd < iEnd)\n // Case 3\n var newI = {\n id: [i.id[0], dEnd],\n content: i.content.slice(dEnd - iStart),\n struct: 'Insert'\n }\n self.waiting.push(newI)\n i.content.splice(dStart - iStart)\n return\n }\n }\n } else if (dStart === iStart) {\n if (iEnd < dEnd) {\n // Case 4\n d.length = dEnd - iEnd\n d.target = [d.target[0], iEnd]\n i.content = []\n continue\n } else if (iEnd === dEnd) {\n // Case 5\n self.waiting.splice(w, 1)\n return\n } else { // (dEnd < iEnd)\n // Case 6\n i.content = i.content.slice(dEnd - iStart)\n i.id = [i.id[0], dEnd]\n return\n }\n } else { // (dStart < iStart)\n if (iStart < dEnd) {\n // they overlap\n /*\n 7) iii\n ddddddd\n --> remove i, create and apply two d with checkDelete(d) (**)\n 8) iiiii\n ddddddd\n --> remove i, modify d (**)\n 9) iiiii\n ddddd\n --> modify i and d\n */\n if (iEnd < dEnd) {\n // Case 7\n // debugger // TODO: You did not test this case yet!!!! (add the debugger here)\n self.waiting.splice(w, 1)\n checkDelete({\n target: [d.target[0], dStart],\n length: iStart - dStart,\n struct: 'Delete'\n })\n checkDelete({\n target: [d.target[0], iEnd],\n length: iEnd - dEnd,\n struct: 'Delete'\n })\n return\n } else if (iEnd === dEnd) {\n // Case 8\n self.waiting.splice(w, 1)\n w--\n d.length -= iLength\n continue\n } else { // dEnd < iEnd\n // Case 9\n d.length = iStart - dStart\n i.content.splice(0, dEnd - iStart)\n i.id = [i.id[0], dEnd]\n continue\n }\n }\n }\n }\n }\n // finished with remaining operations\n self.waiting.push(d)\n }\n if (op.key == null) {\n // deletes in list\n checkDelete(op)\n } else {\n // deletes in map\n this.waiting.push(op)\n }\n } else {\n this.waiting.push(op)\n }\n }", "function checkQueue(props) {\n setQueueData(props.queue);\n }", "function qo(t, e) {\n t.qr.U(e.targetId), is(t).mr(e)\n /**\n * We need to increment the expected number of pending responses we're due\n * from watch so we wait for the removal on the server before we process any\n * messages from this target.\n */;\n}", "function checkSucess() {\n setTimeout(function() {\n var lastOperation = readerOperations.pop();\n\n if (answered && authenticated && lastOperation === 'replay') {\n done();\n } else {\n checkSucess();\n }\n }, asyncDelay);\n }", "function shouldContinued(){\n // Check one : Any pending setTimeout,setInterval,setImmediate?\n // Check two : Any pending Os tasks? (Like server listening port)\n // Check tree: Any pending long running operations? (Like fs module)\n\n return pendingTimers.length || pendingOSTask.length ||\n pendingOperations.length\n}", "function processQueue() {\n var skip = scope && scope.$$destroyed;\n var queue = !skip ? nextTick.queue : [];\n var digest = !skip ? nextTick.digest : null;\n\n nextTick.queue = [];\n nextTick.timeout = null;\n nextTick.digest = false;\n\n queue.forEach(function(callback) {\n callback();\n });\n\n if (digest) $rootScope.$digest();\n }", "function processQueue() {\n var skip = scope && scope.$$destroyed;\n var queue = !skip ? nextTick.queue : [];\n var digest = !skip ? nextTick.digest : null;\n\n nextTick.queue = [];\n nextTick.timeout = null;\n nextTick.digest = false;\n\n queue.forEach(function(callback) {\n callback();\n });\n\n if (digest) $rootScope.$digest();\n }", "abortTest () {\n\t\tif (this.runningQueue) {\n\t\t\tthis.runningQueue.cancel()\n\t\t}\n\t}", "function checkQueue() {\n\tlet jobsToAdd = 10 - workers.length;\n\tfor (let i = 0; i < workers.length; i++) {\n\t\tif (!workers[i].done) continue;\n\t\tworkers[i] = null;\n\t\tworkers.splice(i, 1);\n\t\tjobsToAdd++;\n\t}\n\n\tfor (let i = 0; queuePosition < pageQueue.size && jobsToAdd > 0; queuePosition++) {\n\t\tlet url = [...pageQueue][queuePosition];\n\t\tworkers.push(createJob(url));\n\t\tjobsToAdd--;\n\t}\n\n\tsetTitle('Workers: ' + workers.length + '/10, Queue: ' + pageQueue.size);\n}", "function checkSucess() {\n setTimeout(function() {\n var lastOperation = readerOperations.pop();\n\n if (answered && authenticated && lastOperation === 'delete') {\n done();\n } else {\n checkSucess();\n }\n }, asyncDelay);\n }", "function abortIncompletePipelines(commandQueue) {\n let expectedIndex = 0;\n for (let i = 0; i < commandQueue.length;) {\n const command = commandQueue.peekAt(i).command;\n const pipelineIndex = command.pipelineIndex;\n if (pipelineIndex === undefined || pipelineIndex === 0) {\n expectedIndex = 0;\n }\n if (pipelineIndex !== undefined && pipelineIndex !== expectedIndex++) {\n commandQueue.remove(i, 1);\n command.reject(abortError(command));\n continue;\n }\n i++;\n }\n}", "_waitingForQuiescence() {\n return (\n !isEmpty(this._subsBeingRevived) ||\n !isEmpty(this._methodsBlockingQuiescence)\n );\n }", "function done() {\n \tvar storage = config.storage;\n\n \tProcessingQueue.finished = true;\n\n \tvar runtime = now() - config.started;\n \tvar passed = config.stats.all - config.stats.bad;\n\n \temit(\"runEnd\", globalSuite.end(true));\n \trunLoggingCallbacks(\"done\", {\n \t\tpassed: passed,\n \t\tfailed: config.stats.bad,\n \t\ttotal: config.stats.all,\n \t\truntime: runtime\n \t});\n\n \t// Clear own storage items if all tests passed\n \tif (storage && config.stats.bad === 0) {\n \t\tfor (var i = storage.length - 1; i >= 0; i--) {\n \t\t\tvar key = storage.key(i);\n\n \t\t\tif (key.indexOf(\"qunit-test-\") === 0) {\n \t\t\t\tstorage.removeItem(key);\n \t\t\t}\n \t\t}\n \t}\n }", "function shouldContinue() {\n return (\n pendingTimers.length || pendingOSTasks.length || pendingOperations.length\n );\n}", "function initAllQueue() {\n queue.clickTargetBlank.dequeue();\n queue.validClick.dequeue();\n}", "function hasQueuedDiscreteEvents() {\n return queuedDiscreteEvents.length > 0;\n}", "function hasQueuedDiscreteEvents() {\n return queuedDiscreteEvents.length > 0;\n}", "_processQueue() {\n // eslint-disable-next-line no-empty\n while (this._tryToStartAnother()) { }\n }", "_processQueue() {\n // eslint-disable-next-line no-empty\n while (this._tryToStartAnother()) { }\n }", "function flush(){release();var task;while(!semaphore&&(task=queue.shift())!==undefined){exec(task);}}", "compareQueues(queue2) {\n\n }", "async consume() {\n if (this.state.consuming) return;\n if (!this.queue.meta.length) return;\n\n this.state.consuming = true;\n console.log('Consuming queue...', 'Orders in queue: ' + this.queue.meta.length);\n\n const filledTransactions = await this.queue.digest();\n\n //repopulate queue with closing (unconfirmed) transactions\n for (let orderId in filledTransactions) {\n const txn = filledTransactions[orderId];\n const price = Number(txn.price);\n if (txn.side === 'BUY') {\n const profit = price + (price * this.config.profitPercentage) + (price * .001);\n this.sell(Number(txn.executedQty), profit);\n }\n if (txn.side === 'SELL') {\n const profit = price - (price * this.config.profitPercentage) - (price * .001);\n this.purchase(Number(txn.executedQty), profit);\n }\n }\n\n console.log('Consumed queue.', 'Orders in queue: ' + this.queue.meta.length);\n this.state.consuming = false;\n }", "_notifyOnQueueCreation() {\n if(!this.input.length) console.log('An empty Priority Queue has been created');\n if(this.input.length) console.log('A Priority Queue has been created');\n }", "function isCrushed(){}", "function flush() {\n\t\t while (index < queue.length) {\n\t\t var currentIndex = index;\n\t\t // Advance the index before calling the task. This ensures that we will\n\t\t // begin flushing on the next task the task throws an error.\n\t\t index = index + 1;\n\t\t queue[currentIndex].call();\n\t\t // Prevent leaking memory for long chains of recursive calls to `asap`.\n\t\t // If we call `asap` within tasks scheduled by `asap`, the queue will\n\t\t // grow, but to avoid an O(n) walk for every task we execute, we don't\n\t\t // shift tasks off the queue after they have been executed.\n\t\t // Instead, we periodically shift 1024 tasks off the queue.\n\t\t if (index > capacity) {\n\t\t // Manually shift all values starting at the index back to the\n\t\t // beginning of the queue.\n\t\t for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n\t\t queue[scan] = queue[scan + index];\n\t\t }\n\t\t queue.length -= index;\n\t\t index = 0;\n\t\t }\n\t\t }\n\t\t queue.length = 0;\n\t\t index = 0;\n\t\t flushing = false;\n\t\t}", "denqueue() {\n debug(`\\nLOG: remove the queue`);\n this.queue.shift();\n }", "function checkSucess() {\n setTimeout(function() {\n var lastOperation = readerOperations.pop();\n\n if (answered && authenticated && lastOperation === 'prev') {\n done();\n } else {\n checkSucess();\n }\n }, asyncDelay);\n }", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}", "function isCrushed() {}" ]
[ "0.6416316", "0.6344059", "0.6314339", "0.61254007", "0.6045645", "0.6015487", "0.598523", "0.57162356", "0.5704122", "0.5699484", "0.5688601", "0.5682499", "0.5682499", "0.5675537", "0.56539744", "0.56483895", "0.56458396", "0.5644898", "0.5635445", "0.56153995", "0.5607332", "0.5575003", "0.5565807", "0.5539444", "0.5533337", "0.5522027", "0.5505131", "0.5496077", "0.5491978", "0.5491978", "0.54875827", "0.5475203", "0.5448781", "0.54305583", "0.541362", "0.54106945", "0.54072124", "0.54064167", "0.5398476", "0.5398476", "0.5395422", "0.5395422", "0.5390751", "0.53773665", "0.5365937", "0.5364099", "0.5359591", "0.5348845", "0.5343331", "0.5330327", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528", "0.5329528" ]
0.0
-1
set current volume level and store to
function _setVolume(v) { videoObject.volume = v; control_volume.seekSlider('seek', v); if(typeof localStorage != 'undefined') { localStorage.setItem('volume', v); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function MV_SetVolume(volume) {\n volume = Math.max(0, volume);\n volume = Math.min(volume, MV_MaxTotalVolume);\n\n MV_TotalVolume = volume;\n}", "function set_volume(){\n\t\taudio.volume = parseFloat(this.value / 100);\n\t}", "set volume(vol)\n {\n this._control.value = Math.max(0,Math.min(100,vol));\n this.volumeUpdated();\n }", "setVolumeLevel(message) {\n const volume = message / 1\n this.debug(`Received set volume level to ${volume}`)\n if (isNaN(message)) {\n this.debug('Volume command received but value is not a number')\n } else if (!(message >= 0 && message <= 4)) {\n this.debug('Volume command received but out of range (0-4)')\n } else {\n this.device.setInfo({ device: { v1: { volume } } })\n }\n }", "function setVolume(value) {\n\t\tconst button =\n\t\t\tdocument.querySelector(\"[ln-player-action=mute]\") ||\n\t\t\tdocument.querySelector(\"[ln-player-action=unmute]\");\n\t\t// When scroller value goes below 0 debugger starts because it's out of bounds and stops program execution\n\t\tif (value <= 0) {\n\t\t\tthis.audio.volume = 0;\n\t\t\tthis.volumeSlider.value = 0;\n\t\t\tdispatchEvent.call(button, \"volumeMuted\");\n\n\t\t\t// When scroller value goes above 100 debugger starts because it's out of bounds and stops program execution\n\t\t} else if (value >= 1) {\n\t\t\tthis.audio.volume = 1;\n\t\t\tthis.volumeSlider.value = 100;\n\t\t\t// Normal execution\n\t\t} else {\n\t\t\tthis.audio.volume = value;\n\t\t\tthis.volumeSlider.value = value * 100;\n\n\t\t\tif (this.volumeSlider.value < 50) {\n\t\t\t\tdispatchEvent.call(button, \"volumeBelowHalf\");\n\t\t\t}\n\t\t\tif (this.volumeSlider.value > 50) {\n\t\t\t\tdispatchEvent.call(button, \"volumeAboveHalf\");\n\t\t\t}\n\t\t\tlocalStorage.setItem(this.ls.volume, value);\n\t\t}\n\t}", "setVolume({volume} = {}) {\n this.data.volume = volume / 100\n }", "function setVolume(\r\n volume_)\r\n {\r\n volume = volume_;\r\n }", "function setvolume(){\n\t\t\tvar song =document.querySelector('audio');\n\t\t\tsong.volume=slider.value/100;\n\t\t}", "function setLevel(l) {\n storage.level = l;\n console.log(\"SETTING LEVEL\"+l);\n }", "function setvolume(){\n\n\t var song = document.querySelector('audio');\n\t song.volume= volumeslider.value/100;\n }", "function setVolume(value) {\r\n audio.volume = value/(parseInt(volume.max) + 10);\r\n }", "function setVolume(value) {\n gba.audio.masterVolume = Math.pow(2, value) - 1;\n }", "function setVol(event, volume) {\n spotifyApi.setVolume(volume)\n .then(function() {}, function (err) {\n if (err.statusCode == 403) {\n console.log('device does not allow volume change')\n } else if (err.statusCode == 429) {\n event.reply(\"volume-reply\", true)\n } else {\n catch_error(err);\n };\n });\n}", "function setVol() {\r\n if (typeof $vol_bar.attr('data-value') != 'undefined') {\r\n $musicPlayer.volume = (parseInt($vol_bar.attr('data-value')) / 100)\r\n }\r\n }", "function processVolume (data) {\n controls.setVolume(data)\n}", "setVolume(volume) {\n this.volume = volume;\n this.setGainValue();\n this.renderPolyline();\n this.emit('volume-change', volume);\n }", "function setVolumeUp() {\n var currentVolume = player.getVolume();\n // volume steps: 10%\n if(currentVolume <= 90){\n player.setVolume(currentVolume + 10);\n }\n popUpVolumeUp();\n // show new/current volume in popUp\n document.getElementById('iconPopUpTimer').innerHTML = player.getVolume() + \"%\";\n removeCurrentIconPopUp();\n }", "function changeVolume() {\n vidPlayer.volume = volumeBar.value;\n }", "function setMasterVolume(volume) {\n context.gain.gain.value = volume;\n}", "set_level() {\n this.height = (this.totalVolume + this.minVolume) * this.maxHeight / this.maxVolume;\n\n }", "function turnVolumeUp() {\n\tsetGlobalMusicVolume(musicVolume + VOLUME_INCREMENT);\n\tsetGlobalEffectsVolume(effectsVolume + VOLUME_INCREMENT);\n}", "function OnStateUpdate(self, state)\n {\n self.level = state.attributes.volume_level;\n set_view(self, state)\n }", "setvolume(volume) {\n\n /**update value of volume slider */\n this.setState({ volumesliderValue: volume }, () => {\n\n /**react-native-soundplayer uses volume from 0 to 1\n * but our slider uses 0 to 100 step\n * hence each value in the slider should be divided by 100 so that the max volume in the slider which is 100 (divided by 100) will give us 1\n */\n volume = volume / 100\n SoundPlayer.setVolume(volume) /**changing volume in soundplayer */\n })\n }", "changeVolume(volumeType, value) {\n // Set volume and show button\n this.characterData.audio[volumeType] = value;\n this.currentVolume[volumeType] = value;\n\n // Lower volume of currently playing BGM\n if (volumeType == BGM && this.audioLoaded) {\n this.currentSong.setVolume(value / 4); // 0-4 = 0-100\n }\n }", "function setvolume(dev, volume)\n{\n if (typeof (webphone_api.plhandler) !== 'undefined' && webphone_api.plhandler !== null)\n webphone_api.plhandler.SetVolume(dev, volume);\n}", "setVolume(e) {\n let audio = this.controls.current;\n let newVolume = Number(e.target.value);\n this.setState({ volumeStatus: 'unmute' })\n this.setState({ volume: newVolume });\n audio.volume = newVolume;\n }", "function setVolumeUI(sliderVal) {\n // Checkbox display change\n volumeCB.checked = sliderVal == 0 ? true : false\n\n Sounds.setGameVolume(sliderVal/100 || 0)\n\n // Volume Text display change\n volumeDispl.innerHTML = `${ sliderVal }`\n\n // Play audio to test volume\n Sounds.soundTest(sliderVal/100 || 0)\n \n // Store new user-defined volume setting in localStorage\n localStorage.setItem('volume', sliderVal/100)\n\n }", "setVolume(volume) {\n this._source.volume = volume;\n }", "function changeVolume(values) {\n spotifyApi.setVolume(parseInt(values[0])).catch(err => console.log(err))\n }", "function volumeUpdated() {\n console.log(`Volume is now set at ${this.sound.volume}`);\n updateVolumeBar(this);\n}", "function volumen_change(){\r\n volumen_show.innerHTML = recent_volumen.value; //Redefine el valor del volumen\r\n track.volume = recent_volumen.value / 100; //Le hace un set volume al volumen de la cancion cargada\r\n\r\n }", "function updateVolume() {\n const volume = document.querySelector('#volume');\n volume.value = audioPlayer.volume;\n}", "function volume_control(){\n\t\tvar volume = $('#vol').val();\n\t\tvid.volume = volume / 100;\n\t\t$('#vol_num').text(volume + \"%\");\n\t}", "function volumeChange(newVolume) {\n volumeNum = newVolume;\n volume.gain.value = Math.pow(volumeNum / 100, 2);\n}", "setVolume(value) {\n this.player.volume = parseFloat(value / 100);\n if (!this.player.muted) {\n MediaPlayer.changeButtonState({\n button: this.muteBtn,\n removeClass: (value < 0.01) ? MUTEBTN_STATES.UNMUTE : MUTEBTN_STATES.MUTE,\n addClass: (!value < 0.01) ? MUTEBTN_STATES.UNMUTE : MUTEBTN_STATES.MUTE,\n title: (!value < 0.01) ? 'Mute' : 'Unmute'\n });\n }\n this.volumeSlider.value = value;\n }", "function changeVolume(volume) {\n hornSound.volume = volume / volumeNumber.max;\n}", "function setVolume(percent) {\n executeInGoogleMusic(\"setVolume\", { percent: percent });\n }", "function OnStateUpdate(self, state)\n {\n self.level = state.attributes.volume_level;\n self.state = state;\n set_view(self, state)\n }", "function setVolumeDown() {\n var currentVolume = player.getVolume();\n // volume steps: 10%\n if(currentVolume >= 10){\n player.setVolume(currentVolume - 10);\n }\n popUpVolumeDown();\n // show new/current volume in popUp\n document.getElementById('iconPopUpTimer').innerHTML = player.getVolume() + \"%\";\n removeCurrentIconPopUp();\n }", "function volume(val){\n //var fraction = val / 100;\n vol.gain.value = val;\n }", "function _setVolume(volume) {\n\t\t\ttry {\n\t\t\t\tswitch (typeof(volume)) {\n\t\t\t\t\tcase \"number\":\n\t\t\t\t\t\t_model.getMedia().volume(volume);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"string\":\n\t\t\t\t\t\t_model.getMedia().volume(parseInt(volume, 10));\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t} catch (err) {\n\t\t\t\t_eventDispatcher.sendEvent(jwplayer.api.events.JWPLAYER_ERROR, err);\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "static setVolume(msg, volume) {\n volume = parseFloat(volume);\n if (isNaN(volume)) {\n this.sendErr(msg, 'Syntax error!');\n } else if (volume < 0 || volume > 1) {\n this.sendErr(msg, '音量必需介於區間 [0, 1]');\n } else {\n Bucket.find(msg).volume = volume;\n }\n }", "function saveLevel(lv){\n level = lv\n}", "function processVolume(data) {\n if (!volumeChanging) {\n setVolume(data);\n }\n}", "function volumeUp(){\n// request system application to increase audio volume\nvolume.requestUp();\n}", "onVolumeLevelChange(e) {\n const audioElement = ReactDOM.findDOMNode(this.refs.audio);\n // volume value for audio element is 0 to 100, slider is 0-100 converted to 0..1\n const newValue = e.target.value/100;\n\n audioElement.volume = newValue;\n }", "setVolume(volume) {\n\t\tapp.audioVolume = volume;\n\n\t\t// It's alright if we don't have an audio object yet, it'll\n\t\t// get the new volume when it's initialized\n\t\tif(app.audioObject){\n\t\t\t// If we do have one already, set its volume\n\t\t\tapp.audioObject.volume = volume / 100;\n\t\t}\n\t}", "function changeVolume() {\r\n\tconsole.log(document.getElementById('volume').value);\r\n\tdocument.getElementById('mediaplayer').volume=document.getElementById('volume').value;\r\n}", "function handleVolumeCommit(event, newValue) {\n if (!playbackState) {\n alert(\"No playback found!\");\n return;\n }\n spotify.setVolume(newValue).catch((error) => console.log(error));\n }", "function volumeUpMusic() {\n if( audio.volume <= .9 ) {\n audio.volume += .12\n } else {\n audio.volume = 1\n }\n console.log(audio.volume)\n imageVolume()\n}", "getCurrentVolume() {\n return this.gainNode ? this.gainNode.gain.value : this.volume;\n }", "function volumeInit(initialVolume) {\r\n volumeControl.value = initialVolume;\r\n player.volume = initialVolume;\r\n }", "function increaseVolume() {\n this.sound.setVolume(Math.min(1, this.sound.volume + 0.1));\n}", "function setLevel() {\n level = 1;\n}", "function MV_SetVoiceVolume(\n voice,\n vol,\n left,\n right\n) {\n voice.LeftVolume = MV_GetVolumeTable(left);\n voice.RightVolume = MV_GetVolumeTable(right);\n}", "function volUp() {\n let vm = document.getElementById(\"volMeter\");\n\n if (player.volume < 1) {\n player.volume += 0.1;\n vm.value = player.volume;\n }\n}", "function changeGameVolume() {\n masterVolume(select('#sound_slider').value());\n sounds[0].play();\n}", "setVolume() {\n let video = document.getElementById('video');\n let volBar = document.getElementById('volume-bar');\n\n if (!volBar.value) { volBar.value = 1 }\n\n video.volume = volBar.value;\n this.setState({ volume: video.volume })\n this.volumeButton()\n }", "set level(level) {\n this._level = level;\n this._settings.level = level;\n }", "function updateVolumeValue() {\n\n volumeNumber.value = volumeSlider.value;\n\n if (volumeNumber.value == 0) {\n volumeImage.src = \"./assets/media/icons/volume-level-0.svg\";\n } else if (1 <= volumeNumber.value && volumeNumber.value <= 33) {\n volumeImage.src = \"./assets/media/icons/volume-level-1.svg\";\n } else if (34 <= volumeNumber.value && volumeNumber.value <= 66) {\n volumeImage.src = \"./assets/media/icons/volume-level-2.svg\";\n } else {\n volumeImage.src = \"./assets/media/icons/volume-level-3.svg\";\n }\n}", "function setNewVolume(obj,e){\n var volumeSliderWidth = obj.offsetWidth;\n var evtobj = window.event? event: e;\n clickLocation = evtobj.layerX - obj.offsetLeft;\n \n var percentage = (clickLocation/volumeSliderWidth);\n setVolume(percentage);\n}", "function _updateVolume() {\n if (_closed) {\n return;\n }\n\n _videoElement.volume = playback.volume.value;\n _videoElement.muted = playback.muted.value;\n }", "function handleVolumeChange(event, newValue) {\n if (!playbackState) {\n alert(\"No playback found!\");\n return;\n }\n setVolume(newValue);\n }", "setLevel(level) {\n if (this.currentLevel != null) {\n this.currentLevel.teardown(this);\n }\n\n this.currentLevel = level;\n\n if (this.currentLevel != null) {\n this.currentLevel.setup(this);\n }\n }", "function addVolume() {\n for (let i = 0; i < currentVid.length; i++) {\n \n if (!currentVid[i].paused) {\n currentVid[i].volume += 0.1;\n\n //Max volume is 1\n if (currentVid[i].volume >= 0.9) {\n currentVid[i].volume = 0.9;\n }\n }\n else {\n currentVid[i].volume = 0.3;\n }\n }\n}", "function setVolume(volume)\n{\n musicPlayer.volume=volume/100;\n volumeDisplay.innerHTML=volume;\n vol = volume/100;\n var bound = document.getElementById(\"slider-bar\").getBoundingClientRect().left;\n bound=bound+253;\n knob.style.left=bound+295*vol+\"px\";\n}", "function onAudioVolumeChange(){\r\n audio_player.volume = audioVolumeBar.value;\r\n}", "function volumeLow() {\n\tmasterGainNode.gain.value = 0.2;\n}", "function volumeLow() {\n\tmasterGainNode.gain.value = 0.2;\n}", "function alermVolume() {\n if (alarmTone.volume == 1) {\n alarmTone.volume = 0;\n volume.classList.replace('fa-volume-up', 'fa-volume-mute');\n } else {\n alarmTone.volume = 1;\n volume.classList.replace('fa-volume-mute', 'fa-volume-up');\n }\n}", "function changeVolume(action)\n {\n\n // get current volume\n var currentVolume = getVolume(),\n newVolume;\n\n // turn volume up\n if (action == \"up\")\n {\n\n // do nothing if already max volume\n if (currentVolume < 1)\n {\n newVolume = audio.volume += 0.05;\n audio.volume = newVolume.toFixed(2);\n }\n\n // turn volume down\n } else\n {\n\n // do nothing if muted\n if (currentVolume !== 0)\n {\n newVolume = audio.volume -= 0.05;\n audio.volume = newVolume.toFixed(2);\n }\n\n }\n\n\n updateVolumeBar();\n\n\n // log action\n //console.log(\"[Volume] \"+ action + \": \"+ getVolume());\n\n }", "_setLevel() {\r\n // If the current level is invalid, don't try to set the level\r\n if (this.levelNum < 0 || this.levelNum > MAX_LEVEL) {\r\n return;\r\n }\r\n\r\n // (Re)set the level data and canvas\r\n this.level = JSON.parse(JSON.stringify(this.levelData[this.levelNum]));\r\n this._renderLevel();\r\n\r\n // (Re)set the player position and movement data\r\n this.player.x = this.level.spawn.x * 20;\r\n this.player.y = this.level.spawn.y * 20;\r\n this.player.xVel = 0;\r\n this.player.yVel = 0;\r\n this.player.dir = 'none';\r\n\r\n // Update the level displays\r\n this.levelNumberDisplay.textContent = `Level: ${this.levelNum + 1}`;\r\n this.levelTitleDisplay.textContent = this.level.title;\r\n }", "function updateLevel(lvl) {\n level = lvl;\n }", "set(level: number) {\n if (level === -1) {\n this.state.on = false;\n return;\n }\n level = Math.round(level);\n // Restrict to end of array\n if (level >= this.config.tones.length) {\n level = this.config.tones.length - 1;\n }\n // Set state, not tone directly, to avoid abrubtly changing tone\n this.state.freq = this.config.tones[level];\n this.state.dur = this.config.durations[level];\n this.state.dutyCycle = this.config.dutyCycles[level];\n\n // Switch on if off\n if (this.state.on === false) {\n this.state.on = true;\n this._updateTone();\n }\n }", "function setCurrentLevel(level) {\n currentLevel = level;\n seconds.innerHTML = currentLevel;\n}", "function setAdVolumeUp() {\n var currentAdVolume = adJingle.volume;\n // volume steps: 20%\n if(currentAdVolume <= 0.8){\n adJingle.volume = currentAdVolume + 0.2;\n } \n popUpVolumeUp();\n // show new/current volume in popUp\n if(adJingle.volume.toString().charAt(0) == \"1\"){\n document.getElementById('iconPopUpTimer').innerHTML = \"100%\";\n } else if(adJingle.volume.toString().charAt(2) == \"0\"){\n document.getElementById('iconPopUpTimer').innerHTML = \"0%\";\n } else {\n document.getElementById('iconPopUpTimer').innerHTML = adJingle.volume.toString().charAt(2) + \"0%\";\n }\n removeCurrentIconPopUp();\n }", "function getVolume()\r\n {\r\n return volume;\r\n }", "function onPlayerVolumeChanged(volume){\n\t\tClientSocket.sendJSON({ \"propertyName\": \"volume\", \"propertyValue\": volume });\n\t}", "changeVolume(amount) {\n const videoEl = this.videoPlayer.current;\n let newVolume = videoEl.volume + amount;\n\n if (newVolume > 1) {\n newVolume = 1;\n } else if (newVolume < 0) {\n newVolume = 0;\n }\n\n videoEl.volume = newVolume;\n this.setState({ volume: newVolume });\n }", "function volumePlus() {\r\n\t//si le volume est inférieur à 1 on peut l'augmenter\r\n\tif (document.getElementById('mediaplayer').volume<1) {\r\n\t\tdocument.getElementById('mediaplayer').volume+=0.2;\r\n\t\tdocument.getElementById('volume').value=document.getElementById('mediaplayer').volume;\r\n\t}\r\n}", "changeVolume(isIncrease) {\n let volume = this.player.volume;\n if (isIncrease) {\n volume += (this.player.volume >= 1) ? 0 : VOLUME_CHANGE_STEP;\n if (volume >= 1) {\n volume = 1;\n MediaPlayer.changeButtonState({\n button: this.muteBtn,\n removeClass: MUTEBTN_STATES.UNMUTE,\n addClass: MUTEBTN_STATES.MUTE,\n title: 'Mute'\n });\n }\n } else {\n volume -= (this.player.volume <= 0 ? 0 : VOLUME_CHANGE_STEP);\n if (volume <= 0) {\n volume = 0;\n MediaPlayer.changeButtonState({\n button: this.muteBtn,\n removeClass: MUTEBTN_STATES.MUTE,\n addClass: MUTEBTN_STATES.UNMUTE,\n title: 'Unmute'\n });\n }\n }\n this.player.volume = volume;\n }", "function setVolume(percentage){\n activeSong.volume = percentage;\n \n var percentageOfVolume = activeSong.volume / 1;\n var percentageOfVolumeSlider = document.getElementById('volumeMeter').offsetWidth * percentageOfVolume;\n \n document.getElementById('volumeStatus').style.width = Math.round(percentageOfVolumeSlider) + \"px\";\n}", "function SetVolumenTrackUp(num_track)\r\n{\r\n try\r\n {\r\n let aux = document.getElementById('soundTrack'+num_track).volume;\r\n aux += 0.1;\r\n if (aux>1){aux=1;}\r\n document.getElementById('soundTrack'+num_track).volume = aux;\r\n } \r\n catch(err)\r\n {\r\n DebugLog(err.message.toString());\r\n }\r\n}", "setLevel(level) {\n this.level = level;\n }", "onAudioVolumeChange(currentVolume) {\n console.log('audio volume change', currentVolume)\n }", "function volDown() {\n let vm = document.getElementById(\"volMeter\");\n if (player.volume > 0) {\n player.volume -= 0.1;\n vm.value = player.volume;\n }\n}", "function toggleMuteVolume() {\n if (video.volume > 0) {\n prevvol = video.volume;\n video.volume = 0;\n }\n else {\n video.volume = prevvol;\n prevvol = 0;\n }\n volumeChangeBar();\n volumeChangeBtn();\n }", "function volumeControl() {\n\n //MAP OUT AUDIO LIMITS//\n loudness = map(circle.y,0,height,2.0,0.0);\n\n track.setVolume(loudness);\n\n //TEXT OUTPUT OF VOLUME NUMBERS//\n push();\n textSize(16);\n fill(50,168,82);\n text('Volume = ' + loudness,50,50);\n pop();\n}", "function setAudioVolume() {\r\n document.getElementById(\"player_html5\").volume = 1.0;\r\n }", "function amplitude_set_volume(percentage){\n amplitude_active_song.volume = percentage;\n amplitude_volume = percentage;\n var amplitude_percentage_of_volume = amplitude_active_song.volume / 1;\n if(document.getElementById('amplitude-volume-meter')){\n var amplitude_percentage_of_volume_slider = document.getElementById('amplitude-volume-meter').offsetWidth * amplitude_percentage_of_volume;\n }\n \n if(document.getElementById('amplitude-volume-status')){\n document.getElementById('amplitude-volume-status').style.width = Math.round(amplitude_percentage_of_volume_slider) + \"px\";\n }\n if(document.getElementById('amplitude-volume-status-tracker')){\n document.getElementById('amplitude-volume-status-tracker').style.marginLeft = Math.round(amplitude_percentage_of_volume_slider) + \"px\";\n }\n}", "function amplitude_set_new_volume(e){\n if(document.getElementById('amplitude-volume-meter')){\n var amplitude_volume_slider_width = document.getElementById('amplitude-volume-meter').offsetWidth;\n var amplitude_volume_slider_rect = document.getElementById('amplitude-volume-meter').getBoundingClientRect();\n var amplitude_evt_obj = window.event ? event: e;\n var amplitude_percentage = ((amplitude_evt_obj.layerX - amplitude_volume_slider_rect.left) /amplitude_volume_slider_width);\n\n if(amplitude_percentage > 1){\n amplitude_percentage = 1;\n }\n amplitude_set_volume(amplitude_percentage);\n }\n}", "showVolume(el, volume) {\n if (!el) return;\n if (volume < -45) volume = -45;\n if (volume > -20) volume = -20;\n el.value = volume;\n }", "function volUp()\n\t\t{\n\t\t\tif(player.volume <1)\n\t\t\t{\n\t\t\t\tplayer.volume +=0.1;//ten steps volume\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tplayer.volume = 1;\n\t\t\t}\n\t\t}", "function volumeToggle() {\n \n if (volume.className == \"fa fa-volume-off\") {\n volume.className = \"fa fa-volume-up\";\n localStorage.setItem(\"audio\", \"1\");\n menuMusic.play();\n \n } else {\n volume.className = \"fa fa-volume-off\"\n localStorage.setItem(\"audio\", \"0\");\n menuMusic.stop();\n bgMusic.stop();\n gameOverSound.stop();\n }\n}", "function removersom(){\n som.volume=0;\n}", "function volChange(e) {\n volume = e.target.value;\n $(\"#vol-display\").text(\"Volume: \" + e.target.value);\n }", "function changeVolume(direction) {\n let volume = document.getElementById('volume');\n\n if (player.muted) {\n let muteButton = document.getElementById('mute-button');\n changeButtonType(muteButton, 'Mute');\n player.muted = false;\n }\n\n if (direction === '+') {\n player.volume += player.volume == 1 ? 0 : 0.1;\n } else if (direction === '-') {\n player.volume -= (player.volume == 0 ? 0 : 0.1);\n }\n player.volume = parseFloat(player.volume).toFixed(1);\n volume.innerHTML = player.volume * 100;\n}", "function updateVolume(msg, args) {\n if(isNaN(args))\n throw \"Invalid volume.\";\n let volume = Number(args) / 20;\n // volume measured 1 - 20 (0 = 0, 20 = 1)\n if(volume > 1 || volume < 0)\n throw \"Invalid volume.\"\n if(!Object.keys(globals.connections).includes(msg.guild.id))\n throw \"Unable to perform function as server does not have a current audio connection.\";\n if(!globals.connections[msg.guild.id].isPlaying)\n throw \"Unable to act on nonexistant voice connection.\";\n globals.connections[msg.guild.id].volume = volume;\n globals.connections[msg.guild.id].dispatcher.setVolume(volume);\n}", "function _volumeSliderChanged(_val){\n logger.logEvent({'msg': 'volume changed', 'new_value': _val});\n if(!soundAnimationInProcess && currentMusicObj){\n currentMusicObj.jPlayer('volume',_val/100);\n }\n volume = _val;\n }", "function currentLevel(currentLevel: int) {\n level = currentLevel;\n}" ]
[ "0.74144095", "0.74120355", "0.73880714", "0.7236963", "0.717101", "0.7169664", "0.71038556", "0.7097744", "0.7087106", "0.70365304", "0.7019019", "0.69965756", "0.6995026", "0.69910365", "0.69901466", "0.6981654", "0.69679344", "0.6965144", "0.69648945", "0.69552225", "0.69433653", "0.68945676", "0.686292", "0.6817535", "0.6808936", "0.6786564", "0.6770984", "0.676474", "0.6744684", "0.67398643", "0.6738864", "0.6715078", "0.6666369", "0.6664281", "0.666086", "0.6628224", "0.66257054", "0.66102844", "0.6596152", "0.65835744", "0.6579543", "0.654709", "0.6533505", "0.6528328", "0.6524608", "0.6513436", "0.64916146", "0.6445663", "0.6443367", "0.6411339", "0.6402769", "0.63989794", "0.6389614", "0.63741857", "0.63729864", "0.6365969", "0.63632244", "0.6352387", "0.6344557", "0.632408", "0.63239795", "0.631733", "0.6303623", "0.6289584", "0.6287914", "0.6281977", "0.62695515", "0.626344", "0.626344", "0.6256565", "0.62546265", "0.6253373", "0.6234582", "0.6228392", "0.62272245", "0.6211886", "0.62049294", "0.620362", "0.6172454", "0.6156396", "0.6154874", "0.6122068", "0.6121033", "0.6120299", "0.61157346", "0.6109774", "0.61063987", "0.6102118", "0.6101382", "0.60992736", "0.60849535", "0.6070322", "0.6058049", "0.6052828", "0.60342556", "0.6030614", "0.6030307", "0.6017335", "0.60005265", "0.59952486" ]
0.7577558
0
Sets the size of the player
function setSize() { //console.log(width, height, height/width); /* that.css({ width : w + '%', paddingTop : height/width * w + '%', position : 'relative' }); */ /* that.css({ width : width, height : height }); div_wrapper.css({ width :width , height : height }); */ div_ratio.css({ width : '100%', paddingTop : height/width * 100 + '%' }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changePlayerSize (size) {\n humanPlayer.size = size;\n\n $sizeBlocks.removeClass(eSize.SMALL + ' ' + eSize.MEDIUM + ' ' + eSize.LARGE).addClass(size).attr('data-size', size);\n}", "function sizePlayers() {\n outerPlayer.height(outerPlayer.width() * 9 / 16);\n innerPlayer.height(outerPlayer.height() / 3);\n innerPlayer.width(outerPlayer.width() / 3);\n}", "updateSize() {\n windowWidth = Math.min(\n this.handler.getMaxGameWidth(),\n window.innerWidth\n )\n windowHeight = Math.min(\n this.handler.getMaxGameHeight(),\n window.innerHeight\n )\n this.handler.getGame().setWidth(windowWidth)\n this.handler.getGame().setHeight(windowHeight)\n }", "setSize(size) {\n this.size = size;\n }", "setSize(size) {\n this.size = size;\n }", "updateSize(width, xPos, yPos){\n this.cardWidth = width;\n this.cardHeight = width*1.5;\n this.originX = xPos;\n this.originY = yPos;\n }", "function changeToSize(size) {\n setMedia();\n media.height = size;\n var ratio = media.videoWidth / media.videoHeight;\n $('#media-bench').width(media.height * ratio);\n trjs.editor.resizeTranscript();\n }", "function resize() {\r\n newPlayer.width = window.innerWidth;\r\n newPlayer.height = window.innerHeight;\r\n canvas.width = window.innerWidth;\r\n canvas.height = window.innerHeight - 180;\r\n newPlayer.movePlayer();\r\n}", "function ChangeSize(value) {\n if (document.getElementById(\"sizeCheckBox\").checked == true) {\n guiData.cursorSize = value;\n if (!isPlaying) {\n refreshBubbles();\n refreshDisplay();\n }\n }\n else {\n p.getBubbleDrawer().setSize(value);\n if (!isPlaying) {\n refreshBubbles();\n refreshDisplay();\n }\n }\n}", "function updateSize() {\n let gameArea = document.getElementById(\"game\");\n let tileProportion = 10;\n h = Math.floor(gameArea.clientHeight * 0.9);\n w = Math.floor(gameArea.clientWidth * 0.9);\n size = Math.min(h, w);\n style = gameArea.style;\n style.setProperty(\"--proportion\", `${tileProportion}`);\n style.setProperty(\"--size\", `${size}px`);\n}", "setSize() {\n this.size = this.fixHeight;\n }", "set size(size) {\n this.uniforms.size.value = size;\n }", "scale(size) {\n document.getElementById(\"guiArea\").style.width = size + \"px\";\n }", "function resizeGameField(){\n var sizeX = (fieldSizeX * pixelSize)+'px';\n var sizeY = (fieldSizeY * pixelSize)+'px';\n\n gameField.style = `width: ${sizeX}; height: ${sizeY}`;\n}", "_size() {\n const scaleRatio = (window.innerHeight) / (this.gameBoard.height + 2 * config.board.padding);\n this.renderer.resize(window.innerWidth, window.innerHeight);\n this.gameBoard.height *= scaleRatio;\n this.gameBoard.width *= scaleRatio;\n this.gameBoard.position.set((this.screen.width / 2) - (this.gameBoard.width / 2), config.board.padding);\n }", "updateSize() {\n this.w = this.ent.width + this.wo;\n this.h = this.ent.height + this.ho;\n }", "changeSize(width, height) {\n\t\t\t\tthis.each(function (model) {\n\t\t\t\t\tmodel.set({width, height});\n\t\t\t\t});\n\t\t\t}", "static get PLAYER_SIZE() {\n return 10;\n }", "function tpResize(w, h, id) {\r\n var $player = $(\"#live_site_player_flash\");\r\n\r\n localStorage.setItem(\"twitchtv_plus_vid_w\", w + \"px\");\r\n localStorage.setItem(\"twitchtv_plus_vid_h\", h + \"px\");\r\n localStorage.setItem(\"twitchtv_plus_res_selected\", id);\r\n\r\n if (0 == $player.length) {\r\n alert(\"Unable to get the Twitch.TV player object\");\r\n return;\r\n }\r\n\r\n $player.css({width: w + \"px\", height: h + \"px\"});\r\n }", "updateSize() {\n const _style = window.getComputedStyle(this.track);\n const inheritedFontSize = _style['font-size'];\n\n this.track.style.setProperty('--simple-switch_size', inheritedFontSize);\n }", "function setSizes()\n {\n if (DOM.container.offsetHeight > DOM.container.offsetWidth)\n {\n DOM.container.style.minWidth = DOM.container.offsetHeight + \"PX\";\n }\n\n desk.style.height = sizes.desk.height + \"PX\";\n desk.style.width = sizes.desk.width + \"PX\";\n desk.style.marginBottom = sizes.deskContainer.marginBottom + \"PX\";\n\n for (var counterRow = 0; counterRow < sizes.field.rows; counterRow++)\n {\n for (var counterCol = 0; counterCol < sizes.field.cols; counterCol++)\n {\n DOM.game.field.rows[counterRow].cells[counterCol].style.height = sizes.card.height + \"PX\";\n DOM.game.field.rows[counterRow].cells[counterCol].style.width = sizes.card.width + \"PX\";\n\n var card = cards[counterRow * sizes.field.cols + counterCol];\n if (card)\n {\n card.style.height = sizes.card.height + \"PX\";\n card.style.width = sizes.card.width + \"PX\";\n }\n }\n }\n }", "set width(width) {\n this._width = width;\n this.updateSize();\n }", "_changeSliderSize() {\n\t\t\t\tlet width = this.model.get('width'),\n\t\t\t\t\theight = this.model.get('height');\n\n\t\t\t\tthis.$el.css({width, height});\n\t\t\t}", "set size(value) {}", "function trx_addons_set_mejs_player_dimensions(video, w, h) {\n \"use strict\";\n if (mejs) {\n for (var pl in mejs.players) {\n if (mejs.players[pl].media.src == video.attr('src')) {\n if (mejs.players[pl].media.setVideoSize) {\n mejs.players[pl].media.setVideoSize(w, h);\n }\n mejs.players[pl].setPlayerSize(w, h);\n mejs.players[pl].setControlsSize();\n }\n }\n }\n}", "function set_brush_paddle_size(size) {\n self.paddleSize = size;\n return this\n }", "setSize(w, h) {\n this.width = w;\n this.height = h;\n this.DOM.el.style.width = `${this.width}px`;\n this.DOM.el.style.height = `${this.height}px`;\n }", "function setVideoSize() {\n for (let i = 0; i < this.length; i++) {\n var vidsource = this[i].querySelectorAll('source');\n for (let j = 0; j < vidsource.length; j++) {\n vidsource[j].src = vidsource[j].src.replace('medium', screensize);\n }\n }\n curSize = screensize;\n }", "function resizeVideoJS() {\n var width = document.getElementById(myPlayer.id()).parentElement.offsetWidth;\n myPlayer.width(width).height(width * aspectRatio);\n }", "changeSizeRond(val) {\r\n this.cercle.style.width = val + \"px\";\r\n this.cercle.style.height = val + \"px\";\r\n}", "_setSize() {\n this.colorPickerCanvas.style.width = '100%';\n this.colorPickerCanvas.style.height = '100%';\n\n this.colorPickerCanvas.width = 289 * this.pixelRatio;\n this.colorPickerCanvas.height = 289 * this.pixelRatio;\n }", "function ResizePlayer()\n{\n var newWidth = window.innerWidth * 0.45;\n var newHeight = newWidth * 0.625;\n if((newWidth >= playerMinSize) && (newWidth <= playerMaxSize)) {\n $(\".youtube-embed\").width(newWidth);\n $(\".youtube-embed\").height(newHeight);\n\n $(\".learning-content\").width(newWidth + 340);\n }\n}", "function setupPlayer() {\n playerX = 4 * width / 5;\n playerY = height / 2;\n playerHealth = playerMaxHealth;\n playerStamina = playerMaxStamina;\n}", "function setSize(x, y)\n{\n\tthis.scale.set(x, y, 1);\n}", "function updateCurtainSize() {\n\t\t$(\"#main #curtain\").css(\"width\", $(\"#video-player\").width());\n\t\t$(\"#main #curtain\").css(\"height\", $(\"#video-player\").height());\n\t}", "function sizeChanged () {\n board = new Board(sizeSlider.value())\n board.initView(windowWidth / 2, windowHeight / 2, CENTER_BOARD_SIZE)\n}", "function makeSmall(e) {\n var ns = trjs.param.videoHeight / 1.2;\n if (ns < 120) ns = 120;\n changeToSize(ns);\n trjs.param.videoHeight = ns;\n trjs.param.saveStorage();\n }", "function changeSize() {\n let size = this.value;\n if (size == \"medium\") {\n id(\"output\").style.fontSize =\"36pt\";\n } else if (size == \"big\") {\n id(\"output\").style.fontSize =\"48pt\";\n } else {\n id(\"output\").style.fontSize =\"60pt\";\n }\n }", "function setupPlayer() {\n playerX = 4 * width / 5;\n playerY = height / 2;\n playerHealth = playerMaxHealth;\n}", "function setupPlayer() {\n playerX = 4 * width / 5;\n playerY = height / 2;\n playerHealth = playerMaxHealth;\n}", "function setupPlayer() {\n playerX = 4 * width / 5;\n playerY = height / 2;\n playerHealth = playerMaxHealth;\n}", "function setupPlayer() {\n playerX = (4*width/5);\n playerY = (height/2);\n playerHealth = playerMaxHealth;\n}", "function setupPlayer() {\n playerX = 4*width/5;\n playerY = height/2;\n playerHealth = playerMaxHealth;\n}", "setSize() {\n this.size.D1 = this.shape.D1*this.unit.X;\n this.size.D2 = this.shape.D2*this.unit.Y;\n }", "function resizeVideoJS(){\n\t\tvar width = document.getElementById(id).parentElement.offsetWidth;\n myPlayer.width(width).height( width * aspectRatio );\n }", "function setMejsPlayerDimensions(video, w, h) {\n\tif (mejs) {\n\t\tfor (var pl in mejs.players) {\n\t\t\tif (mejs.players[pl].media.src == video.attr('src')) {\n\t\t\t\tif (mejs.players[pl].media.setVideoSize) {\n\t\t\t\t\tmejs.players[pl].media.setVideoSize(w, h);\n\t\t\t\t}\n\t\t\t\tmejs.players[pl].setPlayerSize(w, h);\n\t\t\t\tmejs.players[pl].setControlsSize();\n\t\t\t\t//var mejs_cont = video.parents('.mejs-video');\n\t\t\t\t//mejs_cont.css({'width': w+'px', 'height': h+'px'}).find('.mejs-layers > div, .mejs-overlay, .mejs-poster').css({'width': w, 'height': h});\n\t\t\t}\n\t\t}\n\t}\n}", "setSize(size) {\n this.size = size;\n return this;\n }", "function setContainerSize(size) {\n opts.containerSize = size;\n setMinMaxResize();\n }", "setBoardSize() {\n let self = this;\n //self.board.style.height = (window.innerHeight / 3).toString() + 'px'; // make the board a third of the window's height\n self.board.style.height = (window.innerHeight - 200).toString() + 'px'; // make the board a third of the window's height\n self.board.style.width = self.board.style.height; // make the board a square\n }", "function resizeVideoJS(){\n var width = document.getElementById(myPlayer.el().id).parentElement.offsetWidth;\n var aspectRatio=8/12;\n myPlayer.width(width).height( width * aspectRatio);\n }", "function setsize() {\n\tvar sizes = $(\".well input[name='size']\").val().split(\"x\");\n\t// add properties to object and store for future play\n\tCW.sizex = sizes[0];\n\tCW.sizey = sizes[1];\n\tlocalStorage[\"sizex\"] = sizes[0];\n\tlocalStorage[\"sizey\"] = sizes[1];\n\tlocalStorage[\"black\"] = CW.black;\n\tlocalStorage[\"blank\"] = CW.blank;\n\t$(\".well > h3\").text(\"Generator for \" + CW.sizex + \"x\" + CW.sizey + \" Crossword Puzzle\")\n\t$(\".word\").toggle(\"slow\");\n\t$(\".form-inline\").hide();\n\tevent.preventDefault();\n}", "function resize() {\n // Div containing the generated canvas of the game\n let div = document.getElementById(\"phaser\");\n // The generated game canvas\n let canvas = document.querySelector(\"canvas\");\n // Grabbing the values of the window height and width\n let windowWidth = window.innerWidth-20;\n let windowHeight = window.innerHeight-150;\n // Calculating the window ratio to adapt the frame\n let windowRatio = windowWidth / windowHeight;\n // Calculating the game ratio to adapt it to the window\n let gameRatio = game.config.width / game.config.height;\n // Adapting the sizes with the ratios\n if(windowRatio < gameRatio){\n canvas.style.width = windowWidth + \"px\";\n canvas.style.height = (windowWidth / gameRatio) + \"px\";\n div.style.width = windowWidth + \"px\";\n div.style.height = (windowWidth / gameRatio) + \"px\";\n }\n else{\n canvas.style.width = (windowHeight * gameRatio) + \"px\";\n canvas.style.height = windowHeight + \"px\";\n div.style.width = (windowHeight * gameRatio) + \"px\";\n div.style.height = windowHeight + \"px\";\n }\n }", "function changeSize(){\n\t\t$(\"text-area\").style.fontSize = $(\"size-dropbox\").value;\n\t}", "function change_size(){\n\tvar size = document.getElementById(\"size\").value;\n\tdocument.getElementById(\"myt\").style.fontSize = size;\n}", "function resizeVideoJS(){\n // Get the parent element's actual width\n var width = document.getElementById(myPlayer.id).parentElement.offsetWidth;\n // Set width to fill parent element, Set height\n\tif($(document).width() < 780)\n\t\tmyPlayer.width(width).height( width * aspectRatio );\n\telse\n myPlayer.width(width).height( $(window).height() );\n }", "function resize() {\r\n let maxWidth = gameArea.getBoundingClientRect().width - levels[level].paddleWidth;\r\n if (playerPosition > maxWidth) {\r\n console.log(\"resize\");\r\n playerPosition = maxWidth - 15; // 15 is a small padding from the edge of the window\r\n player.style.left = playerPosition + \"px\";\r\n }\r\n}", "function _resize(size){\n var sz = (size < 100) ? sz = 100 : sz = size;\n placeholder.each(function(){\n $(this).find('div.instrument').css({height : sz, width : sz});\n });\n }", "function pChangeSize(bean,aimWidth,aimHeight) {\n bean.style.width = aimWidth +_PX;\n bean.style.height = aimHeight + _PX; \n}", "setSize(width, height) {\n this.cssRenderer.setSize(width, height);\n this.cssCamera.aspect = width / height;\n this.cssCamera.updateProjectionMatrix();\n }", "function changesize(h,sq,intv,tm) {\n chartx.chart.height = h ;\n standWD(sq) ;\n initChart(sq,intv,tm) ;\n\n // setTimeout( chart.setSize(null,h) ,500);\n}", "function sizepick(size) {\n currentSize = size;\n}", "function DDLightbarMenu_SetSize(pSize)\n{\n\tif (typeof(pSize) == \"object\")\n\t{\n\t\tif (pSize.hasOwnProperty(\"width\") && pSize.hasOwnProperty(\"height\") && (typeof(pSize.width) == \"number\") && (typeof(pSize.height) == \"number\"))\n\t\t{\n\t\t\tif ((pSize.width > 0) && (pSize.width <= console.screen_columns))\n\t\t\t\tthis.size.width = pSize.width;\n\t\t\tif ((pSize.height > 0) && (pSize.height <= console.screen_rows))\n\t\t\t\tthis.size.height = pSize.height;\n\t\t}\n\t}\n}", "function set_max_brush_paddle_size(size) {\n self.maxPaddleSize = size;\n return this\n }", "resized() {\n\t\tthis.position.y = this.halfSize.y;\n\t}", "setSize(w,h){\n\n\t\t//set the size of the canvas, on chrome we need to set it 3 ways to make it work perfectly.\n\t\tthis.ctx.canvas.style.width = w + \"px\";\n\t\tthis.ctx.canvas.style.height = h + \"px\";\n\t\tthis.ctx.canvas.width = w;\n\t\tthis.ctx.canvas.height = h;\n\n\t\t//when updating the canvas size, must reset the viewport of the canvas \n\t\t//else the resolution webgl renders at will not change\n\t\tthis.ctx.viewport(0,0,w,h);\n\t\tthis.width = w;\t//Need to save Width and Height to resize viewport for WebVR\n\t\tthis.height = h;\n\n\t\treturn this;\n\t}", "function setBarSize(size) {\n /* jshint validthis:true */\n var barMinSize = this.barMinSize || 20;\n\n if (size > 0 && size < barMinSize) {\n size = barMinSize;\n }\n\n if (this.bar) {\n $(this.bar).css(this.origin.size, parseInt(size, 10) + 'px');\n }\n }", "function setSize()\n {\n //styler.styleImageMaxSize(vm.element, vm.moverStyle);\n vm.moverStyle.width = hasWidth = vm.themeStyle.width || vm.themeStyle['max-width'];\n vm.moverStyle.height = hasHeight = vm.themeStyle.height || vm.themeStyle['max-height'];\n setBorder();\n }", "function changeSize(val) {\n\tvar s = String(val).split(\",\");\n\td3.select('#viz_container').style('width', s[0] + 'px').style('height', s[1] + 'px');\n\tviz\n\t .fontSizeMax(function () { return Math.max(30,s[1] * .1) })\n\t .update();\n}", "adjustSize () {\n this._resize();\n }", "function setCardSize() {\n h2s = $(\"h2\");\n imgs = $(\"img\");\n\n i = 0;\n j = 0;\n \n $(\"img\").each(function() {\n $(this).width(audioWidth);\n $(this).height(audioHeight);\n\n var imgHeight = $(this).height();\n var position = $(this).position();\n var positionTop = (position.top);\n var playerTop = position.top+imgHeight-$(audioTags[i]).height();\n $(h2s[i]).css({\"position\":\"absolute\", \"top\":positionTop+\"px\", \"left\":j*audioWidth+\"px\", \"width\":audioWidth +\"px\"});\n $(audioTags[i]).css({\"position\":\"absolute\", \"top\":playerTop+\"px\", \"left\":j*audioWidth+\"px\", \"width\":audioWidth +\"px\"});\n i++;\n j++;\n if (j >= numCols) {\n j = 0;\n }\n });\n }", "function changeSize(val) {\n\tvar s = String(val).split(\",\");\n\td3.select('#viz_container').style('width', s[0] + 'px').style('height', s[1] + 'px');\n\tviz.update();\n}", "function changeSize(val) {\n\tvar s = String(val).split(\",\");\n\td3.select('#viz_container').style('width', s[0] + 'px').style('height', s[1] + 'px');\n\tviz.update();\n}", "function GetSizeItem() {\n an.size = {\n 'OuterWidth': M.OuterWidth($anim),\n 'OuterHeight': M.OuterHeight($anim)\n };\n }", "adjustSize() {\n VisualizerBase.prototype.adjustSize.call(this);\n\n if ('artist' in this) {\n this.artist.adjustSize();\n }\n }", "function setDimensions() {\n height = window.innerHeight;\n width = window.innerWidth;\n canv.height = height;\n canv.width = width;\n margin = MARGIN * Math.min(height, width);\n newGame();\n}", "function setsize() {\n gsap.to(indexbtnitemcontainer, { duration: 0.9, ease: \"expo.out\", y: -(current_index * 65) });\n // gsap.to(indexbtn, { duration: 1.5, ease: \"expo.out\", height: \"65px\" });\n gsap.to(indexbtn, { duration: 0.9, ease: \"expo.out\", width: indexbtnitem[current_index].offsetWidth + \"px\" });\n // gsap.to(indexbtn, { duration: 1.5, ease: \"expo.out\", borderRadius: \"50px\" });\n\n}", "size(_size) {\n this.penSize = parseFloat(_size);\n this.ctx.lineWidth = this.penSize;\n }", "function changeSize() {\r\n if (w3.matches) {\r\n canvas.setAttribute(\"width\", \"300\");\r\n canvas.setAttribute(\"height\", \"450\");\r\n h = 450;\r\n w = 300;\r\n if (window.matchMedia(\"(max-height: 700px)\").matches) {\r\n canvas.setAttribute(\"height\", \"375\");\r\n h = 375;\r\n }\r\n if (window.matchMedia(\"(max-height: 600px)\").matches) {\r\n canvas.setAttribute(\"height\", \"300\");\r\n h = 300;\r\n } \r\n unit = 15;\r\n space = unit * nSpace;\r\n clearCanvas();\r\n } else if (w2.matches) {\r\n canvas.setAttribute(\"width\", \"600\");\r\n canvas.setAttribute(\"height\", \"600\");\r\n h = 600;\r\n w = 600;\r\n clearCanvas();\r\n } else if (w1.matches) {\r\n canvas.setAttribute(\"width\", \"600\");\r\n canvas.setAttribute(\"height\", \"800\");\r\n h = 800;\r\n w = 600;\r\n clearCanvas();\r\n } else {\r\n canvas.setAttribute(\"width\", \"600\");\r\n canvas.setAttribute(\"height\", \"500\");\r\n h = 500;\r\n w = 600;\r\n clearCanvas();\r\n }\r\n}", "set width (width) { this._width = width }", "function sizeiframe(size, animate) {\n var theSize;\n\n if (size > config.maxViewportWidth) { //If the entered size is larger than the max allowed viewport size, cap value at max vp size\n theSize = config.maxViewportWidth;\n } else if (size < config.minViewportWidth) { //If the entered size is less than the minimum allowed viewport size, cap value at min vp size\n theSize = config.minViewportWidth;\n } else {\n theSize = size;\n }\n\n //Conditionally remove CSS animation class from viewport\n elGenContainer.classList.remove('vp-animate', animate);\n elViewport.classList.remove('vp-animate', animate);\n\n elGenContainer.style.width = (theSize + config.viewportResizeHandleWidth) + 'px'; //Resize viewport wrapper to desired size + size of drag resize handler\n elViewport.style.width = theSize + 'px'; //Resize viewport to desired size\n\n updateSizeReading(theSize); //Update values in toolbar\n saveSize(theSize); //Save current viewport to cookie\n}", "function ps()\n{\n\tvar height = parseInt(($('#content').height())) - 80; //Hoogte van de playbox ophalen\n\theight *= 0.22; //De formule om de playericons te berekenen\n\theight = height + 'px'; //Het woord px toevoegen\n\t$('.playicon').css('width', height); //Playericons de juiste grootte geven\n}", "function setDifficulty(){\n if(difficulty==1){\n size = [12,20]\n }\n if(difficulty==2){\n size = [25,40]\n }\n if(difficulty==3){\n size = [50,80]\n }\n}", "_setPickerSize() {\n const that = this,\n parentWidth = that.$.svgContainer.offsetWidth,\n parentHeight = that.$.svgContainer.offsetHeight;\n let size = Math.min(parentWidth, parentHeight) * 0.9;\n\n if (that._pickerSize !== undefined && that._pickerSize !== size) {\n that._sizeChanged = true;\n }\n else {\n that._sizeChanged = false;\n }\n\n that._pickerSize = size;\n that._measurements.radius = size / 2;\n that._measurements.innerRadius = that._measurements.radius - 10;\n\n size += 'px';\n that.$.picker.style.width = size;\n that.$.picker.style.height = size;\n }", "_size_elements () {\n\n\t\tvar w = this.context.canvas.width\n\t\tvar h = this.context.canvas.height\n\t\tvar cw = this._deck_blue ['musician']._face_img.width\n\t\tvar ch = this._deck_blue ['musician']._face_img.height\n\n\t\tvar scale_x = (w * 0.9 / 8.0) / cw\n\t\tvar scale_y = (h / 4.0) / ch\n\t\tvar scale = Math.min (scale_x, scale_y)\n\n\t\tfor (var name in this._deck_blue) {\n\t\t\tthis._deck_blue [name].set_size (cw * scale)\n\t\t}\n\t\tfor (var name in this._deck_red) {\n\t\t\tthis._deck_red [name].set_size (cw * scale)\n\t\t}\n\t}", "function Size(width, height) {\n this.width = width;\n this.height = height;\n }", "function DrawSize(width, height) {\n this.width = Math.round(width);\n this.height = Math.round(height);\n}", "function setMapSize() {\n detail = +document.getElementById(\"detail\").value;\n ctx.canvas.width = document.getElementById(\"width_slider\").value;\n ctx.canvas.height = document.getElementById(\"height_slider\").value;\n}", "function setSize(node, name) {\n var size = 50;\n switch (name.toLocaleLowerCase()) {\n case \"small\":\n size = 50;\n break;\n case \"default\":\n size = 60;\n break;\n case \"medium\":\n size = 70;\n break;\n case \"large\":\n size = 80;\n break;\n case \"extralarge\":\n size = 100;\n break;\n }\n app.graph.setBounds(node, new yfiles.geometry.RectD(10, 10, size, size))\n }", "updateSize(newCanvasWidth, newCanvasHeight) {\n canvasWidth = newCanvasWidth;\n canvasHeight = newCanvasHeight;\n isCanvasDirty = true;\n }", "_updateSize() {\n this._size = this._bottomRight.$subtract(this._topLeft).abs();\n this._updateCenter();\n }", "function penSizeChange(pensize) {\r\n penSize = pensize;\r\n}", "function configure_plane_size(){\n\tplane_width = global.stage.width;\n\tconfigure_plane_height();\n\tconfigure_plane_offset();\n}", "function updateSizeValues(){\n\tswitch (runDialog.sizeConfig.outputPresetInput.selection.index){\n\t\tcase 0:\n\t\t\tsetSizeValues(8.5, 11, 6, 9, 150);\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tsetSizeValues(11, 8.5, 9, 6, 150);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tsetSizeValues(11, 14, 8, 12, 150);\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tsetSizeValues(14, 11, 12, 8, 150);\n\t\t\tbreak;\n\t}\n}", "function toggleSize() {\n _atMaxSize = !_atMaxSize;\n if (_atMaxSize)\n _mapDOM.canvas.classList.add('max');\n else\n _mapDOM.canvas.classList.remove('max');\n\n _updateMarkerSizes();\n _refresh();\n}", "function adjustVideoSize() {\n document.querySelectorAll(\"video\").forEach(v => {\n v.setAttribute(\"width\", innerWidth);\n v.setAttribute(\"height\", innerHeight);\n });\n}", "function setvideodisplaysize(type, width, height)\n{\n if (typeof (webphone_api.plhandler) === 'undefined' || webphone_api.plhandler === null)\n webphone_api.addtoqueue('SetVideoSize', [type, width, height]);\n else\n webphone_api.plhandler.SetVideoSize(type, width, height);\n}", "function setPanelSize(){\n var windowHeight = $(window).height();\n var windowWidth = $(window).width();\n var windowWidthColor = $('.padd_box').height();\n var textWrap = $('.text_wrap').height();\n\n //calculate whether the video is too tall for the space\n //resize video and panel\n\n $('.menu_wrap').css({'padding-top': (windowHeight - windowWidthColor) / 2 + 'px' });\n $('.home_head').css({'height': windowHeight + 'px' });\n $('.text_wrap').css({'margin-top': - textWrap / 2 + 30 + 'px' });\n $('.how_do iframe').css({'height': windowWidth / 2 / 1920 * 1080 + 'px' });\n\n }", "function resizeEverything() {\n scale = Math.max(0.5, Math.min(1.3, Math.min((window.innerHeight - 100) / defaultHeight, (window.innerWidth - 100) / defaultWidth)));\n canvas.width = defaultWidth * scale;\n canvas.height = defaultHeight * scale;\n grid *= scale;\n minEnemySpeed *= scale;\n maxEnemySpeed *= scale;\n //enemyRadius*=scale;\n bulletRadius *= scale;\n playerWidth *= scale;\n playerHeight *= scale;\n bulletSpeed *= scale;\n ghostSpeed *= scale;\n //playerY = canvas.height-playerHeight;\n //playerX=Math.max(0,canvas.width-distFromRight);\n //console.log(scale);\n\n }", "function updateRacketSize(e) {\n if (gDebugging) console.log(\"Novo tamanho da raquete:\", gRacket.w);\n\n var newW = parseFloat(e.target.value);\n generateRacket(newW);\n render();\n}", "function setSize( w,h )\n {\n this._width = w || 256;\n this._height = h || 256;\n\n this.viewRect = new Rect( 0,0,this._width,this._height );\n\n if( this.canvas != null ){\n\n // set the scaled resolution\n this.canvas.width = this.viewRect.w * this.scale;\n this.canvas.height = this.viewRect.h * this.scale;\n\n // and the actual size\n this.canvas.style.width = ( this.viewRect.w ) + 'px';\n this.canvas.style.height = ( this.viewRect.h ) + 'px';\n }\n \n }" ]
[ "0.77134883", "0.72535807", "0.7101112", "0.7090977", "0.70443684", "0.68601346", "0.6814398", "0.67500377", "0.6736123", "0.67303485", "0.67096174", "0.66109264", "0.6605752", "0.648677", "0.6486754", "0.6469332", "0.64463353", "0.63704544", "0.6363853", "0.63231784", "0.6322344", "0.6320959", "0.6312446", "0.63113207", "0.6309392", "0.6295312", "0.62944365", "0.62931263", "0.6291853", "0.62911826", "0.6277793", "0.6277327", "0.6264447", "0.6259355", "0.62329173", "0.62325686", "0.6213381", "0.62063", "0.62055296", "0.62055296", "0.62055296", "0.61962616", "0.61714095", "0.6165503", "0.61588496", "0.6153976", "0.61523384", "0.61510426", "0.612967", "0.6128339", "0.6123611", "0.6109711", "0.6099729", "0.6094604", "0.6085308", "0.6084065", "0.60679966", "0.6056102", "0.60466117", "0.60427946", "0.604059", "0.6036962", "0.6031558", "0.60283434", "0.60218495", "0.60156614", "0.59991026", "0.599603", "0.5993086", "0.5993079", "0.5973559", "0.5973559", "0.593635", "0.59361506", "0.5926022", "0.59208715", "0.59201896", "0.5919216", "0.5914288", "0.58981735", "0.588839", "0.58877707", "0.58873945", "0.588403", "0.58784276", "0.58684504", "0.5866971", "0.5864936", "0.58623725", "0.58617055", "0.58545154", "0.58540106", "0.5852138", "0.58503795", "0.5849977", "0.5845877", "0.584375", "0.58403337", "0.5838339", "0.5833316" ]
0.6059051
57
converts seconds to a timestamp
function secondsToTime(s, forceHours) { if(isNaN(s)) { if(forceHours) return "00:00:00"; return "00:00"; } var _s = s; s = Math.ceil(s); var forceHours = forceHours || false; var hours = Math.floor(s / (60 * 60)); hours -= 60 * 60 * hours; var min = Math.floor(s / 60); s -= 60 * min; if(isNaN(hours)) hours = 0; if(isNaN(min)) min = 0; if(isNaN(s)) s = 0; var str = ''; if(hours > 0 || forceHours) { if(hours < 10) { hours = '0' + hours; } str += hours + ':'; } if(min < 10) { min = '0' + min; } if(s < 10) { s = '0' + s; } str += min; return str + ':' + s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function timestamp(value) {\n var sec_num = value;\n var hours = Math.floor(sec_num / 3600);\n var minutes = Math.floor((sec_num - (hours * 3600)) / 60);\n var seconds = sec_num - (hours * 3600) - (minutes * 60);\n\n if (hours < 10) {hours = \"0\"+hours;}\n if (minutes < 10) {minutes = \"0\"+minutes;}\n if (seconds < 10) {seconds = \"0\"+seconds;}\n return hours+':'+minutes+':'+seconds;\n }", "function unixTimestampSecondsToDate() {\n return operator_1.cast(number_1.integer(), \n //Multiply by 1000 because `Date` ctor expects\n //milliseconds since Unix Epoch\n function (num) { return new Date(num * 1000); }, instance_of_date_1.instanceOfDate());\n}", "function toSeconds(seconds) {\n return seconds % 60;\n}", "function to_time(seconds) {\n var sign = seconds < 0 ? (seconds = -seconds, '-') : '';\n\n if (!Number.isNaN(seconds)) {\n var dt = new Date(null);\n dt.setSeconds(seconds);\n return sign + dt.toISOString().substr(11, 8);\n } else {\n return '--:--:--';\n }\n}", "function to_seconds(t) {\n var sign = t.slice(0, 1) === '-' ? (t = t.slice(1), -1) : 1;\n return sign * t.split(':').reduce((p,c) => p * 60 + +c, 0);\n}", "function secondsToTime(unix) {\n let date = new Date(unix * 1000);\n // Hours part from the timestamp\n\n let hours = date.getHours();\n if (hours > 12) {\n hours = hours - 12\n }\n // Minutes part from the timestamp\n let minutes = \"0\" + date.getMinutes();\n // Seconds part from the timestamp\n let seconds = \"0\" + date.getSeconds();\n\n // Will display time in 10:30:23 format\n let formattedTime = hours + ':' + minutes.substr(-2);\n\n return formattedTime\n}", "function convertTime(seconds) {\n var s = seconds;\n var m = Math.floor(s / 60);\n s %= 60;\n var h = Math.floor(m / 60);\n m %= 60;\n\n return h + ':' + m + ':' + s.toFixed(3);\n}", "function makeSecondsReadable(seconds){\n seconds = Math.round(seconds);\n let extra0;\n `${seconds%60}`.length == 1 ? extra0 = \"0\" : extra0 = \"\";\n return `${Math.floor(seconds / 60)}:${extra0}${seconds%60}`;\n }", "function ms_seconds(x){ return x / 1000;}", "function formatSeconds(seconds) {\n return seconds < 10 ? '0' + seconds : seconds;\n }", "function timeConverter(UNIX_timestamp){\r\n var a = new Date(UNIX_timestamp * 1000);\r\n var months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];\r\n var year = a.getFullYear();\r\n var month = months[a.getMonth()];\r\n var date = a.getDate();\r\n var hour = a.getHours();\r\n var min = a.getMinutes();\r\n var sec = a.getSeconds();\r\n\r\n min=String(min)\r\n sec =String(sec)\r\n hour= String(hour)\r\n\r\n\r\n\r\n hour = adding(hour)\r\n\r\n min=adding(min)\r\n \r\n sec= adding(sec)\r\n\r\n var time = `${date}/${month}/${year} ${hour}:${min}`;\r\n return time;\r\n}", "function _convertTime(second) {\n\t\t\tsecond = Math.abs(second);\n\t\t\tvar val = new Array();\n\t\t\tval[0] = Math.floor(second/3600%24);//hours\n\t\t\tval[1] = Math.floor(second/60%60);//mins\n\t\t\tval[2] = Math.floor(second%60);//secs\n\t\t\tvar stopage = true;\n\t\t\tvar cutIndex = -1;\n\t\t\tfor(var i = 0; i < val.length; i++) {\n\t\t\t\tif(val[i] < 10) val[i] = \"0\" + val[i];\n\t\t\t\tif( val[i] == \"00\" && i < (val.length - 2) && !stopage) cutIndex = i;\n\t\t\t\telse stopage = true;\n\t\t\t}\n\t\t\tval.splice(0, cutIndex + 1);\n\t\t\treturn val.join(':');\n\t\t}", "function secondToStringConversion(seconds) {\n const minutes = Math.floor(seconds / 60);\n let remainderSeconds = seconds - minutes * 60;\n remainderSeconds = remainderSeconds > 9 ? \":\" + remainderSeconds : \":0\" + remainderSeconds;\n return minutes + remainderSeconds;\n}", "function secToTime(t) {\n var sec_num = parseInt(t, 10); // don't forget the second param\n var minutes = Math.floor(sec_num / 60);\n var seconds = sec_num - (minutes * 60);\n if (minutes < 10) {minutes = \"0\"+minutes;}\n if (seconds < 10) {seconds = \"0\"+seconds;}\n return minutes+':'+seconds;\n}", "function convertTime(timestamp){\n\tlet date = new Date(timestamp*1000); //turn to milliseconds\n\tlet seconds = date.getSeconds();\n\tlet minutes = date.getMinutes();\n\tlet hours = date.getHours();\n\tlet months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug',\n\t\t\t\t 'Sep','Oct','Nov','Dec'];\n \tlet year = date.getFullYear();\n \tlet month = months[date.getMonth()];\n \tlet datenum = date.getDate();\n\treturn datenum + \" \" + month + \" \" + year + \" \" + hours + \":\" + minutes\n\t\t + \".\" + seconds;\n}", "function secondsToTimeString(seconds) {\n //clamp to 99 minutes and 59 seconds\n seconds = clamp(seconds, 0, 5549.999);\n //use javascript date to parse our seconds value as time\n let date = new Date(null);\n date.setSeconds(seconds, (seconds - parseInt(seconds)) * 1000);\n //limit it to just the minutes, seconds, and milliseconds\n let timeString = date.toISOString().substr(14, 9);\n //return the result\n return timeString;\n}", "function convertFBXTimeToSeconds( time ) {\n \n return time / 46186158000;\n \n }", "function convertToSeconds(time) {\n return time * 60;\n}", "function timeConverter(UNIX_timestamp) {\n return moment(new Date(UNIX_timestamp.seconds * 1000)).format('YYYY-MM-DDTHH:mm');\n}", "function ConvertSecondsToMilliseconds(seconds) {\n return (seconds * 1000);\n }", "function getSeconds() {\n return Number(seconds.value);\n}", "function convertSeconds(sec) {\n const week = 7 * 24 * 60 * 60,\n day = 24 * 60 * 60,\n hour = 60 * 60,\n minute = 60,\n seconds = 60;\n const wk = Math.floor(sec / week);\n const d = Math.floor((sec % week) / day);\n const hr = Math.floor(((sec % week) % day) / hour);\n const min = Math.floor((((sec % week) % day) % hour) / minute);\n sec = (((sec % week) % day) % hour) % minute;\n const arr = [\n [wk, \" wk\"],\n [d, \" d\"],\n [hr, \" hr\"],\n [min, \" min\"],\n [sec, \" sec\"],\n ];\n let str = \"\",\n i = 0;\n for (i; i < arr.length; i++) {\n if (!arr[i][0]) {\n arr.splice(i, 1);\n i--;\n }\n }\n for (let i = 0; i < arr.length; i++) {\n if (i !== arr.length - 1) {\n str += \" \" + arr[i][0] + arr[i][1] + \",\";\n continue;\n }\n str += \" \" + arr[i][0] + arr[i][1];\n }\n return str.trim();\n}", "function convertTime(secs) {\n var currentTime = Date.parse(new Date());\n var countDown = new Date(currentTime + secs * 1000);\n return countDown\n}", "function toTimestamp(rpepoch) {\n return (rpepoch + 0x386D4380) * 1000;\n}", "function toTimestamp(rpepoch) {\n return (rpepoch + 0x386D4380) * 1000;\n}", "function convTimeToSeconds(hours, minutes, seconds) {\r\n\r\n\tvar totalTime;\r\n\r\n\ttotalTime = (hours * minutesInHours * secondsInMinutes) +\r\n\t\t\t\t(minutes * secondsInMinutes) +\r\n\t\t\t\tseconds;\r\n\r\n\treturn totalTime;\r\n}", "#secondsToTime(s) {\r\n\t\tlet momentTime = moment.duration(s, 'seconds');\r\n\t\tlet sec = momentTime.seconds() < 10 ? ('0' + momentTime.seconds()) : momentTime.seconds();\r\n\t\tlet min = momentTime.minutes() < 10 ? ('0' + momentTime.minutes()) : momentTime.minutes();\r\n\r\n\t\treturn `${min}:${sec}`;\r\n\t}", "function convertMinutestoSeconds(minutes)\r\n{\r\n return Math.floor(minutes * 60);\r\n}", "function convertMinutestoSeconds(minutes) \n{\n return Math.floor(minutes * 60);\n}", "function secsToNtpTimestamp (ts, buf = Buffer.alloc(8), offset = 0) {\n const seconds = Math.floor(ts / 1000) + SEVENTY_YEARS\n const fraction = Math.round((ts % 1000) / 1000 * TWO_POW_32)\n // seconds\n buf[offset + 0] = (seconds & 0xFF000000) >> 24\n buf[offset + 1] = (seconds & 0x00FF0000) >> 16\n buf[offset + 2] = (seconds & 0x0000FF00) >> 8\n buf[offset + 3] = (seconds & 0x000000FF)\n // fraction\n buf[offset + 4] = (fraction & 0xFF000000) >> 24\n buf[offset + 5] = (fraction & 0x00FF0000) >> 16\n buf[offset + 6] = (fraction & 0x0000FF00) >> 8\n buf[offset + 7] = (fraction & 0x000000FF)\n return buf\n}", "function convertFBXTimeToSeconds(time) {\n return time / 46186158000;\n}", "function dateToUnixTimestampSeconds() {\n return operator_1.cast(instance_of_date_1.instanceOfDate(), function (d) { return Math.floor(d.getTime() / 1000); }, number_1.integer());\n}", "function segmentToTs (seg) {\n return seg * (1000 * 60 * 5);\n }", "function timeConverter(UNIX_timestamp){\n var a = new Date(UNIX_timestamp * 1000);\n var months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];\n var year = a.getFullYear();\n var month = months[a.getMonth()];\n var date = a.getDate();\n var hour = a.getHours();\n var min = a.getMinutes();\n var sec = a.getSeconds();\n var time = date + ' ' + month + ' ' + year;\n return time;\n }", "function toMinSec(seconds) {\r\n var minutes = Math.floor(seconds / 60);\r\n var seconds = Math.floor(seconds % 60);\r\n var results = minutes + \":\" + ((seconds < 10) ? (\"0\" + seconds) : seconds);\r\n return results;\r\n}", "function getTimeSeconds (sec) {\n const date = new Date(sec * 1000);\n return date.toLocaleTimeString('pt-BR', {\n hour12: false,\n timeZone: 'UTC'\n });\n}", "function convertFBXTimeToSeconds( time ) {\n\n\t\treturn time / 46186158000;\n\n\t}", "function formatSecondsToTime(s) {\n\n\tvar time='';\n\n\tvar h = Math.floor(s / 3600);\n\tif (h > 0)\n\t\ts = s - (h * 3600);\n\n\tvar m = Math.floor(s / 60);\n\tif (m > 0)\n\t\ts = s - (m * 60);\n\t\n\tif (h < 10)\n\t\ttime += '0';\n\t\t\n\ttime += h + ':';\n\t\n\tif (m < 10)\n\t\ttime += '0';\n\t\t\n\ttime += m + ':';\n\n\tif (s < 10)\n\t\ttime += '0';\n\t\n\ttime += s;\n\n\treturn time;\n}", "function convertToSeconds(years, days, hours, minutes, seconds) {\n const secondsToSeconds = seconds;\n const minutesToSeconds = minutes * 60;\n const hoursToSeconds = hours * 60 * 60;\n const daysToSeconds = days * 24 * 60 * 60;\n const yearsToSeconds = years * 365 * 24 * 60 * 60; \n return yearsToSeconds + daysToSeconds + hoursToSeconds + minutesToSeconds + secondsToSeconds;\n}", "function convertFBXTimeToSeconds(time) {\n\n return time / 46186158000;\n\n }", "function convertTime(seconds) {\n var time = '';\n var hours;\n var mins;\n var hour = 3600;\n var min = 60;\n if (seconds > hour) {\n hours = Math.floor(seconds / hour);\n time = time.concat(hours.toString() + ' hour ');\n seconds = seconds - hours * hour;\n }\n\n mins = Math.round(seconds / min);\n time = time.concat(mins.toString() + ' min');\n\n return time;\n}", "function SecondsToClockTime(s) {\n s = s % 86400\n\n let hours = Math.floor(s / 3600)\n let minutes = Math.floor((s % 3600) / 60)\n\n if (minutes < 10) {\n minutes = \"0\" + minutes;\n }\n\n if (hours < 1) {\n hours = 12\n }\n\n if (hours > 12) {\n hours = hours - 12;\n return hours + \":\" + minutes + \" p.m.\"\n } else {\n return hours + \":\" + minutes + \" a.m.\"\n }\n}", "secondsToTime(secs){\n let hours = Math.floor(secs / (60 * 60));\n\n let divisor_for_minutes = secs % (60 * 60);\n let minutes = Math.floor(divisor_for_minutes / 60);\n\n let divisor_for_seconds = divisor_for_minutes % 60;\n let seconds = Math.ceil(divisor_for_seconds);\n\n let obj = {\n \"h\": hours,\n \"m\": minutes,\n \"s\": seconds\n };\n return obj;\n }", "function timeConverter(UNIX_timestamp){\n var a = new Date(UNIX_timestamp * 1000);\n var months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];\n var year = a.getFullYear();\n var month = months[a.getMonth()];\n var date = a.getDate();\n var hour = a.getHours();\n var min = a.getMinutes();\n var sec = a.getSeconds();\n var time = date+' '+month+' '+year+' '+hour+':'+min+':'+sec ;\n return time;\n }", "ss (date) {\n return pad(date.getSeconds())\n }", "function ts() { return m().format(\"HH:mm:ss.SSS\") }", "s (date) {\n return date.getSeconds()\n }", "function toSeconds(newTime) {\n let bits = newTime.split(':');\n bits = (Number(bits[0])*60) + Number(bits[1]);\n return bits;\n}", "function convertTotalSeconds(ts)\r\n{\r\n var sec = (ts % 60);\r\n\r\n ts -= sec;\r\n var tmp = (ts % 3600); //# of seconds in the total # of minutes\r\n ts -= tmp; //# of seconds in the total # of hours\r\n\r\n // convert seconds to conform to CMITimespan type (e.g. SS.00)\r\n sec = Math.round(sec*100)/100;\r\n \r\n var strSec = new String(sec);\r\n var strWholeSec = strSec;\r\n var strFractionSec = \"\";\r\n\r\n if (strSec.indexOf(\".\") !== -1)\r\n {\r\n strWholeSec = strSec.substring(0, strSec.indexOf(\".\"));\r\n strFractionSec = strSec.substring(strSec.indexOf(\".\")+1, strSec.length);\r\n }\r\n \r\n if (strWholeSec.length < 2)\r\n {\r\n strWholeSec = \"0\" + strWholeSec;\r\n }\r\n strSec = strWholeSec;\r\n \r\n if (strFractionSec.length)\r\n {\r\n strSec = strSec+ \".\" + strFractionSec;\r\n }\r\n\r\n\r\n if ((ts % 3600) !== 0 )\r\n var hour = 0;\r\n else var hour = (ts / 3600);\r\n if ( (tmp % 60) !== 0 )\r\n var min = 0;\r\n else var min = (tmp / 60);\r\n\r\n if ((new String(hour)).length < 2)\r\n hour = \"0\"+hour;\r\n if ((new String(min)).length < 2)\r\n min = \"0\"+min;\r\n\r\n var rtnVal = hour+\":\"+min+\":\"+strSec;\r\n\r\n return rtnVal;\r\n}", "function formatSeconds(seconds) {\n \n const minutes = Math.floor(seconds / 60);\n\n const rest = seconds % 60;\n\n return [minutes, rest];\n\n}", "function getUniversalTime(seconds) {\t\n\tsecondsString = seconds.toString();\n\treturn parseInt(secondsString + '000');\n}", "function toDecimalSeconds(srtTime) {\n\tvar split = srtTime.match(/\\d{2}/g);\n\t// hours, minutes, seconds -- ignore milliseconds\n\treturn split[0] * 3600 + split[1] * 60 + split[2] * 1; // must convert from string\n}", "function convertTS(ts){\n // Create a new JavaScript Date object based on the timestamp\n // multiplied by 1000 so that the argument is in milliseconds, not seconds.\n let dbdate = new Date(ts*1000);\n let tzOffset=dbdate.getTimezoneOffset();\n let date=new Date(ts*1000+tzOffset*60*1000);\n let day = \"\" +date.getDate();\n let month = \"\"+(date.getMonth()+1);\n// let year = \"\"+date.getFullYear();\n // Hours part from the timestamp\n let hours = date.getHours();\n // Minutes part from the timestamp\n let minutes = \"0\" + date.getMinutes();\n // Seconds part from the timestamp\n// let seconds = \"0\" + date.getSeconds();\n\n // Will display time in 10:30:23 format\n// return day +\"/\" + month + \"/\"+year+ \" \"+ hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2);\n return day +\"/\" + month + \" \"+ hours + \"h\" + ':' + minutes.substr(-2) ;\n// return date.toLocaleString();\n}", "function convertTime(totalSeconds){\r\n\tvar hours = parseInt(totalSeconds /3600)\r\n\tvar minutes = parseInt((totalSeconds % 3600) /60) \r\n\tvar seconds = parseInt((totalSeconds %3600 ) % 60)\r\n\treturn [hours, minutes, seconds]\r\n}", "function toTimeString(seconds) {\n return (new Date(seconds * 1000)).toUTCString().match(/(\\d\\d:\\d\\d:\\d\\d)/)[0];\n}", "function getSecondsFromEpoch() {\n return Math.floor(new Date().getTime() / 1000);\n}", "function FormatSeconds(s, backup) {\n if (s < 0) {\n return \"Now\"\n } else if (s < 45) {\n return \"<1 min\"\n } else if (s < 3600) {\n // Round seconds such that 90 seconds returns 1 min, 91-150 returns 2 min, ...\n return ((Math.floor((s + 29.5) / 60)).toString() + \" min\")\n } else {\n return SecondsToClockTime(backup)\n }\n}", "function timeStampConvert(time){\n let date = new Date(time*1000);\n let hours = date.getHours();\n let mins = \"0\"+date.getMinutes();\n return hours+\":\"+mins.substr(-2);\n}", "function timeSeconds() {\n return timeMS() / 1000;\n}", "secondsToTime(secs){\n let hours = Math.floor(secs / (60 * 60)); // Seconds divided by 3600\n\n let divisor_for_minutes = secs % (60 * 60); // Get the remainder of mins after hours\n let minutes = Math.floor(divisor_for_minutes / 60); // Remaining seconds divided by 60\n\n let divisor_for_seconds = divisor_for_minutes % 60; // Get the remainder of secs after minutes\n let seconds = Math.ceil(divisor_for_seconds); // Remaining seconds \n\n let obj = {\n \"h\": hours,\n \"m\": minutes,\n \"s\": seconds\n };\n return obj; \n }", "generateTimestamp() {\n var time = new Date().getTime()/1000\n var time_round = parseInt(time)\n return time_round\n }", "convertToSeconds(millis) {\n const seconds = Math.floor((millis / 1000));\n return seconds;\n }", "function getCurrentTimeInSec () {\n return moment().unix(Number)\n}", "function format_as_time(seconds) {\n var minutes = parseInt(seconds / 60);\n var seconds = seconds - (minutes * 60);\n\n if (minutes < 10) {\n minutes = \"0\" + minutes;\n }\n\n if (seconds < 10) {\n seconds = \"0\" + seconds;\n }\n\n var return_var = minutes + ':' + seconds;\n\n return return_var;\n}", "function fromTimestamp(rpepoch) {\n if (rpepoch instanceof Date) {\n rpepoch = rpepoch.getTime();\n }\n\n return Math.round(rpepoch / 1000) - 0x386D4380;\n}", "function fromTimestamp(rpepoch) {\n if (rpepoch instanceof Date) {\n rpepoch = rpepoch.getTime();\n }\n\n return Math.round(rpepoch / 1000) - 0x386D4380;\n}", "function toSeconds(s) {\n var p = s.split(':');\n return parseInt(p[0], 10) * 60 + parseInt(p[1], 10);\n }", "function timeConverter(UNIX_timestamp){\n var a = new Date(UNIX_timestamp*1000);\n var months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];\n var year = a.getFullYear();\n var month = months[a.getMonth()];\n var date = a.getDate();\n var hour = a.getHours();\n var min = a.getMinutes();\n var sec = a.getSeconds();\n var time = date + ' ' + month + ' ' + year + ' ' + hour + ':' + min + ':' + sec ;\n return time;\n}", "function timeConverter(UNIX_timestamp){\n\n var a = new Date(UNIX_timestamp * 1000);\n var months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];\n var year = a.getFullYear();\n var month = months[a.getMonth()];\n var date = a.getDate();\n var hour = a.getHours();\n var min = a.getMinutes();\n var sec = a.getSeconds();\n var time = date + ' ' + month + ' ' + year + ' ' + hour + ':' + min + ':' + sec ;\n return time;\n}", "secondsToTime(secs) {\n let hours, minutes, seconds;\n hours = Math.floor(secs / (60 * 60));\n\n let devisor_for_minutes = secs % (60 * 60);\n minutes = Math.floor(devisor_for_minutes / 60);\n\n seconds = Math.ceil(devisor_for_minutes % 60);\n \n let obj = {\n 'h': hours,\n 'm': minutes,\n 's': seconds,\n }\n return obj;\n }", "function timeToSeconds(time) {\n\n var timeParts = time.split(':').map(function (num) {\n return parseInt(num);\n });\n return timeParts[0] * 3600 + timeParts[1] * 60 + timeParts[2];\n}", "function formatTime(seconds) {\n return new Date(seconds * 1000).toISOString().substring(11, 8);\n}", "function secondsTimeSpanToMS(s) {\n var m = Math.floor(s / 60); //Get remaining minutes\n s -= m * 60;\n s = Math.floor(s);\n return (m < 10 ? '0' + m : m) + \":\" + (s < 10 ? '0' + s : s); //zero padding on minutes and seconds\n} // End secondsTimeSpanToMS", "function convertToFormat(seconds) {\n var hour = Math.floor(seconds/3600);\n var minute = Math.floor((seconds - (hour*3600))/60);\n var second = seconds - (hour*3600) - (minute*60);\n let result = \"\" + addZero(hour) + \":\" + addZero(minute) + \":\" + addZero(second)\n return result;\n}", "function toHHMMSS(seconds) {\n var sec_num = parseInt(seconds, 10);\n var hours = Math.floor(sec_num / 3600);\n var minutes = Math.floor((sec_num - (hours * 3600)) / 60);\n\n if (hours < 10) {hours = \"0\" + hours;}\n if (minutes < 10) {minutes = \"0\" + minutes;}\n return hours + ':' + minutes;\n }", "function timeConverter(UNIX_timestamp){\n var a = new Date(UNIX_timestamp * 1000);\n var year = a.getFullYear();\n var month = a.getMonth() + 1;\n var date = a.getDate();\n var hour = a.getHours();\n var min = (a.getMinutes() < 10 ? '0' : '') + a.getMinutes();\n var time = month + '/' + date + '/' + year + ' ' + hour + ':' + min;\n return time;\n}", "secondsToHms(seconds) {\n\t\treturn new Date(seconds * 1000).toISOString().substr(11, 8);\n\t}", "function parseTimeStampToSeconds(timestampString) {\n\tlet timestamp = 0;\n\n\t// Try and account for weird subs that might be missing hours or milliseconds\n\tlet secondsAndMs = timestampString.split(',');\n\tif(secondsAndMs.length > 2) {\n\t\tthrow new Error(`Timestamp ${timestampString} has too many commas`);\n\t}\n\tif(secondsAndMs.length === 2) {\n\t\tlet ms = parseIntOrError(secondsAndMs[1]);\n\t\ttimestamp += ms / 1000;\n\t}\n\n\t// From the end add seconds * 1, minutes * 60, hours * 60 * 60...\n\tlet timeComponents = secondsAndMs[0].split(':');\n\tsecondsMultiplier = 1;\n\tfor(let i = timeComponents.length - 1; i >= 0; --i) {\n\t\tlet timeComponent = parseIntOrError(timeComponents[i]);\n\t\ttimestamp += timeComponent * secondsMultiplier;\n\t\tsecondsMultiplier *= 60;\n\t}\n\n\treturn timestamp;\n}", "function convertTimestamp(requestTimestamp) {\n\tlet ts = new Date(requestTimestamp);\n\tlet year = ts.getYear() + 1900;\n\tlet mon = ts.getMonth() + 1;\n\tlet day = ts.getUTCDate();\n\tlet h = ts.getHours();\n\tlet m = ts.getMinutes();\n\tlet s = ts.getSeconds();\n\tlet ms = ts.getMilliseconds();\n\n\tif (mon < 10) {\n\t\tmon = '0' + mon\n\t}\n\n\tif (day < 10) {\n\t\tday = '0' + day\n\t}\n\n\tif (h < 10) {\n\t\th = '0' + h\n\t}\n\n\tif (m < 10) {\n\t\tm = '0' + m\n\t}\n\n\tif (s < 10) {\n\t\ts = '0' + s\n\t}\n\n\treturn (`${year}-${mon}-${day} ${h}:${m}:${s}.${ms}`);\n}", "function convertTime(trueSeconds) {\n var hours = 0;\n var minutes = 0;\n var seconds = 0;\n while (trueSeconds >= 3600) {\n hours += 1;\n trueSeconds -= 3600;\n }\n while (trueSeconds >= 60) {\n minutes += 1;\n trueSeconds -= 60;\n }\n\n seconds = trueSeconds;\n\n if (hours < 10) {\n hours = \"0\" + hours;\n }\n if (minutes < 10) {\n minutes = \"0\" + minutes;\n }\n if (seconds < 10) {\n seconds = \"0\" + seconds;\n }\n\n var formattedTime = hours + \":\" + minutes + \":\" + seconds;\n return formattedTime;\n}", "function timeConverter(UNIX_timestamp){\n let a = new Date(UNIX_timestamp * 1000);\n let year = a.getFullYear();\n let month = a.getMonth()+1;\n let date = a.getDate();\n //this changes the time stamp to a date form at (MM/DD/YYYY)\n let time = \"(\" + month + '/' + date+ '/' + year + \")\";\n //returns a formatted string of the time stamp\n return time;\n }", "function fetchTimeWithSeconds() {\n let time = new Date();\n return time.toLocaleString(\"en-PK\", {\n hour: \"numeric\",\n minute: \"numeric\",\n second: \"numeric\",\n hour12: true,\n });\n}", "function timeConverter(UNIX_timestamp){\n var a = new Date(UNIX_timestamp*1000);\n var months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];\n var year = a.getFullYear();\n var month = months[a.getMonth()];\n var date = a.getDate();\n var hour = a.getHours();\n var min = a.getMinutes();\n var sec = a.getSeconds();\n var time = month + \" \" + date + \", \" + year + \" \" + hour + \":\" + min + \":\" + sec;\n return time;\n }", "function convUnix(t) {\n var date = new Date(parseInt(t) * 1000);\n return date;\n}", "function formatTimestamp(timestamp) {\n var hours = Math.floor(timestamp / 3600);\n var minutes = Math.floor((timestamp - (hours * 3600)) / 60);\n var seconds = timestamp % 60;\n\n var formattedTimestamp = (seconds < 10 ? '0' : '') + seconds + 's';\n if (minutes > 0) {\n formattedTimestamp = (minutes < 10 ? '0' : '') + minutes + 'm' + formattedTimestamp;\n }\n if (hours > 0) {\n formattedTimestamp = hours + 'h' + formattedTimestamp;\n }\n\n return formattedTimestamp;\n }", "function timeConverter(UNIX_timestamp) {\n var a = new Date(UNIX_timestamp * 1000);\n var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n var year = a.getFullYear();\n var month = months[a.getMonth()];\n var date = a.getDate();\n var hour = a.getHours();\n var min = a.getMinutes();\n var sec = a.getSeconds();\n var time = date + ' ' + month + ' ' + year + ' ' + hour + ':' + min + ':' + sec;\n return time;\n }", "function intToTime(totalSeconds) { \n secs = totalSeconds % 60;\n totalMinutes = (totalSeconds - secs) / 60;\n mins = totalMinutes % 60;\n if (totalMinutes < 60) {\n\treturn addZero(mins) + \":\" + addZero(secs);\n }\n hours = (totalMinutes - mins) / 60;\n return hours + \":\" + addZero(mins) + \":\" + addZero(secs);\n}", "function convert(minutes) {\n var seconds = minutes * 60; \n return seconds\n}", "function FBXTimeToSeconds( adskTime ) {\n\n\t\treturn adskTime / 46186158000;\n\n\t}", "function secondsToString(seconds) {\n let secs = Math.abs(seconds);\n let numdays = Math.floor(secs / 86400);\n let numhours = Math.floor((secs % 86400) / 3600);\n let numminutes = Math.floor(((secs % 86400) % 3600) / 60);\n\n if (numdays > 0) {\n return numdays + ' days'\n } else {\n return numhours + ' hours ' + numminutes + ' minutes '\n };\n\n}", "function convertTimer(timer) {\n console.log(timer);\n minutes = parseInt(timer / 60, 10);\n seconds = parseInt(timer % 60, 10);\n\n minutes = minutes < 10 ? \"0\" + minutes : minutes;\n seconds = seconds < 10 ? \"0\" + seconds : seconds;\n return `${minutes}:${seconds}`;\n}", "function formatSeconds(secs){\n let hours = Math.floor(secs/3600);\n let minutes = Math.floor((secs - (hours * 3600)) / 60);\n let seconds = Math.floor(secs - (hours * 3600) - (minutes * 60));\n\n if(hours < 10) hours = \"0\" + hours;\n if(minutes < 10) minutes = \"0\" + minutes;\n if(seconds < 10) seconds = \"0\" + seconds;\n\n return hours + \":\" + minutes + \":\" + seconds;\n}", "function format_time(seconds) {\n var miliseconds = seconds * 1000;\n if(seconds > 60) {\n return new Date(miliseconds).getMinutes() + \" minutes and \" +\n new Date(miliseconds).getSeconds() + \" seconds\";\n } else {\n return new Date(miliseconds).getSeconds() + \" seconds\";\n }\n}", "function timeToSeconds(time) {\r\n\tif (time.indexOf(\":\") < 0) return 'NaN';\r\n\ttimearray = time.split(\":\");\r\n\treturn (timearray[0]*3600) + (timearray[1]*60) + (timearray[2] == undefined ? 0 : timearray[2]*1);\r\n}", "function convert(s) {\n\n let minutes = Math.floor(s/60)\n\n let seconds = s % 60\n\n // nf stands for number format\n return nf(minutes, 2) + \":\" + nf(seconds, 2);\n }", "function getSeconds(value) {\n return Math.floor(value / 1000000000);\n}", "function get_seconds(date) {\r\n if(date.getSeconds() < 10){\r\n seconds = \"0\" + date.getSeconds();\r\n return seconds;\r\n } else { \r\n seconds = date.getSeconds();\r\n return seconds; \r\n }\r\n}", "function get_timedelta(ts) {\n return new Date((ts * 1000) - Date.now());\n }", "function HMSToSeconds(s) {\r\n var b = s.split(':');\r\n return b[0]*3600 + b[1]*60 + (+b[2] || 0);\r\n}", "function toSeconds(hms){\n var sec = 0, min = 1,\n time = hms.toString().split(\":\");\n\n while (time.length > 0){\n sec += min * parseInt( time.pop(), 10);\n min *= 60;\n }\n\n return sec;\n }" ]
[ "0.715168", "0.68927556", "0.6877629", "0.67854875", "0.67162895", "0.66123414", "0.6534647", "0.6526031", "0.6502934", "0.64877874", "0.64877224", "0.64826053", "0.6470913", "0.6463964", "0.6463907", "0.64384633", "0.6431163", "0.6414423", "0.638436", "0.6361405", "0.63356894", "0.6330552", "0.63297886", "0.63229287", "0.63229287", "0.63224167", "0.6321623", "0.63210255", "0.6313214", "0.6313005", "0.63107973", "0.6301524", "0.62927246", "0.62873393", "0.6280924", "0.6268089", "0.6260716", "0.62469554", "0.62123346", "0.62069273", "0.61908954", "0.6187205", "0.6187126", "0.61750644", "0.6173112", "0.6167809", "0.6161927", "0.61591524", "0.6158477", "0.61569434", "0.6155535", "0.6151583", "0.6141008", "0.6128378", "0.6127439", "0.6117898", "0.6108994", "0.6101062", "0.6098537", "0.6097162", "0.6093175", "0.6084327", "0.607654", "0.60679394", "0.60628897", "0.60628897", "0.6059495", "0.605929", "0.6047475", "0.6043765", "0.6036305", "0.6033806", "0.6029042", "0.6028757", "0.6021425", "0.60192794", "0.6014207", "0.60029876", "0.6000686", "0.5999692", "0.5997732", "0.59940183", "0.59847456", "0.5983943", "0.5956427", "0.5948444", "0.59412986", "0.59350985", "0.59330493", "0.59306043", "0.591575", "0.59113634", "0.5906573", "0.5899813", "0.58997995", "0.58992", "0.5896022", "0.5888654", "0.58770597", "0.58751464" ]
0.59423167
86
increases the ad pointer or sets it to null if there are no more ads
function _gotoNextAd() { nextAd++; if(nextAd >= player.clip.ads.length) { nextAd = null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AdsRefresh() {\n var detect_device = get_device();\n if (detect_device == 'desktop') {\n if (jQuery(\".node-type-recipe\").length > 0) {\n // Adding the adslot for desktop & mobile.\n if (jQuery('div#ad-multi_ad_leaderboard').length > 0) {\n var scrollTopPosition, bottomOfElement, outerHeight;\n scrollTopPosition = Math.round(jQuery(window).scrollTop());\n outerHeight = Math.round(jQuery('#ad-multi_ad_leaderboard').outerHeight(true)) / 2;\n bottomOfElement = Math.round(jQuery('#ad-multi_ad_leaderboard').offset().top + outerHeight);\n // Check if ad is in view port.\n if (scrollTopPosition < bottomOfElement) {\n time_dfp.refresh(\"ad-multi_ad_leaderboard\");\n }\n }\n }else{\n if (jQuery('div#ad-multi_ad_leaderboard').length > 0) {\n time_dfp.refresh(\"ad-multi_ad_leaderboard\");\n }\n }\n }\n if (detect_device == 'phone') {\n if (jQuery('div#ad-mobile_ad_leaderboard').length > 0) {\n time_dfp.refresh(\"ad-mobile_ad_leaderboard\");\n }\n }\n}", "function buildAds(){\n\t jQuery(\".gallery-ad\").attr(\"id\",\"GalleryAd\");\n\t\t jQuery(\".gallery-ad img\").hide();\n\t overlayAd(\"GalleryAd\", __GEEK.currentAds[1].adUnit, __GEEK.currentAds[1].adZdid);\n\t\t refreshAd();\n}", "function nextArticleQueue(){\n console.log(\"length:\"+ db.db.length);\n console.log(\"current article: \" + db.currentArticle);\n if(db.currentArticle + 1 < db.db.length){\n db.currentArticle = db.currentArticle + 1;\n }else{\n db.currentArticle = 0;\n }\n}", "function adLoader(currentAd){\n clearNode(\"ad\");\n toggleView(\"ad\");\n currentAdViewed = currentAd;\n\n // gets the ad view\n let wrapper = document.getElementById(\"ad\");\n\n // creates the image view for the ad\n let imageSrc = currentAd.images[0].src;\n let img = new Image();\n img.src = imageSrc;\n img.id = \"00195364\"\n wrapper.appendChild(img);\n currentImageViewed = 0;\n\n // creates buttons to see other images in an add\n let backButton = document.createElement(\"button\");\n let forwardButton = document.createElement(\"button\");\n backButton.id = \"backButton\";\n backButton.innerHTML = \"<\";\n forwardButton.id = \"forwardButton\";\n forwardButton.innerHTML = \">\";\n backButton.onclick = () => slideImage(-1);\n forwardButton.onclick = () => slideImage(1);\n wrapper.appendChild(backButton);\n wrapper.appendChild(forwardButton);\n\n // creates the title for the ad\n let title = document.createElement(\"h1\");\n title.innerHTML = currentAd.title;\n wrapper.appendChild(title);\n\n // creates the price for the ad\n let price = document.createElement(\"p\");\n price.innerHTML = currentAd.price + \",-\";\n wrapper.appendChild(price);\n\n // creates the description for the ad\n let description = document.createElement(\"p\");\n description.innerHTML = currentAd.description;\n wrapper.appendChild(description);\n\n // creates the buy button for the ad\n let buyButton = document.createElement(\"button\");\n buyButton.innerHTML = \"BUY\";\n buyButton.onclick = () => console.log(\"buy\");\n wrapper.appendChild(buyButton);\n\n // creates the seller information on the ad\n let seller = document.createElement(\"p\");\n seller.innerHTML =\n \"Seller: \" + currentAd.user.firstname + \" \" + currentAd.user.lastname + \" <br/> \" +\n \"Adress: \" + currentAd.user.streetAdress + \", \" + currentAd.user.postalCode + \" \" + currentAd.user.city + \"<br/>\" +\n \"Contact: \" + currentAd.user.emailAdress;\n wrapper.appendChild(seller);\n}", "function incrementPointer() {\n\t\t\tpointerAddress += 1;\n\t\t\tif(pointerAddress >= ram.length) {\n\t\t\t\tpointerAddress = 0;\n\t\t\t} \n\t\t}", "function loadAd(slideNum){ \n\n if(!setSlotListenerSet){\n googletag.cmd.push(function() {\n googletag.pubads().addEventListener('slotRenderEnded', function(event) {\n var targetingPos = String(event.slot.getTargeting(\"pos\"));\n\n if(targetingPos.indexOf(\"carousel_slide_0\") > -1){\n if(event.isEmpty && (event.slot.getTargeting(\"pos\") == \"carousel_slide_0\"+slideNum)){\n $(\"#slide\"+slideNum).addClass( \"blankNbaFlexContent\" );\n $(\"#slide\"+slideNum).removeClass( \"nbaFlexContent\" );\n blankAdCnt+=1;\n } \n else{ \n adsRenderedCnt+=1;\n if(adsRenderedCnt == 2){\n initCarousel(slideNum);\n }\n else if(adsRenderedCnt > 2){\n loadSlides(adsRenderedCnt, blankAdCnt,slideNum);\n }\n }\n if((adsRenderedCnt+blankAdCnt) < 6){\n var nextSlideNum = slideNum+1;\n if(nextSlideNum==6){\n nextSlideNum = 1;\n }\n slideNum = nextSlideNum;\n setTimeout(function(){renderAd(nextSlideNum)},3000); //3000\n }\n else{\n finalizeCarousel();\n } \n } //targetingPos.indexOf if condition\n }); //googletag.pubads().addEventListener\n }); // googletag.cmd.push function\n } // setSlotListenerSet if condition\n setSlotListenerSet = true;\n}", "function advert(adRefNum, adName, adCampaign, adURL, adWidth, adHeight, adWeight)\n{\n}", "function clearTargeting() {\n\n googletag.pubads().clearTargeting();\n\n }", "function adsLoader(){\n \n if (token !== ''){\n document.getElementById(\"newAd\").style.display = \"block\";\n console.log(\"display: block\");\n } else {\n document.getElementById(\"newAd\").style.display = \"none\";\n console.log(\"display: none\");\n }\n \n // gets the ads wrapper\n let wrapper = document.getElementById(\"ads\");\n\n // chekcs if another ad has been added\n if (adsPrinted != ads.length){\n\n // only loops through unprinted ads\n for(let i = ads.length-1; i >= adsPrinted; i--){\n // initialises an ads \"box\"\n let box = document.createElement(\"div\");\n box.id = i.toString();\n box.className = \"box\";\n box.onclick = () => adLoader(ads[i]);\n\n // initialise an ads content\n let img = ads[i].images[0];\n box.appendChild(img);\n\n let title = document.createElement(\"h1\");\n title.innerHTML = ads[i].title;\n box.appendChild(title);\n\n let price = document.createElement(\"p\");\n price.innerHTML = ads[i].price + \",-\";\n box.appendChild(price);\n\n let description = document.createElement(\"p\");\n description.innerHTML = ads[i].description;\n box.appendChild(description);\n\n // inserts the ads on top (we want newest ads first)\n wrapper.insertBefore(box, wrapper.childNodes[0]);\n }\n\n adsPrinted = ads.length;\n }\n\n}", "createNextPage_() {\n const position = this.adPositions_[this.pagesCreated_];\n const adPage = this.pageManager_.createAdPage();\n adPage.registerLoadCallback(() => {\n // TODO(ccordry): we could maybe try again if insertion fails.\n this.pageManager_.maybeInsertPageAfter(\n this.storyPageIds_[position - 1],\n adPage\n );\n });\n this.pagesCreated_++;\n return adPage;\n }", "function __AdRemoveCount() {\n if (__AdRNum!=0){\n __AdRNum-=1\n $('.rAdNum').text(__AdRNum);\n } else {\n $('.__r-Ad-1').css('display', 'none');\n $('.__r-Ad-2').css('display', 'inherit');\n $('._removeAd').attr('onclick', '__sGame()');\n $('._removeAd').attr('disabled', false);\n return false;\n }\n window.setTimeout(function(){ __AdRemoveCount() }, 1000);\n }", "function getAd()\n{\n}", "function adsRemovalReference() {\r\n if (!GM_config.get('remove_ads')) {\r\n return;\r\n }\r\n if (Boolean($('.aux-content-widget-2').first().text().match(\"IMDb Answers\"))) {\r\n $('.aux-content-widget-2').first().remove();\r\n }\r\n $('.cornerstone_slot').remove();\r\n $('.imdb-footer').remove();\r\n $('#social-share-widget').remove();\r\n $('.navbar__imdbpro').remove();\r\n $('[class^=Root__Separator]').remove();\r\n // To remove ad's background image\r\n $('#wrapper').attr('style', 'background: 000000 !important');\r\n}", "function clearNextId(){\n NextId = undefined;\n}", "dequeueDog() {\n let adopted = this.DHead;\n if (adopted.acNext != null) {\n adopted.acNext.acPRev = adopted.acPRev;\n }\n if (this.ACHead === adopted) {\n this.ACHead = adopted.acPRev;\n }\n if (this.DHead.prev != null) {\n this.DHead = this.DHead.prev;\n this.DHead.next = null;\n } else {\n this.DHead = null;\n this.DTail = null;\n }\n }", "refill () {\n this.ink++;\n }", "function decrementPointer() {\n\t\t\tpointerAddress -= 1;\n\t\t\tif(pointerAddress < 0) {\n\t\t\t\tpointerAddress = ram.length - 1;\n\t\t\t}\n\t\t}", "addNoMore() { this.noMore.value++; this.updateHitStat(this.noMore); }", "function dtkRefreshBanner() {\n try {\n // Revive\n var removeTarget = document.getElementsByClassName(\"dtkRefreshBanner\");\n if (removeTarget.length > 0) {\n for(var targs = 0; targs < removeTarget.length; targs++) { // For each element\n var removeLoaded = removeTarget[targs];\n removeLoaded.removeAttribute(\"data-revive-loaded\");\n }\n\n if (window.reviveAsync) {\n window.reviveAsync[id_revive].refresh();\n }\n }\n\n // dfp\n if (slot_dfp_remove.length > 0) {\n googletag.cmd.push(function() {\n googletag.pubads().refresh(slot_dfp_remove);\n });\n }\n } catch(err) {\n console.log(err.name);\n console.log(err.message);\n }\n\n}", "addAD() {\n if(!this.gameOver){\n let AD = new AD_PowerUp(this, this.game.config.width, Phaser.Math.Between(105, 300), 'AD').setOrigin(0, 0).setScale(1.5);\n this.adGroup.add(AD); // add it to existing group\n }\n }", "function counterUpOne(){\n\t\t\t_scrollPrevLimit = _scrollNextLimit;\n\t\t\t_scrollCounter++;\n\t\t\t_scrollNextLimit = _scrollCounter === _scrollCounterMax ? 100000 : $('.article[data-id=\"' + _scrollCounter + '\"]').offset().top;\n}", "_add(_elem) {\n let _id;\n if (this._freeElemIds.length !== 0) {\n _id = this._freeElemIds.shift();\n }\n else {\n _id = this._nextElemId;\n this._nextElemId += 1;\n }\n this._elements[_id] = _elem;\n return _id;\n }", "_add(_elem) {\n let _id;\n if (this._freeElemIds.length !== 0) {\n _id = this._freeElemIds.shift();\n }\n else {\n _id = this._nextElemId;\n this._nextElemId += 1;\n }\n this._elements[_id] = _elem;\n return _id;\n }", "next() {\n if (this.cache.get(this.id) !== null) {\n this.id++;\n }\n }", "function appendAdBlock(dom, ads) {\n var html = '';\n html += '<div class=\"ad-block\"><ul>';\n for (var i = 0; i < ads.length; i++) {\n // 超时\n if (new Date(ads[i][3]) >= new Date()) {\n html += '<li><a href=\"' + ads[i][1] + '\" target=\"_blank\" class=\"' + (ads[i][2] ? 'red': '') + '\">' + ads[i][0] + '</a></li>'; \n }\n }\n html += '</ul></div>';\n dom.innerHTML = html;\n}", "function increaseCurrentEntryID() {\n\t\tcurrentIndex++;\n\t\tif (currentIndex > indexes.length-1) {\n\t\t\tcurrentIndex = 0;\n\t\t}\n\t\tcurrentEntryID = indexes[currentIndex];\n\t\tif (!indexes[currentIndex + Math.floor(visibleSlides/2)] && currentIndex < (indexes.length-1)) {\n\t\t\tif (!allEntriesLoaded) {\n\t\t\t\tvar index = currentIndex + Math.floor(visibleSlides/2)-1;\n\t\t\t\tloadEntries(indexes[indexes.length-1], visibleSlides, false);\n\t\t\t}\n\t\t}\n\t}", "function placeAdElement()\r\n{\r\n var onmap = false;\r\n var ad =document.getElementById('adunit');\r\n if(ad) // Adsense\r\n {\r\n if(FLD.adsenseBlocked()) // replace it with the donate button.\r\n {\r\n ad.innerHTML='';\r\n var donate =document.getElementById('donate');\r\n ad = donate;\r\n onmap = true;\r\n }\r\n else\r\n {\r\n // Add a strut to support the table height in \"narrow\" CSS mode.\r\n var strut = document.createElement('div');\r\n strut.className = 'narrow';\r\n strut.style.width = '0';\r\n strut.style.height = '' + ad.clientHeight + 'px';\r\n strut.innerHTML = '&nbsp;';\r\n ad.parentNode.appendChild(strut);\r\n }\r\n }\r\n else\r\n {\r\n ad = document.getElementById('partner');\r\n onmap = true;\r\n }\r\n if(onmap)\r\n {\r\n var adcontainer = document.createElement('div');\r\n adcontainer.style.margin = '7px';\r\n adcontainer.appendChild(ad);\r\n FLD.map.controls[google.maps.ControlPosition.TOP_CENTER].push(adcontainer);\r\n }\r\n ad.style.display='block';\r\n}", "function resetElementPointer() {\n cardOneElement = null;\n cardTwoElement = null;\n // enable clicks on the deck of cards\n enableClick(deck)\n}", "function Ad() {\r\n\twindow.setInterval(\"updateAd()\", 60000);\r\n}", "function rotate() {\r\n\tthisAd++;\r\n\tif (thisAd == adImages.length) {\r\n\t\tthisAd = 0;\r\n\t}\r\n\tdocument.getElementById(\"adBanner\").src = adImages[thisAd];\r\n\r\n\tsetTimeout(\"rotate()\", 6 * 1000);\r\n}", "allocate(size) {\n if (this.head + size > this.memory.length) {\n return null;\n }\n\n let start = this.head;\n\n this.head += size;\n return start;\n }", "function _playNextAd(position)\n\t\t{\n\t\t\tif(nextAd != null && player.clip.ads[nextAd].position == position)\n\t\t\t{\n\t\t\t\t_log('_playNextAd(' + position + ')', nextAd, player.clip.ads[nextAd].position);\n\t\t\t\tplayer.ad = player.clip.ads[nextAd];\n\t\t\t\t_changeSrc(player.ad.src);\n\t\t\t\tdiv_info_ad_timeleft.show();\n\t\t\t\tthat.addClass('is-playing-ad');\n\t\t\t\t\n\t\t\t\t_gotoNextAd();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\treturn false;\n\t\t}", "function VastAd(node){\n\t\tvar me = this;\n\t\t// required elements - section 2.2.4.1\n\t\tthis.id = node.getAttribute('id');\n\t\tthis.sequence = node.getAttribute('sequence');\n\t\tthis.impressions = [];\n\t\tthis.creatives = [];\n\t\tthis.creative_companions = [];\n\t\t\n\t\t// optional elements - - section 2.2.4.2\n\t\tthis.description = NULL;\n\t\tthis.advertiser = NULL;\n\t\tthis.error = NULL;\n\t\tthis.pricing = NULL;\n\t\tthis.extensions = NULL;\n\t\t\n\t\t\n\t\tfunction parseAd(node){\n\t\t\tvar kid = childElements(node)[0],\n\t\t\t\ttagName = kid.tagName.toUpperCase();\n\t\t\t\n\t\t\tif(tagName == 'WRAPPER'){\n\t\t\t\tme.isWrapper = true;\n\t\t\t\tme.wrapperUrl = 'http://example/org';\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if(tagName == 'INLINE'){\n\t\t\t\tparseInlineAd(kid);\t\t\t\t\n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\t/**\n\t\t* @function\n\t\t* Parsing routine for the INLINE tag element and children\n\t\t*/\n\t\tfunction parseInlineAd(ilnode){\n\t\t\tvar i, m, n, key, kidNode, adSys, url, adname, vnum, sysname;\n\t\t\tvar cr, crar, allcr;\n\t\t\tvar kids = childElements(ilnode);\n\t\t\tme.isWrapper = false;\n\t\t\tme.isInline = true;\n\t\t\t\n\t\t\tfor(i=0; i < kids.length; i++){\n\t\t\t\tkidNode = kids[i];\n\t\t\t\tswitch(kidNode.tagName.toUpperCase()){\n\t\t\t\t\tcase 'ADSYSTEM':\n\t\t\t\t\t\tvnum = kidNode.getAttribute('version');\n\t\t\t\t\t\tsysname = kidNode.innerHTML;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(vnum == null){\n\t\t\t\t\t\t\tvnum = parseFloat(sysname);\n\t\t\t\t\t\t\tif(isNaN(vnum)){\n\t\t\t\t\t\t\t\tvnum = null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tsysname = null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tadSys = {\n\t\t\t\t\t\t\tversion: vnum,\n\t\t\t\t\t\t\tname: sysname\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tme.adSystem = new function(){\n\t\t\t\t\t\t\tthis.version = adSys.version;\n\t\t\t\t\t\t\tthis.name = adSys.sysname;\n\t\t\t\t\t\t\tthis.toString = function(){\n\t\t\t\t\t\t\t\tvar s = (this.name || 'Unknown') + ', version ' + (this.version || '0');\n\t\t\t\t\t\t\t\treturn s;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'ADTITLE':\n\t\t\t\t\t\tadname = nodeText(kidNode);\n\t\t\t\t\t\tme.adName = adname;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'IMPRESSION':\n\t\t\t\t\t\turl = nodeText(kidNode);\n\t\t\t\t\t\tme.impressions.push({id: kidNode.getAttribute('id'), url: url});\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 'CREATIVES':\n\t\t\t\t\t\tallcr = childElements(kidNode);\n\t\t\t\t\t\tfor(m=0; m < allcr.length; m++){\n\t\t\t\t\t\t\tcr = new VastCreative(allcr[m], me);\n\t\t\t\t\t\t\tif(cr.adType == COMPANION_ADS){\n\t\t\t\t\t\t\t\tme.creative_companions.push(cr);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tme.creatives.push(cr);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t// Optional Inline Elements - 2.2.4.2\n\t\t\t\t\tcase 'DESCRIPTION':\n\t\t\t\t\t\tme.description = nodeText(kidNode);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'ADVERTISER':\n\t\t\t\t\t\tme.advertiser = nodeText(kidNode);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 'SURVEY':\n\t\t\t\t\t\tif(me.survey === undefined){\n\t\t\t\t\t\t\tme.survey = [];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// open for interpretation\n\t\t\t\t\t\tme.survey.push({\n\t\t\t\t\t\t\tattributes: {},\n\t\t\t\t\t\t\tcontent: kidNode.innerHTML\n\t\t\t\t\t\t});\n\t\t\t\t\t\tfor(m=0; m < kidNode.attributes; m++){\n\t\t\t\t\t\t\tme.survey.attributes[kidNode.attributes.name] = kidNode.attributes.value;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'PRICING':\n\t\t\t\t\t\tme.pricing = {\n\t\t\t\t\t\t\tmodel : kidNode.getAttribute('model'),\n\t\t\t\t\t\t\tcurrency: kidNode.getAttribute('currency'),\n\t\t\t\t\t\t\tvalue: nodeText(kidNode)\n\t\t\t\t\t\t};\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'EXTENSIONS':\n\t\t\t\t\t\tme.extensions = kidNode.innerHTML;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// TODO - SORT CREATIVES BY Sequence\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\tparseAd(node);\n\t}", "getAds() {\n return new Promise((resolve, reject) => {\n resolve(ads);\n });\n }", "advanceCurrentItem() {\n this.itemCounter++;\n }", "dequeueCat() {\n let adopted = this.CHead;\n if (adopted.acNext != null) {\n adopted.acNext.acPRev = adopted.acPRev;\n }\n if (this.ACHead === adopted) {\n this.ACHead = adopted.acPRev;\n }\n if (this.CHead.prev != null) {\n this.CHead = this.CHead.prev;\n this.CHead.next = null;\n } else {\n this.CHead = null;\n this.CTail = null;\n }\n }", "function displayPageAds() {\n\n // Set additional targeting from Header Bidding\n $.event.trigger( 'AdManager:headerBidding' );\n\n googletag.cmd.push( function () {\n\n var pageSlots = $.grep( definedSlots, function ( slot, index ) {\n\n var slotId = slot.getSlotElementId();\n\n return -1 !== $.inArray( slotId, pagePositions );\n\n } );\n\n $.each( pagePositions, function ( index, slotId ) {\n\n googletag.display( slotId );\n\n } );\n\n googletag.pubads().refresh( pageSlots, { changeCorrelator : false } );\n\n $.event.trigger( 'AdManager:requestSent' );\n\n } );\n\n }", "fixAllAdSlideIds() {\n this.getAdSlides().forEach(function(slide) {\n GalleryAds.fixAdSlideId(slide);\n });\n }", "downloadAds() {\n const adsString = JSON.stringify(this.ads);\n let adUrls = getUrls(adsString);\n adUrls = Array.from(adUrls)\n this.cacheAssets(adUrls);\n }", "increment() {\n this.referenceCount++;\n }", "nextCardinDeck(){\n const mainDeck = Store.getMainDeck(),\n discardDeck = Store.getDiscardDeck(),\n currentCard = mainDeck.cards[ui.findDisplayedCard(mainDeck)];\n if (mainDeck.cards.length > 1){ \n mainDeck.cards.splice(ui.findDisplayedCard(mainDeck), 1);\n discardDeck.cards.unshift(currentCard);\n Store.addDeckToStorage('mainDeck', mainDeck);\n Store.addDeckToStorage('discardDeck', discardDeck);\n ui.dealCard();\n } else {\n ui.UIMessages('No More Cards...', 'red','.message');\n }\n}", "advance() {\n if (this._forceNextFrame) {\n this.playheadPosition = this._forceNextFrame;\n this._forceNextFrame = null;\n } else if (this._playing) {\n this.playheadPosition++;\n\n if (this.playheadPosition > this.length) {\n this.playheadPosition = 1;\n }\n }\n }", "onAdStarted(player) {\n player.removeClass('vjs-ad-loading');\n }", "function getGamerAd () {\n //google publisher tag\n window.googletag = window.googletag || {};\n window.googletag.cmd = window.googletag.cmd || [];\n window.googletag.cmd.push(function () {\n window.googletag.pubads().setTargeting('permutive', 'gaming');\n googletag.enableServices();\n console.log( `3) pubads called with segment data `)// check\n });\n}", "startLinearAdMode() {\n const player = this.player;\n\n if (!player.ads.inAdBreak() && !this.isContentResuming()) {\n player.ads.adType = 'postroll';\n player.clearTimeout(this._postrollTimeout);\n adBreak.start(player);\n } else {\n videojs.log.warn('Unexpected startLinearAdMode invocation (Postroll)');\n }\n }", "anchor() {\n this.__anchors++;\n }", "anchor() {\n this.__anchors++;\n }", "anchor() {\n this.__anchors++;\n }", "anchor() {\n this.__anchors++;\n }", "function _clearNext() {\n clearTimeout(nextCount);\n nextCount = null;\n }", "function startAd() {\n\n adDiv = document.getElementById(\"ad\");\n videoContainer = document.getElementById(\"video-container\");\n video = document.getElementById(\"video\");\n click = document.getElementById(\"click\");\n cta_expand = document.getElementById(\"cta_expand\");\n cta_expand_white_bg = document.getElementById(\"cta_expand_white_bg\"); \n zoneExpandCtaBtn = document.getElementById(\"zoneExpandCtaBtn\"); \n soundButton = document.getElementById(\"mute-btn\");\n addEventListeners();\n if (!isMobile.any())\n {\n if(!clickOnLoader)\n {\n initVideo();\n }\n else\n {\n freeze();\n }\n } \n else\n {\n loader.style.display = \"none\";\n OnComplete();\n }\n\n\n \n \n \n}", "setDefaulltPointer() {\n this.tempPos = this.head;\n }", "function nextSlide(){\n indexTracker++;\n if(indexTracker >= peopleArray.length){\n indexTracker = 0;\n }\n\n updateIndexPoints();\n}", "function incrementPointer() {\t\t\t\n\t\t\tpointerAddress += 1;\n\t\t\tif(pointerAddress >= instructions.length) {\t\t\t\n\t\t\t\twindow.console.log('Brainfuck program finished.');\n\t\t\t\tstatus = STATUSES['STOPPED'];\n\t\t\t}\n\t\t}", "function onAlloc () {\n allocDoneCount++\n }", "next() {\n if (this.index < this.plans.length - 1) {\n this.index++;\n }\n else {\n this.index = 0;\n }\n }", "function RemoveAds()\r\n{\r\n\tdocument.getElementById('AdLeaderboard').style.display = \"none\";\r\n\tdocument.getElementById('AdSkyscraper').style.display = \"none\";\r\n\tdocument.getElementById('internal-ad').style.display = \"none\";\r\n}", "function reattach() {\n parent.insertBefore(node, next);\n }", "_createPlayer() {\n this.adContainer = document.createElement('div');\n this.adContainer.id = this.options.prefix + 'advertisement';\n this.adContainer.style.display = 'none';\n this.adContainer.style.position = 'relative';\n this.adContainer.style.height = '0';\n this.adContainer.style.margin = '0';\n this.adContainer.style.padding = '0';\n this.adContainer.style.opacity = '0';\n this.adContainer.style.overflow = 'hidden';\n this.adContainer.style.backgroundColor = '#000';\n this.adContainer.style.borderRadius = '2px';\n this.adContainer.style.transition = `\n padding ${this.containerTransitionSpeed}ms cubic-bezier(0.55, 0, 0.1, 1),\n opacity ${this.containerTransitionSpeed / 2}ms cubic-bezier(0.55, 0, 0.1, 1)\n `;\n\n // This is the container where the actual ad will be embedded in.\n this.adContainerInner = document.createElement('div');\n this.adContainerInner.id = this.options.prefix + 'advertisement_slot';\n this.adContainerInner.style.position = 'absolute';\n this.adContainerInner.style.top = '0';\n this.adContainerInner.style.right = '0';\n this.adContainerInner.style.bottom = '0';\n this.adContainerInner.style.left = '0';\n this.adContainerInner.style.backgroundColor = '#000';\n this.adContainerInner.style.borderRadius = '2px';\n\n this.adContainer.appendChild(this.adContainerInner);\n this.container.appendChild(this.adContainer);\n }", "function processFrontAd(frontAd, layoutStyle) {\n // console.log('processFrontAd', frontAd, COLLECTED)\n frontAd.className += \" \" + \"ad_collected\";\n const raw_ad = $(frontAd).html();\n let parent_id;\n if (layoutStyle === \"FB5\") {\n parent_id = $(frontAd).attr('aria-labelledby');\n if (!parent_id) { return; }\n COLLECTED.push(parent_id);\n } else {\n parent_id = $(frontAd).attr('id');\n }\n // console.log('!!!!!raw_ad ------ collected', layoutStyle, frontAd)\n // console.log('!!!!!raw_ad ------ parent_id', layoutStyle, parent_id)\n\n // ----- Temporarily collect ads even if rationales are not there ----- //\n const container = $(raw_ad);\n let fbStoryId;\n if (layoutStyle === \"FB5\") {\n fbStoryId = generateRelatedField(parent_id);\n } else {\n fbStoryId = container.attr('id');\n }\n if (!layoutStyle && parent_id.indexOf(\"hyperfeed\") > -1) {\n fbStoryId = parent_id;\n }\n let extVersion = chrome.runtime.getManifest().version;\n\n const finalPayload = { // Queue advert for server\n typeId: 'FBADVERT',\n extVersion,\n payload: [{\n type: 'FBADVERT',\n related: fbStoryId,\n html: container.html()\n }]\n };\n // console.log('OBSERVER-From SEND AD Collect--> extVersion', finalPayload)\n\n const adNew = {};\n adNew.parent_id = parent_id;\n adNew.extVersion = extVersion;\n adNew.fbStoryId = fbStoryId;\n adNew.html = container.html();\n\n chrome.storage.promise.local.get('general_token')\n .then((result) => {\n if (result) {\n\n // Don't send FB5 from here. Store in queue and then send with rationale\n // Send FB4 from here because it has params we need\n if (!layoutStyle) {\n api.addMiddleware(request => {request.options.headers['Authorization'] = result.general_token});\n api.post('log/raw', {json: finalPayload})\n .then((response) => {\n // response completed, no log\n }).catch(err => console.log('log/raw err', err));\n }\n\n // store new ads for linking with rationales\n adNew.token = result.general_token;\n //console.log('COLLECTED_ADS_NEW => new ad pushed', adNew)\n COLLECTED_ADS_NEW.push(adNew);\n }\n }).catch((error) => {\n console.log('general_token err', error);\n });\n //console.log('OBSERVER-From SEND AD Collect--> extVersion', extVersion, fbStoryId)\n\n // return object of processFrontAd function\n var timestamp = (new Date).getTime();\n return {\n raw_ad,\n timestamp,\n parent_id,\n extVersion\n }\n}", "deleteAtBeginning() {\n if (this.head === null) {\n return;\n }\n if (this.head.next === null) {\n this.head === null;\n return;\n }\n this.head = this.head.next;\n this.head.prev = null;\n }", "_next() {\n const attachmentViewer = this.attachmentViewer;\n const index = attachmentViewer.attachments.findIndex(attachment =>\n attachment === attachmentViewer.attachment\n );\n const nextIndex = (index + 1) % attachmentViewer.attachments.length;\n attachmentViewer.update({\n attachment: [['link', attachmentViewer.attachments[nextIndex]]],\n });\n }", "onAdsReady(player) {\n player.ads.debug('Received adsready event (ContentPlayback)');\n\n if (!player.ads.nopreroll_) {\n player.ads.debug('Triggered readyforpreroll event (ContentPlayback)');\n player.trigger('readyforpreroll');\n }\n }", "cancel() {\n // Destroy the adsManager so we can grab new ads after this.\n // If we don't then we're not allowed to call new ads based\n // on google policies, as they interpret this as an accidental\n // video requests. https://developers.google.com/interactive-\n // media-ads/docs/sdks/android/faq#8\n this.adsLoaderPromise = new Promise((resolve, reject) => {\n if (this.adsLoader) this.adsLoader.contentComplete();\n if (this.adsManager) this.adsManager.destroy();\n\n // Hide the advertisement.\n this._hide();\n\n // Reset styles.\n this.floatReset();\n\n // Send event to tell that the whole advertisement\n // thing is finished.\n let eventName = 'AD_CANCELED';\n let eventMessage = 'Advertisement has been canceled.';\n this.eventBus.broadcast(eventName, {\n name: eventName,\n message: eventMessage,\n status: 'warning',\n analytics: {\n category: this.eventCategory,\n action: eventName,\n label: this.options.domain,\n },\n });\n\n // Preload the advertisement.\n this._requestAd().\n then(vastUrl => resolve(vastUrl)).\n catch(error => reject(error));\n });\n }", "next(){\r\n (this.position == this.testimonial.length - 1) ? this.position = 0 : this.position++\r\n }", "async _startRewardedAd(options) {\n if (this.requestRunning) {\n this.eventBus.broadcast(\"AD_IS_ALREADY_RUNNING\", { status: \"warning\" });\n return;\n }\n\n this.requestRunning = true;\n\n let autoPlayOptions = await this._initDisplayContainerWithAutoPlay();\n\n await this._loadRewardedAd({ ...autoPlayOptions, ...options });\n\n try {\n if (autoPlayOptions.autoplayRequiresMute) this.adsManager.setVolume(0);\n\n // Initialize the ads manager.\n this.adsManager.init(\n this.options.width,\n this.options.height,\n google.ima.ViewMode.NORMAL\n );\n\n // Start to play the creative.\n this.adsManager.start();\n } catch (error) {\n // An error may be thrown if there was a problem with the VAST response.\n this._onError(error);\n throw error;\n }\n }", "function setText(response) {\n var link_feed = document.getElementById('link_feed');\n var explainer = document.getElementById('explainer');\n // IF NO RESPONSE OR PAGE IS NOT FACEBOOK\n if (!response) {\n explainer.textContent = 'Visit Facebook or Twitter to see ad insertion positions';\n // IF NO ADS HAVE LOADED ON FACEBOOK YET\n } else if (!response.ads || response.ads.length === 0) {\n explainer.textContent = 'Scroll down or reload page to see ad positions.';\n // IF ADS HAVE LOADED ON FACEBOOK\n } else {\n // CLEAR ITEMIZED LIST OF ADS FROM LAST TIME\n if (link_feed.children.length > 0) {\n while (link_feed.firstChild) {\n link_feed.removeChild(link_feed.firstChild);\n }\n }\n // CALCULATE AD LOAD AND PRESENT IN POPUP\n var num_organic = response.num_posts - response.ads.length;\n var num_ads = response.ads.length;\n var post_ad_avg = Math.round(num_organic / num_ads);\n var post_ad_avg_text = (post_ad_avg !== 1) ? post_ad_avg + ' organic posts' : post_ad_avg + ' organic post';\n explainer.textContent = (post_ad_avg !== 'NaN organic posts') ? '1 ad for every ' + post_ad_avg_text : 'No ads loaded yet';\n document.getElementById('ads_posts_num').textContent = num_ads + ((num_ads !== 1) ? ' ads & ' : ' ad & ') + num_organic + ((num_organic !== 1) ? ' organic posts' : ' organic post');\n // CREATE ITEMIZED LIST OF ADS\n var ad_slots = response.ads;\n var ad_slot_feed_el = document.createElement('div');\n ad_slot_feed_el.id = 'ad_slot_feed';\n ad_slots.forEach(function(entry) {\n var ad_slot_el = document.createElement('div');\n ad_slot_el.className = 'ad_slot';\n ad_slot_el.textContent = 'Ad ' + ((entry.advertiser.length > 0) ? 'from ' + entry.advertiser : '') + (entry.isPlaced ? ' in slot #' + entry.placement : '');\n ad_slot_feed_el.appendChild(ad_slot_el);\n });\n // ADD ITEMIZED LIST OF ADS TO POPUP\n link_feed.appendChild(ad_slot_feed_el);\n // CHECK IF THERE ARE ENOUGH ADS FOR DATA TO BE SUBMITTED TO DATABASE\n if (response.ads.length > 1) {\n // CHECK STORED DATA\n chrome.storage.local.get('num_ads', function(res) {\n // TO BE REMOVED. USED TO CHECK STORAGE STATUS\n document.getElementById('storage_status').textContent = '# of ads last time you submitted to database: ' + res.num_ads;\n // CLEAR ELEMENT THAT INFORMS WHY SEND BUTTON HAS BEEN REMOVED\n var send_div = document.getElementById('send_stats');\n send_div.textContent = '';\n // CHECK IF NEW ADS HAVE BEEN LOADED SINCE LAST TIME SUBMITTED TO DATABASE\n if (response.ads.length > res.num_ads) {\n // CREATE SUBMIT BUTTON\n var submit_button = document.createElement('button');\n submit_button.className = 'btn';\n submit_button.textContent = 'Submit ad load';\n send_div.appendChild(submit_button);\n // REMOVE SUBMIT BUTTON EACH TIME DATA IS SUBMITTED TO DATABASE AND UPDATE STORED DATA\n submit_button.addEventListener('click', function() {\n chrome.storage.local.set({\n num_ads: response.ads.length\n });\n send_div.removeChild(submit_button);\n send_div.textContent = 'Load more ads to submit again.'\n });\n }\n });\n }\n }\n }", "function adTimer(adTimes) {\n\n var currentTime = Math.round(player.getCurrentTime());\n\n for(var i=0; i<adTimes.length; i++){\n // calculates passed advertisement time in seconds\n var adTimeInSeconds = timeInSeconds(adTimes[i][0]);\n\n // checks if current given advertisement time is bigger as current video time and no advertisement is already playing\n if(adTimeInSeconds <= currentTime && player.getPlayerState() == 1 && adState == false){\n // start quiz on second screen\n signalRClient.sendMessageToAndroidDevice(\"start Quiz\");\n player.pauseVideo();\n\n // creating new node (div-element) to be filled with pop-up-id\n var tmpElement = document.createElement(\"div\");\n tmpElement.setAttribute(\"id\", \"popUp\");\n // filling div with current content (specific popup content)\n var templateString = document.querySelector(\"#advertisementContent\").innerHTML;\n tmpElement.innerHTML = templateString;\n // adding new pop-up-div to template placeholder\n var templatePlaceholder = document.querySelector(\".templateBinding\");\n templatePlaceholder.appendChild(tmpElement);\n\n // start to play jingle-music during advertisement\n adJingle = document.createElement('audio');\n adJingle.src = \"res/audio/Scott_Holmes_-_02_-_Hopeful_Journey.ogg\";\n adJingle.play();\n \n // calculates advertisement duration in seconds and start advertisement\n adDurationInSeconds = timeInSeconds(adTimes[i][1]);\n startAdvertisement(adDurationInSeconds);\n \n // remove advertisement from array\n adTimes.shift();\n testAd = adTimes;\n }\n }\n }", "function startAdTimer(adTimes) {\n var timerVar = setInterval(function() {\n adTimer(adTimes);\n }, 1000);\n }", "render() {\n // eslint-disable-next-line no-lone-blocks\n {\n this.ShowAdRewarded();\n }\n if (this.state.isLoading) {\n return (\n <View style={styles.activityContainer}>\n {/*Code to show Activity Indicator*/}\n <ActivityIndicator size=\"large\" color=\"#0000ff\" />\n {/*Size can be large/ small*/}\n </View>\n );\n } else {\n return (\n <View style={styles.container}>\n <ScrollView\n refreshControl={\n <RefreshControl\n //refresh control used for the Pull to Refresh\n refreshing={this.state.isLoading}\n onRefresh={this.onRefresh.bind(this)}\n />\n }>\n <View style={styles.warningView}>\n <Text style={styles.warningText}>\n Bet Responsibly. Become a premium member and make lots of money!\n </Text>\n </View>\n <View>{this.renderTips()}</View>\n </ScrollView>\n <View style={styles.IndexAD}>\n <PublisherBanner\n bannerSize=\"largeBanner\"\n // ca-app-pub-3763838117475589/4846557176 - Real ads ID\n // ca-app-pub-3940256099942544/6300978111 - Test ID\n adUnitID=\"ca-app-pub-3763838117475589/4846557176\"\n servePersonalizedAds={true}\n onDidFailToReceiveAdWithError={this.bannerError}\n />\n </View>\n </View>\n );\n }\n }", "function advance() {\r\n clearTimeout(timeout);\r\n\r\n timeout = setTimeout(function () {\r\n if (currentIndex < ($slides.length - 1)) {\r\n move(currentIndex + 1);\r\n }\r\n else {\r\n move(0);\r\n }\r\n }, 400000);\r\n }", "function autoAdvance() {\n var currentPersonIndex = currentFeaturedPerson.personIndex;\n if (currentPersonIndex == peopleArray.length - 1) {\n changeToPerson(0);\n } else {\n changeToPerson(currentPersonIndex + 1);\n }\n}", "smaAdvancing() {\r\n\r\n }", "function adSlotSetup() {\n var baseContainer, container1, adSlot1, stubSlot, eagerStubSlot, variableReferences;\n baseContainer = document.createElement('div');\n container1 = document.createElement('div');\n container1.className ='expected';\n container1.id = 'ad-container-1';\n adSlot1 = document.createElement('div');\n adSlot1.id = 'dfp-ad-1';\n adSlot1.className = 'dfp';\n adSlot1.dataset.adUnit = 'header';\n container1.appendChild(adSlot1);\n baseContainer.appendChild(container1);\n document.body.appendChild(baseContainer);\n\n stubSlot = {\n element: adSlot1,\n prebid: 1,\n activeSizes: [[300, 250]],\n getSlotElementId: function() {\n return adSlot1.id;\n },\n getTargeting: function () {\n return '';\n },\n setTargeting: function () {},\n getOutOfPage: function () { return false; }\n };\n\n eagerStubSlot = Object.assign({}, stubSlot, { eagerLoad: true });\n\n variableReferences = {\n baseContainer: baseContainer,\n container1: container1,\n adSlot1: adSlot1,\n stubSlot: stubSlot,\n eagerStubSlot: eagerStubSlot\n };\n\n adManager.slots = {\n 'dfp-ad-1': stubSlot\n };\n\n return variableReferences;\n }", "function initBannerLink() {\r\n\tif (document.getElementById(\"adBanner\").parentNode.tagName == \"A\") {\r\n\t\tdocument.getElementById(\"adBanner\").parentNode.onclick = newLocation;\r\n\t}\r\n\t\r\n\trotate();\r\n}", "more(){\n this.offset += this.limit;\n this.start();\n }", "function VASTAdPlayer(debug) {\n // TODO: Check that all of these are used\n this.requestSettings = {\n width: null,\n height: null,\n bitrate: null,\n insertionPointType: null,\n playbackPosition: null\n };\n this.unsentTrackingPoints = [];\n this.activeAd = null;\n this.adPlaying = false;\n this.adsEnabled = true;\n this.breaks = [];\n this.lastPlayedBreak = null;\n this.debug = !!debug;\n this.skipHandler = {\n start: null,\n end: null\n };\n this._playerState = {\n originalSrc: null,\n timeToResume: 0,\n ended: false\n };\n this.takeoverCallbacks = {\n onTakeover: null,\n onRelease: null\n };\n this._clickEvent = navigator.userAgent.match(/iPad/i) ? 'touchstart' : 'click';\n\n this._bindContextForCallbacks();\n}", "function playAd() {\n // checks if advertisement is really paused\n if(adState == false) {\n // enable quizanswers\n signalRClient.sendMessageToAndroidDevice(\"enable Quiz-answers\");\n\n // start advertisement again with saved remaining time from pause\n startAdvertisement(pausedTimerTime);\n\n adJingle.play(); // start to play jingle music again (paused from pause)\n adPaused = false; // set advertisement paused to false\n }\n }", "function decreaseCurrentEntryID() {\n\t\tcurrentIndex--;\n\t\tcurrentEntryID = indexes[currentIndex];\n\t\tif (currentIndex < 0) currentIndex = indexes.length-1;\n\t\tif (currentIndex < Math.floor(visibleSlides/2) && !allEntriesLoaded) {\n\t\t\tvar index = currentIndex - Math.floor(visibleSlides/2) - 1;\n\t\t\tloadEntries(indexes[0], visibleSlides, true);\n\t\t}\n\t}", "resetForNextDest() {\n this.setHintIndex(0);\n this.setPhotoIndex(0);\n this.setReviewIndex(0);\n this.setPhotos([]);\n this.setReviews([]);\n this.setPlaceID(-1);\n }", "placeStickyAd() {\n let insertEl\n\n if ( this.sections.length > 2 ) {\n insertEl = this.sections.eq( 1 )\n } else {\n insertEl = this.content\n }\n\n this.$element.insertAfter( insertEl )\n }", "function nextPage () {\n var viewportWidth = elements.canvas.clientWidth,\n totalWidth = viewportWidth + ctrl.offsetLeft,\n i, tab;\n for (i = 0; i < elements.tabs.length; i++) {\n tab = elements.tabs[ i ];\n if (tab.offsetLeft + tab.offsetWidth > totalWidth) break;\n }\n ctrl.offsetLeft = fixOffset(tab.offsetLeft);\n }", "function nextPage () {\n var viewportWidth = elements.canvas.clientWidth,\n totalWidth = viewportWidth + ctrl.offsetLeft,\n i, tab;\n for (i = 0; i < elements.tabs.length; i++) {\n tab = elements.tabs[ i ];\n if (tab.offsetLeft + tab.offsetWidth > totalWidth) break;\n }\n ctrl.offsetLeft = fixOffset(tab.offsetLeft);\n }", "next() {\n let newIndex = this.activeIndex + 1;\n\n // Wrap around indices.\n if (newIndex >= this.$slides.length) newIndex = 0;\n else if (newIndex < 0) newIndex = this.$slides.length -1;\n\n this.set(newIndex);\n }", "function nextCard () {\n if (events.currentcard === (conversationcards.length-1)) {\n return\n } else {\n events.currentcard++\n conversationcards[events.currentcard].setCard()\n }\n}", "updateItemsPerPage(pagination) {\n this.loadLeads();\n }", "_createPlayer() {\n const body = document.body || document.getElementsByTagName(\"body\")[0];\n\n this.adContainer = document.createElement(\"div\");\n this.adContainer.id = `${this.prefix}advertisement`;\n this.adContainer.style.position = this.thirdPartyContainer\n ? \"absolute\"\n : \"fixed\";\n this.adContainer.style.zIndex = Layers.AdsContainer.zIndex;;\n this.adContainer.style.top = \"0\";\n this.adContainer.style.left = \"0\";\n this.adContainer.style.width = \"100%\";\n this.adContainer.style.height = \"100%\";\n\n if (this.thirdPartyContainer)\n this.thirdPartyContainer.style.transform = null;\n\n let video_ad_player = document.createElement(\"video\");\n video_ad_player.setAttribute(\"playsinline\", true);\n video_ad_player.setAttribute(\"webkit-playsinline\", true);\n video_ad_player.id = `${this.prefix}advertisement_video`;\n video_ad_player.style.position = \"absolute\";\n video_ad_player.style.backgroundColor = \"#000000\";\n video_ad_player.style.top = \"0\";\n video_ad_player.style.left = \"0\";\n video_ad_player.style.width = this.options.width + \"px\";\n video_ad_player.style.height = this.options.height + \"px\";\n\n this.video_ad_player = video_ad_player;\n\n this.adContainer.appendChild(video_ad_player);\n\n const adContainerInner = document.createElement(\"div\");\n adContainerInner.id = `${this.prefix}advertisement_slot`;\n adContainerInner.style.position = \"absolute\";\n adContainerInner.style.top = \"0\";\n adContainerInner.style.left = \"0\";\n adContainerInner.style.width = this.options.width + \"px\";\n adContainerInner.style.height = this.options.height + \"px\";\n this.adContainerInner = adContainerInner;\n\n this.activeAdContainer = this.adContainer;\n\n // Append the adContainer to our Flash container, when using the\n // Flash SDK implementation.\n if (this.thirdPartyContainer) {\n this.adContainer.appendChild(adContainerInner);\n this.thirdPartyContainer.appendChild(this.adContainer);\n this.activeAdContainer = this.thirdPartyContainer;\n } else {\n this.adContainer.appendChild(adContainerInner);\n body.appendChild(this.adContainer);\n }\n\n this.activeAdContainer.style.visibility = \"hidden\";\n\n let handle_dimensions = () => {\n const viewWidth =\n window.innerWidth ||\n document.documentElement.clientWidth ||\n document.body.clientWidth;\n const viewHeight =\n window.innerHeight ||\n document.documentElement.clientHeight ||\n document.body.clientHeight;\n this.options.width = this.thirdPartyContainer\n ? this.thirdPartyContainer.offsetWidth\n : viewWidth;\n this.options.height = this.thirdPartyContainer\n ? this.thirdPartyContainer.offsetHeight\n : viewHeight;\n adContainerInner.style.width = this.options.width + \"px\";\n adContainerInner.style.height = this.options.height + \"px\";\n video_ad_player.style.width = this.options.width + \"px\";\n video_ad_player.style.height = this.options.height + \"px\";\n };\n\n // We need to resize our adContainer\n // when the view dimensions change.\n window.addEventListener(\"resize\", handle_dimensions);\n window.document.addEventListener(\"DOMContentLoaded\", handle_dimensions);\n }", "function nextSlide(array){\n indexTracker++;\n if (indexTracker>=array.length){\n indexTracker=0;\n }\n updateIndexPoints(array);\n}", "function resetBannerStats() {\n targets_destroyed = 0;\n target_times = [];\n shots = 0; hits = 0;\n updateBanner();\n}", "_cacheAdverts() {\n Meteor.call('AdManager.cacheAdverts');\n }", "function done(product) {\n //in order to simulate the end of the catalogue, once we get a repeated product we unload the buffer and stop fetching more products\n checkFinish(product);\n \n count++;\n //if already fetched 20 products insert an ad\n if(count%20 == 0) {\n var ad = {};\n randomAdNumber = getNewRandomAdNumber(randomAdNumber);\n ad.adUrl = '/ad/?r=' + randomAdNumber; \n productsArray.push(ad);\n count++; \n }\n productsArray.push(product);\n }", "releaseFirst() {\n\t\tif(!this._used.length) {\n\t\t\treturn;\n\t\t}\n\t\tconst obj = this._used[0];\n\t\treturn this.release(obj);\n\t}", "function assetAcquired(assetId) {\n if (assets.assetUseCounts[assetId] === undefined) {\n assets.assetUseCounts[assetId] = 1;\n return;\n }\n assets.assetUseCounts[assetId]++;\n }", "_incrementIndex() {\n this._index++;\n\n if (this._index >= this._capacity) {\n this._index = 0;\n }\n }", "function createAd(){\n // retrieves inputs\n let title = document.getElementById(\"createTitle\").value;\n let price = document.getElementById(\"createPrice\").value;\n let description = document.getElementById(\"createDescription\").value;\n\n // will handle the image inputs\n let uploadedImages = images;\n\n // removing onclick and opacity attributes\n for(let i = 0; i < uploadedImages.length; i++){\n uploadedImages[i].style.opacity = 1;\n uploadedImages[i].onclick = \"\";\n }\n\n // resets the image holder\n images = [];\n\n // pushes the ad to an array storing ads\n ads.push(new Ad(title, price, description, uploadedImages, currentUser));\n\n toggleView(\"ads\");\n}", "_show() {\n if (this.activeAdContainer)\n this.activeAdContainer.style.visibility = \"visible\";\n }", "next()\n {\n this._current = this._current.next;\n this._key++;\n }", "function apInc() \n\t\t\t{\n\t\t\t\tif (this.ap < this.apMax)\n\t\t\t\t{\n\t\t\t\t\tthis.ap++;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.rap < this.apMax)\n\t\t\t\t{\n\t\t\t\t\tthis.rap++;\t\t\t\t\t\n\t\t\t\t}\n\t\t\treturn this.ap;\n\t\t\t}", "next(){\n let next = this.currentId + 1;\n if(next >= this.list.length){\n next = this.list.length;\n }\n this.goto(next);\n }", "addThumbsUp(){\n this.thumbsUpRef.transaction(function(currentThumbsUpCount) {\n return currentThumbsUpCount + 1;\n });\n }" ]
[ "0.55693", "0.5512934", "0.54049003", "0.53304243", "0.5269616", "0.5240582", "0.52376586", "0.5179522", "0.5167669", "0.51491725", "0.5121991", "0.5073402", "0.5069809", "0.50062525", "0.49965", "0.4995619", "0.49791002", "0.49763164", "0.49457395", "0.49062073", "0.4900071", "0.48447686", "0.48447686", "0.48440692", "0.4837844", "0.48351932", "0.4833004", "0.4796038", "0.47943062", "0.47933573", "0.47868317", "0.47815117", "0.47791225", "0.47723752", "0.4772086", "0.46935073", "0.46892166", "0.46831992", "0.46762052", "0.46579584", "0.4650965", "0.46504563", "0.4636205", "0.4635363", "0.46347287", "0.46303138", "0.46303138", "0.46303138", "0.46303138", "0.4627806", "0.46221295", "0.46218073", "0.46081823", "0.46049803", "0.4597115", "0.45943257", "0.4593508", "0.45915177", "0.4580373", "0.45742387", "0.45726368", "0.45726177", "0.45612", "0.45611665", "0.45484763", "0.45427817", "0.45410696", "0.45346606", "0.45238498", "0.45231402", "0.45164087", "0.45153996", "0.45124802", "0.45115945", "0.44999078", "0.44982994", "0.44795802", "0.44755808", "0.44748965", "0.44710788", "0.44505826", "0.44469383", "0.44469383", "0.44412357", "0.44315955", "0.44303057", "0.4425583", "0.442423", "0.44162488", "0.44150954", "0.4411355", "0.4403826", "0.44005367", "0.43891057", "0.43877453", "0.43827087", "0.43760177", "0.4372971", "0.4363431", "0.43620595" ]
0.72789824
0
call handler for check if we have to play an ad
function _playNextAd(position) { if(nextAd != null && player.clip.ads[nextAd].position == position) { _log('_playNextAd(' + position + ')', nextAd, player.clip.ads[nextAd].position); player.ad = player.clip.ads[nextAd]; _changeSrc(player.ad.src); div_info_ad_timeleft.show(); that.addClass('is-playing-ad'); _gotoNextAd(); return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function LibAdInPlay()\n{\n // NOTES:\n // Preloading is not supported\n // Interstitial is supported\n // Rewarded is supported\n}", "function playAd() {\n // checks if advertisement is really paused\n if(adState == false) {\n // enable quizanswers\n signalRClient.sendMessageToAndroidDevice(\"enable Quiz-answers\");\n\n // start advertisement again with saved remaining time from pause\n startAdvertisement(pausedTimerTime);\n\n adJingle.play(); // start to play jingle music again (paused from pause)\n adPaused = false; // set advertisement paused to false\n }\n }", "function check_InstantAds() {\n\t\t\tif (myFT.instantAdsLoaded) {\n\t\t\t\tconsole.log(\"myFT.instantAdsLoaded checkIA yes: \" + myFT.instantAdsLoaded);\n\t\t\t\tinstantAds_Implementation();\n\t\t\t} else {\n\t\t\t\tmyFT.addEventListener('instantads', instantAds_Implementation);\n\t\t\t}\n\t\t}", "function shouldSendAd() {\n var now = new Date();\n return (now - lastAdTime) > AD_INTERVAL;\n}", "onAdsReady(player) {\n player.ads.debug('Received adsready event (ContentPlayback)');\n\n if (!player.ads.nopreroll_) {\n player.ads.debug('Triggered readyforpreroll event (ContentPlayback)');\n player.trigger('readyforpreroll');\n }\n }", "init(player) {\n // Don't block calls to play in content playback\n player.ads._shouldBlockPlay = false;\n }", "function loadAd(slideNum){ \n\n if(!setSlotListenerSet){\n googletag.cmd.push(function() {\n googletag.pubads().addEventListener('slotRenderEnded', function(event) {\n var targetingPos = String(event.slot.getTargeting(\"pos\"));\n\n if(targetingPos.indexOf(\"carousel_slide_0\") > -1){\n if(event.isEmpty && (event.slot.getTargeting(\"pos\") == \"carousel_slide_0\"+slideNum)){\n $(\"#slide\"+slideNum).addClass( \"blankNbaFlexContent\" );\n $(\"#slide\"+slideNum).removeClass( \"nbaFlexContent\" );\n blankAdCnt+=1;\n } \n else{ \n adsRenderedCnt+=1;\n if(adsRenderedCnt == 2){\n initCarousel(slideNum);\n }\n else if(adsRenderedCnt > 2){\n loadSlides(adsRenderedCnt, blankAdCnt,slideNum);\n }\n }\n if((adsRenderedCnt+blankAdCnt) < 6){\n var nextSlideNum = slideNum+1;\n if(nextSlideNum==6){\n nextSlideNum = 1;\n }\n slideNum = nextSlideNum;\n setTimeout(function(){renderAd(nextSlideNum)},3000); //3000\n }\n else{\n finalizeCarousel();\n } \n } //targetingPos.indexOf if condition\n }); //googletag.pubads().addEventListener\n }); // googletag.cmd.push function\n } // setSlotListenerSet if condition\n setSlotListenerSet = true;\n}", "function needPlayAdForPlaylistItem (plIdx) {\n\t\tif (_frequencyRules && _frequencyRules.playlistClips && _frequencyRules.playlistClips > 1) {\n\t\t\tvar mod = plIdx % _frequencyRules.playlistClips;\n\t\t\treturn mod === 0;\n\t\t}\n\t\treturn true;\n\t}", "function startAd() {\n\n adDiv = document.getElementById(\"ad\");\n videoContainer = document.getElementById(\"video-container\");\n video = document.getElementById(\"video\");\n click = document.getElementById(\"click\");\n cta_expand = document.getElementById(\"cta_expand\");\n cta_expand_white_bg = document.getElementById(\"cta_expand_white_bg\"); \n zoneExpandCtaBtn = document.getElementById(\"zoneExpandCtaBtn\"); \n soundButton = document.getElementById(\"mute-btn\");\n addEventListeners();\n if (!isMobile.any())\n {\n if(!clickOnLoader)\n {\n initVideo();\n }\n else\n {\n freeze();\n }\n } \n else\n {\n loader.style.display = \"none\";\n OnComplete();\n }\n\n\n \n \n \n}", "dispatchAudio() {\n const state = this.state;\n if (state.code !== NetworkingStatusCode.Ready)\n return false;\n if (typeof state.preparedPacket !== 'undefined') {\n this.playAudioPacket(state.preparedPacket);\n state.preparedPacket = undefined;\n return true;\n }\n return false;\n }", "function isBusy() {\n return audioElementsToPlay.length > 0;\n }", "function adBlockNotDetected() {\n}", "function is_bot_playing() {\r\n\treturn voice_handler !== null;\r\n}", "IsPlaying() {}", "function onCanPlayThrough() {\n if (debug) console.log('[media] Can play through ' + this.src);\n onRequestSuccess(this);\n onRequestComplete(this);\n }", "function checkIfPlayerLoaded() {\n var $nextButton = $('div.player-next-episode')\n var $netflixScrubber = $(\"#scrubber-component > .player-scrubber-progress\");\n\n if (typeof $nextButton[0] !== undefined && isOverlayPresent() === false) {\n injectOverlay($nextButton);\n injectScrubber($netflixScrubber, currentEpisodeInfo.themeStart, currentEpisodeInfo.themeEnd);\n clearInterval(intervalCheckIfPlayerLoaded);\n sm = submitMode();\n }; \n }", "function handlePlay(){\n if(audio.paused){\n audio.play();\n player.innerHTML = hdlPause\n }else{\n audio.pause();\n player.innerHTML = hdlPlay\n }\n }", "CheckPreAds() {\n let i = 0;\n let item = null;\n this.logger.info(' Checking Pre Ads Now .. ');\n if (this.settled !== true) {\n this.logger.warn('not yet Settled !');\n return false;\n }\n for (i = 0; i < this.preAds.length; i += 1) {\n item = this.preAds[i];\n this.logger.info(i, ' starting Pre Ads Now .. ');\n if (this.preAds[i].started === false) {\n this.logger.info(i, ' starting a new Pre Ads .. @', i);\n this.preAds[i].started = true;\n this.StartAds(i, Const.AdsEnum.ADS_PRE_ROLL);\n return true;\n }\n this.logger.info(i, 'Pre already started ', item[Const.FJCONFIG_URL],\n ' @@ ', item[Const.FJCONFIG_SHOW_AT]);\n }\n return false;\n }", "function mustAutoplayMediaInLessonViewer() {\n return (!$.browser.ipad && !$.browser.iphone);\n}", "function checkPrepareTime () {\n\t\tif (_adPlaying) {\n\t\t\t// not interrupt playing ad\n\t\t\treturn;\n\t\t}\n\t\tvar curTime = _player.currentTime();\n\t\tfor (var i = 0; i < _arrAdList.length; i++) {\n\t\t\tvar nextTime = (i < _arrAdList.length - 1) ? _arrAdList[i + 1].adTime : _contentDuration;\n\t\t\tif (_arrAdList[i].adTime - curTime <= BEFORE_AD_PREPARE_TIME &&\tcurTime < nextTime) {\n\t\t\t\tif (!_arrAdList[i].adTag && _arrAdList[i].status === AD_STATUS_NOT_PLAYED) {\n\t\t\t\t\t_arrAdList[i].status = AD_STATUS_TAG_REQUEST;\n\t\t\t\t\t_arrAdList[i].options.clearPrebid = _arrOptions && _arrOptions.length > 1;\n\t\t\t\t\t_prebidCommunicatorObj.doPrebid(_arrAdList[i].options, function (creative) {\t\t// jshint ignore:line\n\t\t\t\t\t\t_arrAdList[i].status = !!creative ? AD_STATUS_READY_PLAY : AD_STATUS_DONE;\n\t\t\t\t\t\t_arrAdList[i].adTag = creative;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "function onMediaCanPlay() {\r\n if (!flagContentOpenComplete_) {\r\n flagContentOpenComplete_ = true;\r\n processOpenComplete();\r\n }\r\n }", "function advertising() {\n alert(\"Ensure that Ads been created - Only TRUE or False \");\n}", "function handleAdInitialized(event) {}", "canPlayOn(card) { // eslint-disable-line no-unused-vars\n return true;\n }", "keyPressed() {\n if (this.Playing == false) {\n this.Playing = true;\n this.Ad.show();\n this.Ad.play();\n }\n }", "function checkSlideAutoplay(event, slideNum) {\r\n var settings = getSlideSettings(slideNum);\r\n \r\n // If we are not in autoplay mode and slide settings want to, toggle autoplay on\r\n if ( !isAutoplay ){\r\n if ( settings['autoplay'] ) { \r\n play();\r\n }\r\n }\r\n\r\n // If we are in autoplay mode and slide settings don't want to, toggle autoplay off\r\n if ( isAutoplay ){\r\n if ( !settings['autoplay'] && !isAutoplayButtonClicked){\r\n play();\r\n }\r\n }\r\n\r\n }", "function justplay(){\n if (playing_song==false){\n playsong();\n }else{\n pausesong();\n }\n}", "function playhandler() {\n // disable play and step till play is complete\n $('#play').attr('disabled', true);\n $('#step').attr('disabled', true);\n if (queryPosition === query.length -1) {\n startSearch(true);\n } else {\n advance(true);\n }\n}", "function playAPIdone() {\n //this function plays the sound for when API results are returned\n console.log(\"inside playAPIdone function\");\n var snd = document.getElementById(\"myAudio\");\n snd.play();\n\n console.log(\"end playAPIdone function\");\n}", "checkPlayIsValid(action) {\n // rules for if a play is valid\n }", "isValidElement() {\n return !!this.getAdUrl();\n }", "function showInterstitial(){\n\tif(AdMob) AdMob.showInterstitial();\n}", "function showInterstitial(){\n\tif(AdMob) AdMob.showInterstitial();\n}", "function pp(){\n if(config.site ==='twitch'){\n $(\".qa-pause-play-button\").click();\n } else if(config.site ==='netflix'){\n return;\n }\n else {\n if(myPlayer.paused){\n myPlayer.play();\n } else {\n myPlayer.pause();\n }\n }\n log(\"play/pause triggered\");\n}", "onAdStarted(player) {\n player.removeClass('vjs-ad-loading');\n }", "function _gotoNextAd()\n\t\t{\n\t\t\tnextAd++;\n\t\t\tif(nextAd >= player.clip.ads.length)\n\t\t\t{\n\t\t\t\tnextAd = null;\n\t\t\t}\n\t\t}", "function playButtonClick() {\n\tplayClicked = true;\n\t_gaq.push(['_trackEvent', 'game', 'click', 'play']);\n\t// If the game is loaded and the audio files decoded, initialize the game\n\tif (complete && audioDecoded) {\n\t\tinitGame();\n\t// otherwise show the loading indicator\n\t} else {\n\t\tshowLoadingBar();\n\t}\n}", "CheckPostAds() {\n let i = 0;\n let item = null;\n this.logger.info(' Checking Post Ads Now .. ');\n if (this.settled !== true) {\n this.logger.warn(' AdsMgr is not yet this.settled!');\n return false;\n }\n for (i = 0; i < this.postAds.length; i += 1) {\n item = this.postAds[i];\n this.logger.info(i, ' starting Pre Ads Now .. ');\n if (this.postAds[i].started === false) {\n this.logger.info(i, ' starting a new Post Ads .. ');\n this.postAds[i].started = true;\n this.StartAds(i, Const.AdsEnum.ADS_POST_ROLL);\n return true;\n }\n this.logger.info(i, 'Post already started ', item[Const.FJCONFIG_URL],\n ' @@ ', item[Const.FJCONFIG_SHOW_AT]);\n }\n return false;\n }", "function checkSkip() {\n if(thisObj.state != YT_PLAY) return false\n if(getQueryVariable('v') != curVideoId()) return false\n if(!needSkip()) return false\n doSkip()\n }", "function adBlockDetected() {\n //ga(\"send\",{hitType:\"adblock-detected\",eventCategory:\"adblock\",eventAction:\"detected\",eventLabel: \"adblock-detected\"});\n if(localStorage.getItem('nodonate') != \"true\"){\n document.getElementById(\"ab-only\").style.display = \"block\";\n }\n}", "function justplay(){\r\n if(Playing_song==false){ //Verifica si se está reproduciendo\r\n playsong(); //Llama a la funcion playsong\r\n () => console.log('i injected');\r\n }else{\r\n pausesong();//Pausa la canción en otro caso\r\n }\r\n}", "function advertise_status()\n{\n\n\t if(earthnc_getUrlVariable('em'))\n\t {\n\n\t\tshow('advert_inner');\n\t }\n\t else\n\t {\n\n\t\t show('advert_inner');\n\n\t }\n\n}", "function handlePlayPouse() {\n if(hours===0 && minutes===0 && seconds===0) {\n setPause(true);\n return;\n }\n setPause(!pause);\n }", "function advertisementpayment() {\n var mus = document.getElementById(\"musicplayr\");\n mus.ontimeupdate = function () {\n if (mus.currentTime >= 30) {\n var url = \"http://\" + \"8tracks.com/sets/874076615/report.xml?track_id=\" + currentSongID + \"&mix_id=\" + currentMIXID;\n WinJS.xhr({ url: url }).then(\n function (response) { },\n function (error) { },\n function (progress) { }\n );\n currentSongBill = true\n }\n }\n }", "function tryAutoScrobble () {\r\n\tif (us_getValue(\"us_autoscrobble_active\", 0) == 1) {\r\n\t\tvar response = getTrackInfo();\r\n\t\tisMusicVideo(response, tryAutoScrobbleCallback);\r\n\t}\r\n}", "function isPlaying(playerId)\n{\n \n var player = document.getElementById(playerId);\n return !player.paused && !player.ended && 0 < player.currentTime;\n \n}", "function inactivityCheck() {\n if (!spellWasCast) {\n console.log(\"No spells in 30 minutes\");\n itsAboutTimeToCastASpell = true; // cast one at next opportunity\n } else {\n spellWasCast = false; // reset activity flag\n }\n setTimeout( inactivityCheck, 30 * 60 * 1000 ); // check back in 30 min\n }", "function playInstructionsAndAds() {\n $window.VideoPlayer.play(\n videoUrlLocal,\n {\n volume: 0.5,\n scalingMode: VideoPlayer.SCALING_MODE.SCALE_TO_FIT // SCALE_TO_FIT_WITH_CROPPING\n },\n function () {\n console.log('local video completed 1 time');\n $window.VideoPlayer.play(\n videoUrlLocal,\n {\n volume: 0.5,\n scalingMode: VideoPlayer.SCALING_MODE.SCALE_TO_FIT // SCALE_TO_FIT_WITH_CROPPING\n },\n function () {\n console.log('local video completed 2 times');\n playAds();\n },\n function (err) {\n console.log('local video error: ' + err);\n playAds();\n }\n );\n },\n function (err) {\n console.log('local video error: ' + err);\n playAds();\n }\n );\n }", "function checkReadyState()\n{\n\tif (game.gameOverAudio.readyState === 4 && game.backgroundAudio.readyState === 4)\n {\n\t\twindow.clearInterval(game.checkAudio);\n\t\tdocument.getElementById(\"gs\").style.visibility = \"visible\";\n\t\tgame.start();\n\t}\n}", "function test(elem){\n if(plays.indexOf(elem)>-1)\n return true;\n else\n return false;\n }", "function agendaLoaded(agenda) {\n var button = document.getElementById(\"play\")\n\n\n button.innerHTML = \"Waiting for Performance\"\n\n performanceTime.once('timeSync', function() {\n loadAudio()\n })\n\n performanceTime.on('timeSync', function cb() {\n if(performanceTime.sinceCue(startCue) < 0) {\n return\n }\n button.innerHTML = \"Live\"\n performanceTime.off('timeSync', cb)\n })\n}", "function check()\r\n{\r\n\tfor (var i=0; i<aliases.length; i++)\r\n\t{\r\n\t\tif (flags[aliases[i]]==0)\r\n\t\t{\r\n//\t\t\talert('checking'+aliases[i]);\r\n\t\t\tisTimerEnding(aliases[i], notifyAt, names[i]);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\thasTimerRestarted(aliases[i], 15, names[i]);\t\r\n\t\t}\r\n\t}\r\n\taudioPlaying=0;\r\n}", "function clickEnact() {\n //Check if retry pressed\n var startStopButtonId = document.getElementById(\"startStopButton\");\n if (startStopButtonId.innerText == LANG[gLang][\"retry\"]) {\n location.reload(true);\n }\n\n dAudio = document.getElementById('dummyAudio');\n if (gPlayIntention) {\n gPlayIntention = false;\n /* if (mobileAndTabletcheck()) {\n closeFullscreen();\n } */\n console.log(\"Stop on clickEnact\");\n stopPlayer();\n dAudio.onpause = null;\n dAudio.pause();\n dAudio.onplay = function () {\n gPlayIntention = false;\n clickEnact();\n };\n } else {\n gPlayIntention = true;\n /* if (mobileAndTabletcheck()) {\n openFullscreen();\n } */\n dAudio.onplay = null;\n dAudio.play();\n dAudio.onpause = function () {\n gPlayIntention = true;\n clickEnact();\n };\n startPlayer(); \n }\n updateDisplay(); \n}", "function doSomethingAfterAudio(elem){\n\t\t\tif (audio.currentTime > audio.duration - getAudioTailLength(elem)) {\n\t\t\t\texperiment.start_ms = Date.now();\n\t\t\t\t$(\"#nextButton\").removeAttr('disabled');\n\t\t\t} else {\n\t\t\t\tsetTimeout(function() {doSomethingAfterAudio(elem);}, 50);\n\t\t\t};\t\t\t\n\t\t\t \n\t\t}", "function isPlaying() {\n return state.isPlaying && state.view == \"slide\";\n}", "async _startRewardedAd(options) {\n if (this.requestRunning) {\n this.eventBus.broadcast(\"AD_IS_ALREADY_RUNNING\", { status: \"warning\" });\n return;\n }\n\n this.requestRunning = true;\n\n let autoPlayOptions = await this._initDisplayContainerWithAutoPlay();\n\n await this._loadRewardedAd({ ...autoPlayOptions, ...options });\n\n try {\n if (autoPlayOptions.autoplayRequiresMute) this.adsManager.setVolume(0);\n\n // Initialize the ads manager.\n this.adsManager.init(\n this.options.width,\n this.options.height,\n google.ima.ViewMode.NORMAL\n );\n\n // Start to play the creative.\n this.adsManager.start();\n } catch (error) {\n // An error may be thrown if there was a problem with the VAST response.\n this._onError(error);\n throw error;\n }\n }", "checkSound(car) {\n\n this.extensions.carSound.bool = car.scripts.find((e) => {\n return (undefined != e[2].find((f) => {\n return f[0] == 'playSound:' \n }))\n })\n }", "function showBannerIfAlreadyReserved(adventure) {\n // TODO: MODULE_RESERVATIONS\n // 1. If user has already reserved this adventure, show the reserved-banner, else don't\n\n}", "function canStart() {\n if (_curr.songTitle == null || _curr.songTitle == \"\") return false;\n if (_curr.artistName == null || _curr.artistName == \"\") return false;\n if (_curr.songImage == null) return false;\n if (_curr.songFile == null) return false;\n if (_curr.songLength == null) return false;\n return true;\n }", "function onPlayerReady(event) {\n event.target.playVideo();\n sendVideoProgressToAndroidDevice(); \n startVideoProgress();\n startAdTimer(testAd);\n }", "function autoplay() {\r\n engine.log('[DEBUG] Checking for autoplay oportunity...');\r\n if (!engaged) {\r\n engine.log('[DEBUG] Autoplaylist mode is disengaged. Exiting...');\r\n return; \r\n }\r\n\r\n // Find Autoplaylist\r\n let playlist = media.getPlaylists().find(playlist => {\r\n return playlist.name() == 'Autoplaylist';\r\n });\r\n if (!playlist) {\r\n engine.log('[DEBUG] No Autoplaylist found, disengaging jukebox mode.');\r\n return;\r\n }\r\n\r\n // Select a random song and play it\r\n engine.log('[DEBUG] Autoplay engaged. Playing something from the catalog...');\r\n let tracks = playlist.getTracks();\r\n if (tracks.length == 0) {\r\n engine.log('[DEBUG] No songs in the Autoplaylist, disengaging jukebox mode.');\r\n return;\r\n }\r\n let selectedTrack = tracks[helpers.getRandom(tracks.length)];\r\n engine.log('[DEBUG] Song selected!')\r\n selectedTrack.play();\r\n }", "function checkReady() {\n const intElAll = document.querySelectorAll('.element-interactive[data-canonical-url*=\"looping-video\"]');\n if (intElAll.length > 0) {\n const intElLast = intElAll[intElAll.length - 1]\n return !(intElLast.querySelectorAll('a').length > 0);\n } else {\n return true;\n }\n}", "function playAudio() {\n myAudio.play(); \n return false;\n }", "function gotMessage(msg, sender, sendResponse){\n\tif(msg.txt == \"click\"){\n\t\tif(audioContent.paused){ // se o audio ta pausado \n \t\tconsole.log(\"Audio Content Tocando\");\n \t\tmaisAlto(audioContent); // aumenta o som e da play\n \t}else{\n \t\tconsole.log(\"Audio Content Pausado\");\n \t\taudioContent.pause(); // pause\n \t}\t\n\t}else if(msg.txt == \"play\"){\n\t\tif(audioContent.paused){ // se o audio ta pausado \n \t\tconsole.log(\"Audio Content Tocando\");\n \t\tmaisAlto(audioContent); // aumenta o som e da play\n \t}\n\t}\n\n}", "function adTimer(adTimes) {\n\n var currentTime = Math.round(player.getCurrentTime());\n\n for(var i=0; i<adTimes.length; i++){\n // calculates passed advertisement time in seconds\n var adTimeInSeconds = timeInSeconds(adTimes[i][0]);\n\n // checks if current given advertisement time is bigger as current video time and no advertisement is already playing\n if(adTimeInSeconds <= currentTime && player.getPlayerState() == 1 && adState == false){\n // start quiz on second screen\n signalRClient.sendMessageToAndroidDevice(\"start Quiz\");\n player.pauseVideo();\n\n // creating new node (div-element) to be filled with pop-up-id\n var tmpElement = document.createElement(\"div\");\n tmpElement.setAttribute(\"id\", \"popUp\");\n // filling div with current content (specific popup content)\n var templateString = document.querySelector(\"#advertisementContent\").innerHTML;\n tmpElement.innerHTML = templateString;\n // adding new pop-up-div to template placeholder\n var templatePlaceholder = document.querySelector(\".templateBinding\");\n templatePlaceholder.appendChild(tmpElement);\n\n // start to play jingle-music during advertisement\n adJingle = document.createElement('audio');\n adJingle.src = \"res/audio/Scott_Holmes_-_02_-_Hopeful_Journey.ogg\";\n adJingle.play();\n \n // calculates advertisement duration in seconds and start advertisement\n adDurationInSeconds = timeInSeconds(adTimes[i][1]);\n startAdvertisement(adDurationInSeconds);\n \n // remove advertisement from array\n adTimes.shift();\n testAd = adTimes;\n }\n }\n }", "function getGamerAd () {\n //google publisher tag\n window.googletag = window.googletag || {};\n window.googletag.cmd = window.googletag.cmd || [];\n window.googletag.cmd.push(function () {\n window.googletag.pubads().setTargeting('permutive', 'gaming');\n googletag.enableServices();\n console.log( `3) pubads called with segment data `)// check\n });\n}", "function checkContinue() {\n \t\tloopOn = defaultTrue( currentPart.loop );\n \tif ( loopOn ) requestAnimFrame( demo_loop );\n }", "function isMediaElementActive(){\n\t\t\t\t\n\t\treturn(typeof mejs != \"undefined\");\n\t}", "doCaptchaAlarm() { this.playSound('captchaAlarm'); }", "function check(){\n var music = document.getElementById(\"Game_bg\");\n if(dealerFund <= 0){\n $(\"#newGame,#gameOver\").show();\n document.getElementById(\"whoWin\").src = \"../Media/youWin.png\";\n $(\"#d10,#d20,#d30,#dealOpen\").hide();\n $(\"#Game_bg\").removeAttr(\"loop\");\n $(\"#Game_bg\").attr(\"src\",\"../Media/Audio_You_Win.ogg\");\n if(!musicOn){\n music.pause();\n }\n }\n else if(playerFund <= 0){\n $(\"#newGame,#gameOver\").show();\n document.getElementById(\"whoWin\").src = \"../Media/youLose.png\";\n $(\"#d10,#d20,#d30,#dealOpen\").hide();\n $(\"#Game_bg\").removeAttr(\"loop\");\n $(\"#Game_bg\").attr(\"src\",\"../Media/Audio_You_Lose.ogg\");\n if(!musicOn){\n music.pause();\n }\n }\n}", "async _startInterstitialAd(options) {\n if (this.requestRunning) {\n this.eventBus.broadcast(\"AD_IS_ALREADY_RUNNING\", { status: \"warning\" });\n return;\n }\n\n this.requestRunning = true;\n\n let autoPlayOptions = await this._initDisplayContainerWithAutoPlay();\n\n await this._loadInterstitialAd({ ...autoPlayOptions, ...options });\n\n try {\n if (autoPlayOptions.autoplayRequiresMute) this.adsManager.setVolume(0);\n\n // Initialize the ads manager.\n this.adsManager.init(\n this.options.width,\n this.options.height,\n google.ima.ViewMode.NORMAL\n );\n\n // Start to play the creative.\n this.adsManager.start();\n } catch (error) {\n // An error may be thrown if there was a problem with the VAST response.\n this._onError(error);\n throw error;\n }\n }", "function is_playing(player)\n{\n\tif(player['OPP'])\n\t\treturn true;\n\treturn false;\n}", "function userPlay(){\n\t\tvar target = $(event.target).attr('id');\n\t\tif (target == hole){\n\t\t\tbark.play();\n\t\t\tscore++;\n\t\t\ttallyScore();\n\t\t} else {\n\t\t\twoof.play();\t\n\t\t}\n\t}", "get isPlaying() {}", "function playButton(){\n\t\n\tif(Titanium.Network.online == true){\n\t\tif (audioPlayer.playing){\n\t audioPlayer.pause();\n\t }else if(audioPlayer.paused){\n\t \taudioPlayer.start();\n\t }else{\n\t \taudioPlayer.start();\n\t }\n\t}\t\n}", "function playNextPhase(phaseDelay)\n{\n\tphaseNumber++;\n\tplayPhase(phaseNumber, phaseDelay);\n\t//after playing phase, allow user to try\n\tclickNumber = 0;\n}", "function checkDealLock () {\n /* check the deal lock */\n if (dealLock > 0) {\n timeoutID = window.setTimeout(checkDealLock, 100);\n } else {\n gamePhase = eGamePhase.AITURN;\n \n /* Set up main button. If there is not pause for the human\n player to exchange cards, and someone is masturbating, and\n the card animation speed is to great, we need a pause so\n that the masturbation talk can be read. */\n if (humanPlayer.out && getNumPlayersInStage(STATUS_MASTURBATING) > 0 && ANIM_DELAY < 100) {\n allowProgression();\n } else {\n continueDealPhase();\n }\n }\n}", "function isPlaying(playElem) {\n return !playElem.paused && !playElem.ended && 0 < playElem.currentTime;\n}", "_relayPlayedEvent(sound) {\n this._relayEvent('audio-played', sound);\n }", "onPlayStateChange() {}", "function Play(){\n\t\tDebug.Log(\"Playing?\");\n\t\tplaying = true;\n\t\tBotReady();\n\t}", "function playWrap () {\r\n ( isAutoplayButtonClicked && isAutoplay) ? isAutoplayButtonClicked = false : isAutoplayButtonClicked = true;\r\n play();\r\n }", "function startVideoContent()\n{\n app.log(2, 'startVideoContent');\n setTimeout(function()\n {\n Callcast.AddSpot({spotReplace: 'first-unoc', spotNodup: 1, spotType: 'youtube',\n ytid: 'ZAvL3j3hOCU', // youtube is a conference\n spotDivId: 'demo-video-1'\n });\n }, 1000);\n setTimeout(function()\n {\n Callcast.AddSpot({spotReplace: 'last-unoc', spotNodup: 1, spotType: 'youtube',\n ytid: 'BW44KXIu7Q8', // Daphne Koller coursera interview\n spotDivId: 'demo-video-2'\n });\n }, 1000);\n return false;\n}", "function checkInPublishPopup() {\r\n if (xpathFirst('//div[contains(@class,\"aid_' + SCRIPT.appNo +'\")]') &&\r\n /connect\\/uiserver/.test(window.location.href)) {\r\n setGMTime('postTimer', '00:10');\r\n window.setTimeout(handlePublishing, 3000);\r\n return true;\r\n }\r\n return false;\r\n}", "function respondEvent(uh)\r\n{\r\nuh.addEventListener(\r\n \"click\",\r\n function() {\r\n findEmbed();\r\n return false;\r\n },\r\n false\r\n);\r\n}", "function playAttackAudio() {\n buttonAudio.play();\n }", "audioEndedHandler(event){\n if(this.autoPlay){\n this.next();\n }\n }", "function onPlaying() {\n if (element && isStalled() && element.playbackRate === 0) {\n const event = document.createEvent('Event');\n event.initEvent('waiting', true, false);\n element.dispatchEvent(event);\n }\n }", "function isPlayerReady(player) {\n return player && typeof player.playVideo === 'function';\n}", "function playTurn() {\r\n\tif(battleInProgress == 0) {\r\n\t\tvar playbutton = document.getElementById('app377144924760_playbutton');\t\r\n\t\tclickElement(playbutton);\r\n\t\tbattleInProgress = 1;\r\n\t\t// Start loop to check for battle status after 3 seconds\r\n\t\t// There is a loop within this to check if AJAX has loaded\r\n\t\tsetTimeout(loopWhileBattle, 3000);\r\n\t}\r\n}", "static function AdToServe(name, handler) {\n\t\tvar unityPlayer = new AndroidJavaClass(\"com.unity3d.player.UnityPlayer\");\n\t\tvar activity = unityPlayer.GetStatic.<AndroidJavaObject>(\"currentActivity\");\n\t\t\n\t\tactivity.Call(\"runOnUiThread\", new AndroidJavaRunnable(function()\n \t{\n\t\t\tvar presageClass = new AndroidJavaClass(WPRESAGE_ID);\n\t\t\tvar presage = presageClass.CallStatic.<AndroidJavaObject> (\"getInstance\");\n\t\t\tvar proxy = new WHandlerProxy (handler);\n\t\t\tpresage.Call(\"adToServe\", name, proxy);\n\t\t}));\n\t}", "function playAudioFile() {\n if (!getInCallStatus()) {\n songAudio.play();\n console.log(\"Lullaby player: playing\");\n isPlaying = true;\n }\n else {\n console.log(\"Lullaby player: In call, lullaby playing skipped\");\n }\n}", "function canAutoplay()\n {\n\n\n // IE11 now returns undefined again for window.chrome\n // and new Opera 30 outputs true for window.chrome\n // but needs to check if window.opr is not undefined\n // and new IE Edge outputs to true now for window.chrome\n // and if not iOS Chrome check\n // so use the below updated condition\n var isChromium = window.chrome;\n var winNav = window.navigator;\n var vendorName = winNav.vendor;\n var isOpera = typeof window.opr !== \"undefined\";\n var isIEedge = winNav.userAgent.indexOf(\"Edge\") > -1;\n var isFirefox = winNav.userAgent.indexOf(\"Firefox\") > -1;\n var isIOSChrome = winNav.userAgent.match(\"CriOS\");\n\n // most browsers allow autoplay\n var response = true;\n\n\n // detect chrome browser\n if (\n isChromium !== null &&\n typeof isChromium !== \"undefined\" &&\n vendorName === \"Google Inc.\" &&\n isOpera === false &&\n isIEedge === false\n ) {\n // is Google Chrome\n response = false;\n } else if (\n isFirefox !== null &&\n typeof isFirefox !== \"undefined\" &&\n isIOSChrome === false &&\n isOpera === false &&\n isIEedge === false\n ) {\n // is Firefox\n response = false;\n }\n\n\n return response;\n\n\n }", "playSound(soundID) { return null; }", "function podPress_html5_count(url, id) {\r\n\t\tif ( typeof podPressHTML5sec == 'string' && podPressHTML5sec != '' ) { // if statistics are enabled then podPressHTML5sec exists and is an not-empty string \r\n\t\t\tvar startTime = document.getElementById( id ).currentTime;\r\n\t\t\tif (startTime < 0.1) { // count only if the player has been started at the position < 0.1 seconds\r\n\t\t\t\tjQuery.ajax({\r\n\t\t\t\t\tasync: true,\r\n\t\t\t\t\turl: podPressBackendURL + 'podpress_backend.php',\r\n\t\t\t\t\ttype: 'POST',\r\n\t\t\t\t\tdataType: 'text',\r\n\t\t\t\t\tdata: 'action=getrealurl&url='+encodeURIComponent(url)+'&_ajax_nonce=' + podPressHTML5sec\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function checkIfHandedOff(){\n if (tagpro.players[currentlyScoring].dead){\n timer = clearInterval(timer);\n timer = setInterval(searchForScorer,10);\n }\n}", "function detectOrWait() {\n\t\tvar gamepads = navigator.getGamepads();\n\n\t\tvar detected = false;\n\n\t\tfor (var i = 0; i < gamepads.length; i++) {\n\t\t\tif (gamepads[i]) {\n\t\t\t\tcreatePad(gamepads[i]);\n\t\t\t\tdetected = true;\n\t\t\t}\n\t\t}\n\n\t\tif (detected) {\n\t\t\teid('gamepads').className = '';\n\t\t\trunAnim(true);\n\t\t} else {\n\t\t\teid('no-gamepads').className = '';\n\t\t}\n\t}", "playAudio() {}", "function isSublease(aid) {\n if (aid == null || aid == 0) {\n return true;\n }else {\n return false;\n }\n}", "function getAd()\n{\n}" ]
[ "0.7274701", "0.6780306", "0.65186673", "0.6486319", "0.64084524", "0.6333651", "0.63009614", "0.62665886", "0.6166618", "0.61660665", "0.60781246", "0.6064204", "0.6017403", "0.59900767", "0.5947726", "0.59465486", "0.5868963", "0.5852208", "0.5833559", "0.5817933", "0.5806191", "0.5787065", "0.57749254", "0.577138", "0.5768449", "0.57490206", "0.5734176", "0.5717076", "0.5709019", "0.5706848", "0.56820905", "0.5668393", "0.5668393", "0.5667115", "0.5665621", "0.5655597", "0.5648645", "0.56374055", "0.563569", "0.5589346", "0.5569036", "0.556446", "0.5563693", "0.5545324", "0.5544787", "0.552029", "0.55193514", "0.55178946", "0.5515121", "0.55141366", "0.55076486", "0.54738253", "0.5467596", "0.5447637", "0.5433531", "0.54313207", "0.54272497", "0.54210526", "0.542071", "0.54140073", "0.54115504", "0.54097784", "0.5409143", "0.5392553", "0.5390598", "0.5385956", "0.53824586", "0.53800756", "0.5377637", "0.53635263", "0.53594065", "0.5353019", "0.53488356", "0.5342009", "0.5322694", "0.53209215", "0.53189516", "0.53158593", "0.53104883", "0.5310148", "0.53051597", "0.5302786", "0.52957386", "0.5292188", "0.528995", "0.52829754", "0.5281784", "0.52745116", "0.52722657", "0.527204", "0.52699536", "0.5266979", "0.5260611", "0.52583736", "0.52553296", "0.5251497", "0.5250991", "0.52462715", "0.52432525", "0.5237765" ]
0.62139755
8
Follow mouse movement and draws them to canvas
function draw(ev, gl, canvas, a_Position, u_FragColor) { var x = ev.clientX; var y = ev.clientY var rect = ev.target.getBoundingClientRect(); //Remove last 2 array inputs if (g_lines.length > 2) { g_lines.splice(g_lines.length - 2, g_lines.length - 1); } // Convert to canvas coordinate x = ((x - rect.left) - canvas.width / 2) / (canvas.width / 2); y = (canvas.height / 2 - (y - rect.top)) / (canvas.height / 2); g_lines.push(x); g_lines.push(y); gl.clear(gl.COLOR_BUFFER_BIT); //Draw points on Canvas for (var i = 0; i < g_points.length; i++) { var xy = g_points[i]; var rgba = g_colors[i]; // Pass the position of a point to a_Position variable gl.vertexAttrib3f(a_Position, xy[0], xy[1], 0.0); // Pass the color of a point to u_FragColor variable gl.uniform4f(u_FragColor, rgba[0], rgba[1], rgba[2], rgba[3]); // Draw gl.drawArrays(gl.POINTS, 0, g_points.length); }; n = initVertexBuffers(ev, gl, canvas, a_Position, n); if (n < 0) { console.log('Failed to set the positions of the vertices'); return; } gl.drawArrays(gl.LINE_STRIP, 0, n); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderCanvas() {\n if (drawing) {\n ctx.moveTo(lastPos.x, lastPos.y);\n ctx.lineTo(mousePos.x, mousePos.y);\n ctx.stroke();\n lastPos = mousePos;\n }\n }", "function renderCanvas() {\n if (drawing) {\n ctx.moveTo(lastPos.x, lastPos.y);\n ctx.lineTo(mousePos.x, mousePos.y);\n ctx.stroke();\n lastPos = mousePos;\n }\n }", "function renderCanvas() {\n if (drawing) {\n ctx.moveTo(lastPos.x, lastPos.y);\n ctx.lineTo(mousePos.x, mousePos.y);\n ctx.stroke();\n lastPos = mousePos;\n }\n }", "function renderCanvas()\n {\n if (drawing)\n {\n context.moveTo(lastPos.x, lastPos.y);\n context.lineTo(mousePos.x, mousePos.y);\n context.stroke();\n lastPos = mousePos;\n }\n }", "function renderCanvas() {\n if (drawing) {\n ctx.beginPath();\n ctx.moveTo(lastPos.x, lastPos.y);\n ctx.lineTo(mousePos.x, mousePos.y);\n ctx.closePath();\n ctx.stroke();\n\n lastPos = mousePos;\n }\n}", "function renderCanvas() {\n\t\tif (drawing) {\n\t\t\tctx.moveTo(lastPos.x, lastPos.y);\n\t\t\tctx.lineTo(mousePos.x, mousePos.y);\n\t\t\tctx.stroke();\n\t\t\tlastPos = mousePos;\n\t\t}\n\t}", "function renderCanvas() {\n\t\tif (drawing) {\n\t\t\tctx.moveTo(lastPos.x, lastPos.y);\n\t\t\tctx.lineTo(mousePos.x, mousePos.y);\n\t\t\tctx.stroke();\n\t\t\tlastPos = mousePos;\n\t\t}\n\t}", "function renderCanvas() {\n\t\tif (drawing) {\n\t\t\tctx.moveTo(lastPos.x, lastPos.y);\n\t\t\tctx.lineTo(mousePos.x, mousePos.y);\n\t\t\tctx.stroke();\n\t\t\tlastPos = mousePos;\n\t\t}\n\t}", "function renderCanvas() {\n\t\tif (drawing) {\n\t\t\tctx.moveTo(lastPos.x, lastPos.y);\n\t\t\tctx.lineTo(mousePos.x, mousePos.y);\n\t\t\tctx.stroke();\n\t\t\tlastPos = mousePos;\n\t\t}\n\t}", "function mousemove() {\n if (isMouseDown) {\n draw();\n }\n}", "function canvas_mouseDown(){\r\n drawing = true;\r\n context.moveTo(event.pageX, event.pageY);\r\n context.beginPath();\r\n}", "function draw() {\n //ctx.clearRect(0,0,canvas.width, canvas.height);\n ctx.fillStyle = \"rgba(255,255,255,0.1)\";\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n\n ctx.fillStyle = \"rgba(0,255,255,0.8)\";\n ctx.fillRect(mouse.xOut - 20, mouse.yOut - 20, 40, 40);\n ctx.fillStyle = \"rgb(0,0,0)\";\n ctx.fillRect(mouse.xOut - 2, mouse.yOut - 2, 4, 4);\n\n ctx.fillStyle = \"rgba(255,255,0,0.8)\";\n ctx.fillRect(mouse.xOver - 20, mouse.yOver - 20, 40, 40);\n ctx.fillStyle = \"rgb(0,0,0)\";\n ctx.fillRect(mouse.xOver - 2, mouse.yOver - 2, 4, 4);\n\n ctx.fillStyle = \"rgb(255,0,0)\";\n ctx.fillRect(mouse.xDown - 15, mouse.yDown - 15, 30, 30);\n ctx.fillStyle = \"rgb(0,0,0)\";\n ctx.fillRect(mouse.xDown - 2, mouse.yDown - 2, 4, 4);\n\n ctx.fillStyle = \"rgba(0,0,255,0.8)\";\n ctx.fillRect(mouse.xUp - 15, mouse.yUp - 15, 30, 30);\n ctx.fillStyle = \"rgb(0,0,0)\";\n ctx.fillRect(mouse.xUp - 2, mouse.yUp - 2, 4, 4);\n\n /// actual cursor\n ctx.fillStyle = \"rgb(100,100,255)\";\n ctx.strokeStyle = \"rgb(0,0,100)\";\n circle(mouse.x, mouse.y, 10);\n ctx.stroke();\n\n ctx.strokeStyle = \"rgba(0, 0, 0, 0.25)\";\n ctx.lineWidth = 1;\n\n if (mouse.isMouseDragged) {\n ctx.save();\n ctx.strokeStyle = \"rgba(100,100,100,0.07)\";\n ctx.fillStyle = ctx.strokeStyle;\n ctx.lineWidth = 15;\n ctx.lineCap = \"round\";\n\n var edgeIntersect = mouseDraggedOut(mouse.xDown, mouse.yDown, mouse.x, mouse.y, \"rgba(0, 0, 255, 1)\", 2);\n if (edgeIntersect.x === undefined || edgeIntersect.y === undefined) {\n edgeIntersect.x = mouse.x;\n edgeIntersect.y = mouse.y;\n }\n line(mouse.xDown, mouse.yDown, edgeIntersect.x, edgeIntersect.y);\n ctx.strokeStyle = \"rgba(0,0,0,0.07)\";\n circle(mouse.xDown, mouse.yDown, 20);\n circle(edgeIntersect.x, edgeIntersect.y, 20);\n ctx.lineWidth = 1;\n ctx.stroke();\n\n ctx.restore();\n } else {\n ctx.save();\n ctx.strokeStyle = \"rgba(0,0,0,1)\";\n ctx.lineWidth = 1;\n line(mouse.xDown, mouse.yDown, mouse.xUp, mouse.yUp);\n ctx.restore();\n }\n}", "function canvas_mouseMove(e) {\n // Update the mouse co-ordinates when moved\n getMousePos(e);\n\n // Draw a dot if the mouse button is currently being pressed\n if (mouseDown==1) {\n drawLine(ctx,mouseX,mouseY,14);\n //neu zum testen\n if(mouseX > bereichDarunter && mouseX < bereichDarueber){\n ctx.clearRect(window.innerWidth/6, 0, window.innerWidth/1.5, window.innerHeight);\n }\n }\n\n}", "function follow_mouse(ev,gl,canvas,a_Position){\n \n if(index<2) return;\n var x = ev.clientX; //x coordinate of a mouse pointer\n var y = ev.clientY; // y coordinate of a mouse pointer\n var rect = ev.target.getBoundingClientRect();\n \n //remove previous points from array\n if(index > 2) {\n index-=2;\n }\n\n \n // Convert coordinates to canvas plane\n x = ((x-rect.left)-canvas.width/2)/(canvas.width/2);\n y = (canvas.height/2-(y-rect.top))/(canvas.height/2);\n \n //store coordinates in xy_points array\n xy_points[index]=x;\n index++;\n xy_points[index]=y;\n index++; \n \n // clear <canvas>\n gl.clear(gl.COLOR_BUFFER_BIT);\n\n \n for(var i=0; i<xy_points.length; i+=2){\n var xy = xy_points[i];\n //pass the position of a point to a_Position variable\n gl.vertexAttrib3f(a_Position, xy_points[i], xy_points[i+1],0.0);\n }\n \n //set the positions of vertices\n var n = initVertexBuffers(ev, gl, canvas, a_Position, n);\n if (n < 0) {\n console.log('Failed to set the positions of the vertices');\n return;\n }\n\n gl.drawArrays(gl.POINTS, 0, ((index)/2)); //Draw points \n gl.drawArrays(gl.LINE_STRIP, 0, index/2);//Draw lines \n}", "function renderCanvas2() {\n\n if (drawing) {\n ctx.moveTo(lastPos.x, lastPos.y);\n ctx.lineTo(mousePos.x, mousePos.y);\n ctx.stroke();\n lastPos = mousePos;\n }\n}", "function sketchpad_mouseMove(e) { \n // Update the mouse co-ordinates when moved\n getMousePos(e);\n\n // Draw a line if the mouse button is currently being pressed\n if (mouseDown==1) {\n drawLine(ctx, mouseX, mouseY);\n }\n}", "function draw(e) {\n // stop the function if they are not mouse down\n if(!isDrawing) return;\n //listen for mouse move event\n\n //console.log(e);\n\n ctx.beginPath(); //Begins a path, or resets the current path\n ctx.moveTo(lastX, lastY); //Moves the path to the specified point in the canvas, without creating a line\n ctx.lineTo(e.offsetX, e.offsetY); //Adds a new point and creates a line to that point from the last specified point in the canvas\n ctx.stroke(); //Actually draws the path you have defined\n [lastX, lastY] = [e.offsetX, e.offsetY]; // return the xy coordinate of the mouse pointer \n }", "function draw() {\n if (mouseIsPressed) {\n stroke(currentColor);\n strokeWeight(currentStroke)\n line(mouseX, mouseY, pmouseX, pmouseY);\n }\n}", "function mymousemove(e){\r\n\r\nvar currentX = e.clientX-canvas.offsetLeft;\r\nvar currentY = e.clientY-canvas.offsetTop;\r\nif(mouseevents==\"mousedown\"){\r\n\r\nctx.beginPath();\r\nctx.strokeStyle=color;\r\nctx.lineWidth=width;\r\nctx.arc(currentX, currentY, 40, 0, 360);\r\nctx.stroke();\r\n\r\n}\r\nlast_x=currentX;\r\nlast_y=currentY;\r\n\r\n}", "function sketchpad_mouseMove(e) { \n // Update the mouse co-ordinates when moved\n getMousePos(e);\n\n // Draw a dot if the mouse button is currently being pressed\n if (mouseDown==1) {\n drawDot(ctx,mouseX,mouseY,6);\n }\n }", "function canvasMouseMove(e) {\n\tblockus.setMousePosition(getCursorPosition(e));\n}", "function move(ev, gl, canvas) {\r\n if (buttonC === true){\r\n var x = ev.clientX; //x coord of mouse\r\n var y = ev.clientY; //y coord of mouse\r\n var z = 0; //z coord of mouse\r\n var rect = ev.target.getBoundingClientRect();\r\n\r\n //translates cooridinates based on canvas size\r\n x = 500*((x - rect.left) - canvas.width/2) / (canvas.width/2);\r\n y = 500*(canvas.height/2 - (y - rect.top)) / (canvas.height/2);\r\n\r\n if (stop === false){\r\n //push coords onto array\r\n points.push(x); points.push(y); points.push(z);\r\n pointColor.push(0.0); pointColor.push(1.0); pointColor.push(0.0);\r\n }\r\n \r\n //draw \r\n drawClicked(gl);\r\n \r\n if (stop === false) {\r\n //pop off last mouse position from array\r\n points.pop(); points.pop(); points.pop();\r\n pointColor.pop(); pointColor.pop(); pointColor.pop(); \r\n }\r\n }\r\n}", "handlemouseMove(e) {\n const rect = this.canvas.getBoundingClientRect();\n if (this.flag) {\n this.prevX = this.currX;\n this.prevY = this.currY;\n this.currX = e.clientX - rect.left;\n this.currY = e.clientY - rect.top;\n this.draw(this.template, this.ctx);\n }\n }", "function sketchpad_mouseMove(e) { \n\n // Update the mouse co-ordinates when moved\n getMousePos(e);\n\n // Draw a dot if the mouse button is currently being pressed\n if (g_mouseDown==1) {\n drawDot(g_ctx, g_mouseX, g_mouseY, 12);\n }\n}", "function sketchpad_mouseMove(e) {\n // Update the mouse co-ordinates when moved\n getMousePos(e);\n\n // Draw a dot if the mouse button is currently being pressed\n if (mouseDown==1) {\n drawDot(ctx,mouseX,mouseY,1);\n }\n}", "function sketchpad_mouseMove(e) {\n // Update the mouse co-ordinates when moved\n getMousePos(e);\n // checkCoordinates(mouseX,mouseY);\n // Draw a dot if the mouse button is currently being pressed\n if (mouseDown==1) {\n drawDot(ctx,mouseX,mouseY,12);\n }\n}", "function updateMousePosition(event){\n // get position on page of canvas\n var rect = canvas.getBoundingClientRect();\n var root = document.documentElement;\n\n // Get the mouse location - the document scrolling and bounding\n mouseX = event.clientX - rect.left - root.scrollLeft;\n mouseY = event.clientY - rect.top - root.scrollTop;\n\n // carCheat();\n \n}", "function canvas_mouseUp() {\n mouseDown=0;\n\n // Reset lastX and lastY to -1 to indicate that they are now invalid\n lastX=-1;\n lastY=-1;\n\n //Canvas should be cleared when stopping the touch\n /*drawLine(ctx,mouseX,mouseY,12);*/\n /*ctx.clearRect(window.innerWidth/6, 0, window.innerWidth/1.5, window.innerHeight);*/\n /*ctx.clearRect(0, 0, ctx.innerWidth, ctx.window.innerHeight);*/\n /*ctx.clearLine(0, 0, ctx.width, ctx.height);*/\n /*ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);*/\n}", "function sketchpad_mouseMove (e) {\n // Update the mouse co-ordinates when moved\n getMousePos(e)\n // Draw a dot if the mouse button is currently being pressed\n if (mouseDown == 1) {\n drawDot(mouseX, mouseY, 8, r, g, b, a)\n connection.invoke('UpdateCanvas', mouseX, mouseY, r, g, b, a).catch(function (err) {\n return console.error(err.toString())\n })\n }\n}", "function draw(e){\n if(!isDrawing) return; // only do the rest of the code if mouse is down\n\n console.log(\"mouse is moving: \",e);\n \n ctx.strokeStyle = `hsl(${hue}, 100%, 50%)`; // setting color acording to HUE\n ctx.lineJoin = \"round\";\n ctx.lineCap = \"round\"; \n //ctx.lineWidth = 10; // we can set it to hue width, so it changes also\n\n ctx.beginPath();\n ctx.moveTo(lastX,lastY);\n ctx.lineTo(e.offsetX,e.offsetY);\n ctx.stroke();\n \n // to make new line start from the end of the previous line\n // lastX = e.offsetX;\n // lastY = e.offsetY;\n // OR write it as\n [lastX, lastY] = [e.offsetX, e.offsetY];\n\n hue++; // increment color value, if it gets out of 360 range it will start from beginning 960 % 360\n if(hue >= 360){\n hue = 0; // reset hue value when it gets to 360\n }\n\n\n if(ctx.lineWidth >= 100 || ctx.lineWidth <= 1){\n direction = !direction; // flip direction\n }\n\n if(direction){\n ctx.lineWidth++;\n } else{\n ctx.lineWidth--;\n }\n\n\n }", "function updateMouse(event)\r\n{\r\n\tvar rect = canvas.getBoundingClientRect();\r\n\tmouse.x = event.clientX - rect.left;\r\n mouse.y = event.clientY - rect.top;\r\n}", "function onMouseDown(e){\n drawing = true;\n current.x = e.clientX;\n current.y = e.clientY;\n }", "function drawMouse() {\n //needed otherwise if mouse not on canvas returns error when first loading\n if(!mouse) return;\n if (!towerExists(mouse.x, mouse.y)) {\n var range = towerClasses[currentTower].prototype.range;\n var r = towerClasses[currentTower].prototype.r;\n context.beginPath();\n //transperency\n context.globalAlpha = 0.2;\n context.arc(mouse.x,mouse.y,range, 0, 2*Math.PI);\n if(towerAllowed(mouse.x,mouse.y)) context.fillStyle='yellow';\n else context.fillStyle = 'red';\n context.fill();\n context.globalAlpha = 1;\n context.beginPath();\n context.arc(mouse.x,mouse.y,r, 0, 2*Math.PI);\n context.fillStyle = towerClasses[currentTower].prototype.color;\n context.fill();\n }\n}", "function draw() {\n //comment this back in to see a dynamic animation!!\n // if (mouseIsPressed) {\n // square(mouseX, mouseY, 90);\n // } else {\n // circle(mouseX, mouseY, 90);\n // }\n}", "function mousemove(e) {\n\tif (!e) var e = event;\n\t\tstate.canvasX = e.pageX - state.canvas.offsetLeft;\n state.canvasY = e.pageY - state.canvas.offsetTop;\n state.context.strokeStyle = state.penColor;\n state.context.lineWidth = state.penWidth;\n if (isDrawing) {\n state.context.lineTo(state.canvasX, state.canvasY);\n state.context.stroke();\n console.log(isDrawing);\n }\n}", "function onMouseMove(e) {\n console.log(e);\n draw(e);\n}", "function startDrawing(e) {\n\tcontext.moveTo(e.clientX, e.clientY);\n\tlastDrawing.push(new Array(e.clientX, e.clientY));\n\tdraw = true;\n\tmouseDraw(e);\n}", "function canvas_mouseDown() {\n mouseDown=1;\n drawLine(ctx,mouseX,mouseY,12);\n\n}", "sketchpad_mouseMove(e) {\n const { touchStack } = this.state\n // Update the mouse co-ordinates when moved\n this.getMousePos(e);\n // Draw a dot if the mouse button is currently being pressed\n if (this.mouseDown == 1) {\n\t \tconst timestamp = (new Date()).getTime()\n this.drawDot(this.mouseX,this.mouseY)\n touchStack.push([this.mouseX,this.mouseY, timestamp])\n this.setState({touchStack})\n }\n }", "draw() {\n //draw the pen trace\n let colour = colourPicker.selectedColour;\n let p5Colour = p5Instance.color(colour.r, colour.g, colour.b, colour.a);\n this.command.context.chain.stroke(p5Colour);\n super.draw();\n\n this.command.context.chain.push();\n\n //draw the mouse pointer\n this.command.context.chain.strokeWeight(1);\n this.command.context.chain.circle(\n this.command.context.chain.mouseX,\n this.command.context.chain.mouseY,\n this.command.thickness,\n );\n this.command.context.chain.pop();\n }", "function onMouseMove(e){\n if (!drawing) { return; }\n drawLine(current.x, current.y, e.clientX, e.clientY, current.color, getLineWidth(), true);\n current.x = e.clientX;\n current.y = e.clientY;\n }", "function draw() {\n // Make sure the mouse position is set everytime\n // draw() is called.\n var x = mouse.x,\n y = mouse.y;\n\n // This loop is where all the 90s magic happens\n dots.forEach(function(dot, index, dots) {\n var nextDot = dots[index + 1] || dots[0];\n\n dot.x = x;\n dot.y = y;\n dot.draw();\n x += (nextDot.x - dot.x) * .6;\n y += (nextDot.y - dot.y) * .6;\n\n });\n}", "function draw() {\n // Make sure the mouse position is set everytime\n // draw() is called.\n var x = mouse.x,\n y = mouse.y;\n\n // This loop is where all the 90s magic happens\n dots.forEach(function(dot, index, dots) {\n var nextDot = dots[index + 1] || dots[0];\n\n dot.x = x;\n dot.y = y;\n dot.draw();\n x += (nextDot.x - dot.x) * .5;\n y += (nextDot.y - dot.y) * .5;\n\n });\n}", "update(){\n if(followMouse){\n this.x = mouse.x;\n this.y = mouse.y;\n }\n else{\n this.x = this.x + this.dirX;\n this.y = this.y + this.dirY;\n // checking if position gets out of bounds,\n // moving it back to the opposite end if it is the case\n if(this.x > canvas.width + frameWidth*frameSize/2){\n this.x -= canvas.width + frameWidth*frameSize;\n }\n else if (this.x < -frameWidth*frameSize/2){\n this.x += canvas.width + frameWidth*frameSize;\n }\n if(this.y > canvas.height + frameHeight*frameSize/2){\n this.y -= canvas.height + frameHeight*frameSize;\n }\n else if (this.y < -frameHeight*frameSize/2){\n this.y += canvas.height + frameHeight*frameSize;\n }\n }\n }", "function mouseMoved(){\n stroke(r, g, b, 120);\n strokeWeight(5);\n fill(r, g, b, 100);\n ellipse(mouseX, mouseY, 10);\n}", "function update() \n\t\t\t{\n\t\t\t\tif (canFollow)\n\t\t\t\t{\n\t\t\t\t\tvar point = e.globalToLocal(stage.mouseX, stage.mouseY);\n\t\t\t\t\ttool.set ({x:point.x, y:point.y});\n\t\t\t\t}\n\t\t\t\tif (dragging)\n\t\t\t\t{\n\t\t\t\t\tvar yPos = carGrabbed.rotation == 180 ? -25 : 25;\n\t\t\t\t\tvar point = e.globalToLocal(stage.mouseX, stage.mouseY);\n\t\t\t\t\tcarGrabbed.set ({x:point.x, y:point.y + yPos});\n\t\t\t\t}\n\t\t\t}", "function startDrawing(event) {\n isDrawing = true;\n [lastX, lastY] = [event.offsetX, event.offsetY];\n}", "mouseMove(prev, pt) {}", "function draw() {\n // Only If the window is in focus ...\n if (mouseX != 0 && mouseY != 0) {\n mousepos.set(mouseX, mouseY);\n // Normalizing the result means a slow approch to the endpoint\n direction = mousepos.sub(midpoint).normalize();\n midpoint.add(direction);\n createProjection(width / 2, height / 2, midpoint.x, midpoint.y)\n }\n}", "function draw(event) {\n if (isDrawing) {\n ctx.strokeStyle = `hsl(${hue}, 100%, 50%)`;\n ctx.beginPath();\n // start from\n ctx.moveTo(lastX, lastY);\n // go to\n ctx.lineTo(event.offsetX, event.offsetY);\n ctx.stroke();\n [lastX, lastY] = [event.offsetX, event.offsetY];\n groove();\n } // else do nothing\n}", "function drawOnMouse(){\n ctx.fillRect(\n mouseX - 5,\n mouseY - 5,\n 10,\n 10\n )\n}", "function movePoint(event) {\n if(moveMode == 1)\n {\n // sets the x and y position relative to the drawing canvas\n var rect = canvas.getBoundingClientRect();\n var x = event.clientX - rect.left;\n var y = event.clientY - rect.top;\n // update the current points x and y positions to the new cursor coordinates\n positions[pointX] = x;\n positions[pointY] = y;\n highlightPoint = [positions[pointX], positions[pointY]];\n drawMethod();\n } \n}", "draw(e) {\n\n if (this.mouseIsDown) {\n this.ctx.lineWidth = 3;\n this.ctx.lineCap = 'round';\n this.ctx.strokeStyle = 'yellow';\n this.ctx.lineTo(e.offsetX, e.offsetY);\n this.ctx.stroke();\n this.isSigned = true;\n\n }\n\n }", "setPosition(e) {\n\n this.mouseIsDown = true;\n this.ctx.beginPath();\n this.ctx.moveTo(e.offsetX, e.offsetY);\n\n // Ajouter un event pour commencer à dessiner lorsq'on deplace la souris //\n this.carte.signElt.addEventListener('mousemove', (e) => { this.draw(e) });\n\n }", "function mouseMove(event) {\r\n drawStarsMove(event.clientX, event.clientY);\r\n}", "startdraw(ev) {\n this.is_drawing = true;\n var rect = this.canvas.getBoundingClientRect();\n this.ctx.beginPath();\n this.ctx.lineWidth = 5;\n this.ctx.lineCap = 'round';\n this.ctx.strokeStyle = 'red';\n var x = ev.pageX - rect.left;\n var y = ev.pageY - rect.top;\n this.ctx.moveTo(x, y);\n ev.preventDefault();\n }", "function draw(event) {\n if(!isDrawing) return; // Stop the function from running when 'mousedown' is not active!\n\n console.log(event);\n \n ctx.strokeStyle = `hsl(${hue}, 100%, 50%)`;\n ctx.beginPath();\n // Start from:\n ctx.moveTo(lastX, lastY);\n // Go to: (* offsetX returns the x-coordinate of the mouse pointer, relative to the target element *)\n ctx.lineTo(event.offsetX, event.offsetY);\n ctx.stroke();\n // Update variables' coordinates\n [lastX, lastY] = [event.offsetX, event.offsetY] // Destructuring an array.\n\n hue++;\n if(hue >= 360) {\n hue = 0;\n }\n\n if(ctx.lineWidth >= 52 || ctx.lineWidth <= 1) {\n direction = !direction;\n }\n\n if(direction) {\n ctx.lineWidth++;\n } else {\n ctx.lineWidth--;\n }\n}", "startTrackMousePosition() {\n this.canvasObject.canvas.addEventListener(\"mousemove\",\n this.callbackFunctions.trackMousePosition);\n }", "function mouseDraw(event) {\n // stop if not mouse down\n if (!isDrawing) return;\n\n // * set the stroke color\n ctx.strokeStyle = color;\n\n // draw the line\n ctx.beginPath();\n ctx.moveTo(lastX, lastY);\n // console.log(lastX, lastY);\n // console.log(event.offsetX, event.offsetY);\n\n ctx.lineTo(event.offsetX * 2, event.offsetY * 2);\n ctx.stroke();\n\n // reset lastX and lastY to be current event's offsetX and offsetY\n [lastX, lastY] = [event.offsetX * 2, event.offsetY * 2];\n}", "function drawCursor() {\n cursorContext.clearRect(0, 0, cursorCanvas.width, cursorCanvas.height);\n\n cursorContext.beginPath();\n cursorContext.arc(mouseX, mouseY, mouseWidth, 0, 2 * Math.PI, true);\n cursorContext.fillStyle = '#FF6A6A'\n cursorContext.fill();\n cursorContext.lineWidth = 1;\n cursorContext.strokeStyle = \"black\"\n cursorContext.stroke();\n }", "function draw() {\n window.requestAnimationFrame(draw);\n\n // reduce R if mouse isn't on screen\n var dr = config.returnSpeed;\n if (!bMouseOver && R!==0) {\n dr = (Math.abs(R) < 0.01) ? 0.01 : R * dr;\n R -= dr;\n }\n\n // move all eyes\n for (var e=0; e<eyes.length; e++) {\n eyes[e].movePupil(R, THETA);\n }\n\n}", "mouseMove(x, y) {}", "function mousePressed(){\n\tnext = 0;\n\tdrawing = true;\n\tlast.x = mouseX;\n\tlast.y = mouseY;\n\tlines.push(new Line());\n}", "function touchMoved() {\n strokeWeight(10);\n stroke(252, 74, 26);\n\n line(mouseX, mouseY, pmouseX, pmouseY);\n return false;\n}", "function draw(){\n if (ONSCREEN && STAGE == 0){\n if (!MOUSEDOWN){\n Strokes.push(new Stroke(COLOR))\n }\n MOUSEDOWN = true\n Strokes[Strokes.length-1].points.push(new Point(Math.round(EX), Math.round(EY), COLOR))\n }\n}", "static movingMouse(canvas, offsetX){\r\n\r\n\t}", "function draw(e) {\n // mouse left button must be pressed\n if (e.buttons !== 1) return;\n\n ctx.lineWidth = 5;\n ctx.lineCap = 'round';\n ctx.strokeStyle = '#000000';\n\n // TODO: implement the drawing functionality\n ctx.moveTo(pos.x, pos.y);\n setPosition(e);\n ctx.lineTo(pos.x, pos.y);\n ctx.stroke();\n window.canvas_coordinates.push([pos.x,pos.y])\n }", "function point() {\n ctx.beginPath();\n ctx.arc(mouse.x, mouse.y, 0.01, 0, 2 * Math.PI, false);\n //ctx.moveTo(mouse.x, mouse.y);\n //ctx.lineTo(mouse.x+0.01, mouse.y+0.01);\n ctx.strokeStyle = currentColor;\n ctx.lineWidth = brushSize;\n ctx.stroke();\n }", "onMouseMove(coord, event) {\n if (this.mouseUp == false) {\n this.contextDraft.clearRect(0, 0, canvasDraft.width, canvasDraft.height);\n this.contextDraft.strokeStyle = rgbaColor;\n this.contextDraft.fillStyle = \"transparent\";\n this.contextDraft.lineWidth = lWidth;\n this.contextDraft.beginPath();\n this.contextReal.beginPath();\n this.contextDraft.moveTo(this.startX[0], this.startY[0]);\n var i;\n for (i = 0; i < this.startX.length; i++) {\n this.contextReal.lineTo(this.startX[i], this.startY[i]);\n this.contextDraft.lineTo(this.startX[i], this.startY[i]);\n }\n this.contextDraft.lineTo(coord[0], coord[1]);\n \n this.contextDraft.fill();\n this.contextDraft.stroke();\n this.contextReal.stroke();\n }\n }", "function draw() {\n\t// Draw a line from the center of the screen to mouse position\n stroke(255, 255, 255, 50);\n strokeWeight(10);\n // line(pmouseX, pmouseY, mouseX, mouseY);\n line(width / 2, height / 2, mouseX, mouseY);\n\n\t// Draw a circle at the mouse position\n // fill(255, 48, 244);\n // stroke(255, 255, 255);\n\t// strokeWeight(1);\n\t// ellipse(mouseX, mouseY, 40, 40);\n\n\t// Bullseye!\n\t// noStroke();\n // fill(255, 17, 231);\n\t// ellipse(mouseX, mouseY, 50, 50);\n // fill(255, 255, 255);\n\t// ellipse(mouseX, mouseY, 40, 40);\n // fill(255, 17, 231);\n\t// ellipse(mouseX, mouseY, 30, 30);\n // fill(255, 255, 255);\n\t// ellipse(mouseX, mouseY, 20, 20);\n // fill(255, 17, 231);\n\t// ellipse(mouseX, mouseY, 10, 10);\n}", "function update(){\r\n\tcanvas = document.getElementById('canvas');\r\n\tcanvas.focus();\r\n\tif (canvas.getContext) {\r\n\t\tc = canvas.getContext('2d');\r\n\t\tc.clearRect(0, 0, screen.width, screen.height);\r\n\t\tdrawMap();\r\n\t\tdrawObjects();\r\n\t\tif(mouse.draggedObject!=null){\r\n\t\t\tdrawDraggedObject();\r\n\t\t}\r\n\t\tif(mouse.select){\r\n\t\t\tc.strokeStyle = \"#ffffff\";\r\n\t\t\tc.strokeRect(mouse.clickedPosition.x, mouse.clickedPosition.y, mouse.coord.x - mouse.clickedPosition.x, mouse.coord.y - mouse.clickedPosition.y);\r\n\t\t}\r\n\t\tdrawSelectedUnitsHealth();\r\n\t\tdrawUi();\r\n\t\t//...\r\n\t\tdebug();\r\n\t}\r\n}", "draw(){\n this.ctx.strokeStyle = this.getStrokeColor();\n this.ctx.lineWidth = 2;\n this.ctx.beginPath()\n this.ctx.moveTo(this.prevx, this.prevy);\n this.ctx.lineTo(this.x, this.y)\n this.ctx.stroke()\n this.ctx.fill();\n }", "function playTheMove(moveLocation) {\n\n\n var moveLocation = document.getElementById( positions[moveLocation] );\n\n //depening on the computers counter draw its move on the position canvas\n if(computerCounter === \"O\") {\n drawCircle(moveLocation);\n winDetection(moveLocation);\n } else {\n drawCross(moveLocation);\n winDetection(moveLocation);\n }\n\n $(\"canvas\").css(\"pointer-events\", \"auto\");\n\n\n\n\n\n }", "startDrawing() {\n\n this.clearCanvas();\n //use because funtions was lost in methods\n var that = this;\n //event of mous click\n this.canvas.addEventListener(\"mousedown\", function(e) {\n //show confirmation button after first click\n document.getElementById(\"station-confirmer-btn\").style.display = \"initial\";\n document.getElementById(\"canvas\").style.borderColor = \"#5CB85C\";\n //switch on\n that.test = true;\n //begin of drawing\n that.context.beginPath();\n that.context.moveTo(e.offsetX, e.offsetY);\n //get the movement of mouse\n that.canvas.addEventListener(\"mousemove\", function(event) {\n //condition to check switch\n if (that.test === true) {\n var x = event.offsetX;\n var y = event.offsetY;\n //draw line to every next point od movement\n that.context.lineTo(x, y);\n that.context.stroke();\n }\n });\n });\n //mouse up event\n this.canvas.addEventListener(\"mouseup\", function() {\n //switch of\n that.test = false;\n });\n }", "function move (e){\n\t\t\t\t// Determine the mouse position in the canvas (X,Y)\n\t\t\t\tvar mouseX;\n\t\t\t\tvar mouseY;\n\t\t\t\t// if the user is painting\n\t\t\t\tif(paint){\n\t\t\t\t\tmouseX = e.pageX - this.offsetParent.offsetLeft;// - this.offsetLeft;\n\t\t\t\t\tmouseY = e.pageY - this.offsetParent.offsetTop;// - this.offsetTop;\n\t\t\t\t\t// Save the mouse position and redraw the image\n\t\t \t\taddClick(mouseX, mouseY, true);\n\t\t \t\tredraw();\n\t\t \t\t}\n\t\t\t}", "draw() {\n this.padTOuched = true;\n this.ctx.beginPath();\n this.ctx.moveTo(this.prevX, this.prevY);\n this.ctx.lineTo(this.currX, this.currY);\n this.ctx.stroke();\n this.ctx.closePath();\n }", "drawCursor() {\r\n let cursorSize = 15;\r\n this.ctx.save();\r\n this.ctx.beginPath();\r\n this.ctx.strokeStyle = \"black\";\r\n this.ctx.lineWidth = 4;\r\n this.ctx.shadowBlur = 2;\r\n this.ctx.shadowColor = 'white';\r\n this.ctx.moveTo(this.player.mousePos.x - cursorSize - this.player.slashCooldown / 2, this.player.mousePos.y);\r\n this.ctx.lineTo(this.player.mousePos.x + cursorSize + this.player.slashCooldown / 2, this.player.mousePos.y);\r\n this.ctx.moveTo(this.player.mousePos.x, this.player.mousePos.y - cursorSize - this.player.slashCooldown / 2);\r\n this.ctx.lineTo(this.player.mousePos.x, this.player.mousePos.y + cursorSize + this.player.slashCooldown / 2);\r\n this.ctx.stroke();\r\n this.ctx.closePath();\r\n this.ctx.beginPath();\r\n cursorSize = 14;\r\n this.ctx.shadowBlur = 0;\r\n this.ctx.lineWidth = 2;\r\n if (this.player.charge >= this.player.chargeCost * 2) {\r\n this.ctx.strokeStyle = \"lightblue\";\r\n } else if (this.player.charge >= this.player.chargeCost) {\r\n this.ctx.strokeStyle = \"red\";\r\n } else {\r\n this.ctx.strokeStyle = \"yellow\";\r\n }\r\n this.ctx.moveTo(this.player.mousePos.x - cursorSize - this.player.slashCooldown / 2, this.player.mousePos.y);\r\n this.ctx.lineTo(this.player.mousePos.x + cursorSize + this.player.slashCooldown / 2, this.player.mousePos.y);\r\n this.ctx.moveTo(this.player.mousePos.x, this.player.mousePos.y - cursorSize - this.player.slashCooldown / 2);\r\n this.ctx.lineTo(this.player.mousePos.x, this.player.mousePos.y + cursorSize + this.player.slashCooldown / 2);\r\n this.ctx.stroke();\r\n this.ctx.closePath();\r\n \r\n this.ctx.font = '20px sans-serif';\r\n this.ctx.fillStyle = 'white';\r\n \r\n // === DEBUG SHOW ANGLE\r\n // let angle = Math.atan2(this.player.aim.y, this.player.aim.x);\r\n // this.ctx.fillText(`Angle: ${angle / Math.PI * 180}`, this.player.mousePos.x, this.player.mousePos.y);\r\n\r\n this.ctx.restore();\r\n }", "function draw(e) {\r\n if (!isDrawing) return; // stop the fn from running when they are not moused down\r\n console.log(e);\r\n ctx.strokeStyle = `hsl(${hue}, 100%, 50%)`; //https://mothereffinghsl.com/\r\n ctx.beginPath(); //start from \r\n ctx.moveTo(lastX, lastY);//go to wherever the user's mouse is actually moving\r\n ctx.lineTo(e.offsetX, e.offsetY);\r\n ctx.stroke();//calling stroke to see the line(s)\r\n \r\n [lastX, lastY] = [e.offsetX, e.offsetY]; //once we're done with draw function, we want to update lastX and lastY variables to be wherever they were\r\n hue++;//increment (changing color)\r\n if (hue >= 360) {//reset\r\n hue = 0;\r\n }\r\n\r\n if (ctx.lineWidth >= 100 || ctx.lineWidth <= 1) { //if it's greater than 100 or less than 1->flip the direction\r\n direction = !direction; //flip the direction\r\n }\r\n //line width, depending on what the current direction is, we either increment the line width or decrement it\r\n if (direction) {\r\n ctx.lineWidth++; //if direction is true, line width goes up\r\n } else {\r\n ctx.lineWidth--; //otherwise the line width goes down\r\n }\r\n}", "function mousemove(evt) {\n // console.log('mousemove', evt);\n const x = evt.screenX;\n const dx = lastX - x;\n lastX = x;\n // console.log('mousemove', dx);\n observerAngle += dx * dAngledX;\n const {imageIndex, offsetAngle} = getImageAndAngle(observerAngle);\n setView({imageIndex, offsetAngle});\n}", "function draw()\n{\n // draw a series of ellipses locked to a given Y position and the mouseX position\n ellipse(mouseX, 100, 25, 25);\n ellipse(mouseX, 200, 25, 25);\n ellipse(mouseX, 300, 25, 25);\n}", "function draw() {\n // Make sure the mouse position is set everytime\n // draw() is called.\n var x = mouse.x,\n y = mouse.y,\n a = nn.a,\n b = nn.b;\n \n // \n trailDots.forEach(function(dot, index, dots) {\n var nextDot = dots[index + 1] || dots[0];\n \n dot.x = x;\n dot.y = y;\n dot.draw();\n x += (nextDot.x - dot.x) * .7;\n y += (nextDot.y - dot.y) * .7;\n\n });\n \n nnDots.forEach(function(dot, index, dots) {\n var nextDot = dots[index + 1] || dots[0];\n \n dot.a = a;\n dot.b = b;\n dot.draw();\n a += (nextDot.a - dot.a) * .6;\n b += (nextDot.b - dot.b) * .6;\n });\n}", "function draw() {\n // Only proceed if the peer connection is started\n if (!spw.isConnectionStarted()) {\n console.log('returning');\n return;\n }\n\n // Get and send my mouse position over peer connection\n myMousePosition = { x: mouseX, y: mouseY };\n spw.send(myMousePosition);\n\n // Draw a white background with alpha of 50\n background(255, 50);\n\n // Don't draw the stroke\n noStroke();\n\n // Use color x for my mouse position\n fill(colors.x);\n\n // Draw an ellipse at my mouse position\n ellipse(myMousePosition.x, myMousePosition.y, size);\n\n // Make sure there is a partner mouse position before drawing\n if (typeof partnerMousePosition !== 'undefined') {\n // Use color y for my parter's mouse position\n fill(colors.y);\n\n // Draw an ellipse at my partner's mouse position\n ellipse(partnerMousePosition.x, partnerMousePosition.y, size);\n }\n}", "function mainLoop(){\n if(mouse.click && mouse.move && mouse.pos_prev){\n socket.emit('draw_line',{line:[mouse.pos,mouse.pos_prev],txtcolor:color});\n mouse.move = false;\n }\n mouse.pos_prev = {x:mouse.pos.x,y:mouse.pos.y};\n setTimeout(mainLoop,25);\n}", "function mousePressed(){\n strokeWeight(controllers.pointStroke);\n stroke(255);\n current = createVector(mouseX, mouseY);\n point(mouseX, mouseY);\n}", "function mousePressed() {\r\n target.position.x = mouseX;\r\n target.position.y = mouseY;\r\n recordtime = lifetime;\r\n}", "function draw(e) {\n if (!isDrawing) return;\n ctx.beginPath(); //start line path\n ctx.moveTo(X, Y);\n ctx.lineTo(e.offsetX, e.offsetY);\n ctx.stroke();\n [X, Y] = [e.offsetX, e.offsetY]; //define coords\n }", "function CanvasMousemove(action) {\n if (mouseMovement != null) {\n var x = action.offsetX / scrollOffset[2] + scrollOffset[0] - resizeOffset[0];\n var y = action.offsetY / scrollOffset[2] + scrollOffset[1] - resizeOffset[1];\n if (!mouseMoved) {\n mouseMoved = x > mouseMovement[0] + DragPrecision || x < mouseMovement[0] - DragPrecision ||\n y > mouseMovement[1] + DragPrecision || y < mouseMovement[1] - DragPrecision;\n }\n if (mouseMoved) {\n var diffX = x - mouseMovement[0];\n var diffY = y - mouseMovement[1];\n Redraw();\n if (selectedSpots.length > 0) {\n // Draw Shadow Spots at New Location\n for (var _i = 0, selectedSpots_1 = selectedSpots; _i < selectedSpots_1.length; _i++) {\n var spot = selectedSpots_1[_i];\n DrawCross(ctx, spot.X + diffX, spot.Y + diffY, shadowShade);\n }\n }\n else {\n // Draw Shadow Pieces at New Location\n ctx.translate(diffX, diffY);\n for (var _a = 0, selectedPieces_1 = selectedPieces; _a < selectedPieces_1.length; _a++) {\n var piece = selectedPieces_1[_a];\n DrawShape(ctx, piece, [ConvertToHexi(shadowShade)]);\n }\n ctx.translate(-diffX, -diffY);\n }\n }\n }\n}", "function handle_mouse(ev, canvas, context) {\n let rect = ev.target.getBoundingClientRect();\n let mx = ev.clientX; // x mouse\n let my = ev.clientY; // y mouse\n let cx = rect.left; // canvas position x\n let cy = rect.top; // canvas position y\n let wx = canvas.width; // canvas width x\n let wy = canvas.height; // canvas width y\n\n // transform in matrix-vector notation\n //\n // ┏ 1 0 ┓ ┏ 2/w_x 0 ┓ ┏ m_x - c_x ┓ ┏ - 1.0 ┓\n // ┗ 0 -1 ┛ ( ┗ 0 2/w_y ┛ ┗ m_y - c_y ┛ + ┗ - 1.0 ┛ )\n //\n let x_premul = 2.0 / wx;\n let y_premul = -2.0 / wy;\n let screen_x = x_premul*(mx-cx) - 1.0;\n let screen_y = y_premul*(my-cy) + 1.0;\n\n context.mouse = { x : screen_x, y : screen_y };\n context.animation_on = !context.animation_on;\n \n // currently, no explicite update calls\n}", "mouseMoveF(e){\n if (this.isDrawing == true) {\n if(this.toolss == \"pen\" || this.toolss == \"eraser\" || this.toolss == \"marker\" || this.toolss == \"oil\" || this.toolss == \"watercolor\"){\n this.drawF(this.ctx, this.x, this.y, e.offsetX, e.offsetY);\n }\n else{\n this.tempctx.clearRect(0, 0, this.width, this.height);\n this.drawF(this.tempctx, this.xStart, this.yStart, this.x, this.y); \n }\n }\n this.mouseLocation(e);\n if(this.isMoving == true){\n \n if(this.toolss == \"paste\" || this.toolss == \"rotate-right-90-deg\" || this.toolss == \"rotate-left-90-deg\" || this.toolss == \"rotate-180-deg\" || this.toolss == \"rotate-flip-hor\" || this.toolss == \"rotate-flip-ver\" || this.toolss == \"newText\"){\n this.tempctx.clearRect(0, 0,9000, 9000);\n this.tempctx.putImageData(this.selectedAre, this.x, this.y);\n }\n else if(this.toolss == \"file-open\"){\n this.tempctx.clearRect(0, 0,9000, 9000);\n this.tempctx.drawImage(this.imageUpload,this.x,this.y);\n }\n else{\n this.tempctx.clearRect(0, 0,9000, 9000);\n this.b = this.x-this.mouseUpStartX;\n this.t = this.y-this.mouseUpStartY;\n this.drawF(this.tempctx, this.x, this.y, this.mouseUpFinishX+this.b, this.mouseUpFinishY+this.t);\n } \n }\n}", "function mousemoveForCanvas(event)\n{\n var x, y;\n \n // Get the mouse position relative to the canvas element.\n /*if (event.layerX || event.layerX == 0) { // Firefox BUT not relative to canvas element (depending on page's css displays etc)\n x = event.layerX;\n y = event.layerY;\n } else*/ if (event.offsetX || event.offsetX == 0) { // Opera and Chrome\n x = event.offsetX;\n y = event.offsetY;\n }\n\n //This event handler works like a drawing pencil which tracks the mouse \n //movements. We start drawing a path made up of lines.\n if(global_mouseButtonDown)\n {\n doDrawOnCanvas(x, y); //our canvas API magic\n }\n}", "onMouseUp(coord, event) {\n this.contextReal.strokeStyle = rgbaColor;\n this.contextReal.fillStyle = rgbaColor;\n this.contextReal.lineWidth = lWidth;\n this.contextReal.lineJoin = \"miter\";\n \n this.contextReal.lineTo(coord[0], coord[1]);\n this.origX = coord[0];\n this.origY = coord[1];\n this.startX.push(this.origX);\n this.startY.push(this.origY);\n if (Math.abs(this.origX - this.startX[0]) < 20 && Math.abs(this.origY - this.startY[0]) < 20 && this.startX.length > 1 && this.startY.length > 1) {\n this.mouseUp = true;\n this.contextDraft.clearRect(0,0,canvasDraft.width,canvasDraft.height);\n this.contextReal.fill();\n this.contextReal.stroke();\n cPush(); \n }\n }", "function CanvasMouseup(action) {\n if (mouseMoved) {\n var x = action.offsetX / scrollOffset[2] + scrollOffset[0] - resizeOffset[0];\n var y = action.offsetY / scrollOffset[2] + scrollOffset[1] - resizeOffset[1];\n var diffX = x - mouseMovement[0];\n var diffY = y - mouseMovement[1];\n if (selectedSpots.length > 0) {\n // Update Spots' Locations\n for (var _i = 0, selectedSpots_2 = selectedSpots; _i < selectedSpots_2.length; _i++) {\n var spot = selectedSpots_2[_i];\n spot.X = spot.XRight += diffX;\n spot.Y = spot.YDown += diffY;\n }\n }\n else {\n // Update Pieces' Spots Locations\n for (var _a = 0, selectedPieces_2 = selectedPieces; _a < selectedPieces_2.length; _a++) {\n var piece = selectedPieces_2[_a];\n for (var _b = 0, _c = piece.Data; _b < _c.length; _b++) {\n var spot = _c[_b];\n spot.X = spot.XRight += diffX;\n spot.Y = spot.YDown += diffY;\n }\n }\n }\n Redraw();\n }\n mouseMovement = null;\n mouseMoved = false;\n}", "function mouseDraw() {\n\n stroke(random(70, 110));\n strokeWeight(random(1,4));\n\n line(mouseX-random(0,50), mouseY, mouseX-random(0,20), mouseY);\n //line(mouseX-random(0,50), mouseY+10, mouseX+random(0,20), mouseY+10);\n\n stroke(random(100, 200));\n strokeWeight(random(1,4));\n\n line(mouseX-random(0,20), mouseY, mouseX+random(0,20), mouseY);\n line(mouseX+random(0,20), mouseY+10, mouseX+random(0,20), mouseY+10);\n\n stroke(random(70, 110));\n strokeWeight(random(1,4));\n\n //line(mouseX+random(0,50), mouseY, mouseX+random(0,20), mouseY);\n line(mouseX+random(0,50), mouseY+10, mouseX+random(0,20), mouseY+10);\n\n}", "function mouseupdates(e) {\n\tvar bounding_box=c_canvas.getBoundingClientRect();\n blob_pos_x=(e.clientX-bounding_box.left) *\n (c_canvas.width/bounding_box.width);\t\n blob_pos_y=(e.clientY-bounding_box.top) *\n\t\t\t\t(c_canvas.height/bounding_box.height);\t\n}", "function draw()\n{\n // erase the background\n background(0, 0, 0, 10);\n \n // draw an ellipse where the mouse is\n ellipse(mouseX, mouseY, 50, 50);\n}", "function click(){\n rect = leinwand.getBoundingClientRect();\n mouseX = event.clientX - rect.left;\n mouseY = event.clientY - rect.top;\n //draw();\n //context.fillStyle();\n context.fillRect(mouseX, mouseY, 40, 40);\n }", "function mouseDrawing() {\n brush.fillStyle = \"#39275B\";\n brush.strokeStyle = \"#C79900\"\n\n var lastPoint = undefined;\n canvas.addEventListener('mousedown', function(event){\n //select an input color\n var input = document.querySelector('#picker');\n brush.strokeStyle = input.value;\n\n lastPoint = {x: event.offsetX, y: event.offsetY}\n\n brush.beginPath();\n brush.moveTo(event.offsetX,event.offsetY);\n // brush.arc(x,y,5,0,2*Math.PI);\n brush.stroke();\n });\n\n canvas.addEventListener('mousemove', function(event){\n if(lastPoint){ //if we have a last point\n // brush.beginPath();\n // brush.arc(event.offsetX,event.offsetY,5,0,2*Math.PI);\n // brush.fill();\n brush.lineTo(event.offsetX, event.offsetY);\n brush.stroke();\n lastPoint.x = event.offsetX;\n lastPoint.y = event.offsetY;\n }\n });\n\n canvas.addEventListener('mouseup',function(event){\n lastPoint = undefined;\n })\n\n }", "update() {\n if (this.pressed) {\n this.x = mouseX;\n this.y = mouseY;\n }\n }", "function addMouseEvent() {\n document.addEventListener('mousemove', updateScreenCoords);\n\n // gsap's RAF, falls back to set timeout\n gsap.ticker.add(animateFace);\n\n blink.play();\n }", "function draw(){\n //clear the canvas\n ctx.clearRect(0,0, widthCanvas, heightCanvas);\n\n ctx.strokeStyle = \"black\";\n drawDot1();\n drawDot2();\n\n //the color-changing outer boarder - the color of the boarder will change if the mouse hit that wall\n ctx.translate(width/2-widthCanvas, -height/2);\n //left side\n ctx.beginPath();\n ctx.moveTo(20, 20);\n ctx.lineTo(20, heightCanvas - 20);\n if(mouse[0] < 20 && eventListenerStatus == true)\n ctx.strokeStyle = \"red\";\n else\n ctx.strokeStyle = \"black\";\n ctx.lineWidth = 5;\n ctx.stroke();\n\n //right side\n ctx.beginPath();\n ctx.moveTo(widthCanvas - 20, 20);\n ctx.lineTo(widthCanvas - 20, heightCanvas - 20);\n if(mouse[0] >window.innerWidth - 20 && eventListenerStatus == true)\n ctx.strokeStyle = \"red\";\n else\n ctx.strokeStyle = \"black\";\n ctx.lineWidth = 5;\n ctx.stroke();\n\n //top side\n ctx.beginPath();\n ctx.moveTo(20, 20);\n ctx.lineTo(widthCanvas - 20, 20);\n if(mouse[1] < 20 && eventListenerStatus == true)\n ctx.strokeStyle = \"red\";\n else\n ctx.strokeStyle = \"black\";\n ctx.lineWidth = 5;\n ctx.stroke();\n\n //bottom side\n ctx.beginPath();\n ctx.moveTo(20, heightCanvas - 20);\n ctx.lineTo(widthCanvas - 20, heightCanvas - 20);\n if(mouse[1] > window.innerHeight - 20 && eventListenerStatus == true)\n ctx.strokeStyle = \"red\";\n else\n ctx.strokeStyle = \"black\";\n ctx.lineWidth = 5;\n ctx.stroke();\n ctx.lineWidth = 1;\n\n if (firstFrame == null)\n firstFrame = 0;\n }", "_onMouseMove(event) {\n super._onMouseMove(event);\n if (event.data.createState >= 1) {\n let drawing = event.data.object;\n let [gx, gy] = [event.data.originalEvent.x, event.data.originalEvent.y];\n\n // If the cursor has moved close to the edge of the window\n this._panCanvasEdge(gx, gy);\n\n drawing.updateDragPosition(event.data.destination)\n drawing.refresh();\n event.data.createState = 2;\n }\n }" ]
[ "0.7522254", "0.75080335", "0.74913186", "0.7417376", "0.7409845", "0.7386347", "0.7386347", "0.7386347", "0.7386347", "0.7348065", "0.7115984", "0.7100368", "0.7097893", "0.7082986", "0.70583683", "0.70418555", "0.7035242", "0.69714904", "0.6946706", "0.69280875", "0.69204175", "0.6912563", "0.6893107", "0.6876563", "0.6853216", "0.68300533", "0.6826098", "0.68197113", "0.6806995", "0.6783412", "0.6782907", "0.6773856", "0.6750511", "0.67354864", "0.6722072", "0.6721922", "0.6700594", "0.66993487", "0.6695803", "0.66848946", "0.6679197", "0.6678342", "0.66627055", "0.66461957", "0.66360337", "0.66338074", "0.6631046", "0.66218936", "0.66128165", "0.66105163", "0.660086", "0.65823096", "0.65776294", "0.6576427", "0.6572881", "0.65720963", "0.65649635", "0.6561502", "0.655175", "0.6546227", "0.65459365", "0.65402174", "0.6539947", "0.65382504", "0.65358025", "0.65354925", "0.65213096", "0.6505586", "0.65051246", "0.6501304", "0.64941835", "0.64871514", "0.64814985", "0.6477036", "0.6467717", "0.6455987", "0.64433277", "0.6441074", "0.64344645", "0.6430768", "0.6423728", "0.6422128", "0.64164937", "0.6400774", "0.639081", "0.6390297", "0.63901174", "0.63868433", "0.63783216", "0.6373047", "0.6366896", "0.6360913", "0.63603747", "0.63603556", "0.6357726", "0.63479275", "0.63419276", "0.6339432", "0.6331588", "0.63247067", "0.6316165" ]
0.0
-1
================== Initialize Buffers =======================================
function initVertexBuffers(ev, gl, canvas, a_Position, n) { n = g_lines.length / 2; //Number of (x,y) pairs if (end === true) { n = g_points.length; //(x,y) point pairs } //Create buffer object var vertexBuffer = gl.createBuffer(); if (!vertexBuffer) { console.log('Failed to create the buffer object'); return -1; } //Bind buffer to target and write data into buffer object gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer); gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(g_lines), gl.STATIC_DRAW); //Initialize a_Position for shader var a_Position = gl.getAttribLocation(gl.program, 'a_Position'); if (a_Position < 0) { console.log('Failed to get the storage location of a_Position'); return -1; } gl.vertexAttribPointer(a_Position, 2, gl.FLOAT, false, 0, 0); gl.enableVertexAttribArray(a_Position); return n; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createBuffers() {\n this.createBuffer('COLOR')\n this.createBuffer('POSITION')\n }", "function loadBuffers() {\n // Array-ify\n var names = [];\n var paths = [];\n for (var name in BUFFERS_TO_LOAD) {\n var path = BUFFERS_TO_LOAD[name];\n names.push(name);\n paths.push(path);\n }\n bufferLoader = new BufferLoader(context, paths, function(bufferList) {\n for (var i = 0; i < bufferList.length; i++) {\n var buffer = bufferList[i];\n var name = names[i];\n BUFFERS[name] = buffer;\n loaded=loaded+1;\n }\n });\n bufferLoader.load();\n \n bufferLoaded=true;\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 loadBuffers() {\n \n// // Array-ify\n// var names = [];\n// var paths = [];\n\n// for (var i = 0; i < CLASSICAL_BUFFERS_TO_LOAD.length; i++) {\n// var path = CLASSICAL_BUFFERS_TO_LOAD[i];\n// names.push(i);\n// paths.push(path);\n// }\n\n new BufferLoader(context, CLASSICAL_BUFFERS_TO_LOAD, function(bufferList) {\n\n // console.log(\"Classical: Loading Complete\");\n CLASSICAL_BUFFERS = bufferList;\n\n }).load();\n\n// bufferLoader.load();\n\n// var names = [];\n// var paths = [];\n\n// for (var i = 0; i < BEAT_BUFFERS_TO_LOAD.length; i++) {\n// var path = BEAT_BUFFERS_TO_LOAD[i];\n// names.push(i);\n// paths.push(path);\n// }\n\n new BufferLoader(context, BEAT_BUFFERS_TO_LOAD, function(bufferList) {\n\n // console.log(\"Beats: Loading Complete\");\n BEAT_BUFFERS = bufferList;\n\n }).load();\n\n// bufferLoader.load();\n\n}", "function initBuffers(gl) {\n return { positions: gl.createBuffer(),\n offsets: gl.createBuffer(),\n normals: gl.createBuffer(),\n randomSeeds: gl.createBuffer(),\n rotationAxes: gl.createBuffer() };\n}", "function createBuffers() {\n\n indexBuffer = gl.createBuffer();\n verticesBuffer = gl.createBuffer();\n normalsBuffer = gl.createBuffer();\n texCoordBuffer = gl.createBuffer();\n}", "constructor(initializer) {\n if (typeof initializer === 'number') {\n this.buf = Buffer.alloc(initializer);\n this.size = 0;\n this.maxSize = initializer;\n } else {\n this.buf = initializer;\n this.size = this.maxSize = initializer.length;\n }\n this.pos = 0;\n }", "initBuffer() {\n\t\tlet data = this.model.mesh.concat(this.model.normals).concat(this.model.texCoord)\n\n\t\tgl.useProgram(program)\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, this.vbo)\n\t\tgl.bufferData(gl.ARRAY_BUFFER, new Float32Array(data), gl.STATIC_DRAW)\n\t}", "function setupBuffers() {\n myTerrain = new Terrain(64,-1,1,-1,1);\n myTerrain.loadBuffers();\n}", "function setupBuffers_NAff() {\n\n //Generate the vertex positions\n loadVertices();\n\n //Generate the vertex colors\n loadColors();\n}", "constructor(buffers, byteLength, options) {\n super(options);\n this.buffers = buffers;\n this.byteLength = byteLength;\n this.byteOffsetInCurrentBuffer = 0;\n this.bufferIndex = 0;\n this.pushedBytesLength = 0;\n // check byteLength is no larger than buffers[] total length\n let buffersLength = 0;\n for (const buf of this.buffers) {\n buffersLength += buf.byteLength;\n }\n if (buffersLength < this.byteLength) {\n throw new Error(\"Data size shouldn't be larger than the total length of buffers.\");\n }\n }", "constructor(buffers, byteLength, options) {\n super(options);\n this.buffers = buffers;\n this.byteLength = byteLength;\n this.byteOffsetInCurrentBuffer = 0;\n this.bufferIndex = 0;\n this.pushedBytesLength = 0;\n // check byteLength is no larger than buffers[] total length\n let buffersLength = 0;\n for (const buf of this.buffers) {\n buffersLength += buf.byteLength;\n }\n if (buffersLength < this.byteLength) {\n throw new Error(\"Data size shouldn't be larger than the total length of buffers.\");\n }\n }", "_initBuffer(data){\n\t\tthis.buffer=new Uint16Array(data); // buffer containing 16bit data\n\t\tconst size=data.length;\n\t\tfor(let i=0;i<size;i++){ // 8bit->16bit: 0~255 -> 0~65535\n\t\t\tthis.buffer[i]+=this.buffer[i]<<8; // *257\n\t\t}\n\t}", "function setupBuffers() {\n setupTerrainBuffers();\n}", "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 }", "function initBuffers1(gl, program) {\n var o = new Object();\n\n o.vertexBuffer = gl.createBuffer();\n o.vertexBuffer.num = 3;\n o.vertexBuffer.type = gl.FLOAT;\n\n o.normalBuffer = gl.createBuffer();\n o.normalBuffer.num = 3;\n o.normalBuffer.type = gl.FLOAT;\n\n o.colorBuffer = gl.createBuffer();\n o.colorBuffer.num = 4;\n o.colorBuffer.type = gl.FLOAT;\n\n o.indexBuffer = gl.createBuffer();\n \n return o;\n}", "initBuffers() {\n let controlPoints =\n //grau 1 em u e grau 1 em v\n [\n // u=1\n [\n [-0.5, 0, 0.5, 1],\n [-0.5, 0, -0.5, 1]\n\n ],\n //u=2\n [\n [0.5, 0, 0.5, 1],\n [0.5, 0, -0.5, 1]\n\n ],\n\n ];\n\n let surface = new CGFnurbsSurface(1, 1, controlPoints);\n this.object = new CGFnurbsObject(this.scene, this.npartsU, this.npartsV, surface);\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 }", "constructor(arrBuffer) {\n if (arrBuffer == null)\n this.buf = [];\n else\n this.buf = arrBuffer;\n this.offset = 0;\n }", "function initBuffers() {\n buffer = gl.createBuffer();\n bufferColor = gl.createBuffer();\n \n pos = gl.getAttribLocation(program, \"position\");\n color = gl.getAttribLocation(program, \"color\");\n\n perspective = gl.getUniformLocation(program, \"perspective\");\n translation = gl.getUniformLocation(program, \"translation\");\n rotation = gl.getUniformLocation(program, \"rotation\");\n scale = gl.getUniformLocation(program, \"scale\");\n size = 3;\n\n gl.enableVertexAttribArray(pos);\n gl.enableVertexAttribArray(color);\n mat4.translate(perscaleMatrix, perscaleMatrix, [0, 0, -2]);\n\n refreshBuffers()\n}", "function BufferLoader(context, urlList, callback) {\n this.context = context;\n this.urlList = urlList;\n this.onload = callback;\n this.bufferList = new Array();\n this.loadCount = 0;\n}", "function BufferLoader(context, urlList, callback) {\n this.context = context;\n this.urlList = urlList;\n this.onload = callback;\n this.bufferList = new Array();\n this.loadCount = 0;\n}", "closeAndStartNewBuffer_() {\n this.blocks_.push(new Uint8Array(this.currentBuffer_));\n this.currentBuffer_ = [];\n }", "initGLSLBuffers() {\n var attributeBuffer = this.gl.createBuffer();\n var indexBuffer = this.gl.createBuffer();\n\n if (!attributeBuffer || !indexBuffer) {\n console.log(\"Failed to create buffers!\");\n return;\n }\n\n this.gl.bindBuffer(this.gl.ARRAY_BUFFER, attributeBuffer);\n this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER, indexBuffer);\n }", "constructor(ringbuf) {\n if (ringbuf.type() != \"Uint8Array\") {\n throw \"This class requires a ring buffer of Uint8Array\";\n }\n // const SIZE_ELEMENT = 5;\n this.ringbuf = ringbuf\n }", "constructor () {\n super()\n this._buffer = Buffer.alloc(0)\n this._messages = []\n }", "function loadBuffers() {\n // Array-ify\n for (var name in BUFFERS_TO_LOAD) {\n var path = BUFFERS_TO_LOAD[name];\n names.push(name);\n paths.push(path);\n }\n var bufferLoader = new BufferLoader(context, paths, function(bufferList) {\n for (var i = 0; i < bufferList.length; i++) {\n var buffer = bufferList[i];\n var name = names[i];\n BUFFERS[name] = buffer;\n }\n });\n bufferLoader.load();\n\n\tfunction check_ready(){\n\t\tvar cnt = bufferLoader.loadCount;\n\t\tvar len = names.length;\n\n\t\t$('progress').val(Math.round((cnt/len) * 100));\n\n\t\tif(cnt == len){\n\t\t\tready();\n\t\t}else{\n\t\t\tsetTimeout(check_ready, 100);\n\t\t}\n\t}\n\n\tfunction ready(){\n\t\t$('form').fadeOut(1000);\n\t\tsetTimeout(function(){$('#kbd').fadeIn(1000);}, 1000);\n\t}\n\t\n setTimeout(check_ready, 100);\n}", "function BufferLoader(context, urlList, callback) {\n this.context = context;\n this.urlList = urlList;\n this.callback = callback;\n this.bufferList = [];\n this.loadCount = 0;\n}", "reset() {\n this.buffers = {\n front: new Buffer(this.width, this.height),\n back: new Buffer(this.width, this.height),\n };\n }", "function initBuffers() {\r\n // The vertices and indices for a sphere\r\n let [coords, indices] = unit_sphere();\r\n obj = createObject(coords, indices, false);\r\n}", "initBuffers() {\n this.vertices = [\n this.x1, this.y1, 0,\n this.x2, this.y1, 0,\n this.x2, this.y2, 0,\n this.x1, this.y2, 0\n ];\n\n this.indices = [\n 0, 1, 3,\n 2, 3, 1\n ];\n\n this.normals = [\n 0, 0, 1,\n 0, 0, 1,\n 0, 0, 1,\n 0, 0, 1\n ];\n\n let maxS = (this.x2 - this.x1) / this.ls;\n let maxT = (this.y2 - this.y1) / this.lt;\n\n this.texCoords = [\n 0, maxT,\n maxS, maxT,\n maxS, 0,\n 0, 0\n ];\n\n this.primitiveType = this.scene.gl.TRIANGLES;\n this.initGLBuffers();\n }", "function BufferLoader(context, urlList, callback) {\n this.context = context;\n this.urlList = urlList;\n this.onload = callback;\n this.bufferList = new Array();\n this.loadCount = 0;\n }", "function init_source_buffers() {\n console.log('Initializing new media source buffer');\n\n /* https://developers.google.com/web/fundamentals/media/mse/basics */\n URL.revokeObjectURL(video.src);\n\n video.currentTime = init_seek_ts / timescale;\n\n vbuf = ms.addSourceBuffer(video_codec);\n try {\n abuf = ms.addSourceBuffer(audio_codec);\n } catch(err) {\n set_fatal_error(\n 'Error: your browser does not support the audio format, ' +\n 'Opus in WebM, used by Puffer. Please refer to the FAQ and ' +\n 'try another browser or device on which Puffer is supported.'\n );\n report_error(0 /* init_id is not important */, 'audio not supported');\n }\n\n vbuf.addEventListener('updateend', function(e) {\n if (vbuf_couple.length > 0) {\n var data_to_ack = vbuf_couple.shift();\n /* send the last ack here after buffer length is updated */\n ws_client.send_client_ack('client-vidack', data_to_ack);\n }\n\n that.vbuf_update();\n });\n\n vbuf.addEventListener('error', function(e) {\n console.log('video source buffer error:', e);\n that.close();\n });\n\n vbuf.addEventListener('abort', function(e) {\n console.log('video source buffer abort:', e);\n });\n\n abuf.addEventListener('updateend', function(e) {\n if (abuf_couple.length > 0) {\n var data_to_ack = abuf_couple.shift();\n /* send the last ack here after buffer length is updated */\n ws_client.send_client_ack('client-audack', data_to_ack);\n }\n\n that.abuf_update();\n });\n\n abuf.addEventListener('error', function(e) {\n console.log('audio source buffer error:', e);\n that.close();\n });\n\n abuf.addEventListener('abort', function(e) {\n console.log('audio source buffer abort:', e);\n });\n\n /* try updating vbuf and abuf in case there are already pending chunks */\n that.vbuf_update();\n that.abuf_update();\n }", "initBuffer () {\n gl.useProgram(program);\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesVBO);\n\n // TODO: Übergebe hier sowohl das Mesh, als auch die Normalen an das VBO\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(this.mesh.concat(this.normals).concat(this.textureCoordinates)), gl.STATIC_DRAW);\n gl.uniformMatrix4fv(modelMatrixLoc, false, new Float32Array(this.modelMatrix));\n gl.uniformMatrix4fv(normalMatrixLoc, false, new Float32Array(this.normalMatrix));\n }", "function initBuffers(gl){\r\n\t//Sprite\r\n\tspriteVPB = gl.createBuffer();\r\n\tgl.bindBuffer(gl.ARRAY_BUFFER, spriteVPB);\r\n\tvar vertices = [\r\n\t\t0, -1, 0,\r\n\t\t1, -1, 0,\r\n\t\t1, 0, 0,\r\n\t\t0, 0, 0,\r\n\t];\r\n\t\r\n\tgl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.STATIC_DRAW);\r\n\tspriteVPB.itemSize = 3;\r\n\tspriteVPB.numItems = 4;\r\n\t\r\n\tspriteVTB = gl.createBuffer();\r\n\tgl.bindBuffer(gl.ARRAY_BUFFER, spriteVTB);\r\n\tvar texCoords = [\r\n\t\t0.0, 0.0,\r\n\t\t1.0, 0.0,\r\n\t\t1.0, 1.0,\r\n\t\t0.0, 1.0\r\n\t];\r\n\t\r\n\tgl.bufferData(gl.ARRAY_BUFFER, new Float32Array(texCoords), gl.STATIC_DRAW);\r\n\tspriteVTB.itemSize = 2;\r\n\tspriteVTB.numItems = 4;\r\n\t\r\n\tspriteVIB = gl.createBuffer();\r\n\tgl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, spriteVIB);\r\n\tvar spriteVertexIndices = [0, 1, 2,\t\t0, 2, 3];\r\n\tgl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(spriteVertexIndices), gl.STATIC_DRAW);\r\n\tspriteVIB.itemSize = 1;\r\n\tspriteVIB.numItems = 6;\r\n}", "function initBuffers_initBuffers(\n inputStream,\n imageWrapper,\n locator\n ) {\n var inputImageWrapper =\n imageWrapper ||\n new image_wrapper[\"a\" /* default */]({\n x: inputStream.getWidth(),\n y: inputStream.getHeight(),\n type: \"XYSize\",\n });\n\n if (true) {\n console.log(\n \"image wrapper size \".concat(inputImageWrapper.size)\n );\n }\n\n var boxSize = [\n Object(gl_vec2[\"clone\"])([0, 0]),\n Object(gl_vec2[\"clone\"])([0, inputImageWrapper.size.y]),\n Object(gl_vec2[\"clone\"])([\n inputImageWrapper.size.x,\n inputImageWrapper.size.y,\n ]),\n Object(gl_vec2[\"clone\"])([inputImageWrapper.size.x, 0]),\n ];\n barcode_locator[\"a\" /* default */].init(\n inputImageWrapper,\n locator\n );\n return {\n inputImageWrapper: inputImageWrapper,\n boxSize: boxSize,\n };\n }", "function creatingBuffer(){\n var buf256 = new Buffer.alloc(256);\n var octectBuffer = new Buffer.from([0x6f,0x63,0x74,0x65,0x74,0x73]);\n var UTF8buff = new Buffer.from(\"test text\",'utf-8');\n console.log(buf256)\n console.log(octectBuffer)\n console.log(UTF8buff)\n }", "initBuffers() \n\t{\n\n\t\tthis.vertices = [\n\t\t\tthis.vCoords[0][0], this.vCoords[0][1], this.vCoords[0][2],\n\t\t\tthis.vCoords[1][0], this.vCoords[1][1], this.vCoords[1][2],\n\t\t\tthis.vCoords[2][0], this.vCoords[2][1], this.vCoords[2][2],\n\t\t\tthis.vCoords[0][0], this.vCoords[0][1], this.vCoords[0][2],\n\t\t\tthis.vCoords[1][0], this.vCoords[1][1], this.vCoords[1][2],\n\t\t\tthis.vCoords[2][0], this.vCoords[2][1], this.vCoords[2][2]\n\t\t];\n\n\t\tthis.indices = [\n\t\t\t0, 1, 2,\n\t\t\t3, 5, 4\n\t\t];\n\n\t\tvar vecAB = [this.vCoords[1][0] - this.vCoords[0][0], this.vCoords[1][1] - this.vCoords[0][1], this.vCoords[1][2] - this.vCoords[0][2]];\n\t\tvar vecAC = [this.vCoords[2][0] - this.vCoords[0][0], this.vCoords[2][1] - this.vCoords[0][1], this.vCoords[2][2] - this.vCoords[0][2]];\n\t\tvar vecBC = [this.vCoords[2][0] - this.vCoords[1][0], this.vCoords[2][1] - this.vCoords[1][1], this.vCoords[2][2] - this.vCoords[1][2]];\n\n\t\tvar normalVector = [\n\t\t\tvecAB[1] * vecAC[2] - vecAB[2] * vecAC[1],\n\t\t\tvecAB[2] * vecAC[0] - vecAB[0] * vecAC[2],\n\t\t\tvecAB[0] * vecAC[1] - vecAB[1] * vecAC[0]\n\t\t];\n\n\t\tthis.normals = [\n\t\t\tnormalVector[0], normalVector[1], normalVector[2],\n\t\t\tnormalVector[0], normalVector[1], normalVector[2],\n\t\t\tnormalVector[0], normalVector[1], normalVector[2],\n\t\t\t-normalVector[0], -normalVector[1], -normalVector[2],\n\t\t\t-normalVector[0], -normalVector[1], -normalVector[2],\n\t\t\t-normalVector[0], -normalVector[1], -normalVector[2]\n\t\t];\n\n\t\t//based on the file given\n\t\tvar b = Math.sqrt(vecAC[0] ** 2 + vecAC[1] ** 2 + vecAC[2] ** 2);\n\t\tvar a = Math.sqrt(vecBC[0] ** 2 + vecBC[1] ** 2 + vecBC[2] ** 2);\n\t\tvar c = Math.sqrt(vecAB[0] ** 2 + vecAB[1] ** 2 + vecAB[2] ** 2);\n\n\t\tvar d = (a ** 2 - b ** 2 - c ** 2) / (-2 * c);\n\t\tvar sinAlfa = Math.sqrt(1 - (d / b) ** 2);\n\t\tvar h = b * sinAlfa;\n\n\t\tthis.c = c;\n\t\tthis.d = d;\n\t\tthis.h = h;\n\n\t\tthis.texCoords = [\n\t\t\t0, 1,\n\t\t\tthis.c, 1,\n\t\t\tthis.d, 1 - (this.h),\n\t\t\t0, 1,\n\t\t\tthis.c, 1,\n\t\t\tthis.d, 1 - (this.h)\n\t\t];\n\n\t\tthis.primitiveType = this.scene.gl.TRIANGLES;\n\t\tthis.initGLBuffers();\n\t}", "init()\n\t{\n\t\tinitVerticesNormalsTexturesIndexes();\n\n //Converts the values to buffers\n\t\tthis.vertexBuffer = getVertexBufferWithVertices(this.vertices);\n\t\tthis.colorBuffer = getVertexBufferWithVertices(this.colors);\n\t\tthis.indexBuffer = getIndexBufferWithIndices(this.indices);\n\n\t\t//Defines the position matrix of the object\n\t\tmat4.identity(this.mvMatrix);\n\t\tmat4.translate(this.mvMatrix, this.mvMatrix, vec3.fromValues(this.x, this.y, 0.0));\n\t}", "initWithArrayBuffer(message, offset = 0) {\n this.dv = new DataView(message)\n this.buff = message\n this.offset = offset\n this.byteLength = message.byteLength\n }", "function initBuffers() {\n\n\t// Vertex Coordinates\n\n\ttriangleVertexPositionBuffer = gl.createBuffer();\n\tgl.bindBuffer(gl.ARRAY_BUFFER, triangleVertexPositionBuffer);\n\tgl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.STATIC_DRAW);\n\ttriangleVertexPositionBuffer.itemSize = 3;\n\ttriangleVertexPositionBuffer.numItems = vertices.length / 3;\n\n\t// Associating to the vertex shader\n\n\tgl.vertexAttribPointer(shaderProgram.vertexPositionAttribute,\n\t\ttriangleVertexPositionBuffer.itemSize,\n\t\tgl.FLOAT, false, 0, 0);\n\n\t// Vertex Normal Vectors\n\n\ttriangleVertexNormalBuffer = gl.createBuffer();\n\tgl.bindBuffer(gl.ARRAY_BUFFER, triangleVertexNormalBuffer);\n\tgl.bufferData(gl.ARRAY_BUFFER, new Float32Array(normals), gl.STATIC_DRAW);\n\ttriangleVertexNormalBuffer.itemSize = 3;\n\ttriangleVertexNormalBuffer.numItems = normals.length / 3;\n\n\t// Associating to the vertex shader\n\n\tgl.vertexAttribPointer(shaderProgram.vertexNormalAttribute,\n\t\ttriangleVertexNormalBuffer.itemSize,\n\t\tgl.FLOAT, false, 0, 0);\n}", "constructor(props) {\n\t\tsuper(props);\n\t\tthis.bytes = Buffer.alloc(0);\n\t}", "bindRenderBuf() {\n\n const shaderSourceHash = [this._scene.canvas.canvas.id, this._scene._sectionPlanesState.getHash()].join(\";\");\n if (shaderSourceHash !== this._shaderSourceHash) {\n this._shaderSourceHash = shaderSourceHash;\n this._shaderSourceDirty = true;\n }\n\n if (this._shaderSourceDirty) { // TODO: Set this when hash changes\n this._buildShaderSource();\n this._shaderSourceDirty = false;\n this._programDirty = true;\n }\n\n if (this._programDirty) {\n this._buildProgram();\n this._programDirty = false;\n this._occlusionTestListDirty = true;\n }\n\n if (this._markerListDirty) {\n this._buildMarkerList();\n this._markerListDirty = false;\n this._positionsDirty = true;\n this._occlusionTestListDirty = true;\n }\n\n if (this._positionsDirty) { ////////////// TODO: Don't rebuild this when positions change, very wasteful\n this._buildPositions();\n this._positionsDirty = false;\n this._vbosDirty = true;\n }\n\n if (this._vbosDirty) {\n this._buildVBOs();\n this._vbosDirty = false;\n }\n\n if (this._occlusionTestListDirty) {\n this._buildOcclusionTestList();\n }\n\n {\n this._readPixelBuf = this._readPixelBuf || (this._readPixelBuf = new RenderBuffer(this._scene.canvas.canvas, this._scene.canvas.gl));\n this._readPixelBuf.bind();\n this._readPixelBuf.clear();\n }\n }", "function baseBuffer()\n{\n\n\tthis.fillState = new Object();\t// will hold the fill state of the buffer, in time and in bytes\n\tthis.fillState.bytes = 0;\n\tthis.fillState.seconds = 0;\t\t// only seconds are used in the time domain, feel free to use fractions\n\tthis.bufferSize = new Object(); // holds the size of the buffer\n\tthis.bufferSize.maxseconds = 0;\n\tthis.bufferSize.maxbytes = 0;\n\tthis.criticalState = new Object(); // used for signaling that we may run out of buffered data\n\tthis.criticalState.seconds = 0;\n\tthis.criticalState.bytes = 0;\n\t\n\tthis.underRunOccured = false;//$$!!! modified by origianl author \n\t\n\tthis.eventHandlers = new Object();\n\tthis.eventHandlers.handler = new Array();\n\tthis.eventHandlers.cntHandlers = 0;\n\t\n\t\n\t// buffer array, ring buffer ...\n\tthis.buffer = new Object;\n\tthis.buffer.array = new Array(); //$$ the actual buffer array that contains data array[i] contains data segment\n\tthis.buffer.first = 0;\n\tthis.buffer.last = 0;\n\tthis.buffer.size = 0;//$$ say the size is 100, then the values of buffer.first and buffer.last shall be between 0 - 100\n\tthis.streamEnded = false;\n\tthis.isOverlayBuffer = false;\t\t// Overlay buffers are only used to mimic the behaviour of an HTML element or a video player where we have no access to the buffer of the unit\n}", "function init () {\n window.AudioContext = window.AudioContext || window.webkitAudioContext;\n context = new AudioContext();\n\n bufferLoader = new BufferLoader(\n context, \n [\n \"https://whitebrandon.github.io/audio/sounds/correct_letter.wav\",\n \"https://whitebrandon.github.io/audio/sounds/wrong_letter.wav\",\n \"https://whitebrandon.github.io/audio/sounds/game_lost.wav\",\n \"https://whitebrandon.github.io/audio/sounds/game_won.wav\",\n \"https://whitebrandon.github.io/audio/sounds/keypress.wav\",\n ], \n finishedLoading\n );\n \n bufferLoader.load()\n }", "allocate() {\n if (!this.data) {\n let elements = this.width * this.height * this.depth * this.channels;\n\t\t\t\tthis.elements = elements;\n if (this.isFloat) {\n this.data = new Float32Array(elements);\n } else {\n this.data = new Uint8Array(elements);\n }\n }\n return this;\n }", "constructor() {\n\n this.buffered = false;\n this.program = null;\n this.buffer = null;\n this.vertices = null;\n\n this.color = [0, 0, 0, 1];\n\n this.loc = {\n x: 0,\n y: 0,\n z: 0\n };\n\n this.size = {\n width: 1,\n height: 1\n };\n\n this.rotation = {\n x: 0,\n y: 0,\n z: 0\n };\n\n\n }", "function initBuffers() {\n\n var vertices,\n textureCoords,\n vertexIndices,\n _w = t.tex.image.width / inst.parent.w,\n _h = t.tex.image.height / inst.parent.h;\n\n vertexPositionBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexPositionBuffer);\n vertices = [\n _w, _h, 0.0, -_w, _h, 0.0,\n _w, -_h, 0.0, -_w, -_h, 0.0\n ];\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.STATIC_DRAW);\n vertexPositionBuffer.itemSize = 3;\n vertexPositionBuffer.numItems = 4;\n\n vertexTextureCoordBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexTextureCoordBuffer);\n textureCoords = [\n // Front face\n 1.0, 0.0,\n 0.0, 0.0,\n 1.0, 1.0,\n 0.0, 1.0\n ];\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(textureCoords), gl.STATIC_DRAW);\n vertexTextureCoordBuffer.itemSize = 2;\n vertexTextureCoordBuffer.numItems = 6;\n\n vertexIndexBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, vertexIndexBuffer);\n vertexIndices = [\n 0, 1, 2, 0, 2, 3, // Front face\n ];\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(vertexIndices), gl.STATIC_DRAW);\n vertexIndexBuffer.itemSize = 1;\n vertexIndexBuffer.numItems = 6;\n }", "initBuffers() {\n var geometry = this.geometry;\n var dynamicOffset = 0;\n /**\n * Holds the indices of the geometry (quads) to draw\n *\n * @member {Uint16Array}\n * @private\n */\n this.indexBuffer = new Buffer_1.Buffer(WebGLSettings_1.WebGLSettings.createIndicesForQuads(this.size), true, true);\n geometry.addIndex(this.indexBuffer);\n this.dynamicStride = 0;\n for (var i = 0; i < this.dynamicProperties.length; ++i) {\n var property = this.dynamicProperties[i];\n property.offset = dynamicOffset;\n dynamicOffset += property.size;\n this.dynamicStride += property.size;\n }\n var dynBuffer = new ArrayBuffer(this.size * this.dynamicStride * 4 * 4);\n this.dynamicData = new Float32Array(dynBuffer);\n this.dynamicDataUint32 = new Uint32Array(dynBuffer);\n this.dynamicBuffer = new Buffer_1.Buffer(this.dynamicData, false, false);\n // static //\n var staticOffset = 0;\n this.staticStride = 0;\n for (var i$1 = 0; i$1 < this.staticProperties.length; ++i$1) {\n var property$1 = this.staticProperties[i$1];\n property$1.offset = staticOffset;\n staticOffset += property$1.size;\n this.staticStride += property$1.size;\n }\n var statBuffer = new ArrayBuffer(this.size * this.staticStride * 4 * 4);\n this.staticData = new Float32Array(statBuffer);\n this.staticDataUint32 = new Uint32Array(statBuffer);\n this.staticBuffer = new Buffer_1.Buffer(this.staticData, true, false);\n for (var i$2 = 0; i$2 < this.dynamicProperties.length; ++i$2) {\n var property$2 = this.dynamicProperties[i$2];\n geometry.addAttribute(property$2.attributeName, this.dynamicBuffer, 0, property$2.type === WebGLSettings_1.WebGLSettings.TYPES.UNSIGNED_BYTE, property$2.type, this.dynamicStride * 4, property$2.offset * 4);\n }\n for (var i$3 = 0; i$3 < this.staticProperties.length; ++i$3) {\n var property$3 = this.staticProperties[i$3];\n geometry.addAttribute(property$3.attributeName, this.staticBuffer, 0, property$3.type === WebGLSettings_1.WebGLSettings.TYPES.UNSIGNED_BYTE, property$3.type, this.staticStride * 4, property$3.offset * 4);\n }\n }", "function initBuffers() {\n // Create and bind VAO\n gl.vectorsVAO = gl.createVertexArray();\n gl.bindVertexArray(gl.vectorsVAO);\n\n // Load the vertex coordinate data onto the GPU and associate with attribute\n gl.posBuffer = gl.createBuffer(); // create position buffer\n gl.bindBuffer(gl.ARRAY_BUFFER, gl.posBuffer); // bind the position buffer\n gl.bufferData(gl.ARRAY_BUFFER, 100000*2*Float32Array.BYTES_PER_ELEMENT, gl.DYNAMIC_DRAW); // load the data into the position buffer\n gl.vertexAttribPointer(gl.program.aPosition, 2, gl.FLOAT, false, 0, 0); // associate the buffer with \"aPosition\" as length-2 vectors of floats\n gl.enableVertexAttribArray(gl.program.aPosition); // enable this set of data\n\n // Load the vertex color data onto the GPU and associate with attribute\n gl.colorBuffer = gl.createBuffer(); \n gl.bindBuffer(gl.ARRAY_BUFFER, gl.colorBuffer); \n gl.bufferData(gl.ARRAY_BUFFER, 100000*3*Float32Array.BYTES_PER_ELEMENT, gl.DYNAMIC_DRAW);\n gl.vertexAttribPointer(gl.program.aColor, 3, gl.FLOAT, false, 0, 0); // associate the buffer with \"aColor\" as length-3 vectors of floats\n gl.enableVertexAttribArray(gl.program.aColor);\n \n // Cleanup\n gl.bindVertexArray(null);\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\n}", "function initBuffers() {\n //3 stk 3D vertekser:\n let positions = new Float32Array([\n 0.0, 0.5, 0,\n -0.5, -0.5, 0,\n 0.5, -0.5, 0]);\n\n //Farge til verteksene:\n let colors = new Float32Array([\n 1.0, 0.0, 0.0, 1.0,\t\t//Rød (RgbA)\n 0.0, 1.0, 0.0, 1.0,\t\t//Grønn (rGbA)\n 0.0, 0.0, 1.0, 1.0]);\t//Blå \t(rgBA)\n\n //POSISJONSBUFRET: oppretter, binder og skriver data til bufret:\n positionBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, positions, gl.STATIC_DRAW);\n //Setter antall floats per verteks og antall vertekser i dette bufret:\n positionBuffer.itemSize = 3;\n positionBuffer.numberOfItems = positions.length / 3;\n\n //COLORBUFRET: oppretter, binder og skriver data til bufret:\n colorBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, colorBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, colors, gl.STATIC_DRAW);\n //Setter antall floats per verteks og antall vertekser i dette bufret:\n colorBuffer.itemSize = 4; // NB!!\n colorBuffer.numberOfItems = colors.length / 4; // NB!!\n\n // Kople fra.\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\n}", "function setUpBuffers() {\n //\n // Create a buffer for the square's vertices.\n\n squareVerticesBuffer = renderingContext.createBuffer();\n\n // Select the squareVerticesBuffer as the one to apply vertex\n // operations to from here out.\n\n renderingContext.bindBuffer (\n renderingContext.ARRAY_BUFFER,\n squareVerticesBuffer\n );\n\n // Now create an array of vertices for the square. Note that the Z\n // coordinate is always 0 here.\n\n var vertices = [\n 50.0, 50.0, 0.0,\n -50.0, 50.0, 0.0,\n 50.0, -50.0, 0.0,\n -50.0, -50.0, 0.0\n ];\n\n // Now pass the list of vertices into WebGL to build the shape. We\n // do this by creating a Float32Array from the JavaScript array,\n // then use it to fill the current vertex buffer.\n\n renderingContext.bufferData (\n renderingContext.ARRAY_BUFFER,\n new Float32Array(vertices),\n renderingContext.STATIC_DRAW\n );\n }", "function createBuffer() {\n var ptr = exports.hb_buffer_create();\n return {\n ptr: ptr,\n /**\n * Add text to the buffer.\n * @param {string} text Text to be added to the buffer.\n **/\n addText: function (text) {\n const str = createJsString(text);\n exports.hb_buffer_add_utf16(ptr, str.ptr, str.length, 0, str.length);\n str.free();\n },\n /**\n * Set buffer script, language and direction.\n *\n * This needs to be done before shaping.\n **/\n guessSegmentProperties: function () {\n return exports.hb_buffer_guess_segment_properties(ptr);\n },\n /**\n * Set buffer direction explicitly.\n * @param {string} direction: One of \"ltr\", \"rtl\", \"ttb\" or \"btt\"\n */\n setDirection: function (dir) {\n exports.hb_buffer_set_direction(ptr, {\n ltr: 4,\n rtl: 5,\n ttb: 6,\n btt: 7\n }[dir] || 0);\n },\n /**\n * Set buffer flags explicitly.\n * @param {string[]} flags: A list of strings which may be either:\n * \"BOT\"\n * \"EOT\"\n * \"PRESERVE_DEFAULT_IGNORABLES\"\n * \"REMOVE_DEFAULT_IGNORABLES\"\n * \"DO_NOT_INSERT_DOTTED_CIRCLE\"\n * \"PRODUCE_UNSAFE_TO_CONCAT\"\n */\n setFlags: function (flags) {\n var flagValue = 0\n flags.forEach(function (s) {\n flagValue |= _buffer_flag(s);\n })\n\n exports.hb_buffer_set_flags(ptr,flagValue);\n },\n /**\n * Set buffer language explicitly.\n * @param {string} language: The buffer language\n */\n setLanguage: function (language) {\n var str = createAsciiString(language);\n exports.hb_buffer_set_language(ptr, exports.hb_language_from_string(str.ptr,-1));\n str.free();\n },\n /**\n * Set buffer script explicitly.\n * @param {string} script: The buffer script\n */\n setScript: function (script) {\n var str = createAsciiString(script);\n exports.hb_buffer_set_script(ptr, exports.hb_script_from_string(str.ptr,-1));\n str.free();\n },\n\n /**\n * Set the Harfbuzz clustering level.\n *\n * Affects the cluster values returned from shaping.\n * @param {number} level: Clustering level. See the Harfbuzz manual chapter\n * on Clusters.\n **/\n setClusterLevel: function (level) {\n exports.hb_buffer_set_cluster_level(ptr, level)\n },\n /**\n * Return the buffer contents as a JSON object.\n *\n * After shaping, this function will return an array of glyph information\n * objects. Each object will have the following attributes:\n *\n * - g: The glyph ID\n * - cl: The cluster ID\n * - ax: Advance width (width to advance after this glyph is painted)\n * - ay: Advance height (height to advance after this glyph is painted)\n * - dx: X displacement (adjustment in X dimension when painting this glyph)\n * - dy: Y displacement (adjustment in Y dimension when painting this glyph)\n * - flags: Glyph flags like `HB_GLYPH_FLAG_UNSAFE_TO_BREAK` (0x1)\n **/\n json: function () {\n var length = exports.hb_buffer_get_length(ptr);\n var result = [];\n var infosPtr = exports.hb_buffer_get_glyph_infos(ptr, 0);\n var infosPtr32 = infosPtr / 4;\n var positionsPtr32 = exports.hb_buffer_get_glyph_positions(ptr, 0) / 4;\n var infos = heapu32.subarray(infosPtr32, infosPtr32 + 5 * length);\n var positions = heapi32.subarray(positionsPtr32, positionsPtr32 + 5 * length);\n for (var i = 0; i < length; ++i) {\n result.push({\n g: infos[i * 5 + 0],\n cl: infos[i * 5 + 2],\n ax: positions[i * 5 + 0],\n ay: positions[i * 5 + 1],\n dx: positions[i * 5 + 2],\n dy: positions[i * 5 + 3],\n flags: exports.hb_glyph_info_get_glyph_flags(infosPtr + i * 20)\n });\n }\n return result;\n },\n /**\n * Free the object.\n */\n destroy: function () { exports.hb_buffer_destroy(ptr); }\n };\n }", "constructor(arrBuffer = null) {\n this.stream = new stream(arrBuffer);\n this.files = [];\n }", "function initArrayBuffer(gl, attribute, data, num, type){\n\tvar buffer = gl.createBuffer();\n\tgl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n\tgl.bufferData(gl.ARRAY_BUFFER, data, gl.STATIC_DRAW);\n\tvar a_attribute = gl.getAttribLocation(gl.program, attribute);\n\tgl.vertexAttribPointer(a_attribute, num, type, false, data.BYTES_PER_ELEMENT * num, 0);\n\tgl.enableVertexAttribArray(a_attribute);\n\treturn 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}", "async initialize() {\n // water impulse:\n //const file = 'https://cdn.glitch.com/c44791c8-02d2-4f00-87fb-fa398dfbec75%2Fwater-swirl.wav?v=1574729613476';\n \n // breath impulse:\n const file = 'https://cdn.glitch.com/c44791c8-02d2-4f00-87fb-fa398dfbec75%2Fbreath.wav?v=1574729612779';\n const response = await fetch(file);\n const arrayBuffer = await response.arrayBuffer();\n this._convolver.buffer = await this._context.decodeAudioData(arrayBuffer);\n }", "constructor() {\n this.context = null;\n this.buffers = new Map();\n this.playingMusicInfo = null;\n }", "constructor(GL, elSize1, data, mode1, attrLoc, itemType, glTarget, usage1) {\n//----------\nthis.GL = GL;\nthis.elSize = elSize1;\nthis.mode = mode1;\nthis.attrLoc = attrLoc;\nthis.itemType = itemType;\nthis.glTarget = glTarget;\nthis.usage = usage1;\n// Private members\nthis._buffer = this.GL.createBuffer();\nthis._nVertices = data.length / this.elSize;\nif (typeof lggr.trace === \"function\") {\nlggr.trace(`VBO: elSize=${this.elSize} length=${data.length} verts=${this._nVertices}`);\n}\n// Create and initialise the buffer.\nthis.GL.bindBuffer(this.glTarget, this._buffer);\nthis.GL.bufferData(this.glTarget, data, this.usage);\nthis.GL.bindBuffer(this.glTarget, null);\n}", "allocate() {\n if (!this.data) {\n let elements = this.width * this.height * this.channels;\n if (this.isFloat) {\n this.data = new Float32Array(elements);\n } else {\n this.data = new Uint8Array(elements);\n }\n }\n return this;\n }", "function initBuffers(gl, programInfo, gearData) {\r\n const vertices = gearData[0];\r\n const colors = gearData[1];\r\n const normals = gearData[2];\r\n\r\n // Create buffers for the object's vertex positions\r\n const vertexBuffer = gl.createBuffer();\r\n\r\n // Select the positionBuffer as the one to apply buffer\r\n // operations to from here out.\r\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);\r\n\r\n // Now pass the list of vertices to the GPU to build the\r\n // shape. We do this by creating a Float32Array from the\r\n // JavaScript array, then use it to fill the current buffer.\r\n gl.bufferData(gl.ARRAY_BUFFER,\r\n new Float32Array(vertices),\r\n gl.STATIC_DRAW);\r\n\r\n\r\n // do likewise for colors\r\n const colorBuffer = gl.createBuffer();\r\n\r\n gl.bindBuffer(gl.ARRAY_BUFFER, colorBuffer);\r\n\r\n gl.bufferData(gl.ARRAY_BUFFER,\r\n new Float32Array(colors),\r\n gl.STATIC_DRAW);\r\n\r\n\r\n const normalBuffer = gl.createBuffer();\r\n\r\n gl.bindBuffer(gl.ARRAY_BUFFER, normalBuffer);\r\n\r\n gl.bufferData(gl.ARRAY_BUFFER,\r\n new Float32Array(normals),\r\n gl.STATIC_DRAW);\r\n\r\n return {\r\n // each vertex in buffer has 3 floats\r\n num_vertices: vertices.length / 3,\r\n vertex: vertexBuffer,\r\n color: colorBuffer,\r\n normal: normalBuffer\r\n };\r\n\r\n}", "function setUpBuffers(){\n \"use strict\";\n rectangleObject.buffer = gl.createBuffer();\n var vertices = [\n -0.5, -0.5,\n 0.5, -0.5,\n 0.5, 0.5,\n -0.5, 0.5];\n gl.bindBuffer(gl.ARRAY_BUFFER, rectangleObject.buffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.STATIC_DRAW);\n}", "function setupBuffers() {\n setupSphereBuffers(); \n}", "function setupBuffers() {\n setupSphereBuffers(); \n}", "function BBDataBuffer(){\n\tthis.arrayBuffer=null;\n\tthis.dataView=null;\n\tthis.length=0;\n}", "init({ arrayBuffer, file }) {\n //save data as uint 8 array\n this.data = new Uint8Array(arrayBuffer)\n\n //also save file name\n this.fileName = file.name\n\n //if file not empty\n if (this.data[this.data.length - 1]) {\n //load the level from the data\n this.parseLevelFromData()\n }\n }", "initFramebuffer() {\n\n const gl = this.gl;\n\n // Create framebuffer object and texture.\n this.framebuffer = gl.createFramebuffer();\n gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer);\n this.framebufferTexture = new Texture(this.gl, this.size, gl.RGBA);\n\n // Create and allocate renderbuffer for depth data.\n const renderbuffer = gl.createRenderbuffer();\n gl.bindRenderbuffer(gl.RENDERBUFFER, renderbuffer);\n gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, this.size.w, this.size.h);\n\n // Attach texture and renderbuffer to the framebuffer.\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.framebufferTexture.texture, 0);\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, renderbuffer);\n }", "function initializeTerrainBuffers() {\n /* Initialize vertex buffer */\n vertexBufferProgram = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexBufferProgram);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertexBuffer), gl.STATIC_DRAW);\n vertexBufferProgram.itemSize = 3;\n vertexBufferProgram.numItems = numVertices;\n console.log(\"Loaded \", vertexBufferProgram.numItems, \" vertices\");\n\n /* Initialize normals buffer */\n normalBufferProgram = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, normalBufferProgram);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(normalBuffer),\n gl.STATIC_DRAW);\n normalBufferProgram.itemSize = 3;\n normalBufferProgram.numItems = numVertices;\n console.log(\"Loaded \", normalBufferProgram.numItems, \" normals\");\n\n /* Initialize triangle face buffer */\n triangleBufferProgram = gl.createBuffer();\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, triangleBufferProgram);\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint32Array(triangleBuffer),\n gl.STATIC_DRAW);\n triangleBufferProgram.itemSize = 1;\n triangleBufferProgram.numItems = triangleBuffer.length;\n console.log(\"Loaded \", triangleBufferProgram.numItems, \" triangles\");\n}", "function initArrayBuffer(gl, data, num, type, attribute) {\r\n var buffer = gl.createBuffer(); // Create a buffer object\r\n if (!buffer) {\r\n console.log('Failed to create the buffer object');\r\n return false;\r\n }\r\n // Write date into the buffer object\r\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\r\n gl.bufferData(gl.ARRAY_BUFFER, data, gl.STATIC_DRAW);\r\n \r\n // Assign the buffer object to the attribute variable\r\n var a_attribute = gl.getAttribLocation(gl.program, attribute);\r\n if (a_attribute < 0) {\r\n console.log('Failed to get the storage location of ' + attribute);\r\n return false;\r\n }\r\n gl.vertexAttribPointer(a_attribute, num, type, false, 0, 0);\r\n // Enable the assignment of the buffer object to the attribute variable\r\n gl.enableVertexAttribArray(a_attribute);\r\n\r\n return true;\r\n}", "function setUpBuffers(){\n \"use strict\";\n\n cubes.wireFrameCube = WireFrameCube(gl, [1.0, 1.0, 1.0, 0.5]);\n\n let projMat = mat4.create();\n mat4.perspective(\n projMat,\n glMatrix.toRadian(45), // fovy\n canvas.clientWidth / canvas.clientHeight, // aspect\n 0.1, // near\n 1000, // far\n );\n let uModelViewMat = mat4.create();\n mat4.lookAt(\n uModelViewMat,\n [0, -5, 0], // eye\n [0, 0, 0], // fovy / center\n [0, 0, 1], // up\n );\n\n\n // set matrices for vertex shader\n gl.uniformMatrix4fv(ctx.uProjMatId, false, projMat);\n gl.uniformMatrix4fv(ctx.uModelViewMatId, false, uModelViewMat);\n}", "function initVertexBuffers(gl, program) {\n var o = new Object();\n o.vertexBuffer = createEmptyArrayBuffer(gl, program.a_Position, 3, gl.FLOAT);\n o.normalBuffer = createEmptyArrayBuffer(gl, program.a_Normal, 3, gl.FLOAT);\n o.colorBuffer = createEmptyArrayBuffer(gl, program.a_Color, 4, gl.FLOAT);\n o.indexBuffer = gl.createBuffer();\n return o;\n}", "function initVertexBuffers(gl, program) {\n var o = new Object();\n o.vertexBuffer = createEmptyArrayBuffer(gl, program.a_Position, 3, gl.FLOAT);\n o.normalBuffer = createEmptyArrayBuffer(gl, program.a_Normal, 3, gl.FLOAT);\n o.colorBuffer = createEmptyArrayBuffer(gl, program.a_Color, 4, gl.FLOAT);\n o.indexBuffer = gl.createBuffer();\n return o;\n}", "function initVertexBuffers(gl, program) {\n var o = new Object(); // Utilize Object object to return multiple buffer objects\n o.vertexBuffer = createEmptyArrayBuffer(gl, program.a_Position, 3, gl.FLOAT);\n o.normalBuffer = createEmptyArrayBuffer(gl, program.a_Normal, 3, gl.FLOAT);\n o.colorBuffer = createEmptyArrayBuffer(gl, program.a_Color, 4, gl.FLOAT);\n o.indexBuffer = gl.createBuffer();\n if (!o.vertexBuffer || !o.normalBuffer || !o.colorBuffer || !o.indexBuffer) { return null; }\n\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\n\n return o;\n}", "createBufferGeometry (buffers, vertexBufferSize, blockFaceBufferSize) {\n this.blockFaceBuffer = buffers.blockFaceBuffer\n this.bfbIndicesForFaces = buffers.bfbIndicesForFaces\n this.bfbOffsetsForBlocks = buffers.bfbOffsetsForBlocks\n this.blockIndicesForFaces = buffers.blockIndicesForFaces\n this.blockIndicesForBfbOffsets = buffers.blockIndicesForBfbOffsets\n this.blockFaceBufferSize = blockFaceBufferSize\n\n const geometry = new Three.BufferGeometry ()\n const material = new Three.MeshLambertMaterial ({ vertexColors: Three.VertexColors })\n\n geometry.setAttribute ('position', new Three.BufferAttribute (buffers.vertexBuffer, 3))\n geometry.setAttribute ('color', new Three.BufferAttribute (buffers.colorBuffer, 3))\n geometry.setDrawRange (0, vertexBufferSize / 3)\n geometry.computeVertexNormals ()\n\n this.mesh = new Three.Mesh (geometry, material)\n this.mesh.name = \"CHUNK\"\n this.mesh.position.set (this.position.x * 16, this.position.y * 16, this.position.z * 16)\n this.world.scene.add (this.mesh) }", "initialize() {\n // TODO: Add your initialization logic here\n var gl = this.graphics.GraphicsDevice.Adapter.DefaultAdapter;\n this.positionBuffer = gl.createBuffer();\n \n super.initialize(); //This is the function we override in the parent.\n }", "update(opts = {}) {\n this._setupBuffers(opts);\n }", "initializeInstanceBuffer(bufferInfo) {\n\t\tconst gl = this.gl;\n\n\t\tbufferInfo.instanceBuffer = gl.createBuffer();\n\n\t\tconst instanceVertexBuffer = bufferInfo.getInstanceBuffer();\n\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, bufferInfo.instanceBuffer);\n\t\tgl.bufferData(gl.ARRAY_BUFFER, instanceVertexBuffer, gl.DYNAMIC_DRAW);\n\n\t\tgl.vertexAttribPointer(this.currentShader.attributes['aTransform'], \n\t\t\t4, gl.FLOAT, false, 4 * instanceVertexBuffer.BYTES_PER_ELEMENT, 0);\n\t\t\t\n\t\tgl.vertexAttribDivisor(this.currentShader.attributes['aTransform'], 1);\n\t\tgl.enableVertexAttribArray(this.currentShader.attributes['aTransform']);\n\t}", "async initialize() {\n let bufferList;\n if (this.config.hrirPathList) {\n bufferList =\n new BufferList(this.config.hrirPathList, { dataType: BufferDataType.URL });\n }\n else {\n bufferList = this.config.ambisonicOrder === 2\n ? new BufferList(SOAHrirBase64)\n : new BufferList(TOAHrirBase64);\n }\n try {\n const hrirBufferList = await bufferList.load();\n this.convolver.setHRIRBufferList(hrirBufferList);\n this.setRenderingMode(this.config.renderingMode);\n }\n catch (exp) {\n const errorMessage = `HOARenderer: HRIR loading/decoding (mode: ${this.config.renderingMode}) failed. Reason: ${exp.message}`;\n throw new Error(errorMessage);\n }\n }", "function setUpBuffers(){\n\n \"use strict\";\n\n // Vertex data (positions)\n var vertices = [\n -0.5, -0.5,\n -0.5, 0.5,\n 0.5, -0.5,\n 0.5, 0.5\n ];\n\n // Create WebGL buffer\n rectangleObject.buffer = gl.createBuffer();\n\n // Bind the WebGL buffer to WebGL global context\n gl.bindBuffer(\n\n gl.ARRAY_BUFFER,\n rectangleObject.buffer\n\n );\n\n // Put data into buffer\n gl.bufferData(\n\n gl.ARRAY_BUFFER ,\n new Float32Array(vertices),\n gl.STATIC_DRAW\n\n );\n\n // Texture Buffers\n rectangleObject.textureBuffer = gl.createBuffer(); \n\n gl.bindBuffer(\n\n gl.ARRAY_BUFFER , \n rectangleObject.textureBuffer\n\n ); \n\n gl.bufferData(\n\n gl.ARRAY_BUFFER , \n new Float32Array(textureCoord), \n gl.STATIC_DRAW\n\n );\n\n}", "function initBuffer(src, dynamic) {\n var buffer = gl.createBuffer();\n gl.bindBuffer( gl.ARRAY_BUFFER, buffer );\n if (dynamic) gl.bufferData( gl.ARRAY_BUFFER, src, gl.DYNAMIC_DRAW );\n else gl.bufferData( gl.ARRAY_BUFFER, src, gl.STATIC_DRAW );\n\n return buffer;\n }", "function init_IOSvideoBuffer(width, height){\n\t\t//invert width and height otherwise image is rotated 90°\n\t\t_iOSvideoBuffer.rgba32.size.height=width, _iOSvideoBuffer.rgba32.size.width=height;\n\t\tvar n=width*height*4;\n\t\t_iOSvideoBuffer.rgba32.buffer=new Uint8Array(n);\n\t\tfor (var i=0;i<n;i+=4){\n\t\t\t_iOSvideoBuffer.rgba32.buffer[i+3]=255; //alpha (opaque)\n\t\t};\n\t\t_iOSvideoBuffer.isInitialized=true;\n\t}", "function InitBuffers(gl) {with(gl)\n{\n\t// Bind vertices (A rectangle)\n\tgl.verticesBuffer = createBuffer();\n\tbindBuffer(ARRAY_BUFFER, verticesBuffer);\n\tbufferData(ARRAY_BUFFER, new Float32Array([-1,-1, 1,-1, 1,1, -1,1]), STATIC_DRAW);\n\n\t// Bind vertex indices\n\tgl.verticesIndexBuffer = createBuffer();\n\tbindBuffer(ELEMENT_ARRAY_BUFFER, verticesIndexBuffer);\n\t\n\t // indices of vertices of two triangles that make a square \n\tvar indices = [0,1,2, 0,3,2];\n\tbufferData(ELEMENT_ARRAY_BUFFER, new Uint16Array(indices), STATIC_DRAW);\n\t\n\t// Bind texture vertices\n\tgl.verticesTextureCoordBuffer = createBuffer();\n\tbindBuffer(gl.ARRAY_BUFFER, verticesTextureCoordBuffer);\n\tbufferData(gl.ARRAY_BUFFER, new Float32Array([0,1, 1,1, 1,0, 0,0]), STATIC_DRAW);\n}}", "_getFeedbackBuffers(props) {\n const {sourceBuffers = {}} = props;\n const feedbackBuffers = {};\n if (this.bindings[this.currentIndex]) {\n // this gurantees a partial feedback buffer set doesn't update\n // previously set buffers during auto creation mode.\n Object.assign(feedbackBuffers, this.bindings[this.currentIndex].feedbackBuffers);\n }\n if (this.feedbackMap) {\n // feedbackMap is defined as sourceBuffer as key and feedbackBuffer name as object\n for (const sourceName in this.feedbackMap) {\n const feedbackName = this.feedbackMap[sourceName];\n if (sourceName in sourceBuffers) {\n feedbackBuffers[feedbackName] = sourceName;\n }\n }\n }\n Object.assign(feedbackBuffers, props.feedbackBuffers);\n for (const bufferName in feedbackBuffers) {\n const bufferOrRef = feedbackBuffers[bufferName];\n if (typeof bufferOrRef === 'string') {\n // Create new buffer with same layout and settings as source buffer\n const sourceBuffer = sourceBuffers[bufferOrRef];\n const {byteLength, usage, accessor} = sourceBuffer;\n feedbackBuffers[bufferName] = this._createNewBuffer(bufferName, {\n byteLength,\n usage,\n accessor\n });\n }\n }\n\n return feedbackBuffers;\n }", "function BUF() {\n this.pal4color = new Uint16Array([0x0000,0xFFFF,0x7BEF,0xAFE5],0,2); // b,w,grey,greenyellow\n this.pal4red = new Uint16Array([0x0000,0xFFFF,0xF800,0xAFE5],0,2); // b,w,red,greenyellow\n this.buf = Graphics.createArrayBuffer(120,120,2,{msb:true});\n}", "function setUpBuffers(){\r\n \"use strict\";\r\n\r\n\r\n var vertices = [\r\n //Pos X, Y, Z\r\n 0, 0, 0,\r\n 1, 0, 0,\r\n 1, 1, 0,\r\n 0, 1, 0,\r\n\r\n 0, 0, 1,\r\n 1, 0, 1,\r\n 1, 1, 1,\r\n 0, 1, 1,\r\n ];\r\n\r\n vertexBuffer = gl.createBuffer();\r\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);\r\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.STATIC_DRAW);\r\n\r\n var vertexIndices = [ //Welche vertices sind mit welchen anderen vertices verbunden?\r\n 0, 1,\r\n 0, 3,\r\n 0, 4,\r\n 1, 2,\r\n 1, 5,\r\n 2, 3,\r\n 2, 6,\r\n 3, 7,\r\n 4, 5,\r\n 4, 7,\r\n 5, 6,\r\n 6, 7,\r\n ];\r\n edgeBuffer = gl.createBuffer();\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, edgeBuffer);\r\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(vertexIndices), gl.STATIC_DRAW);\r\n\r\n\r\n\r\n}", "function RandomBuffer() {\n this.buffer = null;\n this.size = null;\n this.callback = null;\n}", "function RandomBuffer() {\n this.buffer = null;\n this.size = null;\n this.callback = null;\n}", "constructor(batcher) {\n this.vData = null;\n this.iData = null;\n this.attributes = null;\n this.vertexBuffers = [];\n this.indexBuffer = null;\n this.byteStart = 0;\n this.byteOffset = 0;\n this.indicesStart = 0;\n this.indicesOffset = 0;\n this.vertexStart = 0;\n this.vertexOffset = 0;\n this.lastByteOffset = 1;\n this._batcher = void 0;\n this._dirty = false;\n this._vertexFormatBytes = 9 * Float32Array.BYTES_PER_ELEMENT;\n this._initVDataCount = 256 * this._vertexFormatBytes;\n this._initIDataCount = 256 * 6;\n this._outOfCallback = null;\n this._hInputAssemblers = [];\n this._nextFreeIAHandle = 0;\n this._batcher = batcher;\n }", "function initArrayBuffer(gl, attribute, data, num, type) {\r\n\r\n // Create a buffer object\r\n var buffer = gl.createBuffer();\r\n if (!buffer) {\r\n console.log('Failed to create the buffer object');\r\n return false;\r\n }\r\n // Write date into the buffer object\r\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\r\n gl.bufferData(gl.ARRAY_BUFFER, data, gl.STATIC_DRAW);\r\n\r\n // Assign the buffer object to the attribute variable\r\n var a_attribute = gl.getAttribLocation(gl.program, attribute);\r\n if (a_attribute < 0) {\r\n console.log('Failed to get the storage location of ' + attribute);\r\n return false;\r\n }\r\n gl.vertexAttribPointer(a_attribute, num, type, false, 0, 0);\r\n\r\n // Enable the assignment of the buffer object to the attribute variable\r\n gl.enableVertexAttribArray(a_attribute);\r\n\r\n // Unbind the buffer\r\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\r\n\r\n return true;\r\n}", "function Buffer(target, type) {\n\t\tthis.buffer = null;\n\t\tthis.target = target;\n\t\tthis.type = type;\n\t\tthis.data = [];\n\t}", "function initArrayBuffer(gl, attribute, data, type, num) {\r\n // Create a buffer object\r\n var buffer = gl.createBuffer();\r\n if (!buffer) {\r\n console.log('Failed to create the buffer object');\r\n return false;\r\n }\r\n // Write date into the buffer object\r\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\r\n gl.bufferData(gl.ARRAY_BUFFER, data, gl.STATIC_DRAW);\r\n\r\n // Assign the buffer object to the attribute variable\r\n var a_attribute = gl.getAttribLocation(gl.program, attribute);\r\n if (a_attribute < 0) {\r\n console.log('Failed to get the storage location of ' + attribute);\r\n return false;\r\n }\r\n gl.vertexAttribPointer(a_attribute, num, type, false, 0, 0);\r\n // Enable the assignment of the buffer object to the attribute variable\r\n gl.enableVertexAttribArray(a_attribute);\r\n\r\n return true;\r\n}", "async initialize() {\n const bufferList = this.config.hrirPathList\n ? new BufferList(this.config.hrirPathList, { dataType: BufferDataType.URL })\n : new BufferList(FOAHrirBase64, { dataType: BufferDataType.BASE64 });\n try {\n const hrirBufferList = await bufferList.load();\n this.convolver.setHRIRBufferList(hrirBufferList);\n this.setRenderingMode(this.config.renderingMode);\n }\n catch (exp) {\n const errorMessage = `FOARenderer: HRIR loading/decoding (mode: ${this.config.renderingMode}) failed. Reason: ${exp.message}`;\n throw new Error(errorMessage);\n }\n }", "function Initialize1(data) {\n // Make sure all variables in this thread are initialized only once.\n self.littleEndian = data.littleEndian;\n self.compressed = data.compressed;\n self.memoryBudget = data.memoryBudget;\n self.attributesData = data.attributesData;\n self.sceneData = data.sceneData;\n self.version = data.version;\n }", "function bunnyInit(gl) {\n bunnyBuild();\n bunnyUploadData(gl);\n}", "initializeBuffersAndAttributes(bufferInfo) {\n\t\tconst gl = this.gl;\n\t\tconst attributes = this.currentShader.attributes;\n\n\t\t// exit if verts are meptyy\n\t\tif (bufferInfo.vertecies.length < 1) return;\n\n\t\tconst newbuffer = !bufferInfo.indexBuffer || !bufferInfo.vertexBuffer;\n\n\t\t// create new buffers\n\t\tif (newbuffer) {\n\t\t\tbufferInfo.indexBuffer = gl.createBuffer();\n\t\t\tbufferInfo.vertexBuffer = gl.createBuffer();\n\n\t\t\tgl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, bufferInfo.indexBuffer);\n\t\t\tgl.bufferData(gl.ELEMENT_ARRAY_BUFFER, bufferInfo.indecies, gl.STATIC_DRAW);\n\n\t\t\tgl.bindBuffer(gl.ARRAY_BUFFER, bufferInfo.vertexBuffer);\n\t\t\tgl.bufferData(gl.ARRAY_BUFFER, bufferInfo.vertecies, gl.STATIC_DRAW);\n\n\t\t} else {\n\t\t\tgl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, bufferInfo.indexBuffer);\n\t\t\tgl.bindBuffer(gl.ARRAY_BUFFER, bufferInfo.vertexBuffer);\n\t\t}\n\n\t\tconst bpe = bufferInfo.vertecies.BYTES_PER_ELEMENT;\n\n\t\tlet lastAttrSize = 0;\n\n\t\tconst bufferAttributes = bufferInfo.attributes;\n\n\t\tfor (let i = 0; i < bufferInfo.attributes.length; i++) {\n\t\t\tgl.vertexAttribPointer(\n\t\t\t\tattributes[bufferAttributes[i].attribute],\n\t\t\t\tbufferAttributes[i].size,\n\t\t\t\tgl.FLOAT,\n\t\t\t\tfalse,\n\t\t\t\tbufferInfo.elements * bpe,\n\t\t\t\tlastAttrSize * bpe\n\t\t\t);\n\t\t\tgl.enableVertexAttribArray(attributes[bufferAttributes[i].attribute]);\n\n\t\t\tlastAttrSize += bufferAttributes[i].size;\n\t\t}\n\t}", "function createParticleBuffers ( geometry ) {\r\n\r\n\t\tgeometry.__webglVertexBuffer = _gl.createBuffer();\r\n\t\tgeometry.__webglColorBuffer = _gl.createBuffer();\r\n\r\n\t\t_this.info.memory.geometries ++;\r\n\r\n\t}", "function createParticleBuffers ( geometry ) {\n\n\t\tgeometry.__webglVertexBuffer = _gl.createBuffer();\n\t\tgeometry.__webglColorBuffer = _gl.createBuffer();\n\n\t\t_this.info.memory.geometries ++;\n\n\t}", "initBuffers() {\n\t\tthis.vertices = [\n\t\t];\n\n\t\tthis.indices = [\n\t\t];\n\n\t\tthis.normals = [\n\t\t];\n\n\t\tthis.texCoords = [\n\t\t];\n\n\n\t\tvar angle = Math.PI * 2 / (this.slices);\n\t\tvar newangle = 0;\n\t\tvar x = 0;\n\t\tvar y = 0;\n\t\tvar z = 0;\n\n\t\tvar count = 0;\n\t\tvar v = 0;\n\n\t\tvar delta = (this.base - this.top) / this.stacks;\n\n\t\twhile (count <= this.slices) {\n\t\t\tv = 0;\n\t\t\tx = Math.cos(newangle);\n\t\t\ty = Math.sin(newangle);\n\n\t\t\tfor (let i = 0; i <= this.stacks; i++) {\n\t\t\t\tthis.vertices.push(x * (this.base - (delta * i)));\n\t\t\t\tthis.vertices.push(y * (this.base - (delta * i)));\n\t\t\t\tthis.vertices.push(this.height * v);\n\n\t\t\t\tv += 1 / this.stacks;\n\t\t\t}\n\n\t\t\tfor (let i = 0; i <= this.stacks; i++) {\n\t\t\t\tthis.normals.push(x);\n\t\t\t\tthis.normals.push(y);\n\t\t\t\tthis.normals.push(0);\n\t\t\t}\n\n\t\t\tnewangle = newangle + angle;\n\t\t\tcount++;\n\t\t}\n\n\t\tfor (var i = 0; i <= this.slices * (this.stacks + 1); i += (this.stacks + 1)) {\n\n\t\t\tif (i == (this.slices) * (this.stacks + 1)) {\n\t\t\t\tfor (var j = 0; j < this.stacks; j++) {\n\n\t\t\t\t\tthis.indices.push(j + 1);\n\t\t\t\t\tthis.indices.push(i + j);\n\t\t\t\t\tthis.indices.push(j);\n\t\t\t\t\tthis.indices.push(1 + j);\n\t\t\t\t\tthis.indices.push(i + j + 1);\n\t\t\t\t\tthis.indices.push(j + i);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfor (var j = 0; j < this.stacks; j++) {\n\n\t\t\t\t\tthis.indices.push(i + j);\n\t\t\t\t\tthis.indices.push(i + j + this.stacks + 1);\n\t\t\t\t\tthis.indices.push(i + j + this.stacks + 1 + 1);\n\n\t\t\t\t\tthis.indices.push(i + j + this.stacks + 1 + 1);\n\t\t\t\t\tthis.indices.push(i + j + 1);\n\t\t\t\t\tthis.indices.push(i + j);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tfor (let i = 0; i <= this.slices; i++) {\n\t\t\tfor (let j = 0; j <= this.stacks; j++) {\n\t\t\t\tthis.texCoords.push(i / (this.slices), j / this.stacks);\n\t\t\t}\n\t\t}\n\n\n\n\t\tconsole.log(this.indices);\n\t\tthis.primitiveType = this.scene.gl.TRIANGLES;\n\t\tthis.initGLBuffers();\n\t}", "function setupSkyboxBuffers(){\n //Generate the vertex positions \n loadVertices()\n\n //Generate the vertex Textures\n loadTextures()\n}", "async function initBuffers(gl) {\n\tconsole.log(\"loading texture\");\n\tconst texture = await loadTexture(gl, 'textures/cubetexture.png');\n\n\tconsole.log(\"creating positions\");\n\tconst positions = new Float32Array([\n\t\t// Front face\n\t\t-1.0, -1.0, 1.0,\n\t\t1.0, -1.0, 1.0,\n\t\t1.0, 1.0, 1.0,\n\t\t-1.0, 1.0, 1.0,\n\n\t\t// Back face\n\t\t-1.0, -1.0, -1.0,\n\t\t-1.0, 1.0, -1.0,\n\t\t1.0, 1.0, -1.0,\n\t\t1.0, -1.0, -1.0,\n\n\t\t// Top face\n\t\t-1.0, 1.0, -1.0,\n\t\t-1.0, 1.0, 1.0,\n\t\t1.0, 1.0, 1.0,\n\t\t1.0, 1.0, -1.0,\n\n\t\t// Bottom face\n\t\t-1.0, -1.0, -1.0,\n\t\t1.0, -1.0, -1.0,\n\t\t1.0, -1.0, 1.0,\n\t\t-1.0, -1.0, 1.0,\n\n\t\t// Right face\n\t\t1.0, -1.0, -1.0,\n\t\t1.0, 1.0, -1.0,\n\t\t1.0, 1.0, 1.0,\n\t\t1.0, -1.0, 1.0,\n\n\t\t// Left face\n\t\t-1.0, -1.0, -1.0,\n\t\t-1.0, -1.0, 1.0,\n\t\t-1.0, 1.0, 1.0,\n\t\t-1.0, 1.0, -1.0,\n\t]);\n\tconst positionBuffer = gl.createBuffer();\n\tgl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);\n\tgl.bufferData(gl.ARRAY_BUFFER, positions, gl.STATIC_DRAW);\n\n\tconsole.log(\"creating indices\");\n\tconst indexBuffer = gl.createBuffer();\n\tgl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexBuffer);\n\tconst indices = [\n\t\t0, 1, 2, 0, 2, 3, // front\n\t\t4, 5, 6, 4, 6, 7, // back\n\t\t8, 9, 10, 8, 10, 11, // top\n\t\t12, 13, 14, 12, 14, 15, // bottom\n\t\t16, 17, 18, 16, 18, 19, // right\n\t\t20, 21, 22, 20, 22, 23, // left\n\t];\n\tgl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(indices), gl.STATIC_DRAW);\n\n\tconsole.log(\"creating texture coordinates\");\n\tconst textureCoordBuffer = gl.createBuffer();\n\tgl.bindBuffer(gl.ARRAY_BUFFER, textureCoordBuffer);\n\tconst textureCoordinates = [\n\t\t// Front\n\t\t0.0, 0.0,\n\t\t1.0, 0.0,\n\t\t1.0, 1.0,\n\t\t0.0, 1.0,\n\t\t// Back\n\t\t0.0, 0.0,\n\t\t1.0, 0.0,\n\t\t1.0, 1.0,\n\t\t0.0, 1.0,\n\t\t// Top\n\t\t0.0, 0.0,\n\t\t1.0, 0.0,\n\t\t1.0, 1.0,\n\t\t0.0, 1.0,\n\t\t// Bottom\n\t\t0.0, 0.0,\n\t\t1.0, 0.0,\n\t\t1.0, 1.0,\n\t\t0.0, 1.0,\n\t\t// Right\n\t\t0.0, 0.0,\n\t\t1.0, 0.0,\n\t\t1.0, 1.0,\n\t\t0.0, 1.0,\n\t\t// Left\n\t\t0.0, 0.0,\n\t\t1.0, 0.0,\n\t\t1.0, 1.0,\n\t\t0.0, 1.0,\n\t];\n\tgl.bufferData(gl.ARRAY_BUFFER, new Float32Array(textureCoordinates), gl.STATIC_DRAW);\n\n\treturn {\n\t\ttexture: texture,\n\t\tposition: positionBuffer,\n\t\tindices: indexBuffer,\n\t\ttextureCoord: textureCoordBuffer,\n\t};\n}" ]
[ "0.73176175", "0.71452385", "0.69972706", "0.69972706", "0.6889671", "0.68736875", "0.68256795", "0.6795424", "0.67588717", "0.672104", "0.67158973", "0.6683626", "0.6683626", "0.6568625", "0.65220445", "0.6513698", "0.6495004", "0.6490982", "0.64885545", "0.6488473", "0.6467659", "0.64632154", "0.64632154", "0.64574534", "0.6435672", "0.6432667", "0.64279073", "0.64160156", "0.6414692", "0.640959", "0.64000165", "0.6396292", "0.6346941", "0.629176", "0.6274456", "0.62730813", "0.62321246", "0.6208996", "0.6206229", "0.61995184", "0.6198725", "0.6194402", "0.61903816", "0.61872023", "0.61797565", "0.61646354", "0.6104687", "0.61033744", "0.6098771", "0.6092169", "0.60901034", "0.60501987", "0.6039063", "0.60384244", "0.6037199", "0.6036157", "0.6029523", "0.6018168", "0.6010941", "0.6001912", "0.5999449", "0.5994178", "0.59864247", "0.59743077", "0.59743077", "0.596131", "0.5959337", "0.5953625", "0.5952953", "0.59271824", "0.59240717", "0.5922397", "0.5922397", "0.59192026", "0.5916408", "0.5910813", "0.58972526", "0.58762753", "0.5874839", "0.5865562", "0.5857412", "0.5856362", "0.5850897", "0.5844518", "0.5827551", "0.58262336", "0.5808852", "0.5808852", "0.5795436", "0.5790238", "0.5760353", "0.57581115", "0.5743836", "0.57384145", "0.57165605", "0.5713212", "0.57131124", "0.57113826", "0.57039726", "0.5702839", "0.5701096" ]
0.0
-1
================= Extra Credit Functions ====================================
function pointSize(gl, a_PointSize, sizeChanger) { sizeChanger.addEventListener('click', function() { gl.vertexAttrib1f(a_PointSize, sizeChanger.value); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chargeCreditCard() {\n\n }", "function buy20() {\n const credit = 2300;\n addCredit(credit);\n return credit;\n}", "function addCreditCard(custnumber, email, data, callback) {\n\n getBillingAndShippingAddress(custnumber, function(addresses) {\n\n if(!addresses || !addresses.billing_address) {\n return callback({ error: 'Please add <a href=\"/account/address/main\">billing address</a> before adding new credit card.' });\n }\n\n var payment_info = {\n user: {\n custnumber: custnumber,\n email: addresses.billing_address.email || email\n },\n billing: {\n firstName: addresses.billing_address.firstname,\n lastName: addresses.billing_address.lastname,\n company: addresses.billing_address.company,\n address: addresses.billing_address.address1 + ' ' + addresses.billing_address.address2,\n city: addresses.billing_address.city,\n state: addresses.billing_address.state,\n zip: addresses.billing_address.zip,\n country: addresses.billing_address.country_name,\n phoneNumber: addresses.billing_address.phone,\n faxNumber: addresses.billing_address.phone2\n },\n cc: {\n number: data.cc_number,\n exp: '20' + data.cc_year + '-' + data.cc_month //make the expiration date as yyyy-mm (e.g. 2018-07)\n }\n };\n\n // check to see if the user is already saved in Authorize.net\n getCreditCards(custnumber, true /* also get the deleted one */, function(cc_data) {\n\n // if the user exist get his customer token and add new payment method on Authorize.net\n if(cc_data && cc_data.length) {\n payment_info.customer_profile_id = cc_data[0].custtoken; // this is Authorize.net customer token\n\n payment.createCustomerPaymentProfile(payment_info, function(result) {\n\n // check if the Authorize.net saving is successful\n if(result && result.messages && result.messages.resultCode == 'Ok' && result.messages.message && result.messages.message.code == 'I00001') {\n\n new_cc = {\n custnumber: custnumber,\n carddefault: 0, // this is not the first added card so the user already have a default one\n cardtype: data.cc_type,\n cardnum: null,\n exp: data.cc_month + '/' + data.cc_year,\n cardholder: data.cc_name,\n cc_cid: null,\n custtoken: result.customerProfileId,\n paytoken: result.customerPaymentProfileId,\n cc_last_four: data.cc_number.substring(data.cc_number.length - 4) // store the last 4 digits in database\n };\n\n addCreditCardLocally(new_cc, function(result) {\n callback(result);\n });\n }\n else\n callback(null); // return null if there's problem with storing the info at Authorize.net\n });\n }\n // else add the user and the payment in Authorize.net\n else {\n payment.createCustomerProfile(payment_info, function(result) {\n\n // check if the Authorize.net saving is successful\n if(result && result.messages && result.messages.resultCode == 'Ok' && result.messages.message && result.messages.message.code == 'I00001') {\n\n new_cc = {\n custnumber: custnumber,\n carddefault: 1, // this is the first added card so make it a default one\n cardtype: data.cc_type,\n cardnum: null,\n exp: data.cc_month + '/' + data.cc_year,\n cardholder: data.cc_name,\n cc_cid: null,\n custtoken: result.customerProfileId,\n paytoken: result.customerPaymentProfileIdList.numericString,\n cc_last_four: data.cc_number.substring(data.cc_number.length - 4) // store the last 4 digits in database\n };\n\n addCreditCardLocally(new_cc, function(result) {\n callback(result);\n });\n }\n else\n callback(null); // return null if there's problem with storing the info at Authorize.net\n });\n }\n\n });\n \n });\n\n}", "get credit() { return this._credit; }", "function buy50() {\n const credit = 6000;\n addCredit(credit);\n return credit;\n}", "function buy10() {\n const credit = 1100;\n addCredit(credit);\n return credit;\n}", "function buy5() {\n const credit = 500;\n addCredit(credit);\n return credit;\n}", "function processACredit() {\n\ntry{\n var apiClient = new CybersourceRestApi.ApiClient();\n var instance = new CybersourceRestApi.CreditApi(apiClient);\n\n clientReferenceInformation = new CybersourceRestApi.V2paymentsClientReferenceInformation();\n clientReferenceInformation.code = \"12345678\";\n \n orderInformation = new CybersourceRestApi.V2paymentsOrderInformation();\n billtoInformation = new CybersourceRestApi.V2paymentsOrderInformationBillTo();\n billtoInformation.country = \"US\";\n billtoInformation.lastName = \"Deo\";\n billtoInformation.address1 = \"201 S. Division St.\";\n billtoInformation.postalCode = \"48104-2201\";\n billtoInformation.locality = \"Ann Arbor\";\n billtoInformation.administrative_area = \"MI\";\n billtoInformation.firstName = \"John\";\n billtoInformation.phoneNumber = \"999999999\";\n billtoInformation.email = \"test@cybs.com\";\n orderInformation.billTo = billtoInformation;\n \n amountInformation = new CybersourceRestApi.V2paymentsOrderInformationAmountDetails();\n amountInformation.totalAmount = \"102.21\";\n amountInformation.currency = \"USD\";\n orderInformation.amountDetails = amountInformation;\n\n paymentInformation = new CybersourceRestApi.V2paymentsPaymentInformation();\n cardInformation = new CybersourceRestApi.V2paymentsPaymentInformationCard();\n cardInformation.expirationYear = \"2031\";\n cardInformation.number = \"5555555555554444\";\n cardInformation.expirationMonth = \"12\";\n cardInformation.type = \"002\";\n paymentInformation.card = cardInformation;\n \n\tvar request = new CybersourceRestApi.CreateCreditRequest();\n request.clientReferenceInformation = clientReferenceInformation;\n request.orderInformation = orderInformation;\n request.paymentInformation = paymentInformation;\n\n instance.createCredit(request, function (error, data, response) {\n if (error) {\n console.log(\"Error : \" + error);\n console.log(\"Error : \" + error.stack);\n console.log(\"Error status code : \" + error.statusCode);\n }\n else if (data) {\n console.log(\"Data : \" + JSON.stringify(data));\n }\n console.log(\"Response : \" + JSON.stringify(response));\n\n });\n}catch(error){\n console.log(error);\n}\n}", "function do_payment()\n{\n var alpha = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n var num = \"0123456789\";\n var cardSelected;\n \n //credit card\n if(document.frm.payment_type[1].checked)\n {\n // card type\n if(no_input(document.frm.cc_type))\n {\n alert(\"Please choose a Credit Card Type\");\n return false; \n }\n \n //Get Card Type\n \tvar radioLength = document.frm.cc_type.length;\n\t\tfor(var i = 0; i < radioLength; i++) {\n\t\t\tif(document.frm.cc_type[i].checked)\n\t\t\t{\n\t\t\t\tcardSelected = document.frm.cc_type[i].value;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Fix cardSelected value\n\t\tcardSelected = ( cardSelected == 'AX' ) ? 'AMEX' : cardSelected;\n \n //name\n if (no_input(document.frm.cc_name))\n {\n alert(\"Please enter the Billing Name.\");\t\t\t\t \n SelectTextBox(document.frm.cc_name);\n return false;\t\t\t \n }\n \n //address1\n if(no_input(document.frm.cc_address_1))\n {\n \talert(\"Please enter the billing address.\");\n \tSelectTextBox(document.frm.cc_address_1);\n \treturn false;\n }\n \n tmp = stripCharsNotInBag(document.frm.cc_address_1.value, alpha + num + ' .-#/');\n if(tmp != document.frm.cc_address_1.value)\n {\n \talert(\"Please use only letters, numbers, spaces, periods, slashes, dashes, and poundsigns in the address.\");\n \tSelectTextBox(document.frm.cc_address_1);\n \treturn false;\n }\n \n //address2\n if(!no_input(document.frm.cc_address_2))\n {\n tmp = stripCharsNotInBag(document.frm.cc_address_2.value, alpha + num + ' .-#/');\n if(tmp != document.frm.cc_address_2.value)\n {\n \talert(\"Please use only letters, numbers, spaces, periods, slashes, dashes, and poundsigns in the address.\");\n \tSelectTextBox(document.frm.cc_address_2);\n \treturn false;\n }\n }\n \n //city\n if(no_input(document.frm.cc_city))\n {\n \talert(\"Please enter the billing city.\");\n \tSelectTextBox(document.frm.cc_city);\n \treturn false;\n }\n \n tmp = stripCharsNotInBag(document.frm.cc_city.value, alpha + ' ');\n if(tmp != document.frm.cc_city.value)\n {\n \talert(\"Please use only letters and spaces in the city.\");\n \tSelectTextBox(document.frm.cc_city);\n \treturn false;\n }\n \n //state\n if(document.frm.cc_state && no_input(document.frm.cc_state))\n {\n \talert(\"Please select the billing state.\");\n \tSelectTextBox(document.frm.cc_state);\n \treturn false;\n }\n \n // country\n if(document.frm.cc_country && no_input(document.frm.cc_country))\n {\n \talert(\"Please select the billing country.\");\n \tSelectTextBox(document.frm.cc_country);\n \treturn false;\n }\n \n //zip\n if(document.frm.cc_zip)\n {\n \tdocument.frm.cc_zip.value = stripCharsNotInBag(document.frm.cc_zip.value, num);\n \tif(document.frm.cc_zip.value.length != 5 && document.frm.cc_zip.value.length != 9)\n \t{\n \t\talert(\"Please enter the billing zip.\");\n \t\tSelectTextBox(document.frm.cc_zip);\n \t\treturn false;\n \t}\n }\n \n //postal code\n if(document.frm.cc_postal)\n {\n \t\n \tdocument.frm.cc_postal.value = stripCharsNotInBag(document.frm.cc_postal.value, alpha + num);\n \tif(no_input(document.frm.cc_postal))\n \t{\n \t\talert(\"Please enter the billing postal code.\");\n \t\tSelectTextBox(document.frm.cc_postal);\n \t\treturn false;\n \t}\n }\n \n if(!validateCreditCardNumber(cardSelected, document.frm.card_number, 1)){ return false; }\n \n //expiration month\n if(no_input(document.frm.card_month))\n {\n alert(\"Please select the expiration month.\");\n SelectTextBox(document.frm.card_month);\n return false;\n }\n \n //expiration year\n if(no_input(document.frm.card_year))\n {\n alert(\"Please select the expiration year.\");\n SelectTextBox(document.frm.card_year);\n return false;\n }\n \n // expiration date\n inMonth = document.frm.card_month.options[document.frm.card_month.selectedIndex].value; \n inYear = document.frm.card_year.options[document.frm.card_year.selectedIndex].value;\n inDate = inYear.toString() + inMonth.toString();\n var dt = document.frm.sysdate.value;\n var sys_dt= dt.substr(0,6); \n if(parseInt(inDate) < parseInt(sys_dt)) \n { \n alert(\"The expiration date entered has already expired.\");\n SelectTextBox(document.frm.card_month);\n return false;\n }\n } \n //check\n else if(document.frm.payment_type[0].checked)\n {\n //name\n if(no_input(document.frm.check_name))\n {\n alert(\"Please enter the Billing Name.\");\t\t\t\t \n SelectTextBox(document.frm.check_name);\n return false;\t\t\t \n }\n \n //address1\n if(no_input(document.frm.check_address_1))\n {\n \talert(\"Please enter the billing address.\");\n \tSelectTextBox(document.frm.check_address_1);\n \treturn false;\n }\n \n tmp = stripCharsNotInBag(document.frm.check_address_1.value, alpha + num + ' .-#');\n if(tmp != document.frm.check_address_1.value)\n {\n alert(\"Please use only letters, numbers, spaces, periods, dashes, and poundsigns in the address.\"); \n \tSelectTextBox(document.frm.check_address_1);\n \treturn false;\n }\n \n //address2\n if(!no_input(document.frm.check_address_2))\n {\n tmp = stripCharsNotInBag(document.frm.check_address_2.value, alpha + num + ' .-#');\n if(tmp != document.frm.check_address_2.value)\n {\n \talert(\"Please use only letters, numbers, spaces, periods, dashes, and poundsigns in the address.\");\n \tSelectTextBox(document.frm.check_address_2);\n \treturn false;\n }\n }\n \n //city\n if(no_input(document.frm.check_city))\n {\n \talert(\"Please enter the billing city.\");\n \tSelectTextBox(document.frm.check_city);\n \treturn false;\n }\n \n tmp = stripCharsNotInBag(document.frm.check_city.value, alpha + ' ');\n if(tmp != document.frm.check_city.value)\n {\n \talert(\"Please use only letters and spaces in the city.\");\n \tSelectTextBox(document.frm.check_city);\n \treturn false;\n }\n \n //state\n if(document.frm.check_state && no_input(document.frm.check_state))\n {\n \talert(\"Please select the billing state.\");\n \tSelectTextBox(document.frm.check_state);\n \treturn false;\n }\n \n //zip\n if(document.frm.check_zip)\n {\n \tdocument.frm.check_zip.value = stripCharsNotInBag(document.frm.check_zip.value, num);\n \tif(document.frm.check_zip.value.length != 5 && document.frm.cc_zip.value.length != 9)\n \t{\n \t\talert(\"Please enter the billing zip.\");\n \t\tSelectTextBox(document.frm.check_zip);\n \t\treturn false;\n \t}\n }\n\n //phone\n document.frm.check_phone_1.value = stripCharsNotInBag(document.frm.check_phone_1.value, num);\n\t document.frm.check_phone_2.value = stripCharsNotInBag(document.frm.check_phone_2.value, num);\n\t document.frm.check_phone_3.value = stripCharsNotInBag(document.frm.check_phone_3.value, num);\n\n \tif(document.frm.check_phone_1.value.length != 3)\n \t{\n \t\talert(\"Please enter your Area Code.\");\n \t\tSelectTextBox(document.frm.check_phone_1);\n \t return;\n \t}\n\n if(document.frm.check_phone_2.value.length != 3)\n \t{\n \t alert(\"Please enter your Phone Number prefix.\");\n \t SelectTextBox(document.frm.check_phone_2);\n \t return;\n \t}\n\n \tif(document.frm.check_phone_3.value.length != 4)\n \t{\n \t alert(\"Please enter the last 4 digit of your Phone Number.\");\n \t SelectTextBox(document.frm.check_phone_3);\n \t return;\n \t}\n \t\n //email\n if(document.frm.check_email.value.length == 0)\n \t{\n \t alert(\"Please enter your email address.\");\n \t SelectTextBox(document.frm.check_email);\n \t return;\n \t}\n \n if(!isValidEmail(document.frm.check_email.value))\n \t{\n \t alert(\"The email address you entered is not valid.\");\n \t SelectTextBox(document.frm.check_email);\n \t return;\n \t}\n \t\n //dl number/state\n if(document.frm.dl_number.value.length > 0 || !no_input(document.frm.dl_state))\n {\n if(document.frm.dl_number.value.length == 0)\n {\n alert(\"Please enter the driver's license.\");\n SelectTextBox(document.frm.dl_state);\n return false; \n }\n \n tmp = stripCharsNotInBag(document.frm.dl_number.value, alpha + num);\n if(tmp != document.frm.dl_number.value)\n {\n alert(\"Only letters and numbers are allowed in the driver's license.\");\n SelectTextBox(document.frm.dl_number);\n return false; \n }\n \n if(no_input(document.frm.dl_state))\n {\n alert(\"Please select the driver's license state.\");\n SelectTextBox(document.frm.dl_state);\n return false; \n }\n }\n \n //routing number\n if(document.frm.routing_number.value.length == 0)\n {\n alert(\"Please enter the routing number.\");\n SelectTextBox(document.frm.routing_number);\n return false;\n }\n \n tmp = stripCharsNotInBag(document.frm.routing_number.value, num);\n if(tmp != document.frm.routing_number.value)\n {\n alert(\"Please use only numbers in the routing number.\");\n SelectTextBox(document.frm.routing_number);\n return false;\n }\n \n //account number\n if(document.frm.account_number.value.length == 0)\n {\n alert(\"Please enter the account number.\");\n SelectTextBox(document.frm.account_number);\n return false;\n }\n \n tmp = stripCharsNotInBag(document.frm.account_number.value, num);\n if(tmp != document.frm.account_number.value)\n {\n alert(\"Please use only numbers in the account number.\");\n SelectTextBox(document.frm.account_number);\n return false;\n }\n \n //check number\n if(no_input(document.frm.check_number))\n {\n alert(\"Please enter the check number.\");\n document.frm.check_number.select();\n return false;\n }\n \n tmp = stripCharsNotInBag(document.frm.check_number.value, num);\n if(tmp != document.frm.check_number.value)\n {\n alert(\"Please use only numbers in the check number.\");\n SelectTextBox(document.frm.check_number);\n return false;\n }\n \n }\n // neither credit nor check selected\n else\n {\n alert(\"Please select the payment type.\");\n return false; \n }\n \n return true;\n}", "function CustomerCreditTransferInformation(id, name, amount) {\n\n /**\n * @var string\n */\n this.bankAccount = '';\n\n /**\n * @var string\n */\n this.bankName = '';\n\n /**\n * @var string|array\n */\n this.bankAddress = '';\n\n /**\n * Financial Institution Identifier;\n *\n * @var string\n */\n this.bic = '';\n\n /**\n * @var string\n */\n this.categoryPurpose = '';\n\n /**\n * @var string\n */\n this.country = '';\n\n /**\n * Structured creditor reference type.\n *\n * @var string\n */\n this.creditorReferenceType = '';\n\n /**\n * Structured creditor reference.\n *\n * @var string\n */\n this.creditorReference = '';\n\n /**\n * @var string\n */\n this.currency = '';\n\n /**\n * @var string\n */\n this.EndToEndIdentification = id;\n\n /**\n\t * Account Identifier\n *\n * @var string\n */\n this.iban;\n\n /**\n * @var string\n */\n this.instructionId = '';\n\n /**\n * @var string Local service instrument code.\n */\n this.localInstrumentCode = '';\n\n /**\n * @var string Local service instrument proprietary.\n */\n this.localInstrumentProprietary = '';\n\n /**\n * @var string\n */\n this.name = name;\n\n /**\n * @var string|array\n */\n this.postalAddress = '';\n\n /**\n * Purpose of this transaction\n *\n * @var string\n */\n this.remittanceInformation = '';\n\n /**\n * @var string Service level affects the way the payment is made.\n * S (SEPA) must be used\n */\n this.serviceLevelCode = '';\n\n /**\n * Must be between 0.01 and 999999999.99\n *\n * @var string\n */\n this.transferAmount = amount;\n\n /**\n * @var string\n */\n this.ultimateDebtorName = ''; \n}", "function updateNewCredit() {\n\tdocument.getElementById(\"new-credit-amount\").value =\n\t\tdocument.getElementById(\"current-credit-amount\").value - 0 + (\n\t\tdocument.getElementById(\"credit-add-amount\").value - 0);\n\t// The zeros are subtracted to force String -> Number type casting.\n}", "creditAccount(accountId, amount) {\n const account = accountDatabase[accountId];\n\n account.balance += amount;\n account.effectiveDateTime = new Date();\n\n transactionHistory.push([{ ...account, amount, type: 'credit' }]);\n this.logger.info('creditting account...', accountId);\n return { ...account };\n }", "get _extraCredits() {\n const credits = {};\n // Disabling this for now as it doesn't seem to be used anywhere but\n // results in mapItems being computed twice for all workbench items when\n // cesium map is loaded. This happens because the reference to\n // _extraCredits is from within the constructor for Cesium which itself is\n // called inside an untracked() call in TerriaViewer.\n // if (this._terrainWithCredits.credit) {\n // credits.cesium = this._terrainWithCredits.credit;\n //}\n if (!this.terria.configParameters.hideTerriaLogo) {\n const logo = require(\"../../wwwroot/images/terria-watermark.svg\");\n credits.terria = new Credit('<a href=\"https://terria.io/\" target=\"_blank\" rel=\"noopener noreferrer\"><img src=\"' +\n logo +\n '\" title=\"Built with Terria\"/></a>', true);\n }\n return credits;\n }", "function creditCheck () {\n var creditResultTest = reCredit.test(creditCardInput.value);\n var zipResultTest = reZip.test(zipInput.value);\n var cvvResultTest = reCvv.test(cvvInput.value);\n if (creditResultTest === true) {\n creditCardResult = true; \n } else {\n creditCardResult = false; \n }\n if (zipResultTest === true) {\n zipResult = true; \n } else {\n zipResult = false; \n }\n if (cvvResultTest === true) {\n cvvResult = true; \n } else {\n cvvResult = false; \n }\n \n}", "function createSecForCreditsAndPromo(fundingSources, paymentSuccessful, paymentAppliedInfo, promoCodes) {\n\tvar confirmSectionForCreditAndPromo = \"\";\n\tvar promoAmount = 0;\n\tif(paymentSuccessful){\n\tif(fundingSources && fundingSources.length !== 0) {\n\t\t for (var index = 0; index < fundingSources.length; index++) {\n\t\t\t if(fundingSources[index].type === \"Credit\"){\n\t\t\t\tconfirmSectionForCreditAndPromo +='<div class=\"wid_flt50 fnt_itc\">'\n\t\t\t\t\t\t\t\t\t\t\t\t + \t\tmessages['main_pay.confirm.credits_applied']\n\t\t\t\t\t\t\t\t\t\t\t\t + '</div>'\n\t\t\t\t\t\t\t\t\t\t\t\t + '<div class=\"wid_flt50 fnt_itc txt_nwrght\">'\n\t\t\t\t\t\t\t\t\t\t\t\t + \t'<span class=\"content_minus\"></span>'\t\n\t\t\t\t\t\t\t\t\t\t\t\t + getFormatedNumber(fundingSources[index].amount, true)\n\t\t\t\t\t\t\t\t\t\t\t\t + '</div>';\t\n\t\t \t\tpaymentAppliedInfo.creditAmount += fundingSources[index].amount; /* Added creditsTotal to promoCreditAmount variable for calculating amount paid */\n\t\t\t } else if (fundingSources[index].type === \"PromoCredit\") {\n\t\t\t\tconfirmSectionForCreditAndPromo +='<div class=\"wid_flt60 fnt_itc\">'\n\t\t\t\t\t\t\t\t\t\t\t\t + \t\tmessages['main_pay.confirm.promoApplied']\n\t\t\t\t\t\t\t\t\t\t\t\t + '</div>'\n\t\t\t\t\t\t\t\t\t\t\t\t + '<div class=\"wid_flt40 txt_nwrght fnt_itc\">'\n\t\t\t\t\t\t\t\t\t\t\t\t + \t\t\"-\"\n\t\t\t\t\t\t\t\t\t\t\t\t + getFormatedNumber(fundingSources[index].amount, true)\n\t\t\t\t\t\t\t\t\t\t\t\t + '</div>';\n\t\t\t\tpaymentAppliedInfo.promoAmount += fundingSources[index].amount; /* Added creditsTotal to amount variable for calculating amount paid */\n\t\t\t }\n\t\t }\n\t }\n\tif(promoCodes){\n\t\tfor(var index=0; index < promoCodes.length; index++){\n\t\t\tif(promoCodes[index].paymentGroupId === bp_submit_payment_group_obj.paymentGroupId){\n\t\t\t\tpromoAmount += promoCodes[index].amount; /* Adding all credits and stored on to variable */\n\t\t\t}\n\t\t}\t\n\t\tif(promoAmount > 0){\n\t\t\tconfirmSectionForCreditAndPromo +='<div class=\"wid_flt60 fnt_itc\">'\n\t\t\t\t\t\t\t\t\t\t\t + \t\tmessages['main_pay.confirm.promoApplied']\n\t\t\t\t\t\t\t\t\t\t\t + '</div>'\n\t\t\t\t\t\t\t\t\t\t\t + '<div class=\"wid_flt40 txt_nwrght fnt_itc\">'\n\t\t\t\t\t\t\t\t\t\t\t + \t\t\"-\"\n\t\t\t\t\t\t\t\t\t\t\t + getFormatedNumber(promoAmount, true)\n\t\t\t\t\t\t\t\t\t\t\t + '</div>';\n\t\t paymentAppliedInfo.promoAmount += promoAmount;\n\t\t}\n\t}\n\treturn confirmSectionForCreditAndPromo;\n\t}\n}", "function C37512_Pay_CC_required_fields_Expiration()\n{\ntry {\n Log.AppendFolder(\"C37512_Pay_CC_required_fields_Expiration\");\n InitializationEnviornment.initiliaze();\n AppLoginLogout.login();\n var keyWordNm =\"Daily Admission\";\n var packageNm = \"Date/Time\";\n var subPakNm=\"Children (Ages 3-12)\";\n var qty = 2; \n var dateD = CommonCalender.getTodaysDate();\n selectQuantity(qty);\n var givenPaymentType = \"Credit Card\";\n \n WrapperFunction.selectKeywordName(keyWordNm);\n selectPackage(packageNm,subPakNm);\n aqUtils.Delay(3000); \n if(datetimeformSubWindow.Exists){\n selectDateFromSubWindow(dateD); \n selectNextButtonFromSubWindow();\n }\n finilizeOrder();\n aqUtils.Delay(2000);\n \n var settlementTotal =orderDetailsTotal.Caption;\n applyAmount= aqString.Replace(settlementTotal,\"$\",\"\"); \n OrderInfo.prototype.OrderTotalAmount = applyAmount.trim();\n ConvertReservationsToPurchase.selectPaymentType(givenPaymentType);\n Button.clickOnButton(CC_EnterNumber);\n SelectPaymentType.enterCCNumber(\"4444333322221111\");\n CC_ExpirationMonth.ClickItem(\"01 - January\");\n var yearDisplay = CC_ExpirationYear.Label(\"labelDisplay\").Caption;\n var currYear = aqDateTime.GetYear(aqDateTime.Today());\n if(VerifyCheckProperty.compareStringObj(yearDisplay,currYear))\n {\n Log.Message(\"Default current year displayed\"); \n }else{\n merlinLogError(\"Default current year is not displayed\");\n return;\n }\n \n CC_StreetAddress.Keys(\"Pune\");\n CC_ZipCode.Keys(\"1234\"); \n aqUtils.Delay(2000);\n Button.clickOnButton(applyBalance);\n \n if(!ccMonthlErrorindicator.Exists){\n merlinLogError(\"Month error indicator is not displayed.\");\n return;\n } \n CC_ExpirationMonth.ClickItem(\"05 - May\");\n CC_ExpirationYear.Keys(\"[Down][Down][Down]\");\n aqUtils.Delay(2000);\n Button.clickOnButton(applyBalance); \n aqUtils.Delay(2000); \n// var cardLastDigit = paymentListFirstItem.PaymentListItem(\"payItem\").Label(\"descLabel\").Caption;\n// if( !VerifyCheckProperty.compareStringObj(cardLastDigit,\"Visa 1111\")){\n// merlinLogError(\"Credit Card last digit is not displayed in applied amount.\");\n// return;\n// }\n var correctcardLastDigit = false;\n var cnt = paymentListFirstItem.PaymentListItem(\"payItem\").HGroup(0).ChildCount;\n for( j = 0; j<cnt;j++){\n lbl= paymentListFirstItem.PaymentListItem(\"payItem\").HGroup(0).Child(j).Caption;\n if(lbl.startsWith(\"Visa 1111\")){\n correctcardLastDigit = true; \n }\n } \n if(correctcardLastDigit){\n Log.Message(\"Credit Card last digit is correctly displayed in applied amount.\");\n return; \n }else{\n merlinLogError(\"Credit Card last digit is not displayed in applied amount.\");\n return; \n }\n Log.Message(\"Complete the order\");\n WrapperFunction.settlementCompleteOrder();\n aqUtils.Delay(3000);\n validateTicket(\"Don't Validate\");\n Log.Message(\"Don't Validate the order\"); \n verifyTotalOnConfirmationPage(settlementTotal);\n var orderId = cnf_orderID1.Caption;\n if (orderId == null){\n merlinLogError(\"Order id is not present\");\n return;\n } \n var OrderID= (orderId.split('#')[1]).trim();\n OrderInfo.prototype.OrderID = OrderID;\n Log.Message(\"Order id is set:\"+OrderID); \n \n } catch (e) {\n\t merlinLogError(\"Oops! There's some glitch in the script: \" + e.message);\n\t return;\n }\n finally { \n AppLoginLogout.logout(); \n\t Log.PopLogFolder();\n } \n}", "function creditCard(cardNum, zip, cvv) {\r\n if (paymentSelect.value === 'credit card') {\r\n if (isNumValid(cardNum) === false) {\r\n creditCardSpan.style.display = '';\r\n creditCardSpan.style.color = 'red';\r\n } \r\n if (isZipCodeValid(zip) === false) {\r\n zipCodeSpan.style.display = '';\r\n zipCodeSpan.style.color = 'red';\r\n }\r\n if (isCvvCodeValid(cvv) === false) {\r\n cvvCodeSpan.style.display = '';\r\n cvvCodeSpan.style.color = 'red';\r\n } \r\n if (isNumValid(cardNum) === true && isZipCodeValid(zip) === true && isCvvCodeValid(cvv) === true) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n} else {\r\n return true;\r\n}\r\n}", "function CreditCard(number){\n this.number = number;\n this.checkCard();\n}", "function updateNewCreditsArea() {\n\tvar promoVal = 0;\n\tif($('#checkoutPromoCodeAmount1').text()){\n\t\tpromoVal = getFormatedNumber($('#checkoutPromoCodeAmount1').text());\n\t}\n\tvar amountAdded = calculateCashSummaryTotalAmount() + promoVal;\n\tvar creditsAppliedToSummary = calculateCreditsApplied();\n\tvar addedAmount = getFormatedNumber(amountAdded, true);\n var amountDueToPay = getFormatedNumber($(\"#billTotalAmount\").text()) + getFormatedNumber($(\"#totalFeeValue\").text()) ;\n var newCredits = amountAdded - (amountDueToPay - creditsAppliedToSummary); /* Calculate new credits */\n var newCreditsApplied = getFormatedNumber(newCredits, true);\n if(amountAdded){\n \t$(\"#idOfAmountAdded\").text(addedAmount);\n \tif($('#sel_pay_container1').is(':visible')){\n \t\t$(\"#amountAdded\").show();\n \t}\n } else {\n \t$(\"#amountAdded\").hide();\n }\n if(newCredits > 0) {\n \t$(\"#idOfNewCreditsApplied\").text(newCreditsApplied);\n \tif($('#sel_pay_container1').is(':visible')){\n \t\t$(\"#newCreditsApplied\").show();\n \t}\n\t \tvar registerUser = parseBoolean(localStorage.getItem(\"registerUser\"));\n\t if (registerUser === false) {\n\t\t \t$(\"#discountAndPromoCodeReg\").show();\n\t\t\t$(\"#promoCodeBox\").show();\n\t }\n } else {\n\t \t$(\"#cashPaymnetInfoMessage\").hide();\n\t \t$(\"#newCreditsApplied\").hide();\n }\n}", "function MyAccountBillingAlterCC() {\n var ccType = $(\"#SelectCreditCard\");\n var ccNo = $(\"#SecondaryCreditCardNo\");\n var cvv = $(\"#SecondaryCVV\");\n var ccYear = $(\"#SelectCCYear\");\n var ccMonths = $(\"#SelectCCMonth\");\n\n if ($.trim(ccType).length > 0 && $.trim(ccType.val()).toLowerCase() == \"please select\") { window.alert('Please enter a secondary credit card type.'); return false; }\n else if ($.trim(ccNo).length > 0 && $.trim(ccNo.val()).toLowerCase() == \"\") { window.alert('Please enter a secondary credit card number.'); return false; }\n else if (!validateCreditCard($.trim(ccNo.val()))) { alert('Enter a valid Credit Card Number'); }\n /* ////else if ($.trim(cvv).length > 0 && $.trim(cvv.val()).toLowerCase() == \"\") { window.alert('Please enter a secondary credit card CVV.'); return false; }*/\n else if ($.trim(ccYear).length > 0 && $.trim(ccYear.val()).toLowerCase() == \"year\") { window.alert('Please select a secondary credit card expiration year.'); return false; }\n else if ($.trim(ccMonths).length > 0 && $.trim(ccMonths.val()).toLowerCase() == \"month\") { window.alert('Please select a secondary credit card expiration month.'); return false; }\n else {\n var URL = \"http://\" + DomainName + \"/SecondaryCreditCardSave\";\n $.ajax({\n cache: false,\n type: \"GET\",\n url: URL,\n data: {\n \"userAccountId\": $.trim($(\"#MyAccountID\").val()), \"billingAddressId\": $.trim($(\"#CreditCardInformation_BillingAddressId\").val()),\n \"cardType\": $.trim($(\"#SelectCreditCard\").val()), \"cardNumber\": $.trim($(\"#SecondaryCreditCardNo\").val()), \"cvvCode\": $.trim($(\"#SecondaryCVV\").val()),\n \"expiredMonth\": $.trim($(\"#SelectCCMonth\").val()), \"expiredYear\": $.trim($(\"#SelectCCYear\").val())\n },\n success: function (data) {\n if (data != null) {\n if ($.trim(data) == \"1\") { alert(\"Your secondary credit card information has been successfully saved.\"); }\n else { alert(\"Failed, please try again later.\"); }\n }\n else { alert(\"Failed, please try again later.\"); }\n },\n error: function (ex) {\n ExceptionHandling(ex);\n }\n // error: function (xhr, ajaxOptions, thrownError) { alert(\"Failed, please try again later.\"); }\n });\n return true;\n }\n}", "function Handle(args) {\n\tLogger.warn('--------------In credit Hndle Method-------------');\n\tvar paymentInstrument;\n var cart = Cart.get(args.Basket);\n var creditCardForm = app.getForm('billing.paymentMethods.creditCard');\n var PaymentMgr = require('dw/order/PaymentMgr');\n var cardNumber = creditCardForm.get('number').value();\n var cardSecurityCode = creditCardForm.get('cvn').value();\n var cardType = creditCardForm.get('type').value();\n var expirationMonth = creditCardForm.get('expiration.month').value();\n var expirationYear = creditCardForm.get('expiration.year').value();\n var paymentCard = PaymentMgr.getPaymentCard(cardType);\n\n var creditCardStatus = paymentCard.verify(expirationMonth, expirationYear, cardNumber, cardSecurityCode);\n\n if (creditCardStatus.error) {\n\n var invalidatePaymentCardFormElements = require('app_oscill8/cartridge/scripts/checkout/InvalidatePaymentCardFormElements');\n invalidatePaymentCardFormElements.invalidatePaymentCardForm(creditCardStatus, session.forms.billing.paymentMethods.creditCard);\n\n return {error: true};\n }\n\n Transaction.wrap(function () {\n cart.removeExistingPaymentInstruments(dw.order.PaymentInstrument.METHOD_CREDIT_CARD);\n paymentInstrument = cart.createPaymentInstrument(dw.order.PaymentInstrument.METHOD_CREDIT_CARD, cart.getNonGiftCertificateAmount());\n\n paymentInstrument.creditCardHolder = creditCardForm.get('owner').value();\n paymentInstrument.creditCardNumber = cardNumber;\n paymentInstrument.creditCardType = cardType;\n paymentInstrument.creditCardExpirationMonth = expirationMonth;\n paymentInstrument.creditCardExpirationYear = expirationYear;\n });\n\n try{\n \tgetToken(paymentInstrument,cardSecurityCode);\n }catch(ex){\n \tLogger.error(ex.message);\n\t\treturn {error: true, errorMessage: ex.message};\n }\n\n return {error: false, success: true};\n}", "function makeCard(cardNumber,expirationDate,securityCode) {\n var creditcard = {cardNumber:cardNumber,expirationDate:expirationDate,securityCode:securityCode};\n return creditcard;\n\n}", "invalidCreditCardHandler (amount) {\n throw new Error(`El usuario: ${this.user.id}, posee una tarjeta de credito invalida`)\n }", "function turn_credit_debit(acct_num, acct_ids_ct, acct_ids){\n\tif (document.getElementById(\"at\"+acct_num).checked == true){\n\t\tdocument.getElementById(\"c\"+acct_num).disabled = false;\n\t\tdocument.getElementById(\"d\"+acct_num).disabled = false;\n\t\tdocument.getElementById(\"d\"+acct_num).checked = true;\n\t\tdocument.getElementById(\"da\"+acct_num).disabled = false;\n\t\t\n\t\tif ($(\"#budgetAmount\").val() != \"\"){\n\t\t\t$(\"#da\"+acct_num).val($(\"#budgetAmount\").val());\n\t\t}else{\n\t\t\t$(\"#da\"+acct_num).val(\"\");\n\t\t}\n\t\t$(\"#da\"+acct_num).focus();\n\t}else{\n\t\tdocument.getElementById(\"c\"+acct_num).checked = false;\n\t\tdocument.getElementById(\"d\"+acct_num).checked = false;\n\t\tdocument.getElementById(\"c\"+acct_num).disabled = true;\n\t\tdocument.getElementById(\"d\"+acct_num).disabled = true;\n\t\t$(\"#da\"+acct_num).val(\"\");\n\t\tdocument.getElementById(\"da\"+acct_num).disabled = true;\t\t\n\t}\n\tacct_flag = 0;\n\tstr_val = 0;\n\tend_val = 9;\n\tfor (i=0;i<acct_ids_ct;i++){\n\t\ttemp_id = (acct_ids.toString()).substring(str_val,end_val);\t\n\t\tif (document.getElementById(\"at\"+temp_id).checked == true){\n\t\t\tacct_flag += 1;\n\t\t}\n\t\tstr_val = str_val + 9;\n\t\tend_val = end_val + 9;\n\t}\n\tif (acct_flag == 0){\n\t\tdocument.getElementById(\"addacct1\").checked = false;\n\t\tdocument.getElementById(\"addacct2\").checked = true;\n\t\tstr_val = 0;\n\t\tend_val = 9;\n\t\tfor (i=0;i<acct_ids_ct;i++){\n\t\t\ttemp_id = (acct_ids.toString()).substring(str_val,end_val);\t\n\t\t\tdocument.getElementById(\"at\"+temp_id).disabled = true;\n\t\t\tdocument.getElementById(\"c\"+temp_id).disabled = true;\n\t\t\tdocument.getElementById(\"d\"+temp_id).disabled = true;\n\t\t\tdocument.getElementById(\"at\"+temp_id).checked = false;\n\t\t\tdocument.getElementById(\"c\"+temp_id).checked = false;\n\t\t\tdocument.getElementById(\"d\"+temp_id).checked = false;\n\t\t\tstr_val = str_val + 9;\n\t\t\tend_val = end_val + 9;\n\t\t}\n\t\tdocument.getElementById(\"on_acct_insert\").style.display = \"none\";\n\t}else {\n\t\tdocument.getElementById(\"addacct1\").checked = true;\n\t}\n}//end function", "function validateCreditCard(form) {\n var bValid = true;\n var focusField = null;\n var i = 0;\n var fields = new Array();\n oCreditCard = new creditCard();\n for (x in oCreditCard) {\n if ((form[oCreditCard[x][0]].type == 'text' ||\n form[oCreditCard[x][0]].type == 'textarea') &&\n (form[oCreditCard[x][0]].value.length > 0) &&\n form[oCreditCard[x][0]].disabled == false) {\n if (!luhnCheck(form[oCreditCard[x][0]].value)) {\n if (i == 0) {\n focusField = form[oCreditCard[x][0]];\n }\n fields[i++] = oCreditCard[x][1];\n bValid = false;\n }\n }\n }\n if (fields.length > 0) {\n focusField.focus();\n alert(fields.join('\\n'));\n }\n return bValid;\n }", "function addCreditLines(creditMemo)\r\n{\r\n\r\n\r\n\tvar lineCount = 0;\r\n\tvar item='';\r\n\tvar lineTotal = 0;\r\n\tvar postPerdiodIntID = 0;\r\n\tvar vatAmount = 0;\t\t\t\t// 1.0.8\r\n\tvar desc = '';\t\t\t\t\t// 1.0.18\r\n\tvar invLineNum = 0;\t\t\t\t// 1.0.19\r\n\tvar entity='';\t\r\n\tvar taxCode = '';\r\n\tvar taxCodeInternalID=0;\r\n\t\r\n\tfor(var x=0; x<=itemsArray.length-1;x++)\r\n\t{\r\n\r\n\t\titemObj = itemsArray[x];\r\n\r\n\t\t// check if this is a discount line ### NOTE A DISCOUNT IS POSITIVE FOR A CREDIT ####\r\n\t\tif(itemObj.serviceAmount>0)\r\n\t\t{\r\n\t\t\t\r\n\t\t\t// store the class from the previous invoice line - this will be used for the invoice line\r\n\t\t\t// class = product family\r\n\t\t\titem = lookupItem(itemObj.code); // lookup item\r\n\t\t\ttempClass = journalClass;\r\n\t\t\titem = getDiscountProductCode(itemObj.code);\r\n\t\t\t\r\n\t\t\tjournalClass = tempClass;\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\titem = lookupItem(itemObj.code); // lookup item\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tnlapiLogExecution('DEBUG', 'ITEMS', 'ITEM CODE: ' + itemObj.code);\r\n\t\t\r\n\t\t// 1.0.8\r\n\t\tlineTotal = -(itemObj.serviceAmount - itemObj.vatAmount);\t\t\r\n\t\tvatAmount = -(itemObj.vatAmount);\r\n\r\n\t\tcreditMemo.selectNewLineItem('item');\r\n\t\tcreditMemo.setCurrentLineItemValue('item', 'item', item); \r\n\t\tcreditMemo.setCurrentLineItemValue('item', 'description', itemObj.desc);\r\n\t\tcreditMemo.setCurrentLineItemValue('item', 'rate', lineTotal);\r\n\r\n\t\tentity = lookupCustomer(jdeid);\r\n\t\tcreditMemo.setCurrentLineItemValue('item', 'custcol_shipto', itemObj.shipTo);\r\n\r\n\t\t// lookup the ship to customer to extract the region\r\n\t\tentity = lookupCustomer(itemObj.shipTo);\r\n\r\n\t\tcreditMemo.setCurrentLineItemValue('item', 'custcol_region', region);\t\t// set region for the ship to\t\r\n\t\tcreditMemo.setCurrentLineItemValue('item', 'custcol_channelshipto', channel);\t\r\n\r\n\t\tentity = lookupCustomer(itemObj.billTo);\r\n\t\tcreditMemo.setCurrentLineItemValue('item', 'custcol_channelbillto', channel);\t\r\n\r\n\t\ttaxCode = itemObj.vatCode;\t\t\t\t\t\t\t\t\t\t\t\t\t// set tax code\r\n\t\ttaxCodeInternalID = getTaxCode(taxCode);\r\n\r\n\t\tcreditMemo.setCurrentLineItemValue('item', 'taxcode', taxCodeInternalID);\r\n\t\tcreditMemo.setCurrentLineItemValue('item', 'tax1amt', vatAmount);\t\t\t// set tax amount 1.0.8\r\n\t\tcreditMemo.setCurrentLineItemValue('item', 'class', journalClass);\t\t\t// product family class\r\n\r\n\t\tcreditMemo.commitLineItem('item');\r\n\r\n\t}\r\n\t\r\n\r\n\r\n}", "function IsCC (st) {\r\n return isCreditCard(st);\r\n}", "function myFunction() {\n let creditCard = document.getElementById('card-number').value;\n let sum = 0;\n let workingDigits = creditCard;\n \n while (workingDigits > 0){\n let lastDigit = workingDigits % 10; //3\n sum = sum + lastDigit // 3\n //get rid of last two digits, next num is 7\n workingDigits = Math.floor(workingDigits / 100);\n //since we don't know how many times this should iterate,\n //we use a while loop\n }\n \n //odd number multiplied by 2, \n //factored into one if greater than 9, and added to the sum\n \n let ridLastDigit = Math.floor(creditCard/10); \n workingDigits = ridLastDigit;\n while (workingDigits > 0){\n \n let lastDigit = workingDigits % 10; //1\n lastDigit *= 2\n let digitValue =0;\n if (lastDigit < 10){\n sum = sum + lastDigit\n } else {\n digitValue = (lastDigit%10) + Math.floor(lastDigit/10);\n sum = sum + digitValue;\n }\n //get rid of last two digits to get to the third one\n workingDigits = Math.floor(workingDigits / 100);\n } \n //finding the first digit and first two digits of the numbers\n //logic iterate through the numbers floor-divided by ten until it counts to the \n //lst number, i.e 0. After that, you can see that to get the first digit,\n // floor-division by 10^(count-1), and to get the first two digits,\n //floor division by 10^(count-2) works perfectly fine.\n workingDigits = creditCard;\n let count = 0;\n \n while (workingDigits !== 0){\n workingDigits = Math.floor(workingDigits/10);\n count ++\n }\n \n firstDigit = Math.floor(creditCard/10**(count-1));\n firstTwoDigits = Math.floor(creditCard/10**(count-2));\n \n //since the validity is now confirmed, classify the credit card according to company and console log the fuck out.\n // American express starts with 34 or 37 >> 15 digit number\n //Mastercard starts with 22, 51, 52, 53, 54 or 55 -> 16 digit\n //Visa starts with a 4 -> 13 or 16 digits\n let cardProvider = ['VISA', 'MASTERCARD', 'AMERICAN-EXPRESS']\n \n //check if the credit card is valid\n if ( count > 12 && sum % 10 === 0){\n if (count === 15 && (firstTwoDigits === 34 || firstTwoDigits === 37)){\n document.getElementById(\"cardDisplay\").innerHTML = `The Card belongs to ${cardProvider[2]}`;\n } else if (count === 16 && (firstTwoDigits ===22 || (firstTwoDigits >50 && firstTwoDigits < 56))){\n document.getElementById(\"cardDisplay\").innerHTML =`The Card belongs to ${cardProvider[1]}`;\n } else if ((count === 13 || count === 16) && firstDigit === 4){\n document.getElementById(\"cardDisplay\").innerHTML =`The Card belongs to ${cardProvider[0]}`;\n }\n else{\n document.getElementById(\"cardDisplay\").innerHTML =`The Card is mathematically valid but its maker isn't listed with us`;\n }\n } else {\n document.getElementById(\"cardDisplay\").innerHTML =`the Credit Card ${creditCard} is INVALID!!`;\n }\n\n \n // console.log(\"CreditCard before click: \", creditCard);\n // console.log('firstDigit: ', firstDigit);\n // console.log('firstTwoDigits: ', firstTwoDigits); console.log('digit count: ', count)\n // console.log(workingDigits)\n // console.log('sum total: ', sum)\n\n //end of code \n}", "function checkCashRegister(price, cash, cid) {\n\n console.log(\"price:\", price);\n console.log(\"cash:\", cash);\n console.log(\"cid:\\n \", cid);\n \n \n \n \n }", "cardPayment(nonce, invoice, cb) {\n console.log(invoice);\n // Check of client is connected\n if (!this.userId) {\n throw new Meteor.Error('payment', '403: Non authorized');\n }\n // Check transimtted data consistency\n check(nonce, String);\n check(invoice, SD.Structure.InvoiceSchema);\n check(cb, Match.Any);\n const user = Meteor.users.findOne(this.userId);\n const email = user.emails[0].address;\n if (!Roles.userIsInRole(this.userId, 'payment_pending')) {\n log.warn('Fraud attempt: wrong role for user', user, 'whit roles', Roles.getRolesForUser(this.userId));\n throw new Meteor.Error(ERROR_TYPE, 'Client inconnu pour le paiement', this.userId);\n }\n if (!user.profile.braintreeCustomerId) {\n log.warn('Fraud alert: missing braintreeCustomerId', email);\n throw new Meteor.Error(ERROR_TYPE, 'Paiement impossible pour le moment pour', email);\n }\n Meteor.users.update({_id: this.userId}, {\n $set: {\n invoice,\n modifiedAt: new Date()\n }\n });\n // Get amount in UK/EN/US format and switch back current language\n numeral.language('en');\n amount = numeral(invoice.totalTTC).format('00.00');\n numeral.language(getUserLanguage());\n result = SD.Utils.braintreeGateway.transaction.sale({\n amount: amount,\n paymentMethodNonce: nonce,\n options: {\n submitForSettlement: true\n }\n });\n if (!result || !result.success) {\n log.warn('Braintree Error for', email, result);\n throw new Meteor.Error(ERROR_TYPE, 'Paiement impossible pour le moment pour', email);\n }\n log.info('Payment for user', email, 'with amount', invoice.totalTTC);\n // Set proper roles for user\n Roles.addUsersToRoles(this.userId, 'subscribed');\n Roles.removeUsersFromRoles(this.userId, 'payment_pending');\n // Send the billing email\n this.unblock();\n const cgv = SD.Structure.basicPages.collection.findOne({url: 'cgv'});\n const html = s.replaceAll(marked(cgv.content), '\\n', '');\n const invoiceTxt = SD.Utils.renderInvoice(invoice.prices, invoice.discounts, invoice.totalHT, invoice.totalTTC);\n sendBillingEmail(email, invoiceTxt, cgv.title, html);\n return true;\n }", "function creditCardValid(number) {\n if (number.toString().length != 16) {console.log(\"Card must have 16 digits\")}\n else {\n var digitContainer = [];\n var cardDigits = []\n var cardDigits = ('' + number).split('');\n for( var i=0; i < cardDigits.length; i++) {\n if (i % 2 == 0) {\n digitContainer.push(cardDigits[i])\n } else{\n digitContainer.push(cardDigits[i] * 2)\n }\n }\n\n var order = ('' + (digitContainer.join(''))).split('');\n\n var totalAmount = order.reduce(function(sum, order) {\n return sum + parseInt(order, 10)\n }, 0)\n\n totalAmount % 10 == 0 ? true : false\n }\n}", "function validate_credit_card_info(){\n\tvar emailExp = /^[\\w\\-\\.\\+]+\\@[a-zA-Z0-9\\.\\-]+\\.[a-zA-z0-9]{2,4}$/;\t\n\tif(document.frmCreditCardInfo.ctype.value == ''){\n\t\tdocument.getElementById('lblfromctype').innerHTML = 'This field is required';\n\t\tdocument.frmCreditCardInfo.ctype.focus();\n\t\treturn false;\n\t}else{\n\t\tdocument.getElementById('lblfromctype').innerHTML = '';\n\t}\n\tif(document.frmCreditCardInfo.cnumber.value==''){\n\t\tdocument.getElementById('lblfromcnumber').innerHTML='This field is required';\n\t\tdocument.frmCreditCardInfo.cnumber.focus();\n\t\treturn false;\n\t}else{\n\t\tdocument.getElementById('lblfromcnumber').innerHTML='';\n\t}\n\tif(document.frmCreditCardInfo.ExpMonth.value==''){\n\t\tdocument.getElementById('lblExpYear').innerHTML='Select a month';\n\t\tdocument.frmCreditCardInfo.ExpMonth.focus();\n\t\treturn false;\n\t}else{\n\t\tdocument.getElementById('lblExpYear').innerHTML='';\n\t}\n\tif(document.frmCreditCardInfo.ExpYear.value==''){\n\t\tdocument.getElementById('lblExpYear').innerHTML='Select a year';\n\t\tdocument.frmCreditCardInfo.ExpYear.focus();\n\t\treturn false;\n\t}else{\n\t\tdocument.getElementById('lblExpYear').innerHTML='';\n\t}\n\tif(document.frmCreditCardInfo.choldername.value==''){\n\t\tdocument.getElementById('lblfromcholdername').innerHTML='This field is required';\n\t\tdocument.frmCreditCardInfo.choldername.focus();\n\t\treturn false;\n\t}else{\n\t\tdocument.getElementById('lblfromcholdername').innerHTML='';\n\t}\n\tif(document.frmCreditCardInfo.cemail.value==''){\n\t\tdocument.getElementById('lblfromcemail').innerHTML='This field is required';\n\t\tdocument.frmCreditCardInfo.cemail.focus();\n\t\treturn false;\n\t}else{\n\t\tdocument.getElementById('lblfromcemail').innerHTML='';\n\t}\n\tif(!document.frmCreditCardInfo.cemail.value.match(emailExp)){\n\t\tdocument.getElementById('lblfromcemail').innerHTML='Required Valid Email ID.';\n\t\tdocument.frmCreditCardInfo.cemail.focus();\n\t\treturn false;\n\t}else{\n\t\tdocument.getElementById('lblfromcemail').innerHTML='';\n\t}\n\tif(document.frmCreditCardInfo.czipcode.value==''){\n\t\tdocument.getElementById('lblfromczipcode').innerHTML='This field is required';\n\t\tdocument.frmCreditCardInfo.czipcode.focus();\n\t\treturn false;\n\t}else{\n\t\tdocument.getElementById('lblfromczipcode').innerHTML='';\n\t}\n\treturn true;\t\n}", "moneyInSafe() {\n let money = this.bank.money;\n money += this.moneyOfPlayers;\n money += this.moneyInCustoms;\n return money;\n }", "function retreive_tx_payment() {}", "function updateCreditBillDetail() {\n var quantity = ($('#quantity_credit').val() > 0 ? $('#quantity_credit').val() : 0 );\n var rate = ($('#rate_credit').val() > 0 ? $('#rate_credit').val() : 0 );\n var discount = ($('#discount_credit').val() > 0 ? $('#discount_credit').val() : 0 );\n var billAmount, deductedTotal = 0;\n\n billAmount = quantity * rate;\n if(billAmount >=0) {\n if((billAmount/2) > discount) {\n deductedTotal = billAmount - discount;\n } else if(discount > 0){\n alert(\"Error !!\\nDiscount amount exceeded the limit. Maxium of 50% discount is allowed!\");\n $('#discount_credit').val('');\n deductedTotal = billAmount;\n }\n } else {\n deductedTotal = 0;\n }\n if(!($('#discount_credit').val())) {\n $('#discount_credit').val(0);\n } else {\n if(discount == 0 || (discount.charAt(discount.length - 1) != '.')) {\n //for removing the preceding zero\n discount = discount * 1;\n }\n\n $('#discount_credit').val(discount);\n }\n $('#bill_amount_credit').val(billAmount);\n $('#deducted_total_credit').val(deductedTotal);\n}", "addCredits(tag, credits){\r\n return new Promise((resolve, reject)=>{\r\n if (credits < 2) {\r\n reject('NO MINIMO R$ 2,00') \r\n }\r\n this.repository.addCredits(tag, +credits).then((res)=>{\r\n const userTemp = {\r\n name: res.name,\r\n credits: res.credits +parseFloat(credits)\r\n }\r\n resolve(userTemp)\r\n \r\n }).catch((res)=>{\r\n reject('NAO FOI POSSIVEL ADD CREDITOS!!')\r\n })\r\n })\r\n }", "function toPay(){\n \n}", "function calculateFinalCost(baseRate, hours, extraHi, extraLow) {\n\t\n\tvar baseHours = 0;\n\tvar extraHours = 0;\n\tvar extraRate = 100;\n\tvar extraHiRate = 5;\n\tvar extraLowRate = 2.5;\n\tvar finalQuote = 0;\n\t\n\tif (hours>0 && hours<= 4) {\n\t\tbaseHours = hours;\n\t\textraHours = 0;\n\t}\n\telse if (hours > 4){\n\t\tbaseHours = 4;\n\t\textraHours = hours - 4;\n\t}\n\tfinalQuote = baseHours*baseRate + extraHours*extraRate + extraHi*extraHiRate + extraLow*extraLowRate;\n\treturn finalQuote;\n }", "addCreditCard(accountId, creditCard) {\n var client;\n var remotePaymentAPI = this.remotePaymentAPI;\n var mainCreditCardInfo = {};\n mainCreditCardInfo.number = creditCard.number;\n mainCreditCardInfo.cardholderName = creditCard.cardholder;\n mainCreditCardInfo.expirationDate = creditCard.expires.replace(/ /g, '');\n mainCreditCardInfo.cvv = creditCard.cvv;\n mainCreditCardInfo.billingAddress = {};\n mainCreditCardInfo.billingAddress = {postalCode: creditCard.postCode};\n var defer = this.$q.defer();\n\n this.getClientToken(accountId).then(() => {\n client = new this.$braintree.api.Client({\n clientToken: this.tokensPerAccount.get(accountId)\n });\n\n client.tokenizeCard(mainCreditCardInfo, function (err, nonce) {\n var newCreditCard = {nonce: nonce};\n newCreditCard.state = creditCard.state;\n newCreditCard.country = creditCard.country;\n newCreditCard.streetAddress = creditCard.streetAddress;\n newCreditCard.city = creditCard.city;\n\n remotePaymentAPI.add({accountId: accountId}, newCreditCard).$promise.then(() => {\n defer.resolve();\n }, (error) => {\n defer.reject(error);\n });\n\n });\n });\n return defer.promise;\n }", "function isValidCard(card) {\n ccNum.nextElementSibling.innerText = \"Credit Card must be 16 digits\";\n return /^\\d{16}$/.test(card);\n}", "addCreditToUser({ idUser }, { credit }, result) {\r\n let query = `update uZvFiNMuwF.user set`;\r\n if (credit != undefined || credit != null)\r\n query += ` credit = credit + ${credit} `;\r\n query += ` where idUser = ${idUser}`;\r\n console.log(query);\r\n sql.query(query, (err, rows, fields) => {\r\n if (err) {\r\n result(err, rows);\r\n return;\r\n }\r\n\r\n result(null, rows);\r\n });\r\n }", "function customerInfo(name,cardNum){\n var firstLetter = name.slice(0,1).toUpperCase();\n var restOfName = name.slice(1).replaceAll(/[a-zA-Z]/gi,'*');\n var specialChars = '\\n************';\n var last4Digits = cardNum.slice(12,16);\n return ( firstLetter + restOfName + specialChars + last4Digits);\n }", "function CC_Validate(ccNum,ccType)//credit card number,credit card type, e.g. new Array(\"card_type\",\"Card number\");\r\n{\r\n\tvar checksum = 0;\r\n\tvar i;\r\n\tvar digit;\r\n\tvar temp;\r\n\tvar cclength=ccNum.length;\r\n\tvar ccFirstOne = ccNum.substr(0,1);\r\n\tvar ccFirstTwo = ccNum.substr(0,2);\r\n\r\n\tccType = ccType.toUpperCase();\r\n\t\r\n\tif (ccType == \"VISA\")\r\n\t{\r\n\t\tif (!(cclength == 13 || cclength == 16))\r\n\t\t\treturn false;\r\n\t\tif (!(ccFirstOne == \"4\"))\r\n\t\t\treturn false;\r\n\t}\r\n\telse if (ccType == \"MASTERCARD\")\r\n\t{\r\n\t\tif (!(cclength == 16))\r\n\t\t\treturn false;\r\n\t\tif (!(ccFirstTwo == \"51\" || ccFirstTwo == \"52\" || ccFirstTwo == \"53\" || ccFirstTwo == \"54\" || ccFirstTwo == \"55\") )\r\n\t\t\treturn false;\r\n\t}\r\n\telse if (ccType == \"AMEX\")\r\n\t{\r\n\t\tif (!(cclength == 15))\r\n\t\t\treturn false;\r\n\t\tif (!(ccFirstTwo == \"34\" || ccFirstTwo == \"37\") )\r\n\t\t\treturn false;\t\t\t\r\n\t}\r\n\telse if (ccType == \"SWITCH\" || ccType == \"DELTA\" || ccType == \"SOLO\")\r\n\t{\r\n\t\t//no check on length - valid length not known at present\r\n\t}\t\r\n\t\r\n\tif (cclength % 2 != 0) {\r\n\t\tcclength += 1;\r\n\t\tccNum = \"0\" + ccNum;\r\n\t}\r\n\t\r\n\tfor (i = 0; i < cclength; i++) {\r\n\t\tdigit = parseInt(ccNum.charAt(i));\r\n\t\tif ((i % 2) == 0) {\r\n\t\t\tdigit *= 2;\r\n\t\t\tif (digit > 9)\r\n\t\t\t\tdigit = parseInt(digit / 10) + parseInt(digit % 10);\r\n\t\t}\r\n\t\tchecksum += digit;\r\n\t}\r\n\r\n\t\r\n\tif (checksum % 10 == 0)\r\n\t\treturn(true);\r\n\telse\r\n\t\treturn(false);\r\n}", "function Credito(){\n\tvar saldo=_saldo;\n\tCredito.prototype.getSaldo = function(){\n\t\treturn saldo;\n\t}\n\tCredito.prototype.incrementar = function(n){\n\t\tsaldo += n;\n\t}\n\tCredito.prototype.disminuir = function(n){\n\t\tsaldo -= n;\n\t}\n}", "function validateVisa(){\r\n\tvar creditNumber=document.getElementById(\"creditNumber\").value;\r\n\r\n\tif(creditNumber.length==0){\r\n\t\tprintError(\"creditNumber required\",\"creditError\",\"red\");\r\n\t\ttextboxBorder(\"creditNumber\");\r\n\t\treturn false;\r\n\r\n\t}\r\n\r\n\tif(!creditNumber.match(/^[0-9]{16}$/)){\r\n\r\n\t\tprintError(\"enter 16 digit credit card number\",\"creditError\",\"blue\");\r\n\t\ttextboxBorder(\"creditNumber\");\r\n\t\treturn false;\r\n\t}\r\n\r\n\tprintSuccess(\"creditNumber\",\"green\",\"creditError\");\r\n\treturn true;\r\n\r\n\r\n}", "function postCreditNote(invIntID)\r\n{\r\n\t\r\n\tvar creditMemoID = 0;\r\n\tvar invLineNum = 0;\r\n\r\n\ttry\r\n\t{\r\n\t\t// full credit\r\n\t\t\r\n\t\tcreditMemo = nlapiTransformRecord('invoice', invIntID, 'creditmemo');\r\n\r\n\t\tcreditMemo.setFieldValue('autoapply', 'F'); //1.0.17 change Auto Apply flag to false MJL\r\n\t\t\r\n\t\tcreditMemo.setFieldValue('tranid', creditNo);\r\n\t\tcreditMemo.setFieldValue('customform', alignCreditMemo);\r\n\t\tcreditMemo.setFieldValue('memo', 'Credit posted for invoice: ' + invoiceNo + '\\n Patient Number: ' + patientDetails);\t// 1.0.18\r\n\r\n\t\tcreditMemo.setFieldValue('custbody_patientnumber', patientDetails);\t\t// 1.0.18\r\n\t\t\r\n\t\tif(interCompanyTag!='not found' && interCompanyTag.length > 0) {\r\n\t\t\tvar interCompanyInternalID = genericSearch('customrecord_intercompanyclass','custrecord_intercompany_tagname',interCompanyTag);\r\n\t\t \tcreditMemo.setFieldValue('custbody_invoice_intercompany_tag', interCompanyInternalID);\r\n\t\t}\r\n \r\n \r\n\t\tcreditMemo.setFieldValue('custbody_invoicenumber', invoiceNo);\t\t\t// 1.0.18\r\n\t\r\n\t\tcreditMemoID = nlapiSubmitRecord(creditMemo, true); \r\n\r\n\t\tauditTrail('TRUE', 'Posted Full Credit');\r\n\t\tnlapiLogExecution('AUDIT', 'success', 'Credit note posted for invoice: ' + invoiceNo);\r\n\t}\r\n\tcatch(e)\r\n\t{\r\n\t\tnlapiLogExecution('AUDIT', 'failure', 'failed to post creditnote for invoice: ' + invoiceNo);\r\n\t\terrorHandler(e);\r\n\t\tauditTrail('FAILED', 'postCreditNote - Cannot post credit note ' + creditNo + ' for invoice ' + invoiceNo); //1.0.16 corrected error message MJL\r\n\t}\r\n\r\n\treturn creditMemoID;\r\n\r\n}", "function formatCreditCard(input) {\n const regex = /^(\\d{4})(\\d{4})(\\d{4})(\\d{4})$/;\n return input.replace(regex, '$1 - $2 - $3 - $4');\n}", "function validateCard () {\n\n isValid(cardNumInput);\n isCardValid = true;\n\n if (paymentSelect.value === 'credit card') {\n if (!/^\\d{13,16}$/.test(cardNumInput.value)) {\n isInvalid(cardNumInput);\n isCardValid = false;\n }\n }\n}", "isPaymentSufficient() {\n if (this.cashTendered >= this.amountDue) {\n console.log(\"Payment complete\")\n\n } else {\n this.insertCoin(type);\n }\n }", "function totalExtraTimePay(contractTimeAmount, extraTimeAmount) {\r\n result = contractTimeAmount + extraTimeAmount;\r\n return result;\r\n}", "function getCreditCardDetails(src, updateHeader) {\n var id = $(\".card-id\").data('cardId');\n SelfServiceController.getCCDetailsById(id, function(result, event) {\n if(event.status && result !== null && result !== undefined){\n var cardNumber = result['maskNumber'].split('*').pop();\n var cardHolderName = result['cardHolderName'];\n var cardExpirationDate = result['expirationDate'];\n var panelTitle = result['cardType'] + ' ending in ' + cardNumber;\n var address1 = result['CCAddress1'] ? result['CCAddress1'] + '<br />' : '';\n var address2 = result['CCAddress2'] ? result['CCAddress2'] + '<br />' : '';\n var city = result['CCCity'] ? result['CCCity'] + ',' : '';\n var state = result['CCState'] ? result['CCState'] : '';\n var zip = result['CCZipCode'] ? result['CCZipCode'] : '';\n var billingAddress = address1 + address2 + city + state + zip\n $(\".panel-title\").html(panelTitle);\n if(updateHeader) {\n $(\".title-section-header\").append('<div class=\"visible-xs title-header-xs\"><strong class=\"mar-left-md\">' + panelTitle + '</strong></div>');\n }\n $(\".zuoraPaymentMethodId\").val(result['zPmId']);\n $(\".paymentMethodId\").val(result['pmId']);\n if (result['splitPercent'] == 100) {\n defaultPayment = '<h5 class=\"mar-bottom-xl default-payment display-inline-block\">Default card for payment</h5><span class=\"pi pi-check\"></span>'\n } else {\n defaultPayment = '<h5 class=\"mar-bottom-xl default-payment display-inline-block\">Split Percent : ' + result['splitPercent'] + '% </h5>';\n }\n if (billingAddress != '') {\n var addressTemplate = '<h5 class=\"detail-fields\">Billing Address</h5>' +\n '<address>' +\n address1 + \n address2 +\n city + state + '<br />' +\n zip + '<br />\\\n </address>';\n } else {\n var addressTemplate = ''\n }\n var template = '<div>' + defaultPayment + '<h5 class=\"detail-fields\">Card Number</h5>\\\n <p class=\"mar-bottom-md display-inline-block\">**** **** **** ' + cardNumber + '</p>\\\n <div class=\"card-img display-inline-block\">\\\n <img id=\"credit-card-icon\" src=' + src + '>\\\n </div>\\\n <h5 class=\"detail-fields\">Name on Card</h5>\\\n <p class=\"mar-bottom-md\">' + cardHolderName + '</p>\\\n <h5 class=\"detail-fields\">Expiry Date</h5>\\\n <p class=\"mar-bottom-md\">' + cardExpirationDate + '</p>'\n + addressTemplate + \n '</div>';\n $(\".credit-card-details\").empty();\n $(\".credit-card-details\").append(template);\n var editClass = ($(window).width() >= 768) ? 'btn btn-primary edit-card' : 'btn btn-link edit-card';\n var editButton = '<button type=\"button\" class=\"' + editClass + '\" data-toggle=\"modal\" data-target=\"#enter-password-modal\">Edit</button>';\n $(\".credit-card-actions\").empty();\n $(\".credit-card-actions\").append(editButton);\n }\n });\n}", "static getCreditInfo() {\n return `credit/get_credit_info`\n }", "function credit(creditAmount, result) {\r\n setTimeout(() => {\r\n result(creditAmount - 2000);\r\n }, 2000);\r\n}", "function cardnumber(ccnum)\n{\n var cardno = /^(?:3[47][0-9]{13})$/;\n if(ccnum.value.match(cardno))\n {\n return true;\n }\n else\n {\n alert(\"Not a valid Amercican Express credit card number!\");\n return false;\n }\n}", "addCODCredit(payload) {\n return this.request.post('', payload);\n }", "function doHideCreditCards(text) {\n if (hideCreditCards) {\n return text.replace(/[0-9]{14,19}/g, (match) => {\n return luhnCheck(match)\n ? '<<POTENTIAL CREDIT CARD REDACTED>>'\n : match;\n });\n } else {\n return text;\n }\n}", "addCredit(credits) {\n const currentReceiverOrError = this._getCurrentReceiverOrError();\n if (typeof currentReceiverOrError === \"string\") {\n const errorMessage = `Cannot request messages on the receiver since it ${currentReceiverOrError}.`;\n if (currentReceiverOrError === \"is suspended\") {\n // if a user has suspended the receiver we should consider this a non-retryable\n // error since it absolutely requires user intervention.\n throw new AbortError(errorMessage);\n }\n throw new ServiceBusError(errorMessage, \"GeneralError\");\n }\n if (currentReceiverOrError.receiver != null) {\n logger.verbose(`${currentReceiverOrError.logPrefix} Adding ${credits} credits`);\n currentReceiverOrError.receiver.addCredit(credits);\n }\n }", "function creditValid() { \n var num = $(this).val().replace(/\\D/g,''); \n $(this).val(num.substring(0,4) + ' ' + num.substring(4,8) + ' ' + num.substring(8,12) + ' ' + num.substring(12,16)); \n}", "static getFbucksInfo() {\n return `purchase/customer/credit/info`\n }", "function checkCoupon(enteredCode, correctCode, currentDate, expirationDate){\n\n}", "function getCreditCard(custnumber, id, callback) {\n var sql =\n `SELECT \n autoid,\n tableid,\n custnumber,\n carddefault,\n cardtype,\n cardnum,\n exp,\n cardholder,\n cc_cid,\n LTRIM(RTRIM(custtoken)) AS custtoken,\n LTRIM(RTRIM(paytoken)) AS paytoken,\n cc_last_four\n FROM creditcardsadditional\n WHERE \n custnumber = :custnumber\n AND autoid = :autoid\n AND deleted IS NULL`;\n\n var params = {\n custnumber: custnumber,\n autoid: id\n };\n\n photoeye\n .query(sql, { replacements: params })\n .spread(function(results, metadata) {\n callback(misc.getCreditCardInfo(results)[0]);\n });\n}", "charge(payee,atm){\nif(this.balance()>= atm){\n let charge = new transaction((amt * -1), payee)\n this.transactions.push(charge)\n} else {\n console.log(\"insufficient funds\")\n}\n}", "function validateCreditNum (creditNum) {\n return /^[0-9]{13,16}$/.test(creditNum)\n}", "function showMyAccountCreditCardForm() {\n $('.payment-info-right .add-credit-card-btn').hide();\n $('.payment-info-right').find('#add-credit-card-form').show();\n }", "function isValidCreditCard(number) {\n number = '' + number;\n \n if (number.length > 16 || number.length < 13 ) return false;\n else if (getMod10(number) != 0) return false;\n else if (arguments[1]) {\n var type = arguments[1];\n var first2digits = number.substring(0, 2);\n var first4digits = number.substring(0, 4);\n \n if (type.toLowerCase() == 'visa' && number.substring(0, 1) == 4 &&\n (number.length == 16 || number.length == 13 )) return true;\n else if (type.toLowerCase() == 'mastercard' && number.length == 16 &&\n (first2digits == '51' || first2digits == '52' || first2digits == '53' || first2digits == '54' || first2digits == '55')) return true;\n else if (type.toLowerCase() == 'american express' && number.length == 15 && \n (first2digits == '34' || first2digits == '37')) return true;\n else if (type.toLowerCase() == 'diners club' && number.length == 14 && \n (first2digits == '30' || first2digits == '36' || first2digits == '38')) return true;\n else if (type.toLowerCase() == 'discover' && number.length == 16 && first4digits == '6011') return true;\n else if (type.toLowerCase() == 'enroute' && number.length == 15 && \n (first4digits == '2014' || first4digits == '2149')) return true;\n else if (type.toLowerCase() == 'jcb' && number.length == 16 &&\n (first4digits == '3088' || first4digits == '3096' || first4digits == '3112' || first4digits == '3158' || first4digits == '3337' || first4digits == '3528')) return true;\n \n // if the above card types are all the ones that the site accepts, change the line below to 'else return false'\n else return true;\n }\n else return true;\n}", "function formatToCreditCard(str) {\n if (!str) return '';\n var raw = str.replace(/\\D/g, '');\n var first = raw.slice(0, 4);\n var scnd = raw.slice(4, 8);\n var thrd = raw.slice(8, 12);\n var fourth = raw.slice(12, raw.length);\n if (!scnd) return '' + first;\n if (!thrd) return first + '-' + scnd;\n if (!fourth) return first + '-' + scnd + '-' + thrd;\n return first + '-' + scnd + '-' + thrd + '-' + fourth;\n}", "function instanceCreditCard(name, number) {\n return new CreditCard(name, number);\n}", "function validateCreditCard(txtCreditCard) {\n var a = document.getElementById(txtCreditCard).value;\n // This filter asks for something like 9999 9999 9999 9999, so parentheses with any number (at least 1)\n // of digits\n var filter = /([0-9]{16})|([0-9]{4}\\s+[0-9]{4}\\s+[0-9]{4}\\s+[0-9]{4})/;\n if (filter.test(a)) {\n return true;\n }\n else {\n return false;\n }\n}", "function changeBy(amount) {\n if ( limit === 'error') {\n console.error('Account is in ERROR -- No Credits or Charges can be made to it');\n } else {\n balance = (balance + Number(amount));\n }\n }", "function positiveOrNegative(){\n \n if($payment.val() === 'credit card'){\n return isCvvValid(cvv.value) && isZip(zip.value) && isCcNumValid(ccNum.value)\n \n } else {\n return true;\n }\n \n}", "takeCreditsFromUser({ idUser }, { credit }, result) {\r\n let query = `update user set`;\r\n if (credit != undefined || credit != null)\r\n query += ` credit = credit - ${credit} `;\r\n query += ` where idUser = ${idUser}`;\r\n console.log(query);\r\n sql.query(query, (err, rows, fields) => {\r\n if (err) {\r\n result(err, rows);\r\n return;\r\n }\r\n\r\n result(null, rows);\r\n });\r\n }", "function DebitCreditMemoApply(creditAppliedId,creditAppliedClass,defaultCreditBalClass,currCreditBalClass,payId,defaultTotalId,currTotalId,currTotalHiddenId,sumTotalId,sumTotalHiddenId,sumTotalClass){\n\n var creditApplied = $('#'+creditAppliedId); //CREDIT TO BE APPLIED TO CURRENT TOTAL\n var pay = $('#'+payId); //PAYMENT AMOUNT\n var defaultTotal = $('#'+defaultTotalId); //AMOUNT BALANCE TO BE PAID/RECEIVED\n var currTotal = $('#'+currTotalId); //AMOUNT PAID/RECEIVED\n var currTotalHidden = $('#'+currTotalHiddenId); //HIDDEN INPUT FOR CURRENT TOTAL\n var sumTotal = $('#'+sumTotalId); //SUM TOTAL TO BE RECEIVED/PAID BY ALL THE VENDOR/CUSTOMER SELECTED\n var sumTotalHidden = $('#'+sumTotalHiddenId); //HIDDEN INPUT FOR SUM TOTAL\n\n var creditAppliedVal = (creditApplied.val() == '') ? 0 : creditApplied.val();\n var payVal = (pay.val() == '') ? 0 : pay.val();\n var defaultTotalVal = (defaultTotal.val() == '') ? 0 : defaultTotal.val();\n var currTotalVal = (currTotal.val() == '') ? 0 : currTotal.val();\n\n var defaultCreditBalGet = document.getElementsByClassName(defaultCreditBalClass);\n defaultCreditBal = sumClassToArray(defaultCreditBalClass)/defaultCreditBalGet.length;\n\n \n var currCreditBalGet = document.getElementsByClassName(currCreditBalClass); \n var currCreditBal = sumClassToArray(currCreditBalClass)/currCreditBalGet.length; //CREDIT BALANCED APPLIED FROM/TO VENDOR/CUSTOMER\n \n \n if(currCreditBal > (parseFloat(creditAppliedVal)) ){ //CHECK IF CREDIT APPLIED IS GREATER THAT TOTAL CREDIT\n\n if((parseFloat(creditAppliedVal)+parseFloat(payVal) ) > defaultTotalVal){ //CHECK IF SUM OF CREDIT APPLIED AND CASH IS GREATER THAN BALANCE TO BE PAID/RECEIVED\n var newBal = (currTotalVal < 1) ? 0 : currTotalVal - creditAppliedVal;\n currTotal.val(newBal);\n currTotalHidden.val(newBal);\n var totalAmount = sumClassToArray(sumTotalClass); //SUM ALL THE TOTAL FROM EACH CUSTOMER/VENDOR TO GET ONE TOTAL AFTER OBTAINING VALUE OF CURR TOTAL\n sumTotal.val(totalAmount);\n sumTotalHidden.val(totalAmount);\n creditApplied.val('0.00'); //CLEAR CREDIT APPLIED\n\n }else{\n var newBal = decPoints(parseFloat(creditAppliedVal) + parseFloat(payVal),2);\n currTotal.val(newBal);\n currTotalHidden.val(newBal);\n var totalAmount = sumClassToArray(sumTotalClass); //SUM ALL THE TOTAL FROM EACH CUSTOMER/VENDOR TO GET ONE TOTAL AFTER OBTAINING VALUE OF CURR TOTAL\n sumTotal.val(totalAmount);\n sumTotalHidden.val(totalAmount);\n var creditBal = defaultCreditBal - sumClassToArray(creditAppliedClass) //CREDIT BALANCE TO UPDATE THE EXISTING CURRENCT/CHANGING BALANCE\n replaceClassInputWithVal(currCreditBalClass,decPoints(creditBal,2));\n }\n\n }else{ //CLEAR CREDIT APPLIED AND RESTORE PREVIOUS CURR TOTAL BALANCE\n var newBal = (currTotalVal < 1) ? 0 : currTotalVal - creditAppliedVal;\n\n currTotal.val(newBal);\n currTotalHidden.val(newBal);\n var totalAmount = sumClassToArray(sumTotalClass); //SUM ALL THE TOTAL FROM EACH CUSTOMER/VENDOR TO GET ONE TOTAL AFTER OBTAINING VALUE OF CURR TOTAL\n sumTotal.val(totalAmount);\n sumTotalHidden.val(totalAmount);\n\n creditApplied.val('0');\n\n }\n \n\n }", "function selectCredit() {\n paymentfield.value = 'creditcard';\n creditDiv.style.display = 'block';\n }", "function validateCred (array) {\n let sum = 0;\n // Luhn algorithm\n // move from right to left - first digit not doubled, next doubled, next not, etc...\n for (let i = array.length-1; i >= 0; i-=1) {\n // check\n if (i % 2 == 0) {\n let doubled = array[i] * 2;\n if (doubled > 9) {\n doubled -= 9;\n }\n sum += doubled;\n } else {\n sum += array[i];\n }\n }\n if (sum % 10 == 0) {\n return true;\n } else {\n return false;\n }\n}", "function MakeCard(theName, theBirthday, theSsn, theAddress) {\n var creditCard = {\n name: theName,\n birthday: theBirthday,\n ssn: theSsn,\n address: theAddress\n };\n return creditCard;\n}", "function postCreditNoteApply(invIntID)\r\n{\r\n\t\r\n\tvar creditMemoID = 0;\r\n\tvar invLineNum = 0;\r\n\tvar lineCount = 0;\r\n\tvar dateCredit = null;\t\t// 1.0.19\r\n\tvar exchangeRate = 0;\t\t// 1.0.19\r\n\tvar currency = '';\t\t\t// 1.0.19\r\n\t\r\n\r\n\ttry\r\n\t{\r\n\t\t\r\n\t\t//************************************\r\n\t\t// credit note header\r\n\t\t//************************************\r\n\t\t\r\n\t\tcreditMemo = nlapiTransformRecord('invoice', invIntID, 'creditmemo');\r\n\r\n//\t\tcreditMemo.setFieldValue('autoapply', 'T'); //1.0.17 change Auto Apply flag to false MJL\r\n\t\tcreditMemo.setFieldValue('autoapply', 'F'); //1.0.19 change Auto Apply flag to false MJL\r\n\t\t \r\n\t\tcreditMemo.setFieldValue('tranid', creditNo);\r\n\t\tcreditMemo.setFieldValue('customform', alignCreditMemo);\r\n\t\tcreditMemo.setFieldValue('memo', 'Credit posted for invoice: ' + invoiceNo + '\\n Patient Number: ' + patientDetails);\t// 1.0.18\r\n\r\n\t\tdateCredit = reverseDate(invoiceDate);\r\n\t\tcreditMemo.setFieldValue('trandate',dateCredit);\t// 1.0.19\r\n\r\n\t\tcurrency = creditMemo.getFieldValue('currency');\t\t\t\t// get transaction currency\r\n\t\texchangeRate = nlapiExchangeRate(currency,'EUR',dateCredit);\t// 1.0.19 lookup exchange rate \r\n\t\tcreditMemo.setFieldValue('exchangerate',exchangeRate);\t\t\t// 1.0.19\r\n\r\n\t\t\r\n\t\t\r\n\t\tcreditMemo.setFieldValue('custbody_patientnumber', patientDetails);\t\t// 1.0.18\r\n \r\n if(interCompanyTag!='not found' && interCompanyTag.length > 0) {\r\n\t\t\tvar interCompanyInternalID = genericSearch('customrecord_intercompanyclass','custrecord_intercompany_tagname',interCompanyTag);\r\n\t\t \tcreditMemo.setFieldValue('custbody_invoice_intercompany_tag', interCompanyInternalID);\r\n\t\t}\r\n\t\t\r\n\t\tcreditMemo.setFieldValue('custbody_invoicenumber', invoiceNo);\t\t\t// 1.0.18\r\n\t\t\r\n\t\tpostPerdiodIntID = lookupPostingPeriod('accountingperiod',dateCredit);\t\t// 1.0.19 lookup posting period\r\n\r\n\t\tif(postPerdiodIntID != 'not found')\r\n\t\t{\r\n\t\t\tcreditMemo.setFieldValue('postingperiod',postPerdiodIntID);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tnlapiLogExecution('AUDIT', 'Cannot lookup posting period for date', dateCredit);\r\n\t\t}\r\n\t\t\r\n\t\t//1.0.20 - finds line number of relevant invoice on Apply sublist and ticks Apply flag - MJL\r\n\r\n\t\tinvLineNum = creditMemo.findLineItemValue('apply', 'refnum', invoiceNo);\r\n\t\tcreditMemo.setLineItemValue('apply', 'apply', invLineNum, 'T');\r\n\t\t\r\n\r\n\t\t//********************************************\r\n\t\t// remove items from the transformed invoice\r\n\t\t// 1.0.20 - always remove the 1st line as line \r\n\t\t// 2 will become line 1 when line 1 is removed \r\n\t\t//********************************************\r\n\t\tlineCount = creditMemo.getLineItemCount('item');\r\n\t\tfor(var i=1; i<=lineCount; i++)\r\n\t\t{\r\n\t\t\t//creditMemo.removeLineItem('item', i);\t\r\n\t\t\tcreditMemo.removeLineItem('item', 1);\t\r\n\t\t}\r\n\r\n\t\t//*******************************\r\n\t\t// add credit note lines\r\n\t\t//*******************************\r\n\t\taddCreditLines(creditMemo);\r\n\t\t\r\n\t\tapplyARRuleToCreditNoteHead(); //1.0.12 apply AR rule - MJL\r\n\r\n\r\n\t\tcreditMemoID = nlapiSubmitRecord(creditMemo, true); \r\n\r\n\t\tauditTrail('TRUE', 'Posted Credit');\r\n\t\tnlapiLogExecution('AUDIT', 'success', 'Credit note posted for invoice: ' + invoiceNo);\r\n\t}\r\n\tcatch(e)\r\n\t{\r\n\t\tnlapiLogExecution('AUDIT', 'failure', 'postCreditNoteApply - failed to post creditnote for invoice: ' + invoiceNo);\r\n\t\terrorHandler(e);\r\n\t\tauditTrail('FAILED', 'postCreditNoteApply - Cannot post credit note ' + creditNo + ' for invoice ' + invoiceNo); //1.0.16 corrected error message MJL\r\n\t\t\r\n\t\t\r\n\t\t// check if the credit and invoice lines are the same\r\n\t\t// if they are not return -1\r\n\t\tif(getErrorMessage(e).indexOf('LINKED_ACCT_DONT_MATCH') != -1)\r\n\t\t{\r\n\t\t\tcreditMemoID = -1;\r\n\t\t}\r\n\t\t\r\n\t}\r\n\r\n\treturn creditMemoID;\r\n\r\n}", "function isCreditCard(st) {\r\n // Encoding only works on cards with less than 19 digits\r\n if (st.length > 19)\r\n return (false);\r\n\r\n sum = 0; mul = 1; l = st.length;\r\n for (i = 0; i < l; i++) {\r\n digit = st.substring(l-i-1,l-i);\r\n tproduct = parseInt(digit ,10)*mul;\r\n if (tproduct >= 10)\r\n sum += (tproduct % 10) + 1;\r\n else\r\n sum += tproduct;\r\n if (mul == 1)\r\n mul++;\r\n else\r\n mul--;\r\n }\r\n// Uncomment the following line to help create credit card numbers\r\n// 1. Create a dummy number with a 0 as the last digit\r\n// 2. Examine the sum written out\r\n// 3. Replace the last digit with the difference between the sum and\r\n// the next multiple of 10.\r\n\r\n// document.writeln(\"<BR>Sum = \",sum,\"<BR>\");\r\n// alert(\"Sum = \" + sum);\r\n\r\n if ((sum % 10) == 0)\r\n return (true);\r\n else\r\n return (false);\r\n\r\n}", "function validCreditCard (value) { // Accept only digits, dashes or spaces\n if (/[^0-9-\\s]+/.test(value)) \n return false;\n \n\n\n // The Luhn Algorithm.\n let nCheck = 0,\n bEven = false;\n value = value.replace(/\\D/g, \"\");\n\n for (var n = value.length - 1; n >= 0; n--) {\n var cDigit = value.charAt(n),\n nDigit = parseInt(cDigit, 10);\n\n if (bEven && (nDigit *= 2) > 9) {\n nDigit -= 9;\n }\n\n nCheck += nDigit;\n bEven = ! bEven;\n }\n\n return(nCheck % 10) == 0;\n}", "function isValidCC() {\n let ccError = document.createElement('p');\n // remove error message if it exists\n if (paymentLabel.querySelector('p')) {\n paymentLabel.querySelector('p').remove();\n };\n\n // if field is empty, display this error message\n if (ccNum.value.length === 0) {\n ccError.textContent = 'Please enter a credit card number.';\n ccError.style.color = 'red';\n paymentLabel.append(ccError);\n } else if (ccNum.value.length < 13 || ccNum.value.length > 16) {\n // if field is not empty but wrong length, display this message\n ccError.textContent = 'Please enter a valid credit card number that is between 13 and 16 digits long.';\n ccError.style.color = 'red';\n paymentLabel.append(ccError);\n } else if (/[^0-9]/.test(ccNum.value)) {\n // if field is right length but has incorrect characters, display this message\n ccError.textContent = 'Please enter numbers only.';\n ccError.style.color = 'red';\n paymentLabel.append(ccError);\n };\n return /^[0-9]{13}[0-9]?[0-9]?[0-9]?$/.test(ccNum.value);\n}", "function buyInsurance(fromaddr,password,value){\n web3.personal.unlockAccount(fromaddr,password,5);\n contract.payInsurance({from:\tfromaddr,value:web3.toWei(value, \"ether\"),\tgas:300000});\n}", "function checkCreditCardInputs() {\r\n var creditCardNumber = $('#number-creditcard-rm').val();\r\n var creditCardName = $('#name-creditcard-rm').val();\r\n var creditCardMonth = $('#month-creditcard-rm').val();\r\n var creditCardYear = $('#year-creditcard-rm').val();\r\n var creditCardCvv = $('#cvv-creditcard-rm').val();\r\n\r\n if (checkIfIsOnlyLetters(creditCardName) === false) {\r\n swal(\"Error!\", \"Enter only letters on credit card name!\", \"error\");\r\n return false;\r\n }\r\n\r\n if (checkIfIsOnlyNumbers(creditCardNumber) === false) {\r\n swal(\"Error!\", \"Enter only numbers on credit card number!\", \"error\");\r\n return false;\r\n }\r\n\r\n if (creditCardNumber.length !== 16) {\r\n swal(\"Error!\", \"Credit card number must have 16 digits!\", \"error\");\r\n return false;\r\n }\r\n\r\n if (checkIfIsOnlyNumbers(creditCardMonth) === true) {\r\n var monthInt = parseInt(creditCardMonth);\r\n if (monthInt < 1 || monthInt > 12) {\r\n swal(\"Error!\", \"Month must be from 1 to 12\", \"error\");\r\n return false;\r\n }\r\n } else {\r\n swal(\"Error!\", \"Month must be only number between 1 to 12\", \"error\");\r\n return false;\r\n }\r\n\r\n if (checkIfIsOnlyNumbers(creditCardYear) === true) {\r\n var yearInt = parseInt(creditCardYear);\r\n if (yearInt < 19 || yearInt > 40) {\r\n swal(\"Error!\", \"Year must be from 19 to 40\", \"error\");\r\n return false;\r\n }\r\n } else {\r\n swal(\"Error!\", \"Year must be only number between 19 to 40\", \"error\");\r\n return false;\r\n }\r\n\r\n if (checkIfIsOnlyNumbers(creditCardCvv) === true) {\r\n if (creditCardCvv.length !== 3) {\r\n swal(\"Error!\", \"CVV must be number of 3 digits\", \"error\");\r\n return false;\r\n }\r\n } else {\r\n swal(\"Error!\", \"CVV must be number of 3 digits\", \"error\");\r\n return false;\r\n }\r\n\r\n return true;\r\n\r\n}", "function insertNew3TPAllowance() {\n var frm = document.frmAllow;\n if (frm.allowTPAddress.value.length < 41) {\n $(\"#statusFormAllow\").css(\"background-color\", \"Salmon\");\n $(\"#statusFormAllow\").html(\"You must inform appropriate information\");\n return\n }\n $(\"#statusFormAllow\").css(\"background-color\", \"lightblue\");\n $(\"#statusFormAllow\").html(\"Waiting for you to confirm the transaction in MetaMask or another Ethereum wallet software\");\n console.log(\"Sending... \" + frm.allowTPAddress.value);\n contract.allowIssuers(frm.allowTPAddress.value, {from: web3.eth.accounts[0], gas: 3000000, value: 0}, function (err, result) {\n if (!err) {\n $(\"#statusFormAllow\").css(\"background-color\", \"yellow\");\n $(\"#statusFormAllow\").text(\"Transaction sent. Wait until it is mined. Transaction hash: \" + result);\n waitForTxToBeMined(result, \"#statusFormAllow\");\n } else {\n console.error(err);\n $(\"#statusFormAllow\").css(\"background-color\", \"Salmon\");\n $(\"#statusFormAllow\").html(\"Error \" + JSON.stringify(err));\n }\n });\n $(\"#btnStartOverNew3TPAllowance\").show();\n $(\"#btnInsertNew3TPAllowance\").hide();\n}", "getTotalWithExtra(extra){\n let numMonthes = 0\n let beginBalance = this.loanAmount\n let totalInterest = 0\n let totalPaid = 0\n let scPayment = this.scPayment + extra\n\n while (beginBalance > 0){\n numMonthes += 1\n let interest = beginBalance * this.rate\n let principal = scPayment - interest\n \n totalInterest += interest\n totalPaid += scPayment \n beginBalance -= principal\n }\n\n // If begin balance is less than 0\n totalPaid += beginBalance\n\n this.totalPaidWithExtra = totalPaid\n this.totalInterestWithExtra = totalInterest\n this.totalMonthesWithExtra = numMonthes\n this.totalYearsWithExtra = parseInt(numMonthes/12)\n this.timeSavedMonthes = this.periods - numMonthes\n this.amountSaved = this.totalPaid - this.totalPaidWithExtra\n\n }", "function CreditCard({ type, number, expirationMonth, expirationYear, bank, owner, bgColor, color }) {\n // eslint-disable-next-line react/prop-types\n const divStyle = {\n backgroundColor: `${ bgColor }`,\n color: `${color}`\n };\n\nlet fourDigits = number.substring(11, 15);\nlet dots = '*'.repeat(4);\n\n return (\n <>\n <div id=\"credit-card\" style={divStyle}>\n <p id=\"title\">{type}</p>\n <p id=\"number\">{dots} {dots} {dots} {fourDigits}</p>\n <div>\n <span>Expires {expirationMonth}/{expirationYear}</span> <span>{bank}</span>\n \n </div>\n \n <p>{owner}</p>\n </div>\n \n \n </>\n )\n}", "_initCreditCardMask() {\n if (document.querySelector('#maskCreditCard') !== null) {\n IMask(document.querySelector('#maskCreditCard'), {\n mask: '0000-0000-0000-0000',\n lazy: false,\n });\n }\n }", "redeemCoin({account,coin,ris}) {\n\n //When a client attempts to redeem a coin, first verify that the coin has been signed by the bank. \n //The coin's signature should be stored in a 'signature' property of the coin object. \n //The signature should match the coin's string representation (which you can get from calling `coin.toString()`).\n\n\n let cs = coin.toString();\n\n let valid = blindSignatures.verify({\n unblinded: coin.signature,\n N: coin.n,\n E: coin.e,\n message: cs,\n });\n\n // console.log(coin.signature);\n // console.log(cs +\" this is CS!!!!!!!!!!!!!!!!!!!\");\n if (!valid) {\n throw new Error('Invalid signature');\n } else if (cs === coin.signature || coin.signature === undefined) {\n throw new Error('Invalid signature 2');\n }\n\n // Every coin should have a GUID stored in its 'guid' property. \n\n let coinGUID = coin.guid;\n\n //If the coin has not been received previously, accept the coin and update the redeemer's balance.\n if (this.coinDB[coinGUID] === undefined) {\n this.deposit({account,amount:coin.amount});\n this.coinDB[coinGUID] = ris;\n console.log(`Coin #${coinGUID} has been redeemed. Have a nice day.`);\n }\n // On the other hand, if the coin has been received previously, determine who cheated.\n else {\n console.log(`Coin ${coinGUID} previously spent. Determining cheater.`);\n\n let cheater = undefined;\n for (let i = 0; i < ris.length; i++) {\n // console.log(\"KEY LENGTH\" + ris[i].length);\n // console.log(\"cipher LENGTH\" + coinGUID[i].length);\n\n let identStr = utils.decryptOTP({\n key: ris[i],\n ciphertext: this.coinDB[coinGUID][i],\n returnType: \"string\"\n });\n\n //If the coin purchaser cheated, print out the identity of the cheater. \n if (identStr.startsWith(IDENT_STR)) {\n cheater = identStr.split(':')[1];\n console.log(`${cheater} double spent coin ${coin.guid}.`);\n break;\n }\n }\n //Otherwise, identify the redeemer as the cheater.\n if (cheater === undefined) {\n console.log(\"The merchant tried to redeem the coin twice\");\n }\n // As with DigiCash, DCL will use random identity strings (RISs) to identify the cheater. \n //When accepting a coin, you must keep the RIS to identify cheaters in future double-spend attempts.\n console.log(`Sorry, but coin #${coinGUID} cannot be accepted.`);\n\n\n\n\n }\n\n\n }", "function creditCardIsValid() {\n return ($(\"#cc-num\").val() > 0);\n }", "function validateCreditCardNumber(number) {\n // Number must be 16 digits\n if (number.length !== 16) {\n return \"This is not a valid number because it's not 16 characters\";\n }\n // all of them must be numbers\n var isnum = /^\\d+$/.test(number);\n if (isnum === false){\n return \"This is not a valid number because it is not a number\";\n }\n\n // You must have at least two different digits represented\n // (all of the digits cannot be the same)\n // checkAllTheSame(number);\n var isAllTheSame = /^(.)\\1+$/.test(number)\n if (isAllTheSame === true) {\n return \"Invalid: The numbers are all the same\";\n }\n\n // The final digit must be even\n var lastNumber = number.slice(-1);\n if (lastNumber % 2 !== 0) {\n return \"INVALID: The last number is not even.\";\n }\n\n // The sum of all the digits must be greater than 16\n var total = 0;\n for (var i = 0; i < number.length; i++) {\n total += parseInt(number[i]);\n }\n if (total <= 16){\n return \"INVALID: the credit card digits do not add up.\";\n }\n\n return \"VALID: Your credit card is ready to be charged.\"\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}", "function onkeyupAmount(amount,txtID){\r\n var flag=toFloat(txtID);\r\n var cash = document.getElementById('txt_cash1').value;\r\n var card1 = document.getElementById('txt_card1').value;\r\n var card2 = document.getElementById('txt_card2').value;\r\n var cheque = document.getElementById('txt_cheque').value;\r\n var credit = document.getElementById('txt_credit').value;\r\n\r\n if(flag==false){\r\n amount = CheckNumeric(amount);\r\n var total_bill=document.getElementById('txt_bill_grandtotal').value;\r\n total_bill = CheckNumeric(total_bill);\r\n //document.getElementById('total_bill').innerHTML=total_bill;\r\n if(txtID=='txt_cash1_amount'){\r\n if(!isNaN(amount) && amount!=''){\r\n amount=document.getElementById('txt_cash1_amount').value;\r\n }\r\n document.getElementById('cash_amt').innerHTML=amount;\r\n }\r\n if(txtID=='txt_card1_amount'){\r\n if(!isNaN(amount) && amount!=''){\r\n amount=document.getElementById('txt_card1_amount').value;\r\n }\r\n document.getElementById('card1_amt').innerHTML=amount;\r\n }\r\n if(txtID=='txt_card2_amount'){\r\n if(!isNaN(amount) && amount!=''){\r\n amount=document.getElementById('txt_card2_amount').value;\r\n }\r\n document.getElementById('card2_amt').innerHTML=amount;\r\n }\r\n if(txtID=='txt_cheque_amount'){\r\n if(!isNaN(amount) && amount!=''){\r\n amount=document.getElementById('txt_cheque_amount').value;\r\n }\r\n document.getElementById('cheque_amt').innerHTML=amount;\r\n }\r\n if(txtID=='txt_credit_amount'){\r\n if(!isNaN(amount) && amount!=''){\r\n amount=document.getElementById('txt_credit_amount').value;\r\n }\r\n document.getElementById('credit_amt').innerHTML=amount;\r\n }\r\n var total_payment=0;\r\n // alert(\"cash==\"+cash+\" card1==\"+card1+\" card2==\"+card2+\" cheque==\"+cheque);\r\n if(cash==\"1\"){\r\n var cash_amt = document.getElementById('cash_amt').innerHTML;\r\n cash_amt = CheckNumeric(cash_amt);\r\n total_payment = total_payment + parseFloat(cash_amt);\r\n }\r\n if(card1==\"1\"){\r\n var card1_amt = document.getElementById('card1_amt').innerHTML;\r\n card1_amt = CheckNumeric(card1_amt);\r\n total_payment = total_payment + parseFloat(card1_amt);\r\n }\r\n if(card2==\"1\"){\r\n var card2_amt = document.getElementById('card2_amt').innerHTML;\r\n card2_amt = CheckNumeric(card2_amt);\r\n total_payment = total_payment + parseFloat(card2_amt);\r\n }\r\n if(cheque==\"1\"){\r\n var cheque_amt = document.getElementById('cheque_amt').innerHTML;\r\n cheque_amt = CheckNumeric(cheque_amt);\r\n total_payment = total_payment + parseFloat(cheque_amt);\r\n }\r\n if(credit==\"1\"){\r\n var credit_amt = document.getElementById('credit_amt').innerHTML;\r\n credit_amt = CheckNumeric(credit_amt);\r\n total_payment = total_payment + parseFloat(credit_amt);\r\n }\r\n // alert(\"cash==\"+cash_amt+\" card1==\"+card1_amt+\" card2==\"+card2_amt+\" cheque==\"+cheque_amt);\r\n document.getElementById('total_payment').innerHTML = total_payment;\r\n var balance=Math.ceil(parseFloat(total_bill)-parseFloat(total_payment));\r\n document.getElementById('balance').innerHTML=balance;\r\n }\r\n}", "function giveCredit(creditNames){\n if (creditNames==true){\n return \"https://github.com/\"+creditNames;\n }else{ return '';\n }\n \n}", "function needCardSecurityCode(creditCardType, includeCard) {\n if (includeCard.indexOf(\",\"+creditCardType+\",\")!=-1) {\n return true;\n }\n\t \n return false;\n}", "function personAccount(fName, lName, income, expense, inc, exp) {\n const firstname = fName;\n const lastname = lName;\n let incomes = income;\n let expenses = expense;\n\n totalIncome = () => {\n return incomes;\n };\n totalExpenses = () => {\n return expenses;\n };\n \n addIncome = (inc) => {\n incomes += inc;\n };\n addExpenses = (exp) => {\n expenses += exp;\n };\n accountBalance = () => {\n let balance = incomes - expenses;\n return balance;\n };\n accountInfo = () => {\n return `${firstname} ${lastname}\\nAccount Balance= ${accountBalance()}`;\n };\n return {\n totalIncome: totalIncome(),\n totalExpenses: totalExpenses(),\n addIncome: addIncome(inc),\n addExpenses: addExpenses(exp),\n accountBalance: accountBalance(),\n accountInfo: accountInfo(),\n };\n}", "function validateCard(element) {\n \tif ( validator.isCreditCard(element.value) ){\n \t\telement.setCustomValidity(\"\");\n \t} else {\n \t\telement.setCustomValidity(\"Please enter a valid card number consisting of 16 or 19 digits(including hyphens and spaces). You are currently using \" +\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\telement.value.length + \" characters.\");\n \t}\n }", "function PaymantCard(accBal, status, date) {\n this.accountBalance = parseFloat(accBal.toFixed(2));\n this.status = (function () {\n status ? \"Card is active!\" : \"Card is not active\";\n })();\n this.valid = \"Valid until \" + date;\n }", "function checkCashRegister(price, cash, cid) {\n var change;\n // Here is your change, ma'am.\n var currency = cash - price;\n var total = 0;\n\n var value = [\"ONE HUNDRED\", \"TWENTY\", \"TEN\", \"FIVE\", \"ONE\", \"QUARTER\", \"DIME\", \"NICKEL\", \"PENNY\"],\n coinAndBills = [100, 20, 10, 5, 1, 0.25, 0.10, 0.05, 0.01],\n newArr = [],\n money = [];\n\n\n for (var i = cid.length - 1; i >= 0; i--) {\n newArr.push(cid[i][1]);\n }\n\n\n newArr.map(function (number, i) {\n var lap = 0,\n name,\n sum = 0;\n\n while (currency >= coinAndBills[i] && number > 0) {\n\n lap += 1;\n name = value[i];\n sum = coinAndBills[i] * lap;\n currency -= coinAndBills[i];\n currency = Math.round(currency * 100) / 100;\n number -= coinAndBills[i];\n\n }\n\n if (name !== undefined && sum > currency) {\n money.push([name, sum]);\n }\n\n total = Math.round(((total += number) * 100) / 100);\n\n });\n\n\n if (total < currency || money == 0) {\n change = \"Insufficient Funds\";\n } else if (total == currency) {\n change = \"Closed\";\n } else {\n return money;\n }\n\n return change;\n\n}", "neededCredit(part){\n\t\tif(part==\"major1\"){\n\n\t\t\treturn Math.max(this.credit1-this.sumCredit(this.major1Courses),0);\n\t\t}\n\t\telse if(part==\"major2\"){\n\t\t\treturn Math.max(this.credit2-this.sumCredit(this.major2Courses),0);\n\t\t}\n\t\telse if(part==\"outside\"){\n\t\t\treturn Math.max(this.creditOutside-this.sumCredit(this.outsideCourses),0);\n\t\t}\n\t\telse{\n\t\t\treturn Math.max(this.creditGraduate-this.sumCredit(this.allCourses),0);\n\t\t}\n\t}", "function updateCreditCard(custnumber, id, data, callback) {\n\n photoeye.transaction(function (t) {\n\n var sql =\n `SELECT \n autoid,\n tableid,\n custnumber,\n carddefault,\n cardtype,\n cardnum,\n exp,\n cardholder,\n cc_cid,\n LTRIM(RTRIM(custtoken)) AS custtoken,\n LTRIM(RTRIM(paytoken)) AS paytoken,\n cc_last_four\n FROM creditcardsadditional\n WHERE \n custnumber = :custnumber\n AND autoid = :autoid`;\n\n var params = {\n custnumber: custnumber,\n autoid: id\n };\n\n return photoeye\n .query(sql, { transaction: t, replacements: params })\n .then(function (cc_info) {\n cc_info = cc_info[0][0];\n\n var payment_info = {\n custtoken: cc_info.custtoken,\n paytoken: cc_info.paytoken,\n cc: {\n last_four: data.cc_last_four,\n exp: '20' + data.cc_year + '-' + data.cc_month //make the expiration date as yyyy-mm (e.g. 2018-07)\n }\n };\n\n return new Promise(function (resolve, reject) {\n\n payment.updateCustomerPaymentProfile(payment_info, function(result) {\n\n if(result && result.messages && result.messages.resultCode == 'Ok' && result.messages.message && result.messages.message.code == 'I00001') {\n sql =\n `UPDATE creditcardsadditional SET \n cardtype = :cardtype,\n exp = :exp,\n cardholder = :cardholder\n WHERE \n autoid = :autoid \n AND custnumber = :custnumber`;\n\n params = {\n cardtype: data.cc_type,\n exp: data.cc_month + '/' + data.cc_year,\n cardholder: data.cc_name,\n autoid: id,\n custnumber: custnumber\n };\n\n photoeye\n .query(sql, { transaction: t, replacements: params })\n .spread(function(results, metadata) {\n resolve(results);\n });\n \n }\n else\n reject(null);\n });\n });\n\n });\n\n })\n .then(function (result) {\n // Transaction has been committed\n\n callback(result);\n })\n .catch(function (err) {\n // Transaction has been rolled back\n winston.error(err);\n callback(err);\n });\n}", "function checkCreditCard (radio, theField)\r\n{ var cardType = getRadioButtonValue (radio)\r\n var normalizedCCN = stripCharsInBag(theField.value, creditCardDelimiters)\r\n if (!isCardMatch(cardType, normalizedCCN))\r\n return warnInvalid (theField, iCreditCardPrefix + cardType + iCreditCardSuffix);\r\n else\r\n { theField.value = normalizedCCN\r\n return true\r\n }\r\n}", "function placeOrder(cardNumber) {\n // write your code here\nif (cardNumber === undefined) {\n return \"Sorry, we don't have a credit card on file for you.\"\n} else {\n const total1 = total()\n cart = []\n return `Your total cost is $${total1}, which will be charged to the card ${cardNumber}.`\n}\n}", "function CreditPackage(response) {\r\n this.init(response);\r\n}" ]
[ "0.71417594", "0.67291623", "0.6501641", "0.6501539", "0.64749706", "0.6447205", "0.6435682", "0.64071214", "0.62398386", "0.6161521", "0.6136103", "0.61226064", "0.60704297", "0.6018662", "0.5992963", "0.5923159", "0.5889691", "0.58741164", "0.5831331", "0.582787", "0.58145404", "0.57956666", "0.574617", "0.5707801", "0.56823623", "0.5647163", "0.56450826", "0.56131405", "0.56090117", "0.56050473", "0.5602856", "0.55996376", "0.5585726", "0.5579597", "0.5577913", "0.55741835", "0.556493", "0.5559719", "0.554306", "0.55417633", "0.55334264", "0.5533", "0.5532554", "0.5528892", "0.55249053", "0.55214894", "0.5520707", "0.5510378", "0.5499425", "0.5484322", "0.54685533", "0.5467315", "0.5463723", "0.5462268", "0.54609096", "0.5460552", "0.54588395", "0.545795", "0.54564655", "0.54539096", "0.5452666", "0.5446406", "0.54397625", "0.5433426", "0.5426529", "0.5420039", "0.5419393", "0.541901", "0.54142374", "0.5413504", "0.5408536", "0.53958136", "0.5384139", "0.53815544", "0.5374394", "0.53722185", "0.537079", "0.5369297", "0.53688", "0.53643674", "0.53613627", "0.53605515", "0.5349803", "0.5349493", "0.53487396", "0.5347813", "0.5339679", "0.53388196", "0.5334976", "0.5328104", "0.53279275", "0.53195316", "0.53165084", "0.5313473", "0.5312701", "0.53038216", "0.5302984", "0.52930623", "0.52884614", "0.52848846", "0.5283552" ]
0.0
-1
Does not work yet
function shiftLine(gl, a_Position, lineShifter) { var shiftedArray = []; gl.clear(gl.COLOR_BUFFER_BIT); lineShifter.addEventListener('click', function() { for (var i = 0; i < g_points.length; i++) { shiftedArray[i] = g_points[i][0] + .3; g_points[i][0] = shiftedArray[i]; gl.vertexAttrib3f(a_Position, g_points[i][0], g_points[i][1], 0.0); gl.drawArrays(gl.POINTS, 0, g_points.length); } gl.drawArrays(gl.LINE_STRIP, 0, n); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "protected internal function m252() {}", "transient private protected internal function m182() {}", "transient protected internal function m189() {}", "transient private internal function m185() {}", "static private internal function m121() {}", "transient final protected internal function m174() {}", "static final private internal function m106() {}", "static private protected internal function m118() {}", "transient final private internal function m170() {}", "static transient final private internal function m43() {}", "transient private protected public internal function m181() {}", "transient final private protected internal function m167() {}", "obtain(){}", "static transient final protected internal function m47() {}", "static transient private protected internal function m55() {}", "function _____SHARED_functions_____(){}", "static private protected public internal function m117() {}", "static transient final private protected internal function m40() {}", "static transient final protected public internal function m46() {}", "static transient private protected public internal function m54() {}", "static protected internal function m125() {}", "transient private public function m183() {}", "static final private protected internal function m103() {}", "static transient private internal function m58() {}", "function comportement (){\n\t }", "__previnit(){}", "function fm(){}", "transient final private protected public internal function m166() {}", "function Scdr() {\r\n}", "static private public function m119() {}", "static final private public function m104() {}", "constructor () {\r\n\t\t\r\n\t}", "function miFuncion (){}", "function wa(){}", "static transient private public function m56() {}", "function init() {\n\t \t\n\t }", "static final protected internal function m110() {}", "static final private protected public internal function m102() {}", "static transient final protected function m44() {}", "function miFuncion(){}", "function miFuncion(){}", "function miFuncion(){}", "_firstRendered() { }", "function DWRUtil() { }", "init() {\n }", "transient final private public function m168() {}", "function accessesingData2() {\n\n}", "function accessesingData2() {\n\n}", "static transient final private public function m41() {}", "function ea(){}", "constructor (){}", "function kp() {\n $log.debug(\"TODO\");\n }", "function oi(){}", "updated() {}", "function Sread() {\r\n}", "static transient final private protected public internal function m39() {}", "_initializeProperties(){}// prevent user code in connected from running", "initialize() {}", "initialize() {}", "initialize() {}", "initialize() {}", "initialize() {}", "initialize() {}", "function updateroster() {\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 }" ]
[ "0.70720387", "0.70564437", "0.66682625", "0.63950133", "0.636974", "0.6360863", "0.63196564", "0.61084497", "0.60980797", "0.60698104", "0.58588", "0.5834202", "0.5828215", "0.579849", "0.5781462", "0.5765821", "0.574573", "0.5743822", "0.568587", "0.5642725", "0.5631619", "0.5597297", "0.5594099", "0.55628115", "0.5544829", "0.55440474", "0.55418795", "0.55417293", "0.5510982", "0.54606855", "0.54101884", "0.5397696", "0.53881305", "0.53881204", "0.53830075", "0.5350329", "0.5327514", "0.5311944", "0.5305803", "0.5302826", "0.5302056", "0.52556753", "0.52556753", "0.52556753", "0.52521735", "0.5248808", "0.52360886", "0.5228788", "0.5221659", "0.5221659", "0.5208103", "0.5199667", "0.5196479", "0.51889914", "0.5160724", "0.5145173", "0.51434", "0.5137878", "0.51292586", "0.5102633", "0.5102633", "0.5102633", "0.5102633", "0.5102633", "0.5102633", "0.5084283", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486", "0.5075486" ]
0.0
-1
Returns true if the maxValueCount value is valid.
isMaxValueCountValid() { if (this.isValueTypeSelect()) { return (this.isSingleSelect() || this.isMultipleSelect()); } return ((this.maxValueCount === null) || (this.maxValueCount === AnnotationMaxValueCount.NONE)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function maxValueCountRequired() {\n return ((vm.annotType.maxValueCount < 1) || (vm.annotType.maxValueCount > 2));\n }", "function isLessThanMaxValuePlusNonZero() {\n\t\n\tvar len = inputDigits.length;\n\n\tvar i, j;\n\n\tfor(i = 0; i < len; i++){\n\n\t\tif(inputDigits[i] > MAXVAL){\n\n\t\t\terrorMessage = \"Maximum value limit exccded, Please try again\";\n\n\t\t\treturn false\n\t\t}\n\n\t\tif(inputDigits[i] == 0){\n\n\t\t\terrorMessage = \"Input value must be non-zero, Please try again\";\n\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}", "isMaximum(value, limit) {\n console.warn(\n \"isMaximum (maximum) is deprecated. Use isMax (max) for validating the maximum value of a number or isMaxLength (maxLength) for validating the length of a string\"\n );\n value = typeof value === \"string\" ? value.length : value;\n\n return parseFloat(value) <= limit;\n }", "hasNext() {\n if (this._maxValue && this._maxValue > 0) {\n return true;\n }\n }", "isMax(value, limit) {\n return parseFloat(value) <= limit;\n }", "function checkMaxCount() {\n var Count = tagArray.length;\n if (Count >= 5) {\n errorMessage.text(\"You can add only 5 tags per video\");\n errorMessage.css(\"display\", \"block\");\n return true;\n }\n }", "function validateMax(field_value, max) {\n if (field_value === undefined || field_value === null) {\n return true;\n }\n var int = parseInt(field_value);\n if (isNaN(int)) {\n return true;\n }\n return int <= max;\n}", "function isValidRange(number, maxRange){\n return number < 1 || number > maxRange;\n}", "validate() {\n let value = parseFloat(this.field);\n return (value < this.max);\n }", "isCountValid(count) {\n\n if(isNaN(parseInt(count))){\n return false;\n }\n \n if(count.length > 0){\n return true;\n } else {\n return false;\n }\n\n }", "function isValidTotalInvValue(val) {\n return (val > 250000) ? true : false\n }", "function validValues() {\n return parseFloat(min.value) < parseFloat(max.value);\n }", "isMaxLength(value, limit) {\n if (typeof value !== \"string\") return false;\n\n return value.length <= limit;\n }", "checkMaximum() {\n\t\t__WEBPACK_IMPORTED_MODULE_1__clients_logger___default.a.system.debug(\"SplinterAgent.checkMaximum\");\n\t\tthis.isMaxed = this.windows.length === this.maxWindowsPerAgent;\n\t\t__WEBPACK_IMPORTED_MODULE_1__clients_logger___default.a.system.debug(`SplinterAgent.checkMaximum. numWindows: ${this.windows.length}. maxWindows: ${this.maxWindowsPerAgent}. isMaxed:${this.isMaxed}`);\n\n\t\tif (this.isMaxed) {\n\t\t\tthis.emit(\"windowMaximumReached\");\n\t\t\treturn;\n\t\t}\n\t}", "function boundsCheck(value) {\n\t\tif (base == 10)\tvalue = parseFloat(value);\t\t\t\t\t\t// value is a string, if in base 10, parseFloat() it\n\t\telse value = parseInt(value, 16);\t\t\t\t\t\t\t\t// value is a string, if in base 16, parseInt() it with 16 as parameter (converts to base 10)\n\t\t\n\t\tif (minValue === null && maxValue === null) return true;\t\t// if both min and max is null, there is no limit, simple return true\n\t\telse if (minValue !== null && maxValue !== null) {\t\t\t\t// if both of the values aren't null, check both bounds\n\t\t\tif (value <= maxValue && value >= minValue) return true;\n\t\t}\n\t\telse if (minValue === null && maxValue !== null) {\t\t\t\t// if only the min is null, then there is no lower bound; check the upper bound\n\t\t\tif (value <= maxValue) return true;\n\t\t}\n\t\telse if (minValue !== null && maxValue === null) {\t\t\t\t// if only the max is null, then there is no upper bound; check the lower bound\n\t\t\tif (value >= minValue) return true;\n\t\t}\n\t\t\n\t\treturn false;\t// if we made it here, the number isn't valid; return false\n\t}", "function checkLimit() {\n return global.maxItems && global.detailsEnqueued >= global.maxItems;\n}", "insideLimit () {\n this.check();\n\n let now = Date.now();\n let limits = Object.keys(this.limits);\n\n for(let i = 0; i < limits.length; i++){\n if(this.currentLimits[limits[i]].date - now > 0 && this.currentLimits[limits[i]].value + 1 < this.limits[limits[i]]) {\n return false;\n }\n }\n\n return true;\n }", "function isUpdateValid() {\n\n\t\tvar modelNum,\n\t\t\tmaxNum;\n\n\t\tif (vm.tagModel.valType === 'P') {\n\n\t\t\tmodelNum = Number(vm.percentSlider.model);\n\t\t\tmaxNum = 100;\n\t\t} else {\n\n\t\t\tmodelNum = Number(vm.currencySlider.model);\n\t\t\tmaxNum = Number(vm.currencySlider.options.max);\n\t\t}\n\n\t\treturn modelNum > 0 && modelNum <= maxNum;\n\t}", "function feeMax(value){\n //Thresold given by hand\n return value <=0.00000200\n }", "function isValueInRange(value, min, max, id_warning, inital_message){\n if (value.length < min || value.length > max) {\n if (id_warning && inital_message){\n info(id_warning, inital_message + '<br>' +\n getString('MIN_LENGTH') + ': ' + min + '<br>' +\n getString('MAX_LENGTH') + ': ' + max, 4);\n }\n return false;\n } else {\n return true;\n }\n}", "_checkEndValue() {\n var v = this._calcStepRounded(this.endValue);\n if(v >= this.value && v <= this.max) {\n this.set('endValue', v);\n } else {\n var m = this._calcStepRounded(this.max);\n this.set('endValue', m);\n }\n }", "function isValidCount(x) {\n if (!x) {\n return false;\n }\n return Math.round(x).toString() == x.toString() && x > 0;\n}", "function max(num, max) {\n return typeof num === 'number' && typeof max === 'number' && num <= max;\n}", "_isMaxLevelExceeded(groupId) {\n const that = this,\n valueFlat = that._valueFlat;\n\n if (that.maxLevel === null || valueFlat.length < 1) {\n return;\n }\n\n //NOTE: 2 because - 1 is for the 0th (root) group, and -1 because we want to start from 0\n\n //Checks a specific item\n if (groupId) {\n return groupId.split('.').length - 2 >= that.maxLevel;\n }\n\n //Checks the whole structure\n for (let i = 0; i < valueFlat.length; i++) {\n const data = valueFlat[i];\n\n if (data.nodeId.split('.').length - 2 > that.maxLevel) {\n return true;\n }\n }\n }", "acceptValue(value) {\n let accept = !isNaN(value);\n\n if (accept && !(this.okMin(value) && this.okMax(value))) {\n accept = false;\n const current = this.input.value; // current is a string, so compare to int or string... hence == here not ===\n // noinspection EqualityComparisonWithCoercionJS\n\n if (current != value) {\n // The new value is out of range, but we accept it if the current value\n // is also problematic. Consider the case where the input is empty and the\n // minimum value is 100. The user must first type \"1\" and we must accept it\n // if they are to get the opportunity to type the \"0\"s.\n accept = !this.acceptValue(current); // Also, if we are checking the current value, be sure not to infinitely\n // recurse here.\n }\n }\n\n return accept;\n }", "function maxLength(value, max) {\n return typeof value === 'string' && validator_lib_isLength__WEBPACK_IMPORTED_MODULE_1___default()(value, { min: 0, max });\n}", "function validaMaximo(elemento, numMax) {\n var numTxt = elemento.val().length; // Número de caracteres actuales en el input\n var numero_maximo = numMax - 1;\n\n if (numTxt > numero_maximo) {\n return false;\n } else {\n return true;\n }\n}", "function isLastPage() {\n var viewLastIndex = curPageNumber * curPageLimit + curCount + 1;\n if(viewLastIndex >= totalCount) {\n return true;\n }\n return false;\n }", "hasNext() {\n let isLimitsReached = this._limits != -1 && this.pos >= this._limits - 1;\n let isEndOfArray = this.pos >= this.values.length - 1;\n return !(isLimitsReached ||\n isEndOfArray);\n }", "hasNext() {\n let isLimitsReached = this._limits != -1 && this.pos >= this._limits - 1;\n let isEndOfArray = this.pos >= this.values.length - 1;\n return !(isLimitsReached ||\n isEndOfArray);\n }", "function validaMaximo(elemento, numMax) {\n var numTxt = elemento.value.length; // Número de caracteres actuales en el textarea\n var numero_maximo = numMax - 1;\n\n if (numTxt > numero_maximo) {\n return false;\n } else {\n return true;\n }\n}", "isCancelAfterEnd() {\n return this.value > 1000000;\n }", "function validateUserInput(userValue, minValue, maxValue) {\n if (isNumber(userValue)) {\n if (userValue > maxValue || userValue < minValue) {\n return false;\n }\n\n else {\n return true;\n }\n }\n\n else {\n return false;\n }\n}", "function validateIntegerRange(val, minVal, maxVal) {\n if (!validateInteger(val))\n return false;\n return ((val >= minVal) && (val <= maxVal));\n}", "_isYearAndMonthAfterMaxDate(year, month) {\n if (this.maxDate) {\n const maxYear = this._dateAdapter.getYear(this.maxDate);\n const maxMonth = this._dateAdapter.getMonth(this.maxDate);\n return year > maxYear || (year === maxYear && month > maxMonth);\n }\n return false;\n }", "_isYearAndMonthAfterMaxDate(year, month) {\n if (this.maxDate) {\n const maxYear = this._dateAdapter.getYear(this.maxDate);\n const maxMonth = this._dateAdapter.getMonth(this.maxDate);\n return year > maxYear || (year === maxYear && month > maxMonth);\n }\n return false;\n }", "hasValues() {\n\t\treturn this.data.length > 0;\n\t}", "function hasMaxlength(fld) {\r\n var hasFlag = false;\r\n try{\r\n var mlength = fld.getAttribute(\"maxlength\") ? fld.getAttribute(\"maxlength\") : fld.attributes.maxLength.value;\r\n hasFlag = mlength ? true : false;\r\n } catch (e){\r\n //If fail on getting maxLength value. return false.\r\n hasFlag = false;\r\n }\r\n return hasFlag;\r\n}", "function isValid(value) {\n\t return Boolean(value || value === 0);\n\t}", "function checkMax(numSides, peopleBet){\n\tif(peopleBet==numSides*2){\t\t\t\t\t//as people bet is 2 times the dieroll output. so its been checked if its max.\n\t\treturn true;\n\t}\n\telse{\n\t\treturn false;\n\t}\n}", "function isInfinite(val) {\n return val === Infinity;\n}", "function maxValidator(max) {\n return control => {\n if (isEmptyInputValue(control.value) || isEmptyInputValue(max)) {\n return null; // don't validate empty values to allow optional controls\n }\n\n const value = parseFloat(control.value); // Controls with NaN values after parsing should be treated as not having a\n // maximum, per the HTML forms spec: https://www.w3.org/TR/html5/forms.html#attr-input-max\n\n return !isNaN(value) && value > max ? {\n 'max': {\n 'max': max,\n 'actual': control.value\n }\n } : null;\n };\n}", "function formIsInvalid() {\n \n var rowsValue = $(\"#rows\").val();\n var colsValue = $(\"#cols\").val();\n var bombsValue = $(\"#bombs\").val();\n \n var maxRows = $(\"#rows\").prop(\"max\");\n var maxCols = $(\"#cols\").prop(\"max\");\n var maxBombs = maxRows*maxCols-1;\n \n console.log(\"Max: \", maxRows, maxCols, maxBombs)\n console.log(\"Values: \", rowsValue, colsValue, bombsValue)\n \n if ( $(\"#name\").val() === \"\" || rowsValue === \"\" || colsValue === \"\" || bombsValue === \"\") { \n console.log(\"All fields are required\")\n return true;\n } \n \n if(colsValue > maxCols) {\n console.log(\"Number of columns higher than maximum cols possible\");\n return true;\n }\n \n if(rowsValue > maxRows) {\n console.log(\"Number of rows higher than maximum rows possible\");\n return true;\n }\n \n if(bombsValue > maxBombs) {\n if(colsValue > maxCols) {\n console.log(\"Number of bombs higher than maximum bombs possible\");\n return true;\n } \n }\n \n return false;\n}", "function inRange(value, minVal, maxVal) {\n\t\tif ((value > minVal) && (value < maxVal)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "isInBounds(value, minExclusive = false, maxExclusive = false) { \n\t\tif (!FormatUtils.isNumber(value) && !FormatUtils.canBeNumber(value)) \n\t\t\treturn false;\n\n\t\tvalue = Number(value);\n\t\tlet aboveMin = minExclusive ? value > this.#min : value >= this.#min;\n\t\tlet belowMax = maxExclusive ? value < this.#max : value <= this.#max;\n\n\t\treturn aboveMin && belowMax;\n\t}", "function validateNumberRange(control, min, max, message, showMessage)\n{\n var result = true;\n \n if (control != null && (isNaN(control.value) || control.value < min || control.value > max))\n {\n informUser(control, message, showMessage);\n result = false;\n }\n \n return result;\n}", "function validateMinMaxValue(val)\n{\n var dt = P2.getFieldValue(TYPE_NAME);\n if (dt == INT_TYPE || dt == DEC_TYPE)\n {\n if(!val || val.length == 0)\n return \"Min/Max values are required\"\n }\n return null;\n}", "maxLength(val, length) {\n return String(val).length <= length;\n }", "function maxValidator(max) {\n return (control) => {\n if (isEmptyInputValue(control.value) || isEmptyInputValue(max)) {\n return null; // don't validate empty values to allow optional controls\n }\n const value = parseFloat(control.value);\n // Controls with NaN values after parsing should be treated as not having a\n // maximum, per the HTML forms spec: https://www.w3.org/TR/html5/forms.html#attr-input-max\n return !isNaN(value) && value > max ? { 'max': { 'max': max, 'actual': control.value } } : null;\n };\n}", "function maxValidator(max) {\n return (control) => {\n if (isEmptyInputValue(control.value) || isEmptyInputValue(max)) {\n return null; // don't validate empty values to allow optional controls\n }\n const value = parseFloat(control.value);\n // Controls with NaN values after parsing should be treated as not having a\n // maximum, per the HTML forms spec: https://www.w3.org/TR/html5/forms.html#attr-input-max\n return !isNaN(value) && value > max ? { 'max': { 'max': max, 'actual': control.value } } : null;\n };\n}", "function maxValidator(max) {\n return (control) => {\n if (isEmptyInputValue(control.value) || isEmptyInputValue(max)) {\n return null; // don't validate empty values to allow optional controls\n }\n const value = parseFloat(control.value);\n // Controls with NaN values after parsing should be treated as not having a\n // maximum, per the HTML forms spec: https://www.w3.org/TR/html5/forms.html#attr-input-max\n return !isNaN(value) && value > max ? { 'max': { 'max': max, 'actual': control.value } } : null;\n };\n}", "function isValidRange(minNum, maxNum){\n return (minNum < maxNum);\n}", "isMaxFittnessReached()\n {\n // console.log(\"Max Fit : \" , this.MaxFitnessGeneration , \"Glob Fit : \", this.GlobalMaxFitness )\n // console.log(\"GLOBAL FITNESS GENERATION : \" , this.MaxFitnessGeneration)\n if(this.MaxFitnessGeneration >= this.GlobalMaxFitness)\n return true;\n }", "function isValid(value) {\n return value || value === 0;\n}", "isValidMaxLength(input) {\n return input && input !== '' && input.length <= this.maxLength;\n }", "function check_for_bet(){\n\n\t// var betInterval = parseInt(document.getElementById('betInterval').innerText);\n\tvar maxBet = parseInt(document.getElementById('userBet').innerText);\n\tvar betCount = parseInt(document.getElementById('betCount').innerText);\n\tvar betInputValue = parseInt(document.getElementById('betInputRegular').value);\n\n\t// console.log(betInterval);\n\tconsole.log(maxBet);\n\tconsole.log(betCount);\n\tconsole.log(betInputRegular);\n\n\t// alert('check_for_bet func');\n\n\tif(betInputValue > maxBet && betCount != 0){\n\t\treturn true;\n\t}\n\telse if(betCount === 0){\n\t\treturn true;\n\t}\n\telse if(isNan(maxBet)){\n\t\treturn true;\n\t}\n\telse{\n\t\talert('Введите корректное значение ставки. Оно должно быть больше вашей текущей максимальной.');\n\t\treturn false;\n\t}\n\n}", "get hasValues() {\n return this.arrayWidth > 0 && this.arrayHeight > 0;\n }", "function checkRange(value) {\n if (value == DOT_INDEX || value == COMMA_INDEX || (value >= NUM_LOW && value <= NUM_HI) || (value >= LET_HI_LOW && value <= LET_HI_HI) || (value >= LET_LOW_LOW && value <= LET_LOW_HI)) {\n return true;\n }\n return false;\n}", "function isInMaxlength(fld) {\r\n var mlength = fld.getAttribute ? parseInt(fld.getAttribute(\"maxlength\")) : \"\";\r\n mlength = getAdjustedTextareaTextLength(fld, mlength);\r\n if (fld.value.length >= mlength) {\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\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 isBigEnough(value) {\n if (value >= 10) {\n return true;\n }\n return false;\n}", "function inRange() {\n var currentHeight = Math.round(ellipsisContainer.getBoundingClientRect().height * 100) / 100;\n return currentHeight - 0.1 <= maxHeight; // -.1 for firefox\n }", "isCancelAfterEnd() {\n return this.state.value > 1000000;\n }", "isValid() {\n if (this.value) {\n return true;\n } else {\n return false;\n }\n }", "function isValid(value) {\n return Boolean(value || value === 0);\n}", "function isValid(value) {\n return Boolean(value || value === 0);\n}", "function isValid(value) {\n return Boolean(value || value === 0);\n}", "function isValid(value) {\n return Boolean(value || value === 0);\n}", "function checkRange (min, max, number) {\r\n var result = false;\r\n if (number >= min && number <= max) {\r\n result = true;\r\n }\r\n return result;\r\n}", "function arrayMaxSize(array, max) {\n return array instanceof Array && array.length <= max;\n}", "function isFiniteNumber(val) {\n return isValidNumber(val) && val !== Infinity && val !== -Infinity;\n }", "_isRangeEnd(value) {\n return isEnd(value, this.startValue, this.endValue);\n }", "_isRangeEnd(value) {\n return isEnd(value, this.startValue, this.endValue);\n }", "function checkHighest(value) {\n if (isHighest < value) {\n isHighest = value;\n }\n}", "get actualMaximumValue() {\r\n return this.i.actualMaximumValue;\r\n }", "isMin(value, limit) {\n return parseFloat(value) >= limit;\n }", "maxLength(v, maxLength = 200, fieldName = DEFAULT_FIELD_NAME){\n return String(v).length <= maxLength || `${fieldName} must be maximum of ${maxLength} characters.`\n }", "function validateValue(input_value) {\n\t\tif (input_value===0) return true; //show limit when value===0\n\t\tif (input_value != '') {\n\t\t\tif (input_value.length > 9) {\n\t\t\t\treturn false;\n\t\t\t} else if ((input_value < 0) || (input_value.match(/^0+[,.]0+$/) != null)){\n\t\t\t\treturn false;\n\t\t\t} else if (input_value >= 1000000){\n\t\t\t\treturn false;\n\t\t\t} else if ((input_value.match(/^\\d{1,6}[,.]?\\d{0,2}$/) != null) \n\t\t\t\t\t\t\t&& (input_value.match(/^\\d{1,6}[,.]$/) == null)) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "checkAmountUniqueStocks(){\n const stocks = [...this.state.stocks];\n let value = stocks.length;\n return value >=this.state.maxAmountUniqueStocks ? true : false;\n }", "function checkRangeNumber(min, max, number) {\r\n var resultRange = false;\r\n if(number >= min && number <= max) {\r\n resultRange = true;\r\n }\r\n return resultRange;\r\n}", "get maximumValue() {\r\n return this.i.maximumValue;\r\n }", "function validateIsLongNumber(control, message, showMessage)\n{\n var isNumber=true;\n if (control != null)\n {\n var input = control.value;\n var validChars = \"0123456789\";\n var char;\n var longMaxValue = 9223372036854775807;\n var longMinValue = -9223372036854775808;\n for (var i = 0; i < input.length && isNumber == true; i++) { \n char = input.charAt(i); \n if (validChars.indexOf(char) == -1) {\n if(!(i == 0 && char ==\"-\")) {\n isNumber = false;\n }\n }\n }\n // no point of validating range, as in js max and min values seem to be smaller than in Java: [-9223372036854776000;9223372036854776000]\n // var isNumber = (isNumber && input <= longMaxValue && input >= longMinValue);\n if(!isNumber) {\n informUser(control, message, showMessage);\n }\n }\n return isNumber;\n}", "hasValue() {\n return !this.isEmpty();\n }", "hasValue() {\n return !this.isEmpty();\n }", "function hasValidSampleSize() {\n return offsetSamples.length >= 5;\n }", "function validate (number, min, max) {\n // if no range is provided, just check if it is an integer\n if (!min || !max) return isInteger(number);\n // otherwise, validate range parameters\n if (validate(min) && validate(max)) {\n // throw error if number is not in range\n if (number < min || number > max || !isInteger(number)) {\n throw Error('number argument not in range');\n } else {\n return true;\n }\n }\n return false;\n }", "isLastPage () {\n return this.lastItemIndex === 0\n ? true\n : this.computedPagination.page >= this.pagesNumber\n }", "function checkCounts(){\n\tfor(cat in landmarks){\n\t\tif(landmarks[cat].length != targetCounts[cat]){\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}", "isValid() {\n const { fields } = this.props;\n const fieldCount = fields.length;\n const validFieldCount = fields.filter(field => (\n this.wasFieldValidated(field) && this.isFieldValid(field)\n )).length;\n return fieldCount === validFieldCount;\n }", "get maxValue() {\n return this.options.maxValue || null;\n }", "checkPortfolioAmount() {\n let value = this.props.portfoliosAmount;\n return value >=this.props.maxPortfoliosAmount ? true : false;\n }", "reachedCapacity(){\n return this.amount >= this.item.stackMax ;\n }", "set maxIndex(_val) {\n (typeof _val === \"number\") && this.setAttribute(\"max\", _val);\n }", "function exceedsLastNonDefault(i) {\n\t return i + 1 > lastNonDefaultParam;\n\t }", "function exceedsLastNonDefault(i) {\n\t return i + 1 > lastNonDefaultParam;\n\t }", "function exceedsLastNonDefault(i) {\n\t return i + 1 > lastNonDefaultParam;\n\t }", "function exceedsLastNonDefault(i) {\n\t return i + 1 > lastNonDefaultParam;\n\t }", "static calcMaxValue(diceExp: string) {\n return baseBalcValue(diceExp, false, true);\n }", "function checkInfiniteBounds() {\n if (self.isLoading) return;\n var maxScroll = {};\n\n if (self.jsScrolling) {\n maxScroll = self.getJSMaxScroll();\n var scrollValues = self.scrollView.getValues();\n if ((maxScroll.left !== -1 && scrollValues.left >= maxScroll.left) ||\n (maxScroll.top !== -1 && scrollValues.top >= maxScroll.top)) {\n onInfinite();\n }\n } else {\n maxScroll = self.getNativeMaxScroll();\n if ((\n maxScroll.left !== -1 &&\n self.scrollEl.scrollLeft >= maxScroll.left - self.scrollEl.clientWidth\n ) || (\n maxScroll.top !== -1 &&\n self.scrollEl.scrollTop >= maxScroll.top - self.scrollEl.clientHeight\n )) {\n onInfinite();\n }\n }\n }", "function checkInfiniteBounds() {\n if (self.isLoading) return;\n var maxScroll = {};\n\n if (self.jsScrolling) {\n maxScroll = self.getJSMaxScroll();\n var scrollValues = self.scrollView.getValues();\n if ((maxScroll.left !== -1 && scrollValues.left >= maxScroll.left) ||\n (maxScroll.top !== -1 && scrollValues.top >= maxScroll.top)) {\n onInfinite();\n }\n } else {\n maxScroll = self.getNativeMaxScroll();\n if ((\n maxScroll.left !== -1 &&\n self.scrollEl.scrollLeft >= maxScroll.left - self.scrollEl.clientWidth\n ) || (\n maxScroll.top !== -1 &&\n self.scrollEl.scrollTop >= maxScroll.top - self.scrollEl.clientHeight\n )) {\n onInfinite();\n }\n }\n }" ]
[ "0.7149446", "0.6726938", "0.66662204", "0.6664043", "0.6528222", "0.627548", "0.60015124", "0.57038605", "0.5689484", "0.5676869", "0.56721824", "0.5643552", "0.56225073", "0.56146497", "0.557657", "0.5554315", "0.5544934", "0.55034465", "0.5490678", "0.5475875", "0.5474719", "0.5468621", "0.5468512", "0.5459487", "0.53603363", "0.52829254", "0.5282435", "0.5255455", "0.52489924", "0.52489924", "0.52303183", "0.5212565", "0.52038485", "0.5199855", "0.5195924", "0.5195924", "0.5192235", "0.5188913", "0.5186103", "0.5177988", "0.51685727", "0.516592", "0.515941", "0.5156797", "0.5143714", "0.5112622", "0.5104394", "0.509516", "0.5081288", "0.5081288", "0.5081288", "0.5078444", "0.505444", "0.5035811", "0.50351137", "0.5030155", "0.5025024", "0.50223196", "0.5007587", "0.5004033", "0.5001021", "0.49994525", "0.4996134", "0.49907193", "0.49852628", "0.49852628", "0.49852628", "0.49852628", "0.49819627", "0.49688202", "0.4967047", "0.49421942", "0.49421942", "0.4935759", "0.49227855", "0.49189782", "0.49178773", "0.49132085", "0.49022305", "0.4880952", "0.4875879", "0.48679045", "0.48674884", "0.48674884", "0.48572037", "0.48502022", "0.4845623", "0.48377192", "0.4835319", "0.48327556", "0.482765", "0.48190084", "0.48103687", "0.4806964", "0.4806964", "0.4806964", "0.4806964", "0.4804184", "0.48028353", "0.48028353" ]
0.8210685
0
Called when the annotation type's value type has been changed.
valueTypeChanged() { if (!this.isValueTypeSelect()) { this.maxValueCount = AnnotationMaxValueCount.NONE; } this.options = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleAnnotationTypeChange() {\n gAnnotationType = parseInt($('#annotation_type_id').val());\n globals.currentAnnotationsOfSelectedType = gCurrentAnnotations.filter(function(e) {\n return e.annotation_type.id === gAnnotationType;\n });\n setTool();\n setupCBCheckboxes();\n }", "function valueTypeChange() {\n if (vm.annotType.valueType === 'Select') {\n // add an option if none exist\n if (!vm.annotType.options || (vm.annotType.options.length < 1)) {\n optionAdd();\n }\n } else {\n vm.annotType.options = undefined;\n vm.annotType.maxValueCount = 0;\n }\n }", "set type(value) {}", "function changeTagValueType() {\n\n\t\t// Update the model value type\n\t\tvm.tagModel.valType = vm.tagValueTypeDropdown.selectedTagValueType.value;\n\n\t\tif (vm.tagModel.valType === 'P') {\n\n\t\t\t// Trigger a blur to update the input formatting\n\t\t\t$timeout(function() {\n\t\t\t\t$('#tag-percent-input').blur();\n\t\t\t}, 0);\n\n\t\t} else {\n\n\t\t\t// Trigger a blur to update the input formatting\n\t\t\t$timeout(function() {\n\t\t\t\t$('#tag-currency-input').blur();\n\t\t\t}, 0);\n\t\t}\n\t}", "onValueChange(value) {\n const { fieldValue } = this.props;\n const { onFieldValueChange } = this.context.jsonEditor;\n const valueType = getValueType(fieldValue);\n\n onFieldValueChange(this.getFieldPath(), coerceToType(value, valueType));\n }", "updateValue(type){\n // if (type === \"Distribution\"){\n // this.item.class = \"BoundedNormalDistribution\";\n // }\n this.item.class = type;\n this.updated.emit(this.item);\n }", "TSTypeAnnotation(node) {\n this.visitTypeNodes(node);\n }", "_changeType(to) {\n removeType(this, this.type);\n addType(this, to);\n }", "_changeScaleType() {\n const that = this;\n\n that._numericProcessor = new JQX.Utilities.NumericProcessor(that, 'scaleType');\n\n that._validateMinMax('both');\n\n that._setTicksAndInterval();\n that._scaleTypeChangedFlag = true;\n that._validate(true, that._number.toString());\n that._scaleTypeChangedFlag = false;\n }", "_inputTypeChangeHandler(newValue) {\n this.log.debug(\n this.inputTypeProperty,\n 'of device',\n this.device.type,\n this.device.id,\n 'changed to',\n newValue\n )\n\n this._triggerSwitchDebounced()\n }", "set_type(new_type){\n if(new_type){\n this.type = new_type;\n }\n else{\n this.invalid();\n }\n }", "function rsTypeChanged(){\n\t\n}", "onGenericChange() {\n this.contentChanged.emit(void 0);\n }", "handleStaticResTypeChange(event, type)\t\t\t\t\t\t\t\t\t// eslint-disable-line no-unused-vars\n\t{\n\t\tif(!r3IsSafeTypedEntity(this.state.editingStaticRes, 'object')){\n\t\t\treturn;\n\t\t}\n\n\t\t// check value\n\t\tlet\ttypeString;\n\t\tif(staticResDataType.staticResObjectDataType == type){\n\t\t\ttypeString = 'object';\n\t\t}else{\t// staticResDataType.staticResStringDataType\n\t\t\ttypeString = 'string';\n\t\t}\n\t\tif(!r3IsEmptyEntityObject(this.state.editingStaticRes, 'type')){\n\t\t\tif(typeString == this.state.editingStaticRes.type){\n\t\t\t\tconsole.warn('changed value type(' + JSON.stringify(type) + ') is something wrong.');\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// set type\n\t\tlet\tnewStaticRes\t= r3DeepClone(this.state.editingStaticRes);\n\t\tnewStaticRes.type\t= typeString;\n\n\t\t// update state\n\t\tthis.setState({\n\t\t\teditingStaticRes:\tnewStaticRes,\n\t\t\tstaticResMessage:\tnull\n\t\t});\n\t}", "_bindTypeChange() {\n\t\tthis.$typeControl.find( 'input' ).on( 'change', e => {\n\t\t\tlet $this = $( e.target ),\n\t\t\t\tval = $this.val();\n\n\t\t\tthis.applyCssRules( {\n\t\t\t\t'border-style': val\n\t\t\t} );\n\n\t\t\tthis._toggleWidthControl( val );\n\t\t\tthis.$control.trigger( 'type-change', val );\n\t\t\tthis._triggerChangeEvent();\n\t\t} );\n\t}", "function handleTypeChange(e){\n //update the selectedType object\n publicAPI.$npcSelectedType = $(this);\n // update the available skills to select based on the new matrix\n //debug string\n console.log(`Type changed to ${publicAPI.$npcSelectedType.val()}`);\n updateAvailableSkillsSelectors();\n }", "onChangeType(key) {\n\n // look at the model and define the value\n if (this.$scope.valueModel) {\n // update the selected value\n this.selectedValuesByKey.set(key, this.$scope.valueModel);\n\n // notify callbacks\n this.$scope.callbackController.cdvySelecter(key, this.selectedValuesByKey.get(key));\n }\n\n }", "function updateAnnotValue($scope, newVal){\n $scope.annotValue = newVal;\n}", "function frequencyTypeChanged() {\n if (this.value == 'ff') {\n all_data.forEach(function(character, i) {\n character.percentage = character.fanfiction_percentage;\n character.last_rank = i;\n });\n }\n else {\n all_data.forEach(function(character, i) {\n character.percentage = character.canon_percentage;\n character.last_rank = i;\n });\n }\n all_data.sort(function(a, b) {\n return b.percentage - a.percentage;\n });\n cur_display = all_data.slice(0,num_characters);\n\n update();\n }", "onEventTypeChange({\n value\n }) {\n this.toggleEventType(value);\n }", "function handleTypeChange(event) {\n setPackageType(event.target.value);\n console.log(event.target.value);\n }", "updateValueEvents() {\n this.updateEventsContainer('value');\n }", "function typeUpdated(e) {\n var index = item.index();\n console.log(index, signals[id]);\n var signal = signals[id][index];\n var typeVal = type_select.val();\n var subtypeVal = subtype_select.val();\n signal.type = typeVal;\n signal.subtype = subtypeVal;\n }", "changeValue(value) {\n this.rawValue = value;\n if (this.rawToFinalValue) {\n this.value = this.rawToFinalValue(value);\n }\n else\n this.value = value;\n this.parentSectionReflection.valueChanged();\n this.validate();\n }", "_onChangeType(dataType, timePeriod) {return this.componentDidUpdate();}", "async function handleUserTypeValueSave() {\n updateIsSaving(true);\n\n await updateInstance({\n variables: {\n actionId: UPDATE_USER_TYPE_FOR_APP_SPEC_ACTION_ID,\n executionParameters: JSON.stringify({\n value: userTypeValue,\n instanceId: userType.id,\n }),\n },\n refetchQueries,\n });\n\n updateIsEditMode(false);\n updateIsSaving(false);\n }", "onElementTypeChange(elementType) {\n var elem = updateObject({}, this.getConfiguredElement());\n\n //override the frontend terminology\n var elementTypeOverride = getElementTypeOverrideBack(elementType);\n setElemFieldVal(elem, FIELD_TYPE, elementTypeOverride);\n setElemFieldVal(elem, FIELD_PARENT, null);\n if (elementTypeOverride === ELEMENT_TYPE_UE) {\n setElemFieldVal(elem, FIELD_WIRELESS, true);\n setElemFieldVal(elem, FIELD_WIRELESS_TYPE, 'wifi,5g,4g,other');\n }\n\n elem.parentElements = this.elementsOfType(getParentTypes(elementTypeOverride));\n\n if (this.getConfigMode() !== CFG_ELEM_MODE_CLONE) {\n setElemFieldVal(elem, FIELD_NAME, getSuggestedName(elementTypeOverride, this.getTableEntries()));\n setElemFieldVal(elem, FIELD_DN_NAME, getSuggestedDnn(elementTypeOverride));\n }\n // this.props.cfgElemUpdate(elem);\n this.updateElement(elem);\n }", "enterTypeAnnotation(ctx) {\n }", "set heightType(value) {\n if (value === this.heightTypeIn) {\n return;\n }\n this.heightTypeIn = value;\n this.notifyPropertyChanged('heightType');\n }", "function updateLabelType(newType) {\n setClassExclusively(window.dGO.printArea, newType, window.dGO.allLabelTypes);\n}", "set propertyType(value) {}", "type(val) {\n this._type = val;\n return this;\n }", "set type(type) {\n this._type = type;\n }", "OnValueChanged()\n {\n if (this._constantBuffer)\n {\n this.Apply(this._constantBuffer, this._offset);\n }\n }", "handleAssemblyAnnotationChange(value) {\n this.setState({ selectedFilterValue: value });\n this.resetCurrentBrowser(value);\n }", "function value_modification_handler(node) {\n node = node || document;\n let inps = node.getElementsByClassName('terminus-value');\n\n for (let i = 0; i < inps.length; i++) {\n let inp = inps[i];\n inp.addEventListener('change', function () {\n this.classList.add('value-modified');\n let pnd = this.parentNode._boundData;\n pnd.object[pnd.prop] = this.value;\n });\n }\n}", "function fieldChanged(type, name, lineNum) {\n // ---- Sublist fields ----\n if (name == this.SublistId + '_page' || name == this.SublistId + '_max') {\n nlapiSetFieldValue(this.SublistId + '_currpage', nlapiGetFieldValue(this.SublistId + '_page'), false);\n nlapiSetFieldValue(this.SublistId + '_maxinpage', nlapiGetFieldValue(this.SublistId + '_max'), false);\n this._uiObj.RefreshPage();\n }\n else {\n if (name == this.MarkCol || name == this.MarkProperty) {\n if (this.MarkKey && this.MarkProperty) {\n // prepare object for marking\n toggleLineMarked(this, lineNum, nlapiGetLineItemValue(this.SublistId, this.MarkProperty, lineNum));\n // set mark all field to false\n nlapiSetFieldValue(this.SublistId + '_mark_all', 'F', false);\n }\n }\n }\n }", "function changeGraphType(event) {\n var startIndex = event.startIndex;\n var endIndex = event.endIndex;\n\n if (endIndex - startIndex > maxCandlesticks) {\n // change graph type\n if (graph.type != \"line\") {\n graph.type = \"line\";\n graph.fillAlphas = 0;\n chart.validateNow();\n }\n } else {\n // change graph type\n if (graph.type != graphType) {\n graph.type = graphType;\n graph.fillAlphas = 1;\n chart.validateNow();\n }\n }\n }", "_add_Cutoff_InputField__OnChange_Processing({ $annType_Entry, annType_Entry }) {\n\n const annType_Entry_DOM = $annType_Entry[ 0 ];\n\n // document.querySelector(...) Returns first element found\n const selector_ann_type_cutoff_input_field_DOM_Element = \n annType_Entry_DOM.querySelector(\".selector_ann_type_cutoff_input_field\");\n\n if ( selector_ann_type_cutoff_input_field_DOM_Element === null || selector_ann_type_cutoff_input_field_DOM_Element.length === 0 ) {\n throw Error(\"No DOM element with class 'selector_ann_type_cutoff_input_field' \");\n }\n\n selector_ann_type_cutoff_input_field_DOM_Element.addEventListener('input', ( eventObject ) => {\n try {\n eventObject.preventDefault();\n // console.log(\"'input' fired\");\n const eventTarget = eventObject.target;\n // const inputBoxValue = eventTarget.value;\n // console.log(\"'input' fired. inputBoxValue: \" + inputBoxValue );\n const $eventTarget = $( eventTarget );\n const $selector_ann_type_containing_row = $eventTarget.closest(\".selector_ann_type_containing_row\");\n const $selector_invalid_entry = $selector_ann_type_containing_row.find(\".selector_invalid_entry\");\n var fieldValue = $eventTarget.val();\n if ( ! this._isFieldValueValidDecimalNumber({ fieldValue }) ) {\n $selector_invalid_entry.show();\n\n const indexOverall = annType_Entry.indexOverall;\n if ( ! this._annotationTypes_Entries_UserDataError.has( indexOverall ) ) {\n this._annotationTypes_Entries_UserDataError.add( indexOverall );\n\n // Value changed so update dependent items\n this._update_enable_disable_SaveButton();\n }\n } else {\n $selector_invalid_entry.hide();\n\n const indexOverall = annType_Entry.indexOverall;\n if ( this._annotationTypes_Entries_UserDataError.has( indexOverall ) ) {\n this._annotationTypes_Entries_UserDataError.delete( indexOverall );\n\n // Value changed so update dependent items\n this._update_enable_disable_SaveButton();\n }\n }\n return false;\n } catch( e ) {\n reportWebErrorToServer.reportErrorObjectToServer( { errorException : e } );\n throw e;\n }\n });\n }", "function handleUserTypeValueChange(e) {\n updateUserTypeValue(e.target.value);\n }", "_codemirrorValueChanged() {\n // Don't trigger change event if we're ignoring changes\n if (this._ignoreNextChange || !this.props.onChange) {\n this._ignoreNextChange = false;\n return;\n }\n\n const value = this.codeMirror.getDoc().getValue();\n\n // Disable linting if the document reaches a maximum size or is empty\n const shouldLint =\n value.length > MAX_SIZE_FOR_LINTING || value.length === 0 ? false : !this.props.noLint;\n const existingLint = this.codeMirror.options.lint || false;\n if (shouldLint !== existingLint) {\n const { lintOptions } = this.props;\n const lint = shouldLint ? lintOptions || true : false;\n this.codeMirror.setOption('lint', lint);\n }\n\n this.props.onChange(value);\n }", "function setDistType() {\r\n\tvar val = document.getElementById('distType').value;\r\n\tdistType = Number(val);\r\n\tupdate();\r\n}", "function newTyping() {\n output.html(type.value());\n output.parent('output');\n}", "function setDataType(valueName, valueModel){\n switch(valueName){\n case \"on\":\n case \"reachable\":\n valueModel.set(\"number\", {min: 0, max: 1, step: 1, unit: \"int\"});\n break;\n case \"bri\":\n case \"sat\":\n valueModel.set(\"number\", {min: 0, max: 255, step: 1, unit: \"int\"});\n break;\n case \"hue\":\n valueModel.set(\"number\", {min: 0, max: 65535, step: 1, unit: \"int\"});\n break;\n default:\n valueModel.set(\"string\", {max: 99});\n break;\n }\n}", "attributeChangedCallback(attr, oldVal, newVal) {\n console.log('inside attributeChangedCallback', 'attr:', attr, 'oldVal:', oldVal, 'newVal:', newVal);\n if (attr === 'value') {\n this.value = newVal;\n }\n }", "function onToggleChange() {\n var types = [];\n angular.forEach(vm.toggles, function (active, type) {\n if (active) {\n types.push(type);\n }\n });\n // Tell tribeIds $watch that we changed `$scope.types`\n // from inside the directive\n ignoreToggles = true;\n $scope.types = types;\n }", "changedInput() {\n\n\t\tlet {isValid, error} = this.state.wasInvalid ? this.validate() : this.state;\n\t\tlet onChange = this.props.onChange;\n\t\tif (onChange) {\n\t\t\tonChange(this.getValue(), isValid, error);\n\t\t}\n\t\tif (this.context.validationSchema) {\n\t\t\tlet value = this.getValue();\n\t\t\tif (this.state.isMultiSelect && value === '') {\n\t\t\t\tvalue = [];\n\t\t\t}\n\t\t\tif (this.shouldTypeBeNumberBySchemeDefinition(this.props.pointer)) {\n\t\t\t\tvalue = Number(value);\n\t\t\t}\n\t\t\tthis.context.validationParent.onValueChanged(this.props.pointer, value, isValid, error);\n\t\t}\n\t}", "function handleChangeType(event){\n const {name, value} = event.currentTarget\n changeFilde(name, value);\n}", "function changed(value) {\n for (var i = 0; i < diagramInstance.selectedItems.nodes.length; i++) {\n node = diagramInstance.selectedItems.nodes[i];\n for (var j = 0; j < node.annotations.length; j++) {\n if (value === \"fontsize\") {\n node.annotations[j].style.fontSize = fontSize.value;\n }\n else if (value === \"underline\") {\n node.annotations[j].style.textDecoration =\n \"Underline\";\n }\n else if (value === \"fontfamily\") {\n node.annotations[j]\n .style.fontFamily = fontFamily.value.toString();\n }\n else if (value === \"bold\") {\n node.annotations[j].style.bold = true;\n }\n else if (value === \"italic\") {\n node.annotations[j].style.italic = true;\n }\n diagramInstance.dataBind();\n }\n }\n}", "function changeGraphType(event) {\n\t \n\t\tvar startIndex = event.startIndex;\n\t var endIndex = event.endIndex;\n\t \n\t var chart = $scope.chart;\n\t var graph = $scope.graph;\n\t \n\t if(endIndex - startIndex > $scope.maxCandlesticks) {\n\t \n\t \t// change graph type\n\t if(graph.type != \"line\") {\n\t \tgraph.type = \"line\";\n\t \tgraph.fillAlphas = 0;\n\t \tchart.validateNow();\n\t }\n\t \n\t } else {\n\t \t\n\t // change graph type\n\t if(graph.type != $scope.graphType) {\n\t \tgraph.type = $scope.graphType;\n\t \tgraph.fillAlphas = 1;\n\t \tchart.validateNow();\n\t }\n\t \n\t }\n\t \n\t}", "function genericOnChange(event) {\n setValue(event.target.value);\n }", "function changed(event) {\n\n\t\tvar element \t= event.target,\n\t\t\tvariable \t= element.getAttribute('data-variable'),\n\t\t\ttype \t\t= element.getAttribute('data-type'),\n\t\t\tvalue \t\t= element.value;\n\n\t\tbootpolish.set(variable, value);\n\t}", "attributeChangedCallback() { }", "function submissionTypeChanged() {\n checkAvailability(submissionTypes.file, submissionTypes.text);\n checkAvailability(submissionTypes.text, submissionTypes.file);\n if (submissionTypes.text.available.prop('checked') && submissionTypes.file.available.prop('checked')) {\n enableRequired(submissionTypes.text);\n enableRequired(submissionTypes.file);\n }\n }", "function updateWhenChangeType(e){\n\t$inputs = $(e).parents('table').find('input.dataInput');\n\t$.each($inputs,function(){\n\t\tcalculateInput($(this));\n\t});\n}", "handler(newVal, oldVal) {\n if(!TypeChecker.isUndefined(oldVal)) {\n this.getValue();\n }\n }", "function changeValue(val) {\n\t\t\t\tvalue = val;\n\t\t\t\tstarChange(val);\n\t\t\t}", "function valueChanged() {\n debug && console.log( \"ManageWorkOrderRepairDetails: value changed\" );\n JSONData.setUnsavedChanges( true, \"manageWorkOrderSave\" );\n }", "updateType() {\n this.incorrectTypeAttributes = false;\n // Since we can just change name and do not touch attributes\n // this is safety check to not touch existing array of attributes\n if(!Array.isArray(this.type.attrs)) {\n this.type.attrs = this.getAttributes();\n }\n\n if(this.incorrectTypeAttributes) {\n this.toastr.error('Attributes must be separated by comma without spaces', 'Error');\n return;\n }\n\n this.TypeService.updateType(this.type)\n .then(this.handleFormSuccess.bind(this, 'Type was updated'))\n .catch(this.handleFormErrors.bind(this));\n }", "function updateComparisonType(){\n\n comparisonChartType = this.value; // \"spend_vs_gm\"\n\n // buildCharts(chartdata, comparison_data); \n buildCharts(); \n}", "function assignEvents(textbox, type, ds) {\n\t\t\t\t\t[\"input\", \"keydown\", \"keyup\", \"mousedown\", \"mouseup\", \"select\", \"contextmenu\", \"drop\"].forEach(function (event) {\n\t\t\t\t\t\ttextbox.addEventListener(event, function () {\n\t\t\t\t\t\t\tvar valid;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Is a number with separator\n\t\t\t\t\t\t\tif(type == \"decimal\" || type == \"float\"){ \n\t\t\t\t\t\t\t\tvalid = Constraint._types[type](this.value, ds); \n\n\t\t\t\t\t\t\t// Is customized\n\t\t\t\t\t\t\t} else if(type == \"custom\"){\n\t\t\t\t\t\t\t\tvalid = Constraint._types[this.id](this.value, ds); \n\n\t\t\t\t\t\t\t// Any other case\n\t\t\t\t\t\t\t} else { \n\t\t\t\t\t\t\t\tvalid = Constraint._types[type](this.value); \n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif(valid){ this.oldValue = this.value; } \n\t\t\t\t\t\t\telse if (this.hasOwnProperty(\"oldValue\")) { this.value = this.oldValue; }\n\n\t\t\t\t\t\t\treturn valid;\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}", "function changeDataType(newDataType) {\n console.log('changeDataType: ' + DATATYPE_NAME[newDataType]);\n gDataType = parseInt(newDataType);\n\n // Enable or disable the 'lower case' checkbox based on new data type.\n var elem = $('#lower-case-checkbox input');\n if (newDataType == DATATYPE_STRING) {\n elem.removeAttr('disabled');\n } else {\n elem.attr('disabled', true);\n }\n\n // Change the placeholders to match the data type.\n changeControlPanelPlaceholders();\n\n // Clear out any of the old data.\n clearInputData();\n clearOutputData();\n\n // Build a new tree with the new data type.\n gTree = new BinarySearchTree();\n}", "updateDataType_() {\n /** @type {!Object} */\n this.dataType = {\n bits: ((parseInt(this.bitDepth, 10) - 1) | 7) + 1,\n float: this.bitDepth == '32f' || this.bitDepth == '64',\n signed: this.bitDepth != '8',\n be: this.container == 'RIFX'\n };\n if (['4', '8a', '8m'].indexOf(this.bitDepth) > -1 ) {\n this.dataType.bits = 8;\n this.dataType.signed = false;\n }\n }", "handleTypeChange(event, index, value){\n this.setState({type:value});\n }", "_onEdit(type) {\n this.refs.screen.updateValues(type);\n this.refs.advanced.updateValues(type);\n this.refs.misc.updateValues(type);\n }", "handleTypeChange(e) {\n this.setState({\n newType: e.target.value\n })\n }", "_refreshTypeParser(dataType) {\n parserStore.refresh(dataType);\n }", "_refreshTypeParser(dataType) {\n parserStore.refresh(dataType);\n }", "_refreshTypeParser(dataType) {\n parserStore.refresh(dataType);\n }", "function getTypeAnnotation() /*: Object*/ {\n\t if (this.typeAnnotation) return this.typeAnnotation;\n\n\t var type = this._getTypeAnnotation() || t.anyTypeAnnotation();\n\t if (t.isTypeAnnotation(type)) type = type.typeAnnotation;\n\t return this.typeAnnotation = type;\n\t}", "function getTypeAnnotation() /*: Object*/ {\n\t if (this.typeAnnotation) return this.typeAnnotation;\n\n\t var type = this._getTypeAnnotation() || t.anyTypeAnnotation();\n\t if (t.isTypeAnnotation(type)) type = type.typeAnnotation;\n\t return this.typeAnnotation = type;\n\t}", "setType(type) {\n\t\tthis.type = type;\n\t}", "function SettingValueType(typeSpec) {\n if (Object.keys(typeSpec).length > 0) {\n throw new Error('SettingType can not be customized');\n }\n}", "setValue(val) {\n this.binder.fieldValue = val;\n }", "setValue(val) {\n this.binder.fieldValue = val;\n }", "setValue(val) {\n this.binder.fieldValue = val;\n }", "setValue(source, newValue) {\n const oldValue = source[this.fieldName];\n const converter = this.converter;\n\n if (converter !== void 0) {\n newValue = converter.fromView(newValue);\n }\n\n if (oldValue !== newValue) {\n source[this.fieldName] = newValue;\n this.tryReflectToAttribute(source);\n\n if (this.hasCallback) {\n source[this.callbackName](oldValue, newValue);\n }\n\n source.$fastController.notify(this.name);\n }\n }", "function changeType( elem, type ) {\n try {\n elem.type = type;\n return true;\n } catch ( e ) {\n // You can't change input type in IE8 and below.\n return false;\n }\n }", "onPropertiesChanged() {\n this._recalculateClasses = true;\n }", "set binaryType(value) {\n logger.warn('binaryType setter not implemented, using \"arraybuffer\"');\n }", "function typeSelected(value) {\n setFormGeneratorState({ type: value });\n console.log(formGeneratorState);\n }", "attributeChangedCallback(name, oldValue, newValue) {\n console.log(\"Attribute changed to: \" + newValue);\n if (name == 'lat') this.lat = newValue;\n if (name == 'lng') this.lng = newValue;\n if (name == 'zoom') this.zoom = parseInt(newValue);\n }", "function changeType(elem, type) {\n try {\n elem.type = type;\n return true;\n } catch (e) {\n // You can't change input type in IE8 and below\n return false;\n }\n }", "function assignEvents(textbox, type, ds){\n [\"input\", \"keydown\", \"keyup\", \"mousedown\", \"mouseup\", \"select\", \"contextmenu\", \"drop\"].forEach(function(event){\n textbox.addEventListener(event, function(){\n var valid;\n\n // Is a number with separator\n if(type == \"decimal\" || type == \"float\"){\n valid = Constraint._types[type](this.value, ds);\n\n // Is customized\n } else if(type == \"custom\"){\n valid = Constraint._types[this.id](this.value, ds);\n\n // Any other case\n } else {\n valid = Constraint._types[type](this.value);\n }\n\n if(valid){ this.oldValue = this.value; } else if(this.hasOwnProperty(\"oldValue\")){ this.value = this.oldValue; }\n\n return valid;\n });\n });\n }", "SET_TYPE(state, type) {\n state.type = type\n }", "onSingleSyncDataTypeChanged_() {\n this.sendOsSyncDatatypes_();\n }", "function on_track_type_name_changed(type_name)\r\n{\r\n\tvar page = MainModes.current_page();\r\n\tif(page == sequencerPage)\r\n\t{\r\n\t\tpage.refresh_mode();\r\n\t}\r\n}", "function UpdateViewTypeToServer( newValue )\r\n\t{\r\n\t\r\n\t\tvar url = class_baseUrl + \"?func=ll.UpdateViewType&saveViewType=1&viewType=\" + newValue + \"&noGUI=true\";\r\n\r\n\t\tOTsendHTTPGetAjaxRequest( url );\r\n\t}", "updateUserType(userType) {\n \n }", "function fieldChanged(type, name, linenum)\r\n{\r\n\t/* On field changed:\r\n\t - PURPOSE\r\n\t FIELDS USED:\r\n\t --Field Name--\t\t\t\t--ID--\r\n\t */\r\n\t// LOCAL VARIABLES\r\n\t\r\n\t\r\n\t// FIELD CHANGED CODE BODY\r\n\r\n}", "function changeSubType(typedd) {\n\t// Find out which sentence we're looking at\n\tsid = parseInt(typedd.readAttribute(\"sid\"));\n\tsubTypeVal = typedd.getValue();\n\tif (subTypeVal == \"None\") {\n\t\tsubTypeHash.unset(sid);\n\t} else {\n\t\tsubTypeHash.set(sid, subTypeVal);\n\t}\n}", "handleATypeChange(event) {\n this.setState({aType: event.target.value});\n }", "_iStateOnValueChange() {\n this.dirty = true;\n }", "function set_node_type_change_handler() {\n let node_type_input = $('#batch_connect_session_context_node_type');\n node_type_input.change(node_type_change_hander);\n}", "function valueChanged(event){\n var value = event.target.value; //are we getting bytes?\n console.log('current value is now :' + value);\n console.log('converted value: ' + new TextDecoder('utf-8').decode(value))\n}", "function onChange() {\n if (input.get.call(element, valueField) !== observer.oldValue && !element.readOnly) {\n observer.set(input.get.call(element, valueField));\n }\n }", "handleResourceTypeChange(event, type)\t\t\t\t\t\t\t\t\t// eslint-disable-line no-unused-vars\n\t{\n\t\tif(this.state.newServiceResType === type){\n\t\t\tconsole.warn('changed value type(' + JSON.stringify(type) + ') is something wrong.');\n\t\t\treturn;\n\t\t}\n\t\tthis.setState({\n\t\t\tnewServiceResType:\ttype\n\t\t});\n\t}", "function changeType(elem, type) {\n try {\n elem.type = type;\n return true;\n } catch (e) {\n // You can't change input type in IE8 and below\n return false;\n }\n }", "function changeType(elem, type) {\n try {\n elem.type = type;\n return true;\n } catch (e) {\n // You can't change input type in IE8 and below\n return false;\n }\n }", "function changeType(elem, type) {\n try {\n elem.type = type;\n return true;\n } catch (e) {\n // You can't change input type in IE8 and below\n return false;\n }\n }" ]
[ "0.6767074", "0.65800756", "0.62600935", "0.61884594", "0.6157069", "0.59539425", "0.5904408", "0.58459175", "0.57941115", "0.57693505", "0.57078177", "0.56280786", "0.5511516", "0.5461591", "0.544887", "0.5443955", "0.542222", "0.54216987", "0.5400331", "0.54001176", "0.53916395", "0.53709245", "0.5363958", "0.5306574", "0.5302557", "0.5279473", "0.52739745", "0.52715826", "0.525793", "0.52525604", "0.5244451", "0.52120435", "0.51924914", "0.5190066", "0.5150685", "0.5144952", "0.51427513", "0.5139856", "0.513635", "0.51324373", "0.51174295", "0.51082265", "0.5096681", "0.509093", "0.50783324", "0.506962", "0.5067916", "0.50676787", "0.5066068", "0.50643224", "0.5063586", "0.5046912", "0.5042054", "0.50388134", "0.50285834", "0.501668", "0.5013464", "0.5001234", "0.49987292", "0.49947008", "0.49866912", "0.49852213", "0.49835783", "0.49825937", "0.49740663", "0.49659756", "0.49658623", "0.49658623", "0.49658623", "0.49642584", "0.49642584", "0.49589196", "0.4958229", "0.49531686", "0.49531686", "0.49531686", "0.49523133", "0.49390033", "0.49351606", "0.4928434", "0.49283653", "0.4926695", "0.49194774", "0.49118677", "0.49114326", "0.49045023", "0.48975873", "0.48942155", "0.4887662", "0.48750144", "0.48732248", "0.48719355", "0.48683572", "0.48683327", "0.48680526", "0.48663762", "0.48623818", "0.48524737", "0.48524737", "0.48524737" ]
0.73789895
0
Used to add an option. Should only be called when the value type is 'Select'.
addOption() { if (!this.isValueTypeSelect()) { throw new DomainError('value type is not select: ' + this.valueType); } this.options.push(''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function optionAdd() {\n if (vm.annotType.valueType !== 'Select') {\n throw new Error('value type error: ' + vm.annotType.valueType);\n }\n\n if (!vm.annotType.options) {\n vm.annotType.options = [];\n }\n vm.annotType.options.push('');\n }", "function addOption(theSel, theValue, theText)\n{\n\t\t var newOpt = new Option(theText, theValue);\n\t\t var selLength = theSel.length;\n\t\t theSel.options[selLength] = newOpt;\n}", "function addOption(theSel, theText, theValue)\n {\n\tvar newOpt = new Option(theText, theValue);var selLength = theSel.length;\n\ttheSel.options[selLength] = newOpt;theSel.options[selLength].selected=1; //select this option\n }", "function addOption(optionValue) {\n selectCtrl.addOption(optionValue, element);\n selectCtrl.ngModelCtrl.$render();\n chromeHack(element);\n }", "function addOption(optionValue) {\n selectCtrl.addOption(optionValue, element);\n selectCtrl.ngModelCtrl.$render();\n chromeHack(element);\n }", "function addOption(selectId,value,text,selected){\n\t$(\"#\"+selectId).append($(\"<option></option>\")\n .attr(\"value\",value)\n .text(text));\n\tif(selected){\n\t\t$('#'+selectId+' option').attr('selected', 'selected');\n\t}\n}", "function addSelectOption(elementId, label, value) {\n var option = $('<option>')\n .html(escapeHtml(label))\n .val(escapeHtml(value));\n $(elementId).append(option);\n }", "function AddOptionToSelect( select, option )\n{\n\ttry\n\t{\n\t\t// Standards-compliant\n\t\tselect.add( option, null );\n\t}\n\tcatch ( ex )\n\t{\n\t\t// IE non-compliant\n\t\tselect.add( option );\n\t}\n}", "function addSelectOption(selectId, value, display) {\n if (display === null) {\n display = value;\n }\n var anOption = document.createElement(\"option\");\n anOption.value = value;\n anOption.innerHTML = display;\n $(selectId).appendChild(anOption);\n return anOption;\n}", "function addOption(obj,text,value,selected) {\n if (obj!=null && obj.options!=null) {\n obj.options[obj.options.length] = new Option(text, value, false, selected);\n }\n }", "function addOptionToSelect(objectId, value, text) {\n\tvar o = new Option(text, value);\n\t$(o).html(text);\n\t$('#' + objectId).append(o);\n}", "function EZselectOptionAdd(listObject, text, value, selected, options)\n{\n\tif (typeof listObject != 'object') return\n\tif (!options) options = '';\n\tif (EZcheckOptions(options,'fastselect'))\n\t{\n\t\tEZselectOption(listObject, text, value, selected);\n\t\treturn;\n\t}\n\n\tvar opt = listObject.options.length\t\t//add and select record id\n\n\t//----- Don't know why but setting value at same time as defining option causes\n\t//\t\tdropdown box to be hidden therefore DO NOT use the following form\n\t//\t\tlistObject.options[opt] = new Option(text,value);\n\tlistObject.options[opt] = new Option(text);\n\tlistObject.options[opt].value = value;\n\n\tif (selected == 'true' || selected == true)\n\t\tlistObject.options[opt].selected = true;\n\n\tif (selected == 'noselection' && listObject.selectedIndex == -1)\n\t\tlistObject.options[opt].selected = true;\n}", "function addOption(selectbox, text, value) {\n var opt = document.createElement(\"OPTION\");\n opt.text = text;\n opt.value = value;\n selectbox.options.add(opt);\n}", "function appendOption(ctrlSelect, strValue, strText, bSelected) {\r\n var optNew = new Option(strText, strValue);\r\n ctrlSelect.options[ctrlSelect.length] = optNew;\r\n if (bSelected == true) {\r\n optNew.selected = true;\r\n }\r\n}", "function addOptionToSelect(selectId, text, value){\n var option = document.createElement('OPTION');\n option.text = text;\n option.value = value;\n var select = document.getElementById(selectId);\n select.appendChild(option)\n\n // lets try data list add\n // select = document.getElementById(\"browsers\");\n // option = document.createElement('OPTION');\n // option.text=text\n // select.appendChild(option)\n}", "function addOption(selectBox, option){\n\t try {\n\t selectBox.add(option, null); // standards compliant; doesn't work in IE\n\t }\n\t catch(ex) {\n\t selectBox.add(option); // IE only\n\t }\n}", "function addSelectOption(select, optval, optdisplay) {\n const opt = document.createElement(\"option\");\n opt.innerHTML = optdisplay || optval;\n opt.value = optval;\n opt.setAttribute(\"name\", optval);\n select.appendChild(opt);\n}", "function addNewOptionToDropdownWithId(text, selectId)\n {\n // getting the select element\n var element = document.getElementById(selectId);\n\n // creating a new option element\n var newOption = document.createElement('option');\n\n // setting newOption properties\n newOption.value = text;\n newOption.innerHTML = text;\n\n // appending\n element.appendChild(newOption);\n }", "function addOption(selectbox, text, value) {\n\tvar optn = document.createElement(\"OPTION\");\n\toptn.text = text;\n\toptn.value = value;\n\tselectbox.options.add(optn);\n}", "function addOption(selectbox, text, value) {\n\tvar optn = document.createElement(\"OPTION\");\n\toptn.text = text;\n\toptn.value = value;\n\tselectbox.options.add(optn);\n}", "createTypeOption(){\n var select = document.getElementById(\"chooseVenueType\");\n var newOption = document.createElement(\"option\");\n newOption.text = this.type;\n select.options.add(newOption);\n }", "function addOption(value,parent){\n let option = document.createElement(\"option\");\n option.textContent = value;\n parent.appendChild(option);\n}", "function addDropdownOption(dropdown,optionValue,optionText) {\n var option = document.createElement('option');\n option.setAttribute('value', optionValue)\n option.appendChild(document.createTextNode(optionText));\n dropdown.appendChild(option);\n }", "function appendToSelect(select, value, content) {\r\n var opt;\r\n opt = document.createElement(\"option\");\r\n opt.value = value;\r\n opt.appendChild(content);\r\n select.appendChild(opt);\r\n}", "function addDropdownOption(dropdown,optionValue,optionText) {\n var option = document.createElement('option');\n option.setAttribute('value', optionValue)\n option.appendChild(document.createTextNode(optionText));\n dropdown.appendChild(option);\n}", "function EZselectOption(selectElement, text, value, isSelected)\n{\n\tvar name = EZselectValidate(selectElement, text, value);\n\tif (!name) return false;\n\n\t// add option to this active menu/list\n\tvar selected = '';\n\tif (isSelected)\n\t{\n\t\tselected = ' selected';\n\t\tEZ.selectList[name].selected = true;\n\t}\n\tvar html = '<option value=\"' + value + '\"' + selected + '>' + text + '</option>\\n';\n\n\tEZ.selectList[name].html += html;\n\treturn true;\n}", "function SP_InsertOption()\n{\n\tif(arguments.length == 4)\n\t{\n\t\tvar oCMB = arguments[2];\n\t\tvar elOptNew = document.createElement('option');\n\t\tvar pstn = arguments[3];\n\t\telOptNew.text = arguments[0];\n\t\telOptNew.value = arguments[1];\n\t\t\n\t\tif(oCMB.selectedIndex == 0)\n\t\t{\n\t\t\tvar isOptDefault = oCMB.options[0].defaultSelected;\n\t\t\tif(!isOptDefault)\n\t\t\t{\n\t\t\t\telOptNew.selected = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\toCMB.options.add(elOptNew,pstn);\n\t\t\n\t}\n}", "function optionAdd() {\n vm.options.push('');\n }", "addOption(data) {\n var value,\n self = this;\n\n if (Array.isArray(data)) {\n for (const dat of data) {\n self.addOption(dat);\n }\n\n return;\n }\n\n if (value = self.registerOption(data)) {\n self.userOptions[value] = true;\n self.lastQuery = null;\n self.trigger('option_add', value, data);\n }\n }", "function addOption(dropdown, text)\n{\n var option = document.createElement(\"option\");\n option.textContent = text;\n dropdown.appendChild(option);\n}", "function addOption() {\n\n}", "function addOption(trgObj,optTxt,optVal) {\n var newOpt = new Option(optTxt,optVal)\n var len= trgObj.options.length\n trgObj.options[len]=newOpt\n}", "createSelectOption(optionValue) {\n\n // ? If the value is already an object, return the value\n if(typeof optionValue === 'object' && optionValue !== null)\n return optionValue;\n \n // ? Create Object with the values\n const option = {\n label : optionValue,\n value : optionValue\n }\n\n return option;\n }", "function create_option(select_element, text){\n const option = document.createElement(\"option\")\n const text_node = document.createTextNode(text)\n option.appendChild(text_node)\n option.value = text\n select_element.appendChild(option)\n }", "function valueTypeChange() {\n if (vm.annotType.valueType === 'Select') {\n // add an option if none exist\n if (!vm.annotType.options || (vm.annotType.options.length < 1)) {\n optionAdd();\n }\n } else {\n vm.annotType.options = undefined;\n vm.annotType.maxValueCount = 0;\n }\n }", "function createOption(f,e,newValue,newText) \n{\t//create options for our selects\n\tvar objSelect = document.getElementById(e);\n\tvar objOption = document.createElement(\"option\");\n\tobjNewText = document.createTextNode(newText);\n\tobjOption.value = newValue;\n\tobjOption.appendChild(objNewText);\n\tobjSelect.appendChild(objOption);\n}", "function ui_addNewOption(str_newOptionValue, str_newOptionLabel, id_targetList) {\n\n if (!ui_isOptionDuplicate(str_newOptionLabel,id_targetList)){ //check the newly option if exist in the select list\n \t//append the newly option to the select\n \tvar _selected_topic = new Option(ui_trim(str_newOptionLabel), ui_trim(str_newOptionValue), false, true); //new Option(text, value, defaultSelected, selected)\n \tvar _list = ui_getObjById(id_targetList);\n\t_list.options[_list.options.length] = _selected_topic;\n\n\t//select the newly added option\n\tif (_list.multiple){\n\t\t_list.options[_list.options.length-1].selected = true;\n\t}else{\n\t\t_list.selectedIndex = _list.options.length - 1;\n\t}\n }\n}", "function addSelectEntry(seq) {\n var input = select[0].selectize;\n input.addOption({value:seq,text:seq + \" (found CRISPR sequence)\"});\n input.refreshOptions();\n}", "function addOptionToSelectionBox(selectionBox, currentOptionValue) {\n\n var regExpr = /%20/gi;\n currentOptionValue = currentOptionValue.replace(regExpr, \" \");\n\n // Add Option with input OptionValue to the Selection Box\n\n var currentElementToBeAdded = document.createElement(\"option\");\n currentElementToBeAdded.text = currentOptionValue;\n\n selectionBox.add(currentElementToBeAdded);\n }", "add (val, txt, i, attr) {\r\n if (typeof val === \"undefined\") throw new Error(\"No value to add\");\r\n\r\n const O = this;\r\n const opts = O.E.find('option');\r\n const value = val;\r\n let \r\n text = txt,\r\n index = i;\r\n if (typeof txt === \"number\") { // .add('xxx', 2) shorthand\r\n index = txt;\r\n text = val;\r\n } else if (typeof txt === \"undefined\") { // .add('xxx') shorthand\r\n text = val;\r\n }\r\n\r\n const opt = $(\"<option></option>\").val(value).html(text);\r\n\r\n if (attr && typeof attr === \"object\") {\r\n $.each(attr, (j, v) => {\r\n opt.attr(j, v);\r\n });\r\n }\r\n\r\n if (opts.length < index) throw new Error(\"index out of bounds\");\r\n\r\n if (typeof index === \"undefined\" || opts.length === index) { // add it to the last if given index is last no or no index provides.\r\n O.E.append(opt);\r\n if (!O.mob) O.ul.append(O.createLi(opt));\r\n }\r\n else {\r\n opts.eq(index).before(opt);\r\n if (!O.mob) O.ul.find('li.opt').eq(index).before(O.createLi(opt));\r\n }\r\n\r\n return selObj;\r\n }", "function createOption(motor, text, value) {\r\n var opt = document.createElement('option');\r\n opt.value = value;\r\n opt.text = text;\r\n motor.options.add(opt);\r\n}", "onOptionSelect(evt, option) {\n var value,\n self = this;\n\n if (!option) {\n return;\n } // should not be possible to trigger a option under a disabled optgroup\n\n\n if (option.parentElement && option.parentElement.matches('[data-disabled]')) {\n return;\n }\n\n if (option.classList.contains('create')) {\n self.createItem(null, true, () => {\n if (self.settings.closeAfterSelect) {\n self.close();\n }\n });\n } else {\n value = option.dataset.value;\n\n if (typeof value !== 'undefined') {\n self.lastQuery = null;\n self.addItem(value);\n\n if (self.settings.closeAfterSelect) {\n self.close();\n } else if (!self.settings.hideSelected && evt.type && /mouse/.test(evt.type)) {\n self.setActiveOption(self.getOption(value));\n }\n }\n }\n }", "function addDefaultOption(select) {\n let option = document.createElement(\"option\");\n option.value = \"default\";\n option.textContent = \"Please make a selection\";\n select.append(option);\n}", "function addOption(color){\n\t\tlet colorSelect = document.getElementById('color-select');\n\t\tlet option = document.createElement('option');\n\t\toption.value=color;\n\t\toption.textContent=color;\n\t\tcolorSelect.appendChild(option);\n\t}", "function AddMenuOption(win, menu, value, html) {\n var op = AppendNewElement(win, menu, 'OPTION');\n op.value = value;\n op.innerHTML = html;\n\n return op;\n}", "selectOption( e ){\n if( !e.target.classList.contains(this.params.noMoreOptionsClass) &&\n !e.target.classList.contains(this.params.optionsListSelector) ){\n let parent = e.target.closest(this.params.selector);\n let select = parent.querySelector('select');\n let optionsList = parent.querySelector(this.params.optionsListSelector);\n\n if( select.multiple ){\n let optionIndex = this.getValueIndex(e.target);\n let selectedOption = select.options[optionIndex];\n\n if( selectedOption.value === e.target.dataset.value ){\n selectedOption.selected = true;\n\n let badge = this.createBadge(select.options[optionIndex], optionIndex);\n select.nextElementSibling.appendChild(badge);\n this.hideOption( e.target );\n\n let visibleOptions = optionsList.querySelectorAll(this.params.optionSelector+':not(.'+this.params.selectReplacementOptionHideClass+')').length\n if( visibleOptions === 0 ){\n this.close(optionsList.parentNode, this);\n }\n else if( visibleOptions < this.params.visibleOptions ){\n this.calculateHeight(optionsList);\n }\n }\n }\n else{\n select.value = e.target.dataset.value;\n this.close( optionsList.parentNode, this);\n }\n }\n }", "function createOptionDropDown(ddl, text, value) {\n\tvar opt = document.createElement('option');\n\topt.value = value;\n\topt.text = text;\n\tddl.options.add(opt);\n}", "bind_to_select(select) {\n this.parent = select;\n select.option_div.appendChild(this.div);\n }", "function addOption(){\n var color = $('#textbox').val();\n $('#options').append('<option value=\"' + color + '\">' + color + '</option>');\n optionCount++;\n }", "function addItem(cmb_id, cmb_text, option) {\n let opt = document.createElement(\"option\");\n document.getElementById(option).options.add(opt);\n opt.text = cmb_text;\n opt.value = cmb_id;\n}", "function addOption(ObjectID, title){\r\n\tvar x = document.getElementById(ObjectID);\r\n\tvar option = document.createElement(\"option\");\r\n\toption.text = title;\r\n\toption.value = title;\r\n\tx.add(option);\r\n\r\n}", "function addItemInSelect(item) {\n const optionItem = document.createElement('option')\n optionItem.text = item.nome\n optionItem.value = `${item.codigo}|${item.nome}|${item.foto}|${item.regiao}`\n selDedicantes.appendChild(optionItem)\n}", "addOption(e) {\n e.preventDefault();\n\n // 1. Create an option object containing a unique key and the value\n // of the option.\n // Although Date.now() does not guarantee a unique key and generally\n // should not be used for this purpose, the keys will be unique in this case\n // as they will only be created on user input (which is slow enough to guarantee uniqueness).\n let option = {\n id: Date.now(),\n value: this.state.optionInputVal\n };\n\n // 2. Add the new option to the options array and clear the options input.\n this.setState(\n {\n options: [...this.state.options, option], \n optionInputVal: \"\"\n }\n );\n }", "function newOption() {\n var opval = document.getElementById('opval').value.replace(/\\</g, '&lt;').replace(/\\>/g, '&gt;').replace(/\"/g, '&quot;'); // option value\n var opcnt = document.getElementById('opcnt').value; // option content\n\n if(opval.length > 0) {\n // adds it in $optData. Gets the last-index, to set /add id of new category\n var idop = 0;\n for(var ix in optData) {\n if((ix * 1) > idop) idop = ix * 1;\n }\n idop++;\n\n // stores data of new option\n optData[idop] = {'value':opval, 'content':opcnt, 'parent':optID};\n\n // if parent-category exists in $optHierarchy, adds it in array, else, create the parent-category array\n if(optHierarchy[optID]) optHierarchy[optID].push(idop);\n else optHierarchy[optID] = [idop];\n\n // sets the level of <select> which is displayed with the new category ($opt1=1 indicates the selection is current <select>)\n slevel = (opt1 == 1) ? selID.match(/[0-9]+/) * 1 : slevel;\n\n // adds the <select> with <option>s and tag for next sub-<select>\n if(optHierarchy[optID].length > 0) document.getElementById('n_sl'+ slevel).innerHTML = getSelect(optHierarchy[optID]);\n\n // shows message 'data added' for 1 sec., then resets select data\n document.getElementById('optioncnt').innerHTML = ' <div style=\"margin-left:28%;font-weight:800;text-align:center;color:blue;\">Option data Added</div>';\n setTimeout(function() {\n resetData(); // empty <select> and setting data\n document.getElementById('curentitem').innerHTML = optData[optID].value; // display curent selected item\n }, 1110);\n }\n else {\n // focus text field, and message\n document.getElementById('opval').focus();\n alert(lang.erraddnct);\n }\n }", "function createSelectElement(value, text, id) {\n var element = document.createElement(\"option\");\n element.value = value;\n element.textContent = text;\n document.getElementById(id).appendChild(element);\n }", "function append_option(what, val, tex) {\n var last = what.length - 1;\n what.length = what.length + 1;\n what[what.length - 1].value = what[last].value;\n what[what.length - 1].text = what[last].text;\n what[last].value = val;\n what[last].text = tex;\n}", "function addRoleOptionToRoleSelect(roleName){\n let optionHtml = '<option value=\"'+ roleName +'\">'+ roleName + '</option>'\n $(\"#roleSelect\").append(optionHtml);\n}", "function addFieldOption() {\n\t\t/*jshint validthis:true */\n\t\tvar field_id = jQuery( this ).closest( '.frm-single-settings' ).data( 'fid' ),\n\t\t\tnewOption = jQuery( '#frm_field_' + field_id + '_opts .frm_option_template' ).prop('outerHTML'),\n\t\t\topt_type = jQuery( this ).data( 'opttype' ),\n\t\t\toptKey = 0,\n\t\t\tlastKey = 0,\n\t\t\toldKey = '000',\n\t\t\tlastOpt = jQuery( '#frm_field_' + field_id + '_opts li:last' );\n\n\t\tif ( lastOpt.length ) {\n\t\t\toptKey = lastOpt.data( 'optkey');\n\t\t\tlastKey = parseInt( optKey );\n\t\t\tif ( isNaN( lastKey ) ) {\n\t\t\t\tlastKey = jQuery( '#frm_field_' + field_id + '_opts li' ).length;\n\t\t\t\tif ( document.getElementById( 'frm_delete_field_' + field_id + '-' + ( lastKey + 1 ) + '_container' ) !== null ) {\n\t\t\t\t\tlastKey = lastKey + 2;\n\t\t\t\t}\n\t\t\t}\n\t\t\toptKey = lastKey + 1;\n\t\t}\n\n\t\t//Update hidden field\n\t\tif ( opt_type === 'other' ) {\n\t\t\tdocument.getElementById( 'other_input_' + field_id ).value = 1;\n\n\t\t\t//Hide \"Add Other\" option now if this is radio field\n\t\t\tvar ftype = jQuery( this ).data( 'ftype' );\n\t\t\tif ( ftype === 'radio' || ftype === 'select' ) {\n\t\t\t\tjQuery( this ).fadeOut( 'slow' );\n\t\t\t}\n\n\t\t\tvar data = {\n\t\t\t\taction: 'frm_add_field_option', field_id: field_id,\n\t\t\t\topt_key: optKey,\n\t\t\t\topt_type: opt_type, nonce: frmGlobal.nonce\n\t\t\t};\n\t\t\tjQuery.post( ajaxurl, data, function( msg ) {\n\t\t\t\tjQuery( document.getElementById( 'frm_field_' + field_id + '_opts' ) ).append( msg );\n\t\t\t\tresetDisplayedOpts( field_id );\n\t\t\t} );\n\t\t} else {\n\t\t\tnewOption = newOption.replace( new RegExp( 'optkey=\"' + oldKey + '\"', 'g' ), 'optkey=\"' + optKey + '\"' );\n\t\t\tnewOption = newOption.replace( new RegExp( '-' + oldKey + '_', 'g' ), '-' + optKey + '_' );\n\t\t\tnewOption = newOption.replace( new RegExp( '-' + oldKey + '\"', 'g' ), '-' + optKey + '\"' );\n\t\t\tnewOption = newOption.replace( new RegExp( '\\\\[' + oldKey + '\\\\]', 'g' ), '[' + optKey + ']' );\n\t\t\tnewOption = newOption.replace( 'frm_hidden frm_option_template', '' );\n\t\t\tjQuery( document.getElementById( 'frm_field_' + field_id + '_opts' ) ).append( newOption );\n\t\t\tresetDisplayedOpts( field_id );\n\t\t}\n\t}", "function addOption_custom (oListbox, text, value, isDefaultSelected, isSelected, tr_value, tr_disable)\n{\n var oOption = document.createElement(\"option\");\n\n oOption.appendChild(document.createTextNode(text));\n oOption.setAttribute(\"value\", value);\n oOption.setAttribute(\"id\", tr_value);\n oOption.setAttribute(\"class\", tr_value);\n if(tr_disable == \"disabled\"){\n oOption.setAttribute(\"disabled\", tr_disable);\n }\n if (isDefaultSelected) oOption.defaultSelected = true;\n else if (isSelected) oOption.selected = true;\n\n oListbox.appendChild(oOption);\n}", "function addOption(selectbox, text, value, defaultSelected, selected) {\r\n var optn = document.createElement(\"option\");\r\n optn.text = text;\r\n optn.value = value;\r\n if (!value) {\r\n\t\toptn.setAttribute('style','text-decoration: underline;');\r\n }\r\n optn.defaultSelected = defaultSelected;\r\n optn.selected = selected;\r\n selectbox.options.add(optn);\r\n}", "function addOptions(elem, arr){\n if(arr){\n arr.forEach(function(obj){\n elem.append('<option value=\"'+obj.sel+'\">'+obj.label+'</option>'); \n });\n }\n }", "function addOption(node, level, parent) {\n\t\t\tvar nbsp\t= '\\u00a0', // Unicode &nbsp; character\n\t\t\t\tthisEl;\n\t\t\tif (node.tagName === 'category') {\n\t\t\t\tthisEl = new Element('optgroup', {\n\t\t\t\t\tlabel: node.getAttribute('name'),\n\t\t\t\t\tid: node.getAttribute('id')\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthisEl = new Element('option', {\n\t\t\t\t\tid: node.getAttribute('id'),\n\t\t\t\t\tlat: node.getAttribute('lat'),\n\t\t\t\t\tlon: node.getAttribute('lon'),\n\t\t\t\t\tsite: node.getAttribute('name'),\n\n\t\t\t\t\t// Create site 'hierarchical structure' with spaces\n\t\t\t\t\ttext: (new Array(level + 1).join(nbsp + nbsp)) +\n\t\t\t\t\t\tnode.getAttribute('name') +\n\t\t\t\t\t\t\t' (' + node.getAttribute('descrip') + ')',\n\t\t\t\t\tvalue: node.getAttribute('id')\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tif (node.tagName === 'none') thisEl.disabled = true;\n\t\t\t}\n\t\t\tparent.adopt(thisEl);\n\t\t\tif (node.hasChildNodes()) {\n\t\t\t\tfor (var i = 0, j = node.childNodes, k = j.length; i < k; i++) {\n\t\t\t\t\taddOption(j[i], level + 1, (node.tagName === 'category') ?\n\t\t\t\t\t\tthisEl : parent);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "addItem(id, itemText) {\n var platformsSelect = document.getElementById(id);\n var option = document.createElement('option');\n option.text = itemText;\n platformsSelect.add(option);\n }", "function appendOptionsToSelectBox(selBox){\n $(selBox.newSelectBoxID + \" option\").remove();\n $(selBox.newSelectBoxID).append('<option value=\"-9999\">Click to Select '+selBox.displayName+'</option') \n $options = $(selBox.originalFormElementID +\" option\");\n $options.each(function(){\n $(selBox.newSelectBoxID).append('<option value=\"' + $(this).val() + '\">' + $(this).html() + '</option>')\n }); \t\n}", "function wpbooklistCustomFieldsAddDropdownOption() {\n\t\t$( document ).on( 'click', '.wpbooklist-addition-div-customfields', function( event ) {\n\t\t\t\n\t\t\tvar html = '<div class=\"wpbooklist-customfields-create-input-div-dynamic\"><img class=\"wpbooklist-icon-image-question\" data-label=\"customfields-form-dropdown-option\" src=\"' + wpbooklistCustomFieldsPhpVariables.ROOT_IMG_ICONS_URL + 'question-black.svg\"><label class=\"wpbooklist-question-icon-label\" style=\"margin-left: 3px;\">' + wpbooklistCustomFieldsPhpVariables.trans13 + '</label><div id=\"wpbooklist-customfields-create-drop-down-div\"><input class=\"wpbooklist-customfield-input wpbooklist-customfield-input-dropdown-option\" id=\"wpbooklist-customfield-input-fieldname-dropdown-option\" type=\"text\" placeholder=\"' + wpbooklistCustomFieldsPhpVariables.trans14 + '\"/><div class=\"wpbooklist-addition-div-customfields-cancel\"><img class=\"wpbooklist-addition-div-img-cancel\" src=\"' + wpbooklistCustomFieldsPhpVariables.ROOT_IMG_ICONS_URL + 'cancel.svg\"></div></div></div>';\n\n\t\t\t$( '#wpbooklist-customfields-dynamic-html-div' ).append( html );\n\t\t});\n\t}", "function addToSelect(values) {\r\nvar option = domConstruct.create(\"option\");\r\noption.text = \"Zoom to a Township\";\r\ntownshipSelect.add(option);\r\n\r\nvalues.features.forEach(function(value) {\r\n var option = domConstruct.create(\"option\");\r\n var name = value.attributes.twn_ch + value.attributes.tdir;\r\n option.text = name;\r\n townshipSelect.add(option);\r\n \r\n});\r\n}", "function addMaptypeOption( id , aData){\n\t\n\tfor (var key in aData){\n\t\n\t\t$('#MAPTYPE').append($('<option/>', { \n\t value: aData[key]['value'],\n\t text : aData[key]['display_value'], \n\t }));\n\t}\n\t\t\n\treturn 1;\n}", "function AddOption(ddlID, option, addSecondLast) {\n\tvar ddlEl = document.getElementById(ddlID);\n\tvar newOption = document.createElement('option');\n\n\tnewOption.value = option.Value;\n\tnewOption.text = option.Text;\n\n if(!addSecondLast)\n {\n\t try{ddlEl.add(newOption, null);} //Standards Compliant, doesn't work in IE\n\n\t catch(ex){ddlEl.add(newOption);}\n\t}\n\telse\n\t{\n\t var copyOption = document.createElement('option');\n\t copyOption.text = ddlEl.options[ddlEl.length - 1].text;\n\t copyOption.value = ddlEl.options[ddlEl.length - 1].value;\n\t \n\t ddlEl.options[ddlEl.length - 1].text = newOption.text;\n\t ddlEl.options[ddlEl.length - 1].value = newOption.value;\n\t \n\t try{ddlEl.add(copyOption, null);} //Standards Compliant, doesn't work in IE\n\n\t catch(ex){ddlEl.add(copyOption);}\t \n\t \n\t}\n}", "function addToSelect(values) {\nvalues.sort();\nvalues.unshift('None'); // Add 'None' to the array and place it to the beginning of the array\nvalues.forEach(function(value) {\n var option = document.createElement(\"option\");\n option.text = value;\n cpSelect.add(option);\n});\n//return setLotMunicipalOnlyExpression(cpSelect.value);\n}", "set options(value) {}", "function addValues(option, values, defaultValue) {\n var elem = $(\"select[id=\" + option + \"]\");\n $.each(values, function(key, value) {\n elem.append($(\"<option></option>\")\n .attr(\"value\", key)\n .text(value));\n });\n\t// Set default value\n\telem.val(defaultValue)\n}", "function addSelect(lival, arr){\n //Selecting the element using the id value passed as parameter.\n var selectItem = document.getElementById(lival);\n\n //Clearing the dropdown list items if present. \n //To avaoid having wrong cities for state and wrong states for countries etc.\n if (selectItem.options.length > 0){\n selectItem.options.length = 0;\n }\n\n //creating dropdown box values or options dynamically\n for(var i=0;i<arr.length;i++){\n var option = document.createElement(\"option\");\n option.text = arr[i];\n option.value = arr[i];\n selectItem.add(option);\n }\n \n //Defaultly no item is selected in the dropdown box\n selectItem.value = \"\";\n}", "function addOptions(elem, arr){\n arr.forEach(function(obj){\n elem.append('<option value=\"'+obj.sec+'\">'+obj.label+'</option>'); \n });\n }", "addOption(project) {\n console.log(`Adding ${project.name} to project selection...`);\n const option = document.createElement('option');\n option.textContent = project.name;\n option.setAttribute('value', project.name);\n this.el.appendChild(option);\n }", "defineOptionEvent(e) {\n this.defineOption(e.detail);\n }", "function makeOption(value, label) {\n const option = document.createElement('option');\n option.setAttribute('value', value);\n addText(option, label);\n return option;\n }", "function addDropdownItem(dropdownID,label,value,tooltip){\n if(tooltip === undefined || tooltip === null){tooltip = ''};\n\t$('#'+dropdownID).append(`<option title = '${tooltip}' value = \"${value}\">${label}</option>`)\n}", "function appendToListG2code(select, value, content) {\n var opt;\n opt = document.createElement(\"option\");\n opt.value = value;\t\n opt.appendChild(content);\n select.appendChild(opt);\n}", "function selectAddMore() {\n let aSelect = document.querySelector('#aselect');\n let agroup = document.createElement('optgroup');\n agroup.label = 'Wonderful Flowers';\n aSelect.appendChild(agroup);\n flowerNames.forEach(f => aSelect.appendChild(new Option(f)));\n}", "function option(text, value, selected) {\n\tconst $option = $(document.createElement('option'));\n\t$option.text(text);\n\tif (!!value || _.isNumber(value)) $option.prop('value', value);\n\tif (!!selected) $option.prop('selected', true);\n\treturn $option;\n}", "function addItem(obj,strText,strValue,blSel,intPos){\n\t\tvar newOpt,i,ArTemp,selIndex;\n\t\tselIndex = (blSel)?intPos:obj.selectedIndex;\n\t\tnewOpt = new Option(strText,strValue);\n\t\tLen = obj.options.length+1\n\t\tif (intPos > Len) return\n\t\tobj.options.length = Len\n\t\tif (intPos != Len) {\n\t\t\tArTemp = new Array();\n\t\t\tfor(i=intPos;i<obj.options.length-1;i++)\n\t\t\t\tArTemp[i] = Array(obj.options[i].text,obj.options[i].value);\n\t\t\tfor(i=intPos+1;i<Len;i++)\n\t\t\t\tobj.options[i] = new Option(ArTemp[i-1][0],ArTemp[i-1][1]);\n\t\t}\n\t\tobj.options[intPos] = newOpt;\n\t\tif (selIndex > intPos)\n\t\t\tobj.selectedIndex = selIndex+1;\n\t\telse if (selIndex == intPos) \n\t\t\tobj.selectedIndex = intPos;\n\t}", "function setOption( name, value ){\n\t\toptions[name] = value;\n\t}", "addSelected(selectedoption, options) {\n //if selected then remove it\n if (this.ifSelected(selectedoption, options)) {\n this.removeSelected(selectedoption, options);\n return;\n }\n if (this.single == true) {\n options[0] = selectedoption;\n } else {\n options.push(selectedoption);\n }\n }", "function populateDropDown(selElementId, arrOptions, optionLabel){\n\tvar objSelect = document.getElementById(selElementId);\n\tif (valueExists(objSelect)) {\n\t\tfor (var index = 0; index < arrOptions.length; index++){\n\t\t\tvar value = arrOptions[index];\n\t\t\tvar option = document.createElement(\"option\");\n\t\t\toption.value = value;\n\t\t\toption.text = getMessage(optionLabel + value);\n\t\t\tobjSelect.options.add(option);\n\t\t}\n\t} \n}", "function appendOptions(selectBox) {\r\n for (let i = 0; i < selectOptions.length; i++) {\r\n let option = document.createElement('option');\r\n option.value = selectOptions[i];\r\n option.textContent = selectOptions[i];\r\n selectBox.appendChild(option);\r\n }\r\n selectBox.value = response;\r\n }", "addOptionFormValue(state, name) {\n const sortOrder = state.optionForm.data.values.length;\n state.optionForm.data.values.push(createOptionValue({ name, sortOrder }));\n }", "function setDropdownOption (val) {\n return model.inputs.dropDownOption = val;\n}", "function addoption(text)\n{\n\t// create new option in drop download list\n\tvar len=document.getElementById('note_category').length;\n\tgroupid = parseInt(nextid.replace(/\"/g,''));\n\tvar opt = document.createElement('option');\n\topt.setAttribute('value',groupid);\n\topt.setAttribute('id','select'+groupid);\n\topt.innerHTML = text;\n\tdocument.getElementById('note_category').appendChild(opt);\n\tdocument.getElementById('note_category').selectedIndex=len;\n\tvar str = $('ul.noteUL').html();\n\tvar newline=\"<li class='category'><div><span>Category: </span>\"+text+\"</div><ul id='group\"+groupid+\"'></ul></li>\";\n\tvar newstr = newline + str;\n\t// update slidebar window\n\t$('ul.noteUL').html(newstr);\n\tlen = groupStore.length;\n\tgroupStore[len] = new Object();\n\tgroupStore[len]._title = text;\n\tgroupStore[len]._groupid = groupid;\n\t\t\n}", "registerTableOption(key, value){\n\t\tthis.table.optionsList.register(key, value);\n\t}", "registerTableOption(key, value){\n\t\tthis.table.optionsList.register(key, value);\n\t}", "handleSelect(value) {\n\t\tthis.setValue(value, true)\n\t}", "function addFormTypes() {\n\tlet select = document.getElementById('formTypeSelector');\n\tfor (let i = 0; i < formTypeArray.length; i++) {\n\t\tlet option = document.createElement('option');\n\t\toption.text = formTypeArray[i];\n\t\toption.value = i;\n\t\tselect.add(option);\n\t}\n}", "renderSelect(name, label, options) {\n const { data, errors } = this.state;\n\n return (\n <Select\n name={name}\n value={data[name]}\n label={label}\n options={options}\n onChange={this.handleChange}\n error={errors[name]}\n />\n );\n }", "addChoice(name, value) {\n this.choices ?? (this.choices = []);\n Assertions_1.validateMaxChoicesLength(this.choices);\n // Validate name\n ow_1.default(name, `${ApplicationCommandOptionTypeNames[this.type]} choice name`, stringPredicate);\n // Validate the value\n if (this.type === 3 /* String */)\n ow_1.default(value, 'string choice value', stringPredicate);\n else\n ow_1.default(value, `${ApplicationCommandOptionTypeNames[this.type]} choice value`, integerPredicate);\n this.choices.push({ name, value });\n return this;\n }", "function newSelectItemValue(text, value) {\r\n //String compilation\r\n ///Correctly formats HTML to be appended to the input box, returned at the end of the function\r\n var option = \"<option value='\" + value + \"'>\" + text + \"</option>\";\r\n\r\n return option\r\n}", "function addSelects(selectid){\n selectid.data([\"--Select--\"])\n .enter()\n .append(\"option\")\n .attr(\"value\",function(d){ return d;})\n .text(function(d){ return d;})\n }", "function optionElement(label, value) {\n var result = doc.createElement(\"option\");\n\n result.setAttribute(\"value\", value);\n result.appendChild(doc.createTextNode(label));\n\n return result;\n }", "function createOption(text, value, currentValue) {\n const option = document.createElement('option');\n option.selected = value === currentValue;\n option.value = value;\n option.text = text;\n return option;\n}", "_setSelectedOption() {\n if (this.options.length > 1) super._setSelectedOption();\n }", "function PopulateDropDownElement(ddlElement, options)\n{ \n var i;\n \n ddlElement.length = 0; \n arrOptions = options.getElementsByTagName('option'); \n \n for(i=0;i<arrOptions.length;i++)\n { \n var newOption = document.createElement('option');\n \n if(arrOptions[i].childNodes.length > 0)\n newOption.text = arrOptions[i].childNodes[0].nodeValue\n else\n newOption.text = '';\n \n newOption.value = arrOptions[i].getAttribute('value');\n \n if(arrOptions[i].getAttribute('custom') != null)\n newOption.setAttribute('custom', arrOptions[i].getAttribute('custom'));\n \n try{ddlElement.add(newOption, null);} //Standards Compliant, doesn't work in IE \n \n catch(ex){ddlElement.add(newOption);} \n } \n}" ]
[ "0.77989566", "0.73904634", "0.7381969", "0.7187327", "0.7187327", "0.7166405", "0.70861614", "0.7084701", "0.7045026", "0.70237374", "0.69763595", "0.69511616", "0.6941061", "0.69407755", "0.6897757", "0.68942875", "0.68754005", "0.6807149", "0.6749737", "0.6749737", "0.6734297", "0.6619895", "0.65633744", "0.6538924", "0.6504552", "0.6490772", "0.6474295", "0.64722794", "0.64645445", "0.6447337", "0.6447081", "0.6400679", "0.6375938", "0.6363233", "0.63381124", "0.6297375", "0.6283105", "0.6275901", "0.6228122", "0.61946785", "0.61893076", "0.617299", "0.61507726", "0.61002165", "0.6097439", "0.6061815", "0.6060918", "0.60511476", "0.6037549", "0.60260344", "0.5985961", "0.5974533", "0.5953295", "0.59409434", "0.5938367", "0.59346527", "0.59284675", "0.5893793", "0.5884599", "0.58817405", "0.5858205", "0.58575016", "0.58440584", "0.58415705", "0.58005774", "0.57994777", "0.5758887", "0.5751755", "0.57512355", "0.5739559", "0.5728131", "0.5725353", "0.5723237", "0.5717319", "0.5717042", "0.5706743", "0.56895185", "0.5683135", "0.5682867", "0.56726503", "0.5669151", "0.56548715", "0.5647694", "0.5629511", "0.5626199", "0.5607194", "0.55966973", "0.5573787", "0.5571575", "0.5571575", "0.555839", "0.5543671", "0.55404204", "0.5536557", "0.5530085", "0.55283904", "0.5521373", "0.55191064", "0.5517055", "0.5508172" ]
0.75692135
1
Used to remove an option. Should only be called when the value type is 'Select'.
removeOption(index) { if (this.options.length <= 1) { throw new DomainError('options is empty, cannot remove any more options'); } this.options.splice(index, 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeOption( e ){\n e.preventDefault();\n e.stopImmediatePropagation();\n\n let button = e.target.closest(this.params.optionsRemoverSelector);\n let select = e.target.closest(this.params.selector).querySelector('select');\n\n select.options[button.value].selected = false;\n let optionsList = button.closest(this.params.selector).querySelector(this.params.optionsListSelector);\n optionsList.classList.remove(this.params.noMoreOptionsClass);\n let placeholder = button.closest(this.params.placeholderSelector);\n button.closest(this.params.badgeSelector).remove();\n\n if( placeholder.children.length === 0 ){\n placeholder.innerHTML = '';\n }\n\n this.showOption(optionsList.children[button.value]);\n if( optionsList.parentNode.clientHeight != 0 ){\n this.calculateHeight( optionsList );\n }\n }", "function removeSelectOption(selectId, display) {\n var i;\n var select = $(selectId);\n var kids = select.childNodes;\n var numkids = kids.length;\n for (i = 0; i < numkids; i++) {\n if (kids[i].innerHTML == display) {\n select.removeChild(kids[i]);\n break;\n }\n }\n}", "function removeOption(){\n $('#model1').find('option').remove()\n}", "removeSelected(option, options) {\n let index = options.indexOf(option);\n if (index > -1) {\n options = options.splice(index, 1);\n }\n }", "function deleteOption(theSel, theIndex)\n {\n\tvar selLength = theSel.length;\n\tif(selLength>0){theSel.options[theIndex] = null;}\n }", "function removeSelectedOption(){\n var toRemove = select.selectedIndex;\n\n // Remove option from list of objects and update select\n dialogContent.splice(toRemove - 1, 1);\n UpdateSelect();\n\n // If removed was not last, select the new option at toRemove index\n if(toRemove < select.length){\n select.selectedIndex = toRemove;\n } else {\n select.selectedIndex = select.length - 1;\n }\n \n if(select.length <= 1)\n select.innerHTML = \"<option value='' disabled selected>Adicione um Diálogo para Editar</option>\";\n console.log(\"ON REMOVE =>\");\n console.log(dialogContent);\n \n fetchEditor();\n}", "function removeOption(color){\n\t\tdocument.getElementById('color-select').querySelector('[value='+color+']').remove();\n\t}", "function removeSelectedOptionFromOthers() {\n this.disabled = true;\n // Get the selection option\n let selectedOption = document.querySelector(`option[value=${this.value}]`);\n\n let selectTags = document.getElementsByTagName(\"select\");\n\n for (const iterator of selectTags) {\n if (iterator === this) continue; // Skip for the selected one\n // Remove selected option from the others\n if (iterator.hasChildNodes(selectedOption))\n iterator.removeChild(iterator.querySelector(`option[value=${selectedOption.value}`));\n }\n }", "function EZselectOptionRemove(listObject, opt)\n{\n\tif (typeof listObject != 'object') return\n\n\tvar selectedIndex = listObject.selectedIndex;\n\n\tvar len = listObject.options.length\n\tif (opt < 0 || opt >= len) return\n\n\tif (opt < len-1)\n\t{\n\t\tfor(var i=opt;i<len-1;i++)\n\t\t{\n\t\t\tlistObject.options[i].text = listObject.options[i+1].text\n\t\t\tlistObject.options[i].value = listObject.options[i+1].value\n\t\t}\n\t}\n\tlistObject.options[len-1] = null\n\tif (listObject.options.length == len)\n\t\tlistObject.options.length --\n\n\tif (selectedIndex >= listObject.options.length)\n\t{\n\t\tif (listObject.options.length)\n\t\t{\n\t\t\tlistObject.selectedIndex = listObject.options.length-1;\n\t\t\tlistObject.options[listObject.selectedIndex].selected = true;\n\t\t}\n\t}\n\telse if (selectedIndex == opt)\n\t\tlistObject.options[selectedIndex].selected = false;\n\telse if (selectedIndex > opt)\n\t\tlistObject.options[selectedIndex-1].selected = true;\n}", "function optionRemove(option) {\n if (vm.annotType.options.length <= 1) {\n throw new Error('invalid length for options');\n }\n\n var index = vm.annotType.options.indexOf(option);\n if (index > -1) {\n vm.annotType.options.splice(index, 1);\n }\n }", "function removeOptions(el) {\n el.find('option').remove().end();\n }", "function wpbooklistCustomFieldsRemoveDropdownOption() {\n\t\t$( document ).on( 'click', '.wpbooklist-addition-div-customfields-cancel', function( event ) {\n\t\t\t$( this ).parent().parent().remove();\n\t\t});\n\t}", "function optionRemove(index) {\n if (vm.options.length <= 1) {\n throw new Error('options is empty, cannot remove any more options');\n }\n vm.options.splice(index, 1);\n }", "remove (i) {\r\n const O = this.vRange(i);\r\n O.E.find('option').eq(i).remove();\r\n if (!O.mob) O.optDiv.find('ul.options li.opt').eq(i).remove();\r\n O.setText();\r\n }", "removeOption(value, silent) {\n var self = this;\n value = hash_key(value);\n var cache_items = self.renderCache['item'];\n var cache_options = self.renderCache['option'];\n if (cache_items) delete cache_items[value];\n if (cache_options) delete cache_options[value];\n delete self.userOptions[value];\n delete self.options[value];\n self.lastQuery = null;\n self.trigger('option_remove', value);\n self.removeItem(value, silent);\n }", "function removeSelect() {\n $('#artists select:last-child').remove();\n updateSelectAlbumsAdd();\n}", "function removeValue() {\n\tvar elem = document.getElementById('selectedColumns');\n\tif (elem.options.selectedIndex>=0) {\n\t\tfor (var i=0; i<elem.options.length; i++) {\n\t\t\tif (elem.options[i].selected) {\n\t\t\t\telem.removeChild(elem.options[i--]);\n\t\t\t}\n\t\t}\n\t}\n}", "function removeOption(value,form) {\n if(form===1){\n $(\"#contestant option[value='\" + value + \"']\").each(function () {\n $(this).remove();\n });\n }else if(form===2){\n $(\"#contestant_edit option[value='\" + value + \"']\").each(function () {\n var values=$(this).text().split(\" - \");\n $(\"#cont_number_edit\").val(values[0]);\n $(\"#cont_name_edit\").val(values[1]);\n $(this).remove();\n });\n }\n}", "function removeToken(e) {\r\n // Get the value to remove\r\n const value_to_remove = e.target.dataset.option;\r\n const wrapper = e.target.parentNode.parentNode;\r\n const input_search = wrapper.querySelector(\".selected-input\");\r\n const dropdown = wrapper.querySelector(\".dropdown-icon\");\r\n // Get the options in the select to be unselected\r\n const option_to_unselect = wrapper.querySelector(`select option[value=\"${value_to_remove}\"]`);\r\n option_to_unselect.removeAttribute(\"selected\");\r\n // Remove token attribute\r\n e.target.parentNode.remove();\r\n input_search.focus();\r\n dropdown.classList.remove(\"active\");\r\n const event = new Event('click');\r\n dropdown.dispatchEvent(event);\r\n e.stopPropagation();\r\n}", "function removeOptions(selectElement) {\n\tlet L = selectElement.options.length - 1;\n\tfor (let i = L; i >= 0; i--) {\n\t\tselectElement.remove(i);\n\t}\n}", "function remove_selected_book(box){\n //http://stackoverflow.com/questions/1518216/jquery-remove-options-from-select\n //https://api.jquery.com/remove/\n $(box + \" option:selected\").remove();\n}", "removeAll () {\r\n const O = this;\r\n const optionList = O.E.find('option');\r\n\r\n for (let x = (optionList.length - 1); x >= 0; x--) {\r\n if (optionList[x].selected !== true) {\r\n O.remove(x);\r\n }\r\n }\r\n\r\n }", "function clearSelect(selectElement) {\n //selectElement.find('option').remove();\n $(selectElement.find(\"option\")).each(function (index, element) {\n if (element.value != \"0\")\n element.remove()\n });\n // selectElement.append(new Option(\"---\" + selectElement.attr(\"data-text\") + \" Seçiniz ---\", 0))\n}", "function remove_option(what) {\n if (what.selectedIndex == -1) {\n alert (\"You must make a selection first\");\n } else {\n what[what.selectedIndex] = null;\n }\n}", "function removeSelectedKeyPair()\r\n{\r\n jQuery('#edit-business-key-queue option:selected').remove();\r\n}", "function removeOptionSelected(param) {\n var elSel = document.getElementById(param);\n var i;\n for (i = elSel.length - 1; i >= 0; i--) {\n elSel.remove(i);\n }\n}", "_clearPreviousSelectedOption(skip) {\n this.options.forEach((option) => {\n if (option !== skip && option.selected) {\n option.deselect();\n }\n });\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 removeOptions(id){\r\n var select = document.getElementById(id);\r\n var length = select.options.length;\r\n for(var i=0;i<length;i++){\r\n select.remove(0);\r\n }\r\n}", "function del_variant_option(d) {\n\td.parentNode.parentNode.remove();\n}", "removeOption(idx) {\n var currOptions = this.state.options;\n if (idx >= 0 && idx < currOptions.length) {\n currOptions.splice(idx, 1);\n }\n this.setState({\n options: currOptions\n });\n }", "function del_options_selected_gifts(gift_id){\n if(gift_id!='None'){\n modal.find(`option[value=${gift_id}]`).each(function(){\n if(!$(this).prop('selected')){\n $(this).remove()\n }\n \n })\n }\n}", "function unselectSelectedOption(name) {\n $(\"#option-frame\").children(\"div\").each(function(index, value) {\n if (name.replace(/-/g, ' ') == $(value).children(\"div\").children('p').text()) {\n $(value).children(\"span\").children(\"input\").prop(\"checked\", false);\n }\n });\n $(\"#\"+name).remove();\n}", "function removeOptions(selectbox) {\n var i;\n for(i=selectbox.options.length-1;i>=0;i--)\n {\n selectbox.remove(i);\n }\n }", "function removeUser(user) {\n $(\"#usersList option\").each(\n function () {\n if ($(this).val() === user) $(this).remove();\n });\n}", "function cleanProceso() {\n $('#proceso').find('option').remove().end().append('<option value=\"\">------Seleccionar--------</option>');\n}", "function removeOptions(selectbox)\r\n{\r\n var i;\r\n for(i = selectbox.options.length - 1 ; i >= 0 ; i--)\r\n {\r\n selectbox.remove(i);\r\n }\r\n}", "function removeSelectedOptions(from) { \n if (!hasOptions(from)) { return; }\n if (from.type==\"select-one\") {\n from.options[from.selectedIndex] = null;\n }\n else {\n for (var i=(from.options.length-1); i>=0; i--) { \n var o=from.options[i]; \n if (o.selected) { \n from.options[i] = null; \n } \n }\n }\n from.selectedIndex = -1; \n }", "function removeOptions(selectbox) {\n var i;\n for (i = selectbox.options.length - 1; i >= 0; i--) {\n selectbox.remove(i);\n }\n}", "function removeSelectBox() {\n if (selectBox) {\n scene.remove(selectBox);\n selectBox.geometry.dispose();\n selectBox = undefined;\n }\n}", "function removeAllOptions(sel, removeGrp) {\n var len, groups, par;\n if (removeGrp) {\n groups = sel.getElementsByTagName('optgroup');\n len = groups.length;\n for (var i = len; i; i--) {\n sel.removeChild(groups[i - 1]);\n }\n }\n\n len = sel.options.length;\n for (var i = len; i; i--) {\n par = sel.options[i - 1].parentNode;\n par.removeChild(sel.options[i - 1]);\n }\n}", "addOption() {\n if (!this.isValueTypeSelect()) {\n throw new DomainError('value type is not select: ' + this.valueType);\n }\n this.options.push('');\n }", "function deleteonclick(username){\n\tvar option = document.createElement(\"option\");\n\toption.text = \"Removed\";\n\toption.value = \"null\";\n\t$(\"#\"+username).find('select')[0].appendChild(option);\n\t$(\"#\"+username).find('select').val(\"null\").change();\n\t$(\"#\"+username).hide('100');\n}", "function removeSelectOptions(elId) {\n let select = DOM.elid(elId);\n\n // EMG - To allow for repeated updates of the section, all section elements are deleted first\n // See https://stackoverflow.com/questions/3955229/remove-all-child-elements-of-a-dom-node-in-javascript\n while (select.firstChild) {\n select.removeChild(select.firstChild);\n }\n}", "function deleteOption(trgObj,el) {\n\tif (trgObj.options.length!=0) {trgObj.options[el]=null;}\n}", "function deleteSendValue() {\n var index = $('#server_param').prop('selectedIndex');\n\n if (index < 0) return;\n\n $('#server_param').children('option:eq(' + index +')').remove();\n if ($('#server_param').children().length == 0) return;\n\n var option = $('#server_param').children()[0];\n var values = JSON.parse(option.value);\n\n option.text = option.text.replace(/^(AND|と)\\s/, '');\n option.value = JSON.stringify(values);\n}", "function ListDataSource_removeOption(id){\n var newArr=new Array();\n for(var i = 0 ;i<this.options.length;i++)\n {\n if(this.options[i].Id!=id)\n {\n newArr.push(this.options[i])\n }\n }\n this.options=newArr;\n}", "function removeUnselectedFormStatusOptions() {\r\n\t$(':input[name='+getParameterByName('page')+'_complete] option').each(function(){\r\n\t\tif ( $(this).prop('selected') == false ) {\r\n\t\t\t$(this).remove();\r\n\t\t} else {\r\n\t\t\t$(this).css('color','gray');\r\n\t\t}\r\n\t});\r\n}", "hideOption( option ){\n option.classList.add(this.params.selectReplacementOptionHideClass);\n }", "function removeOptionSelected(id) {\n var elSel = $(id);\n\n for (var i = elSel.length - 1; i >= 0; i--) {\n elSel.remove(i);\n }\n}", "function removeTime() {\n let $parent = $(this).parent();\n let $removedOption = $parent.find(\"input[type=time]\").last();\n \n $removedOption.remove();\n\n}", "deselect(selectedMo) {\n const index = this.getIndexOfSelected(this.selected, selectedMo);\n if (index > -1) {\n this.selected.splice(index, 1);\n }\n this.onChange.emit(this.selected);\n }", "function removeAllOptions(from) { \n if (!hasOptions(from)) { return; }\n for (var i=(from.options.length-1); i>=0; i--) { \n from.options[i] = null; \n } \n from.selectedIndex = -1; \n }", "function removeAllOptions(selectbox) {\n var i;\n for (i = selectbox.options.length - 1; i >= 0; i--) {\n selectbox.remove(i);\n }\n}", "function removeOptionByUsingOptionNro(optionNro, callback) {\r\n\r\n this.moveOptionText((optionNro - 1), (_data.optionsText.length - 1));\r\n\r\n _data.optionsText.splice((_data.optionsText.length - 1), 1);\r\n\r\n this.callback(callback, _data);\r\n }", "function fnRemoveFabric(e) {\n\n //remove option item\n e.parentNode.remove();\n\n}", "function maybeClearOptText() {\n\t\t/*jshint validthis:true */\n\t\tif ( this.value === frm_admin_js.new_option ) {\n\t\t\tthis.value = '';\n\t\t}\n\t}", "function removePosition(value){\n //Find the container with the role in\n var p = document.getElementById(\"p\"+value);\n //Removing the parent element also removes children (select etc.)\n p.parentElement.removeChild(p);\n //Re-add the position to the select, now at the end\n var select = document.getElementById(\"position\");\n select.options[select.options.length] = new Option(value, value, false, false);\n}", "function fnRemoveSize(e) {\n\n //remove option item\n e.parentNode.parentNode.remove();\n\n}", "function removeSkill(value){\n //Find the container with the skill in\n var p = document.getElementById(\"p\"+value);\n //Removing the parent element also removes children (select etc.)\n p.parentElement.removeChild(p);\n //Re-add the skill to the select, now at the end\n var select = document.getElementById(\"skill\");\n select.options[select.options.length] = new Option(value, value, false, false);\n}", "_clear() {\n this.selectedItem = null;\n\n if (this.allowCustomValue) {\n this.value = '';\n }\n\n this._detectAndDispatchChange();\n }", "function removecolor()\r\n{\r\nvar x=document.getElementById(\"colorSelect\");\r\nx.remove(x.selectedIndex);\r\n}", "function _clearList() {\n // remove everything except of the null value. If no null value is defined,\n // all options will be removed (bug #14738837)\n if ( \"nullValue\" in pOptions ) {\n $( 'option[value!=\"' + apex.util.escapeCSS( gOptions.nullValue ) + '\"]', gSelectList$ ).remove();\n } else {\n $( 'option', gSelectList$ ).remove();\n }\n\n if( $.mobile ) {\n gSelectList$.selectmenu('refresh', true);\n }\n } // _clearList", "function clearAccountNumbersDD(rowId)\n{\n var optionid = \"\";\n var optionValue = \"Account No.\";\n $('#' + rowId + '').find(\"select[name='accountNumber']\").find('option').remove();\n $('#' + rowId + '').find(\"select[name='accountNumber']\").append($(\"<option value='\" + optionid + \"'>\" + optionValue + \"</option>\"));\n}", "function deactivateSelect(select) {\n\n // When the widget is innactive, there is nothing to change\n if (!select.classList.contains(\"active\")) return;\n\n // Get the list of options for the custom widget\n var optList = select.quertSelector('.optlist');\n\n // Close the list of options...\n optlist.classList.add('hidden');\n\n // ... and deactivate the custom widget\n select.classList.remove('active');\n}", "function removeLanguage(value){\n //Find the container with the language in\n var p = document.getElementById(\"p\"+value);\n //Removing the parent element also removes children (select etc.)\n p.parentElement.removeChild(p);\n //Re-add the language to the select, now at the end\n var select = document.getElementById(\"language\");\n select.options[select.options.length] = new Option(value, value, false, false);\n}", "function removeAll(targetList)\r\n{\r\n\tvar selectCaption = targetList.options[0].text;\r\n\tvar selectValue = targetList.options[0].value;\r\n\r\n\tfor ( i = 0; i <= targetList.length-1; i++)\r\n \t{\r\n targetList.options[i] =null;\r\n\t\ti=i-1;\r\n }\r\n\t//\ttargetList.options[targetList.length] = new Option(\"Select\", \" \", true, true);\r\n\t\ttargetList.options[targetList.length] = new Option(selectCaption , selectValue , true, true);\r\n}", "function cancelOption(){\n document.getElementById(\"newOption\").style.display = \"none\";\n document.getElementById(\"pollSelection\").value = \"\";\n document.getElementById(\"newOptionValue\").value = \"\";\n document.getElementById(\"optionWarning\").innerHTML = \"\";\n }", "removeControl(name, options = {}) {\n if (this.controls[name]) this.controls[name]._registerOnCollectionChange(() => {});\n delete this.controls[name];\n this.updateValueAndValidity({\n emitEvent: options.emitEvent\n });\n\n this._onCollectionChange();\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 }", "handleDeleteOption(optionToRemove) {\n this.setState((prevState) => ({\n options: prevState.options.filter((option) => {\n return optionToRemove !== option;\n })\n }));\n }", "function fnRemoveOption(e) {\n\n //remove option item\n e.parentNode.remove();\n\n //reset option num\n var optionNum = document.getElementsByClassName('option-num');\n for(var i=0;i<optionNum.length;i++){\n optionNum[i].innerHTML = i+1;\n }\n}", "function clearDropdown(field) {\r\n field.options.length = 1;\r\n field.options[0] = new Option('',\r\n '',\r\n true,\r\n true);\r\n\r\n field.options.value = \"\";\r\n}", "handleDeleteOption(optionToRemove) {\n this.setState((prevState) => ({\n options: prevState.options.filter((option) => {\n return optionToRemove !== option;\n })\n \n }))\n }", "function handleRemoveOptionEvent(optionId) {\n\t$.ajax({ \n\t url: \"../userCake/EventSettings.php\", \n\t type: \"POST\",\n\t data: { \"action\": \"REMOVE_OPTION\",\n\t \t\t\"option\": optionId},\n\t success: function(result) {\n\t \tloadOptionsList(result);\n\t }\n\t});\n}", "function ClearEpisodeSelect(){\n let episodeSelect = document.getElementById(\"episodeSelect\");\n let episodeOptions = document.querySelectorAll(\".episodeOption\");\n episodeOptions.forEach(opt =>{\n episodeSelect.removeChild(opt);\n })\n}", "function emptyDropdown(dropDown)\n{\n var i;\n for(i = dropDown.options.length - 1 ; i >= 0 ; i--)\n {\n dropDown.remove(i);\n }\n}", "deselectAll() {\n this._setAllOptionsSelected(false);\n }", "function removeSelect(){\n answerEls.forEach(x=>{\n x.checked=false\n })\n }", "doUnselectItem() {\n if (this.selected) {\n this.selected.set('selected', false);\n this.set('selected',null);\n }\n }", "removeOptionGroup(id) {\n if (this.optgroups.hasOwnProperty(id)) {\n delete this.optgroups[id];\n this.clearCache();\n this.trigger('optgroup_remove', id);\n }\n }", "removeDropdownCollection(collectionId) {\n delete this.dropdown[collectionId];\n }", "function ClearOptions(id) {\n document.getElementById(id).options.length = 0;\n console.log(id);\n}", "remove() {\n if (this.canRemove()) {\n this.scope_.$emit('filterbuilder.remove', this['selected']);\n }\n }", "clear()\n {\n this.set('selected', null);\n }", "function unselect(target, value, state) {\n if (!state) state = $.data(target, 'combobox');\n var opts = state.options;\n var data = state.data;\n var values = $(target).combo('getValues');\n var i, len;\n for (i = 0, len = values.length; i < len; i++) {\n if (values[i] == value) {\n values.splice(i, 1);\n setValues(target, values, false, state);\n break;\n }\n }\n for (i = 0, len = data.length; i < len; i++) {\n if (data[i][opts.valueField] == value) {\n opts.onUnselect.call(target, data[i]);\n return;\n }\n }\n }", "removeOptionFromList(option) {\n if (!option.hasFocus) {\n return;\n }\n const optionIndex = this.getOptionIndex(option);\n // Check whether the option is the last item\n if (optionIndex > 0) {\n this.keyManager.setPreviousItemActive();\n }\n else if (optionIndex === 0 && this.options.length > 1) {\n this.keyManager.setNextItemActive();\n }\n }", "function ui_removeSelectedOptions(id_targetList){\n\tvar _list = ui_getObjById(id_targetList);\n\tfor (var i=_list.options.length-1; i>-1; i--){\n\t\tif (_list.options[i].selected){\n\t\t\t_list.options[i] = null;\n\t\t}\n\t}\n}", "function optionAdd() {\n if (vm.annotType.valueType !== 'Select') {\n throw new Error('value type error: ' + vm.annotType.valueType);\n }\n\n if (!vm.annotType.options) {\n vm.annotType.options = [];\n }\n vm.annotType.options.push('');\n }", "function clearSelectMesPkg() {\n var select = document.getElementById(\"mesPkgId\");\n var length = select.options.length;\n for (i = length - 1; i >= 0; i--) {\n select.options[i] = null;\n }\n}", "clearOptions(){\n let element = p5Instance.select(`#div_${this.id}`);\n if(element){\n element.remove();\n this.command.context.chain.strokeWeight(1);\n }\n }", "function piclistRemove(attributo, posicao) {\n Xrm.Page.getControl(attributo).removeOption(posicao);\n}", "handleDeleteOption(optionToRemove) {\n this.setState(prevState => {\n return {\n options: this.state.options.filter(option => {\n return option !== optionToRemove;\n })\n };\n });\n }", "function substanceRemove() {\n\n var tmp = substancelist.length;//substances.length;\n\n var container = document.getElementById('removesubstanceList');\n\n // handles if the number is changed to a lower number than was previously selected\n while (container.hasChildNodes()) {\n container.removeChild(container.lastChild);\n }\n\n for (var i = 0; i < tmp; i++) {\n var option = document.createElement('option');\n option.innerHTML = substances[i];\n option.value = substances[i];\n //option.innerHTML = substances[i];\n //option.value = substances[i];\n container.appendChild(option);\n }\n}", "function removeALevel(value){\n //Find the container with the A-Level in\n var p = document.getElementById(\"p\"+value);\n //Removing the parent element also removes children (select etc.)\n p.parentElement.removeChild(p);\n //Re-add the A-Level to the select, now at the end;\n var select = document.getElementById(\"aLevel\");\n select.options[select.options.length] = new Option(value, value, false, false);\n}", "_removeOptionFromList(option) {\n const optionIndex = this._getOptionIndex(option);\n if (optionIndex > -1 && this._keyManager.activeItemIndex === optionIndex) {\n // Check whether the option is the last item\n if (optionIndex > 0) {\n this._keyManager.updateActiveItem(optionIndex - 1);\n }\n else if (optionIndex === 0 && this.options.length > 1) {\n this._keyManager.updateActiveItem(Math.min(optionIndex + 1, this.options.length - 1));\n }\n }\n return this._keyManager.activeItem;\n }", "_removeOptionFromList(option) {\n const optionIndex = this._getOptionIndex(option);\n if (optionIndex > -1 && this._keyManager.activeItemIndex === optionIndex) {\n // Check whether the option is the last item\n if (optionIndex > 0) {\n this._keyManager.updateActiveItem(optionIndex - 1);\n }\n else if (optionIndex === 0 && this.options.length > 1) {\n this._keyManager.updateActiveItem(Math.min(optionIndex + 1, this.options.length - 1));\n }\n }\n return this._keyManager.activeItem;\n }", "function removeFromChangedValuesList(obj) {\n var cvs = $(obj.form).find(\"#\" + cName)[0];\n if (!cvs) {\n return;\n }\n\n len = cvs.length;\n for (i = 0; i < len; i++) {\n if (obj.name == cvs.options[i].value) {\n cvs.options[i] = null;\n return;\n }\n }\n }", "function delSelect(){\n\tvar activeObject = c.getActiveObject();\n if (activeObject['_objects']) {\n activeObject['_objects'].map(x => c.remove(x));\n } else if (activeObject) {\n c.remove(activeObject);\n }\n}", "function resetBatchSelectVersionDropdown(){\n\t$('select#batch_select_version').empty();\n\tappendOptionToSelect(\"batch_select_version\", \"\", \"- Please Select -\", true);\n}" ]
[ "0.7317568", "0.7134913", "0.70501876", "0.70277435", "0.69025457", "0.687277", "0.6827373", "0.6810946", "0.67752683", "0.67522734", "0.6732323", "0.66685575", "0.66188484", "0.6569636", "0.6549939", "0.6545505", "0.6526701", "0.65238976", "0.6502487", "0.64449394", "0.6427708", "0.63611394", "0.6314643", "0.63105804", "0.6292855", "0.62925684", "0.62189204", "0.62117386", "0.61814684", "0.6162208", "0.6159361", "0.6146145", "0.6120266", "0.61195874", "0.6115246", "0.61079246", "0.6089323", "0.6085778", "0.6068452", "0.6068079", "0.60540897", "0.6035323", "0.6008555", "0.5995064", "0.5960681", "0.596042", "0.5958729", "0.59398955", "0.5933435", "0.5928341", "0.59235823", "0.5888076", "0.5883183", "0.5855797", "0.5853803", "0.58491826", "0.5838366", "0.5825709", "0.58192825", "0.57926875", "0.57926387", "0.577427", "0.57295173", "0.5717944", "0.57151926", "0.5700253", "0.5690334", "0.5683238", "0.56791663", "0.56675005", "0.5654646", "0.56507355", "0.5648949", "0.5648681", "0.56435406", "0.5636519", "0.5627738", "0.5615329", "0.56103784", "0.55973107", "0.5594522", "0.5593276", "0.5581501", "0.55711395", "0.5570771", "0.55704975", "0.55689585", "0.5565234", "0.5561243", "0.55599874", "0.5556798", "0.5546516", "0.5538137", "0.5530741", "0.5530108", "0.55206376", "0.55206376", "0.55105746", "0.5508744", "0.5507077" ]
0.63611084
22
Returns true if each of the options in the options array are valid options for this annotation type. Options is an array of objects with keys: value and checked.
validOptions(options) { return options.reduce((memo, option) => memo && this.options.includes(option), true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isOptions(){\n for (var key in options)\n if (options.hasOwnProperty(key)) return true;\n return false;\n }", "function validateOptions(options) {\n const validateInt = (name) => {\n const val = toInt(options[name]);\n if (val === undefined) {\n throw TypeError(`option \"${name}\" needs to be a number`);\n }\n options[name] = val;\n };\n const ensureBoolean = (name) => {\n options[name] = !!options[name];\n };\n validateInt(\"leftColumnWidth\");\n validateInt(\"rowHeight\");\n validateInt(\"selectedPage\");\n ensureBoolean(\"showAlignmentHelpers\");\n ensureBoolean(\"showIndicatorIcons\");\n ensureBoolean(\"showMimeTypeIcon\");\n return options;\n}", "function validateForm() {\n let validCandidates = 0;\n optionNames.forEach((e) => {\n if (e !== null || e !== undefined || e !== \"\") validCandidates += 1;\n });\n return validCandidates >= 2;\n }", "function IsArray(validationOptions) {\n return Object(_common_ValidateBy__WEBPACK_IMPORTED_MODULE_0__[\"ValidateBy\"])({\n name: IS_ARRAY,\n validator: {\n validate: (value, args) => isArray(value),\n defaultMessage: Object(_common_ValidateBy__WEBPACK_IMPORTED_MODULE_0__[\"buildMessage\"])(eachPrefix => eachPrefix + '$property must be an array', validationOptions),\n },\n }, validationOptions);\n}", "isValid() {\n const { start, end } = this.selection;\n // Empty ranges are valid.\n if (start == null && end == null) {\n return true;\n }\n // Complete ranges are only valid if both dates are valid and the start is before the end.\n if (start != null && end != null) {\n return this._isValidDateInstance(start) && this._isValidDateInstance(end) &&\n this._adapter.compareDate(start, end) <= 0;\n }\n // Partial ranges are valid if the start/end is valid.\n return (start == null || this._isValidDateInstance(start)) &&\n (end == null || this._isValidDateInstance(end));\n }", "isValid() {\n const { start, end } = this.selection;\n // Empty ranges are valid.\n if (start == null && end == null) {\n return true;\n }\n // Complete ranges are only valid if both dates are valid and the start is before the end.\n if (start != null && end != null) {\n return this._isValidDateInstance(start) && this._isValidDateInstance(end) &&\n this._adapter.compareDate(start, end) <= 0;\n }\n // Partial ranges are valid if the start/end is valid.\n return (start == null || this._isValidDateInstance(start)) &&\n (end == null || this._isValidDateInstance(end));\n }", "function checkValuesArray(values)\n\t\t{\n\t\t\treturn values.every(function(value)\t\t//loop until true\n\t\t\t{\n\t\t\t\tvar type = EZ.is(value, RegExp) ? 'regex' : typeof(value);\n\t\t\t\tswitch(typeof type)\n\t\t\t\t{\n\t\t\t\t\tcase 'regex': \treturn value.test(arg.valueOf());\n\n\t\t\t\t\tcase 'boolean':\n\t\t\t\t\tcase 'number':\treturn arg.valueOf() == value;\t//allow js coercion\n\n\t\t\t\t\tcase 'string':\treturn arg.toString() === value;\n\t\t\t\t\tcase 'function':return EZ.is(arg,value)\n\t\t\t\t\tcase 'object': \treturn arg === value;\n\t\t\t\t}\n\t\t\t});\n\t\t}", "function checkValuesArray(values)\n\t\t{\n\t\t\treturn values.every(function(value)\t\t//loop until true\n\t\t\t{\n\t\t\t\tvar type = EZ.is(value, RegExp) ? 'regex' : typeof(value);\n\t\t\t\tswitch(typeof type)\n\t\t\t\t{\n\t\t\t\t\tcase 'regex': \treturn value.test(arg.valueOf());\n\n\t\t\t\t\tcase 'boolean':\n\t\t\t\t\tcase 'number':\treturn arg.valueOf() == value;\t//allow js coercion\n\n\t\t\t\t\tcase 'string':\treturn arg.toString() === value;\n\t\t\t\t\tcase 'function':return EZ.is(arg,value)\n\t\t\t\t\tcase 'object': \treturn arg === value;\n\t\t\t\t}\n\t\t\t});\n\t\t}", "function confirmRequiredOptions(options) {\n for(var i = 0; i < _requiredOptions.length; i++) {\n if(!Boolean(options[_requiredOptions[i]]))\n throw \"Required option: \" + _requiredOptions[i] + \" is missing\";\n }\n }", "_markOptionsForCheck() {\n if (this.options) {\n this.options.forEach(option => option._markForCheck());\n }\n }", "_markOptionsForCheck() {\n if (this.options) {\n this.options.forEach(option => option._markForCheck());\n }\n }", "function hasOptions(obj) {\n if (obj!=null && obj.options!=null) { return true; }\n return false;\n }", "function checkArgs(o) {\n let count = 0;\n for (let key in o) {\n if (o[key] == true) count++;\n }\n if (count == 0) {\n confirm(\"Please select at least one parameter\");\n setOptions(o);\n } else return;\n}", "function isValid() {\r\n return inputsToArray.every(element => {\r\n return element.className == \"valid\";\r\n });\r\n}", "function check_shape_opts( options_to_check )\n\t{\n\t\t//primary check\n\t\tif ( typeof options_to_check != \"object\" ) var options_to_check = {};\n\t\tvar checked_opts;\n\t\tdefaults = defaults;\n\t\tif ( typeof options_to_check.shape_type == \"undefined\" )\n\t\t{\n\t\t\toptions_to_check.shape_type\t = {};\n\t\t}\n\t\tchecked_opts = {};\n\t\t//check shape type\n\t\tchecked_opts.shape_type = ( options_to_check.shape_type.length == 0 ) ? defaults.shape_type : options_to_check.shape_type;\n\t\t//xx,yy,r,cx,cy\n\t\tchecked_opts.xx = ( options_to_check.hasOwnProperty(\"xx\") ) ? options_to_check.xx : defaults.xx;\n\t\tchecked_opts.yy = ( options_to_check.hasOwnProperty(\"yy\") ) ? options_to_check.yy : defaults.yy;\n\t\tchecked_opts.cx = ( options_to_check.hasOwnProperty(\"cx\") ) ? options_to_check.cx : defaults.cx;\n\t\tchecked_opts.cy = ( options_to_check.hasOwnProperty(\"cy\") ) ? options_to_check.cy : defaults.cy;\n\t\tchecked_opts.r = ( options_to_check.hasOwnProperty(\"r\") ) ? options_to_check.r : defaults.r;\n\n\t\t//text\n\t\tchecked_opts.out_text = ( options_to_check.hasOwnProperty(\"out_text\") ) ? options_to_check.out_text : defaults.out_text;\n\t\tchecked_opts.text_color = ( options_to_check.hasOwnProperty(\"text_color\") ) ? options_to_check.text_color : defaults.text_color;\n\n\t\t//fill_color, stroke_color, line_weight\n\t\tchecked_opts.fill_color = ( options_to_check.hasOwnProperty(\"fill_color\") ) ? options_to_check.fill_color : defaults.fill_color;\n\t\tchecked_opts.stroke_color = ( options_to_check.hasOwnProperty(\"stroke_color\") ) ? options_to_check.stroke_color : defaults.stroke_color;\n\t\tchecked_opts.line_weight = ( options_to_check.hasOwnProperty(\"line_weight\") ) ? options_to_check.line_weight : defaults.line_weight;\n\n\t\t//font_family, font_size, font_weight\n\t\tchecked_opts.font_family = ( options_to_check.hasOwnProperty(\"font_family\") ) ? options_to_check.font_family : defaults.font_family;\n\t\tchecked_opts.font_size = ( options_to_check.hasOwnProperty(\"font_size\") ) ? options_to_check.font_size : defaults.font_size;\n\t\tchecked_opts.font_weight = ( options_to_check.hasOwnProperty(\"font_weight\") ) ? options_to_check.font_weight : defaults.font_weight;\n\t\t//line_start.xx, line_start.yy, line_points[]\n\t\tif ( options_to_check.hasOwnProperty(\"line_start\") )\n\t\t{\n\t\t\tchecked_opts.line_start = {};\n\t\t\tchecked_opts.line_start.xx = ( options_to_check.line_start.hasOwnProperty(\"xx\") ) ? options_to_check.line_start.xx : defaults.line_start.xx;\n\t\t\tchecked_opts.line_start.yy = ( options_to_check.line_start.hasOwnProperty(\"yy\") ) ? options_to_check.line_start.yy : defaults.line_start.yy;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tchecked_opts.line_start = defaults.line_start;\n\t\t}\n\t\tchecked_opts.line_points = ( options_to_check.hasOwnProperty(\"line_points\") ) ? options_to_check.line_points : defaults.line_points;\n\n\t\treturn checked_opts;\n\t}", "allTrue() {\n const rules = this.state.formRules;\n for (let rule of rules) {\n if (!rule.valid) return false;\n }\n return true;\n }", "isValid() {\n\t\tconst { errors } = this.state;\n\t\treturn Object.keys(errors).every((key) => errors[key] == null);\n\t}", "check(options) {\n\t\tthis.constructor.check(this, options);\n\t}", "function checkValues(arg)\n\t{\n\t\t//----- check certian values\n\t\tif (arg == null || arg === null || arg === '' || arg === false) return false;\n\t\tif (/(number|string)/.test(typeof arg) && isNaN(arg)) return false;\n\t\tif (arg === true) return true;\n\n\t\t//----- check true / false lists\n\t\tif (checkValuesArray(rules.values[0])) return true;\n\t\tif (!checkValuesArray(rules.values[1])) return false;\n\t\treturn undefined;\n\t\t/**\n\t\t *\treturns true if value found otherwise false\n\t\t */\n\t\tfunction checkValuesArray(values)\n\t\t{\n\t\t\treturn values.every(function(value)\t\t//loop until true\n\t\t\t{\n\t\t\t\tvar type = EZ.is(value, RegExp) ? 'regex' : typeof(value);\n\t\t\t\tswitch(typeof type)\n\t\t\t\t{\n\t\t\t\t\tcase 'regex': \treturn value.test(arg.valueOf());\n\n\t\t\t\t\tcase 'boolean':\n\t\t\t\t\tcase 'number':\treturn arg.valueOf() == value;\t//allow js coercion\n\n\t\t\t\t\tcase 'string':\treturn arg.toString() === value;\n\t\t\t\t\tcase 'function':return EZ.is(arg,value)\n\t\t\t\t\tcase 'object': \treturn arg === value;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "function checkValues(arg)\n\t{\n\t\t//----- check certian values\n\t\tif (arg == null || arg === null || arg === '' || arg === false) return false;\n\t\tif (/(number|string)/.test(typeof arg) && isNaN(arg)) return false;\n\t\tif (arg === true) return true;\n\n\t\t//----- check true / false lists\n\t\tif (checkValuesArray(rules.values[0])) return true;\n\t\tif (!checkValuesArray(rules.values[1])) return false;\n\t\treturn undefined;\n\t\t/**\n\t\t *\treturns true if value found otherwise false\n\t\t */\n\t\tfunction checkValuesArray(values)\n\t\t{\n\t\t\treturn values.every(function(value)\t\t//loop until true\n\t\t\t{\n\t\t\t\tvar type = EZ.is(value, RegExp) ? 'regex' : typeof(value);\n\t\t\t\tswitch(typeof type)\n\t\t\t\t{\n\t\t\t\t\tcase 'regex': \treturn value.test(arg.valueOf());\n\n\t\t\t\t\tcase 'boolean':\n\t\t\t\t\tcase 'number':\treturn arg.valueOf() == value;\t//allow js coercion\n\n\t\t\t\t\tcase 'string':\treturn arg.toString() === value;\n\t\t\t\t\tcase 'function':return EZ.is(arg,value)\n\t\t\t\t\tcase 'object': \treturn arg === value;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "function validateChecks(selector) {\n var values = selector.map(function() {return $(this).prop('checked')}).get();\n return values.indexOf(false) === -1;\n}", "isOneOf(...posVals){\n\t\treturn this.addTest((obj) => {\n const isObjOneOfPosVals = posVals.some(\n posVal => Object.is(posVal, obj)\n );\n return new Validity(isObjectOfValidType,\n `${this.name} can only be one of ${posVals.join(', ')}`);\n }, 'isOneOf');\n\t}", "function hasSubOptions(options) {\n\treturn hasAny(options, ['onevent', 'oncancel']);\n}", "checkValidity () {\n\n // Validate generic fields\n let fields = this.getFieldsForType('generic');\n for (let i in fields) {\n const valid = this.input[fields[i]].checkValidity();\n if (!valid) return false;\n };\n\n // Adjust source validation based on selected format\n const type = this.input.type.value;\n if (type === 'image' || type === 'video') {\n const format = this.input[`${type}_format`].value;\n this.input[`${type}_source`].pattern = `^.+${format}$`;\n }\n\n // Validate type specific fields\n fields = this.getFieldsForType(type);\n for (let i in fields) {\n const valid = this.input[`${type}_${fields[i]}`].checkValidity();\n if (!valid) return false;\n };\n\n return true;\n }", "function checkOptions(fsType, opts, cb) {\n var optsInfo = fsType.Options;\n var fsName = fsType.Name;\n var pendingValidators = 0;\n var callbackCalled = false;\n var loopEnded = false;\n function validatorCallback(e) {\n if (!callbackCalled) {\n if (e) {\n callbackCalled = true;\n cb(e);\n }\n pendingValidators--;\n if (pendingValidators === 0 && loopEnded) {\n cb();\n }\n }\n }\n // Check for required options.\n var loop = function ( optName ) {\n if (optsInfo.hasOwnProperty(optName)) {\n var opt = optsInfo[optName];\n var providedValue = opts[optName];\n if (providedValue === undefined || providedValue === null) {\n if (!opt.optional) {\n // Required option, not provided.\n // Any incorrect options provided? Which ones are close to the provided one?\n // (edit distance 5 === close)\n var incorrectOptions = Object.keys(opts).filter(function (o) { return !(o in optsInfo); }).map(function (a) {\n return { str: a, distance: levenshtein(optName, a) };\n }).filter(function (o) { return o.distance < 5; }).sort(function (a, b) { return a.distance - b.distance; });\n // Validators may be synchronous.\n if (callbackCalled) {\n return {};\n }\n callbackCalled = true;\n return { v: cb(new ApiError(ErrorCode.EINVAL, (\"[\" + fsName + \"] Required option '\" + optName + \"' not provided.\" + (incorrectOptions.length > 0 ? (\" You provided unrecognized option '\" + (incorrectOptions[0].str) + \"'; perhaps you meant to type '\" + optName + \"'.\") : '') + \"\\nOption description: \" + (opt.description)))) };\n }\n // Else: Optional option, not provided. That is OK.\n }\n else {\n // Option provided! Check type.\n var typeMatches = false;\n if (Array.isArray(opt.type)) {\n typeMatches = opt.type.indexOf(typeof (providedValue)) !== -1;\n }\n else {\n typeMatches = typeof (providedValue) === opt.type;\n }\n if (!typeMatches) {\n // Validators may be synchronous.\n if (callbackCalled) {\n return {};\n }\n callbackCalled = true;\n return { v: cb(new ApiError(ErrorCode.EINVAL, (\"[\" + fsName + \"] Value provided for option \" + optName + \" is not the proper type. Expected \" + (Array.isArray(opt.type) ? (\"one of {\" + (opt.type.join(\", \")) + \"}\") : opt.type) + \", but received \" + (typeof (providedValue)) + \"\\nOption description: \" + (opt.description)))) };\n }\n else if (opt.validator) {\n pendingValidators++;\n opt.validator(providedValue, validatorCallback);\n }\n // Otherwise: All good!\n }\n }\n };\n\n for (var optName in optsInfo) {\n var returned = loop( optName );\n\n if ( returned ) return returned.v;\n }\n loopEnded = true;\n if (pendingValidators === 0 && !callbackCalled) {\n cb();\n }\n}", "function hasSelectedOptions(obj)\n{\n for (var i=0;i<obj.options.length;i++)\n if (obj.options[i].selected == true)\n return true;\n\n return false;\n}", "function issetOptionsValue(value){\n\tif (value != null && value.constructor.toString().indexOf(\"Array\") != -1 && \n\t\t\tvalue.length > 0){\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "function arrayIsValid(_array_) {\n return _array_ && Array.isArray(_array_) && _array_.length > 0;\n}", "isIn(value, options) {\n options = typeof options === \"string\" ? options.split(\",\") : options;\n\n return options.includes(value);\n }", "function msIsValid(msArray) {\n var msCheck = true;\n $.each(msArray, function (i, ms) {\n if (!ms.isValid()) msCheck = false;\n });\n return msCheck;\n}", "function validateAllOptionsToAllowSubmit() {\r\n // if suitable array and criteria conditions align ...\r\n\r\n /*\r\n selectionIndexes: {\r\n ethnicities: [],\r\n ageBands: [],\r\n genders: [],\r\n nationalities: [],\r\n religions: [],\r\n health: [],\r\n qualifications: [],\r\n },\r\n */\r\n\r\n if (\r\n aleph.selectionIndexes.ethnicities &&\r\n aleph.selectionIndexes.ethnicities.length > 0 &&\r\n aleph.selectionIndexes.ageBands &&\r\n aleph.selectionIndexes.ageBands.length > 0 &&\r\n aleph.selectionIndexes.genders &&\r\n aleph.selectionIndexes.genders.length > 0 &&\r\n aleph.selectionIndexes.nationalities &&\r\n aleph.selectionIndexes.nationalities.length > 0 &&\r\n aleph.selectionIndexes.religions &&\r\n aleph.selectionIndexes.religions.length > 0 &&\r\n aleph.selectionIndexes.health &&\r\n aleph.selectionIndexes.health.length > 0 &&\r\n aleph.selectionIndexes.qualifications &&\r\n aleph.selectionIndexes.qualifications.length > 0\r\n ) {\r\n // enable reset and submit buttons\r\n document.getElementById(\"line-submit\").disabled = false;\r\n document.getElementById(\"line-clear\").disabled = false;\r\n } else {\r\n // disable reset and submit buttons\r\n document.getElementById(\"line-submit\").disabled = true;\r\n document.getElementById(\"line-clear\").disabled = true;\r\n }\r\n\r\n return;\r\n}", "function isOptions(dom) {\n return (typeof dom === 'object' &&\n dom != null &&\n !('length' in dom) &&\n !('type' in dom));\n}", "get hasSelectableOptions() {\n return this.options.length > 0 && !this.options.every(o => o.disabled);\n }", "function isOptions(dom, options) {\n return (!options &&\n typeof dom === 'object' &&\n dom != null &&\n !('length' in dom) &&\n !('type' in dom));\n}", "async function valid (option) {\n return !!(await getBetOption(option))\n }", "choiceSupportsValueX(choice) {\n // TODO: This assumes choice options don't have their own cardinality. This isn't true in SHR today, but\n // we're restricting it in SHR in the future. No use going through the trouble of supporting it if it's going away.\n for (const opt of choice.aggregateOptions) {\n if (opt instanceof mdls.TBD) {\n continue;\n } else if (opt instanceof mdls.IdentifiableValue) {\n if (!opt.effectiveIdentifier.isPrimitive) {\n const map = this._specs.maps.findByTargetAndIdentifier(this._target, opt.effectiveIdentifier);\n if (map === undefined) {\n return false;\n }\n }\n } else {\n //13053 , 'Unsupported value type: ${valueType1}. ' , 'Unknown' , 'errorNumber'\n logger.error({valueType1 : opt.constructor.name }, '13053' );\n return false;\n }\n }\n\n return true;\n }", "function isOptions(dom) {\n return _typeof(dom) === 'object' && dom != null && !('length' in dom) && !('type' in dom);\n}", "function IsIn(values, validationOptions) {\n return Object(_common_ValidateBy__WEBPACK_IMPORTED_MODULE_0__[\"ValidateBy\"])({\n name: IS_IN,\n constraints: [values],\n validator: {\n validate: (value, args) => isIn(value, args.constraints[0]),\n defaultMessage: Object(_common_ValidateBy__WEBPACK_IMPORTED_MODULE_0__[\"buildMessage\"])(eachPrefix => eachPrefix + '$property must be one of the following values: $constraint1', validationOptions),\n },\n }, validationOptions);\n}", "isAllRequiredHasValue(nameArr) {\n for (var i in nameArr) {\n var name = nameArr[i];\n if (this.isFormValueEmpty(name)) {\n this.alertError(\"Sila isi semua ruang yang diperlukan\", () => {\n this.focusToFormField(name);\n });\n return false;\n }\n }\n return true;\n }", "any() {\n return Object.keys(this.errors).length > 0;\n }", "any() {\n return Object.keys(this.errors).length > 0;\n }", "any() {\n return Object.keys(this.errors).length > 0;\n }", "function validateRadios(selector) {\n var values = selector.map(function() {return $(this).prop('checked')}).get();\n return values.indexOf(true) >= 0;\n}", "function isDocumentoFormValid(){\t \n\t var v1 = tituloDocumentoField.isValid();\n\t var v2 = tiposDocumentoCombo.isValid();\n\t var v3 = tipoWFRadios.isValid();\n\t var v4 = tiposDocumentoCombo.isValid();\n\t var v5 = revisoresSBS.isValid();\n\t var v6 = aprobadoresCombo.isValid();\n\t return(v1&&v2&&v3&&v4&&v5&&v6);\n }", "function checkCnf(cnf){\n return requireOpts.every(function(opt){\n if(cnf.hasOwnProperty(opt[0]) && util.type(cnf[opt[0]]) === opt[1]){\n return true;\n }else{\n grunt.log.errorlns('参数 ' + opt[0] + ' 不合法!');\n return false;\n }\n })\n }", "hasViolations() {\n return this.fileAnalysis.some((fileAnalyis) => {\n const builders = Object.values(fileAnalyis);\n return builders.some((builder) => {\n return builder.hasViolations();\n });\n });\n }", "function isOptionEnabled (options, optionCategory, optionName) {\n let isEnabled = false\n if (options.hasOwnProperty(optionCategory)) {\n let ff = options[optionCategory]\n if (ff.hasOwnProperty(optionName) && ff[optionName] === true) isEnabled = true\n }\n return isEnabled\n}", "any() {\n return Object.keys(this.errors).length > 0\n }", "validateCondition(conditionVal, instanceVal) {\n const keys = Object.keys(conditionVal);\n for (let i = 0, len = keys.length; i < len; i++) {\n const key = keys[i];\n const objVal = instanceVal[key];\n const selVal = conditionVal[key];\n\n if (typeof(selVal) === 'object' && selVal !== null) {\n if (selVal.length === 2) {\n if (!this.compareValArray(selVal[0], objVal, selVal[1])) return false;\n } else {\n return false;\n }\n } else if (objVal !== selVal) {\n return false;\n }\n }\n return true;\n }", "verifyBoolean(value) {\n let validatonValues = [true, false, 1, 0, 'true', 'false', '1', '0'];\n return validatonValues.indexOf(value) !== -1;\n }", "function validate(array) {\n const sortedArr = array.sort((a, b) => a - b);\n return sortedArr.every((num, index) => num === validationArray[index]);\n }", "function validateOptions(options) {\n // We have to check if the lightboxPosition is set to fixed || relative. If not, force it.\n if ((options.lightboxPosition !== 'relative') && (options.lightboxPosition !== 'fixed')) {\n console.log('lightboxPosition can only be \\'fixed\\' or \\'relative\\'. Falling back to Fixed.')\n options.lightboxPosition = 'fixed';\n }\n if ((options.curtainId) && options.curtainId.substring(0, 1) !== '#') {\n console.log('Curtain ID must begin with #');\n return 'error';\n }\n if ((options.closeButtonId) && options.closeButtonId.substring(0, 1) !== '#') {\n console.log('Button ID must begin with #');\n return 'error';\n }\n }", "function validateOptions(options, defaultProps) {\n Object.keys(options).forEach(function (option) {\n if (!hasOwnProperty(defaultProps, option)) {\n throw new Error(\"[tippy]: `\".concat(option, \"` is not a valid option\"));\n }\n });\n }", "function check_already_exist(value, array_options){\n\tfor(var i = 0; i < array_options.length; i++){\n\t\tif(array_options[i] == value){\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false;\n}", "_isOptionSet(optionCategory, optionName) {\n let isSet = false;\n if (Object.prototype.hasOwnProperty.call(this._options, optionCategory)) {\n const category = this._options[optionCategory];\n if (\n Object.prototype.hasOwnProperty.call(category, optionName) &&\n typeof category[optionName] !== 'undefined'\n ) {\n isSet = true;\n }\n // Specific case for no folder selected for quick bookmarked\n if (category[optionName] === FOLDER_NONE) isSet = false;\n }\n return isSet;\n }", "function hasFieldsWithValidAutocompleteAttributes() {\n const problemFields = [];\n for (const field of inputsSelectsTextareas) {\n // fields missing autocomplete, autocomplete=\"\", and autocomplete=\"off\" are handled elsewhere.\n if (!field.autocomplete || field.autocomplete === 'off') {\n continue;\n }\n // autocomplete attributes may include multiple tokens, e.g. autocomplete=\"shipping postal-code\".\n // section-* is also allowed.\n // The test here is only for valid tokens: token order isn't checked.\n for (const token of field.autocomplete.split(' ')) {\n if (!AUTOCOMPLETE_TOKENS.includes(token) && !token.startsWith('section-')) {\n problemFields.push(stringifyElement(field));\n }\n }\n }\n if (problemFields.length) {\n const item = {\n // description: 'Autocomplete values must be valid.',\n details: 'Found form field(s) with invalid <code>autocomplete</code> values:<br>• ' +\n `${problemFields.join('<br>• ')}`,\n learnMore: 'Learn more: <a href=\"https://developer.mozilla.org/docs/Web/HTML/Attributes/autocomplete\">The HTML autocomplete attribute</a>',\n title: 'Autocomplete values must be valid.',\n type: 'error',\n };\n items.push(item);\n }\n}", "function IsBoolean(validationOptions) {\n return Object(_common_ValidateBy__WEBPACK_IMPORTED_MODULE_0__[\"ValidateBy\"])({\n name: IS_BOOLEAN,\n validator: {\n validate: (value, args) => isBoolean(value),\n defaultMessage: Object(_common_ValidateBy__WEBPACK_IMPORTED_MODULE_0__[\"buildMessage\"])(eachPrefix => eachPrefix + '$property must be a boolean value', validationOptions),\n },\n }, validationOptions);\n}", "function isActiveMatchOptions(options) {\n return !!options.paths;\n}", "isValid() {\n if (!PayslipHelper.isNumberValid(this.id)) {\n return false;\n }\n if (!PayslipHelper.isStringValid(this.firstName)) {\n return false;\n }\n if (!PayslipHelper.isStringValid(this.lastName)) {\n return false;\n }\n if (!PayslipHelper.isNumberValid(this.annualSalary)) {\n return false;\n }\n if (!PayslipHelper.isSuperRateValid(this.superRate)) {\n return false;\n }\n if (!PayslipHelper.isStringValid(this.paymentStartDate)) {\n return false;\n }\n\n return true;\n }", "function checkSelectPropTypes(props) {\n checkControlledValueProps('select', props);\n for(var i = 0; i < valuePropNames.length; i++){\n var propName = valuePropNames[i];\n if (props[propName] == null) continue;\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) error(\"The `%s` prop supplied to <select> must be an array if `multiple` is true.%s\", propName, getDeclarationErrorAddendum());\n else if (!props.multiple && isArray) error(\"The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s\", propName, getDeclarationErrorAddendum());\n }\n }", "hasValue() {\n if (this.isMultiple) {\n return this._valueItems.length !== 0;\n }\n else {\n return this._valueItems.length !== 0 && !this._isNullOrWhiteSpace(this._valueItems[0]);\n }\n }", "function isArray(checkObj) {\n\n return Object.prototype.toString.call(checkObj) === \"[object Array]\";\n\n }", "function dlgParamsAreValid(options) {\n\n // define global constants\n eval(globalConstants);\n\n // Validate all the scales are valid numbers\n var arrColorMatrix = options[\"colorMatrix\"];\n\n for(var row=0; row < 3; row++)\n for(var col=0; col < 3; col++)\n if (!isValidNumber(arrColorMatrix[row][col])) {\n log(arrColorMatrix[row][col]);\n return showInputError(\"Not valid numeric scale\", \"At least one of the scale values in the\\ncolor matrix is not a valid numeric value.\");\n }\n\n // Validate minimum and maximum values\n if (!isValidNumber(options[\"outChannelAdu\"][\"min\"]))\n return showInputError(\"Illegal Min output ADU\", \"Minimum output ADU is not a valid\\nnumeric value\");\n\n if (!isValidNumber(options[\"outChannelAdu\"][\"max\"]))\n return showInputError(\"Illegal Max output ADU\", \"Maximum output ADU is not a valid\\nnumeric value\");\n\n if (options[\"outChannelAdu\"][\"min\"] >= options[\"outChannelAdu\"][\"max\"])\n return showInputError(\"Illegal Min/Max values\", \"Minimum output ADU must be below\\nthe maximum output ADU\");\n\n // Validate gamma value\n if (options[\"gamma\"] <= 0)\n return showInputError(\"Illegal gamma value\", \"Gamma must have a positive value\");\n\n return VAL_NO_ERROR;\n}", "isValid() {\n let valid = true;\n Object.keys(this.form).forEach((key) => {\n if (this.form[key] === null)\n valid = false;\n });\n return valid;\n }", "function ifArgumentsCanBeUsedTogether(argumentNameArray) {\n for (var ii = 0; ii < argumentNameArray.length; ii++) {\n if (argumentNameArray.includes(parser.options[ii].cantBeUsedWith)) {\n errorStatement += `Error : The argument \"--${parser.options[ii].name}\" can't be used with` +\n ` the argument \"--${parser.options[ii].cantBeUsedWith}\"\\n`\n return false;\n }\n }\n return true;\n}", "function checkImdTypesForUINNumber() {\n var agentIds = ['20', '21', '22', '23', '24', '71', '60', '61', '62', '63', '64', '72', '14', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46'];\n var res = isInArray($(\"#ddlImdtype option:selected\").val(), agentIds);\n if (res) {\n return true;\n }\n else {\n return false;\n }\n}", "function checkSelectPropTypes(props) {\n {\n checkControlledValueProps('select', props);\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());\n } else if (!props.multiple && isArray) {\n error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());\n }\n }\n }\n }", "function FacilitiesValidation() {\n var bool = true;\n var Lo_Obj = [\"ddlFacType\", \"txtFacLimit\", \"txtFacOutstand\", \"txtFacBanker\", \"txtFacCollateral\", \"txtFacROI\", \"txtFacTenure\"];\n var Ls_Msg = [\"Facilites Type\", \"Limit\", \"Outstand\", \"Banker\", \"Collateral\", \"ROI\", \"Tenure\"];\n\n if (!CheckMandatory(Lo_Obj, Ls_Msg)) {\n return false;\n }\n return bool;\n}", "function isSatisfiable(comparators, options) {\n var result = true;\n var remainingComparators = comparators.slice();\n var testComparator = remainingComparators.pop();\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every(function (otherComparator) {\n return testComparator.intersects(otherComparator, options);\n });\n testComparator = remainingComparators.pop();\n }\n\n return result;\n } // Mostly just for testing and legacy API reasons", "validateFieldOptions() {\n this.options.fields.forEach((f) => {\n let name = f;\n if (typeof f === 'object') {\n name = f.name;\n }\n\n if (this.availableFields.indexOf(name) === -1) {\n throw new Error(`Field ${name} not available. Make sure the fields array item has\\\n a string or a object with a name attribute containing one of the available fields.`);\n }\n });\n }", "function isValid(validationResult) {\n\treturn Object.keys(validationResult).every(d => validationResult[d].valid)\n}", "function validateOptions(options) {\n if (typeof options !== 'object') {\n throw new Error('Invalid: options is not an object');\n }\n\n const { data, file, output, outFile, sourceMap } = options;\n\n if (!file && !data) {\n throw new Error(\n 'No input specified: either the \"data\" or \"file\" option is required.'\n );\n }\n\n if (sourceMap && !output && !outFile) {\n throw new Error(\n 'No output specified: either the \"output\" or \"outFile\" option is required with \"sourceMap\".'\n );\n }\n\n return options;\n}", "function checkSelectPropTypes(props) {\n {\n checkControlledValueProps('select', props);\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n\n if (props[propName] == null) {\n continue;\n }\n\n var isArray = Array.isArray(props[propName]);\n\n if (props.multiple && !isArray) {\n error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());\n } else if (!props.multiple && isArray) {\n error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());\n }\n }\n }\n }", "function checkSelectPropTypes(props) {\n {\n checkControlledValueProps('select', props);\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n\n if (props[propName] == null) {\n continue;\n }\n\n var isArray = Array.isArray(props[propName]);\n\n if (props.multiple && !isArray) {\n error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());\n } else if (!props.multiple && isArray) {\n error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());\n }\n }\n }\n }", "function checkSelectPropTypes(props) {\n {\n checkControlledValueProps('select', props);\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n\n if (props[propName] == null) {\n continue;\n }\n\n var isArray = Array.isArray(props[propName]);\n\n if (props.multiple && !isArray) {\n error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());\n } else if (!props.multiple && isArray) {\n error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());\n }\n }\n }\n }", "function checkSelectPropTypes(props) {\n {\n checkControlledValueProps('select', props);\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n\n if (props[propName] == null) {\n continue;\n }\n\n var isArray = Array.isArray(props[propName]);\n\n if (props.multiple && !isArray) {\n error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());\n } else if (!props.multiple && isArray) {\n error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());\n }\n }\n }\n }", "function validate(inputOptions) {\n var i, optionName, optionValue,\n filteredOptions = {};\n for (i = 0; i < FormatOptions.length; i += 1) {\n optionName = FormatOptions[i];\n optionValue = inputOptions[optionName];\n if (optionValue === undefined) {\n // Only default if negativeBefore isn't set.\n if (optionName === 'negative' && !filteredOptions.negativeBefore) {\n filteredOptions[optionName] = '-';\n // Don't set a default for mark when 'thousand' is set.\n } else if (optionName === 'mark' && filteredOptions.thousand !==\n '.') {\n filteredOptions[optionName] = '.';\n } else {\n filteredOptions[optionName] = false;\n }\n // Floating points in JS are stable up to 7 decimals.\n } else if (optionName === 'decimals') {\n if (optionValue >= 0 && optionValue < 8) {\n filteredOptions[optionName] = optionValue;\n } else {\n throw new Error(optionName);\n }\n // These options, when provided, must be functions.\n } else if (optionName === 'encoder' || optionName === 'decoder' ||\n optionName === 'edit' || optionName === 'undo') {\n if (typeof optionValue === 'function') {\n filteredOptions[optionName] = optionValue;\n } else {\n throw new Error(optionName);\n }\n // Other options are strings.\n } else {\n if (typeof optionValue === 'string') {\n filteredOptions[optionName] = optionValue;\n } else {\n throw new Error(optionName);\n }\n }\n }\n // Some values can't be extracted from a\n // string if certain combinations are present.\n throwEqualError(filteredOptions, 'mark', 'thousand');\n throwEqualError(filteredOptions, 'prefix', 'negative');\n throwEqualError(filteredOptions, 'prefix', 'negativeBefore');\n return filteredOptions;\n }", "function ArrayContains(values, validationOptions) {\n return Object(_common_ValidateBy__WEBPACK_IMPORTED_MODULE_0__[\"ValidateBy\"])({\n name: ARRAY_CONTAINS,\n constraints: [values],\n validator: {\n validate: (value, args) => arrayContains(value, args.constraints[0]),\n defaultMessage: Object(_common_ValidateBy__WEBPACK_IMPORTED_MODULE_0__[\"buildMessage\"])(eachPrefix => eachPrefix + '$property must contain $constraint1 values', validationOptions),\n },\n }, validationOptions);\n}", "function checkOpts() {\n for (var i = 0; i < $scope.opts.length; i++) {\n if ($scope.opts[i].toLowerCase() == $scope.ua) {\n $element.show();\n return false;\n }\n }\n }", "validate (args, context, options): boolean {\n const {promise} = options\n const start = this._type\n ? this._type.validate(args, context, options)\n : promise.resolve(true)\n\n return start\n .then(pass => {\n if (!pass || !this._hasV) {\n return pass\n }\n\n return options.promiseExtra\n .series.call(context.context, this._validate, function (_, factory) {\n const {input} = context\n return promise.resolve(factory.call(this, input, ...args))\n .then(pass => {\n if (pass === false) {\n throw context.errorByCode(\n 'VALIDATION_FAILS', input, context.context.key)\n }\n\n return true\n })\n })\n .catch(error => promise.reject(context.makeError(error)))\n })\n }", "function AssociateValidation() {\n var bool = true;\n var Lo_Obj = [\"ddlAssociateType\", \"txtAssociateName\", \"txtAssociateLimit\", \"txtAssociateOutstand\", \"txtAssociateBanker\", \"txtAssociateCollateral\",\n \"txtAssociateROI\", \"txtAssociateTenure\"];\n var Ls_Msg = [\"Facilites Type\", \"Associate Name\", \"Limit\", \"Outstand\", \"Banker\", \"Collateral\", \"ROI\", \"Tenure\"];\n\n if (!CheckMandatory(Lo_Obj, Ls_Msg)) {\n return false;\n }\n return bool;\n}", "formValidate() {\n\t\tconst allValid = [\n\t\t\t...this.template.querySelectorAll('lightning-input, lightning-combobox')\n\t\t].reduce((validSoFar, inputCmp) => {\n\t\t\tinputCmp.reportValidity();\n\t\t\treturn validSoFar && inputCmp.checkValidity();\n\t\t}, true);\n\t\treturn allValid;\n }", "function isNotEmptyObject(value, options) {\n if (!Object(_typechecker_IsObject__WEBPACK_IMPORTED_MODULE_1__[\"isObject\"])(value)) {\n return false;\n }\n if ((options === null || options === void 0 ? void 0 : options.nullable) === true) {\n return !Object.values(value).every(propertyValue => propertyValue === null || propertyValue === undefined);\n }\n for (const key in value) {\n if (value.hasOwnProperty(key)) {\n return true;\n }\n }\n return false;\n}", "function hasOption_(options, option) {\r\n return options && options.indexOf(option) >= 0;\r\n}", "function checkOptions(opts1, opts2) {\n for (var prop in opts1) {\n if (opts1.hasOwnProperty(prop)) {\n if (opts1[prop] !== opts2[prop]) {\n return true;\n }\n }\n }\n return false;\n }", "function validationFunction(){\n for (var key in isValid) {\n if (!isValid[key]) {\n return false;\n }\n }\n return true;\n }", "function validationFunction(){\n for (var key in isValid) {\n if (!isValid[key]) {\n return false;\n }\n }\n return true;\n }", "function checkOptions(form)\n{\t\n\tvar msgErr = document.getElementById(\"msgErr\");\n\t//return false;\n\tfor(var i = 0; i < form.elements.length; i++){\n\t\tif(form.elements[i].type!=\"checkbox\") continue;\n\t\tvar checkb = form.elements[i];\n\t\tvar label = document.getElementById(\"label\"+checkb.value);\n\t\tvar type = document.getElementById(\"type\"+checkb.value);\n\t\tif(checkb.checked && (!label.value || type.options[type.selectedIndex].value==\"choix\"))\n\t\t{\n\t\t\tmsgErr.innerHTML = \"Pour chaque option cochée, veuillez renseigner le libel&eacute; et le type!\";\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}", "function isSatisfiable (comparators, options) {\n var result = true\n var remainingComparators = comparators.slice()\n var testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every(function (otherComparator) {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}", "function isSatisfiable (comparators, options) {\n var result = true\n var remainingComparators = comparators.slice()\n var testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every(function (otherComparator) {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}", "function isSatisfiable (comparators, options) {\n var result = true\n var remainingComparators = comparators.slice()\n var testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every(function (otherComparator) {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}", "function isSatisfiable (comparators, options) {\n var result = true\n var remainingComparators = comparators.slice()\n var testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every(function (otherComparator) {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}", "function isSatisfiable (comparators, options) {\n var result = true\n var remainingComparators = comparators.slice()\n var testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every(function (otherComparator) {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}", "function isSatisfiable (comparators, options) {\n var result = true\n var remainingComparators = comparators.slice()\n var testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every(function (otherComparator) {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}", "function isSatisfiable (comparators, options) {\n var result = true\n var remainingComparators = comparators.slice()\n var testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every(function (otherComparator) {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}", "function isSatisfiable (comparators, options) {\n var result = true\n var remainingComparators = comparators.slice()\n var testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every(function (otherComparator) {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}", "function isSatisfiable (comparators, options) {\n var result = true\n var remainingComparators = comparators.slice()\n var testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every(function (otherComparator) {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}", "function isSatisfiable (comparators, options) {\n var result = true\n var remainingComparators = comparators.slice()\n var testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every(function (otherComparator) {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}", "function isSatisfiable (comparators, options) {\n var result = true\n var remainingComparators = comparators.slice()\n var testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every(function (otherComparator) {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}", "function isSatisfiable (comparators, options) {\n var result = true\n var remainingComparators = comparators.slice()\n var testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every(function (otherComparator) {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}" ]
[ "0.60108817", "0.56587464", "0.5567893", "0.5441195", "0.53729427", "0.53729427", "0.5292512", "0.5292512", "0.52333707", "0.5221375", "0.5221375", "0.5221056", "0.5196151", "0.5188089", "0.5187421", "0.5185178", "0.5128911", "0.5128026", "0.5093299", "0.5093299", "0.5055166", "0.5041108", "0.5014419", "0.49982142", "0.4997362", "0.4985335", "0.49846777", "0.4963411", "0.4948874", "0.49390766", "0.49299535", "0.49198136", "0.49113557", "0.49061292", "0.4899583", "0.48938987", "0.4887228", "0.48859954", "0.48756608", "0.48743296", "0.48743296", "0.48743296", "0.48433208", "0.48369667", "0.4835479", "0.48349595", "0.4820932", "0.4812895", "0.4809845", "0.48072192", "0.4799375", "0.47803947", "0.47712", "0.47639757", "0.4763879", "0.47635612", "0.4761574", "0.4741049", "0.47380838", "0.47339466", "0.4729148", "0.47273836", "0.47262105", "0.47261554", "0.47216427", "0.47137865", "0.47129565", "0.47127438", "0.471264", "0.4709632", "0.47082996", "0.47074437", "0.47057444", "0.47057444", "0.47057444", "0.47057444", "0.46918863", "0.46864903", "0.4677977", "0.46769142", "0.46739382", "0.46635383", "0.4662343", "0.4661116", "0.46572068", "0.46476412", "0.46476412", "0.46446076", "0.46347347", "0.46347347", "0.46347347", "0.46347347", "0.46347347", "0.46347347", "0.46347347", "0.46347347", "0.46347347", "0.46347347", "0.46347347", "0.46347347" ]
0.65866643
0
Gets the first (latest) token from a cookie: THIS__ONE>>NOT__THIS__ONE>>AND__NOT__THIS__ONE
function getFirstTokenFromCookie(cookie){ var result = ""; var firstSeparatorIndex = cookie.indexOf(traffic_source_COOKIE_TOKEN_SEPARATOR); result = firstSeparatorIndex !== -1 ? cookie.substring(0, firstSeparatorIndex) : cookie; //if there is a separator, provide the newest value no the cookie return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getToken() {\n var token = document.cookie.replace(/(?:(?:^|.*;\\s*)token\\s*\\=\\s*([^;]*).*$)|^.*$/, \"$1\");\n return token;\n}", "function getToken() {\n if (!document.cookie) {\n return null;\n }\n const cookies = document.cookie.split(';')\n .map((item) => { return item.trim();});\n\n for (const cookie of cookies) {\n const [name, value] = cookie.split('=');\n if (name === SESSION_COOKIE_NAME) {\n return value;\n }\n }\n return null;\n }", "function getCookie(cookie_name) {\n var cookie_array = document.cookie.split('; ');\n var id_token = null;\n for (var i=0; i < cookie_array.length; i++) {\n var cookie = cookie_array[i];\n if (cookie.indexOf(cookie_name) == 0) {\n id_token = cookie.substring(cookie_name.length, cookie.length);\n }\n }\n return id_token;\n}", "function fetch_user_token()\n{\n if(document.cookie.indexOf(\"_bn_ut\")>=0)\n return getCookie(\"_bn_ut\");\n else\n {\n var err = {\"responseText\":'INVALID_TOKEN',\"status\":403};\n error_response(err);\n }\n}", "function getUserToken(){\n\t\treturn $cookies.get('user.token');\n\t}", "getToken() {\n return Cookies.get(\"cTok\");\n }", "getToken() {\n return this.cookies.get('token', {\n signed: true,\n encrypt: true\n });\n }", "function getCookie(token) {\n var name = token + \"=\";\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 return c.substring(name.length, c.length);\n }\n }\n return \"\";\n }", "async getToken() {\n const token = await this.cookies.get('token') || '';\n return token ? `Bearer ${token}` : '';\n }", "function getJWT(tokenKey, cookieKey, storage) {\n\t return Promise.resolve(storage.getItem(tokenKey)).then(function (jwt) {\n\t var cookieToken = getCookie(cookieKey);\n\t\n\t if (cookieToken) {\n\t return cookieToken;\n\t }\n\t\n\t return jwt;\n\t });\n\t}", "function getJWT(tokenKey, cookieKey, storage) {\n\t return Promise.resolve(storage.getItem(tokenKey)).then(function (jwt) {\n\t var cookieToken = getCookie(cookieKey);\n\n\t if (cookieToken) {\n\t return cookieToken;\n\t }\n\n\t return jwt;\n\t });\n\t}", "function getToken() {\n if (window.ofoGlobals && window.ofoGlobals.get) {\n try {\n var tempValues = JSON.parse(window.ofoGlobals.get());\n keys_default()(tempValues).forEach(function (key) {\n window[key] = tempValues[key];\n });\n } catch (e) {}\n }\n\n if (tokenFormat.test(window.ofoToken)) {\n if (window.localStorage) {\n window.localStorage.setItem('ofo-tokened', window.ofoToken);\n }\n js_cookie_default.a.set('ofo-tokened', window.ofoToken);\n }\n}", "function getCookie() {\n\n // Check if the user is logged in\n if($.cookie('logged_in') != null){\n\n var token = $.cookie('logged_in')\n } \n else { \n // @todo - do we need this ?\n // Creates a user automatically if no user is logged in\n var token = \"guest\"\n }\n\n return token\n}", "function getJWT(tokenKey, cookieKey, storage) {\n return Promise.resolve(storage.getItem(tokenKey)).then(function (jwt) {\n var cookieToken = getCookie(cookieKey);\n\n if (cookieToken) {\n return cookieToken;\n }\n\n return jwt;\n });\n}", "function getToken() {\n\t\treturn store.getItem(key);\n\t}", "function getToken() {\n if(window.localStorage.getItem('token') != null){\n return window.localStorage.getItem('token')\n } \n return ''\n}", "getCachedToken() {\n if (this.cachedToken &&\n Date.now() + this.tokenRefreshBufferMs >= this.cachedToken.expiresOnTimestamp) {\n this.cachedToken = undefined;\n }\n return this.cachedToken;\n }", "getCachedToken() {\n if (this.cachedToken &&\n Date.now() + this.tokenRefreshBufferMs >= this.cachedToken.expiresOnTimestamp) {\n this.cachedToken = undefined;\n }\n return this.cachedToken;\n }", "function getToken() {\n return token || null;\n }", "function getToken() {\n let token = localStorage.getItem('token'); \n if (token) {\n // Check if expired, remove if it is\n const payload = JSON.parse(atob(token.split('.')[1])); // Gets the payload (claims), a JSON string, and converts it into a JavaScript object\n // JWT's exp is expressed in seconds, not milliseconds, so convert\n if (payload.exp < Date.now() / 1000) {\n localStorage.removeItem('token');\n token = null;\n }\n }\n return token;\n}", "function mostRecentCookie(){\r\n var date=0\r\n\tpCOOKIES = new Array();\r\n\tpCOOKIES = document.cookie.split('; ');\r\n\tfor(bb = 0; bb < pCOOKIES.length; bb++)\r\n\t{\r\n\t if(pCOOKIES[bb].indexOf(\"Mobile\")==-1&&pCOOKIES[bb].indexOf(\"_SVGPlanets_\")!=-1)\r\n {\r\n \t\tNmeVal = new Array();\r\n \t\tNmeVal = pCOOKIES[bb].split('=');\r\n \t\tif(NmeVal[0])\r\n \t\t{\r\n var utcms=parseInt(NmeVal[0].split(\"@\")[1],10)\r\n if(utcms>date)\r\n \t\t\t\tdate=utcms\r\n \t\t}\r\n }\r\n\t}\r\n return date //---PrevCookieDate---\r\n}", "getToken () {\n var token = localStorage.getItem('token')\n var expiration = localStorage.getItem('expiration')\n\n if ( !token || !expiration)\n return null\n\n if (Date.now() > parseInt(expiration)) {\n this.destroyToken()\n return null\n }\n else\n return token\n }", "function getToken() {\n let token = localStorage.getItem('readable.token');\n if (!token) {\n token = Math.random().toString(36).substr(-10);\n localStorage.setItem('readable.token', token);\n }\n return token;\n}", "function nextToken() {\n return Date.now() + Math.random()\n }", "static getToken() {\n return localStorage.getItem('token');\n }", "static getToken() {\n return localStorage.getItem('token');\n }", "get cookie() {\n return (this.tokenGenerated) ? this.config.cookie : new Error(\"Cookie not Generated... Please use getUserToken()\");\n }", "getUser() {\n const token = localStorage.getItem('Authorization');\n let user = null;\n\n // If a token exists then decode it\n if (token) {\n const base64Url = token.split('.')[1];\n const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');\n const secondsSinceEpoch = new Date() / 1000;\n const parsedToken = JSON.parse(window.atob(base64));\n\n // If current date is after expiration date then destroy it\n if (secondsSinceEpoch > parsedToken.exp) {\n this.destroyToken();\n } else {\n user = parsedToken;\n }\n }\n\n return user;\n }", "function fetchToken() {\n $.getJSON(buildTokenUrl(), {command: 'request'}, response => {\n token = response.token;\n console.log(`session token fetched: ${token}`);\n });\n}", "function getToken(){\n try\n {\n return LocalStorage.get(Constants.TOKEN);\n \n }\n catch(err)\n {\n return {};\n }\n }", "function getToken() {\n return token;\n }", "function getToken() {\n return localStorage.getItem(_constants__WEBPACK_IMPORTED_MODULE_1__.TOKEN);\n}", "getToken() {\n return JSON.parse(localStorage.getItem(TOKEN_KEY));\n }", "function ParseCookie(cookie,key){\n var token = undefined;\n cookie.split('; ').forEach((str) => {\n var kvpair = str.split('=');\n if(kvpair[0] === key){\n token = kvpair[1]\n }\n });\n return token;\n}", "function findToken(cookieStash){\n var output={};\n if (!cookieStash)\n return false; \n // THIS IS VERY HACKY AND SHOULD BE REFACTORED WHEN TESTS ARE IN PLACE\n var cookies=cookieStash.split('path=/');\n for(var c=0; c < cookies.length ; c++){\n var cl =cookies[c].split(\";\");\n for(var e=0; e < cl.length; e++){ \n var p=cl[e].indexOf(\"=\");\n if(p!=-1){\n var name=cl[e].substr(0,p).trim();\n var value=cl[e].substr(p+1).trim(); \n if (name=='txtUserName'){\n output.txtUserName=value;\n }\n if (name=='sessionToken'){\n output.sessionToken=value;\n }\n }\n }\n } \n return output;\n}", "static getCredentials () {\n let cookie = Cookies.get('auth_token');\n if (cookie) {\n return Cookies.getJSON('auth_token');\n }\n return {};\n }", "getToken() {\n\t\tif (this.jwtToken == undefined || this.jwtToken == null) {\n\t\t\tthis.loadTokenFromStorage();\n\t\t}\n\t\tthis.refreshTokenIfNeccessary();\n\t\treturn !this.isTokenExpired(this.jwtToken) ? this.jwtToken : null;\n\t}", "function get() {\n return sessionStorage.getItem(TOKEN_KEY);\n}", "getToken() {\n return localStorage.getItem(\"token\") || null\n }", "function getToken(){\n return localStorage.getItem(\"token\");\n}", "async function getCookie(name) {\n var cookieValue = null;\n if (document.cookie && document.cookie != '') {\n var cookies = document.cookie.split(';');\n for (var i = 0; i < cookies.length; i++) {\n var cookie = jQuery.trim(cookies[i]);\n if (cookie.substring(0, name.length + 1) == (name + '=')) {\n cookieValue = decodeURIComponent(cookie.substring(name.length + 1));\n break;\n }\n }\n }\n //RETORNANDO EL TOKEN\n return cookieValue;\n }//end function getCookie", "function getTokenedRequest (cb) {\n request({\n url: getUrl('frcsTkn'),\n headers: {\n 'X-CSRF-Token': 'Fetch'\n },\n json: true\n }, function (err, res, body) {\n if (err) return cb(err)\n var cookie = res.headers &&\n res.headers['set-cookie'] &&\n res.headers['set-cookie'][0].split(';')[0]\n var tokenedRequest = request.defaults({\n headers: {\n 'X-CSRF-Token': body.data.token,\n 'Cookie': cookie\n },\n json: true\n })\n cb(null, tokenedRequest)\n })\n}", "function getToken(){\n var token = localStorage.getItem('token', token);\n if (token != ''){\n document.getElementById(\"token\").value = token;\n }\n return token;\n}", "static getUserToken(){\n let token = JSON.parse(localStorage.getItem('USER')).token;\n return token;\n }", "static getUserToken(){\n let token = JSON.parse(localStorage.getItem('USER')).token;\n return token;\n }", "GetTokenLogin(){\n let Token = localStorage.getItem(this._DbKeyLogin) // Recuperer le token de la DB du browser\n return Token\n }", "function getToken() {\n return sessionStorage.getItem('auth');\n }", "getToken() {\n return this._localStorageService.get(tokenKey);\n }", "function mostRecentMobileCookie(){\r\n var date=0\r\n\tpCOOKIES = new Array();\r\n\tpCOOKIES = document.cookie.split('; ');\r\n\tfor(bb = 0; bb < pCOOKIES.length; bb++)\r\n\t{\r\n\t if(pCOOKIES[bb].indexOf(\"Mobile\")!=-1)\r\n {\r\n \t\tNmeVal = new Array();\r\n \t\tNmeVal = pCOOKIES[bb].split('=');\r\n \t\tif(NmeVal[0])\r\n \t\t{\r\n var utcms=parseInt(NmeVal[0].split(\"@\")[1],10)\r\n if(utcms>date)\r\n \t\t\t\tdate=utcms\r\n \t\t}\r\n }\r\n\t}\r\n return date //---PrevCookieDate---\r\n}", "function get_jwt_token(ctx)\n{\n\t// Parses \"Authorization: Bearer ${token}\"\n\tif (ctx.header.authorization)\n\t{\n\t\tconst match = ctx.header.authorization.match(/^Bearer (.+)$/i)\n\n\t\tif (match)\n\t\t{\n\t\t\treturn match[1]\n\t\t}\n\t}\n\n\t// (doesn't read cookies anymore to protect users from CSRF attacks)\n\t// // Tries the \"authentication\" cookie\n\t// if (ctx.cookies.get('authentication'))\n\t// {\n\t// \treturn ctx.cookies.get('authentication')\n\t// }\n}", "function getCookie(name) {\n \n var cookieValue = null;\n if (document.cookie && document.cookie != '') {\n var cookies = document.cookie.split(';');\n for (var i = 0; i < cookies.length; i++) {\n var cookie = jQuery.trim(cookies[i]);\n // Does this cookie string begin with the name we want?\n if (cookie.substring(0, name.length + 1) == (name + '=')) {\n cookieValue = decodeURIComponent(cookie.substring(name.length + 1));\n break;\n }\n }\n }\n //RETORNANDO EL TOKEN\n return cookieValue;\n\n }//end function getCookie", "function getJWTPayload(cookie) {\n if (cookie) {\n var JWT = cookie.split('.');\n return JWT.length === 3 ? JWT[1] : JWT[0];\n }\n\n return null;\n }", "function createCookieToken(token) {\n setCookie(\"token\", token);\n}", "function getHearders(key){\n\tvar token = window.localStorage.getItem(\"token\");\n\treturn (token != undefined && token != null ) ? token : \"\";\n}", "getLastSignin() {\n return atob(Cookies.get(\"cLsi\"));\n }", "function jwtTokenGetter() {\n return localStorage.getItem('id_token');\n}", "function getToken() {\n\n return Math.random().toString(36).substr( 2, 10 );\n}", "function decodeToken(req) {\n if (req.headers['auth_token']) {\n return Shared.decode(req.headers['auth_token']);\n } else {\n return Shared.decode(req.signedCookies['auth_token'])\n }\n}", "getToken() {\n return localStorage.getItem(\"id_token\");\n }", "function getUserID() {\n\n var token = getCookie()\n if (token == \"guest\") {\n return 'guest'\n }\n var decodedJWT = jwt_decode(token);\n return decodedJWT.sub\n}", "function next_Token()\n{\n\n if (this.tokensReturned >= this.tokens.length)\n {\n return null;\n } // end if\n else\n {\n return this.tokens [this.tokensReturned ++];\n } // end else\n\n\n}", "function generateToken() {\n return null; // TODO: add a token generation\n}", "function controlltoken(azione) {\n var tokenpath = urlCommunity + '/api/login.json?appName=COR&runaUserID=' + idrunanumber;\n var tokencookie = [];\n var tknsavecookie = $.cookie('corriereToken');\n var stopCheckLogin = $.cookie('stopCheckLogin');\n\n //setto un ora da questo momento\n var now = new Date();\n var expires = new Date();\n var time = expires.getTime();\n time += 3600 * 1000;\n expires.setTime(time);\n\n\n\n //funzione di chiamata al token\n /*function calltoken() {\n\t\t$.ajax({\n\t\t\tdataType: \"json\",\n\t\t\turl: tokenpath,\n\t\t\ttimeout: 20000,\n\t\t\tsuccess: function(data) {\n\t\t\t\tIPUser = data.ipAddress;\n\t\t\t\ttokendata = data.token;\n\t\t\t\ttokencookie[1] = tokendata;\n\t\t\t\ttokencookie[2] = now;\n\t\t\t\t$.cookie('corriereToken', tokencookie.join(';'), {\n\t\t\t\t\texpires: now.toGMTString(),\n\t\t\t\t\tpath: '/',\n\t\t\t\t\tdomain: '.corriere.it'\n\t\t\t\t});\n\t\t\t\tif(azione == \"checkUserDefault\") {\n\t\t\t\t\tgetMultibarLogged();\n\t\t\t\t}\t\n\t\t\t},\n\t\t\terror: function(x, t) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(textStatust == \"timeout\" && azione == \"checkUserDefault\") {\n\t\t\t\t\tgetMultibarNotLogged();\n\t\t\t\t} else { \n\t\t\t\t\tif(azione == \"checkUserDefault\"){\n\t\t\t\t\t\tgetMultibarNotLogged(\"modifica\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}*/\n\n function calltoken() {\n\n $.getJSON(tokenpath, function(data) {\n IPUser = data.ipAddress;\n tokendata = data.token;\n tokencookie[1] = tokendata;\n tokencookie[2] = now;\n $.cookie('corriereToken', tokencookie.join(';'), {\n expires: now.toGMTString(),\n path: '/',\n domain: '.corriere.it'\n });\n if (azione == \"checkUserDefault\") {\n getMultibarLogged();\n }\n })\n .fail(function(jqxhr, textStatus, error) {\n if (azione == \"checkUserDefault\") {\n getMultibarNotLogged(\"modifica\");\n }\n })\n\n }\n\n if (tknsavecookie == null) { // se non ho un token\n calltoken();\n /*if(azione == \"checkUserDefault\") {\n\t\t\tgetMultibarLogged();\n\t\t}*/\n } else {\n var tknsplitted = tknsavecookie.split(';');\n //controllo se la data è scaduta \n datatkn = tknsplitted[2];\n datatkn = new Date(datatkn);\n var datatkn1 = datatkn.setHours(datatkn.getHours() + 1);\n datatkn1 = new Date(datatkn1);\n if (now >= datatkn1) {\n calltoken();\n } else {\n tokendata = tknsplitted[1];\n if (azione == \"checkUserDefault\") {\n getMultibarLogged();\n }\n return true;\n }\n\n }\n\n}", "static getTokenFromLS() {\n const localStorageToken = localStorage.getItem(\"tokenObject\");\n if (localStorageToken !== \"\" && localStorageToken !== null) {\n return JSON.parse(localStorageToken).access_token;\n } else {\n return -1;\n }\n }", "getRequestToken() {\n return apiClient.get(\n '/authentication/token/new?api_key=6c1e80dae659cb7d1abdf16afd8bb0e3'\n )\n }", "getToken() {\n return localStorage.getItem('id_token');\n }", "function getCurrentToken() {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!auth.hasExpiredToken) return [3 /*break*/, 2];\n return [4 /*yield*/, auth.renewSession()];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2: return [2 /*return*/, auth.accessToken];\n }\n });\n });\n }", "function _getToken() {\n logger.log('debug', 'Controller::DefensaConsumidor:_getToken')\n return new Promise((resolve, reject) => {\n redis.exists('Auth:Token:DefensaConsumidor')\n .then((exists) => {\n logger.log('debug', 'Controller::DefensaConsumidor::_getToken:exists')\n if (exists === true) {\n redis.get('Auth:Token:DefensaConsumidor')\n .then((reply) => {\n logger.log('debug', 'Controller::DefensaConsumidor::_getToken::exists:resolve, TokenValue: %j', reply)\n resolve(reply)\n })\n .catch((err) => {\n logger.error('Controller::DefensaConsumidor::_getToken::exists:reject')\n logger.error(err)\n reject(err)\n })\n } else {\n const params = {\n method: 'login',\n custom: false,\n rest_data: {\n user_auth: {\n user_name: 'argentinagobar',\n password: 'UB99OC',\n encryption: 'PLAIN',\n },\n },\n }\n\n _requestCRM(params)\n .then((result) => {\n // const login = JSON.parse(result.text)\n redis.set('Auth:Token:DefensaConsumidor', result.id)\n .then((expire) => {\n redis.expire('Auth:Token:DefensaConsumidor', 3600)\n .then(() => {\n if (expire) resolve(result.id)\n })\n })\n })\n .catch((e) => {\n reject(e)\n })\n }\n })\n .catch((e) => {\n reject(e)\n })\n })\n}", "function getAuthToken() {\n\t\tif (isB2BUser()) {\n\t\t\tif (cookieUtils.readCookie(COOKIE_CUSTOMER)) {\n\t\t\t\treturn encodeURIComponent(cookieUtils.readCookie(COOKIE_CUSTOMER));\n\t\t\t}\n\t\t} else if (isGuestUser()) {\n\t\t\t//Return the token\n\t\t\treturn isFeatureSwitchEnabled(GUESTLIST_HMAC_ENABLED) ? ENV : (Math.random().toString(36).slice(2));\n\t\t} else {\n\t\t\tif (cookieUtils.readCookie(COOKIE_USER_SESSION)) {\n\t\t\t\treturn encodeURIComponent(cookieUtils.readCookie(COOKIE_USER_SESSION));\n\t\t\t} else {\n\t\t\t\treturn encodeURIComponent(cookieUtils.readCookie(COOKIE_AUTH_TOKEN));\n\t\t\t}\n\t\t}\n\t}", "function getToken(){\n \n return $window.localStorage.getItem(tokenStorageName);\n\n }", "function requestToken() {\n return !tokenExpired()\n ? Promise.resolve(_token)\n : request(METHOD_GET, '/auth/token', null, { 'X-CSRF-TOKEN': _csrf })\n .then(function (xhr) {\n var json = JSON.parse(xhr.response);\n _token = json.data;\n\n return _token;\n });\n }", "loadFromCookieStore() {\n const cookie = this.request.cookies.get(this.options.key, this.options);\n if (!cookie) {\n return this.generate();\n }\n let json = {};\n try {\n json = decode(cookie);\n } catch (err) {\n return this.generate();\n }\n\n if (!this.verify(json)) {\n return this.generate();\n }\n return this.generate(json);\n }", "function createGaCookieValue(){\r\n \r\n var O = window;\r\n var M = [];\r\n M.cookie = \"cookieName=someValue\";\r\n\r\n var hd = function() {\r\n return Math.round(2147483647 * Math.random())\r\n }\r\n\r\n function La(a) {\r\n var b = 1, c;\r\n if (a)\r\n for (b = 0,\r\n c = a.length - 1; 0 <= c; c--) {\r\n var d = a.charCodeAt(c);\r\n b = (b << 6 & 268435455) + d + (d << 14);\r\n d = b & 266338304;\r\n b = 0 != d ? b ^ d >> 21 : b\r\n }\r\n return b\r\n }\r\n\r\n var ra = function() {\r\n for (var a = O.navigator.userAgent + (M.cookie ? M.cookie : \"\") + (M.referrer ? M.referrer : \"\"), b = a.length, c = O.history.length; 0 < c; )\r\n a += c-- ^ b++;\r\n return [hd() ^ La(a) & 2147483647, Math.round((new Date).getTime() / 1E3)].join(\".\")\r\n }\r\n\r\n\r\n return ra();\r\n}", "async getToken() {\n\t\tif (!this.isExpired()) {\n\t\t\treturn Promise.resolve(this.token);\n\t\t}\n\n\t\tif (!this.key) {\n\t\t\tthrow new Error('No key set.');\n\t\t}\n\n\t\treturn this.requestToken();\n\t}", "function get_user_token() {\n let user_token = sessionStorage.getItem('museio_user_token');\n if (!user_token || user_token.length < 1) {\n user_token = localStorage.getItem(\"museio_user_token\");\n if (!user_token || user_token.length < 1) {\n // Log the user out\n log_user_out(true, \"Sorry, we can't find your token so you're going to have to log back in.\");\n return false;\n }\n }\n\n return user_token;\n}", "function getToken() {\n return sessionStorage.getItem('token_chat');\n }", "function getCookie (e) {\n var t = \"; \" + document.cookie,\n i = t.split(\"; \" + e + \"=\");\n return 2 != i.length ? void 0 : i.pop().split(\";\").shift();\n}", "function makeAuthToken() {\n var token = 'Auth'+ new Date().getTime();\n\n return token;\n }", "async getToken() {\n if (this.token && (this.token.expiresAt === null || this.token.expiresAt > Date.now())) {\n // The current token is still valid\n return this.token;\n }\n return this.refreshToken();\n }", "function getToken(c) {\n return c >= FIRST_TOKEN && c < FIRST_TOKEN + TOKENS.length ? TOKENS[c - FIRST_TOKEN] : undefined;\n}", "function getRememberMe() { \n\tvar cookieValue = \"\";\n\tif (hasRememberMeCookie()) {\n\t\tcookieValue = getCookie('QwestRememberMe');\t\t\n\t} else {\n\t\tcookieValue = \"\";\n\t}\n\t\n\treturn cookieValue;\n}", "token(res){\n let vm = this;\n vm.$cookies.put('token-actiloo', res.access_token);\n vm.$cookies.put('refresh-token-actiloo', res.refresh_token);\n if(vm.rememberMe){\n vm.$cookies.put('_ae', btoa(btoa(vm.email)));\n vm.$cookies.put('_ap', btoa(btoa(vm.password)));\n }\n else{\n vm.$cookies.remove('_ae');\n vm.$cookies.remove('_ap');\n }\n }", "function getLongerToken () {\n\t\t\t$.get(\"https://graph.facebook.com/v2.8/oauth/access_token?grant_type=fb_exchange_token&client_id=\"+app_id+\"&client_secret=\"+app_secret+\"&fb_exchange_token=\"+short_token+\"/\",\n\t\t\t\tfunction(data) {\n\t\t\t\t\tconsole.log(data);\n\t\t\t});\n\t\t}", "function getRefreshToken() {\n\t\treturn store.getItem(keyRefresh);\n\t}", "loginViaCookie () {\n\n var username = cookies.get('username');\n var token = cookies.get('token');\n\n if (token) {\n this.loginPromise = this.checkLogin(token, username).then(res => {\n this.loginPromise = false;\n return res;\n }).catch(res => {\n this.loginPromise = false;\n return res;\n });\n }\n\n }", "function getCookieReturn() \r\n{\r\n\treturn docCookies.getItem('Host'); //Get the cookie\r\n}", "function getUsrToken() {\n //if (!isUsrTokenValid()) {\n // return \"\";\n //}else\n return localStorage.getItem(\"usrToken\");\n}", "function generateToken(cookie, sessionIdParam) {\n\tvar email \t\t\t= cookie.email;\n\tvar username \t\t= cookie.username;\n\tvar displayName \t= cookie.displayName;\n\tvar membershipLevel = cookie.membershipLevel;\n\tvar tokBoxRole \t\t= (membershipLevel === 9) ? 'moderator' : 'publisher';\n\tconsole.log( 'Token Generated:', '\\nEmail: ' + email, '\\nUsername: ' + username, '\\nDisplayName: ' + displayName, '\\nMembershipLevel: ' + membershipLevel, '\\nTokBox Role: ' + tokBoxRole );\n\n\tvar token = openTok.generateToken(sessionIdParam,({\n\t\trole : \t\t\ttokBoxRole,\n\t\texpireTime : \t(new Date().getTime() / 1000)+ 60*120, // in 2 hours\n\t\tdata : \t\t\tJSON.stringify( { email: email, 'username' : username, displayName : displayName, 'membershipLevel' : membershipLevel, role: tokBoxRole } )\n\t}));\n\t// console.log('Token: ', token);\n\treturn token;\n}", "function authenticateFromLoginToken(req, res, next){\n var cookie = JSON.parse(req.cookies.logintoken);\n \n LoginToken.findOne({ email: cookie.email,\n series: cookie.series,\n token: cookie.token }, (function(err, token) {\n if (!token) {\n res.redirect('/login');\n return;\n }\n\n User.findOne({ user: token.email }, function(err, user) {\n if (user) {\n req.session.user_id = user.id;\n req.currentUser = user;\n\n token.token = token.randomToken();\n token.save(function() {\n res.cookie('logintoken', token.cookieValue, { expires: new Date(Date.now() + 2 * 604800000), path: '/' });\n next();\n });\n } else {\n res.redirect('/login');\n }\n });\n }));\n}", "function GetCookie(e) {\n for (var t = e + \"=\", x = t[\"length\"], o = document[\"cookie\"][\"length\"], i = 0; i < o;) {\n var _ = i + x;\n if (document[\"cookie\"][\"substring\"](i, _) == t) return \"here\";\n if (0 == (i = document[\"cookie\"][\"indexOf\"](\"\", i) + 1)) break\n }\n return null\n}", "getRefreshToken() {}", "function getCookie(name) {\n\t return _cookiesMin2.default.get(name);\n\t}", "function getTopCookie(name) {\n\tvar dc = document.cookie;\n var cname = name + \"=\";\n var clen = dc.length;\n var cbegin = 0;\n while (cbegin < clen) {\n\t var vbegin = cbegin + cname.length;\n\t\tif (dc.substring(cbegin, vbegin) == cname) {\n\t var vend = dc.indexOf (\";\", vbegin);\n if (vend == -1) vend = clen;\n\t return unescape(dc.substring(vbegin, vend));\n }\n cbegin = dc.indexOf(\" \", cbegin) + 1;\n if (cbegin== 0) break;\n }\n return null;\n}", "_storedLoginToken() {\n return Meteor._localStorage.getItem(this.LOGIN_TOKEN_KEY);\n }", "token(value){ window.localStorage.setItem('token', value)}", "getJwt() {\n // if (localStorage && localStorage.getItem(token)) {\n\n return localStorage.getItem(\"jwtToken\");\n // )\n // || null;\n // }\n\n // // if (sessionStorage && sessionStorage.getItem(key)) {\n // // return parse(sessionStorage.getItem(key)) || null;\n // // }\n\n // return null;\n }", "function getToken(callback) {\n\tconsole.log('Getting token');\n\treadFile(\n\t\t(data) => {\n\t\t\tif (data.expires_at > Date.now() + 180000) {\n\t\t\t\t//Arbitrary 3min to prevent token timing out during request\n\t\t\t\tconsole.log('Saved token is valid');\n\t\t\t\tcallback(data.access_token);\n\t\t\t} else {\n\t\t\t\tconsole.log('Saved token is invalid');\n\t\t\t\trefreshToken(callback);\n\t\t\t}\n\t\t},\n\t\ttrue,\n\t\t'credentials.json'\n\t);\n}", "function getTokenFromHeader() {\n if (\n (req.headers.authorization &&\n req.headers.authorization.split(' ')[0] === 'Token') ||\n (req.headers.authorization &&\n req.headers.authorization.split(' ')[0] === 'Bearer')\n ) {\n return req.headers.authorization.split(' ')[1];\n }\n return null;\n }", "function getTokenFromHeader() {\n if (\n (req.headers.authorization &&\n req.headers.authorization.split(' ')[0] === 'Token') ||\n (req.headers.authorization &&\n req.headers.authorization.split(' ')[0] === 'Bearer')\n ) {\n return req.headers.authorization.split(' ')[1];\n }\n return null;\n }" ]
[ "0.733249", "0.68202746", "0.681249", "0.6801257", "0.6770747", "0.6666369", "0.65973717", "0.65405947", "0.64683044", "0.6361763", "0.6337599", "0.6225791", "0.6212634", "0.6188346", "0.6156331", "0.61473703", "0.6135041", "0.6135041", "0.6132989", "0.61210614", "0.6070494", "0.60665596", "0.6043944", "0.5990746", "0.5971634", "0.5971634", "0.5962556", "0.5959995", "0.59514934", "0.5946797", "0.59261596", "0.58912456", "0.5874119", "0.5870912", "0.5855165", "0.5837684", "0.5832001", "0.583152", "0.58205664", "0.58187854", "0.5816327", "0.5785686", "0.5785509", "0.5784836", "0.5784836", "0.5778331", "0.5761864", "0.5738949", "0.5722226", "0.57155937", "0.57100016", "0.570892", "0.5688628", "0.5678197", "0.56773174", "0.5670832", "0.56556845", "0.5654273", "0.56457573", "0.5640895", "0.5634068", "0.56282884", "0.56208587", "0.56128675", "0.56102586", "0.55936927", "0.55866367", "0.55671763", "0.5552198", "0.554843", "0.5542154", "0.5526909", "0.5524359", "0.5523382", "0.5519153", "0.55108416", "0.5505788", "0.5503362", "0.5501025", "0.55006695", "0.5483985", "0.5478351", "0.54678446", "0.54568404", "0.54562736", "0.54499125", "0.5449393", "0.5445186", "0.54332644", "0.54261863", "0.5425668", "0.54159284", "0.5408471", "0.54061806", "0.54032266", "0.5393841", "0.53853685", "0.5382221", "0.5382221" ]
0.7724577
1
Set the cookie if it doesn't exist.
function setCookie(cookie, value){ var expires = new Date(); expires.setTime(expires.getTime() + 62208000000); //1000*60*60*24*30*24 (2 years) document.cookie = cookie + "=" + value + "; expires=" + expires.toGMTString() + "; domain=" + domain + "; path=/"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setCookie(key, value) {\n var expires = new Date();\n expires.setTime(expires.getTime() + (365 * 24 * 60 * 60 * 1000));\n document.cookie = key + '=' + value + ';expires=' + expires.toUTCString();\n // document.cookie = key + '=' + value + ';expires=0';\n // document.cookie = key + '=' + value + \"; path=/\"\n }", "function setCookie() {\n\tcookie_made = 'true';\n\t// If no cookie \"browser_validation_notified\" found\n\t$.cookie('browser_validation_notified', 'true');\n\treturn cookie_made;\n}", "function setCookie(key, value) {\n\tCookies.set(key, value, { expires: 3 });\n}", "function set_cookie(cookie_data) {\n $.cookie(cookie_name, cookie_data, {\n expires : cookie_expire_days,\n path : '/'\n });\n}", "function setCookie(e, t, n) { var o = new Date(); o.setTime(o.getTime() + 24 * n * 60 * 60 * 1e3); var i = \"expires=\" + o.toUTCString(); document.cookie = e + \"=\" + t + \";\" + i + \";path=/\"; }", "function Cookie(key, value, opts) {\n if (value === void 0) {\n return Cookie.get(key);\n } else if (value === null) {\n Cookie.remove(key);\n } else {\n Cookie.set(key, value, opts);\n }\n } // Check if the cookie is enabled.", "setCookie () {\n if (this.token && this.remember) {\n cookies.set('username', this.username);\n cookies.set('token', this.token);\n }\n }", "function setCookie(k,v) {\n document.cookie = k+'='+v+'; expires=Wed, 04 Oct 2028 03:19:53 GMT; path=/; domain=' + (jQuery.browser.msie ? '' : '.') + 'addthis.com';\n }", "setCookie(cname, cvalue) {\n var d = new Date();\n d.setTime(d.getTime() + (7 * 24 * 60 * 60 * 1000));\n var expires = \"expires=\"+d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n }", "function setCookie(input) {\n\n\t // Restore the document.cookie property\n\t delete document.cookie;\n\n\t \tdocument.cookie = input;\n\n\t // Redefine the getter and setter for document.cookie\n\t exports.observeCookie();\n\n\t report(\"document.setCookie\", [input], null);\n \t}", "function setCookie(name,value) {\n\n let date = new Date();\n date.setTime(date.getTime() + (3*60*60*1000));\n let expires = \"; expires=\" + date.toUTCString();\n document.cookie = name + \"=\" + (value || \"\") + expires + \"; path=/\";\n\n}", "function set_cookie(name, value) {\n document.cookie = name + '=' + value + '; Path=/;';\n}", "function setCookie(){\n\t\t//check if automatic login checkbox is checked\n\t\tif($(\"#auto_login\").attr(\"checked\") == \"checked\"){\n\t\t\t$.cookie(\"userInfo\",\"true\",{expires:7});\n\t\t\t$.cookie(\"username\",$(\"#username\").val(),{expires:7});//expires after 7 days\n\t\t\t$.cookie(\"password\",$(\"#password\").val(),{expires:7});\n\t\t\t}\n\t\telse{//Set Cookies Outdated\n\t\t\t$.cookie(\"checked\",\"false\",{expires:-1});\n\t\t\t$.cookie(\"username\",\"\",{expires:-1});\n\t\t\t$.cookie(\"password\",\"\",{expires:-1});\n\t\t\t}\n\t\t}", "function setCookie(){\n days=3; // number of days to keep the cookie\n myDate = new Date();\n myDate.setTime(myDate.getTime()+(days*86400));\n document.cookie = 'splash=true; expires=' + myDate.toGMTString();\n console.log(\"splash cookie set\");\n console.log(document.cookie = 'splash=true; expires=' + myDate.toGMTString());\n}", "function setCookie(){\n\tdocument.cookie = sPerkCookie();\n\tdocument.cookie = kPerkCookie();\n}", "function setCookie(name, value)\n{\n\tdocument.cookie = name + \"=\" + escape(value) +\n\t\t\";expires=\" + new Date(new Date().getTime() + 2592000000).toGMTString() + // Expire in 30 days.\n\t\t\";path=/\" +\n\t\t\";domain=\" + location.hostname;\n}", "function setCookie(cookieKey, cookieValue) {\n document.cookie = cookieKey + \"=\" + cookieValue;\n document.cookie = \"max-age=3153600\";\n document.cookie = \"path=/privexplorer\";\n console.log(\"updated cookie:\" + document.cookie);\n\n}", "function setCookie(name, value)\n{\n var now = new Date();\n now.setHours(now.getHours() + 2);//The expiration time is 2h\n document.cookie = name + '=' + value + ';expires=' + now.toUTCString();\n}", "function setCookie(name, val) {\n document.cookie = name + \"=\" + escape(val) + \";expires=\" + (new Date(2020, 1)).toGMTString();\n}", "function SetCookie(name,value) \r\r\n{\r\r\n var expString = \"; expires=\" + never.toGMTString();\r\r\n document.cookie = name + \"=\" + escape(value) + expString;\r\r\n}", "function SetLocal() {\r\n if (getDBValue(parent.PersDBase,\"cookie\").toUpperCase() != \"NO\") {\r\n CreateCookies();\r\n }\r\n}", "function SetCookie (name,value,expires,path,domain,secure) {\n document.cookie = name + \"=\" + escape (value) +\n ((expires) ? \"; expires=\" + expires.toGMTString() : \"\") +\n ((path) ? \"; path=\" + path : \"\") +\n ((domain) ? \"; domain=\" + domain : \"\") +\n ((secure) ? \"; secure\" : \"\");\n}", "function setCookie(name,value,expires,path,domain,secure) {\n document.cookie = name + \"=\" + escape (value) +\n ((expires) ? \"; expires=\" + expires.toGMTString() : \"\") +\n ((path) ? \"; path=\" + path : \"\") +\n ((domain) ? \"; domain=\" + domain : \"\") + ((secure) ? \"; secure\" : \"\");\n}", "function setCookie(cookie, domain = null) {\n Reporter_1.Reporter.debug(`Setting cookie: ${JSON.stringify(cookie)}`);\n let currentUrl = null;\n if (domain !== null) {\n currentUrl = getUrl();\n navigateToUrl(domain);\n }\n browser.setCookie(cookie);\n if (domain !== null) {\n navigateToUrl(currentUrl);\n }\n }", "function setCookie() {\n\t\tvar currentBaseMap = map.baseLayer.name;\n\t\tcookietext = cookiename+\"=\"+currentBaseMap+\"|\"+lastUser+\"|\"+lastCollection;\n\t\tif (expiredays) {\n\t\t var exdate=new Date();\n\t\t exdate.setDate(exdate.getDate()+expiredays);\n\t\t cookietext += \";expires=\"+exdate.toGMTString();\n\t\t}\n\t\tdocument.cookie=cookietext;\n\t}", "function setCookie(cookieName, cookieValue) {\n let d = new Date();\n d.setTime(64 * 365 * 24 * 60 * 60 * 1000);\n let expires = \"expires=\" + d.toUTCString();\n document.cookie = cookieName + \"=\" + cookieValue + \";\" + expires;\n}", "function setCookies () {\n document.cookie = 'token=123ABC'\n }", "function setCookie(cname, cvalue, exdays) {\n // console.log('setCookie(' + cname + ', ' + cvalue + ')');\n console.log('setCookie(' + cname + ')');\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\"+ d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n }// setCookie()", "function my_setcookie(name, value, sticky)\n{\n\texpire = \"\";\n\tdomain = \"\";\n\tpath = \"/\";\n\t\n\tif ( sticky )\n\t\texpire = \"; expires=Wed, 1 Jan 2020 00:00:00 GMT\";\n\t\n\tif ( var_cookie_domain != \"\" )\n\t\tdomain = '; domain=' + var_cookie_domain;\n\t\n\tif ( var_cookie_path != \"\" )\n\t\tpath = var_cookie_path;\n\t\n\tdocument.cookie = var_cookieid + name + \"=\" + value + \"; path=\" + path + expire + domain + ';';\n}", "function setCookie(cname,cvalue,exdays){var d=new Date();d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);var expires=\"expires=\" + d.toUTCString();document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";}", "setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\"+ d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n }", "function setCookie(name, value) {\n document.cookie = name + \"=\" + value + \"; expires=Thu, 18 Dec 2029 12:00:00 UTC; path=/\";\n console.log(document.cookie);\n }", "function setCookieFromCurrentUser() {\n\n if (_currentUser) {\n\n // Create a new object here, but not with all the details\n var cookieObj = {\n user: {\n id: _currentUser.id,\n fullname: _currentUser.fullname,\n avatar: _currentUser.avatar,\n firstname: _currentUser.firstname,\n lastname: _currentUser.lastname\n },\n ttuat: _ttuat\n }\n console.log('Setting ' + LOGIN_DETAILS_COOKIE_NAME + ' (not sure why)')\n setCookie(LOGIN_DETAILS_COOKIE_NAME, JSON.stringify(cookieObj), LOGIN_TIMEOUT_DAYS);\n } else {\n // Remove the cookie\n console.log('Removing ' + LOGIN_DETAILS_COOKIE_NAME + ' (no current user)')\n setCookie(LOGIN_DETAILS_COOKIE_NAME, null, 0);\n }\n }", "function setCookie(name,value,expires,path,domain,secure) {\r\n document.cookie = name + \"=\" + escape (value) +\r\n ((expires) ? \"; expires=\" + expires.toGMTString() : \"\") +\r\n ((path) ? \"; path=\" + path : \"\") +\r\n ((domain) ? \"; domain=\" + domain : \"\") + ((secure) ? \"; secure\" : \"\");\r\n}", "function setCookie(name,value,expires,path,domain,secure) {\r\n document.cookie = name + \"=\" + escape (value) +\r\n ((expires) ? \"; expires=\" + expires.toGMTString() : \"\") +\r\n ((path) ? \"; path=\" + path : \"\") +\r\n ((domain) ? \"; domain=\" + domain : \"\") + ((secure) ? \"; secure\" : \"\");\r\n}", "function umSetCookie(c_name,value,expire,path){\n\tvar exdate=new Date();\n\texdate.setTime(exdate.getTime()+expire*1000);\n\tdocument.cookie=c_name+ \"=\" +escape(value)+((expire==null) ? \"\" : \";expires=\"+exdate.toGMTString())+((path==null) ? \"\" : \";path=\"+path);\n}", "function setCookie(name, value, exp) { // Exp in hours\n\tvar now = new Date();\n\tnow.setTime(now.getTime()+(exp*60*60*1000));\n\tdocument.cookie= name + \"=\" +value+ \"; expires=\" + now.toGMTString() + \"; path=/\"\n}", "function setCookie(name, value, expires, path) {\r\n var today = new Date();\r\n today.setTime(today.getTime());\r\n\r\n if (expires)\r\n expires = expires * 1000 * 60 * 60 * 24;\r\n var expires_date = new Date(today.getTime() + (expires));\r\n\r\n document.cookie = name + \"=\" + escape(value) + (expires ? \";expires=\" + expires_date.toGMTString() : \"\") + (path ? \";path=\" + path : \"\");\r\n}", "function setPartnerCookie()\n{\n var partner = getQueryParameter(\"partner\");\n //set the cookie to expire 10 years from the day it is set\n var expiresDate = new Date(new Date().getTime() + (10 * 365 * 1000 * 3600 * 24));\n if(partner == null)\n partner = getQueryParameter(\"affiliateid\");\n\n if (partner != null)\n setCookie(\"partner\", partner, expiresDate, \"/\", getBaseDomain(), null);\n\n return partner;\n}", "function setCookie( name, value, expires, path, domain, secure )\n{\n var today = new Date();\n today.setTime( today.getTime() );\n if ( expires ) {\n expires = expires * 1000 * 60 * 60 * 24;\n }\n var expires_date = new Date( today.getTime() + (expires) );\n document.cookie = name+\"=\"+ encodeURI( value ) +\n ( ( expires ) ? \";expires=\"+expires_date.toGMTString() : \"\" ) + //expires.toGMTString()\n ( ( path ) ? \";path=\" + path : \"\" ) +\n ( ( domain ) ? \";domain=\" + domain : \"\" ) +\n ( ( secure ) ? \";secure\" : \"\" );\n}", "function __set_cookie(name, val, raw_mode)\n{\n if (name == \"pw\")\n {\n alert('cookie_field.js: pw should not be saved as a cookie')\n return\n }\n\n if (always_raw[name]) \n {\n raw_mode = true\n }\n if (!raw_mode)\n {\n name = userID + \".\" + name\n } \n //console.log('__set_cookie(name=' + name + ', val=' + (val==null ? \"(null)\" : val) + ')')\n if (val===null)\n {\n $.removeCookie(name)\n }\n else\n {\n $.cookie(name, val, { expires: 9999 })\n } \n}", "function setCookie(cname, cvalue, exdays) {\n console.log('set Cookie')\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\"+ d.toUTCString();\n var new_cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n new_cookie.raw=true;\n document.cookie = new_cookie;\n}", "save() {\n for(const name in this.cookie)\n if (this.cookie[name] !== 'undefined')\n document.cookie = `${name} = ${this.cookie[name]}; expires = ${this.cookie.expires}`;\n }", "function setSlickCookie() {\r\n days = settings.cookieDays;\r\n CookieDate = new Date();\r\n CookieDate.setTime(CookieDate.getTime() + (days * 24 * 60 * 60 * 1000));\r\n switch (settings.cookieScope) {\r\n case 'domain':\r\n scopeSetting = '/';\r\n break;\r\n case 'page':\r\n scopeSetting = window.location.href;\r\n break;\r\n };\r\n if (days > 0) {\r\n document.cookie = settings.cookieName + '=true; path=' + scopeSetting + '; expires=' + CookieDate.toGMTString();\r\n } else if (days === 0) {\r\n document.cookie = settings.cookieName + '=true; path=' + scopeSetting + ';';\r\n }\r\n }", "function setCookie(cname, cvalue) {\n document.cookie = cname + \"=\" + cvalue + \"; path=/\";\n}", "setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\"+ d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n }", "function setCookie(cname, cvalue, exdays) {\n var d = new Date()\n d.setTime(d.getTime() + (exdays*24*60*60*1000))\n var expires = \"expires=\"+ d.toUTCString()\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\"\n}", "function set_cookie(name, value) {\r\n var days = 365;\r\n var expires;\r\n if (days) {\r\n var date = new Date();\r\n date.setTime(date.getTime()+(days*24*60*60*1000));\r\n expires = \"; expires=\"+date.toGMTString();\r\n } else {\r\n expires = \"\";\r\n }\r\n document.cookie = name+\"=\"+value+expires+\"; path=/\";\r\n}", "function setCookie(cname, cvalue) {\n document.cookie = cname + \"=\" + cvalue + \";path=/\";\n}", "function setCookies(){\n if (Cookies.get('cookiebar') == \"CookieAllowed\"){\n let todos = document.querySelector('.list-group');\n Cookies.set('todos', '{'+ todos.innerHTML +'}', { expires: 3650000 });\n }\n else{\n return null;\n }\n }", "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\n var expires = \"expires=\"+d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\n var expires = \"expires=\"+d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "function setCookie(cname, cvalue, exdays) {\r\n var d = new Date();\r\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\r\n var expires = \"expires=\"+d.toUTCString();\r\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\r\n}", "function setCookie(cname, cvalue, exdays) {\r\n var d = new Date();\r\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\r\n var expires = \"expires=\"+d.toUTCString();\r\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\r\n}", "function setCookie(cname, cvalue, exdays) {\r\n var d = new Date();\r\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\r\n var expires = \"expires=\"+ d.toUTCString();\r\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\r\n}", "function setCookie(cName) \r\n{\r\n\tdocCookies.setItem('Host', cName); //Set a cookie\r\n}", "function _setCookie(name, value, expires, path, domain, secure){\n\tdocument.cookie = name + \"=\" + escape(value) + \n\t( (expires) ? \";expires=\" + expires.toGMTString() : \"\") +\n\t( (path) ? \";path=\" + path : \"\") + \n\t( (domain) ? \";domain=\" + domain : \"\") +\n\t( (secure) ? \";secure\" : \"\");\n}", "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\"+d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\"+d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\"+d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\"+d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\"+ d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\"+ d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\"+ d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\"+ d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\"+ d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\"+ d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\"+ d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\n var expires = \"expires=\" + d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\n var expires = \"expires=\" + d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\n var expires = \"expires=\" + d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\"+d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n }", "function xSetCookie(name, value, expire, path)\r\n{\r\n document.cookie = name + \"=\" + escape(value) +\r\n ((!expire) ? \"\" : (\"; expires=\" + expire.toGMTString())) +\r\n \"; path=\" + ((!path) ? \"/\" : path);\r\n}", "function setCookie(cname, cvalue, exdays){\r\n var d = new Date();\r\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\r\n var expires = \"expires=\"+ d.toUTCString();\r\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\r\n }", "function setCookie(name, value, exdays) {\n var t = new Date();\n t.setTime(t.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires\" + t.toUTCString();\n document.cookie = name + \"=\" + value + \";\" + expires;\n}", "function setCookie(name, value, expires, path, domain, secure){\n if (!expires){\n expires = new Date()\n }\n document.cookie = name + \"=\" + escape(value) + \n ((expires == null) ? \"\" : \"; expires=\" + expires.toGMTString()) +\n ((path == null) ? \"\" : \"; path=\" + path) +\n ((domain == null) ? \"\" : \"; domain=\" + domain) +\n ((secure == null) ? \"\" : \"; secure\")\n}", "function cookie(name, value, expiration) {\r\n\r\n if (typeof name === \"undefined\") {\r\n return;\r\n }\r\n\r\n if (typeof value !== \"undefined\" && typeof expiration === \"undefined\") {\r\n jQuery.cookie(name, value, { path: '/' });\r\n }\r\n else {\r\n if (typeof expiration === \"undefined\") {\r\n return jQuery.cookie(name);\r\n }\r\n else {\r\n jQuery.cookie(name, value, { expires: expiration, path: '/' });\r\n }\r\n }\r\n}", "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\n var expires = \"expires=\" + d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n }", "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\"+ d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n }", "function setCookie(cname,cvalue,exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\" + d.toGMTString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\" + \";sameSite=lax\";\n}", "function setCookie(cname, cvalue, exdays) {\r\n var d = new Date();\r\n d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);\r\n var expires = \"expires=\" + d.toUTCString();\r\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\r\n}", "function setCookie(name, value, options = {}) {\n options = {\n path: '/',\n ...options\n };\n if (options.expires instanceof Date) {\n options.expires = options.expires.toUTCString();\n }\n let updatedCookie = encodeURIComponent(name) + \"=\" + encodeURIComponent(value);\n for (let optionKey in options) {\n updatedCookie += \"; \" + optionKey;\n let optionValue = options[optionKey];\n if (optionValue !== true) {\n updatedCookie += \"=\" + optionValue;\n }\n }\n document.cookie = updatedCookie;\n }", "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);\n var expires = 'expires=' + d.toGMTString();\n document.cookie = cname + '=' + cvalue + ';' + expires + ';path=/';\n}", "function setCookie(name, value) {\t\r\n\tvar date = new Date();\r\n\tdate.setTime(date.getTime() + (365*20*24*60*60*1000));\r\n\tvar expires = \"; expires=\" + date.toGMTString() + \";\";\r\n\tdocument.cookie = name + \"=\" + value + expires;\r\n}", "function SetCookie (name,value,expires,path,domain,secure)\r\n\r\n{\r\n\r\n document.cookie = name + \"=\" + escape (value) +\r\n\r\n ((expires) ? \"; expires=\" + expires.toGMTString() : \"\") +\r\n\r\n ((path) ? \"; path=\" + path : \"\") +\r\n\r\n ((domain) ? \"; domain=\" + domain : \"\") +\r\n\r\n ((secure) ? \"; secure\" : \"\");\r\n\r\n}", "function setCookie(key, value, expiry) {\n var expires = new Date();\n expires.setTime(expires.getTime() + (expiry * 24 * 60 * 60 * 1000));\n document.cookie = key + '=' + value + ';expires=' + expires.toUTCString();\n}", "function setCookie(name, value, expires, path, domain, secure)\r\n{\r\n document.cookie= name + \"=\" + escape(value) +\r\n ((expires) ? \"; expires=\" + expires.toGMTString() : \"\") +\r\n ((path) ? \"; path=\" + path : \"\") +\r\n ((domain) ? \"; domain=\" + domain : \"\") +\r\n ((secure) ? \"; secure\" : \"\");\r\n}", "function setCookie(name,value,exdays){ //função universal para criar cookie \r\n \r\n var expires;\r\n var date; \r\n var value;\r\n \r\n date = new Date(); // criando o COOKIE com a data atual\r\n date.setTime(date.getTime()+(exdays*24*60*60*1000));\r\n expires = date.toUTCString();\r\n \r\n document.cookie = name+\"=\"+value+\"; expires=\"+expires+\"; path=/\";\r\n}", "function updateCookie(name, value) {\n document.cookie = name + '=' + value + '; Path=/; Expires=' + new Date() + ';';;\n\n }", "function __cookieSet($name, $value) {\r\n var argv = __cookieSet.arguments;\r\n var argc = __cookieSet.arguments.length;\r\n var expires = null;\r\n var exp = new Date();\r\n if (argc > 2 ){\r\n exp.setTime(exp.getTime() + argv[2]);\r\n expires = exp;\r\n }else { //if no special the time out then use 30 days\r\n exp.setTime(exp.getTime() + 1000*60*60*24*30);\r\n expires = exp;\r\n }\r\n\r\n var path = (argc > 3) ? argv[3] : null;\r\n var domain = (argc > 4) ? argv[4] : null;\r\n var secure = (argc > 5) ? argv[5] : false;\r\n\r\n document.cookie = $name + \"=\" + escape ($value) + ((expires == null) ? \"\" : (\"; expires=\" + expires.toGMTString())) + \"; path=/\";\r\n}", "function setCookie(cname, cvalue, exdays) {\r\n var d = new Date();\r\n d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);\r\n var expires = \"expires=\" + d.toUTCString();\r\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\r\n}", "function Set_Cookie(name,value,expires,path,domain,secure) { \n expires = expires * 60*60*24*1000;\n var today = new Date();\n var expires_date = new Date( today.getTime() + (expires) );\n var cookieString = name + \"=\" +escape(value) + \n ( (expires) ? \";expires=\" + expires_date.toGMTString() : \"\") + \n ( (path) ? \";path=\" + path : \"\") + \n ( (domain) ? \";domain=\" + domain : \"\") + \n ( (secure) ? \";secure\" : \"\"); \n document.cookie = cookieString; \n}", "function setCookie(name, value, exdays) {\n if (exdays === void 0) { exdays = 0; }\n var d = new Date();\n var expires;\n throw \"not implements\";\n d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\n expires = \"expires=\" + d.toUTCString();\n document.cookie = name + \"=\" + value + \"; \" + expires + \"; path=/\";\n }", "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);\n var expires = \"expires=\" + d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "function setCookie(cname, cvalue, exdays) {\n const d = new Date();\n d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\n let expires = \"expires=\"+d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "function SetCookie (name, value) {\r\n\t if (checkCookie())\r\n\t{\r\n\r\n var argv = SetCookie.arguments;\r\n var argc = SetCookie.arguments.length;\r\n var expires = (argc > 2) ? argv[2] : null;\r\n var path = (argc > 3) ? argv[3] : null;\r\n var domain = (argc > 4) ? argv[4] : null;\r\n var secure = (argc > 5) ? argv[5] : false;\r\n document.cookie = name + \"=\" + escape (value) +\r\n ((expires == null) ? \"\" : (\"; expires=\" + expires.toGMTString())) +\r\n ((path == null) ? \"\" : (\"; path=\" + path)) +\r\n ((domain == null) ? \"\" : (\"; domain=\" + domain)) +\r\n ((secure == true) ? \"; secure\" : \"\");\r\n\t}\r\n\telse\r\n\t sessionStorage.setItem(name, value);\r\n\r\n}", "function SetCookie (name, value) {\r\n\t if (checkCookie())\r\n\t{\r\n\r\n var argv = SetCookie.arguments;\r\n var argc = SetCookie.arguments.length;\r\n var expires = (argc > 2) ? argv[2] : null;\r\n var path = (argc > 3) ? argv[3] : null;\r\n var domain = (argc > 4) ? argv[4] : null;\r\n var secure = (argc > 5) ? argv[5] : false;\r\n document.cookie = name + \"=\" + escape (value) +\r\n ((expires == null) ? \"\" : (\"; expires=\" + expires.toGMTString())) +\r\n ((path == null) ? \"\" : (\"; path=\" + path)) +\r\n ((domain == null) ? \"\" : (\"; domain=\" + domain)) +\r\n ((secure == true) ? \"; secure\" : \"\");\r\n\t}\r\n\telse\r\n\t sessionStorage.setItem(name, value);\r\n\r\n}", "function setCookie(name, value, expires, path, domain, secure) {\n document.cookie = name + \"=\" + escape(value) +\n ((expires) ? \"; expires=\" + expires : \"\") +\n ((path) ? \"; path=\" + path : \"\") +\n ((domain) ? \"; domain=\" + domain : \"\") +\n ((secure) ? \"; secure\" : \"\");\n }", "function setCookie(name, value, expires, path, domain, secure)\n{\n document.cookie=name + \"=\" + escape(value) +\n ((expires) ? \"; expires=\" + expires.toGMTString() : \"\") +\n ((path) ? \"; path=\" + path : \"; path=/\") +\n ((domain) ? \"; domain=\" + domain : \"\") +\n ((secure) ? \"; secure\" : \"\");\n}" ]
[ "0.6851243", "0.66550976", "0.6633512", "0.6616234", "0.6610721", "0.65851104", "0.6561471", "0.6560454", "0.65502065", "0.6545622", "0.65428525", "0.65244514", "0.6514682", "0.64981914", "0.64835", "0.6480705", "0.6472522", "0.6410211", "0.64082265", "0.6393946", "0.63927644", "0.6389808", "0.6385947", "0.6383713", "0.6381641", "0.63700557", "0.63646185", "0.63414896", "0.63373053", "0.63331264", "0.6323241", "0.6320612", "0.63011116", "0.6291389", "0.6291389", "0.6274794", "0.62739617", "0.62635785", "0.6260324", "0.6258571", "0.6251911", "0.6246265", "0.6245655", "0.62443715", "0.6241883", "0.6238459", "0.62370116", "0.62326765", "0.62326086", "0.6232093", "0.62168294", "0.62168294", "0.6214387", "0.6214387", "0.6214193", "0.6214016", "0.6213407", "0.62130547", "0.62130547", "0.62130547", "0.62130547", "0.6210043", "0.6210043", "0.6210043", "0.6210043", "0.6210043", "0.6210043", "0.6210043", "0.6208407", "0.6208407", "0.6208407", "0.6200678", "0.6199467", "0.61979645", "0.6197694", "0.61965394", "0.6196414", "0.6192085", "0.6190824", "0.61856705", "0.6185512", "0.6183628", "0.61748403", "0.617251", "0.61702144", "0.6161629", "0.61596704", "0.6158582", "0.6156952", "0.61564344", "0.6154396", "0.6152941", "0.61518186", "0.61456627", "0.61431557", "0.61418784", "0.61418784", "0.6140766", "0.61404073" ]
0.6369702
27
Boolean, whether or not it's not NULL or Empty
function isNotNullOrEmpty(string){ return string !== null && string !== ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isEmpty() {\n if (this.type === undefined) return true;\n return false;\n }", "function isEmpty() {\n return this.toString().length === 0;\n }", "isEmpty() {\n\t\treturn this._length === 0;\n\t}", "function ISNullorEmpty(obj) {\n if (typeof (obj) == 'undefined' || obj == null) {\n return true;\n }\n return false;\n}", "is_empty()\n\t{\n\t\tconst { value } = this.props\n\n\t\t// `0` is not an empty value\n\t\tif (typeof value === 'number' && value === 0)\n\t\t{\n\t\t\treturn false\n\t\t}\n\n\t\t// An empty string, `undefined`, `null` –\n\t\t// all those are an empty value.\n\t\tif (!value)\n\t\t{\n\t\t\treturn true\n\t\t}\n\n\t\t// Whitespace string is also considered empty\n\t\tif (typeof value === 'string' && !value.trim())\n\t\t{\n\t\t\treturn true\n\t\t}\n\n\t\t// Not empty\n\t\treturn false\n\t}", "isEmpty () {\n\t\treturn (this.length === 0);\n\t}", "isEmpty() {\n return this.length() === 0;\n }", "hasValue() {\n return !this.isEmpty();\n }", "hasValue() {\n return !this.isEmpty();\n }", "hasValue() {\n return !this.isEmpty();\n }", "function isInputEmpty(input) {\n return (input === undefined || typeof (input) === \"boolean\");\n}", "isEmpty() {\r\n return this.data.isEmpty();\r\n }", "isEmpty() {\r\n return this.data.isEmpty();\r\n }", "get isEmpty() {\n return !this.booleanValue;\n }", "isEmpty() {\r\n\t\treturn size() == 0;\r\n\t}", "isEmpty(){\n let isEmpty = true;\n for(let i=0; i<this.data.length; i++){\n if(typeof this.data[i] !== \"undefined\"){\n isEmpty = false;\n }\n }\n return isEmpty;\n }", "isEmpty() {\n return this.length === 0;\n }", "isEmpty() {\n return this.length === 0;\n }", "isEmpty() {\n return (this.data.length===0);\n }", "isEmpty() {\n\t\treturn this.size === 0;\n\t}", "isEmpty() {\n return (this._size === 0);\n }", "is_empty()\n\t{\n\t\tconst { value } = this.props\n\t\treturn !value || !value.trim()\n\t}", "static isNullOrEmpty(obj) {\n if (obj === null || obj === undefined || obj.length === 0) {\n return true;\n } else {\n return false;\n }\n }", "isEmpty() {\n return this._size === 0;\n }", "isEmpty() {\n const isHeaderEmpty = this.__headerTextEditor.getEditorState().read($canShowPlaceholderCurry(false));\n const isSubheaderEmpty = this.__subheaderTextEditor.getEditorState().read($canShowPlaceholderCurry(false));\n const isDisclaimerEmpty = this.__disclaimerTextEditor.getEditorState().read($canShowPlaceholderCurry(false));\n\n return !this.__backgroundColor &&\n !this.__backgroundImageSrc &&\n !this.__buttonColor &&\n !this.__buttonText &&\n isDisclaimerEmpty &&\n isHeaderEmpty &&\n !this.__labels.length &&\n isSubheaderEmpty;\n }", "isEmpty() {\n return this.data.length === 0;\n }", "isEmpty() {\n return (this.length === 0);\n }", "isEmpty() {\n return (this.length === 0);\n }", "function isEmpty(val) {\n\treturn (val) ? false : true;\n}", "isEmpty() {\r\n\t\treturn this.size == 0;\r\n\t}", "isEmpty() {\n return this._list.length == 0 ? true : false;\n }", "is_empty(value) {\n return (\n (value == undefined) ||\n (value == null) ||\n (value.hasOwnProperty('length') && value.length === 0) ||\n (value.constructor === Object && Object.keys(value).length === 0)\n )\n }", "isValueEmpty(input) {\n return input ? true : false\n }", "isEmpty () {\n return (!this || this.length === 0 || !this.trim());\n }", "function isEmpty(valor){\n if(typeof valor === 'object'){\n for(var key in valor) {\n if(valor.hasOwnProperty(key))\n return false;\n }\n return true;\n }\n\n if(valor === undefined | valor == null | valor == '' ){\n return true;\n }\n return false;\n }", "isEmpty() {\n if (this.#size == 0) {\n return true;\n } else {\n return false;\n }\n }", "isEmpty() {\n return this.length === 0;\n }", "isEmpty() {\n return this.length === 0;\n }", "notNull(val) {\n return val !== null;\n }", "isEmpty(){}", "function isEmpty(o) {\n var r;\n each(o, function (_, v) {\n if (v !== null) {\n r = true;\n }\n });\n return !r;\n }", "isEmpty() {\n return this.length==0;\n }", "_isNeverEmpty() {\n return this._neverEmptyInputTypes.indexOf(this._type) > -1;\n }", "_isNeverEmpty() {\n return this._neverEmptyInputTypes.indexOf(this._type) > -1;\n }", "isEmpty() {\n return this.size() === 0; \n }", "function IsUndefinedNullOrEmpty(item) {\r\n return (item == undefined || item == null || item == '');\r\n}", "isEmpty() {\n if (this._storage.head === null) {\n return true;\n }\n return false;\n }", "get empty() {\n return !this._isNeverEmpty() && !this._elementRef.nativeElement.value && !this._isBadInput() &&\n !this.autofilled;\n }", "function isEmpty(value) {\n if (value != null && value != undefined && value.length != 0)\n return false;\n return true;\n}", "isEmpty() {\n return this.size == 0;\n }", "isEmpty()\n {\n if(this.front===null)\n return true;\n else\n return false;\n }", "get empty() {\n return !this._isNeverEmpty() && !this._elementRef.nativeElement.value && !this._isBadInput() && !this.autofilled;\n }", "function isNullOrUndefined(value){return value===null||value===undefined;}", "hasValue() {\n if (this.isMultiple) {\n return this._valueItems.length !== 0;\n }\n else {\n return this._valueItems.length !== 0 && !this._isNullOrWhiteSpace(this._valueItems[0]);\n }\n }", "isEmpty() { return !this.ast; }", "empty(schema, object) {\n return !_.find(schema, function (field) {\n // Return true if not empty\n const value = object[field.name];\n if (value !== null && value !== undefined && value !== false) {\n const emptyTest = self.fieldTypes[field.type].empty;\n if (!emptyTest) {\n // Type has no method to check emptiness, so assume not empty\n return true;\n }\n return !emptyTest(field, value);\n }\n });\n }", "function isEmpty(value)\r\n\t{\r\n\t\tif(value!=\"\" && value!=null && value!=undefined)\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "function isemptyornull(value)\n {\n return !(typeof value === \"string\" && value.length > 0);\n }", "function isNully (value) {return isNull(value) || typeof value === 'undefined'}", "isEmpty() {\n if (this.head == null && this.tail == null){\n return true;\n }\n else {\n return false;\n }\n }", "function empty(campo){\n\tif(campo === '' || campo === undefined || campo === null || campo === false){\n\t\treturn true;\n\t}\n\t\n\treturn false;\n}", "function isEmpty(theVar) {\n if (isNull(theVar))\n return true;\n if (theVar == '')\n return true;\n return false;\n}", "function isEmpty() {\n return ( 0 === dataset.length );\n }", "function isNullOrUndefined(data) {\n return (data == null || data == \"null\" || data == \"\" || (typeof data == \"undefined\"));\n}", "empty() {\n\t\tif (this.size() === 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "isEmpty() {\n\t\tif (this.head == null) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "isEmpty() {\n\t\tif (this.head == null) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "_isEmpty(value) {\n return _.isNil(value) || (_.isString(value) && value.trim().length === 0);\n }", "_isEmpty(value) {\n return _.isNil(value) || (_.isString(value) && value.trim().length === 0);\n }", "_isEmpty(value) {\n return _.isNil(value) || (_.isString(value) && value.trim().length === 0);\n }", "isEmpty() {\r\n\t\t\t\t\treturn !this.expressions.length;\r\n\t\t\t\t}", "function isEmpty(obj){\n\t\treturn (typeof obj == 'undefined' || obj == 'undefined' || obj == null\n\t\t\t|| JSON.stringify(obj) === JSON.stringify({}) || obj.length <= 0);\n\t}", "isEmpty() {\n\t\treturn Object.keys(this.items).length == 0\n\t}", "_isEmpty() {\n return this.modelValue?.length === 0;\n }", "isEmpty() {\n return 0 == this.q.length;\n }", "isEmpty() {\n\t\treturn this.items.length === 0;\n\t}", "function isEmptyOrNull(field) {\n return (null == field || \"\" == field);\n }", "isEmpty() { }", "function isEmptyState(state) {\n if (state === undefined) {\n return true;\n }\n else if (state === null) {\n return true;\n }\n else if (typeof (state) === 'object' && Object.keys(state).length === 0) {\n return true;\n }\n else {\n return false;\n }\n }", "isEmpty() {\n if (this.length < 1) {\n return true;\n }\n return false;\n }", "isEmpty() {\n if (this.length < 1) {\n return true;\n }\n return false;\n }", "isEmpty() {\n return _size == 0;\n }", "function isEmpty (binding) {\n return binding.value === '' || binding.value === undefined || binding.value === null\n}", "isEmpty() {\n if (this.size == 0) {\n return true;\n }\n return false;\n }", "empty () { return this.length === 0 }", "isEmpty(){\n let top = this.peek();\n return top == null || top == \"\";\n }", "isEmpty() {\n return this.length() < 1;\n }", "get is_empty() {\n return !!(this.flags & PaintVolumeFlags.IS_EMPTY);\n }", "function bs_isEmpty(theVar) {\n\tif (bs_isNull(theVar)) return true;\n\tif (theVar == '') return true;\n\treturn false;\n}", "isEmpty(){\n return this.length === 0;\n }", "function isBlank (thing) {\n return (!thing || thing.length === 0)\n}", "isEmpty() {}", "isEmpty() {\n \n if (this.head == null){\n return true\n }\n else {\n return false\n }\n\n }", "isEmpty() { \n return this.size == 0; \n }", "isEmpty() {\n return this.head ? false : true\n }", "isEmpty(value) {\n return value == '' ? true : false;\n }", "get isEmpty() {\n return this._programInternal.length === 0;\n }", "isEmpty() {\n return this.size === 0;\n }", "isEmpty() {\n return this.size === 0;\n }", "isEmpty() {\n return this.size === 0;\n }", "isEmpty() {\n return this.size === 0;\n }" ]
[ "0.7672194", "0.7252421", "0.71273136", "0.7116996", "0.70661485", "0.7051642", "0.7050091", "0.7041111", "0.7041111", "0.7030639", "0.7014427", "0.7003101", "0.7003101", "0.6994741", "0.69885373", "0.69715047", "0.69570434", "0.69570434", "0.6952664", "0.6924352", "0.6923536", "0.6923405", "0.6922452", "0.6916553", "0.6906901", "0.6899091", "0.68968475", "0.68968475", "0.6892228", "0.68889254", "0.6879981", "0.6875416", "0.68717086", "0.68630004", "0.6858021", "0.68474156", "0.6833531", "0.6833531", "0.6829521", "0.6823632", "0.68183565", "0.68144715", "0.6802999", "0.6802999", "0.6801736", "0.6800897", "0.67927396", "0.6792674", "0.67888767", "0.67871827", "0.6783504", "0.6774671", "0.6767405", "0.676331", "0.67600906", "0.67567337", "0.6745985", "0.6744837", "0.6744424", "0.6740181", "0.67332363", "0.67224467", "0.6718379", "0.67169476", "0.67097735", "0.67014563", "0.67014563", "0.6697771", "0.6697771", "0.6697771", "0.669194", "0.6690431", "0.6683725", "0.66803044", "0.66734666", "0.6672337", "0.6660992", "0.665248", "0.6645667", "0.6645211", "0.6645211", "0.6644321", "0.6638805", "0.6630591", "0.6629564", "0.66248935", "0.662069", "0.66200703", "0.66187894", "0.6617111", "0.6614604", "0.66138256", "0.66127086", "0.66104543", "0.66051614", "0.65958595", "0.65938896", "0.65911984", "0.65911984", "0.65911984", "0.65911984" ]
0.0
-1
Remove the protocol for the referral token
function removeProtocol(href) { return href.replace(/.*?:\/\//g, ""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function urlWithoutProtocol(url) {\n return url.replace(protocolReg, '');\n }", "function removeStoredToken(){\n var url = 'https://accounts.google.com/o/oauth2/revoke?token=' + tokenStored;\n window.fetch(url);\n chrome.identity.removeCachedAuthToken({token: tokenStored}, function (){});\n}", "function removeToken() {\n setValue(\"token\", null);\n}", "function revokeToken() {\n\t\texec_result.innerHTML='';\n\t\tgetAuthToken({\n\t\t\t'interactive': false,\n\t\t\t'callback': revokeAuthTokenCallback,\n\t\t});\n\t}", "static revokeToken() {\n this._revokeUserAuthorizationFromStore();\n\n const url = this.authUrlBeginning + \"revoke_token/\";\n const tokenFromLS = this.getTokenFromLS();\n\n localStorage.setItem(\"tokenObject\", \"\");\n\n const data = { token: tokenFromLS, client_id: process.env.REACT_APP_CLIENT_ID };\n const options = {\n headers: {\n \"Content-Type\": \"application/json\"\n },\n method: \"POST\",\n body: data\n };\n\n this._fetchFromAPI(url, options);\n }", "function unlink(service, req, res) {\n var user = req.user;\n user[service].token = undefined;\n user.save(function(err) {\n res.redirect('/profile');\n })\n}", "function discardToken() {\n delete oauth.access_token;\n tokenStore.forceOAuth = JSON.stringify(oauth);\n }", "removeTokenBindingKey() {\n throw new Error(\"Method not implemented.\");\n }", "function omn_deleteHttp(url){\n var subString=\"\";\n var posicion= url.indexOf(\"http://\", 0);//search sub-string http:// in start of the string\n var posicionSSL= url.indexOf(\"https://\", 0);//search sub-string https:// in start of the string\n if(posicion==0){//if found, then delete the sub-string http\n subString= url.substring(7);\n url= subString;\n }\n if(posicionSSL==0){//if found, then delete the sub-string https\n subString= url.substring(8);\n url= subString;\n }\n return url;\n}", "function clearToken() {\n token = null;\n return;\n }", "function removeToken() {\n localStorage.removeItem('authorization');\n }", "function unregister ()\n{\n if (typeof (webphone_api.plhandler) !== 'undefined' && webphone_api.plhandler !== null)\n webphone_api.plhandler.Unregister();\n}", "resetToken(){\n if (this._accountName && this._password) {\n __WEBPACK_IMPORTED_MODULE_1__Client__[\"a\" /* client */].tokenObj = null;\n }\n }", "function cleanUpLink(link) {\n return link.replace('http:', 'https:');\n}", "function revokeToken() {\n // user_info_div.innerHTML=\"\";\n chrome.identity.getAuthToken({ 'interactive': false },\n function(current_token) {\n if (!chrome.runtime.lastError) {\n\n // @corecode_begin removeAndRevokeAuthToken\n // @corecode_begin removeCachedAuthToken\n // Remove the local cached token\n chrome.identity.removeCachedAuthToken({ token: current_token },\n function() {});\n // @corecode_end removeCachedAuthToken\n\n // Make a request to revoke token in the server\n var xhr = new XMLHttpRequest();\n xhr.open('GET', 'https://accounts.google.com/o/oauth2/revoke?token=' +\n current_token);\n xhr.send();\n // @corecode_end removeAndRevokeAuthToken\n\n // Update the user interface accordingly\n // changeState(STATE_START);\n // sampleSupport.log('Token revoked and removed from cache. '+\n // 'Check chrome://identity-internals to confirm.');\n }\n });\n}", "unsubscribe(flag){\r\n if(!flag){\r\n this.callbacks = {};\r\n }else if (typeof flag === 'string'){\r\n if(flag.indexOf('token_') === 0){\r\n let callbackObj = Object.values(this.callbacks).find(obj=> obj.hasOwnProperty(flag));\r\n if(callbackObj){\r\n delete this.callbacks[flag]\r\n }\r\n }else{\r\n delete this.callbacks[flag];\r\n }\r\n }\r\n }", "function removeProtocolPrefix (imageurl) {\n\treturn imageurl.replace(/^[a-zA-Z]+\\:\\/\\//, '');\n}", "function removeChar(protocol) {\n if (protocol.includes('.')) {\n const index = protocol.indexOf('.')\n return protocol.substring(0, index) + '-' + protocol.substring(index + 1)\n } else {\n return protocol\n }\n}", "destroyToken() {\n localStorage.removeItem('Authorization');\n }", "removeReprompt() {\n delete this._response.reprompt;\n }", "function resetBlockedSites() {\n\tbrowser.webRequest.onBeforeRequest.removeListener(listener);\n\n\tgetBlockedSitesFormatted();\n}", "async revokeToken() {\n\t\tif (!this.token) {\n\t\t\tthrow new Error('No token to revoke.');\n\t\t}\n\n\t\treturn send('GET', GOOGLE_REVOKE_TOKEN_URL + this.token).then(r => {\n\t\t\tthis.configure({\n\t\t\t\tkey: this.key,\n\t\t\t\tscope: this.scope,\n\t\t\t\tadditionalClaims: this.additionalClaims,\n\t\t\t\temail: this.iss,\n\t\t\t\tsub: this.sub,\n\t\t\t});\n\t\t});\n\t}", "function stripScheme(s) {\n return (s.match(/^.*?:\\/\\//) ? s.substring(s.indexOf('://')+3) : s);\n }", "local(url) {\n return url.replace(/^(https?:)?\\/\\/[^/]+/, '');\n }", "deleteUserApiToken() {\n this.__userApiToken__ = null\n sessionStorage.removeItem('freendies-user-token')\n }", "function removeDeviceToken() {\n var tkn = {\n \"token\": $scope.regId\n };\n $http.post('http://192.168.1.106:8000/unsubscribe', JSON.stringify(tkn))\n .success(function(data, status) {\n console.log(\"Token removed, device is successfully unsubscribed and will not receive push notifications.\");\n })\n .error(function(data, status) {\n console.log(\"Error removing device token.\" + data + \" \" + status)\n });\n }", "function removeAllWhitelistUrl() {\n savedWhitelistedURL = [];\n actualBrowser.storage.local.set({\"whitelist\": savedWhitelistedURL});\n actualBrowser.runtime.sendMessage({data: JSON.stringify(savedWhitelistedURL), subject: \"whitelist\"});\n}", "function revokeAuthTokenCallback(current_token) {\n\t\tif (!chrome.runtime.lastError) {\n\n\t\t\t// Remove the local cached token\n\t\t\tchrome.identity.removeCachedAuthToken({ token: current_token }, function() {});\n\n\t\t\t// Make a request to revoke token in the server\n\t\t\tvar xhr = new XMLHttpRequest();\n\t\t\txhr.open('GET', 'https://accounts.google.com/o/oauth2/revoke?token=' +\n\t\t\t\t current_token);\n\t\t\txhr.send();\n\n\t\t\t// Update the user interface accordingly\n\t\t\tchangeState(STATE_START);\n\t\t\tsampleSupport.log('Token revoked and removed from cache. '+\n\t\t\t\t\t\t\t'Check chrome://identity-internals to confirm.');\n\t\t}\n\t}", "function logout() {\n\t\t\ttokenStore['fbtoken'] = undefined;\n }", "function stripScheme(s) {\n return (s.match(/^.*?:\\/\\//) ? s.substring(s.indexOf('://')+3) : s);\n }", "reset() {\n this.token = DEFAULT_TOKEN\n this.user = null\n this.institution = null\n api.unsetToken()\n }", "function cleanLink(link) {\n // if it's a rel iq link\n if(link.indexOf('relate') > 0) {\n link = link.replace(/^(.*?)%2F%2F/,'');\n link = link.replace(/&.*$/,'');\n // now clean up the encoded URL pieces and remove junk at the end\n link = 'https://' + decodeURIComponent(link.replace(/\\+/g, '%20'));\n }\n // take off any UTM codes at the end\n if(link.indexOf('?utm') > 0) {\n link = link.substring(0, link.indexOf('?utm'));\n }\n return link;\n}", "static removeToken() {\n window.localStorage.removeItem(this.TOKEN_KEY);\n }", "function clearAuthorizationContext(){\n\tsetContextURL(baseURL + \"clearAuthorizationContext\");\n}", "function clearAuthorizationContext(){\n\tsetContextURL(baseURL + \"clearAuthorizationContext\");\n}", "reset() {\n const protocol = this.getBestProtocolMatch();\n\n this.setHangingProtocol(protocol);\n }", "pronunciationChallengeDeletedCallback(challenge) {}", "delete(token) {\n this.assignedValues.delete(token);\n this.tearDownBindingObserver(token);\n const upstream = this.getRaw(token);\n\n if (upstream) {\n this.hydrate(token, upstream);\n } else {\n this.store.delete(token);\n }\n }", "static deauthenticateUser() {\n localStorage.removeItem('token');\n }", "static deauthenticateUser() {\n localStorage.removeItem('token');\n }", "static deauthenticateUser() {\n localStorage.removeItem('token');\n }", "static deauthenticateUser() {\n localStorage.removeItem('token');\n }", "static deauthenticateUser() {\n localStorage.removeItem('token');\n }", "clear() {\n currentAccessToken = null;\n store.removeItem('__refresh_data__');\n }", "clear() {\n currentAccessToken = null;\n store.removeItem('__refresh_data__');\n }", "function stripGatewayAuthenticationParameter (aUrl) {\n if (aUrl.query && aUrl.query.useGateway) {\n delete aUrl.query.useGateway\n }\n if (aUrl.query.nextUrl) {\n var theNextUrl = decodeURIComponent(aUrl.query.nextUrl)\n aUrl.query.nextUrl = decodeURIComponent(theNextUrl)\n }\n var theUrl = url.format(aUrl)\n\n return theUrl\n}", "destroyToken() {\n axios.defaults.headers.common = {};\n localStorage.removeItem(btoa('token'));\n }", "static deauthenticateUser() {\n localStorage.removeItem('token');\n }", "function removeFacebookAccountLink() {\n\t\t\t\tinit();\n\t\t\t\tvar currCookie = cookie.get(s.cookie.userId);\n\t\t\t\tif (currCookie) {\n\t\t\t\t\tvar cookieData = w.JSON.parse(currCookie);\n\t\t\t\t}\n\t\t\t\tif (authcode.get() && cookieData && cookieData.identityType == \"FACEBOOK\") {\n\t\t\t\t\tpubsub.publish(\"membership.test.get.facebook.subscriptions\");\n\t\t\t\t} else {\n\t\t\t\t\talert(\"You don't appear to be logged in with any authcode or you are logged in with a non-Facebook account. Please log in with your Facebook account and try again.\");\n\t\t\t\t}\n\t\t\t}", "removeAllURLQueryString() {\n delete this.urlObj.search;\n }", "clearObjectUrls_() {\n for (const url of this.objectUrls_) {\n URL.revokeObjectURL(url);\n }\n this.objectUrls_ = [];\n }", "resetRedirect() {\r\n this.queuedRedirectEvent = null;\r\n this.hasHandledPotentialRedirect = false;\r\n }", "function wipeUrlProps(options) {\n\t for (var i = 0, l = urlProps.length; i < l; ++i) {\n\t options[urlProps[i]] = null;\n\t }\n\t}", "removeToken(state) {\n localStorage.removeItem('accessToken');\n localStorage.removeItem('refreshToken');\n state.jwt_access = null;\n state.jwt_refresh = null;\n }", "function oauthLogoutG() {\n\tjso.wipeTokens();\n}", "function logout() {\n tokenStore['igtoken'] = undefined;\n }", "function decline_friend_request() {\n handle_friend_request_accept_or_decline(false);\n}", "clearTokenCookies() {\n this.cookies.set('token', null);\n }", "function trimReferrer(args) {\n var referrerInput = args.formElement.querySelector(\"#referrer\");\n var withoutQueryParams = referrerInput.value.split(\"?\")[0];\n referrerInput.value = withoutQueryParams;\n}", "function removePayload() {\n Ls.remove(payloadKeys.TOKEN);\n Ls.remove(payloadKeys.REFRESH_TOKEN);\n Ls.remove(payloadKeys.EXPIRES);\n}", "unset() {\n this.cachedToken = null;\n this.cachedCurrentUser = null;\n this.store.remove(this.tokenStore);\n this.store.remove(this.userStore);\n }", "function pushdeRegister() {\n kony.print(\"************ JS unregisterFromAPNS() called *********\");\n kony.push.deRegister({});\n}", "logout() {\n localStorage.removeItem('token');\n request.unset('Authorization');\n }", "static deauthenticateUser() {\n console.log(\"de-authenticate\")\n localStorage.removeItem('token');\n }", "async function revokeTokenB({ token, ipAddress }) {\n const refreshToken = await getRefreshToken(token);\n \n // revoke token and save\n refreshToken.revoked = Date.now();\n refreshToken.revokedByIp = ipAddress;\n await refreshToken.save();\n }", "async removeSignupToken () {\n\t\tawait this.api.services.signupTokens.remove(this.request.body.token, { requestId: this.request.id });\n\t}", "function deleteToken () {\n localStorage.removeItem('token')\n}", "function removeGoogleHeaderLink(name)\n{\n\tremoveMainLink(name);\n\tremoveSubLink(name);\t\n}", "clearToken() {\n this._localStorageService.remove(tokenKey);\n }", "function logoutDocusign() {\n getService().reset();\n}", "function fixRedirectUrlScheme(proxyRes) {\n if (proxyRes.headers['location']) {\n var loc = url.parse(proxyRes.headers['location']);\n if (loc.protocol == 'http:' && loc.port == tlsPort) {\n if (hostNames.indexOf(loc.hostname.toLowerCase()) >= 0) {\n loc.protocol = 'https:';\n proxyRes.headers['location'] = loc.format();\n console.log('### http -> https: ' + loc.protocol + loc.host + loc.path + ' ...');\n }\n }\n }\n}", "async function revokeToken({ token, ipAddress }) {\n const refreshToken = await getRefreshToken(token);\n \n // revoke token and save\n refreshToken.revoked = Date.now();\n refreshToken.revokedByIp = ipAddress;\n await refreshToken.save();\n }", "async revokeAll() {\n await this.revoke('access_token');\n await this.revoke('refresh_token');\n }", "function clear_mobileno() {\r\n \tself.user.mobileno = '';\r\n }", "async unSubscribeUser(token) {\n return await PushActive.c.disableDevice(token);\n }", "function removeFromLink(str){\n var presentLink = $( \"#your_link\" ).val();\n if(presentLink == link){//original link\n } \n // has '\\\\w?' for TID removing\n var regExp1 = new RegExp('[\\\\?|\\\\&]'+str+'\\\\w?');\n var regExp2 = new RegExp('[\\\\?]'+str+'\\\\w?\\&?');\n var regExp3 = new RegExp('[\\\\&]'+str+'\\\\w?');\n var mutchSumm=presentLink.match('&');\n// console.log(mutchSumm);\n if(mutchSumm){//if more than 1 param\n var newLink = '';\n if(presentLink.match(regExp3)){\n newLink = presentLink.replace(regExp3, ''); \n }\n if(presentLink.match(regExp2)){\n newLink = presentLink.replace(regExp2, '?');\n }\n// console.log(newLink);\n $( \"#your_link\" ).val(newLink);\n \n }else{\n var newLink = presentLink.replace(regExp1, '');\n $( \"#your_link\" ).val(newLink);\n// console.log(newLink);\n// console.log(regExp1);\n }\n return newLink;\n \n}", "removeNodeConnections(node) {\n if (node.prev !== null) {\n node.prev.next = node.next\n }\n if (node.next !== null) {\n node.next.prev = node.prev\n }\n node.prev = null\n node.next = null\n }", "componentWillUnmount() {\n Linking.removeEventListener(\"url\", this._handleOpenURL);\n }", "function tt_OpDeHref(el) {\n if (!tt_op)\n return;\n if (tt_elDeHref)\n tt_OpReHref();\n while (el) {\n if (el.hasAttribute && el.hasAttribute(\"href\")) {\n el.t_href = el.getAttribute(\"href\");\n el.t_stats = window.status;\n el.removeAttribute(\"href\");\n el.style.cursor = \"hand\";\n tt_AddEvtFnc(el, \"mousedown\", tt_OpReHref);\n window.status = el.t_href;\n tt_elDeHref = el;\n break;\n }\n el = tt_GetDad(el);\n }\n}", "function redactUrlField(url){\n if(url && urlValidator.isHttpsUri(url)){\n const urlParts = urlParser.parse(url);\n return urlParts.protocol.concat(\"//\", urlParts.host);\n } else {\n return url;\n }\n}", "function m_tt_OpDeHref(el)\n{\n\tif(!m_tt_op)\n\t\treturn;\n\tif(m_tt_elDeHref)\n\t\tm_tt_OpReHref();\n\twhile(el)\n\t{\n\t\tif(el.hasAttribute(\"href\"))\n\t\t{\n\t\t\tel.t_href = el.getAttribute(\"href\");\n\t\t\tel.t_stats = window.status;\n\t\t\tel.removeAttribute(\"href\");\n\t\t\tel.style.cursor = \"hand\";\n\t\t\tm_tt_AddEvtFnc(el, \"mousedown\", m_tt_OpReHref);\n\t\t\twindow.status = el.t_href;\n\t\t\tm_tt_elDeHref = el;\n\t\t\tbreak;\n\t\t}\n\t\tel = el.parentElement;\n\t}\n}", "static clear () {\n this.token = null\n this.user = null\n }", "unshareLink(kind, shareId) {\r\n const dependency = this.addBatchDependency();\r\n return this.getShareable().then(shareable => {\r\n dependency();\r\n return shareable.unshareLink(kind, shareId);\r\n });\r\n }", "function resetAuth() {\n getOAuthService().reset();\n}", "resetForm() {\n this.form.url = '';\n }", "invalidateReferences() {\n this._references = undefined;\n }", "invalidateReferences() {\n this._references = undefined;\n }", "async revokeToken(token){\n\t\tconsole.log(`revokeToken:token=${JSON.stringify(token)}`)\n\t\treturn true\n\t}", "clearAuthToken() {\r\n this.realClearAuthToken(sessionStorage);\r\n this.realClearAuthToken(localStorage);\r\n }", "static deauthenticateUser() {\n sessionStorage.removeItem('refreshToken');\n }", "function revokeCredentials() {\n\tos.storage.login.clear(); // Clean bad storage\n\tos.delay(function(){chrome.runtime.reload()},300); // Reload client, triggering setup\n}", "deleteUrl(){\n\n if(!window.confirm('Are you sure to delete this URL?')){\n return false;\n }\n\n let url = `http://localhost:3000/${this.props.hash}/${this.props.removeToken}`;\n\n fetch(url, {\n method: 'delete',\n headers: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-type': 'application/json'\n }\n })\n .then(res => res.json())\n .then((res) => {\n this.props.onDelete();\n })\n .catch((err)=> {\n console.log('error: ', err);\n });\n }", "delink (record) {\n const extractLinkId = obj => {\n try {\n const url = obj.links.self\n const sid = url.match(/\\d+$/g)[0]\n return parseInt(sid, 10)\n } catch (e) {\n // Usually because of a bad attempt at regex\n return null\n }\n }\n\n let delinked = this.fields.reduce(function (rec, field) {\n let val = null\n\n // If this field has its own delinker, use that\n if (field.delinker) {\n val = field.delinker(rec[field.name])\n delete rec[field.name]\n } else if (rec.hasOwnProperty(field.name) && isArray(rec[field.name])) {\n // IN some cases, the 'link' property of a record is an array\n // of other links. If it is an array, we need to map each object\n // to our extractLinkId function. This results in an array of Ids\n val = rec[field.name].map(obj => extractLinkId(obj))\n delete rec[field.name]\n } else if (rec.hasOwnProperty(field.name)) {\n // If it's just an object, then extract the link id\n val = extractLinkId(rec[field.name])\n delete rec[field.name]\n }\n rec[field.rename] = val\n return rec\n }, record)\n\n // Stage 1 - remove link properties\n return Object.keys(delinked).reduce((rec, key) => {\n if (typeof rec[key] === 'object' && rec[key] !== null) {\n if (rec[key].hasOwnProperty('links') || rec[key].hasOwnProperty('self')) {\n delete rec[key]\n }\n }\n return rec\n }, delinked)\n }", "remappedURI(uri, baseURI) {\n\n // var match = uri.match( RegExp( \"http://(vwf.example.com)/(.*)\" ) );\n\n // if ( match ) {\n // uri = window.location.protocol + \"//\" + window.location.host +\n // \"/proxy/\" + match[1] + \"/\" + match[2];\n // }\n if (baseURI && uri[0] !== \"/\") {\n\n let newURI = \"\";\n let parts = baseURI.split('/');\n parts[parts.length - 1] = uri;\n parts.map(el => {\n newURI = newURI + el + '/';\n })\n\n return newURI.slice(0, -1)\n\n }\n return uri\n\n }", "ClearStaticToken() {\n this.staticToken = undefined;\n }", "ClearStaticToken() {\n this.staticToken = undefined;\n }", "function removeBaseUrl(href) {\n return href.replace(/^https?:\\/\\/[^\\/]+/i,'');\n}", "function logout() {\n //$cookies.remove('token');\n }", "function logout() {\n //$cookies.remove('token');\n }" ]
[ "0.6180391", "0.5867053", "0.5826833", "0.55653465", "0.55465436", "0.5531629", "0.55298555", "0.5409788", "0.5377281", "0.5373203", "0.5362341", "0.5348067", "0.52953166", "0.5282851", "0.524859", "0.5232394", "0.52268034", "0.5217557", "0.5215772", "0.5181174", "0.51475173", "0.51448613", "0.51360816", "0.5127152", "0.5113621", "0.51076573", "0.50980115", "0.50879675", "0.5086845", "0.5081547", "0.507692", "0.50748557", "0.5067856", "0.5022015", "0.5022015", "0.50146645", "0.5010648", "0.5009187", "0.5004576", "0.5004576", "0.5004576", "0.5004576", "0.5004576", "0.50002384", "0.50002384", "0.49847415", "0.49769226", "0.49714363", "0.49682602", "0.49572375", "0.49435508", "0.4942373", "0.4936672", "0.49329787", "0.49323058", "0.4926699", "0.49247843", "0.49147516", "0.4903005", "0.48959836", "0.48884538", "0.48795125", "0.48696175", "0.48647937", "0.48594108", "0.48398468", "0.48358533", "0.48322788", "0.48214862", "0.482042", "0.48191226", "0.48159426", "0.4815377", "0.48057747", "0.47957128", "0.47846383", "0.47837135", "0.47823104", "0.47821635", "0.47692615", "0.47644743", "0.47643083", "0.47615296", "0.4754467", "0.47485346", "0.4742527", "0.4742527", "0.4733933", "0.47316134", "0.47314474", "0.47310704", "0.47291502", "0.47245994", "0.47180322", "0.47170046", "0.47170046", "0.47169256", "0.4708697", "0.4708697" ]
0.64212996
1
Codewars > JavaScript > 8 kyu Sum without highest and lowest number Solution 1
function sumArray(array) { if(array == null || array.length <= 1) { return 0; } var lowAndHigh = Math.min(...array) + Math.max(...array); var addArray = array.reduce((acc, currentVal) => acc + currentVal); return addArray - lowAndHigh; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function kadaneAlgo(nums) {\n let currSum = nums[0], maxSum = nums[0];\n\n for (let i = 1; i < nums.length; i++) {\n if (currSum < 0) currSum = 0;\n currSum = currSum + nums[i];\n maxSum = Math.max(currSum, maxSum);\n }\n return maxSum;\n }", "function LargestSum() {\n\tvar test = [1, 3, -5, 23, -11, 6, 37, 21, -31, 10, 9, 19];\n\n\tfunction dpLargeSum(collection) {\n\t\tvar largest = [];\n\t\tlargest[0] = collection[0];\n\t\t// var lastIndex = 0;\n\t\tfor (var i = 1; i < collection.length; i++) {\n\t\t\t// largest[i] represents the largest sum for sub sequence ending with collection[i]\n\t\t\t// largest[i] does not mean the largest sum for the first i items (which could make things much more complicated)\n\t\t\tlargest[i] = largest[i - 1] + collection[i] > collection[i] ? largest[i - 1] + collection[i] : collection[i];\n\t\t}\n\t\tconsole.log(largest);\n\t\treturn max(largest);\n\t}\n\n\tfunction max(collection) {\n\t\tvar maxVal = collection[0];\n\t\tcollection.forEach((item) => {\n\t\t\tif (item > maxVal) {\n\t\t\t\tmaxVal = item;\n\t\t\t}\n\t\t});\n\t\treturn maxVal;\n\t}\n\n\tfunction bruteForce(collection) {\n\t\tvar sum = 0;\n\t\tvar max = 0;\n\t\t// starting index\n\t\tfor (var i = 0; i < collection.length; i++) {\n\t\t\t// define the length of this loop\n\t\t\tfor (var j = 0; j < collection.length - i; j++) {\n\t\t\t\t// starting index to index + length\n\t\t\t\tfor (var k = i; k < j + i + 1; k++) {\n\t\t\t\t\tsum += collection[k]\n\t\t\t\t}\n\t\t\t\tif (sum > max) {\n\t\t\t\t\tmax = sum;\n\t\t\t\t}\n\t\t\t\tsum = 0;\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}\n\n\tconsole.log(dpLargeSum(test));\n\tconsole.log(bruteForce(test));\n}", "function addto(arr,num){\n if(arr.length < num){\n return null;\n }\n let tempSum = 0;\n let maxSum = 0;\n for(let i = 0; i<num ; i++){\n maxSum += arr[i];\n }\n \ntempSum = maxSum;\n for(let i = num;i<arr.length;i++){\n \n tempSum = tempSum - arr[i-num] + arr[i]; //8+arr[2]-arr[2-2] === 8+0-7\n maxSum = Math.max(tempSum,maxSum);\n console.log(maxSum)\n }\n return maxSum;\n}", "function kadanesAlgorithm(array) {\n\tlet maxSum = array[0] // -2 \n\tlet currentSum = array[0] // -2 \n\tfor (let i = 1; i < array.length; i++ ) {\n\t\tcurrentSum += array[i]\n\t\tcurrentSum = Math.max(array[i], currentSum)\n\t\tmaxSum = Math.max(currentSum, maxSum) \n\t}\n\treturn maxSum\n}", "function main() {\n var n_temp = readLine().split(' ');\n var n = parseInt(n_temp[0]);\n var m = parseInt(n_temp[1]);\n \n var res = [];\n var sum = 0;\n var max = 0;\n \n for (var i = 0; i < n; i++) {\n res.push(0);\n }\n \n for(var a0 = 0; a0 < m; a0++){\n var a_temp = readLine().split(' ');\n var a = parseInt(a_temp[0]);\n var b = parseInt(a_temp[1]);\n var k = parseInt(a_temp[2]);\n \n res[a-1] += k;\n if(b<n) res[b] -= k;\n }\n \n for (var i = 0; i < n; i++) {\n sum += res[i];\n if(max < sum) max = sum;\n }\n console.log(max);\n}", "function sumOfLowNumbers (a, b, c, d, e) {\n if (a > 6) {a=0} \n if (b > 6) {b=0} \n if (c > 6) {c=0} \n if (d > 6) {d=0} \n if (e > 6) {e=0}\n console.log(a + b + c + d + e)\n}", "function sum(numArr) {\n //keep track of highest sum\n let highestSum = 0;\n\n for (let i = 0; i < numArr.length; i++) {\n for (let j = i; j < numArr.length; j++) {\n let sum = 0;\n for (let k = i; k <= j; k++) {\n sum = sum + numArr[k];\n }\n if (sum > highestSum) {\n highestSum = sum;\n }\n }\n }\n return highestSum;\n}", "function getSolution() {\n var sum = 0;\n for (var i = 0; i < 1000; i++) {\n if (i % 3 === 0 || i % 5 === 0) sum += i;\n }\n return sum;\n}", "function getSum( a,b ) {\n let min = Math.min(a,b);\n let max = Math.max(a,b);\n let sum = 0;\n if (min >= 0) {\n while (max-min >= 1) {\n sum = sum + max;\n max--;\n }\n } else if (min < 0) {\n while (-min-max >= 1) {\n sum += max;\n max--;\n }\n }\n\n \n \n console.log(min, max, sum)\n \n return;\n}", "function miniMaxSum(arr) {\n // Complete this function\n var min = arr.indexOf(Math.min(...arr));\n var max = arr.indexOf(Math.max(...arr));\n var small = 0;\n var big = 0;\n for(var i = 0; i < arr.length; i++){\n if (i !== max){\n small = small + arr[i]\n }\n if (i !== min){\n big = big + arr[i]\n }\n }\n console.log(small + ' ' + big)\n}", "function sumAll(arr) {\n var allNums = [];\n var result = 0;\n var big = Math.max(arr[0],arr[1]); \n var small = Math.min(arr[0],arr[1]);\n for (var j = small; j <= big; j++) {\n allNums.push(j);\n }\n console.log(allNums);\n for(var i = 0; i <= allNums.length-1; i++) {\n result += allNums[i];\n }\n return result;\n}", "function kadanesAlgorithm(array) {\n let maxSumEndingHere = array[0];\n let maxSoFar = array[0];\n \n for (let i = 1; i < array.length; i++) {\n const currNum = array[i];\n maxSumEndingHere = Math.max(currNum, currNum + maxSumEndingHere);\n maxSoFar = Math.max(maxSumEndingHere, maxSoFar);\n }\n return maxSoFar;\n}", "function main() {\n var t = parseInt(readLine());\n for(var a0 = 0; a0 < t; a0++){\n var n = parseInt(readLine());\n\n\n\n var biggest = [0,0];\n\n for(var i=0; i<n; i++){\n var acc=[0,0];\n if ((n-i)%5===0 && i%3===0){\n acc =[i,n-i];\n }\n\n if((n-i)%3===0 && i%5===0){\n acc =[n-i,i];\n }\n\n if(acc[0]>biggest[0]){\n biggest = acc;\n } else if(acc[1]>biggest[1]){\n biggest = acc;\n }\n\n }\n\n\n var ans=0;\n for(var j=0; j<biggest[1]; j++){\n ans+= (Math.pow(10,j) *3);\n }\n for(var j=biggest[1]; j<biggest[1]+ biggest[0]; j++){\n ans+= (Math.pow(10,j) *5);\n }\n\n if(biggest[0]===0 && biggest[1]===0){\n console.log(-1);\n } else {\n console.log(ans);\n }\n }\n}", "function maxSum(arr) {\n let highestSum = 0;\n let currentSum = 0;\n for (let startIndex = 0; startIndex < arr.length; startIndex++) {\n currentSum = 0;\n for (let i = startIndex; i < arr.length; i++) {\n currentSum = currentSum + arr[i];\n if (currentSum > highestSum) {\n highestSum = currentSum;\n }\n }\n //console.log(`current highest sum is ${highestSum}`);\n }\n return highestSum;\n}", "function getSum( a,b )\r\n {\r\n let max = Math.max(a,b);\r\n let min = Math.min(a,b);\r\n let sum =0;\r\n if(a===b){\r\n return a;\r\n }else{\r\n for(let i =min ; i <= max ; i++) {\r\n sum +=i;\r\n }\r\n }\r\n return sum;\r\n \r\n }", "function miniMaxSum(arr) {\n let sortedArray = arr.sort();\n \n let minSum, maxSum;\n \n let addAllNumbers = function (total, num) {\n return total + num;\n };\n \n maxSum = sortedArray.slice(1).reduce(addAllNumbers);\n minSum = sortedArray.slice(0, 4).reduce(addAllNumbers);\n \n console.log(minSum + \" \" + maxSum);\n }", "function largestSum(arr){\n let result = 0, currentResult = 0;\n\n for (let i = 0; i < arr.length; i += 1) {\n currentResult += arr[i];\n if (currentResult < 0) currentResult = 0;\n if (currentResult > result) result = currentResult;\n }\n\n return result;\n}", "function solution(A) {\r\n // write your code in JavaScript (Node.js 8.9.4)\r\n let a1 = A.map(i => 0);\r\n let a2 = A.map(i => 0);\r\n \r\n for (let i = 1, iR = A.length - 2; iR > 1; i++, iR--) {\r\n a1[i] = Math.max(A[i] + a1[i - 1], 0);\r\n a2[iR] = Math.max(A[iR] + a2[iR + 1], 0);\r\n }\r\n \r\n let maxNum = a1[0] + a2[2]; \r\n for (let i = 2; i < A.length - 1; i++) {\r\n maxNum = Math.max(a1[i - 1] + a2[i + 1], maxNum)\r\n }\r\n \r\n return maxNum;\r\n}", "function possibleSums(arr, max) {\n var sums = [];\n for (var i = 0; i < arr.length; i++) {\n var num1 = arr[i];\n for (var j = i; j < arr.length; j++) {\n if (num1 + arr[j] >= max) {\n continue;\n }\n sums.push(num1 + arr[j]);\n\n }\n }\n return sums;\n}", "function hourglassSum(arr) {\n let highestSum = -100;\n for (let i = 0; i < 4; i++) {\n for (let j = 0; j < 4; j++) {\n const sum = calculateSum(arr, [i,j]);\n if (sum > highestSum) {\n highestSum = sum;\n }\n }\n }\n return highestSum\n}", "function miniMaxSum(arr) {\n // Find the total of all numbers in the array.\n let total = 0;\n arr.forEach(n => (total += n));\n\n // Sort the array so we can easily remove the lowest and highest nums.\n const sorted = arr.sort((a, b) => a - b);\n const max = total - sorted.shift();\n const min = total - sorted.pop();\n\n console.log(min, max);\n}", "function miniMaxSum(arr) {\n\n \tlet sum =0;\n \tlet min = +Infinity;\n \tlet max = -Infinity;\n\n \tfor(let i =0; i < arr.length; i++) {\nsum = sum + arr[i]; //15 1+2+3+4+5\nif(arr[i] < min) {\nmin = arr[i]; //1\n}if(arr[i] > max) {\n\tmax = arr[i]; //5\n}\n\n}\nconsole.log(sum - max, sum - min); // 15 - 5 =10; 15- 1 = 14;\n}", "function highestSum(arr) {\n let first = arr[0];\n let second = 0;\n for (let index = 1; index < arr.length; index++) {\n const el = arr[index];\n if (el > first) {\n second = first;\n first = el; \n } else if (el > second) {\n second = el;\n }\n }\n return first + second;\n}", "function miniMaxSum(arr) {\n let newArr = [...arr].sort()\n let sum = 0;\n for (let i = 0; i < newArr.length; i++) {\n sum += newArr[i]\n }\n let minValue = sum - newArr[newArr.length - 1]\n let maxValue = sum - newArr[0]\n console.log(minValue, maxValue)\n }", "function maxSum(arr) {\n var tempSum = 0;\n var tempSum2 = 0;\n var m = 1;\n\n for (j = 0; j < arr.length; j++) {\n tempSum = tempSum + arr[j];\n }\n\n for (k = 0; k < arr.length; k++) {\n\n for (i = m; i < arr.length; i++) {\n var tempSum2 = tempSum2 + arr[i];\n }\n console.log(\"temp2\", tempSum2)\n if (tempSum2 > tempSum) {\n tempSum = tempSum2\n }\n tempSum2 = 0;\n m++\n }\n console.log(\"tempSum2\", tempSum2);\n\n return tempSum;\n}", "function solution(A) {\r\n // write your code in JavaScript (Node.js 8.9.4)\r\n\tlet positiveMaxNums0 = [-1, -1, -1];\r\n\tlet positiveMaxNums1 = [-1, -1, -1];\r\n\tlet negativeMaxNums0 = [-1, -1, -1];\r\n\tlet negativeMaxNums1 = [-1, -1, -1];\r\n\tA.forEach((item, i) => {\r\n\t\tif (item >= 0) {\r\n\t\t\tif (positiveMaxNums0[2] === -1 || A[positiveMaxNums0[2]] < item) {\r\n\t\t\t\tpositiveMaxNums0[0] = positiveMaxNums0[1];\r\n\t\t\t\tpositiveMaxNums0[1] = positiveMaxNums0[2];\t\t\t\r\n\t\t\t\tpositiveMaxNums0[2] = i;\r\n\t\t\t} else if (positiveMaxNums0[1] === -1 || A[positiveMaxNums0[1]] < item){\r\n\t\t\t\tpositiveMaxNums0[0] = positiveMaxNums0[1];\r\n\t\t\t\tpositiveMaxNums0[1] = i;\r\n\t\t\t} else if (positiveMaxNums0[0] === -1 || A[positiveMaxNums0[0]] < item) {\r\n\t\t\t\tpositiveMaxNums0[0] = i;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (positiveMaxNums1[0] === -1 || A[positiveMaxNums1[0]] > item) {\r\n\t\t\t\tpositiveMaxNums1[0] = i;\r\n\t\t\t} else if (positiveMaxNums1[1] === -1 || A[positiveMaxNums1[1]] > item){\r\n\t\t\t\tpositiveMaxNums1[1] = i;\r\n\t\t\t} else if (positiveMaxNums1[2] === -1 || A[positiveMaxNums1[2]] > item) {\r\n\t\t\t\tpositiveMaxNums1[2] = i;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (negativeMaxNums0[2] === -1 || A[negativeMaxNums0[2]] > item) {\r\n\t\t\t\tnegativeMaxNums0[0] = negativeMaxNums0[1];\r\n\t\t\t\tnegativeMaxNums0[1] = negativeMaxNums0[2];\r\n\t\t\t\tnegativeMaxNums0[2] = i;\r\n\t\t\t} else if (negativeMaxNums0[1] === -1 || A[negativeMaxNums0[1]] > item) {\r\n\t\t\t\tnegativeMaxNums0[0] = negativeMaxNums0[1];\r\n\t\t\t\tnegativeMaxNums0[1] = i;\r\n\t\t\t} else if (negativeMaxNums0[0] === -1 || A[negativeMaxNums0[0]] > item) {\r\n\t\t\t\tnegativeMaxNums0[0] = i;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (negativeMaxNums1[2] === -1 || A[negativeMaxNums1[2]] < item) {\r\n\t\t\t\tnegativeMaxNums1[0] = negativeMaxNums1[1];\r\n\t\t\t\tnegativeMaxNums1[1] = negativeMaxNums1[2];\t\r\n\t\t\t\tnegativeMaxNums1[2] = i;\r\n\t\t\t} else if (negativeMaxNums1[1] === -1 || A[negativeMaxNums1[1]] < item) {\r\n\t\t\t\tnegativeMaxNums1[0] = negativeMaxNums1[1];\r\n\t\t\t\tnegativeMaxNums1[1] = i;\r\n\t\t\t} else if (negativeMaxNums1[0] === -1 || A[negativeMaxNums1[0]] < item) {\r\n\t\t\t\tnegativeMaxNums1[0] = i;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\t\r\n\tconst num1 = positiveMaxNums0.filter((item) => item !== -1).length;\r\n\tconst num2 = negativeMaxNums0.filter((item) => item !== -1).length;\r\n\t\r\n\tif (num1 === 0) {\r\n\t\treturn A[negativeMaxNums1[0]] * A[negativeMaxNums1[1]] * A[negativeMaxNums1[2]];\r\n\t} else if (num2 === 0) {\r\n\t\treturn A[positiveMaxNums0[0]] * A[positiveMaxNums0[1]] * A[positiveMaxNums0[2]];\r\n\t} else if (num1 === 1) {\r\n\t\treturn A[positiveMaxNums0[2]] * A[negativeMaxNums0[2]] * A[negativeMaxNums0[1]];\r\n\t} else if (num1 === 2) {\r\n\t\tif (num2 === 1) {\r\n\t\t\treturn A[negativeMaxNums1[2]] * A[positiveMaxNums1[0]] * A[positiveMaxNums1[1]];\r\n\t\t} else {\r\n\t\t\treturn A[positiveMaxNums0[2]] * A[negativeMaxNums0[1]] * A[negativeMaxNums0[2]];\r\n\t\t}\t\t\r\n\t} else if (num1 === 3) {\r\n\t\tconst multiple1 = A[positiveMaxNums0[0]] * A[positiveMaxNums0[1]] * A[positiveMaxNums0[2]];\r\n\t\tif (num2 === 1) {\r\n\t\t\treturn multiple1;\r\n\t\t} else {\r\n\t\t\tconst multiple2 = A[positiveMaxNums0[2]] * A[negativeMaxNums0[1]] * A[negativeMaxNums0[2]];\r\n\t\t\treturn multiple1 > multiple2 ? multiple1 : multiple2;\r\n\t\t}\r\n\t}\r\n}", "function solution(number){\n var a=[]\n for(var i=number-1;i>0;i--){\n if(i%5==0 || i%3==0){\n a.push(i)\n }\n }\n console.log(a)\n if(a.length){\n \n var r=a.reduce(function(a,b){\n return a+b\n })\n }else {\n return 0\n }\n console.log(r)\n return r\n }", "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n let maxK1 = [];\n let maxK2 = [];\n maxK1[0] = maxK2[0] = 0;\n maxK1[A.length - 1] = maxK2[A.length - 1] = 0;\n for (let i = 1; i < A.length; i++) {\n if (i < A.length - 1) {\n maxK1[i] = Math.max(maxK1[i - 1] + A[i], 0);\n }\n let j = A.length - i;\n if (j < A.length - 1) {\n maxK2[j] = Math.max(maxK2[j + 1] + A[j], 0);\n }\n }\n let max = 0;\n for (let i = 1; i < A.length - 1; i++) {\n max = Math.max(max, maxK1[i-1] + maxK2[i+1]);\n }\n return max;\n}", "function solutionSix(){\n let sqrs = 0;\n let sum = 0;\n for(let i = 1; i <= 100; i++){\n sum += i;\n sqrs += i*i;\n }\n sum = sum*sum;\n return sum-sqrs;\n}", "function miniMaxSum(arr) {\n \n var min=0,max=0;\n var sum=0;\n for(var i=0;i<arr.length;i++)\n {\n sum=sum+arr[i]; \n }\n \n min=sum;\n for(var i=0;i<arr.length;i++)\n {\n var temp=sum;\n \n temp=temp-arr[i];\n if(temp>max){\n max=temp;\n }\n if(temp<min){\n min=temp;\n }\n }\n var result = min+\" \"+max;\n console.log(result);\n}", "function miniMaxSum(arr) {\n const sortedArr = arr.sort();\n const minValue = sortedArr[0];\n const maxValue = sortedArr[arr.length-1];\n let sumWithoutExtremePoints = 0;\n for(let i = 1; i < sortedArr.length - 1; i++) {\n sumWithoutExtremePoints += sortedArr[i];\n }\n console.log(`${sumWithoutExtremePoints+minValue} ${sumWithoutExtremePoints+maxValue}`);\n}", "function findSumAll(arr){\n let maxNum = Math.max(...arr);\n let minNum = Math.min(...arr);\n let sum = 0;\n let i = minNum;\n while(i <= maxNum){\n sum += i;\n i++\n console.log(i);\n }\n console.log(sum);\n\n}", "function largestPairSum(numbers){\n numbers.sort(function(a, b){ return b - a })\n return numbers[0] + numbers[1]\n }", "function getSum(max) {\n let sum = 0;\n let first = 1;\n let second = 2;\n while (second <= max) {\n sum += second;\n\n const dblSecond = second * 2;\n first += dblSecond;\n second += first - dblSecond + first;\n }\n\n return sum;\n}", "function sol7(nums) {\n const dp = Array(nums.length).fill(1);\n\n for (let i = 1; i < nums.length; i++) {\n for (let j = 0; j < i; j++) {\n if (nums[j] < nums[i]) {\n dp[i] = Math.max(dp[i], 1 + dp[j]);\n }\n }\n }\n\n return Math.max(...dp);\n}", "function miniMaxSum(arr) {\n // find sum for all 5 integer\n let sum = 0;\n for (let i = 0; i<arr.length; i++) {\n sum += arr[i];\n }\n // sum of 4 values = sum of 5 values less one value\n // iterate thru the array to make the sum4, and at the same time find min4sum and max4sum\n let min4Sum = sum-arr[0];\n let max4Sum = sum-arr[0];\n for (let i = 1; i<arr.length; i++) {\n if (sum-arr[i] > max4Sum) {max4Sum = sum-arr[i];}\n if (sum-arr[i] < min4Sum) {min4Sum = sum-arr[i];}\n }\n console.log(min4Sum + \" \" + max4Sum);\n}", "function sol3(coins = [1, 5, 6, 8], total = 11) {\n const dp = Array(total + 1).fill(Infinity);\n dp[0] = 0;\n\n for (let i = 1; i <= total; i++) {\n for (let coin of coins) {\n if (coin <= i) {\n dp[i] = Math.min(dp[i], 1 + dp[i - coin]);\n }\n }\n }\n\n return dp[total];\n}", "function GetSum( a,b )\n{\n if (a === b) return a; else {\n let min,max; let out = 0;\n if (a < b) {min = a; max = b;} else {min = b; max = a}\n out = 0;\n\n for (let i = 0; i < Math.abs(max - min); i++){\n out += max - i;\n }\n return out + min;\n }\n}", "function miniMaxSum(arr) {\n let min=Number.MAX_VALUE,max=Number.MIN_VALUE;\n for(var i=0;i<5;i++) {\n var sum=0;\n for(var j=0;j<5;j++) {\n if(j==i)continue;\n sum=sum+arr[j];\n }\n if(sum > max) max=sum;\n if(sum < min) min=sum;\n }\n console.log(min+\" \"+max);\n}", "function sumAll(arr) {\n var max = Math.max(arr[0], arr[1]);\n var min = Math.min(arr[0], arr[1]);\n var temp = 0;\n for(var i = min; i<= max; i++){\n temp += i;\n 6+4\n }\n return temp;\n }", "function maximumSumBruteForce(arr, n) {\n if (n > arr.length) return null\n let max = 0\n /**\n * [* * *] // deepest calculation\n * iterates over until the length of the array - n. [1, 2, 3, 4]\n * because we do not want to pass the end of the array we iterate to length minus the number of values we want to sum\n * first iteration\n * [1, 2, 3, 4]\n * [* * *]\n * i = 0\n *\n * inner loop iteration\n * j = 0\n * temp = 0\n * max = 0\n *\n * inner loop iteration\n * i = 0\n * j = 1\n * temp = 3\n * max = 3\n *\n * inner loop iteration\n * i = 0\n * j = 2\n * temp = 6\n * max = 6\n *\n * [1, 2, 3, 4]\n * [* * *]\n * second iteration\n * i = 1\n * inner loop iteration\n * j = 0\n * temp = 6\n * max = 6\n *\n * inner loop iteration\n * i = 1\n * j = 1\n * temp = 5\n * max = 6\n *\n * inner loop iteration\n * i = 1\n * j = 2\n * temp = 9\n * max = 9\n * return 9 because that is the greatest sum of three digits in this array\n */\n for (let i = 0; i < arr.length - n + 1; i++) {\n let temp = 0\n for (let j = 0; j < n; j++) {\n temp += arr[i + j]\n }\n if (temp > max) {\n max = temp\n }\n }\n return max\n}", "function solution (arr) {\n\t// if input has length of 1\n\tif ( arr.length === 1 ) {\n\t\t// return -1\n\t\treturn -1; \n\t}\n\t// make a store\n\tlet store = {};\n\t// make a max\n\tlet max=0;\n\t// iterate th input\n\tfor ( let i = 0; i < arr.length; i ++ ) {\n\t\t// put every value into store\n\t\tstore[arr[i]]= true;\n\t}\n\t// iterate th input again\n\tfor ( let j = 0; j < arr.length; j++ ) {\n\t\t// for every value P\n\t\tlet P = arr[j];\n\t\t\t// for every suprior value Q\n\t\t\tfor (let k = j+1; k < arr.length; k++ ) {\n\t\t\t\tlet Q = arr[k];\n\t\t\t// if abs P - Q is bigger than max\n\t\t\t\tif ( Math.abs( P - Q) > max ) {\n\t\t\t\t\t// make an ongoing run\n\t\t\t\t\tlet ongoingRun = 0\t\n\t\t\t\t\t// get max value btw P and Q\n\t\t\t\t\tconst maxVal = P > Q ? P : Q;\n\t\t\t\t\tconst minVal = P < Q ? P : Q;\n\t\t\t\t\t// go from max to min decrementing 1 (inter value)\n\t\t\t\t\tfor ( let interValue = maxVal-1; interValue >= minVal; interValue -=1 ) {\n\n\t\t\t\t\t\tongoingRun++;\n\t\t\t\t\t\t// if loop has finished : adajcent found\n\t\t\t\t\t\tif ( interValue === minVal ) {\n\t\t\t\t\t\t\t// if ongoing run is bigger than max\n\t\t\t\t\t\t\t// max = ongoing run\n\t\t\t\t\t\t\tmax = max >= ongoingRun ? max : ongoingRun\n\t\t\t\t\t\t\t// exit\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t// if inter value is in store\n\t\t\t\t\t\tif ( store[interValue] === true ) {\n\t\t\t\t\t\t\t// ongoing run = 0\n\t\t\t\t\t\t\tongoingRun=0;\n\t\t\t\t\t\t\t// break\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\t\t\n\t\t\t}\t\t\n\t}\n\t// return max\n\treturn max;\n}", "function sumAll(arr) {\n let answer = 0;\n\n let firstNum = arr[0];\n let secondNum = arr[1];\n\n if (secondNum > firstNum) {\n \n while (firstNum <= secondNum) {\n answer += firstNum;\n firstNum++;\n }\n }\n if (firstNum > secondNum) {\n firstNum = arr[1];\n secondNum = arr[0];\n while (firstNum <= secondNum) {\n answer += firstNum;\n firstNum++;\n }\n }\n console.log(answer);\n return answer;\n}", "function maxNum(arr, k) {\n if (k > arr.length)\n return -1;\n let max = 0;\n for (let i = 0; i < arr.length - k + 1; i++) {\n let s = 0;\n for (let j = 0; j < k; j++) {\n s += arr[i + j];\n }\n if (!max)\n max = s;\n else if (s > max)\n max = s;\n }\n // console.log(max)\n return max;\n}", "function main() {\n arr = readLine().split(' ');\n arr = arr.map(Number);\n let sarr = []\n arr = arr.sort((a, b) => a-b)\n let sum = arr.reduce((accum, val) => accum+val,0)\n console.log(sum - Math.max(...arr), sum - Math.min(...arr))\n\n //console.log(Math.min(...sarr), Math.max(...sarr))\n}", "function largestPairSum(numbers) {\n var largestSum = -1000;\n // loop through twice\n for (let i = 0; i < numbers.length; i++) {\n for (let j = 0; j < numbers.length; j++) {\n // if i and j are not the same number and larger than largestSum\n if (i != j && numbers[i] + numbers[j] > largestSum) {\n largestSum = numbers[i] + numbers[j];\n // make largest sum i+j\n }\n }\n }\n return largestSum;\n}", "function largestSumNoAdj(array) {\r\n if (!array.length) return 0;\r\n if (array.length == 1) return array[0];\r\n const maxSums = array.slice();\r\n maxSums[1] = Math.max(array[0], array[1]);\r\n for (let i = 2; i < array.length; i++) {\r\n maxSums[i] = Math.max(maxSums[i - 1], maxSums[i - 2] + array[i]);\r\n console.log(maxSums);\r\n }\r\n return maxSums[maxSums.length - 1];\r\n}", "function ex_7_R(a, b){\n s = 0; k = a;\n for( i = 1; i<b; i++){\n s = s + ex_5_R(a,k);\n k = ex_5_R(a,k);\n}\nreturn s;\n}", "function largestSum(arr){\n let currentSum = 0;\n let oldSum = 0;\n let highest\n for (let i=0;i<arr.length; i++){\n currentSum+= arr[i]\n if (currentSum > oldSum) {\n highest = currentSum\n oldSum = currentSum;\n }\n }\n return highest\n }", "function solution(A) {\n const total = A.reduce(function(a,b){return a+b}, 0);\n const leng = A.length;\n let current_least\n let first_total = 0\n for (let i=0;i<leng-1;i++){\n first_total += A[i];\n let second_total = total - first_total;\n let current_difference = Math.abs(second_total - first_total);\n console.log(i, first_total, total, current_difference)\n if (!current_least || current_difference < current_least){\n current_least = current_difference;\n }\n }\n return current_least;\n}", "function sol(nums, k) {\n // sum : index\n const map = {};\n map[0] = -1;\n let sum = 0;\n let maxLen = 0;\n for (let i = 0; i < nums.length; i++) {\n sum += nums[i];\n if (map[`${sum - k}`]) {\n maxLen = Math.max(maxLen, i - map[`${sum - k}`]);\n }\n if (!map[sum]) map[sum] = i;\n }\n\n return maxLen;\n}", "function largestSum(numberArray,k){\n if(k===1){\n return productOfEntries(numberArray);\n }\n for(let i=1;i<=numberArray.length-k+1;i++){\n return productOfEntries(numberArray.slice(0,i))+largestSum(numberArray.slice(i),k-1);\n }\n}", "function maxSum(arr){\n if (arr.length === 1){\n return arr[0];\n }\n let sum = 0;\n let tempArr = arr;\n for (let j =0; j< arr.length; j++){\n let temp = 0;\n for (let i=0;i<tempArr.length;i++){\n temp += tempArr[i];\n if (temp > sum){\n sum = temp;\n }\n }\n tempArr.shift();\n }\n return sum;\n}", "function main() {\n var arr = [];\n for(arr_i = 0; arr_i < 6; arr_i++){\n arr[arr_i] = readLine().split(' ');\n arr[arr_i] = arr[arr_i].map(Number);\n }\n \n var sum = Number.MIN_SAFE_INTEGER;\n for (var line = 0; line < 4; line++) {\n for (var col = 0; col < 4; col++) {\n var curr_sum = arr[line][col] + arr[line][col+1] + arr[line][col+2] + arr[line+1][col+1] + arr[line+2][col] + arr[line+2][col+1] + arr[line+2][col+2];\n if (curr_sum > sum) \n sum = curr_sum;\n }\n }\n \n console.log(sum);\n}", "function miniMaxSum(arr) {\n var min = arr[0];\n var max = arr[0];\n var total = 0;\n arr.forEach(element => {\n total += element;\n if(element < min){\n min = element;\n }\n if(element > max){\n max = element;\n }\n });\n console.log(''+(total-max)+' '+(total-min));\n\n}", "function largeSum(arr){\n let input = arr.sort((a,b) => {\n return b-a\n })\n output = input[0] + input[1]\n return output\n}", "function getSum( a,b ){\n let sum = 0\n if(a===b) return a\n else if(a>b){\n for(let i=b;i<=a;i++){\n sum += i\n }\n }else{\n for(let i =a;i<=b;i++){\n sum += i\n }\n }\n return sum\n }", "function main() {\n let arr = [];\n for(let arr_i = 0; arr_i < 6; arr_i++){\n \tarr[arr_i] = readLine().split(' ');\n \tarr[arr_i] = arr[arr_i].map(Number);\n }\n\n function get_sum_of_hourglass_at(arr, x, y) {\n return arr[y][x] + arr[y][x+1] + arr [y][x+2] +\n arr[y+1][x+1] +\n arr[y+2][x] + arr[y+2][x+1] + arr [y+2][x+2]\n }\n\n let max_sum = -100000000000\n for(let x = 0; x < 4; x++) {\n for(let y = 0; y < 4; y++) {\n const sum = get_sum_of_hourglass_at(arr, x, y)\n max_sum = Math.max(max_sum, sum)\n }\n }\n console.log(max_sum)\n}", "function bestSum(target, nums, memo={}){\n if (target in memo) return memo[target]\n if (target === 0) return []\n if (target < 0) return null\n\n let minWays = null\n\n for (let num of nums){\n const remainder = target - num,\n remainderResult = bestSum(remainder, nums, memo)\n\n if (remainderResult){\n const combination = [...remainderResult, num]\n if (!minWays || combination.length < minWays.length){\n minWays = combination\n }\n } \n }\n memo[target] = minWays\n return minWays\n}", "function largestSumNoAdj1(array) {\r\n if (!array.length) return 0;\r\n if (array.length === 1) return array[0];\r\n let max_including_last = array[1];\r\n let max_excluding_last = array[0];\r\n for (let i = 2; i < array.length; i++) {\r\n const current = Math.max(max_including_last, max_excluding_last + array[i]);\r\n max_excluding_last = max_including_last;\r\n max_including_last = current;\r\n }\r\n return max_including_last;\r\n}", "function bestSum(targetSum, numbers, memoize = {}) {\n if (targetSum in memoize) return memoize[targetSum];\n if (targetSum == 0) return [];\n if (targetSum < 0) return null;\n\n let bestResult = null;\n for (const num of numbers) {\n const remainder = targetSum - num;\n const result = bestSum(remainder, numbers, memoize);\n if (result !== null) {\n const updatedResult = result.slice();\n updatedResult.push(num);\n if (bestResult === null || updatedResult.length < bestResult.length) {\n bestResult = updatedResult;\n }\n }\n }\n\n memoize[targetSum] = bestResult;\n return bestResult;\n}", "function sumAll(arr) {\r\n let sum =0;\r\n \r\n for(let i = Math.min(arr[0],arr[1]); i <= Math.max(arr[0],arr[1]); i++) {\r\n console.log(sum)\r\n sum += i;\r\n }\r\n console.log(sum)\r\n return sum;\r\n }", "function fillTheValleys(arr){\r\n let output = 0\r\n let highestValue=0\r\n let highestValueIndex=0\r\n for(var i in arr){\r\n // console.log(arr, i)\r\n if(arr[i] >= highestValue){\r\n var temp = highestValue\r\n var tempIndex = highestValueIndex\r\n highestValue = arr[i]\r\n highestValueIndex = i\r\n }\r\n if(arr[i] > arr[i-1]){\r\n // console.log('rise detected')\r\n //Block one\r\n //If new index is greater than or equal to our recorded highest value\r\n if(arr[i] >= highestValue){\r\n // console.log('entered block one')\r\n let sumOfI = 0\r\n let xh = 0\r\n\r\n for(var j in arr){\r\n if(j < highestValueIndex && j > tempIndex){\r\n sumOfI+= arr[j]\r\n arr[j]=temp\r\n }\r\n }\r\n for(var k in arr){\r\n if(parseInt(k) < highestValueIndex && parseInt(k) > tempIndex){\r\n xh+= arr[k]\r\n }\r\n }\r\n // console.log('sum of i', sumOfI)\r\n // console.log('xh', xh)\r\n if(xh > sumOfI){\r\n output+= xh-sumOfI\r\n }\r\n }\r\n //If new index is not greater than our old highest value\r\n if(arr[i] <= highestValue){\r\n // console.log('entered block two')\r\n let sumOfI = 0\r\n let xh = 0\r\n for(var j in arr){\r\n if(j > highestValueIndex && j < i){\r\n sumOfI+= arr[j]\r\n arr[j]=arr[i]\r\n }\r\n }\r\n for(var k in arr){\r\n if(k > highestValueIndex && k < i){\r\n xh+= arr[i]\r\n }\r\n }\r\n // console.log('sum of i', sumOfI)\r\n // console.log('xh', xh)\r\n output+= xh-sumOfI\r\n }\r\n }\r\n\r\n // console.log(`output is ${output}`)\r\n // console.log(`highestValue is ${highestValue}`)\r\n // console.log(`highestValueIndex is ${highestValueIndex}`)\r\n }\r\n console.log(`output is ${output}`)\r\n}", "function solution(number) {\n const result = new Set();\n let i = 1;\n let te, fe;\n while (i) {\n if (!te && 3 * i < number) {\n result.add(3 * i);\n } else {\n te = true;\n }\n if (!fe && 5 * i < number) {\n result.add(5 * i);\n } else {\n fe = true;\n }\n if (te && fe) {\n break;\n }\n i++\n };\n return Array.from(result).reduce((prev, next) => prev + next, 0);\n}", "function topSum(arr) {\n // if (arr.length === 0) return 0;\n // if (arr.length === 1) return arr[0]\n // arr.sort((a, b) => a-b)\n // return arr[0] + arr[1]\n\n //better complexity\n // Just find the two largest number and return sum of them\n let max1 = arr[0];\n let max2 = arr[1];\n if (max1 < max2) {\n max1 = arr[1];\n max2 = arr[0];\n }\n for (let i = 2; i < arr.length; i++) {\n if (max1 < arr[i]) {\n max2 = max1;\n max1 = arr[i];\n } else if (arr[i] > max2) max2 = arr[i];\n }\n return max1 + max2;\n}", "function miniMaxSum(arr) {\n let minSum = 0;\n let maxSum = 0;\n const arrLength = arr.length;\n arr.sort();\n\n for (let i = 0; i < arrLength - 1; i++) {\n minSum += arr[i];\n maxSum += arr[arrLength - i - 1];\n }\n\n console.log(minSum, maxSum);\n}", "function miniMaxSum(arr) {\n const sorted = arr.sort();\n let max = 0;\n for (let i = 0; i <= array.length - 1; i++) {\n max += sorted[i];\n }\n\n let withoutLast = max - sorted[sorted.length - 1];\n let withoutFirst = max - sorted[0];\n\n return `${withoutLast} ${withoutFirst}`;\n}", "function minMaxProblem() {\n var sums = [];\n for (var i = 0; i < ar.length; i++) {\n var exc = i;\n var sum = 0;\n for (var j = 0; j < ar.length; j++) {\n if (j !== exc) {\n sum += ar[j];\n }\n }\n sums.push(sum);\n }\n console.log(sums);\n var max = sums[0];\n var min = sums[0];\n for (var i = 0; i < sums.length; i++) {\n max = Math.max(sums[i], max);\n min = Math.min(sums[i], min);\n }\n console.log(max);\n console.log(min);\n}", "function miniMaxSum(arr) {\n let min;\n let max;\n for (let i = 0; i < arr.length; i++) {\n if (arr[i] > max || !max) {\n max = arr[i]\n }\n if (arr[i] < min || !min) {\n min = arr[i]\n }\n }\n let minRemovedArr = arr.filter(x => x !== min)\n let maxRemovedArr = arr.filter(x => x !== max)\n let minValue = 0, maxValue = 0\n for (let i = 0; i < minRemovedArr.length; i++) {\n minValue += minRemovedArr[i];\n }\n for (let i = 0; i < maxRemovedArr.length; i++) {\n maxValue += maxRemovedArr[i];\n }\n console.log(maxValue, minValue)\n }", "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n if (A.length == 1 || A.length == 0) {\n return 0;\n }\n var maxEndingHere = 0;\n var maxSoFar = 0;\n var minPrice = A[0];\n for (var i = 1; i < A.length; i++) {\n maxEndingHere = Math.max(0, A[i] - minPrice);\n minPrice = Math.min(minPrice, A[i]);\n maxSoFar = Math.max(maxEndingHere, maxSoFar);\n }\n return maxSoFar;\n}", "function main(arr) {\n let sums = [];\n\n for (let i = 0; i < arr.length; i++) {\n let temp = arr.shift(); //since array is always 5 elements, pop/store 1st element in var\n let sum = arr.reduce((pre, curr) => pre + curr, 0); //calculate the sums of 4\n sums.push(sum); // store sum\n arr.push(temp); // put stored elem at end of array\n }\n\n console.log(Math.min(...sums), Math.max(...sums));\n}", "function main() {\n var n_temp = readLine().split(' ');\n var n = parseInt(n_temp[0]);\n var m = parseInt(n_temp[1]);\n var A = [];\n var B = [];\n var K = [];\n var L = Array.apply(null, Array(n+1)).map(Number.prototype.valueOf,0);\n for(var a0 = 0; a0 < m; a0++){\n var a_temp = readLine().split(' ');\n var a = parseInt(a_temp[0]);\n var b = parseInt(a_temp[1]);\n var k = parseInt(a_temp[2]);\n A.push(a);\n B.push(b);\n K.push(k);\n }\n for(var i=0;i<m;i++) {\n for(var j=A[i];j<=B[i];j++) {\n L[j] += K[i]; \n }\n }\n var max = getMaxOfArray(L);\n console.log(max);\n \n \n}", "function runProgram(input){\n let input_arr = input.trim().split(\"\\n\")\n\n for(let i = 2; i < input_arr.length; i = i+2){\n let array = input_arr[i].trim().split(\" \").map(Number).sort((a,b) => a - b)\n \n let max = 0\n for(let k = 0; k < array.length; k++){\n let answer = 0\n let index = k\n for(let j = 0; j < array.length ; j++){\n if(j < index){\n answer += (-1 * array[j]) \n }\n else{\n answer += (array.length - j) * array[index]\n break\n }\n }\n if(max < answer){\n max = answer\n }\n }\n\n console.log(max)\n }\n}", "function largestPairSum(numbers) {\n numbers.sort(function (a, b) { return b - a });\n return numbers[0] + numbers[1];\n}", "function sum(array){\n let max = 0;\n \n for(let i=0; i < array.length; i++){\n let total =array[i];\n for(let j=i+1; j<array.length; j++){\n total += array[j];\n if (total>max){\n max =total;\n }\n \n }\n \n }\n return max;\n}", "function digital_root(test) {\r\n let count =0;\r\n let arrOfNumbers = test.toString().split('').map(function(a){\r\n return parseInt(a);\r\n });\r\n \r\n while(arrOfNumbers.length > 1){\r\n count = arrOfNumbers.reduce(function(a,b){\r\n return a+b;\r\n });\r\n \r\n arrOfNumbers = count.toString().split('').map(function(a){\r\n // '1' '5'\r\n return parseInt(a);\r\n });\r\n }\r\n return count;\r\n }", "function solution1(num) {\n\n\t// req 3\n\tif (num <= 0) {\n\t\treturn 0;\n\t}\n\n\tlet arr = [];\n\n\tfor (let i = 1; i < num; i++) {\n\n\t\tarr.push(i);\n\t}\n\n\t// req 1 & 4\n\tlet multiples = arr.filter(x => x % 3 === 0 || x % 5 === 0);\n\n\tlet sum = 0;\n\tfor (let i = 0; i < multiples.length; i++) {\n\n\t\tsum += multiples[i];\n\t}\n\n\treturn sum;\n}", "function GetSum( a,b ) {\n let min = Math.min(a,b)\n let max = Math.max(a,b)\n \n let total = 0\n \n for(let i = min; i <= max; i++){\n total += i\n }\n return total\n }", "function maxSum(array) {\n let currentSum = 0;\n let currentHighest = array[0]; // Initialize this with array[0] instead of 0 in case we have an array with all negative numbers\n\n array.forEach(number => {\n currentSum += number;\n if (currentSum > currentHighest) {\n currentHighest = currentSum;\n }\n })\n\n console.log(currentHighest);\n return currentHighest;\n}", "function getMaxSum(array) {\n let result = 0;\n for (let i = 1; i < array.length-1; i++) {\n for (let j = 1; j < array[i].length-1; j++) {\n if (array[i-1][j-1] !== undefined && array[i+1][j+1] !== undefined && array[i-1][j+1] !== undefined && array[i+1][j-1] !== undefined){\n let sum = array[i][j] + array[i-1][j-1] + array[i-1][j] + array[i-1][j+1] + array[i+1][j-1] + array[i+1][j] + array[i+1][j+1];\n if (sum > result) { result = sum; }\n }\n }\n }\n return result;\n}", "function problem1(){\n var numArr = [];\n for(var x=0; x<1000; x++){\n if (x%3==0 || x%5==0){\n numArr.push(x);\n }\n }\n return numArr.reduce(function(a,b){\n return a + b;\n });\n}", "function maxOfSum(arr, k) {\n var max = 0;\n for (var i = 0; i < arr.length - k + 1; i++) {\n var sum = 0;\n for (var j = i; j < i + k; j++) {\n sum += arr[j];\n }\n if (max < sum) {\n max = sum;\n }\n }\n return max;\n}", "function solution(x) {\n var sum=0;\n for(var i=0;i<x;i++){\n if(i%3==0 && i%5==0){\n }\n else if(i%3==0){\n sum+=i;\n }\n else if(i%5==0){\n sum+=i;\n }\n }\n return sum;\n}", "function main() {\n var arr = [];\n for(arr_i = 0; arr_i < 6; arr_i++){\n arr[arr_i] = readLine().split(' ');\n arr[arr_i] = arr[arr_i].map(Number);\n }\n var B = [];\n var count = 0;\n for(var i=0;i<=3;i++) {\n for(var j=0;j<=3;j++) {\n B[count] = arr[i][j] + arr[i][j+1] + arr[i][j+2] + arr[i+1][j+1] + arr[i+2][j] + arr[i+2][j+1] + arr[i+2][j+2];\n count++;\n }\n }\n \n console.log(Math.max.apply(Math,B));\n}", "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n let mini = Infinity;\n let answer = 0;\n for (const n of A) {\n if (n <= mini) {\n mini = n;\n continue;\n }\n answer = Math.max(answer, n - mini);\n }\n return answer;\n}", "function maxSumOfArray(nums, n){\n // set variables for both the final sum and temp sum that will be checked each time to see which is greater\n sum = 0;\n tempSum = 0;\n // for loop to go through the indexes of the array\n for (i = 0; i < n-1; i++){\n // add the sums of consecutive numbers and assign them to the temp sum\n tempSum += nums[i];\n }\n // second for loop to check tempSum against Sum and return the higher value\n for( i = n - 1; i < nums.length; i++){\n // sum of \n tempSum += nums[i];\n // checks the values of tempSum and sum and sets the higher value to sum\n if (tempSum > sum){\n // sets higher value to sum\n sum = tempSum;\n }\n \n tempSum -= numfs[i-n+1]\n }\n return sum;\n}", "maxSum() {\n let total = 0;\n\n const solver = (node) => {\n if (node === null) {\n return 0;\n }\n const left = solver(node.left);\n const right = solver(node.right);\n total = Math.max(total, node.val + left + right);\n return Math.max(0, left + node.val, right + node.val);\n };\n\n solver(this.root);\n return total;\n }", "function solution(A) {\n // write your code in JavaScript (Node.js 6.4.0)\n\n var splits=A.length-1;\n var maxDiff=null;\n\n // since we are starting at max sum.\n var rightSum=0;\n var leftSum=A[0];\n for(var i=1;i<A.length;i++)\n rightSum+=A[i];\n\n for(var i=1;i<=splits;i++)\n {\n var diff=Math.abs(leftSum-rightSum);\n if(maxDiff==null || diff<maxDiff)\n maxDiff=diff;\n rightSum-=A[i];\n leftSum+=A[i];\n }\n\n return maxDiff;\n}", "function solutionOne(){\n return loopSum(0, 1000, (i, sum)=>{\n if(i % 3 === 0 || i % 5 === 0){\n sum += i;\n }\n return sum;\n });\n}", "function sumLowHigh(arr) {\n // sort the array\n arr.sort(compareNumeric)\n // get the first element\n const lowest = arr[0];\n // get the last element\n const highest = arr[arr.length-1];\n\n const exclude = [lowest, highest]\n\n let sum = 0;\n for (let i = 0; i < arr.length; i++) {\n //TODO: if the current value is in exclude array, then skip\n if (){\n // skip \n }\n else {\n sum += arr[i];\n }\n }\n\n return sum;\n}", "function sumArray(array) {\n var highestSum = array[0];\n\n function traverseSubsetsAtIndexN (startIndex) {\n var current = array[startIndex];\n\n //single element \n if (current > highestSum) {\n highestSum = current;\n }\n\n //continguous elements\n for (var i = startIndex+1; i < array.length; i++) {\n current = current + array[i];\n if (current > highestSum) {\n highestSum = current;\n }\n }\n }\n\n for (var i = 0; i < array.length; i++) {\n traverseSubsetsAtIndexN(i);\n }\n\n return highestSum;\n}", "function solution(number){\n var num =[];\n for(var i=1; i<number; i++){\n if(i%3 === 0 || i%5 ===0){num.push(i);}\n }\n var result = num.reduce(function(sum, current) {\n return sum + current;\n }, 0);\n return result;\n}", "function halfSum(input) {\n let n = Number(input.shift());\n let sum = 0;\n let maxNumber = 0;\n\n for (let index = 0; index < n; index++) {\n let num = Number(input.shift());\n\n sum += num;\n\n if (maxNumber < num) {\n maxNumber = num;\n }\n }\n\n sum -= maxNumber;\n\n if (sum == maxNumber) {\n console.log(\"Yes\");\n console.log(`Sum = ${sum}`);\n } else {\n console.log(\"No\");\n console.log(`Diff = ${Math.abs(maxNumber - sum)}`);\n }\n}", "function main() {\n var n = parseInt(readLine());\n var a = [];\n for (a_i = 0; a_i < n; a_i++) {\n a[a_i] = readLine().split(' ');\n a[a_i] = a[a_i].map(Number);\n }\n\n\n\n let holder = 0;\n let holder2 = n - 1;\n let sum1 = 0;\n let sum2 = 0;\n\n a.forEach(element => {\n // console.log(element[holder])\n sum1 += element[holder];\n holder++;\n\n });\n\n //console.log(` sum1: ${sum1}`);\n\n\n\n a.forEach(elementz => {\n // console.log(elementz[holder2])\n sum2 += elementz[holder2];\n holder2--;\n\n });\n\n // console.log(` sum2: ${sum2}`);\n\n if ((sum1 - sum2) < 0) {\n console.log(((sum1 - sum2) * -1));\n }\n else {\n console.log((sum1 - sum2));\n }\n\n\n\n}", "function sumAll(arr) {\n var min = Math.min(arr[0], arr[1]);\n var max = Math.max(arr[0], arr[1]);\n var answer = 0;\n for (var i = min; i <= max; i++){\n answer += i;\n }\n return answer;\n}", "function miniMaxSum(arr) {\n var minNum = arr[0];\n var maxNum = arr[0];\n\n var totalSum = arr[0];\n\n for (var i = 1; i < arr.length; i++) {\n\n if (arr[i] < minNum)\n minNum = arr[i];\n\n if (arr[i] > maxNum)\n maxNum = arr[i];\n\n totalSum += arr[i];\n }\n\n var totalMinSum = totalSum - maxNum;\n var totalMaxSum = totalSum - minNum;\n\n console.log(totalMinSum + \" \" + totalMaxSum);\n}", "function maxSum(array) {\n let max = 0;\n let sum = 0;\n for (let i = 0; i < array.length; i++) {\n sum += array[i];\n if(sum > max){\n max = sum;\n }if(sum < 0){\n sum = 0;\n }\n}\nreturn max;\n}", "function main() {\n var arr = [];\n for(arr_i = 0; arr_i < 6; arr_i++){\n arr[arr_i] = readLine().split(' ');\n arr[arr_i] = arr[arr_i].map(Number);\n }\n var sum =[];\n var _i=0;\n \tfor(var _height=0; _height <= arr.length - 3; _height++){\n for(var _width=0; _width <= arr[_height].length -3; _width++){\n sum[_i] = arr[_height][_width] + arr[_height][_width + 1] + arr[_height][_width + 2] + arr[_height + 1][_width + 1] + arr[_height + 2][_width] + arr[_height + 2][_width + 1] + arr[_height + 2][_width + 2];\n _i++;\n }\n }\n console.log(Math.max(...sum));\n}", "function missingNumberSum(numbers) {}", "function problem2(){\n var numArr = [1,2];\n while(numArr[numArr.length-1]<4000000){\n numArr.push( numArr[numArr.length - 2] + numArr[numArr.length - 1] );\n }\n numArr = numArr.filter(function(a){ return a%2===0});\n return numArr.reduce(function(a,b){ return a+b; });\n}", "function miniMaxSum(arr) {\n let min = arr[0], max = arr[0];\n let sum = arr[0];\n\n for (let i = 1; i < arr.length; i++) {\n sum +=arr[i];\n if (arr[i] > max) {\n max = arr[i];\n }\n if (arr[i] < min) {\n min = arr[i];\n }\n }\n\n console.log((sum-max)+\" \"+(sum-min));\n\n\n\n\n}" ]
[ "0.7265383", "0.7051192", "0.689755", "0.6874433", "0.6862968", "0.68546087", "0.67448235", "0.670791", "0.6659165", "0.6642324", "0.66335034", "0.6632944", "0.66263014", "0.6615637", "0.6612116", "0.6596708", "0.6587458", "0.65815467", "0.65629756", "0.6562272", "0.65521866", "0.65350884", "0.6526991", "0.65207195", "0.6518565", "0.651484", "0.6513249", "0.6497876", "0.649581", "0.64941937", "0.6486008", "0.6483373", "0.6481582", "0.6460587", "0.64595044", "0.64533067", "0.6442746", "0.6442668", "0.6435267", "0.6429857", "0.6427877", "0.6427196", "0.64265364", "0.64146864", "0.63988197", "0.63972455", "0.6396387", "0.6383742", "0.63791275", "0.6340124", "0.6322627", "0.63148683", "0.6304838", "0.63031214", "0.6299898", "0.6295922", "0.6290301", "0.627564", "0.6274654", "0.62740755", "0.62708247", "0.6269579", "0.6266948", "0.62630653", "0.62529695", "0.62520194", "0.6251163", "0.625107", "0.6246215", "0.6245139", "0.62422335", "0.623932", "0.6233011", "0.6230818", "0.6225875", "0.6221631", "0.6219976", "0.62140155", "0.6205628", "0.6202033", "0.6197672", "0.6190835", "0.61848825", "0.6183628", "0.6181718", "0.61793005", "0.6174031", "0.61691767", "0.6163113", "0.6162536", "0.616132", "0.61612684", "0.6153949", "0.6149702", "0.6136516", "0.61356556", "0.6130572", "0.6125964", "0.61238974", "0.61216676", "0.6120748" ]
0.0
-1
Return the best size for the requested avatar size
function getBestSizeFor(size) { for (var i = 0; i < KNOWN_AVATAR_SIZES.length; i++) { var currentSize = KNOWN_AVATAR_SIZES[i]; if (size <= currentSize) return currentSize; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getBestImageSize(sizes) {\n let bestSize = false;\n\n for (let size in sizes) {\n if (sizes[size][1] >= this.windowWidth) {\n bestSize = size;\n break;\n }\n }\n\n if (!bestSize) {\n // Get last key in sizes object\n bestSize = Object.keys(sizes)[Object.keys(sizes).length - 1];\n }\n\n return bestSize;\n }", "function getImgSize(val, size)\r\n\t{\r\n\t\tswitch(size)\r\n\t\t{\r\n\t\t\tdefault:\r\n\t\t\tcase 'normal': return val;\r\n\t\t\tcase 'small': return parseInt(val * 0.75);\r\n\t\t\tcase 'tiny': return parseInt(val * 0.5);\r\n\t\t}\r\n\t}", "function getImagePixelSize(sizeChoice,letter) {\r\n //get the size in pixel : 120,160,200\r\n // make all of them smaller: 100 120 160\r\n var chosenWidth=0;\r\n var scalegroup=[\"Zain\",\"Nun\",\"Yudh (Connected)\",\"Yudh (Stand-alone)\"];\r\n var scale=1;\r\n if(scalegroup.indexOf(letter)!=-1){\r\n scale=0.75;\r\n }\r\n // set up size for sizechoice\r\n if(sizeChoice==\"small\") {\r\n //width = 40*scaleFactor;\r\n chosenWidth = 100*scale;\r\n }\r\n else if (sizeChoice ==\"medium\") {\r\n chosenWidth = 120*scale;\r\n }\r\n else {\r\n chosenWidth = 160*scale;\r\n //width = 55*scaleFactor;\r\n }\r\n\r\n return chosenWidth;\r\n}", "getSize () {\n return this.traitMax('size');\n }", "getBestImageForType (srcType) {\n let imageSrc = this.props[srcType]\n let fitSizes = {}\n\n if (this.isImageLoaded(imageSrc)) {\n // Use full-size image if available\n fitSizes = this.getFitSizes(this.imageCache[imageSrc].width, this.imageCache[imageSrc].height)\n } else if (this.isImageLoaded(this.props[`${srcType}Thumbnail`])) {\n // Fall back to using thumbnail if the image has not been loaded\n imageSrc = this.props[`${srcType}Thumbnail`]\n fitSizes = this.getFitSizes(this.imageCache[imageSrc].width, this.imageCache[imageSrc].height, true)\n } else {\n return null\n }\n\n return {\n src: imageSrc\n , height: fitSizes.height\n , width: fitSizes.width\n }\n }", "getBestImageForType(srcType) {\n let imageSrc = this.props[srcType];\n let fitSizes = {};\n\n if (this.isImageLoaded(imageSrc)) {\n // Use full-size image if available\n fitSizes = this.getFitSizes(\n this.imageCache[imageSrc].width,\n this.imageCache[imageSrc].height\n );\n } else if (this.isImageLoaded(this.props[`${srcType}Thumbnail`])) {\n // Fall back to using thumbnail if the image has not been loaded\n imageSrc = this.props[`${srcType}Thumbnail`];\n fitSizes = this.getFitSizes(\n this.imageCache[imageSrc].width,\n this.imageCache[imageSrc].height,\n true\n );\n } else {\n return null;\n }\n\n return {\n src: imageSrc,\n height: this.imageCache[imageSrc].height,\n width: this.imageCache[imageSrc].width,\n targetHeight: fitSizes.height,\n targetWidth: fitSizes.width,\n };\n }", "selectImage(imageArray) {\n const idealSize = 300;\n let bestImage;\n let bestScore;\n imageArray.forEach((image) => {\n if (image.height < 200 || image.width < 200) return;\n const score = Math.abs(image.height - idealSize) + Math.abs(image.width - idealSize);\n if (score < bestScore || bestScore === undefined) {\n bestScore = score;\n bestImage = image;\n }\n });\n return bestImage;\n }", "getOptimalSize() {\n const that = this;\n\n if (that._renderingSuspended) {\n return { width: 0, height: 0 };\n }\n\n if (that.sizeMode === 'circle') {\n return { width: that.offsetWidth, height: that._updateSize(true) };\n }\n else {\n return { width: that.offsetWidth, height: that.offsetHeight };\n }\n }", "getSize(name) {\n let size = this._data.sizes.find(s => s.name === name);\n return size;\n // for (let i = 0; i < this._data.sizes.length; i++) {\n // if (this._data.sizes[i].name === name) {\n // return this._data.sizes[i];\n // }\n // }\n }", "function computeThumbsize(maxWidth, uuid) {\n var fingerprint = fpCache.getFingerprint(uuid);\n\n // Compute thumb size and padding\n var width = fingerprint.image.width;\n var height = fingerprint.image.height;\n // ## TODO This should be done server-side\n if (fingerprint.image.orientation && fingerprint.image.orientation >= 5 && fingerprint.image.orientation <= 8) {\n width = fingerprint.image.height;\n height = fingerprint.image.width;\n }\n width = Math.floor((width / height) * 200);\n height = 200;\n var padding = 0;\n if (width > maxWidth) {\n padding = height; // old height\n height = height * maxWidth / width;\n width = maxWidth;\n padding = (padding - height)/2;\n }\n return { width:width, height:height, paddingTop:padding };\n}", "function size(found) {\n return sizes[found] || 1;\n }", "function maxSize (x) {\r\n var pref = size(x);\r\n if ( pref === null ) {return null;}\r\n return filter(x) ? filter(x).call(this, {\r\n edge : edge(x), \r\n result : { width : pref.maxWidth, height : pref.maxHeight },\r\n size : { width : width, height : height }\r\n }) : minSize(x);\r\n }", "function guessSize(size) {\n var xIndex = size.indexOf('x');\n if (!xIndex) {\n return null;\n }\n\n return size.substr(0, xIndex);\n }", "function imageDimensions() {\n // TODO doesn't work with new #thumbs container because it doesn't have the data-photo-max-size attribute on the li\n if (myJQ(\".tm-marketplace-listing-photos__thumbnail-slider-item\")) {\n // todo scrape o-aspect-ratio?\n return {width:640, height:480, cellClass:\"tmsatp_imgcell\"};\n } else if (myJQ(\"#Photobox_OtherPhotos\")) {\n // new format, calculate max of data-photo-max-size width and height\n var maxWidth = 1;\n var maxHeight = 1;\n myJQ(\"#Photobox_thumbs li\").each(function(index, value) {\n var photoMaxSize = myJQ(value).attr(\"data-photo-max-size\");\n if (photoMaxSize) {\n var photoWidth = 0+photoMaxSize.split(\",\")[0];\n var photoHeight = 0+photoMaxSize.split(\",\")[1];\n maxWidth = Math.max(maxWidth, photoWidth);\n maxHeight = Math.max(maxHeight, photoHeight);\n }\n });\n return {width:maxWidth, height:maxHeight, cellClass:\"tmsatp_largerCell\"};\n } else {\n // old format, always assume 800x600 max\n return {width:800, height:600, cellClass:\"tmsatp_largerCell\"};\n }\n}", "function getCircleSize(voteMargin, scale){\n if (scale == null){\n return base_bubble + ((voteMargin/ 100) * margin_range)\n }\n else {\n (base_bubble * scale) + ((voteMargin/ 100) * margin_range * scale)\n }\n\n}", "function getGroupAvatarUrlForSize(group, size) {\n const avatarUrl = group.avatarUrl;\n\n const parsed = url.parse(avatarUrl, true);\n\n // Tack on a version param otherwise the S3 url is always the same and\n // you always get the cached avatar from nginx's cache.\n parsed.query = parsed.query || {};\n if (group.avatarVersion) {\n parsed.query.v = group.avatarVersion;\n }\n\n if (isGitterInternalAvatarUrl(avatarUrl)) {\n const bestSize = getBestSizeFor(size);\n\n // Just use the original\n if (!bestSize) return avatarUrl;\n\n var pathParts = parsed.pathname.split('/');\n pathParts.pop();\n pathParts.push(bestSize);\n parsed.pathname = pathParts.join('/');\n return url.format(parsed);\n } else if (isGitlabSecurityDescriptorType(group.sd && group.sd.type)) {\n if (size) {\n // This doesn't actually work but these parameters are added in the GitLab UI\n parsed.query.width = size;\n }\n\n return url.format(parsed);\n }\n}", "getFitSizes (width, height, stretch) {\n const boxSize = this.getLightboxRect()\n let maxHeight = boxSize.height - (this.props.imagePadding * 2)\n let maxWidth = boxSize.width - (this.props.imagePadding * 2)\n\n if (!stretch) {\n maxHeight = Math.min(maxHeight, height)\n maxWidth = Math.min(maxWidth, width)\n }\n\n const maxRatio = maxWidth / maxHeight\n const srcRatio = width / height\n\n if (maxRatio > srcRatio) { // height is the constraining dimension of the photo\n return {\n width: width * maxHeight / height\n , height: maxHeight\n }\n }\n\n return {\n width: maxWidth\n , height: height * maxWidth / width\n }\n }", "function getSize (sizes, containerSize) {\n var size = sizes[sizes.length - 1]\n\n var maxResize = 1.1\n\n var cW = containerSize[0]\n var cH = containerSize[1]\n for (var i = 0; i < sizes.length; i++) {\n var sW = sizes[i][0]\n var sH = sizes[i][1]\n\n if (sW * maxResize >= cW && sH * maxResize >= cH) {\n size = sizes[i]\n break\n }\n }\n\n return size\n}", "function getBestFitScaleFor(canvas, width, height) {\n return Math.max(1, Math.min(Math.floor(width / canvas.width - 1), Math.floor(height / canvas.height - 1)));\n }", "function sizeRanger(sz) {\n let szGrp = 8;\n if (sz > 6) szGrp = 16;\n if (sz > 24) szGrp = 32;\n if (sz > 72) szGrp = 48;\n return szGrp;\n }", "function imgsize(){\n\tvar img = get('wcr_imagen');\n\tif(img.naturalWidth) return {wi: img.naturalWidth, hi: img.naturalHeight};\n\n\timg = get('wcr_imagen'+posActual);\n\treturn img ? {wi: img.width, hi: img.height} : {wi:0, hi:0};\n}", "static getCardSizeFromSprite() {\n return {\n width: 81,\n height: 117.5\n };\n }", "vehicleSize(size) {\n switch (size) {\n case \"small\":\n return \"https://png.icons8.com/dotty/40/000000/dirt-bike.png\";\n case \"medium\":\n return \"https://png.icons8.com/dotty/40/000000/fiat-500.png\";\n case \"large\":\n return \"https://png.icons8.com/dotty/40/000000/suv.png\";\n default:\n return \"https://png.icons8.com/dotty/40/000000/fiat-500.png\";\n }\n }", "function maximizeSelection(options, img) {\n return getRealSize(img).then(function (size) {\n options.data = size;\n return options;\n });\n }", "getFitSizes(width, height, stretch) {\n const boxSize = this.getLightboxRect();\n let maxHeight = boxSize.height - this.props.imagePadding * 2;\n let maxWidth = boxSize.width - this.props.imagePadding * 2;\n\n if (!stretch) {\n maxHeight = Math.min(maxHeight, height);\n maxWidth = Math.min(maxWidth, width);\n }\n\n const maxRatio = maxWidth / maxHeight;\n const srcRatio = width / height;\n\n if (maxRatio > srcRatio) {\n // height is the constraining dimension of the photo\n return {\n width: (width * maxHeight) / height,\n height: maxHeight,\n };\n }\n\n return {\n width: maxWidth,\n height: (height * maxWidth) / width,\n };\n }", "howMuchMore() {\n return this.maxSize - this.totalSize;\n }", "function getImageSize(url, callback) {\n\tcreateLimitedRequest(url, function(err, request) {\n\t\tif (err) {\n\t\t\treturn callback(err);\n\t\t}\n\n\t\trequest.on(\"error\", callback);\n\t\tgm(request).size(callback);\n\t});\n}", "function getNextSize() {\n var lSum = $('#video-panel .small').length * smallRadius * smallRadius * 5;\n var sSum = $('#video-panel .large').length * largeRadius * largeRadius * 10;\n var largeP = 1 / ((lSum + sSum) / $('#video-panel').width() / $(\n '#video-panel').height() + 1) - 0.5;\n if (Math.random() < largeP) {\n return 'large';\n } else {\n return 'small';\n }\n}", "function humanSize(size) {\n\t\tvar i, units = ['B','KB','MB','GB','TB'];\n\t\tfor (i = 0; size > 1024; i++) {\n\t\t\tsize /= 1024;\n\t\t}\n\t\treturn Math.round(size*10)/10 + units[i];\n\t}", "static findSize(olStyle, sizes, dflt) {\n const scale = olStyle.getScale();\n return sizes.find(size => scale === size.scale) || dflt || sizes[2];\n }", "static getSize(url, success, failure) {\n return ImageLoader.getSize(url)\n .then(function(sizes) {\n success(sizes.width, sizes.height);\n })\n .catch(\n failure ||\n function() {\n if (__DEV__ && console.warn) {\n console.warn(`Failed to get size for image: ${ url }`);\n }\n },\n );\n }", "size() {\n if (!this.item.size) {\n return '';\n }\n return `${(this.item.size / 1024).toFixed(2)} KB`;\n }", "get optimalSize() {\n return [200, 32];\n }", "function sizeCost(){\n if(this.size=s){\n return \"7.99\";\n }\n if(this.size=m){\n return \"9.99\"\n}\n if(this.size=l){\n return \"12.99\"\n}\n if(this.size=xl){\n return \"15.99\"\n}\n}", "function circleSize(mag) {\n return mag * 10000;\n}", "function getSizes(icons) {\n var sizes = {};\n var uris = Object.keys(icons);\n uris.forEach(function(uri) {\n var uriSizes = icons[uri].sizes.join(' ').split(' ');\n uriSizes.forEach(function(size) {\n var sizeValue = guessSize(size);\n if (!sizeValue) {\n return;\n }\n\n sizes[sizeValue] = {\n uri: uri,\n rel: icons[uri].rel\n };\n });\n });\n\n return sizes;\n }", "calculateSize() {\n if (typeof this.size === 'number') {\n this.actualsize = this.size;\n } else if (this.size.toLowerCase().endsWith('px')) {\n this.actualsize = parseInt(this.size);\n if (isNaN(this.actualsize)) {\n console.error(`RadialProgressMeter: provided invalid size: ${this.size}`);\n this.actualsize = 200;\n }\n } else if (this.size.toLowerCase().endsWith('em')) {\n this.actualsize = (CFBUtils.getSingleEmInPixels() * parseInt(this.size));\n if (isNaN(this.actualsize)) {\n console.error(`RadialProgressMeter: provided invalid size: ${this.size}`);\n this.actualsize = 200;\n }\n } else {\n switch(this.size) {\n case 'small':\n this.actualsize = 100;\n break;\n case 'large':\n this.actualsize = 400;\n break;\n case 'huge':\n this.actualsize = 800;\n break;\n case 'medium':\n default:\n this.actualsize = 200;\n break;\n }\n }\n\n // Now we parse a size class\n if (this.actualsize >= 800) {\n this.sizeclass = 'huge';\n } else if (this.actualsize >= 400) {\n this.sizeclass = 'large';\n } else if (this.actualsize >= 200) {\n this.sizeclass = 'medium';\n } else if (this.actualsize >= 100) {\n this.sizeclass = 'small';\n } else {\n this.sizeclass = 'tiny';\n }\n }", "get maxSizeInBytes() {\n return this._maxSizeInBytes;\n }", "function getSize(value){var defaultValue=$mdProgressCircular.progressSize;if(value){var parsed=parseFloat(value);if(value.lastIndexOf('%')===value.length-1){parsed=parsed/100*defaultValue;}return parsed;}return defaultValue;}", "function toHumanReadableMediaSize(size) {\n var decimalPlaces = size < ONE_MEGABYTE_IN_BYTES ? 0 : 1;\n return bytes\n .format(size, { unitSeparator: ' ', decimalPlaces: decimalPlaces })\n .toUpperCase();\n}", "function size(d) {\n\n switch (d.nodeType) {\n case \"likerNode\":\n return Math.sqrt(d.size) * 5 || 6;\n case \"taggedNode\":\n return Math.sqrt(d.size) * 5 || 4;\n case \"postNode\":\n return Math.sqrt(d.size) * 5 || 4.5;\n case \"coreNode\":\n return 20;\n case \"year\":\n return Math.sqrt(d.size) / 5 || 8;\n default:\n return Math.sqrt(d.size) * 5 || 4.5;\n }\n }", "function getDisplayableSize (size) {\n\n var unitChangeLimit = 1024;\n var units = [\n \"B\",\n \"kiB\",\n \"MiB\",\n \"GiB\",\n \"TiB\",\n \"PiB\",\n \"EiB\",\n \"ZiB\",\n \"YiB\",\n ];\n\n var displayableSize = parseFloat(size);\n var unit = 0;\n\n if (size < unitChangeLimit) {\n return size + ' ' + units[0];\n }\n\n while (parseFloat(displayableSize/unitChangeLimit) >= parseFloat(1) && unit < 9) {\n displayableSize /= unitChangeLimit;\n unit += 1;\n }\n\n return displayableSize.toFixed(2) + ' ' + units[unit];\n\n }", "function sizeFn(size) {\n size = size.toLowerCase();\n\n if (size === 'small') {\n return frameSize(1, 0.5);\n } else if (size === 'medium') {\n return frameSize(1, 1);\n } else if (size === 'large') {\n return frameSize(2, 2);\n } else {\n var dimensions = size.split('x').map(Number);\n return frameSize(dimensions[0], dimensions[1]);\n }\n}", "maxSize()\r\n {\r\n return this.#size;\r\n }", "function getMinSize(size1, size2) {\n if(size1 === Infinity) return size2;\n var sizeNumeric1 = numericSize(size1);\n var sizeNumeric2 = numericSize(size2);\n return sizeNumeric2 < sizeNumeric1 ? size2 : size1;\n}", "getSizes(callback) {\n const success = (imageSizes) => {\n this.parseSizes(imageSizes, this.targetSize);\n callback && callback();\n };\n\n const error = (errorMsg) => {\n console.warn(\"Fetch image sizes failed. \" + errorMsg);\n };\n\n fetchData(url(this.baseUrl, this.args), success, error);\n }", "findTallestHuman(humans) {\n let _height = 0;\n let _tallest = {};\n for(let human in humans){\n const _humanHeight = humans[human].height\n if(_humanHeight !== 'unknown' && parseInt(_humanHeight) > _height) {\n _height = parseInt(_humanHeight);\n _tallest = humans[human];\n }\n }\n return _tallest;\n }", "function getSize(magnitude) {\n return magnitude * 5\n}", "function getMaxSmileyLen() {\n\tvar maxLen = 0;\n\tfor (var i=0; i<SMILEY_LIST.length; i++) {\n\t\tif (SMILEY_LIST[i].length > maxLen) {\n\t\t\tmaxLen = SMILEY_LIST[i].length;\n\t\t}\n\t}\n\treturn maxLen;\n}", "function calcSize(size) {\n if (Platform.OS === 'ios') {\n return Math.round(PixelRatio.roundToNearestPixel(size * Dimensions.get('window').width / 320))\n } else {\n return Math.round(PixelRatio.roundToNearestPixel(size * Dimensions.get('window').width / 320)) - 2\n }\n }", "function calcSize(size) {\n if (Platform.OS === 'ios') {\n return Math.round(PixelRatio.roundToNearestPixel(size * Dimensions.get('window').width / 320))\n } else {\n return Math.round(PixelRatio.roundToNearestPixel(size * Dimensions.get('window').width / 320)) - 2\n }\n }", "function returnDimension(clickedObject, typeOfMosaic, callback){\n var image = new Image();\n\timage.src = clickedObject.attr('data-mz-link');\n\timage.onload = function() {\n\n\t var imageWidth = image.width;\n\t var imageHeight = image.height;\n\t var imageAspectRatio = imageWidth/imageHeight;\n\n\t callback(clickedObject, imageWidth, imageHeight, imageAspectRatio, typeOfMosaic);\n\t};\n}", "function getScore() { // Calculating rounded scores based off of dimension\n if (size < 50) { // Checking less than 50\n var lessThan = Math.round(10 - 0.1 * size);\n score = score + lessThan; // Updating score\n } else { // Checking more than 50\n var moreThan = Math.round(10 - 0.09 * size);\n score = score + moreThan; // Updating score\n }\n }", "function getLogoSize()\n{\n return background.width > background.height ? background.height * 0.33 : background.height / 2\n}", "iconSize() {\n switch (this.size) {\n case \"is-small\":\n return this.size;\n case \"is-medium\":\n return;\n case \"is-large\":\n return this.newIconPack === \"mdi\" ? \"is-medium\" : \"\";\n }\n }", "getOptimalSize() {\n const that = this;\n\n if (that._renderingSuspended) {\n return { width: 0, height: 0 };\n }\n\n let propertiesObj, largestLabelSize, sizeObject;\n\n switch (that.labelsVisibility) {\n case 'all':\n largestLabelSize = that._numericProcessor._longestLabelSize\n break;\n case 'endPoints':\n largestLabelSize = Math.max(that._tickIntervalHandler.labelsSize.minLabelOtherSize, that._tickIntervalHandler.labelsSize.maxLabelOtherSize);\n break;\n case 'none':\n largestLabelSize = 0;\n break;\n }\n\n switch (that.orientation) {\n case 'horizontal':\n propertiesObj = {\n marginA: 'marginBottom',\n marginB: 'marginTop',\n nearScaleDistance: 'bottom',\n farScaleDistance: 'top',\n paddingA: 'paddingBottom',\n paddingB: 'paddingTop',\n offset: 'offsetWidth',\n distance: 'left'\n };\n\n if (that._orientationChanged) {\n propertiesObj.offset = 'offsetHeight';\n that._trackChanged = true;\n }\n\n sizeObject = that._getSize(largestLabelSize, propertiesObj);\n return { width: sizeObject.optimalOtherSize, height: sizeObject.optimalSize };\n case 'vertical':\n propertiesObj = {\n marginA: 'marginLeft',\n marginB: 'marginRight',\n nearScaleDistance: 'right',\n farScaleDistance: 'left',\n paddingA: 'paddingLeft',\n paddingB: 'paddingRight',\n offset: 'offsetHeight',\n distance: 'top'\n };\n\n if (that._orientationChanged) {\n propertiesObj.offset = 'offsetWidth';\n that._trackChanged = true;\n }\n\n sizeObject = that._getSize(largestLabelSize, propertiesObj);\n return { width: sizeObject.optimalSize, height: sizeObject.optimalOtherSize };\n }\n }", "filesize(size) {\n let selectedSize = 0;\n let selectedUnit = \"b\";\n if (size > 0) {\n let units = [\n \"tb\",\n \"gb\",\n \"mb\",\n \"kb\",\n \"b\"\n ];\n for(let i = 0; i < units.length; i++){\n let unit = units[i];\n let cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10;\n if (size >= cutoff) {\n selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i);\n selectedUnit = unit;\n break;\n }\n }\n selectedSize = Math.round(10 * selectedSize) / 10; // Cutting of digits\n }\n return `<strong>${selectedSize}</strong> ${this.options.dictFileSizeUnits[selectedUnit]}`;\n }", "function _distanceToFitObjectInView(size, fov){\r\n const {tan} = Math\r\n return size / (2 * tan(fov / 2))\r\n}", "getRamSize() {\n let kb;\n switch (this.ramSize) {\n case RamSize.RAM_4_KB:\n kb = 4;\n break;\n case RamSize.RAM_16_KB:\n kb = 16;\n break;\n case RamSize.RAM_32_KB:\n kb = 32;\n break;\n case RamSize.RAM_48_KB:\n default:\n kb = 48;\n break;\n }\n return kb * 1024;\n }", "function getSize(sizesArray) {\n const parsed = {};\n // the main requested size is the first one\n const size = sizesArray[0];\n\n if (typeof size !== 'string') {\n return parsed;\n }\n\n const parsedSize = size.toUpperCase().split('X');\n const width = parseInt(parsedSize[0], 10);\n if (width) {\n parsed.width = width;\n }\n\n const height = parseInt(parsedSize[1], 10);\n if (height) {\n parsed.height = height;\n }\n\n return parsed;\n}", "setLengthScaleFactor() {\n//-------------------\nreturn this.scaleFromMetres = ((this.volMax.y()) - (this.volMin.y())) / Character.STD_AVATAR_HEIGHT_METRES;\n}", "function inicial_avatars(){\n $('#avatar img').animate({height:'55px'}, 300);\n $(\"#nombrepub\").animate({fontSize:'2em'}, 300);\n}", "function getIconForSize(targetSize, minifest)\n {\n if (minifest && minifest.icons) {\n var bestFit = 0;\n var biggestFallback = 0;\n for (var z in minifest.icons) {\n var size = parseInt(z, 10);\n if (bestFit == 0 || size >= targetSize) {\n bestFit = size;\n }\n if (biggestFallback == 0 || size > biggestFallback) {\n biggestFallback = size;\n }\n }\n if (bestFit !== 0) return minifest.icons[bestFit];\n if (biggestFallback !== 0) return minifest.icons[biggestFallback];\n }\n }", "getVoterPhotoUrlLarge (){\n return this.getState().voter.voter_photo_url_large || \"\";\n }", "_getSize(largestLabelSize, properties) {\n const that = this,\n tankStyle = window.getComputedStyle(that),\n trackStyle = window.getComputedStyle(that.$.track),\n trackSize = that._trackSize + parseFloat(trackStyle[properties.marginA]) + parseFloat(trackStyle[properties.marginB]);\n let firstLabel, lastLabel, optimalSize, optimalOtherSize;\n\n function calcScaleSize(selector, distance) {\n const labels = selector.getElementsByClassName('jqx-label');\n\n firstLabel = labels[0];\n lastLabel = labels[labels.length - 1];\n\n const firstLabelStyle = window.getComputedStyle(labels[0])[distance];\n\n optimalSize += parseFloat(firstLabelStyle);\n }\n\n optimalSize = trackSize;\n switch (that.scalePosition) {\n case 'none':\n optimalSize += parseFloat(tankStyle[properties.paddingA]) + parseFloat(tankStyle[properties.paddingB]);\n if (typeof (that._tankSizeBeforeOrientation) !== 'undefined') {\n optimalOtherSize = that.orientation === 'horizontal' ? that._tankSizeBeforeOrientation.height : that._tankSizeBeforeOrientation.width;\n }\n else {\n optimalOtherSize = that.orientation === 'horizontal' ? parseFloat(trackStyle.width) : parseFloat(trackStyle.height);\n }\n if (that._trackChanged !== true) {\n that._trackChanged = true;\n }\n\n return { optimalSize: optimalSize, optimalOtherSize: optimalOtherSize };\n case 'near':\n optimalSize += largestLabelSize;\n calcScaleSize(that.$.scaleNear, properties.nearScaleDistance);\n break;\n case 'far':\n optimalSize += largestLabelSize;\n calcScaleSize(that.$.scaleFar, properties.farScaleDistance);\n break;\n case 'both':\n optimalSize += 2 * largestLabelSize;\n calcScaleSize(that.$.scaleNear, properties.nearScaleDistance);\n calcScaleSize(that.$.scaleFar, properties.farScaleDistance);\n break\n }\n\n let firstRect, lastRect, difference;\n\n optimalSize += parseFloat(tankStyle[properties.paddingA]) + parseFloat(tankStyle[properties.paddingB]);\n firstRect = firstLabel.getBoundingClientRect();\n lastRect = lastLabel.getBoundingClientRect();\n\n optimalOtherSize = that[properties.offset];\n\n difference = firstRect[properties.distance] + firstLabel[properties.offset] - lastRect[properties.distance];\n if (difference > 0) {\n optimalOtherSize = firstLabel[properties.offset] + lastLabel[properties.offset];\n }\n\n return { optimalSize: optimalSize, optimalOtherSize: optimalOtherSize };\n }", "function animalSize(size){\n if ( size < 1) { return \"Tiny\" }\n else if (num < 2) {return \"Small\"}\n else if (num < 5) {return \"Medium\"}\n else if (num <= 10) {return \"Large\"}\n else if (num >= 40) {return \"Huge\"}\n }", "function get_random_size()\n{\n let r = pow( random( 0.5, 1 ), 8 );\n return constrain( 32 * r, 2, 32 ) ;\n}", "async size(path) {\n const validPath = await this.protectWhitespace(path);\n const command = `SIZE ${validPath}`;\n const res = await this.send(command);\n // The size is part of the response message, for example: \"213 555555\". It's\n // possible that there is a commmentary appended like \"213 5555, some commentary\".\n const size = parseInt(res.message.slice(4), 10);\n if (Number.isNaN(size)) {\n throw new Error(`Can't parse response to command '${command}' as a numerical value: ${res.message}`);\n }\n return size;\n }", "function _getSizeMb(sizeStr) {\n try {\n const factorMap = { 'g': 1000.0, 'm': 1.0, 'k': 0.001 };\n let [ valStr, units ] = sizeStr.split(/\\s/g);\n let val = parseFloat(valStr);\n let factor = factorMap[units[0].toLowerCase()];\n return val * factor;\n } catch (err) {\n throw new Error('Failed to get torrent size: ' + sizeStr);\n }\n}", "function getImage(id) {\r\n\treturn make_flickr_api_request(\"flickr.photos.getSizes\", id);\r\n}", "function sizetodepth(size, dif){\n if(dif == \"Easy\"){\n if(size == 4) difficulty = 2;\n else if(size == 5) difficulty = 2;\n else if(size == 6) difficulty = 2;\n else if(size == 7) difficulty = 2;\n else difficulty = 2;\n }else if(dif == \"Medium\"){\n if(size == 4) difficulty = 5;\n else if(size == 5) difficulty = 5;\n else if(size == 6) difficulty = 5;\n else if(size == 7) difficulty = 5;\n else difficulty = 5;\n }else if(dif == \"Hard\"){\n if(size == 4) difficulty = 10;\n else if(size == 5) difficulty = 10;\n else if(size == 6) difficulty = 9;\n else if(size == 7) difficulty = 8;\n else difficulty = 7;\n }else if(dif == \"Hardcore (may be slow)\"){\n if(size == 4) difficulty = 14;\n else if(size == 5) difficulty = 12;\n else if(size == 6) difficulty = 10;\n else if(size == 7) difficulty = 9;\n else difficulty = 9;\n }\n}", "function calculateSize(shoeBrand, size) {\n var calculatedFit, conversion;\n var fit = desiredFit.options[desiredFit.selectedIndex].value;\n shoeBrands.forEach((brand) => {\n if (shoeBrand == brand.id) {\n shoeFits = Object.keys(brand);\n for (var key in brand) {\n if (fit == key) {\n conversion = brand[key];\n }\n }\n }\n });\n calculatedFit = size / conversion;\n calculatedFit = (Math.round(calculatedFit*2) / 2).toFixed(1);\n // console.log(calculatedFit);\n return calculatedFit;\n}", "function minSize (x) {\r\n var pref = size(x);\r\n if ( pref === null ) {return null;}\r\n return filter(x) ? filter(x).call(this, { \r\n edge : edge(x),\r\n result : { width : pref.minWidth, height : pref.minHeight },\r\n size : { width : width, height : height }\r\n }) : maxSize(x);\r\n }", "function markerSize(magnitud) {\n return magnitud;\n}", "function sizeMod(){\n if(mouseIsPressed && mouseX >= 630 && mouseX <= 635){\n if(mouseY >= 400 && mouseY <= 570){\n sizeConst = mouseY\n return sizeConst\n } else{\n return sizeConst\n }\n } else{\n return sizeConst\n }\n}", "function cenaPoDimenziji(size) {\n switch (size) {\n case \"9x13\":\n return 10;\n case \"10x15\":\n return 15;\n case \"13x18\":\n return 20;\n case \"15x21\":\n return 25;\n case \"20x30\":\n return 30;\n case \"25x38\":\n return 35;\n }\n}", "function baseSize ( ) {\n\t\treturn $Base[['width', 'height'][options.ort]]();\n\t}", "function megaFriend(friends) {\n var largestName = friends[0];\n for (var i = 0; i < friends.length; i++) {\n var element = friends[i];\n if (element.length > largestName.length) {\n largestName = element;\n }\n }\n return largestName;\n}", "function mouthSize(animal) {\n return animal.toLowerCase() === 'alligator' ? 'small' : 'wide';\n}", "function getSquareSize() {\n let size = string.length;\n let sqrt = Math.sqrt(size);\n\n // check if the sqrt is an integer\n if (sqrt % 1 == 0) {\n //return width = height\n return sqrt;\n } else {\n alert(\"Pattern in file must be a square !\");\n return null;\n }\n}", "function getLargestBlob(src) {\n let contours = new cv.MatVector();\n let hierarchy = new cv.Mat();\n cv.findContours(src, contours, hierarchy, cv.RETR_TREE, cv.CHAIN_APPROX_SIMPLE, {x: 0, y: 0});\n let maxsize = 0;\n let maxind = 0;\n for (let i = 0; i<contours.size(); i++) {\n let area = cv.contourArea(contours.get(i), false);\n if( area > maxsize ) {\n maxsize = area;\n maxind = i;\n }\n }\n let percent = maxsize / (width * height);\n let color = new cv.Scalar(255, 255, 255);\n dstC3 = cv.Mat.zeros(height, width, cv.CV_8UC3);\n if(percent > 0.001) cv.drawContours(dstC3, contours, maxind, color, 0, cv.LINE_8, hierarchy);\n contours.delete(); hierarchy.delete();\n return dstC3;\n}", "static getPixelSizeForLayoutSize(layoutSize: number): number {\n return Math.round(layoutSize * PixelRatio.get());\n }", "function getSize(item, side, isBnds) {\n var itemB = itemBW = itemBH = 0,\n check = true, // width > heigth\n currSize; \n \n if (item.typename === 'GroupItem' && item.clipped) {\n try {\n for (var i = 0, iLen = item.pageItems.length; i < iLen; i++) {\n var clipItem = item.pageItems[i];\n if (clipItem.clipping || (clipItem.typename === 'CompoundPathItem' && \n clipItem.pathItems[0].clipping)) {\n itemB = isBnds ? clipItem.visibleBounds : clipItem.geometricBounds;\n }\n }\n if (itemB == 0) itemB = isBnds ? item.visibleBounds : item.geometricBounds;\n } catch (e) {}\n } else {\n itemB = isBnds ? item.visibleBounds : item.geometricBounds;\n }\n\n itemBW = itemB[2] - itemB[0]; // width\n itemBH = itemB[1] - itemB[3]; // heigth\n if (itemBH >= itemBW) check = false;\n\n switch (side) {\n case 'L':\n currSize = itemBH > itemBW ? itemBH : itemBW;\n break;\n case 'W':\n currSize = itemBW;\n break;\n case 'H':\n currSize = itemBH;\n break;\n }\n return { 'val': currSize, 'check': check };\n}", "get maxSizeInput() {\n return this._maxSize;\n }", "function _usfGetOriginImgWithSize(url, size = '50x50') {\r\n var n = url.lastIndexOf(\".\");\r\n if (n != -1)\r\n return url.substring(0, n) + '_' + size + url.substring(n);\r\n else\r\n return url\r\n}", "calculatePartSize(size) {\n if (!isNumber(size)) {\n throw new TypeError('size should be of type \"number\"')\n }\n if (size > this.maxObjectSize) {\n throw new TypeError(`size should not be more than ${this.maxObjectSize}`)\n }\n if (this.overRidePartSize) {\n return this.partSize\n }\n var partSize = this.partSize\n for (;;) {\n // while(true) {...} throws linting error.\n // If partSize is big enough to accomodate the object size, then use it.\n if (partSize * 10000 > size) {\n return partSize\n }\n // Try part sizes as 64MB, 80MB, 96MB etc.\n partSize += 16 * 1024 * 1024\n }\n }", "function getCropSize(mediaWidth, mediaHeight, containerWidth, containerHeight, aspect, rotation) {\n if (rotation === void 0) {\n rotation = 0;\n }\n\n var _a = translateSize(mediaWidth, mediaHeight, rotation),\n width = _a.width,\n height = _a.height;\n\n var fittingWidth = Math.min(width, containerWidth);\n var fittingHeight = Math.min(height, containerHeight);\n\n if (fittingWidth > fittingHeight * aspect) {\n return {\n width: fittingHeight * aspect,\n height: fittingHeight\n };\n }\n\n return {\n width: fittingWidth,\n height: fittingWidth / aspect\n };\n}", "function getMaxSectorSquare() {\n const sorted = [...portrait].sort((a, b) => (b.value - a.value));\n return sorted[0].value;\n }", "_maximalLabelFontSize() {\n let me = this,\n visDatasets = me.visDatasets;\n let max= 0;\n visDatasets.forEach(dataset => {\n let {\n fontSize\n } = dataset;\n max = fontSize > max ? fontSize : max;\n });\n return max;\n }", "allSizes() {\n return _.chain(this.poms).pluck('sizes').first().value();\n }", "function choose_size(size) {\n sort_size = size;\n resize_array();\n}", "function getRandomSize(){\n var r = pow(random(0.01, 1), 2);\n return constrain(r * 36, 5, 36);\n}", "function getSize(d) {\n return 750;\n}", "function getCurrentSize() {\n var matched = void 0;\n\n for (var i = 0; i < queries.length; i++) {\n var query = queries[i];\n\n if (matchMedia(query.value).matches) {\n matched = query;\n }\n }\n\n if ((typeof matched === 'undefined' ? 'undefined' : _typeof(matched)) === 'object') {\n return matched.name;\n }\n return matched;\n }", "function megaFriend(friendName){\n var largest = friendName[0];\n for (i = 0; i < friendName.length; i++){\n var hisName = friendName[i];\n if (hisName.length > largest.length){\n largest = hisName;\n }\n }\n return largest;\n}", "static roundToNearestPixel(layoutSize: number): number {\n const ratio = PixelRatio.get();\n return Math.round(layoutSize * ratio) / ratio;\n }", "function requestSizes(photoId) {\n var apiUrl = \"https://api.flickr.com/services/rest/?method=flickr.photos.getSizes&api_key=\" + apiKey + \"&photo_id=\" + parseInt(photoId) + \"&format=json&nojsoncallback=1&\"\n var xhr = new XMLHttpRequest();\n\n xhr.open(\"GET\", apiUrl, false);\n xhr.send();\n return JSON.parse(xhr.response);\n }", "function sizepick(size) {\n currentSize = size;\n}", "getImageDimensions(metadata = this.getAttachmentMetadata()) {\n if (!metadata) { return metadata }\n const { columnWidth, commentOffset, contentWidth, isGridMode, isComment } = this.props\n const { height, ratio } = metadata\n const allowableWidth = isGridMode ? columnWidth : contentWidth\n const widthOffset = isGridMode && isComment ? commentOffset : 0\n const calculatedWidth = allowableWidth - widthOffset\n const maxCellHeight = isGridMode ? 1200 : 7500\n const widthConstrainedRelativeHeight = Math.round(calculatedWidth * (1 / ratio))\n const hv = Math.min(widthConstrainedRelativeHeight, height, maxCellHeight)\n const wv = Math.round(hv * ratio)\n return {\n width: wv,\n height: hv,\n ratio,\n }\n }", "function getSizeGivenAspectRatio(maxPercentX, maxPercentY, aspectRatio)\n{\n\t// The goal is to either get to max x or max y, then accomodate the other\n\tlet pixelX = xPercentToPixel(maxPercentX);\n\tlet pixelY = yPercentToPixel(maxPercentY);\n\n\tlet currentRatio = pixelY / pixelX;\n\tif (currentRatio < aspectRatio)\n\t{\n\t\t// Keep pixelY where it is, shrink pixelX according to ratio\n\t\tpixelX = pixelY / aspectRatio;\n\t}\n\telse if (currentRatio > aspectRatio)\n\t{\n\t\t// Keep pixelX where it is, shrink pixelY according to ratio\n\t\tpixelY = pixelX * aspectRatio;\n\t}\n\treturn { x: pixelX, y: pixelY };\n}" ]
[ "0.64878374", "0.6473315", "0.618326", "0.60618657", "0.5899504", "0.58367985", "0.5785582", "0.5780182", "0.57740504", "0.576017", "0.5734904", "0.570705", "0.56564313", "0.5644715", "0.55765253", "0.556347", "0.55545896", "0.5499402", "0.54921895", "0.5485978", "0.54574734", "0.54378784", "0.5434511", "0.5430964", "0.5409613", "0.53831315", "0.53787374", "0.53763586", "0.53512037", "0.5324545", "0.5323064", "0.53149325", "0.5298633", "0.5298185", "0.5289071", "0.5289049", "0.52888453", "0.52811193", "0.5278473", "0.5276103", "0.52756214", "0.5268364", "0.52678955", "0.5264461", "0.52608746", "0.5258676", "0.52104044", "0.52064425", "0.5199898", "0.5184794", "0.5184794", "0.51838195", "0.51779723", "0.5171055", "0.5167551", "0.5162254", "0.51614666", "0.5159545", "0.51582205", "0.515324", "0.5152107", "0.51501983", "0.51487", "0.51452315", "0.5135851", "0.5135782", "0.513465", "0.5115948", "0.5114702", "0.5113764", "0.510815", "0.51023126", "0.5097088", "0.5094146", "0.5090092", "0.5090023", "0.50896883", "0.5082949", "0.5082727", "0.50824153", "0.50798017", "0.507929", "0.50792146", "0.5073308", "0.50713295", "0.5067708", "0.50615174", "0.5060738", "0.5058501", "0.5055282", "0.50446236", "0.50432503", "0.504253", "0.5035162", "0.50305575", "0.50302607", "0.5028914", "0.5027121", "0.5025932", "0.50193876" ]
0.8122676
0
Returns the optimal avatar url to return for the given size
function getGroupAvatarUrlForSize(group, size) { const avatarUrl = group.avatarUrl; const parsed = url.parse(avatarUrl, true); // Tack on a version param otherwise the S3 url is always the same and // you always get the cached avatar from nginx's cache. parsed.query = parsed.query || {}; if (group.avatarVersion) { parsed.query.v = group.avatarVersion; } if (isGitterInternalAvatarUrl(avatarUrl)) { const bestSize = getBestSizeFor(size); // Just use the original if (!bestSize) return avatarUrl; var pathParts = parsed.pathname.split('/'); pathParts.pop(); pathParts.push(bestSize); parsed.pathname = pathParts.join('/'); return url.format(parsed); } else if (isGitlabSecurityDescriptorType(group.sd && group.sd.type)) { if (size) { // This doesn't actually work but these parameters are added in the GitLab UI parsed.query.width = size; } return url.format(parsed); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _usfGetOriginImgWithSize(url, size = '50x50') {\r\n var n = url.lastIndexOf(\".\");\r\n if (n != -1)\r\n return url.substring(0, n) + '_' + size + url.substring(n);\r\n else\r\n return url\r\n}", "function getUserPhotoUrl(accountName, size) {\n var userPhotoBaseUrl = tryGetAlternativeUrl(USER_PHOTO_KEY) || DEFAULT_USER_PHOTO_BASE_URL;\n var sizeLetter;\n switch (size) {\n case 2 /* Medium */:\n sizeLetter = 'M';\n break;\n case 3 /* Large */:\n sizeLetter = 'L';\n break;\n default:\n // Default to small if size is not provided. Server will assume small either way, but having the\n // parameter explicitly will reduce variability in CDN, and will increase probability of the cache hit.\n sizeLetter = 'S';\n }\n var userPhotoUri = new Uri_1.default(userPhotoBaseUrl);\n userPhotoUri.setQueryParameter(USER_PHOTO_SIZE_PARAM, sizeLetter);\n // empty accountName will resolve to the default doughboy picture\n userPhotoUri.setQueryParameter(USER_PHOTO_ACCOUNT_NAME_PARAM, accountName || '');\n return userPhotoUri.toString();\n}", "function getUserPhotoUrl(accountName, size) {\r\n var userPhotoBaseUrl = tryGetAlternativeUrl(USER_PHOTO_KEY) || DEFAULT_USER_PHOTO_BASE_URL;\r\n var sizeLetter;\r\n switch (size) {\r\n case 2 /* Medium */:\r\n sizeLetter = 'M';\r\n break;\r\n case 3 /* Large */:\r\n sizeLetter = 'L';\r\n break;\r\n default:\r\n // Default to small if size is not provided. Server will assume small either way, but having the\r\n // parameter explicitly will reduce variability in CDN, and will increase probability of the cache hit.\r\n sizeLetter = 'S';\r\n }\r\n var userPhotoUri = new Uri_1.default(userPhotoBaseUrl);\r\n userPhotoUri.setQueryParameter(USER_PHOTO_SIZE_PARAM, sizeLetter);\r\n // empty accountName will resolve to the default doughboy picture\r\n userPhotoUri.setQueryParameter(USER_PHOTO_ACCOUNT_NAME_PARAM, accountName || '');\r\n return userPhotoUri.toString();\r\n}", "function getUserPhotoUrl(accountName, size) {\r\n var userPhotoBaseUrl = tryGetAlternativeUrl(USER_PHOTO_KEY) || DEFAULT_USER_PHOTO_BASE_URL;\r\n var sizeLetter;\r\n switch (size) {\r\n case 2 /* Medium */:\r\n sizeLetter = 'M';\r\n break;\r\n case 3 /* Large */:\r\n sizeLetter = 'L';\r\n break;\r\n default:\r\n // Default to small if size is not provided. Server will assume small either way, but having the\r\n // parameter explicitly will reduce variability in CDN, and will increase probability of the cache hit.\r\n sizeLetter = 'S';\r\n }\r\n var userPhotoUri = new Uri_1.default(userPhotoBaseUrl);\r\n userPhotoUri.setQueryParameter(USER_PHOTO_SIZE_PARAM, sizeLetter);\r\n // empty accountName will resolve to the default doughboy picture\r\n userPhotoUri.setQueryParameter(USER_PHOTO_ACCOUNT_NAME_PARAM, accountName || '');\r\n return userPhotoUri.toString();\r\n}", "function gravatar(user, size) {\n if (!size) {\n size = 200;\n }\n if (!this.email) {\n return `https://gravatar.com/avatar/?s=${size}&d=retro`;\n }\n const md5 = crypto.createHash('md5').update(this.email).digest('hex');\n return `https://gravatar.com/avatar/${md5}?s=${size}&d=retro`;\n}", "function getBestSizeFor(size) {\n for (var i = 0; i < KNOWN_AVATAR_SIZES.length; i++) {\n var currentSize = KNOWN_AVATAR_SIZES[i];\n if (size <= currentSize) return currentSize;\n }\n\n return null;\n}", "function addSizeToGoogleProfilePic(url) {\n if (url.indexOf(\"googleusercontent.com\") !== -1 && url.indexOf(\"?\") === -1) {\n return url + \"?sz=150\";\n }\n return url;\n}", "function addSizeToGoogleProfilePic(url) {\n if (url.indexOf('googleusercontent.com') !== -1 && url.indexOf('?') === -1) {\n return url + '?sz=50';\n }\n return url;\n}", "function addSizeToGoogleProfilePic(url) {\n if (url.indexOf('googleusercontent.com') !== -1 && url.indexOf('?') === -1) {\n return url + '?sz=150';\n }\n return url;\n}", "function addSizeToGoogleProfilePic(url) {\n if (url.indexOf('googleusercontent.com') !== -1 && url.indexOf('?') === -1) {\n return url + '?sz=150';\n }\n return url;\n}", "function addSizeToGoogleProfilePic(url) {\n if (url.indexOf('googleusercontent.com') !== -1 && url.indexOf('?') === -1) {\n return url + '?sz=150';\n }\n return url;\n}", "function addSizeToGoogleProfilePic(url) {\n if (url.indexOf('googleusercontent.com') !== -1 && url.indexOf('?') === -1) {\n return url + '?sz=150';\n }\n return url;\n}", "function addSizeToGoogleProfilePic(url) {\n if (url.indexOf('googleusercontent.com') !== -1 && url.indexOf('?') === -1) {\n return url + '?sz=150';\n }\n return url;\n}", "function addSizeToGoogleProfilePic(url) {\n if (url.indexOf('googleusercontent.com') !== -1 && url.indexOf('?') === -1) {\n return url + '?sz=150';\n }\n return url;\n}", "getVoterPhotoUrlLarge (){\n return this.getState().voter.voter_photo_url_large || \"\";\n }", "function _usfGetScaledImageUrl (url, size = '{width}') {\r\n if (_usfIsDynamicImage)\r\n return url.replace('{size}', size);\r\n \r\n var n = url.lastIndexOf('_');\r\n if (n === -1)\r\n return url;\r\n\r\n return url.substr(0, n) + url.substr(n).replace('_' + usf.settings.search.imageSize + 'x', '_' + size + 'x')\r\n}", "function AvatarURL( fn )\n{\n return 'https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/' + fn.substring( 0, 2 ) + '/' + fn + '.jpg';\n}", "function _getAvatarFromGroup(group, size) {\n if (group.avatarUrl) {\n return getGroupAvatarUrlForSize(group, size);\n }\n}", "getAvatarUrl() {\n const { user } = this.state;\n return endpoint + '/core/avatar/' + user.id + '/' + user.avatar;\n }", "function getPhotoURL(id, farm, server, secret, size) {\n if(!size) size = '';\n else size = '_' + size;\n return 'https://farm' + farm + '.staticflickr.com/' + server + '/' + id + '_' + secret + size + '.jpg';\n}", "function getPhotoLink(photoSizes, maxSizeType)\n{\n\tvar plink = '';\n\tvar ptype = '';\n\tfor (var i = photoSizes.sizes.length-1; i >=0 ; i--)\n {\n\t\tvar photo = photoSizes.sizes[i];\n\t\tif (photo.type == 'x' && ptype == '') // 640px\n\t\t{\n\t\t\tplink = photo.url;\n\t\t\tptype = photo.type;\n\t\t}\n\t\telse if (photo.type == 'y' && ( ptype == '' || ptype == 'x') && maxSizeType != 'x') // 807px\n\t\t{\n\t\t\tplink = photo.url;\n\t\t\tptype = photo.type;\n\t\t}\n\t\telse if (photo.type == 'z' && ( ptype == '' || ptype == 'x' || ptype == 'y') && maxSizeType != 'x' && maxSizeType != 'y') // 1280x1024\n\t\t{\n\t\t\tplink = photo.url;\n\t\t\tptype = photo.type;\n\t\t}\n\t\telse if (photo.type == 'w' && maxSizeType != 'x' && maxSizeType != 'y' && maxSizeType != 'z') // 2560x2048\n\t\t{\n\t\t\tplink = photo.url;\n\t\t\tbreak;\n\t\t}\n }\n\treturn plink;\n}", "vehicleSize(size) {\n switch (size) {\n case \"small\":\n return \"https://png.icons8.com/dotty/40/000000/dirt-bike.png\";\n case \"medium\":\n return \"https://png.icons8.com/dotty/40/000000/fiat-500.png\";\n case \"large\":\n return \"https://png.icons8.com/dotty/40/000000/suv.png\";\n default:\n return \"https://png.icons8.com/dotty/40/000000/fiat-500.png\";\n }\n }", "function getPic(type, userid, size) {\n // If userid is current user\n if (typeof _session.user != \"undefined\" && userid == _session.user.userid) {\n //age = _session.user.age;\n //gender = _session.user.gender;\n picextension = _session.user.picextension;\n }else if (typeof _session.users.user[userid] != \"undefined\") {\n // If Object is present in the current streamMember cache\n //age = _session.users.user[userid].age;\n //gender = _session.users.user[userid].gender;\n picextension = _session.users.user[userid].picextension;\n }else{\n // If Object is not present in the current streamMember cache\n //age = 0;\n //gender = \"\"\n //picextension = \"\"\n }\n \n // If no profile pic exists\n if(typeof picextension == \"undefined\" || picextension == null || picextension.length == 0){\n // Display age appropriate Silohoutte *TODO: Get Age from results\n if(userid < 50){\n gender = \"M\";\n } else {\n gender = \"F\";\n }\n \n imgSrc = 'img/profiles/no-picture-' + gender.toLowerCase() + '.png';\n }else{\n imgSrc = _application.url.fetch[type] + userid + size + picextension;\n }\n \n return imgSrc;\n}", "get avatar24() {\n return \"http://www.gravatar.com/avatar/\" + $md5.hex_md5(this.email) +\n \".jpg?d=wavatar&s=24\";\n }", "static getYoutubeThumb(videoId, size) {\n if (videoId.startsWith(\"http\")) {\n let regExp = /^.*(youtu\\.be\\/|v\\/|u\\/\\w\\/|embed\\/|watch\\?v=|\\&v=)([^#\\&\\?]*).*/;\n let match = videoId.match(regExp);\n if (match && match[2].length === 11) {\n videoId = match[2];\n }\n else {\n console.log(\"======== ERROR: can not get videoId from: \", videoId);\n }\n }\n if (videoId === null) {\n return \"http://img.youtube.com/vi/noimagefound/default.jpg\";\n }\n size = (size == undefined) ? 'big' : size;\n if (size === 'small') {\n return \"http://img.youtube.com/vi/\" + videoId + \"/default.jpg\";\n }\n return 'http://img.youtube.com/vi/' + videoId + '/0.jpg';\n }", "function FormatUrl(url)\n{\n let base = \"http://cdn.akamai.steamstatic.com/steamcommunity/public/images/avatars/\";\n url = url.substring(url.indexOf('/avatars/') + 9, url.length);\n url = base + url;\n return url;\n}", "getVoterPhotoUrlMedium (){\n return this.getState().voter.voter_photo_url_medium || \"\";\n }", "function getImgSize(val, size)\r\n\t{\r\n\t\tswitch(size)\r\n\t\t{\r\n\t\t\tdefault:\r\n\t\t\tcase 'normal': return val;\r\n\t\t\tcase 'small': return parseInt(val * 0.75);\r\n\t\t\tcase 'tiny': return parseInt(val * 0.5);\r\n\t\t}\r\n\t}", "grabAvatar(userId, avatarHash) {\n let Format = avatarHash.startsWith(\"a_\") ? \"gif\" : \"png\";\n return {\n \"hash\": avatarHash,\n \"format\": Format,\n \"url\": `https://cdn.discordapp.com/avatars/${userId}/${avatarHash}.${Format}?size=1024`\n };\n }", "function avatar(url) {\n\tlet div = document.createElement(\"DIV\");\n\tlet a = document.createElement(\"A\");\n\tlet img = document.createElement(\"IMG\");\n\timg.src = url;\n\timg.width = 40;\n\timg.height = 40;\n\timg.className = \"avatar\";\n\tdiv.appendChild(a.appendChild(img));\n\treturn div;\n}", "getVoterPhotoUrlTiny (){\n return this.getState().voter.voter_photo_url_tiny || \"\";\n }", "generateImageUrlFromCoverId(coverId, size) {\r\n generateImageUrl(coverId).then(json => {\r\n this.setState({\r\n imgUrl:\r\n \"//images.igdb.com/igdb/image/upload/t_\" +\r\n size +\r\n \"/\" +\r\n json[0].image_id +\r\n \".jpg\"\r\n });\r\n });\r\n }", "function getGoogleAvatar(index, googleId, callback) {\n gapi.client.load('plus','v1', function() {\n var request = gapi.client.plus.people.get({\n 'userId': googleId\n });\n request.execute(function(resp) {\n var img;\n if(resp.image) {\n if(!resp.image.isDefault) {\n img = resp.image.url.replace('?sz=50', '?sz=100');\n }\n }\n callback(index, img);\n });\n });\n}", "function getImageSize(url, callback) {\n\tcreateLimitedRequest(url, function(err, request) {\n\t\tif (err) {\n\t\t\treturn callback(err);\n\t\t}\n\n\t\trequest.on(\"error\", callback);\n\t\tgm(request).size(callback);\n\t});\n}", "function fetchAvatarUrl(userID) {\n return fetch(`https://catappapi.herokuapp.com/users/${userID}`)\n .then(response => response.json())\n .then(data => data.imageUrl)\n}", "function getIconForSize(app, targetSize) {\n var manifest = app.manifest;\n\n if (targetSize === undefined) {\n targetSize = DEFAULT_SIZE;\n }\n\n if (manifest && manifest.icons) {\n var bestFit = 0;\n var biggestFallback = 0;\n\n for (var i in manifest.icons) {\n var iconSize = parseInt(DEFAULT_SIZE, 10);\n\n if (bestFit === 0 || iconSize >= targetSize) {\n bestFit = iconSize;\n }\n\n if (biggestFallback === 0 || iconSize > biggestFallback) {\n biggestFallback = iconSize;\n }\n }\n\n if ((bestFit !== 0 || biggestFallback !== 0) &&\n manifest.icons[bestFit || biggestFallback]) {\n // HACK: These paths ought be absolute, but we hack around them for now.\n // These SHOULD be absolute paths, but most (all?) of the manifets\n // in the Marketplace are NOT absolute, so we add prefixes to make\n // stuff work for now.\n return (app._origin || app.origin) +\n (manifest.launch_path ? manifest.launch_path : '') +\n (manifest.icons[bestFit || biggestFallback]);\n }\n }\n\n return DEFAULT_ICON;\n }", "getImgUrl(id) {\n if (id === 1) {\n return `images/profile/4randy.png`; // special pic for randy\n } else {\n const index = id%18;\n return `images/profile/${index}.png`\n }\n }", "function getImageThumbnail(index_to_get) {\n if((imgur_list.length > 0) && (index_to_get < imgur_list.length)) {\n console.log(\"Getting Image: \" + imgur_list[index_to_get].link);\n var image_url = imgur_list[index_to_get].link;\t// The Full Size Image\n\n var n = image_url.lastIndexOf(\".\");\n var ext = image_url.slice(n).toUpperCase();\n //ext=\".PNG\";\n console.log(\"Extension = '\"+ext+\"'\");\n\n var get_thumbnail = true;\n if(get_thumbnail) {\n // The Medium Thumbnail (320x320 or close to)\n // Also, thumbnails on imgur are always jpg\n image_url = image_url.slice(0, n) + \"m.jpg\";\n console.log(\"Getting Thumbnail: \" + image_url);\n getJpegImage(image_url);\n } else {\n switch (ext) {\n case \".PNG\":\n getPngImage(image_url);\n break;\n case \".JPG\":\n case \".JPEG\":\n getJpegImage(image_url);\n }\n }\n } else {\n console.log(\"Index bigger than array!\");\n }\n}", "getBestIconUrl() {\n const bestIcon = this.getBestIcon();\n\n if (!bestIcon) {\n return '';\n }\n\n const iconUrl = bestIcon.src;\n if (iconUrl.match(DOMAIN_PATH_REGEXP)) {\n return iconUrl;\n }\n\n const match = DOMAIN_PATH_REGEXP.exec(this.url);\n const domain = match[1];\n const path = match[2] || '';\n\n if (iconUrl[0] === '/') {\n return domain + iconUrl;\n }\n\n return domain + path + iconUrl;\n }", "updateAvatar (avatarUrl) {\n $(\"#dominantSpeakerAvatar\").attr('src', avatarUrl);\n }", "function ProfileImg(props) {\n const { url, size, link } = props;\n\n const imgStyles = {\n width: `${size}rem`,\n borderRadius: '100%',\n }\n\n return (\n <div>\n <Link to={link}>\n <img\n src={url}\n style={imgStyles}\n />\n </Link>\n </div>\n );\n}", "get sourceAvatar() {}", "function AvatarPacked({ variant, avatar_Url, ...rest }) {\n let background;\n let color; \n let diameter = \"300px\";\n let defaultAvatar = \"https://bit.ly/dan-abramov\";\n \n \n if (variant === 'sm') {\n background = '#E4DDDD';\n color = background;\n diameter = \"78px\";\n \n } else if (variant === 'md') {\n background = '#E4DDDD';\n color = background;\n diameter = \"152px\";\n \n } else if (variant === 'lg') {\n background = '#E4DDDD';\n color = background; \n diameter = \"159px\"; \n } \n \n \n \n if(avatar_Url == null || avatar_Url ==\"\"){\n return ( \n <img src={defaultAvatar} alt=\"Avatar\" style={{color:background,width:diameter,borderRadius:\"50%\"}}></img>\n );\n }\n else{\n return <img src={avatar_Url} alt=\"Avatar\" style={{color:background,width:diameter,borderRadius:\"50%\"}}></img>\n }\n}", "function getImageUrl(item) {\n return item.$image ? item.$image.image + '?width=' + scope.cfg.image.width + '&height=' + scope.cfg.image.height + '&mode=crop' : null;\n }", "function getUserAvatar() {\n\n var contract = {\n \"function\": \"sm_getAddressAvatar\",\n \"args\": JSON.stringify([gUserAddress])\n }\n\n return neb.api.call(getAddressForQueries(), gdAppContractAddress, gNasValue, gNonce, gGasPrice, gGasLimit, contract);\n\n}", "getGalleryAvatarPict(uid) {\n let j = this.jQuery;\n let prefUrl = 'https://sonic-world.ru/files/public/avatars/av';\n if (uid == undefined) return false;\n j.ajax({\n url: prefUrl + uid +'.jpg',\n type:'HEAD',\n error:\n function(){\n j.ajax({\n url: prefUrl + uid +'.png',\n type:'HEAD',\n error:\n function(){\n j.ajax({\n url: prefUrl + uid +'.gif',\n type:'HEAD',\n error:\n function(){\n j('.sw_gallery_avatar_'+ uid)\n .css('background-color', '#E0E0E0');\n },\n success:\n function(){\n j('.sw_gallery_avatar_'+ uid)\n .css('background-image', 'url(../files/public/avatars/av'+ uid +'.gif)');\n }\n });\n },\n success:\n function(){\n j('.sw_gallery_avatar_'+ uid)\n .css('background-image', 'url(../files/public/avatars/av'+ uid +'.png)');\n }\n });\n },\n success:\n function(){\n j('.sw_gallery_avatar_'+ uid)\n .css('background-image', 'url(../files/public/avatars/av'+ uid +'.jpg)');\n }\n });\n }", "function imageLargeUrl(img) {\n var retUrl;\n // try new photobox format first, parent LI has a data-photo-id attribute\n var imageId = myJQ(img).parent().attr(\"data-photo-id\");\n if (imageId) {\n // TODO the \"plus\" image still appears to exist even if there is no zoom box, any exceptions?\n retUrl = myJQ(\"#Photobox_PhotoserverPlusUrlString,#PhotoserverPlusUrlString\").attr(\"value\") + imageId + \".jpg\";\n } else {\n // old format\n // thumbnail link has class \"lbt_nnnnn\"\n imageId = myJQ(img).parent().attr(\"class\").substring(4);\n\n // TODO is \"photoStartIdNewDir\" still used in the old-format listings? \n // This is what TM does in their own script, comparing the current image ID to the ID where they started storing the images in a new path.\n var isNewImage = (unsafeWindow.photoStartIdNewDir ? unsafeWindow.photoStartIdNewDir > imageId : false);\n if (isNewImage) {\n retUrl = img.src.replace(\"/thumb\", \"\").replace(\".jpg\", \"_full.jpg\");\n } else {\n retUrl = img.src.replace(\"/thumb\", \"/full\");\n }\n }\n console.log(retUrl);\n return retUrl;\n}", "determineThumbnail() {\n if (this.props.book.imageLinks && this.props.book.imageLinks.smallThumbnail) {\n return `${this.props.book.imageLinks.smallThumbnail}`;\n } else {\n return `${process.env.PUBLIC_URL + '/images/missing-thumbnail.PNG'}`;\n }\n }", "findMedalImage(medal) {\n const host = \"https://bungie.net/\";\n\n let iconPath = MedalsDefinition[medal].iconImage;\n let fullIconPath = host + iconPath;\n\n return (fullIconPath);\n }", "function photo_thumbnail_url(request, response) {\n\n if (!request.user || !request.user.authenticated()) {\n response.error(\"Needs an authenticated user\");\n return;\n }\n\n var query = new Parse.Query(PHOTO_OBJECT_NAME);\n query.get(request.params.objectId, {\n\n success: function(result) {\n\n response.success({\n url: cloudinary.url(result.get(CLOUDINARY_IDENTIFIER_FIELD_NAME), {crop: \"fill\", width: 150, height: 150})\t\n });\n\n },\n error: function() {\n response.error(\"image lookup failed\");\n }\n\n });\n\n}", "function getImageUrl (photo, format) {\n\treturn \"https://farm\" + photo.farm + \".static.flickr.com/\" + photo.server + \"/\" + photo.id + \"_\" + photo.secret + format + \".jpg\";\n}", "function limitProfileUrl(url) {\n if (url.length > 60) {\n return url.substr(0, 30) + '...' + url.substr(url.length - 30);\n }\n return url;\n }", "function download_avatar(url, cb) {\n // get MD5 hash\n var hash = image(url);\n \n var loc = imdir + \"/240/\" + hash +\".png\";\n \n // check if it already exists!\n if (!fs.existsSync( loc )) {\n // no exist!\n request(url, function(err) {\n if (err) {\n return d.error(\"Error downloading PSN avatar \" + url, \"psn\");\n } else {\n // create thumbnails too\n render_thumbs(hash, function() {\n // return\n return cb(hash);\n });\n }\n }).pipe(\n fs.createWriteStream( loc )\n );\n } else {\n return cb(hash);\n }\n}", "function getIconForSize(targetSize, minifest)\n {\n if (minifest && minifest.icons) {\n var bestFit = 0;\n var biggestFallback = 0;\n for (var z in minifest.icons) {\n var size = parseInt(z, 10);\n if (bestFit == 0 || size >= targetSize) {\n bestFit = size;\n }\n if (biggestFallback == 0 || size > biggestFallback) {\n biggestFallback = size;\n }\n }\n if (bestFit !== 0) return minifest.icons[bestFit];\n if (biggestFallback !== 0) return minifest.icons[biggestFallback];\n }\n }", "function avatar(ava) //selects the avatar of the user\n{\n if(ava==='ronan')\n {\n\tavatarPic=\"ronan\";\n }\n else if(ava==='john')\n {\n\tavatarPic=\"john\";\n }\n else if(ava==='carter')\n {\n\tavatarPic=\"carter\";\n }\n else if(ava==='mckay')\n {\n\tavatarPic=\"mckay\";\n }\n \n}", "function avatarAssign(fact) {\n switch(fact) {\n case \"New Conglomerate\":\n return \"https://www-cdn.planetside2.com/images/empires/nc/nc-soldier-right.png?v=3304520529\"\n case \"Terran Republic\":\n return \"https://www-cdn.planetside2.com/images/empires/tr/tr-soldier-right.png?v=157706187\"\n case \"Vanu Sovereignty\":\n return \"https://www-cdn.planetside2.com/images/empires/vs/vs-soldier-right.png?v=616336742\"\n default: \n return \"https://vignette.wikia.nocookie.net/planetside2/images/9/93/Auraxis.jpg/revision/latest/scale-to-width-down/220?cb=20150129141914\"\n }\n}", "function smallImage(filename) {\r\n let size = \"w_55\";\r\n return `https://res.cloudinary.com/funwebdev/image/upload/${size}/art/paintings/${filename}`;\r\n }", "getMxcAvatarUrl(): string { throw new Error(\"Member class not implemented\"); }", "function bigImage ( data, index ) {\n if( typeof index === 'undefined' ) return \"\";\n if( index === null ) return \"\";\n if( !data ) return \"\";\n const urlArray = data.results[index].image_url;\n return urlArray[urlArray.length-1];\n}", "function getProfilePicUrl() {\r\n if(isUserSignedIn()){\r\n return auth.currentUser.photoURL || '/assets/images/becoder.png';\r\n }\r\n}", "getBestImageForType (srcType) {\n let imageSrc = this.props[srcType]\n let fitSizes = {}\n\n if (this.isImageLoaded(imageSrc)) {\n // Use full-size image if available\n fitSizes = this.getFitSizes(this.imageCache[imageSrc].width, this.imageCache[imageSrc].height)\n } else if (this.isImageLoaded(this.props[`${srcType}Thumbnail`])) {\n // Fall back to using thumbnail if the image has not been loaded\n imageSrc = this.props[`${srcType}Thumbnail`]\n fitSizes = this.getFitSizes(this.imageCache[imageSrc].width, this.imageCache[imageSrc].height, true)\n } else {\n return null\n }\n\n return {\n src: imageSrc\n , height: fitSizes.height\n , width: fitSizes.width\n }\n }", "function getProfilePicUrl() {\n return (\n firebase.auth().currentUser.photoURL ||\n \"../../resources/images/profile_placeholder.png\"\n );\n}", "getBestImageForType(srcType) {\n let imageSrc = this.props[srcType];\n let fitSizes = {};\n\n if (this.isImageLoaded(imageSrc)) {\n // Use full-size image if available\n fitSizes = this.getFitSizes(\n this.imageCache[imageSrc].width,\n this.imageCache[imageSrc].height\n );\n } else if (this.isImageLoaded(this.props[`${srcType}Thumbnail`])) {\n // Fall back to using thumbnail if the image has not been loaded\n imageSrc = this.props[`${srcType}Thumbnail`];\n fitSizes = this.getFitSizes(\n this.imageCache[imageSrc].width,\n this.imageCache[imageSrc].height,\n true\n );\n } else {\n return null;\n }\n\n return {\n src: imageSrc,\n height: this.imageCache[imageSrc].height,\n width: this.imageCache[imageSrc].width,\n targetHeight: fitSizes.height,\n targetWidth: fitSizes.width,\n };\n }", "function generatePhoto(id) {\n\treturn ('[url=' + images[id].link + '][img]' + images[id].url + document.getElementById('photoSize').value +'[/img][/url]');\n}", "function Avatar(_ref) {\n var path = _ref.path,\n size = _ref.size;\n //size:.avatar-medium .avatar-sm\n return /*#__PURE__*/React.createElement(\"img\", {\n src: path,\n alt: \"Avatar\",\n className: \"avatar \" + size\n });\n}", "function getProfilePicUrl() {\n return getAuth().currentUser.photoURL || '/images/profile_placeholder.png';\n}", "function expandedImageUrl(photo_id) {\n //return 'http://oldnyc-assets.nypl.org/600px/' + photo_id + '.jpg';\n //return 'http://192.168.178.80/thumb/' + photo_id + '.jpg';\n return 'http://www.oldra.it/thumb/' + photo_id + '.jpg';\n}", "setAvatar(url) {\n const template = `<img src=\"${url}\" alt=\"\">`;\n this._userAvatar.insertAdjacentHTML(\"afterbegin\", template);\n }", "function getImageUrl(context) {\n let imageName =\n context.animalHead +\n '_' +\n context.animalBody +\n '_' +\n context.animalLegs +\n '_render.gif';\n let imageUrl = `https://storage.googleapis.com/${\n firebaseConfig.storageBucket\n }/gifs/${imageName}`;\n return imageUrl;\n}", "getImageUrl(scale) {\n // eslint-disable-next-line @typescript-eslint/non-nullable-type-assertion-style\n return this._data[`image_url_${scale}x`];\n }", "function getImageUrl(authData) {\n switch (authData.provider) {\n // case 'password':\n // return authData.password.email.replace(/@.*/, '');\n case 'twitter':\n /* jshint -W106 */\n return authData.twitter.cachedUserProfile.profile_image_url;\n // case 'facebook':\n // return authData.facebook.displayName;\n }\n }", "renderAvatar() {\n const avatarId = this.props.currentUser.profile_photo_id;\n if (avatarId && (this.props.photos[avatarId] && this.props.photos[avatarId].avatar)) {\n return (\n <img src={this.props.photos[avatarId].avatar}\n id=\"menu-button\"\n className=\"profile-image nav-bar-avatar\"/>\n );\n } else {\n return (\n <img src=\"https://s3.us-east-2.amazonaws.com/flexpx-dev/avatar.png\"\n id=\"menu-button\"\n className=\"profile-image stock-avatar\"/>\n );\n }\n }", "function getQrCodeImageUrl(url, sizeID, siteToken) {\r\n\thc_google_trackevent('GetQR', 'For ' + url + '');\r\n\tif (typeof sizeID == 'undefined' || !sizeID) { sizeID = 6; }\r\n\tif (typeof siteToken == 'undefined') {siteToken = \"\";}\r\n\tif (typeof url == 'undefined' || url.length < 5 || url.length > 1000) { return \"ERROR: Invalid URL.\";}\r\n\tif (parseInt(sizeID) > 40) { sizeID = 40; }\r\n\tif (parseInt(sizeID) < 2) { sizeID = 2; }\r\n\treturn \"http://www.qrleads4me.com/GetQRCode.aspx?Scale=\" + sizeID.toString() + \"&URL=\" + encodeURIComponent(url) + \"&SiteToken=\" + encodeURIComponent(siteToken);\r\n}", "async function getProfilePic(player) {\n //takes in the player uid and uses that to get the profile pic from a URL\n await firebase\n .storage()\n .refFromURL(\"gs://brackot-app.appspot.com/\" + player + \"/profile\")\n .getDownloadURL()\n .then(function (url) {\n return String(url);\n })\n .catch((error) => {\n return \"../media/BrackotLogo2.jpg\";\n });\n}", "function resizeFileForAvatarComment(file) {\n\n var reader = new FileReader();\n reader.onloadend = function() {\n\n var tempImg = new Image();\n tempImg.src = reader.result;\n\n tempImg.onload = function() {\n\n var MAX_WIDTH = 40;\n var MAX_HEIGHT = 40;\n var tempW = tempImg.width;\n var tempH = tempImg.height;\n if (tempW > tempH) {\n if (tempW > MAX_WIDTH) {\n tempH *= MAX_WIDTH / tempW;\n tempW = MAX_WIDTH;\n }\n } else {\n if (tempH > MAX_HEIGHT) {\n tempW *= MAX_HEIGHT / tempH;\n tempH = MAX_HEIGHT;\n }\n }\n\n var canvas = document.createElement('canvas');\n canvas.width = tempW;\n canvas.height = tempH;\n var ctx = canvas.getContext(\"2d\");\n ctx.drawImage(this, 0, 0, tempW, tempH);\n // get base64 small avatar to use it in comments section :\n gdataSmallImgStr = canvas.toDataURL(\"image/jpeg\");\n\n }\n\n }\n reader.readAsDataURL(file);\n}", "function getRecipeImage(selectedSauce) { \n return \"https://s3.amazonaws.com/sauceboss/\" + selectedSauce + \"-sauce-500x500.png\";\n}", "function getContributerUrl( err, data ){\n\n data.forEach(function(element){\n downloadImageByURL(element.avatar_url, `avatars/${element.login}.jpg`);\n })\n}", "function readURL(input){\n //alert(input.files[0].size);\n if(input.files[0].size<2200000){\n\n if(input.files && input.files[0]){\n var read = new FileReader();\n\n read.onload = function(f){\n $('#imagePrev').attr('src', f.target.result);\n };\n read.readAsDataURL(input.files[0]);\n }\n }\n else{\n alert(\"Picture size exceeding 2MB !, Please upload again.\");\n }\n}", "placeholderArtwork(url) {\n if(!url) return \"http://placehold.it/100x100\";\n\n // const regx = /(-large)/;\n // const str = url.replace(regx, \"-crop\");\n\n return url;\n }", "function getImagePixelSize(sizeChoice,letter) {\r\n //get the size in pixel : 120,160,200\r\n // make all of them smaller: 100 120 160\r\n var chosenWidth=0;\r\n var scalegroup=[\"Zain\",\"Nun\",\"Yudh (Connected)\",\"Yudh (Stand-alone)\"];\r\n var scale=1;\r\n if(scalegroup.indexOf(letter)!=-1){\r\n scale=0.75;\r\n }\r\n // set up size for sizechoice\r\n if(sizeChoice==\"small\") {\r\n //width = 40*scaleFactor;\r\n chosenWidth = 100*scale;\r\n }\r\n else if (sizeChoice ==\"medium\") {\r\n chosenWidth = 120*scale;\r\n }\r\n else {\r\n chosenWidth = 160*scale;\r\n //width = 55*scaleFactor;\r\n }\r\n\r\n return chosenWidth;\r\n}", "function getPhotoUrl(thumbnail) {\n\tvar photo = thumbnail.attr(\"src\");\n\tphoto = photo.slice(18);\n\tcaption(parseInt(photo)-1);\n\tvar bigger_photo = \"Photos/\" + photo;\n\t$photoBox.attr(\"src\",bigger_photo);\n}", "function getImage(id) {\r\n\treturn make_flickr_api_request(\"flickr.photos.getSizes\", id);\r\n}", "function findHeadShot(key) {\n return \"../images/avatars/\" + key + \".png\"\n }", "function generateAvatar(gender) {\n\tvar skinColor = skins[Math.floor(Math.random() * skins.length)];\n\tif (skinColor == \"Pale\" || skinColor == \"Light\") {\n\t\tvar hairColor = all_hair_colors[Math.floor(Math.random() * all_hair_colors.length)];\n\t}\n\telse {\n\t\tvar hairColor = dark_hair_colors[Math.floor(Math.random() * dark_hair_colors.length)];\n\t}\n\t// 30% chance of facial hair for males only\n\tvar facialHair = \"Blank\";\n\tif(Math.random() < .3 && gender == \"m\") {\n\t\tfacialHair = facial_hairs[Math.floor(Math.random() * facial_hairs.length)];\n\t}\n\tvar avatar = \"https://avataaars.io/\" +\n\t\t\"?topType=\" + (gender == \"m\" ? mal_tops[Math.floor(Math.random() * mal_tops.length)] : fem_tops[Math.floor(Math.random() * fem_tops.length)]) +\n\t\t\"&accessoriesType=\" + (Math.random() > .3 ? \"Blank\" : opt_acc[Math.floor(Math.random() * opt_acc.length)]) +\n\t\t\"&hairColor=\" + hairColor +\n\t\t\"&facialHairType=\" + facialHair +\n\t\t\"&clotheType=\" + clothes[Math.floor(Math.random() * clothes.length)] +\n\t\t\"&clotheColor=\" + clothes_color[Math.floor(Math.random() * clothes_color.length)] +\n\t\t\"&skinColor=\" + skinColor;\n\tif (hairColor != \"SilverGray\") {\n\t\tavatar += \"&facialHairColor=\" + hairColor;\n\t}\n\treturn avatar;\n}", "function factory (hexo) {\n return function imsizeTag (args, content) {\n var config = hexo.config.image_sizes;\n\n debug(args);\n debug(content);\n\n var doc;\n\n try {\n doc = yaml.safeLoad(content);\n } catch (err) {\n console.error(err);\n return;\n }\n\n var src = doc.src;\n var profileName = override(config, doc, \"defaultProfile\", \"profile\");\n var alt = doc.alt;\n var useAltForTitle = config.useAltForTitle;\n var title = doc.title || (useAltForTitle && alt);\n var shouldLink = override(config, doc, \"link\");\n var linkProfile = override(config, doc, \"linkProfile\");\n\n profileName = resolveProfileName(config, profileName);\n var profileSrc = profileNameToFileName(src, profileName);\n console.log(profileName, profileSrc)\n // Add this image to the db so we will create it later\n var db = hexo.locals.get(\"image_sizes_db\");\n db.push({\n inputPath: src,\n outputPath: profileSrc,\n profile: profileName\n });\n\n var attrs = {\n src: profileSrc,\n };\n\n // Add optional properties\n if (alt) {\n attrs.alt = alt;\n }\n if (title) {\n attrs.title = title;\n }\n\n var html = hexoUtil.htmlTag(\"img\", attrs);\n\n if (shouldLink) {\n linkProfile = resolveProfileName(config, linkProfile);\n var href = profileNameToFileName(src, linkProfile);\n db.push({\n inputPath: src,\n outputPath: href,\n profile: linkProfile\n });\n html = '<a href=\"' + href + '\">' + html + '</a>';\n }\n\n return html;\n };\n}", "function getThumbnailURL(d){\n if (d.video_id > 0){\n return \"/uploads/\" + d.video_id + \"/thumbnails/\" + d.extracted_frame_number + \".jpg\";\n } else {\n return \"/uploads/refresh_to_load.jpg\";\n }\n }", "static getImageUrlForRestaurant(restaurant, imageType, width) {\n let fileExtension = 'jpg';\n switch (imageType) {\n case 'jpeg':\n break;\n case 'webp':\n fileExtension = 'webp';\n break;\n default:\n console.log(`[DEBUG] unhandled imageType: ${imageType}`);\n }\n if (typeof width !== 'undefined') {\n return `img/${restaurant.id}_w_${width}.${fileExtension}`;\n } else {\n return `img/${restaurant.id}_w_800.${fileExtension}`;\n }\n }", "function catPic(callback){\n giphy.random({\n tag: 'cat',\n rating: 'g',\n fmt: 'json'\n }, function (err, response) {\n var url = response.data.fixed_width_downsampled_url;\n callback(null, url);\n });\n }", "function getProfilePicUrl() {\n return firebase.auth().currentUser.photoURL || '/images/profile_placeholder.png';\n}", "function retrieveImageUrl(memoizeRef, filename){\n /*\n var storageRef = firebase.storage().ref();\n var spaceRef = storageRef.child('images/photo_1.png');\n var path = spaceRef.fullPath;\n var gsReference = storage.refFromURL('gs://test.appspot.com')\n */\n memoizeRef.child(filename).getDownloadURL().then(function(url) {\n var test = url;\n console.log(test)\n var imageLoaded = document.createElement(\"img\");\n imageLoaded.src = test;\n imageLoaded.className = \"w3-image w3-padding-large w3-hover-opacity\";\n document.getElementById(\"chatDisplay\").prepend(imageLoaded);\n\n imageLoaded.setAttribute(\"onclick\", \"onClick(this)\");\n }).catch(function(error) {\n\n });\n}", "getImageUrl(farmId, serverId, id, secret) {\n return `https://farm${farmId}.staticflickr.com/${serverId}/${id}_${secret}_m.jpg`;\n }", "function getGravatarUrl(email) {\n return $gravatar.generate(email);\n }", "static getSize(url, success, failure) {\n return ImageLoader.getSize(url)\n .then(function(sizes) {\n success(sizes.width, sizes.height);\n })\n .catch(\n failure ||\n function() {\n if (__DEV__ && console.warn) {\n console.warn(`Failed to get size for image: ${ url }`);\n }\n },\n );\n }", "generateImageForFamily(familyName, family) {\n let randomImage = family[Math.floor(Math.random() * family.length)]\n\n return (\n <div className='col-md-4'>\n <div style={{fontWeight: 'bold', paddingTop: '2em', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis'}}>\n <a href={'/family/' + familyName}>{this.commonNameFromEbirdFamily(familyName)}</a>\n </div>\n <a href={'/family/' + familyName}>\n <img alt={this.commonNameFromEbirdFamily(familyName)} src={randomImage['Photo URL']} className='img-fluid'/>\n </a>\n </div>\n )\n }", "function getProfilePicUrl() {\n return firebase.auth().currentUser.photoURL || '/images/profile_placeholder.png';\n}", "function getProfilePicUrl() {\n return firebase.auth().currentUser.photoURL || '/images/profile_placeholder.png';\n}", "function getProfilePicUrl() {\n return firebase.auth().currentUser.photoURL || '/images/profile_placeholder.png';\n}", "function getProfilePicUrl() {\n return firebase.auth().currentUser.photoURL || '/images/profile_placeholder.png';\n}", "function getProfilePicUrl() {\n return firebase.auth().currentUser.photoURL || '/images/profile_placeholder.png';\n}", "function getProfilePicUrl() {\n return firebase.auth().currentUser.photoURL || '/images/profile_placeholder.png';\n}" ]
[ "0.69802517", "0.6954084", "0.69303304", "0.69303304", "0.6868553", "0.68492115", "0.6655605", "0.6637753", "0.6630408", "0.66101694", "0.66101694", "0.66101694", "0.66101694", "0.66101694", "0.65870404", "0.6555746", "0.6551981", "0.6540415", "0.64227694", "0.6413774", "0.6332042", "0.63007444", "0.62144756", "0.6083878", "0.6046194", "0.6002869", "0.58107936", "0.58096206", "0.57883924", "0.5711091", "0.5708107", "0.5708107", "0.5680864", "0.56756747", "0.56748915", "0.5668637", "0.5659401", "0.5655833", "0.5643547", "0.56111246", "0.5607847", "0.5601097", "0.55998474", "0.55712366", "0.55528665", "0.5540083", "0.55346626", "0.55309075", "0.5489681", "0.54812604", "0.54727125", "0.54641294", "0.5456856", "0.5428583", "0.5428562", "0.54274184", "0.54208905", "0.5411098", "0.5404363", "0.5374417", "0.5360338", "0.5339062", "0.5328521", "0.53274864", "0.53211105", "0.53191525", "0.5308314", "0.5306234", "0.52959865", "0.5294424", "0.5294394", "0.529338", "0.5292348", "0.5280295", "0.5271209", "0.52510166", "0.5235129", "0.52343357", "0.5232779", "0.5232648", "0.52171", "0.5174267", "0.5154954", "0.5150581", "0.51412964", "0.5138537", "0.5136501", "0.51320654", "0.5131629", "0.51274997", "0.512725", "0.51254326", "0.5113881", "0.51129866", "0.5111409", "0.5111409", "0.5111409", "0.5111409", "0.5111409", "0.5111409" ]
0.75917065
0
Rely on the secondary, but if that doesn't find a recently created group, fallback to querying the primary
function findOnSecondaryOrPrimary(groupId) { return Group.findById(groupId, SELECT_FIELDS, { lean: true }) .read(mongoReadPrefs.secondaryPreferred) .then(function(group) { if (group) return group; // Chance that it's not on the secondary yet... return Group.findById(groupId, SELECT_FIELDS, { lean: true }).exec(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSingleGroup(db, ObjectID, groupdoc, issuper, curruserid){\n\n var getGroupArray = async () => {\n var userdoc = await (global.lookupUserName(db, groupdoc.groupadminid));\n var adminname = userdoc.username;\n var adminimage = userdoc.imagepath;\n\n var newgroup = new Group.Group_CS(\n groupdoc._id, \n groupdoc.groupname,\n adminname,\n groupdoc.groupadminid,\n adminimage,\n groupdoc.description\n );\n\n newgroup.channels = await getChannels();\n newgroup.groupassists = await getGroupAssists();\n\n return newgroup;\n };\n\n var getChannels = async () => {\n if (groupdoc.channels == undefined) return [];\n var channels = [];\n var isassist = false;\n\n //check if assist\n if (groupdoc.groupassists != undefined){\n for (var a=0; a<groupdoc.groupassists.length; a++){\n if (groupdoc.groupassists[a].userid == curruserid){\n isassist = true;\n }\n }\n }\n\n for (var c=0; c < groupdoc.channels.length; c++){\n var channeldoc = groupdoc.channels[c];\n\n if (issuper == 'true' || groupdoc.groupadminid == curruserid || isassist){\n //If SUPER then add then channel straight away\n var newchannel = new Channel.Channel_CS(\n channeldoc._id,\n channeldoc.channelname\n );\n channels.push(newchannel);\n\n } else {\n //NOT SUPER - only add if curruser is a member\n if (channeldoc.members == undefined) return [];\n\n for (var m=0; m < channeldoc.members.length; m++){\n var memberdoc = channeldoc.members[m];\n var isassist = await isGroupAssist();\n\n if (isassist || curruserid == memberdoc.userid){\n var newchannel = new Channel.Channel_CS(\n channeldoc._id,\n channeldoc.channelname\n );\n channels.push(newchannel);\n }\n }\n }\n\n }\n\n return channels;\n };\n\n var isGroupAssist = async () => {\n if (groupdoc.groupassists == undefined) return false;\n var found = false;\n\n for (var a=0; a < groupdoc.groupassists.length; a++){\n var assist = groupdoc.groupassists[a];\n if (assist.userid == curruserid){\n found = true;\n }\n }\n\n return found;\n };\n\n var getGroupAssists = async () => {\n if (groupdoc.groupassists == undefined) return [];\n\n var assists = [];\n\n for (var a=0; a < groupdoc.groupassists.length; a++){\n var assistdoc = groupdoc.groupassists[a];\n var userdoc = await (global.lookupUserName(db, assistdoc.userid));\n\n var assist = new GroupAssist.GroupAssist_CS(\n assistdoc._id,\n assistdoc.userid,\n userdoc.username,\n userdoc.imagepath\n );\n \n assists.push(assist);\n }\n\n return assists;\n };\n\n return new Promise((resolve, reject) => {\n getGroupArray().then(function(result) {\n resolve(result);\n });\n });\n}", "createGroup(existingGroups, group) {\n\t const existingGroup = _.find(existingGroups, { name: group.name });\n\t if (existingGroup) {\n\t return Promise.resolve(true);\n\t }\n\n\t const payload = {\n\t name: group.name,\n\t description: group.description\n\t };\n\n\t return request.post({ uri: process.env.AUTHZ_API_URL + '/groups', json: payload, headers: { 'Authorization': 'Bearer ' + this.accessToken } })\n\t .then((createdGroup) => {\n\t existingGroups.push(createdGroup);\n\t log(chalk.green.bold('Group:'), `Created ${group.name}`);\n\t return group;\n\t });\n\t}", "findGroup({ commit }, { groupId, groups }) {\n const alreadyMember = isAlreadyMember(groupId, groups);\n if (alreadyMember) {\n alert(\n \"You are already a member of this group! Please search for another group.\"\n );\n commit(\"reset\");\n } else {\n commit(\"setLoading\", { of: \"FindGroup\", to: true });\n API.get(\"undercoverElfApi\", `/groups?id=${groupId}`, {})\n .then((response) => {\n commit(\"setFoundGroupInfo\", response);\n })\n .catch((err) => {\n commit(\"setLoading\", { of: \"FindGroup\", to: false });\n console.log(err);\n return;\n });\n }\n }", "createNestedGroups(existingGroups, group) {\n\t if (!group.nested || group.nested.length == 0) {\n\t return Promise.resolve();\n\t }\n\n\t const existingGroup = _.find(existingGroups, { name: group.name });\n\t const payload = group.nested.map(nestedGroupName => {\n\t const nestedGroup = _.find(existingGroups, { name: nestedGroupName });\n\t return nestedGroup._id;\n\t });\n\n\t return request.patch({ uri: process.env.AUTHZ_API_URL + '/groups/' + existingGroup._id + '/nested', json: payload, headers: { 'Authorization': 'Bearer ' + this.accessToken } })\n\t .then(() => {\n\t log(chalk.green.bold('Nested Group:'), `Added ${group.nested.join(', ')} to ${group.name}`);\n\t return Promise.resolve(true);\n\t });\n\t}", "parseOtherGroups(){\n let options = [<option value=\"noParent\">No Group</option>]\n const groupsRef = firebase.database().ref().child('groups').orderByChild('boardID').equalTo(this.props.boardID)\n groupsRef.once('value',snap=>{\n for(const key in snap.val()){\n options.push(\n <option value={key}>{snap.val()[key].title}</option>\n )\n }\n })\n return options\n }", "group(callback) {\n /*\n * Create a new group with empty set of routes\n */\n const group = new Group_1.RouteGroup([]);\n /*\n * See if there is any opened existing route groups. If yes, then we\n * push this new group to the old group, otherwise we push it to\n * the list of routes.\n */\n const openedGroup = this.getRecentGroup();\n if (openedGroup) {\n openedGroup.routes.push(group);\n }\n else {\n this.routes.push(group);\n }\n /*\n * Track the group, so that the upcoming calls inside the callback\n * can use this group\n */\n this.openedGroups.push(group);\n /*\n * Execute the callback. Now all registered routes will be\n * collected seperately from the `routes` array\n */\n callback();\n /*\n * Now the callback is over, get rid of the opened group\n */\n this.openedGroups.pop();\n return group;\n }", "async function getNextGroup(lastSongs) {\n try {\n let res = {};\n for (let i in lastSongs) {\n let nextGroupId = lastSongs[i].songId;\n res = Object.assign({}, res, await getGroup(nextGroupId));\n }\n if (lastSongs == null || Object.keys(res).length == 0) {\n return getGroup(rootGroupId);\n }\n return res;\n } catch (err) {\n console.error(err);\n\n return getGroup(rootGroupId);\n }\n}", "function getGroup(root, currentGroup) {\n if (root.name == currentGroup) {\n return root;\n }\n else {\n for (var i = 0; i < root.items.length; i++) {\n if (root.items[i].name) {\n var result = this.getGroup(root.items[i], currentGroup);\n if (result != null) {\n return result;\n }\n }\n }\n }\n }", "function getGroup() { return group; }", "function fetchAssociatedPseudoExitNode(getGroupResult) {\n\t\tfor (var i = 0; i < window.DataChannels.length; i++) {\n\t\t\tif (getGroupResult.indexOf(window.DataChannels[i]['connectionId']) !== -1 &&\n\t\t\t\twindow.DataChannels[i].role === \"pseudoExit\")\n\t\t\t\treturn window.DataChannels[i];\n\t\t}\n\t}", "function resolveGroupReference(key) {\r\n for (var i = 0; i < groupedItems.groups.length; i++) {\r\n if (groupedItems.groups.getAt(i).key === key) {\r\n return groupedItems.groups.getAt(i);\r\n }\r\n }\r\n }", "@action loadCurrentGroup(groupId){\n if (!groupId){\n this.currentGroup = {\n groupId: '',\n groupName: '',\n numGLSlots: '',\n userId: ''\n };\n }\n else if (userStore.isSuperAdmin && this.allGroups.hash[groupId] !== undefined){\n this.currentGroup = this.allGroups.hash[groupId];\n }\n else if (userStore.isUser && this.usersGroups.hash[groupId] !== undefined){\n this.currentGroup = this.usersGroups.hash[groupId];\n }\n else {\n return false;\n }\n return this.currentGroup;\n }", "function resolveGroupReference(key) {\n for (var i = 0; i < groupedItems.groups.length; i++) {\n if (groupedItems.groups.getAt(i).key === key) {\n return groupedItems.groups.getAt(i);\n }\n }\n }", "function resolveGroupReference(key) {\n for (var i = 0; i < groupedItems.groups.length; i++) {\n if (groupedItems.groups.getAt(i).key === key) {\n return groupedItems.groups.getAt(i);\n }\n }\n }", "function resolveGroupReference(key) {\n for (var i = 0; i < groupedItems.groups.length; i++) {\n if (groupedItems.groups.getAt(i).key === key) {\n return groupedItems.groups.getAt(i);\n }\n }\n }", "function resolveGroupReference(key) {\n for (var i = 0; i < groupedItems.groups.length; i++) {\n if (groupedItems.groups.getAt(i).key === key) {\n return groupedItems.groups.getAt(i);\n }\n }\n }", "function resolveGroupReference(key) {\n for (var i = 0; i < groupedItems.groups.length; i++) {\n if (groupedItems.groups.getAt(i).key === key) {\n return groupedItems.groups.getAt(i);\n }\n }\n }", "function resolveGroupReference(key) {\n for (var i = 0; i < groupedItems.groups.length; i++) {\n if (groupedItems.groups.getAt(i).key === key) {\n return groupedItems.groups.getAt(i);\n }\n }\n }", "function resolveGroupReference(key) {\n for (var i = 0; i < groupedItems.groups.length; i++) {\n if (groupedItems.groups.getAt(i).key === key) {\n return groupedItems.groups.getAt(i);\n }\n }\n }", "function addFirstUser(groupID) {\n firebase.auth().onAuthStateChanged((user) => {\n if (user) {\n groupRef.doc(groupID).collection(\"groupMembers\").get()\n .then(member => {\n\n // if not yet a member, creates a new user document under groupMember collection\n if (!member.exists) {\n groupRef.doc(groupID).collection(\"groupMembers\").doc(user.uid).set({\n userId: user.uid,\n name: user.displayName\n })\n }\n });\n }\n })\n}", "async createOrUpdate(values) {\n sails.log.silly(`Core > Group > createOrUpdate: ${values.name}`);\n let criteria = {};\n if (values.id) {\n criteria['id'] = values.id;\n }\n else {\n criteria['rmsId'] = values.rmsId;\n }\n const group = await Group.findOne(criteria);\n if (!group) {\n return Group.create(values).fetch();\n }\n else {\n return (await Group.update({ id: values.id }, values).fetch())[0];\n }\n }", "createDefaultAssociatedGroups(siteOwner, siteOwner2, groupNameSeed) {\r\n const q = this.clone(Web_1, `createDefaultAssociatedGroups(userLogin=@u,userLogin2=@v,groupNameSeed=@s)`);\r\n q.query.set(\"@u\", `'${encodeURIComponent(siteOwner || \"\")}'`);\r\n q.query.set(\"@v\", `'${encodeURIComponent(siteOwner2 || \"\")}'`);\r\n q.query.set(\"@s\", `'${encodeURIComponent(groupNameSeed || \"\")}'`);\r\n return q.postCore();\r\n }", "function getGroup(id) {\n for(var i = 0; i < groups.length; i++){\n var group = groups[i];\n if(group.id == id){\n return group;\n }\n }\n}", "function resolveItemReference(reference) {\r\n for (var i = 0; i < groupedItems.length; i++) {\r\n var item = groupedItems.getAt(i);\r\n if (item.group.key === reference[0] && item.id === reference[1]) {\r\n return item;\r\n }\r\n }\r\n }", "function resolveItemReference(reference) {\r\n for (var i = 0; i < groupedItems.length; i++) {\r\n var item = groupedItems.getAt(i);\r\n if (item.group === reference[0] && item.title === reference[1]) {\r\n return item;\r\n }\r\n }\r\n }", "function addGroupOverlay() {\n\tif (groupOverlay) { groupOverlay.destroy(); }\n\tgroupOverlay = game.add.group();\n\treturn groupOverlay;\n}", "function checkForGroup(grpName, isNew) {\n var url = _spPageContextInfo.siteAbsoluteUrl + \"/_api/web/sitegroups/getbyname('\" + grpName + \"')\";\n jQuery.ajax({\n url: url,\n type: \"GET\",\n headers: {\n \"accept\": \"application/json;odata=verbose\",\n \"content-type\": \"application/json;odata=verbose\"\n },\n success: function (data) { //Group exists\n\t\t\t\t if(isNew == true){ \n\t $scope.safeApply(function () {\n \t $scope.statusMessages = \"SharePoint security group <b>'\" + grpName + \"'</b> already exists. Please enter different name and try again. <br />\";\n \t });\n\t\t\t\t }\n else{ //Selected existing group - Add users to group\n $scope.safeApply(function () {\n \t $scope.statusMessages = \"Adding users to group <b>'\" + grpName + \"'</b>. <br />\";\n \t });\n //loopThroughUsersGroups();\n }\n },\n error: function (jqxr, errorCode, errorThrown) { //Group doesn't exist\n //alert(jqxr.responseText);\n if(isNew == true){\n $scope.safeApply(function () {\n $scope.statusMessages = \"Compiling users... <br />\";\n });\n\t\t\t\t //Create New Group\n\t\t\t\t CreateSPGroupREST();\n }\n }\n });\n }", "function getGroup(groupName, aType, description, createIfNotExist) {\n\tvar criteria = new ResourceGroupCriteria();\n\tcriteria.addFilterResourceTypeId(aType.id);\n\tcriteria.addFilterName(groupName);\n\tcriteria.fetchExplicitResources(true);\n\tcriteria.strict=true;\n\tvar resources = ResourceGroupManager.findResourceGroupsByCriteria(criteria);\n\tif( resources == null || resources.size() == 0) {\n\t\tif (createIfNotExist) {\n\t\t\tprintln(\"the group \" + groupName + \" does not exist, creating it now\");\n\t\t\tvar group = new ResourceGroup(groupName, aType);\n\t\t\tgroup.setDescription(description+ \" created on \" + new java.util.Date().toString());\n\t\t\treturn ResourceGroupManager.createResourceGroup(group);\n\t\t}\n\t\telse {\n\t\t\tprintln(\"the group \" + groupName + \" does not exist\");\n\t\t\treturn null;\n\t\t}\n\t}\n\telse {\n\t\tvar group = resources.get(0);\n\t\tprintln(\"the group \" + groupName + \" exists\");\n\t\treturn group;\n\t}\n}", "function findGroup(groupId) {\n for (var g = 0; g < ctrl.groups.length; g++) {\n if (ctrl.groups[g].id === groupId)\n return g;\n }\n return -1;\n }", "function joinGroup(req,res,callback) { //need the req.params.groupName that is the name of the group\n // Add user to the group if he go to this url\n var decoded = jwtDecode(req.headers.authorization.split(' ')[1]);\n var userid = decoded._id;\n var finalResponse = Object.assign({\n 'message': \"Success\"\n });\n Group.findOne({name:req.params.groupName}).exec(function(err, group){\n try {\n if(Object.keys(group).length !== 0){\n Group.find({userId:userid, name: req.params.groupName}).countDocuments().exec(function(err, nbUser){\n if(nbUser == 0){\n var newGroup = new Group({\n \"fileId\" : group.fileId,\n \"name\" : req.params.groupName,\n \"userId\" : userid,\n \"status\" : false\n }).save();\n newGroup.then(function(result) {\n callback(res, finalResponse);\n })\n }\n else{\n console.log(\"Error: \" +userid +\" is already in group \" +req.params.groupName)\n finalResponse.message=\"Error: Already in the group\";\n callback(res,finalResponse);\n }\n });\n }\n } catch (error) {\n finalResponse.message=\"Error\";\n callback(res,finalResponse);\n }\n \n });\n \n}", "function switchActiveGroupToDefault(groupId, tabId) {\r\n if(groupId == GROUP_POPULAR_ID) {\r\n BRW_dbTransaction(function(tx) {\r\n BRW_dbSelect(\r\n {//Param\r\n tx : tx,\r\n from : 'GROUPS',\r\n where : {\r\n 'type' : GROUP_TYPE_DEFAULT\r\n }\r\n },\r\n function(results){//Success\r\n if(results.rows.length) {\r\n for(var i in results.rows) {\r\n if(results.rows.hasOwnProperty(i)) {\r\n var group = results.rows[i];\r\n \r\n setActiveGroup(group.id);\r\n //setActiveGroup(10000000000000);//Task #645\r\n \r\n getNetTabPages(reloadTabPages);\r\n getSettingsTabPages(reloadTabPages, {skipTab: tabId});\r\n break;\r\n }\r\n }\r\n } else {\r\n getNetTabPages(reloadTabPages);\r\n getSettingsTabPages(reloadTabPages, {skipTab: tabId});\r\n }\r\n },\r\n function() {\r\n //console.log(\"Switch group to default error\");\r\n }\r\n );\r\n });\r\n } else {\r\n getNetTabPages(reloadTabPages);\r\n getSettingsTabPages(reloadTabPages, {skipTab: tabId});\r\n }\r\n}", "if (nextProps.group.id !== this.props.group.id) {\n this.chosenBuffIndex = null;\n }", "function findGroup(groups, target) {\n return _.findKey(groups, function (g) {\n return _.some(g, function (gg) {\n return gg.name == target\n })\n })\n }", "processGroup(group) {\n\n }", "function addGroupDead() {\n\tif (groupDead) { groupDead.destroy(); }\n\tgroupDead = game.add.group();\n\treturn groupDead;\n}", "addGroup() {\n\t\t//make a random group id\n\t\tlet gid = generateGroupID();\n\n\t\t//keep trying till a unique one is made\n\t\twhile(gid in this.groups) {\n\t\t\tgid = generateGroupID();\n\t\t}\n\n\t\tthis.groups[gid] = new Group();\n\n\t\treturn gid;\n\t}", "onGroupChange() {\n this.search();\n Metrics.getInstance().updateMetric(Filters.GROUP_BY, 1);\n }", "async function filterGroup(group, user, lastChance) {\n try {\n let songHistoryQuery = db\n .ref(\"/users\")\n .child(user)\n .child(\"history\");\n let snapshot = await songHistoryQuery.once(\"value\");\n let historyGroup = snapshot.val();\n let keeper1 = Object.assign({}, group);\n for (let song in historyGroup) {\n let currHistorySongId = historyGroup[song].songId;\n let currHistorySongUrl =\n historyGroup[song].url != null\n ? historyGroup[song].url\n : await getUrl(currHistorySongId);\n let timeNow = Date.now();\n let timeToForget = 1000 * 60 * 60 * 24 * 7 * 3; // second * 60sec * 60minutes* 24Hours * 7Days * 3Weeks\n let isTimePassed = timeNow - historyGroup[song].timestamp > timeToForget;\n for (let songInGroup in group) {\n //check if song already in history\n let isPlayed = (group[currHistorySongId] != undefined);\n let isTimeNotPassed = !isTimePassed;\n //check if the user liked the song\n let isSongNotLiked = !historyGroup[song].isLiked;\n let isSameUrl = (group[songInGroup].url === currHistorySongUrl);\n if ((isPlayed || isSameUrl) && (isTimeNotPassed || isSongNotLiked)) {\n //case of song played and the time passed since or the song was unliked\n delete group[currHistorySongId];\n } \n }\n }\n //remove same artist from prev alert\n group = await tryRemoveSameArtist(user, group);\n //no songs left get the last liked songs\n if (Object.keys(group).length === 0 && lastChance) {\n group = keeper1;\n let keeper2 = Object.assign({}, group);\n for (let song in historyGroup) {\n if (historyGroup[song].isLiked != \"1\") {\n delete group[historyGroup[song].songId];\n }\n }\n\n if (Object.keys(group).length === 0) {\n group = keeper2;\n }\n }\n\n return group;\n } catch (err) {\n throw err;\n }\n}", "getCurrentModuleItemForGroupDiscussion(callback, error) {\n const regexp = /\\/groups\\/\\d+\\/discussion_topics\\/\\d+/;\n let tmp;\n let groupId;\n let groupTopicId;\n\n //Extract groupId and groupTopicId\n if (regexp.test('' + this._location.pathname)) {\n tmp = this._location.pathname.split('/');\n if (tmp.length >= 5) {\n groupTopicId = tmp[4];\n groupId = tmp[2];\n }\n }\n if (groupTopicId == null) return;\n\n //https://beta.matematikk.mooc.no/api/v1/groups/361/discussion_topics/79006\n //Need to keep track of this to access it inside the inline functions below.\n const _this = this;\n this.getSpecificGroupDiscussionTopic(\n groupId,\n groupTopicId,\n groupDiscussion => {\n _this.getUserGroups(groups => {\n for (let i = 0; i < groups.length; i++) {\n if (groups[i].id == groupId) {\n const moduleItemId = null;\n const currentTypeAndContentId = {\n contentId: groupDiscussion.root_topic_id,\n type: 'Discussion'\n };\n _this.getCurrentModuleForItemOrTypeAndContentId(\n moduleItemId,\n currentTypeAndContentId,\n callback,\n error\n );\n break; //We found the correct group, no need to check the rest.\n }\n } //end for all the groups\n }); //getUserGroups\n }\n ); //getSpecificGroupDiscussionTopic\n }", "function resolveItemReference(reference) {\n for (var i = 0; i < groupedItems.length; i++) {\n var item = groupedItems.getAt(i);\n if (item.group.key === reference[0] && item.title === reference[1]) {\n return item;\n }\n }\n }", "function resolveItemReference(reference) {\n for (var i = 0; i < groupedItems.length; i++) {\n var item = groupedItems.getAt(i);\n if (item.group.key === reference[0] && item.title === reference[1]) {\n return item;\n }\n }\n }", "function resolveItemReference(reference) {\n for (var i = 0; i < groupedItems.length; i++) {\n var item = groupedItems.getAt(i);\n if (item.group.key === reference[0] && item.title === reference[1]) {\n return item;\n }\n }\n }", "function resolveItemReference(reference) {\n for (var i = 0; i < groupedItems.length; i++) {\n var item = groupedItems.getAt(i);\n if (item.group.key === reference[0] && item.title === reference[1]) {\n return item;\n }\n }\n }", "function resolveItemReference(reference) {\n for (var i = 0; i < groupedItems.length; i++) {\n var item = groupedItems.getAt(i);\n if (item.group.key === reference[0] && item.title === reference[1]) {\n return item;\n }\n }\n }", "function resolveItemReference(reference) {\n for (var i = 0; i < groupedItems.length; i++) {\n var item = groupedItems.getAt(i);\n if (item.group.key === reference[0] && item.title === reference[1]) {\n return item;\n }\n }\n }", "get group() {\n return this.bestuurseenheden.firstObject;\n }", "async function checkGroupExists(groupID) {\n const connection = db.getConnection(); \n\n var groupExistsStatus = {\n outcome: 500,\n\t\tgroupExists: 0,\n createdBy: \"\",\n\t\terrors: []\n }\n\n return new Promise(async function(resolve, reject) {\n try {\n \n const queryString = \"SELECT created_by FROM groups WHERE group_id = ?\"\t\t\t\n \n connection.query(queryString, [groupID], (err, rows) => {\n if (!err) {\n\n if(rows.length >= 1){\n groupExistsStatus.outcome = 200;\n groupExistsStatus.groupExists = rows.length;\n groupExistsStatus.createdBy = rows[0].created_by\n } \n\n resolve(groupExistsStatus); \n\n } else {\n groupUserStatus.outcome = 500;\n resolve(groupExistsStatus);\n }\n })\n } catch(err) {\n groupExistsStatus.outcome = 500;\n reject(groupExistsStatus);\n } \n })\n\n}", "performGroupSuggestQuery() {\n var params = 'content=groups&columns=objid,group';\n return this.performPRTGAPIRequest('table.json', params);\n }", "function syncGroups(){\n sync('groups', { fields: 'sponsors,short_link', omit:'topics' }, Groups);\n}", "async function tryAddBaseSongs(user, group) {\n try {\n let isBaseSongs = Object.keys(group).some(\n song => song.groupId == rootGroupId\n );\n if (!isBaseSongs) {\n let nextGroup = await getNextGroup(null);\n let baseSongsGroup = await filterGroup(nextGroup, user, false);\n if (Object.keys(baseSongsGroup).length <= 0) {\n throw new Error(\"No base songs left!\");\n }\n let nextSong = chooseIndex(baseSongsGroup);\n group[nextSong] = baseSongsGroup[nextSong];\n return group;\n }\n } catch (error) {\n console.error(error + \" \" + user);\n return group;\n }\n}", "ensureGroup() {\n // Dependency required at call site to avoid import cycles, do not lift to top of module\n const { ModelLoader } = require('app/scripts/db/model-loader');\n\n let idCards = this.modelCache\n .all('Notification')\n .map((notification) =>\n __guard__(\n __guard__(notification.get('data'), (x1) => x1.card),\n (x) => x.id,\n ),\n )\n .filter((idCard) => idCard != null);\n idCards = _.uniq(idCards);\n\n const idCardGroups = this.modelCache\n .all('NotificationGroup')\n .map((group) => group.get('id'))\n .filter((idGroup) => idGroup.startsWith('Card:'))\n .map((idGroup) => idGroup.replace('Card:', ''));\n\n const needToFetch = _.difference(idCards, idCardGroups);\n if (needToFetch.length > 0) {\n return ModelLoader.loadNotificationGroups(needToFetch);\n }\n }", "async joinGroup(\n { commit },\n { name, userId, groupId, foundGroupName, groups }\n ) {\n const alreadyMember = isAlreadyMember(groupId, groups);\n if (alreadyMember) {\n alert(\n \"You are already a member of this group! Please search for another group.\"\n );\n commit(\"reset\");\n } else {\n commit(\"setLoading\", { of: \"JoinGroup\", to: true });\n const newMembers = state.foundGroupMembers.map((member) => {\n return member;\n });\n newMembers.push({\n pk: `user_${userId}`,\n name,\n });\n\n const newGroup = {\n groupId: `group_${groupId}`,\n groupName: foundGroupName,\n admin: 0,\n };\n\n // get existing user groups from database first, then make an updated array including new group\n let existingGroupsArray;\n\n try {\n const getGroups = await API.get(\n \"undercoverElfApi\",\n `/users/${userId}/profile`,\n {}\n );\n existingGroupsArray = getGroups;\n } catch (error) {\n console.log(error);\n commit(\"setCreatingGroup\", error);\n }\n\n const updatedGroupArray = [...existingGroupsArray.body.groups, newGroup];\n\n API.post(\n \"undercoverElfApi\",\n `/users/${userId}/groups?groupId=${groupId}`,\n {\n body: {\n userInfo: {\n admin: 0,\n groupName: foundGroupName,\n name,\n wishlist: [],\n },\n newMembers,\n updatedGroupArray,\n },\n }\n )\n .then((response) => {\n alert(`Successfully joined group!`);\n commit(\"setLoading\", { of: \"JoinGroup\", to: false });\n router.push({ path: \"/\" });\n })\n .catch((err) => {\n commit(\"setLoading\", { of: \"JoinGroup\", to: false });\n console.log(err, \"postUserInGroup error\");\n });\n }\n }", "function checkForGroup(grpName) {\n var url = _spPageContextInfo.siteAbsoluteUrl + \"/_api/web/sitegroups/getbyname('\" + grpName + \"')\";\n jQuery.ajax({\n url: url,\n type: \"GET\",\n headers: {\n \"accept\": \"application/json;odata=verbose\",\n \"content-type\": \"application/json;odata=verbose\"\n },\n success: function (data) {\n $scope.safeApply(function () {\n $scope.statusMessages = \"SharePoint security group <b>'\" + grpName + \"'</b> already exists. Please enter different name and try again. <br />\";\n\n });\n },\n error: function (jqxr, errorCode, errorThrown) {\n //alert(jqxr.responseText);\n $scope.safeApply(function () {\n $scope.statusMessages = \"Checking user profile for the users matching the selected criteria <br />\";\n });\n getUsersFromWS();\n //CreateSPGroupREST();\n }\n });\n }", "function findGroupByPath(groupPathID,fromInstance){\n\tvar self = this;\n\tvar group_paths = groupPathID.split(\"/\");\n\tvar target_group = self.selectedModel;\n\tif(fromInstance == true){\n\t\ttarget_group = self.selectedService;\n\t}\n\tfor(var i=2;i<group_paths.length;i++){\n\t\tvar groupid = group_paths[i];\n\t\ttarget_group = self.findGroupByID(target_group,groupid);\n\t}\n\treturn target_group;\n}", "function checkForGroup(grpName) {\n var url = _spPageContextInfo.siteAbsoluteUrl + \"/_api/web/sitegroups/getbyname('\" + grpName + \"')\";\n jQuery.ajax({\n url: url,\n type: \"GET\",\n headers: {\n \"accept\": \"application/json;odata=verbose\",\n \"content-type\": \"application/json;odata=verbose\"\n },\n success: function (data) {\n $scope.$apply(function () {\n $scope.statusMessages = \"SharePoint security group <b>'\" + grpName + \"'</b> already exists. Please enter different name and try again. <br />\";\n\n });\n },\n error: function (jqxr, errorCode, errorThrown) {\n //alert(jqxr.responseText);\n $scope.$apply(function () {\n $scope.statusMessages = \"Checking user profile for the users matching the selected criteria <br />\";\n });\n getUsersFromUPA();\n //CreateSPGroupREST();\n }\n });\n }", "addGroupToUser(userId,groupName,groupId,callback){\n this.Model.User.findOne({'_id' : userId} , function(err,user){\n\n /*If there was an error throw it*/\n if(err){\n throw err;\n }\n\n /*Update array of groups that user is a member of*/\n user.groups.push({'id' : groupId, 'name' : sanitize(groupName)});\n\n user.save(function(err){\n if(err){\n throw err;\n }\n callback();\n });\n\n });\n }", "function groupIDFromSelection(selection, results) {\n var id = firstKey(selection);\n var annot = results.find(function (annot) {\n return annot.id === id;\n });\n if (!annot) {\n return;\n }\n return annot.group;\n}", "createGroup(groupname, groupinfo) {\n return this.#fetchAdvanced(this.#createGroupURL(groupname, groupinfo), {\n method: 'POST',\n headers: {\n 'Accept': 'application/json, text/plain',\n 'Content-type': 'application/json',\n },\n body: JSON.stringify(groupname, groupinfo)\n }).then((responseJSON) => {\n let responseGroupBO = GroupBO.fromJSON(responseJSON)[0];\n return new Promise(function (resolve) {\n resolve(responseGroupBO);\n })\n })\n }", "function startDatabaseQueries() {\n\n // var myUserId = firebase.auth().currentUser.uid;\n var myUserId = currentUser.uid;\n \n\n // var recentGroupsRef = firebase.database().ref('/groups/').limitToLast(10); // last created?\n // var recentGroupsRef = firebase.database().ref('/groups/'); // only if have my tags? TODO: FIX:\n // var userGroupsRef = firebase.database().ref('/user-groups/' + myUserId); // original location\n // var userGroupsRef = firebase.database().ref('/dashboards/');\n\n // var userGroupsRef = firebase.database().ref('/dashboards/').orderByChild('/tags').equalTo('nyc');\n\n var groupRef = null; // firebase.database().ref('/dashboards/').orderByChild('/tags/nyc').equalTo(true);\n\n\t// var userGroupsRef = firebase.database().ref('/dashboards/').orderByChild('/tags/nyc').equalTo(true);\n\n // Fetching and displaying all groups of each sections.\n // fetchGroups(userGroupsRef, domUserGroupsSection, 'user');\n // fetchGroups(recentGroupsRef, domRecentGroupsSection, 'recent');\n // fetchGroups(topUserGroupsRef, domTopUserGroupsSection, 'top'); // don't need top?\n\n\n // Listen for device-data changes\n var deviceInfoChanges = firebase.database().ref('/devices/'); // get it all ya, big data returned. Mayber later split up to individual devices?\n deviceInfoChanges.on('child_changed', function(snapshot) {\n\t console.log('device['+snapshot.key+'] changed, updating all tables for this device ...');\n\t updateDeviceData(snapshot);\n\t});\n\n // Keep track of all Firebase refs we are listening to.\n\t// listeningFirebaseRefs.push(userGroupsRef);\n // listeningFirebaseRefs.push(recentGroupsRef);\n // listeningFirebaseRefs.push(topUserGroupsRef); // don't need top?\n\n /*\n userGroupsRef.on(\"value\", function(snapshot) { // shallow flag? this is only to get the initial count?\n\t if ( snapshot.numChildren() > 0 ) {\n\t\tgotoLastBreadcrumb(); // \t domMyGroupsMenuButton.onclick(); // launch with GROUPS\n\t } else {\n\t\tdomShowHelpMenuButton.onclick(); // launch with HELP\n\t };\n\t})\n */\n\n // gotoLastBreadcrumb(); // \t domMyGroupsMenuButton.onclick(); // launch with GROUPS\n\n gotoLastBreadcrumb(); // \t domMyGroupsMenuButton.onclick(); // launch with GROUPS\n\n}", "componentDidUpdate(prevProps) {\n const {\n match: {\n params: {\n group\n }\n },\n user\n } = this.props;\n\n if (prevProps.user !== user) {\n this.getGroupFetch(group, user);\n }\n }", "async function joinGroup() {\n if (groupCodeField.length > 0) {\n const bearerToken = await firebase.auth().currentUser.getIdToken();\n await fetch(apiUrl + `api/group/join/${groupCodeField}/`, {\n method: \"PATCH\",\n headers: new Headers({\n Authorization: \"Bearer \" + bearerToken,\n }),\n })\n .then((response) => response.json())\n .then((json) => {\n navigation.navigate(\"GroupInfoScreen\", {\n name: json.name,\n group_id: json.id,\n });\n })\n .catch(() => {\n Alert.alert(\n \"Issue joining group\",\n \"Sorry, you're already in this group\",\n [{ text: \"Close\" }]\n );\n });\n }\n }", "function bgAddNewGroup(group, collectGroups, sendResponse, topTop) {\r\n BRW_bgAddNewGroup(group, collectGroups, sendResponse, topTop);\r\n}", "static async joinGroup(userId, groupId) {\n // return GroupUser.create({\n // user_id: userId,\n // group_id: groupId\n // })\n Group.findById(groupId).then(group => {\n if (group.privacy === 1 && userId !== group.user_id) {\n return GroupInvites.create({\n user_id: userId,\n group_id: groupId\n })\n }\n else {\n return GroupUser.create({\n user_id: userId,\n group_id: groupId\n })\n }\n })\n\n }", "function addGroupPlayer() {\n\tif (groupPlayer) { groupPlayer.destroy(); }\n\tgroupPlayer = game.add.group();\n\treturn groupPlayer;\n}", "_closeGroup() {\n // Only close a group if there was a child group opened\n if (this._isPrimary && this._childGroups.length === 0) {\n return;\n }\n\n console.groupEnd();\n }", "function get_group_name(group_description, g_data1, g_data2)\n{\n var group_name = \"GROUP_NAME\";\n for (k=0; k<g_data1.length; k++)\n {\n if ( String(g_data2[k]) === group_description )\n {\n group_name = String(g_data1[k]);\n break;\n }\n }\n \n return group_name;\n}", "_linkToDeviceGroup() {\n if (this._deviceGroup.type === DeviceGroups.TYPE_DEVELOPMENT ||\n this._deviceGroup.type === DeviceGroups.TYPE_PRE_FACTORY_FIXTURE) {\n this._projectConfig.deviceGroupId = this._deviceGroup.id;\n return Promise.resolve();\n }\n else {\n return Promise.reject(new Errors.ImptError(\n UserInteractor.ERRORS.PROJECT_LINK_WRONG_DG_TYPE,\n Options.getDeviceGroupTypeName(this._deviceGroup.type),\n Options.getDeviceGroupTypeName(DeviceGroups.TYPE_DEVELOPMENT),\n Options.getDeviceGroupTypeName(DeviceGroups.TYPE_PRE_FACTORY_FIXTURE)));\n }\n }", "createQueryGroup() {\n this._currentQueryInd++;\n }", "findUserGroup(req, res, next) {\n if (!res.locals.user || !res.locals.user.id) {\n return res.notFound();\n }\n\n req.query.member = res.locals.user.id;\n req.we.controllers.group.find(req, res, next);\n }", "function refreshGroupDropDown(group) {\n\t\t\tgroupsRest.query(\"/nodes\")\n\t\t\t\t.then(function (response) {\n\t\t\t\t\tdijit.byId(\"edit_client_cf_grupo\").store = new Memory({\n\t\t\t\t\t\tdata: response\n\t\t\t\t\t});\n\t\t\t\t\tif (group) {\n\t\t\t\t\t\tdijit.byId(\"edit_client_cf_grupo\").set(\"value\", group);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t}", "function initializeGroupKey() {\n var groupSetup = {\n apiData: null,\n groupName: \"User Input Name\",\n selections: null\n };\n groupsRef.push(groupSetup);\n // LISTENER -- Sets group key into local store after key is made in firebase.\n groupsRef.once(\"child_added\", function(snap) {\n console.log(\"// GROUPS REF LISTENER ACTIVATED //\")\n localStorage.removeItem(\"groupKey\");\n localStorage.setItem(\"groupKey\", snap.key);\n console.log(\"groupKey from localstor: \" + localStorage.getItem(\"groupKey\"));\n eventsRef = database.ref(\"groups/\" + localStorage.getItem(\"groupKey\") + \"/apiData/\");\n }) \n}", "retrieveGroups (callback) {\n this.hypothesisClientManager.hypothesisClient.getListOfGroups({}, (err, groups) => {\n if (err) {\n // TODO Handle this error\n } else {\n if (_.isFunction(callback)) {\n callback(null, groups)\n }\n }\n })\n }", "function findGroupPair(groups, targets) {\n var one\n var two\n var key = -1\n _.forEach(groups, function (g, k) {\n one = _.some(g, function (d) {\n return d.name == targets[0]\n })\n two = _.some(g, function (d) {\n return d.name == targets[1]\n })\n if (one & two) key = k\n })\n return key\n }", "static async checkUserGroupStatus(userId, groupId) {\n var inGroup = 0; // 0=not in group; 1==requested and waiting; 2 ==ingroup already\n var groupUserRes = await GroupUser.findOne({\n where: {\n user_id: userId,\n group_id: groupId\n }\n });\n if (groupUserRes != null) {\n inGroup = 2;\n }\n else {\n var groupInvRes = await GroupInvites.findOne({\n where: {\n user_id: userId,\n group_id: groupId\n }\n });\n if (groupInvRes != null) {\n inGroup = 1;\n }\n }\n\n return inGroup;\n }", "addGroup(group, nodes, metadata) {\n this.checkTransactionStart();\n\n let g = {\n name: group,\n nodes,\n metadata\n };\n this.groups.push(g);\n this.emit('addGroup', g);\n\n return this.checkTransactionEnd();\n }", "function GetGroupID()\n {\n var url = _spPageContextInfo.siteAbsoluteUrl + \"/_api/web/sitegroups/getByName('\" + $scope.newGrpName + \"')/Id\";\n jQuery.ajax({\n url: url,\n type: \"GET\",\n headers: {\n \"accept\": \"application/json;odata=verbose\",\n \"content-type\": \"application/json;odata=verbose\",\n },\n success: function (data) {\n groupId = data.d.Id;\n GetRoleDefinitionId();\n },\n error: function (jqxr, errorCode, errorThrown) {\n $scope.$apply(function () {\n $scope.statusMessages += jqxr.responseText + \"<br />\";\n });\n }\n });\n }", "obtainGroupsNamesID (callback) {\n this.retrieveGroups((err, groups) => {\n if (err) {\n if (_.isFunction(callback)) {\n callback(err)\n }\n } else {\n if (_.isFunction(callback)) {\n groups = _.map(groups, (group) => ({\n 'id': group.id,\n 'name': group.name\n }))\n callback(null, groups)\n }\n }\n })\n }", "function Group(_) {\n /* istanbul ignore next */\n return null;\n}", "getByName(groupName) {\r\n return new SiteGroup(this, `getByName('${groupName}')`);\r\n }", "async function groupUsersByStrictAvailability(maxGroupSize) {\n \n if(isNaN(maxGroupSize))\n {\n throw 'Max maxGroupSize must be a number';\n }\n\n const db = await dbConnection();\n\n try{\n\n // Sort users by availability and by zip code\n let userMap = await users.sortStudentsByAvailability();\n let groupNameStr = \"Group_\";\n\n if(Object.keys(userMap).length === 0)\n {\n throw 'something went wrong while sorting students into groups';\n }\n\n // After this first pass can any users be grouped based on an \n // exact availability match\n let userMapKeys = Object.keys(userMap);\n let groupCounter = 1;\n for(i = 0; i < userMapKeys.length; i++)\n {\n let key = userMapKeys[i];\n let value = userMap[key];\n if(value.length > 1 && value.length <= maxGroupSize)\n {\n // Create a new group object\n let groupID = uuid();\n let groupName = groupNameStr + groupCounter;\n let groupObj = \n {\n _id: groupID,\n groupname: groupName,\n };\n\n groupCounter++;\n\n // Add the group information to the user\n for(j = 0; j < value.length; j++)\n {\n let user = value[j];\n let updatedUser = await users.updateUserGroup(user._id, groupObj);\n\n if(!updatedUser) \n {\n throw 'error updating users group information';\n }\n }\n }\n else if(value.length > 1 && value.length > maxGroupSize)\n {\n // Slpit the value array into multiple arrays\n let balancedSplit = true;\n if(maxGroupSize % 2 != 0)\n {\n balancedSplit = false;\n }\n\n let splitArr = splitArray(value, maxGroupSize, balancedSplit);\n \n // Each element in the split array is a group\n for(k = 0; k < splitArr.length; k++)\n {\n // Create a new group object\n let groupID = uuid();\n let groupName = groupNameStr + groupCounter;\n let groupObj = \n {\n _id: groupID,\n groupname: groupName,\n };\n\n groupCounter++;\n\n let usrArray = splitArr[k];\n\n // Add the group information to the user\n for(m = 0; m < usrArray.length; m++)\n {\n let user = usrArray[m];\n let updatedUser = await users.updateUserGroup(user._id, groupObj);\n\n if(!updatedUser) \n {\n throw 'error updating users group information';\n }\n }\n }\n }\n }\n }\n catch(e)\n {\n console.log(e);\n }\n finally\n {\n await db.serverConfig.close();\n }\n}", "function Group({ group, groupIndex }) {\n const [groupIsOpen, setGroupIsOpen] = useState(true); // TODO: (Ori) this needs to initially come from backend\n\n const user = useSelector((state) => state.user);\n const dispatch = useDispatch();\n const addTask = (task, groupIndex) =>\n dispatch(addTaskDispatch(task, groupIndex));\n\n async function addNewTask() {\n try {\n const newTask = {\n title: '-',\n assignedTo: [user._id],\n project: group.project, //TODO: better get this from global/store\n group: group._id,\n isMock: true,\n };\n let task = await db_createNewTask(newTask);\n task = task.data;\n addTask(task, groupIndex);\n } catch (error) {\n console.error(error);\n }\n }\n\n useEffect(() => {\n if (\n group.tasks &&\n group.tasks[group.tasks.length - 1] &&\n group.tasks[group.tasks.length - 1].isMock === false\n ) {\n addNewTask();\n }\n }, []);\n\n return (\n /* TODO add classcat package: */\n <div className={style['group']}>\n <div className={style['group-header-wrapper']}>\n <GroupHeader\n groupIsOpen={groupIsOpen}\n setGroupIsOpen={setGroupIsOpen}\n group={group}\n groupIndex={groupIndex}\n />\n </div>\n <div\n className={style['group-content-wrapper']}\n style={!groupIsOpen ? { display: 'none' } : {}}\n >\n <ColumnsHeadWrapper\n key={group._id}\n columns={group.columns}\n groupIndex={groupIndex}\n />\n {group.loaded ? (\n group.tasks.map((task, i) => {\n return (\n <Task\n key={task._id}\n task={task}\n columns={group.columns}\n taskIndex={i}\n groupIndex={groupIndex}\n addNewTask={addNewTask}\n />\n );\n })\n ) : (\n <Loader message={'Loading group'} />\n )}\n </div>\n </div>\n );\n}", "createGroup(groupName,users,callback){\n\n var groupMembers = [];\n var userModel = this.Model.User;\n var groupModel = this.Model.Groups;\n\n /*Find out usernames of users*/\n var counter = 0;\n users.forEach(function(element){\n userModel.findOne({'_id' : element},function(err,user){\n if(err){\n throw err;\n }\n\n if(user.local.username){\n groupMembers.push({'id': element,'name':user.local.username});\n }\n else if(user.facebook.id){\n groupMembers.push({'id': element,'name':user.facebook.name});\n }\n else if(user.google.id){\n groupMembers.push({'id': element,'name':user.google.name});\n }\n counter ++;\n if (counter == users.length){\n /*Create new group*/\n var group = new groupModel({\n name : sanitize(groupName),\n users : groupMembers,\n messages : []\n });\n\n group.save(function(err,newGroup){\n if(err){\n throw err;\n }\n callback(newGroup._id);\n });\n }\n });\n });\n }", "function refreshUserGroup(user, groups, userGroupLst, callback) {\n utils.async.waterfall([\n function(callback) {\n var groupIds = utils._.map(groups, \"groupId\")\n var userGroupIds = utils._.map(userGroupLst, \"group._id\")\n var groupsToAdd = utils._.difference(groupIds, userGroupIds)\n //Add free lance group\n if(utils._.isInvalidOrBlank(findUserGroup(userGroupLst,\n utils.constants.freelanceBungieGroup.groupId)))\n groupsToAdd.push(utils.constants.freelanceBungieGroup.groupId)\n\n var groupsToRemove = utils._.difference(userGroupIds, groupIds)\n utils._.remove(groupsToRemove, function(groupId) {\n return groupId == utils.constants.freelanceBungieGroup.groupId\n })\n\n if(utils._.isValidNonBlank(groupsToRemove)) {\n UserGroup.collection.remove({user: user._id, group: {\"$in\": groupsToRemove}},\n function(err, data){})\n }\n return callback(null, groupsToAdd)\n },\n function(groupsToAdd, callback) {\n var userGroups = []\n utils._.map(groupsToAdd,function(groupId) {\n var userGroup = findUserGroup(userGroupLst, groupId)\n userGroups.push({\n user: user._id,\n refreshGroups: false,\n group: groupId,\n consoles: utils._.map(user.consoles,\"consoleType\"),\n muteNotification: utils._.isValidNonBlank(userGroup) ? userGroup.muteNotification : false,\n date: new Date(),\n uDate: new Date(),\n serviceEndpoints: []\n })\n })\n\n userGroup = utils._.isValidNonBlank(userGroupLst)\n ? findUserGroup(userGroupLst, utils.constants.freelanceBungieGroup.groupId) : null\n //Add free lance group\n/*\n userGroups.push({\n user:user._id,\n refreshGroups:false,\n group:utils.constants.freelanceBungieGroup.groupId,\n consoles:utils._.map(user.consoles,\"consoleType\"),\n muteNotification:utils._.isValidNonBlank(userGroup)?userGroup.muteNotification:false,\n date:new Date(),\n uDate:new Date()\n })\n*/\n if(utils._.isValidNonBlank(userGroups))\n UserGroup.collection.insert(userGroups, callback)\n else\n updateUserGroup(user._id,null, {uDate:new Date()}, callback)\n\n },\n function(docs, callback) {\n getByUser(user._id, null, callback)\n }\n ], callback)\n}", "async add(group) {\r\n let groupObj = await this.groupsAccessStore(\"readwrite\");\r\n return groupObj.add(group)\r\n }", "async function addSecondAggregate(objDb){\n debug(\"addSecondAggregate:start\");\n objDb.aggregate('getSecond', {\n start: () => [],\n step: (array, nextValue) => {\n array.push(nextValue);\n },\n result: array => {\n let uniq = [... new Set(array)];\n uniq.sort(function(a,b) {return a-b;});\n if (uniq.length < 2) {\n // There is no second place value\n // @todo return -1 for now\n return -1;\n }\n return uniq[1]; // return 2nd place value - 0 based index.\n },\n });\n debug(\"addSecondAggregate:end\");\n return objDb;\n}", "isGroupPending(){\n return (this.status == GROUP_STATUS.PENDING);\n }", "function appendGroup(group, fn) {\n if (_.isArray(group.field)) {\n queryOr[group.originalField] = queryOr[group.originalField] || {};\n\n _.each(group.field, function(field) {\n queryOr[group.originalField][field] = queryOr[group.originalField][field] || {};\n queryOr[group.originalField][field] = fn(queryOr[group.originalField][field]);\n });\n } else {\n queryAll[group.field] = fn(queryAll[group.field]);\n }\n }", "addGrouping() {\n this.onEditComplete_();\n\n var item = this.getAddParent_();\n if (item) {\n var parent = item instanceof GroupNode ? item : /** @type {SlickTreeNode} */ (item.getParent());\n var child = new GroupNode();\n\n // add the child to the top of the children array and select it\n parent.addChild(child, undefined, 0);\n parent.collapsed = false;\n this.lastAddedNode_ = child;\n\n this.updateTree_();\n } else {\n // not expecting to get here, but log it if we do\n var msg = 'Failed adding group. Unable to determine parent.';\n log.error(logger, msg);\n }\n }", "async function addSecondAggregate(objDb){\n console.log(\"addSecondAggregate:start\");\n objDb.aggregate('getSecond', {\n start: () => [],\n step: (array, nextValue) => {\n array.push(nextValue);\n },\n result: array => {\n let uniq = [... new Set(array)];\n uniq.sort(function(a,b) {return a-b;});\n if (uniq.length < 2) {\n // There is no second place value\n // @todo return -1 for now\n return -1;\n }\n return uniq[1]; // return 2nd place value - 0 based index.\n },\n });\n console.log(\"addSecondAggregate:end\");\n return objDb;\n}", "async function getGroup(groupId) {\n let matchGroupQuery = db\n .ref(\"songs\")\n .orderByChild(\"groupId\")\n .equalTo(groupId);\n let snapshot = await matchGroupQuery.once(\"value\");\n let arrGroup = snapshot.val();\n if (Array.isArray(arrGroup)) {\n arrGroup = Object.assign({}, arrGroup);\n }\n return arrGroup;\n}", "fetchSmallGroupById ({ commit, rootGetters }, smallGroupId) {\n commit('fetching', true)\n\n // Fetches Collection from the server\n $GET(API_ROOT + '/' + smallGroupId, { token: rootGetters['auth/token'] })\n .then((json) => {\n commit('model', json)\n commit('fetching', false)\n })\n .catch((err) => {\n commit('fetching', false)\n throw err // TODO - better error handling\n })\n }", "onGroupSelected(newSelectedGroup) {\n const lastSelectedBucket = this.getLastSelectedBucket(this.state.allBuckets, newSelectedGroup);\n if (lastSelectedBucket != null) {\n const lastSelectedView = this.getLastSelectedView(lastSelectedBucket);\n let newTableInputObject = this.createTableInputObject(lastSelectedBucket, lastSelectedView);\n this.setState({ selectedGroup: newSelectedGroup, tableInputObject: newTableInputObject });\n } else {\n let newTableInputObject = {\n bucket: null,\n view: null,\n bucketViews: null,\n filters: null\n };\n this.setState({ selectedGroup: newSelectedGroup, tableInputObject: newTableInputObject });\n }\n this.setLastSelectedGroup(newSelectedGroup);\n }", "leaveGroup(group) {\n return this.#fetchAdvanced(this.#leaveAGroupURL(group), {\n method: 'DELETE'\n }).then((responseJSON) => {\n let responseGroupBO = MembershipBO.fromJSON(responseJSON)[0];\n return new Promise(function (resolve) {\n resolve(responseGroupBO);\n })\n })\n }", "function groupNodeToParent(){\n\t\tvar filterNodesReturn = filterNodes();\n\t\tvar nodesKeepAfterFilter = filterNodesReturn[\"nodesKeepAfterFilter\"];\n\t\t// console.log(\"begin groupNodeToParent\");\n\t\tvar newNodeArray = {};\n\t\tvar newConnectionInfo = {};\n\t\tnewNodeArray[0] = nodesKeepAfterFilter[0];\n\t newConnectionInfo[0] = connectionInfo[0];\n\t\tvar treeLevels = Object.keys(nodesKeepAfterFilter);\n\n\t\ttreeLevels.forEach(function(treeLev, idx){\n\t\t\tif(idx > 0){ //skip root\n\t\t\t\tnewNodeArray[treeLev] = {};\n\t\t\t\tnewConnectionInfo[treeLev] = {};\n\t\t\t\tvar lmAtLevelList = Object.keys(nodesKeepAfterFilter[treeLev]);\n\t\t\t\tvar currentTreeLev = treeLev;\n\t\t\t\tlmAtLevelList.forEach(function(currentLMAtLevel){\n\t\t\n\t\t\t\t\tvar mySpecialID = nodesKeepAfterFilter[currentTreeLev][currentLMAtLevel][\"specialID\"];\n\n\t //taking care of the easy case first, which has more than one parents\n\t if(nodesKeepAfterFilter[currentTreeLev][currentLMAtLevel][\"parentSpecialID\"].length > 1){\n\n\n\t var canMergeBool = false;\n\t var parentSameAsMeLevel;\n\t if(nodesKeepAfterFilter[currentTreeLev][currentLMAtLevel][\"parentSpecialID\"].indexOf(currentLMAtLevel) > -1){\n\t \t//so one of my parentspecialid is the same as me\n\t \tvar otherParentLevel = [];\n\t \t\n\t \tvar parentsList = nodesKeepAfterFilter[currentTreeLev][currentLMAtLevel][\"parentSpecialID\"];\n\t \tparentsList.forEach(function(parSpcID){\n\t\t \tfor(var tIndex = parseInt(currentTreeLev) - 1; tIndex >= 0; tIndex--){\n\t\t \t\tvar spcIDAtThisLevel = Object.keys(newNodeArray[tIndex]);\n\t\t \t\tif(currentLMAtLevel == \"CLM3\"){\n\t\t \t\t\t// console.log(spcIDAtThisLevel, tIndex);\n\t\t \t\t}\n\t\t \t\tif(spcIDAtThisLevel.indexOf(parSpcID) > -1){\n\t\t \t\t\tif(parSpcID == currentLMAtLevel){\n\t\t \t\t\t\tparentSameAsMeLevel = tIndex;\n\t\t \t\t\t}\n\t\t \t\t\telse{\n\t\t \t\t\t\tif(otherParentLevel.indexOf(parSpcID) == -1){\n\t\t \t\t\t\t\totherParentLevel.push(tIndex);\n\t\t \t\t\t\t}\n\t\t \t\t\t}\n\t\t \t\t\tbreak;\n\t\t \t\t}\n\t\t \t}\n\t \t}); // end of parentsList\n\n\t \tif(otherParentLevel.indexOf(parentSameAsMeLevel) == -1 && typeof(parentSameAsMeLevel) != 'undefined'){\n\t \t\tvar largestBool = true;\n\t \t\totherParentLevel.forEach(function(lev){\n\t \t\t\tif(lev >= parentSameAsMeLevel){\n\t \t\t\t\tlargestBool = false;\n\t \t\t\t}\n\t \t\t})\n\t \t\tcanMergeBool = largestBool;\n\t \t}\n\t \telse{\n\t \t\tcanMergeBool = false;\n\t \t}\n\n\t }\n\n\t if(canMergeBool){\n\t \tvar currentConnectionInfo = connectionInfo[currentTreeLev][currentLMAtLevel];\n currentConnectionInfo.forEach(function(connInfo){\n \tif(connInfo[\"specialID\"] != connInfo[\"parentSpecialID\"]){\n\t newConnectionInfo[parentSameAsMeLevel][currentLMAtLevel].push(connInfo);\n \t}\n\t });\n\n var currentNode = nodesKeepAfterFilter[currentTreeLev][currentLMAtLevel];\n currentNode[\"uniqueID\"].forEach(function(nodeID){\n \tnewNodeArray[parentSameAsMeLevel][currentLMAtLevel]['uniqueID'].push(nodeID);\n })\n\n\t }\n\t else{\n\t \tnewNodeArray[currentTreeLev][currentLMAtLevel] = nodesKeepAfterFilter[currentTreeLev][currentLMAtLevel];\n\t \tnewConnectionInfo[currentTreeLev][currentLMAtLevel] = connectionInfo[currentTreeLev][currentLMAtLevel];\n\t }\n\n\t }\n\n\t //if only have one parent, but parent lmid is not the same as current node lmid\n\t else if( nodesKeepAfterFilter[currentTreeLev][currentLMAtLevel][\"parentSpecialID\"].length == 1 &&\n\t \t\t nodesKeepAfterFilter[currentTreeLev][currentLMAtLevel][\"parentSpecialID\"][0] != currentLMAtLevel){\n\t \tnewNodeArray[currentTreeLev][currentLMAtLevel] = nodesKeepAfterFilter[currentTreeLev][currentLMAtLevel];\n\t newConnectionInfo[currentTreeLev][currentLMAtLevel] = connectionInfo[currentTreeLev][currentLMAtLevel];\n\t }\n\n\t //if only have one parent and parent lmid is same as current node lmid\n\t else if(nodesKeepAfterFilter[currentTreeLev][currentLMAtLevel][\"parentSpecialID\"].length == 1 &&\n\t \t\t nodesKeepAfterFilter[currentTreeLev][currentLMAtLevel][\"parentSpecialID\"][0] == currentLMAtLevel){\n\t \t//look for the node with same lm from previous level\n\t \tfor(var i = currentTreeLev -1; i >= 0; i--){\n\t \t\tvar previousLevel = i;\n\n\t var prevLevelLM = Object.keys(newNodeArray[previousLevel]);\n\n\t //check if this prev level has the LM we want\n\t if(prevLevelLM.indexOf(currentLMAtLevel) > -1){\n\n\t var currentNode = nodesKeepAfterFilter[currentTreeLev][currentLMAtLevel];\n\t currentNode[\"uniqueID\"].forEach(function(nodeID){\n\t \tnewNodeArray[previousLevel][currentLMAtLevel]['uniqueID'].push(nodeID);\n\t })\n\n\t //found the node we want, break out of the loop\n\t return;\n\t }\n\t else{\n\t //continue with the for loop\n\t }\n\t \t} //end of for loop\n\t }\n\n\t\t\t\t}); //end of lmAtLevelList\n \t\t\t}\n\n\t\t}); //end of treeLevels\n\t\t// console.log(\"finish groupNodeToParent\");\n\t\t// console.log(newNodeArray);\n\t\treturn {\"newNodeArray\" : newNodeArray, \"newConnectionInfo\" : newConnectionInfo};\n\t}", "user (dataset, users) {\n if (users) {\n for (let user of users) {\n if (user._id === dataset.group) {\n return user;\n }\n }\n } else {\n return null;\n }\n }", "beginGroup(group) {\n return this.handleSocketEvent('begingroup', group);\n }", "GetBasedOnCurrentGroup(detail) {\n let info = {};\n //default values\n info.en1 = this.groupType == \"0\" ? detail.P_ENAME : detail.G_ENAME;\n info.ml1 = this.groupType == \"0\" ? detail.P_MNAME : detail.G_MNAME;\n info.en2 = this.groupType == \"2\" ? detail.P_ENAME : detail.C_ENAME;\n info.ml2 = this.groupType == \"2\" ? detail.P_MNAME : detail.C_MNAME;\n info.en3 = this.groupType == \"1\" ? detail.D_ENAME : detail.P_ENAME;\n info.ml3 = this.groupType == \"1\" ? detail.D_MNAME : detail.P_MNAME;\n return this.GetDetailsContentInfoHTML(info);\n }", "_insertIntoExistingGroup(details) {\n const that = this,\n jqxTabItemsGroup = details.jqxTabItemsGroup,\n tab = details.tab,\n tabLabelContainer = details.tabLabelContainer,\n group = details.group,\n groupLabel = that._groupLabels[that._groups.indexOf(group)],\n groupDropDown = groupLabel.dropDown;\n let index = details.index;\n\n index = Math.max(0, Math.min(index, jqxTabItemsGroup.childElementCount));\n\n groupDropDown.insertBefore(tabLabelContainer, groupDropDown.children[index]);\n\n const sibling = jqxTabItemsGroup.children[index];\n let overallIndex;\n\n if (sibling) {\n overallIndex = sibling.index;\n }\n else {\n overallIndex = jqxTabItemsGroup.children[index - 1].index + 1;\n }\n\n jqxTabItemsGroup.insertBefore(tab, sibling);\n\n that._tabLabelContainers.splice(overallIndex, 0, tabLabelContainer);\n that.$.dropDownButtonDropDown.insertBefore(details.dropDownLabelContainer, that.$.dropDownButtonDropDown.children[overallIndex] || null);\n that._tabs.splice(overallIndex, 0, tab);\n\n index = overallIndex;\n\n tab.group = group;\n\n that._updateIndexes(index);\n }", "async function find_groups_that_match(user_email_str, database)\n {\n let email_array = new Array();\n let database_results_array;\n \n let user_candidates_array;\n let group_candidates_array;\n\n /*************************************************************************************/\n\n database_results_array =\n await database.collection(\"individuals\").find( {email : user_email_str} ).toArray();\n\n user_candidates_array = database_results_array[0].candidates;\n\n /*************************************************************************************/\n\n // GET ALL DOCUMENTS IN THE GROUPS COLLECTION\n database_results_array =\n await database.collection(\"groups\").find().toArray();\n\n // GO THROUGH ALL DOCUMENTS IN THE GROUPS COLLECTION\n for(let i = 0; i < database_results_array.length; ++i)\n {\n group_candidates_array = database_results_array[i].candidates;\n \n // GO THROUGH ALL CANDIDATES LISTED FOR THE GROUP\n for(let j = 0; j < group_candidates_array.length; ++j)\n {\n // IF IT'S A MATCH, SAVE THE GROUP'S EMAIL\n if(group_candidates_array[j].email === user_email_str)\n {\n if(group_candidates_array[j].status >= 2 &&\n get_status_towards_this_user(\n database_results_array[i].email, user_candidates_array) >= 2)\n {\n email_array.push(database_results_array[i].email);\n }\n \n break;\n }\n }\n \n } // END GO THROUGH ALL DOCUMENTS IN GROUPS COLLECTION\n \n return email_array;\n }", "async function patchManagementGroup() {\n const groupId = \"ChildGroup\";\n const cacheControl = \"no-cache\";\n const patchGroupRequest = {\n displayName: \"AlternateDisplayName\",\n parentGroupId: \"/providers/Microsoft.Management/managementGroups/AlternateRootGroup\",\n };\n const options = { cacheControl };\n const credential = new DefaultAzureCredential();\n const client = new ManagementGroupsAPI(credential);\n const result = await client.managementGroups.update(groupId, patchGroupRequest, options);\n console.log(result);\n}" ]
[ "0.6087339", "0.56494653", "0.5526681", "0.55133677", "0.5358821", "0.5290795", "0.5276548", "0.526237", "0.5246025", "0.51711124", "0.51671284", "0.51584417", "0.5131122", "0.5131122", "0.5131122", "0.5131122", "0.5131122", "0.5131122", "0.5131122", "0.51241094", "0.51191163", "0.511554", "0.5099326", "0.50527775", "0.5051601", "0.50368756", "0.50034964", "0.49577832", "0.49479342", "0.49302486", "0.49301335", "0.49257305", "0.49183986", "0.4912918", "0.4896858", "0.48936358", "0.4884414", "0.48588577", "0.48554137", "0.48539662", "0.48539662", "0.48539662", "0.48539662", "0.48539662", "0.48539662", "0.48433745", "0.48376617", "0.4836987", "0.48213333", "0.4788753", "0.47695577", "0.47326154", "0.47288033", "0.47269917", "0.46957296", "0.46922264", "0.46834794", "0.46791628", "0.4672648", "0.46672958", "0.46657676", "0.46560624", "0.465571", "0.46520594", "0.46509922", "0.4650016", "0.46455738", "0.46444312", "0.46422148", "0.46320003", "0.46230337", "0.46107206", "0.46049777", "0.4601649", "0.45901853", "0.45855242", "0.4585307", "0.45845452", "0.45834425", "0.45706886", "0.45703351", "0.45617777", "0.4557741", "0.45414224", "0.45398715", "0.45382145", "0.45378017", "0.4536995", "0.45321158", "0.45289057", "0.45194927", "0.45177034", "0.45150825", "0.4508471", "0.4507467", "0.45070186", "0.450241", "0.44934016", "0.44888023", "0.44790027" ]
0.7356845
0
Use the custom group avatar URL if we have one
function _getAvatarFromGroup(group, size) { if (group.avatarUrl) { return getGroupAvatarUrlForSize(group, size); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getGroupAvatarUrlForSize(group, size) {\n const avatarUrl = group.avatarUrl;\n\n const parsed = url.parse(avatarUrl, true);\n\n // Tack on a version param otherwise the S3 url is always the same and\n // you always get the cached avatar from nginx's cache.\n parsed.query = parsed.query || {};\n if (group.avatarVersion) {\n parsed.query.v = group.avatarVersion;\n }\n\n if (isGitterInternalAvatarUrl(avatarUrl)) {\n const bestSize = getBestSizeFor(size);\n\n // Just use the original\n if (!bestSize) return avatarUrl;\n\n var pathParts = parsed.pathname.split('/');\n pathParts.pop();\n pathParts.push(bestSize);\n parsed.pathname = pathParts.join('/');\n return url.format(parsed);\n } else if (isGitlabSecurityDescriptorType(group.sd && group.sd.type)) {\n if (size) {\n // This doesn't actually work but these parameters are added in the GitLab UI\n parsed.query.width = size;\n }\n\n return url.format(parsed);\n }\n}", "function AvatarURL( fn )\n{\n return 'https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/' + fn.substring( 0, 2 ) + '/' + fn + '.jpg';\n}", "getAvatarUrl() {\n const { user } = this.state;\n return endpoint + '/core/avatar/' + user.id + '/' + user.avatar;\n }", "setAvatar(url) {\n const template = `<img src=\"${url}\" alt=\"\">`;\n this._userAvatar.insertAdjacentHTML(\"afterbegin\", template);\n }", "get sourceAvatar() {}", "renderAvatar() {\n const avatarId = this.props.currentUser.profile_photo_id;\n if (avatarId && (this.props.photos[avatarId] && this.props.photos[avatarId].avatar)) {\n return (\n <img src={this.props.photos[avatarId].avatar}\n id=\"menu-button\"\n className=\"profile-image nav-bar-avatar\"/>\n );\n } else {\n return (\n <img src=\"https://s3.us-east-2.amazonaws.com/flexpx-dev/avatar.png\"\n id=\"menu-button\"\n className=\"profile-image stock-avatar\"/>\n );\n }\n }", "set sourceAvatar(value) {}", "get avatar24() {\n return \"http://www.gravatar.com/avatar/\" + $md5.hex_md5(this.email) +\n \".jpg?d=wavatar&s=24\";\n }", "function setAvatarBo() {\n avatar = 'img/char-boy.png';\n}", "function getProfilePicUrl() {\n return getAuth().currentUser.photoURL || '/images/profile_placeholder.png';\n}", "getGalleryAvatarPict(uid) {\n let j = this.jQuery;\n let prefUrl = 'https://sonic-world.ru/files/public/avatars/av';\n if (uid == undefined) return false;\n j.ajax({\n url: prefUrl + uid +'.jpg',\n type:'HEAD',\n error:\n function(){\n j.ajax({\n url: prefUrl + uid +'.png',\n type:'HEAD',\n error:\n function(){\n j.ajax({\n url: prefUrl + uid +'.gif',\n type:'HEAD',\n error:\n function(){\n j('.sw_gallery_avatar_'+ uid)\n .css('background-color', '#E0E0E0');\n },\n success:\n function(){\n j('.sw_gallery_avatar_'+ uid)\n .css('background-image', 'url(../files/public/avatars/av'+ uid +'.gif)');\n }\n });\n },\n success:\n function(){\n j('.sw_gallery_avatar_'+ uid)\n .css('background-image', 'url(../files/public/avatars/av'+ uid +'.png)');\n }\n });\n },\n success:\n function(){\n j('.sw_gallery_avatar_'+ uid)\n .css('background-image', 'url(../files/public/avatars/av'+ uid +'.jpg)');\n }\n });\n }", "updateAvatar (avatarUrl) {\n $(\"#dominantSpeakerAvatar\").attr('src', avatarUrl);\n }", "getMxcAvatarUrl(): string { throw new Error(\"Member class not implemented\"); }", "function getProfilePicUrl() {\n return (\n firebase.auth().currentUser.photoURL ||\n \"../../resources/images/profile_placeholder.png\"\n );\n}", "function addAvatars ($group) {\n\n $group.find('.cmb-repeatable-grouping').each(function () {\n var $this = $(this);\n var user_created = $this.find('[data-user_created_by]').attr('data-user_created_by');\n var av_created = $this.find('[data-avatar_created_by]').attr('data-avatar_created_by');\n\n // create the boxes to hold the images first\n $this.find('h3 span.title').prepend('<div class=\"av-created\"></div><div class=\"av-assigned\"></div>');\n\n if (av_created) {\n $this.find('.av-created').html('<img title=\"Created by: ' + user_created + '\" src=\"' + av_created + '\" height=\"25\" width=\"25\" />').show();\n } else {\n $this.find('.av-created').hide();\n }\n\n var assigneesWrapper = $this.find('.av-assigned');\n assigneesWrapper.html('');\n\n var assignees = $this.find('[data-assignees]').attr('data-assignees');\n if (assignees) {\n try {\n var assigneesNames = [];\n\n assignees = JSON.parse(assignees);\n if (assignees\n && assignees.data\n && assignees.data.length > 0\n ) {\n var assignee = assignees.data[0];\n assigneesWrapper.html('<img src=\"' + assignee.avatar + '\" height=\"25\" width=\"25\" />');\n\n if (assignees.data.length > 1) {\n assigneesWrapper.append($('<span class=\"o-badge\">+' + (assignees.data.length - 1) + '</span>'));\n }\n\n for (var assigneeIndex = 0; assigneeIndex < assignees.data.length; assigneeIndex++) {\n assigneesNames.push(assignees.data[assigneeIndex].name);\n }\n }\n\n assigneesWrapper.attr('title', $data.l.LB_ASSIGNED_TO + ': ' + assigneesNames.join(', ')).show();\n } catch (e) {\n // Do nothing.\n }\n }\n });\n }", "function getProfilePicUrl() {\n return firebase.auth().currentUser.photoURL || '/images/profile_placeholder.png';\n}", "function getProfilePicUrl() {\r\n return firebase.auth().currentUser.photoURL || '/images/profile_placeholder.png';\r\n}", "function set_avatar(fighter){\n \n var x =fighter.coordinate_x;\n var y =fighter.coordinate_y;\n var id = '#'+x+'_'+y;\n var link =\"/WebArenaGoupSI1-04-BE/img/avatars/\"+fighter.player_id+\".png\";\n var link_default =\"/WebArenaGoupSI1-04-BE/img/avatars/default/1.png\";\n var img;\n \n //img=\"<img src='\"+link+\"' data-toggle='tooltip' data-placement='top' title='\"+fighter.name+\"'>\";\n \n \n $.get(link)\n .done(function() { \n img=\"<img src='\"+link+\"' data-toggle='tooltip' data-placement='top' title='\"+fighter.name+\"'>\";\n $(id).html(img);\n }).fail(function() { \n // Image doesn't exist - do something else.\n img=\"<img src='\"+link_default+\"' data-toggle='tooltip' data-placement='top' title='\"+fighter.name+\"'>\";\n $(id).html(img);\n });\n \n \n \n \n \n}", "function assignImage(user){\n if(!user) return \"\";\n if(user.image) return user.image;\n if(user.twitchData && user.twitchData.profile_image_url) return user.twitchData.profile_image_url;\n if(user.facebookData && user.facebookData.photos) return user.facebookData.photos[0].value;\n if(user.googleData && user.googleData.photos) return user.googleData.photos[0].value;\n return \"\";\n}", "get ImageResolver() {return WebpackModules.getByProps(\"getUserAvatarURL\", \"getGuildIconURL\");}", "function getProfilePicUrl() {\n return firebase.auth().currentUser.photoURL || '/images/profile_placeholder.png';\n}", "function getProfilePicUrl() {\n return firebase.auth().currentUser.photoURL || '/images/profile_placeholder.png';\n}", "function getProfilePicUrl() {\n return firebase.auth().currentUser.photoURL || '/images/profile_placeholder.png';\n}", "function getProfilePicUrl() {\n return firebase.auth().currentUser.photoURL || '/images/profile_placeholder.png';\n}", "function getProfilePicUrl() {\n return firebase.auth().currentUser.photoURL || '/images/profile_placeholder.png';\n}", "function getProfilePicUrl() {\n return firebase.auth().currentUser.photoURL || '/images/profile_placeholder.png';\n}", "function getProfilePicUrl() {\n return firebase.auth().currentUser.photoURL || '/images/profile_placeholder.png';\n}", "function getProfilePicUrl() {\n return firebase.auth().currentUser.photoURL || '/images/profile_placeholder.png';\n}", "function getProfilePicUrl() {\n return firebase.auth().currentUser.photoURL || '/images/profile_placeholder.png';\n}", "function getContributerUrl( err, data ){\n\n data.forEach(function(element){\n downloadImageByURL(element.avatar_url, `avatars/${element.login}.jpg`);\n })\n}", "function getUserImage(username) {\n for (var i = 0, length = users.length; i < length; i++) {\n if (users[i].username == username) {\n if (!Methods.isNullOrEmpty(users[i].picture) && !Methods.isNullOrEmpty(users[i].picture.url)) {\n return users[i].picture.url;\n }\n else {\n return 'images/groups/' + username.slice(0, 1).toUpperCase() + '.png';\n }\n }\n }\n return 'images/other/Cat.png';\n }", "function renderAvatar(user) {\n\tvar img = document.createElement('img')\n\timg.className = \"avatar\"\n\timg.src = user.avatarURL\n\timg.alt = \"\"\n\treturn img\n}", "function getProfilePicUrl() {\r\n if(isUserSignedIn()){\r\n return auth.currentUser.photoURL || '/assets/images/becoder.png';\r\n }\r\n}", "function getImageUrl(authData) {\n switch (authData.provider) {\n // case 'password':\n // return authData.password.email.replace(/@.*/, '');\n case 'twitter':\n /* jshint -W106 */\n return authData.twitter.cachedUserProfile.profile_image_url;\n // case 'facebook':\n // return authData.facebook.displayName;\n }\n }", "function setNameAvatar(inName, inAvatarSrc){\r\n\t//local logic\r\n\tif( !CURRENT_USER ){\r\n\t\tCURRENT_USER = new User(inName, inAvatarSrc);\r\n\t} else {\r\n\t\tCURRENT_USER.name = inName;\r\n\t\tCURRENT_USER.avatar = inAvatarSrc;\r\n\t}\r\n\r\n\t//on local page\r\n\tupdateProfileOnPage(inName, inAvatarSrc);\r\n\r\n\t//update UI\r\n\tupdateUI();\r\n}", "function imgUrl(group, imgId) {\n return `http://ddragon.leagueoflegends.com/cdn/${resourceVersions.cdn}/img/${group}/${imgId}.png`;\n}", "function updateGravatar() {\n var gravatarOptions = currentAttrs();\n var gravatarUrl = gravatar.generateUrl(gravatarOptions);\n\n element.attr('src', gravatarUrl);\n }", "grabAvatar(userId, avatarHash) {\n let Format = avatarHash.startsWith(\"a_\") ? \"gif\" : \"png\";\n return {\n \"hash\": avatarHash,\n \"format\": Format,\n \"url\": `https://cdn.discordapp.com/avatars/${userId}/${avatarHash}.${Format}?size=1024`\n };\n }", "function getGoogleAvatar(index, googleId, callback) {\n gapi.client.load('plus','v1', function() {\n var request = gapi.client.plus.people.get({\n 'userId': googleId\n });\n request.execute(function(resp) {\n var img;\n if(resp.image) {\n if(!resp.image.isDefault) {\n img = resp.image.url.replace('?sz=50', '?sz=100');\n }\n }\n callback(index, img);\n });\n });\n}", "function display_profile_image(image) {\n if (image) {\n return 'src = \"' + image + '\"';\n } else {\n return 'src = \"files\\\\profile\\\\img\\\\default.png\"';\n }\n}", "function avatar(ava) //selects the avatar of the user\n{\n if(ava==='ronan')\n {\n\tavatarPic=\"ronan\";\n }\n else if(ava==='john')\n {\n\tavatarPic=\"john\";\n }\n else if(ava==='carter')\n {\n\tavatarPic=\"carter\";\n }\n else if(ava==='mckay')\n {\n\tavatarPic=\"mckay\";\n }\n \n}", "function setAvatar(avatar) {\n console.log(\"avatar: \" + avatar);\n iframe.body.querySelectorAll(\"[data-hook='input']\")[0].value =\n \"/avatar \" + avatar;\n iframe.body.querySelectorAll(\"[data-hook='send']\")[0].click();\n\n var notices = iframe.body.getElementsByClassName(\"notice\");\n for (var i = 0; i < notices.length; i++) {\n var notice = notices[i];\n if (notice.innerHTML == \"Avatar set\") {\n notice.parentNode.removeChild(notice);\n }\n }\n}", "getProfilePic() {\n return 'images/' + this.species.toLowerCase() + \".png\";\n }", "function avatar(url) {\n\tlet div = document.createElement(\"DIV\");\n\tlet a = document.createElement(\"A\");\n\tlet img = document.createElement(\"IMG\");\n\timg.src = url;\n\timg.width = 40;\n\timg.height = 40;\n\timg.className = \"avatar\";\n\tdiv.appendChild(a.appendChild(img));\n\treturn div;\n}", "function displayAvatar(hash, type, binval) {\n // Define the path to replace\n var replacement = hash + \" .avatar-container\";\n // var replacement = \"avatar-container\";\n var code = '<div class=\"avatar-container\"><img class=\"avatar removable\" src=\"';\n \n // If the avatar exists\n if(type != 'none' && binval != 'none')\n code += 'data:' + type + ';base64,' + binval;\n else\n code += $('.system .default-avatar').val();\n\n code += '\" alt=\"\" /></div>';\n \n // Replace with the new avatar (in the roster and in the chat)\n $('.' + replacement + ', #' + replacement).replaceWith(code);\n // $('.' + replacement).replaceWith(code);\n}", "function AvatarPacked({ variant, avatar_Url, ...rest }) {\n let background;\n let color; \n let diameter = \"300px\";\n let defaultAvatar = \"https://bit.ly/dan-abramov\";\n \n \n if (variant === 'sm') {\n background = '#E4DDDD';\n color = background;\n diameter = \"78px\";\n \n } else if (variant === 'md') {\n background = '#E4DDDD';\n color = background;\n diameter = \"152px\";\n \n } else if (variant === 'lg') {\n background = '#E4DDDD';\n color = background; \n diameter = \"159px\"; \n } \n \n \n \n if(avatar_Url == null || avatar_Url ==\"\"){\n return ( \n <img src={defaultAvatar} alt=\"Avatar\" style={{color:background,width:diameter,borderRadius:\"50%\"}}></img>\n );\n }\n else{\n return <img src={avatar_Url} alt=\"Avatar\" style={{color:background,width:diameter,borderRadius:\"50%\"}}></img>\n }\n}", "function _defaultImage() {\n if (vm.user) {\n vm.user.imageUrl = defaultImageUrl\n vm.imagePreview = defaultImageUrl\n vm.useFile = false\n }\n }", "function NoAvatar() {\n return (\n <img \n src=\"/defaultAvatar.png\"\n title=\"Default Avatar\"\n alt=\"Default Avatar\"\n className=\"usrAvatar\"\n />\n )\n}", "function avatarAssign(fact) {\n switch(fact) {\n case \"New Conglomerate\":\n return \"https://www-cdn.planetside2.com/images/empires/nc/nc-soldier-right.png?v=3304520529\"\n case \"Terran Republic\":\n return \"https://www-cdn.planetside2.com/images/empires/tr/tr-soldier-right.png?v=157706187\"\n case \"Vanu Sovereignty\":\n return \"https://www-cdn.planetside2.com/images/empires/vs/vs-soldier-right.png?v=616336742\"\n default: \n return \"https://vignette.wikia.nocookie.net/planetside2/images/9/93/Auraxis.jpg/revision/latest/scale-to-width-down/220?cb=20150129141914\"\n }\n}", "function fetchAvatarUrl(userID) {\n return fetch(`https://catappapi.herokuapp.com/users/${userID}`)\n .then(response => response.json())\n .then(data => data.imageUrl)\n}", "function updateUIforSignIn(avatarSrc) {\n\tauthDropdownItem.innerHTML = `<i><img class=\"avatar-image\" src=\"${avatarSrc}\" /></i>`;\n}", "function controlloFotoDefault(picture)\n{\n\tpic = picture;\n\tif (picture == 'Photo' || picture == 'photo' || picture == '' || picture.length == 0)\n\t{\n\t\tpicture = './img/missingAvatar.png';\n\t}else\n\t{\n\t\tpicture = 'http://95.141.45.174'+pic;\n\t}\n\treturn picture;\n}", "function loadUserImage(imageName) {\n const avatar = document.getElementById('avatar');\n checkReference(avatar, () => {\n const path = './assets/images/User_Avatars/';\n avatar.src = path + imageName;\n console.log('user image changed');\n });\n}", "function loadAvatar(hash, index, email, blank, counter, contactEmail){\n var count = 0;\n\n var url = \"https://secure.gravatar.com/avatar/\" + hash + \"?s=300&d=404\";\n var xhr = new XMLHttpRequest();\n xhr.open('GET', url, true);\n xhr.responseType = 'blob';\n xhr.onload = function(e) {\n \n var img = document.createElement('img');\n img.setAttribute(\"id\", \"realImageContainer\");\n if(blank){\n img.src = \"assets/transparent.png\";\n }\n \n if(xhr.status == 404 && email != ''){\n count++;\n loadInitials(email,index, contactEmail);\n }\n else\n {\n img.src = window.URL.createObjectURL(this.response);\n \n var divName = \"#g\" + index;\n \n $(divName).empty();\n if(email)\n $(divName).prepend(img);\n\n $(divName).append('<p id=\"gravatarName\">' + email + '</p>');\n \n var srcClone = img.src;\n $scope.trelloImages.push({\"Name\": email, \"Image\" :srcClone, \"Email\" : contactEmail});\n $scope.completedXMLRequests++;\n \n //Check if all xml requests are done and send\n if($scope.completedXMLRequests == 28){\n Service.updateGravatars($scope.trelloImages);\n }\n }\n \n \n };\n xhr.send();\n }", "function setupAccountPage(){\n $(\".avatar\").attr(\"src\",\"/static/images/players/default.png\");\n if(loggedIn()){\n try{\n $.ajax(\"/static/images/players/\"+firebase.auth().currentUser.email+\".txt\",{error:function(e){\n $(\".avatar\").attr(\"src\",\"/static/images/players/default.png\");\n }}).done(function(data){\n $(\".avatar\").attr('src',data);\n });\n } catch(e){\n console.log(e);\n }\n $(\".playerName\").text(playerName().substring(0,14));\n \n }\n}", "function Avatar(props) {\n return (\n <img className=\"Avatar\" src={props.user.avatarUrl} alt={props.user.name} />\n );\n}", "function gravatar(user, size) {\n if (!size) {\n size = 200;\n }\n if (!this.email) {\n return `https://gravatar.com/avatar/?s=${size}&d=retro`;\n }\n const md5 = crypto.createHash('md5').update(this.email).digest('hex');\n return `https://gravatar.com/avatar/${md5}?s=${size}&d=retro`;\n}", "function getProfilePicURL(){\n\treturn student.path;\n}", "function swap(src) {\n document.querySelectorAll(\".custom-avatar\").forEach(function(node) {\n node.src = src;\n });\n }", "function iconError() {\n if (this.src != 'https://cdn.discordapp.com/embed/avatars/1.png?size=128') {\n const match =\n this.src.match(/^https:\\/\\/cdn.discordapp.com\\/avatars\\/([^.]+)\\./);\n const matchSB =\n this.src.match(/^https:\\/\\/www.spikeybot.com\\/avatars\\/([^.]+)\\./);\n if (match) {\n this.src = `https://www.spikeybot.com/avatars/${match[1]}.png`;\n } else if (matchSB) {\n this.src = `https://kamino.spikeybot.com/avatars/${matchSB[1]}.png`;\n } else {\n this.src = 'https://cdn.discordapp.com/embed/avatars/1.png?size=32';\n }\n }\n }", "generateImageForFamily(familyName, family) {\n let randomImage = family[Math.floor(Math.random() * family.length)]\n\n return (\n <div className='col-md-4'>\n <div style={{fontWeight: 'bold', paddingTop: '2em', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis'}}>\n <a href={'/family/' + familyName}>{this.commonNameFromEbirdFamily(familyName)}</a>\n </div>\n <a href={'/family/' + familyName}>\n <img alt={this.commonNameFromEbirdFamily(familyName)} src={randomImage['Photo URL']} className='img-fluid'/>\n </a>\n </div>\n )\n }", "function createAvatar(id) {\n var avatar = document.createElement('img');\n avatar.className = \"icon-avatar avatar\";\n avatar.src = \"https://www.gravatar.com/avatar/\" + id + \"?d=wavatar&size=30\";\n\n return avatar;\n}", "function getGravatarUrl(email) {\n return $gravatar.generate(email);\n }", "function Avatar(_ref) {\n var path = _ref.path,\n size = _ref.size;\n //size:.avatar-medium .avatar-sm\n return /*#__PURE__*/React.createElement(\"img\", {\n src: path,\n alt: \"Avatar\",\n className: \"avatar \" + size\n });\n}", "function Avatar(props) {\n return (\n <img className=\"Avatar\"\n src={props.user.avatarUrl}\n alt={props.user.name}\n />\n\n );\n}", "function loadGravatars() {\n // set the viewport using the function above\n viewport = updateViewportDimensions();\n // if the viewport is tablet or larger, we load in the gravatars\n if (viewport.width >= 768) {\n try{\n jQuery('.comment img[data-gravatar]').each(function(){\n jQuery(this).attr('src',jQuery(this).attr('data-gravatar'));\n });\n }catch(e){\n jQuery(this).attr('src',jQuery(this).attr('data-fallback'));\n }\n\t}\n} // end function", "function Avatar(props) {\n return (\n <img className=\"Avatar\"\n src={props.user.avatarUrl}\n alt={props.user.name}\n />\n );\n}", "function getAvatar() {\n api.getAvatar().$promise.then(function (result) {\n UserService.avatar = result.pictures[0].picture;\n $location.path('/main');\n }, function () {\n window.alert('Not Logged In');\n $location.path('/');\n });\n }", "function getDefaultImage(fname, lname) {\n let p = gender.guess(`${fname} ${lname}`);\n return p.gender === 'female' ? \n 'https://upload.wikimedia.org/wikipedia/commons/5/53/Blank_woman_placeholder.svg'\n :\n 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/63/Upload_free_image_notext.svg/2000px-Upload_free_image_notext.svg.png';\n}", "function getContactImg(uid,cb) {\n window.console.log('Uid to retrieve img for: ',uid);\n var img = contactList.querySelector('#c' + uid + ' img');\n\n // The contact was not previously loaded on the DOM\n if(img === null) {\n img = document.createElement('img');\n img.crossOrigin = \"Anonymous\";\n\n img.src = 'https://graph.facebook.com/' + uid + '/picture?type=square';\n // A timeout is setup just in case the photo is not loaded\n var timeoutId = window.setTimeout(function() {\n img.onload = null; cb(null); img.src = ''; },5000);\n\n img.onload = function() {\n window.clearTimeout(timeoutId);\n cb(img);\n }\n }\n else {\n cb(img);\n }\n }", "getUserImage(users) {\n return find(users, (user) => user.username === this.props.item.owner).image;\n }", "function profilePicPathAttachment(obj) {\n return \"data/users/\" + obj.picture;\n }", "function _loadImages() {\n if (!vm.user) {\n vm.imagePreview = defaultImageUrl\n } else {\n vm.imagePreview = vm.user.imageUrl\n }\n }", "function getAvatarID(){\n\tvar clientID = client.GetConnectionID();\n\tvar avatarx = \"Avatar\" + clientID.toString();\n\treturn avatarx;\n}", "function imgErrorPhoto(image) {\n image.onerror = '';\n image.src = 'https://raw.githubusercontent.com/Stricks1/cap-twitter/feature/app/assets/images/user_default.png';\n return true;\n}", "getImgUrl(id) {\n if (id === 1) {\n return `images/profile/4randy.png`; // special pic for randy\n } else {\n const index = id%18;\n return `images/profile/${index}.png`\n }\n }", "async function getProfilePic(player) {\n //takes in the player uid and uses that to get the profile pic from a URL\n await firebase\n .storage()\n .refFromURL(\"gs://brackot-app.appspot.com/\" + player + \"/profile\")\n .getDownloadURL()\n .then(function (url) {\n return String(url);\n })\n .catch((error) => {\n return \"../media/BrackotLogo2.jpg\";\n });\n}", "function loadImage(fileName){\n\talert(\"This is the page to load a saved Project but I only save an image to the users progfile right now. :(\");\n\tvar user = firebase.auth().currentUser;\nvar name, email, photoUrl, uid, emailVerified;\n name = user.displayName;\n email = user.email;\n photoUrl = user.photoURL;\n alert(email+\" \"+name+\" \"+photoUrl);\n user.updateProfile({\n photoURL: \"'../images/test.GIF'\"\n})\n photoUrl = user.photoURL;\n alert(photoUrl);\n}", "getProfile(uid) {\n this.props.firebase.pictures(`${uid}.png`).getDownloadURL().then((url) => {\n this.setState({ url })\n }).catch((error) => {\n // Handle any errors\n this.setState({ url: \"\"})\n })\n }", "function loadGravatars() {\n // set the viewport using the function above\n viewport = updateViewportDimensions();\n // if the viewport is tablet or larger, we load in the gravatars\n if (viewport.width >= 768) {\n\t jQuery('.comment img[data-gravatar]').each(function(){\n\t jQuery(this).attr('src',jQuery(this).attr('data-gravatar'));\n\t });\n\t}\n}", "async setImage() {\n try {\n if (this.hasProperty(this.parsedMessage, \"metadata\")) {\n const metadata = this.parsedMessage.metadata;\n const injectedObject = metadata[\"@injected\"];\n if (\n injectedObject &&\n this.hasProperty(injectedObject, \"extensions\")\n ) {\n const extensionsObject = injectedObject[\"extensions\"];\n if (\n extensionsObject &&\n this.hasProperty(extensionsObject, \"thumbnail-generation\")\n ) {\n const thumbnailGenerationObject =\n extensionsObject[\"thumbnail-generation\"];\n\n const imageToDownload = this.chooseImage(\n thumbnailGenerationObject\n );\n\n try {\n const response = await this.downloadImage(imageToDownload);\n const url = URL.createObjectURL(response);\n let img = new Image();\n img.src = url;\n img.onload = () => (this.imageUrl = img.src);\n } catch (error) {\n logger(\"error\", error);\n }\n }\n }\n } else {\n let img = new Image();\n img.src = this.parsedMessage.data.url;\n img.onload = () => (this.imageUrl = img.src);\n }\n } catch (error) {\n logger(\"error\", error);\n }\n }", "function FormatUrl(url)\n{\n let base = \"http://cdn.akamai.steamstatic.com/steamcommunity/public/images/avatars/\";\n url = url.substring(url.indexOf('/avatars/') + 9, url.length);\n url = base + url;\n return url;\n}", "function getUserAvatar() {\n\n var contract = {\n \"function\": \"sm_getAddressAvatar\",\n \"args\": JSON.stringify([gUserAddress])\n }\n\n return neb.api.call(getAddressForQueries(), gdAppContractAddress, gNasValue, gNonce, gGasPrice, gGasLimit, contract);\n\n}", "function SetAvatars( appid, avatars )\n{\n\tif ( avatars.length == 0 )\n\t{\n\t\t$('avatars').innerHTML = 'Your group has no community avatars. You can upload some above.';\n\t\treturn;\n\t}\n\n\t$('avatars').innerHTML = '';\n\n\tfor ( var id = 0; id < avatars.length; id++ )\n\t{\n\t\tvar divAvatar = document.createElement( 'div' );\n\t\tdivAvatar.className = 'avatar';\n\n\t\tvar anchor = document.createElement( 'a' );\n\t\tanchor.href = '#';\n\t\tanchor.onclick = avatarPopupClosure(appid, avatars[id]);\n\n\t\tvar imgMed = document.createElement( 'img' );\n\t\timgMed.src = AvatarURL( avatars[id]['avatar_medium'] );\n\t\timgMed.border = 0;\n\t\tanchor.appendChild( imgMed );\n\n\t\tdivAvatar.appendChild( anchor );\n\t\tdivAvatar.appendChild( document.createElement( 'br' ) );\n\n\t\tvar anchor2 = document.createElement( 'a' );\n\t\tanchor2.onclick = DeleteAvatarClosure( appid, id );\n\t\tvar deleteUrl = g_szBaseURL + \"/apps/deleteavatar/\" + appid + \"/\" + id;\n\t\tanchor2.href = deleteUrl;\n\t\tanchor2.innerHTML = \"Delete\";\n\n\t\tdivAvatar.appendChild( anchor2 );\n\n\t\t$('avatars').appendChild( divAvatar );\n\t}\n}", "function getPic(type, userid, size) {\n // If userid is current user\n if (typeof _session.user != \"undefined\" && userid == _session.user.userid) {\n //age = _session.user.age;\n //gender = _session.user.gender;\n picextension = _session.user.picextension;\n }else if (typeof _session.users.user[userid] != \"undefined\") {\n // If Object is present in the current streamMember cache\n //age = _session.users.user[userid].age;\n //gender = _session.users.user[userid].gender;\n picextension = _session.users.user[userid].picextension;\n }else{\n // If Object is not present in the current streamMember cache\n //age = 0;\n //gender = \"\"\n //picextension = \"\"\n }\n \n // If no profile pic exists\n if(typeof picextension == \"undefined\" || picextension == null || picextension.length == 0){\n // Display age appropriate Silohoutte *TODO: Get Age from results\n if(userid < 50){\n gender = \"M\";\n } else {\n gender = \"F\";\n }\n \n imgSrc = 'img/profiles/no-picture-' + gender.toLowerCase() + '.png';\n }else{\n imgSrc = _application.url.fetch[type] + userid + size + picextension;\n }\n \n return imgSrc;\n}", "function getOppImage(oppAbbr) {\n if (oppAbbr[0] === '@') {\n oppAbbr = oppAbbr.substring(1, oppAbbr.length);\n }\n return \"/images/teams/\" + oppAbbr + \".png\";\n}", "function userPicture(itemNo,idLoc) { \t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\tvar userPic = document.createElement(\"img\");\t\t\t\t\t\t\t\t\t\t\t// create element\n\t\tvar userID = gapi.hangout.data.getValue(\"listTxt\" + itemNo + \"listID\" + idLoc) || \"0\"; \t// Get Persons ID\n\t\tvar userObj = eval(gapi.hangout.getParticipantById(userID));\t\t\t\t\t\t\t// Get person object and JSON convert\n\t\tuserPic.src = userObj.person.image.url + \"sz=25\";\t\t\t\t\t\t\t\t\t\t// Use Avatar as image (+ resize to 50x50)\n\t\tuserPic.width = 25;\n\t\tuserPic.height = 25;\n\t\tuserPic.align = \"top\"; \n\t\treturn userPic;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// return button element\n\t}", "async function showProfilePic() {\n const imageObj = await util.getProfilePicById(util.currentProfile);\n\n let profilePicSrc;\n !imageObj\n ? (profilePicSrc = './images/user.png')\n : (profilePicSrc = `./uploadedImages/${imageObj.img_id}.${imageObj.img_ext}`);\n\n document.querySelector('#profilePicElement').src = profilePicSrc;\n}", "function photo() {\n //check if exist data imageLinks\n if(book.volumeInfo.imageLinks){\n //check if thumbnail is not undefined\n if(book.volumeInfo.imageLinks.thumbnail !== undefined){\n return book.volumeInfo.imageLinks.thumbnail\n }\n } else return '/img/No-Photo-Available.jpg'\n }", "function UserImage(props) {\n const [imageErr, setImageErr] = useState(false);\n\n function handleBrokenLink() {\n setImageErr(true);\n }\n\n return (\n <section>\n {/* add figure/figcation to all images */}\n\n {(props.previewImg || props.image) && !imageErr ? (\n <img\n style={{\n width: \"200px\",\n height: \"200px\",\n borderRadius: \"50%\",\n }}\n src={props.previewImg || props.image}\n onError={handleBrokenLink}\n alt={props.previewImg ? \"current profile pic preview\" : \"profile pic\"}\n />\n ) : (\n <p>Avatar Image</p>\n )}\n </section>\n );\n}", "function getProfileFacebookImage(){\n var obj =getFacebookUserLocal();\n return getFacebookImage(obj);\n \n }", "function getUID(){\n\n let image = document.querySelector(\"._1UuMR ._1VzZY\");\n if( image ){\n let url_string = image.getAttribute(\"src\");\n if( url_string ){\n let url = new URL(url_string);\n let uid = url.searchParams.get(\"u\");\n\n // Individual: 447753361184@c.us\n // Group: 447753361184-1576063861@g.us\n\n let uidSplit = uid.split(\"@\");\n let isGroup = false;\n if( uidSplit[1] == \"g.us\") isGroup = true;\n\n return {userFound:true,id:uid,isGroup:isGroup};\n }\n }\n\n\n let defaultUser = document.querySelector(\"#main span[data-testid=default-user]\");\n if( defaultUser ) return {userFound:false, defaultUser:true};\n\n return {userFound:false};\n\n\n\n}", "function determineAvatar() {\n var avatars = getAvatars();\n var active = document.getElementById('showPlayer').innerHTML;\n return (active === \"Player 1\") ? avatars[0] : avatars[1];\n}", "async changeAvatar() {\n\n let response = await fetchApi('user/profile/change_avatar', 'PUT', true, {\n avatar_id: this.state.selectedImage.id,\n user_id: this.state.user.id\n })\n\n if (response) {\n await response\n await getUserInformation()\n this.setState({modalShow: false})\n await this.isAvatarChange()\n }\n }", "previewImage (res) {\n const url = this.data.groupQrUrl\n wx.previewImage({\n urls: [url]\n });\n }", "getVoterPhotoUrlMedium (){\n return this.getState().voter.voter_photo_url_medium || \"\";\n }", "function FindUserAvatar()\n{\n var scene = framework.Scene().MainCameraScene();\n if (scene && client.IsConnected())\n return scene.EntityByName(\"Avatar\" + client.connectionId);\n else\n return null;\n}", "function loadIconPermission(value){\n return value?'<img src=\"Public/Images/accept.png\"/>':'<img src=\"Public/Images/cross.gif\"/>';\n}", "setLastAvatarUrl(props) {\n let avatarUrl = _.get(props, ['session', 'user', 'avatarUrl'])\n if (avatarUrl) {\n this.setState({ lastAvatarUrl: avatarUrl })\n }\n }", "function Avatar({\n className,\n children,\n imageURL,\n style,\n size = \"\",\n status,\n placeholder,\n icon,\n color = \"\",\n onClick,\n onMouseEnter,\n onMouseLeave,\n onPointerEnter,\n onPointerLeave,\n}: Props): React.Node {\n const classes = cn(\n {\n avatar: true,\n [`avatar-${size}`]: !!size,\n \"avatar-placeholder\": placeholder,\n [`avatar-${color}`]: !!color,\n },\n className\n );\n return (\n <span\n className={classes}\n style={\n imageURL\n ? Object.assign(\n {\n backgroundImage: `url(${imageURL})`,\n },\n style\n )\n : style\n }\n onClick={onClick}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n onPointerEnter={onPointerEnter}\n onPointerLeave={onPointerLeave}\n >\n {icon && <Icon name={icon} />}\n {status && <span className={`avatar-status bg-${status}`} />}\n {children}\n </span>\n );\n}" ]
[ "0.6959928", "0.6775977", "0.6768385", "0.6631696", "0.65791017", "0.6502219", "0.6493715", "0.6490361", "0.6450367", "0.6434274", "0.6331503", "0.63183075", "0.6306597", "0.6305018", "0.62483144", "0.6240524", "0.6221686", "0.61915576", "0.6189803", "0.61801225", "0.61769724", "0.61769724", "0.61769724", "0.61769724", "0.61769724", "0.61769724", "0.61769724", "0.61769724", "0.61769724", "0.6153498", "0.6147029", "0.61004883", "0.6092487", "0.609123", "0.6057939", "0.600525", "0.60052", "0.59958386", "0.59844804", "0.5983735", "0.59781605", "0.5965419", "0.59131247", "0.5894959", "0.58606404", "0.58535665", "0.583528", "0.58207583", "0.57687885", "0.5742759", "0.57405335", "0.5648541", "0.5633945", "0.56279886", "0.5618637", "0.5586299", "0.55839384", "0.55720073", "0.55713284", "0.55690455", "0.5553037", "0.55461824", "0.553947", "0.55214274", "0.5514752", "0.5504866", "0.55017066", "0.5491735", "0.54853237", "0.547941", "0.5477261", "0.54599434", "0.54576916", "0.544467", "0.5439195", "0.54377437", "0.54205227", "0.5411987", "0.5411236", "0.5410118", "0.54097205", "0.54042387", "0.538928", "0.5384502", "0.5383189", "0.53759056", "0.53697073", "0.53548825", "0.5339974", "0.53360575", "0.53216255", "0.53193927", "0.5314078", "0.5313189", "0.5309386", "0.53007984", "0.52995384", "0.5289329", "0.5274798", "0.52724993" ]
0.72789663
0
Helper function to return an object containing evenly spaced x and y coordinates:
generateRandomCoords () { const randomX = Math.floor(Math.random() * 5) * 90 + 25 const randomY = Math.floor(Math.random() * 5) * 100 + 25 return { x: randomX, y: randomY } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_coords(x,y)\n{\n return {\n \"x\": 30 + 40*x +(y % 2 == 1 ? 20:0),\n \"y\": 35 + 35*y\n };\n}", "function point2D(x, y) {\n\n return {x: x, y: y};\n\n }", "function makePnt( x, y ) {\n return { x: x, y: y }\n}", "convertCoordinates( x, y ) {\r\n let loc_x = x * this._NUM_PIXELS / this._GRID_SIZE;;\r\n let loc_y = y * this._NUM_PIXELS / this._GRID_SIZE;;\r\n return { x: loc_x, y: loc_y };\r\n }", "function isoPoint(x, y) {\n let point = {};\n point.x = x - y;\n point.y = (x + y) / 2;\n return point;\n}", "static pointBox(x, y) {\n\t\treturn {\n\t\t\tx: x,\n\t\t\ty: y,\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t};\n\t}", "function Point(x, y) {\n return {x: x, y: y};\n}", "function Point(x, y) {\n return {x: x, y: y}\n}", "function Point(x, y) {\n return {\n 'x': x,\n 'y': y,\n 'left': x,\n 'top': y\n };\n }", "function getCoords() {\n return {\n x: 10,\n y: 22\n };\n}", "function newCoordsXY(x, y){\n if (!Number.isInteger(x) || !Number.isInteger(y)){\n throw Error(`class_coords.js: function newCoords: coordinates must be integer`);\n }\n return new Coords(x, y, undefined, undefined);\n}", "function Point(x, y) {\n return {x, y}\n}", "getSymmetricalPos(x, y) {\n if (this.symmetry != null) {\n if (this.pillar === true) {\n x += this.width/2\n if (this.symmetry.x === true) {\n x = this.width - x\n }\n } else {\n if (this.symmetry.x === true) {\n x = (this.width - 1) - x\n }\n }\n if (this.symmetry.y === true) {\n y = (this.height - 1) - y\n }\n }\n return {'x':this._mod(x), 'y':y}\n }", "function createPoint(x, y) {\n var point = new Object();\n point.x = parseInt(x);\n point.y = parseInt(y);\n \n return point;\n}", "function point(x, y) {\n return { x, y };\n}", "function Coords(x, y) {\n this.x = x;\n this.y = y;\n}", "function xy2grid(x, y) {\n\tvar normXY = sketch.screentoworld(x, y);\n}", "Point( x, y ) {\n return { x, y }\n }", "function CreatePointInSpace(x, y, z){\n this.xPoint = x;\n this.yPoint = y;\n this.zPoint = z;\n}", "function getCoords () {\n return {\n x: 10,\n y: 22\n }\n }", "function randomCoords() {\n const x = getRandomArbitrary(0, boxWidth);\n const y = getRandomArbitrary(0, boxHeight);\n\n return {\n x: Math.ceil(x), \n y: Math.ceil(y)\n }\n}", "constructor(x, y) {\n this.x = x;\n this.y = y;\n this.x = x;\n this.y = y;\n }", "function Point2D(x, y) {\n this._x = x;\n this._y = y;\n}", "function Point2d(xCoord, yCoord) {\n\tthis.xCoord = xCoord;\n\tthis.yCoord = yCoord;\n}", "function convertCoords(x,y) {\n var sidelen = 400 / board.size();\n\n x = x - 154 - sidelen / 2;\n y = y - 10 - sidelen / 2;\n return [x,y];\n}", "Point(x, y) {\n\t\treturn { x: x, y: y };\n\t}", "function vector2d(x, y) {\n this.x = x;\n this.y = y;\n}", "function from_coords(x,y) {\n return x + y*16;\n }", "function Coord(x, y) {\n this.x = x;\n this.y = y;\n}", "function determinePosition(x, y) {\n return new Point(x, y);\n}", "constructor(x, y) {\n this.x = x\n this.y = y\n }", "constructor(x, y) {\n this.x = x;\n this.y = y;\n }", "constructor(x, y) {\n this.x = x;\n this.y = y;\n }", "constructor(x, y) {\n this.x = x;\n this.y = y;\n }", "function convert(x, y) {\n var new_x = (x + 50) * size_mult;\n var new_y = ((y * -1) + 50) * size_mult;\n return {'x': new_x, 'y': new_y};\n}", "function Position(x, y) {\n \"use strict\";\n\n this.x = x;\n this.y = y;\n\n this.oneDimPosition = function () {\n return ((this.y * 3) + this.x);\n };\n\n this.toString = function () {\n return (\"X: \" + this.x + \" Y: \" + this.y);\n };\n}", "function pt(x, y) { \n return new Point(x, y);\n}", "function createPoint(x, y) {\n\tif (isNaN(x) || isNaN(y)) {\n\t\treturn null;\n\t}\n\n\treturn {\n\t\tx: parseFloat(x),\n\t\ty: parseFloat(y),\n\t\ttoString: function() {\n\t\t\treturn '(' + this.x + ', ' + this.y + ')';\n\t\t}\n\t};\n}", "constructor(x,y) {\r\n this.x = x\r\n this.y = y\r\n }", "function fixCoordinates(x, y) {\n let newX = (x / outputCanvas.width) * 2 - 1;\n let newY = (y / outputCanvas.height) * 2 - 1;\n return [newX, newY];\n}", "function Coordinate(x,y){\n this.x = x;\n this.y = y;\n}", "normalizeCoords(x: number, y: number) {\n return {\n x: (x - this.im.position.x) / this.im.scale,\n y: (y - this.im.position.y) / this.im.scale,\n };\n }", "constructor(x_, y_) {\n this.x = x_;\n this.y = y_;\n }", "function HousePos(xPos, yPos) {\n this.xPos = xPos;\n this.yPos = yPos;\n this.getPos = function () {\n return [this.xPos, this.yPos];\n }\n}", "function Coordinates(x, y)\n{\n this.x = x;\n this.y = y;\n}", "constructor(x = 0, y = 0) {\n this.x = x;\n this.y = y;\n }", "function newCoords(x, y, width, height){\n if (!Number.isInteger(x) || !Number.isInteger(y) || !Number.isInteger(width) || !Number.isInteger(height)){\n throw Error(`class_coords.js: function newCoords: coordinates must be integer`);\n }\n return new Coords(x, y, width, height);\n}", "function GetXandYCoordinate(id){\n id = \"\"+id;\n return {y : id[0],x : id[1]};\n}", "function fitToGrid(x, y) {\n var gridX = Math.floor(x / cellWidth);\n var gridY = Math.floor(y / cellHeight);\n \n return {x: gridX, y: gridY};\n }", "constructor(x, y) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}", "constructor(x, y) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}", "function gtaCoordToMap(x, y)\r\n{\r\n\tvar mapx = x * 0.03;\r\n\tvar mapy = y * 0.03;\r\n\treturn {x: mapx, y: mapy};\r\n}", "function XY(x,y)\r\n{\r\n \tvar pnt = domSVG.createSVGPoint();\r\n\tpnt.x = x\r\n\tpnt.y = y\r\n\tvar sCTM = domSVG.getScreenCTM();\r\n\tvar PNT = pnt.matrixTransform(sCTM.inverse());\r\n \treturn {x:PNT.x,y:PNT.y}\r\n}", "function coordonneesPoint(x,y)\n {\n this.x = x;\n this.y = y;\n }", "getExactPoint(x, y) {\n for (let i = 0; i < this.circleArray.length; i++) {\n if (x > this.circleArray[i].x - 30 && x < this.circleArray[i].x + 30 && y > this.circleArray[i].y - 30 && y < this.circleArray[i].y + 30) {\n return {\n x: this.circleArray[i].x,\n y: this.circleArray[i].y\n }\n\n }\n }\n }", "screenToWorld(x, y) {\n if (y === undefined) {\n y = x.y;\n x = x.x;\n }\n\n let M = this.ctx.getTransform().invertSelf();\n\n let ret = {\n x: x * M.a + y * M.c + M.e,\n y: x * M.b + y * M.d + M.f,\n };\n\n return ret;\n }", "calculateCellsPosition(x, y) {\n let position = {};\n\n position.x = (Cell.config.cellSize + Cell.config.cellMargin) * x;\n position.y = (Cell.config.cellSize + Cell.config.cellMargin) * y;\n\n return position;\n }", "function pointv1(x, y) {\n return {\n getX: function () {\n return x;\n },\n \n setX: function (val) {\n x = val;\n },\n \n getY: function () {\n return y;\n },\n \n setY: function (val) {\n y = val;\n }\n };\n}", "function coordMod(i, j, width, height, x, y) {\r\n\tvar retval = [];\r\n\tretval.push(x + (width * i));\r\n\tretval.push(y + (height * j));\r\n\treturn retval;\r\n}", "constructor(x,y){\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}", "function createVector(x, y) {\n const vec = {\n x: x,\n y: y\n };\n return vec;\n }", "function Vector2d(x, y) {\r\n\tthis.x = parseInt(x);\r\n\tthis.y = parseInt(y);\r\n}", "constructor(x,y,width,height){\n this.#x = x;\n this.#y = y;\n this.#halfWidth = width/2;\n this.#halfHeight = height/2;\n }", "function xyToObj(xy) { //return coord obj\n\t\treturn {x:xy[0],y:xy[1]};\n\t}", "convertCoords(regionId, x, y) {\n let xcoord = mapArray[regionId - 3].center[1] - (w / 2) + (w * x);\n let ycoord = mapArray[regionId - 3].center[0] + (k / 2) - (k * y);\n return { xcoord, ycoord };\n }", "function Posn(x, y) {\n\tthis.x = x;\n \tthis.y = y;\n}", "function calcXAndY(row, column){\n if(row < 0 || row > 4 || column < 0 || column > 4){\n return undefined\n }\n return {\n x: row * QUADRANT_DIMENSION + ANCHOR_OFFSET,\n y: column * QUADRANT_DIMENSION + ANCHOR_OFFSET,\n };\n}", "function to1D(x, y, gridWidth)\n{\n return y*gridWidth+x;\n}", "function getValues(x, y) {\n this.X = x;\n this.Y = y;\n }", "function compute_coordinates(pixel_positionX, pixel_positionY, product_width_scaled, product_height_scaled){\n let coordinates = {};\n coordinates.x1 = pixel_positionX;\n coordinates.y1 = pixel_positionY;\n coordinates.x2 = pixel_positionX;\n coordinates.y2 = pixel_positionY + product_height_scaled;\n coordinates.x3 = pixel_positionX + product_width_scaled;\n coordinates.y3 = coordinates.y2;\n coordinates.x4 = coordinates.x3;\n coordinates.y4 = pixel_positionY;\n return coordinates;\n}", "constructor(x,y) {\n\t\tthis.x = x || 0;\n\t\tthis.y = y || 0;\n\t}", "function Posn(c, l) {\n \"use strict\";\n return {\"x\" : c, \"y\" : l};\n}", "constructor(x, y, x1, y1) {\n this.padding = 100;\n this.center = [(x+x1)/2,(y+y1)/2];\n Object.assign(this, {x, y, x1, y1});\n }", "screenToWorld(x, y) {\r\n\t\tconst dpr = window.devicePixelRatio || 1;\r\n\t \treturn {\r\n\t\t\tx:(x - this._canvas.width / dpr / 2) / this.zoom + this.posX,\r\n\t\t\tz:(y - this._canvas.height / dpr / 2) / this.zoom + this.posZ\r\n\t\t};\r\n\t}", "function Coordinate (xCoord, yCoord) {\n this.xCoord = xCoord;\n this.yCoord = yCoord;\n}", "constructor(x, y, worldSpace = true)\n\t{\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.worldSpace = worldSpace;\n\t}", "function Origin(){\n this.x = midWidth;\n this.y = midHeight;\n}", "function Point(x, y) { this.x = x; this.y = y; }", "function getLayoutPositionFromXY(x, y) {\n\treturn [(x / WALL_WIDTH) | 0, (y / WALL_HEIGHT) | 0];\n}", "function convertXYtoCanvas(x, y){\n var xLeft = X_MIN + x * (X_MAX - X_MIN) * 0.1;\n var xRight = xLeft + (X_MAX - X_MIN) * 0.1;\n var yLow = Y_MIN + y * (Y_MAX-Y_MIN) * 0.05;\n var yHigh = yLow + (Y_MAX-Y_MIN) * 0.05;\n\n var squareVerticies = [xLeft, yLow, xRight, yLow, xLeft, yHigh, xRight, yHigh];\n\n return squareVerticies;\n}", "function spawnLocation(xPos, yPos) {\n \n return { x: xPos, y: yPos };\n\n}", "function centerCoordinates(xy){\n for (var i = 0; i < xy.length; i++){\n xy[i][0] = xy[i][0] + width/2;\n xy[i][1] = xy[i][1] + height/2;\n }\n return xy;\n}", "worldToScreen(x, y) {\n if (y === undefined) {\n y = x.y;\n x = x.x;\n }\n\n let M = this.ctx.getTransform();\n\n let ret = {\n x: x * M.a + y * M.c + M.e,\n y: x * M.b + y * M.d + M.f,\n };\n\n return ret;\n }", "function Point(x, y) {\n this.x = x;\n this.y = y;\n this.x = x;\n this.y = y;\n }", "function calcMidpoint(x1, y1, x2, y2) {\n return {\n x: (x1 + x2)/2,\n y: (y1 + y2)/2\n };\n}", "function Vector2D(x, y) {\n this.x = x;\n this.y = y;\n }", "constructor(x, y) {\n\t\tthis.x = x; // current coordinate (0..24)\n\t\tthis.y = y; // current coordinate (0..24)\n\t\t\n\t\tthis.previousX = x;\n\t\tthis.previousY = y;\n\t}", "worldToScreenXY(x, y) {\n return new Vector2D(Math.round(x), Math.round(-y + this.canvas.height));\n }", "static getCoordsFromIndex(i, w) {\n return {\n x: i % w,\n y: Math.floor(i / w)\n }\n }", "function getCoordinates(cell) {\n return {\n x: (cell) % 10,\n y: Math.floor((cell) / 10)\n }\n}", "function x (x,y){\n let p = sz * 0.10;\n line((sz * x + sz) - p,\n (sz * y) + p,\n (sz * x) + p,\n (sz * y + sz) - p);\n line((sz * x) + p,\n (sz * y) + p,\n (sz * x + sz) - p,\n (sz * y + sz) - p);\n \n}", "getLocation(x, y) {\n return [Math.floor(x / CELL.WIDTH), Math.floor(y / CELL.HEIGHT)];\n }", "function middle(x, y, height, width) {\r\n\treturn [x + height / 2, y + width / 2];\r\n}", "function coordonnees() {\n // code fictif\n return { x:25, y:12.5 };\n}", "transformCoords(x: number, y: number) {\n return {\n x: (x * this.im.scale) + this.im.position.x,\n y: (y * this.im.scale) + this.im.position.y,\n };\n }", "function calculatePlacement(x, y){\n let returnX, returnY;\n\n for(let _x = 0; _x <= boxWidth + tileSize; _x += tileSize){\n if(x > _x && x < _x + tileSize){\n returnX = _x / tileSize;\n }\n }\n\n for(let _y = 0; _y <= boxHeight + tileSize; _y += tileSize){\n if(y > _y && y < _y + tileSize){\n returnY = _y / tileSize;\n }\n }\n\n return {x: returnX, y: returnY};\n}", "function Pos(x, y) {\n this.x = x; this.y = y;\n}", "ij_xy(x, y) {\n if (Array.isArray(x)) [x, y] = x;\n\n return [y / this.tileSizeDrawn | 0,\n x / this.tileSizeDrawn | 0];\n }", "static rotatePosition2D(x, y, theta) {\n\t\treturn {\n\t\t\tx: x * Math.cos(theta) - y * Math.sin(theta),\n\t\t\ty: x * Math.sin(theta) + y * Math.cos(theta),\n\t\t\tz: 0\n\t\t};\n\t}", "function particle(x, y) {\n this.x = this.px = x;\n this.y = this.py = y;\n this.xv = this.yv = 0;\n }" ]
[ "0.7159345", "0.70056117", "0.67666143", "0.66311187", "0.6466807", "0.6444893", "0.6393538", "0.63854593", "0.6383024", "0.6376565", "0.6358117", "0.6323815", "0.63176215", "0.6306477", "0.63028586", "0.6248631", "0.62382925", "0.62299156", "0.6228796", "0.62133276", "0.62031287", "0.6193523", "0.61875165", "0.6160475", "0.61539215", "0.61416304", "0.61339384", "0.61086416", "0.610692", "0.6091348", "0.6081211", "0.6080913", "0.6080913", "0.6080913", "0.60698134", "0.60378736", "0.60313815", "0.6018552", "0.6017214", "0.6012363", "0.6006286", "0.6005781", "0.6004921", "0.5965966", "0.5948807", "0.594084", "0.59216714", "0.58866036", "0.5868813", "0.5867952", "0.5867952", "0.58572936", "0.58528745", "0.5851587", "0.5848461", "0.5847528", "0.58471334", "0.584327", "0.5815771", "0.58102", "0.5802844", "0.58024347", "0.5773595", "0.57580143", "0.5731267", "0.57292056", "0.5725209", "0.57228476", "0.57123274", "0.5691959", "0.5690257", "0.5688406", "0.56824195", "0.56761116", "0.567198", "0.5671338", "0.56622195", "0.5662218", "0.5649122", "0.56432253", "0.5642514", "0.56408656", "0.56384164", "0.563759", "0.56235605", "0.56190103", "0.56174767", "0.56046635", "0.56022006", "0.5602166", "0.56008196", "0.5593902", "0.5586335", "0.5584711", "0.5567176", "0.5562039", "0.5560944", "0.55586964", "0.55510426", "0.5535164" ]
0.57247347
67
Helper function that returns one set of coordinates not in gameState.numCoordinates
assignCoords () { let assignedCoord = this.generateRandomCoords(); // If the coordinates is already in gameState.numCoordinates, then other set of coordinates are generated until there is one not in use while (gameState.numCoordinates[`x${assignedCoord.x}y${assignedCoord.y}`]) { assignedCoord = this.generateRandomCoords() } gameState.numCoordinates[`x${assignedCoord.x}y${assignedCoord.y}`] = true return assignedCoord }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getUnassignedLocation(grid) {\n for (let row = 0; row < HEIGHT; row++) {\n for (let col = 0; col < WIDTH; col++) {\n if (grid[row][col] === 0) {\n return [row, col];\n }\n }\n }\n return [10, 10];\n }", "function check_for_isolated_squares(squares_pos) {\r\n\t//console.log(squares_pos);\r\n\tlet isolated = false;\r\n\tfor(let i in squares_pos) {\r\n\t\tif(squares_pos[i].x == -1 || squares_pos[i].y == -1) {\r\n\t\t\tconsole.log(\"Isolated square: \" + i);\r\n\t\t\tisolated = true;\r\n\t\t}\r\n\t}\r\n\treturn isolated;\r\n}", "getEmptyPositionsWithSpaceWithWalls() {\n var emptyPositions = this.getEmptyPositions();\n var res = emptyPositions.filter(p => (((GameConfig.WIDTH - 3) >= p.x) && ((GameConfig.HEIGHT - 3) >= p.y)) && ((2 <= p.x) && (2 <= p.y)));\n return res;\n }", "function occupied(x,y) { return grid[x+\",\"+y]; }", "function emptySquares() {\r\n return origBoard.filter((elm, i) => i===elm);\r\n}", "function findUnassignedLocation(grid, row, col) {\n for (; row < 9 ; col = 0, row++) {\n for (; col < 9 ; col++) {\n if (grid[row][col] == 0) {\n return [row, col];\n } \n }\n }\n return [-1, -1];\n }", "function getUnvisitedNeighbors(coord, arr){\r\n var x = coord[0], y = coord[1];\r\n var returnOptions = [];\r\n \r\n if (x != 0 && !arr[x-1][y]){\r\n returnOptions.push([x-1, y]);\r\n } \r\n if (y != 0 && !arr[x][y-1]){\r\n returnOptions.push([x, y-1]);\r\n } \r\n if (x < arr.length-1 && !arr[x+1][y]){\r\n returnOptions.push([x+1, y]);\r\n } \r\n if (y < arr[x].length-1 && !arr[x][y+1]){\r\n returnOptions.push([x, y+1]);\r\n }\r\n \r\n return returnOptions;\r\n}", "getRandomCoordinateAtStart() {\n\t\tlet space = 80, width = window.innerWidth, height = this.gameHeight;\n\t\tlet searching = true, attempts = 0, maxAttempts = 10, xy;\n\n\t\twhile (searching && attempts < maxAttempts) {\n\t\t\txy = getRandomCoordinateAtStartHelper(this.util.randomInt);\n\t\t\tif (!this.isLocationOccupiedByGameObject(xy, this.util.getDistanceBetweenPoints)) {\n\t\t\t\tsearching = false;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tattempts++;\n\t\t\t}\n\t\t}\n\t\treturn xy;\n\n\t\tfunction getRandomCoordinateAtStartHelper(randomIntFunc) {\n\t\t\treturn { x: randomIntFunc(-width * 3 / 4, width * 3 / 4), y: randomIntFunc(-height / 3 - space, height) };\n\t\t}\n\t}", "getRandomCoordinateOffScreen() {\n\t\tlet space = 80, width = window.innerWidth, height = this.gameHeight;\n\t\tlet searching = true, attempts = 0, maxAttempts = 10, xy;\n\n\t\twhile (searching && attempts < maxAttempts) {\n\t\t\txy = getRandomCoordinateOffScreenHelper(this.util.randomInt);\n\t\t\tif (!this.isLocationOccupiedByGameObject(xy, this.util.getDistanceBetweenPoints)) {\n\t\t\t\tsearching = false;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tattempts++;\n\t\t\t}\n\t\t}\n\n\t\treturn xy;\n\n\t\tfunction getRandomCoordinateOffScreenHelper(randomIntFunc) {\n\t\t\tswitch (randomIntFunc(0, 3)) {\n\t\t\tcase 0:\n\t\t\t\t// offscreen left\n\t\t\t\treturn { x: randomIntFunc(-width * 3 / 4, -width / 2 - space), y: randomIntFunc(-height / 3 - space, height * 2 / 3) };\n\t\t\tcase 1:\n\t\t\t\t// offscreen right\n\t\t\t\treturn { x: randomIntFunc(width / 2, width * 3 / 4), y: randomIntFunc(-height / 3 - space, height * 2 / 3) };\n\t\t\tdefault:\n\t\t\t\t// offscreen down\n\t\t\t\treturn { x: randomIntFunc(-width * 3 / 4, width * 3 / 4), y: randomIntFunc(height * 2 / 3, height) };\n\t\t\t}\n\t\t}\n\t}", "function getEmptySpots(board){\n return board.filter(s => s != \"O\" && s != \"X\");\n}", "function whichSquare(coordinates, grid){ \n // Initialize variable that will hold the square number of the coordinates\n // Start with invalid value, in case coordinates are incorrect\n let squareIn;\n // Create string version of coordinates to look inside each grid\n let coorStr = JSON.stringify(coordinates); \n // Instantiate variable that will hold string version of each square\n let squareStr;\n \n grid.every((square) => {\n squareStr = JSON.stringify(square); \n \n if(squareStr.indexOf(coorStr) >= 0){ \n squareIn = square; \n return false;\n } else {\n return true;\n }\n \n });\n\n return squareIn;\n \n}", "function emptysquares(){\r\n \treturn origBoard.filter(s => typeof s == 'number');\r\n }", "function whereisthespace()\n\t{\n\t\t//create array with all the possible points\n\t\tvar allpoints = [\"0,0\", \"0,100\", \"0,200\", \"0,300\", \"100,0\", \"100,100\", \"100,200\", \"100,300\", \"200,0\", \"200,100\", \"200,200\", \"200,300\", \"300,0\", \"300,100\", \"300,200\", \"300,300\"];\n\t\tvar index;\n\t\t//loop throough the current location of the points and splice them off the array, leaving only the blank space.\n\t\tfor (var i = 0; i < c.length; i++)\n\t\t{\n\t\t\tindex = allpoints.indexOf(c[i].offsetLeft + \",\" + c[i].offsetTop);\n\t\t\tallpoints.splice(index,1);\n\t\t}\n\t\treturn allpoints;\n\t}", "validCoords(coords) {\n const [r, c] = coords;\n return r >= 0 && r < this.rows && c >= 0 && c < this.cols;\n }", "getFoodLocation() {\n let x = Utils.rand(MARGIN, document.body.clientWidth - MARGIN, SIZE);\n let y = Utils.rand(MARGIN, document.body.clientHeight - MARGIN, SIZE);\n // If random spot is already filled, pick a new one\n // Pick until you find an empty spot\n // ..... nothing can go wrong with this\n if (Locations.has(x, y)) {\n [x, y] = this.getFoodLocation();\n }\n return [x, y];\n }", "function doesNotContainVertexAtCoordinates(vertexList, coordinate) {\n for (var count = 0; count < vertexList.length; count++) {\n if (Grid.vectorEquals(coordinate, vertexList[count].coordinate)) {\n return false;\n }\n }\n return true;\n}", "getPawnMovesCollision(validMovesNoCollision) {\n let piece = null;\n let validMovesCollision = [];\n for(let tileId of validMovesNoCollision) {\n piece = this.getTilePiece(tileId);\n if(piece != 0) {\n break;\n } else {\n validMovesCollision.push(tileId);\n }\n }\n return validMovesCollision;\n }", "function emptySquares() {\n\treturn origBoard.filter(s => typeof s == 'number');\n}", "function emptySquares() {\n\treturn origBoard.filter(s => typeof s == 'number');\n}", "function emptySquares() {\n\treturn origBoard.filter(s => typeof s == 'number');\n}", "getNonBoundaryPoints() {\n return this.points.slice(this.numBoundaryRegions);\n }", "emptyIndexies(board){\n return board.filter(tile => tile != \"o\" && tile != \"x\");\n }", "isClear(positions) {\n const minX = min(positions.map(piece => piece.x));\n const maxX = max(positions.map(piece => piece.x));\n const minY = min(positions.map(piece => piece.y));\n const maxY = max(positions.map(piece => piece.y));\n\n if (minX < 0) { return false; }\n if (minY < 0) { return false; }\n if (maxX >= this.width) { return false; }\n if (maxY >= this.height) { return false; }\n\n return !some(positions, (position, a, b) => {\n if (this.getSquare(position.x, position.y)) { return true; }\n });\n }", "getSkipStartCoordinates() {\n let x = this.leftMargin_;\n let y = this.topMargin_;\n return [x, y];\n }", "function unUsedInBox(solutionGrid, rowStart, colStart, num) \n { \n for (let i = 0; i<3; i++) \n for (let j = 0; j<3; j++) \n if (solutionGrid[rowStart+i][colStart+j]==num) \n return false; \n\n return true; \n }", "function select_non_corner_cell(){\n return select_available_cell_in_array([upper_center_cell, right_center_cell, left_center_cell, lower_center_cell]);\n }", "checkCoordinates(obj) {\n for (let elem of game.coordinates) {\n if (obj.x === elem.x && obj.y === elem.y) {\n if (elem.occupied) {\n return true;\n } else {\n return false;\n }\n }\n }\n }", "getNear(p) {\n\n //first x (going left to right)\n const x1 = Math.floor(p.x / width * 10);\n\n //second x\n const x2 = Math.floor((p.x + p.width) / width * 10);\n\n //first y (going left to right)\n const y1 = Math.floor(p.y / height * 10);\n\n //second y\n const y2 = Math.floor((p.y + p.height) / height * 10);\n\n const min = x1 + y1;\n const max = x2 + y2;\n const s = new Set();\n for (let i = min; i <= max; i++) {\n if (this.pos[i]) this.pos[i].forEach(item => s.add(item));\n }\n\n //get array and return it from the set\n return Array.from(s);\n }", "function EvaluatePosition() {\n return (\n (squares[0] != \"\" && squares[0] == squares[3] && squares[0] == squares[6]) ||\n (squares[0] != \"\" && squares[0] == squares[1] && squares[0] == squares[2]) ||\n (squares[0] != \"\" && squares[0] == squares[4] && squares[0] == squares[8]) ||\n (squares[1] != \"\" && squares[1] == squares[4] && squares[1] == squares[7]) ||\n (squares[2] != \"\" && squares[2] == squares[5] && squares[2] == squares[8]) ||\n (squares[2] != \"\" && squares[2] == squares[4] && squares[2] == squares[6]) ||\n (squares[3] != \"\" && squares[3] == squares[4] && squares[3] == squares[5]) ||\n (squares[6] != \"\" && squares[6] == squares[7] && squares[6] == squares[8]));\n}", "getEmptyTile() {\n const index = this.tiles.indexOf(0);\n const pos = this.getTilePosition(index);\n return {x: pos.x, y: pos.y, index: index};\n }", "getNeighborCoords({ x, y }) {\n return NEIGHBOR_VECTORS.reduce((memo, [dx, dy]) => {\n const coord = { x: x + dx, y: y + dy };\n if (this.isValidCoord(coord)) {\n memo.push(coord);\n }\n return memo;\n }, []);\n }", "function emptyCells() { \n return originalBoard.filter(cell => typeof cell === 'number');\n}", "getAdjacentTiles(){\n const tiles = [\n [0, 1], [1, 0], [-1, 0], [0, -1], [1, 1], [-1, 1], [1, -1], [-1, -1]\n ] .map(([i, j]) => Tile.getTile({x: this.x + i, y: this.y + j}))\n .filter(tile => tile)\n\n return tiles;\n }", "function getEmptySpot(i,j)\n{\n var possible = getSurroundingCoords(i,j);\n var really_possible = new Array();\n\n // First filtering out all the impossible moves\n for(c=0; c<6; c++) {\n x = possible[c][0];\n y = possible[c][1];\n\n // Filtering out the illegal moves first\n if (x <0 || x >= board.width || y < 0 || y >= board.height) {\n continue;\n }\n\n // this field is already occupied\n if (board.field[y][x] > POLY_TYPE_EMPTY) {\n continue;\n }\n\n // We can't move into whitespace'\n if (board.field[y][x] == POLY_TYPE_WHITESPACE) {\n continue;\n }\n\n // If we can reach the edge in this turn, DO IT!\n var surround = getSurroundingCoords(x,y);\n for (c2=0; c2 < surround.length; c2++) {\n x2 = surround[c2][0];\n y2 = surround[c2][1];\n if (board.field[y2] == undefined || board.field[y2][x2] == undefined || board.field[y2][x2] == POLY_TYPE_WHITESPACE) {\n won = true;\n return possible[c];\n }\n }\n\n really_possible.push(possible[c]);\n\n // DEBUG: make all surrounding hex's red'\n// id = \"hex_\"+x+'_'+y;\n// SVGDocument.getElementById(id).setAttribute('fill', 'red');\n }\n\n // Choose one of the strategies and pick a coord\n if (really_possible.length >0) {\n return strategies[strategy_index](really_possible);\n }\n\n return false;\n}", "function coord(value) {\n\t return value\n\t .replace(trimSpace, \"\")\n\t .split(splitSpace)\n\t .map(coord1)\n\t .filter((coord) => {\n\t return coord.length >= 2;\n\t });\n\t}", "function emptyCells() {\n return origBoard.filter(cell => typeof cell === \"number\");\n}", "get unflaggedNeighbours() {\n return this.allNeighbours.filter((n) => !n.isDug && !n.hasFlag);\n }", "function collectNotAvailCoords(shipCoords, isShip) {\n shipCoords.forEach(function (i) {\n field.notAvail.push(orderFromCoords(i));\n });\n if (isShip) {\n shipCoords.forEach(function (i) {\n field.ships.push(orderFromCoords(i));\n });\n }\n}", "function initialCoords()\r\n{\r\n\t/*for(var i = 0; i !== 1;i++)\r\n\t{\r\n\t\tencounteredCoords[playerLocation].push(duplicatePlayerLocation(playerLocation), levelExitLocation);\r\n\t}*/\r\n}", "emptyCells() {\n let emptyCells = []\n for (let i = 0; i < DATA.boardCells.length; i++) {\n if (DATA.boardCells[i] !== DATA.ai && DATA.boardCells[i] !== DATA.human) emptyCells.push(i);\n }\n return emptyCells;\n }", "function findAcceptableIds(tilesets) {\n let accaptableTileIds = [-1]\n let startGid = 1\n for (var i = 0; i < tilesets.length; i++) {\n let tileProperties = tilesets[i].tileproperties || tilesets[i].tileProperties\n Object.keys(tileProperties).forEach((tileId) => {\n if (!tileProperties[tileId].obstalce) {\n accaptableTileIds.push(startGid + parseInt(tileId))\n }\n })\n }\n return accaptableTileIds\n}", "function emptySquares() {\n return origBoard.filter(s => typeof s == 'number');\n}", "function getEmptyCell() {\n for (let x = 1; x < 5; x += 1) {\n for (let y = 1; y < 5; y += 1) {\n if (!document.getElementsByClassName(`x${x}y${y}`).length) {\n return { x, y };\n }\n }\n }\n return false;\n}", "function emptySquares() {\r\n // to see with x o is not empty but with no. is empty\r\n return origBoard.filter(s => typeof s == 'number');\r\n}", "function EmptySpot(sudoko){\n for (let i = 0; i < 9; i++) {\n for (let j = 0; j < 9; j++) {\n if (sudoko[i][j] === 0)\n return [i,j];\n }\n }\n return [-1,-1];\n} // if the board is full of empty 0 then it will return [-1,-1] ", "isLost(posAux){\n if(this.position.column > this.grid.columns || this.position.column < 0 || this.position.row > this.grid.rows || this.position.row < 0){\n let coordinates = {row: this.position.row, column: this.position.column};\n if (!this.grid.scent.includes(JSON.stringify(coordinates))) {\n this.grid.scent.push(JSON.stringify(coordinates));\n this.lost = true;\n }\n this.position = posAux;\n }\n }", "findXCoordinate(xCoordinate) {\n /* find index of the columns number (absciss) : it loop on the freeGrid size, so, there is at most (size of the freeFrid) \n operations */\n let xCpt = 0;\n\n while (xCpt < this.freeGrid.length && xCoordinate !== this.freeGrid[xCpt][0]) {\n xCpt++;\n } \n\n if(xCpt === this.freeGrid.length) {\n return [];\n } else {\n return([xCpt]) ;\n }\n\n }", "function positionIsTaken(x_pos, y_pos) {\n var value = board[y_pos][x_pos];\n return value === 0 ? false : true;\n}", "generateRandomLocation(){\n let x = Math.floor(Math.random() * this.height + 1);\n let y = Math.floor(Math.random() * this.width + 1);\n if (this.mine[x][y] === 0) {\n return [x,y];\n } else {\n return this.generateRandomLocation();\n }\n }", "function validateCoord(x, y){\n x = Number(x);\n y = Number(y);\n let length = game.grid.length;\n return x >= 0 && x < length && y >= 0 && y < length;\n}", "function removeAllWaypoints() {\n if(!canvas_flag_active) {\n number_of_coordinates = 0;\n current_coordinate_list = [];\n canvas_flag_position = {x:undefined,y:undefined};\n var coordinates = document.querySelectorAll('#coordinates-list > div');\n coordinates.forEach((coordinate) => {\n document.querySelector('#coordinates-list').removeChild(coordinate);\n });\n }\n}", "get_3x3_area_position() {\n let positions = [];\n\n for (let i = -1; i <= 1; i++) {\n for (let j = -1; j <= 1; j++) {\n if (this.x + i < 0 || this.x + i >= this.number_of_squares_a_row){\n // Skip code\n }else if (this.y + j < 0 || this.y + j >= this.number_of_squares_a_column){\n // Skip code\n }else{\n positions.push(this.convert_2d_to_1d_position(this.x + i, this.y + j));\n }\n }\n }\n\n return positions;\n }", "coordAvailable() {\n return this.coords.length;\n }", "getCoordinates(isoCode) {\n const countryCoordinates = coordinates.filter(item => item.country === isoCode)[0];\n // When using filter we get an array, use [0] to grab the first (and only, hopefully) result\n\n // We still have 249 countries in this list but 289 on the full countriesDB :(\n if (countryCoordinates === undefined) {\n // Not the best fallback ever\n // A better option could be to sanitize the array of countries before\n // using it.\n // After the sanitize function there are 5 ghosts countries :S\n return [0, 0];\n }\n\n return [countryCoordinates.latitude, countryCoordinates.longitude];\n }", "function isGameOver(state) {\n var allPenguinPosns = game_state_functions_1.getAllPenguinPositionsForGameBoard(state);\n var board = game_state_selectors_1.GET_GameStateBoard(state);\n var allToPoints = [];\n for (var i = 0; i < allPenguinPosns.length; i++) {\n var reachablePoints = game_state_reachable_1.getReachable(board, allPenguinPosns[i]);\n allToPoints = __spreadArrays(allToPoints, reachablePoints);\n }\n return allToPoints.length === 0;\n}", "function generatePosition() {\n //return false if the board is full\n if (isFull() === true) {\n return false;\n }\n var randX, randY, time = 0;\n do {\n time++;\n randX = Math.floor(Math.random() * 4);\n randY = Math.floor(Math.random() * 4);\n } while (all_numbers[randX][randY] && (time < 20))\n // if it cannot find a valid position after 20 tries,\n // traverses the board for a valid one\n if (time == 20) {\n for (var i = 0; i < 4; i++) {\n for (var j = 0; j < 4; j++) {\n if (!all_numbers[i][j]) {\n randX = i;\n randY = j;\n return [randX, randY];\n }\n }\n }\n }\n return [randX, randY];\n}", "function checkHitOrMiss(x, y, isPlayersTurn)\r\n{\r\n var board = isPlayersTurn? board2 : board1 ;\r\n\r\n /* board[x][y] has -1 then there's nothing there. Its a miss*/\r\n // alert(x+\",\"+y+\"[\"+board[x][y]+\"]\");\r\n return (board[x][y] == -1)?false : true ;\r\n}", "function admissible(row, col, num, grid) {\r\n for (var i = 0; i < 9; i++) {\r\n\t\t\tif(i != col && grid[row][i] == num)\r\n\t\t\t\treturn 0;\r\n if(i != row && grid[i][col] == num)\r\n\t\t\t\treturn 0;\r\n\t\t\tvar r = Math.floor(row / 3) * 3 + Math.floor(i / 3);\r\n\t\t\tvar c = Math.floor(col / 3) * 3 + (i % 3); //sub-grid co-ordinates\r\n if(!(row == r && col == c) && grid[r][c] == num)\r\n return 0;\r\n }\r\n return 1;\r\n}", "selection_excluding(cells) {\n const selection = new Set(this.selection);\n for (const cell of cells) {\n selection.delete(cell);\n }\n return selection;\n }", "function emptySquares(){\n return originalBoard.filter(s => typeof s == 'number');\n}", "function isSafe(x, y, sol) {\n return (x >= 0 && x < grid_N && y >= 0 &&\n y < grid_N && sol[x][y] == -1);\n}", "function findEmptySquare(board){\r\n // board -> [Int, Int]\r\n for(var i= 0; i<9; i++){\r\n for(var j = 0; j<9; j++){\r\n if(board[i][j] == null){\r\n return [i,j]\r\n }\r\n }\r\n }\r\n}", "function isEmpty(x,y, grid)\n {\n if(math.subset(grid, math.index(x,y)) == 0) {\n return false;\n }\n else{\n return true;\n }\n }", "function getEmptyNeighbors() {\n\t\tvar id = empty;\n\t\tvar neighbors = [];\n\t\tif (id - 4 > 0) { // piece is not on the top row\n\t\t\tneighbors.push(-4);\n\t\t}\n\t\tif (id + 4 < 17) { // piece is not on the bottom row\n\t\t\tneighbors.push(4);\n\t\t}\n\t\tif ((id - 1) % 4 != 0) { // piece is not on the left column\n\t\t\tneighbors.push(-1);\n\t\t}\n\t\tif ((id + 1) % 4 != 1) { // piece is not on the right column\n\t\t\tneighbors.push(1);\n\t\t}\n\t\treturn neighbors;\n\t}", "function setInitialCoordinates(gridNum){\n let startCoordinates = []; \n switch(gridNum){\n case 1:\n startCoordinates = [0,0];\n break;\n case 2:\n startCoordinates = [0,3];\n break;\n case 3:\n startCoordinates = [0,6];\n break; \n case 4:\n startCoordinates = [3,0];\n break;\n case 5:\n startCoordinates = [3,3];\n break;\n case 6:\n startCoordinates = [3,6];\n break;\n case 7:\n startCoordinates = [6,0];\n break;\n case 8:\n startCoordinates = [6,3];\n break;\n case 9:\n startCoordinates = [6,6];\n break;\n default:\n console.log(\"Number should be between 1 and 9\");\n break;\n }\n return startCoordinates;\n}", "function findCurrentPiece() {\r\n currentPiece = [];\r\n currentTetromino.template.forEach(\r\n x => {\r\n if (! x.every(i => i === 0)) {\r\n currentPiece.push(x);\r\n }\r\n }\r\n );\r\n}", "calculateZeroPos() {\n for (let i = 0; i < this.num_rows; i++) {\n for (let j = 0; j < this.num_cols; j++) {\n if (this.board[i][j] === 0) return [i, j];\n }\n }\n }", "function arrayXYUnique(array) {\n var a = array.concat();\n for (var i = 0; i < a.length; ++i) {\n for (var j = i + 1; j < a.length; ++j) {\n if (Math.abs(a[i].x - a[j].x) < 0.01) {\n if (Math.abs(a[i].y - a[j].y) < 0.01) {\n a.splice(j--, 1);\n }\n }\n\n }\n }\n\n return a;\n }", "function getBestPosition () {\n\t\tvar position = board.indexOf(null);\n\n\t\t// Check for imminent win\n\t\tfor (var i = 0, len = winningSets.length; i < len; i++) {\n\t\t\tvar lineValues = winningSets[i].map(that.getPositionValue);\n\n\t\t\t// Line has 2 computer symbols and one open for the win\n\t\t\tif (_countOccurances(lineValues, 1) === 2 && _countOccurances(lineValues, null) === 1) {\n\t\t\t\tvar emptySpot = lineValues.indexOf(null);\n\n\t\t\t\treturn winningSets[i][emptySpot]; // Winning spot\n\t\t\t}\n\t\t}\n\n\t\t// Check for imminent loss\n\t\tfor (i = 0, len = winningSets.length; i < len; i++) {\n\t\t\tvar lineValues = winningSets[i].map(that.getPositionValue);\n\n\t\t\t// Line has 2 user symbols and one open for the win\n\t\t\tif (_countOccurances(lineValues, 0) === 2 && _countOccurances(lineValues, null) === 1) {\n\t\t\t\tvar emptySpot = lineValues.indexOf(null);\n\n\t\t\t\treturn winningSets[i][emptySpot]; // losing spot\n\t\t\t}\n\t\t}\n\n\t\t// if center is blank, mark it\n\t\tif (board[4] === null) {\n\t\t\treturn 4;\n\t\t}\n\n\t\t// Check where user can win in two sets\n\t\tvar openSpots = [];\n\t\tfor (i = 0, len = winningSets.length; i < len; i++) {\n\t\t\tvar lineValues = winningSets[i].map(that.getPositionValue);\n\n\t\t\tif (_countOccurances(lineValues, 0) === 1 && _countOccurances(lineValues, null) === 2) {\n\n\t\t\t\tif (lineValues[0] === null) {\n\t\t\t\t\topenSpots.push(winningSets[i][0]);\n\t\t\t\t}\n\n\t\t\t\tif (lineValues[1] === null) {\n\t\t\t\t\topenSpots.push(winningSets[i][1]);\n\t\t\t\t}\n\n\t\t\t\tif (lineValues[2] === null) {\n\t\t\t\t\topenSpots.push(winningSets[i][2]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Check to see two possible winning lines for user and block it\n\t\tvar last = null;\n\t\tfor (i = 0, len = openSpots.length; i < len; i++) {\n\t\t\tif (last === openSpots[i]) {\n\t\t\t\treturn openSpots[i];\n\t\t\t} else {\n\t\t\t\tlast = openSpots[i];\n\t\t\t}\n\t\t}\n\n\t\t// When user has marked opposing corners, mark an open edge\n\t\tif ((board[0] === 0 && board[8] === 0) || (board[2] === 0 && board[6] === 0)) {\n\t\t\tif (board[1] === null) {\n\t\t\t\treturn 1;\n\t\t\t} else if (board[3] === null) {\n\t\t\t\treturn 3;\n\t\t\t} else if (board[5] === null) {\n\t\t\t\treturn 5;\n\t\t\t} else if (board[7] === null) {\n\t\t\t\treturn 7;\n\t\t\t}\n\t\t}\n\n\t\t// When user has marked adjacent edges, mark shared corner\n\t\tif (board[1] === 0 && board[5] === 0 && board[2] === null) {\n\t\t\treturn 2;\n\t\t} else if (board[5] === 0 && board[7] === 0 && board[8] === null) {\n\t\t\treturn 8;\n\t\t} else if (board[7] === 0 && board[3] === 0 && board[6] === null) {\n\t\t\treturn 6;\n\t\t} else if (board[3] === 0 && board[1] === 0 && board[0] === null) {\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Check any line where computer has at least one marking and there are two open spots\n\t\topenSpots = [];\n\t\tfor (i = 0, len = winningSets.length; i < len; i++) {\n\t\t\tvar lineValues = winningSets[i].map(that.getPositionValue);\n\n\t\t\tif (_countOccurances(lineValues, 1) === 1 && _countOccurances(lineValues, null) === 2) {\n\n\t\t\t\tif (lineValues[0] === null) {\n\t\t\t\t\topenSpots.push(winningSets[i][0]);\n\t\t\t\t}\n\n\t\t\t\tif (lineValues[1] === null) {\n\t\t\t\t\topenSpots.push(winningSets[i][1]);\n\t\t\t\t}\n\n\t\t\t\tif (lineValues[2] === null) {\n\t\t\t\t\topenSpots.push(winningSets[i][2]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tlast = null;\n\t\tfor (i = 0, len = openSpots.length; i < len; i++) {\n\t\t\tif (last === openSpots[i]) {\n\t\t\t\treturn openSpots[i];\n\t\t\t} else {\n\t\t\t\tlast = openSpots[i];\n\t\t\t}\n\t\t}\n\n\t\t// Position doesn't matter at this point, return any open position\n\t\treturn position;\n\t}", "function emptySquares() {\r\n return Board.filter(s => typeof s == 'number');\r\n}", "function revive_coords_fallback()\r\n{\r\n r = Array();\r\n \r\n i = 0;\r\n r[i++] = Array(43,47);\r\n r[i++] = Array(45,30);\r\n r[i++] = Array(35,66);\r\n r[i++] = Array(11,22);\r\n r[i++] = Array(73,92);\r\n r[i++] = Array(25,21);\r\n r[i++] = Array(92, 4);\r\n r[i++] = Array(98, 1);\r\n r[i++] = Array( 4,32);\r\n r[i++] = Array( 0,35);\r\n r[i++] = Array(27,35);\r\n r[i++] = Array(32,20);\r\n r[i++] = Array(78,58);\r\n r[i++] = Array(70,53);\r\n r[i++] = Array(16,11);\r\n r[i++] = Array(17,15);\r\n r[i++] = Array(47,87);\r\n r[i++] = Array(22,53);\r\n r[i++] = Array(15,43);\r\n r[i++] = Array(14,46);\r\n r[i++] = Array(24,65);\r\n r[i++] = Array( 3,25);\r\n r[i++] = Array(96,74);\r\n r[i++] = Array(94,14);\r\n r[i++] = Array(71,45);\r\n r[i++] = Array(66,43);\r\n r[i++] = Array(24, 5);\r\n r[i++] = Array(88, 4);\r\n r[i++] = Array(82, 6);\r\n r[i++] = Array(56,34);\r\n r[i++] = Array(68,55);\r\n r[i++] = Array(61,51);\r\n r[i++] = Array(55,27);\r\n r[i++] = Array(26,70);\r\n r[i++] = Array(53,57);\r\n r[i++] = Array(94,47);\r\n r[i++] = Array(65,68);\r\n r[i++] = Array(41,12);\r\n r[i++] = Array(45,17);\r\n \r\n return r;\r\n}", "function random_nums() {\n\t\t\tvar max = all_coords.length + 1;\n\t\t\treturn Math.floor(Math.random() * max) \n\t\t}", "function checkSpace()\n\t\t{\n\n\t\t\tvar nb =random(3) ;\n\t\t\tvar nb2 = random(3);\n\t\t\tvar tileNew = $('body').find('[data-x='+nb+'][data-y='+nb2+']');\n\t\t\tif(tileNew.length === 0)\n\t\t\t{\n\t\t\t\treturn {x:nb , y: nb2};\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcheckSpace();\n\t\t\t}\n\t\t}", "function checkCoordinates (startCoordinate, direction, length) {\n let noOverlap = true\n for (let i = 0; i < length; i++) {\n let newCoordinate = [startCoordinate[0] + i * direction[0], startCoordinate[1] + i * direction[1]]\n this.reservedCoordinates.forEach(coordinate => {\n let reservedX = coordinate[0]\n let reservedY = coordinate[1]\n let newX = newCoordinate[0]\n let newY = newCoordinate[1]\n if (reservedX === newX && reservedY === newY) {\n noOverlap = false\n } \n })\n }\n return noOverlap\n}", "static computeClippedPointIndices(clippedPoints, originalPoints) {\n const isClipped = (p) => originalPoints.find(q => q.equals(p)) === undefined;\n return new Set(clippedPoints.map((p, i) => (isClipped(p) ? i : -1)).filter(i => i !== -1));\n }", "function emptyIndexies(board) {\n return board.filter(s => s != \"O\" && s != \"X\");\n }", "function locateBlankSpot (board) {\n for (var t = 0; t < 3; t++) {\n if (baseBoard[t].indexOf(null) !== -1) {\n return [t, baseBoard[t].indexOf(null)];\n }\n }\n return;\n}", "function anyUnassigned(grid, rc) //why do I need row and col?\r\n{\r\n for (var c = 0; c < grid.length; c++){\r\n for (var r = 0; r < grid.length; r++){\r\n if (grid[r][c] == '_') {\r\n rc[0] = r;\r\n rc[1] = c;\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n}", "function validMoves() {\n return board.filter(function(spot) {\n return spot != \"O\" && spot != \"X\";\n });\n}", "function antiAliase(stations) {\n var m = refPts;\n stations[m].lat = stations[m].lat * cur +\n stations[m-1].lat * oneOff + stations[m+1].lat * oneOff +\n stations[m-2].lat * twoOff + stations[m+2].lat * twoOff;\n\n stations[m].lng = stations[m].lng * cur +\n stations[m-1].lng * oneOff + stations[m+1].lng * oneOff +\n stations[m-2].lng * twoOff + stations[m+2].lng * twoOff;\n\n return stations[m];\n }", "function getOppositeCorner(cx, cy, rx, ry) {\n var\n x = cx + (cx - rx),\n y = cy + (cy - ry);\n return new google.maps.LatLng(x,y);\n }", "function stray(numbers) {\n if(numbers[0] !== numbers[1] && numbers[2] == numbers[0]){\n return numbers[1]\n } else if (numbers[0] !== numbers[1] && numbers[2] == numbers[1]){\n return numbers[0]\n } else {\n return numbers.find(function(element){\n return element !== numbers[0];\n });\n }\n}", "function getCoords() {\n return {\n x: 10,\n y: 22\n };\n}", "function getNewPositionForFood(){\n // get all the xs and ys from snake body\n let xArr = yArr = [], xy;\n $.each(snake, function(index, value){\n if($.inArray(value.x, xArr) != -1){\n xArr.push(value.x);\n }\n if($.inArray(value.y, yArr) == -1) {\n yArr.push(value.y);\n }\n });\n xy = getEmptyXY(xArr, yArr);\n return xy;\n }", "function resetCoordinates() {\n console.log('resetCoordinates');\n coordinates = [];\n }", "function emptyIndexies(board) {\n return board.filter(s => s != \"O\" && s != \"X\");\n }", "function get_living_cell_coordinates() {\n\tvar count = 0;\n\tvar cells = new Array();\n\tfor( var i = 1; i <= game_fields; i++ ) {\t\n\t\tif( document.getElementById( \"game_td_\"+ i ).className == \"fields_game_checked\" ) {\n\t\t\tcells[count++] = i;\n\t\t}\n\n\t}\n\treturn cells;\n\t\n}", "function randomPos() {\n var randomFourNumbers = [];\n // algorithm to create random array of element containing four exclusive numbers.\n while (randomFourNumbers.length < 4) {\n var tempNum = Math.round(Math.random() * 3);\n // if tempNum is not inside the randomFourNumbers array then push it inside randomFourNumbers[]\n if (!(randomFourNumbers.includes(tempNum))) {\n randomFourNumbers.push(tempNum);\n };\n };\n return randomFourNumbers;\n}", "function notInBox(props) {\n let solution = props.solution.slice();\n for (let y = 0; y < 3; y++) {\n for (let x = 0; x < 3; x++) {\n if (solution[props.row + y][props.col + x] === props.num) {\n return false;\n }\n }\n }\n return true;\n}", "function getMapsBesides(map) {\r\n return $.grep(getMapArray(), function(value) { return value != map });\r\n}", "function aroundNums(i, j) {\n let tempArr = [];\n tempArr.concat(rowNums(i), colNums(j), sectNums(i, j));\n let aroundSet = new Set(tempArr);\n return aroundSet;\n }", "function GetCordinates() {\r\n this.x1co = Math.round(Math.random() * 1)\r\n this.y1co = Math.round(Math.random() * innerWidth)\r\n this.x2co = Math.round(Math.random() * 600)\r\n if ((Math.abs(this.x1co - this.x2co)) < 50) {\r\n this.x2co += 300\r\n }\r\n }", "function getSurroundingCoords(i,j)\n{\n var possible = new Array();\n i = parseInt(i);\n j = parseInt(j);\n if (j % 2 == 0) {\n possible = [[i-1,j],[i-1,j-1],[i,j-1],[i+1,j],[i,j+1],[i-1,j+1]];\n } else {\n possible=[[i-1,j],[i,j-1],[i+1,j-1],[i+1,j],[i+1,j+1],[i,j+1]];\n }\n\n return possible;\n}", "function nicePlace(x, y){\n var j=0;\n //console.log(x+\" \"+y);\n while(j<robots.length && !(x == robots[j].X && y == robots[j].Y)){\n j++; \n }\n return j<robots.length;\n}", "getRandomTileCoordinate() {\n // get random tile coords\n const x = Math.round(Math.random() * this.xTiles);\n const y = Math.round(Math.random() * this.yTiles);\n\n return { x, y }\n }", "function checkAdjacentCells(x,y){\n for (let i of directions){\n if( x+i.xcor <=9 && x+i.xcor >=0 && y+i.ycor <=9 && y+i.ycor >= 0){\n if (myArray[x+i.xcor][y+i.ycor] === 0 || myArray[x+i.xcor][y+i.ycor] === 2){\n return [[x+i.xcor],[y+i.ycor]]\n }\n } \n }\n return false;\n}", "function eliminateSingleTiles()\r\n{\r\n for(var y = 3; y < WORLD_SIZE_MAX-3; ++y)\r\n {\r\n for(var x = 3; x < WORLD_SIZE_MAX-3; ++x)\r\n {\r\n if(worldMapArray[y][x].isStatic == false)\r\n {\r\n singleTileCoastEliminationCheck(x, y, 2);\r\n\r\n if(worldMapArray[y][x].biomeType == BIOME_DESERT)\r\n {\r\n singleTileDesertEliminationCheck(x, y, 2);\r\n }\r\n }\r\n }\r\n }\r\n}", "getOppositeHole (num) {\n switch (num) {\n case 0:\n return 12;\n case 1:\n return 11;\n case 2:\n return 10;\n case 3:\n return 9;\n case 4:\n return 8;\n case 5:\n return 7;\n case 7:\n return 5;\n case 8:\n return 4;\n case 9:\n return 3;\n case 10:\n return 2;\n case 11:\n return 1;\n case 12:\n return 0;\n }\n }", "function mineLocation(field) {\n for (let i = 0; i < field.length; i++) {\n for (let j = 0; j < field[i].length; j++) {\n if (field[i][j] === 1) {\n return [i, j];\n }\n }\n }\n}", "function getCoords () {\n return {\n x: 10,\n y: 22\n }\n }" ]
[ "0.65544957", "0.60162234", "0.59923327", "0.59546393", "0.5875627", "0.585743", "0.58175874", "0.57606083", "0.57232463", "0.5709606", "0.5709047", "0.5688058", "0.56572926", "0.5641257", "0.56150156", "0.56028277", "0.55878955", "0.5579842", "0.5579842", "0.5579842", "0.5572273", "0.55490077", "0.553503", "0.55319124", "0.55291146", "0.5525219", "0.551002", "0.54764444", "0.546472", "0.54620737", "0.5461023", "0.5460432", "0.5455565", "0.54507655", "0.5442898", "0.5431264", "0.5419783", "0.5400883", "0.53995514", "0.539777", "0.53912413", "0.53869325", "0.53833354", "0.5362355", "0.5359911", "0.53592354", "0.53585845", "0.5352389", "0.53396505", "0.53326756", "0.5330625", "0.5324408", "0.5321619", "0.53142506", "0.5310665", "0.530667", "0.53057647", "0.5277651", "0.5266304", "0.52647746", "0.5262056", "0.52554554", "0.52504176", "0.52388614", "0.5233128", "0.52256197", "0.5225542", "0.52201605", "0.5219289", "0.5214838", "0.5213105", "0.5211665", "0.5188219", "0.51764196", "0.5173392", "0.51718456", "0.51653826", "0.51583695", "0.5155678", "0.51460874", "0.5145795", "0.5145551", "0.51453537", "0.5142677", "0.5139148", "0.5128972", "0.5114021", "0.5113725", "0.5113502", "0.51062095", "0.50994694", "0.50935704", "0.5091424", "0.5090674", "0.50887334", "0.50857383", "0.5083418", "0.5078802", "0.50747675", "0.50725085" ]
0.56699514
12