diff --git a/bundle.js b/bundle.js index 9dd80a5..9fe84bb 100644 --- a/bundle.js +++ b/bundle.js @@ -1,2 +1,2 @@ -!function(e){var t={};function o(a){if(t[a])return t[a].exports;var s=t[a]={i:a,l:!1,exports:{}};return e[a].call(s.exports,s,s.exports,o),s.l=!0,s.exports}o.m=e,o.c=t,o.d=function(e,t,a){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(o.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)o.d(a,s,function(t){return e[t]}.bind(null,s));return a},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=5)}([function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e,t){return new RegExp(" "+t+" ").test(" "+e.className+" ")},s=function(e){e.style.opacity="",e.style.display="block"},n=function(e){e.style.opacity="",e.style.display="none"};t.hasClass=a,t.addClass=function(e,t){a(e,t)||(e.className+=" "+t)},t.removeClass=function(e,t){var o=" "+e.className.replace(/[\t\r\n]/g," ")+" ";if(a(e,t)){for(;o.indexOf(" "+t+" ")>=0;)o=o.replace(" "+t+" "," ");e.className=o.replace(/^\s+|\s+$/g,"")}},t.escapeHtml=function(e){var t=document.createElement("div");return t.appendChild(document.createTextNode(e)),t.innerHTML},t._show=s,t.show=function(e){if(e&&!e.length)return s(e);for(var t=0;t0?setTimeout(a,t):e.style.display="none"}));a()},t.fireClick=function(e){if("function"==typeof MouseEvent){var t=new MouseEvent("click",{view:window,bubbles:!1,cancelable:!0});e.dispatchEvent(t)}else if(document.createEvent){var o=document.createEvent("MouseEvents");o.initEvent("click",!1,!1),e.dispatchEvent(o)}else document.createEventObject?e.fireEvent("onclick"):"function"==typeof e.onclick&&e.onclick()},t.stopEventPropagation=function(e){"function"==typeof e.stopPropagation?(e.stopPropagation(),e.preventDefault()):window.event&&window.event.hasOwnProperty("cancelBubble")&&(window.event.cancelBubble=!0)}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.extend=function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);return e},t.hexToRgb=function(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?parseInt(t[1],16)+", "+parseInt(t[2],16)+", "+parseInt(t[3],16):null},t.isIE8=function(){return window.attachEvent&&!window.addEventListener},t.logStr=function(e){window.console&&window.console.log("SweetAlert: "+e)},t.colorLuminance=function(e,t){(e=String(e).replace(/[^0-9a-f]/gi,"")).length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),t=t||0;var o,a,s="#";for(a=0;a<3;a++)o=parseInt(e.substr(2*a,2),16),s+=("00"+(o=Math.round(Math.min(Math.max(0,o+o*t),255)).toString(16))).substr(o.length);return s}},function(e,t,o){"use strict";var a=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(1),n=o(0),r=a(o(4)),i=a(o(7)),l=function(){var e=document.createElement("div");for(e.innerHTML=i.default;e.firstChild;)document.body.appendChild(e.firstChild)},d=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=document.querySelector(".sweet-alert");return e||(l(),e=d()),e})),c=function(){var e=d();if(e)return e.querySelector("input")},u=function(){return document.querySelector(".sweet-overlay")},m=function(e){if(e&&13===e.keyCode)return!1;var t=d(),o=t.querySelector(".sa-input-error");n.removeClass(o,"show");var a=t.querySelector(".sa-error-container");n.removeClass(a,"show")};t.sweetAlertInitialize=l,t.getModal=d,t.getOverlay=u,t.getInput=c,t.setFocusStyle=function(e,t){var o=s.hexToRgb(t);e.style.boxShadow="0 0 2px rgba("+o+", 0.8), inset 0 0 0 1px rgba(0, 0, 0, 0.05)"},t.openModal=function(e){var t=d();n.fadeIn(u(),10),n.show(t),n.addClass(t,"showSweetAlert"),n.removeClass(t,"hideSweetAlert"),window.previousActiveElement=document.activeElement,t.querySelector("button.confirm").focus(),setTimeout((function(){n.addClass(t,"visible")}),500);var o=t.getAttribute("data-timer");if("null"!==o&&""!==o){var a=e;t.timeout=setTimeout((function(){(a?"true"===t.getAttribute("data-has-done-function"):null)?a(null):sweetAlert.close()}),o)}},t.resetInput=function(){var e=d(),t=c();n.removeClass(e,"show-input"),t.value=r.default.inputValue,t.setAttribute("type",r.default.inputType),t.setAttribute("placeholder",r.default.inputPlaceholder),m()},t.resetInputError=m,t.fixVerticalPosition=function(){d().style.marginTop=n.getTopMargin(d())}},function(e){e.exports=JSON.parse('{"config":{"repoName":"my_project","_comment":"errorComando, in case of no command match","errorComando":"command not found","success":"Success!","emptyFolderMessage":"No files in this folder yet","emptyStageAreaMessage":"No files to commit","emptyCommitsAreaMessage":"Nothing commited yet","_comment2":"if user writes \'git\', show following error","errorMessages":["usage: git [--version] [--exec-path[=<path>]]","            [-p|--paginate|--no-pager]","            [--git-dir=<path>] [--work-tree=<path>]","            [-c name=value] [--help]","            <command> [<args>]"," "],"_comment3":"the following field must have the parragraph tag to work properly. You can add as many as you need.","tutorialCompletedMessage":"

Well done!

"},"lecciones":{"es":{"1":{"orden":"1","titulo":"¿Quieres aprender a usar Git?","tituloCorto":"¿Quieres aprender Git?","tareas":["Git es un sistema de control de versiones distribuido que permite a equipos de trabajo tratar con un mismo documento o código al mismo tiempo, evitando choques entre los miembros.","En la terminal que puedes ver en pantalla hemos creado un repositorio, un contendor de archivos. Para inicializar un repositorio en Git debes escribir el siguiente comando: git init."],"comando":"git init","alert":"Did not create a Git repo","successMessages":["Initialized empty Git repository in /.git/"],"repoStatus":{}},"2":{"orden":"2","titulo":"Revisando el status del repositorio","tituloCorto":"Revisando el status","tareas":["Bien hecho. Has logrado crear tu primer repositorio. Ahora en nuestro repositorio se ha creado una carpeta llamada /.git/. Si creas un repositorio en tu equipo, esta carpeta estará oculta. En ella se encuentran una serie de subdirectorios con archivos que contienen referencias a todos los cambios que han ocurrido en tu repositorio.","Ahora, usando el comando git status veamos cuál es el estado actual de nuestro repositorio."],"comando":"git status","alert":"Did not use git status","successMessages":["# On branch master","#","# Initial commit","#","nothing to commit","(create/copy files and use \\"git add\\" to track)"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},"mi_plan.txt"]}},"3":{"orden":"3","titulo":"Agregar archivos y hacer commit","tituloCorto":"Primer uso del repositorio","tareas":["Si a lo largo de este tutorial sientes que en tu terminal hay demasiado texto, puedes usar el comando clear para limpiar todo el contenido de ella.","Sigamos. Imagina que agregas un nuevo archivo llamado mi_plan.txt a tu repositorio.","Ahora, si usamos de nuevo el comando git status podrás notar que el estado de tu repositorio ha cambiado."],"comando":"git status","alert":"Did not use git status","successMessages":["# On branch master","#","# Initial commit","#","# Untracked files:","# (use \\"git add ...\\" to include files)","#","# mi_plan.txt","nothing added to commit","but untracked files present","(use \'git add\' to track)"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},"mi_plan.txt"]}},"4":{"orden":"4","titulo":"Haciendo cambios","tituloCorto":"Haciendo cambios","tareas":["¿Notaste cómo el archivo mi_plan.txt apareció como untracked en la terminal?","Eso significa que el archivo es nuevo y Git aún no está siguiendo sus cambios.","Para que Git pueda seguir todos los cambios que se realicen en el archivo, primero debemos agregarlo a la zona de preparación o Stage con el comando git add [nombre del archivo]."],"comando":"git add mi_plan.txt","alert":"Did not add mi_plan.txt","successMessages":["¡Bien hecho! mi_plan.txt ha sido agregado al Stage"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},"mi_plan.txt"],"staged":["mi_plan.txt"]}},"5":{"orden":"5","titulo":"Revisando los cambios","tituloCorto":"Revisando los cambios","tareas":["¡Excelente! Ahora que git ya está pendiente de los cambios de nuestro archivo, podemos usar de nuevo el comando git status para asegurarnos de que todo está bien."],"comando":"git status","alert":"Did not use git status","successMessages":["# On branch master","#","# Initial commit","#","# Changes to be committed:","# (use \\"git rm --cached ...\\" to unstage)","#","# new file: mi_plan.txt","#"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},"mi_plan.txt"],"staged":["mi_plan.txt"]}},"6":{"orden":"6","titulo":"Haciendo commit","tituloCorto":"Haciendo commit","tareas":["Ahora con tu archivo preparado y en el Stage podemos seguir con el siguiente paso, hacer commit.","Hacer commit es simplemente enviar nuestros cambios desde el Stage a nuestro repositorio. Si así quisieras, podrías agregar y quitar archivos del Stage antes de hacer commit.","Para guardar tus cambios en el repositorio usamos el comando git commit -m seguido de un mensaje que describa los cambios que hemos realizado. En este caso, solo hemos agregado un nuevo archivo, así que solo escribiremos Agregar mi_plan.txt entre comillas."],"comando":"git commit -m \\"Agregar mi_plan.txt\\"","alert":"Did not use git commit","successMessages":["[master (root-commit) 20b5ccd] Agregar mi_plan.txt","1 file changed, 1 insertion(+)","create mode 100644 mi_plan.txt"," "],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},"mi_plan.txt"],"commits":["20b5ccd - Agregar mi_plan.txt"]}},"7":{"orden":"7","titulo":"Agregando varios archivos","tituloCorto":"Agregando varios archivos","tareas":["Nuestro repositorio ya tiene un commit. Pero ahora, imagina que has estado trabajando todo el día en tu proyecto y has terminado creando varios archivos de texto. Usar el comando git add para agregarlos uno a uno es bastante fastidioso, ¿verdad? Pues Git nos ofrece un metodo un poco más comodo.","Para ello usaremos el comando git add \\"*.txt\\" el cual agregará todos los archivos de texto que hayan sido editados en nuestro repositorio."],"comando":"git add \\"*.txt\\"","alert":"Did not use git add","successMessages":["Archivos agregados"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"planes_septiembre":["desarrollo.txt"]},{"planes_octubre":["maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],"staged":[{"planes_septiembre":["desarrollo.txt"]},{"planes_octubre":["maquetado.txt"]},"reuniones_del_mes.txt"],"commits":["20b5ccd - Agregar mi_plan.txt"]}},"8":{"orden":"8","titulo":"Revertir el Stage","tituloCorto":"Git reset","tareas":["Así como git add envía tus archivos editados al Stage, existe el comando git reset que hace todo lo contrario. Retira los archivos del Stage.","Este comando puede recibir los mismos argumentos que hemos visto hasta ahora con git add.","Probemos retirando los archivos de texto que acabamos de agregar al Stage."],"comando":"git reset","alert":"Did not use git reset","successMessages":["Los archivos de texto ya no están en el Stage"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"planes_septiembre":["desarrollo.txt"]},{"planes_octubre":["maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],"commits":["20b5ccd - Agregar mi_plan.txt"]}},"9":{"orden":"9","titulo":"Agregando archivos de nuevo","tituloCorto":"Git add #2","tareas":["Como podrás notar nuestros archivos de texto ya no están en en la zona de preparación.","Ahora, volvamos a agregarlos."],"comando":"git add \\"*.txt\\"","alert":"Did not use git add","successMessages":["Archivos agregados"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"planes_septiembre":["desarrollo.txt"]},{"planes_octubre":["maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],"staged":[{"planes_septiembre":["desarrollo.txt"]},{"planes_octubre":["maquetado.txt"]},"reuniones_del_mes.txt"],"commits":["20b5ccd - Agregar mi_plan.txt"]}},"10":{"orden":"10","titulo":"Volviendo a hacer commit","tituloCorto":"Haciendo commit #2","tareas":["Hagamos un commit con los nuevos cambios.","¿Qué te parece usar el mensaje Agregar todos los archivos de texto?"],"comando":"git commit -m \\"Agregar todos los archivos de texto\\"","alert":"Did not use git commit","successMessages":["[master (root-commit) 3852b4d]","\'Agregar todos los archivos de texto\'","3 file changed, 3 insertion(+)","create mode 100644 desarrollo.txt","create mode 100644 maquetado.txt","create mode 100644 reuniones_del_mes.txt"," "],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"planes_septiembre":["desarrollo.txt"]},{"planes_octubre":["maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],"commits":["20b5ccd - Agregar mi_plan.txt","3852b4d - Agregar todos los archivos de texto"]}},"11":{"orden":"11","titulo":"Revisando el historial con git log","tituloCorto":"Usado git log","tareas":["¿Qué tal? Ya llevamos dos commits hasta ahora.","Git nos ofrece un comando que permite revisar un historial con todos los commits que hemos hecho hasta el momento en orden cronológico. Este comando es git log"],"comando":"git log","alert":"Did not use git log","successMessages":["commit: 3852b4db1634463d0bb4d267edb7b3f9cd02ace1","Author: 4Geeks Student ","Date: Fri Sep 19 18:30:00 2017 -0400","    Agregar mi_plan.txt"," ","commit: b652edfd888cd3d5e7fcb857d0dabc5a0fcb5e28","Author: 4Geeks Student ","Date: Thu Sep 18 18:00:32 2017 -0400","    Agregar todos los archivos de texto"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"planes_septiembre":["desarrollo.txt"]},{"planes_octubre":["maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],"commits":["20b5ccd - Agregar mi_plan.txt","3852b4d - Agregar todos los archivos de texto"]}},"12":{"orden":"12","titulo":"Manejando repositorios remotos","tituloCorto":"Git remote","tareas":["Bien, ya hemos aprendido los comandos más básicos de Git. Ahora veamos su utilidad práctica. Imagina que quieres que otras personas tengan acceso a tu repositorio. Para lograr debes subir nuestro repositorio a una plataforma como GitHub que se encarga resguardar repositorios publicos y privados en sus servidores.","Ahora, una vez creado un repositorio en GitHub tendremos que asociarlo a nuestro repositorio local, para ello usamos git remote add seguido del nombre con el cual queremos asociar el repositorio remoto que deseamos agregar y de su URL. Se acostumbra llamar al repositorio remoto principal origin, así que haremos eso. Y su URL es https://github.com/4geeksAcademy/project.git. Esta vez no son necesarias las comillas."],"comando":"git remote add origin https://github.com/4geeksAcademy/project.git","alert":"Did not use git remote add","successMessages":["Repositorio agregado con éxito"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"planes_septiembre":["desarrollo.txt"]},{"planes_octubre":["maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],"commits":["20b5ccd - Agregar mi_plan.txt","3852b4d - Agregar todos los archivos de texto"]}},"13":{"orden":"13","titulo":"Usando git push","tituloCorto":"Git push","tareas":["Una vez asociado nuestro repositorio local solo tenemos que subir nuestros archivos locales a ese repositorio en línea, a esto se le llama hacer un push.","Para hacerlo usamos el comando git push -u seguido del nombre del repositorio remoto a donde queremos hacer el push (origin) y luego el nombre de la rama del repositorio local donde están nuestros archivos. Por defecto, al inicializar un repositorio se crea una rama local llamada master, allí están nuestros documentos.","¿Qué tal si lo intentas?"],"comando":"git push -u origin master","alert":"Did not use git push","successMessages":["Branch master set up to track remote branch"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"planes_septiembre":["desarrollo.txt"]},{"planes_octubre":["maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],"commits":["20b5ccd - Agregar mi_plan.txt","3852b4d - Agregar todos los archivos de texto"]}},"14":{"orden":"14","titulo":"Usando git pull","tituloCorto":"Git pull","tareas":["Es bueno que siempre trabajes con la versión más actual de tu repositorio, es por ello que antes de hacer cualquier cosa siempre actualices tu repositorio local porque tal vez algún miembro de tu equipo ha realizado algún cambio importante","Para actualizar nuestro repositorio local usamos git pull seguido del nombre del repositorio en línea de donde copiaremos los archivos (origin) y luego el nombre de la rama de nuestro repositorio local donde deseamos que se copien (master)."],"comando":"git pull origin master","alert":"Did not use git pull","successMessages":["Updating 3852b4d..3e70b0f","Fast-forward","  resumen_mensual.txt | 1+","  1 file changed, 1 insertion(+)","  create mode 100644 resumen_mensual.txt"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"planes_septiembre":["desarrollo.txt"]},{"planes_octubre":["maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],"commits":["20b5ccd - Agregar mi_plan.txt","3852b4d - Agregar todos los archivos de texto","7d8d808 - Editar frecuencia de reuniones en mi_plan.txt"]}},"15":{"orden":"15","titulo":"Observando las ediciones con git diff","tituloCorto":"Git diff","tareas":["¿Notas algo diferente en la carpeta de tu repositorio?","Parece que un miembro de tu equipo ha editado nuestro archivo mi_plan.txt y ha hecho un push al repositorio en GitHub. Antes de comenzar a trabajar creo que mejor revisamos qué cambios realizó nuestro compañero.","Para ello podemos usar el comando git diff HEAD donde HEAD es una referencia al commit más reciente."],"comando":"git diff HEAD","alert":"Did not use git diff","successMessages":["diff --git a/mi_plan.txt b/mi_plan.txt","index 7d8d808..e725ef6 100644","--- a/mi_plan.txt","+++ b/mi_plan.txt","@@ -1 +1 @@","-Realizar reuniones mensuales","+Realizar reuniones quincenales"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"planes_septiembre":["desarrollo.txt"]},{"planes_octubre":["maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],"commits":["20b5ccd - Agregar mi_plan.txt","3852b4d - Agregar todos los archivos de texto","7d8d808 - Editar frecuencia de reuniones en mi_plan.txt"]}},"16":{"orden":"16","titulo":"Eliminando cambios","tituloCorto":"Git checkout","tareas":["Bien, ya podemos ver las diferencias. Ahora, imagina que luego de unos minutos de trabajo has realizado un par de cambios en reuniones_del_mes.txt, pero resulta que has cometido un error. Podemos deshacer estos cambios con un comando de Git.","Para ello, usamos el comando git checkout seguido del nombre del archivo al cual deseas eliminarle los cambios."],"comando":"git checkout \\"reuniones_del_mes.txt\\"","alert":"Did not use git checkout","successMessages":["Cambios eliminados"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"planes_septiembre":["desarrollo.txt"]},{"planes_octubre":["maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],"commits":["20b5ccd - Agregar mi_plan.txt","3852b4d - Agregar todos los archivos de texto","7d8d808 - Editar frecuencia de reuniones en mi_plan.txt"]}},"17":{"orden":"17","titulo":"Trabajando con ramas","tituloCorto":"Ramificación","tareas":["¿Recuerdas que dijimos que Git permitía a un equipo de trabajo tratar con un mismo código sin problemas? Bueno, esto es posible gracias a la ramificación del código.","Git permite crear ramas o branches. Estas son copias de tu código en las que puedes trabajar sin afectar la versión original.","¿Por qué no creamos una? Para ello usa el comando git branch seguido del nombre de la rama. Llamaremos a la nuestra mi_version."],"comando":"git branch mi_version","alert":"Did not use git branch","successMessages":["Rama creada"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"planes_septiembre":["desarrollo.txt"]},{"planes_octubre":["maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],"commits":["20b5ccd - Agregar mi_plan.txt","3852b4d - Agregar todos los archivos de texto","7d8d808 - Editar frecuencia de reuniones en mi_plan.txt"]}},"18":{"orden":"18","titulo":"Cambiando de ramas","tituloCorto":"Ramificación #2","tareas":["Bien, hemos creado una nueva rama. Pero como puedes ver a tu derecha en la sección Root folder aún seguimos en la rama principal master. Si queremos trabajar con nuestra copia debemos cambiar de rama.","Para hacerlo usamos el comando git checkout seguido del nombre de la rama."],"comando":"git checkout mi_version","alert":"Did not use git checkout","successMessages":["Switched to branch \'mi_version\'"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"planes_septiembre":["desarrollo.txt"]},{"planes_octubre":["maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],"commits":["20b5ccd - Agregar mi_plan.txt","3852b4d - Agregar todos los archivos de texto","7d8d808 - Editar frecuencia de reuniones en mi_plan.txt"]}},"19":{"orden":"19","titulo":"Realizando cambios en nuestra rama","tituloCorto":"Ramificación #3","tareas":["Como podrás notar, ya estamos en nuestra rama. Ahora, ¿qué tal si organizamos un poco mejor nuestro proyecto? Hemos creado una carpeta llamada tareas y allí moveremos los archivos que están en planes_septiembre y planes_octubre.","Hemos hecho esto por ti, como puedes ver en Root folder. Ahora, a veces es algo tedioso tener que agregar los archivos al Stage y luego hacer commit. Es por ello que Git nos permie agregar -a al comando git commit el cual se hará cargo de agregar todos los archivos editados al Stage e inmediatamente hacer commit.","Bien, ejecuta el comando correspodiente y agrega el mensaje: Reorganizar el proyecto."],"comando":"git commit -a -m \\"Reorganizar el proyecto\\"","alert":"Did not use git commit","successMessages":["[mi_version a5cd2f1] Reorganizar proyecto","  2 files changed, 0 insertions(+), 0 deletions(-)","  rename {1 => tareas}/desarrollo.txt","  rename {1 => tareas}/maquetado.txt"],"repoStatus":{"branch":"mi_version","repoFolder":[{".git":[]},{"tareas":["desarrollo.txt","maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],"commits":["20b5ccd - Agregar mi_plan.txt","3852b4d - Agregar todos los archivos de texto","7d8d808 - Editar frecuencia de reuniones en mi_plan.txt","a5cd2f1 - Reorganizar el proyecto"]}},"20":{"orden":"20","titulo":"Regresando a la rama principal","tituloCorto":"Ramificación #4","tareas":["Ahora que ya hemos hecho un commit de nuestros cambios, debemos unirlo a la rama principal para que todo nuestro equipo trabaje con la misma estructura. Para ello primero debemos regresar a la rama principal usando el comando git checkout master."],"comando":"git checkout master","alert":"Did not use git checkout","successMessages":["Switched to branch \'master\'"],"repoStatus":{"branch":"mi_version","repoFolder":[{".git":[]},{"tareas":["desarrollo.txt","maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],"commits":["20b5ccd - Agregar mi_plan.txt","3852b4d - Agregar todos los archivos de texto","7d8d808 - Editar frecuencia de reuniones en mi_plan.txt"]}},"21":{"orden":"21","titulo":"Uniendo nuestros cambios a Master","tituloCorto":"Git merge","tareas":["Como podrás ver la rama master no ha sido alternada y todavía tiene la versión anterior de la estructura de nuestras carpetas. ¿Qué tal si aplicamos los cambios que hicimos en nuestra versión a la rama principal?","Para ello usa el comando git merge. Esto lo que hará será tomar los cambios realizados en mi_version y unirlos a master."],"comando":"git merge mi_version","alert":"Did not use git merge","successMessages":["Updating 7d8d808..ec6888b","Fast-forward","  {1 => tareas}/desarrollo.txt | 0","  {1 => tareas}/maquetado.txt | 0","  2 files changed, 0 insertions(+), 0 deletions(-)","  rename {1 => tareas}/desarrollo.txt","  rename {1 => tareas}/maquetado.txt"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"planes_septiembre":["desarrollo.txt"]},{"planes_octubre":["maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],"commits":["20b5ccd - Agregar mi_plan.txt","3852b4d - Agregar todos los archivos de texto","7d8d808 - Editar frecuencia de reuniones en mi_plan.txt"]}},"22":{"orden":"22","titulo":"Eliminando ramas en desuso","tituloCorto":"Eliminan ramas","tareas":["Ya que hemos unido nuestros cambios a la rama principal y ya no usaremos más mi_vesion, ¿por qué no eliminamos esa rama?","Siempre es bueno eliminar ramas en desuso, ya que a lo largo de un proyecto pueden generarse muchas ramas y debemos evitar que nuestros compañeros se confundan al usar ramas desactualizadas.","Para ello usamos el comando git branch -d seguido del nombre de la rama a eliminar: mi_version."],"comando":"git branch -d mi_version","alert":"Did not use git branch","successMessages":["Deleted branch mi_version (was a5cd2f1)."],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"tareas":["desarrollo.txt","maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],"commits":["20b5ccd - Agregar mi_plan.txt","3852b4d - Agregar todos los archivos de texto","7d8d808 - Editar frecuencia de reuniones en mi_plan.txt","a5cd2f1 - Reorganizar el proyecto"]}},"23":{"orden":"23","titulo":"Compartiendo nuestro proyecto","tituloCorto":"Git push #2","tareas":["Ya habiendo realizado todos los cambios necesarios es hora de que nuestro equipo comience a trabajar con nuestro repositorio.","Así que subamoslo a GitHub para ponernos en marcha."],"comando":"git push","alert":"Did not use git push","successMessages":["To https://github.com/4geeksAcademy/project.git","a5cd2f1..a629e2a master -> master"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"tareas":["desarrollo.txt","maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],"commits":["20b5ccd - Agregar mi_plan.txt","3852b4d - Agregar todos los archivos de texto","7d8d808 - Editar frecuencia de reuniones en mi_plan.txt","a5cd2f1 - Reorganizar el proyecto"]}}},"en":{"1":{"orden":"1","titulo":"Want to learn some Git?","tituloCorto":"Learn Git","tareas":["Git is a distributed version control system that allows people and teams to collaborate, editing the same document or code at the same time, without conflicts,","In the terminal displayed on the lower part of your screen, we have created a repository, a container of files. To initialize the repository, type the following command: git init."],"comando":"git init","alert":"Did not create a Git repo","successMessages":["Initialized empty Git repository in /.git/"],"repoStatus":{}},"2":{"orden":"2","titulo":"Checking your repo","tituloCorto":"Repo status","tareas":["Well done. You have created your first repository. The git init command adds a hidden subfolder within the existing directory named /.git/. If you create a git repository in your computer, this folder will be hidden. This hidden folder contains subfolders and files that reference every change you did in your repository after initializing it.","Now let\'s check the current status of our repository with the command: git status."],"comando":"git status","alert":"Did not use git status","successMessages":["# On branch master","#","# Initial commit","#","nothing to commit","(create/copy files and use \\"git add\\" to track)"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},"my_plan.txt"]}},"3":{"orden":"3","titulo":"Start working on the new repo","tituloCorto":"Getting started","tareas":["If at any point during this tutorial you feel your terminal is too cluttered with text, you can clear its contents with the clear command.","Let\'s continue. Let\'s imagine we added a new file called my_plan.txt in the repository.","Use again the command git status now. You will notice that the status of the repository has changed ."],"comando":"git status","alert":"Did not use git status","successMessages":["# On branch master","#","# Initial commit","#","# Untracked files:","# (use \\"git add ...\\" to include files)","#","# my_plan.txt","nothing added to commit","but untracked files present","(use \'git add\' to track)"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},"my_plan.txt"]}},"4":{"orden":"4","titulo":"Adding and updating files","tituloCorto":"Adding and updating files","tareas":["The output of the git status command is telling us that my_plan.txt is untracked","This means that the new file has not yet been added to the Git tracking process","To have Git to track this file, type the command git add [file name]. This process is called Staging, or moving files to the Staging index tree, meaning our changes are ready to be committed"],"comando":"git add my_plan.txt","alert":"Did not add my_plan.txt","successMessages":["Well done! my_plan.txt has been Staged"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},"my_plan.txt"],"staged":["my_plan.txt"]}},"5":{"orden":"5","titulo":"Reviewing changes","tituloCorto":"Reviewing changes","tareas":["Excellent! Now that we made Git aware of the changes in our file, let\'s check again the status with the git status command to make sure everything is good."],"comando":"git status","alert":"Did not use git status","successMessages":["# On branch master","#","# Initial commit","#","# Changes to be committed:","# (use \\"git rm --cached ...\\" to unstage)","#","# new file: my_plan.txt","#"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},"my_plan.txt"],"staged":["my_plan.txt"]}},"6":{"orden":"6","titulo":"Committing your staged changes","tituloCorto":"Committing changes","tareas":["Now that our changes are Staged, we are ready to commit the changes.","Commit means simply to that our Staged changes are ready to be added to our repository. If you wish, you can add or remove files and add them to the Staging index them as necessary before committing the changes","To save the changes in our repository, use the command git commit -m followed by a commit message that briefly states what exactly happened in between the last version and this. In this case, we added a new archive in an empty repository, so the commit message will be simple: Added my_plan.txt (enclosed in double quotes)."],"comando":"git commit -m \\"Added my_plan.txt\\"","alert":"Did not use git commit","successMessages":["[master (root-commit) 20b5ccd] Added my_plan.txt","1 file changed, 1 insertion(+)","create mode 100644 my_plan.txt"," "],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},"my_plan.txt"],"commits":["20b5ccd - Added my_plan.txt"]}},"7":{"orden":"7","titulo":"Adding multiple files","tituloCorto":"Adding multiple files","tareas":["Our repository already has one commit. But what if you have been working all day in this project, and now you have a few new text files to commit? Adding them one by one with the git add command is quite tedious, right? No worries, Git has a better method to add multiple files.","Type the command git add \\"*.txt\\", in order to add all the text tiles that have been added or edited in our repository."],"comando":"git add \\"*.txt\\"","alert":"Did not use git add","successMessages":[""],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"september_plans":["development.txt"]},{"october_plans":["mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],"staged":[{"september_plans":["development.txt"]},{"october_plans":["mockup.txt"]},"monthly_meetings.txt"],"commits":["20b5ccd - Added my_plan.txt"]}},"8":{"orden":"8","titulo":"Revert to Stage","tituloCorto":"Git reset","tareas":["We know that the git add command sends edited files to the Staging index. The command git reset does the the exact opposite: It reverts to the previous state of Stage.","This command accepts the same arguments as git add.","Let\'s try to reset the last files we added to Stage."],"comando":"git reset","alert":"Did not use git reset","successMessages":["Text files were removed from Stage"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"september_plans":["development.txt"]},{"october_plans":["mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],"commits":["20b5ccd - Added my_plan.txt"]}},"9":{"orden":"9","titulo":"Adding files again","tituloCorto":"Git add #2","tareas":["As you see on the right panel, our files are not anymore on the Staging index.","Let\'s add them again."],"comando":"git add \\"*.txt\\"","alert":"Did not use git add","successMessages":["Added files"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"september_plans":["development.txt"]},{"october_plans":["mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],"staged":[{"september_plans":["development.txt"]},{"october_plans":["mockup.txt"]},"monthly_meetings.txt"],"commits":["20b5ccd - Added my_plan.txt"]}},"10":{"orden":"10","titulo":"Committing newly staged changes","tituloCorto":"Committing files #2","tareas":["Let\'s commit our newly staged changes.","How about adding a more descriptive commit message, such as Added all text files?"],"comando":"git commit -m \\"Added all text files\\"","alert":"Did not use git commit","successMessages":["[master (root-commit) 3852b4d]","\'Added all text files\'","3 file changed, 3 insertion(+)","create mode 100644 development.txt","create mode 100644 mockup.txt","create mode 100644 monthly_meetings.txt"," "],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"september_plans":["development.txt"]},{"october_plans":["mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],"commits":["20b5ccd - Added my_plan.txt","3852b4d - Added all text files"]}},"11":{"orden":"11","titulo":"Reviewing history of changes with git log","tituloCorto":"Using git log","tareas":["How about it? We have already done two commits.","Git has a command that allows us to review a log of all of our commits in chronological order. Type git log on the terminal:"],"comando":"git log","alert":"Did not use git log","successMessages":["commit: 3852b4db1634463d0bb4d267edb7b3f9cd02ace1","Author: 4Geeks Student ","Date: Fri Sep 19 18:30:00 2017 -0400","    Added my_plan.txt"," ","commit: b652edfd888cd3d5e7fcb857d0dabc5a0fcb5e28","Author: 4Geeks Student ","Date: Thu Sep 18 18:00:32 2017 -0400","    Added all text files"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"september_plans":["development.txt"]},{"october_plans":["mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],"commits":["20b5ccd - Added my_plan.txt","3852b4d - Added all text files"]}},"12":{"orden":"12","titulo":"Managing remote repositories","tituloCorto":"Git remote","tareas":["Great, we have now learned the most basic Git commands. Let\'s put our knowledge in practice. Imagine that you need other people to access your repository. To do this, you have to upload the repository to a platform such as GitHub a service that hosts public and private repositories.","Once our Github repository is created, we have to associate it with our local repository. For this, we will use the git remote add command, followed by the name and the URL of the remote repository. Usually, the main remote repository is named origin. The URL of the remote repository should be https://github.com/4geeksAcademy/project.git (double quotes are not needed)"],"comando":"git remote add origin https://github.com/4geeksAcademy/project.git","alert":"Did not use git remote add","successMessages":["Successfully added repository"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"september_plans":["development.txt"]},{"october_plans":["mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],"commits":["20b5ccd - Added my_plan.txt","3852b4d - Added all text files"]}},"13":{"orden":"13","titulo":"Using git push","tituloCorto":"Git push","tareas":["After associating our local repository with the remote, we will upload our files to the remote, or push our local repository.","Type git push -u followed by the name of the remote repository (origin) and then the name of the local branch we want to push. When we initialize a repository, a local branch called master is created automatically, and contains our files.","Let\'s try it?"],"comando":"git push -u origin master","alert":"Did not use git push","successMessages":["Branch master set up to track remote branch"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"september_plans":["development.txt"]},{"october_plans":["mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],"commits":["20b5ccd - Added my_plan.txt","3852b4d - Added all text files"]}},"14":{"orden":"14","titulo":"Using git pull","tituloCorto":"Git pull","tareas":["It is a good practice to always work with the most recent version of your repository, to make sure that you are not ignoring possible important changes by a team member. This is easily done with Git, as we can update our local repository to match the content of the remote repository.","To update your local repository, type git pull, followed by the name of the remote repository(origin) and the name of the local branch where that will get updated (master)."],"comando":"git pull origin master","alert":"Did not use git pull","successMessages":["Updating 3852b4d..3e70b0f","Fast-forward","  monthly_summary.txt | 1+","  1 file changed, 1 insertion(+)","  create mode 100644 monthly_summary.txt"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"september_plans":["development.txt"]},{"october_plans":["mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],"commits":["20b5ccd - Added my_plan.txt","3852b4d - Added all text files","7d8d808 - Edited meetings frequency in my_plan.txt"]}},"15":{"orden":"15","titulo":"Comparing different versions with git diff","tituloCorto":"Git diff","tareas":["Did you notice something different in your repository?","Looks like a team member has edited our my_plan.txt file and pushed the changes to the GitHub repository. Let\'s review the edits from our teammate before starting work.","Let\'s use the command git diff HEAD, where HEAD refers to the most recent commit."],"comando":"git diff HEAD","alert":"Did not use git diff","successMessages":["diff --git a/my_plan.txt b/my_plan.txt","index 7d8d808..e725ef6 100644","--- a/my_plan.txt","+++ b/my_plan.txt","@@ -1 +1 @@","-Monthly meetings","+Meetings twice a month"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"september_plans":["development.txt"]},{"october_plans":["mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],"commits":["20b5ccd - Added my_plan.txt","3852b4d - Added all text files","7d8d808 - Edited meetings frequency in my_plan.txt"]}},"16":{"orden":"16","titulo":"Reverting changes","tituloCorto":"Git checkout","tareas":["So we now know how to see review changes. Now, imagine that, after working for a few minutes updating the content of monthly_meetings.txt, you realize that you made a mistake. Not to worry; we can revert these changes with a Git command.","Type git checkout, followed by the name of the file that you need to revert your changes to."],"comando":"git checkout \\"monthly_meetings.txt\\"","alert":"Did not use git checkout","successMessages":["Reverted changes"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"september_plans":["development.txt"]},{"october_plans":["mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],"commits":["20b5ccd - Added my_plan.txt","3852b4d - Added all text files","7d8d808 - Edited meetings frequency in my_plan.txt"]}},"17":{"orden":"17","titulo":"Working with branches","tituloCorto":"Branching","tareas":["Remember we said that Git allows a work team to work on the same code simultaneously without conflicts? This is made possible with the Git branching model.","Git allows the creation of branches. Branches. Branches are complete copies of the code that can be used to work on, independently of the original version.","How about creating a branch? Type the command git branch, followed by the branch names. Let\'s name our branch my_version."],"comando":"git branch my_version","alert":"Did not use git branch","successMessages":["Created branch"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"september_plans":["development.txt"]},{"october_plans":["mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],"commits":["20b5ccd - Added my_plan.txt","3852b4d - Added all text files","7d8d808 - Edited meetings frequency in my_plan.txt"]}},"18":{"orden":"18","titulo":"Switching branches","tituloCorto":"Branching #2","tareas":["We have created a new branch. As you can see at the right panel, in the Root folder section, we are still working on the main, or master branch. To use our newly created branch, we have to switch to it.","Type git checkout, followed by the branch name"],"comando":"git checkout my_version","alert":"Did not use git checkout","successMessages":["Switched to branch \'my_version\'"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"september_plans":["development.txt"]},{"october_plans":["mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],"commits":["20b5ccd - Added my_plan.txt","3852b4d - Added all text files","7d8d808 - Edited meetings frequency in my_plan.txt"]}},"19":{"orden":"19","titulo":"Committing changes to our branch","tituloCorto":"Branching #3","tareas":["As you can see, now we are working in our own branch. How about improving the structure of our project? We have created a folder named tasks, where we can move the files that are currently located in september_plans and october_plans.","As you can see on the Root folder section, we have already done this. Now, instead of adding the files to the Stage and then committing them, Git allows us to use the -a argument for the git commit command, which will add all the changed files to Stage and then commit the changes.","Commit the changes using the -a option and the message: Reorganized project."],"comando":"git commit -a -m \\"Reorganized project\\"","alert":"Did not use git commit","successMessages":["[my_version a5cd2f1] Reorganized project","  2 files changed, 0 insertions(+), 0 deletions(-)","  rename {1 => tasks}/development.txt","  rename {1 => tasks}/mockup.txt"],"repoStatus":{"branch":"my_version","repoFolder":[{".git":[]},{"tareas":["development.txt","mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],"commits":["20b5ccd - Added my_plan.txt","3852b4d - Added all text files","7d8d808 - Edited meetings frequency in my_plan.txt","a5cd2f1 - Reorganizar el proyecto"]}},"20":{"orden":"20","titulo":"Switching to master branch","tituloCorto":"Branching #4","tareas":["After committing our changes to our branch, we should merge it with the main branch, so that the rest of our team all have the same project structure. Let\'s switch to the main branch with the command git checkout master."],"comando":"git checkout master","alert":"Did not use git checkout","successMessages":["Switched to branch \'master\'"],"repoStatus":{"branch":"my_version","repoFolder":[{".git":[]},{"tareas":["development.txt","mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],"commits":["20b5ccd - Added my_plan.txt","3852b4d - Added all text files","7d8d808 - Edited meetings frequency in my_plan.txt"]}},"21":{"orden":"21","titulo":"Merging changes to the Master branch","tituloCorto":"Git merge","tareas":["As you can see, the branch master has not been altered, so the changes we did in our own branch are not reflected to the master\'s branch folder structure. Let\'s apply our changes to the master branch!","Type git merge. With this command, the changes in the branch my_version will be merged with the master. branch"],"comando":"git merge my_version","alert":"Did not use git merge","successMessages":["Updating 7d8d808..ec6888b","Fast-forward","  {1 => tasks}/development.txt | 0","  {1 => tasks}/mockup.txt | 0","  2 files changed, 0 insertions(+), 0 deletions(-)","  rename {1 => tasks}/development.txt","  rename {1 => tasks}/mockup.txt"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"september_plans":["development.txt"]},{"october_plans":["mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],"commits":["20b5ccd - Added my_plan.txt","3852b4d - Added all text files","7d8d808 - Edited meetings frequency in my_plan.txt"]}},"22":{"orden":"22","titulo":"Deleting unused branches","tituloCorto":"Deleting branches","tareas":["We have merged our changes with the main branch, so we won\'t be using mi_vesion anymore. Let\'s remove this branch.","It is a good practice to delete unused branches, as, as our project increases, having many branches can be hard to maintain and many of the older branches can be left behind in updates.","Type git branch -d, followed by the name of the branch we want to delete: my_version."],"comando":"git branch -d my_version","alert":"Did not use git branch","successMessages":["Deleted branch my_version (was a5cd2f1)."],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"tareas":["development.txt","mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],"commits":["20b5ccd - Added my_plan.txt","3852b4d - Added all text files","7d8d808 - Edited meetings frequency in my_plan.txt","a5cd2f1 - Reorganized project"]}},"23":{"orden":"23","titulo":"Sharing our project","tituloCorto":"Git push #2","tareas":["We have now made all the necessary changes to our project, so it is time to share the repository with our team so that we can all work in it.","Let\'s upload our repository to GitHub."],"comando":"git push","alert":"Did not use git push","successMessages":["To https://github.com/4geeksAcademy/project.git","a5cd2f1..a629e2a master -> master"],"repoStatus":{"branch":"master","repoFolder":[{".git":[]},{"tareas":["development.txt","mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],"commits":["20b5ccd - Added my_plan.txt","3852b4d - Added all text files","7d8d808 - Edited meetings frequency in my_plan.txt","a5cd2f1 - Reorganized project"]}}}}}')},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={title:"",text:"",type:null,allowOutsideClick:!1,showConfirmButton:!0,showCancelButton:!1,closeOnConfirm:!0,closeOnCancel:!0,confirmButtonText:"OK",confirmButtonColor:"#8CD4F5",cancelButtonText:"Cancel",imageUrl:null,imageSize:null,timer:null,customClass:"",html:!1,animation:!0,allowEscapeKey:!0,inputType:"text",inputPlaceholder:"",inputValue:"",showLoaderOnConfirm:!1},e.exports=t.default},function(e,t,o){"use strict";o.r(t);o(6);var a=o(3);window.onload=()=>function(){function e(e){return new URLSearchParams(window.location.search).get(e)}let t=e("lang")||document.querySelector("#lang").value||"defaultLang";console.log("Language selected: "+t);var o=a.lecciones[t],s=a.config,n=1,r=function(e){let t,o=0;for(t in e)e.hasOwnProperty(t)&&o++;return o}(o),i=0,l=100/r,d=[],c=1,u=document.querySelector("nav"),m=document.querySelector(".console-area"),p=document.querySelector("#console-input"),g=document.querySelector(".tareas"),h=document.querySelector(".branch"),b=document.querySelector("#repository .repo-status .repo-folder"),f=document.querySelector("#repository .repo-status .staged"),y=document.querySelector("#repository .repo-status .commits");const v=document.querySelector("#lang");v.addEventListener("change",()=>{t=v.value,o=a.lecciones[t];const e=new URL(window.location);if(e.searchParams.set("lang",t),window.history.pushState({},"",e),m.appendChild(C()),S(),_(),A(f,"h3"),null!=o[n].repoStatus.staged){let e=document.createElement("ul");for(let t=0;t50?e.innerHTML=o[n].comando.substring(0,41)+"...":e.innerHTML=o[n].comando,A(g);for(var a=0;a{if(u.classList.contains("expanded")){e.stopPropagation(),u.scrollTop=0,m.appendChild(C()),S(),i=((n=t)-1)*l,document.querySelector("#myBar").style.width=i+"%",_(),A(f,"h3");let a=n-1<1?1:n-1;if(null!=o[a].repoStatus.staged){let e=k(o[a].repoStatus.staged);f.appendChild(e)}else{let e=document.createElement("ul"),t=q("li",s.emptyStageAreaMessage);e.appendChild(t).classList.add("commit"),f.appendChild(e)}if(A(y,"h3"),null!=o[a].repoStatus.commits){let e=document.createElement("ul");for(let t=0;t',n>r?(document.querySelector(".main-menu ul li:last-child a").classList.remove("learning"),document.querySelector(".main-menu ul li:last-child a").classList.add("completed"),setTimeout((function(){sweetAlert({title:"Congratulations!",text:s.tutorialCompletedMessage,html:!0,type:"success",showConfirmButton:!0})}),5e3)):(_(),S(),p.value="",p.focus())}),1e3)}function S(){(p=document.querySelector("#console-input")).addEventListener("keydown",e=>{if(13===e.keyCode){if(e.preventDefault(),p.value.trim().length<1)return;if("clear"===p.value.trim())return m.appendChild(C()),S(),void p.focus();if("clear"===p.value.trim())return m.appendChild(C()),S(),void p.focus();p.value.trim()===o[n].comando?(d.push(p.value),w("pass")):(d.push(p.value),w())}38===e.keyCode&&c<=d.length&&d.length>0&&(p.value="",p.value=d[d.length-c],c++)})}function C(){A(m);let e=document.createElement("div");e.classList.add("current-line");let t=document.createElement("img");t.setAttribute("src","./img/logo-blue.png");let o=document.createElement("textarea");return e.appendChild(t).classList.add("line-marker"),o.id="console-input",o.setAttribute("autocomplete","off"),o.setAttribute("autocorrect","off"),o.setAttribute("autocapitalize","off"),o.setAttribute("spellcheck","false"),e.appendChild(o),e}function q(e,t){let o=document.createElement(e);return o.innerHTML=t,o}function A(e,t){var o=0;if(0!==e.childElementCount)for(let a=0;o{e.target.nextSibling.classList.toggle("closed")}),t.appendChild(e).classList.add("folder"),a[s].length>0){let e=document.createElement("li"),o=k(a[s]);e.classList.add("closed"),e.appendChild(o),t.appendChild(e)}else if(".git"===s){let e=document.createElement("li");e.classList.add("closed");let o=q("ul",'
  • Too many files to show! LOL
  • ');e.appendChild(o),t.appendChild(e)}else{let e=document.createElement("li");e.classList.add("closed");let o=q("ul",'
  • Empty folder
  • ');e.appendChild(o),t.appendChild(e)}}else{let e=q("li",a);t.appendChild(e).classList.add("file")}}return t}v.value=x,v.dispatchEvent(new Event("change")),_(),S(),document.querySelector("#repository .header .title").innerHTML=s.repoName,setTimeout((function(){document.body.style.opacity=1}),1e3),document.querySelector(".comando").addEventListener("click",()=>{p.value="",p.classList.add("typed"),p.value=o[n].comando,setTimeout((function(){p.classList.remove("typed"),p.focus()}),1e3)}),u.addEventListener("click",e=>{!1===u.classList.contains("expanded")&&u.classList.toggle("expanded")}),document.querySelector("main").addEventListener("click",()=>{u.classList.remove("expanded"),u.scrollTop=0}),document.querySelector("#showNavbar").addEventListener("mouseover",()=>{setTimeout((function(){u.classList.add("expanded")}),100)}),document.querySelector("#showNavbar").addEventListener("mouseleave",()=>{u.classList.remove("expanded")}),document.querySelector(".hide-repo").addEventListener("click",()=>{let e=document.querySelector(".column-1"),t=document.querySelector(".column-2");document.querySelector(".show-repo").classList.toggle("hidden"),e.style.width="100%",e.style.flexDirection="row",t.classList.toggle("hidden");let o=document.querySelector("#instrucciones"),a=document.querySelector("#terminal");o.style.flex="2",o.style.height="100%",m.style.height="100%",a.style.flex="3",a.style.height="100%",a.style.marginTop="38.39px"}),document.querySelector(".show-repo").addEventListener("click",()=>{let e=document.querySelector(".column-1"),t=document.querySelector(".column-2"),o=document.querySelector("#instrucciones"),a=document.querySelector("#terminal");e.style.width="70%",e.style.flexDirection="column",o.style.flex="3",o.style.height="auto",a.style.flex="2",a.style.marginTop="0",setTimeout((function(){t.classList.toggle("hidden")}),900),document.querySelector(".show-repo").classList.toggle("hidden")})}()},function(e,t,o){"use strict";var a=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s,n,r,i,l=o(0),d=o(1),c=o(2),u=o(8),m=a(o(9)),p=a(o(4)),g=a(o(10));t.default=r=i=function(){var e=arguments[0];function t(t){var o=e;return void 0===o[t]?p.default[t]:o[t]}if(l.addClass(document.body,"stop-scrolling"),c.resetInput(),void 0===e)return d.logStr("SweetAlert expects at least 1 attribute!"),!1;var o=d.extend({},p.default);switch(typeof e){case"string":o.title=e,o.text=arguments[1]||"",o.type=arguments[2]||"";break;case"object":if(void 0===e.title)return d.logStr('Missing "title" argument!'),!1;for(var a in o.title=e.title,p.default)o[a]=t(a);o.confirmButtonText=o.showCancelButton?"Confirm":p.default.confirmButtonText,o.confirmButtonText=t("confirmButtonText"),o.doneFunction=arguments[1]||null;break;default:return d.logStr('Unexpected type of argument! Expected "string" or "object", got '+typeof e),!1}g.default(o),c.fixVerticalPosition(),c.openModal(arguments[1]);for(var r=c.getModal(),h=r.querySelectorAll("button"),b=["onclick","onmouseover","onmouseout","onmousedown","onmouseup","onfocus"],f=function(e){return u.handleButton(e,o,r)},y=0;y"),i.innerHTML=e.html?e.text:n.escapeHtml(e.text||"").split("\n").join("
    "),e.text&&n.show(i),e.customClass)n.addClass(t,e.customClass),t.setAttribute("data-custom-class",e.customClass);else{var c=t.getAttribute("data-custom-class");n.removeClass(t,c),t.setAttribute("data-custom-class","")}if(n.hide(t.querySelectorAll(".sa-icon")),e.type&&!a.isIE8()){var u=function(){for(var o=!1,a=0;a=0;)o=o.replace(" "+t+" "," ");e.className=o.replace(/^\s+|\s+$/g,"")}},t.escapeHtml=function(e){var t=document.createElement("div");return t.appendChild(document.createTextNode(e)),t.innerHTML},t._show=s,t.show=function(e){if(e&&!e.length)return s(e);for(var t=0;t0?setTimeout(a,t):e.style.display="none"});a()},t.fireClick=function(e){if("function"==typeof MouseEvent){var t=new MouseEvent("click",{view:window,bubbles:!1,cancelable:!0});e.dispatchEvent(t)}else if(document.createEvent){var o=document.createEvent("MouseEvents");o.initEvent("click",!1,!1),e.dispatchEvent(o)}else document.createEventObject?e.fireEvent("onclick"):"function"==typeof e.onclick&&e.onclick()},t.stopEventPropagation=function(e){"function"==typeof e.stopPropagation?(e.stopPropagation(),e.preventDefault()):window.event&&window.event.hasOwnProperty("cancelBubble")&&(window.event.cancelBubble=!0)}},function(e){e.exports={config:{repoName:"my_project",_comment:"errorComando, in case of no command match",errorComando:"command not found",success:"Success!",emptyFolderMessage:"No files in this folder yet",emptyStageAreaMessage:"No files to commit",emptyCommitsAreaMessage:"Nothing commited yet",_comment2:"if user writes 'git', show following error",errorMessages:["usage: git [--version] [--exec-path[=<path>]]","            [-p|--paginate|--no-pager]","            [--git-dir=<path>] [--work-tree=<path>]","            [-c name=value] [--help]","            <command> [<args>]"," "],_comment3:"the following field must have the parragraph tag to work properly. You can add as many as you need.",tutorialCompletedMessage:"

    Well done!

    "},lecciones:{es:{1:{orden:"1",titulo:"¿Quieres aprender a usar Git?",tituloCorto:"¿Quieres aprender Git?",tareas:["Git es un sistema de control de versiones distribuido que permite a equipos de trabajo tratar con un mismo documento o código al mismo tiempo, evitando choques entre los miembros.","En la terminal que puedes ver en pantalla hemos creado un repositorio, un contendor de archivos. Para inicializar un repositorio en Git debes escribir el siguiente comando: git init."],comando:"git init",alert:"Did not create a Git repo",successMessages:["Initialized empty Git repository in /.git/"],repoStatus:{}},2:{orden:"2",titulo:"Revisando el status del repositorio",tituloCorto:"Revisando el status",tareas:["Bien hecho. Has logrado crear tu primer repositorio. Ahora en nuestro repositorio se ha creado una carpeta llamada /.git/. Si creas un repositorio en tu equipo, esta carpeta estará oculta. En ella se encuentran una serie de subdirectorios con archivos que contienen referencias a todos los cambios que han ocurrido en tu repositorio.","Ahora, usando el comando git status veamos cuál es el estado actual de nuestro repositorio."],comando:"git status",alert:"Did not use git status",successMessages:["# On branch master","#","# Initial commit","#","nothing to commit",'(create/copy files and use "git add" to track)'],repoStatus:{branch:"master",repoFolder:[{".git":[]},"mi_plan.txt"]}},3:{orden:"3",titulo:"Agregar archivos y hacer commit",tituloCorto:"Primer uso del repositorio",tareas:["Si a lo largo de este tutorial sientes que en tu terminal hay demasiado texto, puedes usar el comando clear para limpiar todo el contenido de ella.","Sigamos. Imagina que agregas un nuevo archivo llamado mi_plan.txt a tu repositorio.","Ahora, si usamos de nuevo el comando git status podrás notar que el estado de tu repositorio ha cambiado."],comando:"git status",alert:"Did not use git status",successMessages:["# On branch master","#","# Initial commit","#","# Untracked files:",'# (use "git add ..." to include files)',"#",'# mi_plan.txt',"nothing added to commit","but untracked files present","(use 'git add' to track)"],repoStatus:{branch:"master",repoFolder:[{".git":[]},"mi_plan.txt"]}},4:{orden:"4",titulo:"Haciendo cambios",tituloCorto:"Haciendo cambios",tareas:["¿Notaste cómo el archivo mi_plan.txt apareció como untracked en la terminal?","Eso significa que el archivo es nuevo y Git aún no está siguiendo sus cambios.","Para que Git pueda seguir todos los cambios que se realicen en el archivo, primero debemos agregarlo a la zona de preparación o Stage con el comando git add [nombre del archivo]."],comando:"git add mi_plan.txt",alert:"Did not add mi_plan.txt",successMessages:['¡Bien hecho! mi_plan.txt ha sido agregado al Stage'],repoStatus:{branch:"master",repoFolder:[{".git":[]},"mi_plan.txt"],staged:["mi_plan.txt"]}},5:{orden:"5",titulo:"Revisando los cambios",tituloCorto:"Revisando los cambios",tareas:["¡Excelente! Ahora que git ya está pendiente de los cambios de nuestro archivo, podemos usar de nuevo el comando git status para asegurarnos de que todo está bien."],comando:"git status",alert:"Did not use git status",successMessages:["# On branch master","#","# Initial commit","#","# Changes to be committed:",'# (use "git rm --cached ..." to unstage)',"#",'# new file: mi_plan.txt',"#"],repoStatus:{branch:"master",repoFolder:[{".git":[]},"mi_plan.txt"],staged:["mi_plan.txt"]}},6:{orden:"6",titulo:"Haciendo commit",tituloCorto:"Haciendo commit",tareas:["Ahora con tu archivo preparado y en el Stage podemos seguir con el siguiente paso, hacer commit.","Hacer commit es simplemente enviar nuestros cambios desde el Stage a nuestro repositorio. Si así quisieras, podrías agregar y quitar archivos del Stage antes de hacer commit.","Para guardar tus cambios en el repositorio usamos el comando git commit -m seguido de un mensaje que describa los cambios que hemos realizado. En este caso, solo hemos agregado un nuevo archivo, así que solo escribiremos Agregar mi_plan.txt entre comillas."],comando:'git commit -m "Agregar mi_plan.txt"',alert:"Did not use git commit",successMessages:["[master (root-commit) 20b5ccd] Agregar mi_plan.txt","1 file changed, 1 insertion(+)","create mode 100644 mi_plan.txt"," "],repoStatus:{branch:"master",repoFolder:[{".git":[]},"mi_plan.txt"],commits:["20b5ccd - Agregar mi_plan.txt"]}},7:{orden:"7",titulo:"Agregando varios archivos",tituloCorto:"Agregando varios archivos",tareas:["Nuestro repositorio ya tiene un commit. Pero ahora, imagina que has estado trabajando todo el día en tu proyecto y has terminado creando varios archivos de texto. Usar el comando git add para agregarlos uno a uno es bastante fastidioso, ¿verdad? Pues Git nos ofrece un metodo un poco más comodo.",'Para ello usaremos el comando git add "*.txt" el cual agregará todos los archivos de texto que hayan sido editados en nuestro repositorio.'],comando:'git add "*.txt"',alert:"Did not use git add",successMessages:['Archivos agregados'],repoStatus:{branch:"master",repoFolder:[{".git":[]},{planes_septiembre:["desarrollo.txt"]},{planes_octubre:["maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],staged:[{planes_septiembre:["desarrollo.txt"]},{planes_octubre:["maquetado.txt"]},"reuniones_del_mes.txt"],commits:["20b5ccd - Agregar mi_plan.txt"]}},8:{orden:"8",titulo:"Revertir el Stage",tituloCorto:"Git reset",tareas:["Así como git add envía tus archivos editados al Stage, existe el comando git reset que hace todo lo contrario. Retira los archivos del Stage.","Este comando puede recibir los mismos argumentos que hemos visto hasta ahora con git add.","Probemos retirando los archivos de texto que acabamos de agregar al Stage."],comando:"git reset",alert:"Did not use git reset",successMessages:['Los archivos de texto ya no están en el Stage'],repoStatus:{branch:"master",repoFolder:[{".git":[]},{planes_septiembre:["desarrollo.txt"]},{planes_octubre:["maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],commits:["20b5ccd - Agregar mi_plan.txt"]}},9:{orden:"9",titulo:"Agregando archivos de nuevo",tituloCorto:"Git add #2",tareas:["Como podrás notar nuestros archivos de texto ya no están en en la zona de preparación.","Ahora, volvamos a agregarlos."],comando:'git add "*.txt"',alert:"Did not use git add",successMessages:['Archivos agregados'],repoStatus:{branch:"master",repoFolder:[{".git":[]},{planes_septiembre:["desarrollo.txt"]},{planes_octubre:["maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],staged:[{planes_septiembre:["desarrollo.txt"]},{planes_octubre:["maquetado.txt"]},"reuniones_del_mes.txt"],commits:["20b5ccd - Agregar mi_plan.txt"]}},10:{orden:"10",titulo:"Volviendo a hacer commit",tituloCorto:"Haciendo commit #2",tareas:["Hagamos un commit con los nuevos cambios.","¿Qué te parece usar el mensaje Agregar todos los archivos de texto?"],comando:'git commit -m "Agregar todos los archivos de texto"',alert:"Did not use git commit",successMessages:["[master (root-commit) 3852b4d]","'Agregar todos los archivos de texto'","3 file changed, 3 insertion(+)","create mode 100644 desarrollo.txt","create mode 100644 maquetado.txt","create mode 100644 reuniones_del_mes.txt"," "],repoStatus:{branch:"master",repoFolder:[{".git":[]},{planes_septiembre:["desarrollo.txt"]},{planes_octubre:["maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],commits:["20b5ccd - Agregar mi_plan.txt","3852b4d - Agregar todos los archivos de texto"]}},11:{orden:"11",titulo:"Revisando el historial con git log",tituloCorto:"Usado git log",tareas:["¿Qué tal? Ya llevamos dos commits hasta ahora.","Git nos ofrece un comando que permite revisar un historial con todos los commits que hemos hecho hasta el momento en orden cronológico. Este comando es git log"],comando:"git log",alert:"Did not use git log",successMessages:['commit: 3852b4db1634463d0bb4d267edb7b3f9cd02ace1',"Author: 4Geeks Student ","Date: Fri Sep 19 18:30:00 2017 -0400","    Agregar mi_plan.txt"," ",'commit: b652edfd888cd3d5e7fcb857d0dabc5a0fcb5e28',"Author: 4Geeks Student ","Date: Thu Sep 18 18:00:32 2017 -0400","    Agregar todos los archivos de texto"],repoStatus:{branch:"master",repoFolder:[{".git":[]},{planes_septiembre:["desarrollo.txt"]},{planes_octubre:["maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],commits:["20b5ccd - Agregar mi_plan.txt","3852b4d - Agregar todos los archivos de texto"]}},12:{orden:"12",titulo:"Manejando repositorios remotos",tituloCorto:"Git remote",tareas:["Bien, ya hemos aprendido los comandos más básicos de Git. Ahora veamos su utilidad práctica. Imagina que quieres que otras personas tengan acceso a tu repositorio. Para lograr debes subir nuestro repositorio a una plataforma como GitHub que se encarga resguardar repositorios publicos y privados en sus servidores.","Ahora, una vez creado un repositorio en GitHub tendremos que asociarlo a nuestro repositorio local, para ello usamos git remote add seguido del nombre con el cual queremos asociar el repositorio remoto que deseamos agregar y de su URL. Se acostumbra llamar al repositorio remoto principal origin, así que haremos eso. Y su URL es https://github.com/4geeksAcademy/project.git. Esta vez no son necesarias las comillas."],comando:"git remote add origin https://github.com/4geeksAcademy/project.git",alert:"Did not use git remote add",successMessages:['Repositorio agregado con éxito'],repoStatus:{branch:"master",repoFolder:[{".git":[]},{planes_septiembre:["desarrollo.txt"]},{planes_octubre:["maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],commits:["20b5ccd - Agregar mi_plan.txt","3852b4d - Agregar todos los archivos de texto"]}},13:{orden:"13",titulo:"Usando git push",tituloCorto:"Git push",tareas:["Una vez asociado nuestro repositorio local solo tenemos que subir nuestros archivos locales a ese repositorio en línea, a esto se le llama hacer un push.","Para hacerlo usamos el comando git push -u seguido del nombre del repositorio remoto a donde queremos hacer el push (origin) y luego el nombre de la rama del repositorio local donde están nuestros archivos. Por defecto, al inicializar un repositorio se crea una rama local llamada master, allí están nuestros documentos.","¿Qué tal si lo intentas?"],comando:"git push -u origin master",alert:"Did not use git push",successMessages:["Branch master set up to track remote branch"],repoStatus:{branch:"master",repoFolder:[{".git":[]},{planes_septiembre:["desarrollo.txt"]},{planes_octubre:["maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],commits:["20b5ccd - Agregar mi_plan.txt","3852b4d - Agregar todos los archivos de texto"]}},14:{orden:"14",titulo:"Usando git pull",tituloCorto:"Git pull",tareas:["Es bueno que siempre trabajes con la versión más actual de tu repositorio, es por ello que antes de hacer cualquier cosa siempre actualices tu repositorio local porque tal vez algún miembro de tu equipo ha realizado algún cambio importante","Para actualizar nuestro repositorio local usamos git pull seguido del nombre del repositorio en línea de donde copiaremos los archivos (origin) y luego el nombre de la rama de nuestro repositorio local donde deseamos que se copien (master)."],comando:"git pull origin master",alert:"Did not use git pull",successMessages:["Updating 3852b4d..3e70b0f","Fast-forward",'  resumen_mensual.txt | 1+',"  1 file changed, 1 insertion(+)","  create mode 100644 resumen_mensual.txt"],repoStatus:{branch:"master",repoFolder:[{".git":[]},{planes_septiembre:["desarrollo.txt"]},{planes_octubre:["maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],commits:["20b5ccd - Agregar mi_plan.txt","3852b4d - Agregar todos los archivos de texto","7d8d808 - Editar frecuencia de reuniones en mi_plan.txt"]}},15:{orden:"15",titulo:"Observando las ediciones con git diff",tituloCorto:"Git diff",tareas:["¿Notas algo diferente en la carpeta de tu repositorio?","Parece que un miembro de tu equipo ha editado nuestro archivo mi_plan.txt y ha hecho un push al repositorio en GitHub. Antes de comenzar a trabajar creo que mejor revisamos qué cambios realizó nuestro compañero.","Para ello podemos usar el comando git diff HEAD donde HEAD es una referencia al commit más reciente."],comando:"git diff HEAD",alert:"Did not use git diff",successMessages:["diff --git a/mi_plan.txt b/mi_plan.txt","index 7d8d808..e725ef6 100644","--- a/mi_plan.txt","+++ b/mi_plan.txt",'@@ -1 +1 @@','-Realizar reuniones mensuales','+Realizar reuniones quincenales'],repoStatus:{branch:"master",repoFolder:[{".git":[]},{planes_septiembre:["desarrollo.txt"]},{planes_octubre:["maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],commits:["20b5ccd - Agregar mi_plan.txt","3852b4d - Agregar todos los archivos de texto","7d8d808 - Editar frecuencia de reuniones en mi_plan.txt"]}},16:{orden:"16",titulo:"Eliminando cambios",tituloCorto:"Git checkout",tareas:["Bien, ya podemos ver las diferencias. Ahora, imagina que luego de unos minutos de trabajo has realizado un par de cambios en reuniones_del_mes.txt, pero resulta que has cometido un error. Podemos deshacer estos cambios con un comando de Git.","Para ello, usamos el comando git checkout seguido del nombre del archivo al cual deseas eliminarle los cambios."],comando:'git checkout "reuniones_del_mes.txt"',alert:"Did not use git checkout",successMessages:['Cambios eliminados'],repoStatus:{branch:"master",repoFolder:[{".git":[]},{planes_septiembre:["desarrollo.txt"]},{planes_octubre:["maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],commits:["20b5ccd - Agregar mi_plan.txt","3852b4d - Agregar todos los archivos de texto","7d8d808 - Editar frecuencia de reuniones en mi_plan.txt"]}},17:{orden:"17",titulo:"Trabajando con ramas",tituloCorto:"Ramificación",tareas:["¿Recuerdas que dijimos que Git permitía a un equipo de trabajo tratar con un mismo código sin problemas? Bueno, esto es posible gracias a la ramificación del código.","Git permite crear ramas o branches. Estas son copias de tu código en las que puedes trabajar sin afectar la versión original.","¿Por qué no creamos una? Para ello usa el comando git branch seguido del nombre de la rama. Llamaremos a la nuestra mi_version."],comando:"git branch mi_version",alert:"Did not use git branch",successMessages:['Rama creada'],repoStatus:{branch:"master",repoFolder:[{".git":[]},{planes_septiembre:["desarrollo.txt"]},{planes_octubre:["maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],commits:["20b5ccd - Agregar mi_plan.txt","3852b4d - Agregar todos los archivos de texto","7d8d808 - Editar frecuencia de reuniones en mi_plan.txt"]}},18:{orden:"18",titulo:"Cambiando de ramas",tituloCorto:"Ramificación #2",tareas:["Bien, hemos creado una nueva rama. Pero como puedes ver a tu derecha en la sección Root folder aún seguimos en la rama principal master. Si queremos trabajar con nuestra copia debemos cambiar de rama.","Para hacerlo usamos el comando git checkout seguido del nombre de la rama."],comando:"git checkout mi_version",alert:"Did not use git checkout",successMessages:["Switched to branch 'mi_version'"],repoStatus:{branch:"master",repoFolder:[{".git":[]},{planes_septiembre:["desarrollo.txt"]},{planes_octubre:["maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],commits:["20b5ccd - Agregar mi_plan.txt","3852b4d - Agregar todos los archivos de texto","7d8d808 - Editar frecuencia de reuniones en mi_plan.txt"]}},19:{orden:"19",titulo:"Realizando cambios en nuestra rama",tituloCorto:"Ramificación #3",tareas:["Como podrás notar, ya estamos en nuestra rama. Ahora, ¿qué tal si organizamos un poco mejor nuestro proyecto? Hemos creado una carpeta llamada tareas y allí moveremos los archivos que están en planes_septiembre y planes_octubre.","Hemos hecho esto por ti, como puedes ver en Root folder. Ahora, a veces es algo tedioso tener que agregar los archivos al Stage y luego hacer commit. Es por ello que Git nos permie agregar -a al comando git commit el cual se hará cargo de agregar todos los archivos editados al Stage e inmediatamente hacer commit.","Bien, ejecuta el comando correspodiente y agrega el mensaje: Reorganizar el proyecto."],comando:'git commit -a -m "Reorganizar el proyecto"',alert:"Did not use git commit",successMessages:["[mi_version a5cd2f1] Reorganizar proyecto","  2 files changed, 0 insertions(+), 0 deletions(-)","  rename {1 => tareas}/desarrollo.txt","  rename {1 => tareas}/maquetado.txt"],repoStatus:{branch:"mi_version",repoFolder:[{".git":[]},{tareas:["desarrollo.txt","maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],commits:["20b5ccd - Agregar mi_plan.txt","3852b4d - Agregar todos los archivos de texto","7d8d808 - Editar frecuencia de reuniones en mi_plan.txt","a5cd2f1 - Reorganizar el proyecto"]}},20:{orden:"20",titulo:"Regresando a la rama principal",tituloCorto:"Ramificación #4",tareas:["Ahora que ya hemos hecho un commit de nuestros cambios, debemos unirlo a la rama principal para que todo nuestro equipo trabaje con la misma estructura. Para ello primero debemos regresar a la rama principal usando el comando git checkout master."],comando:"git checkout master",alert:"Did not use git checkout",successMessages:["Switched to branch 'master'"],repoStatus:{branch:"mi_version",repoFolder:[{".git":[]},{tareas:["desarrollo.txt","maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],commits:["20b5ccd - Agregar mi_plan.txt","3852b4d - Agregar todos los archivos de texto","7d8d808 - Editar frecuencia de reuniones en mi_plan.txt"]}},21:{orden:"21",titulo:"Uniendo nuestros cambios a Master",tituloCorto:"Git merge",tareas:["Como podrás ver la rama master no ha sido alternada y todavía tiene la versión anterior de la estructura de nuestras carpetas. ¿Qué tal si aplicamos los cambios que hicimos en nuestra versión a la rama principal?","Para ello usa el comando git merge. Esto lo que hará será tomar los cambios realizados en mi_version y unirlos a master."],comando:"git merge mi_version",alert:"Did not use git merge",successMessages:["Updating 7d8d808..ec6888b","Fast-forward","  {1 => tareas}/desarrollo.txt | 0","  {1 => tareas}/maquetado.txt | 0","  2 files changed, 0 insertions(+), 0 deletions(-)","  rename {1 => tareas}/desarrollo.txt","  rename {1 => tareas}/maquetado.txt"],repoStatus:{branch:"master",repoFolder:[{".git":[]},{planes_septiembre:["desarrollo.txt"]},{planes_octubre:["maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],commits:["20b5ccd - Agregar mi_plan.txt","3852b4d - Agregar todos los archivos de texto","7d8d808 - Editar frecuencia de reuniones en mi_plan.txt"]}},22:{orden:"22",titulo:"Eliminando ramas en desuso",tituloCorto:"Eliminan ramas",tareas:["Ya que hemos unido nuestros cambios a la rama principal y ya no usaremos más mi_vesion, ¿por qué no eliminamos esa rama?","Siempre es bueno eliminar ramas en desuso, ya que a lo largo de un proyecto pueden generarse muchas ramas y debemos evitar que nuestros compañeros se confundan al usar ramas desactualizadas.","Para ello usamos el comando git branch -d seguido del nombre de la rama a eliminar: mi_version."],comando:"git branch -d mi_version",alert:"Did not use git branch",successMessages:["Deleted branch mi_version (was a5cd2f1)."],repoStatus:{branch:"master",repoFolder:[{".git":[]},{tareas:["desarrollo.txt","maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],commits:["20b5ccd - Agregar mi_plan.txt","3852b4d - Agregar todos los archivos de texto","7d8d808 - Editar frecuencia de reuniones en mi_plan.txt","a5cd2f1 - Reorganizar el proyecto"]}},23:{orden:"23",titulo:"Compartiendo nuestro proyecto",tituloCorto:"Git push #2",tareas:["Ya habiendo realizado todos los cambios necesarios es hora de que nuestro equipo comience a trabajar con nuestro repositorio.","Así que subamoslo a GitHub para ponernos en marcha."],comando:"git push",alert:"Did not use git push",successMessages:["To https://github.com/4geeksAcademy/project.git","a5cd2f1..a629e2a master -> master"],repoStatus:{branch:"master",repoFolder:[{".git":[]},{tareas:["desarrollo.txt","maquetado.txt"]},"reuniones_del_mes.txt","mi_plan.txt"],commits:["20b5ccd - Agregar mi_plan.txt","3852b4d - Agregar todos los archivos de texto","7d8d808 - Editar frecuencia de reuniones en mi_plan.txt","a5cd2f1 - Reorganizar el proyecto"]}}},en:{1:{orden:"1",titulo:"Want to learn some Git?",tituloCorto:"Learn Git",tareas:["Git is a distributed version control system that allows people and teams to collaborate, editing the same document or code at the same time, without conflicts,","In the terminal displayed on the lower part of your screen, we have created a repository, a container of files. To initialize the repository, type the following command: git init."],comando:"git init",alert:"Did not create a Git repo",successMessages:["Initialized empty Git repository in /.git/"],repoStatus:{}},2:{orden:"2",titulo:"Checking your repo",tituloCorto:"Repo status",tareas:["Well done. You have created your first repository. The git init command adds a hidden subfolder within the existing directory named /.git/. If you create a git repository in your computer, this folder will be hidden. This hidden folder contains subfolders and files that reference every change you did in your repository after initializing it.","Now let's check the current status of our repository with the command: git status."],comando:"git status",alert:"Did not use git status",successMessages:["# On branch master","#","# Initial commit","#","nothing to commit",'(create/copy files and use "git add" to track)'],repoStatus:{branch:"master",repoFolder:[{".git":[]},"my_plan.txt"]}},3:{orden:"3",titulo:"Start working on the new repo",tituloCorto:"Getting started",tareas:["If at any point during this tutorial you feel your terminal is too cluttered with text, you can clear its contents with the clear command.","Let's continue. Let's imagine we added a new file called my_plan.txt in the repository.","Use again the command git status now. You will notice that the status of the repository has changed ."],comando:"git status",alert:"Did not use git status",successMessages:["# On branch master","#","# Initial commit","#","# Untracked files:",'# (use "git add ..." to include files)',"#",'# my_plan.txt',"nothing added to commit","but untracked files present","(use 'git add' to track)"],repoStatus:{branch:"master",repoFolder:[{".git":[]},"my_plan.txt"]}},4:{orden:"4",titulo:"Adding and updating files",tituloCorto:"Adding and updating files",tareas:["The output of the git status command is telling us that my_plan.txt is untracked","This means that the new file has not yet been added to the Git tracking process","To have Git to track this file, type the command git add [file name]. This process is called Staging, or moving files to the Staging index tree, meaning our changes are ready to be committed"],comando:"git add my_plan.txt",alert:"Did not add my_plan.txt",successMessages:['Well done! my_plan.txt has been Staged'],repoStatus:{branch:"master",repoFolder:[{".git":[]},"my_plan.txt"],staged:["my_plan.txt"]}},5:{orden:"5",titulo:"Reviewing changes",tituloCorto:"Reviewing changes",tareas:["Excellent! Now that we made Git aware of the changes in our file, let's check again the status with the git status command to make sure everything is good."],comando:"git status",alert:"Did not use git status",successMessages:["# On branch master","#","# Initial commit","#","# Changes to be committed:",'# (use "git rm --cached ..." to unstage)',"#",'# new file: my_plan.txt',"#"],repoStatus:{branch:"master",repoFolder:[{".git":[]},"my_plan.txt"],staged:["my_plan.txt"]}},6:{orden:"6",titulo:"Committing your staged changes",tituloCorto:"Committing changes",tareas:["Now that our changes are Staged, we are ready to commit the changes.","Commit means simply to that our Staged changes are ready to be added to our repository. If you wish, you can add or remove files and add them to the Staging index them as necessary before committing the changes","To save the changes in our repository, use the command git commit -m followed by a commit message that briefly states what exactly happened in between the last version and this. In this case, we added a new archive in an empty repository, so the commit message will be simple: Added my_plan.txt (enclosed in double quotes)."],comando:'git commit -m "Added my_plan.txt"',alert:"Did not use git commit",successMessages:["[master (root-commit) 20b5ccd] Added my_plan.txt","1 file changed, 1 insertion(+)","create mode 100644 my_plan.txt"," "],repoStatus:{branch:"master",repoFolder:[{".git":[]},"my_plan.txt"],commits:["20b5ccd - Added my_plan.txt"]}},7:{orden:"7",titulo:"Adding multiple files",tituloCorto:"Adding multiple files",tareas:["Our repository already has one commit. But what if you have been working all day in this project, and now you have a few new text files to commit? Adding them one by one with the git add command is quite tedious, right? No worries, Git has a better method to add multiple files.",'Type the command git add "*.txt", in order to add all the text tiles that have been added or edited in our repository.'],comando:'git add "*.txt"',alert:"Did not use git add",successMessages:[''],repoStatus:{branch:"master",repoFolder:[{".git":[]},{september_plans:["development.txt"]},{october_plans:["mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],staged:[{september_plans:["development.txt"]},{october_plans:["mockup.txt"]},"monthly_meetings.txt"],commits:["20b5ccd - Added my_plan.txt"]}},8:{orden:"8",titulo:"Revert to Stage",tituloCorto:"Git reset",tareas:["We know that the git add command sends edited files to the Staging index. The command git reset does the the exact opposite: It reverts to the previous state of Stage.","This command accepts the same arguments as git add.","Let's try to reset the last files we added to Stage."],comando:"git reset",alert:"Did not use git reset",successMessages:['Text files were removed from Stage'],repoStatus:{branch:"master",repoFolder:[{".git":[]},{september_plans:["development.txt"]},{october_plans:["mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],commits:["20b5ccd - Added my_plan.txt"]}},9:{orden:"9",titulo:"Adding files again",tituloCorto:"Git add #2",tareas:["As you see on the right panel, our files are not anymore on the Staging index.","Let's add them again."],comando:'git add "*.txt"',alert:"Did not use git add",successMessages:['Added files'],repoStatus:{branch:"master",repoFolder:[{".git":[]},{september_plans:["development.txt"]},{october_plans:["mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],staged:[{september_plans:["development.txt"]},{october_plans:["mockup.txt"]},"monthly_meetings.txt"],commits:["20b5ccd - Added my_plan.txt"]}},10:{orden:"10",titulo:"Committing newly staged changes",tituloCorto:"Committing files #2",tareas:["Let's commit our newly staged changes.","How about adding a more descriptive commit message, such as Added all text files?"],comando:'git commit -m "Added all text files"',alert:"Did not use git commit",successMessages:["[master (root-commit) 3852b4d]","'Added all text files'","3 file changed, 3 insertion(+)","create mode 100644 development.txt","create mode 100644 mockup.txt","create mode 100644 monthly_meetings.txt"," "],repoStatus:{branch:"master",repoFolder:[{".git":[]},{september_plans:["development.txt"]},{october_plans:["mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],commits:["20b5ccd - Added my_plan.txt","3852b4d - Added all text files"]}},11:{orden:"11",titulo:"Reviewing history of changes with git log",tituloCorto:"Using git log",tareas:["How about it? We have already done two commits.","Git has a command that allows us to review a log of all of our commits in chronological order. Type git log on the terminal:"],comando:"git log",alert:"Did not use git log",successMessages:['commit: 3852b4db1634463d0bb4d267edb7b3f9cd02ace1',"Author: 4Geeks Student ","Date: Fri Sep 19 18:30:00 2017 -0400","    Added my_plan.txt"," ",'commit: b652edfd888cd3d5e7fcb857d0dabc5a0fcb5e28',"Author: 4Geeks Student ","Date: Thu Sep 18 18:00:32 2017 -0400","    Added all text files"],repoStatus:{branch:"master",repoFolder:[{".git":[]},{september_plans:["development.txt"]},{october_plans:["mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],commits:["20b5ccd - Added my_plan.txt","3852b4d - Added all text files"]}},12:{orden:"12",titulo:"Managing remote repositories",tituloCorto:"Git remote",tareas:["Great, we have now learned the most basic Git commands. Let's put our knowledge in practice. Imagine that you need other people to access your repository. To do this, you have to upload the repository to a platform such as GitHub a service that hosts public and private repositories.","Once our Github repository is created, we have to associate it with our local repository. For this, we will use the git remote add command, followed by the name and the URL of the remote repository. Usually, the main remote repository is named origin. The URL of the remote repository should be https://github.com/4geeksAcademy/project.git (double quotes are not needed)"],comando:"git remote add origin https://github.com/4geeksAcademy/project.git",alert:"Did not use git remote add",successMessages:['Successfully added repository'],repoStatus:{branch:"master",repoFolder:[{".git":[]},{september_plans:["development.txt"]},{october_plans:["mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],commits:["20b5ccd - Added my_plan.txt","3852b4d - Added all text files"]}},13:{orden:"13",titulo:"Using git push",tituloCorto:"Git push",tareas:["After associating our local repository with the remote, we will upload our files to the remote, or push our local repository.","Type git push -u followed by the name of the remote repository (origin) and then the name of the local branch we want to push. When we initialize a repository, a local branch called master is created automatically, and contains our files.","Let's try it?"],comando:"git push -u origin master",alert:"Did not use git push",successMessages:["Branch master set up to track remote branch"],repoStatus:{branch:"master",repoFolder:[{".git":[]},{september_plans:["development.txt"]},{october_plans:["mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],commits:["20b5ccd - Added my_plan.txt","3852b4d - Added all text files"]}},14:{orden:"14",titulo:"Using git pull",tituloCorto:"Git pull",tareas:["It is a good practice to always work with the most recent version of your repository, to make sure that you are not ignoring possible important changes by a team member. This is easily done with Git, as we can update our local repository to match the content of the remote repository.","To update your local repository, type git pull, followed by the name of the remote repository(origin) and the name of the local branch where that will get updated (master)."],comando:"git pull origin master",alert:"Did not use git pull",successMessages:["Updating 3852b4d..3e70b0f","Fast-forward",'  monthly_summary.txt | 1+',"  1 file changed, 1 insertion(+)","  create mode 100644 monthly_summary.txt"],repoStatus:{branch:"master",repoFolder:[{".git":[]},{september_plans:["development.txt"]},{october_plans:["mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],commits:["20b5ccd - Added my_plan.txt","3852b4d - Added all text files","7d8d808 - Edited meetings frequency in my_plan.txt"]}},15:{orden:"15",titulo:"Comparing different versions with git diff",tituloCorto:"Git diff",tareas:["Did you notice something different in your repository?","Looks like a team member has edited our my_plan.txt file and pushed the changes to the GitHub repository. Let's review the edits from our teammate before starting work.","Let's use the command git diff HEAD, where HEAD refers to the most recent commit."],comando:"git diff HEAD",alert:"Did not use git diff",successMessages:["diff --git a/my_plan.txt b/my_plan.txt","index 7d8d808..e725ef6 100644","--- a/my_plan.txt","+++ b/my_plan.txt",'@@ -1 +1 @@','-Monthly meetings','+Meetings twice a month'],repoStatus:{branch:"master",repoFolder:[{".git":[]},{september_plans:["development.txt"]},{october_plans:["mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],commits:["20b5ccd - Added my_plan.txt","3852b4d - Added all text files","7d8d808 - Edited meetings frequency in my_plan.txt"]}},16:{orden:"16",titulo:"Reverting changes",tituloCorto:"Git checkout",tareas:["So we now know how to see review changes. Now, imagine that, after working for a few minutes updating the content of monthly_meetings.txt, you realize that you made a mistake. Not to worry; we can revert these changes with a Git command.","Type git checkout, followed by the name of the file that you need to revert your changes to."],comando:'git checkout "monthly_meetings.txt"',alert:"Did not use git checkout",successMessages:['Reverted changes'],repoStatus:{branch:"master",repoFolder:[{".git":[]},{september_plans:["development.txt"]},{october_plans:["mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],commits:["20b5ccd - Added my_plan.txt","3852b4d - Added all text files","7d8d808 - Edited meetings frequency in my_plan.txt"]}},17:{orden:"17",titulo:"Working with branches",tituloCorto:"Branching",tareas:["Remember we said that Git allows a work team to work on the same code simultaneously without conflicts? This is made possible with the Git branching model.","Git allows the creation of branches. Branches. Branches are complete copies of the code that can be used to work on, independently of the original version.","How about creating a branch? Type the command git branch, followed by the branch names. Let's name our branch my_version."],comando:"git branch my_version",alert:"Did not use git branch",successMessages:['Created branch'],repoStatus:{branch:"master",repoFolder:[{".git":[]},{september_plans:["development.txt"]},{october_plans:["mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],commits:["20b5ccd - Added my_plan.txt","3852b4d - Added all text files","7d8d808 - Edited meetings frequency in my_plan.txt"]}},18:{orden:"18",titulo:"Switching branches",tituloCorto:"Branching #2",tareas:["We have created a new branch. As you can see at the right panel, in the Root folder section, we are still working on the main, or master branch. To use our newly created branch, we have to switch to it.","Type git checkout, followed by the branch name"],comando:"git checkout my_version",alert:"Did not use git checkout",successMessages:["Switched to branch 'my_version'"],repoStatus:{branch:"master",repoFolder:[{".git":[]},{september_plans:["development.txt"]},{october_plans:["mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],commits:["20b5ccd - Added my_plan.txt","3852b4d - Added all text files","7d8d808 - Edited meetings frequency in my_plan.txt"]}},19:{orden:"19",titulo:"Committing changes to our branch",tituloCorto:"Branching #3",tareas:["As you can see, now we are working in our own branch. How about improving the structure of our project? We have created a folder named tasks, where we can move the files that are currently located in september_plans and october_plans.","As you can see on the Root folder section, we have already done this. Now, instead of adding the files to the Stage and then committing them, Git allows us to use the -a argument for the git commit command, which will add all the changed files to Stage and then commit the changes.","Commit the changes using the -a option and the message: Reorganized project."],comando:'git commit -a -m "Reorganized project"',alert:"Did not use git commit",successMessages:["[my_version a5cd2f1] Reorganized project","  2 files changed, 0 insertions(+), 0 deletions(-)","  rename {1 => tasks}/development.txt","  rename {1 => tasks}/mockup.txt"],repoStatus:{branch:"my_version",repoFolder:[{".git":[]},{tareas:["development.txt","mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],commits:["20b5ccd - Added my_plan.txt","3852b4d - Added all text files","7d8d808 - Edited meetings frequency in my_plan.txt","a5cd2f1 - Reorganizar el proyecto"]}},20:{orden:"20",titulo:"Switching to master branch",tituloCorto:"Branching #4",tareas:["After committing our changes to our branch, we should merge it with the main branch, so that the rest of our team all have the same project structure. Let's switch to the main branch with the command git checkout master."],comando:"git checkout master",alert:"Did not use git checkout",successMessages:["Switched to branch 'master'"],repoStatus:{branch:"my_version",repoFolder:[{".git":[]},{tareas:["development.txt","mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],commits:["20b5ccd - Added my_plan.txt","3852b4d - Added all text files","7d8d808 - Edited meetings frequency in my_plan.txt"]}},21:{orden:"21",titulo:"Merging changes to the Master branch",tituloCorto:"Git merge",tareas:["As you can see, the branch master has not been altered, so the changes we did in our own branch are not reflected to the master's branch folder structure. Let's apply our changes to the master branch!","Type git merge. With this command, the changes in the branch my_version will be merged with the master. branch"],comando:"git merge my_version",alert:"Did not use git merge",successMessages:["Updating 7d8d808..ec6888b","Fast-forward","  {1 => tasks}/development.txt | 0","  {1 => tasks}/mockup.txt | 0","  2 files changed, 0 insertions(+), 0 deletions(-)","  rename {1 => tasks}/development.txt","  rename {1 => tasks}/mockup.txt"],repoStatus:{branch:"master",repoFolder:[{".git":[]},{september_plans:["development.txt"]},{october_plans:["mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],commits:["20b5ccd - Added my_plan.txt","3852b4d - Added all text files","7d8d808 - Edited meetings frequency in my_plan.txt"]}},22:{orden:"22",titulo:"Deleting unused branches",tituloCorto:"Deleting branches",tareas:["We have merged our changes with the main branch, so we won't be using mi_vesion anymore. Let's remove this branch.","It is a good practice to delete unused branches, as, as our project increases, having many branches can be hard to maintain and many of the older branches can be left behind in updates.","Type git branch -d, followed by the name of the branch we want to delete: my_version."],comando:"git branch -d my_version",alert:"Did not use git branch",successMessages:["Deleted branch my_version (was a5cd2f1)."],repoStatus:{branch:"master",repoFolder:[{".git":[]},{tareas:["development.txt","mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],commits:["20b5ccd - Added my_plan.txt","3852b4d - Added all text files","7d8d808 - Edited meetings frequency in my_plan.txt","a5cd2f1 - Reorganized project"]}},23:{orden:"23",titulo:"Sharing our project",tituloCorto:"Git push #2",tareas:["We have now made all the necessary changes to our project, so it is time to share the repository with our team so that we can all work in it.","Let's upload our repository to GitHub."],comando:"git push",alert:"Did not use git push",successMessages:["To https://github.com/4geeksAcademy/project.git","a5cd2f1..a629e2a master -> master"],repoStatus:{branch:"master",repoFolder:[{".git":[]},{tareas:["development.txt","mockup.txt"]},"monthly_meetings.txt","my_plan.txt"],commits:["20b5ccd - Added my_plan.txt","3852b4d - Added all text files","7d8d808 - Edited meetings frequency in my_plan.txt","a5cd2f1 - Reorganized project"]}}}}}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.extend=function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);return e},t.hexToRgb=function(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?parseInt(t[1],16)+", "+parseInt(t[2],16)+", "+parseInt(t[3],16):null},t.isIE8=function(){return window.attachEvent&&!window.addEventListener},t.logStr=function(e){window.console&&window.console.log("SweetAlert: "+e)},t.colorLuminance=function(e,t){(e=String(e).replace(/[^0-9a-f]/gi,"")).length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),t=t||0;var o,a,s="#";for(a=0;a<3;a++)o=parseInt(e.substr(2*a,2),16),s+=("00"+(o=Math.round(Math.min(Math.max(0,o+o*t),255)).toString(16))).substr(o.length);return s}},function(e,t,o){"use strict";var a=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(2),n=o(0),r=a(o(4)),i=a(o(7)),l=function(){var e=document.createElement("div");for(e.innerHTML=i.default;e.firstChild;)document.body.appendChild(e.firstChild)},d=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=document.querySelector(".sweet-alert");return e||(l(),e=d()),e}),c=function(){var e=d();if(e)return e.querySelector("input")},u=function(){return document.querySelector(".sweet-overlay")},m=function(e){if(e&&13===e.keyCode)return!1;var t=d(),o=t.querySelector(".sa-input-error");n.removeClass(o,"show");var a=t.querySelector(".sa-error-container");n.removeClass(a,"show")};t.sweetAlertInitialize=l,t.getModal=d,t.getOverlay=u,t.getInput=c,t.setFocusStyle=function(e,t){var o=s.hexToRgb(t);e.style.boxShadow="0 0 2px rgba("+o+", 0.8), inset 0 0 0 1px rgba(0, 0, 0, 0.05)"},t.openModal=function(e){var t=d();n.fadeIn(u(),10),n.show(t),n.addClass(t,"showSweetAlert"),n.removeClass(t,"hideSweetAlert"),window.previousActiveElement=document.activeElement,t.querySelector("button.confirm").focus(),setTimeout(function(){n.addClass(t,"visible")},500);var o=t.getAttribute("data-timer");if("null"!==o&&""!==o){var a=e;t.timeout=setTimeout(function(){a&&"true"===t.getAttribute("data-has-done-function")?a(null):sweetAlert.close()},o)}},t.resetInput=function(){var e=d(),t=c();n.removeClass(e,"show-input"),t.value=r.default.inputValue,t.setAttribute("type",r.default.inputType),t.setAttribute("placeholder",r.default.inputPlaceholder),m()},t.resetInputError=m,t.fixVerticalPosition=function(){d().style.marginTop=n.getTopMargin(d())}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={title:"",text:"",type:null,allowOutsideClick:!1,showConfirmButton:!0,showCancelButton:!1,closeOnConfirm:!0,closeOnCancel:!0,confirmButtonText:"OK",confirmButtonColor:"#8CD4F5",cancelButtonText:"Cancel",imageUrl:null,imageSize:null,timer:null,customClass:"",html:!1,animation:!0,allowEscapeKey:!0,inputType:"text",inputPlaceholder:"",inputValue:"",showLoaderOnConfirm:!1},e.exports=t.default},function(e,t,o){"use strict";o.r(t);o(6);var a=o(1);window.onload=(()=>(function(){function e(e){const t=new URLSearchParams(window.location.search);return t.get(e)}let t=e("lang")||document.querySelector("#lang").value||"defaultLang";console.log(`Language selected: ${t}`,a),s=a.lecciones[t];var o=a.config,n=1,r=function(e){let t,o=0;for(t in e)e.hasOwnProperty(t)&&o++;return o}(s),i=0,l=100/r,d=[],c=1,u=document.querySelector("nav"),m=document.querySelector(".console-area"),p=document.querySelector("#console-input"),g=document.querySelector(".tareas"),h=document.querySelector(".branch"),b=document.querySelector("#repository .repo-status .repo-folder"),f=document.querySelector("#repository .repo-status .staged"),y=document.querySelector("#repository .repo-status .commits");const v=document.querySelector("#lang");v.addEventListener("change",()=>{if(!["en","es","us"].includes(v.value))return;t=v.value,s=a.lecciones[t];const e=new URL(window.location);if(e.searchParams.set("lang",t),window.history.pushState({},"",e),m.appendChild(C()),S(),_(),A(f,"h3"),void 0!=s[n].repoStatus.staged){let e=document.createElement("ul");for(let t=0;t50?d.innerHTML=s[n].comando.substring(0,41)+"...":d.innerHTML=s[n].comando,A(g);for(var c=0;c{if(u.classList.contains("expanded")){e.stopPropagation(),u.scrollTop=0,m.appendChild(C()),S(),i=((n=t)-1)*l,document.querySelector("#myBar").style.width=i+"%",_(),A(f,"h3");let a=n-1<1?1:n-1;if(void 0!=s[a].repoStatus.staged){let e=k(s[a].repoStatus.staged);f.appendChild(e)}else{let e=document.createElement("ul"),t=q("li",o.emptyStageAreaMessage);e.appendChild(t).classList.add("commit"),f.appendChild(e)}if(A(y,"h3"),void 0!=s[a].repoStatus.commits){let e=document.createElement("ul");for(let t=0;t',n>r?(document.querySelector(".main-menu ul li:last-child a").classList.remove("learning"),document.querySelector(".main-menu ul li:last-child a").classList.add("completed"),setTimeout(function(){sweetAlert({title:"Congratulations!",text:o.tutorialCompletedMessage,html:!0,type:"success",showConfirmButton:!0})},5e3)):(_(),S(),p.value="",p.focus())},1e3)}function S(){(p=document.querySelector("#console-input")).addEventListener("keydown",e=>{if(13===e.keyCode){if(e.preventDefault(),p.value.trim().length<1)return;if("clear"===p.value.trim())return m.appendChild(C()),S(),void p.focus();if("clear"===p.value.trim())return m.appendChild(C()),S(),void p.focus();p.value.trim()===s[n].comando?(d.push(p.value),w("pass")):(d.push(p.value),w())}38===e.keyCode&&c<=d.length&&d.length>0&&(p.value="",p.value=d[d.length-c],c++)})}function C(){A(m);let e=document.createElement("div");e.classList.add("current-line");let t=document.createElement("img");t.setAttribute("src","./img/logo-blue.png");let o=document.createElement("textarea");return e.appendChild(t).classList.add("line-marker"),o.id="console-input",o.setAttribute("autocomplete","off"),o.setAttribute("autocorrect","off"),o.setAttribute("autocapitalize","off"),o.setAttribute("spellcheck","false"),e.appendChild(o),e}function q(e,t){let o=document.createElement(e);return o.innerHTML=t,o}function A(e,t){var o=0;if(0!==e.childElementCount)for(let a=0;o{e.target.nextSibling.classList.toggle("closed")}),t.appendChild(e).classList.add("folder"),a[s].length>0){let e=document.createElement("li"),o=k(a[s]);e.classList.add("closed"),e.appendChild(o),t.appendChild(e)}else if(".git"===s){let e=document.createElement("li");e.classList.add("closed");let o=q("ul",'
  • Too many files to show! LOL
  • ');e.appendChild(o),t.appendChild(e)}else{let e=document.createElement("li");e.classList.add("closed");let o=q("ul",'
  • Empty folder
  • ');e.appendChild(o),t.appendChild(e)}}else{let e=q("li",a);t.appendChild(e).classList.add("file")}}return t}v.value=x,v.dispatchEvent(new Event("change")),_(),S(),document.querySelector("#repository .header .title").innerHTML=o.repoName,setTimeout(function(){document.body.style.opacity=1},1e3),document.querySelector(".comando").addEventListener("click",()=>{p.value="",p.classList.add("typed"),p.value=s[n].comando,setTimeout(function(){p.classList.remove("typed"),p.focus()},1e3)}),u.addEventListener("click",e=>{!1===u.classList.contains("expanded")&&u.classList.toggle("expanded")}),document.querySelector("main").addEventListener("click",()=>{u.classList.remove("expanded"),u.scrollTop=0}),document.querySelector("#showNavbar").addEventListener("mouseover",()=>{setTimeout(function(){u.classList.add("expanded")},100)}),document.querySelector("#showNavbar").addEventListener("mouseleave",()=>{u.classList.remove("expanded")}),document.querySelector(".hide-repo").addEventListener("click",()=>{let e=document.querySelector(".column-1"),t=document.querySelector(".column-2");document.querySelector(".show-repo").classList.toggle("hidden"),e.style.width="100%",e.style.flexDirection="row",t.classList.toggle("hidden");let o=document.querySelector("#instrucciones"),a=document.querySelector("#terminal");o.style.flex="2",o.style.height="100%",m.style.height="100%",a.style.flex="3",a.style.height="100%",a.style.marginTop="38.39px"}),document.querySelector(".show-repo").addEventListener("click",()=>{let e=document.querySelector(".column-1"),t=document.querySelector(".column-2"),o=document.querySelector("#instrucciones"),a=document.querySelector("#terminal");e.style.width="70%",e.style.flexDirection="column",o.style.flex="3",o.style.height="auto",a.style.flex="2",a.style.marginTop="0",setTimeout(function(){t.classList.toggle("hidden")},900),document.querySelector(".show-repo").classList.toggle("hidden")})})());var s=[]},function(e,t,o){"use strict";var a=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s,n,r,i,l=o(0),d=o(2),c=o(3),u=o(8),m=a(o(9)),p=a(o(4)),g=a(o(10));t.default=r=i=function(){var e=arguments[0];function t(t){var o=e;return void 0===o[t]?p.default[t]:o[t]}if(l.addClass(document.body,"stop-scrolling"),c.resetInput(),void 0===e)return d.logStr("SweetAlert expects at least 1 attribute!"),!1;var o=d.extend({},p.default);switch(typeof e){case"string":o.title=e,o.text=arguments[1]||"",o.type=arguments[2]||"";break;case"object":if(void 0===e.title)return d.logStr('Missing "title" argument!'),!1;for(var a in o.title=e.title,p.default)o[a]=t(a);o.confirmButtonText=o.showCancelButton?"Confirm":p.default.confirmButtonText,o.confirmButtonText=t("confirmButtonText"),o.doneFunction=arguments[1]||null;break;default:return d.logStr('Unexpected type of argument! Expected "string" or "object", got '+typeof e),!1}g.default(o),c.fixVerticalPosition(),c.openModal(arguments[1]);for(var r=c.getModal(),h=r.querySelectorAll("button"),b=["onclick","onmouseover","onmouseout","onmousedown","onmouseup","onfocus"],f=function(e){return u.handleButton(e,o,r)},y=0;y"),i.innerHTML=e.html?e.text:n.escapeHtml(e.text||"").split("\n").join("
    "),e.text&&n.show(i),e.customClass)n.addClass(t,e.customClass),t.setAttribute("data-custom-class",e.customClass);else{var c=t.getAttribute("data-custom-class");n.removeClass(t,c),t.setAttribute("data-custom-class","")}if(n.hide(t.querySelectorAll(".sa-icon")),e.type&&!a.isIE8()){var u=function(){for(var o=!1,a=0;a= 0) {\n newClass = newClass.replace(' ' + className + ' ', ' ');\n }\n elem.className = newClass.replace(/^\\s+|\\s+$/g, '');\n }\n};\n\nvar escapeHtml = function escapeHtml(str) {\n var div = document.createElement('div');\n div.appendChild(document.createTextNode(str));\n return div.innerHTML;\n};\n\nvar _show = function _show(elem) {\n elem.style.opacity = '';\n elem.style.display = 'block';\n};\n\nvar show = function show(elems) {\n if (elems && !elems.length) {\n return _show(elems);\n }\n for (var i = 0; i < elems.length; ++i) {\n _show(elems[i]);\n }\n};\n\nvar _hide = function _hide(elem) {\n elem.style.opacity = '';\n elem.style.display = 'none';\n};\n\nvar hide = function hide(elems) {\n if (elems && !elems.length) {\n return _hide(elems);\n }\n for (var i = 0; i < elems.length; ++i) {\n _hide(elems[i]);\n }\n};\n\nvar isDescendant = function isDescendant(parent, child) {\n var node = child.parentNode;\n while (node !== null) {\n if (node === parent) {\n return true;\n }\n node = node.parentNode;\n }\n return false;\n};\n\nvar getTopMargin = function getTopMargin(elem) {\n elem.style.left = '-9999px';\n elem.style.display = 'block';\n\n var height = elem.clientHeight,\n padding;\n if (typeof getComputedStyle !== 'undefined') {\n // IE 8\n padding = parseInt(getComputedStyle(elem).getPropertyValue('padding-top'), 10);\n } else {\n padding = parseInt(elem.currentStyle.padding);\n }\n\n elem.style.left = '';\n elem.style.display = 'none';\n return '-' + parseInt((height + padding) / 2) + 'px';\n};\n\nvar fadeIn = function fadeIn(elem, interval) {\n if (+elem.style.opacity < 1) {\n interval = interval || 16;\n elem.style.opacity = 0;\n elem.style.display = 'block';\n var last = +new Date();\n var tick = (function (_tick) {\n function tick() {\n return _tick.apply(this, arguments);\n }\n\n tick.toString = function () {\n return _tick.toString();\n };\n\n return tick;\n })(function () {\n elem.style.opacity = +elem.style.opacity + (new Date() - last) / 100;\n last = +new Date();\n\n if (+elem.style.opacity < 1) {\n setTimeout(tick, interval);\n }\n });\n tick();\n }\n elem.style.display = 'block'; //fallback IE8\n};\n\nvar fadeOut = function fadeOut(elem, interval) {\n interval = interval || 16;\n elem.style.opacity = 1;\n var last = +new Date();\n var tick = (function (_tick2) {\n function tick() {\n return _tick2.apply(this, arguments);\n }\n\n tick.toString = function () {\n return _tick2.toString();\n };\n\n return tick;\n })(function () {\n elem.style.opacity = +elem.style.opacity - (new Date() - last) / 100;\n last = +new Date();\n\n if (+elem.style.opacity > 0) {\n setTimeout(tick, interval);\n } else {\n elem.style.display = 'none';\n }\n });\n tick();\n};\n\nvar fireClick = function fireClick(node) {\n // Taken from http://www.nonobtrusive.com/2011/11/29/programatically-fire-crossbrowser-click-event-with-javascript/\n // Then fixed for today's Chrome browser.\n if (typeof MouseEvent === 'function') {\n // Up-to-date approach\n var mevt = new MouseEvent('click', {\n view: window,\n bubbles: false,\n cancelable: true\n });\n node.dispatchEvent(mevt);\n } else if (document.createEvent) {\n // Fallback\n var evt = document.createEvent('MouseEvents');\n evt.initEvent('click', false, false);\n node.dispatchEvent(evt);\n } else if (document.createEventObject) {\n node.fireEvent('onclick');\n } else if (typeof node.onclick === 'function') {\n node.onclick();\n }\n};\n\nvar stopEventPropagation = function stopEventPropagation(e) {\n // In particular, make sure the space bar doesn't scroll the main window.\n if (typeof e.stopPropagation === 'function') {\n e.stopPropagation();\n e.preventDefault();\n } else if (window.event && window.event.hasOwnProperty('cancelBubble')) {\n window.event.cancelBubble = true;\n }\n};\n\nexports.hasClass = hasClass;\nexports.addClass = addClass;\nexports.removeClass = removeClass;\nexports.escapeHtml = escapeHtml;\nexports._show = _show;\nexports.show = show;\nexports._hide = _hide;\nexports.hide = hide;\nexports.isDescendant = isDescendant;\nexports.getTopMargin = getTopMargin;\nexports.fadeIn = fadeIn;\nexports.fadeOut = fadeOut;\nexports.fireClick = fireClick;\nexports.stopEventPropagation = stopEventPropagation;","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n/*\n * Allow user to pass their own params\n */\nvar extend = function extend(a, b) {\n for (var key in b) {\n if (b.hasOwnProperty(key)) {\n a[key] = b[key];\n }\n }\n return a;\n};\n\n/*\n * Convert HEX codes to RGB values (#000000 -> rgb(0,0,0))\n */\nvar hexToRgb = function hexToRgb(hex) {\n var result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n return result ? parseInt(result[1], 16) + ', ' + parseInt(result[2], 16) + ', ' + parseInt(result[3], 16) : null;\n};\n\n/*\n * Check if the user is using Internet Explorer 8 (for fallbacks)\n */\nvar isIE8 = function isIE8() {\n return window.attachEvent && !window.addEventListener;\n};\n\n/*\n * IE compatible logging for developers\n */\nvar logStr = function logStr(string) {\n if (window.console) {\n // IE...\n window.console.log('SweetAlert: ' + string);\n }\n};\n\n/*\n * Set hover, active and focus-states for buttons \n * (source: http://www.sitepoint.com/javascript-generate-lighter-darker-color)\n */\nvar colorLuminance = function colorLuminance(hex, lum) {\n // Validate hex string\n hex = String(hex).replace(/[^0-9a-f]/gi, '');\n if (hex.length < 6) {\n hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\n }\n lum = lum || 0;\n\n // Convert to decimal and change luminosity\n var rgb = '#';\n var c;\n var i;\n\n for (i = 0; i < 3; i++) {\n c = parseInt(hex.substr(i * 2, 2), 16);\n c = Math.round(Math.min(Math.max(0, c + c * lum), 255)).toString(16);\n rgb += ('00' + c).substr(c.length);\n }\n\n return rgb;\n};\n\nexports.extend = extend;\nexports.hexToRgb = hexToRgb;\nexports.isIE8 = isIE8;\nexports.logStr = logStr;\nexports.colorLuminance = colorLuminance;","'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nvar _hexToRgb = require('./utils');\n\nvar _removeClass$getTopMargin$fadeIn$show$addClass = require('./handle-dom');\n\nvar _defaultParams = require('./default-params');\n\nvar _defaultParams2 = _interopRequireWildcard(_defaultParams);\n\n/*\n * Add modal + overlay to DOM\n */\n\nvar _injectedHTML = require('./injected-html');\n\nvar _injectedHTML2 = _interopRequireWildcard(_injectedHTML);\n\nvar modalClass = '.sweet-alert';\nvar overlayClass = '.sweet-overlay';\n\nvar sweetAlertInitialize = function sweetAlertInitialize() {\n var sweetWrap = document.createElement('div');\n sweetWrap.innerHTML = _injectedHTML2['default'];\n\n // Append elements to body\n while (sweetWrap.firstChild) {\n document.body.appendChild(sweetWrap.firstChild);\n }\n};\n\n/*\n * Get DOM element of modal\n */\nvar getModal = (function (_getModal) {\n function getModal() {\n return _getModal.apply(this, arguments);\n }\n\n getModal.toString = function () {\n return _getModal.toString();\n };\n\n return getModal;\n})(function () {\n var $modal = document.querySelector(modalClass);\n\n if (!$modal) {\n sweetAlertInitialize();\n $modal = getModal();\n }\n\n return $modal;\n});\n\n/*\n * Get DOM element of input (in modal)\n */\nvar getInput = function getInput() {\n var $modal = getModal();\n if ($modal) {\n return $modal.querySelector('input');\n }\n};\n\n/*\n * Get DOM element of overlay\n */\nvar getOverlay = function getOverlay() {\n return document.querySelector(overlayClass);\n};\n\n/*\n * Add box-shadow style to button (depending on its chosen bg-color)\n */\nvar setFocusStyle = function setFocusStyle($button, bgColor) {\n var rgbColor = _hexToRgb.hexToRgb(bgColor);\n $button.style.boxShadow = '0 0 2px rgba(' + rgbColor + ', 0.8), inset 0 0 0 1px rgba(0, 0, 0, 0.05)';\n};\n\n/*\n * Animation when opening modal\n */\nvar openModal = function openModal(callback) {\n var $modal = getModal();\n _removeClass$getTopMargin$fadeIn$show$addClass.fadeIn(getOverlay(), 10);\n _removeClass$getTopMargin$fadeIn$show$addClass.show($modal);\n _removeClass$getTopMargin$fadeIn$show$addClass.addClass($modal, 'showSweetAlert');\n _removeClass$getTopMargin$fadeIn$show$addClass.removeClass($modal, 'hideSweetAlert');\n\n window.previousActiveElement = document.activeElement;\n var $okButton = $modal.querySelector('button.confirm');\n $okButton.focus();\n\n setTimeout(function () {\n _removeClass$getTopMargin$fadeIn$show$addClass.addClass($modal, 'visible');\n }, 500);\n\n var timer = $modal.getAttribute('data-timer');\n\n if (timer !== 'null' && timer !== '') {\n var timerCallback = callback;\n $modal.timeout = setTimeout(function () {\n var doneFunctionExists = (timerCallback || null) && $modal.getAttribute('data-has-done-function') === 'true';\n if (doneFunctionExists) {\n timerCallback(null);\n } else {\n sweetAlert.close();\n }\n }, timer);\n }\n};\n\n/*\n * Reset the styling of the input\n * (for example if errors have been shown)\n */\nvar resetInput = function resetInput() {\n var $modal = getModal();\n var $input = getInput();\n\n _removeClass$getTopMargin$fadeIn$show$addClass.removeClass($modal, 'show-input');\n $input.value = _defaultParams2['default'].inputValue;\n $input.setAttribute('type', _defaultParams2['default'].inputType);\n $input.setAttribute('placeholder', _defaultParams2['default'].inputPlaceholder);\n\n resetInputError();\n};\n\nvar resetInputError = function resetInputError(event) {\n // If press enter => ignore\n if (event && event.keyCode === 13) {\n return false;\n }\n\n var $modal = getModal();\n\n var $errorIcon = $modal.querySelector('.sa-input-error');\n _removeClass$getTopMargin$fadeIn$show$addClass.removeClass($errorIcon, 'show');\n\n var $errorContainer = $modal.querySelector('.sa-error-container');\n _removeClass$getTopMargin$fadeIn$show$addClass.removeClass($errorContainer, 'show');\n};\n\n/*\n * Set \"margin-top\"-property on modal based on its computed height\n */\nvar fixVerticalPosition = function fixVerticalPosition() {\n var $modal = getModal();\n $modal.style.marginTop = _removeClass$getTopMargin$fadeIn$show$addClass.getTopMargin(getModal());\n};\n\nexports.sweetAlertInitialize = sweetAlertInitialize;\nexports.getModal = getModal;\nexports.getOverlay = getOverlay;\nexports.getInput = getInput;\nexports.setFocusStyle = setFocusStyle;\nexports.openModal = openModal;\nexports.resetInput = resetInput;\nexports.resetInputError = resetInputError;\nexports.fixVerticalPosition = fixVerticalPosition;","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nvar defaultParams = {\n title: '',\n text: '',\n type: null,\n allowOutsideClick: false,\n showConfirmButton: true,\n showCancelButton: false,\n closeOnConfirm: true,\n closeOnCancel: true,\n confirmButtonText: 'OK',\n confirmButtonColor: '#8CD4F5',\n cancelButtonText: 'Cancel',\n imageUrl: null,\n imageSize: null,\n timer: null,\n customClass: '',\n html: false,\n animation: true,\n allowEscapeKey: true,\n inputType: 'text',\n inputPlaceholder: '',\n inputValue: '',\n showLoaderOnConfirm: false\n};\n\nexports['default'] = defaultParams;\nmodule.exports = exports['default'];","import {} from 'sweetalert';\nimport json from '../config/config.json';\n\nwindow.onload = () => loadPage();\n\nfunction loadPage() {\n\n // =================================================\n // GLOBAL VARIABLES\n // ==================================================\n\n function getQueryParam(param) {\n const urlParams = new URLSearchParams(window.location.search);\n return urlParams.get(param);\n }\n\n let lang = getQueryParam('lang') || document.querySelector('#lang').value || 'defaultLang';\n console.log(`Language selected: ${lang}`);\n\n var lecciones = json.lecciones[lang];\n var config = json.config;\n var leccionActual = 1;\n var leccionesTotal = getObjLength(lecciones);\n var avanceActual = 0;\n var leccionPorcentaje = 100 / leccionesTotal;\n\n // User command history\n var commandHist = [];\n var commandPos = 1;\n // General areas\n \n var navbar = document.querySelector('nav');\n var consoleArea = document.querySelector('.console-area');\n var textarea = document.querySelector('#console-input');\n var areaTareas = document.querySelector('.tareas');\n var branchArea = document.querySelector('.branch');\n var repoFolderArea = document.querySelector('#repository .repo-status .repo-folder');\n var repoStagedArea = document.querySelector('#repository .repo-status .staged');\n var repoCommitsArea = document.querySelector('#repository .repo-status .commits');\n\n // Cambiar lenguaje\n const langSwitch = document.querySelector('#lang');\n langSwitch.addEventListener('change', () => {\n lang = langSwitch.value;\n lecciones = json.lecciones[lang];\n\n // Actualizar la URL con el nuevo parámetro de lenguaje\n const newUrl = new URL(window.location);\n newUrl.searchParams.set('lang', lang);\n window.history.pushState({}, '', newUrl);\n\n consoleArea.appendChild(clearTerminal());\n addTextareaListener();\n actualizarInfoLeccion();\n // Actualizar Staged\n deleteAllChilds(repoStagedArea, 'h3');\n if (lecciones[leccionActual].repoStatus.staged != undefined) {\n let ul = document.createElement('ul');\n for (let i = 0; i < lecciones[leccionActual].repoStatus.staged.length; i++) {\n let li = createElementNode(\"li\", lecciones[leccionActual].repoStatus.staged[i]);\n ul.appendChild(li).classList.add('staged');\n }\n repoStagedArea.appendChild(ul);\n }\n // Actualizar Repo Commits\n deleteAllChilds(repoCommitsArea, 'h3');\n if (lecciones[leccionActual] && lecciones[leccionActual].repoStatus.staged != undefined) {\n let ul = document.createElement('ul');\n for (let i = 0; i < lecciones[leccionActual].repoStatus.commits.length; i++) {\n let li = createElementNode(\"li\", lecciones[leccionActual].repoStatus.commits[i]);\n ul.appendChild(li).classList.add('commit');\n }\n repoCommitsArea.appendChild(ul)\n } else {\n let ul = document.createElement('ul');\n let li = createElementNode(\"li\", config.emptyCommitsAreaMessage);\n ul.appendChild(li).classList.add('commit');\n repoCommitsArea.appendChild(ul);\n }\n // Ayudar listener para el textarea\n textarea.focus();\n });\n \n // Inicializar con el lenguaje de la query string\n const initialLang = getQueryParam('lang') || 'defaultLang';\n langSwitch.value = initialLang;\n langSwitch.dispatchEvent(new Event('change'));\n\n\n\n\n\n // =================================================\n // COURSE TASKS FUNCTIONS\n // ==================================================\n // Updates every contentn area in the site\n function actualizarInfoLeccion() {\n if (!lecciones[leccionActual]) {\n console.error(`Lección ${leccionActual} no encontrada en el lenguaje ${lang}`);\n return;\n }\n \n \n // Actualizar titulo y orden\n let titulo = document.querySelector('#instrucciones .titulo');\n titulo.innerHTML = lecciones[leccionActual].titulo;\n let orden = document.querySelector('#instrucciones .orden');\n orden.innerHTML = lecciones[leccionActual].orden;\n\n // Actualizar comando en boton\n let button = document.querySelector('.comando');\n // Acortar el texto si es muy largo\n if (lecciones[leccionActual].comando.length > 50) {\n button.innerHTML = lecciones[leccionActual].comando.substring(0, 41) + \"...\";\n } else {\n button.innerHTML = lecciones[leccionActual].comando;\n }\n\n // Limpiar areaTareas\n deleteAllChilds(areaTareas);\n // Agregar nuevas Tareas\n for (var i = 0; i < lecciones[leccionActual].tareas.length; i++) {\n let parrafo = createElementNode(\"p\" ,lecciones[leccionActual].tareas[i]);\n areaTareas.appendChild(parrafo);\n }\n\n // Actualizar Navbar\n deleteAllChilds(navbar, \"a\");\n navbar.appendChild(createNavbarLinks());\n\n // Actualizar Repo Folder\n deleteAllChilds(repoFolderArea, 'h3');\n if (lecciones[leccionActual].repoStatus.branch !== undefined) {\n if (lecciones[leccionActual].repoStatus.branch !== undefined) {\n branchArea.innerHTML = '(' + lecciones[leccionActual].repoStatus.branch + ')';\n }\n let folderStructure = createFolderStructure(lecciones[leccionActual].repoStatus.repoFolder);\n repoFolderArea.appendChild(folderStructure);\n } else {\n let ul = document.createElement('ul');\n let li = createElementNode(\"li\", config.emptyFolderMessage);\n ul.appendChild(li).classList.add('info');\n repoFolderArea.appendChild(ul);\n }\n }\n\n // Evaluates command and shows a preddefined message from JSON\n function mostrarResultado(passOrFail) {\n // Mostrar resultado\n if (passOrFail == 'pass') {\n // PASSED\n // Actualizar barra de progreso\n avanceActual += leccionPorcentaje;\n document.querySelector('#myBar').style.width = avanceActual + \"%\";\n // Mensajes de exito\n for (var i = 0; i < lecciones[leccionActual].successMessages.length; i++) {\n let parrafo = createElementNode(\"p\", lecciones[leccionActual].successMessages[i]);\n consoleArea.appendChild(parrafo);\n }\n let parrafo = createElementNode(\"p\", config.success);\n parrafo.classList.add('success');\n consoleArea.appendChild(parrafo);\n // Actualizar Staged\n deleteAllChilds(repoStagedArea, 'h3');\n if (lecciones[leccionActual].repoStatus.staged !== undefined) {\n let folderStructure = createFolderStructure(lecciones[leccionActual].repoStatus.staged);\n repoStagedArea.appendChild(folderStructure);\n } else {\n let ul = document.createElement('ul');\n let li = createElementNode(\"li\", config.emptyStageAreaMessage);\n ul.appendChild(li).classList.add('commit');\n repoStagedArea.appendChild(ul);\n }\n\n // Actualizar Repo Commits\n deleteAllChilds(repoCommitsArea, 'h3');\n if (lecciones[leccionActual].repoStatus.commits !== undefined) {\n let ul = document.createElement('ul');\n for (let i = 0; i < lecciones[leccionActual].repoStatus.commits.length; i++) {\n let li = createElementNode(\"li\", lecciones[leccionActual].repoStatus.commits[i]);\n ul.appendChild(li).classList.add('commit');\n }\n repoCommitsArea.appendChild(ul);\n } else {\n let ul = document.createElement('ul');\n let li = createElementNode(\"li\", config.emptyCommitsAreaMessage);\n ul.appendChild(li).classList.add('commit');\n repoCommitsArea.appendChild(ul);\n }\n // Siguiente leccion\n leccionActual++;\n } else {\n // FAILED\n let userCommand = textarea.value;\n let splitCommand = userCommand.match(/(git)\\s(\\w+)/g) !== null ? userCommand.match(/(git)\\s(\\w+)/g)[0] : undefined;\n let comando = lecciones[leccionActual].comando;\n if (splitCommand != undefined && comando.match(/(git)\\s(\\w+)/g)[0] == splitCommand) {\n let parrafo = createElementNode(\"p\", \"Used \" + splitCommand);\n parrafo.classList.add('blue');\n consoleArea.appendChild(parrafo);\n parrafo = createElementNode(\"p\", \"Check your arguments\");\n consoleArea.appendChild(parrafo);\n } else if (RegExp(\"(git)\", \"g\").test(textarea.value.trim())) {\n for (var i = 0; i < config.errorMessages.length; i++) {\n let parrafo = createElementNode(\"p\", config.errorMessages[i]);\n consoleArea.appendChild(parrafo);\n }\n // Red error message\n let parrafo = createElementNode(\"p\", lecciones[leccionActual].alert);\n parrafo.classList.add('error');\n consoleArea.appendChild(parrafo);\n } else {\n let comandError = createElementNode(\"p\", textarea.value + \": \" + config.errorComando);\n comandError.style.marginTop\n consoleArea.appendChild(comandError);\n // Red error message\n let parrafo = createElementNode(\"p\", lecciones[leccionActual].alert);\n parrafo.classList.add('error');\n consoleArea.appendChild(parrafo);\n }\n\n }\n }\n // Changes line and shows result every time the users presses Enter in console area\n function cambiarLineaActual(passOrFail) {\n let lineaActual = document.querySelector('.current-line');\n let div = document.createElement('div');\n div.classList.add('line');\n let parrafo = createElementNode(\"p\", textarea.value);\n parrafo.style.marginTop = \"15px\";\n parrafo.style.marginBottom = \"15px\";\n\n let img = document.createElement('img');\n img.classList.add('line-marker');\n img.setAttribute('src', './img/logo-blue.png');\n\n consoleArea.removeChild(lineaActual);\n div.appendChild(img);\n div.appendChild(parrafo);\n consoleArea.appendChild(div);\n consoleArea.classList.remove('current-line');\n\n setTimeout(function() {\n mostrarResultado(passOrFail);\n let div = document.createElement(\"div\");\n consoleArea.appendChild(div);\n\n consoleArea.lastElementChild.classList.add('current-line');\n consoleArea.lastElementChild.style.marginTop = \"15px\";\n lineaActual = document.querySelector('.current-line');\n lineaActual.innerHTML = '';\n\n if (leccionActual > leccionesTotal) {\n // Mark navbar element as completed\n document.querySelector('.main-menu ul li:last-child a').classList.remove('learning');\n document.querySelector('.main-menu ul li:last-child a').classList.add('completed');\n\n setTimeout(function() {\n sweetAlert({\n title: \"Congratulations!\",\n text: config.tutorialCompletedMessage,\n html: true,\n type: \"success\",\n showConfirmButton: true\n });\n }, 5000);\n } else {\n actualizarInfoLeccion();\n // Ayudar listener para el textarea\n addTextareaListener();\n textarea.value = \"\";\n textarea.focus();\n }\n }, 1000);\n\n }\n // Add listener to text area every time it's appended in the console area\n function addTextareaListener() {\n textarea = document.querySelector('#console-input');\n textarea.addEventListener('keydown', (e) => {\n\n if (e.keyCode === 13) {\n e.preventDefault();\n if (textarea.value.trim().length < 1) {\n return;\n }\n\n if (textarea.value.trim() === 'clear') {\n consoleArea.appendChild(clearTerminal());\n addTextareaListener();\n textarea.focus();\n return;\n }\n\n if (textarea.value.trim() === 'clear') {\n consoleArea.appendChild(clearTerminal());\n addTextareaListener();\n textarea.focus();\n return;\n }\n\n if (textarea.value.trim() === lecciones[leccionActual].comando) {\n commandHist.push(textarea.value);\n cambiarLineaActual(\"pass\");\n } else {\n commandHist.push(textarea.value);\n cambiarLineaActual();\n }\n }\n\n if (e.keyCode === 38 && commandPos <= commandHist.length && commandHist.length > 0) {\n // Up presses\n textarea.value = \"\";\n textarea.value = commandHist[commandHist.length - commandPos];\n commandPos++;\n }\n });\n }\n // Every time a lesson changes the navbar is rebuilt based on current lesson\n function createNavbarLinks() {\n let ul = document.createElement('ul');\n for (let i = 1; i <= leccionesTotal; i++) {\n let li = document.createElement('li');\n let a = createElementNode('a', lecciones[i].orden + \" - \" + lecciones[i].tituloCorto);\n li.appendChild(a).classList.add('nav-text');\n // Add link icon class\n if (i < leccionActual) {\n li.appendChild(a).classList.add('completed');\n } else {\n li.appendChild(a).classList.add('learning');\n }\n li.addEventListener('click', (e) => {\n if (navbar.classList.contains('expanded')) {\n e.stopPropagation();\n navbar.scrollTop = 0;\n consoleArea.appendChild(clearTerminal());\n addTextareaListener();\n leccionActual = i;\n avanceActual = (leccionActual - 1) * leccionPorcentaje;\n document.querySelector('#myBar').style.width = avanceActual + \"%\";\n actualizarInfoLeccion();\n // Actualizar Staged\n deleteAllChilds(repoStagedArea, 'h3');\n let leccionPrevia = leccionActual - 1 < 1 ? 1 : leccionActual - 1;\n if (lecciones[leccionPrevia].repoStatus.staged != undefined) {\n let folderStructure = createFolderStructure(lecciones[leccionPrevia].repoStatus.staged);\n repoStagedArea.appendChild(folderStructure);\n } else {\n let ul = document.createElement('ul');\n let li = createElementNode(\"li\", config.emptyStageAreaMessage);\n ul.appendChild(li).classList.add('commit');\n repoStagedArea.appendChild(ul);\n }\n // Actualizar Repo Commits\n deleteAllChilds(repoCommitsArea, 'h3');\n if (lecciones[leccionPrevia].repoStatus.commits != undefined) {\n let ul = document.createElement('ul');\n for (let i = 0; i < lecciones[leccionPrevia].repoStatus.commits.length; i++) {\n let li = createElementNode(\"li\", lecciones[leccionPrevia].repoStatus.commits[i]);\n ul.appendChild(li).classList.add('commit');\n }\n repoCommitsArea.appendChild(ul)\n } else {\n let ul = document.createElement('ul');\n let li = createElementNode(\"li\", config.emptyCommitsAreaMessage);\n ul.appendChild(li).classList.add('commit');\n repoCommitsArea.appendChild(ul);\n }\n navbar.classList.remove('expanded');\n // Ayudar listener para el textarea\n textarea.value = \"\";\n textarea.focus();\n }\n })\n ul.appendChild(li);\n }\n return ul;\n }\n // creates a new textarea for the console\n // If added to the consoleArea it can efectively clear it,\n function clearTerminal() {\n deleteAllChilds(consoleArea);\n let div = document.createElement('div');\n div.classList.add('current-line');\n let img = document.createElement('img');\n img.setAttribute('src', './img/logo-blue.png');\n let newTextarea = document.createElement('textarea');\n div.appendChild(img).classList.add('line-marker');\n newTextarea.id = 'console-input';\n newTextarea.setAttribute('autocomplete', \"off\");\n newTextarea.setAttribute('autocorrect', \"off\");\n newTextarea.setAttribute('autocapitalize', \"off\");\n newTextarea.setAttribute('spellcheck', \"false\");\n div.appendChild(newTextarea);\n return div;\n }\n\n // =================================================\n // HELPER FUNCTIONS\n // ==================================================\n // Creates element tag with text\n function createElementNode(elementTagAsString, texto) {\n let element = document.createElement(elementTagAsString);\n element.innerHTML = texto;\n return element;\n }\n // Deletes every child elements but the one that matches the exception\n function deleteAllChilds(parentElement, exceptionTagAsString) {\n var target = 0;\n if (parentElement.childElementCount !== 0) {\n for (let i = 0; target < parentElement.childElementCount; i++) {\n if (exceptionTagAsString !== undefined &&\n parentElement.children[i].tagName === exceptionTagAsString.toUpperCase()) {\n target++;\n continue;\n }\n parentElement.removeChild(parentElement.children[target]);\n }\n }\n return;\n }\n // Return object length\n function getObjLength(obj) {\n let count = 0;\n let i;\n\n for (i in obj) {\n if (obj.hasOwnProperty(i)) {\n count++;\n }\n }\n return count;\n }\n // Creates the entire folder structure based on the folder array in JSON\n function createFolderStructure(folderArray) {\n let ul = document.createElement('ul');\n for (var i = 0; i < folderArray.length; i++) {\n var element = folderArray[i];\n if (typeof(element) === 'object') {\n for (var key in element) {\n let li = createElementNode('li', key);\n li.addEventListener('click', (e) => {\n e.target.nextSibling.classList.toggle('closed');\n })\n ul.appendChild(li).classList.add('folder');\n if (element[key].length > 0) {\n let liContainer = document.createElement('li');\n let innerUl = createFolderStructure(element[key]);\n liContainer.classList.add('closed');\n liContainer.appendChild(innerUl);\n ul.appendChild(liContainer);\n } else if (key === \".git\") {\n let liContainer = document.createElement('li');\n liContainer.classList.add('closed');\n let innerUl = createElementNode('ul', '
  • Too many files to show! LOL
  • ');\n liContainer.appendChild(innerUl);\n ul.appendChild(liContainer);\n } else {\n let liContainer = document.createElement('li');\n liContainer.classList.add('closed');\n let innerUl = createElementNode('ul', '
  • Empty folder
  • ');\n liContainer.appendChild(innerUl);\n ul.appendChild(liContainer);\n }\n }\n } else {\n let li = createElementNode('li', element);\n ul.appendChild(li).classList.add('file');\n }\n }\n\n return ul;\n }\n\n // ===================================================\n // APLICATION FIRST START\n // ===================================================\n\n // Actualizar instrucciones al cargar\n actualizarInfoLeccion();\n // Ayudar listener para el textarea al cargar\n addTextareaListener();\n // Coloca nombre de Repo en header de folderArea\n document.querySelector('#repository .header .title').innerHTML = config.repoName;\n // Show body after one second\n setTimeout(function() {\n document.body.style.opacity = 1;\n }, 1000);\n // Click event for button that 'writes' commando in console\n document.querySelector('.comando').addEventListener('click', () => {\n textarea.value = \"\";\n textarea.classList.add(\"typed\");\n textarea.value = lecciones[leccionActual].comando;\n setTimeout(function() {\n textarea.classList.remove(\"typed\");\n textarea.focus();\n }, 1000);\n });\n \n\n \n\n // Mostrar y ocultar Menu principal\n navbar.addEventListener('click', (e) => {\n if (navbar.classList.contains('expanded') === false) {\n navbar.classList.toggle('expanded');\n }\n });\n\n document.querySelector('main').addEventListener('click', () => {\n navbar.classList.remove('expanded');\n navbar.scrollTop = 0;\n });\n\n\n // Mostrar y ocultar Sidebar menu\n document.querySelector('#showNavbar').addEventListener('mouseover', () => {\n setTimeout(function() {\n navbar.classList.add('expanded');\n }, 100);\n });\n\n document.querySelector('#showNavbar').addEventListener('mouseleave', () => {\n navbar.classList.remove('expanded');\n });\n\n // Mostrar y ccultar columna del repositorio\n document.querySelector('.hide-repo').addEventListener('click', () => {\n let column1 = document.querySelector('.column-1');\n let column2 = document.querySelector('.column-2');\n document.querySelector('.show-repo').classList.toggle('hidden');\n column1.style.width = '100%';\n column1.style.flexDirection = 'row';\n column2.classList.toggle('hidden');\n\n // Reordenar columna 1\n let instrucciones = document.querySelector('#instrucciones');\n let terminal = document.querySelector('#terminal');\n instrucciones.style.flex = '2';\n instrucciones.style.height = '100%';\n consoleArea.style.height = '100%';\n terminal.style.flex = '3';\n terminal.style.height = '100%';\n terminal.style.marginTop = '38.39px';\n })\n\n document.querySelector('.show-repo').addEventListener('click', () => {\n let column1 = document.querySelector('.column-1');\n let column2 = document.querySelector('.column-2');\n // Reordenar columna 1\n let instrucciones = document.querySelector('#instrucciones');\n let terminal = document.querySelector('#terminal');\n column1.style.width = '70%';\n column1.style.flexDirection = 'column';\n instrucciones.style.flex = '3';\n instrucciones.style.height = 'auto';\n terminal.style.flex = '2';\n terminal.style.marginTop = '0';\n setTimeout(function() {\n column2.classList.toggle('hidden');\n }, 900);\n document.querySelector('.show-repo').classList.toggle('hidden');\n })\n};","'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n// SweetAlert\n// 2014-2015 (c) - Tristan Edwards\n// github.com/t4t5/sweetalert\n\n/*\n * jQuery-like functions for manipulating the DOM\n */\n\nvar _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation = require('./modules/handle-dom');\n\n/*\n * Handy utilities\n */\n\nvar _extend$hexToRgb$isIE8$logStr$colorLuminance = require('./modules/utils');\n\n/*\n * Handle sweetAlert's DOM elements\n */\n\nvar _sweetAlertInitialize$getModal$getOverlay$getInput$setFocusStyle$openModal$resetInput$fixVerticalPosition = require('./modules/handle-swal-dom');\n\n// Handle button events and keyboard events\n\nvar _handleButton$handleConfirm$handleCancel = require('./modules/handle-click');\n\nvar _handleKeyDown = require('./modules/handle-key');\n\nvar _handleKeyDown2 = _interopRequireWildcard(_handleKeyDown);\n\n// Default values\n\nvar _defaultParams = require('./modules/default-params');\n\nvar _defaultParams2 = _interopRequireWildcard(_defaultParams);\n\nvar _setParameters = require('./modules/set-params');\n\nvar _setParameters2 = _interopRequireWildcard(_setParameters);\n\n/*\n * Remember state in cases where opening and handling a modal will fiddle with it.\n * (We also use window.previousActiveElement as a global variable)\n */\nvar previousWindowKeyDown;\nvar lastFocusedButton;\n\n/*\n * Global sweetAlert function\n * (this is what the user calls)\n */\nvar sweetAlert, swal;\n\nexports['default'] = sweetAlert = swal = function () {\n var customizations = arguments[0];\n\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.addClass(document.body, 'stop-scrolling');\n _sweetAlertInitialize$getModal$getOverlay$getInput$setFocusStyle$openModal$resetInput$fixVerticalPosition.resetInput();\n\n /*\n * Use argument if defined or default value from params object otherwise.\n * Supports the case where a default value is boolean true and should be\n * overridden by a corresponding explicit argument which is boolean false.\n */\n function argumentOrDefault(key) {\n var args = customizations;\n return args[key] === undefined ? _defaultParams2['default'][key] : args[key];\n }\n\n if (customizations === undefined) {\n _extend$hexToRgb$isIE8$logStr$colorLuminance.logStr('SweetAlert expects at least 1 attribute!');\n return false;\n }\n\n var params = _extend$hexToRgb$isIE8$logStr$colorLuminance.extend({}, _defaultParams2['default']);\n\n switch (typeof customizations) {\n\n // Ex: swal(\"Hello\", \"Just testing\", \"info\");\n case 'string':\n params.title = customizations;\n params.text = arguments[1] || '';\n params.type = arguments[2] || '';\n break;\n\n // Ex: swal({ title:\"Hello\", text: \"Just testing\", type: \"info\" });\n case 'object':\n if (customizations.title === undefined) {\n _extend$hexToRgb$isIE8$logStr$colorLuminance.logStr('Missing \"title\" argument!');\n return false;\n }\n\n params.title = customizations.title;\n\n for (var customName in _defaultParams2['default']) {\n params[customName] = argumentOrDefault(customName);\n }\n\n // Show \"Confirm\" instead of \"OK\" if cancel button is visible\n params.confirmButtonText = params.showCancelButton ? 'Confirm' : _defaultParams2['default'].confirmButtonText;\n params.confirmButtonText = argumentOrDefault('confirmButtonText');\n\n // Callback function when clicking on \"OK\"/\"Cancel\"\n params.doneFunction = arguments[1] || null;\n\n break;\n\n default:\n _extend$hexToRgb$isIE8$logStr$colorLuminance.logStr('Unexpected type of argument! Expected \"string\" or \"object\", got ' + typeof customizations);\n return false;\n\n }\n\n _setParameters2['default'](params);\n _sweetAlertInitialize$getModal$getOverlay$getInput$setFocusStyle$openModal$resetInput$fixVerticalPosition.fixVerticalPosition();\n _sweetAlertInitialize$getModal$getOverlay$getInput$setFocusStyle$openModal$resetInput$fixVerticalPosition.openModal(arguments[1]);\n\n // Modal interactions\n var modal = _sweetAlertInitialize$getModal$getOverlay$getInput$setFocusStyle$openModal$resetInput$fixVerticalPosition.getModal();\n\n /*\n * Make sure all modal buttons respond to all events\n */\n var $buttons = modal.querySelectorAll('button');\n var buttonEvents = ['onclick', 'onmouseover', 'onmouseout', 'onmousedown', 'onmouseup', 'onfocus'];\n var onButtonEvent = function onButtonEvent(e) {\n return _handleButton$handleConfirm$handleCancel.handleButton(e, params, modal);\n };\n\n for (var btnIndex = 0; btnIndex < $buttons.length; btnIndex++) {\n for (var evtIndex = 0; evtIndex < buttonEvents.length; evtIndex++) {\n var btnEvt = buttonEvents[evtIndex];\n $buttons[btnIndex][btnEvt] = onButtonEvent;\n }\n }\n\n // Clicking outside the modal dismisses it (if allowed by user)\n _sweetAlertInitialize$getModal$getOverlay$getInput$setFocusStyle$openModal$resetInput$fixVerticalPosition.getOverlay().onclick = onButtonEvent;\n\n previousWindowKeyDown = window.onkeydown;\n\n var onKeyEvent = function onKeyEvent(e) {\n return _handleKeyDown2['default'](e, params, modal);\n };\n window.onkeydown = onKeyEvent;\n\n window.onfocus = function () {\n // When the user has focused away and focused back from the whole window.\n setTimeout(function () {\n // Put in a timeout to jump out of the event sequence.\n // Calling focus() in the event sequence confuses things.\n if (lastFocusedButton !== undefined) {\n lastFocusedButton.focus();\n lastFocusedButton = undefined;\n }\n }, 0);\n };\n\n // Show alert with enabled buttons always\n swal.enableButtons();\n};\n\n/*\n * Set default params for each popup\n * @param {Object} userParams\n */\nsweetAlert.setDefaults = swal.setDefaults = function (userParams) {\n if (!userParams) {\n throw new Error('userParams is required');\n }\n if (typeof userParams !== 'object') {\n throw new Error('userParams has to be a object');\n }\n\n _extend$hexToRgb$isIE8$logStr$colorLuminance.extend(_defaultParams2['default'], userParams);\n};\n\n/*\n * Animation when closing modal\n */\nsweetAlert.close = swal.close = function () {\n var modal = _sweetAlertInitialize$getModal$getOverlay$getInput$setFocusStyle$openModal$resetInput$fixVerticalPosition.getModal();\n\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.fadeOut(_sweetAlertInitialize$getModal$getOverlay$getInput$setFocusStyle$openModal$resetInput$fixVerticalPosition.getOverlay(), 5);\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.fadeOut(modal, 5);\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.removeClass(modal, 'showSweetAlert');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.addClass(modal, 'hideSweetAlert');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.removeClass(modal, 'visible');\n\n /*\n * Reset icon animations\n */\n var $successIcon = modal.querySelector('.sa-icon.sa-success');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.removeClass($successIcon, 'animate');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.removeClass($successIcon.querySelector('.sa-tip'), 'animateSuccessTip');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.removeClass($successIcon.querySelector('.sa-long'), 'animateSuccessLong');\n\n var $errorIcon = modal.querySelector('.sa-icon.sa-error');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.removeClass($errorIcon, 'animateErrorIcon');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.removeClass($errorIcon.querySelector('.sa-x-mark'), 'animateXMark');\n\n var $warningIcon = modal.querySelector('.sa-icon.sa-warning');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.removeClass($warningIcon, 'pulseWarning');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.removeClass($warningIcon.querySelector('.sa-body'), 'pulseWarningIns');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.removeClass($warningIcon.querySelector('.sa-dot'), 'pulseWarningIns');\n\n // Reset custom class (delay so that UI changes aren't visible)\n setTimeout(function () {\n var customClass = modal.getAttribute('data-custom-class');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.removeClass(modal, customClass);\n }, 300);\n\n // Make page scrollable again\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.removeClass(document.body, 'stop-scrolling');\n\n // Reset the page to its previous state\n window.onkeydown = previousWindowKeyDown;\n if (window.previousActiveElement) {\n window.previousActiveElement.focus();\n }\n lastFocusedButton = undefined;\n clearTimeout(modal.timeout);\n\n return true;\n};\n\n/*\n * Validation of the input field is done by user\n * If something is wrong => call showInputError with errorMessage\n */\nsweetAlert.showInputError = swal.showInputError = function (errorMessage) {\n var modal = _sweetAlertInitialize$getModal$getOverlay$getInput$setFocusStyle$openModal$resetInput$fixVerticalPosition.getModal();\n\n var $errorIcon = modal.querySelector('.sa-input-error');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.addClass($errorIcon, 'show');\n\n var $errorContainer = modal.querySelector('.sa-error-container');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.addClass($errorContainer, 'show');\n\n $errorContainer.querySelector('p').innerHTML = errorMessage;\n\n setTimeout(function () {\n sweetAlert.enableButtons();\n }, 1);\n\n modal.querySelector('input').focus();\n};\n\n/*\n * Reset input error DOM elements\n */\nsweetAlert.resetInputError = swal.resetInputError = function (event) {\n // If press enter => ignore\n if (event && event.keyCode === 13) {\n return false;\n }\n\n var $modal = _sweetAlertInitialize$getModal$getOverlay$getInput$setFocusStyle$openModal$resetInput$fixVerticalPosition.getModal();\n\n var $errorIcon = $modal.querySelector('.sa-input-error');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.removeClass($errorIcon, 'show');\n\n var $errorContainer = $modal.querySelector('.sa-error-container');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.removeClass($errorContainer, 'show');\n};\n\n/*\n * Disable confirm and cancel buttons\n */\nsweetAlert.disableButtons = swal.disableButtons = function (event) {\n var modal = _sweetAlertInitialize$getModal$getOverlay$getInput$setFocusStyle$openModal$resetInput$fixVerticalPosition.getModal();\n var $confirmButton = modal.querySelector('button.confirm');\n var $cancelButton = modal.querySelector('button.cancel');\n $confirmButton.disabled = true;\n $cancelButton.disabled = true;\n};\n\n/*\n * Enable confirm and cancel buttons\n */\nsweetAlert.enableButtons = swal.enableButtons = function (event) {\n var modal = _sweetAlertInitialize$getModal$getOverlay$getInput$setFocusStyle$openModal$resetInput$fixVerticalPosition.getModal();\n var $confirmButton = modal.querySelector('button.confirm');\n var $cancelButton = modal.querySelector('button.cancel');\n $confirmButton.disabled = false;\n $cancelButton.disabled = false;\n};\n\nif (typeof window !== 'undefined') {\n // The 'handle-click' module requires\n // that 'sweetAlert' was set as global.\n window.sweetAlert = window.swal = sweetAlert;\n} else {\n _extend$hexToRgb$isIE8$logStr$colorLuminance.logStr('SweetAlert is a frontend module!');\n}\nmodule.exports = exports['default'];","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar injectedHTML =\n\n// Dark overlay\n\"
    \" +\n\n// Modal\n\"
    \" +\n\n// Error icon\n\"
    \\n \\n \\n \\n \\n
    \" +\n\n// Warning icon\n\"
    \\n \\n \\n
    \" +\n\n// Info icon\n\"
    \" +\n\n// Success icon\n\"
    \\n \\n \\n\\n
    \\n
    \\n
    \" + \"
    \" +\n\n// Title, text and input\n\"

    Title

    \\n

    Text

    \\n
    \\n \\n
    \\n
    \" +\n\n// Input errors\n\"
    \\n
    !
    \\n

    Not valid!

    \\n
    \" +\n\n// Cancel and confirm buttons\n\"
    \\n \\n
    \\n \" +\n\n// Loading animation\n\"
    \\n
    \\n
    \\n
    \\n
    \\n
    \\n
    \" +\n\n// End of modal\n\"
    \";\n\nexports[\"default\"] = injectedHTML;\nmodule.exports = exports[\"default\"];","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nvar _colorLuminance = require('./utils');\n\nvar _getModal = require('./handle-swal-dom');\n\nvar _hasClass$isDescendant = require('./handle-dom');\n\n/*\n * User clicked on \"Confirm\"/\"OK\" or \"Cancel\"\n */\nvar handleButton = function handleButton(event, params, modal) {\n var e = event || window.event;\n var target = e.target || e.srcElement;\n\n var targetedConfirm = target.className.indexOf('confirm') !== -1;\n var targetedOverlay = target.className.indexOf('sweet-overlay') !== -1;\n var modalIsVisible = _hasClass$isDescendant.hasClass(modal, 'visible');\n var doneFunctionExists = params.doneFunction && modal.getAttribute('data-has-done-function') === 'true';\n\n // Since the user can change the background-color of the confirm button programmatically,\n // we must calculate what the color should be on hover/active\n var normalColor, hoverColor, activeColor;\n if (targetedConfirm && params.confirmButtonColor) {\n normalColor = params.confirmButtonColor;\n hoverColor = _colorLuminance.colorLuminance(normalColor, -0.04);\n activeColor = _colorLuminance.colorLuminance(normalColor, -0.14);\n }\n\n function shouldSetConfirmButtonColor(color) {\n if (targetedConfirm && params.confirmButtonColor) {\n target.style.backgroundColor = color;\n }\n }\n\n switch (e.type) {\n case 'mouseover':\n shouldSetConfirmButtonColor(hoverColor);\n break;\n\n case 'mouseout':\n shouldSetConfirmButtonColor(normalColor);\n break;\n\n case 'mousedown':\n shouldSetConfirmButtonColor(activeColor);\n break;\n\n case 'mouseup':\n shouldSetConfirmButtonColor(hoverColor);\n break;\n\n case 'focus':\n var $confirmButton = modal.querySelector('button.confirm');\n var $cancelButton = modal.querySelector('button.cancel');\n\n if (targetedConfirm) {\n $cancelButton.style.boxShadow = 'none';\n } else {\n $confirmButton.style.boxShadow = 'none';\n }\n break;\n\n case 'click':\n var clickedOnModal = modal === target;\n var clickedOnModalChild = _hasClass$isDescendant.isDescendant(modal, target);\n\n // Ignore click outside if allowOutsideClick is false\n if (!clickedOnModal && !clickedOnModalChild && modalIsVisible && !params.allowOutsideClick) {\n break;\n }\n\n if (targetedConfirm && doneFunctionExists && modalIsVisible) {\n handleConfirm(modal, params);\n } else if (doneFunctionExists && modalIsVisible || targetedOverlay) {\n handleCancel(modal, params);\n } else if (_hasClass$isDescendant.isDescendant(modal, target) && target.tagName === 'BUTTON') {\n sweetAlert.close();\n }\n break;\n }\n};\n\n/*\n * User clicked on \"Confirm\"/\"OK\"\n */\nvar handleConfirm = function handleConfirm(modal, params) {\n var callbackValue = true;\n\n if (_hasClass$isDescendant.hasClass(modal, 'show-input')) {\n callbackValue = modal.querySelector('input').value;\n\n if (!callbackValue) {\n callbackValue = '';\n }\n }\n\n params.doneFunction(callbackValue);\n\n if (params.closeOnConfirm) {\n sweetAlert.close();\n }\n // Disable cancel and confirm button if the parameter is true\n if (params.showLoaderOnConfirm) {\n sweetAlert.disableButtons();\n }\n};\n\n/*\n * User clicked on \"Cancel\"\n */\nvar handleCancel = function handleCancel(modal, params) {\n // Check if callback function expects a parameter (to track cancel actions)\n var functionAsStr = String(params.doneFunction).replace(/\\s/g, '');\n var functionHandlesCancel = functionAsStr.substring(0, 9) === 'function(' && functionAsStr.substring(9, 10) !== ')';\n\n if (functionHandlesCancel) {\n params.doneFunction(false);\n }\n\n if (params.closeOnCancel) {\n sweetAlert.close();\n }\n};\n\nexports['default'] = {\n handleButton: handleButton,\n handleConfirm: handleConfirm,\n handleCancel: handleCancel\n};\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nvar _stopEventPropagation$fireClick = require('./handle-dom');\n\nvar _setFocusStyle = require('./handle-swal-dom');\n\nvar handleKeyDown = function handleKeyDown(event, params, modal) {\n var e = event || window.event;\n var keyCode = e.keyCode || e.which;\n\n var $okButton = modal.querySelector('button.confirm');\n var $cancelButton = modal.querySelector('button.cancel');\n var $modalButtons = modal.querySelectorAll('button[tabindex]');\n\n if ([9, 13, 32, 27].indexOf(keyCode) === -1) {\n // Don't do work on keys we don't care about.\n return;\n }\n\n var $targetElement = e.target || e.srcElement;\n\n var btnIndex = -1; // Find the button - note, this is a nodelist, not an array.\n for (var i = 0; i < $modalButtons.length; i++) {\n if ($targetElement === $modalButtons[i]) {\n btnIndex = i;\n break;\n }\n }\n\n if (keyCode === 9) {\n // TAB\n if (btnIndex === -1) {\n // No button focused. Jump to the confirm button.\n $targetElement = $okButton;\n } else {\n // Cycle to the next button\n if (btnIndex === $modalButtons.length - 1) {\n $targetElement = $modalButtons[0];\n } else {\n $targetElement = $modalButtons[btnIndex + 1];\n }\n }\n\n _stopEventPropagation$fireClick.stopEventPropagation(e);\n $targetElement.focus();\n\n if (params.confirmButtonColor) {\n _setFocusStyle.setFocusStyle($targetElement, params.confirmButtonColor);\n }\n } else {\n if (keyCode === 13) {\n if ($targetElement.tagName === 'INPUT') {\n $targetElement = $okButton;\n $okButton.focus();\n }\n\n if (btnIndex === -1) {\n // ENTER/SPACE clicked outside of a button.\n $targetElement = $okButton;\n } else {\n // Do nothing - let the browser handle it.\n $targetElement = undefined;\n }\n } else if (keyCode === 27 && params.allowEscapeKey === true) {\n $targetElement = $cancelButton;\n _stopEventPropagation$fireClick.fireClick($targetElement, e);\n } else {\n // Fallback - let the browser handle it.\n $targetElement = undefined;\n }\n }\n};\n\nexports['default'] = handleKeyDown;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nvar _isIE8 = require('./utils');\n\nvar _getModal$getInput$setFocusStyle = require('./handle-swal-dom');\n\nvar _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide = require('./handle-dom');\n\nvar alertTypes = ['error', 'warning', 'info', 'success', 'input', 'prompt'];\n\n/*\n * Set type, text and actions on modal\n */\nvar setParameters = function setParameters(params) {\n var modal = _getModal$getInput$setFocusStyle.getModal();\n\n var $title = modal.querySelector('h2');\n var $text = modal.querySelector('p');\n var $cancelBtn = modal.querySelector('button.cancel');\n var $confirmBtn = modal.querySelector('button.confirm');\n\n /*\n * Title\n */\n $title.innerHTML = params.html ? params.title : _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.escapeHtml(params.title).split('\\n').join('
    ');\n\n /*\n * Text\n */\n $text.innerHTML = params.html ? params.text : _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.escapeHtml(params.text || '').split('\\n').join('
    ');\n if (params.text) _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.show($text);\n\n /*\n * Custom class\n */\n if (params.customClass) {\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.addClass(modal, params.customClass);\n modal.setAttribute('data-custom-class', params.customClass);\n } else {\n // Find previously set classes and remove them\n var customClass = modal.getAttribute('data-custom-class');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.removeClass(modal, customClass);\n modal.setAttribute('data-custom-class', '');\n }\n\n /*\n * Icon\n */\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.hide(modal.querySelectorAll('.sa-icon'));\n\n if (params.type && !_isIE8.isIE8()) {\n var _ret = (function () {\n\n var validType = false;\n\n for (var i = 0; i < alertTypes.length; i++) {\n if (params.type === alertTypes[i]) {\n validType = true;\n break;\n }\n }\n\n if (!validType) {\n logStr('Unknown alert type: ' + params.type);\n return {\n v: false\n };\n }\n\n var typesWithIcons = ['success', 'error', 'warning', 'info'];\n var $icon = undefined;\n\n if (typesWithIcons.indexOf(params.type) !== -1) {\n $icon = modal.querySelector('.sa-icon.' + 'sa-' + params.type);\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.show($icon);\n }\n\n var $input = _getModal$getInput$setFocusStyle.getInput();\n\n // Animate icon\n switch (params.type) {\n\n case 'success':\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.addClass($icon, 'animate');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.addClass($icon.querySelector('.sa-tip'), 'animateSuccessTip');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.addClass($icon.querySelector('.sa-long'), 'animateSuccessLong');\n break;\n\n case 'error':\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.addClass($icon, 'animateErrorIcon');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.addClass($icon.querySelector('.sa-x-mark'), 'animateXMark');\n break;\n\n case 'warning':\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.addClass($icon, 'pulseWarning');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.addClass($icon.querySelector('.sa-body'), 'pulseWarningIns');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.addClass($icon.querySelector('.sa-dot'), 'pulseWarningIns');\n break;\n\n case 'input':\n case 'prompt':\n $input.setAttribute('type', params.inputType);\n $input.value = params.inputValue;\n $input.setAttribute('placeholder', params.inputPlaceholder);\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.addClass(modal, 'show-input');\n setTimeout(function () {\n $input.focus();\n $input.addEventListener('keyup', swal.resetInputError);\n }, 400);\n break;\n }\n })();\n\n if (typeof _ret === 'object') {\n return _ret.v;\n }\n }\n\n /*\n * Custom image\n */\n if (params.imageUrl) {\n var $customIcon = modal.querySelector('.sa-icon.sa-custom');\n\n $customIcon.style.backgroundImage = 'url(' + params.imageUrl + ')';\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.show($customIcon);\n\n var _imgWidth = 80;\n var _imgHeight = 80;\n\n if (params.imageSize) {\n var dimensions = params.imageSize.toString().split('x');\n var imgWidth = dimensions[0];\n var imgHeight = dimensions[1];\n\n if (!imgWidth || !imgHeight) {\n logStr('Parameter imageSize expects value with format WIDTHxHEIGHT, got ' + params.imageSize);\n } else {\n _imgWidth = imgWidth;\n _imgHeight = imgHeight;\n }\n }\n\n $customIcon.setAttribute('style', $customIcon.getAttribute('style') + 'width:' + _imgWidth + 'px; height:' + _imgHeight + 'px');\n }\n\n /*\n * Show cancel button?\n */\n modal.setAttribute('data-has-cancel-button', params.showCancelButton);\n if (params.showCancelButton) {\n $cancelBtn.style.display = 'inline-block';\n } else {\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.hide($cancelBtn);\n }\n\n /*\n * Show confirm button?\n */\n modal.setAttribute('data-has-confirm-button', params.showConfirmButton);\n if (params.showConfirmButton) {\n $confirmBtn.style.display = 'inline-block';\n } else {\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.hide($confirmBtn);\n }\n\n /*\n * Custom text on cancel/confirm buttons\n */\n if (params.cancelButtonText) {\n $cancelBtn.innerHTML = _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.escapeHtml(params.cancelButtonText);\n }\n if (params.confirmButtonText) {\n $confirmBtn.innerHTML = _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.escapeHtml(params.confirmButtonText);\n }\n\n /*\n * Custom color on confirm button\n */\n if (params.confirmButtonColor) {\n // Set confirm button to selected background color\n $confirmBtn.style.backgroundColor = params.confirmButtonColor;\n\n // Set the confirm button color to the loading ring\n $confirmBtn.style.borderLeftColor = params.confirmLoadingButtonColor;\n $confirmBtn.style.borderRightColor = params.confirmLoadingButtonColor;\n\n // Set box-shadow to default focused button\n _getModal$getInput$setFocusStyle.setFocusStyle($confirmBtn, params.confirmButtonColor);\n }\n\n /*\n * Allow outside click\n */\n modal.setAttribute('data-allow-outside-click', params.allowOutsideClick);\n\n /*\n * Callback function\n */\n var hasDoneFunction = params.doneFunction ? true : false;\n modal.setAttribute('data-has-done-function', hasDoneFunction);\n\n /*\n * Animation\n */\n if (!params.animation) {\n modal.setAttribute('data-animation', 'none');\n } else if (typeof params.animation === 'string') {\n modal.setAttribute('data-animation', params.animation); // Custom animation\n } else {\n modal.setAttribute('data-animation', 'pop');\n }\n\n /*\n * Timer\n */\n modal.setAttribute('data-timer', params.timer);\n};\n\nexports['default'] = setParameters;\nmodule.exports = exports['default'];"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/sweetalert/lib/modules/handle-dom.js","webpack:///./node_modules/sweetalert/lib/modules/utils.js","webpack:///./node_modules/sweetalert/lib/modules/handle-swal-dom.js","webpack:///./node_modules/sweetalert/lib/modules/default-params.js","webpack:///./src/js/main.js","webpack:///./node_modules/sweetalert/lib/sweetalert.js","webpack:///./node_modules/sweetalert/lib/modules/injected-html.js","webpack:///./node_modules/sweetalert/lib/modules/handle-click.js","webpack:///./node_modules/sweetalert/lib/modules/handle-key.js","webpack:///./node_modules/sweetalert/lib/modules/set-params.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","hasClass","elem","className","RegExp","test","_show","style","opacity","display","_hide","addClass","removeClass","newClass","replace","indexOf","escapeHtml","str","div","document","createElement","appendChild","createTextNode","innerHTML","show","elems","length","hide","isDescendant","parent","child","node","parentNode","getTopMargin","left","padding","height","clientHeight","getComputedStyle","parseInt","getPropertyValue","currentStyle","fadeIn","interval","last","Date","tick","_tick","apply","this","arguments","toString","setTimeout","fadeOut","_tick2","fireClick","MouseEvent","mevt","view","window","bubbles","cancelable","dispatchEvent","createEvent","evt","initEvent","createEventObject","fireEvent","onclick","stopEventPropagation","e","stopPropagation","preventDefault","event","cancelBubble","extend","a","b","hexToRgb","hex","result","exec","isIE8","attachEvent","addEventListener","logStr","string","console","log","colorLuminance","lum","String","rgb","substr","Math","round","min","max","_interopRequireWildcard","obj","default","_hexToRgb","_removeClass$getTopMargin$fadeIn$show$addClass","_defaultParams2","_injectedHTML2","sweetAlertInitialize","sweetWrap","firstChild","body","getModal","_getModal","$modal","querySelector","getInput","getOverlay","resetInputError","keyCode","$errorIcon","$errorContainer","setFocusStyle","$button","bgColor","rgbColor","boxShadow","openModal","callback","previousActiveElement","activeElement","focus","timer","getAttribute","timerCallback","timeout","sweetAlert","close","resetInput","$input","inputValue","setAttribute","inputType","inputPlaceholder","fixVerticalPosition","marginTop","title","text","type","allowOutsideClick","showConfirmButton","showCancelButton","closeOnConfirm","closeOnCancel","confirmButtonText","confirmButtonColor","cancelButtonText","imageUrl","imageSize","customClass","html","animation","allowEscapeKey","showLoaderOnConfirm","__webpack_exports__","_config_config_json__WEBPACK_IMPORTED_MODULE_1__","onload","getQueryParam","param","urlParams","URLSearchParams","location","search","lang","lecciones","config","leccionActual","leccionesTotal","count","getObjLength","avanceActual","leccionPorcentaje","commandHist","commandPos","navbar","consoleArea","textarea","areaTareas","branchArea","repoFolderArea","repoStagedArea","repoCommitsArea","langSwitch","includes","newUrl","URL","searchParams","set","history","pushState","clearTerminal","addTextareaListener","actualizarInfoLeccion","deleteAllChilds","undefined","repoStatus","staged","ul","li","createElementNode","classList","add","commits","emptyCommitsAreaMessage","initialLang","error","titulo","orden","button","comando","substring","tareas","parrafo","tituloCorto","contains","scrollTop","width","leccionPrevia","folderStructure","createFolderStructure","emptyStageAreaMessage","remove","createNavbarLinks","branch","repoFolder","emptyFolderMessage","cambiarLineaActual","passOrFail","lineaActual","marginBottom","img","removeChild","successMessages","success","userCommand","splitCommand","match","trim","errorMessages","alert","comandError","errorComando","mostrarResultado","lastElementChild","tutorialCompletedMessage","push","newTextarea","id","elementTagAsString","texto","element","parentElement","exceptionTagAsString","target","childElementCount","children","tagName","toUpperCase","folderArray","nextSibling","toggle","liContainer","innerUl","Event","repoName","column1","column2","flexDirection","instrucciones","terminal","flex","loadPage","previousWindowKeyDown","lastFocusedButton","swal","_hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation","_extend$hexToRgb$isIE8$logStr$colorLuminance","_sweetAlertInitialize$getModal$getOverlay$getInput$setFocusStyle$openModal$resetInput$fixVerticalPosition","_handleButton$handleConfirm$handleCancel","_handleKeyDown2","_setParameters2","customizations","argumentOrDefault","args","params","customName","doneFunction","modal","$buttons","querySelectorAll","buttonEvents","onButtonEvent","handleButton","btnIndex","evtIndex","btnEvt","onkeydown","onfocus","enableButtons","setDefaults","userParams","Error","$successIcon","$warningIcon","clearTimeout","showInputError","errorMessage","disableButtons","$confirmButton","$cancelButton","disabled","_colorLuminance","_hasClass$isDescendant","handleConfirm","callbackValue","handleCancel","functionAsStr","normalColor","hoverColor","activeColor","srcElement","targetedConfirm","targetedOverlay","modalIsVisible","doneFunctionExists","shouldSetConfirmButtonColor","color","backgroundColor","clickedOnModal","clickedOnModalChild","_stopEventPropagation$fireClick","_setFocusStyle","which","$okButton","$modalButtons","$targetElement","_isIE8","_getModal$getInput$setFocusStyle","_hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide","alertTypes","$title","$text","$cancelBtn","$confirmBtn","split","join","_ret","validType","v","$icon","$customIcon","backgroundImage","_imgWidth","_imgHeight","dimensions","imgWidth","imgHeight","borderLeftColor","confirmLoadingButtonColor","borderRightColor","hasDoneFunction"],"mappings":"aACA,IAAAA,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,IACAG,EAAAH,EACAI,GAAA,EACAH,YAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAA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,EAAAD,EAAA,GACAE,EAAAF,EAAA,GAEAC,GAAAC,GAGAJ,EAAAG,EACAF,EAAAG,GAHAtR,OAAA,mEAAA8M,EAAAxI,WAOA0M,EAAA3N,aAAA,QAAA2N,EAAAnO,aAAA,kBAAAqO,EAAA,cAAqGC,EAAA,MAMrGlE,EAAA5J,aAAA,yBAAAyJ,EAAA/I,kBACA+I,EAAA/I,iBACAyM,EAAAtV,MAAAE,QAAA,eAEAgV,EAAA9T,KAAAkU,GAMAvD,EAAA5J,aAAA,0BAAAyJ,EAAAhJ,mBACAgJ,EAAAhJ,kBACA2M,EAAAvV,MAAAE,QAAA,eAEAgV,EAAA9T,KAAAmU,GAMA3D,EAAA1I,mBACAoM,EAAAtU,UAAAkU,EAAAzU,WAAAmR,EAAA1I,mBAEA0I,EAAA5I,oBACAuM,EAAAvU,UAAAkU,EAAAzU,WAAAmR,EAAA5I,oBAMA4I,EAAA3I,qBAEAsM,EAAAvV,MAAAuU,gBAAA3C,EAAA3I,mBAGAsM,EAAAvV,MAAAqW,gBAAAzE,EAAA0E,0BACAf,EAAAvV,MAAAuW,iBAAA3E,EAAA0E,0BAGArB,EAAAjO,cAAAuO,EAAA3D,EAAA3I,qBAMA8I,EAAA5J,aAAA,2BAAAyJ,EAAAjJ,mBAKA,IAAA6N,IAAA5E,EAAAE,aACAC,EAAA5J,aAAA,yBAAAqO,GAKA5E,EAAArI,UAEG,iBAAAqI,EAAArI,UACHwI,EAAA5J,aAAA,iBAAAyJ,EAAArI,WAEAwI,EAAA5J,aAAA,wBAJA4J,EAAA5J,aAAA,yBAUA4J,EAAA5J,aAAA,aAAAyJ,EAAAlK,QAIAjK,EAAAD,UAAA","file":"bundle.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 5);\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nvar hasClass = function hasClass(elem, className) {\n return new RegExp(' ' + className + ' ').test(' ' + elem.className + ' ');\n};\n\nvar addClass = function addClass(elem, className) {\n if (!hasClass(elem, className)) {\n elem.className += ' ' + className;\n }\n};\n\nvar removeClass = function removeClass(elem, className) {\n var newClass = ' ' + elem.className.replace(/[\\t\\r\\n]/g, ' ') + ' ';\n if (hasClass(elem, className)) {\n while (newClass.indexOf(' ' + className + ' ') >= 0) {\n newClass = newClass.replace(' ' + className + ' ', ' ');\n }\n elem.className = newClass.replace(/^\\s+|\\s+$/g, '');\n }\n};\n\nvar escapeHtml = function escapeHtml(str) {\n var div = document.createElement('div');\n div.appendChild(document.createTextNode(str));\n return div.innerHTML;\n};\n\nvar _show = function _show(elem) {\n elem.style.opacity = '';\n elem.style.display = 'block';\n};\n\nvar show = function show(elems) {\n if (elems && !elems.length) {\n return _show(elems);\n }\n for (var i = 0; i < elems.length; ++i) {\n _show(elems[i]);\n }\n};\n\nvar _hide = function _hide(elem) {\n elem.style.opacity = '';\n elem.style.display = 'none';\n};\n\nvar hide = function hide(elems) {\n if (elems && !elems.length) {\n return _hide(elems);\n }\n for (var i = 0; i < elems.length; ++i) {\n _hide(elems[i]);\n }\n};\n\nvar isDescendant = function isDescendant(parent, child) {\n var node = child.parentNode;\n while (node !== null) {\n if (node === parent) {\n return true;\n }\n node = node.parentNode;\n }\n return false;\n};\n\nvar getTopMargin = function getTopMargin(elem) {\n elem.style.left = '-9999px';\n elem.style.display = 'block';\n\n var height = elem.clientHeight,\n padding;\n if (typeof getComputedStyle !== 'undefined') {\n // IE 8\n padding = parseInt(getComputedStyle(elem).getPropertyValue('padding-top'), 10);\n } else {\n padding = parseInt(elem.currentStyle.padding);\n }\n\n elem.style.left = '';\n elem.style.display = 'none';\n return '-' + parseInt((height + padding) / 2) + 'px';\n};\n\nvar fadeIn = function fadeIn(elem, interval) {\n if (+elem.style.opacity < 1) {\n interval = interval || 16;\n elem.style.opacity = 0;\n elem.style.display = 'block';\n var last = +new Date();\n var tick = (function (_tick) {\n function tick() {\n return _tick.apply(this, arguments);\n }\n\n tick.toString = function () {\n return _tick.toString();\n };\n\n return tick;\n })(function () {\n elem.style.opacity = +elem.style.opacity + (new Date() - last) / 100;\n last = +new Date();\n\n if (+elem.style.opacity < 1) {\n setTimeout(tick, interval);\n }\n });\n tick();\n }\n elem.style.display = 'block'; //fallback IE8\n};\n\nvar fadeOut = function fadeOut(elem, interval) {\n interval = interval || 16;\n elem.style.opacity = 1;\n var last = +new Date();\n var tick = (function (_tick2) {\n function tick() {\n return _tick2.apply(this, arguments);\n }\n\n tick.toString = function () {\n return _tick2.toString();\n };\n\n return tick;\n })(function () {\n elem.style.opacity = +elem.style.opacity - (new Date() - last) / 100;\n last = +new Date();\n\n if (+elem.style.opacity > 0) {\n setTimeout(tick, interval);\n } else {\n elem.style.display = 'none';\n }\n });\n tick();\n};\n\nvar fireClick = function fireClick(node) {\n // Taken from http://www.nonobtrusive.com/2011/11/29/programatically-fire-crossbrowser-click-event-with-javascript/\n // Then fixed for today's Chrome browser.\n if (typeof MouseEvent === 'function') {\n // Up-to-date approach\n var mevt = new MouseEvent('click', {\n view: window,\n bubbles: false,\n cancelable: true\n });\n node.dispatchEvent(mevt);\n } else if (document.createEvent) {\n // Fallback\n var evt = document.createEvent('MouseEvents');\n evt.initEvent('click', false, false);\n node.dispatchEvent(evt);\n } else if (document.createEventObject) {\n node.fireEvent('onclick');\n } else if (typeof node.onclick === 'function') {\n node.onclick();\n }\n};\n\nvar stopEventPropagation = function stopEventPropagation(e) {\n // In particular, make sure the space bar doesn't scroll the main window.\n if (typeof e.stopPropagation === 'function') {\n e.stopPropagation();\n e.preventDefault();\n } else if (window.event && window.event.hasOwnProperty('cancelBubble')) {\n window.event.cancelBubble = true;\n }\n};\n\nexports.hasClass = hasClass;\nexports.addClass = addClass;\nexports.removeClass = removeClass;\nexports.escapeHtml = escapeHtml;\nexports._show = _show;\nexports.show = show;\nexports._hide = _hide;\nexports.hide = hide;\nexports.isDescendant = isDescendant;\nexports.getTopMargin = getTopMargin;\nexports.fadeIn = fadeIn;\nexports.fadeOut = fadeOut;\nexports.fireClick = fireClick;\nexports.stopEventPropagation = stopEventPropagation;","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n/*\n * Allow user to pass their own params\n */\nvar extend = function extend(a, b) {\n for (var key in b) {\n if (b.hasOwnProperty(key)) {\n a[key] = b[key];\n }\n }\n return a;\n};\n\n/*\n * Convert HEX codes to RGB values (#000000 -> rgb(0,0,0))\n */\nvar hexToRgb = function hexToRgb(hex) {\n var result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n return result ? parseInt(result[1], 16) + ', ' + parseInt(result[2], 16) + ', ' + parseInt(result[3], 16) : null;\n};\n\n/*\n * Check if the user is using Internet Explorer 8 (for fallbacks)\n */\nvar isIE8 = function isIE8() {\n return window.attachEvent && !window.addEventListener;\n};\n\n/*\n * IE compatible logging for developers\n */\nvar logStr = function logStr(string) {\n if (window.console) {\n // IE...\n window.console.log('SweetAlert: ' + string);\n }\n};\n\n/*\n * Set hover, active and focus-states for buttons \n * (source: http://www.sitepoint.com/javascript-generate-lighter-darker-color)\n */\nvar colorLuminance = function colorLuminance(hex, lum) {\n // Validate hex string\n hex = String(hex).replace(/[^0-9a-f]/gi, '');\n if (hex.length < 6) {\n hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\n }\n lum = lum || 0;\n\n // Convert to decimal and change luminosity\n var rgb = '#';\n var c;\n var i;\n\n for (i = 0; i < 3; i++) {\n c = parseInt(hex.substr(i * 2, 2), 16);\n c = Math.round(Math.min(Math.max(0, c + c * lum), 255)).toString(16);\n rgb += ('00' + c).substr(c.length);\n }\n\n return rgb;\n};\n\nexports.extend = extend;\nexports.hexToRgb = hexToRgb;\nexports.isIE8 = isIE8;\nexports.logStr = logStr;\nexports.colorLuminance = colorLuminance;","'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nvar _hexToRgb = require('./utils');\n\nvar _removeClass$getTopMargin$fadeIn$show$addClass = require('./handle-dom');\n\nvar _defaultParams = require('./default-params');\n\nvar _defaultParams2 = _interopRequireWildcard(_defaultParams);\n\n/*\n * Add modal + overlay to DOM\n */\n\nvar _injectedHTML = require('./injected-html');\n\nvar _injectedHTML2 = _interopRequireWildcard(_injectedHTML);\n\nvar modalClass = '.sweet-alert';\nvar overlayClass = '.sweet-overlay';\n\nvar sweetAlertInitialize = function sweetAlertInitialize() {\n var sweetWrap = document.createElement('div');\n sweetWrap.innerHTML = _injectedHTML2['default'];\n\n // Append elements to body\n while (sweetWrap.firstChild) {\n document.body.appendChild(sweetWrap.firstChild);\n }\n};\n\n/*\n * Get DOM element of modal\n */\nvar getModal = (function (_getModal) {\n function getModal() {\n return _getModal.apply(this, arguments);\n }\n\n getModal.toString = function () {\n return _getModal.toString();\n };\n\n return getModal;\n})(function () {\n var $modal = document.querySelector(modalClass);\n\n if (!$modal) {\n sweetAlertInitialize();\n $modal = getModal();\n }\n\n return $modal;\n});\n\n/*\n * Get DOM element of input (in modal)\n */\nvar getInput = function getInput() {\n var $modal = getModal();\n if ($modal) {\n return $modal.querySelector('input');\n }\n};\n\n/*\n * Get DOM element of overlay\n */\nvar getOverlay = function getOverlay() {\n return document.querySelector(overlayClass);\n};\n\n/*\n * Add box-shadow style to button (depending on its chosen bg-color)\n */\nvar setFocusStyle = function setFocusStyle($button, bgColor) {\n var rgbColor = _hexToRgb.hexToRgb(bgColor);\n $button.style.boxShadow = '0 0 2px rgba(' + rgbColor + ', 0.8), inset 0 0 0 1px rgba(0, 0, 0, 0.05)';\n};\n\n/*\n * Animation when opening modal\n */\nvar openModal = function openModal(callback) {\n var $modal = getModal();\n _removeClass$getTopMargin$fadeIn$show$addClass.fadeIn(getOverlay(), 10);\n _removeClass$getTopMargin$fadeIn$show$addClass.show($modal);\n _removeClass$getTopMargin$fadeIn$show$addClass.addClass($modal, 'showSweetAlert');\n _removeClass$getTopMargin$fadeIn$show$addClass.removeClass($modal, 'hideSweetAlert');\n\n window.previousActiveElement = document.activeElement;\n var $okButton = $modal.querySelector('button.confirm');\n $okButton.focus();\n\n setTimeout(function () {\n _removeClass$getTopMargin$fadeIn$show$addClass.addClass($modal, 'visible');\n }, 500);\n\n var timer = $modal.getAttribute('data-timer');\n\n if (timer !== 'null' && timer !== '') {\n var timerCallback = callback;\n $modal.timeout = setTimeout(function () {\n var doneFunctionExists = (timerCallback || null) && $modal.getAttribute('data-has-done-function') === 'true';\n if (doneFunctionExists) {\n timerCallback(null);\n } else {\n sweetAlert.close();\n }\n }, timer);\n }\n};\n\n/*\n * Reset the styling of the input\n * (for example if errors have been shown)\n */\nvar resetInput = function resetInput() {\n var $modal = getModal();\n var $input = getInput();\n\n _removeClass$getTopMargin$fadeIn$show$addClass.removeClass($modal, 'show-input');\n $input.value = _defaultParams2['default'].inputValue;\n $input.setAttribute('type', _defaultParams2['default'].inputType);\n $input.setAttribute('placeholder', _defaultParams2['default'].inputPlaceholder);\n\n resetInputError();\n};\n\nvar resetInputError = function resetInputError(event) {\n // If press enter => ignore\n if (event && event.keyCode === 13) {\n return false;\n }\n\n var $modal = getModal();\n\n var $errorIcon = $modal.querySelector('.sa-input-error');\n _removeClass$getTopMargin$fadeIn$show$addClass.removeClass($errorIcon, 'show');\n\n var $errorContainer = $modal.querySelector('.sa-error-container');\n _removeClass$getTopMargin$fadeIn$show$addClass.removeClass($errorContainer, 'show');\n};\n\n/*\n * Set \"margin-top\"-property on modal based on its computed height\n */\nvar fixVerticalPosition = function fixVerticalPosition() {\n var $modal = getModal();\n $modal.style.marginTop = _removeClass$getTopMargin$fadeIn$show$addClass.getTopMargin(getModal());\n};\n\nexports.sweetAlertInitialize = sweetAlertInitialize;\nexports.getModal = getModal;\nexports.getOverlay = getOverlay;\nexports.getInput = getInput;\nexports.setFocusStyle = setFocusStyle;\nexports.openModal = openModal;\nexports.resetInput = resetInput;\nexports.resetInputError = resetInputError;\nexports.fixVerticalPosition = fixVerticalPosition;","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nvar defaultParams = {\n title: '',\n text: '',\n type: null,\n allowOutsideClick: false,\n showConfirmButton: true,\n showCancelButton: false,\n closeOnConfirm: true,\n closeOnCancel: true,\n confirmButtonText: 'OK',\n confirmButtonColor: '#8CD4F5',\n cancelButtonText: 'Cancel',\n imageUrl: null,\n imageSize: null,\n timer: null,\n customClass: '',\n html: false,\n animation: true,\n allowEscapeKey: true,\n inputType: 'text',\n inputPlaceholder: '',\n inputValue: '',\n showLoaderOnConfirm: false\n};\n\nexports['default'] = defaultParams;\nmodule.exports = exports['default'];","import {} from 'sweetalert';\nimport json from '../config/config.json';\n\nwindow.onload = () => loadPage();\nvar lecciones = [];\n\nfunction loadPage() {\n\n // =================================================\n // GLOBAL VARIABLES\n // ==================================================\n\n function getQueryParam(param) {\n const urlParams = new URLSearchParams(window.location.search);\n return urlParams.get(param);\n }\n\n let lang = getQueryParam('lang') || document.querySelector('#lang').value || 'defaultLang';\n console.log(`Language selected: ${lang}`, json);\n\n lecciones = json.lecciones[lang];\n var config = json.config;\n var leccionActual = 1;\n var leccionesTotal = getObjLength(lecciones);\n var avanceActual = 0;\n var leccionPorcentaje = 100 / leccionesTotal;\n\n // User command history\n var commandHist = [];\n var commandPos = 1;\n // General areas\n \n var navbar = document.querySelector('nav');\n var consoleArea = document.querySelector('.console-area');\n var textarea = document.querySelector('#console-input');\n var areaTareas = document.querySelector('.tareas');\n var branchArea = document.querySelector('.branch');\n var repoFolderArea = document.querySelector('#repository .repo-status .repo-folder');\n var repoStagedArea = document.querySelector('#repository .repo-status .staged');\n var repoCommitsArea = document.querySelector('#repository .repo-status .commits');\n\n // Cambiar lenguaje\n const langSwitch = document.querySelector('#lang');\n langSwitch.addEventListener('change', () => {\n\n // avoid switching to invalid languages\n if(!['en', 'es', 'us'].includes(langSwitch.value)) return;\n\n lang = langSwitch.value;\n lecciones = json.lecciones[lang];\n\n // Actualizar la URL con el nuevo parámetro de lenguaje\n const newUrl = new URL(window.location);\n newUrl.searchParams.set('lang', lang);\n window.history.pushState({}, '', newUrl);\n\n consoleArea.appendChild(clearTerminal());\n addTextareaListener();\n actualizarInfoLeccion();\n // Actualizar Staged\n deleteAllChilds(repoStagedArea, 'h3');\n if (lecciones[leccionActual].repoStatus.staged != undefined) {\n let ul = document.createElement('ul');\n for (let i = 0; i < lecciones[leccionActual].repoStatus.staged.length; i++) {\n let li = createElementNode(\"li\", lecciones[leccionActual].repoStatus.staged[i]);\n ul.appendChild(li).classList.add('staged');\n }\n repoStagedArea.appendChild(ul);\n }\n // Actualizar Repo Commits\n deleteAllChilds(repoCommitsArea, 'h3');\n if (lecciones[leccionActual] && lecciones[leccionActual].repoStatus.staged != undefined) {\n let ul = document.createElement('ul');\n for (let i = 0; i < lecciones[leccionActual].repoStatus.commits.length; i++) {\n let li = createElementNode(\"li\", lecciones[leccionActual].repoStatus.commits[i]);\n ul.appendChild(li).classList.add('commit');\n }\n repoCommitsArea.appendChild(ul)\n } else {\n let ul = document.createElement('ul');\n let li = createElementNode(\"li\", config.emptyCommitsAreaMessage);\n ul.appendChild(li).classList.add('commit');\n repoCommitsArea.appendChild(ul);\n }\n // Ayudar listener para el textarea\n textarea.focus();\n });\n \n // Inicializar con el lenguaje de la query string\n const initialLang = getQueryParam('lang') || 'en';\n langSwitch.value = initialLang;\n langSwitch.dispatchEvent(new Event('change'));\n\n\n\n\n\n // =================================================\n // COURSE TASKS FUNCTIONS\n // ==================================================\n // Updates every contentn area in the site\n function actualizarInfoLeccion() {\n if (!lecciones || !lecciones[leccionActual]) {\n console.error(`Lección ${leccionActual} no encontrada en el lenguaje ${lang}`);\n return;\n }\n \n \n // Actualizar titulo y orden\n let titulo = document.querySelector('#instrucciones .titulo');\n titulo.innerHTML = lecciones[leccionActual].titulo;\n let orden = document.querySelector('#instrucciones .orden');\n orden.innerHTML = lecciones[leccionActual].orden;\n\n // Actualizar comando en boton\n let button = document.querySelector('.comando');\n // Acortar el texto si es muy largo\n if (lecciones[leccionActual].comando.length > 50) {\n button.innerHTML = lecciones[leccionActual].comando.substring(0, 41) + \"...\";\n } else {\n button.innerHTML = lecciones[leccionActual].comando;\n }\n\n // Limpiar areaTareas\n deleteAllChilds(areaTareas);\n // Agregar nuevas Tareas\n for (var i = 0; i < lecciones[leccionActual].tareas.length; i++) {\n let parrafo = createElementNode(\"p\" ,lecciones[leccionActual].tareas[i]);\n areaTareas.appendChild(parrafo);\n }\n\n // Actualizar Navbar\n deleteAllChilds(navbar, \"a\");\n navbar.appendChild(createNavbarLinks());\n\n // Actualizar Repo Folder\n deleteAllChilds(repoFolderArea, 'h3');\n if (lecciones[leccionActual].repoStatus.branch !== undefined) {\n if (lecciones[leccionActual].repoStatus.branch !== undefined) {\n branchArea.innerHTML = '(' + lecciones[leccionActual].repoStatus.branch + ')';\n }\n let folderStructure = createFolderStructure(lecciones[leccionActual].repoStatus.repoFolder);\n repoFolderArea.appendChild(folderStructure);\n } else {\n let ul = document.createElement('ul');\n let li = createElementNode(\"li\", config.emptyFolderMessage);\n ul.appendChild(li).classList.add('info');\n repoFolderArea.appendChild(ul);\n }\n }\n\n // Evaluates command and shows a preddefined message from JSON\n function mostrarResultado(passOrFail) {\n // Mostrar resultado\n if (passOrFail == 'pass') {\n // PASSED\n // Actualizar barra de progreso\n avanceActual += leccionPorcentaje;\n document.querySelector('#myBar').style.width = avanceActual + \"%\";\n // Mensajes de exito\n for (var i = 0; i < lecciones[leccionActual].successMessages.length; i++) {\n let parrafo = createElementNode(\"p\", lecciones[leccionActual].successMessages[i]);\n consoleArea.appendChild(parrafo);\n }\n let parrafo = createElementNode(\"p\", config.success);\n parrafo.classList.add('success');\n consoleArea.appendChild(parrafo);\n // Actualizar Staged\n deleteAllChilds(repoStagedArea, 'h3');\n if (lecciones[leccionActual].repoStatus.staged !== undefined) {\n let folderStructure = createFolderStructure(lecciones[leccionActual].repoStatus.staged);\n repoStagedArea.appendChild(folderStructure);\n } else {\n let ul = document.createElement('ul');\n let li = createElementNode(\"li\", config.emptyStageAreaMessage);\n ul.appendChild(li).classList.add('commit');\n repoStagedArea.appendChild(ul);\n }\n\n // Actualizar Repo Commits\n deleteAllChilds(repoCommitsArea, 'h3');\n if (lecciones[leccionActual].repoStatus.commits !== undefined) {\n let ul = document.createElement('ul');\n for (let i = 0; i < lecciones[leccionActual].repoStatus.commits.length; i++) {\n let li = createElementNode(\"li\", lecciones[leccionActual].repoStatus.commits[i]);\n ul.appendChild(li).classList.add('commit');\n }\n repoCommitsArea.appendChild(ul);\n } else {\n let ul = document.createElement('ul');\n let li = createElementNode(\"li\", config.emptyCommitsAreaMessage);\n ul.appendChild(li).classList.add('commit');\n repoCommitsArea.appendChild(ul);\n }\n // Siguiente leccion\n leccionActual++;\n } else {\n // FAILED\n let userCommand = textarea.value;\n let splitCommand = userCommand.match(/(git)\\s(\\w+)/g) !== null ? userCommand.match(/(git)\\s(\\w+)/g)[0] : undefined;\n let comando = lecciones[leccionActual].comando;\n if (splitCommand != undefined && comando.match(/(git)\\s(\\w+)/g)[0] == splitCommand) {\n let parrafo = createElementNode(\"p\", \"Used \" + splitCommand);\n parrafo.classList.add('blue');\n consoleArea.appendChild(parrafo);\n parrafo = createElementNode(\"p\", \"Check your arguments\");\n consoleArea.appendChild(parrafo);\n } else if (RegExp(\"(git)\", \"g\").test(textarea.value.trim())) {\n for (var i = 0; i < config.errorMessages.length; i++) {\n let parrafo = createElementNode(\"p\", config.errorMessages[i]);\n consoleArea.appendChild(parrafo);\n }\n // Red error message\n let parrafo = createElementNode(\"p\", lecciones[leccionActual].alert);\n parrafo.classList.add('error');\n consoleArea.appendChild(parrafo);\n } else {\n let comandError = createElementNode(\"p\", textarea.value + \": \" + config.errorComando);\n comandError.style.marginTop\n consoleArea.appendChild(comandError);\n // Red error message\n let parrafo = createElementNode(\"p\", lecciones[leccionActual].alert);\n parrafo.classList.add('error');\n consoleArea.appendChild(parrafo);\n }\n\n }\n }\n // Changes line and shows result every time the users presses Enter in console area\n function cambiarLineaActual(passOrFail) {\n let lineaActual = document.querySelector('.current-line');\n let div = document.createElement('div');\n div.classList.add('line');\n let parrafo = createElementNode(\"p\", textarea.value);\n parrafo.style.marginTop = \"15px\";\n parrafo.style.marginBottom = \"15px\";\n\n let img = document.createElement('img');\n img.classList.add('line-marker');\n img.setAttribute('src', './img/logo-blue.png');\n\n consoleArea.removeChild(lineaActual);\n div.appendChild(img);\n div.appendChild(parrafo);\n consoleArea.appendChild(div);\n consoleArea.classList.remove('current-line');\n\n setTimeout(function() {\n mostrarResultado(passOrFail);\n let div = document.createElement(\"div\");\n consoleArea.appendChild(div);\n\n consoleArea.lastElementChild.classList.add('current-line');\n consoleArea.lastElementChild.style.marginTop = \"15px\";\n lineaActual = document.querySelector('.current-line');\n lineaActual.innerHTML = '';\n\n if (leccionActual > leccionesTotal) {\n // Mark navbar element as completed\n document.querySelector('.main-menu ul li:last-child a').classList.remove('learning');\n document.querySelector('.main-menu ul li:last-child a').classList.add('completed');\n\n setTimeout(function() {\n sweetAlert({\n title: \"Congratulations!\",\n text: config.tutorialCompletedMessage,\n html: true,\n type: \"success\",\n showConfirmButton: true\n });\n }, 5000);\n } else {\n actualizarInfoLeccion();\n // Ayudar listener para el textarea\n addTextareaListener();\n textarea.value = \"\";\n textarea.focus();\n }\n }, 1000);\n\n }\n // Add listener to text area every time it's appended in the console area\n function addTextareaListener() {\n textarea = document.querySelector('#console-input');\n textarea.addEventListener('keydown', (e) => {\n\n if (e.keyCode === 13) {\n e.preventDefault();\n if (textarea.value.trim().length < 1) {\n return;\n }\n\n if (textarea.value.trim() === 'clear') {\n consoleArea.appendChild(clearTerminal());\n addTextareaListener();\n textarea.focus();\n return;\n }\n\n if (textarea.value.trim() === 'clear') {\n consoleArea.appendChild(clearTerminal());\n addTextareaListener();\n textarea.focus();\n return;\n }\n\n if (textarea.value.trim() === lecciones[leccionActual].comando) {\n commandHist.push(textarea.value);\n cambiarLineaActual(\"pass\");\n } else {\n commandHist.push(textarea.value);\n cambiarLineaActual();\n }\n }\n\n if (e.keyCode === 38 && commandPos <= commandHist.length && commandHist.length > 0) {\n // Up presses\n textarea.value = \"\";\n textarea.value = commandHist[commandHist.length - commandPos];\n commandPos++;\n }\n });\n }\n // Every time a lesson changes the navbar is rebuilt based on current lesson\n function createNavbarLinks() {\n let ul = document.createElement('ul');\n for (let i = 1; i <= leccionesTotal; i++) {\n let li = document.createElement('li');\n let a = createElementNode('a', lecciones[i].orden + \" - \" + lecciones[i].tituloCorto);\n li.appendChild(a).classList.add('nav-text');\n // Add link icon class\n if (i < leccionActual) {\n li.appendChild(a).classList.add('completed');\n } else {\n li.appendChild(a).classList.add('learning');\n }\n li.addEventListener('click', (e) => {\n if (navbar.classList.contains('expanded')) {\n e.stopPropagation();\n navbar.scrollTop = 0;\n consoleArea.appendChild(clearTerminal());\n addTextareaListener();\n leccionActual = i;\n avanceActual = (leccionActual - 1) * leccionPorcentaje;\n document.querySelector('#myBar').style.width = avanceActual + \"%\";\n actualizarInfoLeccion();\n // Actualizar Staged\n deleteAllChilds(repoStagedArea, 'h3');\n let leccionPrevia = leccionActual - 1 < 1 ? 1 : leccionActual - 1;\n if (lecciones[leccionPrevia].repoStatus.staged != undefined) {\n let folderStructure = createFolderStructure(lecciones[leccionPrevia].repoStatus.staged);\n repoStagedArea.appendChild(folderStructure);\n } else {\n let ul = document.createElement('ul');\n let li = createElementNode(\"li\", config.emptyStageAreaMessage);\n ul.appendChild(li).classList.add('commit');\n repoStagedArea.appendChild(ul);\n }\n // Actualizar Repo Commits\n deleteAllChilds(repoCommitsArea, 'h3');\n if (lecciones[leccionPrevia].repoStatus.commits != undefined) {\n let ul = document.createElement('ul');\n for (let i = 0; i < lecciones[leccionPrevia].repoStatus.commits.length; i++) {\n let li = createElementNode(\"li\", lecciones[leccionPrevia].repoStatus.commits[i]);\n ul.appendChild(li).classList.add('commit');\n }\n repoCommitsArea.appendChild(ul)\n } else {\n let ul = document.createElement('ul');\n let li = createElementNode(\"li\", config.emptyCommitsAreaMessage);\n ul.appendChild(li).classList.add('commit');\n repoCommitsArea.appendChild(ul);\n }\n navbar.classList.remove('expanded');\n // Ayudar listener para el textarea\n textarea.value = \"\";\n textarea.focus();\n }\n })\n ul.appendChild(li);\n }\n return ul;\n }\n // creates a new textarea for the console\n // If added to the consoleArea it can efectively clear it,\n function clearTerminal() {\n deleteAllChilds(consoleArea);\n let div = document.createElement('div');\n div.classList.add('current-line');\n let img = document.createElement('img');\n img.setAttribute('src', './img/logo-blue.png');\n let newTextarea = document.createElement('textarea');\n div.appendChild(img).classList.add('line-marker');\n newTextarea.id = 'console-input';\n newTextarea.setAttribute('autocomplete', \"off\");\n newTextarea.setAttribute('autocorrect', \"off\");\n newTextarea.setAttribute('autocapitalize', \"off\");\n newTextarea.setAttribute('spellcheck', \"false\");\n div.appendChild(newTextarea);\n return div;\n }\n\n // =================================================\n // HELPER FUNCTIONS\n // ==================================================\n // Creates element tag with text\n function createElementNode(elementTagAsString, texto) {\n let element = document.createElement(elementTagAsString);\n element.innerHTML = texto;\n return element;\n }\n // Deletes every child elements but the one that matches the exception\n function deleteAllChilds(parentElement, exceptionTagAsString) {\n var target = 0;\n if (parentElement.childElementCount !== 0) {\n for (let i = 0; target < parentElement.childElementCount; i++) {\n if (exceptionTagAsString !== undefined &&\n parentElement.children[i].tagName === exceptionTagAsString.toUpperCase()) {\n target++;\n continue;\n }\n parentElement.removeChild(parentElement.children[target]);\n }\n }\n return;\n }\n // Return object length\n function getObjLength(obj) {\n let count = 0;\n let i;\n\n for (i in obj) {\n if (obj.hasOwnProperty(i)) {\n count++;\n }\n }\n return count;\n }\n // Creates the entire folder structure based on the folder array in JSON\n function createFolderStructure(folderArray) {\n let ul = document.createElement('ul');\n for (var i = 0; i < folderArray.length; i++) {\n var element = folderArray[i];\n if (typeof(element) === 'object') {\n for (var key in element) {\n let li = createElementNode('li', key);\n li.addEventListener('click', (e) => {\n e.target.nextSibling.classList.toggle('closed');\n })\n ul.appendChild(li).classList.add('folder');\n if (element[key].length > 0) {\n let liContainer = document.createElement('li');\n let innerUl = createFolderStructure(element[key]);\n liContainer.classList.add('closed');\n liContainer.appendChild(innerUl);\n ul.appendChild(liContainer);\n } else if (key === \".git\") {\n let liContainer = document.createElement('li');\n liContainer.classList.add('closed');\n let innerUl = createElementNode('ul', '
  • Too many files to show! LOL
  • ');\n liContainer.appendChild(innerUl);\n ul.appendChild(liContainer);\n } else {\n let liContainer = document.createElement('li');\n liContainer.classList.add('closed');\n let innerUl = createElementNode('ul', '
  • Empty folder
  • ');\n liContainer.appendChild(innerUl);\n ul.appendChild(liContainer);\n }\n }\n } else {\n let li = createElementNode('li', element);\n ul.appendChild(li).classList.add('file');\n }\n }\n\n return ul;\n }\n\n // ===================================================\n // APLICATION FIRST START\n // ===================================================\n\n // Actualizar instrucciones al cargar\n actualizarInfoLeccion();\n // Ayudar listener para el textarea al cargar\n addTextareaListener();\n // Coloca nombre de Repo en header de folderArea\n document.querySelector('#repository .header .title').innerHTML = config.repoName;\n // Show body after one second\n setTimeout(function() {\n document.body.style.opacity = 1;\n }, 1000);\n // Click event for button that 'writes' commando in console\n document.querySelector('.comando').addEventListener('click', () => {\n textarea.value = \"\";\n textarea.classList.add(\"typed\");\n textarea.value = lecciones[leccionActual].comando;\n setTimeout(function() {\n textarea.classList.remove(\"typed\");\n textarea.focus();\n }, 1000);\n });\n \n\n \n\n // Mostrar y ocultar Menu principal\n navbar.addEventListener('click', (e) => {\n if (navbar.classList.contains('expanded') === false) {\n navbar.classList.toggle('expanded');\n }\n });\n\n document.querySelector('main').addEventListener('click', () => {\n navbar.classList.remove('expanded');\n navbar.scrollTop = 0;\n });\n\n\n // Mostrar y ocultar Sidebar menu\n document.querySelector('#showNavbar').addEventListener('mouseover', () => {\n setTimeout(function() {\n navbar.classList.add('expanded');\n }, 100);\n });\n\n document.querySelector('#showNavbar').addEventListener('mouseleave', () => {\n navbar.classList.remove('expanded');\n });\n\n // Mostrar y ccultar columna del repositorio\n document.querySelector('.hide-repo').addEventListener('click', () => {\n let column1 = document.querySelector('.column-1');\n let column2 = document.querySelector('.column-2');\n document.querySelector('.show-repo').classList.toggle('hidden');\n column1.style.width = '100%';\n column1.style.flexDirection = 'row';\n column2.classList.toggle('hidden');\n\n // Reordenar columna 1\n let instrucciones = document.querySelector('#instrucciones');\n let terminal = document.querySelector('#terminal');\n instrucciones.style.flex = '2';\n instrucciones.style.height = '100%';\n consoleArea.style.height = '100%';\n terminal.style.flex = '3';\n terminal.style.height = '100%';\n terminal.style.marginTop = '38.39px';\n })\n\n document.querySelector('.show-repo').addEventListener('click', () => {\n let column1 = document.querySelector('.column-1');\n let column2 = document.querySelector('.column-2');\n // Reordenar columna 1\n let instrucciones = document.querySelector('#instrucciones');\n let terminal = document.querySelector('#terminal');\n column1.style.width = '70%';\n column1.style.flexDirection = 'column';\n instrucciones.style.flex = '3';\n instrucciones.style.height = 'auto';\n terminal.style.flex = '2';\n terminal.style.marginTop = '0';\n setTimeout(function() {\n column2.classList.toggle('hidden');\n }, 900);\n document.querySelector('.show-repo').classList.toggle('hidden');\n })\n};","'use strict';\n\nvar _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; };\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n// SweetAlert\n// 2014-2015 (c) - Tristan Edwards\n// github.com/t4t5/sweetalert\n\n/*\n * jQuery-like functions for manipulating the DOM\n */\n\nvar _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation = require('./modules/handle-dom');\n\n/*\n * Handy utilities\n */\n\nvar _extend$hexToRgb$isIE8$logStr$colorLuminance = require('./modules/utils');\n\n/*\n * Handle sweetAlert's DOM elements\n */\n\nvar _sweetAlertInitialize$getModal$getOverlay$getInput$setFocusStyle$openModal$resetInput$fixVerticalPosition = require('./modules/handle-swal-dom');\n\n// Handle button events and keyboard events\n\nvar _handleButton$handleConfirm$handleCancel = require('./modules/handle-click');\n\nvar _handleKeyDown = require('./modules/handle-key');\n\nvar _handleKeyDown2 = _interopRequireWildcard(_handleKeyDown);\n\n// Default values\n\nvar _defaultParams = require('./modules/default-params');\n\nvar _defaultParams2 = _interopRequireWildcard(_defaultParams);\n\nvar _setParameters = require('./modules/set-params');\n\nvar _setParameters2 = _interopRequireWildcard(_setParameters);\n\n/*\n * Remember state in cases where opening and handling a modal will fiddle with it.\n * (We also use window.previousActiveElement as a global variable)\n */\nvar previousWindowKeyDown;\nvar lastFocusedButton;\n\n/*\n * Global sweetAlert function\n * (this is what the user calls)\n */\nvar sweetAlert, swal;\n\nexports['default'] = sweetAlert = swal = function () {\n var customizations = arguments[0];\n\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.addClass(document.body, 'stop-scrolling');\n _sweetAlertInitialize$getModal$getOverlay$getInput$setFocusStyle$openModal$resetInput$fixVerticalPosition.resetInput();\n\n /*\n * Use argument if defined or default value from params object otherwise.\n * Supports the case where a default value is boolean true and should be\n * overridden by a corresponding explicit argument which is boolean false.\n */\n function argumentOrDefault(key) {\n var args = customizations;\n return args[key] === undefined ? _defaultParams2['default'][key] : args[key];\n }\n\n if (customizations === undefined) {\n _extend$hexToRgb$isIE8$logStr$colorLuminance.logStr('SweetAlert expects at least 1 attribute!');\n return false;\n }\n\n var params = _extend$hexToRgb$isIE8$logStr$colorLuminance.extend({}, _defaultParams2['default']);\n\n switch (typeof customizations) {\n\n // Ex: swal(\"Hello\", \"Just testing\", \"info\");\n case 'string':\n params.title = customizations;\n params.text = arguments[1] || '';\n params.type = arguments[2] || '';\n break;\n\n // Ex: swal({ title:\"Hello\", text: \"Just testing\", type: \"info\" });\n case 'object':\n if (customizations.title === undefined) {\n _extend$hexToRgb$isIE8$logStr$colorLuminance.logStr('Missing \"title\" argument!');\n return false;\n }\n\n params.title = customizations.title;\n\n for (var customName in _defaultParams2['default']) {\n params[customName] = argumentOrDefault(customName);\n }\n\n // Show \"Confirm\" instead of \"OK\" if cancel button is visible\n params.confirmButtonText = params.showCancelButton ? 'Confirm' : _defaultParams2['default'].confirmButtonText;\n params.confirmButtonText = argumentOrDefault('confirmButtonText');\n\n // Callback function when clicking on \"OK\"/\"Cancel\"\n params.doneFunction = arguments[1] || null;\n\n break;\n\n default:\n _extend$hexToRgb$isIE8$logStr$colorLuminance.logStr('Unexpected type of argument! Expected \"string\" or \"object\", got ' + typeof customizations);\n return false;\n\n }\n\n _setParameters2['default'](params);\n _sweetAlertInitialize$getModal$getOverlay$getInput$setFocusStyle$openModal$resetInput$fixVerticalPosition.fixVerticalPosition();\n _sweetAlertInitialize$getModal$getOverlay$getInput$setFocusStyle$openModal$resetInput$fixVerticalPosition.openModal(arguments[1]);\n\n // Modal interactions\n var modal = _sweetAlertInitialize$getModal$getOverlay$getInput$setFocusStyle$openModal$resetInput$fixVerticalPosition.getModal();\n\n /*\n * Make sure all modal buttons respond to all events\n */\n var $buttons = modal.querySelectorAll('button');\n var buttonEvents = ['onclick', 'onmouseover', 'onmouseout', 'onmousedown', 'onmouseup', 'onfocus'];\n var onButtonEvent = function onButtonEvent(e) {\n return _handleButton$handleConfirm$handleCancel.handleButton(e, params, modal);\n };\n\n for (var btnIndex = 0; btnIndex < $buttons.length; btnIndex++) {\n for (var evtIndex = 0; evtIndex < buttonEvents.length; evtIndex++) {\n var btnEvt = buttonEvents[evtIndex];\n $buttons[btnIndex][btnEvt] = onButtonEvent;\n }\n }\n\n // Clicking outside the modal dismisses it (if allowed by user)\n _sweetAlertInitialize$getModal$getOverlay$getInput$setFocusStyle$openModal$resetInput$fixVerticalPosition.getOverlay().onclick = onButtonEvent;\n\n previousWindowKeyDown = window.onkeydown;\n\n var onKeyEvent = function onKeyEvent(e) {\n return _handleKeyDown2['default'](e, params, modal);\n };\n window.onkeydown = onKeyEvent;\n\n window.onfocus = function () {\n // When the user has focused away and focused back from the whole window.\n setTimeout(function () {\n // Put in a timeout to jump out of the event sequence.\n // Calling focus() in the event sequence confuses things.\n if (lastFocusedButton !== undefined) {\n lastFocusedButton.focus();\n lastFocusedButton = undefined;\n }\n }, 0);\n };\n\n // Show alert with enabled buttons always\n swal.enableButtons();\n};\n\n/*\n * Set default params for each popup\n * @param {Object} userParams\n */\nsweetAlert.setDefaults = swal.setDefaults = function (userParams) {\n if (!userParams) {\n throw new Error('userParams is required');\n }\n if (typeof userParams !== 'object') {\n throw new Error('userParams has to be a object');\n }\n\n _extend$hexToRgb$isIE8$logStr$colorLuminance.extend(_defaultParams2['default'], userParams);\n};\n\n/*\n * Animation when closing modal\n */\nsweetAlert.close = swal.close = function () {\n var modal = _sweetAlertInitialize$getModal$getOverlay$getInput$setFocusStyle$openModal$resetInput$fixVerticalPosition.getModal();\n\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.fadeOut(_sweetAlertInitialize$getModal$getOverlay$getInput$setFocusStyle$openModal$resetInput$fixVerticalPosition.getOverlay(), 5);\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.fadeOut(modal, 5);\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.removeClass(modal, 'showSweetAlert');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.addClass(modal, 'hideSweetAlert');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.removeClass(modal, 'visible');\n\n /*\n * Reset icon animations\n */\n var $successIcon = modal.querySelector('.sa-icon.sa-success');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.removeClass($successIcon, 'animate');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.removeClass($successIcon.querySelector('.sa-tip'), 'animateSuccessTip');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.removeClass($successIcon.querySelector('.sa-long'), 'animateSuccessLong');\n\n var $errorIcon = modal.querySelector('.sa-icon.sa-error');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.removeClass($errorIcon, 'animateErrorIcon');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.removeClass($errorIcon.querySelector('.sa-x-mark'), 'animateXMark');\n\n var $warningIcon = modal.querySelector('.sa-icon.sa-warning');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.removeClass($warningIcon, 'pulseWarning');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.removeClass($warningIcon.querySelector('.sa-body'), 'pulseWarningIns');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.removeClass($warningIcon.querySelector('.sa-dot'), 'pulseWarningIns');\n\n // Reset custom class (delay so that UI changes aren't visible)\n setTimeout(function () {\n var customClass = modal.getAttribute('data-custom-class');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.removeClass(modal, customClass);\n }, 300);\n\n // Make page scrollable again\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.removeClass(document.body, 'stop-scrolling');\n\n // Reset the page to its previous state\n window.onkeydown = previousWindowKeyDown;\n if (window.previousActiveElement) {\n window.previousActiveElement.focus();\n }\n lastFocusedButton = undefined;\n clearTimeout(modal.timeout);\n\n return true;\n};\n\n/*\n * Validation of the input field is done by user\n * If something is wrong => call showInputError with errorMessage\n */\nsweetAlert.showInputError = swal.showInputError = function (errorMessage) {\n var modal = _sweetAlertInitialize$getModal$getOverlay$getInput$setFocusStyle$openModal$resetInput$fixVerticalPosition.getModal();\n\n var $errorIcon = modal.querySelector('.sa-input-error');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.addClass($errorIcon, 'show');\n\n var $errorContainer = modal.querySelector('.sa-error-container');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.addClass($errorContainer, 'show');\n\n $errorContainer.querySelector('p').innerHTML = errorMessage;\n\n setTimeout(function () {\n sweetAlert.enableButtons();\n }, 1);\n\n modal.querySelector('input').focus();\n};\n\n/*\n * Reset input error DOM elements\n */\nsweetAlert.resetInputError = swal.resetInputError = function (event) {\n // If press enter => ignore\n if (event && event.keyCode === 13) {\n return false;\n }\n\n var $modal = _sweetAlertInitialize$getModal$getOverlay$getInput$setFocusStyle$openModal$resetInput$fixVerticalPosition.getModal();\n\n var $errorIcon = $modal.querySelector('.sa-input-error');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.removeClass($errorIcon, 'show');\n\n var $errorContainer = $modal.querySelector('.sa-error-container');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide$isDescendant$getTopMargin$fadeIn$fadeOut$fireClick$stopEventPropagation.removeClass($errorContainer, 'show');\n};\n\n/*\n * Disable confirm and cancel buttons\n */\nsweetAlert.disableButtons = swal.disableButtons = function (event) {\n var modal = _sweetAlertInitialize$getModal$getOverlay$getInput$setFocusStyle$openModal$resetInput$fixVerticalPosition.getModal();\n var $confirmButton = modal.querySelector('button.confirm');\n var $cancelButton = modal.querySelector('button.cancel');\n $confirmButton.disabled = true;\n $cancelButton.disabled = true;\n};\n\n/*\n * Enable confirm and cancel buttons\n */\nsweetAlert.enableButtons = swal.enableButtons = function (event) {\n var modal = _sweetAlertInitialize$getModal$getOverlay$getInput$setFocusStyle$openModal$resetInput$fixVerticalPosition.getModal();\n var $confirmButton = modal.querySelector('button.confirm');\n var $cancelButton = modal.querySelector('button.cancel');\n $confirmButton.disabled = false;\n $cancelButton.disabled = false;\n};\n\nif (typeof window !== 'undefined') {\n // The 'handle-click' module requires\n // that 'sweetAlert' was set as global.\n window.sweetAlert = window.swal = sweetAlert;\n} else {\n _extend$hexToRgb$isIE8$logStr$colorLuminance.logStr('SweetAlert is a frontend module!');\n}\nmodule.exports = exports['default'];","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar injectedHTML =\n\n// Dark overlay\n\"
    \" +\n\n// Modal\n\"
    \" +\n\n// Error icon\n\"
    \\n \\n \\n \\n \\n
    \" +\n\n// Warning icon\n\"
    \\n \\n \\n
    \" +\n\n// Info icon\n\"
    \" +\n\n// Success icon\n\"
    \\n \\n \\n\\n
    \\n
    \\n
    \" + \"
    \" +\n\n// Title, text and input\n\"

    Title

    \\n

    Text

    \\n
    \\n \\n
    \\n
    \" +\n\n// Input errors\n\"
    \\n
    !
    \\n

    Not valid!

    \\n
    \" +\n\n// Cancel and confirm buttons\n\"
    \\n \\n
    \\n \" +\n\n// Loading animation\n\"
    \\n
    \\n
    \\n
    \\n
    \\n
    \\n
    \" +\n\n// End of modal\n\"
    \";\n\nexports[\"default\"] = injectedHTML;\nmodule.exports = exports[\"default\"];","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nvar _colorLuminance = require('./utils');\n\nvar _getModal = require('./handle-swal-dom');\n\nvar _hasClass$isDescendant = require('./handle-dom');\n\n/*\n * User clicked on \"Confirm\"/\"OK\" or \"Cancel\"\n */\nvar handleButton = function handleButton(event, params, modal) {\n var e = event || window.event;\n var target = e.target || e.srcElement;\n\n var targetedConfirm = target.className.indexOf('confirm') !== -1;\n var targetedOverlay = target.className.indexOf('sweet-overlay') !== -1;\n var modalIsVisible = _hasClass$isDescendant.hasClass(modal, 'visible');\n var doneFunctionExists = params.doneFunction && modal.getAttribute('data-has-done-function') === 'true';\n\n // Since the user can change the background-color of the confirm button programmatically,\n // we must calculate what the color should be on hover/active\n var normalColor, hoverColor, activeColor;\n if (targetedConfirm && params.confirmButtonColor) {\n normalColor = params.confirmButtonColor;\n hoverColor = _colorLuminance.colorLuminance(normalColor, -0.04);\n activeColor = _colorLuminance.colorLuminance(normalColor, -0.14);\n }\n\n function shouldSetConfirmButtonColor(color) {\n if (targetedConfirm && params.confirmButtonColor) {\n target.style.backgroundColor = color;\n }\n }\n\n switch (e.type) {\n case 'mouseover':\n shouldSetConfirmButtonColor(hoverColor);\n break;\n\n case 'mouseout':\n shouldSetConfirmButtonColor(normalColor);\n break;\n\n case 'mousedown':\n shouldSetConfirmButtonColor(activeColor);\n break;\n\n case 'mouseup':\n shouldSetConfirmButtonColor(hoverColor);\n break;\n\n case 'focus':\n var $confirmButton = modal.querySelector('button.confirm');\n var $cancelButton = modal.querySelector('button.cancel');\n\n if (targetedConfirm) {\n $cancelButton.style.boxShadow = 'none';\n } else {\n $confirmButton.style.boxShadow = 'none';\n }\n break;\n\n case 'click':\n var clickedOnModal = modal === target;\n var clickedOnModalChild = _hasClass$isDescendant.isDescendant(modal, target);\n\n // Ignore click outside if allowOutsideClick is false\n if (!clickedOnModal && !clickedOnModalChild && modalIsVisible && !params.allowOutsideClick) {\n break;\n }\n\n if (targetedConfirm && doneFunctionExists && modalIsVisible) {\n handleConfirm(modal, params);\n } else if (doneFunctionExists && modalIsVisible || targetedOverlay) {\n handleCancel(modal, params);\n } else if (_hasClass$isDescendant.isDescendant(modal, target) && target.tagName === 'BUTTON') {\n sweetAlert.close();\n }\n break;\n }\n};\n\n/*\n * User clicked on \"Confirm\"/\"OK\"\n */\nvar handleConfirm = function handleConfirm(modal, params) {\n var callbackValue = true;\n\n if (_hasClass$isDescendant.hasClass(modal, 'show-input')) {\n callbackValue = modal.querySelector('input').value;\n\n if (!callbackValue) {\n callbackValue = '';\n }\n }\n\n params.doneFunction(callbackValue);\n\n if (params.closeOnConfirm) {\n sweetAlert.close();\n }\n // Disable cancel and confirm button if the parameter is true\n if (params.showLoaderOnConfirm) {\n sweetAlert.disableButtons();\n }\n};\n\n/*\n * User clicked on \"Cancel\"\n */\nvar handleCancel = function handleCancel(modal, params) {\n // Check if callback function expects a parameter (to track cancel actions)\n var functionAsStr = String(params.doneFunction).replace(/\\s/g, '');\n var functionHandlesCancel = functionAsStr.substring(0, 9) === 'function(' && functionAsStr.substring(9, 10) !== ')';\n\n if (functionHandlesCancel) {\n params.doneFunction(false);\n }\n\n if (params.closeOnCancel) {\n sweetAlert.close();\n }\n};\n\nexports['default'] = {\n handleButton: handleButton,\n handleConfirm: handleConfirm,\n handleCancel: handleCancel\n};\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nvar _stopEventPropagation$fireClick = require('./handle-dom');\n\nvar _setFocusStyle = require('./handle-swal-dom');\n\nvar handleKeyDown = function handleKeyDown(event, params, modal) {\n var e = event || window.event;\n var keyCode = e.keyCode || e.which;\n\n var $okButton = modal.querySelector('button.confirm');\n var $cancelButton = modal.querySelector('button.cancel');\n var $modalButtons = modal.querySelectorAll('button[tabindex]');\n\n if ([9, 13, 32, 27].indexOf(keyCode) === -1) {\n // Don't do work on keys we don't care about.\n return;\n }\n\n var $targetElement = e.target || e.srcElement;\n\n var btnIndex = -1; // Find the button - note, this is a nodelist, not an array.\n for (var i = 0; i < $modalButtons.length; i++) {\n if ($targetElement === $modalButtons[i]) {\n btnIndex = i;\n break;\n }\n }\n\n if (keyCode === 9) {\n // TAB\n if (btnIndex === -1) {\n // No button focused. Jump to the confirm button.\n $targetElement = $okButton;\n } else {\n // Cycle to the next button\n if (btnIndex === $modalButtons.length - 1) {\n $targetElement = $modalButtons[0];\n } else {\n $targetElement = $modalButtons[btnIndex + 1];\n }\n }\n\n _stopEventPropagation$fireClick.stopEventPropagation(e);\n $targetElement.focus();\n\n if (params.confirmButtonColor) {\n _setFocusStyle.setFocusStyle($targetElement, params.confirmButtonColor);\n }\n } else {\n if (keyCode === 13) {\n if ($targetElement.tagName === 'INPUT') {\n $targetElement = $okButton;\n $okButton.focus();\n }\n\n if (btnIndex === -1) {\n // ENTER/SPACE clicked outside of a button.\n $targetElement = $okButton;\n } else {\n // Do nothing - let the browser handle it.\n $targetElement = undefined;\n }\n } else if (keyCode === 27 && params.allowEscapeKey === true) {\n $targetElement = $cancelButton;\n _stopEventPropagation$fireClick.fireClick($targetElement, e);\n } else {\n // Fallback - let the browser handle it.\n $targetElement = undefined;\n }\n }\n};\n\nexports['default'] = handleKeyDown;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nvar _isIE8 = require('./utils');\n\nvar _getModal$getInput$setFocusStyle = require('./handle-swal-dom');\n\nvar _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide = require('./handle-dom');\n\nvar alertTypes = ['error', 'warning', 'info', 'success', 'input', 'prompt'];\n\n/*\n * Set type, text and actions on modal\n */\nvar setParameters = function setParameters(params) {\n var modal = _getModal$getInput$setFocusStyle.getModal();\n\n var $title = modal.querySelector('h2');\n var $text = modal.querySelector('p');\n var $cancelBtn = modal.querySelector('button.cancel');\n var $confirmBtn = modal.querySelector('button.confirm');\n\n /*\n * Title\n */\n $title.innerHTML = params.html ? params.title : _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.escapeHtml(params.title).split('\\n').join('
    ');\n\n /*\n * Text\n */\n $text.innerHTML = params.html ? params.text : _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.escapeHtml(params.text || '').split('\\n').join('
    ');\n if (params.text) _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.show($text);\n\n /*\n * Custom class\n */\n if (params.customClass) {\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.addClass(modal, params.customClass);\n modal.setAttribute('data-custom-class', params.customClass);\n } else {\n // Find previously set classes and remove them\n var customClass = modal.getAttribute('data-custom-class');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.removeClass(modal, customClass);\n modal.setAttribute('data-custom-class', '');\n }\n\n /*\n * Icon\n */\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.hide(modal.querySelectorAll('.sa-icon'));\n\n if (params.type && !_isIE8.isIE8()) {\n var _ret = (function () {\n\n var validType = false;\n\n for (var i = 0; i < alertTypes.length; i++) {\n if (params.type === alertTypes[i]) {\n validType = true;\n break;\n }\n }\n\n if (!validType) {\n logStr('Unknown alert type: ' + params.type);\n return {\n v: false\n };\n }\n\n var typesWithIcons = ['success', 'error', 'warning', 'info'];\n var $icon = undefined;\n\n if (typesWithIcons.indexOf(params.type) !== -1) {\n $icon = modal.querySelector('.sa-icon.' + 'sa-' + params.type);\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.show($icon);\n }\n\n var $input = _getModal$getInput$setFocusStyle.getInput();\n\n // Animate icon\n switch (params.type) {\n\n case 'success':\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.addClass($icon, 'animate');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.addClass($icon.querySelector('.sa-tip'), 'animateSuccessTip');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.addClass($icon.querySelector('.sa-long'), 'animateSuccessLong');\n break;\n\n case 'error':\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.addClass($icon, 'animateErrorIcon');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.addClass($icon.querySelector('.sa-x-mark'), 'animateXMark');\n break;\n\n case 'warning':\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.addClass($icon, 'pulseWarning');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.addClass($icon.querySelector('.sa-body'), 'pulseWarningIns');\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.addClass($icon.querySelector('.sa-dot'), 'pulseWarningIns');\n break;\n\n case 'input':\n case 'prompt':\n $input.setAttribute('type', params.inputType);\n $input.value = params.inputValue;\n $input.setAttribute('placeholder', params.inputPlaceholder);\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.addClass(modal, 'show-input');\n setTimeout(function () {\n $input.focus();\n $input.addEventListener('keyup', swal.resetInputError);\n }, 400);\n break;\n }\n })();\n\n if (typeof _ret === 'object') {\n return _ret.v;\n }\n }\n\n /*\n * Custom image\n */\n if (params.imageUrl) {\n var $customIcon = modal.querySelector('.sa-icon.sa-custom');\n\n $customIcon.style.backgroundImage = 'url(' + params.imageUrl + ')';\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.show($customIcon);\n\n var _imgWidth = 80;\n var _imgHeight = 80;\n\n if (params.imageSize) {\n var dimensions = params.imageSize.toString().split('x');\n var imgWidth = dimensions[0];\n var imgHeight = dimensions[1];\n\n if (!imgWidth || !imgHeight) {\n logStr('Parameter imageSize expects value with format WIDTHxHEIGHT, got ' + params.imageSize);\n } else {\n _imgWidth = imgWidth;\n _imgHeight = imgHeight;\n }\n }\n\n $customIcon.setAttribute('style', $customIcon.getAttribute('style') + 'width:' + _imgWidth + 'px; height:' + _imgHeight + 'px');\n }\n\n /*\n * Show cancel button?\n */\n modal.setAttribute('data-has-cancel-button', params.showCancelButton);\n if (params.showCancelButton) {\n $cancelBtn.style.display = 'inline-block';\n } else {\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.hide($cancelBtn);\n }\n\n /*\n * Show confirm button?\n */\n modal.setAttribute('data-has-confirm-button', params.showConfirmButton);\n if (params.showConfirmButton) {\n $confirmBtn.style.display = 'inline-block';\n } else {\n _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.hide($confirmBtn);\n }\n\n /*\n * Custom text on cancel/confirm buttons\n */\n if (params.cancelButtonText) {\n $cancelBtn.innerHTML = _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.escapeHtml(params.cancelButtonText);\n }\n if (params.confirmButtonText) {\n $confirmBtn.innerHTML = _hasClass$addClass$removeClass$escapeHtml$_show$show$_hide$hide.escapeHtml(params.confirmButtonText);\n }\n\n /*\n * Custom color on confirm button\n */\n if (params.confirmButtonColor) {\n // Set confirm button to selected background color\n $confirmBtn.style.backgroundColor = params.confirmButtonColor;\n\n // Set the confirm button color to the loading ring\n $confirmBtn.style.borderLeftColor = params.confirmLoadingButtonColor;\n $confirmBtn.style.borderRightColor = params.confirmLoadingButtonColor;\n\n // Set box-shadow to default focused button\n _getModal$getInput$setFocusStyle.setFocusStyle($confirmBtn, params.confirmButtonColor);\n }\n\n /*\n * Allow outside click\n */\n modal.setAttribute('data-allow-outside-click', params.allowOutsideClick);\n\n /*\n * Callback function\n */\n var hasDoneFunction = params.doneFunction ? true : false;\n modal.setAttribute('data-has-done-function', hasDoneFunction);\n\n /*\n * Animation\n */\n if (!params.animation) {\n modal.setAttribute('data-animation', 'none');\n } else if (typeof params.animation === 'string') {\n modal.setAttribute('data-animation', params.animation); // Custom animation\n } else {\n modal.setAttribute('data-animation', 'pop');\n }\n\n /*\n * Timer\n */\n modal.setAttribute('data-timer', params.timer);\n};\n\nexports['default'] = setParameters;\nmodule.exports = exports['default'];"],"sourceRoot":""} \ No newline at end of file