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IACvDxK,KAAKkK,GACK,IAAI/H,EAAAA,EAAe,CACtBC,YAAa7D,KAAK8F,KAAK+C,EAAE,GAADrE,OAAImH,EAAMO,sBAClC/J,QAASwJ,EAAM7H,KACfG,KAAM0H,EAAM1H,KACZ2E,MAAO5I,KAAK8F,KAAKQ,aAAaqF,EAAMM,aAAc,CAC9CE,OAAQ,wBAEZnI,MAAO,CACHoI,QAAST,EAAMxF,GACfkG,MAAOV,EAAMU,UAMrC,GACH1G,GAAAlB,EAAAA,EAAAA,GAAAvB,EAAAwB,UAAA,QArCIyC,EAAAA,QAAO,CAAAC,cAAA,EAAAC,YAAA,EAAAC,UAAA,EAAAC,YAAA,OAAA3B,GAAAnB,EAAAA,EAAAA,GAAAvB,EAAAwB,UAAA,UACPyC,EAAAA,QAAO,CAAAC,cAAA,EAAAC,YAAA,EAAAC,UAAA,EAAAC,YAAA,OAAArE,E,qFCDG,MAAMoJ,UAA4BjC,EAAAA,QAAU7E,WAAAA,GAAA,SAAAC,YACvD6E,EAAAA,EAAAA,GAAA,eACUiC,EAAAA,yBAAwB,CAElC/B,KAAAA,GACI,MAAO,CACHiB,OAAQzL,KAAKwM,MAAMC,QAAQ,8BAEnC,CAEA,gBAAMC,CAAWlC,GACb,MAAMiB,SAAgBjB,EAAMiB,QAAQC,QAGd,IAAlBD,EAAO3K,QACPd,KAAK+J,OAAOC,aAAayB,EAAO,GAAGY,MAAOZ,EAAO,GAAGtF,GAE5D,E","sources":["./components/map/safety-map/index.hbs","./components/map/safety-map/index.ts","./components/personal-safety/location/history/index.hbs","./components/personal-safety/location/history/index.ts","./components/personal-safety/location/index.hbs","./components/personal-safety/location/index.ts","./components/personal-safety/customer-info/index.hbs","./components/personal-safety/customer-info/index.ts","./operator/personal-safety/template.hbs","./operator/select-alarm/template.hbs","./assets/_route_/operator.index.js","./operator/index/route.ts","./operator/personal-safety/controller.ts","./operator/personal-safety/route.ts","./operator/select-alarm/controller.ts","./operator/select-alarm/route.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n\",{ moduleName: \"customer-site/components/map/safety-map/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport { LocationType } from 'customer-site/models/personal-safety/location';\nimport BaseMapComponent from '../base-map/index';\n\nimport type { GeographicDatum } from '../base-map/index';\nimport './_style.scss';\n\nconst DASHED_LINE_COLOR = '#767676';\nconst START_SVG = `
\n \n \n \n
`;\nconst CURRENT_PIN_SVG = `
\n \n \n \n
`;\nconst MIN_POINTS_FOR_DASHED_LINE = 2;\n\nexport default class PersonalSafetyMapComponent extends BaseMapComponent {\n /** @override */\n clearAndUpdateMarkers(updatedGeographicData: GeographicDatum[]): void {\n this.clearMap();\n\n if (!this.args.geographicData || !this.hMap) {\n return;\n }\n\n const mapData = updatedGeographicData.filter((d) => d.longitude && d.latitude);\n\n this.addDomMarkers(mapData);\n\n this.setViewPortPlusMargin(mapData, this.hMap);\n\n this.addDashedLineToMap(mapData);\n }\n\n private addDashedLineToMap(mapData: GeographicDatum[]): void {\n if (mapData.length < MIN_POINTS_FOR_DASHED_LINE) {\n return;\n }\n\n const lineString = new H.geo.LineString();\n\n mapData.forEach((marker) => {\n lineString.pushPoint({\n lat: marker.latitude,\n lng: marker.longitude\n });\n });\n\n // eslint-disable-next-line ember/no-array-prototype-extensions\n this.hMap?.addObject(\n new H.map.Polyline(lineString, {\n style: {\n fillColor: DASHED_LINE_COLOR,\n strokeColor: DASHED_LINE_COLOR,\n lineWidth: 3,\n lineDash: [2]\n }\n })\n );\n }\n\n /**\n * Creates the icon for the DomMarker for the given geographicDatum.\n * @override\n */\n getDomIcon(geographicDatum: GeographicDatum): H.map.DomIcon {\n if (geographicDatum.details?.customType === LocationType.LOCATION_CURRENT) {\n return new H.map.DomIcon(CURRENT_PIN_SVG);\n }\n\n return new H.map.DomIcon(START_SVG);\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Map::SafetyMap': typeof PersonalSafetyMapComponent;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n <:action-button>\\n \\n \\n\\n <:default>\\n \\n \\n <:icon>\\n \\n \\n\\n <:value>\\n \\n {{item.props.location.latitude}}, {{item.props.location.longitude}}\\n \\n\\n \\n \\n \\n \\n \\n\\n\",{ moduleName: \"customer-site/components/personal-safety/location/history/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport SimpleListItem from '@adc/ui-components/components/simple-list/list-item';\n\nimport type { GeographicDatum, IconColors } from 'customer-site/components/map/base-map/index';\n\ninterface ListItem {\n icon: string;\n iconColor?: IconColors;\n location: GeographicDatum;\n}\n\ninterface SafetyButtonLocationHistorySignature {\n Args: {\n history: GeographicDatum[];\n refreshAction: (e: MouseEvent | KeyboardEvent) => unknown;\n };\n}\n\n/**\n * @classdesc\n * Component for the personal safety location history list\n */\nexport default class SafetyButtonLocationHistory extends Component {\n /**\n * Maps the location history to a list of SimpleListItems to be rendered.\n */\n get historyList(): SimpleListItem[] {\n return this.args.history.map(\n (location): SimpleListItem =>\n new SimpleListItem({\n description: location.details?.name ?? '',\n details: location.details?.date,\n props: {\n icon: location.details?.icon || 'location',\n iconColor: location.details?.iconColor,\n location\n }\n })\n );\n }\n\n /**\n * Copies the coordinates of the location to the clipboard.\n */\n @action\n async copyLocation(item: SimpleListItem): Promise {\n await navigator.clipboard.writeText(`${item.props.location.latitude}, ${item.props.location.longitude}`);\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'PersonalSafety::Location::History': typeof SafetyButtonLocationHistory;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n {{#unless this.isTestEnvironment}}\\n \\n {{/unless}}\\n\\n \\n
\\n\",{ moduleName: \"customer-site/components/personal-safety/location/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { cached } from '@glimmer/tracking';\nimport { inject as service } from '@ember/service';\nimport { LocationType } from 'customer-site/models/personal-safety/location';\nimport { intlPath } from '@adc/i18n/path';\n\nimport type { GeographicDatum, GeographicDatumDetails } from 'customer-site/components/map/base-map/index';\nimport './_style.scss';\nimport type { Registry as ServiceRegistry } from '@ember/service';\nimport type SafetyLocation from 'customer-site/models/personal-safety/location';\nimport type { TrackedArray } from 'tracked-built-ins';\n\ninterface PersonalSafetyLocationSignature {\n Args: {\n history: TrackedArray;\n refreshAction: (e: MouseEvent | KeyboardEvent) => unknown;\n };\n}\n\n/**\n * @classdesc\n * Component for the personal safety location history and location map\n */\n@intlPath({ path: 'personal-safety' })\nexport default class PersonalSafetyLocation extends Component {\n @service declare envSettings: ServiceRegistry['env-settings'];\n @service declare intl: ServiceRegistry['adc-intl'];\n\n /**\n * Map of details for each location type\n */\n @cached\n get LocationTypesDetails(): Record> {\n return {\n [LocationType.LOCATION_CURRENT]: {\n name: this.intl.tc(this, 'currentLocation'),\n icon: 'location',\n iconColor: 'blue'\n },\n [LocationType.LOCATION_START]: {\n name: this.intl.tc(this, 'startingLocation'),\n icon: 'activity-event'\n }\n };\n }\n\n /**\n * Maps the location history to a list of geographic markers used by the map component\n */\n get geographicMarkers(): GeographicDatum[] {\n return this.args.history.map(\n (location, index): GeographicDatum => ({\n id: `${index + 1}`,\n latitude: location.latitude,\n longitude: location.longitude,\n details: {\n ...this.LocationTypesDetails[location.locationType],\n customType: location.locationType,\n date: this.intl.formatDateTz(location.eventTime, {\n hour: 'numeric',\n minute: '2-digit'\n })\n }\n })\n );\n }\n\n /**\n * Returns the date of the first location event in the history\n */\n get startDate(): string {\n const date = this.args.history.objectAt(0)?.eventTime;\n\n if (!date) {\n return '';\n }\n\n return this.intl.formatDateTz(date, {\n dateStyle: 'full',\n timeStyle: 'full'\n });\n }\n\n /**\n * Check if test environment to render the HereMaps map\n * In test env, requests are mocked, external requests to 3rd party can not be done and the map can not be rendered\n */\n get isTestEnvironment(): boolean {\n return this.envSettings.isTestEnvironment();\n }\n\n // TODO: MSS-1256 make this method optional at base-map component refactoring\n getIconClassAndId(item: GeographicDatum): { id: string; iconClass: string; style: string | null } {\n return {\n id: item.id,\n iconClass: '',\n style: null\n };\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'PersonalSafety::Location': typeof PersonalSafetyLocation;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n \\n\\n\\n{{#if this.hasContacts}}\\n \\n {{#if this.primaryEmergencyContactsList}}\\n

{{t \\'generic.primary\\'}}

\\n \\n {{/if}}\\n\\n {{#if this.secondaryEmergencyContactsList}}\\n

{{t \\'generic.secondary\\'}}

\\n \\n {{/if}}\\n \\n{{/if}}\\n\",{ moduleName: \"customer-site/components/personal-safety/customer-info/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { inject as service } from '@ember/service';\nimport SafetyButtonCustomerProfile from 'customer-site/models/safety-button/customer-profile';\nimport SimpleListItem from '@adc/ui-components/components/simple-list/list-item';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { AsyncBelongsTo } from '@ember-data/model';\nimport type PersonalSafetyEmergencyContact from 'customer-site/models/personal-safety/emergency-contact';\nimport type PersonalSafetyUserProfile from 'customer-site/models/personal-safety/user-profile';\n\ninterface PersonalSafetyLocationSignature {\n Args: {\n customer: Awaited>;\n };\n}\n\n/**\n * @classdesc\n * Component for the personal safety customer/user information\n */\nexport default class PersonalSafetyCustomerInfo extends Component {\n @service declare intl: ADCIntlService;\n\n /**\n * Maps the customer information to a list of SimpleListItems to be rendered.\n */\n get customerInfoList(): SimpleListItem[] {\n return this.getPersonRow(this.args.customer);\n }\n\n /**\n * Checks if the customer has emergency contacts.\n */\n get hasContacts(): boolean {\n const contacts = this.args.customer.emergencyContacts;\n\n return contacts.isFulfilled && contacts.content.length > 0;\n }\n\n /**\n * Gets the primary emergency contact as SimpleListItems to be rendered.\n */\n get primaryEmergencyContactsList(): SimpleListItem[] {\n return this.getEmergencyContactsList();\n }\n\n /**\n * Gets the secondary emergency contact as SimpleListItems to be rendered.\n */\n get secondaryEmergencyContactsList(): SimpleListItem[] {\n return this.getEmergencyContactsList(false);\n }\n\n /**\n * Filters the emergency contacts to make sure they are primary or secondary, maps the emergency contacts to a list of SimpleListItems to be rendered.\n */\n private getEmergencyContactsList(isPrimary = true): SimpleListItem[] {\n return this.args.customer.emergencyContacts\n .filter((contact) => contact.isPrimary === isPrimary)\n .map((contact) => this.getPersonRow(contact))\n .flat();\n }\n\n /**\n * Maps the person to a list of SimpleListItems to be rendered.\n */\n private getPersonRow(person: PersonalSafetyUserProfile | PersonalSafetyEmergencyContact): SimpleListItem[] {\n const getItem = (key: string, value: string) =>\n new SimpleListItem({\n description: this.intl.t(key) + ':',\n value\n }),\n list = [getItem('generic.name', person.fullName), getItem('generic.phoneNumber', person.phoneNumber)];\n\n if (person instanceof SafetyButtonCustomerProfile) {\n list.push(getItem('generic.pinCode', person.pinCode));\n }\n\n return list;\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'PersonalSafety::CustomerInfo': typeof PersonalSafetyCustomerInfo;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n \\n <:default>\\n {{#if this.personalSafety.locations}}\\n \\n {{/if}}\\n\\n {{#if this.personalSafety.customerProfile}}\\n \\n {{/if}}\\n \\n\\n <:loading as |PageViewLoading|>\\n \\n \\n\\n <:error as |PageViewError|>\\n \\n \\n \\n\\n\",{ moduleName: \"customer-site/operator/personal-safety/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n \\n <:default>\\n \\n <:action-button>\\n <:default>\\n \\n \\n \\n <:value>\\n \\n {{item.value}}\\n \\n \\n \\n \\n \\n\\n {{#if (eq this.alarmsList.length 0)}}\\n {{t \\\"generic.noItems\\\" type=(t \\\"generic.alarms\\\")}}\\n {{/if}}\\n \\n \\n \\n\\n <:loading as |PageViewLoading|>\\n \\n \\n\\n <:error as |PageViewError|>\\n \\n \\n \\n\\n\",{ moduleName: \"customer-site/operator/select-alarm/template.hbs\" })","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nd(\"customer-site/operator/index/route\", function(){ return i(\"customer-site/operator/index/route.ts\");});\nd(\"customer-site/operator/personal-safety/template\", function(){ return i(\"customer-site/operator/personal-safety/template.hbs\");});\nd(\"customer-site/operator/personal-safety/controller\", function(){ return i(\"customer-site/operator/personal-safety/controller.ts\");});\nd(\"customer-site/operator/personal-safety/route\", function(){ return i(\"customer-site/operator/personal-safety/route.ts\");});\nd(\"customer-site/operator/select-alarm/template\", function(){ return i(\"customer-site/operator/select-alarm/template.hbs\");});\nd(\"customer-site/operator/select-alarm/controller\", function(){ return i(\"customer-site/operator/select-alarm/controller.ts\");});\nd(\"customer-site/operator/select-alarm/route\", function(){ return i(\"customer-site/operator/select-alarm/route.ts\");});\n","import EmberRoute from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\nimport { OperatorLandingPageRoute } from 'customer-site/enums/Operator';\n\nimport type RouterService from '@ember/routing/router-service';\n\n/**\n * @classdesc\n * Route for redirecting from /operator index to the Operator landing page\n */\nexport default class OperatorRoute extends EmberRoute {\n @service declare router: RouterService;\n\n beforeModel(): void {\n this.router.transitionTo(OperatorLandingPageRoute);\n }\n}\n","import EmberController from '@ember/controller';\nimport { inject as service } from '@ember/service';\n\nimport type PersonalSafetyService from 'customer-site/services/personal-safety';\nimport type { ModelFrom } from 'customer-site/utils/type-utils';\nimport type PersonalSafetyRoute from './route';\n\n/**\n * @classdesc\n * Controller for the personal-safety page.\n * Displays the location history and the customer profile information.\n */\nexport default class PersonalSafetyController extends EmberController {\n @service declare personalSafety: PersonalSafetyService;\n\n declare model: ModelFrom;\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your controllers.\ndeclare module '@ember/controller' {\n interface Registry {\n 'operator/personal-safety': PersonalSafetyController;\n }\n}\n","import { inject as service } from '@ember/service';\nimport BaseRoute from 'customer-site/classes/base-route';\nimport { EmberOperatorPersonalSafety } from 'customer-site/enums/CustomerPageUrl';\n\nimport type Transition from '@ember/routing/transition';\nimport type PersonalSafetySession from 'customer-site/models/personal-safety/session';\nimport type PersonalSafetyService from 'customer-site/services/personal-safety';\nimport type { TaskInstance } from 'ember-concurrency';\n\ntype PersonalSafetyRouteModel = {\n session: TaskInstance;\n};\n\n/**\n * @classdesc\n * Route for Personal Safety page.\n * Loads the session for the alarm.\n */\nexport default class PersonalSafetyRoute extends BaseRoute {\n @service declare personalSafety: PersonalSafetyService;\n\n /** @override */\n routeId = EmberOperatorPersonalSafety;\n\n /** @override */\n model(_params: never, transition: Transition): PersonalSafetyRouteModel {\n return {\n session: this.personalSafety.loadSessionTask.perform(transition.to.params.id_alarm!)\n };\n }\n}\n","import Controller from '@ember/controller';\nimport { inject as service } from '@ember/service';\nimport { AlarmType } from 'customer-site/models/personal-safety/alarm-link';\nimport SimpleListItem from '@adc/ui-components/components/simple-list/list-item';\n\nimport type { Registry as ServiceRegistry } from '@ember/service';\nimport type { ModelFrom, ResolvedModelFrom } from 'customer-site/utils/type-utils';\nimport type Route from './route';\n\n/**\n * @classdesc\n * Controller for the Operator landing page\n * Gathers and lists the available alarms\n */\nexport default class OperatorSelectAlarmController extends Controller {\n @service declare intl: ServiceRegistry['adc-intl'];\n @service declare router: ServiceRegistry['router'];\n\n declare model: ModelFrom;\n resolvedModel?: ResolvedModelFrom;\n\n /**\n * Filters the alarm links to make that the type exists, sorts the list to have the oldest first,\n * Maps the alarm links to a list of SimpleListItems to be rendered.\n */\n get alarmsList(): SimpleListItem<{ alarmId: string; route: string }>[] {\n if (this.resolvedModel === undefined) {\n return [];\n }\n\n const alarmTypes = Object.values(AlarmType),\n alarms = this.resolvedModel.alarms\n .slice()\n .filter((alarm) => alarmTypes.includes(alarm.alarmType))\n .sort((a, b) => (a.eventDateUtc < b.eventDateUtc ? -1 : 1))\n .map((alarm) => {\n return new SimpleListItem({\n description: this.intl.t(`${alarm.labelTranslationKey}`),\n details: alarm.name,\n icon: alarm.icon,\n value: this.intl.formatDateTz(alarm.eventDateUtc, {\n format: 'shortDateTimeFormat'\n }),\n props: {\n alarmId: alarm.id,\n route: alarm.route\n }\n });\n });\n\n return alarms;\n }\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your controllers.\ndeclare module '@ember/controller' {\n interface Registry {\n 'operator/select-alarm': OperatorSelectAlarmController;\n }\n}\n","import BaseRoute from 'customer-site/classes/base-route';\nimport { EmberOperatorSelectAlarm } from 'customer-site/enums/CustomerPageUrl';\n\nimport type PersonalSafetyAlarmLink from 'customer-site/models/personal-safety/alarm-link';\nimport type { ModelFrom } from 'customer-site/utils/type-utils';\n\ninterface OperatorSelectAlarmRouteModel {\n alarms: ADCAsyncStoreFindAll;\n}\n\n/**\n * @classdesc\n * Route for the Operator landing page that list the available alarms\n * Retrieves all alarms and transitions to the alarm specific route if only one alarm is available\n */\nexport default class OperatorAlarmsRoute extends BaseRoute {\n /** @override */\n routeId = EmberOperatorSelectAlarm;\n\n model(): OperatorSelectAlarmRouteModel {\n return {\n alarms: this.store.findAll('personal-safety/alarm-link')\n };\n }\n\n async afterModel(model: ModelFrom): Promise {\n const alarms = (await model.alarms).slice();\n\n // If there is only one alarm, transition to the personal safety page for that alarm\n if (alarms.length === 1) {\n this.router.transitionTo(alarms[0].route, alarms[0].id);\n }\n }\n}\n"],"names":["createTemplateFactory","scope","didInsert_","willDestroy_","didResize_","didUpdate_","DASHED_LINE_COLOR","PersonalSafetyMapComponent","BaseMapComponent","clearAndUpdateMarkers","updatedGeographicData","this","clearMap","args","geographicData","hMap","mapData","filter","d","longitude","latitude","addDomMarkers","setViewPortPlusMargin","addDashedLineToMap","_this$hMap","length","lineString","H","geo","LineString","forEach","marker","pushPoint","lat","lng","addObject","map","Polyline","style","fillColor","strokeColor","lineWidth","lineDash","getDomIcon","geographicDatum","_geographicDatum$deta","details","customType","LocationType","LOCATION_CURRENT","DomIcon","setComponentTemplate","TEMPLATE","uiActionableCard_","t_","buttonIcon_","simpleList_","simpleListItem_","svgSymbol_","fn","SafetyButtonLocationHistory","_class","Component","historyList","history","location","_location$details$nam","_location$details","_location$details2","_location$details3","_location$details4","SimpleListItem","description","name","date","props","icon","iconColor","copyLocation","item","navigator","clipboard","writeText","concat","_applyDecoratedDescriptor","prototype","action","Object","getOwnPropertyDescriptor","mapSafetyMap_","personalSafetyLocationHistory_","cached","esc","require","PersonalSafetyLocation","intlPath","path","_dec","_class2","constructor","arguments","_initializerDefineProperty","_descriptor","_descriptor2","LocationTypesDetails","intl","tc","LOCATION_START","geographicMarkers","index","id","_objectSpread","locationType","formatDateTz","eventTime","hour","minute","startDate","_this$args$history$ob","objectAt","dateStyle","timeStyle","isTestEnvironment","envSettings","getIconClassAndId","iconClass","service","configurable","enumerable","writable","initializer","t_0","PersonalSafetyCustomerInfo","customerInfoList","getPersonRow","customer","hasContacts","contacts","emergencyContacts","isFulfilled","content","primaryEmergencyContactsList","getEmergencyContactsList","secondaryEmergencyContactsList","isPrimary","undefined","contact","flat","person","getItem","key","value","t","list","fullName","phoneNumber","SafetyButtonCustomerProfile","push","pinCode","pageView_","personalSafetyLocation_","personalSafetyCustomerInfo_","LinkTo","simpleListChevronValue_","eq_","window","define","OperatorRoute","EmberRoute","beforeModel","router","transitionTo","OperatorLandingPageRoute","PersonalSafetyController","EmberController","PersonalSafetyRoute","BaseRoute","_defineProperty","EmberOperatorPersonalSafety","model","_params","transition","session","personalSafety","loadSessionTask","perform","to","params","id_alarm","OperatorSelectAlarmController","Controller","alarmsList","resolvedModel","alarmTypes","values","AlarmType","alarms","slice","alarm","includes","alarmType","sort","a","b","eventDateUtc","labelTranslationKey","format","alarmId","route","OperatorAlarmsRoute","EmberOperatorSelectAlarm","store","findAll","afterModel"],"sourceRoot":""}