(window.webpackJsonp=window.webpackJsonp||[]).push([[26],{297:function(t,e,o){var content=o(304);"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(29).default)("6f85827c",content,!0,{sourceMap:!1})},298:function(t,e,o){var content=o(306);"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(29).default)("f0f029ce",content,!0,{sourceMap:!1})},299:function(t,e,o){var content=o(309);"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(29).default)("79745966",content,!0,{sourceMap:!1})},303:function(t,e,o){"use strict";var n=o(297);o.n(n).a},304:function(t,e,o){(e=o(28)(!1)).push([t.i,".container-page[data-v-79c0d9d2]{z-index:2}#btnLogout[data-v-79c0d9d2]{margin-top:5px}.mdi-close-circle[data-v-79c0d9d2]:before{color:var(--primary);position:absolute;right:22px;top:33px}.container-page>main[data-v-79c0d9d2]{-webkit-box-pack:justify;justify-content:space-between;padding:.5rem;margin-top:1rem;width:100%}#info[data-v-79c0d9d2],.container-page>main[data-v-79c0d9d2]{display:-webkit-box;display:flex}#avatar[data-v-79c0d9d2]{margin-right:1rem}.text-menu[data-v-79c0d9d2]{text-transform:uppercase}.mdi-library-books[data-v-79c0d9d2]:before{content:url(https://api.iconify.design/mdi-library-books.svg?color=rgb%28105%2C0%2C204%29&height=24);vertical-align:-.125em}h1[data-v-79c0d9d2]{font-size:1rem;font-weight:500;color:#000;text-transform:capitalize}.menu-list[data-v-79c0d9d2]{max-width:500px}.container-page[data-v-79c0d9d2]{background-color:#fff;position:fixed;width:100%;height:100%;top:0;left:0}.row[data-v-79c0d9d2]{margin-left:0}#close-btn[data-v-79c0d9d2]{cursor:pointer;font-size:30px}#flex-info-user[data-v-79c0d9d2]{-webkit-box-pack:start;justify-content:flex-start;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-align:baseline;align-items:baseline}.flex-center[data-v-79c0d9d2]{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center}.border-profile-photo[data-v-79c0d9d2]{height:95px;width:95px;border:1px solid #60c;border-radius:50px}.profile-container[data-v-79c0d9d2]{width:85px;height:85px;border-radius:50px;overflow:hidden}.profile-container img[data-v-79c0d9d2]{width:100%}.item-menu[data-v-79c0d9d2]{width:100%;padding:13px;border-bottom:1px solid #e8e8e8;-webkit-box-align:center;align-items:center;color:var(--primary)!important;cursor:pointer}.item-menu[data-v-79c0d9d2],.item-menu div[data-v-79c0d9d2]{display:-webkit-box;display:flex}.item-menu div[data-v-79c0d9d2]{width:50px;-webkit-box-pack:center;justify-content:center;margin-right:2rem}.item-menu[data-v-79c0d9d2]:hover{background-color:#e8d1ff}.col-flex-center[data-v-79c0d9d2]{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:baseline;align-items:baseline}p[data-v-79c0d9d2]{margin-bottom:0!important}h4[data-v-79c0d9d2]{font-weight:600}@media(min-width:600px){#info[data-v-79c0d9d2],.menu-list[data-v-79c0d9d2]{margin:0 auto}}",""]),t.exports=e},305:function(t,e,o){"use strict";var n=o(298);o.n(n).a},306:function(t,e,o){(e=o(28)(!1)).push([t.i,"[data-v-7d2ee64a] .v-item-group.v-bottom-navigation--horizontal .v-btn>.v-btn__content{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;flex-direction:column-reverse!important}.v-icon[data-v-7d2ee64a]{margin-right:0!important;padding-top:5px}#page[data-v-7d2ee64a]{margin-bottom:5rem!important}.btn-fixed[data-v-7d2ee64a]{height:100%!important}.intro-transition[data-v-7d2ee64a]{-webkit-animation-name:intro;animation-name:intro;-webkit-animation-duration:.2s;animation-duration:.2s}[data-v-7d2ee64a] .v-item-group.v-bottom-navigation .v-btn.v-btn--active .v-btn__content{color:var(--primary)}.mdi-library[data-v-7d2ee64a]:before{content:url(https://api.iconify.design/ic:outline-local-library.svg?color=rgb%28112%2C112%2C112%29&height=24);vertical-align:-.125em}[data-v-7d2ee64a] .v-item-group.v-bottom-navigation .v-btn.v-btn--active .v-btn__content .mdi-library:before{content:url(https://api.iconify.design/ic:outline-local-library.svg?color=rgb%28102%2C0%2C204%29&height=24);vertical-align:-.125em}span[data-v-7d2ee64a]{font-size:8px;font-weight:400;color:#737373;margin-top:5px}[data-v-7d2ee64a] .v-item-group.v-bottom-navigation .v-btn.v-btn--active .v-btn__content span{color:var(--primary)}@media (max-width:375px){.v-btn[data-v-7d2ee64a]{min-width:55px!important;font-size:.6rem!important}}@media (max-width:415px){.v-btn[data-v-7d2ee64a]{font-size:.65rem!important}}.remove-certificates[data-v-7d2ee64a]{display:none}",""]),t.exports=e},307:function(t,e,o){"use strict";o(189),o(23),o(11),o(7),o(13),o(35),o(5);var n=o(4),r=o(311),c=o.n(r),l=o(110),d=o(109);function m(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(object);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,o)}return e}function f(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?m(Object(source),!0).forEach((function(e){Object(n.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):m(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var v={data:function(){return{menu:[{id:1,label:"Meu Perfil",icon:"mdi-account",link:"/aluno/perfil"},{id:2,label:"Meus Cursos",icon:"mdi-library",link:"/aluno/meus-cursos"},{id:3,label:"Meus Certificados",icon:"mdi-school",link:"/aluno/certificados"},{id:4,label:"Cola com Nóix",icon:"mdi-gesture-double-tap",link:"/contribua"},{id:5,label:"O que é a new school?",icon:"mdi-library-books",link:"/sobre"},{id:7,label:"Fale com a gente",icon:"mdi-phone-message-outline",link:"/contato"},{id:8,label:"Apoie a new school",icon:"mdi-volume-high",link:"/construindo"},{id:9,label:"Ranking",icon:"mdi-trophy",link:"/aluno/ranking"}]}},methods:f(f({},Object(l.b)("user",["clearInfoUser"])),{},{closeMenu:function(){document.getElementById("menu-btn").click()},logout:function(){var t=this;this.logoutSocial().then((function(){$nuxt._router.push("/login"),localStorage.clear(),t.clearInfoUser()}))},pushAdminOnlyOptions:function(){"ADMIN"===this.$store.state.user.data.role&&(this.menu[1].link="/admin/listar-cursos",this.menu.push({id:9,label:"Dashboard",icon:"mdi-chart-bar",link:"/admin/dashboard"}))},logoutSocial:function(){return this.$auth.loggedIn?this.$auth.logout():Promise.resolve()}}),computed:{user:function(){return this.$store.state.user.data}},mounted:function(){d.a.isTokenValid().status&&(this.auth=!0,this.pushAdminOnlyOptions())},filters:{simplifyName:function(t){if(!t)return"";return t.split(" ").length>2?/^(\S*\s+\S+).*/.exec(t)[1]:t}},components:{Avatar:c.a}},h=(o(303),o(39)),k=o(43),x=o.n(k),w=o(288),_=o(289),component=Object(h.a)(v,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"container-page",attrs:{id:"page"}},[o("main",[o("section",{attrs:{id:"info"}},[o("div",{attrs:{id:"avatar"}},[o("div",{staticClass:"flex-center border-profile-photo"},[o("div",{staticClass:"flex-center profile-container"},[t.user.photo?o("img",{attrs:{src:t.user.photo}}):o("avatar",{attrs:{username:t._f("simplifyName")(t.user.name),size:90}})],1)])]),t._v(" "),o("div",{staticClass:"flex-center",attrs:{id:"flex-info-user"}},[o("h1",[t._v(t._s(t.user.name))]),t._v(" "),o("p",[t._v(t._s(t.user.type))]),t._v(" "),o("v-btn",{attrs:{id:"btnLogout",small:"",outlined:"",color:"error",width:"80px"},on:{click:t.logout}},[t._v("Sair")])],1),t._v(" "),o("div",{attrs:{id:"close"}},[o("v-icon",{attrs:{id:"close-btn",color:"primary"},on:{click:function(e){return t.closeMenu()}}},[t._v("mdi-close-circle")])],1)])]),t._v(" "),o("section",{staticClass:"menu-list"},t._l(t.menu,(function(e){return o("router-link",{key:e.id,staticClass:"item-menu",attrs:{tag:"div",to:e.link},nativeOn:{click:function(e){return t.closeMenu()}}},[o("div",[o("v-icon",{attrs:{color:"primary"}},[t._v(t._s(e.icon))])],1),t._v(" "),o("p",{staticClass:"text-menu"},[t._v(t._s(e.label))])])})),1)])}),[],!1,null,"79c0d9d2",null),y=component.exports;x()(component,{VBtn:w.a,VIcon:_.a});var C={components:{SideMenu:y},data:function(){return{viewMenu:!1,auth:!1,menu:[{id:1,name:"Início",icon:"mdi-home-outline",link:"/aluno/home"},{id:2,name:"Perfil",icon:"mdi-account-outline",link:"/aluno/perfil"},{id:3,name:"Meus Cursos",icon:"mdi-library",link:"/aluno/meus-cursos"},{id:4,name:"Certificados",icon:"mdi-school-outline",link:"/aluno/certificados",class:""}]}},mounted:function(){d.a.isTokenValid().status&&(this.auth=!0,this.changeRoutingIfAdmin())},methods:{setViewMenu:function(){this.viewMenu=!this.viewMenu},changeRoutingIfAdmin:function(){"ADMIN"===this.$store.state.user.data.role&&(this.menu[0].link="/admin/home",this.menu[1].link="/admin/perfil",this.menu[2].link="/admin/listar-cursos",this.menu[3].link="/admin/certificados")}}},O=(o(305),o(999)),$=Object(h.a)(C,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return t.auth?o("div",[o("side-menu",{directives:[{name:"show",rawName:"v-show",value:t.viewMenu,expression:"viewMenu"}],staticClass:"intro-transition"}),t._v(" "),o("v-bottom-navigation",{attrs:{"scroll-target":"#page",fixed:"","scroll-threshold":"500",color:"write",horizontal:""}},[t._l(t.menu,(function(e){return o("v-btn",{key:e.id,staticClass:"btn-fixed menu__bottom",class:e.class,attrs:{to:e.link},on:{click:function(e){t.viewMenu=!1}}},[o("span",[t._v(t._s(e.name))]),t._v(" "),o("v-icon",[t._v(t._s(e.icon))])],1)})),t._v(" "),o("v-btn",{staticClass:"btn-fixed",attrs:{id:"menu-btn"},on:{click:t.setViewMenu}},[o("span",[t._v("Outros")]),t._v(" "),o("v-icon",[t._v("mdi-apps")])],1)],2)],1):t._e()}),[],!1,null,"7d2ee64a",null);e.a=$.exports;x()($,{VBottomNavigation:O.a,VBtn:w.a,VIcon:_.a})},308:function(t,e,o){"use strict";var n=o(299);o.n(n).a},309:function(t,e,o){(e=o(28)(!1)).push([t.i,"*[data-v-7719e329]{font-family:Roboto,sans-serif}.h1__theme[data-v-7719e329]{font-size:1rem;line-height:1.2;font-weight:900;text-align:center;padding:0 2.5rem!important}#head__bar[data-v-7719e329]{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;padding:1.5rem 0;position:relative;-webkit-box-align:center;align-items:center;background:transparent}[data-v-7719e329] .btn-back .theme--light.v-icon{color:var(--primary);font-size:35px}[data-v-7719e329] .btn-back{position:absolute;left:1rem}",""]),t.exports=e},310:function(t,e,o){"use strict";var n={props:["title","backPage","route"],methods:{comeBackPage:function(){this.route?this.$router.push(this.route):this.$router.back()}}},r=(o(308),o(39)),c=o(43),l=o.n(c),d=o(288),m=o(289),component=Object(r.a)(n,(function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"head__bar"}},[e("v-btn",{staticClass:"btn-back",attrs:{text:"",icon:""},on:{click:this.comeBackPage}},[e("v-icon",[this._v("mdi-arrow-left")])],1),this._v(" "),e("h1",{staticClass:"h1__theme"},[this._v(this._s(this.title))])],1)}),[],!1,null,"7719e329",null);e.a=component.exports;l()(component,{VBtn:d.a,VIcon:m.a})},544:function(t,e,o){"use strict";var n=o(32),r=o(109);e.a={getAll:function(){var t=r.a.getInfoAuth().accessToken;return n.a.get("/api/v1/course",{headers:{Authorization:t}})},getBySlug:function(t){var e=r.a.getInfoAuth().accessToken;return n.a.get("api/v1/course/slug/".concat(t),{headers:{Authorization:"".concat(e)}})},createCourse:function(t){var e=r.a.getInfoAuth().accessToken;return n.a.post("api/v1/course",t,{headers:{Authorization:"".concat(e)}})},getById:function(t){var e=r.a.getInfoAuth().accessToken;return n.a.get("api/v1/course/".concat(t),{headers:{Authorization:e}})}}},629:function(t,e,o){var content=o(873);"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(29).default)("4b53412d",content,!0,{sourceMap:!1})},630:function(t,e){},872:function(t,e,o){"use strict";var n=o(629);o.n(n).a},873:function(t,e,o){(e=o(28)(!1)).push([t.i,".v-input[data-v-9d1bf748]{width:90%;height:50px}.v-input input[data-v-9d1bf748]{color:none}[data-v-9d1bf748] .v-messages__message{text-align:right;margin-top:-.3em}.hide-form[data-v-9d1bf748]{-webkit-animation:down .3s forwards;animation:down .3s forwards}.error-form[data-v-9d1bf748]{-webkit-animation:nono .3s,intro paused;animation:nono .3s,intro paused}",""]),t.exports=e},874:function(t,e,o){"use strict";var n=o(630),r=o.n(n);e.default=r.a},987:function(t,e,o){"use strict";o.r(e);var n=o(544),r=o(25),c=o(310),l=o(307),d={data:function(){return{title:"Gerenciar meus cursos",sendCourse:!1,status:!0,loading:!1,snackbar:!1,snackbarText:"",snackbarStatus:"",token:"",form:{title:"",description:"",authorName:"",authorDescription:"",workload:"",thumbUrl:"",photo:null},titleRules:[function(t){return!!t||"O título é obrigatório"}],descriptionRules:[function(t){return!!t||"A descrição é obrigatória"}],authorNameRules:[function(t){return!!t||"O professor é obrigatório"}],authorDescriptionRules:[function(t){return!!t||"Campo obrigatório"}],workloadRules:[function(t){return!!t||"A carga horária é obrigatória"}],photoRules:[function(t){return!!t||"A foto de capa é obrigatória"}]}},head:function(){return{title:this.title}},components:{HeaderBar:c.a,NavigationBar:l.a},methods:{submit:function(){var t=this;if(this.$refs.form.validate()){var e=new FormData;e.append("title",this.form.title),e.append("description",this.form.description),e.append("authorName",this.form.authorName),e.append("authorDescription",this.form.authorDescription),e.append("workload",this.form.workload),e.append("photo",this.form.photo),e.append("thumbUrl",this.form.thumbUrl),n.a.createCourse(e).then((function(e){t.loading=!1,t.sendCourse=!0,t.confirmSnackbar("Curso cadastrado com sucesso!","success"),t.$store.commit("courses/setCurrent",e.data),t.gotoAddClass(e.data.id)})).catch((function(e){t.confirmSnackbar("Ocorreu um erro ao cadastrar o curso.","error"),setTimeout((function(){t.loading=!1}),500),console.error(e)}))}else this.animateForm(!1)},animateForm:function(t){var e=this;t?(this.$refs.flex.classList.add("hide-form"),document.querySelector("html").style.overflow="hidden",setTimeout((function(){e.loading=!0}),300)):(this.$refs.flex.classList.add("error-form"),setTimeout((function(){e.$refs.flex.classList.remove("error-form")}),500)),document.querySelector("html").style.overflow="scroll"},gotoAddClass:function(t){this.sendCourse?$nuxt._router.push("/admin/course/".concat(t,"/lesson/new")):this.confirmSnackbar("Você precisa salvar o curso antes de adicionar uma aula","error")},goBack:function(){window.history.length>1?$nuxt._router.go(-1):$nuxt._router.push("/")},confirmSnackbar:function(text,t){this.snackbarText=text,this.snackbarStatus=t,this.snackbar=!0}},mounted:function(){var t=this;localStorage.getItem("current_course"),r.a.getExternalCredentials().then((function(e){var data=e.data;t.token=data.accessToken})).catch((function(t){console.error(t)}))}},m=(o(872),o(39)),f=o(874),v=o(43),h=o.n(v),k=o(288),x=o(366),w=o(314),_=o(941),y=o(321),C=o(324),O=o(316),$=o(129),j=o(294),A=o(340),M=o(334),component=Object(m.a)(d,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{attrs:{id:"page"}},[o("HeaderBar",{attrs:{title:"Gerenciar Meus Cursos","back-page":!0}}),t._v(" "),o("v-layout",{attrs:{"align-center":"","justify-center":""}},[o("v-flex",{staticStyle:{"text-align":"-webkit-left"},attrs:{xs10:"",sm8:"",md4:""}},[o("v-container",[o("v-row",[o("v-col",[t.loading?o("v-progress-circular",{attrs:{size:70,width:5,indeterminate:""}}):t._e(),t._v(" "),o("h3",[t._v("Curso")]),t._v(" "),o("v-form",{ref:"form",staticClass:"course-form",attrs:{"lazy-validation":""}},[o("v-text-field",{attrs:{rules:t.titleRules,label:"Título *",name:"title",required:""},model:{value:t.form.title,callback:function(e){t.$set(t.form,"title",e)},expression:"form.title"}}),t._v(" "),o("v-text-field",{attrs:{rules:t.descriptionRules,label:"Descrição *",name:"description",required:""},model:{value:t.form.description,callback:function(e){t.$set(t.form,"description",e)},expression:"form.description"}}),t._v(" "),o("v-text-field",{attrs:{rules:t.authorNameRules,label:"Professor *",name:"authorName",required:""},model:{value:t.form.authorName,callback:function(e){t.$set(t.form,"authorName",e)},expression:"form.authorName"}}),t._v(" "),o("v-text-field",{attrs:{rules:t.authorDescriptionRules,label:"Biografia do Professor *",name:"authorDescription",required:""},model:{value:t.form.authorDescription,callback:function(e){t.$set(t.form,"authorDescription",e)},expression:"form.authorDescription"}}),t._v(" "),o("v-text-field",{attrs:{rules:t.workloadRules,type:"number",label:"Carga Horária *",name:"workload",required:""},model:{value:t.form.workload,callback:function(e){t.$set(t.form,"workload",e)},expression:"form.workload"}}),t._v(" "),o("v-text-field",{attrs:{label:"URL da Imagem do Curso",name:"thumbUrl",required:""},model:{value:t.form.thumbUrl,callback:function(e){t.$set(t.form,"thumbUrl",e)},expression:"form.thumbUrl"}}),t._v(" "),o("v-file-input",{attrs:{rules:t.photoRules,label:"Foto de Capa *",name:"photo","prepend-icon":"",required:""},model:{value:t.form.photo,callback:function(e){t.$set(t.form,"photo",e)},expression:"form.photo"}}),t._v(" "),o("resources-list",{attrs:{name:"Aula",resources:[],redirect:"true",path:"lesson"}}),t._v(" "),o("span",{staticClass:"new-lessons-span"},[t._v("Favor, adicionar uma aula")]),t._v(" "),o("v-btn",{staticClass:"btn-block btn-primary",on:{click:t.submit}},[t._v("\n                Salvar\n              ")])],1)],1)],1)],1)],1),t._v(" "),o("v-snackbar",{attrs:{color:t.snackbarStatus,timeout:5e3,top:!0,right:!0},model:{value:t.snackbar,callback:function(e){t.snackbar=e},expression:"snackbar"}},[t._v("\n          "+t._s(t.snackbarText)+"\n          "),o("v-btn",{attrs:{color:"#FFF",text:""},on:{click:function(e){t.snackbar=!1}}},[t._v("Fechar")])],1),t._v(" "),o("client-only",[o("navigation-bar")],1)],1)],1)}),[],!1,null,"9d1bf748",null);"function"==typeof f.default&&Object(f.default)(component);e.default=component.exports;h()(component,{VBtn:k.a,VCol:x.a,VContainer:w.a,VFileInput:_.a,VFlex:y.a,VForm:C.a,VLayout:O.a,VProgressCircular:$.a,VRow:j.a,VSnackbar:A.a,VTextField:M.a})}}]);