From ef1f41717c1a03bfca46df666622de07f249d00d Mon Sep 17 00:00:00 2001 From: Juan Francisco Cisneros Windows Date: Wed, 2 Oct 2024 12:58:00 -0500 Subject: [PATCH] New Features: 1. Push notification alert to all assigned users on new incident created New Pages: Bugs Corrected: To Be Corrected: 0. On product delete, delete trace results 1. On product delete, delete flamegraph result 3. On add member do not delete github info 4. Sort System Test check if needed!!! --- .../new-incident/new-incident.page.ts | 19 +++++++++++-------- src/app/services/notification.service.ts | 16 ++++++++++------ www/5371.8b79a9bec1875d4c.js | 1 + www/5371.de7adbfc0ff47b02.js | 1 - www/8839.079ecd4df31064df.js | 1 + www/8839.9afbf5267b32d12c.js | 1 - www/9878.47d8f10205cc65c9.js | 1 - www/9878.5350a59e31ab4985.js | 1 + www/index.html | 2 +- ...a0376c3.js => runtime.141a7a066c45f6f6.js} | 2 +- 10 files changed, 26 insertions(+), 19 deletions(-) create mode 100644 www/5371.8b79a9bec1875d4c.js delete mode 100644 www/5371.de7adbfc0ff47b02.js create mode 100644 www/8839.079ecd4df31064df.js delete mode 100644 www/8839.9afbf5267b32d12c.js delete mode 100644 www/9878.47d8f10205cc65c9.js create mode 100644 www/9878.5350a59e31ab4985.js rename www/{runtime.57982f5e4a0376c3.js => runtime.141a7a066c45f6f6.js} (95%) diff --git a/src/app/pages/incident_manager/new-incident/new-incident.page.ts b/src/app/pages/incident_manager/new-incident/new-incident.page.ts index da7d48e..0a6fe27 100644 --- a/src/app/pages/incident_manager/new-incident/new-incident.page.ts +++ b/src/app/pages/incident_manager/new-incident/new-incident.page.ts @@ -200,18 +200,21 @@ export class NewIncidentPage implements OnInit { }).then(async (data) => { if (data) { - await this.hideLoading(); + interface Role { + role: string; + member: string; + } - let consolidateMember: String[] = []; - consolidateMember.push(this.incidentCommander); - consolidateMember.push(this.communicationsLead); - consolidateMember.push(this.operationsLead); + let consolidateMember: Role[] = []; + consolidateMember.push({role: 'Incident Commander', member: this.incidentCommander}); + consolidateMember.push({role: 'Communications Lead', member: this.communicationsLead}); + consolidateMember.push({role: 'Operations Lead', member: this.operationsLead}); for (let i = 0; i < this.operationTeam[1].items.length; i++) { - consolidateMember.push(this.operationTeam[1].items[i]); - console.log('consolidateMember',consolidateMember); + consolidateMember.push({role: 'Operations Team Member', member: this.operationTeam[1].items[i]}); } - console.log('consolidateMember',consolidateMember); await this.notificationService.notifyIncidentToUser(consolidateMember, this.orgName); + + await this.hideLoading(); await this.showAlert('Incident saved successfully', 'Success'); window.history.back(); } else { diff --git a/src/app/services/notification.service.ts b/src/app/services/notification.service.ts index a94c2a9..519ac8b 100644 --- a/src/app/services/notification.service.ts +++ b/src/app/services/notification.service.ts @@ -3,7 +3,10 @@ import {User} from "../interfaces/user"; import {Firestore, doc, getDoc, setDoc } from '@angular/fire/firestore'; import {HttpClient} from "@angular/common/http"; import {TeamsService} from "./teams.service"; - +interface Role { + role: string; + member: string; +} @Injectable({ providedIn: 'root' }) @@ -51,15 +54,15 @@ export class NotificationService { } } - async notifyIncidentToUser(users: String[], orgName: string) { + async notifyIncidentToUser(roles: Role[],orgName: string) { try { - - //get team by orgName const team = await this.teamService.getTeamByOrganization(orgName); + const users = roles.map(role => role.member); // from the team arr delete the users that are not in the users array - const filteredTeam = team.filter(user => users.includes(user.name)); + // @ts-ignore + const filteredTeam = team.filter(user => users.includes(user.name)); console.log('team',filteredTeam); const url = `https://devprobeapi.onrender.com/sendNotification`; @@ -72,7 +75,8 @@ export class NotificationService { sid: sid, title: 'New Incident', type: 'new_incident', - message: `Hey ${user.name}, you have been assigned a new incident`, + // @ts-ignore + message: `Hey ${user.name}, you have been assigned a new incident your incident role is ${roles.find(role => role.member === user.name).role}`, target: target_url }; await this.http.post(url, body).toPromise(); diff --git a/www/5371.8b79a9bec1875d4c.js b/www/5371.8b79a9bec1875d4c.js new file mode 100644 index 0000000..ee1af0a --- /dev/null +++ b/www/5371.8b79a9bec1875d4c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[5371],{5553:(O,b,n)=>{n.d(b,{h:()=>f});var m=n(177),a=n(7863),r=n(4438);let f=(()=>{var d;class e{}return(d=e).\u0275fac=function(P){return new(P||d)},d.\u0275mod=r.$C({type:d}),d.\u0275inj=r.G2t({imports:[m.MD,a.bv]}),e})()},8453:(O,b,n)=>{n.d(b,{W:()=>r});var m=n(4438),a=n(7863);let r=(()=>{var f;class d{constructor(){this.title="Title"}ngOnInit(){}}return(f=d).\u0275fac=function(g){return new(g||f)},f.\u0275cmp=m.VBU({type:f,selectors:[["app-title"]],inputs:{title:"title"},decls:4,vars:1,consts:[[1,"lg:m-10"],["size","12","size-md","6","size-lg","6"],[1,"text-4xl","lg:text-6xl","font-bold"]],template:function(g,P){1&g&&(m.j41(0,"ion-row",0)(1,"ion-col",1)(2,"h1",2),m.EFF(3),m.k0s()()()),2&g&&(m.R7$(3),m.JRh(P.title))},dependencies:[a.hU,a.ln]}),d})()},5371:(O,b,n)=>{n.r(b),n.d(b,{SettingsPageModule:()=>E});var m=n(177),a=n(4341),r=n(7863),f=n(7650),d=n(467),e=n(4438),g=n(4796),P=n(201),i=n(7473),s=n(385),o=n(8453);const _=[{path:"",component:(()=>{var u;class v{constructor(t,l,M,h,D,A){this.authService=t,this.router=l,this.alertCtrl=M,this.githubService=h,this.loadingCtrl=D,this.notificationService=A,this.gitKey="",this.repoName="",this.branchName="",this.owner="",this.user={},this.orgname="",this.version="1.10.200"}ngOnInit(){}ionViewWillEnter(){var t=this;return(0,d.A)(function*(){t.user=localStorage.getItem("user")?JSON.parse(localStorage.getItem("user")||"{}"):null,t.user?(t.orgname=t.user.orgName||"",yield t.getSyncRepo()):yield t.showAlert("No user found","Error")})()}logout(){var t=this;return(0,d.A)(function*(){yield t.authService.logoutUser(),yield t.router.navigate(["/login"])})()}getSyncRepo(){var t=this;return(0,d.A)(function*(){yield t.showLoading();const l=yield t.githubService.getSyncRepo(t.orgname);l&&(t.gitKey=l.key,t.repoName=l.repo,t.branchName=l.branch,t.owner=l.owner),yield t.hideLoading()})()}syncRepo(){var t=this;return(0,d.A)(function*(){yield t.showLoading(),t.gitKey&&t.repoName&&t.branchName&&t.owner&&""!==t.gitKey&&""!==t.repoName&&""!==t.branchName&&""!==t.owner?(yield t.githubService.syncRepo(t.orgname,t.gitKey,t.repoName,t.branchName,t.owner),yield t.hideLoading()):yield t.showAlert("Please fill in all fields","Error")})()}showAlert(t,l){var M=this;return(0,d.A)(function*(){yield(yield M.alertCtrl.create({header:l,message:t,buttons:["OK"]})).present()})()}showLoading(){var t=this;return(0,d.A)(function*(){yield(yield t.loadingCtrl.create({})).present()})()}hideLoading(){var t=this;return(0,d.A)(function*(){yield t.loadingCtrl.dismiss()})()}notify(){Notification.requestPermission().then(function(t){console.log("granted"===t?"Permission granted for notifications":"Permission denied for notifications")})}subscribe(){var t=this;return(0,d.A)(function*(){webpushr("fetch_id",function(){var l=(0,d.A)(function*(M){console.log("webpushr subscriber id: "+M),M?yield t.notificationService.saveNotificationID(t.user,M).then(function(){var h=(0,d.A)(function*(D){D&&(yield t.showAlert("Subscription saved successfully","Success"))});return function(D){return h.apply(this,arguments)}}()):yield t.showAlert("No subscription id found, please check browser permissions","Error")});return function(M){return l.apply(this,arguments)}}())})()}}return(u=v).\u0275fac=function(t){return new(t||u)(e.rXU(g.u),e.rXU(f.Ix),e.rXU(r.hG),e.rXU(P.p),e.rXU(r.Xi),e.rXU(i.J))},u.\u0275cmp=e.VBU({type:u,selectors:[["app-settings"]],decls:72,vars:10,consts:[[3,"title"],[3,"fullscreen"],[1,"lg:m-10","md:m-10"],["size","12","size-md","12","size-lg","12",1,"flex","flex-row","justify-center"],["color","danger",1,"min-w-full",3,"click"],["size","12","size-md","12","size-lg","12",1,""],[1,"p-5"],[1,"text-2xl"],[1,"text-white"],["href","https://github.com/settings/tokens",1,"text-blue-500"],["placeholder","Enter your key here...",1,"text-white",3,"ngModelChange","ngModel"],["placeholder","Enter your repo name here...",1,"text-white",3,"ngModelChange","ngModel"],["placeholder","Enter your branch name here...",1,"text-white",3,"ngModelChange","ngModel"],["color","primary",1,"min-w-full",3,"click"],[1,"w-full",3,"click"],["size","12",1,"flex","flex-row","justify-end","items-center"],[1,"text-sm"]],template:function(t,l){1&t&&(e.nrm(0,"app-header",0),e.j41(1,"ion-content",1)(2,"ion-grid"),e.nrm(3,"app-title",0),e.j41(4,"ion-row",2)(5,"ion-col",3)(6,"ion-button",4),e.bIt("click",function(){return l.logout()}),e.EFF(7,"Logout"),e.k0s()()(),e.nrm(8,"app-title",0),e.j41(9,"ion-row",2)(10,"ion-col",5)(11,"ion-card",6)(12,"ion-card",6)(13,"ion-card-title",7),e.EFF(14,"1. Add a GitHub Key"),e.k0s(),e.j41(15,"ion-card-content")(16,"p",8),e.EFF(17," Add a GitHub key to sync with your GitHub repo. You will be able to create tests with DevProbeAI. "),e.j41(18,"a",9),e.EFF(19,"Get A GitHub Key Here !!!"),e.k0s()()(),e.j41(20,"ion-card")(21,"ion-card-content")(22,"ion-label"),e.EFF(23,"GitHub Key"),e.k0s(),e.j41(24,"ion-input",10),e.mxI("ngModelChange",function(h){return e.DH7(l.gitKey,h)||(l.gitKey=h),h}),e.k0s()()()(),e.j41(25,"ion-card",6)(26,"ion-card-title",7),e.EFF(27,"2. Repo Name"),e.k0s(),e.j41(28,"ion-card-content")(29,"p",8),e.EFF(30," Add the name of the repo you want to sync with DevProbeAI. "),e.k0s()(),e.j41(31,"ion-card")(32,"ion-card-content")(33,"ion-label"),e.EFF(34,"Repo Name"),e.k0s(),e.j41(35,"ion-input",11),e.mxI("ngModelChange",function(h){return e.DH7(l.repoName,h)||(l.repoName=h),h}),e.k0s()()()(),e.j41(36,"ion-card",6)(37,"ion-card-title",7),e.EFF(38,"3. Branch Name"),e.k0s(),e.j41(39,"ion-card-content")(40,"p",8),e.EFF(41," Add the name of the branch you want to sync with DevProbeAI. "),e.k0s()(),e.j41(42,"ion-card")(43,"ion-card-content")(44,"ion-label"),e.EFF(45,"Branch Name"),e.k0s(),e.j41(46,"ion-input",12),e.mxI("ngModelChange",function(h){return e.DH7(l.branchName,h)||(l.branchName=h),h}),e.k0s()()()(),e.j41(47,"ion-card",6)(48,"ion-card-title",7),e.EFF(49,"4. Owner Name"),e.k0s(),e.j41(50,"ion-card-content")(51,"p",8),e.EFF(52," Add the name of the owner of the repo you want to sync with DevProbeAI. "),e.k0s()(),e.j41(53,"ion-card")(54,"ion-card-content")(55,"ion-label"),e.EFF(56,"Owner Name"),e.k0s(),e.j41(57,"ion-input",12),e.mxI("ngModelChange",function(h){return e.DH7(l.owner,h)||(l.owner=h),h}),e.k0s()()()(),e.j41(58,"ion-button",13),e.bIt("click",function(){return l.syncRepo()}),e.EFF(59,"Sync Repo"),e.k0s()()()(),e.nrm(60,"app-title",0),e.j41(61,"ion-row",2)(62,"ion-col",5)(63,"p"),e.EFF(64,"Receive push notifications when new data is available. Like new tests, incidents, etc."),e.k0s()(),e.j41(65,"ion-col",3)(66,"ion-button",14),e.bIt("click",function(){return l.subscribe()}),e.EFF(67,"Subscribe"),e.k0s()()(),e.j41(68,"ion-row")(69,"ion-col",15)(70,"h1",16),e.EFF(71),e.k0s()()()()()),2&t&&(e.Y8G("title","Settings"),e.R7$(),e.Y8G("fullscreen",!0),e.R7$(2),e.Y8G("title","Account SingOut"),e.R7$(5),e.Y8G("title","Sync GitHub Repo"),e.R7$(16),e.R50("ngModel",l.gitKey),e.R7$(11),e.R50("ngModel",l.repoName),e.R7$(11),e.R50("ngModel",l.branchName),e.R7$(11),e.R50("ngModel",l.owner),e.R7$(3),e.Y8G("title","Receive Push Notifications"),e.R7$(11),e.SpI("Version: ",l.version,""))},dependencies:[a.BC,a.vS,r.Jm,r.b_,r.I9,r.tN,r.hU,r.W9,r.lO,r.$w,r.he,r.ln,r.Gw,s.l,o.W]}),v})()}];let p=(()=>{var u;class v{}return(u=v).\u0275fac=function(t){return new(t||u)},u.\u0275mod=e.$C({type:u}),u.\u0275inj=e.G2t({imports:[f.iI.forChild(_),f.iI]}),v})();var y=n(5553);let E=(()=>{var u;class v{}return(u=v).\u0275fac=function(t){return new(t||u)},u.\u0275mod=e.$C({type:u}),u.\u0275inj=e.G2t({imports:[m.MD,a.YN,r.bv,p,y.h]}),v})()},4796:(O,b,n)=>{n.d(b,{u:()=>d});var m=n(467),a=n(8737),r=n(4262),f=n(4438);let d=(()=>{var e;class g{constructor(i,s){this.auth=i,this.firestore=s}registerUser(i){var s=this;return(0,m.A)(function*(){try{const o=yield(0,a.eJ)(s.auth,i.email,i.password);return o.user?(yield(0,r.BN)((0,r.H9)(s.firestore,"users",o.user.uid),{email:i.email,name:i.name,orgName:i.orgName,uid:o.user.uid}),yield(0,r.BN)((0,r.H9)(s.firestore,"teams",`${i.orgName}`),{name:i.orgName,members:[o.user.uid]}),o):null}catch{return null}})()}loginUser(i){var s=this;return(0,m.A)(function*(){try{var o;const c=yield(0,a.x9)(s.auth,i.email,i.password);if(null!==(o=c.user)&&void 0!==o&&o.uid){const _=yield(0,r.x7)((0,r.H9)(s.firestore,"users",c.user.uid));if(_.exists())return localStorage.setItem("user",JSON.stringify(_.data())),c}}catch(c){console.error(c)}return null})()}logoutUser(){var i=this;return(0,m.A)(function*(){yield i.auth.signOut()})()}addMember(i){var s=this;return(0,m.A)(function*(){try{const o=yield(0,a.eJ)(s.auth,i.email,i.password);if(!o.user)return!1;const c={email:i.email,name:i.name,orgName:i.orgName,uid:o.user.uid};return yield(0,r.BN)((0,r.H9)(s.firestore,"users",o.user.uid),c),c}catch{return!1}})()}}return(e=g).\u0275fac=function(i){return new(i||e)(f.KVO(a.Nj),f.KVO(r._7))},e.\u0275prov=f.jDH({token:e,factory:e.\u0275fac,providedIn:"root"}),g})()},7473:(O,b,n)=>{n.d(b,{J:()=>e});var m=n(467),a=n(4262),r=n(4438),f=n(1626),d=n(5092);let e=(()=>{var g;class P{constructor(s,o,c){this.firestore=s,this.http=o,this.teamService=c}saveNotificationID(s,o){var c=this;return(0,m.A)(function*(){const _=(0,a.H9)(c.firestore,"users",s.uid),p=yield(0,a.x7)(_);if(p.exists()){const y=p.data();return y.notificationID=o,yield(0,a.BN)(_,y),!0}return console.log("No such document!"),!1})()}getNotificationUser(s){var o=this;return(0,m.A)(function*(){const c=(0,a.H9)(o.firestore,"users",s.uid),_=yield(0,a.x7)(c);if(_.exists()){const p=_.data();return p.notificationID?p.notificationID:""}return console.log("No such document!"),null})()}notifyIncidentToUser(s,o){var c=this;return(0,m.A)(function*(){try{const _=yield c.teamService.getTeamByOrganization(o),p=s.map(u=>u.member),y=_.filter(u=>p.includes(u.name));console.log("team",y);const E="https://devprobeapi.onrender.com/sendNotification";for(let u of y){let v=yield c.getNotificationUser(u);if(console.log("sid",v),""!==v){const t={sid:v,title:"New Incident",type:"new_incident",message:`Hey ${u.name}, you have been assigned a new incident your incident role is ${s.find(l=>l.member===u.name).role}`,target:"https://devprobe-89481.web.app/incident-manager-chooser"};yield c.http.post(E,t).toPromise(),console.log("Notification sent successfully")}else console.log("no sid")}}catch(_){console.log(_)}})()}}return(g=P).\u0275fac=function(s){return new(s||g)(r.KVO(a._7),r.KVO(f.Qq),r.KVO(d.O))},g.\u0275prov=r.jDH({token:g,factory:g.\u0275fac,providedIn:"root"}),P})()},5092:(O,b,n)=>{n.d(b,{O:()=>d});var m=n(467),a=n(4262),r=n(4438),f=n(4796);let d=(()=>{var e;class g{constructor(i,s){this.firestore=i,this.authService=s}getTeamByOrganization(i){var s=this;return(0,m.A)(function*(){let o=(0,a.H9)(s.firestore,"teams",i);const p=(yield(0,a.x7)(o)).data();let y=[];for(let E=0;Ev!==s);return yield(0,a.BN)(c,{name:y.name,members:E}),c=(0,a.H9)(o.firestore,"users",s),yield(0,a.BN)(c,{}),yield o.authService,!0}catch{return!1}})()}addMember(i){var s=this;return(0,m.A)(function*(){try{const o=yield s.authService.addMember(i);if(!o)return!1;const c=(0,a.H9)(s.firestore,"teams",i.orgName),p=(yield(0,a.x7)(c)).data();console.log(p);const y=p;let E=y.members;return E.push(o.uid),console.log(E),yield(0,a.mZ)(c,{name:y.name,members:E}),o.uid}catch{return!1}})()}}return(e=g).\u0275fac=function(i){return new(i||e)(r.KVO(a._7),r.KVO(f.u))},e.\u0275prov=r.jDH({token:e,factory:e.\u0275fac,providedIn:"root"}),g})()}}]); \ No newline at end of file diff --git a/www/5371.de7adbfc0ff47b02.js b/www/5371.de7adbfc0ff47b02.js deleted file mode 100644 index 8c263da..0000000 --- a/www/5371.de7adbfc0ff47b02.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[5371],{5553:(O,b,n)=>{n.d(b,{h:()=>f});var m=n(177),s=n(7863),r=n(4438);let f=(()=>{var u;class e{}return(u=e).\u0275fac=function(P){return new(P||u)},u.\u0275mod=r.$C({type:u}),u.\u0275inj=r.G2t({imports:[m.MD,s.bv]}),e})()},8453:(O,b,n)=>{n.d(b,{W:()=>r});var m=n(4438),s=n(7863);let r=(()=>{var f;class u{constructor(){this.title="Title"}ngOnInit(){}}return(f=u).\u0275fac=function(g){return new(g||f)},f.\u0275cmp=m.VBU({type:f,selectors:[["app-title"]],inputs:{title:"title"},decls:4,vars:1,consts:[[1,"lg:m-10"],["size","12","size-md","6","size-lg","6"],[1,"text-4xl","lg:text-6xl","font-bold"]],template:function(g,P){1&g&&(m.j41(0,"ion-row",0)(1,"ion-col",1)(2,"h1",2),m.EFF(3),m.k0s()()()),2&g&&(m.R7$(3),m.JRh(P.title))},dependencies:[s.hU,s.ln]}),u})()},5371:(O,b,n)=>{n.r(b),n.d(b,{SettingsPageModule:()=>y});var m=n(177),s=n(4341),r=n(7863),f=n(7650),u=n(467),e=n(4438),g=n(4796),P=n(201),i=n(7473),a=n(385),o=n(8453);const p=[{path:"",component:(()=>{var d;class E{constructor(t,c,M,h,D,A){this.authService=t,this.router=c,this.alertCtrl=M,this.githubService=h,this.loadingCtrl=D,this.notificationService=A,this.gitKey="",this.repoName="",this.branchName="",this.owner="",this.user={},this.orgname="",this.version="1.10.200"}ngOnInit(){}ionViewWillEnter(){var t=this;return(0,u.A)(function*(){t.user=localStorage.getItem("user")?JSON.parse(localStorage.getItem("user")||"{}"):null,t.user?(t.orgname=t.user.orgName||"",yield t.getSyncRepo()):yield t.showAlert("No user found","Error")})()}logout(){var t=this;return(0,u.A)(function*(){yield t.authService.logoutUser(),yield t.router.navigate(["/login"])})()}getSyncRepo(){var t=this;return(0,u.A)(function*(){yield t.showLoading();const c=yield t.githubService.getSyncRepo(t.orgname);c&&(t.gitKey=c.key,t.repoName=c.repo,t.branchName=c.branch,t.owner=c.owner),yield t.hideLoading()})()}syncRepo(){var t=this;return(0,u.A)(function*(){yield t.showLoading(),t.gitKey&&t.repoName&&t.branchName&&t.owner&&""!==t.gitKey&&""!==t.repoName&&""!==t.branchName&&""!==t.owner?(yield t.githubService.syncRepo(t.orgname,t.gitKey,t.repoName,t.branchName,t.owner),yield t.hideLoading()):yield t.showAlert("Please fill in all fields","Error")})()}showAlert(t,c){var M=this;return(0,u.A)(function*(){yield(yield M.alertCtrl.create({header:c,message:t,buttons:["OK"]})).present()})()}showLoading(){var t=this;return(0,u.A)(function*(){yield(yield t.loadingCtrl.create({})).present()})()}hideLoading(){var t=this;return(0,u.A)(function*(){yield t.loadingCtrl.dismiss()})()}notify(){Notification.requestPermission().then(function(t){console.log("granted"===t?"Permission granted for notifications":"Permission denied for notifications")})}subscribe(){var t=this;return(0,u.A)(function*(){webpushr("fetch_id",function(){var c=(0,u.A)(function*(M){console.log("webpushr subscriber id: "+M),M?yield t.notificationService.saveNotificationID(t.user,M).then(function(){var h=(0,u.A)(function*(D){D&&(yield t.showAlert("Subscription saved successfully","Success"))});return function(D){return h.apply(this,arguments)}}()):yield t.showAlert("No subscription id found, please check browser permissions","Error")});return function(M){return c.apply(this,arguments)}}())})()}}return(d=E).\u0275fac=function(t){return new(t||d)(e.rXU(g.u),e.rXU(f.Ix),e.rXU(r.hG),e.rXU(P.p),e.rXU(r.Xi),e.rXU(i.J))},d.\u0275cmp=e.VBU({type:d,selectors:[["app-settings"]],decls:72,vars:10,consts:[[3,"title"],[3,"fullscreen"],[1,"lg:m-10","md:m-10"],["size","12","size-md","12","size-lg","12",1,"flex","flex-row","justify-center"],["color","danger",1,"min-w-full",3,"click"],["size","12","size-md","12","size-lg","12",1,""],[1,"p-5"],[1,"text-2xl"],[1,"text-white"],["href","https://github.com/settings/tokens",1,"text-blue-500"],["placeholder","Enter your key here...",1,"text-white",3,"ngModelChange","ngModel"],["placeholder","Enter your repo name here...",1,"text-white",3,"ngModelChange","ngModel"],["placeholder","Enter your branch name here...",1,"text-white",3,"ngModelChange","ngModel"],["color","primary",1,"min-w-full",3,"click"],[1,"w-full",3,"click"],["size","12",1,"flex","flex-row","justify-end","items-center"],[1,"text-sm"]],template:function(t,c){1&t&&(e.nrm(0,"app-header",0),e.j41(1,"ion-content",1)(2,"ion-grid"),e.nrm(3,"app-title",0),e.j41(4,"ion-row",2)(5,"ion-col",3)(6,"ion-button",4),e.bIt("click",function(){return c.logout()}),e.EFF(7,"Logout"),e.k0s()()(),e.nrm(8,"app-title",0),e.j41(9,"ion-row",2)(10,"ion-col",5)(11,"ion-card",6)(12,"ion-card",6)(13,"ion-card-title",7),e.EFF(14,"1. Add a GitHub Key"),e.k0s(),e.j41(15,"ion-card-content")(16,"p",8),e.EFF(17," Add a GitHub key to sync with your GitHub repo. You will be able to create tests with DevProbeAI. "),e.j41(18,"a",9),e.EFF(19,"Get A GitHub Key Here !!!"),e.k0s()()(),e.j41(20,"ion-card")(21,"ion-card-content")(22,"ion-label"),e.EFF(23,"GitHub Key"),e.k0s(),e.j41(24,"ion-input",10),e.mxI("ngModelChange",function(h){return e.DH7(c.gitKey,h)||(c.gitKey=h),h}),e.k0s()()()(),e.j41(25,"ion-card",6)(26,"ion-card-title",7),e.EFF(27,"2. Repo Name"),e.k0s(),e.j41(28,"ion-card-content")(29,"p",8),e.EFF(30," Add the name of the repo you want to sync with DevProbeAI. "),e.k0s()(),e.j41(31,"ion-card")(32,"ion-card-content")(33,"ion-label"),e.EFF(34,"Repo Name"),e.k0s(),e.j41(35,"ion-input",11),e.mxI("ngModelChange",function(h){return e.DH7(c.repoName,h)||(c.repoName=h),h}),e.k0s()()()(),e.j41(36,"ion-card",6)(37,"ion-card-title",7),e.EFF(38,"3. Branch Name"),e.k0s(),e.j41(39,"ion-card-content")(40,"p",8),e.EFF(41," Add the name of the branch you want to sync with DevProbeAI. "),e.k0s()(),e.j41(42,"ion-card")(43,"ion-card-content")(44,"ion-label"),e.EFF(45,"Branch Name"),e.k0s(),e.j41(46,"ion-input",12),e.mxI("ngModelChange",function(h){return e.DH7(c.branchName,h)||(c.branchName=h),h}),e.k0s()()()(),e.j41(47,"ion-card",6)(48,"ion-card-title",7),e.EFF(49,"4. Owner Name"),e.k0s(),e.j41(50,"ion-card-content")(51,"p",8),e.EFF(52," Add the name of the owner of the repo you want to sync with DevProbeAI. "),e.k0s()(),e.j41(53,"ion-card")(54,"ion-card-content")(55,"ion-label"),e.EFF(56,"Owner Name"),e.k0s(),e.j41(57,"ion-input",12),e.mxI("ngModelChange",function(h){return e.DH7(c.owner,h)||(c.owner=h),h}),e.k0s()()()(),e.j41(58,"ion-button",13),e.bIt("click",function(){return c.syncRepo()}),e.EFF(59,"Sync Repo"),e.k0s()()()(),e.nrm(60,"app-title",0),e.j41(61,"ion-row",2)(62,"ion-col",5)(63,"p"),e.EFF(64,"Receive push notifications when new data is available. Like new tests, incidents, etc."),e.k0s()(),e.j41(65,"ion-col",3)(66,"ion-button",14),e.bIt("click",function(){return c.subscribe()}),e.EFF(67,"Subscribe"),e.k0s()()(),e.j41(68,"ion-row")(69,"ion-col",15)(70,"h1",16),e.EFF(71),e.k0s()()()()()),2&t&&(e.Y8G("title","Settings"),e.R7$(),e.Y8G("fullscreen",!0),e.R7$(2),e.Y8G("title","Account SingOut"),e.R7$(5),e.Y8G("title","Sync GitHub Repo"),e.R7$(16),e.R50("ngModel",c.gitKey),e.R7$(11),e.R50("ngModel",c.repoName),e.R7$(11),e.R50("ngModel",c.branchName),e.R7$(11),e.R50("ngModel",c.owner),e.R7$(3),e.Y8G("title","Receive Push Notifications"),e.R7$(11),e.SpI("Version: ",c.version,""))},dependencies:[s.BC,s.vS,r.Jm,r.b_,r.I9,r.tN,r.hU,r.W9,r.lO,r.$w,r.he,r.ln,r.Gw,a.l,o.W]}),E})()}];let _=(()=>{var d;class E{}return(d=E).\u0275fac=function(t){return new(t||d)},d.\u0275mod=e.$C({type:d}),d.\u0275inj=e.G2t({imports:[f.iI.forChild(p),f.iI]}),E})();var v=n(5553);let y=(()=>{var d;class E{}return(d=E).\u0275fac=function(t){return new(t||d)},d.\u0275mod=e.$C({type:d}),d.\u0275inj=e.G2t({imports:[m.MD,s.YN,r.bv,_,v.h]}),E})()},4796:(O,b,n)=>{n.d(b,{u:()=>u});var m=n(467),s=n(8737),r=n(4262),f=n(4438);let u=(()=>{var e;class g{constructor(i,a){this.auth=i,this.firestore=a}registerUser(i){var a=this;return(0,m.A)(function*(){try{const o=yield(0,s.eJ)(a.auth,i.email,i.password);return o.user?(yield(0,r.BN)((0,r.H9)(a.firestore,"users",o.user.uid),{email:i.email,name:i.name,orgName:i.orgName,uid:o.user.uid}),yield(0,r.BN)((0,r.H9)(a.firestore,"teams",`${i.orgName}`),{name:i.orgName,members:[o.user.uid]}),o):null}catch{return null}})()}loginUser(i){var a=this;return(0,m.A)(function*(){try{var o;const l=yield(0,s.x9)(a.auth,i.email,i.password);if(null!==(o=l.user)&&void 0!==o&&o.uid){const p=yield(0,r.x7)((0,r.H9)(a.firestore,"users",l.user.uid));if(p.exists())return localStorage.setItem("user",JSON.stringify(p.data())),l}}catch(l){console.error(l)}return null})()}logoutUser(){var i=this;return(0,m.A)(function*(){yield i.auth.signOut()})()}addMember(i){var a=this;return(0,m.A)(function*(){try{const o=yield(0,s.eJ)(a.auth,i.email,i.password);if(!o.user)return!1;const l={email:i.email,name:i.name,orgName:i.orgName,uid:o.user.uid};return yield(0,r.BN)((0,r.H9)(a.firestore,"users",o.user.uid),l),l}catch{return!1}})()}}return(e=g).\u0275fac=function(i){return new(i||e)(f.KVO(s.Nj),f.KVO(r._7))},e.\u0275prov=f.jDH({token:e,factory:e.\u0275fac,providedIn:"root"}),g})()},7473:(O,b,n)=>{n.d(b,{J:()=>e});var m=n(467),s=n(4262),r=n(4438),f=n(1626),u=n(5092);let e=(()=>{var g;class P{constructor(a,o,l){this.firestore=a,this.http=o,this.teamService=l}saveNotificationID(a,o){var l=this;return(0,m.A)(function*(){const p=(0,s.H9)(l.firestore,"users",a.uid),_=yield(0,s.x7)(p);if(_.exists()){const v=_.data();return v.notificationID=o,yield(0,s.BN)(p,v),!0}return console.log("No such document!"),!1})()}getNotificationUser(a){var o=this;return(0,m.A)(function*(){const l=(0,s.H9)(o.firestore,"users",a.uid),p=yield(0,s.x7)(l);if(p.exists()){const _=p.data();return _.notificationID?_.notificationID:""}return console.log("No such document!"),null})()}notifyIncidentToUser(a,o){var l=this;return(0,m.A)(function*(){try{const _=(yield l.teamService.getTeamByOrganization(o)).filter(y=>a.includes(y.name));console.log("team",_);const v="https://devprobeapi.onrender.com/sendNotification";for(let y of _){let d=yield l.getNotificationUser(y);if(console.log("sid",d),""!==d){const S={sid:d,title:"New Incident",type:"new_incident",message:`Hey ${y.name}, you have been assigned a new incident`,target:"https://devprobe-89481.web.app/incident-manager-chooser"};yield l.http.post(v,S).toPromise(),console.log("Notification sent successfully")}else console.log("no sid")}}catch(p){console.log(p)}})()}}return(g=P).\u0275fac=function(a){return new(a||g)(r.KVO(s._7),r.KVO(f.Qq),r.KVO(u.O))},g.\u0275prov=r.jDH({token:g,factory:g.\u0275fac,providedIn:"root"}),P})()},5092:(O,b,n)=>{n.d(b,{O:()=>u});var m=n(467),s=n(4262),r=n(4438),f=n(4796);let u=(()=>{var e;class g{constructor(i,a){this.firestore=i,this.authService=a}getTeamByOrganization(i){var a=this;return(0,m.A)(function*(){let o=(0,s.H9)(a.firestore,"teams",i);const _=(yield(0,s.x7)(o)).data();let v=[];for(let y=0;y<_.members.length;y++){o=(0,s.H9)(a.firestore,"users",_.members[y]);const E=(yield(0,s.x7)(o)).data();v.push(E)}return v})()}removeMember(i,a){var o=this;return(0,m.A)(function*(){try{let l=(0,s.H9)(o.firestore,"teams",i);const v=(yield(0,s.x7)(l)).data();let y=v.members.filter(E=>E!==a);return yield(0,s.BN)(l,{name:v.name,members:y}),l=(0,s.H9)(o.firestore,"users",a),yield(0,s.BN)(l,{}),yield o.authService,!0}catch{return!1}})()}addMember(i){var a=this;return(0,m.A)(function*(){try{const o=yield a.authService.addMember(i);if(!o)return!1;const l=(0,s.H9)(a.firestore,"teams",i.orgName),_=(yield(0,s.x7)(l)).data();console.log(_);const v=_;let y=v.members;return y.push(o.uid),console.log(y),yield(0,s.mZ)(l,{name:v.name,members:y}),o.uid}catch{return!1}})()}}return(e=g).\u0275fac=function(i){return new(i||e)(r.KVO(s._7),r.KVO(f.u))},e.\u0275prov=r.jDH({token:e,factory:e.\u0275fac,providedIn:"root"}),g})()}}]); \ No newline at end of file diff --git a/www/8839.079ecd4df31064df.js b/www/8839.079ecd4df31064df.js new file mode 100644 index 0000000..c4cdf7d --- /dev/null +++ b/www/8839.079ecd4df31064df.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[8839],{3241:(N,T,a)=>{a.d(T,{p:()=>I});var u=a(4438),d=a(177),o=a(7863);let I=(()=>{var f;class p{constructor(y){this.location=y,this.title="Header Title"}ngOnInit(){}goBack(){this.location.back()}}return(f=p).\u0275fac=function(y){return new(y||f)(u.rXU(d.aZ))},f.\u0275cmp=u.VBU({type:f,selectors:[["app-header-return"]],inputs:{title:"title"},decls:6,vars:2,consts:[[3,"translucent"],["slot","start","menu","menu-id"],["name","arrow-back","slot","start",1,"p-4","bigger-icon",3,"click"]],template:function(y,r){1&y&&(u.j41(0,"ion-header",0)(1,"ion-toolbar"),u.nrm(2,"ion-menu-button",1),u.j41(3,"ion-icon",2),u.bIt("click",function(){return r.goBack()}),u.k0s(),u.j41(4,"ion-title"),u.EFF(5),u.k0s()()()),2&y&&(u.Y8G("translucent",!0),u.R7$(5),u.JRh(r.title))},dependencies:[o.eU,o.iq,o.MC,o.BC,o.ai],styles:[".bigger-icon[_ngcontent-%COMP%]{font-size:1.5em}"]}),p})()},8839:(N,T,a)=>{a.r(T),a.d(T,{NewIncidentPageModule:()=>S});var u=a(177),d=a(4341),o=a(7863),I=a(7650),f=a(467),p=a(2330),e=a(4438),y=a(5092),r=a(4624),c=a(7473),s=a(8453),m=a(3241);function _(i,h){if(1&i&&(e.j41(0,"ion-select-option",27),e.EFF(1),e.k0s()),2&i){const l=e.XpG().$implicit;e.FS9("value",l.name),e.R7$(),e.JRh(l.name)}}function v(i,h){if(1&i&&e.DNE(0,_,2,2,"ion-select-option",27),2&i){const l=h.$implicit,n=e.XpG();e.vxM(0,l.name!==n.operationsLead&&l.name!==n.communicationsLead?0:-1)}}function b(i,h){if(1&i&&(e.j41(0,"ion-select-option",27),e.EFF(1),e.k0s()),2&i){const l=e.XpG().$implicit;e.FS9("value",l.name),e.R7$(),e.JRh(l.name)}}function C(i,h){if(1&i&&e.DNE(0,b,2,2,"ion-select-option",27),2&i){const l=h.$implicit,n=e.XpG();e.vxM(0,l.name!==n.operationsLead&&l.name!==n.incidentCommander?0:-1)}}function O(i,h){if(1&i&&(e.j41(0,"ion-select-option",27),e.EFF(1),e.k0s()),2&i){const l=e.XpG().$implicit;e.FS9("value",l.name),e.R7$(),e.JRh(l.name)}}function D(i,h){if(1&i&&e.DNE(0,O,2,2,"ion-select-option",27),2&i){const l=h.$implicit,n=e.XpG();e.vxM(0,l.name!==n.incidentCommander&&l.name!==n.communicationsLead?0:-1)}}function A(i,h){if(1&i&&(e.j41(0,"div",32),e.EFF(1),e.k0s()),2&i){const l=h.$implicit;e.R7$(),e.SpI(" ",l," ")}}function w(i,h){if(1&i){const l=e.RV6();e.j41(0,"div",28)(1,"h3",29),e.EFF(2),e.k0s(),e.j41(3,"div",30),e.bIt("cdkDropListDropped",function(t){e.eBV(l);const M=e.XpG();return e.Njj(M.dropOperationMember(t))}),e.DNE(4,A,2,1,"div",31),e.k0s()()}if(2&i){const l=h.$implicit;e.R7$(2),e.JRh(l.name),e.R7$(),e.Y8G("cdkDropListData",l.items),e.R7$(),e.Y8G("ngForOf",l.items)}}const F=[{path:"",component:(()=>{var i;class h{constructor(n,t,M,g,P,E){this.activatedRoute=n,this.loadingCtrl=t,this.teamService=M,this.alertCtrl=g,this.incidentService=P,this.notificationService=E,this.productStep="",this.productObjective="",this.orgName="",this.teamMembers=[],this.incidentCommander="",this.operationsLead="",this.communicationsLead="",this.disableAssignee=!1,this.operationTeam=[{name:"Available Members",items:["No Members Available"]},{name:"Assigned Members",items:["No Members Assigned"]}],this.incidentTitle="",this.incidentDescription="",this.incidentUrgency="",this.orgImpact=""}ngOnInit(){}ionViewWillEnter(){var n=this;return(0,f.A)(function*(){yield n.showLoading(),n.getParams(),yield n.getAllTeamMembers(),n.availableMembers(),yield n.hideLoading()})()}getParams(){this.activatedRoute.params.subscribe(t=>{this.productObjective=t.productObjective,this.productStep=t.step});const n=JSON.parse(localStorage.getItem("user"));this.orgName=n.orgName,console.log(this.orgName),console.log(this.productObjective),console.log(this.productStep)}getAllTeamMembers(){var n=this;return(0,f.A)(function*(){n.teamMembers=yield n.teamService.getTeamByOrganization(n.orgName),console.log("Members",n.teamMembers)})()}onIncidentCommanderChange(n){this.incidentCommander=n.detail.value,console.log("Incident Commander",this.incidentCommander),this.availableMembers()}onCommunicationsLeadChange(n){this.communicationsLead=n.detail.value,console.log("Communications Lead",this.communicationsLead),this.availableMembers()}onOperationsLeadChange(n){this.operationsLead=n.detail.value,console.log("Operations Lead",this.operationsLead),this.availableMembers()}availableMembers(){this.operationTeam[0].items=[];for(let n=0;n{var i;class h{}return(i=h).\u0275fac=function(n){return new(n||i)},i.\u0275mod=e.$C({type:i}),i.\u0275inj=e.G2t({imports:[I.iI.forChild(F),I.iI]}),h})();var k=a(5553);let S=(()=>{var i;class h{}return(i=h).\u0275fac=function(n){return new(n||i)},i.\u0275mod=e.$C({type:i}),i.\u0275inj=e.G2t({imports:[u.MD,d.YN,o.bv,j,k.h]}),h})()},4796:(N,T,a)=>{a.d(T,{u:()=>f});var u=a(467),d=a(8737),o=a(4262),I=a(4438);let f=(()=>{var p;class e{constructor(r,c){this.auth=r,this.firestore=c}registerUser(r){var c=this;return(0,u.A)(function*(){try{const s=yield(0,d.eJ)(c.auth,r.email,r.password);return s.user?(yield(0,o.BN)((0,o.H9)(c.firestore,"users",s.user.uid),{email:r.email,name:r.name,orgName:r.orgName,uid:s.user.uid}),yield(0,o.BN)((0,o.H9)(c.firestore,"teams",`${r.orgName}`),{name:r.orgName,members:[s.user.uid]}),s):null}catch{return null}})()}loginUser(r){var c=this;return(0,u.A)(function*(){try{var s;const m=yield(0,d.x9)(c.auth,r.email,r.password);if(null!==(s=m.user)&&void 0!==s&&s.uid){const _=yield(0,o.x7)((0,o.H9)(c.firestore,"users",m.user.uid));if(_.exists())return localStorage.setItem("user",JSON.stringify(_.data())),m}}catch(m){console.error(m)}return null})()}logoutUser(){var r=this;return(0,u.A)(function*(){yield r.auth.signOut()})()}addMember(r){var c=this;return(0,u.A)(function*(){try{const s=yield(0,d.eJ)(c.auth,r.email,r.password);if(!s.user)return!1;const m={email:r.email,name:r.name,orgName:r.orgName,uid:s.user.uid};return yield(0,o.BN)((0,o.H9)(c.firestore,"users",s.user.uid),m),m}catch{return!1}})()}}return(p=e).\u0275fac=function(r){return new(r||p)(I.KVO(d.Nj),I.KVO(o._7))},p.\u0275prov=I.jDH({token:p,factory:p.\u0275fac,providedIn:"root"}),e})()},7473:(N,T,a)=>{a.d(T,{J:()=>p});var u=a(467),d=a(4262),o=a(4438),I=a(1626),f=a(5092);let p=(()=>{var e;class y{constructor(c,s,m){this.firestore=c,this.http=s,this.teamService=m}saveNotificationID(c,s){var m=this;return(0,u.A)(function*(){const _=(0,d.H9)(m.firestore,"users",c.uid),v=yield(0,d.x7)(_);if(v.exists()){const b=v.data();return b.notificationID=s,yield(0,d.BN)(_,b),!0}return console.log("No such document!"),!1})()}getNotificationUser(c){var s=this;return(0,u.A)(function*(){const m=(0,d.H9)(s.firestore,"users",c.uid),_=yield(0,d.x7)(m);if(_.exists()){const v=_.data();return v.notificationID?v.notificationID:""}return console.log("No such document!"),null})()}notifyIncidentToUser(c,s){var m=this;return(0,u.A)(function*(){try{const _=yield m.teamService.getTeamByOrganization(s),v=c.map(O=>O.member),b=_.filter(O=>v.includes(O.name));console.log("team",b);const C="https://devprobeapi.onrender.com/sendNotification";for(let O of b){let D=yield m.getNotificationUser(O);if(console.log("sid",D),""!==D){const w={sid:D,title:"New Incident",type:"new_incident",message:`Hey ${O.name}, you have been assigned a new incident your incident role is ${c.find(R=>R.member===O.name).role}`,target:"https://devprobe-89481.web.app/incident-manager-chooser"};yield m.http.post(C,w).toPromise(),console.log("Notification sent successfully")}else console.log("no sid")}}catch(_){console.log(_)}})()}}return(e=y).\u0275fac=function(c){return new(c||e)(o.KVO(d._7),o.KVO(I.Qq),o.KVO(f.O))},e.\u0275prov=o.jDH({token:e,factory:e.\u0275fac,providedIn:"root"}),y})()},5092:(N,T,a)=>{a.d(T,{O:()=>f});var u=a(467),d=a(4262),o=a(4438),I=a(4796);let f=(()=>{var p;class e{constructor(r,c){this.firestore=r,this.authService=c}getTeamByOrganization(r){var c=this;return(0,u.A)(function*(){let s=(0,d.H9)(c.firestore,"teams",r);const v=(yield(0,d.x7)(s)).data();let b=[];for(let C=0;CD!==c);return yield(0,d.BN)(m,{name:b.name,members:C}),m=(0,d.H9)(s.firestore,"users",c),yield(0,d.BN)(m,{}),yield s.authService,!0}catch{return!1}})()}addMember(r){var c=this;return(0,u.A)(function*(){try{const s=yield c.authService.addMember(r);if(!s)return!1;const m=(0,d.H9)(c.firestore,"teams",r.orgName),v=(yield(0,d.x7)(m)).data();console.log(v);const b=v;let C=b.members;return C.push(s.uid),console.log(C),yield(0,d.mZ)(m,{name:b.name,members:C}),s.uid}catch{return!1}})()}}return(p=e).\u0275fac=function(r){return new(r||p)(o.KVO(d._7),o.KVO(I.u))},p.\u0275prov=o.jDH({token:p,factory:p.\u0275fac,providedIn:"root"}),e})()}}]); \ No newline at end of file diff --git a/www/8839.9afbf5267b32d12c.js b/www/8839.9afbf5267b32d12c.js deleted file mode 100644 index 28adbef..0000000 --- a/www/8839.9afbf5267b32d12c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[8839],{3241:(N,T,a)=>{a.d(T,{p:()=>C});var u=a(4438),d=a(177),o=a(7863);let C=(()=>{var f;class p{constructor(y){this.location=y,this.title="Header Title"}ngOnInit(){}goBack(){this.location.back()}}return(f=p).\u0275fac=function(y){return new(y||f)(u.rXU(d.aZ))},f.\u0275cmp=u.VBU({type:f,selectors:[["app-header-return"]],inputs:{title:"title"},decls:6,vars:2,consts:[[3,"translucent"],["slot","start","menu","menu-id"],["name","arrow-back","slot","start",1,"p-4","bigger-icon",3,"click"]],template:function(y,r){1&y&&(u.j41(0,"ion-header",0)(1,"ion-toolbar"),u.nrm(2,"ion-menu-button",1),u.j41(3,"ion-icon",2),u.bIt("click",function(){return r.goBack()}),u.k0s(),u.j41(4,"ion-title"),u.EFF(5),u.k0s()()()),2&y&&(u.Y8G("translucent",!0),u.R7$(5),u.JRh(r.title))},dependencies:[o.eU,o.iq,o.MC,o.BC,o.ai],styles:[".bigger-icon[_ngcontent-%COMP%]{font-size:1.5em}"]}),p})()},8839:(N,T,a)=>{a.r(T),a.d(T,{NewIncidentPageModule:()=>k});var u=a(177),d=a(4341),o=a(7863),C=a(7650),f=a(467),p=a(2330),e=a(4438),y=a(5092),r=a(4624),c=a(7473),s=a(8453),m=a(3241);function v(i,h){if(1&i&&(e.j41(0,"ion-select-option",27),e.EFF(1),e.k0s()),2&i){const l=e.XpG().$implicit;e.FS9("value",l.name),e.R7$(),e.JRh(l.name)}}function _(i,h){if(1&i&&e.DNE(0,v,2,2,"ion-select-option",27),2&i){const l=h.$implicit,n=e.XpG();e.vxM(0,l.name!==n.operationsLead&&l.name!==n.communicationsLead?0:-1)}}function I(i,h){if(1&i&&(e.j41(0,"ion-select-option",27),e.EFF(1),e.k0s()),2&i){const l=e.XpG().$implicit;e.FS9("value",l.name),e.R7$(),e.JRh(l.name)}}function b(i,h){if(1&i&&e.DNE(0,I,2,2,"ion-select-option",27),2&i){const l=h.$implicit,n=e.XpG();e.vxM(0,l.name!==n.operationsLead&&l.name!==n.incidentCommander?0:-1)}}function D(i,h){if(1&i&&(e.j41(0,"ion-select-option",27),e.EFF(1),e.k0s()),2&i){const l=e.XpG().$implicit;e.FS9("value",l.name),e.R7$(),e.JRh(l.name)}}function E(i,h){if(1&i&&e.DNE(0,D,2,2,"ion-select-option",27),2&i){const l=h.$implicit,n=e.XpG();e.vxM(0,l.name!==n.incidentCommander&&l.name!==n.communicationsLead?0:-1)}}function w(i,h){if(1&i&&(e.j41(0,"div",32),e.EFF(1),e.k0s()),2&i){const l=h.$implicit;e.R7$(),e.SpI(" ",l," ")}}function A(i,h){if(1&i){const l=e.RV6();e.j41(0,"div",28)(1,"h3",29),e.EFF(2),e.k0s(),e.j41(3,"div",30),e.bIt("cdkDropListDropped",function(t){e.eBV(l);const M=e.XpG();return e.Njj(M.dropOperationMember(t))}),e.DNE(4,w,2,1,"div",31),e.k0s()()}if(2&i){const l=h.$implicit;e.R7$(2),e.JRh(l.name),e.R7$(),e.Y8G("cdkDropListData",l.items),e.R7$(),e.Y8G("ngForOf",l.items)}}const R=[{path:"",component:(()=>{var i;class h{constructor(n,t,M,g,P,O){this.activatedRoute=n,this.loadingCtrl=t,this.teamService=M,this.alertCtrl=g,this.incidentService=P,this.notificationService=O,this.productStep="",this.productObjective="",this.orgName="",this.teamMembers=[],this.incidentCommander="",this.operationsLead="",this.communicationsLead="",this.disableAssignee=!1,this.operationTeam=[{name:"Available Members",items:["No Members Available"]},{name:"Assigned Members",items:["No Members Assigned"]}],this.incidentTitle="",this.incidentDescription="",this.incidentUrgency="",this.orgImpact=""}ngOnInit(){}ionViewWillEnter(){var n=this;return(0,f.A)(function*(){yield n.showLoading(),n.getParams(),yield n.getAllTeamMembers(),n.availableMembers(),yield n.hideLoading()})()}getParams(){this.activatedRoute.params.subscribe(t=>{this.productObjective=t.productObjective,this.productStep=t.step});const n=JSON.parse(localStorage.getItem("user"));this.orgName=n.orgName,console.log(this.orgName),console.log(this.productObjective),console.log(this.productStep)}getAllTeamMembers(){var n=this;return(0,f.A)(function*(){n.teamMembers=yield n.teamService.getTeamByOrganization(n.orgName),console.log("Members",n.teamMembers)})()}onIncidentCommanderChange(n){this.incidentCommander=n.detail.value,console.log("Incident Commander",this.incidentCommander),this.availableMembers()}onCommunicationsLeadChange(n){this.communicationsLead=n.detail.value,console.log("Communications Lead",this.communicationsLead),this.availableMembers()}onOperationsLeadChange(n){this.operationsLead=n.detail.value,console.log("Operations Lead",this.operationsLead),this.availableMembers()}availableMembers(){this.operationTeam[0].items=[];for(let n=0;n{var i;class h{}return(i=h).\u0275fac=function(n){return new(n||i)},i.\u0275mod=e.$C({type:i}),i.\u0275inj=e.G2t({imports:[C.iI.forChild(R),C.iI]}),h})();var j=a(5553);let k=(()=>{var i;class h{}return(i=h).\u0275fac=function(n){return new(n||i)},i.\u0275mod=e.$C({type:i}),i.\u0275inj=e.G2t({imports:[u.MD,d.YN,o.bv,F,j.h]}),h})()},4796:(N,T,a)=>{a.d(T,{u:()=>f});var u=a(467),d=a(8737),o=a(4262),C=a(4438);let f=(()=>{var p;class e{constructor(r,c){this.auth=r,this.firestore=c}registerUser(r){var c=this;return(0,u.A)(function*(){try{const s=yield(0,d.eJ)(c.auth,r.email,r.password);return s.user?(yield(0,o.BN)((0,o.H9)(c.firestore,"users",s.user.uid),{email:r.email,name:r.name,orgName:r.orgName,uid:s.user.uid}),yield(0,o.BN)((0,o.H9)(c.firestore,"teams",`${r.orgName}`),{name:r.orgName,members:[s.user.uid]}),s):null}catch{return null}})()}loginUser(r){var c=this;return(0,u.A)(function*(){try{var s;const m=yield(0,d.x9)(c.auth,r.email,r.password);if(null!==(s=m.user)&&void 0!==s&&s.uid){const v=yield(0,o.x7)((0,o.H9)(c.firestore,"users",m.user.uid));if(v.exists())return localStorage.setItem("user",JSON.stringify(v.data())),m}}catch(m){console.error(m)}return null})()}logoutUser(){var r=this;return(0,u.A)(function*(){yield r.auth.signOut()})()}addMember(r){var c=this;return(0,u.A)(function*(){try{const s=yield(0,d.eJ)(c.auth,r.email,r.password);if(!s.user)return!1;const m={email:r.email,name:r.name,orgName:r.orgName,uid:s.user.uid};return yield(0,o.BN)((0,o.H9)(c.firestore,"users",s.user.uid),m),m}catch{return!1}})()}}return(p=e).\u0275fac=function(r){return new(r||p)(C.KVO(d.Nj),C.KVO(o._7))},p.\u0275prov=C.jDH({token:p,factory:p.\u0275fac,providedIn:"root"}),e})()},7473:(N,T,a)=>{a.d(T,{J:()=>p});var u=a(467),d=a(4262),o=a(4438),C=a(1626),f=a(5092);let p=(()=>{var e;class y{constructor(c,s,m){this.firestore=c,this.http=s,this.teamService=m}saveNotificationID(c,s){var m=this;return(0,u.A)(function*(){const v=(0,d.H9)(m.firestore,"users",c.uid),_=yield(0,d.x7)(v);if(_.exists()){const I=_.data();return I.notificationID=s,yield(0,d.BN)(v,I),!0}return console.log("No such document!"),!1})()}getNotificationUser(c){var s=this;return(0,u.A)(function*(){const m=(0,d.H9)(s.firestore,"users",c.uid),v=yield(0,d.x7)(m);if(v.exists()){const _=v.data();return _.notificationID?_.notificationID:""}return console.log("No such document!"),null})()}notifyIncidentToUser(c,s){var m=this;return(0,u.A)(function*(){try{const _=(yield m.teamService.getTeamByOrganization(s)).filter(b=>c.includes(b.name));console.log("team",_);const I="https://devprobeapi.onrender.com/sendNotification";for(let b of _){let D=yield m.getNotificationUser(b);if(console.log("sid",D),""!==D){const w={sid:D,title:"New Incident",type:"new_incident",message:`Hey ${b.name}, you have been assigned a new incident`,target:"https://devprobe-89481.web.app/incident-manager-chooser"};yield m.http.post(I,w).toPromise(),console.log("Notification sent successfully")}else console.log("no sid")}}catch(v){console.log(v)}})()}}return(e=y).\u0275fac=function(c){return new(c||e)(o.KVO(d._7),o.KVO(C.Qq),o.KVO(f.O))},e.\u0275prov=o.jDH({token:e,factory:e.\u0275fac,providedIn:"root"}),y})()},5092:(N,T,a)=>{a.d(T,{O:()=>f});var u=a(467),d=a(4262),o=a(4438),C=a(4796);let f=(()=>{var p;class e{constructor(r,c){this.firestore=r,this.authService=c}getTeamByOrganization(r){var c=this;return(0,u.A)(function*(){let s=(0,d.H9)(c.firestore,"teams",r);const _=(yield(0,d.x7)(s)).data();let I=[];for(let b=0;b<_.members.length;b++){s=(0,d.H9)(c.firestore,"users",_.members[b]);const E=(yield(0,d.x7)(s)).data();I.push(E)}return I})()}removeMember(r,c){var s=this;return(0,u.A)(function*(){try{let m=(0,d.H9)(s.firestore,"teams",r);const I=(yield(0,d.x7)(m)).data();let b=I.members.filter(E=>E!==c);return yield(0,d.BN)(m,{name:I.name,members:b}),m=(0,d.H9)(s.firestore,"users",c),yield(0,d.BN)(m,{}),yield s.authService,!0}catch{return!1}})()}addMember(r){var c=this;return(0,u.A)(function*(){try{const s=yield c.authService.addMember(r);if(!s)return!1;const m=(0,d.H9)(c.firestore,"teams",r.orgName),_=(yield(0,d.x7)(m)).data();console.log(_);const I=_;let b=I.members;return b.push(s.uid),console.log(b),yield(0,d.mZ)(m,{name:I.name,members:b}),s.uid}catch{return!1}})()}}return(p=e).\u0275fac=function(r){return new(r||p)(o.KVO(d._7),o.KVO(C.u))},p.\u0275prov=o.jDH({token:p,factory:p.\u0275fac,providedIn:"root"}),e})()}}]); \ No newline at end of file diff --git a/www/9878.47d8f10205cc65c9.js b/www/9878.47d8f10205cc65c9.js deleted file mode 100644 index 85df918..0000000 --- a/www/9878.47d8f10205cc65c9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[9878],{5553:(K,T,s)=>{s.d(T,{h:()=>f});var o=s(177),i=s(7863),c=s(4438);let f=(()=>{var m;class d{}return(m=d).\u0275fac=function(g){return new(g||m)},m.\u0275mod=c.$C({type:m}),m.\u0275inj=c.G2t({imports:[o.MD,i.bv]}),d})()},3241:(K,T,s)=>{s.d(T,{p:()=>f});var o=s(4438),i=s(177),c=s(7863);let f=(()=>{var m;class d{constructor(g){this.location=g,this.title="Header Title"}ngOnInit(){}goBack(){this.location.back()}}return(m=d).\u0275fac=function(g){return new(g||m)(o.rXU(i.aZ))},m.\u0275cmp=o.VBU({type:m,selectors:[["app-header-return"]],inputs:{title:"title"},decls:6,vars:2,consts:[[3,"translucent"],["slot","start","menu","menu-id"],["name","arrow-back","slot","start",1,"p-4","bigger-icon",3,"click"]],template:function(g,n){1&g&&(o.j41(0,"ion-header",0)(1,"ion-toolbar"),o.nrm(2,"ion-menu-button",1),o.j41(3,"ion-icon",2),o.bIt("click",function(){return n.goBack()}),o.k0s(),o.j41(4,"ion-title"),o.EFF(5),o.k0s()()()),2&g&&(o.Y8G("translucent",!0),o.R7$(5),o.JRh(n.title))},dependencies:[c.eU,c.iq,c.MC,c.BC,c.ai],styles:[".bigger-icon[_ngcontent-%COMP%]{font-size:1.5em}"]}),d})()},8453:(K,T,s)=>{s.d(T,{W:()=>c});var o=s(4438),i=s(7863);let c=(()=>{var f;class m{constructor(){this.title="Title"}ngOnInit(){}}return(f=m).\u0275fac=function(h){return new(h||f)},f.\u0275cmp=o.VBU({type:f,selectors:[["app-title"]],inputs:{title:"title"},decls:4,vars:1,consts:[[1,"lg:m-10"],["size","12","size-md","6","size-lg","6"],[1,"text-4xl","lg:text-6xl","font-bold"]],template:function(h,g){1&h&&(o.j41(0,"ion-row",0)(1,"ion-col",1)(2,"h1",2),o.EFF(3),o.k0s()()()),2&h&&(o.R7$(3),o.JRh(g.title))},dependencies:[i.hU,i.ln]}),m})()},4796:(K,T,s)=>{s.d(T,{u:()=>m});var o=s(467),i=s(8737),c=s(4262),f=s(4438);let m=(()=>{var d;class h{constructor(n,a){this.auth=n,this.firestore=a}registerUser(n){var a=this;return(0,o.A)(function*(){try{const r=yield(0,i.eJ)(a.auth,n.email,n.password);return r.user?(yield(0,c.BN)((0,c.H9)(a.firestore,"users",r.user.uid),{email:n.email,name:n.name,orgName:n.orgName,uid:r.user.uid}),yield(0,c.BN)((0,c.H9)(a.firestore,"teams",`${n.orgName}`),{name:n.orgName,members:[r.user.uid]}),r):null}catch{return null}})()}loginUser(n){var a=this;return(0,o.A)(function*(){try{var r;const u=yield(0,i.x9)(a.auth,n.email,n.password);if(null!==(r=u.user)&&void 0!==r&&r.uid){const D=yield(0,c.x7)((0,c.H9)(a.firestore,"users",u.user.uid));if(D.exists())return localStorage.setItem("user",JSON.stringify(D.data())),u}}catch(u){console.error(u)}return null})()}logoutUser(){var n=this;return(0,o.A)(function*(){yield n.auth.signOut()})()}addMember(n){var a=this;return(0,o.A)(function*(){try{const r=yield(0,i.eJ)(a.auth,n.email,n.password);if(!r.user)return!1;const u={email:n.email,name:n.name,orgName:n.orgName,uid:r.user.uid};return yield(0,c.BN)((0,c.H9)(a.firestore,"users",r.user.uid),u),u}catch{return!1}})()}}return(d=h).\u0275fac=function(n){return new(n||d)(f.KVO(i.Nj),f.KVO(c._7))},d.\u0275prov=f.jDH({token:d,factory:d.\u0275fac,providedIn:"root"}),h})()},4970:(K,T,s)=>{s.d(T,{s:()=>V});var o=s(467),i=s(4262);class c{static toArtilleryData(t){return function n(e,t){return g(e,t,d)}(JSON.parse(t),_("ArtilleryData"))}static artilleryDataToJson(t){return JSON.stringify(function a(e,t){return g(e,t,h)}(t,_("ArtilleryData")),null,2)}}function f(e,t,A,p=""){const v=m(e);throw Error(`Invalid value${A?` for key "${A}"`:""}${p?` on ${p}`:""}. Expected ${v} but got ${JSON.stringify(t)}`)}function m(e){return Array.isArray(e)?2===e.length&&void 0===e[0]?`an optional ${m(e[1])}`:`one of [${e.map(t=>m(t)).join(", ")}]`:"object"==typeof e&&void 0!==e.literal?e.literal:typeof e}function d(e){if(void 0===e.jsonToJS){const t={};e.props.forEach(A=>t[A.json]={key:A.js,typ:A.typ}),e.jsonToJS=t}return e.jsonToJS}function h(e){if(void 0===e.jsToJSON){const t={};e.props.forEach(A=>t[A.js]={key:A.json,typ:A.typ}),e.jsToJSON=t}return e.jsToJSON}function g(e,t,A,p="",v=""){if("any"===t)return e;if(null===t)return null===e?e:f(t,e,p,v);if(!1===t)return f(t,e,p,v);let I;for(;"object"==typeof t&&void 0!==t.ref;)I=t.ref,t=U[t.ref];return Array.isArray(t)?function B(l,j){return-1!==l.indexOf(j)?j:f(l.map(E=>r(E)),j,p,v)}(t,e):"object"==typeof t?t.hasOwnProperty("unionMembers")?function S(l,j){const E=l.length;for(let R=0;Rg(E,l,A)):f(r("array"),j,p,v)}(t.arrayItems,e):t.hasOwnProperty("props")?function M(l,j,E){if(null===E||"object"!=typeof E||Array.isArray(E))return f(r(I||"object"),E,p,v);const R={};return Object.getOwnPropertyNames(l).forEach(P=>{const L=l[P],W=Object.prototype.hasOwnProperty.call(E,P)?E[P]:void 0;R[L.key]=void 0!==W?g(W,L.typ,A,P,I):void 0}),Object.getOwnPropertyNames(E).forEach(P=>{Object.prototype.hasOwnProperty.call(l,P)||(R[P]=g(E[P],j,A,P,I))}),R}(A(t),t.additional,e):f(t,e,p,v):t===Date&&"number"!=typeof e?function C(l){if(null===l)return null;const j=new Date(l);return isNaN(j.valueOf())?f(r("Date"),l,p,v):j}(e):function b(l,j){return typeof l==typeof j?j:f(l,j,p,v)}(t,e)}function r(e){return{literal:e}}function y(e,t){return{props:e,additional:t}}function O(e){return{props:[],additional:e}}function _(e){return{ref:e}}const U={ArtilleryData:y([{json:"aggregate",js:"aggregate",typ:_("Aggregate")},{json:"intermediate",js:"intermediate",typ:function u(e){return{arrayItems:e}}(_("Intermediate"))},{json:"date",js:"date",typ:""}],!1),Aggregate:y([{json:"counters",js:"counters",typ:O(0)},{json:"rates",js:"rates",typ:_("Rates")},{json:"firstCounterAt",js:"firstCounterAt",typ:0},{json:"firstHistogramAt",js:"firstHistogramAt",typ:0},{json:"lastCounterAt",js:"lastCounterAt",typ:0},{json:"lastHistogramAt",js:"lastHistogramAt",typ:0},{json:"firstMetricAt",js:"firstMetricAt",typ:0},{json:"lastMetricAt",js:"lastMetricAt",typ:0},{json:"period",js:"period",typ:0},{json:"summaries",js:"summaries",typ:_("Histograms")},{json:"histograms",js:"histograms",typ:_("Histograms")}],!1),Histograms:y([{json:"http.response_time",js:"http.response_time",typ:O(3.14)},{json:"plugins.metrics-by-endpoint.response_time./",js:"plugins.metrics-by-endpoint.response_time./",typ:O(3.14)},{json:"vusers.session_length",js:"vusers.session_length",typ:function D(...e){return{unionMembers:e}}(void 0,O(3.14))}],!1),Rates:y([{json:"http.request_rate",js:"http.request_rate",typ:0}],!1),Intermediate:y([{json:"counters",js:"counters",typ:O(0)},{json:"rates",js:"rates",typ:_("Rates")},{json:"http.request_rate",js:"http.request_rate",typ:null},{json:"firstCounterAt",js:"firstCounterAt",typ:0},{json:"firstHistogramAt",js:"firstHistogramAt",typ:0},{json:"lastCounterAt",js:"lastCounterAt",typ:0},{json:"lastHistogramAt",js:"lastHistogramAt",typ:0},{json:"firstMetricAt",js:"firstMetricAt",typ:0},{json:"lastMetricAt",js:"lastMetricAt",typ:0},{json:"period",js:"period",typ:""},{json:"summaries",js:"summaries",typ:_("Histograms")},{json:"histograms",js:"histograms",typ:_("Histograms")}],!1)};var N=s(4438),x=s(1626),J=s(7473);let V=(()=>{var e;class t{constructor(p,v,b){this.firestore=p,this.http=v,this.notificationService=b,this.url="https://devprobeapi.onrender.com/create_load_test"}getLoadTestHistory(p,v,b){var S=this;return(0,o.A)(function*(){const B=(0,i.H9)(S.firestore,"teams",p,"products",v,"load_test",b),H=yield(0,i.x7)(B);if(H.exists()){let C=H.data();console.log(C);let M=Object.keys(C);console.log(M);for(let I of M)C[I]=c.toArtilleryData(C[I]);return C}return{}})()}sendLoadTest(p,v,b,S,B){var H=this;return(0,o.A)(function*(){try{const C=yield H.notificationService.getNotificationUser(B),M={team:p,product:v,service:b,target:`https://${S}`,sid:C};return yield H.http.post(H.url,M).toPromise()}catch{return{}}})()}getLoadTestHistoryByDate(p,v,b,S){var B=this;return(0,o.A)(function*(){const H=(0,i.H9)(B.firestore,"teams",p,"products",v,"load_test",b),C=yield(0,i.x7)(H);if(C.exists()){let M=C.data();console.log(M);let I=Object.keys(M);console.log(I);for(let l of I)M[l]=c.toArtilleryData(M[l]),M[l].date.split("-")[0]+"-"+M[l].date.split("-")[1]+"-"+M[l].date.split("-")[2]!==S&&delete M[l];return console.log("Filtered by Date: ",M),M}return{}})()}}return(e=t).\u0275fac=function(p){return new(p||e)(N.KVO(i._7),N.KVO(x.Qq),N.KVO(J.J))},e.\u0275prov=N.jDH({token:e,factory:e.\u0275fac,providedIn:"root"}),t})()},7473:(K,T,s)=>{s.d(T,{J:()=>d});var o=s(467),i=s(4262),c=s(4438),f=s(1626),m=s(5092);let d=(()=>{var h;class g{constructor(a,r,u){this.firestore=a,this.http=r,this.teamService=u}saveNotificationID(a,r){var u=this;return(0,o.A)(function*(){const D=(0,i.H9)(u.firestore,"users",a.uid),y=yield(0,i.x7)(D);if(y.exists()){const O=y.data();return O.notificationID=r,yield(0,i.BN)(D,O),!0}return console.log("No such document!"),!1})()}getNotificationUser(a){var r=this;return(0,o.A)(function*(){const u=(0,i.H9)(r.firestore,"users",a.uid),D=yield(0,i.x7)(u);if(D.exists()){const y=D.data();return y.notificationID?y.notificationID:""}return console.log("No such document!"),null})()}notifyIncidentToUser(a,r){var u=this;return(0,o.A)(function*(){try{const y=(yield u.teamService.getTeamByOrganization(r)).filter(_=>a.includes(_.name));console.log("team",y);const O="https://devprobeapi.onrender.com/sendNotification";for(let _ of y){let U=yield u.getNotificationUser(_);if(console.log("sid",U),""!==U){const x={sid:U,title:"New Incident",type:"new_incident",message:`Hey ${_.name}, you have been assigned a new incident`,target:"https://devprobe-89481.web.app/incident-manager-chooser"};yield u.http.post(O,x).toPromise(),console.log("Notification sent successfully")}else console.log("no sid")}}catch(D){console.log(D)}})()}}return(h=g).\u0275fac=function(a){return new(a||h)(c.KVO(i._7),c.KVO(f.Qq),c.KVO(m.O))},h.\u0275prov=c.jDH({token:h,factory:h.\u0275fac,providedIn:"root"}),g})()},5092:(K,T,s)=>{s.d(T,{O:()=>m});var o=s(467),i=s(4262),c=s(4438),f=s(4796);let m=(()=>{var d;class h{constructor(n,a){this.firestore=n,this.authService=a}getTeamByOrganization(n){var a=this;return(0,o.A)(function*(){let r=(0,i.H9)(a.firestore,"teams",n);const y=(yield(0,i.x7)(r)).data();let O=[];for(let _=0;_N!==a);return yield(0,i.BN)(u,{name:O.name,members:_}),u=(0,i.H9)(r.firestore,"users",a),yield(0,i.BN)(u,{}),yield r.authService,!0}catch{return!1}})()}addMember(n){var a=this;return(0,o.A)(function*(){try{const r=yield a.authService.addMember(n);if(!r)return!1;const u=(0,i.H9)(a.firestore,"teams",n.orgName),y=(yield(0,i.x7)(u)).data();console.log(y);const O=y;let _=O.members;return _.push(r.uid),console.log(_),yield(0,i.mZ)(u,{name:O.name,members:_}),r.uid}catch{return!1}})()}}return(d=h).\u0275fac=function(n){return new(n||d)(c.KVO(i._7),c.KVO(f.u))},d.\u0275prov=c.jDH({token:d,factory:d.\u0275fac,providedIn:"root"}),h})()}}]); \ No newline at end of file diff --git a/www/9878.5350a59e31ab4985.js b/www/9878.5350a59e31ab4985.js new file mode 100644 index 0000000..c43e01a --- /dev/null +++ b/www/9878.5350a59e31ab4985.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[9878],{5553:(K,T,s)=>{s.d(T,{h:()=>f});var o=s(177),i=s(7863),c=s(4438);let f=(()=>{var m;class d{}return(m=d).\u0275fac=function(h){return new(h||m)},m.\u0275mod=c.$C({type:m}),m.\u0275inj=c.G2t({imports:[o.MD,i.bv]}),d})()},3241:(K,T,s)=>{s.d(T,{p:()=>f});var o=s(4438),i=s(177),c=s(7863);let f=(()=>{var m;class d{constructor(h){this.location=h,this.title="Header Title"}ngOnInit(){}goBack(){this.location.back()}}return(m=d).\u0275fac=function(h){return new(h||m)(o.rXU(i.aZ))},m.\u0275cmp=o.VBU({type:m,selectors:[["app-header-return"]],inputs:{title:"title"},decls:6,vars:2,consts:[[3,"translucent"],["slot","start","menu","menu-id"],["name","arrow-back","slot","start",1,"p-4","bigger-icon",3,"click"]],template:function(h,n){1&h&&(o.j41(0,"ion-header",0)(1,"ion-toolbar"),o.nrm(2,"ion-menu-button",1),o.j41(3,"ion-icon",2),o.bIt("click",function(){return n.goBack()}),o.k0s(),o.j41(4,"ion-title"),o.EFF(5),o.k0s()()()),2&h&&(o.Y8G("translucent",!0),o.R7$(5),o.JRh(n.title))},dependencies:[c.eU,c.iq,c.MC,c.BC,c.ai],styles:[".bigger-icon[_ngcontent-%COMP%]{font-size:1.5em}"]}),d})()},8453:(K,T,s)=>{s.d(T,{W:()=>c});var o=s(4438),i=s(7863);let c=(()=>{var f;class m{constructor(){this.title="Title"}ngOnInit(){}}return(f=m).\u0275fac=function(_){return new(_||f)},f.\u0275cmp=o.VBU({type:f,selectors:[["app-title"]],inputs:{title:"title"},decls:4,vars:1,consts:[[1,"lg:m-10"],["size","12","size-md","6","size-lg","6"],[1,"text-4xl","lg:text-6xl","font-bold"]],template:function(_,h){1&_&&(o.j41(0,"ion-row",0)(1,"ion-col",1)(2,"h1",2),o.EFF(3),o.k0s()()()),2&_&&(o.R7$(3),o.JRh(h.title))},dependencies:[i.hU,i.ln]}),m})()},4796:(K,T,s)=>{s.d(T,{u:()=>m});var o=s(467),i=s(8737),c=s(4262),f=s(4438);let m=(()=>{var d;class _{constructor(n,a){this.auth=n,this.firestore=a}registerUser(n){var a=this;return(0,o.A)(function*(){try{const r=yield(0,i.eJ)(a.auth,n.email,n.password);return r.user?(yield(0,c.BN)((0,c.H9)(a.firestore,"users",r.user.uid),{email:n.email,name:n.name,orgName:n.orgName,uid:r.user.uid}),yield(0,c.BN)((0,c.H9)(a.firestore,"teams",`${n.orgName}`),{name:n.orgName,members:[r.user.uid]}),r):null}catch{return null}})()}loginUser(n){var a=this;return(0,o.A)(function*(){try{var r;const u=yield(0,i.x9)(a.auth,n.email,n.password);if(null!==(r=u.user)&&void 0!==r&&r.uid){const M=yield(0,c.x7)((0,c.H9)(a.firestore,"users",u.user.uid));if(M.exists())return localStorage.setItem("user",JSON.stringify(M.data())),u}}catch(u){console.error(u)}return null})()}logoutUser(){var n=this;return(0,o.A)(function*(){yield n.auth.signOut()})()}addMember(n){var a=this;return(0,o.A)(function*(){try{const r=yield(0,i.eJ)(a.auth,n.email,n.password);if(!r.user)return!1;const u={email:n.email,name:n.name,orgName:n.orgName,uid:r.user.uid};return yield(0,c.BN)((0,c.H9)(a.firestore,"users",r.user.uid),u),u}catch{return!1}})()}}return(d=_).\u0275fac=function(n){return new(n||d)(f.KVO(i.Nj),f.KVO(c._7))},d.\u0275prov=f.jDH({token:d,factory:d.\u0275fac,providedIn:"root"}),_})()},4970:(K,T,s)=>{s.d(T,{s:()=>W});var o=s(467),i=s(4262);class c{static toArtilleryData(t){return function n(e,t){return h(e,t,d)}(JSON.parse(t),p("ArtilleryData"))}static artilleryDataToJson(t){return JSON.stringify(function a(e,t){return h(e,t,_)}(t,p("ArtilleryData")),null,2)}}function f(e,t,A,g=""){const v=m(e);throw Error(`Invalid value${A?` for key "${A}"`:""}${g?` on ${g}`:""}. Expected ${v} but got ${JSON.stringify(t)}`)}function m(e){return Array.isArray(e)?2===e.length&&void 0===e[0]?`an optional ${m(e[1])}`:`one of [${e.map(t=>m(t)).join(", ")}]`:"object"==typeof e&&void 0!==e.literal?e.literal:typeof e}function d(e){if(void 0===e.jsonToJS){const t={};e.props.forEach(A=>t[A.json]={key:A.js,typ:A.typ}),e.jsonToJS=t}return e.jsonToJS}function _(e){if(void 0===e.jsToJSON){const t={};e.props.forEach(A=>t[A.js]={key:A.json,typ:A.typ}),e.jsToJSON=t}return e.jsToJSON}function h(e,t,A,g="",v=""){if("any"===t)return e;if(null===t)return null===e?e:f(t,e,g,v);if(!1===t)return f(t,e,g,v);let S;for(;"object"==typeof t&&void 0!==t.ref;)S=t.ref,t=H[t.ref];return Array.isArray(t)?function B(l,y){return-1!==l.indexOf(y)?y:f(l.map(E=>r(E)),y,g,v)}(t,e):"object"==typeof t?t.hasOwnProperty("unionMembers")?function R(l,y){const E=l.length;for(let U=0;Uh(E,l,A)):f(r("array"),y,g,v)}(t.arrayItems,e):t.hasOwnProperty("props")?function D(l,y,E){if(null===E||"object"!=typeof E||Array.isArray(E))return f(r(S||"object"),E,g,v);const U={};return Object.getOwnPropertyNames(l).forEach(P=>{const L=l[P],V=Object.prototype.hasOwnProperty.call(E,P)?E[P]:void 0;U[L.key]=void 0!==V?h(V,L.typ,A,P,S):void 0}),Object.getOwnPropertyNames(E).forEach(P=>{Object.prototype.hasOwnProperty.call(l,P)||(U[P]=h(E[P],y,A,P,S))}),U}(A(t),t.additional,e):f(t,e,g,v):t===Date&&"number"!=typeof e?function C(l){if(null===l)return null;const y=new Date(l);return isNaN(y.valueOf())?f(r("Date"),l,g,v):y}(e):function I(l,y){return typeof l==typeof y?y:f(l,y,g,v)}(t,e)}function r(e){return{literal:e}}function j(e,t){return{props:e,additional:t}}function O(e){return{props:[],additional:e}}function p(e){return{ref:e}}const H={ArtilleryData:j([{json:"aggregate",js:"aggregate",typ:p("Aggregate")},{json:"intermediate",js:"intermediate",typ:function u(e){return{arrayItems:e}}(p("Intermediate"))},{json:"date",js:"date",typ:""}],!1),Aggregate:j([{json:"counters",js:"counters",typ:O(0)},{json:"rates",js:"rates",typ:p("Rates")},{json:"firstCounterAt",js:"firstCounterAt",typ:0},{json:"firstHistogramAt",js:"firstHistogramAt",typ:0},{json:"lastCounterAt",js:"lastCounterAt",typ:0},{json:"lastHistogramAt",js:"lastHistogramAt",typ:0},{json:"firstMetricAt",js:"firstMetricAt",typ:0},{json:"lastMetricAt",js:"lastMetricAt",typ:0},{json:"period",js:"period",typ:0},{json:"summaries",js:"summaries",typ:p("Histograms")},{json:"histograms",js:"histograms",typ:p("Histograms")}],!1),Histograms:j([{json:"http.response_time",js:"http.response_time",typ:O(3.14)},{json:"plugins.metrics-by-endpoint.response_time./",js:"plugins.metrics-by-endpoint.response_time./",typ:O(3.14)},{json:"vusers.session_length",js:"vusers.session_length",typ:function M(...e){return{unionMembers:e}}(void 0,O(3.14))}],!1),Rates:j([{json:"http.request_rate",js:"http.request_rate",typ:0}],!1),Intermediate:j([{json:"counters",js:"counters",typ:O(0)},{json:"rates",js:"rates",typ:p("Rates")},{json:"http.request_rate",js:"http.request_rate",typ:null},{json:"firstCounterAt",js:"firstCounterAt",typ:0},{json:"firstHistogramAt",js:"firstHistogramAt",typ:0},{json:"lastCounterAt",js:"lastCounterAt",typ:0},{json:"lastHistogramAt",js:"lastHistogramAt",typ:0},{json:"firstMetricAt",js:"firstMetricAt",typ:0},{json:"lastMetricAt",js:"lastMetricAt",typ:0},{json:"period",js:"period",typ:""},{json:"summaries",js:"summaries",typ:p("Histograms")},{json:"histograms",js:"histograms",typ:p("Histograms")}],!1)};var b=s(4438),J=s(1626),x=s(7473);let W=(()=>{var e;class t{constructor(g,v,I){this.firestore=g,this.http=v,this.notificationService=I,this.url="https://devprobeapi.onrender.com/create_load_test"}getLoadTestHistory(g,v,I){var R=this;return(0,o.A)(function*(){const B=(0,i.H9)(R.firestore,"teams",g,"products",v,"load_test",I),N=yield(0,i.x7)(B);if(N.exists()){let C=N.data();console.log(C);let D=Object.keys(C);console.log(D);for(let S of D)C[S]=c.toArtilleryData(C[S]);return C}return{}})()}sendLoadTest(g,v,I,R,B){var N=this;return(0,o.A)(function*(){try{const C=yield N.notificationService.getNotificationUser(B),D={team:g,product:v,service:I,target:`https://${R}`,sid:C};return yield N.http.post(N.url,D).toPromise()}catch{return{}}})()}getLoadTestHistoryByDate(g,v,I,R){var B=this;return(0,o.A)(function*(){const N=(0,i.H9)(B.firestore,"teams",g,"products",v,"load_test",I),C=yield(0,i.x7)(N);if(C.exists()){let D=C.data();console.log(D);let S=Object.keys(D);console.log(S);for(let l of S)D[l]=c.toArtilleryData(D[l]),D[l].date.split("-")[0]+"-"+D[l].date.split("-")[1]+"-"+D[l].date.split("-")[2]!==R&&delete D[l];return console.log("Filtered by Date: ",D),D}return{}})()}}return(e=t).\u0275fac=function(g){return new(g||e)(b.KVO(i._7),b.KVO(J.Qq),b.KVO(x.J))},e.\u0275prov=b.jDH({token:e,factory:e.\u0275fac,providedIn:"root"}),t})()},7473:(K,T,s)=>{s.d(T,{J:()=>d});var o=s(467),i=s(4262),c=s(4438),f=s(1626),m=s(5092);let d=(()=>{var _;class h{constructor(a,r,u){this.firestore=a,this.http=r,this.teamService=u}saveNotificationID(a,r){var u=this;return(0,o.A)(function*(){const M=(0,i.H9)(u.firestore,"users",a.uid),j=yield(0,i.x7)(M);if(j.exists()){const O=j.data();return O.notificationID=r,yield(0,i.BN)(M,O),!0}return console.log("No such document!"),!1})()}getNotificationUser(a){var r=this;return(0,o.A)(function*(){const u=(0,i.H9)(r.firestore,"users",a.uid),M=yield(0,i.x7)(u);if(M.exists()){const j=M.data();return j.notificationID?j.notificationID:""}return console.log("No such document!"),null})()}notifyIncidentToUser(a,r){var u=this;return(0,o.A)(function*(){try{const M=yield u.teamService.getTeamByOrganization(r),j=a.map(H=>H.member),O=M.filter(H=>j.includes(H.name));console.log("team",O);const p="https://devprobeapi.onrender.com/sendNotification";for(let H of O){let b=yield u.getNotificationUser(H);if(console.log("sid",b),""!==b){const x={sid:b,title:"New Incident",type:"new_incident",message:`Hey ${H.name}, you have been assigned a new incident your incident role is ${a.find(W=>W.member===H.name).role}`,target:"https://devprobe-89481.web.app/incident-manager-chooser"};yield u.http.post(p,x).toPromise(),console.log("Notification sent successfully")}else console.log("no sid")}}catch(M){console.log(M)}})()}}return(_=h).\u0275fac=function(a){return new(a||_)(c.KVO(i._7),c.KVO(f.Qq),c.KVO(m.O))},_.\u0275prov=c.jDH({token:_,factory:_.\u0275fac,providedIn:"root"}),h})()},5092:(K,T,s)=>{s.d(T,{O:()=>m});var o=s(467),i=s(4262),c=s(4438),f=s(4796);let m=(()=>{var d;class _{constructor(n,a){this.firestore=n,this.authService=a}getTeamByOrganization(n){var a=this;return(0,o.A)(function*(){let r=(0,i.H9)(a.firestore,"teams",n);const j=(yield(0,i.x7)(r)).data();let O=[];for(let p=0;pb!==a);return yield(0,i.BN)(u,{name:O.name,members:p}),u=(0,i.H9)(r.firestore,"users",a),yield(0,i.BN)(u,{}),yield r.authService,!0}catch{return!1}})()}addMember(n){var a=this;return(0,o.A)(function*(){try{const r=yield a.authService.addMember(n);if(!r)return!1;const u=(0,i.H9)(a.firestore,"teams",n.orgName),j=(yield(0,i.x7)(u)).data();console.log(j);const O=j;let p=O.members;return p.push(r.uid),console.log(p),yield(0,i.mZ)(u,{name:O.name,members:p}),r.uid}catch{return!1}})()}}return(d=_).\u0275fac=function(n){return new(n||d)(c.KVO(i._7),c.KVO(f.u))},d.\u0275prov=c.jDH({token:d,factory:d.\u0275fac,providedIn:"root"}),_})()}}]); \ No newline at end of file diff --git a/www/index.html b/www/index.html index fef4a46..731395c 100644 --- a/www/index.html +++ b/www/index.html @@ -42,6 +42,6 @@ - + diff --git a/www/runtime.57982f5e4a0376c3.js b/www/runtime.141a7a066c45f6f6.js similarity index 95% rename from www/runtime.57982f5e4a0376c3.js rename to www/runtime.141a7a066c45f6f6.js index bf5066c..f7a4dc9 100644 --- a/www/runtime.57982f5e4a0376c3.js +++ b/www/runtime.141a7a066c45f6f6.js @@ -1 +1 @@ -(()=>{"use strict";var e,v={},g={};function f(e){var d=g[e];if(void 0!==d)return d.exports;var a=g[e]={exports:{}};return v[e].call(a.exports,a,a.exports,f),a.exports}f.m=v,e=[],f.O=(d,a,t,b)=>{if(!a){var c=1/0;for(r=0;r=b)&&Object.keys(f.O).every(p=>f.O[p](a[n]))?a.splice(n--,1):(l=!1,b0&&e[r-1][2]>b;r--)e[r]=e[r-1];e[r]=[a,t,b]},f.n=e=>{var d=e&&e.__esModule?()=>e.default:()=>e;return f.d(d,{a:d}),d},(()=>{var d,e=Object.getPrototypeOf?a=>Object.getPrototypeOf(a):a=>a.__proto__;f.t=function(a,t){if(1&t&&(a=this(a)),8&t||"object"==typeof a&&a&&(4&t&&a.__esModule||16&t&&"function"==typeof a.then))return a;var b=Object.create(null);f.r(b);var r={};d=d||[null,e({}),e([]),e(e)];for(var c=2&t&&a;"object"==typeof c&&!~d.indexOf(c);c=e(c))Object.getOwnPropertyNames(c).forEach(l=>r[l]=()=>a[l]);return r.default=()=>a,f.d(b,r),b}})(),f.d=(e,d)=>{for(var a in d)f.o(d,a)&&!f.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:d[a]})},f.f={},f.e=e=>Promise.all(Object.keys(f.f).reduce((d,a)=>(f.f[a](e,d),d),[])),f.u=e=>(({2076:"common",7278:"polyfills-dom",9329:"polyfills-core-js"}[e]||e)+"."+{441:"c8d135e5d56e5723",461:"b1be7794120cc711",964:"466b88054b5c618c",1010:"8e70b895427dd856",1015:"f98cd7158627e10b",1049:"7ef232095c56e4df",1081:"c9d99f35768da88f",1102:"010dfe13f6ca7e15",1133:"c9778691a5138958",1143:"b0763e5514384d40",1293:"ee80f2d33790618d",1313:"46ae0a0d0e94f2f8",1459:"32c41a59c0fd4cf1",1577:"0604cac29dd79422",2075:"1971ba880d06cc30",2076:"24e402ac319951ed",2144:"5d46fa3641b801f2",2348:"12b471577685ffbe",2375:"efb0d99d1467ed67",2415:"dddee43f1c9b92e7",2494:"cbe440bf03b1a014",2560:"f34ba2c5e85b55c8",2757:"85d6029c1243079f",2885:"d64fa10bd441cbc8",3100:"4d5759fc21bf4de6",3162:"825364e1635b086f",3451:"fa589c246ed03c83",3506:"899dcc5e5d913023",3511:"16739e7034875331",3646:"f1263548817e086a",3675:"e0b9ee504aaa0cf9",3728:"2a68666ee49959dd",3814:"aed692045b27c466",4163:"511ba1c803d7c59e",4171:"f5bc55c1acb0f5c1",4183:"0d54a4cc8cbc3a61",4304:"6342f47363b5aa32",4348:"16e6409072fc8e11",4406:"03b087c2d77cb960",4463:"ce74c63a27a7a872",4559:"251cbb62d2a2ca8d",4591:"7a48c0cf9464e62b",4699:"01733b3942afbe92",4839:"f32de5d22c9696fa",4867:"17817bc208c2836c",4914:"72751204db50ae35",5054:"2f57954df11c6846",5100:"659224ed1f94442c",5197:"38b8cc3181b51450",5222:"9cbea5f62b0fb679",5371:"de7adbfc0ff47b02",5399:"c439131f3a61e9b3",5712:"a9a2db8da6f1a8cd",5887:"708ea3877f30ffcd",5949:"2ed93c457aa1e9fb",5995:"818802cbbfe32b83",6024:"3c02ab7fe82fedfe",6303:"4ea7e81fd1aa1e01",6433:"91353c3d7c453322",6480:"5977b854bb56850c",6521:"a8a508f41e539cc5",6536:"dfc5d780e02360c5",6695:"93cacdb118ebec12",6840:"fd32dada9c8ec44e",6975:"6d2e5de0574c6402",6982:"4907cbb0a21f41f1",7030:"f2a9bf080bedfc5b",7056:"d94084a764515e62",7076:"2b7ea8b1f54f4458",7179:"80391eb100990080",7240:"680a87741a5535b1",7278:"bf542500b6fca113",7356:"911eacb1ce959b5e",7372:"e306385d972d6e2c",7428:"cb325b96b92ea4c2",7720:"78509b154c08b472",7762:"e7a5b89bf8544d49",7907:"9de6a33c4979c835",8066:"67e76a5c3f71f306",8193:"476b12959c4b189d",8314:"52348a57ed623e38",8361:"3d466d853997fbb0",8477:"15dacf21c512c8d4",8566:"52fa7b8c5c22d53f",8584:"94ca33677cedf961",8711:"f6a903c3bb3101f6",8805:"7a687270c4acd743",8814:"4175e28b98837400",8839:"9afbf5267b32d12c",8886:"d67de68b3732a1f5",8970:"89f040d889f287fc",8984:"b8081aaadcdeaca4",9013:"2e347313286de95b",9070:"29b18cc91c088f3f",9273:"16673f4c5278d1b8",9329:"c76198334f717402",9344:"2d668603b6130b28",9456:"c3e2b25e7ae1c2c6",9546:"6e1d6e8098da979c",9697:"57e559625e67bb53",9878:"47d8f10205cc65c9",9977:"948bf38bed890db4"}[e]+".js"),f.miniCssF=e=>{},f.o=(e,d)=>Object.prototype.hasOwnProperty.call(e,d),(()=>{var e={},d="app:";f.l=(a,t,b,r)=>{if(e[a])e[a].push(t);else{var c,l;if(void 0!==b)for(var n=document.getElementsByTagName("script"),i=0;i{c.onerror=c.onload=null,clearTimeout(u);var y=e[a];if(delete e[a],c.parentNode&&c.parentNode.removeChild(c),y&&y.forEach(_=>_(p)),m)return m(p)},u=setTimeout(s.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=s.bind(null,c.onerror),c.onload=s.bind(null,c.onload),l&&document.head.appendChild(c)}}})(),f.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;f.tt=()=>(void 0===e&&(e={createScriptURL:d=>d},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),f.tu=e=>f.tt().createScriptURL(e),f.p="",(()=>{var e={9121:0};f.f.j=(t,b)=>{var r=f.o(e,t)?e[t]:void 0;if(0!==r)if(r)b.push(r[2]);else if(9121!=t){var c=new Promise((o,s)=>r=e[t]=[o,s]);b.push(r[2]=c);var l=f.p+f.u(t),n=new Error;f.l(l,o=>{if(f.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var s=o&&("load"===o.type?"missing":o.type),u=o&&o.target&&o.target.src;n.message="Loading chunk "+t+" failed.\n("+s+": "+u+")",n.name="ChunkLoadError",n.type=s,n.request=u,r[1](n)}},"chunk-"+t,t)}else e[t]=0},f.O.j=t=>0===e[t];var d=(t,b)=>{var n,i,[r,c,l]=b,o=0;if(r.some(u=>0!==e[u])){for(n in c)f.o(c,n)&&(f.m[n]=c[n]);if(l)var s=l(f)}for(t&&t(b);o{"use strict";var e,v={},g={};function f(e){var d=g[e];if(void 0!==d)return d.exports;var a=g[e]={exports:{}};return v[e].call(a.exports,a,a.exports,f),a.exports}f.m=v,e=[],f.O=(d,a,t,b)=>{if(!a){var c=1/0;for(r=0;r=b)&&Object.keys(f.O).every(p=>f.O[p](a[n]))?a.splice(n--,1):(l=!1,b0&&e[r-1][2]>b;r--)e[r]=e[r-1];e[r]=[a,t,b]},f.n=e=>{var d=e&&e.__esModule?()=>e.default:()=>e;return f.d(d,{a:d}),d},(()=>{var d,e=Object.getPrototypeOf?a=>Object.getPrototypeOf(a):a=>a.__proto__;f.t=function(a,t){if(1&t&&(a=this(a)),8&t||"object"==typeof a&&a&&(4&t&&a.__esModule||16&t&&"function"==typeof a.then))return a;var b=Object.create(null);f.r(b);var r={};d=d||[null,e({}),e([]),e(e)];for(var c=2&t&&a;"object"==typeof c&&!~d.indexOf(c);c=e(c))Object.getOwnPropertyNames(c).forEach(l=>r[l]=()=>a[l]);return r.default=()=>a,f.d(b,r),b}})(),f.d=(e,d)=>{for(var a in d)f.o(d,a)&&!f.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:d[a]})},f.f={},f.e=e=>Promise.all(Object.keys(f.f).reduce((d,a)=>(f.f[a](e,d),d),[])),f.u=e=>(({2076:"common",7278:"polyfills-dom",9329:"polyfills-core-js"}[e]||e)+"."+{441:"c8d135e5d56e5723",461:"b1be7794120cc711",964:"466b88054b5c618c",1010:"8e70b895427dd856",1015:"f98cd7158627e10b",1049:"7ef232095c56e4df",1081:"c9d99f35768da88f",1102:"010dfe13f6ca7e15",1133:"c9778691a5138958",1143:"b0763e5514384d40",1293:"ee80f2d33790618d",1313:"46ae0a0d0e94f2f8",1459:"32c41a59c0fd4cf1",1577:"0604cac29dd79422",2075:"1971ba880d06cc30",2076:"24e402ac319951ed",2144:"5d46fa3641b801f2",2348:"12b471577685ffbe",2375:"efb0d99d1467ed67",2415:"dddee43f1c9b92e7",2494:"cbe440bf03b1a014",2560:"f34ba2c5e85b55c8",2757:"85d6029c1243079f",2885:"d64fa10bd441cbc8",3100:"4d5759fc21bf4de6",3162:"825364e1635b086f",3451:"fa589c246ed03c83",3506:"899dcc5e5d913023",3511:"16739e7034875331",3646:"f1263548817e086a",3675:"e0b9ee504aaa0cf9",3728:"2a68666ee49959dd",3814:"aed692045b27c466",4163:"511ba1c803d7c59e",4171:"f5bc55c1acb0f5c1",4183:"0d54a4cc8cbc3a61",4304:"6342f47363b5aa32",4348:"16e6409072fc8e11",4406:"03b087c2d77cb960",4463:"ce74c63a27a7a872",4559:"251cbb62d2a2ca8d",4591:"7a48c0cf9464e62b",4699:"01733b3942afbe92",4839:"f32de5d22c9696fa",4867:"17817bc208c2836c",4914:"72751204db50ae35",5054:"2f57954df11c6846",5100:"659224ed1f94442c",5197:"38b8cc3181b51450",5222:"9cbea5f62b0fb679",5371:"8b79a9bec1875d4c",5399:"c439131f3a61e9b3",5712:"a9a2db8da6f1a8cd",5887:"708ea3877f30ffcd",5949:"2ed93c457aa1e9fb",5995:"818802cbbfe32b83",6024:"3c02ab7fe82fedfe",6303:"4ea7e81fd1aa1e01",6433:"91353c3d7c453322",6480:"5977b854bb56850c",6521:"a8a508f41e539cc5",6536:"dfc5d780e02360c5",6695:"93cacdb118ebec12",6840:"fd32dada9c8ec44e",6975:"6d2e5de0574c6402",6982:"4907cbb0a21f41f1",7030:"f2a9bf080bedfc5b",7056:"d94084a764515e62",7076:"2b7ea8b1f54f4458",7179:"80391eb100990080",7240:"680a87741a5535b1",7278:"bf542500b6fca113",7356:"911eacb1ce959b5e",7372:"e306385d972d6e2c",7428:"cb325b96b92ea4c2",7720:"78509b154c08b472",7762:"e7a5b89bf8544d49",7907:"9de6a33c4979c835",8066:"67e76a5c3f71f306",8193:"476b12959c4b189d",8314:"52348a57ed623e38",8361:"3d466d853997fbb0",8477:"15dacf21c512c8d4",8566:"52fa7b8c5c22d53f",8584:"94ca33677cedf961",8711:"f6a903c3bb3101f6",8805:"7a687270c4acd743",8814:"4175e28b98837400",8839:"079ecd4df31064df",8886:"d67de68b3732a1f5",8970:"89f040d889f287fc",8984:"b8081aaadcdeaca4",9013:"2e347313286de95b",9070:"29b18cc91c088f3f",9273:"16673f4c5278d1b8",9329:"c76198334f717402",9344:"2d668603b6130b28",9456:"c3e2b25e7ae1c2c6",9546:"6e1d6e8098da979c",9697:"57e559625e67bb53",9878:"5350a59e31ab4985",9977:"948bf38bed890db4"}[e]+".js"),f.miniCssF=e=>{},f.o=(e,d)=>Object.prototype.hasOwnProperty.call(e,d),(()=>{var e={},d="app:";f.l=(a,t,b,r)=>{if(e[a])e[a].push(t);else{var c,l;if(void 0!==b)for(var n=document.getElementsByTagName("script"),i=0;i{c.onerror=c.onload=null,clearTimeout(u);var y=e[a];if(delete e[a],c.parentNode&&c.parentNode.removeChild(c),y&&y.forEach(_=>_(p)),m)return m(p)},u=setTimeout(s.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=s.bind(null,c.onerror),c.onload=s.bind(null,c.onload),l&&document.head.appendChild(c)}}})(),f.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;f.tt=()=>(void 0===e&&(e={createScriptURL:d=>d},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),f.tu=e=>f.tt().createScriptURL(e),f.p="",(()=>{var e={9121:0};f.f.j=(t,b)=>{var r=f.o(e,t)?e[t]:void 0;if(0!==r)if(r)b.push(r[2]);else if(9121!=t){var c=new Promise((o,s)=>r=e[t]=[o,s]);b.push(r[2]=c);var l=f.p+f.u(t),n=new Error;f.l(l,o=>{if(f.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var s=o&&("load"===o.type?"missing":o.type),u=o&&o.target&&o.target.src;n.message="Loading chunk "+t+" failed.\n("+s+": "+u+")",n.name="ChunkLoadError",n.type=s,n.request=u,r[1](n)}},"chunk-"+t,t)}else e[t]=0},f.O.j=t=>0===e[t];var d=(t,b)=>{var n,i,[r,c,l]=b,o=0;if(r.some(u=>0!==e[u])){for(n in c)f.o(c,n)&&(f.m[n]=c[n]);if(l)var s=l(f)}for(t&&t(b);o