{"version":3,"file":"app-11bb03a6.9729664bca28a8e6916d.bundle.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAYA;AACA;AAAA;AAXA;AACA;AACA;AAAA;AAAA;AAAA;AAUA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAxCA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;;;AChBA;AACA;AACA;AAEA;AAQA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AApHA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;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AA;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACPA;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","sources":["webpack://www.zeusteam.com/./src/resources/elements/bonus-progress/downline-bonus-progress.js","webpack://www.zeusteam.com/./src/resources/elements/bonus-progress/monthly-bonus-progress.js","webpack://www.zeusteam.com/./src/resources/elements/calendar/my-booking-calendar-button.js","webpack://www.zeusteam.com/./src/resources/elements/cards/card-reminder-button.js","webpack://www.zeusteam.com/./src/resources/elements/cards/card-toolbar.js","webpack://www.zeusteam.com/./src/resources/elements/bonus-progress/monthly-bonus-progress.scss","webpack://www.zeusteam.com/./src/resources/elements/calendar/my-booking-calendar-button.scss","webpack://www.zeusteam.com/./src/resources/elements/cards/card-toolbar.scss","webpack://www.zeusteam.com/./src/resources/elements/bonus-progress/downline-bonus-progress.html","webpack://www.zeusteam.com/./src/resources/elements/bonus-progress/monthly-bonus-progress.html","webpack://www.zeusteam.com/./src/resources/elements/calendar/my-booking-calendar-button.html","webpack://www.zeusteam.com/./src/resources/elements/cards/card-reminder-button.html","webpack://www.zeusteam.com/./src/resources/elements/cards/card-toolbar.html"],"sourcesContent":["import { bindable } from 'aurelia-framework';\r\nimport { Router } from 'aurelia-router';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { Security } from 'common/security';\r\nimport { Bonuses } from 'services/bonuses';\r\nimport { TimePeriodNavigatorBase } from 'resources/base-classes/time-period-navigator-base';\r\nimport { WIDGET, REPORT_TIME_PERIOD } from 'common/constants';\r\n\r\nexport class DownlineBonusProgress extends TimePeriodNavigatorBase {\r\n static inject = [Router, EventAggregator, Security, Bonuses];\r\n _router;\r\n _security;\r\n _bonuses;\r\n\r\n @bindable view;\r\n @bindable sync;\r\n @bindable priorMonthsAllowed;\r\n\r\n timePeriod = REPORT_TIME_PERIOD.MTD;\r\n\r\n constructor(router, ea, security, bonuses) {\r\n super('downline-bonus-progress', ea);\r\n this._router = router;\r\n this._security = security;\r\n this._bonuses = bonuses;\r\n }\r\n\r\n attached() {\r\n this._isAttached = true;\r\n this._attached();\r\n this._loadData();\r\n }\r\n\r\n viewChanged() {\r\n if (!this._isAttached) return;\r\n this._loadData();\r\n }\r\n\r\n async _loadData(fromSync = false) {\r\n if (!this.view) return;\r\n try {\r\n this.loading = true;\r\n this.initializeTimePeriodNavigation(fromSync);\r\n\r\n this.progress = await this._bonuses.downlinePersonal(this._security.authenticatedMemberId, this.view, this.asOfDate.toISOString(true));\r\n\r\n this.currentPeriod = this.progress.bonusPeriod;\r\n this.setTimePeriodNavigationDisplays();\r\n } catch (err) {\r\n console.log(err);\r\n } finally {\r\n this.loading = false;\r\n }\r\n }\r\n}\r\n","import { bindable } from 'aurelia-framework';\r\nimport Chart from 'chart.js/auto';\r\nimport annotationPlugin from 'chartjs-plugin-annotation';\r\n\r\nexport class MonthlyBonusProgress {\r\n @bindable data;\r\n @bindable showTitle = true;\r\n @bindable requiresPlacement = true;\r\n @bindable formatGoalAs = 'money';\r\n @bindable pad = 5000;\r\n chartEl;\r\n\r\n constructor() {\r\n Chart.register(annotationPlugin);\r\n }\r\n\r\n dataChanged() {\r\n if (!this.data) return;\r\n this._loadChart();\r\n }\r\n\r\n attached() {\r\n this._loadChart();\r\n }\r\n\r\n _loadChart() {\r\n if (!this.data || !this.chartEl) return;\r\n\r\n let max = 0;\r\n const datasets = [];\r\n const annotations = {};\r\n let annotationIndex = 1;\r\n let bgColorQualified;\r\n let bgColorNotQualified;\r\n if (this.requiresPlacement) {\r\n bgColorQualified = this.data.placementReached ? 'Green' : 'Red';\r\n bgColorNotQualified = this.data.placementReached ? 'rgba(0, 255, 0, 0.2)' : 'rgba(255, 0, 0, 0.2)';\r\n } else {\r\n bgColorQualified = 'Green';\r\n bgColorNotQualified = 'rgba(0, 255, 0, 0.2)';\r\n }\r\n const borderColor = bgColorQualified;\r\n this.data.goals.forEach(g => {\r\n max = g.minimumBonusCredit + this.pad;\r\n let formattedLabel = `$${g.bonus}`;\r\n switch (this.formatGoalAs) {\r\n case 'percentage': formattedLabel = `${g.bonusPercentage}%`; break;\r\n default: break;\r\n }\r\n datasets.push({\r\n label: '',\r\n data: [g.progress],\r\n backgroundColor: [g.qualifiedForBonus ? bgColorQualified : bgColorNotQualified],\r\n borderColor: [borderColor],\r\n borderWidth: 1,\r\n });\r\n annotations[`goal${annotationIndex++}`] = {\r\n type: 'line',\r\n scaleID: 'x',\r\n value: g.minimumBonusCredit,\r\n borderWidth: 2,\r\n borderColor: 'Black',\r\n label: {\r\n content: formattedLabel,\r\n enabled: true,\r\n },\r\n };\r\n });\r\n\r\n if (this._chart) {\r\n this._chart.data.datasets = datasets;\r\n this._chart.options.scales.x.max = max;\r\n this._chart.options.plugins.annotation.annotations = annotations;\r\n this._chart.update();\r\n return;\r\n }\r\n\r\n const config = {\r\n type: 'bar',\r\n data: {\r\n labels: [''],\r\n datasets,\r\n },\r\n options: {\r\n indexAxis: 'y',\r\n responsive: true,\r\n interaction: {\r\n intersects: false,\r\n },\r\n scales: {\r\n y: {\r\n beginAtZero: true,\r\n stacked: true,\r\n },\r\n x: {\r\n max,\r\n ticks: {\r\n callback: function(val, index) {\r\n return `$${this.getLabelForValue(val)}`;\r\n },\r\n },\r\n },\r\n },\r\n plugins: {\r\n legend: { display: false },\r\n tooltip: {\r\n callbacks: {\r\n label: (ctx) => {\r\n return `$${ctx.formattedValue}`;\r\n },\r\n },\r\n },\r\n annotation: {\r\n annotations,\r\n },\r\n },\r\n }\r\n };\r\n\r\n this._chart = new Chart(this.chartEl, config);\r\n }\r\n}\r\n","import { bindable } from 'aurelia-framework';\r\nimport { Calendar } from 'services/calendar';\r\nimport { MemberConfig } from 'services/member-config';\r\nimport { Notifier } from 'common/ui';\r\nimport { defineCustomElement } from '@nylas/web-elements/dist/cdn/nylas-scheduling/nylas-scheduling.es';\r\n\r\nexport class MyBookingCalendarButton {\r\n static inject = [Calendar, MemberConfig, Notifier];\r\n _calendar;\r\n _memberConfig;\r\n _notifier;\r\n\r\n @bindable bookName;\r\n @bindable bookEmail;\r\n @bindable bookPhone;\r\n @bindable bookAddress;\r\n @bindable bookDob;\r\n @bindable buttonClass = 'btn btn-icon btn-outline me-3';\r\n @bindable buttonText;\r\n @bindable iconClass = 'fs-3 fa-duotone fa-calendar-days';\r\n @bindable settingKey;\r\n @bindable meSize = '3';\r\n\r\n\tconstructor(calendar, memberConfig, notifier) {\r\n this._calendar = calendar;\r\n this._memberConfig = memberConfig;\r\n this._notifier = notifier;\r\n\t}\r\n\r\n attached() {\r\n this._initializeNylas();\r\n }\r\n\r\n _initializeNylas() {\r\n try {\r\n defineCustomElement();\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n async openBookingCalendar() {\r\n try {\r\n if (!this._bookingCalendarConfigurationId && this.settingKey) this._bookingCalendarConfigurationId = await this._memberConfig.value(this.settingKey);\r\n if (!this._bookingCalendarConfigurationId) {\r\n this._notifier.info('lead-scheduler-not-set-up', undefined, true);\r\n return;\r\n }\r\n this.nylasSchedulingContainerEl.innerHTML = '';\r\n const nylasSchedulingEl = document.createElement('nylas-scheduling');\r\n nylasSchedulingEl.schedulerApiUrl = 'https://api.us.nylas.com';\r\n nylasSchedulingEl.configurationId = this._bookingCalendarConfigurationId;\r\n nylasSchedulingEl.bookingInfo = {\r\n primaryParticipant: { name: this.bookName, email: this.bookEmail }\r\n }\r\n\r\n this.nylasSchedulingContainerEl.appendChild(nylasSchedulingEl);\r\n this.showLightbox = true;\r\n this.lightboxVM.open(true, false);\r\n } catch (err) {\r\n console.log(err);\r\n this.lightboxClosed();\r\n }\r\n }\r\n\r\n lightboxClosed() {\r\n this.showLightbox = false;\r\n }\r\n}\r\n","import { bindable } from 'aurelia-framework';\r\nimport { PLATFORM } from 'aurelia-pal';\r\nimport { DialogService } from 'aurelia-dialog';\r\nimport { EditToDo } from 'resources/elements/to-dos/dialogs/edit-to-do';\r\nPLATFORM.moduleName('resources/elements/to-dos/dialogs/edit-to-do');\r\n\r\n\r\nexport class CardReminderButton {\r\n static inject = [DialogService];\r\n _dialogService;\r\n\r\n @bindable aboutId;\r\n @bindable aboutType;\r\n @bindable aboutName;\r\n @bindable meSize = '3';\r\n @bindable outline = true;\r\n\r\n\tconstructor(dialogService) {\r\n this._dialogService = dialogService;\r\n\t}\r\n\r\n addToDo() {\r\n const model = { type: this.aboutType, aboutId: this.aboutId, aboutName: this.aboutName, toDo: undefined };\r\n this._dialogService.open({ viewModel: EditToDo, model, ignoreTransitions: true });\r\n }\r\n}\r\n","import { bindable } from 'aurelia-framework';\r\n\r\nexport class CardToolbar {\r\n static inject = [Element];\r\n _element;\r\n\r\n @bindable icon = 'fa-duotone fa-square-ellipsis';\r\n @bindable actions = [];\r\n\r\n constructor(element) {\r\n this._element = element;\r\n }\r\n\r\n actionClicked(action) {\r\n this._element.dispatchEvent(new CustomEvent('action', { bubbles: true, detail: action }));\r\n this.closeMenu = new Date().getTime();\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, \"monthly-bonus-progress {\\n width: 100%;\\n max-width: 100%;\\n}\\n@media (min-width: 768px) {\\n monthly-bonus-progress {\\n width: 400px;\\n }\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/resources/elements/bonus-progress/monthly-bonus-progress.scss\"],\"names\":[],\"mappings\":\"AAEA;EACI,WAAA;EACA,eAAA;AADJ;AAGI;EAJJ;IAKQ,YAAA;EAAN;AACF\",\"sourcesContent\":[\"@import \\\"./../../../styles/responsive.scss\\\";\\r\\n\\r\\nmonthly-bonus-progress {\\r\\n width: 100%;\\r\\n max-width: 100%;\\r\\n\\r\\n @media (min-width: $zeus-screen-sm-min) {\\r\\n width: 400px;\\r\\n }\\r\\n}\\r\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\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-booking-calendar-button-container {\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/resources/elements/calendar/my-booking-calendar-button.scss\"],\"names\":[],\"mappings\":\"AAAA;EACI,aAAA;EACA,uBAAA;EACA,mBAAA;AACJ\",\"sourcesContent\":[\".zeus-booking-calendar-button-container {\\r\\n display: flex;\\r\\n justify-content: center;\\r\\n align-items: center;\\r\\n}\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\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, \"card-toolbar {\\n display: flex;\\n align-items: center;\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/resources/elements/cards/card-toolbar.scss\"],\"names\":[],\"mappings\":\"AAAA;EACI,aAAA;EACA,mBAAA;AACJ\",\"sourcesContent\":[\"card-toolbar {\\r\\n display: flex;\\r\\n align-items: center;\\r\\n}\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Module\nvar code = \"\\r\\n \\r\\n \\r\\n \\r\\n ${`widget-view-${view}`&t}\\r\\n ${'downline-bonus-progress-title'&t}\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n ${timePeriodDisplay}\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n ${'apps'&t}: ${record.bonus.apps}\\r\\n ${'placement-abbr'&t}: ,${'persistency-abbr'&t}: \\r\\n \\r\\n ${record.bonus.currentBonus|formatMoney}\\r\\n \\r\\n \\r\\n ${'downline-bonus-no-records'&t}\\r\\n \\r\\n \\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n \\r\\n ${'monthly-bonus-progress-title'|t}\\r\\n \\r\\n \\r\\n \\r\\n ${'monthly-bonus-progress-below-placement'|t}\\r\\n\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n \\r\\n ${buttonText}\\r\\n \\r\\n \\r\\n \\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n \\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n ${action.name&t}\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\";\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}