-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdevbrary.min.js
More file actions
1 lines (1 loc) · 21.5 KB
/
devbrary.min.js
File metadata and controls
1 lines (1 loc) · 21.5 KB
1
function dev_test_echo(e,t=!1,r=":"){t?console.log(`${e} ${r} ${t}`):console.log(e)}function dev_test_var_dom_dump(e){let t=dev_is_string(e)?e:null;dev_dom_existe_elemento(e)?(echo("Objeto: "),echo($(t)),echo("Id : "+$(t).attr("id")),dev_str_esta_vacio($(t).prop("name"))||echo("Name : "+$(t).prop("name")),dev_str_esta_vacio($(t).val())||echo("Value: "+$(t).val()),dev_str_esta_vacio($(t).text())||echo("Text : "+dev_str_trim($(t).text())),dev_str_esta_vacio($(t).attr("css"))||echo("Css : "+$(t).attr("css")),dev_str_esta_vacio($(t).attr("class"))||echo("Class: "+$(t).attr("class")),dev_str_esta_vacio($(t).attr("style"))||echo("Style: "+$(t).attr("class"))):echo('El elemento "'+t+'" no existe en el DOM.')}function dev_test_contador_texto_para_pruebas(e="Prueba",t=!1){void 0!==dev_test_contador_texto_para_pruebas.counter&&1!=t||(dev_test_contador_texto_para_pruebas.counter=0),dev_test_contador_texto_para_pruebas.counter++,echo(e+": "+dev_test_contador_texto_para_pruebas.counter)}function dev_test_contador_automatico(e=!1){return void 0!==dev_test_contador_automatico.counter&&0!==e||(dev_test_contador_automatico.counter=0),dev_test_contador_automatico.counter++,dev_test_contador_automatico.counter}function dev_test_es_tipo_de_dato(e,t){return dev_test_var_dump(e,!1,!0)==t}function dev_test_var_dump(e,t=!0,r=!1){let _=typeof e,n=e;switch(_){case"number":if(_=Number.isSafeInteger(n)?"int":"float",t&&echo(_+"("+n+")"),r)return _;break;case"string":if(t&&echo(_+"("+n.length+') "'+n+'"'),r)return"string";break;case"boolean":if(t&&echo(_+' "'+n+'"'),r)return"boolean";break;case"undefined":if(t&&echo("La variable no está definida. (undefined)"),r)return"undefined";break;case"object":if(Array.isArray(n)){if(_="array",t&&echo(`${_} (${n.length})\n${dev_test_print_array(n,null,!0,!0,!0)}`),r)return"array"}else if(null==n){if(t&&echo("NULL"),r)return"null"}else if(dev_dom_existe_elemento($(e).attr("id")))dev_test_var_dom_dump($(e).attr("id"));else if(null!=e&&e.constructor==Object){if(t&&echo("Objeto de tipo JSON"),t&&echo(e),r)return"json"}else if(dev_test_objeto_incluye_propiedad(e,["source","lastIndex","exec","test"])){if(t&&echo("Expresión regular RegExp"),t&&echo(e),r)return"regexp"}else if("function"==typeof $(e).html&&$(e).html()){if(t&&echo("Objeto DOM"),t&&echo(e),r)return"dom"}else if(t&&echo("Objeto no reconocido"),r)return"Objeto no reconocido";break;case"boolean":if(t&&echo(_+' "'+n+'"'),r)return"boolean";break;case"undefined":if(t&&echo("La variable no está definida. (undefined)"),r)return"undefined"}}function dev_test_tipo_dato(e){let t=typeof e,r=e;switch(t){case"number":return t=Number.isSafeInteger(r)?"int":"float";case"string":return"string";case"object":return Array.isArray(r)?"array":null==r?"null":dev_dom_existe_elemento($(e).attr("id"))?"dom":null!=e&&e.constructor==Object?"json":"Objeto no reconocido";case"boolean":return"boolean";case"undefined":return"undefined"}}function dev_test_depurar(e=!1,t=!1){e&&dev_test_var_dump(t)}function dev_test_obj_to_bool(e){return!!e}function dev_test_print_array(e,t=0,r=!1,_=!1,n=!1){let o=0,a="",i="\t".repeat(t),s=r?`${i}\tarray (${e.length})\n`:"";for(let d of e){if(dev_is_array(d))a+=`${i}${o} :\n${s}${dev_test_print_array(d,t+1,r,_,n)}`;else{a+=`${i}${o} : ${n?dev_test_tipo_dato(d)+" ":""}${d}\n`}o++}if(0!=t||_)return a;echo(a)}function dev_test_propiedades_objeto(e){let t,r=[];for(t=e;null!==t;t=Object.getPrototypeOf(t))r=r.concat(Object.getOwnPropertyNames(t));return r}function dev_test_objeto_incluye_propiedad(e,t){return dev_arr_is_in_array(dev_test_propiedades_objeto(e),t)}function dev_str_quitar_espacios_blancos(e){return dev_is_string(e)?e.replace(/\s/g,""):""}function dev_str_sin_caracteres_especiales(e,t=!0){if(dev_is_string(e)){let r=["á","é","í","ó","ú","ñ"],_=["a","e","i","o","u","ni"],n=["?",'"',"'"];e=(e=dev_str_quitar_acentos(e)).toString().toLowerCase();for(let t=0;t<r.length;t++)e=e.replace(dev_str_reg_crear_expresion(r[t]),_[t]);for(let t=0;t<n.length;t++)e=e.replace(n[t],"_");e=e.replace(/(\s+|\-+|\_\_)+/g,"_"),t&&(e=dev_str_reemplazar_expresion_regular(e,"\\W",""))}return e}function dev_str_quitar_espacios_extra(e){return dev_is_string(e,1)?e=(e=(e=dev_str_trim(e)).replace(/\s\s+/g," ")).replace(/\s\s/g,""):""}function dev_str_conseguir_numero_string(e,t=!1){if(dev_is_numero(e))return e;if(dev_is_string(e)){let r=e.match(/-?\d+/g);return r=Array.isArray(r)&&!t?r.join(""):r}return!1}function dev_str_separador_unidad_mil(e,t=","){e=e.toString();let r=dev_str_incluye_reg(e,"[.,]")?e.replace(/\d+[\.,]/gi,""):0,_=e.replace(/[^0-9]/gi,""),n=_.length,o=1,a="";for(i=1;i<=n;i++){o>3&&(o=1,a="."+a);i;a=_.substring(n-i,n-(i-1))+a,o++}return 0==r?a:a+t+r}function dev_str_esta_vacio(e){return!(null!=(e=dev_str_convertir_a_sting(e))&&e.length>0&&""!==e)}function dev_str_reemplazar_expresion_regular(e,t,r){if(t=dev_str_reg_corregir_expresion(t),dev_is_string(e)&&dev_str_reg_incluye(e,t)){let _=dev_str_reg_crear_expresion(t);return e.replace(_,r)}return e}function dev_str_convertir_a_sting(e){if(!dev_test_es_tipo_de_dato(e,"string"))switch(dev_test_tipo_dato(e)){case"int":case"boolean":case"float":e=String(e);break;case"null":case"undefined":default:e=""}return e}function dev_str_incluye(e,t){return dev_is_string(e)?e.includes(t):""}function dev_str_reg_incluye(e,t){let r=dev_str_reg_crear_expresion(t);return!!dev_is_string(e)&&r.test(e)}function dev_str_reg_corregir_expresion(e){return dev_str_inicia_con(e,"/")&&dev_str_termina_con(e,"/")?e.substring(1,e.length-1):e}function dev_str_reg_crear_expresion(e,t="g"){let r="";if(dev_test_es_tipo_de_dato(e,"regexp"))r=""!==e.flags?e:new RegExp(e.source,t);else if(dev_str_inicia_con(e,"/")&&dev_str_reg_incluye(e,/\/[gim]?$/g)){let _=dev_str_reg_conseguir(e,/\/[gim]?$/g);t=dev_is_string(dev_str_reemplazar(_,"/",""),1)?dev_str_reemplazar(_,"/",""):t,e=dev_str_reemplazar(e,[/^\//,/\/[gim]?$/],""),r=new RegExp(e,t)}else r=new RegExp(e,t);return r}function dev_str_reg_conseguir(e,t){return!!dev_str_reg_incluye(e,t=dev_str_reg_crear_expresion(t))&&((e=e.match(t)).length>1?e:e[0])}function dev_str_primera_letra_mayuscula(e){return e.charAt(0).toUpperCase()+e.slice(1).toLocaleLowerCase()}function dev_str_contar_caracteres(e){return dev_is_string(e)?e.length:0}function dev_str_inicia_con(e,t){return!!dev_is_string(e)&&e.startsWith(t)}function dev_str_termina_con(e,t){return!!dev_is_string(e)&&e.endsWith(t)}function dev_str_to_lower(e){return!!dev_is_string(e,1)&&e.toLocaleLowerCase()}function dev_str_to_upper(e){return!!dev_is_string(e,1)&&e.toUpperCase()}function dev_str_to_capitalize(e){return e.toLowerCase().replace(/\b./g,function(e){return e.toUpperCase()})}function dev_str_capitalizar(e){return dev_str_to_capitalize(e)}function dev_str_conseguir_expresion_regular(e,t){return dev_str_reg_conseguir(e,t)}function dev_str_acortar_texto(e,t){return dev_is_string(e,1)?dev_is_string(e,t)?dev_str_substring(e,0,t)+"...":e:""}function dev_str_substring(e,t,r){return!!(dev_is_string(e,1)&&dev_is_numero(t)&&dev_is_numero(r))&&(r<0?e.substring(t,e.length+r):e.substring(t,r))}function dev_str_trim(e,t=!1,r=!1){return dev_is_string(e)&&(e=!t&&!r||t&&r?e.trim():t?e.trimLeft():e.trimRight()),e}function dev_str_replace(e,t,r){if(dev_is_string(e)&&(dev_is_string(t)||dev_is_array(t)||dev_is_regexp(t))&&(dev_is_string(r)||dev_is_array(r))){if(dev_is_array(t))for(let _=0,n=dev_arr_count(t);_<n;_++){let n=dev_is_array(r)?r[_]:r,o=dev_is_regexp(t[_])&&"g"!==t[_].flags?dev_str_reg_crear_expresion(t[_].source):t[_];e=e.replaceAll(o,n)}else t=dev_is_regexp(t)&&"g"!==t.flags?dev_str_reg_crear_expresion(t.source):t,e=e.replaceAll(t,r);return e}return!1}function dev_str_reemplazar(e,t,r){return dev_str_replace(e,t,r)}function dev_str_quitar_acentos(e){return dev_is_string(e)?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function dev_form_email(e){return/\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+/.test(e)&&dev_str_quitar_espacios_blancos(e)==e}function dev_form_url(e,t=!1){let r=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t?r.test(e)&&dev_url_pagina_existe(e)&&dev_str_quitar_espacios_blancos(e)===e:r.test(e)&&dev_str_quitar_espacios_blancos(e)===e}function dev_form_text_area(e,t=0){return dev_is_string(dev_dom_obj_value(e),t)}function dev_form_radio_box(e){return dev_test_obj_to_bool($(dev_dom_objeto(e)).is(":checked"))}function dev_form_select(e){return dev_test_obj_to_bool(dev_dom_obj_value(e))}function dev_form_input_string(e,t=0){return dev_is_string(dev_dom_obj_value(e),t)}function dev_form_input_numero(e){return dev_is_numero(dev_dom_obj_value(e))}function dev_is_string(e,t=0){return"string"==typeof e&&e.length>=t}function dev_is_numero(e){return dev_test_es_tipo_de_dato(e,"int")||dev_test_es_tipo_de_dato(e,"float")}function dev_is_bool(e){return dev_test_es_tipo_de_dato(e,"bool")}function dev_is_undefined(e){return dev_test_es_tipo_de_dato(e,"undefined")}function dev_is_array(e,t=0){return"array"===dev_test_tipo_dato(e)&&e.length>=t}function dev_is_regexp(e){return dev_test_es_tipo_de_dato(e,"regexp")}function dev_is_json(e){return dev_test_es_tipo_de_dato(e,"json")}function dev_is_null(e){return dev_test_es_tipo_de_dato(e,"null")}function dev_fec_fecha_actual(){let e=new Date;return`${e.getDay()}/${e.getDate()}/${e.getFullYear()}`}function dev_fec_fecha_actual_texto(){var e=new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"),t=new Array("Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"),r=new Date;return`${t[r.getDay()]} ${r.getDate()} de ${e[r.getMonth()]} de ${r.getFullYear()}`}function dev_url_decode(e){return decodeURIComponent(e)}function dev_url_encode(e){return encodeURIComponent(e)}function dev_url_get_host(e){if(dev_form_url(e)){return dev_url_string_a_url(e).hostname}return!1}function dev_url_pagina_existe(e){try{let t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(),200==t.status}catch(e){return!1}}function dev_url_string_a_url(e){let t=document.createElement("a");return t.href=e,t}function dev_url_abrir_enlace(e,t=""){return e=dev_str_quitar_espacios_blancos(e),window.open(e,t)}function dev_url_this_host(){return window.location.host}function dev_url_this_pagina_actual(){return window.location.pathname}function dev_url_str_a_url_amigable(e,t=!0){return dev_str_sin_caracteres_especiales(e,t).replace(/_/g,"-")}function dev_dom_agregar_bootstrap(e="4.4.1",t="3.4.1",r="1.16.0"){dev_dom_agregar_css(`https://maxcdn.bootstrapcdn.com/bootstrap/${e}/css/bootstrap.min.css`,"bootstrap-css"),dev_dom_agregar_js(`https://ajax.googleapis.com/ajax/libs/jquery/${t}/jquery.min.js`,"jquery-js"),dev_dom_agregar_js(`https://cdnjs.cloudflare.com/ajax/libs/popper.js/${r}/umd/popper.min.js`,"popper-js"),dev_dom_agregar_js(`https://maxcdn.bootstrapcdn.com/bootstrap/${e}/js/bootstrap.min.js`,"bootstrap-js")}function dev_dom_agregar_js(e,t=""){return e=dev_form_url(e)?e:dev_url_this_host()+e,!(!dev_form_url(e)||!dev_url_pagina_existe(e))&&(t=dev_is_string(t,1)?t:dev_url_get_host(e),$("body").append(`<script id="${t}" src="${e}"><\/script>`),!0)}function dev_dom_agregar_css(e,t=""){return e=dev_form_url(e)?e:dev_url_this_host()+e,!(!dev_form_url(e)||!dev_url_pagina_existe(e))&&(t=dev_is_string(t,1)?t:dev_url_get_host(e),$("head").append(`<link id="${t}" rel="stylesheet" href="${e}">`),!0)}function dev_dom_existe_elemento(e){if(dev_test_es_tipo_de_dato(e,"dom"))return!0;if(dev_is_string(e=dev_str_quitar_espacios_extra(e),1)){if(dev_dom_es_etiqueta_html(e)&&$(e).length>0)return!0;if(e=dev_dom_str_a_id(e),!dev_str_esta_vacio($(e).parent().html())||$(e).parent().html())return!0}return!1}function dev_dom_obj_attr(e,t,r=!1){let _=dev_dom_str_a_id(e),n=dev_test_obj_to_bool(r);if(dev_dom_existe_elemento(_)&&dev_is_string(t,1))switch(t){case"value":case"val":if(!n)return $(_).val();$(_).val(r);break;case"id":if(!n)return $(_).attr("id");$(_).attr("id",r);break;case"name":if(!n)return $(_).attr("name");$(_).attr("name",r);break;case"class":if(!n)return $(_).attr("class");$(_).attr("class",r);break;case"html":if(!n)return $(_).html();$(_).html(r);break;case"text":if(!n)return $(_).text();$(_).text(r);break;default:if(!n)return $(_).attr(t,r);$(_).attr(t,r)}}function dev_dom_obj_value(e,t=null){return!!dev_dom_obj_attr(t_trim(e))&&dev_dom_obj_attr(e,"value",t)}function dev_dom_obj_class(e,t=""){return!!dev_dom_existe_elemento(t_trim(e))&&dev_dom_obj_attr(e,"class",t)}function dev_dom_obj_html(e,t=""){return!!dev_dom_existe_elemento(t_trim(e))&&dev_dom_obj_attr(e,"html",t)}function dev_dom_obj_text(e,t=""){return!!dev_dom_existe_elemento(t_trim(e))&&dev_dom_obj_attr(e,"text",t)}function dev_dom_objeto(e,t=!1){if(dev_is_string(e)){let r=(e=t_trim(e)).startsWith("#")?e:"#"+e;if(!dev_str_esta_vacio($(r).attr("id")))return t?$(r):$(r)[0]}return!1}function dev_dom_copiar_en_portapapeles(e){let t=$("<textarea>");$("body").append(t),t.val(e).select();let r=document.execCommand("copy");return t.remove(),r}function dev_dom_crear_elemento(e,t,r="body",_="",n="",o="",a=null,i=null){if(dev_dom_existe_elemento(r=dev_dom_str_a_id(r))){let s=dev_is_array(a,1)&&dev_is_array(i,1)?dev_dom_generar_string_atributos(a,i):null;return $(r).append(`<${e} id="${_}" class="${n}" name="${o}" ${s}>${t}</${e}>`),!0}return!1}function dev_dom_generar_string_atributos(e,t){if(dev_is_array(e,1)&&dev_is_array(t,1)){var r="";for(let _=0;_<e.length;_++)r+=e[_]+'="'+t[_]+'" ';return r}return!1}function dev_dom_obj_find(e,t){return!!(dev_is_string(e,1)&&dev_is_string(t,1)&&dev_dom_existe_elemento(e=dev_dom_str_a_id(e)))&&(t=dev_dom_str_a_id(t),$(e).find(t))}function dev_dom_es_etiqueta_html(e){return dev_is_string(e,1)&&dev_arr_incluye_texto(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","colgroup","command","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","figure","footer","form","h1","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","input","legend","fieldset","figure","details","li","link","map","mark","menu","meta","meter","nav","noscript","objet","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","details","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","ul","var","video","wbr"],e)}function dev_dom_texto_existe_en_pagina(e){return!(!dev_is_string(e,1)||!dev_str_incluye(dev_dom_obj_html("body"),e))&&dev_str_incluye(dev_dom_obj_html("body"),e)}function dev_dom_copiar_en_portapapeles_attr_elemento(e,t="value"){let r;if(e=dev_dom_str_a_id(e),t=dev_str_to_lower(dev_str_quitar_espacios_blancos(t)),dev_dom_existe_elemento(e)&&dev_is_string(t,1)){switch(t){case"value":case"val":case"v":r=$(e).val();break;case"id":case"i":r=$(e).attr("id");break;case"name":case"n":r=$(e).attr("name");break;case"class":case"c":r=$(e).attr("class");break;case"html":case"h":r=$(e).html();break;case"text":case"t":r=$(e).text();break;default:return!1}return dev_dom_copiar_en_portapapeles(r),!0}return!1}function dev_dom_str_a_id(e){return dev_test_es_tipo_de_dato(e,"dom")?e:dev_is_string(e=dev_str_quitar_espacios_extra(e))?e=dev_dom_es_etiqueta_html(e)||dev_str_inicia_con(e,"#")||dev_str_inicia_con(e,".")?dev_str_quitar_espacios_extra(e):dev_str_quitar_espacios_extra("#"+e):""}function dev_dom_str_a_unidad_de_medida(e){e=dev_str_convertir_a_sting(e);let t=["px","%","vh","rem","em"];for(let r=0;r<t.length;r++)if(dev_str_termina_con(e,t[r]))return t[r];return!!dev_is_numero(e=dev_str_conseguir_numero_string(e))&&e+"px"}function dev_dom_cambiar_width_heigth(e,t=null,r=null,_=null,n=null){if(dev_dom_existe_elemento(e=dev_dom_str_a_id(e))){let o=[t,r,_,n],a=["width","height","min-width","min-height"],i="";for(let e=0;e<4;e++)o[e]&&(dev_is_numero(o[e])||dev_is_numero(dev_str_conseguir_numero_string(o[e])))?(o[e]=dev_str_quitar_espacios_blancos(dev_str_to_lower(dev_str_convertir_a_sting(o[e]))),o[e]=dev_dom_str_a_unidad_de_medida(o[e])):o[e]=!1;for(let e=0;e<4;e++)o[e]&&(i=a[e]+":"+o[e]+" ");return dev_dom_style_agregar(e,i)}return!1}function dev_dom_style_agregar(e,t,r=!1){if(dev_dom_existe_elemento(e=dev_dom_str_a_id(e))){let _=r?"":dev_dom_obj_attr(e,"style");return dev_dom_obj_attr(e,"style",_+t),!0}return!1}function dev_dom_crear_iframe(e,t="body",r="iframe",_="",n="",o="",a=null,i=null){if(t=dev_dom_str_a_id(t),dev_form_url(e)&&dev_url_pagina_existe(e)&&dev_dom_existe_elemento(t)){n=(n=dev_dom_str_a_unidad_de_medida(n))||"",o=(o=dev_dom_str_a_unidad_de_medida(o))||"";let s=dev_dom_generar_array_titulo_valor(dev_arr_unir_arrays(["src","width","height"],a),dev_arr_unir_arrays([e,n,o],i));return dev_dom_crear_elemento("iframe","",t,r,_,"",s[0],s[1])}return!1}function dev_dom_generar_array_titulo_valor(e,t){if(dev_is_array(e)&&dev_is_array(t)){let r=new Array(2),_=[],n=[],o=0;for(let r=0;r<e.length;r++)dev_is_string(dev_str_convertir_a_sting(e[r]),1)&&dev_is_string(dev_str_convertir_a_sting(t[r]),1)&&(_.push(e[r]),n.push(t[r]),o++);return o>0&&(r[0]=_,r[1]=n,r)}return!(!dev_is_string(dev_str_convertir_a_sting(e),1)||!dev_is_string(dev_str_convertir_a_sting(t),1))&&(arrayTituloValor[0]=e,arrayTituloValor[1]=t,arrayTituloValor)}function dev_dom_crear_elemento_con_string(e,t="",r="body",_="",n=!0){let o=`<${e} ${_}>${t}`;return dev_dom_agregar_html(o+=n?`</${e}>`:"",r)}function dev_dom_crear_elemento_personalizado(e,t="",r="body",_="",n="",o=null,a=null,i=!0){if(r=dev_dom_str_a_id(r),dev_is_string(e,1)&&dev_dom_existe_elemento(r)){let s=`<${e} id="${_}" ${dev_dom_generar_string_atributos(o.push("class"),a.push(n))}>${t}`;return dev_dom_agregar_html(s=i?s+`</${e}>`:s,r)}return!1}function dev_dom_generar_texto_de_html(e,t="",r="",_="",n=null,o=null,a=!0){if(dev_is_string(e,1)){let i=`<${e} id="${r}" ${dev_dom_generar_string_atributos(n.push("class"),o.push(_))}>${t}`;return a?i+`</${e}>`:i}return!1}function dev_dom_agregar_html(e,t,r=!0){return!(!dev_dom_existe_elemento(t=dev_dom_str_a_id(t))||!dev_str_reg_incluye(e,/(<)(.|\n)+(>)$/))&&(r?$(t).append(e):$(t).prepend(e),!0)}function dev_dom_agregar_jquery(e="1.3.1",t="head",r=!1){let _=document.createElement("script");_.type="text/javascript",_.src=`https://ajax.googleapis.com/ajax/libs/jquery/${e}/jquery.min.js`,r&&(_.onload=function(){echo("JQuery "+e+" ha sido cargado correctamente")}),document.getElementsByTagName(t)[0].appendChild(_)}function dev_dom_get_js(e){dev_form_url(e)&&$.getScript(e,function(e,t,r){echo("Script cargado")}).fail(function(e){echo("Script error",e)})}function dev_dom_convertir_html_a_jpg(e,t="screenshot-"+dev_str_sin_caracteres_especiales(dev_fec_fecha_actual()),r){dev_dom_get_js("https://www.linkeapy.ga/assets/js/htmltocanvas.js"),dev_dom_get_js("https://www.linkeapy.ga/assets/js/filesaver.js"),e=dev_dom_str_a_id(e),html2canvas($(e),{onrendered:function(e){theCanvas=e,e.toBlob(function(e){saveAs(e,t+".jpg")})}})}function dev_dom_agregar_js_a_iframe(e,t,r="script-iframe"){e=dev_dom_str_a_id(e),$(e).each(function(){var e=this.contentWindow.document;if(!e.getElementById(scriptID)){var _=e.createElement("script");_.type="text/javascript",_.id=r,_.innerHTML=t,e.body.appendChild(_)}})}function dev_dom_class_replace(e,t,r=""){return!!dev_dom_existe_elemento(e=dev_dom_str_a_id(e))&&($(e).removeClass(t).addClass(r),!0)}function dev_dom_class_toogle(e,t,r=""){return!!dev_dom_existe_elemento(e=dev_dom_str_a_id(e))&&($(e).toggleClass(t),$(e).toggleClass(r),!0)}function dev_dom_scroll_top(e=500){$("html, body").animate({scrollTop:0},500)}function dev_arr_unir_arrays(e,t){let r;return r=dev_is_array(e)&&dev_is_array(t)?e.concat(t):dev_is_array(e)?e:!!dev_is_array(t)&&t}function dev_arr_incluye_texto(e,t,r=1){return!(!dev_is_array(e)||!dev_is_string(t,r))&&e.includes(t)}function dev_arr_print_array(e,t=!1,r=!1,_=!1){dev_test_print_array(e,null,t,r,_)}function dev_arr_count(e){return!!dev_is_array(e)&&e.length}function dev_arr_is_in_array(e,t){let r=!1;if(dev_is_array(e)){if(dev_is_array(t)){r=!0;for(let _ of t)if(!e.includes(_)){r=!1;break}}}else r=e.includes(t);return r}function dev_arr_extraer_en_partes(e,t,r){return!!dev_is_array(e)&&e.slice(t,dev_is_undefined(r)?count(e)-1:r)}function dev_arr_posicion_en_array(e,t){return!(!dev_is_array(e)||!dev_is_string(t,1)&&!dev_is_numero(t))&&e.indexOf(t)}function dev_01_help(e=""){echo("Aquí puedes escribir el nombre de la función para saber cómo funciona")}function dev_html_permitir_caracteres_input(e,t="",r=event){let _="0123456789"+t,n=" abcdefghijklmnñopqrstuvwxyzABCDEFGHIJKLMNÑOPQRSTUVWXYZáéíóúÁÉÍÓÚ"+t,o=_+n,a=[8,37,39,46];switch(e){case"num":case"numero":case"numeros":e=_;break;case"car":case"caracteres":case"letras":case"texto":e=n;break;case"num_car":case"alfanumerico":case"letrasnumeros":case"numerosyletras":e=o}var i=r||window.event,s=i.charCode||i.keyCode,d=String.fromCharCode(s),u=!1;for(var c in a)if(s==a[c]){u=!0;break}return-1!=e.indexOf(d)||u}function dev_html_limitar_input(e,t=event){let r=t.srcElement,_=t.keyCode?t.keyCode:t.charCode,n=dev_str_convertir_a_sting($(r).val());return 8==_||46==_||13==_||9==_||37==_||39==_||38==_||40==_||!n.length>=e}function dev_html_no_permitir_espacios_input(e=event){let t=e.srcElement,r=e.keyCode?e.keyCode:e.charCode;dev_str_convertir_a_sting($(t).val());if(9==r||20==r||13==r)return!1}function dev_html_input_text(e=!1,t=!0,r=event){let _=dev_html_limitar_input(e=e||e.length,r),n=!t||dev_html_no_permitir_espacios_input(r);return _&&n}function echo(e,t=!1){dev_test_echo(e,t)}function var_dump(e,t=!0,r=!1){dev_test_var_dump(e,t,r)}function var_dom_dump(e){dev_test_var_dom_dump(e)}function t_trim(e){return dev_str_quitar_espacios_extra(e)}function count(e){return dev_arr_count(e)}