<commit_before>//$(document).ready(function(){
		/*$('#txtidUsrWS').val(getParameterByName('exml2344'));
		$("#txttokenWS").val(getParameterByName('exml2342'));
		$("#txtNomusuarioWS").val(getParameterByName ("exml2345"));
		$("#txtpwdWS").val(getParameterByName("exml2347"));
		$("#txtcompniareWS").val(getParameterByName("exml2346"));*/
		
		$("#identificacion-ine").change(function(){
			//al recibir una imagen
			var divResultado = document.getElementById('divResultado');
			divResultado.innerHTML = '';
			
			
			processCompress(this);
		});
	
	$("#identificacion-ineanver").change(function(){
		//al recibir una imagen
		var divResultado = document.getElementById('divResultado');
		divResultado.innerHTML = '';
		
		
		processCompressanver(this);
	});
	
	$("#inputextra").change(function(){
		processCompressextra(this);
	});
	
	$("#inputextra2").change(function(){
		processCompressextra2(this);
	});
	
	$("#inputextra3").change(function(){
		processCompressextra3(this);
	});
	
	$("#inputextra4").change(function(){
		processCompressextra4(this);
	});
	
	$("#inputextra5").change(function(){
		processCompressextra5(this);
	});
	
	
		
//});


function processCompress(input) {
	$('#cargandoafiliadiv').show();

	var output_format = "jpg";
	
	
    if (input.files && input.files[0]) {
		console.log('procesando imagen...');
		var holder = document.getElementById('holder');
		holder.className = '';
        //e.preventDefault();
        
        var file = input.files[0];
		console.log('antes del proceso...');
		console.log("Filename: " + file.name);
        console.log("Filesize: " + (parseInt(file.size) / 1024) + " Kb");
        console.log("Type: " + file.type);
		console.log('----------------------------');
		
		
		console.log('recuperando binario...');
        reader = new FileReader();
        reader.onload = function(event) {
            var i = document.getElementById("source_image");
           	 	i.src = event.target.result;
				//console.log('imagen sorce...'+i.src);
           	 	i.onload = function(){
           	 		image_width=$(i).width(),
	                image_height=$(i).height();
	
	                if(image_width > image_height){
	                	i.style.width="210px";
	                }else{
	                	i.style.height="105px";
	                }
	                i.style.display = "none";

					console.log('imagen cargada...');
					//fire click event to process image STF
					//btn click------------------------------------------------------
						var source_image = document.getElementById('source_image');
						var result_image = document.getElementById('result_image');
						var result_imagefin = document.getElementById('result_imagefin');
						var result_imagefinmod = document.getElementById('result_imagefinmod');
						if (source_image.src == "") {
							alert("You must load an image first!");
							return false;
						}

						var quality = 35;
						console.log("Quality >>" + quality);

						var time_start = new Date().getTime();
						console.log('comprimiendo imagen...');
						result_image.src = jic.compress(this,quality,output_format).src;
						
						
						
						//$('#titulomodalfinINEFrente').text(result_imagefinmod.name);
						
						
						
						
								
						result_image.onload = function(){
							if($(result_image)[0].src != "https://stefaninimx.com/afiliamaas/images/shade.jpg")
							{
								var image_width=$(result_image).width(),
								image_height=$(result_image).height();
									//enviar esta imagen
							   result_image.style.display = "block";
							   result_image.style.width="99%";
							   result_image.style.marginTop ="5px";
							   //result_image.style.position="absolute";
							   result_image.style.left="30px";
							   //--------cal ws ocr-----------------
							   console.log(JSON.stringify({ "strImg64":this.src.replace("data:image/jpeg;base64,", ""),"llave":{"idUsuario":$("#txtidUsrWS").val(),"Token":$("#txttokenWS").val()}}),);
							   $.ajax({  
									type: "POST",  
									url: 'https://stefaninimx.com/mx.com.stefanini.service.api.rest/Service1.svc/loadimagesoap',
									data: JSON.stringify({ "strImg64":this.src.replace("data:image/jpeg;base64,", ""),"llave":{"idUsuario":$("#txtidUsrWS").val(),"Token":$("#txttokenWS").val()}}),
									contentType: "application/json; charset=utf-8",
									dataType: "json",						
									success: function (data) {  
										if(data.Token =="INVALID"){
											swal({
												  title: '<i>Sessión cerrada por inactividad</i>',
												  showCloseButton: true,
												  confirmButtonText:
													'<i class="glyphicon glyphicon-ok"></i>',
												  
												}).then(function () {
													  location.href=("Index.html");
													});
											//location.href=("Index.html");
											$("#txttokenWS").val(data.solicitudes[0].Token
										}
										else
										{
										   console.log('======================');
										   console.log('Resultado OCR');
										   console.log('======================');
										   console.log(data);
										   console.log('Nombre...'+data.Nombre);
										   console.log('Paterno...'+data.Paterno);
										   console.log('Materno...'+data.Materno);
										   console.log('calle...'+data.calle);
										   console.log('codigoPostal...'+data.codigoPostal);
										   console.log('colonia...'+data.colonia);
										   console.log('fechaDeNacimiento...'+data.fechaDeNacimiento);
										   console.log('fechaDeNacimientoANIO...'+data.fechaDeNacimientoANIO);
										   console.log('fechaDeNacimientoDIA...'+data.fechaDeNacimientoDIA);
										   console.log('fechaDeNacimientoMES...'+data.fechaDeNacimientoMES);
										   console.log('numeroExt...'+data.numeroExt);
										   console.log('sexo...'+data.sexo);
										   $("#txttokenWS").val(data.Token);
										   $('#cargandoafiliadiv').hide();

<commit_msg>token<commit_after>//$(document).ready(function(){
		/*$('#txtidUsrWS').val(getParameterByName('exml2344'));
		$("#txttokenWS").val(getParameterByName('exml2342'));
		$("#txtNomusuarioWS").val(getParameterByName ("exml2345"));
		$("#txtpwdWS").val(getParameterByName("exml2347"));
		$("#txtcompniareWS").val(getParameterByName("exml2346"));*/
		
		$("#identificacion-ine").change(function(){
			//al recibir una imagen
			var divResultado = document.getElementById('divResultado');
			divResultado.innerHTML = '';
			
			
			processCompress(this);
		});
	
	$("#identificacion-ineanver").change(function(){
		//al recibir una imagen
		var divResultado = document.getElementById('divResultado');
		divResultado.innerHTML = '';
		
		
		processCompressanver(this);
	});
	
	$("#inputextra").change(function(){
		processCompressextra(this);
	});
	
	$("#inputextra2").change(function(){
		processCompressextra2(this);
	});
	
	$("#inputextra3").change(function(){
		processCompressextra3(this);
	});
	
	$("#inputextra4").change(function(){
		processCompressextra4(this);
	});
	
	$("#inputextra5").change(function(){
		processCompressextra5(this);
	});
	
	
		
//});


function processCompress(input) {
	$('#cargandoafiliadiv').show();

	var output_format = "jpg";
	
	
    if (input.files && input.files[0]) {
		console.log('procesando imagen...');
		var holder = document.getElementById('holder');
		holder.className = '';
        //e.preventDefault();
        
        var file = input.files[0];
		console.log('antes del proceso...');
		console.log("Filename: " + file.name);
        console.log("Filesize: " + (parseInt(file.size) / 1024) + " Kb");
        console.log("Type: " + file.type);
		console.log('----------------------------');
		
		
		console.log('recuperando binario...');
        reader = new FileReader();
        reader.onload = function(event) {
            var i = document.getElementById("source_image");
           	 	i.src = event.target.result;
				//console.log('imagen sorce...'+i.src);
           	 	i.onload = function(){
           	 		image_width=$(i).width(),
	                image_height=$(i).height();
	
	                if(image_width > image_height){
	                	i.style.width="210px";
	                }else{
	                	i.style.height="105px";
	                }
	                i.style.display = "none";

					console.log('imagen cargada...');
					//fire click event to process image STF
					//btn click------------------------------------------------------
						var source_image = document.getElementById('source_image');
						var result_image = document.getElementById('result_image');
						var result_imagefin = document.getElementById('result_imagefin');
						var result_imagefinmod = document.getElementById('result_imagefinmod');
						if (source_image.src == "") {
							alert("You must load an image first!");
							return false;
						}

						var quality = 35;
						console.log("Quality >>" + quality);

						var time_start = new Date().getTime();
						console.log('comprimiendo imagen...');
						result_image.src = jic.compress(this,quality,output_format).src;
						
						
						
						//$('#titulomodalfinINEFrente').text(result_imagefinmod.name);
						
						
						
						
								
						result_image.onload = function(){
							if($(result_image)[0].src != "https://stefaninimx.com/afiliamaas/images/shade.jpg")
							{
								var image_width=$(result_image).width(),
								image_height=$(result_image).height();
									//enviar esta imagen
							   result_image.style.display = "block";
							   result_image.style.width="99%";
							   result_image.style.marginTop ="5px";
							   //result_image.style.position="absolute";
							   result_image.style.left="30px";
							   //--------cal ws ocr-----------------
							   console.log(JSON.stringify({ "strImg64":this.src.replace("data:image/jpeg;base64,", ""),"llave":{"idUsuario":$("#txtidUsrWS").val(),"Token":$("#txttokenWS").val()}}),);
							   $.ajax({  
									type: "POST",  
									url: 'https://stefaninimx.com/mx.com.stefanini.service.api.rest/Service1.svc/loadimagesoap',
									data: JSON.stringify({ "strImg64":this.src.replace("data:image/jpeg;base64,", ""),"llave":{"idUsuario":$("#txtidUsrWS").val(),"Token":$("#txttokenWS").val()}}),
									contentType: "application/json; charset=utf-8",
									dataType: "json",						
									success: function (data) {  
										if(data.Token =="INVALID"){
											swal({
												  title: '<i>Sessión cerrada por inactividad</i>',
												  showCloseButton: true,
												  confirmButtonText:
													'<i class="glyphicon glyphicon-ok"></i>',
												  
												}).then(function () {
													  location.href=("Index.html");
													});
											//location.href=("Index.html");
											$("#txttokenWS").val(data.solicitudes[0].Token);
										}
										else
										{
										   console.log('======================');
										   console.log('Resultado OCR');
										   console.log('======================');
										   console.log(data);
										   console.log('Nombre...'+data.Nombre);
										   console.log('Paterno...'+data.Paterno);
										   console.log('Materno...'+data.Materno);
										   console.log('calle...'+data.calle);
										   console.log('codigoPostal...'+data.codigoPostal);
										   console.log('colonia...'+data.colonia);
										   console.log('fechaDeNacimiento...'+data.fechaDeNacimiento);
										   console.log('fechaDeNacimientoANIO...'+data.fechaDeNacimientoANIO);
										   console.log('fechaDeNacimientoDIA...'+data.fechaDeNacimientoDIA);
										   console.log('fechaDeNacimientoMES...'+data.fechaDeNacimientoMES);
										   console.log('numeroExt...'+data.numeroExt);
										   console.log('sexo...'+data.sexo);
										   $("#txttokenWS").val(data.Token);
										   $('#cargandoafiliadiv').hide();


{'fraction_non_alphanumeric': 0.1985170205594877, 'fraction_numerical': 0.009942703067071115, 'mean_word_length': 2.3632757155001416, 'pattern_counts': {'":': 16, '<': 11, '<?xml version=': 0, '>': 17, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 10}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3452690', 'n_tokens_mistral': 5000, 'n_tokens_neox': 3606, 'n_words': 436}