text: webpackJsonp([1],{"/AuR":function(t,e,s){t.exports=s.p+"static/media/wrong-sound.820a779.wav"},"/PBS":function(t,e){},"1lr4":function(t,e){},EAZX:function(t,e,s){t.exports=s.p+"static/img/coder.lauti.a178794.png"},GK12:function(t,e){},IXyU:function(t,e){},IgwU:function(t,e){},JcDT:function(t,e){},NHnr:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=s("7+uW"),n={render:function(){var t=this.$createElement,e=this._self._c||t;return e("section",{staticClass:"hero is-white is-fullheight"},[e("div",{staticClass:"hero-body"},[e("div",{staticClass:"container has-text-centered"},[e("center",[e("div",{staticClass:"loader-mathquestionary"},[e("div",{staticClass:"spinner"},[e("div",{staticClass:"bounce1"}),this._v(" "),e("div",{staticClass:"bounce2"}),this._v(" "),e("div",{staticClass:"bounce3"})])])])],1)])])},staticRenderFns:[]};var i={name:"App",components:{loader:s("VU/8")({},n,!1,function(t){s("IgwU")},null,null).exports},mounted:function(){window.onload=this.pageLoaded(),"Member"==this.$route.name&&(document.querySelector("html").style["overflow-y"]="scroll")},data:function(){return{loaded:!1}},methods:{pageLoaded:function(){var t=this;setTimeout(function(){t.loaded=!0},2e3)}},watch:{$route:function(t,e){"Member"==t.name&&(document.querySelector("html, body").style["overflow-y"]="scroll"),console.log(t.name)}}},o={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"app"}},[e("loader",{directives:[{name:"show",rawName:"v-show",value:!this.loaded,expression:"!loaded"}]}),this._v(" "),e("router-view",{directives:[{name:"show",rawName:"v-show",value:this.loaded,expression:"loaded"}]})],1)},staticRenderFns:[]};var r=s("VU/8")(i,o,!1,function(t){s("td60")},null,null).exports,l=s("/ocq"),c=(s("U5zT"),{data:function(){return{google:!0}},methods:{signIn:function(){var t=this,e=this;this.$store.dispatch("firebaseSignInGoogle").then(function(s){var a=Rt.collection("users").doc(s.user.uid);a.get().then(function(n){if(n.exists)t.$store.commit("setUser",n.data()),t.$router.push("/member"),t.$store.commit("setModalState",{signIn:!1});else{var i={uid:s.user.uid,email:s.user.email,name:s.user.displayName,photoURL:s.user.photoURL,admin:!1,medallas:0,derrotas:0,victorias:0};a.set(i),e.$store.commit("setUser",{uid:s.user.uid,email:s.user.email,name:s.user.displayName,photoURL:s.user.photoURL,admin:!1,medallas:0,derrotas:0,victorias:0}),t.$router.push("/member"),t.$store.commit("setModalState",{signIn:!1})}})})}}}),u={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("button",{staticClass:"google-button",attrs:{type:"button"},on:{click:function(e){t.signIn()}}},[s("span",{staticClass:"google-button__icon"},[s("svg",{attrs:{viewBox:"0 0 366 372",xmlns:"http://www.w3.org/2000/svg"}},[s("path",{attrs:{d:"M125.9 10.2c40.2-13.9 85.3-13.6 125.3 1.1 22.2 8.2 42.5 21 59.9 37.1-5.8 6.3-12.1 12.2-18.1 18.3l-34.2 34.2c-11.3-10.8-25.1-19-40.1-23.6-17.6-5.3-36.6-6.1-54.6-2.2-21 4.5-40.5 15.5-55.6 30.9-12.2 12.3-21.4 27.5-27 43.9-20.3-15.8-40.6-31.5-61-47.3 21.5-43 60.1-76.9 105.4-92.4z",id:"Shape",fill:"#EA4335"}}),s("path",{attrs:{d:"M20.6 102.4c20.3 15.8 40.6 31.5 61 47.3-8 23.3-8 49.2 0 72.4-20.3 15.8-40.6 31.6-60.9 47.3C1.9 232.7-3.8 189.6 4.4 149.2c3.3-16.2 8.7-32 16.2-46.8z",id:"Shape",fill:"#FBBC05"}}),s("path",{attrs:{d:"M361.7 151.1c5.8 32.7 4.5 66.8-4.7 98.8-8.5 29.3-24.6 56.5-47.1 77.2l-59.1-45.9c19.5-13.1 33.3-34.3 37.2-57.5H186.6c.1-24.2.1-48.4.1-72.6h175z",id:"Shape",fill:"#4285F4"}}),s("path",{attrs:{d:"M81.4 222.2c7.8 22.9 22.8 43.2 42.6 57.1 12.4 8.7 26.6 14.9 41.4 17.9 14.6 3 29.7 2.6 44.4.1 14.6-2.6 28.7-7.9 41-16.2l59.1 45.9c-21.3 19.7-48 33.1-76.2 39.6-31.2 7.1-64.2 7.3-95.2-1-24.6-6.5-47.7-18.2-67.6-34.1-20.9-16.6-38.3-38-50.4-62 20.3-15.7 40.6-31.5 60.9-47.3z",fill:"#34A853"}})])]),t._v(" "),s("span",{staticClass:"google-button__text"},[t._v("Sign in with Google")])]),t._v(" "),t.google?t._e():s("button",{staticClass:"google-button",attrs:{type:"button"}},[s("span",{staticClass:"google-button__icon google-button__icon--plus"},[s("svg",{attrs:{viewBox:"0 0 93 60",xmlns:"http://www.w3.org/2000/svg"}},[s("path",{attrs:{d:"M.12 28.862C.375 13.725 14.29.47 29.428.974c7.253-.337 14.07 2.82 19.626 7.252-2.37 2.694-4.826 5.29-7.45 7.716-6.677-4.615-16.174-5.934-22.852-.603-9.552 6.606-9.987 22.206-.798 29.318 8.936 8.11 25.826 4.083 28.295-8.333-5.597-.084-11.21 0-16.806-.182-.013-3.34-.027-6.678-.013-10.016 9.357-.028 18.714-.043 28.085.028.56 7.856-.477 16.217-5.303 22.712-7.31 10.283-21.983 13.285-33.43 8.88C7.29 53.37-.848 41.235.12 28.862zm75.643-11.167h8.347c.014 2.792.028 5.598.056 8.39 2.792.028 5.598.028 8.39.056v8.348c-2.792.028-5.584.042-8.39.07-.028 2.805-.042 5.597-.056 8.39h-8.36c-.03-2.793-.03-5.585-.057-8.376l-8.39-.084V26.14c2.793-.027 5.584-.04 8.39-.056.014-2.805.042-5.597.07-8.39z",fill:"#DC4E41"}})])]),t._v(" "),s("span",{staticClass:"google-button__text"},[t._v("Sign in with Google")])])])},staticRenderFns:[]};var d=s("VU/8")(c,u,!1,function(t){s("k6Of")},null,null).exports,m={props:["title","closebutton"],data:function(){return{clases:{modalcard:"animated fadeInDown",modalbg:"animated fadeIn"}}},computed:{modals:function(){return this.$store.getters.getModalsState}},methods:{closeModal:function(){var t=this;this.clases.modalcard="animated fadeOutUp faster",setTimeout(function(){t.$store.commit("setModalState",{signIn:!1,register:!1}),t.clases.modalcard="animated fadeInDown"},500)}}},h={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("div",{staticClass:"modal",class:[t.modals.signIn?"is-active":""]},[s("div",{staticClass:"modal-background",class:t.clases.modalbg,on:{click:function(e){t.closeModal()}}}),t._v(" "),s("div",{staticClass:"modal-card",class:t.clases.modalcard},[s("header",{staticClass:"modal-card-head"},[s("p",{staticClass:"modal-card-title has-thin-text"},[t._v(t._s(t.title))]),t._v(" "),t.closebutton?s("button",{staticClass:"delete",attrs:{"aria-label":"close"},on:{click:function(e){t.closeModal()}}}):t._e()]),t._v(" "),s("section",{staticClass:"modal-card-body has-background-light"},[s("div",{staticClass:"btn white darken-4 col s10 m4"},[t._t("content")],2)]),t._v(" "),s("footer",{staticClass:"modal-card-foot",staticStyle:{border:"0px!important"}},[t._t("footer")],2)])])])},staticRenderFns:[]};var v=s("VU/8")(m,h,!1,function(t){s("TAn5")},null,null).exports,f={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("nav",{staticClass:"navbar is-white"},[s("div",{staticClass:"navbar-brand"},[s("a",{staticClass:"navbar-item",attrs:{href:""}},[t._v("\n\t\t      MathQuestionary\n\t\t    ")]),t._v(" "),s("a",{staticClass:"navbar-burger burger",class:[t.active?"is-active":""],attrs:{role:"button","aria-label":"menu","aria-expanded":"false","data-target":"navbarBasicExample"},on:{click:function(e){t.toggleMenu()}}},[s("span",{attrs:{"aria-hidden":"true"}}),t._v(" "),s("span",{attrs:{"aria-hidden":"true"}}),t._v(" "),s("span",{attrs:{"aria-hidden":"true"}})])]),t._v(" "),s("div",{staticClass:"navbar-menu",class:[t.active?"is-active":""]},[s("div",{staticClass:"navbar-end"},[s("a",{staticClass:"navbar-item"},[t._v("Home")]),t._v(" "),s("a",{staticClass:"navbar-item",on:{click:function(e){t.openSignIn()}}},[t._v("Sign In")])])])])])},staticRenderFns:[]};var p=s("VU/8")({mounted:function(){},data:function(){return{active:!1,scrollPosition:0}},methods:{toggleMenu:function(){this.active=!this.active},openSignIn:function(){this.$store.commit("setModalState",{signIn:!0,register:!1})}}},f,!1,function(t){s("1lr4")},null,null).exports,g={props:["color","timeout","buttonclose","outclass","inclass","waittoshow"],mounted:function(){var t=this;null==this.color&&(this.color="is-primary"),null==this.inclass||null==this.outclass?(this.apply.outclass="animated fadeOut faster",this.apply.inclass="animated fadeIn faster"):(this.apply.outclass=this.outclass,this.apply.inclass=this.inclass);var e=0;e=null==this.waittoshow?3e3:this.waittoshow,setTimeout(function(){return t.openNotification()},e),setTimeout(function(){return t.closeToast()},this.timeout)},data:function(){return{out:!1,active:!1,apply:{outclass:"",inclass:""}}},methods:{openNotification:function(){this.out||(this.active=!0)},closeToast:function(){this.out=!0;var t=this;setTimeout(function(){t.active=!1},750)}}},C={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("div",{directives:[{name:"show",rawName:"v-show",value:t.active,expression:"active"}],staticClass:"notification animated",class:[t.out?t.apply.outclass:t.apply.inclass,t.color]},[t.buttonclose?s("button",{staticClass:"delete",on:{click:function(e){t.closeToast()}}}):t._e(),t._v(" "),t._t("content")],2)])},staticRenderFns:[]};var _=s("VU/8")(g,C,!1,function(t){s("b2Nr")},null,null).exports,b={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"column",class:null!=t.col?"is-"+t.col:""},[s("div",{staticClass:"card participantComponent",class:null!=t.col?"is-"+t.col:""},[s("div",{staticClass:"card-image"},[s("figure",{staticClass:"image"},[s("img",{attrs:{src:t.image,alt:"Placeholder image"}})])]),t._v(" "),s("div",{staticClass:"card-content"},[s("div",{staticClass:"media"},[s("div",{staticClass:"media-content has-text-centered"},[s("p",{staticClass:"title is-4 has-text-centered"},[t._v(t._s(t.name))]),t._v(" "),t.coder?s("span",{staticClass:"tag is-primary is-medium"},[t._v("\n\t        \tCODER\n\t        ")]):s("span",{staticClass:"tag is-info is-medium"},[t._v("\n\t        \tQUESTION CREATOR\n\t        ")])])])])])])},staticRenderFns:[]},x=s("VU/8")({props:["col","name","image","coder"],data:function(){return{}}},b,!1,null,null,null).exports,w=s("kxiW"),y=s.n(w),q=s("EAZX"),S=s.n(q),k=s("cJIQ"),j=s.n(k),M=s("gWdu"),E=s.n(M),U=[{name:"Lautaro Umpierrez",image:S.a,coder:!0},{name:"Cataline Coeff",image:E.a,coder:!1},{name:"Guadalupe San Martín",image:j.a,coder:!1}],T={components:{participantComponent:x,toast:_,navbar:p,"signin-modal":v,"signin-google-button":d},data:function(){return{participantes:[]}},mounted:function(){this.participantes=U;var t=this;y.a.auth().onAuthStateChanged(function(e){if(e){e.displayName,e.email,e.emailVerified,e.photoURL,e.isAnonymous;var s=e.uid,a=(e.providerData,{});Rt.collection("users").doc(s).get().then(function(e){a=e.data(),t.$store.commit("setUser",a),t.$router.push("/member")})}}),document.querySelector("body,html").style["overflow-y"]="scroll"},methods:{openSignIn:function(){this.$store.commit("setModalState",{signIn:!0,register:!1})}}},$={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("navbar"),t._v(" "),s("signin-modal",{attrs:{title:"Select the method to authenticate",closebutton:"true"}},[s("div",{attrs:{slot:"content"},slot:"content"},[s("center",[s("signin-google-button")],1)],1)]),t._v(" "),s("div",{staticClass:"hero is-fullheight-with-navbar principalHero-presentation"},[s("div",{staticClass:"hero-body"},[s("div",{staticClass:"container has-text-centered"},[s("p",{staticClass:"title is-3 has-text-white"},[t._v("\n\t\t\t\t\tMathQuestionary\n\t\t\t\t")]),t._v(" "),s("p",{staticClass:"subtitle is-4 has-text-white"},[t._v("\n\t\t\t\t\t¡ Entrena tu mente y aumenta tus ganas de aprender !\n\t\t\t\t")]),t._v(" "),s("toast",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],attrs:{color:"is-danger",timeout:1e4,outclass:"slower zoomOut",inclass:"faster slideInDown",buttonclose:!0}},[s("div",{attrs:{slot:"content"},slot:"content"},[s("h2",[t._v("Hello world")])])])],1)])]),t._v(" "),s("div",{staticClass:"hero is-fullheight famous-hero"},[s("div",{staticClass:"hero-body coders-container"},[s("div",{staticClass:"container"},[s("div",{staticClass:"columns is-multiline"},t._l(t.participantes,function(t,e){return s("participantComponent",{key:e,attrs:{col:"4",name:t.name,image:t.image,coder:t.coder}})}))])])])],1)},staticRenderFns:[]};var A=s("VU/8")(T,$,!1,function(t){s("Tfa4")},null,null).exports,R=s("mvHQ"),z=s.n(R),I={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{attrs:{id:"medals"}},[s("div",{staticClass:"box has-text-black"},[s("p",{staticClass:"title has-text-black is-3 has-text-weight-light"},[t._v("\n\t\t\tYour Achievements\n\t\t")]),t._v(" "),s("hr"),t._v(" "),s("div",{staticClass:"achievements"},[t._l(t.user.medallas,function(t){return s("span",{staticClass:"icon fas is-large fa-3x"},[s("i",{staticClass:"fas is-large fa-trophy won"})])}),t._v(" "),t._l(t.restoRatingItem,function(t){return s("span",{staticClass:"icon fas is-large fa-3x"},[s("i",{staticClass:"fas is-large fa-trophy disabled"})])})],2),t._v(" "),s("hr"),t._v(" "),s("strong",[t._v(t._s(t.valor+"%"))]),t._v(" "),s("progress",{staticClass:"progress is-success",attrs:{max:"100"},domProps:{value:t.valor}},[t._v(t._s(t.valor+"%"))])])])},staticRenderFns:[]};var O=s("VU/8")({mounted:function(){this.getMedallsAchievements()},data:function(){return{valor:0,questions:10}},methods:{getMedallsAchievements:function(){var t=100*this.user.medallas;t/=this.questions,this.valor=t}},computed:{user:function(){return this.$store.getters.getUserInfo},restoRatingItem:function(){return this.questions-this.user.medallas}}},I,!1,function(t){s("JcDT")},null,null).exports,P=[{text:"El éxito no está en vencer siempre sino en no desanimarse nunca.",author:"Napoleón Bonaparte"},{text:"No vemos las cosas como son. Las vemos como somos nosotros.",author:"Talmu"},{text:"El fracaso es un requisito para el éxito. Si quieres triunfar rápido, duplica el número de tus fracasos.",author:"Brian Tracy"},{text:"El único sitio donde el éxito llega antes que el trabajo es en el diccionario.",author:"Vidal Sassoon"},{text:"Olvídate de todas las razones por las que no deberías hacerlo y piensa en la única razón por la que sí deberías hacerlo.",author:"Anónimo"},{text:"Dentro de veinte años estarás más decepcionado por las cosas que no hiciste que por las que hiciste. Así que suelta las amarras. Atrapa los vientos alisios en tus velas. Explora. Sueña. Descubre. ",author:"Mark Twain"},{text:"No juzgues cada día por la cosecha que has obtenido, sino por las semillas que has plantado.",author:"Robert Louis Stevenson"},{text:"La razón por la que algunas personas les resulta tan difícil ser felices es porque ven el pasado mejor de lo que era, el presente peor de lo que es, y el futuro menos resuelto de lo que será. ",author:"Marcel Pagnol"},{text:"Un viaje de mil millas comienza con un solo paso.",author:"Lao Tzu"},{text:"La incertidumbre es la única certeza que hay, y saber cómo vivir con la inseguridad es la única seguridad.",author:"John Allen Paulos"},{text:"Si la oportunidad no llama, construye una puerta.",author:"Milton Berle"},{text:"Cuando no se puede cambiar la dirección del viento, simplemente ajusta las velas.",author:"H. Jackson Brown Jr."},{text:"Nunca es demasiado tarde para ser lo que podría haber sido.",author:"George Eliot"},{text:"Todos nuestros sueños pueden hacerse realidad si sólo tenemos el coraje de perseguirlos.",author:"Walt Disney"},{text:"Cuando una puerta se cierra, otra se abre; pero a menudo miramos tanto tiempo y tan tristemente la puerta cerrada, que no vemos la que se ha abierto para nosotros.",author:"Alexander Graham Bell"},{text:"El hombre razonable se adapta al mundo; el no razonable persiste en intentar adaptar el mundo a sí mismo. Por lo tanto, todo progreso depende del hombre irrazonable. ",author:"George Bernard Shaw"},{text:"El cambio es inevitable. El progreso es opcional.",author:"Tony Robbins"},{text:"No me gustan las etiquetas. Te limitan, y yo no quiero límites.",author:"Maddona"},{text:"No se pueden forzar ideas. Las ideas verdaderamente exitosas son el resultado de un crecimiento gradual. Las ideas no alcanzan la perfección en un día, lo hacen a fuego lento.",author:"Anónimo"},{text:"Amarse a uno mismo es el comienzo de un romance de toda la vida.",author:"Oscar Wilde"},{text:"La felicidad siempre se cuela en una puerta que no creía que estaba abierta.",author:"Anónimo"},{text:"El logro de un objetivo debe ser el punto de partida de otro.",author:"Alexander Graham Bell"},{text:"El éxito llega para todos aquellos que están ocupados buscándolo.",author:"Henry Thoreau"},{text:"Dondequiera que vayas, sin importar el clima, siempre lleva tu propio sol. La actitud lo es todo… ",author:"D’Angelo"}],B={mounted:function(){this.loadSentence()},data:function(){return{frase:{},reloading:!1,frases:P}},methods:{reload:function(){var t=this;this.frase={text:"",author:""},this.reloading=!0,setTimeout(function(){return t.loadSentence()},1500)},loadSentence:function(){var t=Math.floor(Math.random()*this.frases.length);this.frase=this.frases[t],this.reloading=!1}}},N={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("br"),t._v(" "),s("div",{staticClass:"box has-text-centered frases-comp"},[s("h2",{staticClass:"title is-3 has-text-weight-light has-text-dark"},[t._v("\n\t\t\tMotivate aprendiendo...\n\t\t\t"),s("button",{staticClass:"button icon-only reload-frase",on:{click:function(e){t.reload()}}},[s("i",{staticClass:"fas fa-sync-alt",class:[t.reloading?"fa-pulse":""]})])]),t._v(" "),s("div",{staticClass:"content"},[s("blockquote",[s("p",[s("cite",[t._v("“ "+t._s(t.frase.text)+" ”")])]),t._v(" "),s("footer",[s("span",{staticClass:"has-text-weight-bold"},[t._v(t._s(t.frase.author))])])])])]),t._v(" "),s("br")])},staticRenderFns:[]};var F=s("VU/8")(B,N,!1,function(t){s("ygC3")},null,null).exports,L={components:{medals:O,sentences:F},mounted:function(){console.log(this.$store.getters.getUserInfo),document.querySelector("html").style["overflow-y"]="hidden"},data:function(){return{active:!1,clases:"animated fadeInUp faster"}},methods:{scrollMeTo:function(t){var e=document.getElementById(t).offsetTop;document.querySelector(".menu-mathquestionary").scrollTo(0,e)},toggleMenu:function(){if(this.active){this.clases="animated fadeOutDown faster";var t=this;setTimeout(function(){t.active=!1,t.clases="animated fadeInUp faster"},500)}else this.active=!0},signOut:function(){var t=this;this.$store.dispatch("firebaseLogOut").then(function(){t.$router.push({path:"/"})})},goTo:function(t){this.toggleMenu(),this.$router.push(t)}},computed:{user:function(){return this.$store.getters.getUserInfo}}},V={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("nav",{staticClass:"navbar is-transparnet navbar-member-mathquestionary"},[s("div",{staticClass:"navbar-brand"},[t._m(0),t._v(" "),s("a",{staticClass:"navbar-burger burger",attrs:{role:"button","aria-label":"menu","aria-expanded":"false","data-target":"navbarBasicExample"},on:{click:function(e){t.toggleMenu()}}},[s("span",{attrs:{"aria-hidden":"true"}}),t._v(" "),s("span",{attrs:{"aria-hidden":"true"}}),t._v(" "),s("span",{attrs:{"aria-hidden":"true"}})])]),t._v(" "),s("div",{staticClass:"navbar-menu is-hidden-touch"},[s("div",{staticClass:"navbar-end"},[s("a",{staticClass:"navbar-item open-menu-desktop",on:{click:function(e){t.toggleMenu()}}},[s("i",{staticClass:"fas fa-bars icon is-large"})])])])]),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:t.active,expression:"active"}],staticClass:"menu-mathquestionary",class:t.clases},[s("div",{staticClass:"close-button",on:{click:function(e){t.toggleMenu()}}},[s("i",{staticClass:"fas fa-times-circle"})]),t._v(" "),s("section",{staticClass:"hero is-fullheight is-light"},[s("div",{staticClass:"hero-body "},[s("div",{staticClass:"container has-text-centered "},[s("center",[s("div",{staticClass:"box is-hidden-touch"},[s("figure",{staticClass:"image user-image-mathquestionary"},[s("img",{staticClass:"is-rounded",attrs:{src:t.user.photoURL}})]),t._v(" "),s("hr"),t._v(" "),s("h2",{staticClass:"title has-text-black is-4 has-text-weight-light"},[t._v(" "+t._s(t.user.name))]),t._v(" "),s("h2",{staticClass:"title has-text-black is-5 has-text-weight-light"},[t._v(" "+t._s(t.user.email))]),t._v(" "),s("div",{staticClass:"tabs is-centered is-boxed"},[s("ul",[s("li",[s("a",{on:{click:function(e){t.goTo({path:"/member"})}}},[s("span",{staticClass:"icon is-small"},[s("i",{staticClass:"fas fa-gamepad"})]),t._v(" "),s("span",[t._v("Play")])])]),t._v(" "),s("li",[s("a",{on:{click:function(e){t.scrollMeTo("medals")}}},[s("span",{staticClass:"icon is-small"},[s("i",{staticClass:"fas fa-medal"})]),t._v(" "),s("span",[t._v("Medallas")])])]),t._v(" "),s("li",[s("a",{on:{click:function(e){t.goTo({name:"ChatPage"})}}},[s("span",{staticClass:"icon is-small"},[s("i",{staticClass:"fas fa-comments"})]),t._v(" "),s("span",[t._v("Chat")])])]),t._v(" "),s("li",[s("a",[s("span",{staticClass:"icon is-small"},[s("i",{staticClass:"fas fa-angle-double-up"})]),t._v(" "),s("span",[t._v("Ranking")])])]),t._v(" "),s("li",[s("a",{on:{click:function(e){t.goTo({name:"ChartPage"})}}},[s("span",{staticClass:"icon is-small"},[s("i",{staticClass:"fas fa-chart-pie"})]),t._v(" "),s("span",[t._v("Gráfica")])])]),t._v(" "),t.user.admin?s("li",{on:{click:function(e){t.goTo({path:"/member/questcreator"})}}},[s("a",[s("span",{staticClass:"icon is-small"},[s("i",{staticClass:"fas fa-question"})]),t._v(" "),s("span",[t._v("QuestCreator")])])]):t._e(),t._v(" "),s("li",[s("a",{on:{click:function(e){t.signOut()}}},[s("span",{staticClass:"icon is-small"},[s("i",{staticClass:"fas fa-sign-out-alt",attrs:{"aria-hidden":"true"}})]),t._v(" "),s("span",[t._v("SignOut")])])])])])]),t._v(" "),s("div",{staticClass:"profile-card-mathquestionary card is-hidden-desktop"},[s("div",{staticClass:"card-image"},[s("figure",{staticClass:"image is-4by3"},[s("img",{attrs:{src:t.user.photoURL,alt:t.user.name+" PHOTO "}})])]),t._v(" "),s("div",{staticClass:"card-content"},[s("div",{staticClass:"media"},[s("div",{staticClass:"media-content"},[s("p",{staticClass:"title is-4 has-text-black"},[t._v(t._s(t.user.name))]),t._v(" "),s("p",{staticClass:"subtitle is-6 has-text-black"},[t._v(t._s(t.user.email))])])]),t._v(" "),s("div",{staticClass:"content"},[s("div",{staticClass:"tabs is-centered is-boxed"},[s("ul",{staticClass:"columns is-multiline"},[s("li",{staticClass:"column is-6"},[s("a",{on:{click:function(e){t.goTo({path:"/member"}),t.toggleMenu()}}},[s("span",{staticClass:"icon is-small"},[s("i",{staticClass:"fas fa-gamepad"})]),t._v(" "),s("span",[t._v("Play")])])]),t._v(" "),s("li",{staticClass:"is-active column is-6"},[s("a",{attrs:{href:"#medals"}},[s("span",{staticClass:"icon is-small"},[s("i",{staticClass:"fas fa-medal"})]),t._v(" "),s("span",[t._v("Medallas")])])]),t._v(" "),s("li",{staticClass:"column is-6"},[s("a",{on:{click:function(e){t.goTo({name:"ChatPage"})}}},[s("span",{staticClass:"icon is-small"},[s("i",{staticClass:"fas fa-comments"})]),t._v(" "),s("span",[t._v("Chat")])])]),t._v(" "),s("br"),t._v(" "),s("li",{staticClass:"column is-6"},[s("a",[s("span",{staticClass:"icon is-small"},[s("i",{staticClass:"fas fa-angle-double-up"})]),t._v(" "),s("span",[t._v("Ranking")])])]),t._v(" "),s("li",{staticClass:"column is-6"},[s("a",{on:{click:function(e){t.goTo({name:"ChartPage"})}}},[s("span",{staticClass:"icon is-small"},[s("i",{staticClass:"fas fa-chart-pie"})]),t._v(" "),s("span",[t._v("Gráfica")])])]),t._v(" "),t.user.admin?s("li",{staticClass:"column is-6",on:{click:function(e){t.goTo({path:"/member/questcreator"})}}},[s("a",[s("span",{staticClass:"icon is-small"},[s("i",{staticClass:"fas fa-question"})]),t._v(" "),s("span",[t._v("QuestCreator")])])]):t._e(),t._v(" "),s("li",{staticClass:"column is-6"},[s("a",{on:{click:function(e){t.signOut()}}},[s("span",{staticClass:"icon is-small"},[s("i",{staticClass:"fas fa-sign-out-alt",attrs:{"aria-hidden":"true"}})]),t._v(" "),s("span",[t._v("SignOut")])])])])])])])]),t._v(" "),s("medals"),t._v(" "),s("sentences")],1)],1)])])])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("a",{staticClass:"navbar-item",attrs:{href:""}},[e("span",{staticClass:"title is-4 has-text-weight-normal"},[this._v("MathQuestionary")])])}]};var G=s("VU/8")(L,V,!1,function(t){s("UhZB")},null,null).exports,Q=(s("Pc14"),s("/AuR")),D=s.n(Q),H=s("yO38"),W=s.n(H),X={components:{navbar:G},mounted:function(){var t=this;Rt.collection("questions").get().then(function(e){e.forEach(function(e){t.questions.push(e.data())}),t.playButton.active=!0}),this.wrongAudio=new Audio,this.wrongAudio.src=D.a,this.winAudio=new Audio,this.winAudio.src=W.a,this.screen=window.innerWidth},data:function(){return{screen:1366,playButton:{clases:"",active:!1},userSide:{correct:6,finished:!1,classToSelected:"has-background-info",counter:10,intervaler:null,"box-styling":"has-background-white"},wrongAudio:null,winAudio:null,realCorrect:6,questions:[]}},methods:{closeGameModal:function(){this.$store.commit("setGameModalInformation",{text:"",answers:[]}),this.resetAll(),this.$store.commit("setGameModalState",!1)},resetAll:function(){this.userSide={correct:6,finished:!1,classToSelected:"has-background-info",counter:10,intervaler:null,"box-styling":"has-background-white"},this.realCorrect=6},play:function(){if(this.playButton.active){this.playButton.clases="is-loading";var t=this;setTimeout(function(){if(t.questions.length>0){t.$store.commit("setGameModalState",!0);var e=Math.floor(Math.random()*t.questions.length),s=t.questions[e];t.$store.commit("setGameModalInformation",{text:s.text,answers:s.answers}),null==s.time&&(s.time=10),t.userSide.counter=s.time,t.startTheGame(),console.log(z()(t.gameModal))}else t.$toasted.info("Lo sentimos, no hay preguntas disponibles.",{theme:"primary",position:"bottom-right",duration:2500});t.playButton.clases=""},1e3)}},verifyResponse:function(){if(this.userSide.finished=!0,clearInterval(this.userSide.intervaler),6!=this.userSide.correct)if(this.gameModal.information.question.answers[this.userSide.correct].correct)this.gameModal.information.question.answers[this.userSide.correct].correct&&(this.winAudio.play(),this.realCorrect=this.userSide.correct,this.userSide["box-styling"]="has-background-primary",this.youWin());else{this.wrongAudio.play();var t=6;this.gameModal.information.question.answers.forEach(function(e,s){e.correct&&(t=s)}),this.realCorrect=t,this.userSide.classToSelected="has-background-danger",this.userSide["box-styling"]="has-background-warning",this.youLost()}else{t=6;this.wrongAudio.play(),this.userSide["box-styling"]="has-background-warning",this.gameModal.information.question.answers.forEach(function(e,s){e.correct&&(t=s)}),this.realCorrect=t,this.youLost()}},startTheGame:function(){var t=this;this.userSide.intervaler=setInterval(function(){1==t.userSide.counter&&(t.userSide.counter-=1,t.verifyResponse()),t.userSide.counter-=1},1e3)},youLost:function(){var t=Rt.collection("users").doc(this.userState.uid),e=this.userState.derrotas;e+=1;t.update({derrotas:e}).then(function(){console.log("TODO OK.")});this.$store.commit("aumentarDerrotas")},youWin:function(){var t=Rt.collection("users").doc(this.userState.uid),e=this.userState.victorias;e+=1;t.update({victorias:e}).then(function(){console.log("TODO OK.")});this.$store.commit("aumentarVictorias")},setCorrect:function(t){this.userSide.finished||(this.userSide.correct=t,console.log(t))}},computed:{gameModal:function(){return this.$store.getters.getModalState},userState:function(){return this.$store.getters.getUserInfo}}},Y={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("div",{staticClass:"hero is-fullheight hero-mathquestionary-polka-points is-danger is-bold"},[s("navbar"),t._v(" "),s("div",{staticClass:"hero-body"},[s("div",{staticClass:"container has-text-centered"},[s("h2",{staticClass:"title is-3 has-text-white"},[t._v("\n\t\t\t\t\tAcepta el reto !\n\t\t\t\t")]),t._v(" "),s("a",{staticClass:"button is-white is-hidden-touch is-medium is-outlined",class:t.playButton.clases,attrs:{disabled:!t.playButton.active},on:{click:function(e){t.play()}}},[t._v("PLAY NOW")]),t._v(" "),s("a",{staticClass:"button is-danger is-medium is-hidden-desktop",class:t.playButton.clases,attrs:{disabled:!t.playButton.active},on:{click:function(e){t.play()}}},[t._v("\n\t\t\t\t\tPLAY NOW\n\t\t\t\t")])])])],1),t._v(" "),s("div",{staticClass:"gameModal animated fadeInDown faster",class:[t.gameModal.active?"is-active":""]},[s("div",[s("section",{staticClass:"hero is-fullheight"},[s("div",{staticClass:"hero-body"},[s("div",{staticClass:"container"},[s("div",{staticClass:"box",class:t.userSide["box-styling"]},[s("form",[s("p",{staticClass:"title is-3 has-text-centered",class:["has-background-warning"==t.userSide["box-styling"]?"has-text-grey-dark":"has-text-white","has-background-white"==t.userSide["box-styling"]?"has-text-grey-dark":""]},[t._v("\n\t\t\t     \t\t\t¿"+t._s(t.gameModal.information.question.text)+"?\n\t\t\t     \t\t")]),t._v(" "),t.userSide.counter>0?s("div",{staticClass:"buttoncounter"},[s("a",{staticClass:"button is-medium is-fullwidth has-text-centered is-static"},[t._v("You have "+t._s(t.userSide.counter)+"s")]),t._v(" "),s("br"),s("br")]):t._e(),t._v(" "),t._l(t.gameModal.information.question.answers,function(e,a){return s("article",{key:a,staticClass:"media manager-questions-question has-background-white",class:[t.userSide.correct==a?t.userSide.classToSelected:"",t.realCorrect==a?"has-background-success":""],staticStyle:{cursor:"pointer"},on:{click:function(e){t.setCorrect(a)}}},[s("div",{staticClass:"media-content"},[s("div",{staticClass:"content"},[s("p",[t.userSide.finished?t._e():s("input",{directives:[{name:"model",rawName:"v-model",value:t.userSide.correct,expression:"userSide.correct"}],attrs:{type:"radio",name:"correct"},domProps:{value:a,checked:t._q(t.userSide.correct,a)},on:{change:function(e){t.$set(t.userSide,"correct",a)}}}),t._v(" "),s("strong",{class:[t.userSide.correct==a?"has-text-white":"",t.realCorrect==a?"has-text-white":""]},[t._v(t._s(e.text))])])])])])})],2),t._v(" "),s("br"),t._v(" "),s("p",{staticClass:"subtitle has-text-centered"},["has-background-warning"==t.userSide["box-styling"]?s("span",{staticClass:"has-text-grey-dark"},[t._v("\n\t\t\t\t\t\t\tYou lost...\n\t\t\t\t\t\t")]):t._e(),t._v(" "),"has-background-primary"==t.userSide["box-styling"]?s("span",{staticClass:"has-text-white"},[t._v("\n\t\t\t\t\t\t\tYou win\n\t\t\t\t\t\t")]):t._e()]),t._v(" "),s("center",[t.userSide.finished?s("a",{staticClass:"button is-success is-medium",on:{click:function(e){t.closeGameModal()}}},[t._v("\n\t\t\t\t\t\t\tPlay again...\n\t\t\t\t\t\t")]):t._e()])],1)])])])])])])},staticRenderFns:[]};var J=s("VU/8")(X,Y,!1,function(t){s("IXyU")},null,null).exports,K=(s("fpBc"),{mounted:function(){var t=this;this.reedOlderMessagesToggle(!1),zt.ref("messages").on("child_added",function(e){t.messages.push(e.val()),t.olderMessages||setTimeout(function(){document.querySelector(".chat-messages").scrollTop+=document.querySelector(".chat-messages").scrollHeight},100),t.messages.length>=2e3&&(zt.ref("messages").remove(),t.messages=[])})},data:function(){return{messages:[],message:{text:"",user:{name:"",email:"",photoURL:"",uid:""}},showMoreScroll:{active:!1,clases:"animated fadeIn faster",hoveredBox:!1},olderMessages:!1}},methods:{setShowMoreScroll:function(t){var e=this;t?t&&(this.showMoreScroll.clases="animated fadeIn faster",this.showMoreScroll.active=!0):(this.showMoreScroll.clases="animated fadeOut faster",setTimeout(function(){e.showMoreScroll.active=!1,e.showMoreScroll.hoveredBox=!1},200)),"mouseleave-head"==t&&setTimeout(function(){e.showMoreScroll.hoveredBox||(e.showMoreScroll.clases="animated fadeOut faster",setTimeout(function(){e.showMoreScroll.active=!1,e.showMoreScroll.hoveredBox=!1},200))},100)},reedOlderMessagesToggle:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;null==e?this.olderMessages?(document.querySelector(".chat-messages").style["overflow-y"]="hidden",document.querySelector(".chat-messages").scrollTop+=document.querySelector(".chat-messages").scrollHeight,setTimeout(function(){return t.olderMessages=!1},700)):(document.querySelector(".chat-messages").style["overflow-y"]="scroll",this.olderMessages=!0):document.querySelector(".chat-messages").style["overflow-y"]=e?"scroll":"hidden"},sendMessage:function(){this.message.user={name:this.user.name,email:this.user.email,uid:this.user.uid,photoURL:this.user.photoURL},zt.ref("messages").push().set(this.message),this.message={text:"",user:{name:"",email:"",uid:""}}}},computed:{user:function(){return this.$store.getters.getUserInfo}}}),Z={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"chat-box"},[s("div",{staticClass:"chat-header",on:{mouseleave:function(e){t.setShowMoreScroll("mouseleave-head")},mouseover:function(e){t.setShowMoreScroll(!0)}}},[t._m(0)]),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:t.showMoreScroll.active,expression:"showMoreScroll.active"}],staticClass:"show-scroll-box",on:{mouseover:function(e){t.showMoreScroll.hoveredBox=!0},mouseleave:function(e){t.setShowMoreScroll(!1)}}},[s("center",[s("div",{staticClass:"button-container",class:t.showMoreScroll.clases},[s("a",{staticClass:"button has-shadow is-rounded is-white",on:{click:function(e){t.reedOlderMessagesToggle()}}},[t.olderMessages?s("span",[t._v("Close scroll...")]):s("span",[t._v("Show scroll...")])])])])],1),t._v(" "),s("div",{staticClass:"chat-messages"},[s("ul",t._l(t.messages,function(e,a){return s("div",{key:a},[s("li",{staticClass:"message-item animated fadeIn has-text-white",class:[e.user.uid==t.user.uid?"me":"you"]},[e.user.uid!=t.user.uid?s("strong",[t._v("\n\t\t\t\t\t\t"+t._s(e.user.name)+"\n\t\t\t\t\t")]):s("strong",[t._v("Yo")]),t._v("\n\t\t\t\t\t: "+t._s(e.text)+"\n\t\t\t\t")])])}))]),t._v(" "),s("div",{staticClass:"chat-send-box"},[s("div",{staticClass:"field has-addons has-addons-centered"},[s("p",{staticClass:"control is-expanded"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.message.text,expression:"message.text"}],staticClass:"input",attrs:{type:"text",placeholder:"YOUR MESSAGE"},domProps:{value:t.message.text},on:{keyup:function(e){if(!("button"in e)&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;t.sendMessage()},input:function(e){e.target.composing||t.$set(t.message,"text",e.target.value)}}})]),t._v(" "),s("p",{staticClass:"control"},[s("a",{staticClass:"button is-link",on:{click:function(e){t.sendMessage()}}},[t._v("\n\t\t      Send  "),s("i",{staticClass:"fas fa-paper-plane"})])])])])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"title-box"},[e("p",{staticClass:"subtitle has-text-black is-4"},[e("span",{staticClass:"has-text-weight-light"},[this._v("Global chat")]),this._v(" "),e("span",{staticClass:"tag is-info"},[this._v("beta")])])])}]};var tt={components:{navbar:G,"chat-comp":s("VU/8")(K,Z,!1,function(t){s("b0X0")},null,null).exports}},et={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("div",{staticClass:"hero is-fullheight hero-chat-mathquestionary-polka-points is-danger is-bold hero-chat-page"},[e("div",{staticClass:"hero-head"},[e("navbar")],1),this._v(" "),e("div",{staticClass:"hero-body"},[e("div",{staticClass:"container has-text-centered"},[e("center",[e("chat-comp")],1)],1)])])])},staticRenderFns:[]};var st=s("VU/8")(tt,et,!1,function(t){s("pUfp")},null,null).exports,at={mounted:function(){},components:{chart:{extends:s("UlOv").a,props:["data","options"],data:function(){return{datacollection:{labels:["Victorias","Derrotas"],datasets:[{label:"Data One",backgroundColor:["#FFC107","#FF5252"],data:[60,40]}]}}},mounted:function(){console.log(this.data),this.datacollection.datasets[0].data=this.data,this.renderChart(this.datacollection,{responsive:!0,maintainAspectRatio:!1})},methods:{}}},data:function(){return{chartData:null,chartOptions:null}},methods:{goBack:function(){this.$router.go(-1)},setDerrotasAndVictorias:function(){this.dataInfo=[this.userState.victorias,this.userState.derrotas]}},computed:{userState:function(){return this.$store.getters.getUserInfo}}},nt={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("nav",{staticClass:"navbar is-info"},[s("div",{staticClass:"navbar-brand"},[s("a",{staticClass:"navbar-item",on:{click:function(e){t.goBack()}}},[s("i",{staticClass:"fas fa-arrow-left"}),t._v(" \n\t\t\t\tGO BACK\n\t\t\t")])])]),t._v(" "),s("br"),t._v(" "),s("chart",{attrs:{data:[t.userState.victorias,t.userState.derrotas],options:{}}})],1)},staticRenderFns:[]},it=s("VU/8")(at,nt,!1,null,null,null).exports,ot={props:["cantidad"],mounted:function(){this.getBetterUsers()},data:function(){return{users:[]}},methods:{getBetterUsers:function(){var t=this;Rt.collection("users").orderBy("victorias","desc").limit(this.cantidad).get().then(function(e){e.forEach(function(e){t.users.push(e.data())})})}},computed:{}},rt={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("section",{staticClass:"hero is-fullheight is-danger is-bold"},[s("div",{staticClass:"hero-body"},[s("div",{staticClass:"container"},[s("div",{staticClass:"betterUsers"},[s("div",{staticClass:"columns"},t._l(t.users,function(e,a){return s("div",{key:a,staticClass:"column is-4"},[s("div",{staticClass:"is-one-of-better-users has-background-white"},[s("div",{staticClass:"image-container"},[s("center",[s("img",{staticClass:"is-rounded",attrs:{src:"https://bulma.io/images/placeholders/128x128.png"}})])],1),t._v(" "),t._m(0,!0)])])}))])])])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"info-container has-text-dark has-text-centered"},[e("p",{staticClass:"title is-4  has-text-dark has-text-weight-light"},[this._v("\n\t\t\t\t\t\t\t\t\tLautaro Umpierrez\n\t\t\t\t\t\t\t\t")])])}]};var lt={components:{"better-users":s("VU/8")(ot,rt,!1,function(t){s("/PBS")},null,null).exports},data:function(){return{}}},ct={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("better-users",{attrs:{cantidad:3}})],1)},staticRenderFns:[]},ut=s("VU/8")(lt,ct,!1,null,null,null).exports,dt={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("aside",{staticClass:"menu has-background-danger menu-lateral-mathquestionary-questcreator"},[s("ul",{staticClass:"menu-list"},[s("li",[s("a",{on:{click:function(e){t.goTo({path:"/member/questcreator"})}}},[t._v("Dashboard")])]),t._v(" "),s("li",[s("a",{on:{click:function(e){t.goTo({path:"/member/questcreator/create"})}}},[t._v("New question")])]),t._v(" "),s("li",[s("a",{on:{click:function(e){t.goTo({path:"/member/questcreator/manager"})}}},[t._v("Questions manager")])]),t._v(" "),s("li",[s("a",{on:{click:function(e){t.goTo({path:"/member"})}}},[t._v("Go back!")])])])])])},staticRenderFns:[]},mt=s("VU/8")({methods:{goTo:function(t){this.$router.push(t)}}},dt,!1,null,null,null).exports,ht=(s("vrEE"),{components:{"lateral-menu":mt},mounted:function(){window.innerWidth<768?document.querySelector("html").style["overflow-y"]="visible":document.querySelector("html").style["overflow-y"]="hidden",window.onresize=function(){window.innerWidth<768?document.querySelector("html").style["overflow-y"]="visible":document.querySelector("html").style["overflow-y"]="hidden"}}}),vt={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"QuestCreator"},[e("div",{staticClass:"columns"},[e("lateral-menu",{staticClass:"animated faster slideInLeft column is-3"}),this._v(" "),e("transition",{attrs:{name:"fade",mode:"out-in",appear:""}},[e("router-view",{staticClass:"page column is-9 columnaCreateContainer"})],1)],1)])},staticRenderFns:[]};var ft=s("VU/8")(ht,vt,!1,function(t){s("rGda")},null,null).exports,pt={mounted:function(){this.audios.wrong=new Audio,this.audios.wrong.src=D.a},data:function(){return{audios:{wrong:null},answer:{text:"",correct:!1},question:{text:"",answers:[],time:10},modalAnswer:{active:!1}}},methods:{addAnswer:function(){this.question.answers.length<5?(this.question.answers.push(this.answer),this.modalAnswer.active=!1,this.answer={text:"",correct:!1}):(this.modalAnswer.active=!1,this.answer={text:"",correct:!1})},openModal:function(){this.question.answers.length<5?this.modalAnswer.active=!0:this.$toasted.error("Has creado el máximo permitido de respuestas.",{theme:"primary",position:"bottom-right",duration:5e3})},removeAnswer:function(t){this.question.answers.splice(t,1)},finish:function(){var t=this,e=!1;this.question.answers.forEach(function(t){t.correct&&(e=!0)}),e?Rt.collection("questions").add(this.question).then(function(){t.question={text:"",answers:[]}}):(this.audios.wrong.play(),alert("Debes seleccionar una respuesta correcta dandole click a una de las que has escrito."))},setCorrect:function(t){this.question.answers.forEach(function(t){t.correct=!1}),this.question.answers[t].correct=!0}}},gt={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("div",{staticClass:"box createContainerBox",staticStyle:{"overflow-y":"none !important"}},[s("div",{staticClass:"tabs is-toggle is-fullwidth"},[s("ul",[s("li",[s("a",{on:{click:function(e){t.finish()}}},[t._m(0),t._v(" "),s("span",[t._v("Create Question")])])]),t._v(" "),t._m(1),t._v(" "),s("li",[s("a",{on:{click:function(e){t.openModal()}}},[t._m(2),t._v(" "),s("span",[t._v("Add answer")])])])])]),t._v(" "),s("div",{staticClass:"field has-addons"},[t._m(3),t._v(" "),s("p",{staticClass:"control is-expanded"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.question.text,expression:"question.text"}],staticClass:"input is-medium",attrs:{type:"text",placeholder:"Question"},domProps:{value:t.question.text},on:{input:function(e){e.target.composing||t.$set(t.question,"text",e.target.value)}}})]),t._v(" "),t._m(4)]),t._v(" "),s("div",{staticClass:"box"},[s("div",{staticClass:"control columns is-multiline has-text-centered-desktop"},[s("label",{staticClass:"radio column"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.question.time,expression:"question.time"}],attrs:{type:"radio",name:"duration",value:"10"},domProps:{checked:t._q(t.question.time,"10")},on:{change:function(e){t.$set(t.question,"time","10")}}}),t._v("\n\t\t\t    10s\n\t\t\t  ")]),t._v(" "),s("label",{staticClass:"radio column"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.question.time,expression:"question.time"}],attrs:{type:"radio",name:"duration",value:"15"},domProps:{checked:t._q(t.question.time,"15")},on:{change:function(e){t.$set(t.question,"time","15")}}}),t._v("\n\t\t\t    15s\n\t\t\t  ")]),t._v(" "),s("label",{staticClass:"radio column"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.question.time,expression:"question.time"}],attrs:{type:"radio",name:"duration",value:"20"},domProps:{checked:t._q(t.question.time,"20")},on:{change:function(e){t.$set(t.question,"time","20")}}}),t._v("\n\t\t\t    20s\n\t\t\t  ")]),t._v(" "),s("label",{staticClass:"radio column"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.question.time,expression:"question.time"}],attrs:{type:"radio",name:"duration",value:"25"},domProps:{checked:t._q(t.question.time,"25")},on:{change:function(e){t.$set(t.question,"time","25")}}}),t._v("\n\t\t\t    25s\n\t\t\t  ")]),t._v(" "),t._m(5)])]),t._v(" "),s("div",{staticClass:"possible-answers"},t._l(t.question.answers,function(e,a){return s("div",{key:a,staticClass:"response"},[s("article",{staticClass:"media possiblesanswers has-backrgound-light has-shadow",class:[e.correct?"has-background-info":""],on:{click:function(e){t.setCorrect(a)}}},[s("div",{staticClass:"media-content"},[s("div",{staticClass:"content"},[s("p",[s("strong",{class:[e.correct?"has-text-white":""]},[t._v(t._s(e.text))])])]),t._v(" "),s("nav",{staticClass:"level is-mobile"},[s("div",{staticClass:"level-left"},[s("a",{staticClass:"level-item is-right",attrs:{"aria-label":"reply"},on:{click:function(e){t.removeAnswer(a)}}},[s("span",{staticClass:"icon is-small",class:[e.correct?"has-text-white":"has-text-danger"]},[s("i",{staticClass:"fas fa-trash-alt",attrs:{"aria-hidden":"true"}})])])])])])])])}))]),t._v(" "),s("div",{staticClass:"modal",class:[t.modalAnswer.active?"is-active":""]},[s("div",{staticClass:"modal-background",on:{click:function(e){t.modalAnswer.active=!1}}}),t._v(" "),s("div",{staticClass:"modal-card"},[s("header",{staticClass:"modal-card-head"},[s("p",{staticClass:"modal-card-title"},[t._v("\n\t      \tAñadir una respuesta.\n\t      ")]),t._v(" "),s("button",{staticClass:"delete",attrs:{"aria-label":"close"},on:{click:function(e){t.modalAnswer.active=!1}}})]),t._v(" "),s("section",{staticClass:"modal-card-body"},[s("textarea",{directives:[{name:"model",rawName:"v-model",value:t.answer.text,expression:"answer.text"}],staticClass:"textarea",attrs:{placeholder:"Your answer"},domProps:{value:t.answer.text},on:{input:function(e){e.target.composing||t.$set(t.answer,"text",e.target.value)}}})]),t._v(" "),s("footer",{staticClass:"modal-card-foot"},[s("button",{staticClass:"button is-fullwidth is-success",on:{click:function(e){t.addAnswer()}}},[t._v("\n\t      \tSave answer\n\t      ")])])])])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"icon is-small"},[e("i",{staticClass:"fas fa-share-square",attrs:{"aria-hidden":"true"}})])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("a",[e("span",{staticClass:"icon is-small"},[e("i",{staticClass:"fas fa-ban",attrs:{"aria-hidden":"true"}})]),this._v(" "),e("span",[this._v("Cancel creation")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"icon is-small"},[e("i",{staticClass:"fas fa-plus-square",attrs:{"aria-hidden":"true"}})])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"control"},[e("a",{staticClass:"button is-static is-medium"},[this._v("\n\t\t      ¿\n\t\t    ")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"control"},[e("a",{staticClass:"button is-static is-medium"},[this._v("\n\t\t      ?\n\t\t    ")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("label",{staticClass:"radio column"},[e("input",{attrs:{type:"radio",name:"duration",value:"30"}}),this._v("\n\t\t\t    30s\n\t\t\t  ")])}]},Ct=s("VU/8")(pt,gt,!1,null,null,null).exports,_t={components:{"frases-component":F},data:function(){return{}},methods:{goTo:function(t){this.$router.push(t)}}},bt={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("section",{staticClass:"hero actions"},[s("div",{staticClass:"hero-body has-text-centered"},[s("div",{staticClass:"box"},[s("div",{staticClass:"columns is-multiline"},[s("div",{staticClass:"item-action-questcreator column is-4  tile"},[s("div",{staticClass:"container has-text-centered"},[s("a",{staticClass:"button-mathquestionary has-text-grey-dark only-text-or-icon",on:{click:function(e){t.goTo({path:"/member/questcreator/create"})}}},[t._m(0)])])]),t._v(" "),s("div",{staticClass:"item-action-questcreator has- column is-4 has-text-centered tile"},[s("div",{staticClass:"container has-text-centered"},[s("a",{staticClass:"button-mathquestionary has-text-grey-dark only-text-or-icon",on:{click:function(e){t.goTo({path:"/member/questcreator/manager"})}}},[t._m(1)])])]),t._v(" "),t._m(2)])]),t._v(" "),s("frases-component")],1)])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"icon is-large"},[e("i",{staticClass:"fas fa-plus fa-3x"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"icon is-large"},[e("i",{staticClass:"fas fa-list-alt fa-3x"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"item-action-questcreator has- column is-4 has-text-centered tile"},[e("div",{staticClass:"container has-text-centered"},[e("a",{staticClass:"button-mathquestionary has-text-grey-dark only-text-or-icon"},[e("span",{staticClass:"icon is-large"},[e("i",{staticClass:"fas fa-users fa-3x"})])])])])}]},xt=s("VU/8")(_t,bt,!1,null,null,null).exports,wt={mounted:function(){var t=this;Rt.collection("questions").get().then(function(e){e.forEach(function(e){t.questions.push({posiblesanswers:e.data().posiblesanswers,text:e.data().text,id:e.id})})})},data:function(){return{questions:[],searcher:""}},methods:{deleteQuestion:function(t,e){var s=this;Rt.collection("questions").doc(e).delete().then(function(){s.$toasted.success("Eliminado correctamente",{theme:"primary",position:"bottom-right",duration:5e3})}),this.questions.splice(t,1)}},computed:{questionsSearched:function(){var t=this;return this.questions.length>0?this.questions.filter(function(e){return e.text.toLowerCase().includes(t.searcher.toLowerCase())}):[]}}},yt={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("div",{staticClass:"box"},[s("div",{staticClass:"field"},[s("div",{staticClass:"control"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.searcher,expression:"searcher"}],staticClass:"input is-medium",attrs:{type:"text",placeholder:"Search questions"},domProps:{value:t.searcher},on:{input:function(e){e.target.composing||(t.searcher=e.target.value)}}})])]),t._v(" "),s("div",{staticClass:"create-quest-creator-scroller"},t._l(t.questionsSearched,function(e,a){return s("article",{key:a,staticClass:"media manager-questions-question has-backrgound-light"},[s("div",{staticClass:"media-content"},[s("div",{staticClass:"content"},[s("p",[s("strong",[t._v(t._s("¿ "+e.text+" ?"))])])]),t._v(" "),s("nav",{staticClass:"level is-mobile"},[s("div",{staticClass:"level-left"},[s("a",{staticClass:"level-item has-text-danger",attrs:{"aria-label":"reply"},on:{click:function(s){t.deleteQuestion(a,e.id)}}},[t._m(0,!0)])])])])])}))])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"icon is-small"},[e("i",{staticClass:"fas fa-trash-alt",attrs:{"aria-hidden":"true"}})])}]},qt=s("VU/8")(wt,yt,!1,null,null,null).exports,St=s("NYxO"),kt={state:{user:{name:"",email:"",photoURL:"",uid:"",medallas:0,derrotas:0,victorias:0},role:"guest",logged:!1},actions:{firebaseSignInGoogle:function(t){t.commit;var e=new y.a.auth.GoogleAuthProvider;return y.a.auth().signInWithPopup(e)},firebaseLogOut:function(t){return(0,t.commit)("setUser",null),y.a.auth().signOut()}},mutations:{setUser:function(t,e){null!=e?(t.user=e,console.log("saved:",z()(e)),t.logged=!0):(console.log("saved:",z()(e)),t.user={name:"",email:"",photoURL:"",uid:"",medallas:0},t.logged=!1)},aumentarDerrotas:function(t){t.user.derrotas+=1},aumentarVictorias:function(t){t.user.victorias+=1}},getters:{logged:function(t){return t.logged},getUserInfo:function(t){return t.user}}};a.a.use(St.a);var jt=new St.a.Store({state:{modals:{signIn:!1}},getters:{getModalsState:function(t){return t.modals}},mutations:{setModalState:function(t,e){t.modals=e}},modules:{authModule:kt,gameModalModule:{state:{gameModal:{active:!1,information:{question:{text:"",answers:[]}}}},getters:{getModalState:function(t){return t.gameModal}},mutations:{setGameModalInformation:function(t,e){t.gameModal.information.question=e},setGameModalState:function(t,e){t.gameModal.active=e}}}}});a.a.use(l.a);var Mt=function(t,e,s){jt.getters.logged?s():s({path:"/"})},Et=new l.a({routes:[{beforeEnter:function(t,e,s){return function(t,e,s){jt.getters.logged?s({path:"/member"}):s()}(0,0,s)},path:"/",name:"Home",component:A,meta:{Auth:!1,title:"Home | MathQuestionary"}},{beforeEnter:function(t,e,s){return Mt(0,0,s)},path:"/member",name:"Member",component:J,meta:{Auth:!1,title:"Member | MathQuestionary"}},{beforeEnter:function(t,e,s){return Mt(0,0,s)},path:"/member/chat",name:"ChatPage",component:st,meta:{title:"Chat | MathQuestionary"}},{beforeEnter:function(t,e,s){return Mt(0,0,s)},path:"/member/chart",name:"ChartPage",component:it,meta:{title:"Chart | MathQuestionary"}},{beforeEnter:function(t,e,s){return Mt(0,0,s)},path:"/member/ranking",name:"RankingPage",component:ut,meta:{title:"Ranking | MathQuestionary"}},{beforeEnter:function(t,e,s){return function(t,e,s){jt.getters.logged&&jt.getters.getUserInfo.admin?s():s({path:"/"})}(0,0,s)},path:"/member/questcreator",component:ft,children:[{path:"",name:"QuestCreatorPage",component:xt,meta:{title:"QuestCreator | MathQuestionary"}},{path:"create",name:"QuestCreatorPageCreate",component:Ct,meta:{title:"QuestCreator | MathQuestionary"}},{path:"manager",name:"QuestCreatorPageManager",component:qt,meta:{title:"QuestCreator | MathQuestionary"}}]}]}),Ut=s("IZMb"),Tt=s.n(Ut);s("oPmM"),s("GK12"),s("PdMR");s.d(e,"db",function(){return Rt}),s.d(e,"realtimeDb",function(){return zt}),Et.beforeEach(function(t,e,s){document.title=t.meta.title,s()}),y.a.initializeApp({apiKey:"AIzaSyCayCvgFYk8RVzAQQht_oXq6TiyDs2y32Q",authDomain:"mathquestionary.firebaseapp.com",databaseURL:"https://mathquestionary.firebaseio.com",projectId:"mathquestionary",storageBucket:"mathquestionary.appspot.com",messagingSenderId:"1008942659480"},{timestampsInSnapshots:!0});var $t=y.a.database(),At=y.a.firestore();At.settings({timestampsInSnapshots:!0});var Rt=At,zt=$t;a.a.config.productionTip=!1,a.a.use(Tt.a),new a.a({el:"#app",router:Et,store:jt,components:{App:r},template:"<App/>"})},Pc14:function(t,e){},PdMR:function(t,e){},TAn5:function(t,e){},Tfa4:function(t,e){},U5zT:function(t,e){},UhZB:function(t,e){},b0X0:function(t,e){},b2Nr:function(t,e){},cJIQ:function(t,e,s){t.exports=s.p+"static/img/participant.guadalupe.san.martin.537e416.jpg"},fpBc:function(t,e){},gWdu:function(t,e,s){t.exports=s.p+"static/img/participant.catalina.coeff.5e84102.jpg"},k6Of:function(t,e){},oPmM:function(t,e){},pUfp:function(t,e){},rGda:function(t,e){},td60:function(t,e){},uslO:function(t,e,s){var a={"./af":"3CJN","./af.js":"3CJN","./ar":"3MVc","./ar-dz":"tkWw","./ar-dz.js":"tkWw","./ar-kw":"j8cJ","./ar-kw.js":"j8cJ","./ar-ly":"wPpW","./ar-ly.js":"wPpW","./ar-ma":"dURR","./ar-ma.js":"dURR","./ar-sa":"7OnE","./ar-sa.js":"7OnE","./ar-tn":"BEem","./ar-tn.js":"BEem","./ar.js":"3MVc","./az":"eHwN","./az.js":"eHwN","./be":"3hfc","./be.js":"3hfc","./bg":"lOED","./bg.js":"lOED","./bm":"hng5","./bm.js":"hng5","./bn":"aM0x","./bn.js":"aM0x","./bo":"w2Hs","./bo.js":"w2Hs","./br":"OSsP","./br.js":"OSsP","./bs":"aqvp","./bs.js":"aqvp","./ca":"wIgY","./ca.js":"wIgY","./cs":"ssxj","./cs.js":"ssxj","./cv":"N3vo","./cv.js":"N3vo","./cy":"ZFGz","./cy.js":"ZFGz","./da":"YBA/","./da.js":"YBA/","./de":"DOkx","./de-at":"8v14","./de-at.js":"8v14","./de-ch":"Frex","./de-ch.js":"Frex","./de.js":"DOkx","./dv":"rIuo","./dv.js":"rIuo","./el":"CFqe","./el.js":"CFqe","./en-au":"Sjoy","./en-au.js":"Sjoy","./en-ca":"Tqun","./en-ca.js":"Tqun","./en-gb":"hPuz","./en-gb.js":"hPuz","./en-ie":"ALEw","./en-ie.js":"ALEw","./en-il":"QZk1","./en-il.js":"QZk1","./en-nz":"dyB6","./en-nz.js":"dyB6","./eo":"Nd3h","./eo.js":"Nd3h","./es":"LT9G","./es-do":"7MHZ","./es-do.js":"7MHZ","./es-us":"INcR","./es-us.js":"INcR","./es.js":"LT9G","./et":"XlWM","./et.js":"XlWM","./eu":"sqLM","./eu.js":"sqLM","./fa":"2pmY","./fa.js":"2pmY","./fi":"nS2h","./fi.js":"nS2h","./fo":"OVPi","./fo.js":"OVPi","./fr":"tzHd","./fr-ca":"bXQP","./fr-ca.js":"bXQP","./fr-ch":"VK9h","./fr-ch.js":"VK9h","./fr.js":"tzHd","./fy":"g7KF","./fy.js":"g7KF","./gd":"nLOz","./gd.js":"nLOz","./gl":"FuaP","./gl.js":"FuaP","./gom-latn":"+27R","./gom-latn.js":"+27R","./gu":"rtsW","./gu.js":"rtsW","./he":"Nzt2","./he.js":"Nzt2","./hi":"ETHv","./hi.js":"ETHv","./hr":"V4qH","./hr.js":"V4qH","./hu":"xne+","./hu.js":"xne+","./hy-am":"GrS7","./hy-am.js":"GrS7","./id":"yRTJ","./id.js":"yRTJ","./is":"upln","./is.js":"upln","./it":"FKXc","./it.js":"FKXc","./ja":"ORgI","./ja.js":"ORgI","./jv":"JwiF","./jv.js":"JwiF","./ka":"RnJI","./ka.js":"RnJI","./kk":"j+vx","./kk.js":"j+vx","./km":"5j66","./km.js":"5j66","./kn":"gEQe","./kn.js":"gEQe","./ko":"eBB/","./ko.js":"eBB/","./ky":"6cf8","./ky.js":"6cf8","./lb":"z3hR","./lb.js":"z3hR","./lo":"nE8X","./lo.js":"nE8X","./lt":"/6P1","./lt.js":"/6P1","./lv":"jxEH","./lv.js":"jxEH","./me":"svD2","./me.js":"svD2","./mi":"gEU3","./mi.js":"gEU3","./mk":"Ab7C","./mk.js":"Ab7C","./ml":"oo1B","./ml.js":"oo1B","./mn":"CqHt","./mn.js":"CqHt","./mr":"5vPg","./mr.js":"5vPg","./ms":"ooba","./ms-my":"G++c","./ms-my.js":"G++c","./ms.js":"ooba","./mt":"oCzW","./mt.js":"oCzW","./my":"F+2e","./my.js":"F+2e","./nb":"FlzV","./nb.js":"FlzV","./ne":"/mhn","./ne.js":"/mhn","./nl":"3K28","./nl-be":"Bp2f","./nl-be.js":"Bp2f","./nl.js":"3K28","./nn":"C7av","./nn.js":"C7av","./pa-in":"pfs9","./pa-in.js":"pfs9","./pl":"7LV+","./pl.js":"7LV+","./pt":"ZoSI","./pt-br":"AoDM","./pt-br.js":"AoDM","./pt.js":"ZoSI","./ro":"wT5f","./ro.js":"wT5f","./ru":"ulq9","./ru.js":"ulq9","./sd":"fW1y","./sd.js":"fW1y","./se":"5Omq","./se.js":"5Omq","./si":"Lgqo","./si.js":"Lgqo","./sk":"OUMt","./sk.js":"OUMt","./sl":"2s1U","./sl.js":"2s1U","./sq":"V0td","./sq.js":"V0td","./sr":"f4W3","./sr-cyrl":"c1x4","./sr-cyrl.js":"c1x4","./sr.js":"f4W3","./ss":"7Q8x","./ss.js":"7Q8x","./sv":"Fpqq","./sv.js":"Fpqq","./sw":"DSXN","./sw.js":"DSXN","./ta":"+7/x","./ta.js":"+7/x","./te":"Nlnz","./te.js":"Nlnz","./tet":"gUgh","./tet.js":"gUgh","./tg":"5SNd","./tg.js":"5SNd","./th":"XzD+","./th.js":"XzD+","./tl-ph":"3LKG","./tl-ph.js":"3LKG","./tlh":"m7yE","./tlh.js":"m7yE","./tr":"k+5o","./tr.js":"k+5o","./tzl":"iNtv","./tzl.js":"iNtv","./tzm":"FRPF","./tzm-latn":"krPU","./tzm-latn.js":"krPU","./tzm.js":"FRPF","./ug-cn":"To0v","./ug-cn.js":"To0v","./uk":"ntHu","./uk.js":"ntHu","./ur":"uSe8","./ur.js":"uSe8","./uz":"XU1s","./uz-latn":"/bsm","./uz-latn.js":"/bsm","./uz.js":"XU1s","./vi":"0X8Q","./vi.js":"0X8Q","./x-pseudo":"e/KL","./x-pseudo.js":"e/KL","./yo":"YXlc","./yo.js":"YXlc","./zh-cn":"Vz2w","./zh-cn.js":"Vz2w","./zh-hk":"ZUyn","./zh-hk.js":"ZUyn","./zh-tw":"BbgG","./zh-tw.js":"BbgG"};function n(t){return s(i(t))}function i(t){var e=a[t];if(!(e+1))throw new Error("Cannot find module '"+t+"'.");return e}n.keys=function(){return Object.keys(a)},n.resolve=i,t.exports=n,n.id="uslO"},vrEE:function(t,e){},yO38:function(t,e,s){t.exports=s.p+"static/media/win-sound.9aefd12.wav"},ygC3:function(t,e){}},["NHnr"]);
  //# sourceMappingURL=app.54c39f4ad522e944c683.js.map