mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
1 line
13 KiB
JavaScript
1 line
13 KiB
JavaScript
!function(){function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}(self.webpackChunkgabinete_digital=self.webpackChunkgabinete_digital||[]).push([[8459],{28459:function(n,i,o){"use strict";o.r(i),o.d(i,{InactivityPageModule:function(){return O}});var r=o(38583),a=o(3679),c=o(35957),s=o(39895),g=o(64762),d=o(92340),u=o(2527),l=o.n(u),p=o(37716),f=o(79744),h=o(37556),v=o(84465),m=o(66096);function b(t,e){if(1&t){var n=p.EpF();p.TgZ(0,"div",4),p.TgZ(1,"div",5),p.TgZ(2,"div",6),p.TgZ(3,"div",7),p.TgZ(4,"div",8),p.TgZ(5,"div",9),p._UZ(6,"img",10),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.TgZ(7,"h3",11),p._uU(8,"Inicie a sess\xe3o"),p.qZA(),p.TgZ(9,"form",12),p.TgZ(10,"p",13),p._uU(11,"Email"),p.qZA(),p.TgZ(12,"ion-item",14),p.TgZ(13,"ion-input",15),p.NdJ("ngModelChange",function(t){return p.CHM(n),p.oxw().username=t}),p.qZA(),p.qZA(),p.TgZ(14,"p",13),p._uU(15,"Palavra-passe"),p.qZA(),p.TgZ(16,"ion-item",14),p.TgZ(17,"ion-input",16),p.NdJ("keyup.enter",function(){return p.CHM(n),p.oxw().Login()})("ngModelChange",function(t){return p.CHM(n),p.oxw().password=t}),p.qZA(),p.qZA(),p.TgZ(18,"div",17),p.TgZ(19,"button",18),p.NdJ("click",function(){return p.CHM(n),p.oxw().Login()}),p._uU(20,"Iniciar"),p.qZA(),p.qZA(),p.qZA(),p.TgZ(21,"div",19),p.TgZ(22,"p",20),p._uU(23,"Uma iniciativa do Gabinete do Presidente da Rep\xfablica"),p.qZA(),p.qZA(),p.qZA()}if(2&t){var i=p.oxw();p.xp6(13),p.Q6J("ngModel",i.username),p.xp6(4),p.Q6J("ngModel",i.password)}}function x(t,e){1&t&&(p.TgZ(0,"ion-title",34),p._uU(1,"Digite o PIN"),p.qZA())}function C(t,e){1&t&&(p.TgZ(0,"ion-title",34),p._uU(1,"Digite o novo PIN"),p.qZA())}function Z(t,e){if(1&t){var n=p.EpF();p.TgZ(0,"div",35),p.NdJ("click",function(){return p.CHM(n),p.oxw(2).loginPreference="none"}),p._uU(1," Entrar com senha "),p.qZA()}}function P(t,e){if(1&t){var n=p.EpF();p.TgZ(0,"div",21),p.TgZ(1,"div",22),p.TgZ(2,"div",23),p.TgZ(3,"div",9),p._UZ(4,"img",24),p.qZA(),p.qZA(),p.YNc(5,x,2,0,"ion-title",25),p.YNc(6,C,2,0,"ion-title",25),p.TgZ(7,"div",26),p._UZ(8,"div",27),p._UZ(9,"div",27),p._UZ(10,"div",27),p._UZ(11,"div",27),p.qZA(),p.TgZ(12,"div",28),p.TgZ(13,"div",29),p.TgZ(14,"div",30),p.NdJ("click",function(){return p.CHM(n),p.oxw().setCode("1")}),p._uU(15,"1"),p.qZA(),p.TgZ(16,"div",30),p.NdJ("click",function(){return p.CHM(n),p.oxw().setCode("2")}),p._uU(17,"2"),p.qZA(),p.TgZ(18,"div",30),p.NdJ("click",function(){return p.CHM(n),p.oxw().setCode("3")}),p._uU(19,"3"),p.qZA(),p.qZA(),p.TgZ(20,"div",29),p.TgZ(21,"div",30),p.NdJ("click",function(){return p.CHM(n),p.oxw().setCode("4")}),p._uU(22,"4"),p.qZA(),p.TgZ(23,"div",30),p.NdJ("click",function(){return p.CHM(n),p.oxw().setCode("5")}),p._uU(24,"5"),p.qZA(),p.TgZ(25,"div",30),p.NdJ("click",function(){return p.CHM(n),p.oxw().setCode("6")}),p._uU(26,"6"),p.qZA(),p.qZA(),p.TgZ(27,"div",29),p.TgZ(28,"div",30),p.NdJ("click",function(){return p.CHM(n),p.oxw().setCode("7")}),p._uU(29,"7"),p.qZA(),p.TgZ(30,"div",30),p.NdJ("click",function(){return p.CHM(n),p.oxw().setCode("8")}),p._uU(31,"8"),p.qZA(),p.TgZ(32,"div",30),p.NdJ("click",function(){return p.CHM(n),p.oxw().setCode("9")}),p._uU(33,"9"),p.qZA(),p.qZA(),p.TgZ(34,"div",31),p.TgZ(35,"div",30),p.NdJ("click",function(){return p.CHM(n),p.oxw().setCode("0")}),p._uU(36,"0"),p.qZA(),p.qZA(),p.qZA(),p.YNc(37,Z,2,0,"div",32),p.TgZ(38,"div",33),p.NdJ("click",function(){return p.CHM(n),p.oxw().clearCode()}),p._uU(39," Limpar "),p.qZA(),p.qZA(),p.qZA()}if(2&t){var i=p.oxw();p.xp6(5),p.Q6J("ngIf",i.hasPin),p.xp6(1),p.Q6J("ngIf",!i.hasPin),p.xp6(2),p.ekj("dot-active",i.code.length>=1),p.xp6(1),p.ekj("dot-active",i.code.length>=2),p.xp6(1),p.ekj("dot-active",i.code.length>=3),p.xp6(1),p.ekj("dot-active",i.code.length>=4),p.xp6(26),p.Q6J("ngIf",i.hasPin)}}var _,M,w=[{path:"",component:(_=function(){function n(e,i,o,r,a,c){t(this,n),this.notificatinsservice=e,this.router=i,this.authService=o,this.toastService=r,this.alertController=a,this.localstoreService=c,this.username=d.N.defaultuser,this.password=d.N.defaultuserpwd,this.code=[],this.hasSession=!1,this.setPin=!1}var i,o,r;return i=n,(o=[{key:"ngOnInit",value:function(){window.localStorage.clear(),this.localstoreService.get("UserData",{})}},{key:"validateUsername",value:function(){return this.username.trim().length>0}},{key:"validatePassword",value:function(){return this.password.trim().length>0}},{key:"presentAlert",value:function(t){return(0,g.mG)(this,void 0,void 0,regeneratorRuntime.mark(function e(){var n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.alertController.create({cssClass:"my-custom-class",header:"Mensagem do sistema",message:t,buttons:["OK"]});case 2:return n=e.sent,e.next=5,n.present();case 5:case"end":return e.stop()}},e,this)}))}},{key:"getToken",value:function(){this.notificatinsservice.getAndpostToken(this.username)}},{key:"Login",value:function(){return(0,g.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.validateUsername()){t.next=13;break}if(!this.validatePassword()){t.next=10;break}return this.userattempt={username:this.username,password:this.password,domainName:d.N.domain,BasicAuthKey:""},t.next=5,this.authService.login(this.userattempt);case 5:if(t.t0=t.sent,!t.t0){t.next=8;break}this.authService.loginChat(this.userattempt),this.getToken(),this.hasSession=!0,this.hasPin=!1,this.setPin=!0,!this.hasPin||this.hasPin||this.router.navigate(["/home/events"]);case 8:t.next=11;break;case 10:this.toastService.badRequest("Por favor, insira a sua palavra-passe");case 11:t.next=14;break;case 13:this.toastService.badRequest("Por favor, insira o seu nome de utilizador");case 14:case"end":return t.stop()}},t,this)}))}},{key:"setCode",value:function(t){if(this.code.length<4&&this.code.push(t),4==this.code.length){var e=this.code.join("");l().SHA1(e),this.hasPin?this.pinLogin():this.storePin()}}},{key:"clearCode",value:function(){this.code=[]}},{key:"pinLogin",value:function(){var t=this.code.join(""),e=l().SHA1(t);this.localstoreService.get("UserData",{}),e==this.localstoreService.get("UserData",!1)?this.router.navigate(["/home/events"]):(this.toastService.badRequest("Pin incorreto"),this.code=[])}},{key:"storePin",value:function(){var t=this.code.join(""),e=l().SHA1(t).toString(),n=this.localstoreService.get("UserData",{});n.PIN=e,n.loginPreference="none",this.localstoreService.set("UserData",n),this.localstoreService.set("PIN",e),this.router.navigate(["/home/events"])}}])&&e(i.prototype,o),r&&e(i,r),n}(),_.\u0275fac=function(t){return new(t||_)(p.Y36(f.T),p.Y36(s.F0),p.Y36(h.e),p.Y36(v.k),p.Y36(c.Br),p.Y36(m.L))},_.\u0275cmp=p.Xpm({type:_,selectors:[["app-inactivity"]],decls:4,vars:2,consts:[[1,"text-white"],[1,"main-wrapper"],["class","wrapper",4,"ngIf"],["class","main-content height-100",4,"ngIf"],[1,"wrapper"],[1,"bg-1","d-flex","justify-center","align-center"],[1,"bg-2","d-flex","justify-center","align-center"],[1,"bg-3","d-flex","justify-center","align-center"],[1,"bg-4","d-flex","justify-center","align-center"],[1,"div-logo"],["src","assets/images/fullLogo.png","alt","logo"],[1,"center","text-white"],[1,"form"],[1,"form-label","text-white"],[1,"form-input"],["type","text","name","input-username",3,"ngModel","ngModelChange"],["type","password","name","input-password",3,"ngModel","keyup.enter","ngModelChange"],[1,"d-flex","pt-25"],["fill","clear","expand","block","shape","round",1,"btn-ok","btn-login",3,"click"],[1,"msg-bottom","d-flex"],[1,"msg-bottom-p"],[1,"main-content","height-100"],[1,"align-center","justify-center"],[1,"div-top-header"],["src","assets/images/logo-bg.png","alt","logo"],["class","title",4,"ngIf"],[1,"d-flex","pt-25","align-center","justify-center"],[1,"dot"],[1,"terminal"],[1,"d-flex"],[1,"circle",3,"click"],[1,"d-flex","align-center","justify-center"],["class","voltar d-flex align-center justify-center pt-25 clear",3,"click",4,"ngIf"],["id","clear",1,"cy-clear","voltar","d-flex","align-center","justify-center","pt-25","clear",3,"click"],[1,"title"],[1,"voltar","d-flex","align-center","justify-center","pt-25","clear",3,"click"]],template:function(t,e){1&t&&(p.TgZ(0,"ion-content",0),p.TgZ(1,"div",1),p.YNc(2,b,24,2,"div",2),p.YNc(3,P,40,11,"div",3),p.qZA(),p.qZA()),2&t&&(p.xp6(2),p.Q6J("ngIf",!e.hasSession&&!e.setPin||"none"==e.loginPreference&&!e.setPin),p.xp6(1),p.Q6J("ngIf",e.setPin||e.hasSession&&"pin"==e.loginPreference))},directives:[c.W2,r.O5,a._Y,a.JL,a.F,c.Ie,c.pK,c.j9,a.JJ,a.On,c.wd],styles:["[_nghost-%COMP%] ion-content[_ngcontent-%COMP%], app-login[_ngcontent-%COMP%] ion-content[_ngcontent-%COMP%]{background:linear-gradient(180deg,#42b9fe,#0782c9)!important}ion-content[_ngcontent-%COMP%]{background-color:#fff!important}.main-wrapper[_ngcontent-%COMP%]{background:linear-gradient(180deg,#42b9fe,#0782c9)!important;display:flex;width:100vw;height:100vh;overflow:auto}.wrapper[_ngcontent-%COMP%]{width:400px;height:auto;padding:0!important;margin:auto!important;overflow:auto}.logo[_ngcontent-%COMP%]{width:400px;height:400px;background-image:url(/assets/background/auth.svg);background-position:50%;background-repeat:no-repeat}.bg-1[_ngcontent-%COMP%]{width:250px;height:250px;background:#4cb9f825}.bg-1[_ngcontent-%COMP%], .bg-1[_ngcontent-%COMP%] .bg-2[_ngcontent-%COMP%]{overflow:auto;border-radius:50%;margin:auto}.bg-1[_ngcontent-%COMP%] .bg-2[_ngcontent-%COMP%]{width:225px;height:225px;background:#61bdf2b4}.bg-1[_ngcontent-%COMP%] .bg-2[_ngcontent-%COMP%] .bg-3[_ngcontent-%COMP%]{width:200px;height:200px;background:#96d3f8be}.bg-1[_ngcontent-%COMP%] .bg-2[_ngcontent-%COMP%] .bg-3[_ngcontent-%COMP%], .bg-1[_ngcontent-%COMP%] .bg-2[_ngcontent-%COMP%] .bg-3[_ngcontent-%COMP%] .bg-4[_ngcontent-%COMP%]{overflow:auto;border-radius:50%;margin:auto}.bg-1[_ngcontent-%COMP%] .bg-2[_ngcontent-%COMP%] .bg-3[_ngcontent-%COMP%] .bg-4[_ngcontent-%COMP%]{width:175px;height:175px;background:hsla(0,0%,100%,.918);padding:15px}.bg-1[_ngcontent-%COMP%] .bg-2[_ngcontent-%COMP%] .bg-3[_ngcontent-%COMP%] .bg-4[_ngcontent-%COMP%] .bg-4[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%}.div-logo[_ngcontent-%COMP%]{width:200px!important;margin:0 auto;padding-bottom:15px}.wrapper[_ngcontent-%COMP%] ion-input[_ngcontent-%COMP%]{font-size:16px}.wrapper[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{font-size:medium;margin-top:16px}ion-item[_ngcontent-%COMP%]{--background:transparent}.form[_ngcontent-%COMP%]{width:300px;margin:auto;overflow:auto}.form-label[_ngcontent-%COMP%]{margin:15px 0 5px;font-size:15px}.form-input[_ngcontent-%COMP%]{--background:#fff;--color:#000;border-radius:22.5px;margin:10px 0}.btn-login[_ngcontent-%COMP%]{font-size:16px}.div-top-header[_ngcontent-%COMP%]{margin:0 1.25em;padding-top:.9375em;border:0!important}.div-logo[_ngcontent-%COMP%]{background:transparent;width:8.75em;justify-content:center;display:flex}.div-logo[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;margin:0 auto}.circle[_ngcontent-%COMP%]{color:#fff;width:70px;height:70px;display:flex;align-items:center;justify-content:center;font-size:19pt;background:#44b5ea;border-radius:56px;margin-left:30px;margin-bottom:15px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.title[_ngcontent-%COMP%]{padding-top:32px}.terminal[_ngcontent-%COMP%]{padding-top:112px;margin-left:-30px;justify-content:center;display:flex;flex-direction:column;align-items:center}.clear[_ngcontent-%COMP%]{color:#44b5ea;font-size:12pt}.dot-active[_ngcontent-%COMP%]{background:#44b5ea}.dot[_ngcontent-%COMP%]{width:25px;height:25px;margin:0 10px 0 0;border:3px solid #44b5ea;box-sizing:border-box;border-radius:50px;-webkit-border-radius:50px;-moz-border-radius:50px;-ms-border-radius:50px;-o-border-radius:50px}.main-content[_ngcontent-%COMP%]{width:100vw;height:100vh;background-color:#fff;text-align:center;align-items:center;justify-content:center;background-image:url(/assets/background/auth.svg);background-size:686px 674px;background-position:50%;background-position-y:110px;background-repeat:no-repeat;margin:auto}.voltar[_ngcontent-%COMP%]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.msg-bottom[_ngcontent-%COMP%]{width:100%;color:#fff;align-items:center;justify-content:center}.msg-bottom[_ngcontent-%COMP%] .msg-bottom-p[_ngcontent-%COMP%]{width:220px;position:absolute;bottom:0!important;text-align:center}@media only screen and (max-height: 746px){.msg-bottom-p[_ngcontent-%COMP%]{padding-top:20px;position:unset!important}}"]}),_)}],k=function(){var e=function e(){t(this,e)};return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=p.oAB({type:e}),e.\u0275inj=p.cJS({imports:[[s.Bz.forChild(w)],s.Bz]}),e}(),O=((M=function e(){t(this,e)}).\u0275fac=function(t){return new(t||M)},M.\u0275mod=p.oAB({type:M}),M.\u0275inj=p.cJS({imports:[[r.ez,a.u5,c.Pc,k]]}),M)}}])}(); |