{"version":3,"file":"app-ec40050a.9729664bca28a8e6916d.bundle.js","mappings":";;;;;;;;;;;;;AAAA;AAGA;AAAA;AACA;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACTA;AACA;AACA;AAEA;AAQA;AAAA;AALA;AACA;AAKA;AACA;AACA;AACA;AAEA;AACA;AACA;AAKA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AArCA;;;;;;;;;;;;;;;;;;;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAyBA;AAAA;AAvBA;AACA;AAAA;AAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AAGA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA/GA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;ACfA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACbA;AACA;AAGA;AACA;AACA;AACA;;;;;;;;;;;;;;ACPA;AAGA;AAAA;AAAA;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;ACRA;AAGA;AAAA;AAAA;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;ACRA;AAGA;AAAA;AAAA;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;ACRA;AAGA;AAAA;AAAA;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;ACRA;AAGA;AAAA;AAAA;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACRA;AAEA;AAGA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAdA;;;;;;;;;;;;;;;;;;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAYA;AAAA;AATA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAIA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;ACrGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAWA;AAAA;AARA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAIA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAMA;AAAA;AAHA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;AClHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAQA;AAAA;AALA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AAEA;AAGA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAGA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAjCA;;;;;;;;;;;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAqBA;AAAA;AAnBA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;AC1HA;AACA;AACA;AACA;AACA;AACA;AAEA;AAoBA;AAAA;AAlBA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAKA;AACA;AACA;AAEA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAQA;AAAA;AALA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;ACnKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAUA;AAAA;AAPA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAIA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;AClFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAWA;AAAA;AARA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAIA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAgBA;AAAA;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAIA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACpJA;AACA;AACA;AAEA;AAIA;AAAA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;ACzBA;AACA;AACA;AACA;AAEA;AAOA;AAAA;AALA;AACA;AAKA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AA1CA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACPA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA","sources":["webpack://www.zeusteam.com/./src/members/pg.js","webpack://www.zeusteam.com/./src/members/policies/dialogs/policy-card-dialog.js","webpack://www.zeusteam.com/./src/members/policies/policy-card.js","webpack://www.zeusteam.com/./src/members/policies/tabs/tab-commissions.js","webpack://www.zeusteam.com/./src/members/policies/tabs/tab-files.js","webpack://www.zeusteam.com/./src/members/policies/tabs/tab-messages.js","webpack://www.zeusteam.com/./src/members/policies/tabs/tab-notes.js","webpack://www.zeusteam.com/./src/members/policies/tabs/tab-policy.js","webpack://www.zeusteam.com/./src/members/policies/tabs/tab-property-bag.js","webpack://www.zeusteam.com/./src/members/policies/tabs/tab-to-dos.js","webpack://www.zeusteam.com/./src/members/privacy-policy.js","webpack://www.zeusteam.com/./src/members/rapid-start/dialog/rapid-start-editor.js","webpack://www.zeusteam.com/./src/members/rapid-start/dialog/rapid-start-topic-editor.js","webpack://www.zeusteam.com/./src/members/rapid-start/rapid-start.js","webpack://www.zeusteam.com/./src/members/rapid-start/topic.js","webpack://www.zeusteam.com/./src/members/recruiting/_index.js","webpack://www.zeusteam.com/./src/members/recruiting/onboarding-summary.js","webpack://www.zeusteam.com/./src/members/recruiting/summary.js","webpack://www.zeusteam.com/./src/members/sales-tools/all.js","webpack://www.zeusteam.com/./src/members/sales-tools/dialog/category-editor.js","webpack://www.zeusteam.com/./src/members/sales-tools/dialog/group-editor.js","webpack://www.zeusteam.com/./src/members/sales-tools/dialog/tool-editor.js","webpack://www.zeusteam.com/./src/members/sales-tools/index.js","webpack://www.zeusteam.com/./src/members/sites/my-biz-card-online.js","webpack://www.zeusteam.com/./src/members/policies/policy-card.scss","webpack://www.zeusteam.com/./src/members/pg.html","webpack://www.zeusteam.com/./src/members/policies/dialogs/policy-card-dialog.html","webpack://www.zeusteam.com/./src/members/policies/policy-card-widgets.html","webpack://www.zeusteam.com/./src/members/policies/policy-card.html","webpack://www.zeusteam.com/./src/members/policies/tabs/tab-commissions.html","webpack://www.zeusteam.com/./src/members/policies/tabs/tab-files.html","webpack://www.zeusteam.com/./src/members/policies/tabs/tab-messages.html","webpack://www.zeusteam.com/./src/members/policies/tabs/tab-notes.html","webpack://www.zeusteam.com/./src/members/policies/tabs/tab-policy.html","webpack://www.zeusteam.com/./src/members/policies/tabs/tab-property-bag.html","webpack://www.zeusteam.com/./src/members/policies/tabs/tab-to-dos.html","webpack://www.zeusteam.com/./src/members/privacy-policy.html","webpack://www.zeusteam.com/./src/members/rapid-start/dialog/rapid-start-editor.html","webpack://www.zeusteam.com/./src/members/rapid-start/dialog/rapid-start-topic-editor.html","webpack://www.zeusteam.com/./src/members/rapid-start/rapid-start.html","webpack://www.zeusteam.com/./src/members/rapid-start/topic.html","webpack://www.zeusteam.com/./src/members/recruiting/_index.html","webpack://www.zeusteam.com/./src/members/recruiting/onboarding-summary.html","webpack://www.zeusteam.com/./src/members/recruiting/summary.html","webpack://www.zeusteam.com/./src/members/sales-tools/all.html","webpack://www.zeusteam.com/./src/members/sales-tools/dialog/category-editor.html","webpack://www.zeusteam.com/./src/members/sales-tools/dialog/group-editor.html","webpack://www.zeusteam.com/./src/members/sales-tools/dialog/tool-editor.html","webpack://www.zeusteam.com/./src/members/sales-tools/index.html","webpack://www.zeusteam.com/./src/members/sites/my-biz-card-online.html"],"sourcesContent":["export class Pg {\r\n pageContentKey = '';\r\n\r\n constructor() {\r\n }\r\n\r\n activate(model) {\r\n this.pageContentKey = `page-${model.id}`;\r\n }\r\n}","import { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { DialogController } from 'aurelia-dialog';\r\nimport { c } from 'common/common';\r\n\r\nexport class PolicyCardDialog {\r\n static inject = [EventAggregator, DialogController];\r\n\r\n carrierName;\r\n policyNumber\r\n\r\n _handlers = [];\r\n\r\n\tconstructor(ea, dialogController) {\r\n\t\tthis._ea = ea;\r\n this.dialogController = dialogController;\r\n this.dialogController.settings.centerHorizontalOnly = true;\r\n\t}\r\n\r\n activate(model) {\r\n this.loadTab = model.tab ?? undefined;\r\n this.policyId = model.policyId\r\n ? model.policyId\r\n : model.policy\r\n ? model.policy.id\r\n : model.id;\r\n this._handlers.push(this._ea.subscribe(c.EventKeys.login.timedOut, () => this.dialogController.cancel()));\r\n }\r\n\r\n deactivate() {\r\n this._handlers.forEach(h => h.dispose());\r\n this._handlers = [];\r\n }\r\n\r\n policyLoaded(data) {\r\n this.carrierName = data.carrierName;\r\n this.policyNumber = data.policyNumber;\r\n }\r\n\r\n close() {\r\n this.dialogController.cancel();\r\n }\r\n}\r\n","import { bindable } from 'aurelia-framework';\r\nimport { PLATFORM } from 'aurelia-pal';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { Api } from 'common/server';\r\nimport { Security } from 'common/security';\r\nimport { Config } from 'services/config';\r\nimport { c } from 'common/common';\r\nimport { LpfnUtil } from 'common/utils';\r\nimport { ROLE } from 'common/constants';\r\n\r\nexport class PolicyCard {\r\n static inject = [Element, EventAggregator, Api, Security, Config];\r\n _element;\r\n _config;\r\n @bindable policyId;\r\n @bindable loadTab;\r\n policy = null;\r\n tab;\r\n tabView = '';\r\n tabViewModel = null;\r\n isAdmin = false;\r\n showEditLink = false;\r\n\r\n tabs = [\r\n { key: 'overview', title: 'overview', viewModel: PLATFORM.moduleName('./tabs/tab-policy'), display: true },\r\n { key: 'notes', title: 'notes', viewModel: PLATFORM.moduleName('./tabs/tab-notes'), display: true },\r\n { key: 'messages', title: 'messages', viewModel: PLATFORM.moduleName('./tabs/tab-messages'), display: true },\r\n { key: 'commissions', title: 'profile-commissions', viewModel: PLATFORM.moduleName('./tabs/tab-commissions'), display: true },\r\n { key: 'to-dos', title: 'to-dos', viewModel: PLATFORM.moduleName('./tabs/tab-to-dos'), display: true },\r\n { key: 'property-bag', title: 'property-bag', viewModel: PLATFORM.moduleName('./tabs/tab-property-bag'), display: true },\r\n { key: 'files', title: 'files', viewModel: PLATFORM.moduleName('./tabs/tab-files'), display: true },\r\n ];\r\n\r\n _handlers = [];\r\n\r\n\tconstructor(element, ea, api, security, config) {\r\n this._element = element;\r\n\t\tthis._ea = ea;\r\n\t\tthis.api = api;\r\n\t\tthis.security = security;\r\n this._config = config;\r\n if (!this.security.canSeeCommissions()) this.tabs.find(x => x.key === 'commissions').display = false;\r\n if (!this.security.isInRole(ROLE.Admin)) this.tabs.find(x => x.key === 'property-bag').display = false;\r\n this.showEcsContactForm = this._config.value('emergencyContactFormLinkTemplate') ? true : false;\r\n\t}\r\n\r\n activate(model) {\r\n this.tab = model.tab ? this.tabs.find(x => x.key === model.tab.key) || this.tabs[0] : this.tabs[0];\r\n this.policyId = model.id;\r\n }\r\n\r\n deactivate() {\r\n this._handlers.forEach(h => h.dispose());\r\n this._handlers = [];\r\n }\r\n\r\n attached() {\r\n if (this.loadTab) {\r\n this.tab = this.tabs.find(x => x.key === this.loadTab) ?? undefined;\r\n this.loadTab = undefined;\r\n }\r\n this._load();\r\n }\r\n\r\n policyIdChanged() {\r\n this._load();\r\n }\r\n\r\n async _load() {\r\n if (!this.policyId) return;\r\n try {\r\n \t\tthis.policy = await this.api.get(`production/policy/${encodeURIComponent(this.policyId)}`);\r\n this._element.dispatchEvent(new CustomEvent('loaded', { bubbles: true, detail: { carrierName: this.policy.carrier.name, policyNumber: this.policy.policyNumber } }));\r\n this.displayTab(this.tab);\r\n\t\t} catch (err) {\r\n console.log(err);\r\n }\r\n\t}\r\n\r\n openEmergencyContactForm() {\r\n let ecsLinkTemplate = this._config.value('emergencyContactFormLinkTemplate');\r\n const clientFirstName = this.policy.client?.firstName ?? '';\r\n const clientLastName = this.policy.client?.lastName ?? '';\r\n const policyNumber = this.policy.policyNumber;\r\n ecsLinkTemplate = ecsLinkTemplate\r\n .replace(/{{clientFirstName}}/g, encodeURIComponent(clientFirstName))\r\n .replace(/{{clientLastName}}/g, encodeURIComponent(clientLastName))\r\n .replace(/{{policyNumber}}/g, encodeURIComponent(policyNumber))\r\n const formUrl = c.Helpers.replaceVariables(this.security, ecsLinkTemplate, true);\r\n console.log(formUrl);\r\n var parentZindex = LpfnUtil.getHighestZindex(this._element);\r\n this._ea.publish(c.EventKeys.site.openLightbox, { embedSrc: formUrl, zIndex: parentZindex + 1 });\r\n }\r\n\r\n displayTab(tab) {\r\n this.tab = tab || this.tabs[0];\r\n this.tabModel = this.tabModel || {};\r\n this.tabViewModel = this.tab.viewModel;\r\n\t switch (this.tab.key) {\r\n\t case 'overview':\r\n\t this.tabModel = this.policy;\r\n\t break;\r\n case 'notes':\r\n this.tabModel = { policyId: this.policy.id, security: this.security };\r\n break;\r\n case 'messages':\r\n this.tabModel = { policyId: this.policy.id };\r\n break;\r\n case 'commissions':\r\n this.tabModel = { policyId: this.policy.id };\r\n break;\r\n case 'to-dos':\r\n this.tabModel = { policyId: this.policy.id, security: this.security };\r\n break;\r\n case 'property-bag':\r\n this.tabModel = { propertyBag: this.policy.propertyBag };\r\n break;\r\n case 'files':\r\n this.tabModel = { policyId: this.policy.id };\r\n break;\r\n default:\r\n this.tabModel = this.policy;\r\n break;\r\n }\r\n\t}\r\n}\r\n","import { WIDGET, COMMISSION } from 'common/constants';\r\n\r\nexport class TabCommissions {\r\n constructor() {}\r\n\r\n activate(model) {\r\n this.config = {\r\n memberId: model.memberId,\r\n policyId: model.policyId,\r\n groupBy: COMMISSION.GroupBy.Policy,\r\n widgetPeriod: WIDGET.Period.All,\r\n };\r\n }\r\n}\r\n","export class TabFiles {\r\n constructor() {\r\n }\r\n\r\n activate(model) {\r\n this.policyId = model.policyId;\r\n }\r\n}\r\n","export class TabMessages {\r\n policyId;\r\n\r\n constructor() {}\r\n\r\n activate(model) {\r\n this.policyId = model.policyId;\r\n }\r\n}\r\n","export class TabNotes {\r\n policyId;\r\n\r\n constructor() {}\r\n\r\n activate(model) {\r\n this.policyId = model.policyId;\r\n }\r\n}\r\n","export class TabPolicy {\r\n policy;\r\n\r\n constructor() {}\r\n\r\n activate(model) {\r\n this.policy = model;\r\n }\r\n}\r\n","export class TabPropertyBag {\r\n policyId;\r\n\r\n constructor() {}\r\n\r\n activate(model) {\r\n this.propertyBag = model.propertyBag;\r\n }\r\n}\r\n","export class TabToDos {\r\n policyId;\r\n\r\n constructor() {}\r\n\r\n activate(model) {\r\n this.policyId = model.policyId;\r\n }\r\n}\r\n","import { Page } from 'common/ui';\r\n\r\nexport class PrivacyPolicy {\r\n\tstatic inject = [Page];\r\n\r\n\tconstructor(page) {\r\n\t\tthis.page = page;\r\n\t}\r\n\r\n\tactivate() {\r\n\t\tthis.page.track('privacy-policy');\r\n\t}\r\n\r\n\tattached() {\r\n\t this.page.scrollToTop();\r\n\t}\r\n} \r\n","import {inject} from 'aurelia-framework';\r\nimport {DialogController} from 'aurelia-dialog';\r\nimport {NewInstance} from 'aurelia-dependency-injection';\r\nimport {ValidationRules, ValidationController} from 'aurelia-validation';\r\nimport {BootstrapFormValidationRenderer} from 'validation/bootstrap-form-validation-renderer';\r\nimport {I18n} from 'common/i18n';\r\nimport {Notifier} from 'common/ui';\r\nimport {RapidStarts} from 'services/rapid-starts';\r\nimport {Api} from 'common/server';\r\nimport {c} from 'common/common';\r\n\r\n@inject(DialogController, NewInstance.of(ValidationController), I18n, Notifier, RapidStarts, Api)\r\nexport class RapidStartEditor {\r\n\r\n id = null;\r\n slug = '';\r\n ordering = null;\r\n isActive = false;\r\n showDeleteConfirm = false;\r\n canEditSlug = false;\r\n minimumLevel = null;\r\n levels = [];\r\n\r\n constructor(dialogController, validationController, i18n, notifier, rapidStarts, api) {\r\n this.dialogController = dialogController;\r\n this.dialogController.settings.centerHorizontalOnly = true;\r\n this.validationController = validationController;\r\n this.validationController.addRenderer(new BootstrapFormValidationRenderer());\r\n this.i18n = i18n;\r\n this.notifier = notifier;\r\n this.rapidStarts = rapidStarts;\r\n this._api = api;\r\n\r\n this.deleteText = this.i18n.tr('delete');\r\n\r\n ValidationRules\r\n .ensure('slug').required().matches(c.RegEx.slug)\r\n .ensure('ordering').required().satisfiesRule('integerRange', 1, 5000)\r\n .on(this);\r\n }\r\n\r\n async activate(model) {\r\n await this._loadLevels();\r\n this.id = null;\r\n this.slug = '';\r\n this.ordering = model.ordering || 1;\r\n this.isActive = false;\r\n this.title = this.i18n.tr('rapid-start-add-title');\r\n this.minimumLevel = null;\r\n if (model) {\r\n this.title = this.i18n.tr('rapid-start-edit-title');\r\n this.id = model.id;\r\n this.slug = model.slug;\r\n this.ordering = model.ordering;\r\n this.isActive = model.isActive;\r\n this.minimumLevel = model.minimumLevel;\r\n }\r\n\r\n this.canEditSlug = !this.id;\r\n this.validationController.reset();\r\n }\r\n\r\n save() {\r\n var me = this;\r\n this.validationController.validate().then(v => {\r\n if (!v.valid) return;\r\n if (me.minimumLevel === 'null') me.minimumLevel = null;\r\n\r\n me.rapidStarts.saveRapidStart(me.id, me.slug, me.ordering, me.isActive, me.minimumLevel).then(() => {\r\n me.dialogController.ok({ rapidStartDeleted: false });\r\n }).catch(error => { });\r\n });\r\n }\r\n\r\n resetDelete() {\r\n this.showDeleteConfirm = false;\r\n this.deleteText = this.i18n.tr('delete');\r\n }\r\n\r\n deleteRapidStart() {\r\n if (!this.showDeleteConfirm) {\r\n this.showDeleteConfirm = true;\r\n this.deleteText = this.i18n.tr('delete-confirm');\r\n return;\r\n }\r\n\r\n this.showDeleteConfirm = false;\r\n var me = this;\r\n\r\n me.rapidStarts.deleteRapidStart(me.id).then(() => {\r\n me.dialogController.ok({ rapidStartDeleted: true });\r\n }).catch(error => { });\r\n }\r\n\r\n async _loadLevels() {\r\n try {\r\n this.levels = await this._api.get('level/list-all');\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n}\r\n","import {inject} from 'aurelia-framework';\r\nimport {DialogController} from 'aurelia-dialog';\r\nimport {NewInstance} from 'aurelia-dependency-injection';\r\nimport {ValidationRules, ValidationController} from 'aurelia-validation';\r\nimport {BootstrapFormValidationRenderer} from 'validation/bootstrap-form-validation-renderer';\r\nimport {I18n} from 'common/i18n';\r\nimport {Notifier} from 'common/ui';\r\nimport {RapidStarts} from 'services/rapid-starts';\r\nimport {c} from 'common/common';\r\n\r\n@inject(DialogController, NewInstance.of(ValidationController), I18n, Notifier, RapidStarts)\r\nexport class RapidStartTopicEditor {\r\n\r\n id = null;\r\n rapidStartId = null;\r\n slug = '';\r\n ordering = null;\r\n isActive = false;\r\n showDeleteConfirm = false;\r\n canEditSlug = false;\r\n\r\n constructor(dialogController, validationController, i18n, notifier, rapidStarts) {\r\n this.dialogController = dialogController;\r\n this.dialogController.settings.centerHorizontalOnly = true;\r\n this.validationController = validationController;\r\n this.validationController.addRenderer(new BootstrapFormValidationRenderer());\r\n this.i18n = i18n;\r\n this.notifier = notifier;\r\n this.rapidStarts = rapidStarts;\r\n\r\n this.deleteText = this.i18n.tr('delete');\r\n\r\n ValidationRules\r\n .ensure('slug').required().matches(c.RegEx.slug)\r\n .ensure('ordering').required().satisfiesRule('integerRange', 1, 5000)\r\n .on(this);\r\n }\r\n\r\n activate(model) {\r\n this.id = null;\r\n this.rapidStartId = model.rapidStartId;\r\n this.slug = '';\r\n this.ordering = model.ordering || 1;\r\n this.isActive = false;\r\n this.title = this.i18n.tr('rapid-start-topic-add-title');\r\n if (model.topic) {\r\n this.title = this.i18n.tr('rapid-start-topic-edit-title');\r\n this.id = model.topic.id;\r\n this.slug = model.topic.slug;\r\n this.ordering = model.topic.ordering;\r\n this.isActive = model.topic.isActive;\r\n }\r\n\r\n this.canEditSlug = !this.id;\r\n this.validationController.reset();\r\n }\r\n\r\n save() {\r\n var me = this;\r\n this.validationController.validate().then(v => {\r\n if (!v.valid) return;\r\n\r\n me.rapidStarts.saveRapidStartTopic(me.id, me.rapidStartId, me.slug, me.ordering, me.isActive).then(() => {\r\n me.dialogController.ok({ rapidStartTopicDeleted: false });\r\n }).catch(error => { });\r\n });\r\n }\r\n\r\n resetDelete() {\r\n this.showDeleteConfirm = false;\r\n this.deleteText = this.i18n.tr('delete');\r\n }\r\n\r\n deleteRapidStartTopic() {\r\n if (!this.showDeleteConfirm) {\r\n this.showDeleteConfirm = true;\r\n this.deleteText = this.i18n.tr('delete-confirm');\r\n return;\r\n }\r\n\r\n this.showDeleteConfirm = false;\r\n var me = this;\r\n\r\n me.rapidStarts.deleteRapidStartTopic(me.id).then(() => {\r\n me.dialogController.ok({ rapidStartTopicDeleted: true });\r\n }).catch(error => { });\r\n }\r\n}\r\n","import { PLATFORM } from 'aurelia-pal';\r\nimport { inject } from 'aurelia-framework';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { Security } from 'common/security';\r\nimport { Notifier, Page } from 'common/ui';\r\nimport { Api } from 'common/server';\r\nimport { I18n } from 'common/i18n';\r\nimport { RapidStarts } from 'services/rapid-starts';\r\nimport { RapidStartEditor } from './dialog/rapid-start-editor';\r\nimport { RapidStartTopicEditor } from './dialog/rapid-start-topic-editor';\r\nimport { DialogService } from 'aurelia-dialog';\r\nimport { ROLE } from 'common/constants';\r\nPLATFORM.moduleName('./dialog/rapid-start-editor');\r\nPLATFORM.moduleName('./dialog/rapid-start-topic-editor');\r\n\r\n@inject(EventAggregator, Security, Notifier, Page, Api, I18n, RapidStarts, DialogService)\r\nexport class RapidStart {\r\n\r\n slug = null;\r\n rapidStarts = [];\r\n\r\n constructor(eventAggregator, security, notifier, page, api, i18n, rapidStarts, dialogService) {\r\n this.eventAggregator = eventAggregator;\r\n this.security = security;\r\n this.notifier = notifier;\r\n\t this.page = page;\r\n\t this.api = api;\r\n\t this.i18n = i18n;\r\n\t this._rapidStarts = rapidStarts;\r\n\t this.dialogService = dialogService;\r\n\r\n this.isAdmin = this.security.isInRole([ROLE.Admin, ROLE.ResourceAdmin, ROLE.TrainingAdmin]);\r\n }\r\n\r\n activate(params) {\r\n this.slug = params.slug || null;\r\n this.page.track('members/rapid-start');\r\n this._initialize(true);\r\n }\r\n\r\n attached() {\r\n\t this._initializeHandler = this.eventAggregator.subscribe('zeus.rapid-start.initialize', (uiWidget) => {\r\n\t this._initialize(true);\r\n\t });\r\n\t}\r\n\r\n\tdetached() {\r\n\t this._initializeHandler.dispose();\r\n\t}\r\n\r\n\tasync _initialize(clear) {\r\n\t\ttry {\r\n\t\t const intros = await this._rapidStarts.initialize(clear);\r\n\t this.rapidStarts = intros;\r\n\r\n\t for (var i = 0; i < this.rapidStarts.length; i++) {\r\n if (this.rapidStarts[i].slug !== this.slug) continue;\r\n break;\r\n }\r\n\t } catch (err) {\r\n\t\t\tconsole.log(err);\r\n\t\t}\r\n\t}\r\n\r\n\topenRapidStartEditor(rapidStart) {\r\n\t this.dialogService.open({ viewModel: RapidStartEditor, model: rapidStart, ordering: rapidStart.ordering, ignoreTransitions: true }).whenClosed(response => {\r\n\t if (response.wasCancelled) return;\r\n\r\n\t if (response.output.rapidStartDeleted) {\r\n\t this.slug = null;\r\n\t }\r\n \r\n\t this.rapidStarts = [];\r\n\t this._initialize(true);\r\n\t });\r\n\t}\r\n\r\n\topenAddRapidStart() {\r\n\t var model = {\r\n\t ordering: this.rapidStarts.length ? this.rapidStarts[this.rapidStarts.length-1].ordering + 1 : 1\r\n\t };\r\n\t this.dialogService.open({ viewModel: RapidStartEditor, model: model, ignoreTransitions: true }).whenClosed(response => {\r\n\t if (response.wasCancelled) return;\r\n\t this.rapidStarts = [];\r\n\t this._initialize(true);\r\n\t });\r\n\t}\r\n\r\n\topenRapidStartTopicEditor(rapidStart, topic) {\r\n\t var model = {\r\n\t rapidStartId: rapidStart.id,\r\n\t topic: topic,\r\n\t ordering: topic ? topic.ordering : rapidStart.topics[rapidStart.topics.length-1].ordering + 1\r\n\t };\r\n\t this.dialogService.open({ viewModel: RapidStartTopicEditor, model: model, ignoreTransitions: true }).whenClosed(response => {\r\n\t if (response.wasCancelled) return;\r\n\r\n\t this.rapidStarts = [];\r\n\t this._initialize(true);\r\n\t });\r\n\t}\r\n\r\n\topenAddRapidStartTopic(rapidStart) {\r\n\t var model = { \r\n\t rapidStartId: rapidStart.id, \r\n\t topic: null,\r\n\t ordering: rapidStart.topics.length ? rapidStart.topics[rapidStart.topics.length-1].ordering + 1 : 1\r\n\t };\r\n\t this.dialogService.open({ viewModel: RapidStartTopicEditor, model: model, ignoreTransitions: true }).whenClosed(response => {\r\n\t if (response.wasCancelled) return;\r\n\t this.rapidStarts = [];\r\n\t this._initialize(true);\r\n\t });\r\n\t}\r\n}\r\n","import { inject } from 'aurelia-framework';\r\nimport { activationStrategy } from 'aurelia-router';\r\nimport { EventAggregator} from 'aurelia-event-aggregator';\r\nimport { Security } from 'common/security';\r\nimport { Page } from 'common/ui';\r\nimport { Api } from 'common/server';\r\nimport { I18n } from 'common/i18n';\r\nimport { RapidStarts } from 'services/rapid-starts';\r\nimport { ROLE } from 'common/constants';\r\n\r\n@inject(EventAggregator, Security, Page, Api, I18n, RapidStarts)\r\nexport class RapidStart {\r\n\r\n rapidStartSlug = null;\r\n slug = null;\r\n rapidStart = null;\r\n topic = null;\r\n\r\n constructor(eventAggregator, security, page, api, i18n, rapidStarts) {\r\n this.eventAggregator = eventAggregator;\r\n this.security = security;\r\n this.page = page;\r\n this.api = api;\r\n this.i18n = i18n;\r\n this.rapidStarts = rapidStarts;\r\n\r\n this.isAdmin = this.security.isInRole([ROLE.Admin, ROLE.ResourceAdmin]);\r\n }\r\n\r\n determineActivationStrategy() {\r\n return activationStrategy.invokeLifecycle;\r\n }\r\n\r\n activate(params) {\r\n this.rapidStartSlug = params.rapidStartSlug || null;\r\n this.slug = params.slug || null;\r\n this.page.track('members/rapid-start/' + this.rapidStartSlug + '/' + this.slug);\r\n this._initialize();\r\n }\r\n\r\n async _initialize() {\r\n try {\r\n this.rapidStart = await this.rapidStarts.getRapidStartIntro(this.rapidStartSlug);\r\n\r\n for (var i = 0; i < this.rapidStart.topics.length; i++) {\r\n if (this.rapidStart.topics[i].slug !== this.slug) continue;\r\n this.topic = this.rapidStart.topics[i];\r\n break;\r\n }\r\n\r\n if (!this.topic) {\r\n this.topic = this.rapidStart.topics[0];\r\n }\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n}\r\n","import { PLATFORM } from 'aurelia-pal';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { Security } from 'common/security';\r\nimport { Menus } from 'services/menus';\r\nimport { RouterConfigBase } from 'resources/base-classes/router-config-base';\r\n\r\nexport class ProductionIndex extends RouterConfigBase {\r\n static inject = [EventAggregator, Security, Menus];\r\n\r\n constructor(ea, security, menus) {\r\n\t\tsuper(ea, security, menus, undefined, false);\r\n\t}\r\n\r\n\tconfigureRouter(config, router){\r\n\t config.map([\r\n {\r\n\t\t\t\troute: 'summary',\r\n\t\t\t\tmoduleId: PLATFORM.moduleName('members/recruiting/summary'),\r\n\t\t\t\tnav: false,\r\n settings: { title: 'recruiting', description: 'recruiting-description', canAddToMobileMenu: false }\r\n\t\t\t},\r\n {\r\n\t\t\t\troute: 'onboarding-summary',\r\n\t\t\t\tmoduleId: PLATFORM.moduleName('members/recruiting/onboarding-summary'),\r\n\t\t\t\tnav: false,\r\n settings: { title: 'onboarding', description: 'onboarding-summary-description', canAddToMobileMenu: false }\r\n\t\t\t}\r\n\t ]);\r\n\r\n\t\tthis.router = router;\r\n\t}\r\n\r\n\tattached() {\r\n this._attached();\r\n }\r\n\r\n detached() {\r\n this._detached();\r\n }\r\n}\r\n","import {inject} from 'aurelia-framework';\r\nimport {I18n} from 'common/i18n';\r\nimport {Security} from 'common/security';\r\nimport {MemberService} from 'services/member-service';\r\nimport {RecruitingService} from 'services/recruiting-service';\r\nimport moment from 'moment';\r\nimport {c} from 'common/common';\r\n\r\n@inject(I18n, Security, MemberService, RecruitingService)\r\nexport class OnboardingSummary {\r\n _forMemberId;\r\n\r\n _i18n;\r\n _security;\r\n _memberSvc;\r\n _recruiting;\r\n\r\n teamOptions;\r\n teamSummary = false;\r\n start;\r\n end;\r\n\r\n columns;\r\n gridData;\r\n emptyGridMessage;\r\n loadingTimestamp;\r\n\r\n drilldowns = [];\r\n\r\n constructor(i18n, security, memberService, recruitingService) {\r\n this._i18n = i18n;\r\n this._security = security;\r\n this._memberSvc = memberService;\r\n this._recruiting = recruitingService;\r\n\r\n this.myAgentId = this._security.authenticatedMemberId;\r\n\r\n this.teamOptions = [];\r\n this.teamOptions.push({ key: false, name: this._i18n.tr('recruiting-onboarding-option-personal') });\r\n this.teamOptions.push({ key: true, name: this._i18n.tr('recruiting-onboarding-option-team') });\r\n\r\n this._initialize();\r\n }\r\n\r\n _initialize() {\r\n this.emptyGridMessage = this._i18n.tr('recruiting-onboarding-none-found');\r\n this.columns = [];\r\n this.columns.push(c.FlexGrid.column('agent', c.FlexGrid.sizes.medium, this._i18n.tr('recruiting-onboarding-agent'), c.FlexGrid.types.member, null));\r\n this.columns.push(c.FlexGrid.column('registered', c.FlexGrid.sizes.small, this._i18n.tr('recruiting-onboarding-registration-date-abbreviated'), c.FlexGrid.types.date, { formatter: 'l' }));\r\n this.columns.push(c.FlexGrid.column('level', c.FlexGrid.sizes.small, this._i18n.tr('recruiting-onboarding-level'), c.FlexGrid.types.string, null));\r\n this.columns.push(c.FlexGrid.column('licensed', c.FlexGrid.sizes.small, this._i18n.tr('recruiting-onboarding-licensed'), c.FlexGrid.types.bool, null));\r\n }\r\n\r\n activate(params) {\r\n this.teamSummary = params.teamSummary || false;\r\n let start = params.start || null;\r\n if (start) this.start = moment(start);\r\n let end = params.end || null;\r\n if (end) this.end = moment(end);\r\n this._forMemberId = params.forMemberId || null;\r\n this.backUrl = params.backUrl || null;\r\n this.displayBackLink = this.backUrl ? true : false;\r\n this.backText = params.backText || '';\r\n\r\n this._loadSummary();\r\n\r\n this._memberSvc.getProfile(this._forMemberId).then(profile => {\r\n this.drilldowns.push({ id: profile.id, name: profile.fullName });\r\n });\r\n }\r\n\r\n _loadSummary(fromDrilldown) {\r\n this.loadingTimestamp = moment().unix();\r\n\r\n const start = this.start ? this.start.format('MM/DD/YYYY') : null;\r\n const end = this.end ? this.end.format('MM/DD/YYYY') : null;\r\n this._recruiting.getOnboardingSummaries(this._forMemberId, this.teamSummary, start, end).then(data => {\r\n let gridData = [];\r\n for (let record of data) {\r\n gridData.push({\r\n highlight: false,\r\n values: [\r\n c.FlexGrid.cellData('id', record.memberId),\r\n c.FlexGrid.cellData('agent', { id: record.memberId, fullName: record.name }),\r\n c.FlexGrid.cellData('registered', record.registrationDate),\r\n c.FlexGrid.cellData('level', record.level),\r\n c.FlexGrid.cellData('licensed', record.isLicensedLife),\r\n ]\r\n });\r\n }\r\n this.gridData = gridData;\r\n }).catch(err => {\r\n this.gridData = [];\r\n });\r\n }\r\n\r\n search() {\r\n this._loadSummary();\r\n }\r\n\r\n clearDrilldown() {\r\n this._forMemberId = this.drilldowns[0].id;\r\n this.drilldowns = [this.drilldowns[0]];\r\n this._loadSummary();\r\n }\r\n\r\n backInDrilldown(memberId) {\r\n if (this._forMemberId === memberId) return;\r\n\r\n let index = this.drilldowns.findIndex(x => x.id === memberId);\r\n this.drilldowns.splice(index + 1, this.drilldowns.length - index + 1);\r\n this.showDrilldown(memberId, null);\r\n }\r\n\r\n showDrilldown(memberId, gridData) {\r\n this._forMemberId = memberId;\r\n if (gridData) {\r\n let nameValue = gridData.values.find(x => x.key === 'agent');\r\n this.drilldowns.push({ id: memberId, name: nameValue.value });\r\n }\r\n this._loadSummary();\r\n }\r\n}\r\n","import {inject} from 'aurelia-framework';\r\nimport {I18n} from 'common/i18n';\r\nimport {Security} from 'common/security';\r\nimport {RecruitingService} from 'services/recruiting-service';\r\nimport moment from 'moment';\r\nimport {c} from 'common/common';\r\n\r\n@inject(I18n, Security, RecruitingService)\r\nexport class Summary {\r\n _forMemberId;\r\n\r\n _i18n;\r\n _security;\r\n _recruiting;\r\n\r\n teamOptions;\r\n teamSummary = false;\r\n start;\r\n end;\r\n\r\n columns;\r\n gridData;\r\n emptyGridMessage;\r\n loadingTimestamp;\r\n\r\n directUplines = [];\r\n\r\n constructor(i18n, security, recruitingService) {\r\n this._i18n = i18n;\r\n this._security = security;\r\n this._recruiting = recruitingService;\r\n\r\n this.myAgentId = this._security.authenticatedMemberId;\r\n\r\n this.teamOptions = [];\r\n this.teamOptions.push({ key: false, name: this._i18n.tr('recruiting-summary-option-personal') });\r\n this.teamOptions.push({ key: true, name: this._i18n.tr('recruiting-summary-option-team') });\r\n\r\n this._initialize();\r\n }\r\n\r\n _initialize() {\r\n this.emptyGridMessage = this._i18n.tr('recruiting-summary-none-found');\r\n this.columns = [];\r\n this.columns.push(c.FlexGrid.column('agent', c.FlexGrid.sizes.medium, this._i18n.tr('recruiting-summary-agent'), c.FlexGrid.types.member, null));\r\n this.columns.push(c.FlexGrid.column('level', c.FlexGrid.sizes.small, this._i18n.tr('recruiting-summary-level'), c.FlexGrid.types.string, null));\r\n this.columns.push(c.FlexGrid.column('recruits', c.FlexGrid.sizes.small, this._i18n.tr('recruiting-summary-recruits'), c.FlexGrid.types.number, { formatter: 1 }));\r\n }\r\n\r\n activate(params) {\r\n this.teamSummary = params.teamSummary || false;\r\n let start = params.start || null;\r\n if (start) this.start = moment(start);\r\n let end = params.end || null;\r\n if (end) this.end = moment(end);\r\n this._forMemberId = params.forMemberId || null;\r\n this.backUrl = params.backUrl || null;\r\n this.displayBackLink = this.backUrl ? true : false;\r\n this.backText = params.backText || '';\r\n\r\n this._loadSummary();\r\n }\r\n\r\n _loadSummary() {\r\n this.loadingTimestamp = moment().unix();\r\n\r\n const start = this.start ? this.start.format('MM/DD/YYYY') : null;\r\n const end = this.end ? this.end.format('MM/DD/YYYY') : null;\r\n this._recruiting.getSummaries(this._forMemberId, this.teamSummary, start, end).then(data => {\r\n let gridData = [];\r\n for (let record of data) {\r\n let directUplineExists = this.directUplines.find(x => x.id === record.directUplineId);\r\n if (!directUplineExists) this.directUplines.push({ id: record.directUplineId, name: record.directUplineName });\r\n gridData.push({\r\n highlight: false,\r\n values: [\r\n c.FlexGrid.cellData('id', record.memberId),\r\n c.FlexGrid.cellData('agent', { id: record.id, fullName: record.agentName }),\r\n c.FlexGrid.cellData('level', record.level),\r\n c.FlexGrid.cellData('recruits', record.recruits),\r\n c.FlexGrid.cellData('upline', record.directUplineName)\r\n ]\r\n });\r\n }\r\n this.gridData = gridData;\r\n }).catch(err => {\r\n this.gridData = [];\r\n });\r\n }\r\n\r\n search() {\r\n this._loadSummary();\r\n }\r\n\r\n clearDrilldown() {\r\n this._forMemberId = this.directUplines[0].id;\r\n this.directUplines = [];\r\n this._loadSummary();\r\n }\r\n\r\n backToDirectUpline(memberId) {\r\n if (this._forMemberId === memberId) return;\r\n\r\n let index = this.directUplines.findIndex(x => x.id === memberId);\r\n if (index + 1 <= this.directUplines.length) {\r\n this.directUplines.splice(index + 1);\r\n }\r\n this.showClickthrough(memberId, null);\r\n }\r\n\r\n showClickthrough(memberId, gridData) {\r\n this._forMemberId = memberId;\r\n if (gridData) {\r\n let nameValue = gridData.values.find(x => x.key === 'agent');\r\n this.directUplines.push({ id: memberId, name: nameValue.value });\r\n }\r\n this._loadSummary();\r\n }\r\n}\r\n","import { PLATFORM } from 'aurelia-pal';\r\nimport {inject} from 'aurelia-framework';\r\nimport {EventAggregator} from 'aurelia-event-aggregator';\r\nimport {Api} from 'common/server';\r\nimport {Page, Notifier} from 'common/ui';\r\nimport {Security} from 'common/security';\r\nimport {I18n} from 'common/i18n';\r\nimport {UiWidgets} from 'services/ui-widgets';\r\nimport {CategoryEditor} from './dialog/category-editor';\r\nimport {GroupEditor} from './dialog/group-editor';\r\nimport {ToolEditor} from './dialog/tool-editor';\r\nimport {DialogService} from 'aurelia-dialog';\r\nPLATFORM.moduleName('./dialog/category-editor');\r\nPLATFORM.moduleName('./dialog/group-editor');\r\nPLATFORM.moduleName('./dialog/tool-editor');\r\n\r\n@inject(EventAggregator, Api, Page, Notifier, Security, I18n, UiWidgets, DialogService)\r\nexport class AllSalesTools {\r\n\r\n showVideoUrl = '';\r\n intros = [];\r\n categories = [];\r\n allCategories = [];\r\n\r\n constructor(eventAggregator, api, page, notifier, security, i18n, uiWidgets, dialogService) {\r\n this._eventAggregator = eventAggregator;\r\n this._api = api;\r\n this._page = page;\r\n this._notifier = notifier;\r\n this._security = security;\r\n this._i18n = i18n;\r\n this.uiWidgets = uiWidgets;\r\n this._dialogService = dialogService;\r\n\r\n this.isAdmin = this._security.isAdmin;\r\n }\r\n\r\n activate(params, routerConfig) {\r\n var me = this;\r\n me._page.track('members/sales-tools');\r\n me._initialize(false);\r\n }\r\n\r\n attached() {\r\n var me = this;\r\n me._initializeHandler = me._eventAggregator.subscribe('zeus.sales-tools.initialize', function(uiWidget) {\r\n me._initialize(true);\r\n });\r\n me._categoryHandler = me._eventAggregator.subscribe('zeus.sales-tools.category.initialize', function(uiWidget) {\r\n me.uiWidgets.addToCache(uiWidget);\r\n me._loadIntros();\r\n });\r\n me._groupHandler = me._eventAggregator.subscribe('zeus.sales-tools.group.initialize', function(uiWidget) {\r\n me.uiWidgets.addToCache(uiWidget);\r\n me._loadIntros();\r\n });\r\n me._toolHandler = me._eventAggregator.subscribe('zeus.sales-tools.tool.initialize', function(uiWidget) {\r\n me.uiWidgets.addToCache(uiWidget);\r\n me._loadIntros();\r\n });\r\n }\r\n\r\n detached() {\r\n this._initializeHandler.dispose();\r\n this._categoryHandler.dispose();\r\n this._groupHandler.dispose();\r\n this._toolHandler.dispose();\r\n }\r\n\r\n _initialize(clear) {\r\n if (clear) {\r\n this.intros = [];\r\n }\r\n this._loadIntros();\r\n }\r\n\r\n _loadIntros() {\r\n var me = this;\r\n return new Promise((resolve, reject) => {\r\n if (me.intros.length > 0) { resolve(); return; }\r\n\r\n me.allCategories = [];\r\n me._api.getData('sales-tools/list/' + me._i18n.currentLocale).then(all => {\r\n me.intros = all;\r\n for (let i of all) {\r\n me.allCategories.push({ id: i.id, title: i.title });\r\n }\r\n resolve();\r\n }).catch(error => {\r\n reject();\r\n });\r\n });\r\n }\r\n\r\n openCategoryEditor(category) {\r\n let ordering = 1;\r\n if (category || this.intros.length) ordering = category ? category.ordering : this.intros[this.intros.length-1].ordering + 1;\r\n var model = { \r\n ordering: ordering,\r\n category: category\r\n };\r\n this._dialogService.open({ viewModel: CategoryEditor, model: model, ignoreTransitions: true }).whenClosed(response => {\r\n if (response.wasCancelled) return;\r\n if (!response.output) {\r\n this._initialize(true);\r\n return;\r\n }\r\n if (!category || response.output.slug === category.slug) {\r\n this._initialize(true);\r\n return;\r\n }\r\n this.uiWidgets.initialize().then(() => {\r\n this._initialize(true);\r\n });\r\n });\r\n }\r\n\r\n openGroupEditor(category, group) {\r\n var model = {\r\n categoryId: category.id,\r\n categories: this.allCategories,\r\n group: group,\r\n ordering: group ? group.ordering : category.groups.length ? category.groups[category.groups.length-1].ordering + 1 : 1\r\n };\r\n this._dialogService.open({ viewModel: GroupEditor, model: model, ignoreTransitions: true }).whenClosed(response => {\r\n if (response.wasCancelled) return;\r\n if (!response.output) {\r\n this._initialize(true);\r\n return;\r\n }\r\n if (!group || (response.output.slug === group.slug && response.output.categoryId === category.id)) {\r\n this._initialize(true);\r\n return;\r\n }\r\n this.uiWidgets.initialize().then(() => {\r\n this._initialize(true);\r\n });\r\n });\r\n }\r\n\r\n openToolEditor(category, group, tool) {\r\n let categoryGroups = [];\r\n for (let g of category.groups) categoryGroups.push({ id: g.id, name: g.name });\r\n var model = {\r\n groupId: group.id,\r\n groups: categoryGroups,\r\n tool: tool,\r\n ordering: tool ? tool.ordering : group.salesTools.length ? group.salesTools[group.salesTools.length-1].ordering + 1 : 1\r\n };\r\n this._dialogService.open({ viewModel: ToolEditor, model: model, ignoreTransitions: true }).whenClosed(response => {\r\n if (!response.output) {\r\n this._initialize(true);\r\n return;\r\n }\r\n if (!tool || (response.output.slug === tool.slug && response.output.categoryId === category.id)) {\r\n this._initialize(true);\r\n return;\r\n }\r\n this.uiWidgets.initialize().then(() => {\r\n this._initialize(true);\r\n });\r\n });\r\n }\r\n}\r\n","import {inject} from 'aurelia-framework';\r\nimport {DialogController} from 'aurelia-dialog';\r\nimport {NewInstance} from 'aurelia-dependency-injection';\r\nimport {ValidationRules, ValidationController} from 'aurelia-validation';\r\nimport {BootstrapFormValidationRenderer} from 'validation/bootstrap-form-validation-renderer';\r\nimport {I18n} from 'common/i18n';\r\nimport {Notifier} from 'common/ui';\r\nimport {SalesTools} from 'services/sales-tools';\r\nimport {c} from 'common/common';\r\n\r\n@inject(DialogController, NewInstance.of(ValidationController), I18n, Notifier, SalesTools)\r\nexport class CategoryEditor {\r\n\r\n id = null;\r\n slug = '';\r\n ordering = null;\r\n isActive = false;\r\n showDeleteConfirm = false;\r\n levels = [];\r\n\r\n constructor(dialogController, validationController, i18n, notifier, salesTools) {\r\n this.dialogController = dialogController;\r\n this.dialogController.settings.centerHorizontalOnly = true;\r\n this.validationController = validationController;\r\n this.validationController.addRenderer(new BootstrapFormValidationRenderer());\r\n this.i18n = i18n;\r\n this.notifier = notifier;\r\n this.salesTools = salesTools;\r\n\r\n this.deleteText = this.i18n.tr('delete');\r\n\r\n ValidationRules\r\n .ensure('slug').required().matches(c.RegEx.slug)\r\n .ensure('ordering').required().satisfiesRule('integerRange', 1, 5000)\r\n .on(this);\r\n }\r\n\r\n activate(model) {\r\n this.id = null;\r\n this.slug = '';\r\n this.ordering = model.ordering || 1;\r\n this.isActive = false;\r\n this.title = this.i18n.tr('sales-tools-category-add-title');\r\n if (model.category) {\r\n this.title = this.i18n.tr('sales-tools-category-edit-title');\r\n this.id = model.category.id;\r\n this.slug = model.category.slug;\r\n this.ordering = model.category.ordering;\r\n this.isActive = model.category.isActive;\r\n }\r\n\r\n this.validationController.reset();\r\n }\r\n\r\n save() {\r\n this.validationController.validate().then(v => {\r\n if (!v.valid) return;\r\n\r\n this.salesTools.saveCategory(this.id, this.slug, this.ordering, this.isActive).then(() => {\r\n this.dialogController.ok({ categoryDeleted: false });\r\n }).catch(error => { });\r\n });\r\n }\r\n\r\n resetDelete() {\r\n this.showDeleteConfirm = false;\r\n this.deleteText = this.i18n.tr('delete');\r\n }\r\n\r\n deleteCategory() {\r\n if (!this.showDeleteConfirm) {\r\n this.showDeleteConfirm = true;\r\n this.deleteText = this.i18n.tr('delete-confirm');\r\n return;\r\n }\r\n\r\n this.showDeleteConfirm = false;\r\n\r\n this.salesTools.deleteCategory(this.id).then(() => {\r\n this.dialogController.ok({ categoryDeleted: true });\r\n }).catch(error => { });\r\n }\r\n}\r\n","import {inject} from 'aurelia-framework';\r\nimport {DialogController} from 'aurelia-dialog';\r\nimport {NewInstance} from 'aurelia-dependency-injection';\r\nimport {ValidationRules, ValidationController} from 'aurelia-validation';\r\nimport {BootstrapFormValidationRenderer} from 'validation/bootstrap-form-validation-renderer';\r\nimport {I18n} from 'common/i18n';\r\nimport {Notifier} from 'common/ui';\r\nimport {SalesTools} from 'services/sales-tools';\r\nimport {c} from 'common/common';\r\n\r\n@inject(DialogController, NewInstance.of(ValidationController), I18n, Notifier, SalesTools)\r\nexport class GroupEditor {\r\n\r\n id = null;\r\n categoryId = null;\r\n newCategoryId;\r\n slug = '';\r\n ordering = null;\r\n isActive = false;\r\n showDeleteConfirm = false;\r\n\r\n constructor(dialogController, validationController, i18n, notifier, salesTools) {\r\n this.dialogController = dialogController;\r\n this.dialogController.settings.centerHorizontalOnly = true;\r\n this.validationController = validationController;\r\n this.validationController.addRenderer(new BootstrapFormValidationRenderer());\r\n this.i18n = i18n;\r\n this.notifier = notifier;\r\n this.salesTools = salesTools;\r\n\r\n this.deleteText = this.i18n.tr('delete');\r\n\r\n ValidationRules\r\n .ensure('slug').required().matches(c.RegEx.slug)\r\n .ensure('ordering').required().satisfiesRule('integerRange', 1, 5000)\r\n .on(this);\r\n }\r\n\r\n activate(model) {\r\n this.id = null;\r\n this.categoryId = model.categoryId;\r\n this.newCategoryId = model.categoryId;\r\n this.categories = model.categories;\r\n this.slug = '';\r\n this.ordering = model.ordering || 1;\r\n this.isActive = false;\r\n this.title = this.i18n.tr('sales-tools-group.add-title');\r\n if (model.group) {\r\n this.title = this.i18n.tr('sales-tools-group.edit-title');\r\n this.id = model.group.id;\r\n this.slug = model.group.slug;\r\n this.ordering = model.group.ordering;\r\n this.isActive = model.group.isActive;\r\n }\r\n\r\n this.validationController.reset();\r\n }\r\n\r\n save() {\r\n this.validationController.validate().then(v => {\r\n if (!v.valid) return;\r\n\r\n this.salesTools.saveGroup(this.id, this.categoryId, this.newCategoryId, this.slug, this.ordering, this.isActive).then(() => {\r\n this.dialogController.ok({ groupDeleted: false });\r\n }).catch(error => { });\r\n });\r\n }\r\n\r\n resetDelete() {\r\n this.showDeleteConfirm = false;\r\n this.deleteText = this.i18n.tr('delete');\r\n }\r\n\r\n deleteGroup() {\r\n if (!this.showDeleteConfirm) {\r\n this.showDeleteConfirm = true;\r\n this.deleteText = this.i18n.tr('delete-confirm');\r\n return;\r\n }\r\n\r\n this.showDeleteConfirm = false;\r\n\r\n this.salesTools.deleteGroup(this.id).then(() => {\r\n this.dialogController.ok({ groupDeleted: true });\r\n }).catch(error => { });\r\n }\r\n}\r\n","import {inject} from 'aurelia-framework';\r\nimport {DialogController} from 'aurelia-dialog';\r\nimport {NewInstance} from 'aurelia-dependency-injection';\r\nimport {ValidationRules, ValidationController} from 'aurelia-validation';\r\nimport {BootstrapFormValidationRenderer} from 'validation/bootstrap-form-validation-renderer';\r\nimport {I18n} from 'common/i18n';\r\nimport {Notifier} from 'common/ui';\r\nimport {SalesTools} from 'services/sales-tools';\r\nimport {Security} from 'common/security';\r\nimport {c} from 'common/common';\r\nimport Dropzone from 'dropzone';\r\nimport environment from '../../../../config/environment.json';\r\n\r\n@inject(DialogController, NewInstance.of(ValidationController), I18n, Notifier, SalesTools, Security)\r\nexport class ToolEditor {\r\n\r\n id = null;\r\n groupId = null;\r\n newGroupId;\r\n slug = '';\r\n ordering = null;\r\n isActive = false;\r\n showDeleteConfirm = false;\r\n\r\n showUpload = false;\r\n formAction = '';\r\n fileDropzone = null;\r\n displayClearButton;\r\n\r\n constructor(dialogController, validationController, i18n, notifier, salesTools, security) {\r\n this.dialogController = dialogController;\r\n this.dialogController.settings.centerHorizontalOnly = true;\r\n this.validationController = validationController;\r\n this.validationController.addRenderer(new BootstrapFormValidationRenderer());\r\n this.i18n = i18n;\r\n this.notifier = notifier;\r\n this.salesTools = salesTools;\r\n this.security = security;\r\n\r\n this.deleteText = this.i18n.tr('delete');\r\n\r\n ValidationRules\r\n .ensure('slug').required().matches(c.RegEx.slug)\r\n .ensure('ordering').required().satisfiesRule('integerRange', 1, 5000)\r\n .on(this);\r\n }\r\n\r\n activate(model) {\r\n this.id = null;\r\n this.groupId = model.groupId;\r\n this.newGroupId = model.groupId;\r\n this.groups = model.groups;\r\n this.slug = '';\r\n this.ordering = model.ordering || 1;\r\n this.isActive = false;\r\n this.title = this.i18n.tr('sales-tools-tool.add-title');\r\n this.formAction = '';\r\n if (model.tool) {\r\n this.showUpload = true;\r\n this.title = this.i18n.tr('sales-tools-tool.edit-title');\r\n this.id = model.tool.id;\r\n this.slug = model.tool.slug;\r\n this.ordering = model.tool.ordering;\r\n this.isActive = model.tool.isActive;\r\n this.formAction = `${environment.api}/api/sales-tools/tool/${this.id}`;\r\n }\r\n\r\n if (this.showUpload && this.fileDropzone !== null) this.fileDropzone.options.url = this.formAction;\r\n\r\n this.validationController.reset();\r\n }\r\n\r\n save() {\r\n this.validationController.validate().then(v => {\r\n if (!v.valid) return;\r\n\r\n this.salesTools.saveTool(this.id, this.groupId, this.newGroupId, this.slug, this.ordering, this.isActive).then(newToolId => {\r\n if (!this.showUpload) {\r\n this.id = newToolId;\r\n this.formAction = `${environment.api}/api/sales-tools/tool/${this.id}`;\r\n this.showUpload = true;\r\n this._initializeDropzone();\r\n } else {\r\n this.dialogController.ok({ toolDeleted: false });\r\n }\r\n }).catch(error => { });\r\n });\r\n }\r\n\r\n resetDelete() {\r\n this.showDeleteConfirm = false;\r\n this.deleteText = this.i18n.tr('delete');\r\n }\r\n\r\n deleteTool() {\r\n if (!this.showDeleteConfirm) {\r\n this.showDeleteConfirm = true;\r\n this.deleteText = this.i18n.tr('delete-confirm');\r\n return;\r\n }\r\n\r\n this.showDeleteConfirm = false;\r\n\r\n this.salesTools.deleteTool(this.id).then(() => {\r\n this.dialogController.ok({ toolDeleted: true });\r\n }).catch(error => { });\r\n }\r\n\r\n attached() {\r\n this._initializeDropzone();\r\n }\r\n\r\n _initializeDropzone() {\r\n if (!this.showUpload) return;\r\n var me = this;\r\n var d = new Date();\r\n var timezoneOffset = d.getTimezoneOffset();\r\n\r\n var myDropzone = new Dropzone('#sales-tool-upload-dropzone', {\r\n dictDefaultMessage: 'Drop the sales tool file here or click the box to select the file',\r\n url: this.formAction,\r\n paramName: 'file',\r\n maxFilesize: 15, // MB\r\n headers: { 'Authorization': 'Bearer ' + me.security.token, 'X-LEGACY-TimezoneOffset': timezoneOffset },\r\n acceptedFiles: 'application/pdf,application/zip,application/x-zip,application/x-zip-compressed,application/x-compressed,application/octet-stream,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\r\n maxFiles: 1,\r\n init: function () {\r\n this.on('addedfile', function (file) {\r\n //console.log(\"added file.\");\r\n });\r\n this.on('success', function (file, response) {\r\n this.removeFile(file);\r\n me.notifier.successText('Sales tool file imported');\r\n });\r\n this.on('error', function (file, error, x) {\r\n me.displayClearButton = true;\r\n me.notifier.errorText('Error importing the sales tool file.
' + error.message);\r\n });\r\n }\r\n });\r\n\r\n me.fileDropzone = myDropzone;\r\n }\r\n\r\n clearZone() {\r\n this.fileDropzone.removeAllFiles();\r\n this.displayClearButton = false;\r\n }\r\n}\r\n","import { PLATFORM } from 'aurelia-pal';\r\nimport {inject} from 'aurelia-framework';\r\nimport {I18n} from 'common/i18n';\r\n\r\n@inject(I18n)\r\nexport class SalesToolsIndex {\r\n _i18n;\r\n\r\n constructor(i18n) {\r\n this._i18n = i18n;\r\n }\r\n\r\n configureRouter(config, router){\r\n config.map([\r\n {\r\n route: '',\r\n moduleId: PLATFORM.moduleName('members/sales-tools/all'),\r\n title: this._i18n.tr('sales-tools-all-title'),\r\n nav: false,\r\n settings: { canAddToMobileMenu: false }\r\n }\r\n ]);\r\n\r\n this.router = router;\r\n }\r\n}\r\n","import { bindable } from 'aurelia-framework';\r\nimport { Notifier } from 'common/ui';\r\nimport { AgentSites, AGENT_SITE_TYPE } from 'services/agent-sites';\r\nimport copy from 'copy-to-clipboard';\r\n\r\nexport class MyBizCardOnline {\r\n static inject = [Notifier, AgentSites];\r\n _notifier;\r\n _agentSites;\r\n\r\n @bindable memberId;\r\n\r\n constructor(notifier, agentSites) {\r\n this._notifier = notifier;\r\n this._agentSites = agentSites;\r\n }\r\n\r\n async attached() {\r\n this._isAttached = true;\r\n await this._load();\r\n }\r\n\r\n memberIdChanged() {\r\n if (!this._isAttached) return;\r\n this._load();\r\n }\r\n\r\n async _load() {\r\n if (!this.memberId) return;\r\n try {\r\n this.status = await this._agentSites.status(AGENT_SITE_TYPE.MyBizCardOnline, this.memberId);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async createMyBizCard() {\r\n try {\r\n this.creating = true;\r\n this.status = await this._agentSites.createExternal(AGENT_SITE_TYPE.MyBizCardOnline, this.memberId);\r\n } catch (err) {\r\n console.log(err);\r\n this._notifier.error(err);\r\n } finally {\r\n this.creating = false;\r\n }\r\n }\r\n\r\n copyToClipboard() {\r\n\t copy(this.status.url);\r\n this._notifier.success('mbco-url-copy-success');\r\n }\r\n}","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".zeus-policy-icon i {\\n font-size: 100px;\\n}\\n@media screen and (min-width: 768px) {\\n .zeus-policy-icon i {\\n font-size: 160px;\\n }\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/members/policies/policy-card.scss\"],\"names\":[],\"mappings\":\"AAGI;EACI,gBAAA;AAFR;AAIQ;EAHJ;IAIQ,gBAAA;EADV;AACF\",\"sourcesContent\":[\"@import \\\"./../../styles/responsive.scss\\\";\\r\\n\\r\\n.zeus-policy-icon {\\r\\n i {\\r\\n font-size: 100px;\\r\\n\\r\\n @media screen and (min-width: $zeus-screen-sm-min) {\\r\\n font-size: 160px;\\r\\n }\\r\\n }\\r\\n}\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}