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A,EAAAA,sBAAAC,EAAAs+C,E,8HC3BnC,SAAA1hD,E,SAAAA,uBAAA,iwBAAAC,IAAA,CAAAC,EAAAA,EAAAkR,EAAAA,EAAAhR,EAAAA,EAAAgL,EAAAA,EAAAsG,EAAAA,GAAA,kB,iBCoBA,IAIqByvC,GAAaj+C,EAAnB,cAA4BtC,EAAAA,EAKvCuhD,SAAAA,GACI,MAAM,cAAElwC,EAAa,YAAEovC,GAAgB7/C,KAAKC,KAAKC,MACjDuQ,EAAcmwC,QAAQ,SAAS,GAE/Bf,EAAYpvC,EAChB,IACHzP,EAAAA,EAAAA,GAAAU,EAAAT,UAAA,aAPIM,EAAAA,QAAMC,OAAAC,yBAAAC,EAAAT,UAAA,aAAAS,EAAAT,WAAAS,IAJuBC,EAAAA,EAAAA,sBAAAC,EAAA+9C,E,qECxBlC,SAAAnhD,E,SAAAA,uBAAA,0OAAAC,IAAA,CAAAkI,EAAAA,GAAA,kB,eCUA,MAAMk6C,EAActG,MACpB,GAAA54C,EAAAA,EAAAA,sBAAAC,EAAei/C,E,kDCVA,WAASC,GACtB,OAAO,SAAA5vC,GAAmB,IAAT6vC,GAAO7vC,EAMtB,OALI8vC,EAAAA,EAAAA,YAAWD,KACbA,EAASA,EAAOA,QAGlBA,EAASA,GAAU,GACZD,EAAeC,EACxB,CACF,C,6DCPO,MAAM1F,GAAW4F,E,SAAAA,GAA2BC,EAAAA,UACnD,GAAeC,EAAAA,EAAAA,QAAO9F,E","sources":["./components/modals/automation/presence-state/change-presence-state/index.hbs","./components/modals/automation/presence-state/change-presence-state/index.ts","./components/automation/presence-state-setting/sensor-trigger-option/suboption-row/index.hbs","./components/automation/presence-state-setting/sensor-trigger-option/suboption-row/index.ts","./components/automation/presence-state-setting/sensor-trigger-option/subsection/index.hbs","./components/automation/presence-state-setting/sensor-trigger-option/subsection/index.ts","./components/automation/presence-state-setting/trigger-option-row/index.hbs","./components/automation/presence-state-setting/trigger-option-row/index.ts","./components/automation/presence-state-setting/state-setting-item/index.hbs","./components/automation/presence-state-setting/state-setting-item/index.ts","./automation/presence-state-settings/template.hbs","./components/home/device-resource-info-inset/index.hbs","./components/home/device-resource-info-inset/index.ts","./components/automation/remotes/scene-rule-list/index.hbs","./components/automation/remotes/scene-rule-list/index.ts","./automation/remotes/edit/template.hbs","./automation/remotes/index/template.hbs","./components/automation/rules/actions/chimes/index.hbs","./components/automation/rules/actions/chimes/index.ts","./automation/rules/builder/action/details/chimes/template.hbs","./automation/rules/builder/action/details/index/template.hbs","./automation/rules/builder/action/details/lights/template.hbs","./automation/rules/builder/action/details/template.hbs","./automation/rules/builder/action/index/template.hbs","./components/automation/shared/additional-option/index.hbs","./components/automation/shared/additional-option/index.ts","./automation/rules/builder/extra-rule-option/template.hbs","./automation/rules/builder/index/template.hbs","./automation/rules/builder/mobile-no-support/template.hbs","./automation/rules/builder/notifications/index/template.hbs","./components/automation/rules/builder/notifications/add-mobile/index.hbs","./components/automation/rules/builder/notifications/add-mobile/index.ts","./components/automation/rules/builder/notifications/add-email/index.hbs","./components/automation/rules/builder/notifications/add-email/index.ts","./automation/rules/builder/notifications/new-contact/template.hbs","./automation/rules/builder/restrictions/template.hbs","./automation/rules/builder/template.hbs","./automation/rules/builder/trigger/details/geo-location/template.hbs","./automation/rules/builder/trigger/details/template.hbs","./automation/rules/builder/trigger/index/template.hbs","./automation/rules/index/template.hbs","./automation/scenes/index/template.hbs","./automation/schedules/builder/action/details/lights/template.hbs","./automation/schedules/builder/action/details/template.hbs","./automation/schedules/builder/action/index/template.hbs","./automation/schedules/builder/additional-option/template.hbs","./automation/schedules/builder/follow-up/template.hbs","./automation/schedules/builder/index/template.hbs","./automation/schedules/builder/mobile-no-support/template.hbs","./automation/schedules/builder/template.hbs","./automation/schedules/builder/time/template.hbs","./automation/schedules/index/template.hbs","./automation/schedules/wifi/template.hbs","./automation/smart-arming/arm-edit/template.hbs","./automation/smart-arming/disarm-edit/template.hbs","./components/automation/smart-arming/list-item/index.hbs","./components/automation/smart-arming/list-item/index.ts","./automation/smart-arming/index/template.hbs","./assets/_route_/automation.presence-state-settings.js","./automation/presence-state-settings/controller.ts","./automation/presence-state-settings/route.ts","./automation/remotes/edit/controller.ts","./automation/remotes/edit/route.ts","./automation/remotes/index/controller.ts","./automation/remotes/index/route.ts","./automation/rules/builder/action/details/chimes/route.ts","./automation/rules/builder/action/details/controller.ts","./automation/rules/builder/action/details/index/controller.ts","./automation/rules/builder/action/details/index/route.ts","./automation/rules/builder/action/details/lights/controller.ts","./automation/rules/builder/action/details/lights/route.ts","./automation/rules/builder/action/details/route.js","./automation/rules/builder/action/index/controller.ts","./automation/rules/builder/action/index/route.ts","./automation/rules/builder/action/route.js","./automation/rules/builder/extra-rule-option/controller.js","./automation/rules/builder/extra-rule-option/route.js","./automation/rules/builder/index/controller.js","./automation/rules/builder/index/route.js","./automation/rules/builder/mobile-no-support/controller.ts","./automation/rules/builder/mobile-no-support/route.ts","./automation/rules/builder/notifications/index/controller.js","./automation/rules/builder/notifications/index/route.js","./automation/rules/builder/notifications/new-contact/controller.ts","./automation/rules/builder/notifications/new-contact/route.ts","./automation/rules/builder/restrictions/controller.ts","./automation/rules/builder/restrictions/route.ts","./automation/rules/builder/route.js","./automation/rules/builder/trigger/details/access-control/route.ts","./automation/rules/builder/trigger/details/controller.ts","./automation/rules/builder/trigger/details/geo-location/controller.ts","./automation/rules/builder/trigger/details/geo-location/route.ts","./automation/rules/builder/trigger/details/index/route.ts","./automation/rules/builder/trigger/details/route.js","./automation/rules/builder/trigger/index/controller.ts","./automation/rules/builder/trigger/index/route.js","./components/modals/automation/rules/new-image-sensor-rule/index.hbs","./components/modals/automation/rules/new-image-sensor-rule/index.ts","./components/modals/automation/rules/new-thermostat-rule/index.hbs","./components/modals/automation/rules/new-thermostat-rule/index.ts","./automation/rules/index/controller.js","./automation/rules/index/route.js","./automation/scenes/index/controller.ts","./automation/scenes/index/route.ts","./automation/schedules/builder/action/details/controller.ts","./automation/schedules/builder/action/details/lights/controller.ts","./automation/schedules/builder/action/details/lights/route.ts","./automation/schedules/builder/action/details/route.ts","./automation/schedules/builder/action/index/controller.ts","./automation/schedules/builder/action/index/route.ts","./automation/schedules/builder/additional-option/route.ts","./automation/schedules/builder/follow-up/controller.ts","./automation/schedules/builder/follow-up/route.ts","./automation/schedules/builder/index/controller.ts","./automation/schedules/builder/index/route.ts","./automation/schedules/builder/mobile-no-support/controller.ts","./automation/schedules/builder/mobile-no-support/route.ts","./automation/schedules/builder/route.ts","./automation/schedules/builder/time/controller.ts","./automation/schedules/builder/time/route.ts","./automation/schedules/index/controller.js","./automation/schedules/index/route.js","./automation/schedules/wifi/controller.ts","./automation/schedules/wifi/route.ts","./automation/smart-arming/arm-edit/controller.ts","./automation/smart-arming/arm-edit/route.ts","./automation/smart-arming/controller.ts","./automation/smart-arming/disarm-edit/controller.ts","./automation/smart-arming/disarm-edit/route.ts","./automation/smart-arming/index/controller.ts","./automation/smart-arming/route.ts","./components/automation/rules/builder/feature-details/index.hbs","./components/automation/rules/builder/feature-details/index.ts","./components/automation/rules/builder/message/index.hbs","./components/automation/rules/builder/message/index.ts","./components/automation/schedules/builder/time-selector/index.hbs","./components/automation/schedules/builder/time-selector/index.ts","./components/automation/shared/action/slider/index.hbs","./components/automation/shared/action/slider/index.ts","./components/automation/rules/builder/extra-option-details/index.hbs","./components/automation/rules/builder/extra-option-details/index.ts","./components/automation/shared/button-item/index.hbs","./components/automation/shared/button-item/index.ts","./components/automation/shared/edit-title/index.hbs","./components/automation/shared/edit-title/index.ts","./components/automation/shared/feature-summary/index.hbs","./components/automation/shared/feature-summary/index.ts","./components/automation/shared/mobile-no-support/index.hbs","./components/automation/shared/mobile-no-support/index.ts","./components/automation/shared/select-feature/index.hbs","./components/automation/shared/select-feature/index.ts","./components/automation/smart-arming/edit-page/index.hbs","./components/automation/smart-arming/edit-page/index.ts","./components/automation/smart-arming/header-bar/index.hbs","./components/automation/smart-arming/header-bar/index.ts","./components/home/edit-device-view/index.hbs","./components/home/edit-device-view/index.ts","./components/modals/app/checkbox-dialog/index.hbs","./components/modals/app/checkbox-dialog/index.ts","./components/ui/connector/index.hbs","./components/ui/connector/index.ts","../rewritten-packages/ember-cli-string-helpers.7aab1772/node_modules/ember-cli-string-helpers/-private/create-string-helper.js","../rewritten-packages/ember-cli-string-helpers.7aab1772/node_modules/ember-cli-string-helpers/helpers/html-safe.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n
\\n \\n\\n \\n
\\n\",{ moduleName: \"customer-site/components/modals/automation/presence-state/change-presence-state/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { intlPath } from '@adc/i18n/path';\n\nimport './_style.scss';\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type ModalsService from '@adc/ui-components/services/modals';\nimport type NotificationManager from '@adc/ui-components/services/notification-manager';\nimport type CurrentPresenceState from 'customer-site/models/automation/presence-state/current-presence-state';\nimport type SceneModel from 'customer-site/models/automation/scene';\n\ninterface ChangePresenceStateArgs {\n model: {\n presenceState: number;\n name: string;\n scene: SceneModel | undefined;\n currentState: CurrentPresenceState;\n statusCanBeEdited: boolean;\n };\n}\n\n/**\n * @classdesc\n * This is a modal for changing the presence state status and running scenes from the Status Settings page.\n **/\n@intlPath({ path: 'modals/automation/presence-state/change-presence-state' })\nexport default class ChangePresenceStateModal extends Component {\n @service declare notificationManager: NotificationManager;\n @service declare intl: ADCIntlService;\n @service declare modals: ModalsService;\n\n /**\n * Runs the specified scene and notifies the user.\n */\n @action\n async runScene(): Promise {\n const { name, scene, currentState, presenceState } = this.args.model;\n try {\n await scene?.execute();\n this.notificationManager.addSuccess(this.intl.tc(this, 'runSceneSuccess', { name }));\n currentState.presenceStateId = presenceState;\n } catch (ex) {\n this.notificationManager.addError(this.intl.tc(this, 'runSceneFailure', { name }));\n } finally {\n this.modals.closeModal();\n }\n }\n\n /**\n * Changes to the specified state and notifies the user.\n */\n @action\n async changeStatus(): Promise {\n const { name, currentState, presenceState } = this.args.model,\n oldStateId = currentState.presenceStateId;\n\n try {\n currentState.presenceStateId = presenceState;\n await currentState.save();\n this.notificationManager.addSuccess(this.intl.tc(this, 'changeStatusSuccess', { name }));\n } catch (ex) {\n currentState.presenceStateId = oldStateId;\n this.notificationManager.addError(this.intl.tc(this, 'changeStatusFailure', { name }));\n } finally {\n this.modals.closeModal();\n }\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Modals::Automation::PresenceState::ChangePresenceState': typeof ChangePresenceStateModal;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n \\n\\n {{#if this.hasDurationDropdownOptions}}\\n \\n {{/if}}\\n
\",{ moduleName: \"customer-site/components/automation/presence-state-setting/sensor-trigger-option/suboption-row/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action, computed } from '@ember/object';\nimport { alias, notEmpty } from '@ember/object/computed';\nimport { intlPath } from '@adc/i18n/path';\nimport DropdownSelectItem, { SELECTED, UNSELECTED } from '@adc/ui-components/utils/dropdown-select-item';\n\nimport './_style.scss';\nimport type PresenceStateSensorTriggerOption from 'customer-site/models/automation/presence-state/presence-state-sensor-trigger-option';\nimport type PresenceStateTriggerDeviceSuboption from 'customer-site/models/automation/presence-state/presence-state-trigger-device-suboption';\n\ninterface SensorTriggerSuboptionRowArgs {\n Args: {\n sensorTriggerOption: PresenceStateSensorTriggerOption;\n suboption: PresenceStateTriggerDeviceSuboption;\n subsectionIsDisabled: boolean;\n };\n}\n\n/**\n * @classdesc\n * Component for displaying a Presence State Sensor Trigger Suboption Row\n */\n@intlPath({ path: 'automation/presence-state-setting/sensor-trigger-option/suboption-row' })\nexport default class PresenceStateSettingSensorTriggerSuboptionRow extends Component {\n /**\n * suboption passed in from the args.\n */\n @alias('args.suboption')\n declare suboption: PresenceStateTriggerDeviceSuboption;\n\n /**\n * Convert the array of PresenceStateDropdownItems to an array of DropdownSelectItems.\n */\n @computed('suboption.{durationDropdownOptions,selectedDropdownValue}')\n get dropdownItems(): DropdownSelectItem[] {\n const { defaultDropdownValue, suboption } = this,\n { durationDropdownOptions, selectedDurationDropdownValue } = suboption,\n activeValue = selectedDurationDropdownValue ?? defaultDropdownValue;\n\n return durationDropdownOptions.map((dropdownOption) =>\n DropdownSelectItem.create({\n name: dropdownOption.description,\n value: dropdownOption.value.toString(),\n state: activeValue === dropdownOption.value ? SELECTED : UNSELECTED\n })\n );\n }\n\n /**\n * Whether or not there are any duration dropdown options.\n */\n @notEmpty('suboption.durationDropdownOptions')\n declare hasDurationDropdownOptions: boolean;\n\n /**\n * The default dropdown value.\n */\n @tracked defaultDropdownValue = 30;\n\n /**\n * Updates whether the suboption (and by proxy the trigger option) is selected.\n */\n @action\n updateIsSelected(evt: InputEvent): void {\n const { args, suboption, hasDurationDropdownOptions, defaultDropdownValue } = this,\n { selectedDurationDropdownValue } = suboption,\n { sensorTriggerOption } = args,\n isChecked = !!(evt.target as HTMLInputElement).checked;\n\n suboption.isSelected = isChecked;\n\n // For dropdown options that haven't been changed but have been checked,\n // there is a corner case where selectedDropdownValue is undefined and never updated.\n // In this case, set the selectedDurationDropdownValue to the default dropdown value,\n // which will be what is presented to the user.\n if (isChecked && hasDurationDropdownOptions) {\n suboption.selectedDurationDropdownValue = selectedDurationDropdownValue ?? defaultDropdownValue;\n }\n\n // If every suboption is unselected, then the trigger option should also be unselected.\n if (sensorTriggerOption.sensorSuboptions.every((s) => !s.isSelected) && sensorTriggerOption.isSelected) {\n sensorTriggerOption.isSelected = false;\n sensorTriggerOption.sensorSuboptions.forEach((s) => (s.isEditable = false));\n }\n }\n\n /**\n * Updates the suboption's selected dropdown value.\n */\n @action\n updateDropdownValue(value: string): void {\n this.suboption.selectedDurationDropdownValue = Number(value);\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Automation::PresenceStateSetting::SensorTriggerOption::SuboptionRow': typeof PresenceStateSettingSensorTriggerSuboptionRow;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n \\n
\\n {{#each @sensorTriggerOption.sensorSuboptions as |suboption|}}\\n \\n {{/each}}\\n {{#if @sensorTriggerOption.note}}\\n

\\n {{@sensorTriggerOption.note}}\\n

\\n {{/if}}\\n\\n {{#if this.showSleepTime}}\\n
\\n \\n
\\n {{/if}}\\n
\\n
\",{ moduleName: \"customer-site/components/automation/presence-state-setting/sensor-trigger-option/subsection/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { action, computed } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { NUM_MILLISECONDS_IN_MINUTE } from 'customer-site/utils/datetime';\nimport { zonedTimeToUtc } from 'date-fns-tz';\nimport addMinutes from 'date-fns/addMinutes';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport './_style.scss';\nimport type PresenceStateSensorTriggerOption from 'customer-site/models/automation/presence-state/presence-state-sensor-trigger-option';\n\ninterface PresenceStateSettingSensorTriggerOptionSubsectionArgs {\n Args: {\n sensorTriggerOption: PresenceStateSensorTriggerOption;\n statusCanBeEdited: boolean;\n };\n}\n\nexport default class PresenceStateSettingSensorTriggerOptionSubsection extends Component {\n @service declare intl: ADCIntlService;\n\n /**\n * Update whether the sensor trigger option / suboptions are selected, based on user input.\n * @param evt The InputEvent representing either the user toggling or untoggling.\n */\n @action\n updateIsSelected(evt: InputEvent): void {\n const { sensorTriggerOption } = this.args,\n isChecked = !!(evt.target as HTMLInputElement).checked;\n\n sensorTriggerOption.isSelected = isChecked;\n\n // Every sensor suboption should now have the same status as the trigger option\n // (i.e. if trigger option is selected, then all sensors are selected, and vice versa).\n sensorTriggerOption.sensorSuboptions.forEach((s) => {\n s.isSelected = isChecked;\n s.isEditable = isChecked;\n });\n }\n\n /**\n * Whether the subsection should not be selected, defined by either two properties being true:\n * 1. If the trigger option is marked as not editable.\n * 2. If the associated scene cannot be edited.\n */\n @computed('args.{sensorTriggerOption.isEditable,statusCanBeEdited}')\n get subsectionIsDisabled(): boolean {\n return !this.args.sensorTriggerOption.isEditable || !this.args.statusCanBeEdited;\n }\n\n /**\n * Whether the sleep time input should be selectable, defined by either two properties being true:\n * 1. The above subsectionIsDisabled is true.\n * 2. The trigger option is not currently selected.\n */\n @computed('subsectionIsDisabled', 'args.sensorTriggerOption.isSelected')\n get sleepTimeIsDisabled(): boolean {\n return this.subsectionIsDisabled || !this.args.sensorTriggerOption.isSelected;\n }\n\n /**\n * Convert the minutes to midnight into a time on the current day\n */\n @computed('intl.timeZone', 'args.sensorTriggerOption.sleepTimeMinutesAfterMidnight')\n get todaysSleepTime(): Date {\n const midnightTodayLocal = new Date().setHours(0, 0, 0, 0);\n const midnightTodayUtc = zonedTimeToUtc(midnightTodayLocal, this.intl.timeZone);\n\n return addMinutes(midnightTodayUtc, this.args.sensorTriggerOption.sleepTimeMinutesAfterMidnight);\n }\n\n /**\n * Compare the new time to the old time, and adjust the minutes after midnight accordingly.\n * @param selectedTime The users desired sleep time, today.\n */\n @action\n updateMinutesAfterMidnight(selectedTime: Date): void {\n const timeChangeMs = selectedTime.getTime() - this.todaysSleepTime.getTime(),\n timeChangeMinutes = Math.floor(timeChangeMs / NUM_MILLISECONDS_IN_MINUTE);\n this.args.sensorTriggerOption.sleepTimeMinutesAfterMidnight =\n this.args.sensorTriggerOption.sleepTimeMinutesAfterMidnight + timeChangeMinutes;\n }\n\n @computed('args.sensorTriggerOption.{selectSleepTimeText,sleepTimeMinutesAfterMidnight}')\n get showSleepTime(): boolean {\n return (\n this.args.sensorTriggerOption.selectSleepTimeText !== undefined &&\n this.args.sensorTriggerOption.sleepTimeMinutesAfterMidnight !== undefined &&\n this.args.sensorTriggerOption.sleepTimeMinutesAfterMidnight !== null\n );\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Automation::PresenceStateSetting::SensorTriggerOption::Subsection': typeof PresenceStateSettingSensorTriggerOptionSubsection;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n \\n\\n {{#if this.hasDropdownOptions}}\\n \\n {{/if}}\\n
\",{ moduleName: \"customer-site/components/automation/presence-state-setting/trigger-option-row/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { action, computed, set } from '@ember/object';\nimport { alias, gt } from '@ember/object/computed';\nimport DropdownSelectItem, { SELECTED, UNSELECTED } from '@adc/ui-components/utils/dropdown-select-item';\n\nimport './_style.scss';\nimport type PresenceStateTriggerOption from 'customer-site/models/automation/presence-state/presence-state-trigger-option';\n\ninterface TriggerOptionRowArgs {\n triggerOption: PresenceStateTriggerOption;\n statusCanBeEdited: boolean;\n}\n\n/**\n * @classdesc\n * Component for displaying a Presence State Setting Trigger Option Row\n */\nexport default class PresenceStateSettingTriggerOptionRow extends Component {\n /**\n * triggerOption from the passed in args\n */\n @alias('args.triggerOption')\n declare triggerOption: PresenceStateTriggerOption;\n\n /**\n * Convert the array of PresenceStateDropdownItems to an array of DropdownSelectItems\n */\n @computed('triggerOption.{dropdownOptions,selectedDropdownValue}')\n get dropdownItems(): DropdownSelectItem[] {\n const { defaultDropdownValue } = this,\n { dropdownOptions, selectedDropdownValue } = this.triggerOption;\n\n const activeValue = selectedDropdownValue ?? defaultDropdownValue;\n\n return dropdownOptions.map((dropdownOption) =>\n DropdownSelectItem.create({\n name: dropdownOption.description,\n value: dropdownOption.value.toString(),\n state: activeValue === dropdownOption.value ? SELECTED : UNSELECTED\n })\n );\n }\n\n /**\n * Whether there are any dropdown options\n */\n @gt('triggerOption.dropdownOptions.length', 0)\n declare hasDropdownOptions: boolean;\n\n /**\n * The default dropdown value\n */\n @computed('triggerOption.dropdownOptions.0.value')\n get defaultDropdownValue(): number {\n // DO NOT COPY THIS, PLEASE IMPLEMENT THE SUGGESTION AND TEST.\n // @ts-expect-error This should be replaced with `this.triggerOption.dropdownOptions.objectAt(0)?.value ?? -1`.\n return this.triggerOption.dropdownOptions[0]?.value ?? -1;\n }\n\n /**\n * Updates whether the trigger option is selected.\n */\n @action\n updateIsSelected(evt: InputEvent): void {\n const { triggerOption, hasDropdownOptions, defaultDropdownValue } = this,\n { selectedDropdownValue } = this.triggerOption,\n isChecked = !!(evt.target as HTMLInputElement).checked;\n\n set(triggerOption, 'isSelected', isChecked);\n\n // For dropdown options that haven't been changed but have been checked, there is a corner case where selectedDropdownValue is undefined\n // and never updated. In this case, set the selectedDropdownValue to the default dropdown value, which will be what is presented to the user.\n if (isChecked && hasDropdownOptions) {\n set(triggerOption, 'selectedDropdownValue', selectedDropdownValue ?? defaultDropdownValue);\n }\n }\n\n /**\n * Updates the triggerOption's selected dropdown value.\n */\n @action\n updateDropdownValue(value: string): void {\n set(this.triggerOption, 'selectedDropdownValue', Number(value));\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Automation::PresenceStateSetting::TriggerOptionRow': typeof PresenceStateSettingTriggerOptionRow;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n
\\n \\n

{{@name}}

\\n
\\n {{#if this.showCheckmark}}\\n \\n {{else}}\\n \\n {{/if}}\\n
\\n\\n {{@description}}\\n\\n
\\n {{#each (await this.allTriggerOptions) as |option|}}\\n {{#if option.isSensor}}\\n \\n {{else}}\\n \\n {{/if}}\\n {{/each}}\\n
\\n
\",{ moduleName: \"customer-site/components/automation/presence-state-setting/state-setting-item/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { action, computed } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport ChangePresenceStateModal from 'customer-site/components/modals/automation/presence-state/change-presence-state/index';\nimport PresenceStateSensorTriggerOption from 'customer-site/models/automation/presence-state/presence-state-sensor-trigger-option';\nimport { intlPath } from '@adc/i18n/path';\n\nimport './_style.scss';\nimport type ModalsService from '@adc/ui-components/services/modals';\nimport type { AsyncHasMany } from '@ember-data/model';\nimport type CurrentPresenceState from 'customer-site/models/automation/presence-state/current-presence-state';\nimport type PresenceStateTriggerOption from 'customer-site/models/automation/presence-state/presence-state-trigger-option';\nimport type SceneModel from 'customer-site/models/automation/scene';\n\ninterface StateSettingItemArgs {\n Args: {\n presenceState: number;\n name: string;\n icon: string;\n description: string;\n statusCanBeEdited: boolean;\n triggerOptions: AsyncHasMany;\n sensorTriggerOption: Promise;\n currentState?: CurrentPresenceState;\n scene?: SceneModel;\n };\n}\n\n// A union type that includes both possible types of trigger options.\ntype AnyPresenceStateTriggerOption = PresenceStateTriggerOption | PresenceStateSensorTriggerOption;\n\n// Any trigger option, with an added boolean denoting the specific type of trigger option.\nexport type PresenceStateTriggerOptionWithType = AnyPresenceStateTriggerOption & {\n isSensor: boolean;\n};\n\n/**\n * @classdesc\n * Component for displaying a Presence State Setting Item\n */\n@intlPath({ path: 'automation/presence-state-setting/state-setting-item' })\nexport default class PresenceStateSettingStateSettingItem extends Component {\n @service declare modals: ModalsService;\n\n /**\n * All trigger options (non-sensor and sensor combined)\n * These triggers are combined using the following steps:\n * 1. getAllTriggersFromPromises resolves the promises, and then adds all trigger types into one big list.\n * 2. The type of trigger is denoted for each using the isSensor boolean.\n * 3. The big list is sorted by the sortOrder attribute.\n */\n @computed('args.{sensorTriggerOption,triggerOptions}', 'generateTriggerWithType')\n get allTriggerOptions(): Promise {\n return this.getAllTriggersFromPromises(this.args.triggerOptions, this.args.sensorTriggerOption).then(\n (triggers) => {\n const allTriggersWithType = triggers.map(this.generateTriggerWithType);\n allTriggersWithType.sort((a, b) => a.sortOrder - b.sortOrder);\n return allTriggersWithType;\n }\n );\n }\n\n /**\n * If state of this component is the customer's current state, we do not want to show the \"SET\" button.\n */\n @computed('args.{presenceState,currentState.presenceStateId}')\n get showCheckmark(): boolean {\n return this.args.presenceState == this.args.currentState?.presenceStateId;\n }\n\n /**\n * Opens the Change Presence State Modal\n */\n @action\n openChangeStateModal(): void {\n const { presenceState, name, scene, currentState, statusCanBeEdited } = this.args;\n this.modals.showModal(ChangePresenceStateModal, {\n presenceState,\n name,\n scene,\n currentState,\n statusCanBeEdited\n });\n }\n\n /**\n * Resolve the promises associated with the non-sensor and sensor trigger options, and combine the two types.\n * @param triggerOptionsPromise The list of non-sensor trigger options, asynchronously sent from the API.\n * @param sensorTriggerOptionPromise The sensor trigger option, asynchronously sent from the API, if one exists.\n * @returns A list of PresenceStateTriggerOptions AND PresenceStateSensorTriggerOptions\n */\n async getAllTriggersFromPromises(\n triggerOptionsPromise: StateSettingItemArgs['Args']['triggerOptions'],\n sensorTriggerOptionPromise: Promise\n ): Promise {\n const triggerOptions: AnyPresenceStateTriggerOption[] = [];\n\n // After resolving the trigger options, we have take the contents of the\n // Ember array and place them in a native TypeScript array.\n const resolvedTriggerOptions = await triggerOptionsPromise;\n resolvedTriggerOptions.forEach((to) => triggerOptions.push(to));\n\n const sensorTriggerOption = await sensorTriggerOptionPromise;\n if (sensorTriggerOption) triggerOptions.push(sensorTriggerOption);\n\n return triggerOptions;\n }\n\n /**\n * Determine the type of trigger the object is, and add that evaluation as a boolean.\n * @param trigger A sensor or non-sensor trigger option.\n * @returns the trigger in the parameter, with an added boolean representing whether it is a PresenceStateSensorTriggerOption.\n */\n generateTriggerWithType(trigger: AnyPresenceStateTriggerOption): PresenceStateTriggerOptionWithType {\n const triggerWithType = trigger as PresenceStateTriggerOptionWithType;\n triggerWithType.isSensor = trigger instanceof PresenceStateSensorTriggerOption;\n return triggerWithType;\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Automation::PresenceStateSetting::StateSettingItem': typeof PresenceStateSettingStateSettingItem;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n
\\n
\\n

{{tc this \\'title\\'}}

\\n\\n \\n
\\n\\n {{#each this.settingsWithScenes as |setting|}}\\n \\n {{/each}}\\n
\\n\\n\",{ moduleName: \"customer-site/automation/presence-state-settings/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n {{#if @deviceResourceInfo.deviceDiagramUrl}}\\n {{tc\\n {{/if}}\\n {{#if @deviceResourceInfo.diagramDescription}}\\n

{{@deviceResourceInfo.diagramDescription}}

\\n {{/if}}\\n {{#if @deviceResourceInfo.knowledgeBaseLinkUrl}}\\n \\n {{/if}}\\n\",{ moduleName: \"customer-site/components/home/device-resource-info-inset/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { intlPath } from '@adc/i18n/path';\n\nimport './_style.scss';\nimport type DeviceResourceInfo from 'customer-site/models/devices/device-resource-info';\nimport type ADCIntlService from 'customer-site/services/intl';\n\ninterface DeviceResourceInfoInsetArgs {\n deviceResourceInfo: DeviceResourceInfo;\n}\n\n/**\n * @classdesc\n * Component for displaying device reource info contents.\n */\n@intlPath({ path: 'home/device-resource-info-inset' })\nexport default class DeviceResourceInfoInset extends Component {\n @service declare intl: ADCIntlService;\n\n @action\n goToDocumentation(): void {\n window.location.assign(this.args.deviceResourceInfo.knowledgeBaseLinkUrl);\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Home::DeviceResourceInfoInset': typeof DeviceResourceInfoInset;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if this.hasSuggestedSceneRules}}\\n \\n{{/if}}\\n\\n \\n <:icon>\\n
\\n \\n \\n {{#if item.props.isSuggested}}\\n \\n {{else if item.props.icon}}\\n \\n {{/if}}\\n
\\n \\n <:value>\\n {{#if item.props.isSuggested}}\\n \\n {{else if item.props.ruleId}}\\n \\n {{/if}}\\n \\n
\\n
\",{ moduleName: \"customer-site/components/automation/remotes/scene-rule-list/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { action, computed } from '@ember/object';\nimport { alias } from '@ember/object/computed';\nimport { service } from '@ember/service';\nimport { EmberRemotesEdit, EmberRulesBuilder } from 'customer-site/enums/CustomerPageUrl';\nimport { Remote } from 'customer-site/enums/TriggerType';\nimport { intlPath } from '@adc/i18n/path';\n\nimport type NavigationService from 'customer-site/services/navigation';\nimport type { SceneRuleListItem } from 'customer-site/utils/scene-rule-display';\nimport './_style.scss';\n\ninterface SceneRuleListArgs {\n sceneRuleListItems: SceneRuleListItem[];\n deviceId: string;\n}\n\n@intlPath({ path: 'automation/remotes/scene-rule-list' })\nexport default class SceneRuleList extends Component {\n @service declare navigation: NavigationService;\n\n /**\n * The id of the remote that the scene rules are (or will be) for.\n */\n @alias('args.deviceId')\n declare deviceId: string;\n\n /**\n * Checks if any suggested scene rules are shown, used to determine if the inline alert should be shown.\n */\n @computed('args.sceneRuleListItems')\n get hasSuggestedSceneRules(): boolean {\n return this.args.sceneRuleListItems?.some((listItem) => listItem.props.isSuggested);\n }\n\n /**\n * Checks if the remote has any actual scene rules, used to determine the body text of the inline info alert.\n */\n @computed('args.sceneRuleListItems')\n get hasAnySceneRules(): boolean {\n return this.args.sceneRuleListItems?.some((listItem) => !listItem.props.isSuggested);\n }\n\n /**\n * When the cheveron of an existing rule is clicked, transition the user to the associated rule in the rules builder.\n * @param ruleId The client id of the rule associated with the selected scene rule display.\n */\n @action\n transitionToExistingRule(ruleId: string) {\n this.navigation.transitionToRouteId(EmberRulesBuilder, ruleId, {\n queryParams: { returnToAfterSave: EmberRemotesEdit, returnToAfterSaveSlug: this.deviceId }\n });\n }\n\n /**\n * When a suggested rule is clicked, direct user to a new rule, with the trigger completely prefilled.\n * @param buttonNumber The button number associated with the suggested rule.\n */\n @action\n transitionToNewRule(buttonNumber: number) {\n this.navigation.transitionToRouteId(EmberRulesBuilder, 'new', {\n queryParams: {\n triggerType: Remote,\n triggerDevices: this.deviceId,\n triggerEvent: buttonNumber,\n returnToAfterSave: EmberRemotesEdit,\n returnToAfterSaveSlug: this.deviceId\n }\n });\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Automation::Remotes::SceneRuleList': typeof SceneRuleList;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n \\n <:above-device-name>\\n
\\n \\n
\\n \\n <:settings as |remote|>\\n \\n {{#if buttonResourceInfo}}\\n \\n {{/if}}\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
\",{ moduleName: \"customer-site/automation/remotes/edit/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n \\n {{#each this.remotesWithActionItems as |remote|}}\\n \\n \\n

{{remote.description}}

\\n \\n {{/each}}\\n
\\n\\n\",{ moduleName: \"customer-site/automation/remotes/index/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n {{#if this.showVolumeSetting}}\\n {{#if this.showDisableSliderCheckbox}}\\n
\\n \\n
{{tc this \\'includeVolume\\'}}
\\n \\n
\\n {{/if}}\\n\\n
{{tc this \\'chimeVolume\\' value=this.sliderVolume}}
\\n\\n
\\n \\n \\n \\n
\\n {{/if}}\\n\\n
{{tc this \\'ringtone\\'}}
\\n
\\n \\n
\\n
\\n \\n

{{tc this \\'previewChimeSelection\\' count=this.selectedIds.length}}

\\n
\\n
\",{ moduleName: \"customer-site/components/automation/rules/actions/chimes/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { set, setProperties } from '@ember/object';\nimport { action, computed } from '@ember/object';\nimport { alias, reads, mapBy, notEmpty } from '@ember/object/computed';\nimport { inject as service } from '@ember/service';\nimport { isPresent } from '@ember/utils';\nimport { POST } from '@adc/ajax/services/adc-ajax';\nimport { intlPath } from '@adc/i18n/path';\nimport DropdownSelectItem, { SELECTED, UNSELECTED } from '@adc/ui-components/utils/dropdown-select-item';\n\nimport './_style.scss';\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type NotificationService from '@adc/ui-components/services/notification-manager';\nimport type ExtraActionChime from 'customer-site/models/automation/rules-builder/extra-data/extra-action-chime';\nimport type RuleModel from 'customer-site/models/automation/rules/rule';\nimport type BaseDeviceModel from 'customer-site/models/devices/base-device';\nimport type AjaxService from 'customer-site/services/ajax';\n\ninterface ChimeActionConfigurationComponentSignature {\n Element: HTMLDivElement;\n Args: {\n rule: RuleModel;\n showVolumeSetting?: boolean;\n showDisableSliderCheckbox?: boolean;\n };\n}\n\n/**\n * @classdesc\n * The rules builder chimes action component.\n */\n@intlPath({ path: 'automation/rules/actions/chimes' })\nexport default class ChimeActionConfigurationComponent extends Component {\n @service declare ajax: AjaxService;\n @service declare notificationManager: NotificationService;\n @service declare intl: ADCIntlService;\n\n /**\n * The action type.\n */\n @reads('args.rule.actionType.extraData')\n declare actionTypeData: ExtraActionChime;\n\n /**\n * Devices selected for the action.\n */\n @reads('args.rule.actionDevices')\n declare selectedDevices: BaseDeviceModel[];\n\n @alias('args.rule.extraData.ACTION_TONE')\n tone: number | undefined;\n\n @alias('args.rule.extraData.ACTION_VOLUME')\n declare volume: number | undefined;\n\n /**\n * Indicates whether we should show the volume slider.\n */\n get showVolumeSetting(): boolean {\n return this.args.showVolumeSetting ?? true;\n }\n\n /**\n * Indicates whether we should allow toggling the volume slider.\n */\n get showDisableSliderCheckbox(): boolean {\n return this.args.showDisableSliderCheckbox ?? true;\n }\n\n /**\n * Current slider value.\n */\n @computed('defaultVolume', 'volume')\n get sliderVolume(): number {\n return this.volume ?? this.defaultVolume;\n }\n\n /**\n * Indicates if the slider should be enabled.\n */\n @notEmpty('volume')\n declare isSliderEnabled: boolean;\n\n /**\n * Device ids currently selected for the action.\n */\n @mapBy('selectedDevices', 'id')\n declare selectedIds: string[];\n\n /**\n * The available tones for the chime.\n */\n @alias('actionTypeData.tones')\n declare tones: Record;\n\n @alias('actionTypeData.testTonesEndpoint')\n declare testTonesEndpoint: string;\n\n @alias('actionTypeData.defaultVolume')\n declare defaultVolume: number;\n\n /**\n * The available tones for the chime.\n */\n @computed('tone', 'tones')\n get dropdownItems(): Promise {\n this.updateForDevices();\n return (async () => {\n const { tones = {} } = this,\n selectedTone = String(this.tone);\n\n return Object.keys(tones).map((tone) =>\n DropdownSelectItem.create({\n name: tones[tone],\n value: tone,\n state: tone === String(selectedTone) ? SELECTED : UNSELECTED\n })\n );\n })();\n }\n\n updateForDevices(): void {\n const { tone, tones } = this;\n\n // Initialize default rule values.\n setProperties(this, {\n tone: isPresent(tones) ? tone ?? Number(Object.keys(tones)[0]) : undefined\n });\n }\n\n /**\n * Set the action tone.\n */\n @action setTone(tone: string): void {\n set(this, 'tone', Number(tone));\n }\n\n /**\n * Set the action tone.\n */\n @action setVolume(volume: number): void {\n volume = Math.min(Math.max(this.actionTypeData.minVolume, volume), this.actionTypeData.maxVolume);\n set(this, 'volume', volume);\n }\n\n /**\n * Play an audio preview of the selected ringtone.\n */\n @action async playRingtone(): Promise {\n const { selectedIds, notificationManager, tone, volume, testTonesEndpoint } = this;\n\n if (selectedIds.length > 0) {\n try {\n const response = await this.ajax.apiRequestForValue<{ success: string }>(\n testTonesEndpoint,\n undefined,\n {\n selectedIds,\n tone,\n volume\n },\n POST\n );\n\n notificationManager.addSuccess(response.success);\n } catch (error) {\n notificationManager.addError(error.errors[0].detail);\n }\n }\n }\n\n /**\n * Toggles volume slider interactivity.\n */\n @action toggleVolumeSlider(event: Event & { target: HTMLInputElement }): void {\n set(this, 'volume', event.target.checked ? this.sliderVolume : undefined);\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Automation::Rules::Actions::Chimes': typeof ChimeActionConfigurationComponent;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck: Glint doesn\\'t know what the model is, please fix this.}}\\n\",{ moduleName: \"customer-site/automation/rules/builder/action/details/chimes/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n\",{ moduleName: \"customer-site/automation/rules/builder/action/details/index/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n \\n {{#if this.showDimSlider}}\\n \\n {{/if}}\\n {{#if this.showColorPicker}}\\n
\\n
\\n \\n \\n \\n
\\n
\\n
\\n
\\n
\\n {{/if}}\\n {{#if this.isColorPickerShown }}\\n \\n {{/if}}\\n
\",{ moduleName: \"customer-site/automation/rules/builder/action/details/lights/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n <:default as |PageViewContainer api|>\\n \\n <:loading as |PageViewLoading|>\\n \\n \\n\\n <:default as |data|>\\n \\n {{outlet}}\\n \\n \\n \\n \\n\\n\",{ moduleName: \"customer-site/automation/rules/builder/action/details/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck\\n * This component expects that @enabledFeatures will be an array, and we are passing a promise. Please fix this.\\n * The partiallyEnabledActionTypes property doesn\\'t exist, please delete this.\\n}}\\n\",{ moduleName: \"customer-site/automation/rules/builder/action/index/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n \\n {{#if @isSingleSelect}}\\n \\n {{#if @useSuffix}}\\n
\\n {{@optionSuffix}}\\n
\\n\\n {{/if}}\\n {{else}}\\n \\n <:label as |item|>{{item.label}}\\n \\n {{/if}}\\n
\\n
\\n\",{ moduleName: \"customer-site/components/automation/shared/additional-option/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { action, computed } from '@ember/object';\nimport { alias } from '@ember/object/computed';\nimport { BinaryListItem } from '@adc/ui-components/components/simple-binary/list';\nimport DropdownSelectItem from '@adc/ui-components/utils/dropdown-select-item';\n\nimport './_style.scss';\nimport type AdditionalOptionItem from 'customer-site/models/automation/schedule-builder/additional-option-item';\n\ninterface AdditionalOptionSignature {\n Args: {\n title: string;\n isSingleSelect: boolean;\n options: AdditionalOptionItem[];\n selectedOptions: AdditionalOptionItem[];\n useSuffix?: boolean;\n optionSuffix?: string;\n valueChanged(selectedItems: AdditionalOptionItem[]): void;\n };\n}\n\n/**\n * @classdesc\n * Renders a single non-selected button list item if there is only one item, or yields if there are zero or more than one items.\n */\nexport default class AdditionalOption extends Component {\n @alias('args.options')\n declare options: AdditionalOptionItem[];\n\n get selectedOption(): string | undefined {\n return this.args.selectedOptions[0]?.value;\n }\n\n @computed('args.options')\n get dropdownItems(): DropdownSelectItem[] {\n return this.args.options.map((o) => {\n return DropdownSelectItem.create({ name: o.name, value: o.value.toString() });\n });\n }\n\n @computed('args.{options,selectedOptions}')\n get checkboxItems(): BinaryListItem[] {\n return this.args.options.map((option) => {\n return new BinaryListItem({\n label: option.name,\n state: this.args.selectedOptions.mapBy('value').includes(option.value),\n props: { option }\n });\n });\n }\n\n @action\n updateDropdownSelection(newValue: string) {\n this.args.valueChanged(this.options.filter(({ value }) => value == newValue));\n }\n\n @action\n updateCheckboxSelection(value: BinaryListItem[]) {\n const selectedItems = value.filter(({ state }) => state === true).mapBy('props.option');\n this.args.valueChanged(this.options.filter((name) => selectedItems.includes(name)));\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Automation::Shared::AdditionalOption': typeof AdditionalOption;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n <:default as |PageViewContainer api|>\\n \\n <:loading as |PageViewLoading|>\\n \\n \\n \\n <:default>\\n \\n\\n \\n \\n \\n \\n\",{ moduleName: \"customer-site/automation/rules/builder/extra-rule-option/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n <:default as |PageViewContainer api|>\\n \\n <:loading as |PageViewLoading|>\\n \\n \\n\\n <:default>\\n {{#if this.showUnderConstructionBanner}}\\n \\n {{/if}}\\n\\n
\\n {{#if this.singleValidTemplate.editNameEnabled}}\\n \\n \\n {{/if}}\\n \\n \\n \\n\\n {{#each (await this.triggerExtraRuleOptions) as |extraRuleOption|}}\\n \\n \\n \\n \\n {{/each}}\\n\\n \\n \\n \\n \\n\\n {{#each (await this.actionExtraRuleOptions) as |extraRuleOption|}}\\n \\n \\n \\n \\n {{/each}}\\n\\n \\n \\n \\n \\n\\n {{#if this.singleValidTemplate.notificationGroups}}\\n \\n \\n \\n \\n {{/if}}\\n\\n \\n\\n
\\n {{#if (and this.displayLegacyEditLink (await this.rule.isNotMixedLights))}}\\n {{tc this \\\"legacyLinkText\\\"}}\\n {{/if}}\\n {{#if (and this.rule.isDetached (await this.isRuleValid))}}\\n

{{tc this \\'autoConfigured\\' htmlSafe=true}}

\\n {{/if}}\\n\\n {{#if this.isMobileApp}}\\n \\n {{!-- if we want to return to a specific page after save, also override the back button on mobile to return to this page --}}\\n {{#if this.returnToAfterSave}}\\n \\n {{/if}}\\n {{/if}}\\n\\n \\n
\\n
\\n \\n
\\n \\n
\\n\",{ moduleName: \"customer-site/automation/rules/builder/index/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n <:default as |PageViewContainer|>\\n \\n <:loading as |PageViewLoading|>\\n \\n \\n\\n <:default as |rule|>\\n \\n \\n\\n <:error as |PageViewError|>\\n \\n \\n \\n \\n\\n\",{ moduleName: \"customer-site/automation/rules/builder/mobile-no-support/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n \\n <:loading as |PageViewLoading|>\\n \\n \\n\\n <:default as |data api|>\\n {{#if data}}\\n

\\n {{tc this (if this.notificationGroups \\'selectRecipients\\' \\'noRecipients\\')}}\\n

\\n\\n {{#if this.notificationGroups}}\\n \\n\\n {{#each this.notificationGroups as |group|}}\\n \\n {{#if (and contact.isSelected group.hasOptions)}}\\n \\n {{/if}}\\n \\n {{/each}}\\n {{/if}}\\n\\n \\n {{/if}}\\n \\n\\n <:error as |PageViewError|>\\n \\n \\n
\\n\",{ moduleName: \"customer-site/automation/rules/builder/notifications/index/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n
\\n \\n \\n \\n \\n \\n \\n
\\n
\\n \\n \\n \\n\\n \\n
\\n
\",{ moduleName: \"customer-site/components/automation/rules/builder/notifications/add-mobile/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action, computed } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { getCarriersForSelectedCountry } from 'customer-site/utils/contact-addresses';\nimport { intlPath } from '@adc/i18n/path';\nimport DropdownSelectItem from '@adc/ui-components/utils/dropdown-select-item';\n\nimport './_style.scss';\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type AutomationRulesBuilderNotificationMobile from 'customer-site/models/automation/rules-builder/notification/mobile';\nimport type CountryMobileCarrier from 'customer-site/models/users/country-mobile-carrier';\n\ninterface AddMobileComponentSignature {\n Args: {\n value: AutomationRulesBuilderNotificationMobile;\n countriesList: Awaited>;\n deleteItem: VoidFunction;\n };\n}\n\n/**\n * @classdesc\n * Mobile component in add new contact form\n */\n@intlPath({ path: 'automation/rules/builder/notifications/add-mobile' })\nexport default class AddMobileComponent extends Component {\n @service declare intl: ADCIntlService;\n\n @tracked invalidNumber = false;\n @tracked selectedCountry?: number;\n\n /**\n * Update the phone number list in new-contact\n */\n @action updateNumber(number: string): void {\n this.validatePhoneNumber(number);\n if (!this.invalidNumber) {\n this.args.value.number = number;\n }\n }\n\n /**\n * Update the phone number list in new-contact\n */\n @action updateCountry(country: string): void {\n this.selectedCountry = this.args.value.country = parseInt(country, 10);\n }\n\n /**\n * Populates the countries dropdown.\n */\n get countries(): DropdownSelectItem[] {\n return this.args.countriesList.map((country) =>\n DropdownSelectItem.create({\n value: country.id,\n name: country.countryName\n })\n );\n }\n\n /**\n * Populate the providers dropdown based on the selection for the country\n */\n @computed('args.countriesList', 'selectedCountry')\n get providers(): ReturnType {\n return getCarriersForSelectedCountry(this.args.countriesList, this.selectedCountry);\n }\n\n get disableProviders(): Promise {\n return (async () => {\n const providers = await this.providers;\n return providers.length === 0;\n })();\n }\n\n /**\n * Validates the phone number\n */\n @action validatePhoneNumber(number: string): void {\n this.invalidNumber = !new RegExp('^\\\\d{9,10}$').test(number);\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Automation::Rules::Builder::Notifications::AddMobile': typeof AddMobileComponent;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n
\\n \\n \\n \\n \\n
\\n
\",{ moduleName: \"customer-site/components/automation/rules/builder/notifications/add-email/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\nimport { intlPath } from '@adc/i18n/path';\n\nimport './_style.scss';\nimport type AutomationRulesBuilderNotificationEmail from 'customer-site/models/automation/rules-builder/notification/email';\n\nexport interface AddEmailComponentSignature {\n Args: {\n value: AutomationRulesBuilderNotificationEmail;\n deleteItem: VoidFunction;\n };\n}\n\n/**\n * @classdesc\n * Email component in add new contact form\n */\n@intlPath({ path: 'automation/rules/builder/notifications/add-email' })\nexport default class AddEmailComponent extends Component {\n @tracked invalidEmail = false;\n\n /**\n * Update the email list in new-contact\n */\n @action updateEmailAddress(emailAddressInput: string): void {\n this.validateEmail(emailAddressInput);\n if (!this.invalidEmail) {\n this.args.value.emailAddress = emailAddressInput;\n }\n }\n\n /**\n * Validates the email address with regular expression\n */\n @action validateEmail(emailAddressInput: string): void {\n this.invalidEmail = !new RegExp('[a-z0-9]+@[a-z]+\\\\.[a-z]{2,3}').test(emailAddressInput);\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Automation::Rules::Builder::Notifications::AddEmail': typeof AddEmailComponent;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n \\n <:loading as |PageViewLoading|>\\n \\n \\n\\n <:default as |data|>\\n {{#if data}}\\n
\\n

{{tc this \\'addNewContact\\'}}

\\n
\\n \\n \\n \\n \\n \\n \\n\\n \\n \\n \\n
\\n\\n
\\n {{#if data.newContactModel.mobiles}}\\n
\\n \\n

{{tc this \\'textNotifications\\'}}

\\n
\\n {{#each data.newContactModel.mobiles as |mobile|}}\\n \\n {{/each}}\\n {{/if}}\\n \\n
\\n\\n
\\n {{#if data.newContactModel.emails}}\\n
\\n \\n

{{tc this \\'emailNotifications\\'}}

\\n
\\n {{#each data.newContactModel.emails as |email|}}\\n \\n {{/each}}\\n {{/if}}\\n \\n
\\n\\n
\\n \\n
\\n
\\n {{/if}}\\n \\n\\n <:error as |PageViewError|>\\n \\n \\n
\\n\\n\",{ moduleName: \"customer-site/automation/rules/builder/notifications/new-contact/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n \\n <:loading as |PageViewLoading|>\\n \\n \\n\\n <:default>\\n {{#unless this.isValidSchedule}}\\n \\n {{/unless}}\\n\\n {{!-- @glint-expect-error Please convert this component to TS. --}}\\n \\n \\n \\n\\n <:error as |PageViewError|>\\n \\n \\n \\n\",{ moduleName: \"customer-site/automation/rules/builder/restrictions/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{outlet}}\",{ moduleName: \"customer-site/automation/rules/builder/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"

{{tc this \\'places\\'}}

\\n\",{ moduleName: \"customer-site/automation/rules/builder/trigger/details/geo-location/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n <:default as |PageViewContainer api|>\\n \\n <:loading as |PageViewLoading|>\\n \\n \\n\\n <:default as |data|>\\n \\n\\n \\n {{outlet}}\\n \\n \\n \\n \\n\",{ moduleName: \"customer-site/automation/rules/builder/trigger/details/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\",{ moduleName: \"customer-site/automation/rules/builder/trigger/index/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n\",{ moduleName: \"customer-site/automation/rules/index/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n <:toolbar>\\n {{#if this.identityManager.identityModel.canCreateEditScenes}}\\n \\n \\n\\n \\n \\n {{/if}}\\n \\n\\n <:default as |PageViewContainer|>\\n \\n <:loading as |PageViewLoading|>\\n \\n \\n\\n <:default>\\n \\n \\n {{#each this.sortedScenes as |scene|}}\\n
\\n {{#if this.isReordering}}\\n \\n {{/if}}\\n\\n \\n\\n

\\n {{scene.name}}\\n

\\n\\n {{#each (array\\n (hash k=\\'run\\' i=\\'circle-play\\' a=this.runScene e=scene.canBeExecuted)\\n (hash k=\\'edit\\' i=\\'edit\\' a=this.editScene e=true)\\n (hash k=\\'delete\\' i=\\'trash\\' a=this.deleteScene e=scene.canBeDeleted)\\n ) as |btn|}}\\n {{!-- e: action can be edited\\n a: action\\n i: icon\\n k: type of button\\n --}}\\n \\n {{/each}}\\n
\\n {{/each}}\\n
\\n
\\n \\n\\n <:no-results as |PageViewNoResults|>\\n \\n \\n\\n <:error as |PageViewError|>\\n \\n \\n
\\n \\n\\n\",{ moduleName: \"customer-site/automation/scenes/index/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n {{#if this.showDimmerSelection}}\\n \\n {{/if}}\\n
\\n\",{ moduleName: \"customer-site/automation/schedules/builder/action/details/lights/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n <:default as |PageViewContainer api|>\\n \\n <:loading as |PageViewLoading|>\\n \\n \\n <:default>\\n
\\n {{!-- @glint-expect-error actionType is async, please await and then use get to access selectionHeader, please fix this. --}}\\n \\n {{#if this.hasExtraDeviceOptions}}\\n \\n {{/if}}\\n {{#if this.hasDevices}}\\n \\n {{/if}}\\n \\n \\n \\n {{outlet}}\\n \\n
\\n \\n \\n <:error as |PageViewError|>\\n \\n \\n
\\n \\n
\",{ moduleName: \"customer-site/automation/schedules/builder/action/details/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n <:default as |PageViewContainer|>\\n \\n <:loading as |PageViewLoading|>\\n \\n \\n <:default>\\n \\n \\n \\n \\n\\n\",{ moduleName: \"customer-site/automation/schedules/builder/action/index/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{outlet}}\\n{{!-- template-lint-disable no-bare-strings --}}\\n

This is the additional option page.

\",{ moduleName: \"customer-site/automation/schedules/builder/additional-option/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n <:default as |PageViewContainer pvc|>\\n \\n <:loading as |PageViewLoading|>\\n \\n \\n\\n <:default>\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\n <:error as |PageViewError|>\\n \\n \\n \\n \\n\",{ moduleName: \"customer-site/automation/schedules/builder/follow-up/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n <:default as |PageViewContainer api|>\\n \\n <:loading as |PageViewLoading|>\\n \\n \\n\\n <:default>\\n
\\n
\\n \\n \\n
\\n\\n
\\n \\n \\n \\n \\n
\\n\\n
\\n \\n \\n \\n
\\n\\n {{#if this.showFollowUps}}\\n
\\n {{#each (await this.followUpEventData) as |followUp|}}\\n \\n \\n \\n \\n {{/each}}\\n {{#if this.canCreateAdditionalFollowUps}}\\n \\n \\n \\n \\n {{/if}}\\n
\\n {{/if}}\\n\\n {{#if this.isMobileApp}}\\n
\\n \\n
\\n {{/if}}\\n\\n
\\n \\n
\\n
\\n \\n <:error as |PageViewError|>\\n \\n \\n
\\n \\n
\\n\",{ moduleName: \"customer-site/automation/schedules/builder/index/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n <:default as |PageViewContainer|>\\n \\n <:loading as |PageViewLoading|>\\n \\n \\n\\n <:default as |schedule|>\\n \\n \\n\\n <:error as |PageViewError|>\\n \\n \\n \\n \\n\\n\",{ moduleName: \"customer-site/automation/schedules/builder/mobile-no-support/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{outlet}}\",{ moduleName: \"customer-site/automation/schedules/builder/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n <:default as |PageViewContainer api|>\\n \\n <:loading as |PageViewLoading|>\\n \\n \\n\\n <:default>\\n \\n \\n \\n \\n \\n <:default>\\n \\n \\n \\n \\n <:default>\\n {{#unless this.isCurrentSpecificDaysValid}}\\n

{{tc this \\\"errorNoDaySelected\\\"}}

\\n {{/unless}}\\n \\n \\n
\\n \\n <:default>\\n

{{tc this \\\"selectedDate\\\"}}

\\n
\\n

{{tc this \\\"dateLabel\\\"}}

\\n \\n
\\n \\n
\\n \\n \\n <:error as |PageViewError|>\\n \\n \\n
\\n \\n
\",{ moduleName: \"customer-site/automation/schedules/builder/time/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\",{ moduleName: \"customer-site/automation/schedules/index/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n \\n <:loading as |PageViewLoading|>\\n \\n \\n\\n <:default as |data|>\\n
\\n
\\n \\n\\n
\\n \\n \\n
\\n\\n\\n
\\n \\n \\n
\\n\\n\\n \\n\\n
\\n \\n\\n \\n
\\n\\n\\n
\\n \\n\\n
\\n \\n \\n
\\n
\\n
\\n
\\n \\n
\\n\",{ moduleName: \"customer-site/automation/schedules/wifi/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n\\n\\n\",{ moduleName: \"customer-site/automation/smart-arming/arm-edit/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\",{ moduleName: \"customer-site/automation/smart-arming/disarm-edit/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n \\n
\\n {{#if @isSmartArmingSchedule}}\\n \\n {{#if @isMorning}}\\n

{{tc this \\'smartWakeDesc\\' startTime=this.startTime endTime=this.endTime}}

\\n {{else}}\\n

{{tc this \\'smartNightDesc\\' duration=this.duration}}

\\n {{/if}}\\n {{/if}}\\n\\n \\n {{#if @isSmartArmingSchedule}}\\n

{{tc this (if @isMorning \\'disarm\\' \\'arm\\') startTime=this.startTime endTime=this.endTime}}

\\n {{else}}\\n

{{tc this (if @isMorning \\'disarmAt\\' \\'armAt\\') startTime=this.startTime}}

\\n {{/if}}\\n \\n
\\n
\",{ moduleName: \"customer-site/components/automation/smart-arming/list-item/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { computed, action } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { EmberSmartArmingDisarmEdit, EmberSmartArmingArmEdit } from 'customer-site/enums/CustomerPageUrl';\nimport { intlPath } from '@adc/i18n/path';\n\nimport './_style.scss';\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type NavigationService from 'customer-site/services/navigation';\n\ninterface ListItemArgs {\n isMorning: boolean;\n isEnabled: boolean;\n isDefault: boolean;\n localizedStartTime: string;\n localizedEndTime: string;\n localizedDuration: string;\n isSmartArmingSchedule: boolean;\n toggleEnabled: () => void;\n}\n\n/**\n * List item for showing smart arming configurations\n */\n@intlPath({ path: 'automation/smart-arming/list-item' })\nexport default class ListItem extends Component {\n @service declare intl: ADCIntlService;\n @service declare navigation: NavigationService;\n\n /**\n * Get formatted start time\n */\n @computed('args.localizedStartTime')\n get startTime(): string {\n return this.args.localizedStartTime;\n }\n\n /**\n * Get formatted end time\n */\n @computed('args.localizedEndTime')\n get endTime(): string {\n return this.args.localizedEndTime;\n }\n\n /**\n * Get formatted duration\n */\n @computed('args.localizedDuration')\n get duration(): string {\n return this.args.localizedDuration;\n }\n\n /**\n * Transition to the edit screen\n */\n @action\n editConfig(): void {\n this.navigation.transitionToRouteId(this.args.isMorning ? EmberSmartArmingDisarmEdit : EmberSmartArmingArmEdit);\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Automation::SmartArming::ListItem': typeof ListItem;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n {{#each (await this.smartArmingRules) as |rule|}}\\n \\n {{/each}}\\n
\\n\",{ moduleName: \"customer-site/automation/smart-arming/index/template.hbs\" })","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nd(\"customer-site/automation/presence-state-settings/template\", function(){ return i(\"customer-site/automation/presence-state-settings/template.hbs\");});\nd(\"customer-site/automation/presence-state-settings/controller\", function(){ return i(\"customer-site/automation/presence-state-settings/controller.ts\");});\nd(\"customer-site/automation/presence-state-settings/route\", function(){ return i(\"customer-site/automation/presence-state-settings/route.ts\");});\nd(\"customer-site/automation/remotes/edit/template\", function(){ return i(\"customer-site/automation/remotes/edit/template.hbs\");});\nd(\"customer-site/automation/remotes/edit/controller\", function(){ return i(\"customer-site/automation/remotes/edit/controller.ts\");});\nd(\"customer-site/automation/remotes/edit/route\", function(){ return i(\"customer-site/automation/remotes/edit/route.ts\");});\nd(\"customer-site/automation/remotes/index/template\", function(){ return i(\"customer-site/automation/remotes/index/template.hbs\");});\nd(\"customer-site/automation/remotes/index/controller\", function(){ return i(\"customer-site/automation/remotes/index/controller.ts\");});\nd(\"customer-site/automation/remotes/index/route\", function(){ return i(\"customer-site/automation/remotes/index/route.ts\");});\nd(\"customer-site/automation/rules/builder/template\", function(){ return i(\"customer-site/automation/rules/builder/template.hbs\");});\nd(\"customer-site/automation/rules/builder/route\", function(){ return i(\"customer-site/automation/rules/builder/route.js\");});\nd(\"customer-site/automation/rules/builder/action/route\", function(){ return i(\"customer-site/automation/rules/builder/action/route.js\");});\nd(\"customer-site/automation/rules/builder/action/details/template\", function(){ return i(\"customer-site/automation/rules/builder/action/details/template.hbs\");});\nd(\"customer-site/automation/rules/builder/action/details/controller\", function(){ return i(\"customer-site/automation/rules/builder/action/details/controller.ts\");});\nd(\"customer-site/automation/rules/builder/action/details/route\", function(){ return i(\"customer-site/automation/rules/builder/action/details/route.js\");});\nd(\"customer-site/automation/rules/builder/action/details/chimes/template\", function(){ return i(\"customer-site/automation/rules/builder/action/details/chimes/template.hbs\");});\nd(\"customer-site/automation/rules/builder/action/details/chimes/route\", function(){ return i(\"customer-site/automation/rules/builder/action/details/chimes/route.ts\");});\nd(\"customer-site/automation/rules/builder/action/details/index/template\", function(){ return i(\"customer-site/automation/rules/builder/action/details/index/template.hbs\");});\nd(\"customer-site/automation/rules/builder/action/details/index/controller\", function(){ return i(\"customer-site/automation/rules/builder/action/details/index/controller.ts\");});\nd(\"customer-site/automation/rules/builder/action/details/index/route\", function(){ return i(\"customer-site/automation/rules/builder/action/details/index/route.ts\");});\nd(\"customer-site/automation/rules/builder/action/details/lights/template\", function(){ return i(\"customer-site/automation/rules/builder/action/details/lights/template.hbs\");});\nd(\"customer-site/automation/rules/builder/action/details/lights/controller\", function(){ return i(\"customer-site/automation/rules/builder/action/details/lights/controller.ts\");});\nd(\"customer-site/automation/rules/builder/action/details/lights/route\", function(){ return i(\"customer-site/automation/rules/builder/action/details/lights/route.ts\");});\nd(\"customer-site/automation/rules/builder/action/index/template\", function(){ return i(\"customer-site/automation/rules/builder/action/index/template.hbs\");});\nd(\"customer-site/automation/rules/builder/action/index/controller\", function(){ return i(\"customer-site/automation/rules/builder/action/index/controller.ts\");});\nd(\"customer-site/automation/rules/builder/action/index/route\", function(){ return i(\"customer-site/automation/rules/builder/action/index/route.ts\");});\nd(\"customer-site/automation/rules/builder/extra-rule-option/template\", function(){ return i(\"customer-site/automation/rules/builder/extra-rule-option/template.hbs\");});\nd(\"customer-site/automation/rules/builder/extra-rule-option/controller\", function(){ return i(\"customer-site/automation/rules/builder/extra-rule-option/controller.js\");});\nd(\"customer-site/automation/rules/builder/extra-rule-option/route\", function(){ return i(\"customer-site/automation/rules/builder/extra-rule-option/route.js\");});\nd(\"customer-site/automation/rules/builder/index/template\", function(){ return i(\"customer-site/automation/rules/builder/index/template.hbs\");});\nd(\"customer-site/automation/rules/builder/index/controller\", function(){ return i(\"customer-site/automation/rules/builder/index/controller.js\");});\nd(\"customer-site/automation/rules/builder/index/route\", function(){ return i(\"customer-site/automation/rules/builder/index/route.js\");});\nd(\"customer-site/automation/rules/builder/mobile-no-support/template\", function(){ return i(\"customer-site/automation/rules/builder/mobile-no-support/template.hbs\");});\nd(\"customer-site/automation/rules/builder/mobile-no-support/controller\", function(){ return i(\"customer-site/automation/rules/builder/mobile-no-support/controller.ts\");});\nd(\"customer-site/automation/rules/builder/mobile-no-support/route\", function(){ return i(\"customer-site/automation/rules/builder/mobile-no-support/route.ts\");});\nd(\"customer-site/automation/rules/builder/notifications/index/template\", function(){ return i(\"customer-site/automation/rules/builder/notifications/index/template.hbs\");});\nd(\"customer-site/automation/rules/builder/notifications/index/controller\", function(){ return i(\"customer-site/automation/rules/builder/notifications/index/controller.js\");});\nd(\"customer-site/automation/rules/builder/notifications/index/route\", function(){ return i(\"customer-site/automation/rules/builder/notifications/index/route.js\");});\nd(\"customer-site/automation/rules/builder/notifications/new-contact/template\", function(){ return i(\"customer-site/automation/rules/builder/notifications/new-contact/template.hbs\");});\nd(\"customer-site/automation/rules/builder/notifications/new-contact/controller\", function(){ return i(\"customer-site/automation/rules/builder/notifications/new-contact/controller.ts\");});\nd(\"customer-site/automation/rules/builder/notifications/new-contact/route\", function(){ return i(\"customer-site/automation/rules/builder/notifications/new-contact/route.ts\");});\nd(\"customer-site/automation/rules/builder/restrictions/template\", function(){ return i(\"customer-site/automation/rules/builder/restrictions/template.hbs\");});\nd(\"customer-site/automation/rules/builder/restrictions/controller\", function(){ return i(\"customer-site/automation/rules/builder/restrictions/controller.ts\");});\nd(\"customer-site/automation/rules/builder/restrictions/route\", function(){ return i(\"customer-site/automation/rules/builder/restrictions/route.ts\");});\nd(\"customer-site/automation/rules/builder/trigger/details/template\", function(){ return i(\"customer-site/automation/rules/builder/trigger/details/template.hbs\");});\nd(\"customer-site/automation/rules/builder/trigger/details/controller\", function(){ return i(\"customer-site/automation/rules/builder/trigger/details/controller.ts\");});\nd(\"customer-site/automation/rules/builder/trigger/details/route\", function(){ return i(\"customer-site/automation/rules/builder/trigger/details/route.js\");});\nd(\"customer-site/automation/rules/builder/trigger/details/access-control/route\", function(){ return i(\"customer-site/automation/rules/builder/trigger/details/access-control/route.ts\");});\nd(\"customer-site/automation/rules/builder/trigger/details/geo-location/template\", function(){ return i(\"customer-site/automation/rules/builder/trigger/details/geo-location/template.hbs\");});\nd(\"customer-site/automation/rules/builder/trigger/details/geo-location/controller\", function(){ return i(\"customer-site/automation/rules/builder/trigger/details/geo-location/controller.ts\");});\nd(\"customer-site/automation/rules/builder/trigger/details/geo-location/route\", function(){ return i(\"customer-site/automation/rules/builder/trigger/details/geo-location/route.ts\");});\nd(\"customer-site/automation/rules/builder/trigger/details/index/route\", function(){ return i(\"customer-site/automation/rules/builder/trigger/details/index/route.ts\");});\nd(\"customer-site/automation/rules/builder/trigger/index/template\", function(){ return i(\"customer-site/automation/rules/builder/trigger/index/template.hbs\");});\nd(\"customer-site/automation/rules/builder/trigger/index/controller\", function(){ return i(\"customer-site/automation/rules/builder/trigger/index/controller.ts\");});\nd(\"customer-site/automation/rules/builder/trigger/index/route\", function(){ return i(\"customer-site/automation/rules/builder/trigger/index/route.js\");});\nd(\"customer-site/automation/rules/index/template\", function(){ return i(\"customer-site/automation/rules/index/template.hbs\");});\nd(\"customer-site/automation/rules/index/controller\", function(){ return i(\"customer-site/automation/rules/index/controller.js\");});\nd(\"customer-site/automation/rules/index/route\", function(){ return i(\"customer-site/automation/rules/index/route.js\");});\nd(\"customer-site/automation/scenes/index/template\", function(){ return i(\"customer-site/automation/scenes/index/template.hbs\");});\nd(\"customer-site/automation/scenes/index/controller\", function(){ return i(\"customer-site/automation/scenes/index/controller.ts\");});\nd(\"customer-site/automation/scenes/index/route\", function(){ return i(\"customer-site/automation/scenes/index/route.ts\");});\nd(\"customer-site/automation/schedules/builder/template\", function(){ return i(\"customer-site/automation/schedules/builder/template.hbs\");});\nd(\"customer-site/automation/schedules/builder/route\", function(){ return i(\"customer-site/automation/schedules/builder/route.ts\");});\nd(\"customer-site/automation/schedules/builder/action/details/template\", function(){ return i(\"customer-site/automation/schedules/builder/action/details/template.hbs\");});\nd(\"customer-site/automation/schedules/builder/action/details/controller\", function(){ return i(\"customer-site/automation/schedules/builder/action/details/controller.ts\");});\nd(\"customer-site/automation/schedules/builder/action/details/route\", function(){ return i(\"customer-site/automation/schedules/builder/action/details/route.ts\");});\nd(\"customer-site/automation/schedules/builder/action/details/lights/template\", function(){ return i(\"customer-site/automation/schedules/builder/action/details/lights/template.hbs\");});\nd(\"customer-site/automation/schedules/builder/action/details/lights/controller\", function(){ return i(\"customer-site/automation/schedules/builder/action/details/lights/controller.ts\");});\nd(\"customer-site/automation/schedules/builder/action/details/lights/route\", function(){ return i(\"customer-site/automation/schedules/builder/action/details/lights/route.ts\");});\nd(\"customer-site/automation/schedules/builder/action/index/template\", function(){ return i(\"customer-site/automation/schedules/builder/action/index/template.hbs\");});\nd(\"customer-site/automation/schedules/builder/action/index/controller\", function(){ return i(\"customer-site/automation/schedules/builder/action/index/controller.ts\");});\nd(\"customer-site/automation/schedules/builder/action/index/route\", function(){ return i(\"customer-site/automation/schedules/builder/action/index/route.ts\");});\nd(\"customer-site/automation/schedules/builder/additional-option/template\", function(){ return i(\"customer-site/automation/schedules/builder/additional-option/template.hbs\");});\nd(\"customer-site/automation/schedules/builder/additional-option/route\", function(){ return i(\"customer-site/automation/schedules/builder/additional-option/route.ts\");});\nd(\"customer-site/automation/schedules/builder/follow-up/template\", function(){ return i(\"customer-site/automation/schedules/builder/follow-up/template.hbs\");});\nd(\"customer-site/automation/schedules/builder/follow-up/controller\", function(){ return i(\"customer-site/automation/schedules/builder/follow-up/controller.ts\");});\nd(\"customer-site/automation/schedules/builder/follow-up/route\", function(){ return i(\"customer-site/automation/schedules/builder/follow-up/route.ts\");});\nd(\"customer-site/automation/schedules/builder/index/template\", function(){ return i(\"customer-site/automation/schedules/builder/index/template.hbs\");});\nd(\"customer-site/automation/schedules/builder/index/controller\", function(){ return i(\"customer-site/automation/schedules/builder/index/controller.ts\");});\nd(\"customer-site/automation/schedules/builder/index/route\", function(){ return i(\"customer-site/automation/schedules/builder/index/route.ts\");});\nd(\"customer-site/automation/schedules/builder/mobile-no-support/template\", function(){ return i(\"customer-site/automation/schedules/builder/mobile-no-support/template.hbs\");});\nd(\"customer-site/automation/schedules/builder/mobile-no-support/controller\", function(){ return i(\"customer-site/automation/schedules/builder/mobile-no-support/controller.ts\");});\nd(\"customer-site/automation/schedules/builder/mobile-no-support/route\", function(){ return i(\"customer-site/automation/schedules/builder/mobile-no-support/route.ts\");});\nd(\"customer-site/automation/schedules/builder/time/template\", function(){ return i(\"customer-site/automation/schedules/builder/time/template.hbs\");});\nd(\"customer-site/automation/schedules/builder/time/controller\", function(){ return i(\"customer-site/automation/schedules/builder/time/controller.ts\");});\nd(\"customer-site/automation/schedules/builder/time/route\", function(){ return i(\"customer-site/automation/schedules/builder/time/route.ts\");});\nd(\"customer-site/automation/schedules/index/template\", function(){ return i(\"customer-site/automation/schedules/index/template.hbs\");});\nd(\"customer-site/automation/schedules/index/controller\", function(){ return i(\"customer-site/automation/schedules/index/controller.js\");});\nd(\"customer-site/automation/schedules/index/route\", function(){ return i(\"customer-site/automation/schedules/index/route.js\");});\nd(\"customer-site/automation/schedules/wifi/template\", function(){ return i(\"customer-site/automation/schedules/wifi/template.hbs\");});\nd(\"customer-site/automation/schedules/wifi/controller\", function(){ return i(\"customer-site/automation/schedules/wifi/controller.ts\");});\nd(\"customer-site/automation/schedules/wifi/route\", function(){ return i(\"customer-site/automation/schedules/wifi/route.ts\");});\nd(\"customer-site/automation/smart-arming/controller\", function(){ return i(\"customer-site/automation/smart-arming/controller.ts\");});\nd(\"customer-site/automation/smart-arming/route\", function(){ return i(\"customer-site/automation/smart-arming/route.ts\");});\nd(\"customer-site/automation/smart-arming/arm-edit/template\", function(){ return i(\"customer-site/automation/smart-arming/arm-edit/template.hbs\");});\nd(\"customer-site/automation/smart-arming/arm-edit/controller\", function(){ return i(\"customer-site/automation/smart-arming/arm-edit/controller.ts\");});\nd(\"customer-site/automation/smart-arming/arm-edit/route\", function(){ return i(\"customer-site/automation/smart-arming/arm-edit/route.ts\");});\nd(\"customer-site/automation/smart-arming/disarm-edit/template\", function(){ return i(\"customer-site/automation/smart-arming/disarm-edit/template.hbs\");});\nd(\"customer-site/automation/smart-arming/disarm-edit/controller\", function(){ return i(\"customer-site/automation/smart-arming/disarm-edit/controller.ts\");});\nd(\"customer-site/automation/smart-arming/disarm-edit/route\", function(){ return i(\"customer-site/automation/smart-arming/disarm-edit/route.ts\");});\nd(\"customer-site/automation/smart-arming/index/template\", function(){ return i(\"customer-site/automation/smart-arming/index/template.hbs\");});\nd(\"customer-site/automation/smart-arming/index/controller\", function(){ return i(\"customer-site/automation/smart-arming/index/controller.ts\");});\n","import Controller from '@ember/controller';\nimport { computed } from '@ember/object';\nimport { action } from '@ember/object';\nimport { reads } from '@ember/object/computed';\nimport { inject as service } from '@ember/service';\nimport PresenceStateExplainerModal from 'customer-site/components/modals/automation/presence-state/presence-state-explainer/index';\nimport { ComingHome, GoingAway, Goodnight } from 'customer-site/enums/ActionSetType';\nimport { Home, Away, Sleep } from 'customer-site/enums/PresenceState';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type ModalService from '@adc/ui-components/services/modals';\nimport type NotificationManager from '@adc/ui-components/services/notification-manager';\nimport type CurrentPresenceState from 'customer-site/models/automation/presence-state/current-presence-state';\nimport type PresenceStateExplainerDisplay from 'customer-site/models/automation/presence-state/presence-state-explainer-display';\nimport type PresenceStateSettingsDisplay from 'customer-site/models/automation/presence-state/presence-state-settings-display';\nimport type SceneModel from 'customer-site/models/automation/scene';\nimport type ContextManager from 'customer-site/services/context-manager';\nimport type { ModelFrom, ResolvedModelFrom } from 'customer-site/utils/type-utils';\nimport type PresenceStateSettingsRoute from './route';\n\nconst visitedStatusSettingsPageStorageName = 'visited_status_settings_page';\n\nconst presenceStateActionSetTypeMap: Record = {\n [Home]: ComingHome,\n [Away]: GoingAway,\n [Sleep]: Goodnight\n};\n\n/**\n * @classdesc\n * Automation Presence State Settings route controller.\n */\nexport default class PresenceStateSettingsController extends Controller {\n @service declare intl: ADCIntlService;\n @service declare notificationManager: NotificationManager;\n @service declare modals: ModalService;\n @service declare contextManager: ContextManager;\n\n declare model: ModelFrom;\n resolvedModel?: ResolvedModelFrom;\n\n @reads('resolvedModel.presenceStateSettings')\n settings?: PresenceStateSettingsDisplay[];\n\n @reads('resolvedModel.presenceStateExplainer')\n explainer?: PresenceStateExplainerDisplay;\n\n @reads('resolvedModel.presenceState')\n presenceStateArray?: CurrentPresenceState[];\n\n @computed('presenceStateArray', 'presenceStateArray.firstObject')\n get presenceState(): CurrentPresenceState | undefined {\n return this.presenceStateArray?.firstObject;\n }\n\n @computed('settings')\n get settingsWithScenes(): PresenceStateSettingsDisplay[] | undefined {\n const { settings } = this;\n return settings?.map((s) => {\n s.relatedScene = this.getSceneFromPresenceStateId(s.presenceState);\n return s;\n });\n }\n\n @computed('settings.[]')\n get allStatusesCannotBeEdited(): boolean {\n return this.settings?.every((s) => !s.canBeEdited) ?? true;\n }\n\n getSceneFromPresenceStateId(presenceState: number): SceneModel | undefined {\n return this.resolvedModel?.scenes.findBy('actionSetType', presenceStateActionSetTypeMap[presenceState]);\n }\n\n /**\n * Opens the Presence State Explainer Modal\n */\n @action\n async openExplainerModal(): Promise {\n const { explainer } = this;\n\n if (explainer) {\n this.modals.showModal(PresenceStateExplainerModal, {\n titleText: explainer.infoTitleText,\n bodyMainText: explainer.infoBodyMainText,\n bodySubText: explainer.infoBodySubText,\n closeButtonText: explainer.infoButtonText,\n imagePath: this.contextManager.getStaticResourcePath(explainer.infoImagePath),\n showCloseButton: false\n });\n }\n }\n\n /**\n * Save each status's current settings\n */\n @action\n async save(): Promise {\n const { settings, notificationManager } = this;\n\n if (!settings) {\n notificationManager.addError(this.intl.tc(this, 'saveError'));\n return;\n }\n\n return Promise.all(settings.invoke('save'))\n .then(() => notificationManager.addSuccess(this.intl.tc(this, 'saveSuccess')))\n .catch(() => {\n settings.invoke('rollbackAttributes');\n notificationManager.addError(this.intl.tc(this, 'saveError'));\n });\n }\n\n /**\n * Transitions back to previous route. Rolling back settings should be handled in the\n * rollbackModelOnTransition method in the route.\n */\n @action\n cancel(): void {\n this.contextManager.transitionToPreviousRoute();\n }\n\n /**\n * Checks if this is the user's first visit to this route. If so, then launch the\n * explainer modal and set the localStorage Item so that we know not to show in subsequent visits to the page.\n */\n @action\n async launchModalOnFirstVisit(): Promise {\n const { explainer } = this,\n isFirstTimeVisitingPage = window.localStorage.getItem(visitedStatusSettingsPageStorageName) == null;\n\n if (isFirstTimeVisitingPage && explainer) {\n this.modals.showModal(PresenceStateExplainerModal, {\n titleText: explainer.infoTitleText,\n bodyMainText: explainer.infoBodyMainText,\n bodySubText: explainer.infoBodySubText,\n closeButtonText: explainer.infoButtonText,\n imagePath: this.contextManager.getStaticResourcePath(explainer.infoImagePath),\n showCloseButton: true\n });\n\n window.localStorage.setItem(visitedStatusSettingsPageStorageName, 'true');\n }\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 'automation/presence-state-settings': PresenceStateSettingsController;\n }\n}\n","import { inject as service } from '@ember/service';\nimport { ARMED_AWAY } from 'customer-site/components/dashboard-cards/devices/partition-card/index';\nimport { EmberPresenceStateSettings } from 'customer-site/enums/CustomerPageUrl';\nimport AdcBaseRoute from '../../classes/base-route';\n\nimport type Store from '@ember-data/store';\nimport type CurrentPresenceState from 'customer-site/models/automation/presence-state/current-presence-state';\nimport type PresenceStateExplainerDisplay from 'customer-site/models/automation/presence-state/presence-state-explainer-display';\nimport type PresenceStateSettingsDisplay from 'customer-site/models/automation/presence-state/presence-state-settings-display';\nimport type PresenceStateTriggerDeviceSuboption from 'customer-site/models/automation/presence-state/presence-state-trigger-device-suboption';\nimport type PresenceStateTriggerOption from 'customer-site/models/automation/presence-state/presence-state-trigger-option';\nimport type SceneModel from 'customer-site/models/automation/scene';\nimport type IdentityManager from 'customer-site/services/identity-manager';\nimport type { ModelFrom } from 'customer-site/utils/type-utils';\n\n/**\n * Presence State Settings Route.\n */\nexport default class PresenceStateSettingsRoute extends AdcBaseRoute {\n @service declare store: Store;\n @service declare identityManager: IdentityManager;\n\n /** @override */\n routeId = EmberPresenceStateSettings;\n\n model(): Promise<{\n presenceState: ADCStorePeekAll;\n presenceStateSettings: ADCStorePeekAll;\n presenceStateExplainer: ADCAsyncStoreQueryRecord;\n scenes: ADCAsyncStoreFindAll;\n }> {\n return (async () => {\n const { store, identityManager } = this,\n system = await identityManager.getSelectedSystem(),\n partitions = await system.partitions;\n const validArmingStates = new Set();\n\n // finds the unique arming states per partitions\n if (partitions && partitions.length != 0) {\n partitions.forEach((partition) => {\n const partitionStates = partition.validArmingStates();\n partitionStates.forEach((state) => validArmingStates.add(state));\n });\n }\n\n // if there are only 2 arming states and \"Armed Away\" is the only state to arm panel,\n // partition can not distinguish difference between Away (Armed Away) and Sleep (Armed Stay) status via arming trigger\n const isArmOnly = validArmingStates.size == 2 && validArmingStates.has(ARMED_AWAY);\n\n await store.queryRecord('automation/presence-state/current-presence-state', {});\n await store.query('automation/presence-state/presence-state-settings-display', {\n isArmingAvailable: !!system?.supportsSecureArming && !isArmOnly\n });\n\n return {\n presenceState: store.peekAll('automation/presence-state/current-presence-state'),\n presenceStateSettings: store.peekAll('automation/presence-state/presence-state-settings-display'),\n presenceStateExplainer: store.queryRecord(\n 'automation/presence-state/presence-state-explainer-display',\n {\n darkMode: identityManager.isDarkModeEnabled\n }\n ),\n scenes: store.findAll('automation/scene')\n };\n })();\n }\n\n declare currentModel: ModelFrom;\n\n /**\n * When the user navigates to another page, rollback any local changes to the presenceStateSettings\n */\n async rollbackModelOnTransition(): Promise {\n const settings: PresenceStateSettingsDisplay[] = this.currentModel.presenceStateSettings.slice();\n\n // Rollback each triggerOption, sensorTriggerOption and triggerDeviceSuboption with dirty attributes\n for (const setting of settings) {\n // Handle triggerOptions\n const triggerOptionsPromise = await setting.triggerOptions,\n triggerOptions: PresenceStateTriggerOption[] = triggerOptionsPromise.slice();\n triggerOptions\n .filter((option: PresenceStateTriggerOption) => {\n return !option.isSaving && option.hasDirtyAttributes;\n })\n .map((option: PresenceStateTriggerOption) => option.rollbackAttributes());\n\n // Handle sensorTriggerOption\n const sensorTriggerOption = await setting.sensorTriggerOption;\n\n if (sensorTriggerOption && !sensorTriggerOption.isSaving && sensorTriggerOption.hasDirtyAttributes) {\n sensorTriggerOption.rollbackAttributes();\n }\n\n // Handle sensorTriggerOption's suboptions\n if (sensorTriggerOption && sensorTriggerOption.sensorSuboptions) {\n const suboptionPromise = await sensorTriggerOption.sensorSuboptions,\n suboptions: PresenceStateTriggerDeviceSuboption[] = suboptionPromise.slice();\n suboptions\n .filter((suboption: PresenceStateTriggerDeviceSuboption) => {\n return !suboption.isSaving && suboption.hasDirtyAttributes;\n })\n .map((suboption: PresenceStateTriggerDeviceSuboption) => suboption.rollbackAttributes());\n }\n }\n }\n}\n","import Controller from '@ember/controller';\nimport { action, computed } from '@ember/object';\nimport { service } from '@ember/service';\nimport { EmberRemotesEdit, EmberRules, EmberRulesBuilder } from 'customer-site/enums/CustomerPageUrl';\nimport { Remotes as RemotesFilter } from 'customer-site/enums/RuleFilter';\nimport { SinglePress } from 'customer-site/enums/SceneButtonKeyAttributeEnumType';\nimport { Remote as RemoteTriggerType } from 'customer-site/enums/TriggerType';\nimport { getTriggerDescription, sortSceneRuleListItems } from 'customer-site/utils/scene-rule-display';\nimport SimpleListItem from '@adc/ui-components/components/simple-list/list-item';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type NavigationService from 'customer-site/services/navigation';\nimport type { SceneRuleListItem } from 'customer-site/utils/scene-rule-display';\nimport type { ModelFrom } from 'customer-site/utils/type-utils';\nimport type RemotesEditRoute from './route';\n\ntype RouteModel = ModelFrom;\n\nexport default class RemotesEditController extends Controller {\n @service declare intl: ADCIntlService;\n @service declare navigation: NavigationService;\n declare model: RouteModel;\n\n @computed('intl.t', 'model.{existingSceneRuleDisplays,device}')\n get sceneRuleListItems(): Promise {\n return (async () => {\n const existingSceneRuleDisplays = (await this.model.existingSceneRuleDisplays).slice();\n const remote = await this.model.device;\n const listItems: SceneRuleListItem[] = [];\n\n // For every button on the remote, check if it has a single press scene rule,\n // and if it doesn't, create a suggested rule list item.\n for (let buttonNumber = 1; buttonNumber <= remote.numberOfButtons; buttonNumber += 1) {\n // If a single press rule already exists for this button, skip it.\n if (\n existingSceneRuleDisplays.some(\n (sceneRule) => sceneRule.actionType === SinglePress && sceneRule.button === buttonNumber\n )\n ) {\n continue;\n }\n\n listItems.push(\n new SimpleListItem({\n description: getTriggerDescription(buttonNumber, SinglePress, this.intl.t.bind(this.intl)),\n props: {\n isSuggested: true,\n buttonNumber,\n actionType: SinglePress\n }\n })\n );\n }\n\n // For all of the scene rule displays already made for the remote,\n // Retrieve the scene icon, and include it into the props for the list item.\n for (const sceneRuleDisplay of existingSceneRuleDisplays) {\n const { icon } = await sceneRuleDisplay.scene;\n const { triggerDescription, actionType, button, id } = sceneRuleDisplay;\n\n listItems.push(\n new SimpleListItem({\n description: triggerDescription,\n props: {\n isSuggested: false,\n actionType,\n icon,\n buttonNumber: button,\n ruleId: id\n }\n })\n );\n }\n\n listItems.sort(sortSceneRuleListItems);\n\n return listItems;\n })();\n }\n\n /**\n * When the \"Manage All Rules\" button is clicked, transition users to the rules list page\n */\n @action\n transitionToRulesPage(): void {\n this.navigation.transitionToRouteId(EmberRules, { queryParams: { filterTags: [RemotesFilter] } });\n }\n\n /**\n * When the plus button is clicked, direct user to a new rule, with trigger partially filled.\n * @param deviceId the id of the remote we want to make a rule for.\n */\n @action\n transitionToNewRule(deviceId: string): void {\n this.navigation.transitionToRouteId(EmberRulesBuilder, 'new', {\n queryParams: {\n triggerType: RemoteTriggerType,\n triggerDevices: deviceId,\n returnToAfterSave: EmberRemotesEdit,\n returnToAfterSaveSlug: deviceId\n }\n });\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 'automation/remotes/edit': RemotesEditController;\n }\n}\n","import { EmberRemotesEdit } from 'customer-site/enums/CustomerPageUrl';\nimport BaseEditDeviceRoute from 'customer-site/home/edit-device-route';\n\nimport type ArrayProxy from '@ember/array/proxy';\nimport type { BaseEditDeviceModel } from 'customer-site/home/edit-device-route';\nimport type DeviceResourceInfo from 'customer-site/models/devices/device-resource-info';\nimport './_style.scss';\nimport type SceneRuleDisplay from 'customer-site/models/automation/scene-rule-display';\nimport type RemotesModel from 'customer-site/models/devices/remote';\n\ninterface RemotesEditRouteModel extends BaseEditDeviceModel {\n existingSceneRuleDisplays: Promise>;\n buttonResourceInfo: Promise;\n}\n\nexport default class RemotesEditRoute extends BaseEditDeviceRoute {\n routeId = EmberRemotesEdit;\n\n model({ id_device }: { id_device: string }): RemotesEditRouteModel {\n const remote = this.store.findRecord('devices/remote', id_device);\n\n return {\n device: remote,\n existingSceneRuleDisplays: (async () => {\n const resolvedRemote = await remote;\n return resolvedRemote.sceneRules;\n })(),\n buttonResourceInfo: (async () => {\n const resolvedRemote = await remote;\n return resolvedRemote.buttonResourceInfo;\n })()\n };\n }\n}\n","import { tracked } from '@glimmer/tracking';\nimport Controller from '@ember/controller';\nimport { action } from '@ember/object';\nimport { sort } from '@ember/object/computed';\nimport { inject as service } from '@ember/service';\nimport { EmberRemotesEdit } from 'customer-site/enums/CustomerPageUrl';\nimport { EditActionItem } from '@adc/ui-components/utils/action-item';\n\nimport type ModalService from '@adc/ui-components/services/modals';\nimport type RemoteModel from 'customer-site/models/devices/remote';\nimport type NavigationService from 'customer-site/services/navigation';\nimport type { ModelFrom, ResolvedModelFrom } from 'customer-site/utils/type-utils';\nimport type AutomationRemotesRoute from './route';\n\n/**\n * @classdesc\n * Automation remotes route controller.\n */\nexport default class AutomationRemotesController extends Controller {\n @service declare modals: ModalService;\n @service declare navigation: NavigationService;\n\n declare model: ModelFrom;\n @tracked resolvedModel?: ResolvedModelFrom;\n\n /**\n * The sort key for sorted remotes.\n */\n remoteSortOrder = ['description'];\n\n /**\n * The remotes to show, sorted by description.\n */\n @sort('resolvedModel.remotes.[]', 'remoteSortOrder')\n declare remotesWithActionItems: RemoteModel[];\n\n /**\n * Transitions to the edit page for the selected remote.\n */\n @action navigateToRemotesEdit(remoteId: string): void {\n this.navigation.transitionToRouteId(EmberRemotesEdit, remoteId);\n }\n\n /**\n * Creates an action item for the list-row-item of the remote.\n */\n @action getActionItems(remote: RemoteModel): EditActionItem[] {\n return [\n EditActionItem.create({\n action: () => this.navigateToRemotesEdit(remote.id),\n icon: 'cog'\n })\n ];\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 'automation/remotes': AutomationRemotesController;\n }\n}\n","import { inject as service } from '@ember/service';\nimport AdcBaseRoute from '../../../classes/base-route';\nimport { EmberRemotes } from '../../../enums/CustomerPageUrl';\n\nimport './_style.scss';\nimport type Store from '@ember-data/store';\nimport type RemoteModel from 'customer-site/models/devices/remote';\n\n/**\n * Displays a list of configured remotes.\n */\nexport default class AutomationRemotesRoute extends AdcBaseRoute {\n @service declare store: Store;\n\n routeId = EmberRemotes;\n\n model(): { remotes: ADCAsyncStoreFindAll } {\n return {\n remotes: this.store.findAll('devices/remote')\n };\n }\n}\n","import Route from '@ember/routing/route';\n\nexport default class AutomationRulesBuilderActionDetailsChimes extends Route {}\n","import { action, computed } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { BinaryListItem } from '@adc/ui-components/components/simple-binary/list';\nimport { WarningSoundStarted } from '../../../../../enums/EventType';\nimport RulesBuilderBaseFeatureDetailsController from '../../base-feature-details-controller';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type ArrayProxy from '@ember/array/proxy';\nimport type ExtraDeviceOptionDetail from 'customer-site/models/automation/rules-builder/extra-device-option-detail';\nimport type { ModelFrom } from 'customer-site/utils/type-utils';\nimport type ActionDetailsRoute from './route';\n\nexport type PropsType = {\n isExtraOption: boolean;\n detailTitle?: string;\n details?: ArrayProxy;\n disabledDetailWarning?: string;\n};\n\n/**\n * @classdesc\n * The rules builder action details route controller.\n */\nexport default class RulesBuilderActionDetailsController extends RulesBuilderBaseFeatureDetailsController {\n @service declare intl: ADCIntlService;\n declare model: ModelFrom;\n\n /**\n * Checks if devices/actions should be preselected\n */\n @action\n dataLoaded(): void {\n this.checkActionForPrePopulation();\n }\n\n get supportsMultipleDevices(): Promise {\n return this.supportsMultiSelect(this.validActionTemplates(), false, this.model.rule);\n }\n\n @computed('model.rule.actionEvent')\n get enabledDevices(): Promise {\n return this.getTemplateDevicesIds(this.model.rule, this.validActionTemplates(), false);\n }\n\n @computed('model.rule.actionEvent')\n get enabledExtraOptions(): Promise {\n return this.getTemplateExtraOptionIds(this.model.rule, this.validActionTemplates(), false);\n }\n\n @computed('model.rule.actionEvent')\n get getInstructions(): string | undefined {\n switch (this.model.rule.actionEvent.get('eventType')) {\n case WarningSoundStarted:\n return this.intl.tc(this, 'cameraDeterrenceInstructions');\n break;\n default:\n return undefined;\n }\n }\n\n @computed('model.allActionExtraDeviceOptions')\n get hasExtraOptionDetails(): Promise {\n return (async () => {\n const allActionExtraDeviceOptions = await this.model.allActionExtraDeviceOptions;\n if (!allActionExtraDeviceOptions) {\n return false;\n }\n\n return allActionExtraDeviceOptions[0]?.details?.length > 0;\n })();\n }\n\n @computed('model.rule.actionExtraDeviceOption')\n get disabledDetailWarning(): Promise {\n return (async () => {\n const actionExtraDeviceOption = await this.model.rule.actionExtraDeviceOption;\n let result = undefined;\n // We'll need to iterate through the extra options after it's supported.\n // @ts-expect-error I think this is an error, asking on PR: https://bitbucket.corp.adcinternal.com/projects/FALCOR/repos/adc-web-frontend/pull-requests/3694/diff#apps%2Fcustomer-site%2Fapp%2Fautomation%2Frules%2Fbuilder%2Faction%2Fdetails%2Fcontroller.ts\n actionExtraDeviceOption?.details?.forEach((detail: ExtraDeviceOptionDetail) => {\n if (detail.disabled) {\n // @ts-expect-error I think this is an error, asking on PR: https://bitbucket.corp.adcinternal.com/projects/FALCOR/repos/adc-web-frontend/pull-requests/3694/diff#apps%2Fcustomer-site%2Fapp%2Fautomation%2Frules%2Fbuilder%2Faction%2Fdetails%2Fcontroller.ts\n result = actionExtraDeviceOption.disabledDetailWarning;\n }\n });\n\n return result;\n })();\n }\n\n @computed(\n 'model.{allActionDevices,allActionExtraDeviceOptions}',\n 'model.rule.{actionEvent,actionDevices,actionExtraDeviceOption}',\n 'enabledDevices.[]',\n 'enabledExtraOptions.[]'\n )\n get availableDevices(): Promise[]> {\n const { model } = this,\n { rule } = model,\n selectedDevices = rule.hasMany('actionDevices').ids(),\n selectedExtraOptions = rule.hasMany('actionExtraDeviceOption').ids(),\n fnGetListItem = (\n id: string,\n label: string,\n icon: { icon: string; color: string },\n state: boolean,\n disabled: boolean,\n props: PropsType = {\n isExtraOption: false,\n detailTitle: undefined,\n details: undefined,\n disabledDetailWarning: undefined\n }\n ): BinaryListItem<{ id: string; isExtraOptions?: boolean }> =>\n new BinaryListItem<{\n id: string;\n isExtraOptions?: boolean;\n details?: ArrayProxy;\n }>({\n label,\n icon: icon.icon,\n color: icon.color,\n state,\n disabled,\n props: {\n id,\n ...props\n }\n });\n\n return (async () => {\n const enabledDevices = await this.enabledDevices,\n allActionDevices = await model.allActionDevices,\n allActionExtraDeviceOptions = await model.allActionExtraDeviceOptions,\n enabledExtraOptions = await this.enabledExtraOptions;\n\n return [\n ...allActionExtraDeviceOptions.map(\n ({ id, description, icon, detailTitle, details, disabledDetailWarning }) =>\n fnGetListItem(\n id,\n description,\n icon,\n selectedExtraOptions.includes(id),\n !enabledExtraOptions.includes(id),\n {\n isExtraOption: true,\n detailTitle,\n details,\n disabledDetailWarning\n }\n )\n ),\n\n ...allActionDevices.map(({ id, description, deviceIcon }) =>\n fnGetListItem(\n id,\n description,\n deviceIcon,\n selectedDevices?.includes(id),\n !enabledDevices.includes(id)\n )\n )\n ];\n })();\n }\n\n /**\n * Updates the selected devices for the action being edited.\n */\n @action async selectActionDevices(\n items: Awaited\n ): Promise {\n const { model } = this,\n rule = model.rule,\n changes = this.selectDevice(\n false,\n items,\n rule,\n await model.allActionDevices,\n await model.allActionExtraDeviceOptions\n );\n\n if (changes) {\n (await rule.actionExtraDeviceOption).setObjects(changes.extraOption);\n (await rule.actionDevices).setObjects(changes.devices);\n }\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 'automation/rules/builder/action/details': RulesBuilderActionDetailsController;\n }\n}\n","import { action, computed } from '@ember/object';\nimport RulesBuilderBaseFeatureDetailsController from 'customer-site/automation/rules/builder/base-feature-details-controller';\n\nimport type { BinaryListItem } from '@adc/ui-components/components/simple-binary/list';\nimport type { AsyncBelongsTo } from '@ember-data/model';\nimport type RuleEvent from 'customer-site/models/automation/rules-builder/event';\nimport type { ModelFrom } from 'customer-site/utils/type-utils';\nimport type Route from '../route';\n\nexport default class AutomationRulesBuilderActionDetailsIndex extends RulesBuilderBaseFeatureDetailsController {\n declare model: ModelFrom;\n\n @computed('model.rule.actionDevices.[]')\n get enabledStatus(): Promise {\n return this.getTemplateStatuses(this.model.rule, this.validActionTemplates(), false);\n }\n\n @computed('enabledStatus', 'model.{allActionEvents.[],rule.actionEvent}')\n get availableStatus(): ReturnType {\n const { model } = this;\n return this.availableStatuses(\n model.allActionEvents,\n this.enabledStatus,\n model.rule.belongsTo('actionEvent').id()\n );\n }\n\n /**\n * Selects an action status for the edited rule.\n */\n @action\n async selectActionStatus(items: BinaryListItem<{ id: string }>[]): Promise {\n const { model } = this,\n rule = model.rule,\n changes = this.selectStatus(false, items, rule, await model.allActionEvents);\n\n if (changes) {\n rule.actionEvent = changes as unknown as AsyncBelongsTo;\n }\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 'automation/rules/builder/action/details/index': AutomationRulesBuilderActionDetailsIndex;\n }\n}\n","import AutomationRulesBuilderFeatureDetailsIndexRoute from '../../../base-feature-details-index-route';\n\nimport type Rule from 'customer-site/models/automation/rules-builder/rule';\n\nexport default class AutomationRulesBuilderActionDetailsIndex extends AutomationRulesBuilderFeatureDetailsIndexRoute {\n getFeatureRoute(model: Rule): Promise {\n return (async () => {\n const actionType = await model.actionType,\n actionStatusRoute = actionType.extraData?.ruleDetailsRoute;\n\n return actionStatusRoute ?? '';\n })();\n }\n\n getFeatureRouteSlugs(model: Rule): string | Promise {\n return model.id ?? 'new';\n }\n}\n","import { tracked } from '@glimmer/tracking';\nimport { action, computed, set } from '@ember/object';\nimport { alias, reads, equal, or } from '@ember/object/computed';\nimport { isPresent } from '@ember/utils';\nimport RulesBuilderBaseFeatureDetailsController from 'customer-site/automation/rules/builder/base-feature-details-controller';\nimport { HeatingCoolingIssue, TemperatureAlert, SwitchLevelChanged } from 'customer-site/enums/EventType';\nimport { hslToHex, percentWarmthToHexString, hexToHSL } from '@adc/ui-components/utils/color-pickers/color';\nimport { Manual } from '../../../../../../enums/ColorSource';\nimport { WarmToCool, RGBW } from '../../../../../../enums/LightColorFormat';\n\nimport type { BinaryListItem } from '@adc/ui-components/components/simple-binary/list';\nimport type { Hue, Saturation, Lightness, Warmth, Color } from '@adc/ui-components/utils/color-pickers/color';\nimport type Device from 'customer-site/models/automation/rules-builder/device';\nimport type ExtraActionLight from 'customer-site/models/automation/rules-builder/extra-data/extra-action-light';\nimport type RuleModel from 'customer-site/models/automation/rules/rule';\n\nconst DEFAULT_LIGHT_LEVEL = 50;\nconst DEFAULT_LIGHT_COLOR = '#fff9a5';\nconst DEFAULT_LIGHT_WARMTH = 70;\n\nexport default class AutomationRulesBuilderLights extends RulesBuilderBaseFeatureDetailsController {\n declare model: any; // Please replace this 'any' with the actual model type!\n\n @reads('model.rule')\n declare rule: RuleModel;\n\n @reads('rule.actionType.extraData')\n declare actionExtraData: ExtraActionLight;\n\n @alias('rule.extraData.ACTION_LIGHT_PERCENT')\n lightPercentLevel: string | undefined;\n\n @alias('rule.extraData.ACTION_LIGHT_COLOR_FORMAT')\n lightColorFormat: number | undefined;\n\n @alias('rule.extraData.ACTION_LIGHT_COLOR')\n lightColor: string | undefined;\n\n @alias('rule.extraData.ACTION_LIGHT_PERCENT_WARMTH')\n lightPercentWarmth?: Warmth;\n\n @alias('rule.extraData.ACTION_LIGHT_COLOR_SOURCE')\n lightColorSource: number | undefined;\n\n @reads('rule.actionDevices')\n declare selectedDevices: Device[];\n\n @equal('model.rule.actionEvent.eventType', SwitchLevelChanged)\n declare showDimSlider: boolean;\n\n @equal('model.rule.actionEvent.eventType', HeatingCoolingIssue)\n declare isColoredSwitch: boolean;\n\n @equal('model.rule.actionEvent.eventType', TemperatureAlert)\n declare isColorTemperatureSwitch: boolean;\n\n @or('isColoredSwitch', 'isColorTemperatureSwitch')\n declare showColorPicker: boolean;\n\n @computed('model.rule', 'selectedDevices')\n get enabledStatus(): Promise {\n return this.getTemplateStatuses(this.model.rule, this.validActionTemplates(), false);\n }\n\n get supportsMultipleDevices(): Promise {\n return this.supportsMultiSelect(this.validActionTemplates(), false, this.model.rule);\n }\n\n get availableStatus(): Promise {\n const { model } = this;\n return this.availableStatuses(\n model.allActionEvents,\n this.enabledStatus,\n model.rule.belongsTo('actionEvent').id()\n );\n }\n\n @computed('lightPercentLevel')\n get sliderValue(): number {\n return this.lightPercentLevel === undefined ? DEFAULT_LIGHT_LEVEL : parseInt(this.lightPercentLevel);\n }\n\n @action\n setDimLevel(newLightLevel: number): void {\n set(this, 'lightPercentLevel', newLightLevel.toString());\n }\n\n /**\n * Selects an action status for the edited rule.\n * Toggles option to show dim slider if action status is Dim.\n */\n @action async selectActionStatus(items: BinaryListItem<{ id: string }>[]): Promise {\n const { model } = this,\n rule = model.rule,\n changes = this.selectStatus(false, items, rule, await model.allActionEvents);\n if (changes) {\n set(rule, 'actionEvent', changes);\n if (changes.eventType === HeatingCoolingIssue) {\n //The values are set to ensure rule is saved correctly in the event the user does not select a color\n set(this, 'lightColorSource', Manual);\n set(this, 'lightColorFormat', RGBW);\n set(this, 'lightColor', this.lightColor || DEFAULT_LIGHT_COLOR);\n\n //Sets color picker color\n const hslColor = hexToHSL(DEFAULT_LIGHT_COLOR);\n set(this, 'hue', hslColor.hue);\n set(this, 'saturation', hslColor.saturation);\n set(this, 'lightness', hslColor.lightness);\n // Object.assign(this, hexToHSL(DEFAULT_LIGHT_COLOR));\n } else if (changes.eventType === TemperatureAlert) {\n //The values are set to ensure rule is saved correctly in the event the user does not select a color temperature\n set(this, 'lightColorSource', Manual);\n set(this, 'lightColorFormat', WarmToCool);\n set(this, 'lightPercentWarmth', this.lightPercentWarmth || DEFAULT_LIGHT_WARMTH);\n } else {\n //Reset all color values if a color rule is not selected\n set(this, 'lightColorFormat', undefined);\n set(this, 'lightColorSource', undefined);\n set(this, 'lightPercentWarmth', undefined);\n set(this, 'lightColor', undefined);\n }\n\n if (changes.eventType === SwitchLevelChanged) {\n if (\n this.lightPercentLevel === undefined ||\n this.lightPercentLevel === '255' ||\n this.lightPercentLevel === '0'\n ) {\n set(this, 'lightPercentLevel', DEFAULT_LIGHT_LEVEL.toString());\n }\n }\n if (!this.showDimSlider) {\n set(this, 'lightPercentLevel', undefined);\n }\n }\n }\n\n // region Component state\n\n /**\n * The hue color component of the current editDevice.\n */\n @tracked hue: Hue = 0;\n /**\n * The saturation color component of the current editDevice.\n */\n @tracked saturation: Saturation = 0;\n /**\n * The lightness color component of the current editDevice.\n */\n @tracked lightness: Lightness = 50;\n\n @tracked isColorPickerShown = false;\n\n /**\n * Makes the color picker visible.\n */\n @action\n showColorPickers(): void {\n this.isColorPickerShown = true;\n }\n\n get cpAnchorId(): string {\n return `cp-anchor`;\n }\n\n /**\n * The path to the light bulb color picker preset backgrounds.\n */\n get colorPresetsBackground(): string {\n return this.contextManager.getStaticResourcePath('images/color-preset-backgrounds');\n }\n\n @action\n colorChanged(values: Color): void {\n const { percentWarmth, ...hslColor } = values,\n isPercentWarmth = isPresent(percentWarmth);\n set(this, 'lightColorFormat', isPercentWarmth ? WarmToCool : RGBW);\n\n if (isPercentWarmth) {\n set(this, 'lightPercentWarmth', percentWarmth);\n set(this, 'lightColor', undefined);\n } else {\n set(this, 'hue', hslColor.hue);\n set(this, 'saturation', hslColor.saturation);\n set(this, 'lightness', hslColor.lightness);\n\n const hexColor = hslToHex(hslColor);\n set(this, 'lightColor', hexColor);\n set(this, 'lightPercentWarmth', undefined);\n }\n }\n\n getWarmth(): Warmth {\n return this.lightPercentWarmth != undefined && this.lightPercentWarmth >= 0 && this.lightPercentWarmth <= 100\n ? this.lightPercentWarmth\n : 50;\n }\n\n @computed('actionEvent', 'lightColor', 'lightPercentWarmth', 'lightColorFormat')\n get computedColor(): string | undefined {\n if (this.lightColorFormat != WarmToCool) {\n return this.lightColor;\n }\n return percentWarmthToHexString(this.getWarmth());\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 'automation/rules/builder/action/details/lights': AutomationRulesBuilderLights;\n }\n}\n","import Route from '@ember/routing/route';\n\nexport default class AutomationRulesBuilderActionDetailsLights extends Route {}\n","import { get } from '@ember/object';\nimport { isEmpty } from '@ember/utils';\nimport { EmberRulesBuilderAction, EmberRulesBuilderActionDetails } from '../../../../../enums/CustomerPageUrl';\nimport BaseFeatureDetailsRoute from '../../base-feature-details-route';\n\n/**\n * @classdesc\n * Rules builder route for editing action details.\n */\nexport default class ActionDetailsRoute extends BaseFeatureDetailsRoute {\n /** @override */\n routeId = EmberRulesBuilderActionDetails;\n\n /** @override */\n model() {\n const model = this.modelFor('automation.rules.builder'),\n rule = model.rule,\n actionTypeId = rule.belongsTo('actionType').id(),\n availableTemplates = model.ruleTemplates.then((t) => t.filterBy('actionType.id', actionTypeId));\n\n return {\n ...model,\n allActionEvents: availableTemplates\n .then((t) => t.mapBy('actionEvent').uniqBy('id'))\n .then((t) => Promise.all(t)),\n allActionDevices: availableTemplates\n .then((t) => t.mapBy('actionDevices'))\n .then((t) =>\n Promise.all(t).then((t) =>\n t\n .map((t) => t.toArray())\n .flat()\n .uniqBy('id')\n )\n ),\n allActionExtraDeviceOptions: availableTemplates\n .then((t) => t.mapBy('actionExtraDeviceOptions'))\n .then((t) =>\n Promise.all(t).then((t) =>\n t\n .map((t) => t.toArray())\n .flat()\n .uniqBy('id')\n )\n )\n };\n }\n\n /** @override */\n async validateRuleModel(model) {\n const selectedType = await get(model, 'rule.actionType');\n return isEmpty(selectedType) ? EmberRulesBuilderAction : undefined;\n }\n}\n","import { action, computed } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport RulesBuilderBaseFeatureController from 'customer-site/automation/rules/builder/base-feature-controller';\nimport { EmberRulesBuilderActionDetails } from 'customer-site/enums/CustomerPageUrl';\n\nimport type { BinaryListItem } from '@adc/ui-components/components/simple-binary/list';\nimport type { AsyncBelongsTo } from '@ember-data/model';\nimport type { Registry as ServiceRegistry } from '@ember/service';\nimport type BaseRuleComponentTypeModel from 'customer-site/models/automation/rules-builder/base-rule-feature-type';\nimport type RuleEventModel from 'customer-site/models/automation/rules-builder/event';\nimport type TriggerTypeModel from 'customer-site/models/automation/rules-builder/trigger-type';\nimport type { ModelFrom } from 'customer-site/utils/type-utils';\nimport type Route from '../route';\n\n/**\n * @classdesc\n * Rules builder controller for selecting action type.\n */\nexport default class RulesBuilderActionIndexController extends RulesBuilderBaseFeatureController {\n @service declare store: ServiceRegistry['store'];\n\n declare model: ModelFrom;\n\n @computed('model.{rule.actionType,ruleTemplates}')\n get enabledActionTypes(): Promise {\n return this.getEnabledTypes(this.validActionTemplates(), 'actionType');\n }\n\n async incompatibleMessage(selectedId: string): Promise {\n let key = 'incompatibleActionMessage';\n\n if (\n (\n await Promise.all(\n await this.getEnabledTypes(this.validActionTemplates(true, false, false), 'actionType')\n )\n ).find((item) => item.id === selectedId)\n ) {\n key = 'partiallyIncompatibleDeviceMessage';\n } else if (\n (\n await Promise.all(\n await this.getEnabledTypes(this.validActionTemplates(false, true, false), 'actionType')\n )\n ).find((item) => item.id === selectedId)\n ) {\n key = 'partiallyIncompatibleActionEventMessage';\n }\n\n return this.intl.tc(this, key);\n }\n\n /**\n * Updates the rules trigger to use the selected type.\n *\n * @param items The collection of feature items.\n */\n @action async updateActionType(items: BinaryListItem<{ id: string }>[]): Promise {\n await this.updateType(\n items,\n this.model.rule,\n 'actionType',\n await this.enabledActionTypes,\n await this.model.allActionTypes,\n this.intl.tc(this, 'incompatibleAction'),\n async (): Promise => {\n this.model.rule.triggerType = null as unknown as AsyncBelongsTo;\n this.model.rule.triggerEvent = null as unknown as AsyncBelongsTo;\n (await this.model.rule.triggerDevices).setObjects([]);\n (await this.model.rule.triggerExtraDeviceOption).setObjects([]);\n },\n async (): Promise => {\n this.model.rule.actionEvent = null as unknown as AsyncBelongsTo;\n (await this.model.rule.actionDevices).setObjects([]);\n (await this.model.rule.restrictions).setObjects([\n this.store.createRecord('automation/rules-builder/restrictions/schedule-restriction')\n ]);\n },\n () => this.editDetails()\n );\n }\n\n editDetails(): void {\n this.transitionToBuilderRoute(EmberRulesBuilderActionDetails);\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 'automation/rules/builder/action/index': RulesBuilderActionIndexController;\n }\n}\n","import AdcBaseRoute from '../../../../../classes/base-route';\nimport { EmberRulesBuilderAction } from '../../../../../enums/CustomerPageUrl';\n\n/**\n * Rules builder route for selecting action type.\n */\nexport default class RulesBuilderActionIndexRoute extends AdcBaseRoute {\n /** @override */\n routeId = EmberRulesBuilderAction;\n}\n","import { inject as service } from '@ember/service';\nimport { isEmpty } from '@ember/utils';\nimport AdcBaseRoute from '../../../../classes/base-route';\nimport { EmberRulesBuilder, EmberRulesBuilderAction } from '../../../../enums/CustomerPageUrl';\n\n/**\n * @classdesc\n * Container route for rules builder action routes.\n */\nexport default class RuleBuilderActionRoute extends AdcBaseRoute {\n @service navigation;\n /** @override */\n routeId = EmberRulesBuilderAction;\n\n /** @override */\n model() {\n const model = this.modelFor('automation.rules.builder');\n return {\n ...model,\n allActionTypes: model.ruleTemplates\n .then((t) => t.mapBy('actionType').uniqBy('id'))\n .then((t) => Promise.all(t))\n };\n }\n\n /** @override */\n async afterModel(model) {\n const types = await model.allActionTypes;\n\n // Are there no action types?\n if (isEmpty(types)) {\n // Trigger type hasn't been selected, so redirect to rules builder index route.\n const slug = this.paramsFor('automation/rules/builder')['id_rule'];\n this.navigation.transitionToRouteId(EmberRulesBuilder, slug);\n }\n }\n}\n","import { tracked } from '@glimmer/tracking';\nimport { computed, action } from '@ember/object';\nimport { alias } from '@ember/object/computed';\nimport { inject as service } from '@ember/service';\nimport BaseController from 'customer-site/automation/rules/builder/filter-controller';\nimport { EmberRulesBuilder } from 'customer-site/enums/CustomerPageUrl';\n\n/**\n * @classdesc\n * Rules Builder controller for timer options.\n *\n * @class automation.rules.builder.extra-rule-option.ExtraRuleOptionController\n */\nexport default class ExtraRuleOptionController extends BaseController {\n @service intl;\n\n /**\n * The resolved model object.\n */\n resolvedModel;\n\n @alias('resolvedModel.rule')\n rule;\n\n /**\n * @type {models.automation.rules-builder.ExtraRuleOption}\n */\n @alias('resolvedModel.extraRuleOption')\n extraRuleOption;\n\n /**\n * @type {models.automation.rules-builder.ExtraRuleOptionItem}\n */\n @alias('extraRuleOption.optionItems')\n extraRuleOptionItems;\n\n /**\n * Used to temporarily store options before officially saving them to rule\n */\n @tracked\n selectedOptions;\n\n @computed('extraRuleOption.ruleOptionSuffix', 'selectedOptions.[]')\n get useSuffix() {\n return this.extraRuleOption.ruleOptionSuffix && this.selectedOptions.some((o) => o.useSuffix);\n }\n\n @computed('extraRuleOption.title')\n get title() {\n return this.extraRuleOption.title.replace('{0}', '').replace('{1}', '');\n }\n\n /**\n * Figures out what options the user can select based on selected Devices chosen.\n * @returns {*}\n */\n @computed('rule.{triggerDevices,actionDevices}', 'extraRuleOptionItems')\n get filteredExtraRuleOptionItems() {\n const triggerDeviceIds = this.rule.hasMany('triggerDevices').ids(),\n actionDeviceIds = this.rule.hasMany('actionDevices').ids();\n\n return this.extraRuleOptionItems.filter(\n (i) =>\n i.deviceIdsFilter.length == 0 ||\n triggerDeviceIds.every((id) => i.deviceIdsFilter.includes(id)) ||\n actionDeviceIds.every((id) => i.deviceIdsFilter.includes(id))\n );\n }\n\n @action\n updateSelection(selectedItems) {\n this.selectedOptions = selectedItems;\n }\n\n /**\n * Do not change rule model and return back to rule builder\n */\n @action cancel() {\n this.transitionToBuilderRoute(EmberRulesBuilder);\n }\n\n /**\n * Redirects back to main rule builder page\n */\n @action saveConditions() {\n if (this.selectedOptions.length == 0 && this.extraRuleOption.isSingleSelect) {\n this.selectedOptions = [this.filteredExtraRuleOptionItems[0]];\n }\n\n this.rule.extraRuleOptions.removeObjects(this.extraRuleOptionItems.mapBy('value'));\n this.rule.extraRuleOptions.push(...this.selectedOptions.mapBy('value'));\n this.transitionToBuilderRoute(EmberRulesBuilder);\n }\n}\n","import { inject as service } from '@ember/service';\nimport { EmberRulesBuilderExtraRuleOption } from 'customer-site/enums/CustomerPageUrl';\nimport AdcBaseRoute from '../../../../classes/base-route';\n\n/**\n * @classdesc\n *\n * Allowing the customer to modify delay times within a specified range.\n *\n * @class automation.rules.builde.extra-rule-option.Route\n * @extends AdcBaseRoute\n */\nexport default class Route extends AdcBaseRoute {\n @service store;\n\n /** @override */\n routeId = EmberRulesBuilderExtraRuleOption;\n\n model({ id_option }) {\n const model = this.modelFor('automation.rules.builder');\n return {\n rule: model.rule,\n extraRuleOption: this.store.findRecord('automation/rules-builder/extra-rule-option', id_option)\n };\n }\n\n /** @override */\n async setupController(controller, model) {\n super.setupController(controller, model);\n\n const selectedOptions = await model.rule.extraRuleOptions,\n extraRuleOptionItems = (await model.extraRuleOption).optionItems;\n\n let selectedOptionsItems = extraRuleOptionItems.filter((o) => selectedOptions.includes(o.value));\n\n if (selectedOptionsItems.length == 0) {\n selectedOptionsItems = extraRuleOptionItems.filter((o) => o.isDefault);\n }\n\n controller.set('selectedOptions', selectedOptionsItems);\n }\n}\n","import { tracked } from '@glimmer/tracking';\nimport { getOwner } from '@ember/application';\nimport { computed, action, set } from '@ember/object';\nimport { alias, mapBy, reads, map } from '@ember/object/computed';\nimport { inject as service } from '@ember/service';\nimport { isPresent, isEmpty } from '@ember/utils';\nimport {\n EmberRules,\n EmberRulesBuilderTrigger,\n EmberRulesBuilderAction,\n EmberRulesBuilderRestrictions,\n EmberRulesBuilderNotifications,\n EmberRulesBuilderExtraRuleOption\n} from '../../../../enums/CustomerPageUrl';\nimport { ScheduleRestriction as ScheduleRestrictionType } from '../../../../enums/RestrictionType';\nimport BaseController from '../filter-controller';\n\nconst RULE_NAME_MAX_LENGTH = 50;\n\n/**\n * @classdesc\n * Rules builder index controller.\n *\n * @class automation.rules.builder.index.RulesBuilderController\n */\nexport default class RulesBuilderController extends BaseController {\n @service notificationManager;\n @service intl;\n @service modals;\n @service store;\n @service navigation;\n @service nativeBridge;\n\n queryParams = ['returnToAfterSave', 'returnToAfterSaveSlug'];\n\n returnToAfterSave = null;\n\n returnToAfterSaveSlug = null;\n\n ruleNameMaxLength = RULE_NAME_MAX_LENGTH;\n\n /**\n * Reset query parameters\n */\n resetData() {\n set(this, 'returnToAfterSave', undefined);\n set(this, 'returnToAfterSaveSlug', undefined);\n }\n\n /**\n * The resolved model object.\n *\n * @type {{\n * rule: models.automation.rules-builder.rule,\n * ruleTemplates: models.automation.rules-builder.template[],\n * }}\n */\n @tracked resolvedModel;\n\n /**\n * Stores the rule passed as the model.\n *\n * @type {models.automation.rules-builder.rule}\n */\n @alias('resolvedModel.rule')\n rule;\n\n /**\n * @type {models.automation.rules-builder.template[]}\n */\n @alias('resolvedModel.ruleTemplates')\n ruleTemplates;\n\n @alias('contextManager.identityModel.isMobileApp')\n isMobileApp;\n\n @alias('singleValidTemplate.canUserCreate')\n hasEditRulesPermission;\n\n @alias('contextManager.identityModel.hasInternalBetaAccess')\n hasInternalBeta;\n\n /**\n * Indicates we should show the under construction banner\n * @type {boolean}\n */\n @computed('ruleTemplates.@each.isCertified')\n get showUnderConstructionBanner() {\n return this.ruleTemplates?.isAny('isCertified', false);\n //return this.singleValidTemplate != undefined && !this.singleValidTemplate.isCertified;\n }\n\n /**\n * Check if there is a custom icon we should use for the action event. If not, just use the icon associated with the action type.\n */\n @computed('rule.{actionType,actionEvent,actionType.extraData}')\n get actionEventIcon() {\n return (async () => {\n const actionType = await this.rule.actionType;\n const actionEventIcon = (await this.rule.actionEvent).icon;\n if (actionType.extraData) {\n return (await actionType.extraData.icon(this.rule)) ?? actionEventIcon;\n }\n return actionEventIcon;\n })();\n }\n\n @computed('actionHasTriggerDependentOptions', 'rule.{actionType.extraData,extraData}')\n get extraActionDescription() {\n return (async () => {\n const actionType = await this.rule.actionType;\n return (await this.actionHasTriggerDependentOptions)\n ? ''\n : actionType.extraData.description(this.rule.extraData);\n })();\n }\n\n @computed('actionHasTriggerDependentOptions', 'rule.{actionType.extraData,extraData}')\n get extraActionSubIcon() {\n return (async () => {\n const actionType = await this.rule.actionType;\n return (await this.actionHasTriggerDependentOptions)\n ? ''\n : actionType.extraData.subIcon(this.rule.extraData);\n })();\n }\n\n @computed('rule.{triggerType.extraData,extraData}')\n get extraTriggerDescription() {\n return (async () => {\n const triggerType = await this.rule.triggerType;\n return triggerType.extraData.description(this.rule.extraData);\n })();\n }\n\n /**\n * Returns true if the save rule button should be disabled.\n *\n * @type {Promise}\n */\n @computed('hasEditRulesPermission', 'isRuleValid', 'rule')\n get confirmButtonDisabled() {\n return !(this.hasEditRulesPermission && this.isRuleValid);\n }\n\n /**\n * Returns true when the action has extra options that depend on the selected values in the trigger\n *\n * @return {Promise}\n */\n @computed('isRuleValid', 'singleValidTemplate.extraActionOptionsEnabled')\n get actionHasTriggerDependentOptions() {\n return (async () => {\n return (await this.isRuleValid) && this.singleValidTemplate?.extraActionOptionsEnabled;\n })();\n }\n\n /**\n * Description for the actions extra option\n *\n * @return {Promise}\n */\n @computed('rule.actionType')\n get actionOptionsDescription() {\n return (async () => {\n const rule = await this.rule,\n actionType = await this.rule.actionType;\n return actionType?.extraData?.description(rule.extraData) ?? '';\n })();\n }\n\n /**\n * The icon the action's extra option should display.\n *\n * @return {Promise}\n */\n @computed('rule.actionType')\n get actionOptionIcon() {\n return (async () => {\n const rule = await this.rule,\n actionType = await this.rule.actionType;\n return actionType?.extraData?.icon(rule.extraData) ?? '';\n })();\n }\n\n /**\n * Returns true when the schedule edit should be displayed.\n *\n * @type {Promise}\n */\n @reads('singleValidTemplate.scheduleEnabled')\n displaySchedule;\n\n @computed('singleValidTemplate.editPage', 'isMobileApp')\n get displayLegacyEditLink() {\n // Don't show Legacy link for mobile\n if (this.isMobileApp) {\n return null;\n }\n\n const { contextManager } = this;\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/no-context-manager-get-route\n return contextManager.getRouteItem(this.singleValidTemplate?.editPage)?.url;\n }\n\n @computed('rule.editPageQueryParameters', 'singleValidTemplate.editPageQueryParameters')\n get displayLegacyEditParams() {\n const query = this.rule.editPageQueryParameters ?? this.singleValidTemplate?.editPageQueryParameters;\n if (isPresent(query)) {\n return (\n '?' +\n Object.entries(query)\n .map((v) => v.join('='))\n .join('&')\n );\n }\n\n return '';\n }\n\n /**\n * The collection of route IDs for the various edit rule routes.\n *\n * @type {Object}\n */\n editRoutes = {\n trigger: EmberRulesBuilderTrigger,\n action: EmberRulesBuilderAction,\n restrictions: EmberRulesBuilderRestrictions,\n notifications: EmberRulesBuilderNotifications,\n extraRuleOption: EmberRulesBuilderExtraRuleOption\n };\n\n /**\n * Whether the rule is valid to be saved.\n *\n * @type {Promise}\n */\n @computed('rule.{isTriggerConfigured,isActionConfigured}')\n get isRuleValid() {\n return this.rule.isTriggerConfigured && this.rule.isActionConfigured;\n }\n\n /**\n * Array of possible templates the current rule could be\n *\n * @type {RuleTemplateModel[]}\n */\n @computed('ruleTemplates', 'rule.{triggerType,triggerEvent,actionType,actionEvent}')\n get possibleTemplates() {\n const triggerType = this.rule.belongsTo('triggerType'),\n triggerEvent = this.rule.belongsTo('triggerEvent'),\n triggerDeviceIds = this.rule.hasMany('triggerDevices').ids(),\n actionType = this.rule.belongsTo('actionType'),\n actionEvent = this.rule.belongsTo('actionEvent'),\n actionDeviceIds = this.rule.hasMany('actionDevices').ids();\n\n return this.ruleTemplates\n .filterBy('triggerType.id', triggerType.id())\n .filterBy('triggerEvent.id', triggerEvent.id())\n .filter(\n (t) =>\n isEmpty(triggerDeviceIds) ||\n t\n .hasMany('triggerDevices')\n .ids()\n .any((id) => triggerDeviceIds.includes(id))\n )\n .filterBy('actionType.id', actionType.id())\n .filterBy('actionEvent.id', actionEvent.id())\n .filter(\n (t) =>\n isEmpty(actionDeviceIds) ||\n t\n .hasMany('actionDevices')\n .ids()\n .any((id) => actionDeviceIds.includes(id))\n );\n }\n\n /**\n * Array of possible templates the current rule could be\n *\n * @type {RuleTemplateModel}\n */\n @computed('possibleTemplates', 'rule.{triggerType,triggerEvent,actionType,actionEvent}')\n get singleValidTemplate() {\n const { possibleTemplates, rule } = this;\n\n //This can happen when we detach rules, but don't clear the trigger or action device\n if (possibleTemplates.length === 0) {\n return null;\n }\n\n //If there is only one template left, use it\n if (possibleTemplates.length === 1) {\n return possibleTemplates[0];\n }\n\n const triggerType = rule.belongsTo('triggerType').id(),\n triggerEvent = rule.belongsTo('triggerEvent').id(),\n actionType = rule.belongsTo('actionType').id(),\n actionEvent = rule.belongsTo('actionEvent').id();\n\n //If all the main components are selected we can choose the lowest rank\n if (triggerType && triggerEvent && actionType && actionEvent) {\n return possibleTemplates.reduce((acc, template) => {\n return template.rank < acc.rank ? template : acc;\n });\n }\n\n return null;\n }\n\n /**\n * Takes in all the extraRuleOptions from the specified template and figures out what to display to the user\n * If options are selected, then those options are show, otherwise the default options are used.\n * Also filters out devices based on the deviceFilter[] associated with each option.\n */\n @computed('singleValidTemplate.extraRuleOptions', 'rule.{triggerDevices,actionDevices,extraRuleOptions.[]}')\n get extraRuleOptions() {\n const extraRuleOptions = this.singleValidTemplate?.extraRuleOptions,\n ruleOptions = this.rule.extraRuleOptions,\n triggerDeviceIds = this.rule.hasMany('triggerDevices').ids(),\n actionDeviceIds = this.rule.hasMany('actionDevices').ids();\n\n const selectChoiceMessage = this.intl.tc(this, 'selectOption');\n\n return (async function () {\n return ((await extraRuleOptions) ?? []).map((o) => {\n const options = o.optionItems.filter(\n (i) =>\n i.deviceIdsFilter.length == 0 ||\n triggerDeviceIds.every((id) => i.deviceIdsFilter.includes(id)) ||\n actionDeviceIds.every((id) => i.deviceIdsFilter.includes(id))\n );\n let selectedTitles = options.filter((choice) => ruleOptions.includes(choice.value));\n\n if (selectedTitles.length == 0) {\n selectedTitles = options.filterBy('isDefault', true);\n }\n\n const hasDefault = selectedTitles.length > 0;\n\n let extraRuleIcon = o.icon;\n // if there's an icon associated with the first selected title, use it.\n if (selectedTitles[0]?.icon?.icon) {\n extraRuleIcon = selectedTitles[0].icon;\n }\n\n return {\n id: o.id,\n title: o.title\n .replace('{0}', hasDefault ? selectedTitles.mapBy('name').join(', ') : selectChoiceMessage)\n .replace(\n '{1}',\n o.ruleOptionSuffix && selectedTitles.some((option) => option.useSuffix)\n ? o.ruleOptionSuffix\n : ''\n ),\n icon: extraRuleIcon,\n allowEdit: options.length > 1,\n showAfterTrigger: o.showAfterTrigger,\n hasDefault: hasDefault\n };\n });\n })();\n }\n\n @computed('extraRuleOptions')\n get triggerExtraRuleOptions() {\n return this.extraRuleOptions.then((o) => o.filterBy('showAfterTrigger', true));\n }\n\n @computed('extraRuleOptions')\n get actionExtraRuleOptions() {\n return this.extraRuleOptions.then((o) => o.filterBy('showAfterTrigger', false));\n }\n\n /**\n * Computes the human readable description of this restriction.\n * @type {string}\n */\n @computed('rule.restrictions.@each.description')\n get restrictionDescription() {\n return this.rule.restrictions.findBy('restrictionType', ScheduleRestrictionType)?.description;\n }\n\n // Gets the names oF all addresses being notified by this rule.\n // There are two variables as there's to async calls which need to resolve before we can access the address variables.\n @mapBy('rule.notificationContactAddresses', 'contactAddress')\n notificationContacts;\n @mapBy('notificationContacts', 'address')\n notificationContactAddresses;\n\n /**\n * Computes the human readable description of notifications.\n * @type {string}\n */\n @computed('notificationContactAddresses.[]')\n get notificationDescription() {\n const { notificationContactAddresses } = this;\n\n if (notificationContactAddresses?.length > 0) {\n return this.intl.tc(this, 'notify', { contactAddresses: notificationContactAddresses.join(', ') });\n }\n\n return this.intl.tc(this, 'noNotification');\n }\n\n /**\n * True if there is a value for the rule's name.\n *\n * @returns {boolean}\n */\n @computed('rule.name')\n get isNameInvalid() {\n return !this.rule.name;\n }\n\n /**\n * Caches the resolved model and validates the current rule configuration.\n *\n * @param {Object} resolvedModel\n */\n @action\n async dataLoaded(resolvedModel) {\n this.resolvedModel = resolvedModel;\n\n const { rule } = resolvedModel;\n\n // Is the rule in a detach state?\n if (rule.isDetached) {\n // Try to configure trigger and action for default selection.\n if (isPresent(await rule.triggerType)) {\n await this.checkTriggerForPrePopulation();\n }\n\n if (isPresent(await rule.actionType)) {\n await this.checkActionForPrePopulation();\n }\n }\n }\n\n @action\n async reset() {\n const { store, rule } = this;\n if (rule.isNew) {\n rule.setProperties({\n name: null,\n triggerType: null,\n triggerEvent: null,\n triggerDevices: [],\n triggerDuration: 0,\n triggerExtraDeviceOption: [],\n actionType: null,\n actionEvent: null,\n actionDevices: [],\n actionExtraDeviceOption: [],\n extraData: {},\n restrictions: [store.createRecord('automation/rules-builder/restrictions/schedule-restriction')]\n });\n } else {\n await rule.reload();\n rule.get('restrictions').filterBy('hasDirtyAttributes').invoke('rollbackAttributes');\n }\n }\n\n saveInProgress = false;\n\n /**\n * Saves the rule. If no contact sensor trigger duration set, then set to the default.\n *\n * @returns {void | Promise}\n */\n @action\n save() {\n if (this.saveInProgress) {\n return;\n }\n\n const { notificationManager, rule, contextManager, intl } = this,\n fnSave = async (ruleName) => {\n this.saveInProgress = true;\n try {\n const { singleValidTemplate } = this;\n let saveMessage = singleValidTemplate.customSaveMessage;\n const { ruleEngine } = singleValidTemplate;\n\n //Check extra rule options to make sure only valid one's are returned\n //If the user changes the action/trigger after selecting a rule option, it's possible these get out of sync.\n //Double check only things in the template are returned for the rule here.\n const validExtraRuleOptions =\n (await this.singleValidTemplate?.extraRuleOptions)\n ?.map((option) => option.optionItems?.map((item) => item.value))\n .flat() ?? [];\n\n rule.extraRuleOptions = rule.extraRuleOptions.filter((value) =>\n validExtraRuleOptions.includes(value)\n );\n\n rule.ruleEngine = ruleEngine;\n\n await rule.save();\n\n if (saveMessage) {\n saveMessage = saveMessage.replaceAll('{0}', rule.name);\n } else {\n //Default Message\n saveMessage = intl.tc(this, 'saved', { ruleName: rule.name });\n }\n\n notificationManager.addSuccess(saveMessage);\n\n // Disable the back button so that a user can't go back through the Rule Builder Editor after successfully\n // saving a rule.\n // Returning to the previous page after a newly saved rule will show the user a black /rules/new page\n // Returning to the previous page after an edit will usually cause a \"Rule cannot be found\" error as\n // the ruleId could have been updated leading to a new URL.\n contextManager.clearVisitedRoutesStack();\n\n if (this.returnToAfterSave) {\n this.navigation.transitionToRouteId(Number(this.returnToAfterSave), this.returnToAfterSaveSlug);\n } else {\n this.navigation.transitionToRouteId(EmberRules);\n }\n } catch (ex) {\n const errors = ex?.errors?.errors;\n if (errors) {\n errors.forEach((err) => notificationManager.addError(err.firstObject.detail));\n } else {\n notificationManager.addError(\n intl.tc(this, 'errorSaving', {\n ruleName\n })\n );\n }\n } finally {\n this.saveInProgress = false;\n }\n };\n\n if (isEmpty(rule.name?.trim()) && this.singleValidTemplate.editNameEnabled) {\n this.modals.showRenameModal({\n title: intl.tc(this, 'title'),\n maxLength: 50,\n message: intl.tc(this, 'saveText'),\n output: {\n value: this.singleValidTemplate?.name ?? ''\n },\n rename: (name = '') => {\n const v = name.trim();\n if (!isPresent(v)) {\n return false;\n }\n\n rule.name = v;\n return fnSave(v);\n }\n });\n\n return;\n }\n\n fnSave(rule.name?.trim());\n }\n\n /**\n * Transitions to the action edit route if the action isn't pre-populated.\n */\n @action editRuleAction() {\n this.transitionToBuilderRoute(this.editRoutes.action);\n }\n\n @action transitionToExtraRuleOptionRoute(extraRuleOptionId) {\n this.navigation.transitionToRouteId(\n this.editRoutes.extraRuleOption,\n getOwner(this).lookup('route:application').paramsFor('automation/rules/builder')['id_rule'],\n extraRuleOptionId\n );\n }\n\n /**\n * Retrieves native bridge back button\n */\n @computed('nativeBridge')\n get backButton() {\n return this.nativeBridge.getButtonTypeBack();\n }\n\n /**\n * Transition to the returnToAfterSave page\n */\n @action goBackToSpecifiedPage() {\n this.navigation.transitionToRouteId(Number(this.returnToAfterSave), this.returnToAfterSaveSlug);\n }\n\n /**\n * Trigger device description\n */\n @map('rule.triggerDevices.[]', function (device) {\n return device.description;\n })\n triggerDevices;\n\n @map('rule.triggerExtraDeviceOption.[]', function (device) {\n return device.description;\n })\n triggerExtraDeviceOption;\n\n @computed('triggerDevices', 'triggerExtraDeviceOption.length')\n get triggerDeviceDescription() {\n if (this.triggerExtraDeviceOption.length > 0) {\n return this.triggerExtraDeviceOption.join(', ');\n }\n return this.triggerDevices.join(', ');\n }\n /**\n * Action device description\n */\n @map('rule.actionDevices.[]', function (device) {\n return device.description;\n })\n actionDevices;\n\n @map('rule.actionExtraDeviceOption.[]', function (device) {\n return device.description;\n })\n actionExtraDeviceOption;\n\n @computed('actionDevices', 'actionExtraDeviceOption.length')\n get actionDeviceDescription() {\n if (this.actionExtraDeviceOption.length > 0) {\n return this.actionExtraDeviceOption.join(', ');\n }\n return this.actionDevices.join(', ');\n }\n}\n","import AdcBaseRoute from '../../../../classes/base-route';\nimport { EmberRulesBuilder } from '../../../../enums/CustomerPageUrl';\n\n/**\n * @classdesc\n * Rules builder index route.\n *\n * @class automation.rules.builder.index.RulesBuilderIndexRoute\n */\nexport default class RulesBuilderIndexRoute extends AdcBaseRoute {\n /** @override */\n routeId = EmberRulesBuilder;\n}\n","import Controller from '@ember/controller';\n\nimport type { ModelFrom } from 'customer-site/utils/type-utils';\nimport type ParentRoute from '../route';\n\nexport default class AutomationRulesBuilderMobileNoSupportController extends Controller {\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 'automation/rules/builder/mobile-no-support': AutomationRulesBuilderMobileNoSupportController;\n }\n}\n","import AdcBaseRoute from 'customer-site/classes/base-route';\nimport { EmberRulesBuilderMobileNoSupport } from 'customer-site/enums/CustomerPageUrl';\n\nexport default class RulesBuilderMobileNoSupportRoute extends AdcBaseRoute {\n /** @override */\n routeId = EmberRulesBuilderMobileNoSupport;\n}\n","import { tracked } from '@glimmer/tracking';\nimport { action, computed } from '@ember/object';\nimport { alias } from '@ember/object/computed';\nimport { inject as service } from '@ember/service';\nimport { isEmpty, isPresent } from '@ember/utils';\nimport { EmberRulesBuilder, EmberRulesBuilderNotificationsNewContact } from '../../../../../enums/CustomerPageUrl';\nimport BaseController from '../../filter-controller';\n\n/**\n * @classdesc\n * Inner class representing a notification group item to be displayed.\n *\n * @property {{models.users.ContactAddress}} contact A single contact address.\n * @property {{Boolean}} isSelected Whether the contact address is currently selected or not.\n *\n * @class automation.rules.builder.notifications.NotificationGroupItem\n */\nclass NotificationGroupItem {\n @tracked contact;\n\n @tracked isSelected;\n\n @tracked options;\n\n @tracked selectedOption;\n\n constructor(contact, isSelected, options, selectedOption) {\n this.contact = contact;\n this.isSelected = isSelected;\n this.options = options;\n this.selectedOption = selectedOption;\n }\n}\n\n/**\n * @classdesc\n * Rules builder controller for editing notifications.\n *\n * @class automation.rules.builder.notifications.NotificationsController\n */\nexport default class NotificationsController extends BaseController {\n @service intl;\n @service store;\n @service navigation;\n\n /**\n * @type {{rule: models.automation.rules.Rule, contacts: models.users.ContactAddress[], groups: models.automation.rules.builder.notification-group[]}}\n */\n resolvedModel;\n\n /**\n * @type {{models.users.ContactAddress[]}}\n */\n @alias('resolvedModel.contacts')\n contacts;\n\n @alias('resolvedModel.notificationGroups')\n groups;\n\n @alias('resolvedModel.rule')\n rule;\n\n @alias('resolvedModel.notificationContactAddresses')\n notificationContactAddresses;\n\n @alias('contextManager.identityModel.hasInternalBetaAccess')\n hasInternalBeta;\n /**\n * The collection of notification contacts to be displayed.\n *\n * @type {{Array<{{type: number, text: String, items: Array}}>}}\n *\n * @property {{number}} type The group type enumeration value (IPhonePush, Mobile, Email)\n * @property {{String}} text The group type title text.\n * @property {{Array}}\n */\n @computed('contacts', 'groups', 'notificationContactAddresses')\n get notificationGroups() {\n const { groups, contacts, notificationContactAddresses } = this;\n\n // Don't do anything if there are no contact addresses.\n if (!contacts || !groups) {\n return [];\n }\n\n // Get the addresses for each contact type.\n return groups\n .map((group) => {\n // Fetch the addresses of the specified type and do nothing if there are none.\n const items = contacts[group.addressType];\n if (isEmpty(items)) {\n return;\n }\n\n // Build a notification group object for each contact type.\n return {\n type: group.id,\n text: group.header,\n items: items.map(\n (item) =>\n new NotificationGroupItem(\n item,\n notificationContactAddresses.mapBy('contactAddress.id').includes(item.id),\n group.options,\n notificationContactAddresses.findBy('contactAddress.id', item.id)?.option\n )\n ),\n hasOptions: group.options.length > 0\n };\n })\n .compact();\n }\n\n /**\n * Called when the selected notification recipients have changed.\n */\n @action notificationRecipientsChanged(address) {\n const { notificationContactAddresses } = this,\n addressId = address.contact.id;\n\n notificationContactAddresses.removeObject(notificationContactAddresses.findBy('contactAddress.id', addressId));\n if (address.isSelected) {\n notificationContactAddresses.addObject({ id: addressId, contactAddress: address.contact });\n }\n }\n\n @action notificationOptionChanged(addressId, option) {\n const { notificationContactAddresses } = this,\n contactAddress = notificationContactAddresses.findBy('contactAddress.id', addressId);\n\n if (contactAddress) {\n contactAddress['option'] = option;\n }\n }\n\n /**\n * Saves notification changes and return to the rules builder page for the current rule.\n */\n @action saveNotifications() {\n const { store, notificationContactAddresses, rule } = this;\n\n rule.notificationContactAddresses = notificationContactAddresses.map((a) => {\n const alreadyExists = store.peekRecord('automation/rules-builder/notification/contact-address', a.id ?? -1);\n if (isPresent(alreadyExists)) {\n alreadyExists.option = a.option;\n return alreadyExists;\n }\n\n return store.createRecord('automation/rules-builder/notification/contact-address', {\n contactAddress: a.contactAddress,\n option: a.option\n });\n });\n\n this.navigation.transitionToRouteId(EmberRulesBuilder);\n }\n\n /**\n * Cancels changes to the notification and returns to rules builder page for the current rule.\n */\n @action cancel() {\n this.navigation.transitionToRouteId(EmberRulesBuilder);\n }\n /**\n * Navigate to new contact page\n */\n @action createNewContact() {\n this.navigation.transitionToRouteId(EmberRulesBuilderNotificationsNewContact);\n }\n}\n","import { inject as service } from '@ember/service';\nimport { isEmpty } from '@ember/utils';\nimport ContactTypeEnum from '@adc/login-setup-addon/enums/ContactType';\nimport { hash } from 'rsvp';\nimport AdcBaseRoute from '../../../../../classes/base-route';\nimport { EmberRulesBuilder, EmberRulesBuilderNotifications } from '../../../../../enums/CustomerPageUrl';\n\n/**\n * @classdesc\n * Rules builder route for editing notifications.\n *\n * @class automation.rules.builder.notifications.Route\n */\nexport default class NotificationsRoute extends AdcBaseRoute {\n @service store;\n @service navigation;\n\n /** @override */\n routeId = EmberRulesBuilderNotifications;\n\n /** @override */\n model() {\n const fnGetModels = (type) => this.store.findAll(`users/${type}-address`);\n\n const model = this.modelFor('automation.rules.builder'),\n rule = model.rule,\n availableTemplates = model.ruleTemplates,\n triggerTypeId = rule.belongsTo('triggerType').id(),\n triggerEventId = rule.belongsTo('triggerEvent').id(),\n actionTypeId = rule.belongsTo('actionType').id(),\n actionEventId = rule.belongsTo('actionEvent').id();\n\n if ([triggerTypeId, triggerEventId, actionTypeId, actionEventId].any(isEmpty)) {\n // Trigger type hasn't been selected, so redirect to rules builder index route.\n const slug = this.paramsFor('automation/rules/builder')['id_rule'];\n this.navigation.transitionToRouteId(EmberRulesBuilder, slug);\n return;\n }\n\n const notificationContactAddresses = rule.notificationContactAddresses.map((a) => {\n return { id: a.id, contactAddress: a.contactAddress, option: a.option };\n });\n\n return {\n ...model,\n contacts: hash({\n [ContactTypeEnum.IPhonePush]: fnGetModels('push-device'),\n [ContactTypeEnum.Mobile]: this.store.query('users/mobile-address', { onlyTwoFactorAddresses: true }),\n [ContactTypeEnum.Email]: fnGetModels('email')\n }),\n notificationGroups: availableTemplates\n .then((t) => t.filterBy('triggerType.id', triggerTypeId))\n .then((t) => t.filterBy('triggerEvent.id', triggerEventId))\n .then((t) => t.filterBy('actionType.id', actionTypeId))\n .then((t) => t.filterBy('actionEvent.id', actionEventId))\n .then((t) => t[0].notificationGroups),\n notificationContactAddresses\n };\n }\n}\n","import EmberController from '@ember/controller';\nimport { action, computed } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { singularize } from 'ember-inflector';\nimport { EmberRulesBuilderNotifications } from 'customer-site/enums/CustomerPageUrl';\n\nimport type { Registry as ServiceRegistry } from '@ember/service';\nimport type AutomationRulesBuilderNotificationEmail from 'customer-site/models/automation/rules-builder/notification/email';\nimport type AutomationRulesBuilderNotificationMobile from 'customer-site/models/automation/rules-builder/notification/mobile';\nimport type { ModelFrom, ResolvedModelFrom } from 'customer-site/utils/type-utils';\nimport type Route from './route';\n\ntype CollectionName = 'emails' | 'mobiles';\n\n/**\n * @classdesc\n * Controller for adding a new contact in the ERB notifications\n */\nexport default class NewContactController extends EmberController {\n @service declare intl: ServiceRegistry['adc-intl'];\n @service declare store: ServiceRegistry['store'];\n @service declare navigation: ServiceRegistry['navigation'];\n\n declare model: ModelFrom;\n resolvedModel?: ResolvedModelFrom;\n\n private getFirstContact(name: CollectionName): T | undefined {\n const contact = this.resolvedModel?.newContactModel,\n models = contact?.[name];\n\n return models?.length ? (models.slice()[0] as T) : undefined;\n }\n\n @computed('resolvedModel.newContactModel.emails.@each.emailAddress')\n get hasValidEmail(): boolean {\n const model = this.getFirstContact('emails');\n return !!model?.emailAddress;\n }\n\n @computed('resolvedModel.newContactModel.mobiles.@each.{number,provider}')\n get hasValidMobile(): boolean {\n const model = this.getFirstContact('mobiles');\n return !!model?.number && !!model?.provider;\n }\n\n /**\n * Disable save button.\n */\n @computed('resolvedModel.newContactModel.{firstName,lastName}', 'hasValidEmail', 'hasValidMobile')\n get disableAddContact(): boolean {\n const model = this.resolvedModel?.newContactModel;\n if (!model?.firstName || !model?.lastName) {\n return true;\n }\n\n return !(this.hasValidEmail || this.hasValidMobile);\n }\n\n @action addContactModel(name: CollectionName): void {\n const m = this.resolvedModel?.newContactModel;\n if (m) {\n m[name].setObjects([\n ...m[name].slice(),\n this.store.createRecord(`automation/rules-builder/notification/${singularize(name)}`)\n ]);\n }\n }\n\n /**\n * Cancels changes to the notification and returns to rules builder page for selecting notification recipients\n */\n @action cancel(): void {\n this.navigation.transitionToRouteId(EmberRulesBuilderNotifications);\n }\n\n /**\n * saves changes to the notification and returns to rules builder page for selecting notification recipients\n */\n @action async saveNewContact(): Promise {\n await this.resolvedModel?.newContactModel.save();\n this.navigation.transitionToRouteId(EmberRulesBuilderNotifications);\n }\n\n /**\n * Removes email from list of emails\n */\n @action deleteEmail(item: AutomationRulesBuilderNotificationEmail): void {\n const m = this.resolvedModel?.newContactModel;\n if (m) {\n m.emails.setObjects(m.emails.filter((email) => email !== item));\n }\n }\n\n /**\n * Removes phone number from list of numbers\n */\n @action deleteMobile(item: AutomationRulesBuilderNotificationMobile): void {\n const m = this.resolvedModel?.newContactModel;\n if (m) {\n m.mobiles.setObjects(m.mobiles.filter((mobile) => mobile !== item));\n }\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 'automation/rules/builder/notifications/new-contact': NewContactController;\n }\n}\n","import { inject as service } from '@ember/service';\nimport AdcBaseRoute from 'customer-site/classes/base-route';\nimport { EmberRulesBuilderNotificationsNewContact } from 'customer-site/enums/CustomerPageUrl';\n\nimport type { Registry as ServiceRegistry } from '@ember/service';\nimport type NewContactModel from 'customer-site/models/automation/rules-builder/notification/new-contact';\nimport type CountryMobileCarrier from 'customer-site/models/users/country-mobile-carrier';\n\n/**\n * @classdesc\n * Route to add a new contact for notifications\n */\nexport default class NewContactRoute extends AdcBaseRoute {\n @service declare store: ServiceRegistry['store'];\n\n routeId = EmberRulesBuilderNotificationsNewContact;\n\n model(): {\n newContactModel: NewContactModel;\n countriesList: ADCAsyncStoreFindAll;\n } {\n const { store } = this;\n\n return {\n newContactModel: store.createRecord('automation/rules-builder/notification/new-contact', {\n emails: [],\n mobiles: []\n }),\n countriesList: store.findAll('users/country-mobile-carrier')\n };\n }\n}\n","import { tracked } from '@glimmer/tracking';\nimport { MINUTES_IN_DAY } from '@adc/ember-utils/constants/time';\nimport { setProperties, action } from '@ember/object';\nimport { gt, not, reads } from '@ember/object/computed';\nimport { inject as service } from '@ember/service';\nimport { EmberRulesBuilder } from 'customer-site/enums/CustomerPageUrl';\nimport { ScheduleRestriction as ScheduleRestrictionType } from 'customer-site/enums/RestrictionType';\nimport { WEEK_DAYS, EVERY_DAY_BITS } from 'customer-site/utils/datetime';\nimport BaseController from '../filter-controller';\n\nimport type { Registry as ServiceRegistry } from '@ember/service';\nimport type ScheduleRestriction from 'customer-site/models/automation/rules-builder/restrictions/schedule-restriction';\nimport type Rule from 'customer-site/models/automation/rules-builder/rule';\n\ntype TempSchedule = { dayBits: number; beginTime: number; endTime: number; isDark: boolean };\n\n/**\n * @classdesc\n * Rules builder controller for editing restrictions.\n */\nexport default class RestrictionsController extends BaseController {\n @service declare store: ServiceRegistry['store'];\n\n /**\n * Stores the rule passed as the model. The value is set as a mut\n * defined in the template.\n */\n @tracked\n rule?: Rule;\n\n /**\n * Temporary object that stores the schedule while it's being edited. Default value is\n * an always schedule, so it isn't empty for new rules.\n */\n @tracked\n tempSchedule?: TempSchedule;\n\n /**\n * Alias for rule schedule restrictions.\n */\n @tracked\n scheduleRestriction?: ScheduleRestriction;\n\n /**\n * The default values for this controllers query parameters.\n */\n defaultValues?: {\n tempSchedule: TempSchedule;\n };\n\n /**\n * Get the default values for resetting the controller when we leave this route.\n */\n getDefaultValues(): {\n tempSchedule: TempSchedule;\n } {\n let dayBits = EVERY_DAY_BITS,\n beginTime = 0,\n endTime = MINUTES_IN_DAY,\n isDark = false;\n\n const { scheduleRestriction } = this;\n\n if (this.rule && scheduleRestriction) {\n ({ dayBits, beginTime, endTime, isDark } = scheduleRestriction);\n }\n\n return {\n tempSchedule: {\n dayBits,\n beginTime,\n endTime,\n isDark\n }\n };\n }\n\n /**\n * When data is loaded, set all our defaults.\n */\n @action\n dataLoaded({ rule, restrictions }: { rule: Rule; restrictions: ScheduleRestriction[] }): void {\n this.rule = rule;\n\n this.scheduleRestriction =\n restrictions.findBy('restrictionType', ScheduleRestrictionType) ||\n restrictions.pushObject(\n this.store.createRecord('automation/rules-builder/restrictions/schedule-restriction')\n );\n\n this.defaultValues = this.getDefaultValues();\n const { dayBits, beginTime, endTime, isDark } = this.defaultValues.tempSchedule;\n this.tempSchedule = { dayBits, beginTime, endTime, isDark };\n }\n\n /**\n * True when the schedule selected is valid. This means that there is at least one day selected.\n */\n @gt('tempSchedule.dayBits', 0)\n declare isValidSchedule: boolean;\n\n /**\n * This property returns true when the confirm button of the restrictions page should be disabled, it currently only observes if the\n * schedule is valid, but could need other validations for different restrictions.\n */\n @not('isValidSchedule')\n declare confirmButtonDisabled: boolean;\n\n /**\n * The action type.\n */\n @reads('rule.actionType.supportsAfterSunsetRestriction')\n declare displaySunsetOption: boolean;\n\n /**\n * Initialize beginMinutes to 00:00 by default for new schedules\n */\n defaultBeginMinutes = 0;\n\n /**\n * Initialize endMinutes to 00:00 (next day) by default for new schedules\n */\n defaultEndMinutes = MINUTES_IN_DAY;\n\n /**\n * Initialize days to M-F by default for new schedules\n */\n defaultScheduleDays = WEEK_DAYS;\n\n /**\n * Resets the controller's properties to their default values.\n */\n resetControllerProperties(): void {\n this.tempSchedule = this.defaultValues?.tempSchedule;\n }\n\n /**\n * Fired when the schedule changes.\n */\n @action scheduleChanged({ dayBits, beginTime, endTime }: TempSchedule, isDark: boolean): void {\n setProperties(this.tempSchedule, {\n dayBits,\n beginTime,\n endTime: endTime > MINUTES_IN_DAY ? endTime - MINUTES_IN_DAY : endTime,\n isDark\n });\n }\n\n /**\n * Cancels changes to the schedule or any other conditions for the rule.\n */\n @action cancel(): void {\n // Do not change schedule on rule model and return back to rule builder.\n this.transitionToBuilderRoute(EmberRulesBuilder);\n }\n\n /**\n * Updates the schedule restrictions.\n */\n updateScheduleRestrictions(): void {\n const { scheduleRestriction, tempSchedule } = this;\n if (!scheduleRestriction || !tempSchedule) {\n return;\n }\n\n setProperties(scheduleRestriction, tempSchedule);\n\n if (scheduleRestriction.isAllDay) {\n setProperties(scheduleRestriction, {\n beginTime: 0,\n endTime: MINUTES_IN_DAY\n });\n }\n }\n\n /**\n * Save the schedule and any other conditions for the rule.\n */\n @action saveConditions(): void {\n this.updateScheduleRestrictions();\n\n // Return back to rule builder.\n this.transitionToBuilderRoute(EmberRulesBuilder);\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 'automation/rules/builder/restrictions': RestrictionsController;\n }\n}\n","import AdcBaseRoute from 'customer-site/classes/base-route';\nimport { EmberRulesBuilderRestrictions } from 'customer-site/enums/CustomerPageUrl';\n\nimport type Controller from './controller';\n\n/**\n * @classdesc\n * Rules builder route for editing restrictions.\n */\nexport default class RestrictionsRoute extends AdcBaseRoute {\n routeId = EmberRulesBuilderRestrictions;\n\n resetController(controller: Controller, isExiting: boolean): void {\n if (controller && isExiting) {\n controller.resetControllerProperties();\n }\n }\n}\n","import { isDestroyed } from '@adc/ember-utils/utils/ember-helpers';\nimport { set } from '@ember/object';\nimport { setProperties } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { getQueryParam } from '@adc/app-infrastructure/routes/base-route';\nimport AdcBaseRoute from '../../../classes/base-route';\nimport { EmberRulesBuilder } from '../../../enums/CustomerPageUrl';\n\n/**\n * @classdesc\n * Rules builder parent route.\n *\n * @class automation.rules.builder.Route\n * @extends classes.BaseRoute\n */\nexport default class RulesBuilderRoute extends AdcBaseRoute {\n @service store;\n @service contextManager;\n @service router;\n @service navigation;\n\n /** @override */\n routeId = EmberRulesBuilder;\n\n queryParams = {\n // trigger query params\n triggerEvent: getQueryParam('number'),\n triggerType: getQueryParam('number'),\n triggerDevices: getQueryParam('array'),\n\n // action query params\n actionEvent: getQueryParam('number'),\n actionType: getQueryParam('number'),\n actionDevices: getQueryParam('array')\n };\n\n defaultQueryParams = {\n triggerEvent: undefined,\n triggerType: undefined,\n triggerDevices: undefined,\n actionEvent: undefined,\n actionType: undefined,\n actionDevices: undefined\n };\n\n /** @override */\n model(params) {\n const store = this.store,\n { id_rule } = params;\n\n let rule, ruleTemplates;\n\n if (id_rule === 'new') {\n rule = store.createRecord('automation/rules-builder/rule', {\n restrictions: [store.createRecord('automation/rules-builder/restrictions/schedule-restriction')]\n });\n\n this.populateRuleFromQueryParams(rule, params);\n\n ruleTemplates = store.query('automation/rules-builder/template', {});\n } else {\n rule = store.findRecord('automation/rules-builder/rule', id_rule, { reload: true });\n ruleTemplates = store.query('automation/rules-builder/template', { editRuleId: id_rule });\n }\n\n return {\n rule,\n ruleTemplates\n };\n }\n\n /**\n * @param {Rule} rule - Current rule\n * @param {object} params - Query params from the model hook\n * @returns {Array}\n */\n populateRuleFromQueryParams(rule, params) {\n return [\n ...this.populateTriggerFromQueryParams(rule, params),\n ...this.populateActionFromQueryParams(rule, params)\n ];\n }\n\n /**\n * Determine all actions that need to be preformed on the trigger based on the provided query parameters.\n * @param {Rule} rule Current rule\n * @param {Object} params Query params from the model hook\n * @returns {Array} An array which holds every action we want to preform on the rule for the trigger.\n */\n populateTriggerFromQueryParams(rule, params) {\n const { triggerEvent, triggerType, triggerDevices } = params,\n triggerPromises = [];\n if (triggerDevices) {\n const deviceIdsArray = Array.isArray(triggerDevices) ? triggerDevices : [triggerDevices];\n if (deviceIdsArray.length) {\n triggerPromises.push(\n this.store\n .query('automation/rules-builder/device', { ids: deviceIdsArray })\n .then((resolvedDevices) => {\n rule.triggerDevices = resolvedDevices;\n })\n );\n }\n }\n if (triggerType) {\n triggerPromises.push(\n this.store.findRecord('automation/rules-builder/trigger-type', triggerType).then((resolvedType) => {\n rule.triggerType = resolvedType;\n })\n );\n }\n if (triggerEvent && triggerType) {\n triggerPromises.push(\n this.store\n .findRecord('automation/rules-builder/event', `trigger-${triggerType}-${triggerEvent}`)\n .then((resolvedEvent) => {\n rule.triggerEvent = resolvedEvent;\n })\n );\n }\n return triggerPromises;\n }\n\n /**\n * Determine all actions that need to be preformed on the action based on the provided query parameters.\n * @param {Rule} rule Current rule\n * @param {Object} params Query params from the model hook\n * @returns {Array} An array which holds every action we want to preform on the rule for the action.\n */\n populateActionFromQueryParams(rule, params) {\n const { actionEvent, actionType, actionDevices } = params,\n actionPromises = [];\n if (actionDevices) {\n const deviceIdsArray = Array.isArray(actionDevices) ? actionDevices : [actionDevices];\n if (deviceIdsArray.length) {\n actionPromises.push(\n this.store\n .query('automation/rules-builder/device', { ids: deviceIdsArray })\n .then((resolvedDevices) => {\n rule.actionDevices = resolvedDevices;\n })\n );\n }\n }\n if (actionType) {\n actionPromises.push(\n this.store.findRecord('automation/rules-builder/action-type', actionType).then((resolvedType) => {\n rule.actionType = resolvedType;\n })\n );\n }\n if (actionEvent && actionType) {\n actionPromises.push(\n this.store\n .findRecord('automation/rules-builder/event', `action-${actionType}-${actionEvent}`)\n .then((resolvedEvent) => {\n rule.actionEvent = resolvedEvent;\n })\n );\n }\n return actionPromises;\n }\n\n /** @override */\n async afterModel(model) {\n let rule, ruleTemplates;\n try {\n (rule = await model.rule), (ruleTemplates = await model.ruleTemplates);\n set(model, 'rule', rule);\n } catch (err) {\n // If we can't find the rule, do to previous route.\n // This can happen if you save a rule on legacy, the id changes, then it redirects back to ERB\n const lastRoute = this.contextManager.visitedRoutesStack.firstObject;\n this.navigation.transitionToRouteId(lastRoute.routeItem.id, { queryParams: lastRoute.queryParams });\n return;\n }\n\n // Make sure ERB can load\n if (!rule.isValidForEmberRuleBuilder) {\n this.transitionToLegacy(rule);\n return;\n }\n\n // Make sure templates are available to edit\n if (ruleTemplates.length === 0) {\n this.notificationManager.addWarning(this.intl.t('generic.routeNotAllowed'));\n this.contextManager.transitionToPreviousRoute();\n }\n }\n\n transitionToLegacy(rule) {\n const { id: ruleId, editPage, editPageQueryParameters } = rule,\n { contextManager } = this,\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/no-context-manager-get-route\n routeItem = contextManager.getRouteItem(editPage);\n\n // Is an Ember Route\n if (routeItem?.isNative) {\n if (editPageQueryParameters?.id) {\n this.navigation.transitionToRoute(routeItem, editPageQueryParameters.id);\n return;\n }\n this.navigation.transitionToRoute(routeItem, ruleId, { queryParams: editPageQueryParameters });\n return;\n }\n\n if (contextManager.identityModel.isMobileApp) {\n this.router.transitionTo('automation.rules.builder.mobile-no-support');\n } else {\n // Legacy Route\n this.navigation.transitionToRoute(routeItem, { queryParams: editPageQueryParameters });\n }\n }\n\n /** @override */\n async rollbackModelOnTransition() {\n const rule = await this.currentModel.rule;\n\n if (!rule || isDestroyed(rule) || rule.isSaving) {\n return;\n }\n }\n\n /** @override */\n resetController(controller, isExiting) {\n /* Reset the query params to defaults on exit.\n * NOTE:\n * Query parameters are stick by default(ref: https://guides.emberjs.com/release/routing/query-params/#toc_sticky-query-param-values)\n * However, we do not want to have the same query params when we are revisiting the start page repeatedly.\n * Therefore, when we exit the start page, we reset the queryParams to the defaults(undefined).\n */\n if (controller && isExiting) {\n setProperties(controller, this.defaultQueryParams);\n }\n\n // Also reset the params saved in the index controller.\n const indexController = this.controllerFor('automation.rules.builder.index');\n if (indexController) {\n indexController.resetData();\n }\n }\n}\n","import Route from '@ember/routing/route';\n\nexport default class AutomationRulesBuilderTriggerDetailsAccessControl extends Route {}\n","import { action, computed, set } from '@ember/object';\nimport { BinaryListItem } from '@adc/ui-components/components/simple-binary/list';\nimport RulesBuilderBaseFeatureDetailsController from '../../base-feature-details-controller';\n\nimport type { AsyncBelongsTo } from '@ember-data/model';\nimport type TriggerDetailsRoute from 'customer-site/automation/rules/builder/trigger/details/route';\nimport type Event from 'customer-site/models/automation/rules-builder/event';\nimport type { ModelFrom } from 'customer-site/utils/type-utils';\n\nexport default class AutomationRulesBuilderTriggerDetails extends RulesBuilderBaseFeatureDetailsController {\n declare model: ModelFrom;\n\n get supportsMultipleDevices(): Promise {\n return this.supportsMultiSelect(this.validTriggerTemplates(), true, this.model.rule);\n }\n\n @computed('model.rule.triggerEvent')\n get enabledDevices(): Promise {\n return this.getTemplateDevicesIds(this.model.rule, this.validTriggerTemplates(), true);\n }\n\n @computed('model.rule.triggerEvent')\n get enabledExtraOptions(): Promise {\n return this.getTemplateExtraOptionIds(this.model.rule, this.validTriggerTemplates(), true);\n }\n\n @computed(\n 'model.{allTriggerDevices,allTriggerExtraDeviceOptions,rule.triggerEvent}',\n 'enabledDevices.[]',\n 'enabledExtraOptions.[]'\n )\n get availableDevices(): Promise[]> {\n const { model } = this,\n { rule } = model,\n selectedDevices = rule.hasMany('triggerDevices').ids(),\n selectedExtraOptions = rule.hasMany('triggerExtraDeviceOption').ids(),\n fnGetListItem = (\n id: string,\n label: string,\n icon: { icon: string; color: string },\n state: boolean,\n disabled: boolean,\n props: Record = {}\n ) =>\n new BinaryListItem<{ id: string; isExtraOption?: boolean; notSupported?: boolean }>({\n label,\n icon: icon.icon,\n color: icon.color,\n state,\n disabled,\n props: {\n id,\n ...props\n }\n });\n\n return (async () => {\n const allTriggerDevices = await model.allTriggerDevices,\n allTriggerExtraDeviceOptions = await model.allTriggerExtraDeviceOptions,\n enabledExtraOptions = await this.enabledExtraOptions,\n enabledDevices = await this.enabledDevices;\n\n return [\n ...allTriggerExtraDeviceOptions.map(({ id, description, icon }) =>\n fnGetListItem(\n id,\n description,\n icon,\n selectedExtraOptions?.includes(id),\n !enabledExtraOptions.includes(id),\n {\n isExtraOption: true,\n notSupported: true\n }\n )\n ),\n\n ...allTriggerDevices.map(({ id, description, deviceIcon }) =>\n fnGetListItem(\n id,\n description,\n deviceIcon,\n selectedDevices?.includes(id),\n !enabledDevices.includes(id)\n )\n )\n ];\n })();\n }\n\n @computed('model.rule.{triggerDevices.[],triggerExtraDeviceOption}')\n get enabledStatus(): Promise {\n return this.getTemplateStatuses(this.model.rule, this.validTriggerTemplates(), true);\n }\n\n @computed('enabledStatus', 'model.{allTriggerEvents,rule}')\n get availableStatus(): ReturnType {\n const { model } = this;\n return this.availableStatuses(\n model.allTriggerEvents,\n this.enabledStatus,\n model.rule.belongsTo('triggerEvent').id()\n );\n }\n\n /**\n * Updates the selected devices for the trigger being edited.\n */\n @action\n async selectTriggerDevices(\n items: Awaited\n ): Promise {\n const { model } = this,\n rule = model.rule,\n changes = this.selectDevice(\n true,\n items,\n rule,\n await model.allTriggerDevices,\n await model.allTriggerExtraDeviceOptions\n );\n\n if (changes) {\n rule.triggerExtraDeviceOption.setObjects(changes.extraOption);\n rule.triggerDevices.setObjects(changes.devices);\n }\n }\n\n /**\n * Updates the selected device statuses for the trigger being edited.\n */\n @action\n async selectTriggerStatus(items: BinaryListItem<{ id: string }>[]): Promise {\n const { model } = this,\n rule = await model.rule,\n changes = this.selectStatus(true, items, rule, await model.allTriggerEvents);\n\n if (changes) {\n set(rule, 'triggerEvent', changes as unknown as AsyncBelongsTo);\n }\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 'automation/rules/builder/trigger/details': AutomationRulesBuilderTriggerDetails;\n }\n}\n","import { action, set } from '@ember/object';\nimport { reads, alias } from '@ember/object/computed';\nimport { BinaryListItem } from '@adc/ui-components/components/simple-binary/list';\nimport RulesBuilderBaseFeatureDetailsController from '../../../base-feature-details-controller';\n\nimport type AutomationRulesBuilderExtraDataExtraDataGeoLocation from 'customer-site/models/automation/rules-builder/extra-data/extra-data-geo-location';\nimport type RuleModel from 'customer-site/models/automation/rules-builder/rule';\n\nexport default class AutomationRulesBuilderTriggerDetailsGeoLocation extends RulesBuilderBaseFeatureDetailsController {\n @reads('model.rule')\n declare rule: RuleModel;\n\n @reads('rule.triggerType.extraData')\n declare triggerTypeExtraData: AutomationRulesBuilderExtraDataExtraDataGeoLocation;\n\n /**\n * The available geo fences for the trigger.\n */\n @alias('triggerTypeExtraData.geoFences')\n declare geoFences: Record;\n\n /**\n * Stores the geo fence selected by the user.\n */\n @alias('rule.extraData.TRIGGER_GEO_FENCE')\n declare geoFence: string | undefined;\n\n get availableGeoFences(): Promise[]> {\n return (async () => {\n const geoFences = this.geoFences ?? {};\n return Object.keys(geoFences).map(\n (fenceId) =>\n new BinaryListItem({\n label: geoFences[fenceId],\n state: fenceId === this.geoFence,\n props: { id: fenceId }\n })\n );\n })();\n }\n\n @action\n async selectGeoFence(\n items: Awaited\n ): Promise {\n set(this, 'geoFence', items.findBy('state', true)?.props.id);\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 'automation/rules/builder/trigger/details/geo-location': AutomationRulesBuilderTriggerDetailsGeoLocation;\n }\n}\n","import Route from '@ember/routing/route';\n\nimport type { AsyncBelongsTo } from '@ember-data/model';\nimport type ExtraDataGeoLocation from 'customer-site/models/automation/rules-builder/extra-data/extra-data-geo-location';\nimport type TriggerTypeModel from 'customer-site/models/automation/rules-builder/trigger-type';\nimport type { ModelFrom } from 'customer-site/utils/type-utils';\nimport type TriggerDetailsRoute from '../route';\n\ntype AutomationRulesBuilderTriggerDetailsGeoLocationModel = ModelFrom & {\n rule: {\n triggerType: AsyncBelongsTo;\n };\n};\n\nexport default class AutomationRulesBuilderTriggerDetailsGeoLocation extends Route {\n async afterModel(model: AutomationRulesBuilderTriggerDetailsGeoLocationModel): Promise {\n const rule = model.rule,\n triggerType = await rule.triggerType,\n geoFences = triggerType.get('extraData').geoFences,\n geoFenceKeys = Object.keys(geoFences);\n if (geoFenceKeys.length === 1) {\n rule.extraData['TRIGGER_GEO_FENCE'] = geoFenceKeys[0];\n }\n }\n}\n","import ScheduleExtraData from 'customer-site/models/automation/rules-builder/extra-data/extra-data-schedule';\nimport AutomationRulesBuilderFeatureDetailsIndexRoute from '../../../base-feature-details-index-route';\n\nimport type Rule from 'customer-site/models/automation/rules-builder/rule';\n\nexport default class AutomationRulesBuilderTriggerDetailsIndex extends AutomationRulesBuilderFeatureDetailsIndexRoute {\n /** @override */\n getFeatureRoute(model: Rule): Promise {\n return (async () => {\n const triggerType = await model.triggerType,\n triggerStatusRoute = triggerType.extraData?.ruleDetailsRoute;\n return triggerStatusRoute ?? '';\n })();\n }\n\n getFeatureRouteSlugs(model: Rule): string | Promise {\n return (async () => {\n const triggerType = await model.triggerType;\n return triggerType.extraData instanceof ScheduleExtraData ? 'new' : model.id ?? 'new';\n })();\n }\n}\n","import { get } from '@ember/object';\nimport { isEmpty } from '@ember/utils';\nimport { EmberRulesBuilderTriggerDetails, EmberRulesBuilderTrigger } from '../../../../../enums/CustomerPageUrl';\nimport BaseFeatureDetailsRoute from '../../base-feature-details-route';\n\n/**\n * @classdesc\n * Rules builder route for editing trigger details.\n */\nexport default class TriggerDetailsRoute extends BaseFeatureDetailsRoute {\n /** @override */\n routeId = EmberRulesBuilderTriggerDetails;\n\n /** @override */\n model() {\n const model = this.modelFor('automation.rules.builder'),\n rule = model.rule,\n triggerType = rule.belongsTo('triggerType'),\n availableTemplates = model.ruleTemplates.then((t) => t.filterBy('triggerType.id', triggerType.id()));\n\n return {\n ...model,\n allTriggerEvents: availableTemplates\n .then((t) => t.mapBy('triggerEvent').uniqBy('id'))\n .then((t) => Promise.all(t)),\n allTriggerDevices: availableTemplates\n .then((t) => t.mapBy('triggerDevices'))\n .then((t) =>\n Promise.all(t).then((t) =>\n t\n .map((t) => t.toArray())\n .flat()\n .uniqBy('id')\n )\n ),\n allTriggerExtraDeviceOptions: availableTemplates\n .then((t) => t.mapBy('triggerExtraDeviceOptions'))\n .then((t) =>\n Promise.all(t).then((t) =>\n t\n .map((t) => t.toArray())\n .flat()\n .uniqBy('id')\n )\n )\n };\n }\n\n /** @override */\n async validateRuleModel(model) {\n const selectedType = await get(model, 'rule.triggerType');\n return isEmpty(selectedType) ? EmberRulesBuilderTrigger : undefined;\n }\n}\n","import { computed, action } from '@ember/object';\nimport RulesBuilderBaseFeatureController from 'customer-site/automation/rules/builder/base-feature-controller';\nimport { EmberRulesBuilderTriggerDetails } from '../../../../../enums/CustomerPageUrl';\n\nimport type { BinaryListItem } from '@adc/ui-components/components/simple-binary/list';\nimport type { AsyncBelongsTo } from '@ember-data/model';\nimport type ActionType from 'customer-site/models/automation/rules-builder/action-type';\nimport type Event from 'customer-site/models/automation/rules-builder/event';\nimport type TriggerType from 'customer-site/models/automation/rules-builder/trigger-type';\nimport type { RulesBuilderTriggerIndexModel } from './route';\n\n/**\n * @classdesc\n * Rules builder controller for selecting trigger type.\n */\nexport default class RulesBuilderTriggerIndexController extends RulesBuilderBaseFeatureController {\n declare model: RulesBuilderTriggerIndexModel;\n\n @computed('model.{rule.triggerType,ruleTemplates}')\n get enabledTriggerTypes(): Promise {\n return this.getEnabledTypes(this.validTriggerTemplates(), 'triggerType');\n }\n\n async incompatibleMessage(selectedId: string): Promise {\n const { intl } = this;\n\n if (\n (\n await Promise.all(await this.getEnabledTypes(this.validTriggerTemplates(true, false), 'triggerType'))\n ).find((item) => item.id === selectedId)\n ) {\n return intl.tc(this, 'partiallyIncompatibleDeviceMessage');\n }\n\n if (\n (\n await Promise.all(await this.getEnabledTypes(this.validTriggerTemplates(false, true), 'triggerType'))\n ).find((item) => item.id === selectedId)\n ) {\n return intl.tc(this, 'partiallyIncompatibleTriggerEventMessage');\n }\n\n return intl.tc(this, 'incompatibleTriggerMessage');\n }\n\n /**\n * Updates the rules trigger to use the selected type.\n */\n @action async updateTriggerType(items: BinaryListItem<{ id: string }>[]): Promise {\n await this.updateType(\n items,\n this.model.rule,\n 'triggerType',\n await this.enabledTriggerTypes,\n await this.model.allTriggerTypes,\n this.intl.tc(this, 'incompatibleTrigger'),\n async (): Promise => {\n this.model.rule.actionType = null as unknown as AsyncBelongsTo;\n this.model.rule.actionEvent = null as unknown as AsyncBelongsTo;\n (await this.model.rule.actionDevices).setObjects([]);\n },\n async (): Promise => {\n this.model.rule.triggerEvent = null as unknown as AsyncBelongsTo;\n (await this.model.rule.triggerDevices).setObjects([]);\n (await this.model.rule.triggerExtraDeviceOption).setObjects([]);\n },\n (): Promise => this.editDetails()\n );\n }\n\n async editDetails(): Promise {\n await this.checkTriggerForPrePopulation();\n this.transitionToBuilderRoute(EmberRulesBuilderTriggerDetails);\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 'automation/rules/builder/trigger/index': RulesBuilderTriggerIndexController;\n }\n}\n","import AdcBaseRoute from '../../../../../classes/base-route';\nimport { EmberRulesBuilderTrigger } from '../../../../../enums/CustomerPageUrl';\n\n/**\n * @classdesc\n * Rules builder route for selecting trigger type.\n */\nexport default class RulesBuilderTriggerIndexRoute extends AdcBaseRoute {\n /** @override */\n routeId = EmberRulesBuilderTrigger;\n\n /** @override */\n model() {\n const model = this.modelFor('automation.rules.builder');\n\n return {\n ...model,\n allTriggerTypes: model.ruleTemplates\n .then((t) => t.mapBy('triggerType').uniqBy('id'))\n .then((t) => Promise.all(t))\n };\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n
\\n
    \\n {{#each this.smartRules as |rule|}}\\n
  • \\n \\n

    {{rule.description}}

    \\n
  • \\n {{/each}}\\n
\\n\\n
{{tc this \\'suggested\\'}}
\\n\\n
    \\n {{#each this.basicRules as |rule|}}\\n
  • \\n \\n
    \\n
    {{rule.title}}
    \\n
    {{rule.description}}
    \\n
    \\n \\n \\n
  • \\n {{/each}}\\n
\\n
\\n\\n\",{ moduleName: \"customer-site/components/modals/automation/rules/new-image-sensor-rule/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport { action } from '@ember/object';\nimport { ImageSensorRulesEdit } from 'customer-site/enums/CustomerPageUrl';\nimport { ActivityAlert, DailyView } from 'customer-site/enums/ImageSensorDisplayRuleType';\nimport { intlPath } from '@adc/i18n/path';\nimport NewRules from '../new-rules';\n\ntype ImageSensorRuleItem = {\n title: string;\n description: string;\n type: number;\n daily?: number;\n};\n\n/**\n * @classdesc\n * New image sensor rule dialog.\n */\n@intlPath({ path: 'modals/automation/rules/new-image-sensor-rule' })\nexport default class NewImageSensorRuleModal extends NewRules<{ Args: NonNullable }> {\n /**\n * Creates and returns a suggested rule configuration.\n */\n private getRuleItem(key: string, type: number, daily?: number): ImageSensorRuleItem {\n const { intl } = this;\n\n return {\n title: intl.tc(this, `${key}.title`),\n description: intl.tc(this, `${key}.description`),\n type,\n daily\n };\n }\n\n /**\n * The rules suggestions for the \"smart rules\" section\n */\n get smartRules(): ImageSensorRuleItem[] {\n return [this.getRuleItem('daily', DailyView), this.getRuleItem('activity', ActivityAlert)];\n }\n\n /**\n * The rules suggestions for the \"basic rules\" section\n */\n get basicRules(): ImageSensorRuleItem[] {\n return [\n this.getRuleItem('child', 8, 1),\n this.getRuleItem('pet', 8, 2),\n this.getRuleItem('cleaner', 8, 3),\n this.getRuleItem('closet', 4, 4)\n ];\n }\n\n /**\n * Transitions to the create image sensor rule page.\n */\n @action createRule({ type: TypeID, daily: DailyRuleTypeID = 0 }: ImageSensorRuleItem): void {\n this.transitionToCreateRule(ImageSensorRulesEdit, {\n TypeID,\n DailyRuleTypeID\n });\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n
\\n {{#if this.loadThermostats.isRunning}}\\n \\n {{else}}\\n {{#if this.showSelectBox}}\\n \\n {{/if}}\\n\\n
    \\n {{#if this.selectedThermostat}}\\n {{!-- @glint-expect-error ruleSuggestionsInfo is async, so we need to await it before we can use it. --}}\\n {{#each this.selectedThermostat.ruleSuggestionsInfo.ruleSuggestions as |suggestion|}}\\n
  • \\n \\n
    \\n
    {{suggestion.name}}
    \\n
    {{suggestion.conditionText}}
    \\n
    {{suggestion.actionText}}
    \\n
    \\n \\n \\n
  • \\n {{else}}\\n
  • \\n

    {{tc this \\'noRulesAvailable\\'}}

    \\n
  • \\n {{/each}}\\n {{else}}\\n
  • \\n \\n

    {{t \\'generic.loading\\'}}

    \\n
  • \\n {{/if}}\\n
\\n {{/if}}\\n
\\n\\n\",{ moduleName: \"customer-site/components/modals/automation/rules/new-thermostat-rule/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport { tracked } from '@glimmer/tracking';\nimport { action, computed } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { task } from 'ember-concurrency';\nimport { intlPath } from '@adc/i18n/path';\nimport DropdownSelectItem from '@adc/ui-components/utils/dropdown-select-item';\nimport { ThermostatSchedule } from '../../../../../enums/CustomerPageUrl';\nimport NewRules from '../new-rules';\n\nimport type Store from '@ember-data/store';\nimport type RuleSuggestion from 'customer-site/models/automation/rules/rule-suggestion';\nimport type ThermostatModel from 'customer-site/models/devices/thermostat';\n\n/**\n * @classdesc\n * Dialog with links for suggested new thermostat rules.\n */\n@intlPath({ path: 'modals/automation/rules/new-thermostat-rule' })\nexport default class NewThermostatRuleModal extends NewRules<{ Args: NonNullable }> {\n @service declare store: Store;\n\n constructor(owner: unknown, props: Record) {\n super(owner, props);\n\n this.loadThermostats.perform();\n }\n\n /**\n * The currently selected thermostat, whose suggested rules will be visible.\n */\n @tracked selectedThermostat?: ThermostatModel;\n\n /**\n * The available thermostat devices for the selected system.\n */\n @tracked thermostats?: ThermostatModel[];\n\n /**\n * Indicates whether to show the thermostat select box.\n */\n @tracked showSelectBox = false;\n\n /**\n * Loads thermostats and configures component state.\n */\n loadThermostats = task(async () => {\n const models = await this.store.findAll('devices/thermostat'),\n thermostats = models.rejectBy('isControlled');\n\n Object.assign(this, {\n selectedThermostat: thermostats[0],\n thermostats,\n showSelectBox: thermostats.length > 1\n });\n });\n\n /**\n * The dropdown items for the thermostat select box.\n */\n @computed('thermostats.@each.{id,description}')\n get thermostatDropdownItems(): DropdownSelectItem[] {\n return (\n this.thermostats?.map(({ description, id }) =>\n DropdownSelectItem.create({\n name: description,\n value: id\n })\n ) ?? []\n );\n }\n\n /**\n * Selects a thermostat.\n */\n @action selectThermostat(id: string): void {\n this.selectedThermostat = this.thermostats?.find((thermostat) => thermostat.id === id);\n }\n\n /**\n * Transitions to the create thermostat rule page.\n */\n @action createRule(ruleSuggestion: RuleSuggestion): void {\n const { type, deviceId, addEditRouteId } = ruleSuggestion;\n\n this.transitionToCreateRule(addEditRouteId, {\n r: type,\n t: deviceId,\n a: addEditRouteId === ThermostatSchedule\n });\n }\n}\n","import { computed, get, action } from '@ember/object';\nimport { and, reads } from '@ember/object/computed';\nimport { inject as service } from '@ember/service';\nimport NewImageSensorRule from 'customer-site/components/modals/automation/rules/new-image-sensor-rule/index';\nimport NewThermostatRule from 'customer-site/components/modals/automation/rules/new-thermostat-rule/index';\nimport NewVideoRule from 'customer-site/components/modals/automation/rules/new-video-rule/index';\nimport NewVideoSchedule from 'customer-site/components/modals/automation/rules/new-video-schedule/index';\nimport DropdownActionItem from '@adc/ui-components/utils/dropdown-action-item';\nimport {\n EventTriggeredRuleEdit,\n ThermostatRuleEdit,\n ImageSensorRulesEdit,\n VideoEditEventTriggeredRecordingSchedule,\n VideoAddCloudRecordingSchedule,\n EmberRulesBuilder\n} from '../../../enums/CustomerPageUrl';\nimport {\n EventTriggered,\n ImageSensor,\n VideoRule,\n Thermostat,\n Chime,\n EmberRulesBuilderRules,\n EmberScheduleBuilder\n} from '../../../enums/RuleDisplayType';\nimport {\n Partition,\n Light,\n Lock,\n Thermostat as ThermostatDevice,\n ImageSensor as ImageSensorDevice,\n VideoCamera,\n GarageDoor,\n Gate,\n SecuritySensor,\n WaterValve,\n Chime as ChimeDevice,\n AccessControlDoor,\n SmartChime\n} from '../../../enums/WebDeviceType';\nimport BaseController from '../../base-automation-controller';\n\n/**\n * Returns a function suitable for transitioning to an ERB route.\n *\n * @param {string[]} slugs\n * @param {models.navigation.RouteItem} route\n *\n * @private\n * @memberof RuleIndexController\n */\nfunction getRouteTransitionAction(slugs, route) {\n return () => this.navigation.transitionToRoute(route, ...(slugs ?? []));\n}\n\n/**\n * Returns a function suitable for opening a modal.\n *\n * @param {string} modalPath\n * @param {string} [modelProp]\n *\n * @private\n * @memberof RuleIndexController\n */\nfunction getOpenModalAction([modalPath, modelProp]) {\n let modal;\n switch (modalPath) {\n case 'new-image-sensor-rule':\n modal = NewImageSensorRule;\n break;\n case 'new-video-rule':\n modal = NewVideoRule;\n break;\n case 'new-thermostat-rule':\n modal = NewThermostatRule;\n break;\n case 'new-video-schedule':\n modal = NewVideoSchedule;\n break;\n }\n return () =>\n this.modals.showModal(\n modal,\n modelProp\n ? {\n [modelProp]: this.model[modelProp]\n }\n : {}\n );\n}\n\n/**\n * Links to create rule routes.\n *\n * @type {Array>>}\n *\n * @private\n * @memberof RuleIndexController\n */\nconst newRuleItems = [\n [\n 'builder',\n EmberRulesBuilderRules,\n [\n Partition,\n Lock,\n GarageDoor,\n AccessControlDoor,\n Light,\n SecuritySensor,\n ImageSensorDevice,\n VideoCamera,\n ChimeDevice,\n SmartChime,\n WaterValve\n ],\n [EmberRulesBuilder],\n getRouteTransitionAction,\n ['new']\n ],\n [\n 'event',\n EventTriggered,\n [AccessControlDoor, Partition, Light, Lock, GarageDoor, Gate, SecuritySensor, WaterValve, ImageSensorDevice],\n [EventTriggeredRuleEdit],\n getRouteTransitionAction\n ],\n [\n 'imageSensor',\n ImageSensor,\n [ImageSensorDevice, SecuritySensor],\n [ImageSensorRulesEdit],\n getOpenModalAction,\n ['new-image-sensor-rule']\n ],\n [\n 'video',\n VideoRule,\n [VideoCamera],\n [VideoEditEventTriggeredRecordingSchedule, VideoAddCloudRecordingSchedule],\n getOpenModalAction,\n ['new-video-rule', 'videoRules']\n ],\n [\n 'thermostat',\n Thermostat,\n [ThermostatDevice, SecuritySensor],\n [ThermostatRuleEdit],\n getOpenModalAction,\n ['new-thermostat-rule']\n ],\n ['chime', Chime, [VideoCamera, ChimeDevice], [EmberRulesBuilder], getRouteTransitionAction, ['new']]\n];\n\n/**\n * @classdesc\n * Rules index route controller.\n */\nexport default class RuleIndexController extends BaseController {\n @service contextManager;\n @service modals;\n @service notificationManager;\n @service intl;\n @service navigation;\n\n @and('canCreateEmberRules', 'contextManager.identityModel.isMobileApp')\n useNativeAddButton;\n\n /**\n * If the user has camera arming access\n */\n @reads('model.permissions.hasCameraArmingAccess')\n hasCameraArmingAccess;\n\n /**\n * Return true when the customer is able to create rules through ember rules builder.\n *\n * @returns {Promise}\n */\n @computed('model.permissions.allowedRuleDisplays')\n get canCreateEmberRules() {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-get\n const allowedRules = get(this, 'model.permissions.allowedRuleDisplays') ?? [];\n return allowedRules.includes(EmberRulesBuilderRules);\n }\n\n /**\n * Create a new rule via the Ember Rules Builder.\n */\n @action createNewRuleWithEmberRulesBuilder() {\n this.navigation.transitionToRouteId(EmberRulesBuilder, 'new');\n }\n\n /** Return true if the customer can be shown the rules/schedules dropdown.\n * Need access to EmberScheduleBuilder to view.\n * @returns {Promise}\n */\n @computed('model.permissions.allowedRuleDisplays')\n get canDisplayRuleScheduleDropdown() {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-get\n const allowedRules = get(this, 'model.permissions.allowedRuleDisplays') ?? [];\n return allowedRules.includes(EmberScheduleBuilder);\n }\n\n /** @override */\n @computed('model.permissions.allowedRuleDisplays', 'deviceType')\n get newAutomationItems() {\n const { contextManager, deviceType = -1 } = this,\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-get\n allowedRules = get(this, 'model.permissions.allowedRuleDisplays') ?? [];\n\n // Iterate possible rule routes.\n return newRuleItems.reduce((rules, [key, displayType, deviceTypes, routeIDs, fnGetAction, args = []]) => {\n // Is there no specified device type OR does this rule type support it?\n if (deviceType === -1 || deviceTypes.includes(deviceType)) {\n // Is this display type allowed?\n if (allowedRules.includes(displayType)) {\n // Does the user have access to at least one of the new rule routes?\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/no-context-manager-get-route\n const [route] = routeIDs.map((id) => contextManager.getRouteItem(id)).compact();\n\n if (route) {\n return [\n ...rules,\n DropdownActionItem.create({\n name: this.intl.tc(this, `new.${key}`),\n action: fnGetAction.call(this, args, route)\n })\n ];\n }\n }\n }\n\n return rules;\n }, []);\n }\n}\n","import { isFullTransition } from '../../../utils/ember';\nimport { VideoRule } from 'customer-site/enums/RuleDisplayType';\nimport {\n EmberRules,\n EmberPartitionsRules,\n EmberLocksRules,\n EmberGarageDoorsRules,\n EmberGatesRules,\n EmberLightsRules,\n EmberThermostatsRules,\n EmberWaterRules,\n EmberSensorsRules,\n EmberImageSensorRules,\n EmberVideoRules,\n EmberAccessControlDoorRules\n} from '../../../enums/CustomerPageUrl';\nimport {\n Partition,\n Lock,\n GarageDoor,\n Gate,\n Light,\n Thermostat,\n WaterValve,\n SecuritySensor,\n ImageSensor,\n Video,\n AccessControlDoor\n} from '../../../enums/WebDeviceType';\nimport BaseAutomationRoute from '../../base-automation-route';\n\nconst DEVICE_TYPE_MAP = {\n [Partition]: EmberPartitionsRules,\n [Lock]: EmberLocksRules,\n [GarageDoor]: EmberGarageDoorsRules,\n [Gate]: EmberGatesRules,\n [Light]: EmberLightsRules,\n [Thermostat]: EmberThermostatsRules,\n [WaterValve]: EmberWaterRules,\n [SecuritySensor]: EmberSensorsRules,\n [ImageSensor]: EmberImageSensorRules,\n [Video]: EmberVideoRules,\n [AccessControlDoor]: EmberAccessControlDoorRules\n};\n\n/**\n * @classdesc\n * Rules index route.\n */\nexport default class RulesIndexRoute extends BaseAutomationRoute {\n /** @override */\n async beforeModel() {\n // Update route ID for device type (if any).\n const { deviceType } = this.paramsFor(this.routeName);\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/classic-decorator-no-classic-methods\n this.set('routeId', DEVICE_TYPE_MAP[deviceType] || EmberRules);\n\n return await super.beforeModel(...arguments);\n }\n\n /** @override */\n get itemModelPath() {\n return 'automation/rules/rule';\n }\n\n /** @override */\n async model(params, transition) {\n const { contextManager, identityManager, store } = this,\n currentModel = !isFullTransition(transition) ? this.currentModel ?? {} : {},\n reload = { reload: true };\n\n return {\n ...super.model(params, transition),\n videoRules:\n currentModel.videoRules ??\n store.query('automation/rules/rule-suggestion', {\n type: VideoRule\n }),\n videoUsage: this.isCloudRecordingAllowed\n ? currentModel.videoUsage ??\n (await store.findRecord('video/video-usage', contextManager.getSelectedSystemId(), reload))\n : {},\n aiDeterrenceUsage: identityManager.identityModel.canUseAIDeterrence\n ? currentModel.aiDeterrenceUsage ??\n (await store.findRecord('video/ai-deterrence-usage', contextManager.getSelectedSystemId(), reload))\n : {}\n };\n }\n}\n","import { tracked } from '@glimmer/tracking';\nimport Controller from '@ember/controller';\nimport { action, set } from '@ember/object';\nimport { sort } from '@ember/object/computed';\nimport { inject as service } from '@ember/service';\nimport { SceneEdit } from '../../../enums/CustomerPageUrl';\n\nimport type { Registry as ServiceRegistry } from '@ember/service';\nimport type SceneModel from 'customer-site/models/automation/scene';\nimport type { ModelFrom } from 'customer-site/utils/type-utils';\nimport type { DragulaOptions } from 'dragula';\nimport type Route from './route';\n\n/**\n * @classdesc\n * List of scenes.\n */\nexport default class ScenesController extends Controller {\n @service declare identityManager: ServiceRegistry['identity-manager'];\n @service declare modals: ServiceRegistry['modals'];\n @service declare notificationManager: ServiceRegistry['notification-manager'];\n @service declare intl: ServiceRegistry['adc-intl'];\n @service declare navigation: ServiceRegistry['navigation'];\n\n declare model: ModelFrom;\n\n /**\n * Indicates the user is currently sorting scenes.\n */\n @tracked isReordering = false;\n\n /**\n * List of scenes.\n */\n @tracked scenes: SceneModel[] = [];\n\n /**\n * Required to sort scenes\n */\n scenesSorting = ['sortOrder'];\n\n /**\n * The scenes to display, in sorted order.\n */\n @sort('scenes', 'scenesSorting')\n declare sortedScenes: SceneModel[];\n\n /**\n * Scenes drag config.\n */\n get dragCardsConfig(): { options: DragulaOptions } {\n return {\n options: {\n copy: false,\n direction: 'vertical',\n revertOnSpill: false,\n removeOnSpill: false,\n mirrorContainer: document.querySelector('.scenes-wrap') ?? undefined,\n\n // Only allow drag if currently in reorder mode AND click was within the drag handle.\n moves: (_el?: Element, _container?: Element, handle?: Element) =>\n !!(this.isReordering && handle?.classList.contains('svg-reorder'))\n }\n };\n }\n\n @action dataLoaded(resolvedModel: Awaited): void {\n this.scenes = resolvedModel as SceneModel[];\n }\n\n /**\n * Toggles reorder mode on/off.\n */\n @action toggleReorder(): void {\n if (this.isReordering) {\n const container = document.querySelector('.scenes-wrap .scenes-host'),\n nodes: { [key: string]: Element } = {};\n\n if (container) {\n // Create a mapping of scene item nodes (by model ID).\n Array.from(container.children).forEach((childEl) => {\n nodes[childEl.querySelector('p')?.getAttribute('data-scene-id') as string] = childEl;\n });\n\n // Iterate scene models and append to container.\n this.sortedScenes.forEach((scene) => container.appendChild(nodes[scene.id]));\n }\n }\n\n this.isReordering = !this.isReordering;\n }\n\n /**\n * Saves the current scenes order.\n */\n @action saveReorder(_buttonAnimation?: Promise, evt?: Event): Promise {\n const { notificationManager, scenes } = this;\n\n // Iterate scene rows and update sort order.\n Array.from(\n (evt?.target as HTMLElement)?.closest('#app-content')?.querySelectorAll('.scenes-wrap .scene-item p') ?? []\n ).forEach((el: HTMLElement, idx) => {\n set(scenes.find((s) => s.id === el.dataset.sceneId)!, 'sortOrder', idx);\n });\n\n // Save dirty models.\n return Promise.all(scenes.filter((s) => s.hasDirtyAttributes).map((s) => s.save()))\n .then(() => notificationManager.addSuccess(this.intl.tc(this, 'orderSaved')))\n .catch((err) => notificationManager.addError(err))\n .finally(() => (this.isReordering = false));\n }\n\n /**\n * Shows a confirmation dialog and executes the action after confirmation.\n */\n private confirmAction(\n scene: SceneModel,\n description: string,\n text: string,\n action: () => Promise,\n success: string,\n failure: string,\n css: string\n ): void {\n const getText = (key: string, tokens?: Record): string => this.intl.tc(this, key, tokens),\n getTextName = (key: string): string =>\n getText(key, {\n name: scene.name\n });\n\n this.modals.showConfirmationDialog(getTextName('namedScene'), getTextName(description), {\n text: getText(text),\n action: () =>\n action()\n .then(() => this.notificationManager.addSuccess(getTextName(success)))\n .catch(() => this.notificationManager.addError(getTextName(failure))),\n css\n });\n }\n\n /**\n * Executes the passed scene.\n */\n @action runScene(scene: SceneModel): void {\n // Confirm with user that they really want to execute this scene.\n this.confirmAction(\n scene,\n 'confirmRun',\n 'runScene',\n () => scene.execute(),\n 'sceneExecutionSuccess',\n 'sceneExecutionFailure',\n 'btn-color-primary'\n );\n }\n\n /**\n * Transitions to the edit route for the passed route, or the create scene route if no scene passed.\n */\n @action editScene(scene?: SceneModel): void {\n this.navigation.transitionToRouteId(\n SceneEdit,\n scene?.id\n ? {\n queryParams: {\n a: `${scene.id}`\n }\n }\n : undefined\n );\n }\n\n /**\n * Deletes the passed scene.\n */\n @action deleteScene(scene: SceneModel): void {\n // Confirm with user that they really want to delete this scene.\n this.confirmAction(\n scene,\n 'confirmDelete',\n 'deleteScene',\n () => scene.destroyRecord(),\n 'successDeleteScene',\n 'errorDeleteScene',\n 'btn-color-danger'\n );\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 'automation/scenes/index': ScenesController;\n }\n}\n","import { inject as service } from '@ember/service';\nimport AdcBaseRoute from '../../../classes/base-route';\nimport { EmberScenes } from '../../../enums/CustomerPageUrl';\n\nimport type Store from '@ember-data/store';\nimport type Transition from '@ember/routing/transition';\nimport type SceneModel from 'customer-site/models/automation/scene';\nimport type { ModelFrom } from 'customer-site/utils/type-utils';\nimport type ScenesController from './controller';\n\n/**\n * @classdesc\n * View for the Scenes index list.\n */\nexport default class ScenesIndexRoute extends AdcBaseRoute {\n @service declare store: Store;\n\n routeId = EmberScenes;\n\n declare controller: ScenesController;\n\n /**\n * Loads the model for this route.\n */\n model(): {\n scenes: ADCAsyncStoreFindAll;\n } {\n return {\n scenes: this.store.findAll('automation/scene')\n };\n }\n\n async afterModel(model: ModelFrom): Promise {\n const scenes = await model.scenes;\n\n // If default scenes failed to load from the server, log to Sentry.\n if (scenes.length === 0) {\n console.error('No default scenes were found.', scenes);\n }\n }\n\n deactivate(transition: Transition): void {\n // Clean up reordering in case the user left it in that state.\n const { controller } = this;\n if (controller.isReordering) {\n controller.toggleReorder();\n }\n\n return super.deactivate(transition);\n }\n}\n","import { tracked } from '@glimmer/tracking';\nimport Controller from '@ember/controller';\nimport { action, computed, set } from '@ember/object';\nimport { alias, reads } from '@ember/object/computed';\nimport { EmberScheduleBuilder } from 'customer-site/enums/CustomerPageUrl';\nimport { MultipleDevices } from 'customer-site/enums/SelectionType';\nimport { intlPath } from '@adc/i18n/path';\nimport { BinaryListItem } from '@adc/ui-components/components/simple-binary/list';\n\nimport type { AsyncHasMany } from '@ember-data/model';\nimport type Device from 'customer-site/models/automation/rules-builder/device';\nimport type Event from 'customer-site/models/automation/rules-builder/event';\nimport type ExtraDeviceOption from 'customer-site/models/automation/rules-builder/extra-device-option';\nimport type FollowupOption from 'customer-site/models/automation/schedule-builder/followup-option';\nimport type ScheduleBuilder from 'customer-site/models/automation/schedule-builder/schedule-builder';\nimport type ScheduleEvent from 'customer-site/models/automation/schedule-builder/schedule-event';\nimport type ScheduleTemplate from 'customer-site/models/automation/schedule-builder/template';\nimport type { ModelFrom, ResolvedModelFrom } from 'customer-site/utils/type-utils';\nimport type AutomationSchedulesBuilderActionDetailsRoute from './route';\n\n@intlPath({ path: 'automation/schedules/builder/action/details' })\nexport default class AutomationSchedulesBuilderActionDetails extends Controller {\n declare model: ModelFrom;\n @tracked resolvedModel?: ResolvedModelFrom;\n\n @reads('resolvedModel.availableTemplates')\n declare availableTemplates: ScheduleTemplate[];\n\n @alias('resolvedModel.allExtraDeviceOptions')\n declare allExtraDeviceOptions: ExtraDeviceOption[];\n\n @reads('resolvedModel.allDevices')\n declare allDevices: Device[];\n\n @reads('resolvedModel.allEvents')\n declare allEvents: Event[];\n\n @alias('resolvedModel.schedule')\n declare schedule: ScheduleBuilder;\n\n @computed('schedule.scheduleEvents')\n get scheduleEvent(): ScheduleEvent {\n return this.schedule.scheduleEvents.slice()[0];\n }\n\n @computed('schedule.scheduleEvents')\n get followUpEvent(): ScheduleEvent {\n return this.schedule.scheduleEvents.slice()[1];\n }\n\n @computed('availableTemplates')\n get supportsMultiSelect(): boolean {\n return this.availableTemplates.some((at) => at.actionSelectionType === MultipleDevices);\n }\n\n @reads('schedule.scheduleEvents.length')\n declare scheduleEventsCount: number;\n\n @alias('resolvedModel.schedule.actionDevices')\n declare scheduleDevices: AsyncHasMany;\n\n @alias('resolvedModel.schedule.actionExtraDeviceOptions')\n declare scheduleExtraDevices: AsyncHasMany;\n\n @computed('allDevices', 'schedule', 'scheduleEvent.actionEvent', 'availableTemplates')\n get availableDevices(): BinaryListItem<{ device: Device }>[] {\n const { schedule, allDevices, scheduleEvent, availableTemplates } = this,\n selectedDeviceIds = schedule.hasMany('actionDevices').ids(),\n selectedEventId = scheduleEvent?.belongsTo('actionEvent')?.id(),\n enabledDeviceIds = [\n ...new Set(\n availableTemplates\n .filter((template) =>\n selectedEventId ? template.belongsTo('actionEvent').id() == selectedEventId : template\n )\n .flatMap((template) => template.hasMany('actionDevices').ids())\n )\n ];\n\n return allDevices\n .map((device) => {\n return new BinaryListItem({\n label: device.description,\n icon: device.deviceIcon.icon,\n color: device.deviceIcon.color,\n state: selectedDeviceIds.includes(device.id),\n disabled: !enabledDeviceIds.includes(device.id),\n props: {\n device\n }\n });\n })\n .sort((a, b) => a.label.toString().localeCompare(b.label.toString()));\n }\n\n @computed('allExtraDeviceOptions', 'schedule')\n get availableExtraDevices(): BinaryListItem<{ extraDeviceOption: ExtraDeviceOption }>[] {\n const { allExtraDeviceOptions, schedule } = this,\n selectedExtraDeviceOptionIds = schedule.hasMany('actionExtraDeviceOptions').ids();\n\n return allExtraDeviceOptions\n .map((extraDeviceOption) => {\n return new BinaryListItem({\n label: extraDeviceOption.description,\n icon: extraDeviceOption.icon.icon,\n color: extraDeviceOption.icon.color,\n disabled: false,\n state: selectedExtraDeviceOptionIds.includes(extraDeviceOption.id),\n props: {\n extraDeviceOption\n }\n });\n })\n .sort((a, b) => a.label.toString().localeCompare(b.label.toString()));\n }\n\n @computed('allEvents', 'scheduleEvent', 'schedule.actionDevices.[]', 'availableTemplates')\n get availableActions(): BinaryListItem<{ event: Event }>[] {\n const { schedule, allEvents, scheduleEvent, availableTemplates } = this,\n actionEventId = scheduleEvent.belongsTo('actionEvent').id(),\n selectedDeviceIds = schedule.hasMany('actionDevices').ids(),\n enabledEventIds = availableTemplates\n .filter((t) => {\n if (selectedDeviceIds?.length > 0) {\n const allTemplateDeviceIds = t.hasMany('actionDevices').ids();\n return selectedDeviceIds.every((selectedDeviceId) =>\n allTemplateDeviceIds.includes(selectedDeviceId)\n );\n }\n return t;\n })\n .map((t) => t.belongsTo('actionEvent').id());\n\n return allEvents.map(\n (event) =>\n new BinaryListItem({\n label: event.description,\n icon: event.icon.icon,\n color: event.icon.color,\n state: event.id === actionEventId,\n disabled: !enabledEventIds.includes(event.id),\n props: { event: event }\n })\n );\n }\n\n @computed('allExtraDeviceOptions.length')\n get hasExtraDeviceOptions(): boolean {\n return this.allExtraDeviceOptions.length > 0;\n }\n\n @computed('allDevices.length')\n get hasDevices(): boolean {\n return this.allDevices.length > 0;\n }\n\n @action dataLoaded(resolvedModel: ResolvedModelFrom): void {\n this.resolvedModel = resolvedModel;\n // on accounts with only one device or extra device option, set the device to the only option when we navigate to the action.\n if (this.allDevices.length === 1 && this.allExtraDeviceOptions.length === 0) {\n set(this, 'scheduleDevices', this.allDevices as unknown as AsyncHasMany);\n }\n if (this.allExtraDeviceOptions.length === 1 && this.allDevices.length === 0) {\n this.schedule.set('actionExtraDeviceOptions', this.allExtraDeviceOptions);\n }\n\n if (this.allEvents.length == 1) {\n this.scheduleEvent.set('actionEvent', this.allEvents[0]);\n }\n }\n\n @action updateActionDevices(items: BinaryListItem<{ device: Device }>[]): void {\n this.schedule.set(\n 'actionDevices',\n items.filter((item) => item.state).map((i) => i.props.device)\n );\n }\n\n @action updateActionExtraDeviceOptions(items: BinaryListItem<{ extraDeviceOption: ExtraDeviceOption }>[]): void {\n this.schedule.set(\n 'actionExtraDeviceOptions',\n items.filter((item) => item.state).map((i) => i.props.extraDeviceOption)\n );\n }\n\n @action updateActionEvent(items: BinaryListItem<{ event: Event }>[]): void {\n this.scheduleEvent.set('actionEvent', items.filter((item) => item.state)[0]?.props.event);\n if (this.scheduleEventsCount > 1) {\n this.updateFollowUpEventData(this.followUpEvent);\n }\n }\n\n @computed(\n 'scheduleDevices',\n 'hasExtraDeviceOptions',\n 'availableExtraDevices.@each.state',\n 'scheduleEvent.actionEvent'\n )\n get nextButtonDisabled(): boolean {\n const { scheduleDevices, hasExtraDeviceOptions, scheduleEvent, availableExtraDevices } = this;\n return !(\n (scheduleDevices.length > 0 ||\n (hasExtraDeviceOptions && availableExtraDevices.filter((i) => i.state).length > 0)) &&\n scheduleEvent.belongsTo('actionEvent').id() != undefined\n );\n }\n\n updateFollowUpEventData(followUpEvent: ScheduleEvent): void {\n // using first available valid follow up\n // will need to be updated for cases with 2+ follow up options\n const [updateActionEvent] = this.currentScheduleFollowUpOptions.availableEvents.slice();\n followUpEvent.set('actionEvent', updateActionEvent);\n }\n\n @computed('scheduleEvent.actionEvent.{icon,description}', 'availableTemplates')\n get currentScheduleFollowUpOptions(): FollowupOption {\n // get the template based on the first action\n const [currentTemplate] = this.availableTemplates.filter(\n (template) => template.belongsTo('actionEvent').id() == this.scheduleEvent.belongsTo('actionEvent').id()\n );\n const [availableFollowUpOptions] = currentTemplate.followUpOptions.filter(\n (option) => option.belongsTo('selectedEvent').id() == this.scheduleEvent.belongsTo('actionEvent').id()\n );\n // return all follow up options in the current template based on first action\n return availableFollowUpOptions;\n }\n\n scheduleBuilderSummaryRouteId = EmberScheduleBuilder;\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 'automation/schedules/builder/action/details': AutomationSchedulesBuilderActionDetails;\n }\n}\n","import Controller from '@ember/controller';\nimport { action, computed, set } from '@ember/object';\nimport { alias, equal, reads } from '@ember/object/computed';\n\nimport type ExtraActionLight from 'customer-site/models/automation/rules-builder/extra-data/extra-action-light';\nimport type ScheduleBuilder from 'customer-site/models/automation/schedule-builder/schedule-builder';\nimport type ScheduleEvent from 'customer-site/models/automation/schedule-builder/schedule-event';\nimport type { ModelFrom } from 'customer-site/utils/type-utils';\nimport type AutomationSchedulesBuilderActionDetailsLightsRoute from './route';\n\nconst LIGHT_DIM_EVENT = 317;\nconst DEFAULT_LIGHT_LEVEL = 50;\n\nexport default class AutomationSchedulesBuilderActionDetailsLights extends Controller {\n declare model: ModelFrom;\n\n @reads('model.schedule')\n declare schedule: ScheduleBuilder;\n\n @computed('schedule.scheduleEvents.[]')\n get firstEvent(): ScheduleEvent {\n return this.schedule.scheduleEvents.objectAt(0)!;\n }\n\n @equal('firstEvent.actionEvent.eventType', LIGHT_DIM_EVENT)\n declare showDimmerSelection: boolean;\n\n @reads('schedule.actionType.extraData')\n declare actionExtraData: ExtraActionLight;\n\n @alias('schedule.extraData.ACTION_LIGHT_PERCENT')\n lightPercentLevel: string | undefined;\n\n @action updateExtraData(): void {\n if (this.showDimmerSelection && !this.lightPercentLevel) {\n set(this, 'lightPercentLevel', DEFAULT_LIGHT_LEVEL.toString());\n } else {\n set(this, 'lightPercentLevel', undefined);\n }\n }\n\n @action setLevel(newLevel: number): void {\n set(this, 'lightPercentLevel', newLevel.toString());\n }\n\n @computed('lightPercentLevel')\n get sliderValue(): number {\n return this.lightPercentLevel === undefined ? DEFAULT_LIGHT_LEVEL : parseInt(this.lightPercentLevel);\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 'automation/schedules/builder/action/details/lights': AutomationSchedulesBuilderActionDetailsLights;\n }\n}\n","import Route from '@ember/routing/route';\n\nimport type ScheduleBuilder from 'customer-site/models/automation/schedule-builder/schedule-builder';\nimport type { ScheduleBuilderModel } from '../../../route';\n\ninterface AutomationSchedulesBuilderActionDetailsLightsModel {\n schedule: ScheduleBuilder;\n}\n\nexport default class AutomationSchedulesBuilderActionDetailsLightsRoute extends Route {\n async model(): Promise {\n const { schedule } = this.modelFor('automation.schedules.builder') as ScheduleBuilderModel,\n resolvedSchedule = await schedule;\n return {\n schedule: resolvedSchedule\n };\n }\n}\n","import { service } from '@ember/service';\nimport AdcBaseRoute from 'customer-site/classes/base-route';\nimport { EmberScheduleBuilderAction, EmberScheduleBuilderActionDetails } from 'customer-site/enums/CustomerPageUrl';\n\nimport type Transition from '@ember/routing/transition';\nimport type { Registry } from '@ember/service';\nimport type Device from 'customer-site/models/automation/rules-builder/device';\nimport type Event from 'customer-site/models/automation/rules-builder/event';\nimport type ExtraDeviceOption from 'customer-site/models/automation/rules-builder/extra-device-option';\nimport type ScheduleBuilder from 'customer-site/models/automation/schedule-builder/schedule-builder';\nimport type ScheduleTemplate from 'customer-site/models/automation/schedule-builder/template';\nimport type { ScheduleBuilderModel } from '../../route';\n\ninterface SchedulesBuilderActionDetailsModel {\n availableTemplates: Promise;\n allDevices: Promise;\n allExtraDeviceOptions: Promise;\n allEvents: Promise;\n schedule: Promise;\n}\n\nexport default class AutomationSchedulesBuilderActionDetailsRoute extends AdcBaseRoute {\n @service declare store: Registry['store'];\n @service declare navigation: Registry['navigation'];\n\n /** @override */\n routeId = EmberScheduleBuilderActionDetails;\n\n model(): SchedulesBuilderActionDetailsModel {\n const { templates, schedule } = this.modelFor('automation.schedules.builder');\n\n const availableTemplates = templates.then((resolvedTemplates) => {\n return schedule.then((resolvedSchedule) => {\n const actionTypeId = resolvedSchedule.belongsTo('actionType').id();\n return resolvedTemplates.filter((t) => t.belongsTo('actionType').id() == actionTypeId);\n });\n });\n\n const allDevices = availableTemplates.then((resolvedAvailableTemplates) =>\n Promise.all(resolvedAvailableTemplates.map(({ actionDevices }) => actionDevices)).then(\n (actionDevicesArrays) =>\n actionDevicesArrays.flatMap((actionDevices) => actionDevices.toArray()).uniqBy('id')\n )\n ),\n allExtraDeviceOptions = availableTemplates.then((resolvedAvailableTemplates) =>\n Promise.all(\n resolvedAvailableTemplates.map(({ actionExtraDeviceOptions }) => actionExtraDeviceOptions)\n ).then((actionExtraDeviceOptionsArrays) =>\n actionExtraDeviceOptionsArrays\n .flatMap((actionExtraDeviceOptions) => actionExtraDeviceOptions.toArray())\n .uniqBy('id')\n )\n ),\n allEvents = availableTemplates.then((resolvedAvailableTemplates) =>\n Promise.all(resolvedAvailableTemplates.map(({ actionEvent }) => actionEvent)).then((actionEvents) =>\n actionEvents.uniqBy('id')\n )\n );\n return {\n availableTemplates,\n allDevices,\n allExtraDeviceOptions,\n allEvents,\n schedule\n };\n }\n\n /** @override */\n async afterModel(resolvedModel: SchedulesBuilderActionDetailsModel, transition: Transition): Promise {\n super.afterModel(resolvedModel, transition);\n\n const schedule = await resolvedModel.schedule,\n actionType = await schedule.actionType,\n extraAction = actionType?.extraData,\n indexRouteId = extraAction?.scheduleDetailsRoute ?? 'automation.schedules.builder.action.details';\n\n if (actionType == undefined) {\n this.navigation.transitionToRouteId(EmberScheduleBuilderAction);\n }\n\n this.router.transitionTo(indexRouteId, schedule.id || 'new');\n }\n}\n","import Controller from '@ember/controller';\nimport { action, computed } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { EmberScheduleBuilderActionDetails, EmberRulesBuilderActionDetails } from 'customer-site/enums/CustomerPageUrl';\n\nimport type { BinaryListItem } from '@adc/ui-components/components/simple-binary/list';\nimport type { AsyncBelongsTo } from '@ember-data/model';\nimport type { Registry as ServiceRegistry } from '@ember/service';\nimport type ActionType from 'customer-site/models/automation/rules-builder/action-type';\nimport type { ModelFrom, ResolvedModelFrom } from 'customer-site/utils/type-utils';\nimport type AutomationSchedulesBuilderActionRoute from './route';\n\nexport default class AutomationSchedulesBuilderActionIndex extends Controller {\n @service declare navigation: ServiceRegistry['navigation'];\n @service declare modals: ServiceRegistry['modals'];\n @service declare intl: ServiceRegistry['adc-intl'];\n\n declare model: ModelFrom;\n /** @todo We should not use declare, this should be optional: `resolvedModel?: ` */\n declare resolvedModel: ResolvedModelFrom;\n\n @computed('resolvedModel.{allRuleActionTypes,allScheduleActionTypes}')\n get allActionTypes(): ActionType[] {\n const { allRuleActionTypes, allScheduleActionTypes } = this.resolvedModel;\n return [...allScheduleActionTypes, ...allRuleActionTypes].uniqBy('id');\n }\n\n @computed('resolvedModel.{allScheduleActionTypes,filteredScheduleActionTypeIds}')\n get enabledFeatures(): ActionType[] {\n const { allScheduleActionTypes, filteredScheduleActionTypeIds } = this.resolvedModel;\n return allScheduleActionTypes.filter(({ id }) => filteredScheduleActionTypeIds.includes(id));\n }\n\n @action updateActionType(items: BinaryListItem<{ id: string }>[]): void {\n const { schedule, filteredScheduleActionTypeIds, allScheduleActionTypes } = this.resolvedModel,\n currentScheduleActionTypeId = schedule.actionType?.get('id'),\n selectedId = items.find((item) => item.state === true)?.props.id;\n\n if (!selectedId) {\n return;\n }\n\n if (selectedId !== currentScheduleActionTypeId) {\n Object.assign(schedule, {\n actionDevices: [],\n actionType: this.allActionTypes.find(({ id }) => id === selectedId)\n });\n // DO NOT COPY THIS, PLEASE IMPLEMENT THE SUGGESTION AND TEST.\n // @ts-expect-error This code should be replaced with: `schedule.scheduleEvents.toArray()[0]?.set('actionEvent', null);`.\n schedule.scheduleEvents[0]?.set('actionEvent', null);\n }\n\n if (filteredScheduleActionTypeIds.includes(selectedId)) {\n this.navigation.transitionToRouteId(EmberScheduleBuilderActionDetails);\n } else {\n this.modals.showConfirmationDialog(\n this.intl.tc(this, 'incompatibleAction'),\n this.intl.tc(this, 'incompatibleActionMessage'),\n {\n text: this.intl.t('generic.continue'),\n css: 'btn-color-danger',\n action: () => {\n if (allScheduleActionTypes.map(({ id }) => id).includes(selectedId)) {\n Object.assign(schedule, {\n occurrenceType: null,\n selectedDays: null\n });\n schedule.scheduleEvents.objectAt(0)?.set('timeType', null);\n this.navigation.transitionToRouteId(EmberScheduleBuilderActionDetails);\n } else {\n this.navigation.transitionToRouteId(EmberRulesBuilderActionDetails, 'new', {\n queryParams: {\n actionType: selectedId\n }\n });\n }\n }\n },\n {\n action: () => {\n schedule.actionType = this.allActionTypes.find(\n (at) => at.id === currentScheduleActionTypeId\n ) as unknown as AsyncBelongsTo;\n }\n }\n );\n }\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 'automation/schedules/builder/action/index': AutomationSchedulesBuilderActionIndex;\n }\n}\n","import { service, type Registry as ServiceRegistry } from '@ember/service';\nimport AdcBaseRoute from 'customer-site/classes/base-route';\nimport { EmberScheduleBuilderAction } from '../../../../../enums/CustomerPageUrl';\n\nimport type ActionType from 'customer-site/models/automation/rules-builder/action-type';\nimport type ScheduleBuilder from 'customer-site/models/automation/schedule-builder/schedule-builder';\nimport type { ScheduleBuilderModel } from '../../route';\n\ninterface ScheduleBuilderActionIndexRouteModel {\n schedule: Promise;\n allScheduleActionTypes: Promise;\n filteredScheduleActionTypeIds: Promise;\n allRuleActionTypes: Promise;\n}\n\n/**\n * @classdesc\n * Schedule builder action route.\n *\n * @class automation.schedules.builder.action.AutomationSchedulesBuilderActionRoute\n */\nexport default class AutomationSchedulesBuilderActionRoute extends AdcBaseRoute {\n /** @override */\n routeId = EmberScheduleBuilderAction;\n\n @service declare store: ServiceRegistry['store'];\n\n model(): ScheduleBuilderActionIndexRouteModel {\n const { schedule, templates, ruleTemplates } =\n this.modelFor('automation.schedules.builder'),\n filteredScheduleTemplates = schedule.then((resolvedSchedules) => {\n const occurrenceTypeId = resolvedSchedules.belongsTo('occurrenceType').id(),\n timeTypeId = resolvedSchedules.scheduleEvents.objectAt(0)?.belongsTo('timeType').id();\n return templates.then((resolvedTemplates) =>\n resolvedTemplates\n .filter((resolvedTemplate) =>\n occurrenceTypeId != undefined\n ? resolvedTemplate.belongsTo('occurrenceType').id() == occurrenceTypeId\n : resolvedTemplate\n )\n .filter((resolvedTemplate) =>\n timeTypeId != undefined\n ? resolvedTemplate.belongsTo('timeType').id() == timeTypeId\n : resolvedTemplate\n )\n );\n }),\n filteredScheduleActionTypeIds = filteredScheduleTemplates.then((resolvedFilteredScheduleTemplates) =>\n resolvedFilteredScheduleTemplates.map((templates) => templates.belongsTo('actionType').id()).uniq()\n ),\n allScheduleActionTypes = templates.then((resolvedTempaltes) =>\n Promise.all(\n resolvedTempaltes\n .map(({ actionType }) => actionType)\n .uniqBy('id')\n .toArray()\n )\n );\n\n const allRuleActionTypes = ruleTemplates.then((resolvedTemplates) =>\n Promise.all(\n resolvedTemplates\n .map(({ actionType }) => actionType)\n .uniqBy('id')\n .toArray()\n )\n );\n\n return {\n schedule,\n allScheduleActionTypes,\n filteredScheduleActionTypeIds,\n allRuleActionTypes\n };\n }\n}\n","import AdcBaseRoute from 'customer-site/classes/base-route';\nimport { EmberScheduleBuilderAdditionalOption } from 'customer-site/enums/CustomerPageUrl';\n\n/**\n * @classdesc\n * Schedule builder additional option route.\n *\n * @class automation.schedules.builder.additional-option.AutomationSchedulesBuilderAdditionalOptionRoute\n */\nexport default class AutomationSchedulesBuilderAdditionalOptionRoute extends AdcBaseRoute {\n /** @override */\n routeId = EmberScheduleBuilderAdditionalOption;\n}\n","import { tracked } from '@glimmer/tracking';\nimport Controller from '@ember/controller';\nimport { action, computed } from '@ember/object';\nimport { alias, mapBy, max, reads } from '@ember/object/computed';\nimport { service } from '@ember/service';\nimport { EmberScheduleBuilder } from 'customer-site/enums/CustomerPageUrl';\nimport { intlPath } from '@adc/i18n/path';\nimport { BinaryListItem } from '@adc/ui-components/components/simple-binary/list';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { AsyncBelongsTo } from '@ember-data/model';\nimport type { Registry } from '@ember/service';\nimport type Event from 'customer-site/models/automation/rules-builder/event';\nimport type ScheduleEvent from 'customer-site/models/automation/schedule-builder/schedule-event';\nimport type TimeType from 'customer-site/models/automation/schedule-builder/time-type';\nimport type { ModelFrom, ResolvedModelFrom } from 'customer-site/utils/type-utils';\nimport type AutomationSchedulesBuilderFollowUpRoute from './route';\n\ninterface TimeSelectionInterface {\n timeType: TimeType;\n}\n\ninterface FollowUpEventSelectionInterface {\n event: Event;\n}\n\n@intlPath({ path: 'automation/schedules/builder/follow-up' })\nexport default class AutomationScheduleBuilderFollowUpController extends Controller {\n @service declare intl: ADCIntlService;\n @service declare store: Registry['store'];\n @service declare navigation: Registry['navigation'];\n\n declare model: ModelFrom;\n\n @tracked resolvedModel?: ResolvedModelFrom;\n @tracked selectedTimeType?: TimeType;\n @tracked selectedSpecificTime?: Date;\n @tracked selectedEvent?: Event;\n\n @alias('resolvedModel.scheduleEvents')\n declare scheduleEvents: ScheduleEvent[];\n @alias('resolvedModel.followUpScheduleEvent')\n declare followUpScheduleEvent: ScheduleEvent | undefined;\n @reads('resolvedModel.modelTimeType')\n declare modelTimeType: TimeType | undefined;\n @reads('resolvedModel.modelFollowupEvent')\n declare modelFollowupEvent: Event | undefined;\n @reads('resolvedModel.allEvents')\n declare validEvents: Event[];\n @reads('resolvedModel.allTimeTypes')\n declare allTimeTypes: TimeType[];\n\n @computed('followUpScheduleEvent', 'selectedSpecificTime')\n get specificTime(): Date {\n const { followUpScheduleEvent, selectedSpecificTime } = this;\n return selectedSpecificTime ?? followUpScheduleEvent?.specificTime ?? new Date(2020, 1, 1, 12);\n }\n\n @computed('modelTimeType', 'selectedTimeType')\n get timeType(): TimeType | undefined {\n const { modelTimeType, selectedTimeType } = this;\n return selectedTimeType ?? modelTimeType ?? undefined;\n }\n\n @computed('modelFollowupEvent', 'selectedEvent')\n get followUpEvent(): Event | undefined {\n const { selectedEvent, modelFollowupEvent } = this;\n return selectedEvent ?? modelFollowupEvent ?? undefined;\n }\n\n @computed('allTimeTypes', 'timeType')\n get timeTypeItems(): BinaryListItem[] {\n const { allTimeTypes, timeType } = this;\n\n return allTimeTypes.map(\n (timeItem) =>\n new BinaryListItem({\n label: timeItem.name,\n icon: timeItem.icon.icon,\n state: timeItem.id == timeType?.id,\n props: { timeType: timeItem }\n })\n );\n }\n\n @computed('validEvents', 'followUpEvent')\n get followUpEventItems(): BinaryListItem[] {\n const { followUpEvent, validEvents } = this;\n return validEvents.map(\n (event) =>\n new BinaryListItem({\n label: event.description,\n icon: event.icon.icon,\n color: event.icon.color,\n state: event.id === followUpEvent?.id,\n props: { event }\n })\n );\n }\n\n @reads('timeType.showSpecificTimeComponent')\n declare showTimeOfDayPicker: boolean;\n @mapBy('resolvedModel.filteredTemplates', 'minuteInterval')\n declare allMinuteInvervals: number[];\n @max('allMinuteInvervals')\n declare minuteInterval: number;\n\n @computed('timeType', 'followUpEvent')\n get confirmButtonDisabled(): boolean {\n const { timeType, followUpEvent } = this;\n return timeType == undefined || followUpEvent == undefined;\n }\n\n @action dataLoaded(resolvedModel: ResolvedModelFrom) {\n this.resolvedModel = resolvedModel;\n\n //Check if there is only one selection. If there is, set it\n const { followUpEventItems } = this;\n if (followUpEventItems.length == 1) {\n this.selectedEvent = followUpEventItems[0].props.event;\n }\n }\n\n @action timeTypeUpdated(items: BinaryListItem[]): void {\n this.selectedTimeType = items.find(({ state }) => state === true)?.props.timeType;\n }\n\n @action specificTimeUpdated(updatedSelectedTime: Date): void {\n this.selectedSpecificTime = updatedSelectedTime;\n }\n\n @action followUpEventUpdated(items: BinaryListItem[]): void {\n this.selectedEvent = items.find(({ state }) => state === true)?.props.event;\n }\n\n @action saveAndTransition() {\n const { store, navigation, scheduleEvents, specificTime, showTimeOfDayPicker, timeType, followUpEvent } = this;\n\n let newFollowUpScheduleEvent;\n newFollowUpScheduleEvent = scheduleEvents.objectAt(1);\n if (!newFollowUpScheduleEvent) {\n newFollowUpScheduleEvent = store.createRecord('automation/schedule-builder/schedule-event');\n scheduleEvents.addObject(newFollowUpScheduleEvent);\n }\n\n newFollowUpScheduleEvent.timeType = timeType as unknown as AsyncBelongsTo;\n newFollowUpScheduleEvent.specificTime = undefined;\n if (showTimeOfDayPicker) {\n newFollowUpScheduleEvent.specificTime = specificTime;\n }\n\n newFollowUpScheduleEvent.actionEvent = followUpEvent as unknown as AsyncBelongsTo;\n\n // Transition to Summary Page\n return navigation.transitionToRouteId(EmberScheduleBuilder);\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 'automation/schedules/builder/follow-up': AutomationScheduleBuilderFollowUpController;\n }\n}\n","import AdcBaseRoute from 'customer-site/classes/base-route';\nimport { EmberScheduleBuilderFollowUp } from '../../../../enums/CustomerPageUrl';\n\nimport type Event from 'customer-site/models/automation/rules-builder/event';\nimport type ScheduleEvent from 'customer-site/models/automation/schedule-builder/schedule-event';\nimport type ScheduleTemplate from 'customer-site/models/automation/schedule-builder/template';\nimport type TimeType from 'customer-site/models/automation/schedule-builder/time-type';\nimport type { ScheduleBuilderModel } from '../route';\nimport type AutomationScheduleBuilderFollowUpController from './controller';\n\nexport interface SchedulesBuilderFollowUpModel {\n scheduleEvents: Promise;\n modelTimeType: Promise;\n modelFollowupEvent: Promise;\n allTimeTypes: Promise;\n allEvents: Promise;\n followUpScheduleEvent: Promise;\n filteredTemplates: Promise;\n}\n\n/**\n * @classdesc\n * Schedule builder follow-up route.\n *\n * @class automation.schedules.builder.action.AutomationSchedulesBuilderFollowUpRoute\n */\nexport default class AutomationSchedulesBuilderFollowUpRoute extends AdcBaseRoute {\n /** @override */\n routeId = EmberScheduleBuilderFollowUp;\n\n model(): SchedulesBuilderFollowUpModel {\n const { schedule, templates } = this.modelFor('automation.schedules.builder'),\n filteredTemplates = templates.then((resolvedTemplates) =>\n schedule.then((resolvedSchedule) => {\n const firstEvent = resolvedSchedule.scheduleEvents.objectAt(0)!,\n actionTypeId = resolvedSchedule.belongsTo('actionType').id(),\n occurrenceTypeId = resolvedSchedule.belongsTo('occurrenceType').id(),\n actionEventId = firstEvent.belongsTo('actionEvent').id(),\n timeTypeId = firstEvent.belongsTo('timeType').id();\n\n return resolvedTemplates\n .filter((template) => template.belongsTo('actionType').id() == actionTypeId)\n .filter((template) => template.belongsTo('occurrenceType').id() == occurrenceTypeId)\n .filter((template) => template.belongsTo('actionEvent').id() == actionEventId)\n .filter((template) => template.belongsTo('timeType').id() == timeTypeId);\n })\n ),\n followUpOptions = filteredTemplates.then((resolvedFilteredTemplates) =>\n schedule.then((resolvedSchedule) => {\n const previousEvent = resolvedSchedule.scheduleEvents.objectAt(0)!,\n previousEventId = previousEvent.belongsTo('actionEvent').id(),\n previousTimeTypeId = previousEvent.belongsTo('timeType').id();\n\n return resolvedFilteredTemplates\n .flatMap(({ followUpOptions }) => followUpOptions.toArray())\n .filter((followUp) => followUp.belongsTo('selectedEvent').id() == previousEventId)\n .filter((followUp) => followUp.belongsTo('selectedTimeType').id() == previousTimeTypeId);\n })\n ),\n allEvents = followUpOptions.then((resolvedFollowUpOption) =>\n Promise.all(resolvedFollowUpOption.map(({ availableEvents }) => availableEvents)).then(\n (resolvedEvents) => resolvedEvents.flatMap((events) => events.toArray()).uniqBy('id')\n )\n ),\n allTimeTypes = followUpOptions.then((resolvedFollowUpOption) =>\n Promise.all(resolvedFollowUpOption.map(({ availableTimeTypes }) => availableTimeTypes)).then(\n (resolvedTimeTypes) => resolvedTimeTypes.flatMap((timeType) => timeType.toArray()).uniqBy('id')\n )\n ),\n followUpScheduleEvent = schedule.then((resolvedSchedule) => resolvedSchedule.scheduleEvents.objectAt(1));\n\n return {\n // DO NOT COPY THIS, PLEASE IMPLEMENT THE SUGGESTION AND TEST.\n // @ts-expect-error This code should be replaced with: `scheduleEvents: schedule.then((resolvedSchedule) => resolvedSchedule.scheduleEvents.toArray()),`.\n scheduleEvents: schedule.then((resolvedSchedule) => resolvedSchedule.scheduleEvents),\n modelTimeType: followUpScheduleEvent.then((followUpScheduleEvent) => followUpScheduleEvent?.timeType),\n modelFollowupEvent: followUpScheduleEvent.then(\n (followUpScheduleEvent) => followUpScheduleEvent?.actionEvent\n ),\n allTimeTypes,\n allEvents,\n followUpScheduleEvent,\n filteredTemplates\n };\n }\n\n /** @override */\n resetController(controller: AutomationScheduleBuilderFollowUpController): void {\n controller.selectedEvent = undefined;\n controller.selectedSpecificTime = undefined;\n controller.selectedTimeType = undefined;\n }\n}\n","import { tracked } from '@glimmer/tracking';\nimport EmberController from '@ember/controller';\nimport { action, computed, get } from '@ember/object';\nimport { alias, gt, reads } from '@ember/object/computed';\nimport { inject as service } from '@ember/service';\nimport { isEmpty, isPresent } from '@ember/utils';\nimport {\n SUNDAY_INT,\n MONDAY_INT,\n TUESDAY_INT,\n WEDNESDAY_INT,\n THURSDAY_INT,\n FRIDAY_INT,\n SATURDAY_INT\n} from 'customer-site/utils/datetime';\nimport IconData from 'customer-site/utils/transforms-objects/icon-data';\nimport { intlPath } from '@adc/i18n/path';\nimport format from 'date-fns/format';\nimport {\n EmberScheduleBuilderTime,\n EmberScheduleBuilderAction,\n EmberScheduleBuilderFollowUp,\n EmberAutomationSchedules\n} from '../../../../enums/CustomerPageUrl';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { AsyncHasMany } from '@ember-data/model';\nimport type { Registry as ServiceRegistry } from '@ember/service';\nimport type Device from 'customer-site/models/automation/rules-builder/device';\nimport type ExtraDeviceOption from 'customer-site/models/automation/rules-builder/extra-device-option';\nimport type ScheduleBuilder from 'customer-site/models/automation/schedule-builder/schedule-builder';\nimport type ScheduleEvent from 'customer-site/models/automation/schedule-builder/schedule-event';\nimport type ScheduleTemplate from 'customer-site/models/automation/schedule-builder/template';\nimport type { ModelFrom, ResolvedModelFrom } from 'customer-site/utils/type-utils';\nimport type AutomationSchedulesBuilderRoute from '../route';\n\ninterface FeatureSummaryInput {\n icon: IconData | undefined;\n description: string | undefined;\n subDescription: string | undefined;\n extraDescription: string | undefined;\n}\nconst SCHEDULE_NAME_MAX_LENGTH = 50;\n\n@intlPath({ path: 'automation/schedules/builder/index' })\nexport default class SchedulesBuilderController extends EmberController {\n @service declare intl: ADCIntlService;\n @service declare contextManager: ServiceRegistry['context-manager'];\n @service declare navigation: ServiceRegistry['navigation'];\n @service declare store: ServiceRegistry['store'];\n @service declare notificationManager: ServiceRegistry['notification-manager'];\n @service declare modals: ServiceRegistry['modals'];\n\n declare model: ModelFrom;\n\n @reads('contextManager.identityModel.timezone')\n declare timezone: string;\n\n @alias('contextManager.identityModel.isMobileApp')\n declare isMobileApp: boolean;\n\n @tracked resolvedModel?: Pick, 'schedule' | 'templates'>;\n\n scheduleNameMaxLength = SCHEDULE_NAME_MAX_LENGTH;\n\n @reads('resolvedModel.templates')\n declare templates: ScheduleTemplate[];\n\n @alias('resolvedModel.schedule')\n declare schedule: ScheduleBuilder;\n\n @alias('resolvedModel.schedule.selectedDays')\n declare selectedDays: number[];\n\n @alias('resolvedModel.schedule.actionDevices')\n declare actionDevices: AsyncHasMany;\n\n @alias('resolvedModel.schedule.actionExtraDeviceOptions')\n declare actionExtraDeviceOptions: AsyncHasMany;\n\n @alias('resolvedModel.schedule.scheduleEvents')\n declare scheduleEvents: ScheduleEvent[];\n\n @computed('schedule.scheduleEvents.[]')\n get firstScheduleEvent(): ScheduleEvent | undefined {\n return this.schedule.scheduleEvents.toArray()[0];\n }\n\n @computed('schedule.scheduleEvents.[]')\n get followupEvents(): ScheduleEvent[] | undefined {\n return this.schedule.scheduleEvents.slice(1);\n }\n\n @computed('firstScheduleEvent', 'scheduledDays', 'schedule.occurrenceType.showSpecificDateComponent')\n get triggerData(): Promise {\n const { firstScheduleEvent, schedule } = this;\n const icon = new IconData({ icon: 'clock' });\n\n return (async () => {\n let timeDescription: string | undefined;\n let dateDescription: string | undefined;\n\n if (firstScheduleEvent?.specificTime) {\n timeDescription = this.localizeAndFormatTime(firstScheduleEvent.specificTime);\n } else if (firstScheduleEvent) {\n timeDescription = (await firstScheduleEvent.timeType).name;\n }\n\n const isSpecificDay = (await schedule.occurrenceType).showSpecificDateComponent;\n if (isSpecificDay && firstScheduleEvent?.specificTime) {\n dateDescription = this.localizeAndFormatDate(firstScheduleEvent.specificTime);\n }\n\n return {\n icon: icon,\n description: timeDescription,\n subDescription: isSpecificDay ? dateDescription : this.scheduledDays,\n extraDescription: undefined\n };\n })();\n }\n\n @computed('selectedDays')\n get scheduledDays(): string {\n const { intl, selectedDays } = this;\n\n if (selectedDays == null || selectedDays.length == 0) {\n return '';\n }\n\n const sortedDays = selectedDays.slice().sort().toString();\n\n const weekends = `${SUNDAY_INT},${SATURDAY_INT}`;\n const weekdays = `${MONDAY_INT},${TUESDAY_INT},${WEDNESDAY_INT},${THURSDAY_INT},${FRIDAY_INT}`;\n const everyday = `${SUNDAY_INT},${MONDAY_INT},${TUESDAY_INT},${WEDNESDAY_INT},${THURSDAY_INT},${FRIDAY_INT},${SATURDAY_INT}`;\n\n if (sortedDays === weekends) {\n return intl.tc(this, 'options.weekend');\n } else if (sortedDays === weekdays) {\n return intl.tc(this, 'options.weekdays');\n } else if (sortedDays === everyday) {\n return intl.tc(this, 'options.everyday');\n }\n return selectedDays.map((num) => intl.tc(this, `day${num}`)).join(', ');\n }\n\n @computed(\n 'schedule.{actionType,extraData}',\n 'actionDevices',\n 'actionExtraDeviceOptions',\n 'firstScheduleEvent.actionEvent.{icon,description}'\n )\n get actionData(): Promise {\n const { actionDevices, actionExtraDeviceOptions, firstScheduleEvent } = this;\n return (async () => {\n const actionEvent = await firstScheduleEvent!.actionEvent;\n const actionDevicesArray = await actionDevices;\n let concatenatedDeviceNames = actionDevicesArray.map((d) => d.description).join(', ');\n const extraDeviceOptionNames = (await actionExtraDeviceOptions).map((ed) => ed.description).join(', ');\n concatenatedDeviceNames = concatenatedDeviceNames || extraDeviceOptionNames || '';\n const actionType = await this.schedule.actionType;\n const extraDescription = actionDevicesArray.length\n ? actionType?.extraData.description(this.schedule.extraData)\n : '';\n const icon = actionEvent.icon;\n const event = actionEvent.description;\n\n return {\n icon: icon,\n description: event,\n subDescription: concatenatedDeviceNames,\n extraDescription: extraDescription\n };\n })();\n }\n\n @computed('followupEvents.@each.{actionEvent,specificTime,timeType}')\n get followUpEventData(): Promise {\n const { followupEvents } = this;\n const returnData: FeatureSummaryInput[] = [];\n return (async () => {\n for (let i = 0; i < (followupEvents?.length ?? 0); i++) {\n const fu = followupEvents![i];\n let timeDescription: string | undefined;\n if (fu.specificTime) {\n timeDescription = this.localizeAndFormatTime(fu.specificTime);\n } else {\n timeDescription = (await fu.timeType).name;\n }\n\n const event = await fu.actionEvent;\n returnData.push({\n icon: event.icon,\n description: timeDescription,\n subDescription: event.description,\n extraDescription: undefined\n });\n }\n return returnData;\n })();\n }\n\n localizeAndFormatTime(scheduleTime: Date | undefined): string {\n let displayTime = '';\n if (scheduleTime) {\n try {\n const formattedTime = format(scheduleTime, 'hh:mm a');\n displayTime = this.intl.tc(this, 'at', { time: formattedTime });\n } catch (e) {\n displayTime = '';\n }\n }\n return displayTime;\n }\n\n localizeAndFormatDate(scheduleDate: Date | undefined): string {\n let displayDate = '';\n if (scheduleDate) {\n try {\n const formattedDate = format(scheduleDate, 'MM-dd-yyyy');\n displayDate = this.intl.tc(this, 'on', { date: formattedDate });\n } catch (e) {\n displayDate = '';\n }\n }\n return displayDate;\n }\n get defaultFollowUpIcon(): IconData {\n return new IconData({ icon: 'add' });\n }\n\n @computed(\n 'templates',\n 'schedule.{occurrenceType,actionType}',\n 'schedule.followupEvents.@each.{timeType,actionEvent}'\n )\n get possibleTemplates(): ScheduleTemplate[] {\n const { templates, schedule, firstScheduleEvent } = this,\n timeTypeId = firstScheduleEvent?.belongsTo('timeType').id(),\n occurrenceTypeId = schedule.belongsTo('occurrenceType').id(),\n actionTypeId = schedule.belongsTo('actionType').id(),\n actionEventId = firstScheduleEvent?.belongsTo('actionEvent').id();\n\n return templates\n .filter((template) => (timeTypeId ? template.belongsTo('timeType').id() == timeTypeId : template))\n .filter((template) =>\n occurrenceTypeId ? template.belongsTo('occurrenceType').id() == occurrenceTypeId : template\n )\n .filter((template) => (actionTypeId ? template.belongsTo('actionType').id() == actionTypeId : template))\n .filter((template) => (actionEventId ? template.belongsTo('actionEvent').id() == actionEventId : template));\n }\n\n @computed('possibleTemplates')\n get singleValidTemplate(): ScheduleTemplate | null {\n const { possibleTemplates } = this;\n if (possibleTemplates.length === 1) {\n return possibleTemplates[0];\n }\n\n return null;\n }\n\n @gt('singleValidTemplate.maxFollowUps', 0)\n declare showFollowUps: boolean;\n\n @computed('singleValidTemplate.maxFollowUps', 'schedule.scheduleEvents.length')\n get canCreateAdditionalFollowUps(): boolean {\n const { singleValidTemplate, schedule } = this;\n if (singleValidTemplate) {\n //We subtract 1 because the first element is the inital event\n return singleValidTemplate.maxFollowUps > schedule.scheduleEvents.length - 1;\n }\n return false;\n }\n\n @computed('singleValidTemplate.canUserCreate', 'actionDevices.length', 'actionExtraDeviceOptions.length')\n get isSavable() {\n const { actionDevices, actionExtraDeviceOptions, singleValidTemplate } = this;\n return (\n singleValidTemplate?.canUserCreate && (actionDevices?.length > 0 || actionExtraDeviceOptions?.length > 0)\n );\n }\n\n @action save(): void {\n const { notificationManager, schedule, contextManager, intl, modals, singleValidTemplate } = this,\n fnSave = async (ruleName: string): Promise => {\n try {\n await schedule.save();\n const saveMessage = intl.t('automation.rules.builder.index.saved', { ruleName: schedule.name });\n\n notificationManager.addSuccess(saveMessage);\n\n // Disable the back button so that a user can't go back through the Schedule Builder Editor after successfully\n // saving a schedule.\n // Returning to the previous page after a newly saved schedule will show the user a black /schedule/new page\n // Returning to the previous page after an edit will usually cause a \"Schedule cannot be found\" error as\n // the scheduleId could have been updated leading to a new URL.\n contextManager.clearVisitedRoutesStack();\n this.navigation.transitionToRouteId(EmberAutomationSchedules);\n } catch (ex) {\n const errors = ex?.errors?.errors;\n if (errors) {\n errors.forEach((err: { detail: string }[]) => notificationManager.addError(err[0]?.detail));\n } else {\n notificationManager.addError(\n intl.t('automation.rules.builder.index.errorSaving', { ruleName })\n );\n }\n }\n };\n\n if (isEmpty(schedule.name?.trim())) {\n modals.showRenameModal({\n title: intl.tc(this, 'title'),\n maxLength: 50,\n message: intl.tc(this, 'saveText'),\n output: {\n value: singleValidTemplate!.defaultName\n },\n rename: (name = singleValidTemplate!.defaultName) => {\n const v = name.trim();\n if (!isPresent(v)) {\n return false;\n }\n\n schedule.name = v;\n fnSave(v);\n return true;\n }\n });\n } else {\n fnSave(schedule.name?.trim());\n }\n }\n\n @action async reset(): Promise {\n const { store, schedule } = this;\n if (schedule.isNew) {\n this.rollbackScheduleAttributes(this.scheduleEvents);\n schedule.setProperties({\n name: null,\n actionType: undefined,\n actionDevices: [],\n actionExtraDeviceOptions: [],\n selectedDays: undefined,\n occurrenceType: undefined,\n scheduleEvents: [store.createRecord('automation/schedule-builder/schedule-event')]\n });\n } else {\n await schedule.reload();\n this.rollbackScheduleAttributes(this.scheduleEvents);\n }\n }\n\n rollbackScheduleAttributes = (scheduleEvents: ScheduleEvent[]): void => {\n scheduleEvents\n .filter((event) => get(event, 'isNew') || get(event, 'hasDirtyAttributes'))\n .forEach((event) => event.rollbackAttributes());\n };\n\n /**\n * The collection of route IDs for the various edit rule routes.\n *\n * @type {Object}\n */\n editRoutes = {\n trigger: EmberScheduleBuilderTime,\n action: EmberScheduleBuilderAction,\n followUps: EmberScheduleBuilderFollowUp\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 undefined: SchedulesBuilderController;\n }\n}\n","import AdcBaseRoute from 'customer-site/classes/base-route';\nimport { EmberScheduleBuilder } from '../../../../enums/CustomerPageUrl';\n\n/**\n * @classdesc\n * Schedule builder index route.\n *\n * @class automation.schedules.builder.index.AutomationSchedulesBuilderIndexRoute\n */\nexport default class AutomationSchedulesBuilderIndexRoute extends AdcBaseRoute {\n /** @override */\n routeId = EmberScheduleBuilder;\n}\n","import Controller from '@ember/controller';\n\nimport type { ModelFrom } from 'customer-site/utils/type-utils';\nimport type ParentRoute from '../route';\n\nexport default class AutomationSchedulesBuilderMobileNoSupportController extends Controller {\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 'automation/schedules/builder/mobile-no-support': AutomationSchedulesBuilderMobileNoSupportController;\n }\n}\n","import AdcBaseRoute from 'customer-site/classes/base-route';\nimport { EmberScheduleBuilderMobileNoSupport } from '../../../../enums/CustomerPageUrl';\n\nexport default class AutomationSchedulesBuilderMobileNoSupportRoute extends AdcBaseRoute {\n /** @override */\n routeId = EmberScheduleBuilderMobileNoSupport;\n}\n","import { service } from '@ember/service';\nimport AdcBaseRoute from 'customer-site/classes/base-route';\nimport { EmberScheduleBuilder } from '../../../enums/CustomerPageUrl';\n\nimport type { Registry } from '@ember/service';\nimport type RuleTemplate from 'customer-site/models/automation/rules-builder/template';\nimport type ScheduleBuilder from 'customer-site/models/automation/schedule-builder/schedule-builder';\nimport type ScheduleTemplate from 'customer-site/models/automation/schedule-builder/template';\n\nexport interface ScheduleBuilderModel {\n schedule: Promise;\n templates: ADCAsyncStoreFindAll;\n ruleTemplates: ADCAsyncStoreFindAll;\n}\n\nexport default class AutomationSchedulesBuilderRoute extends AdcBaseRoute {\n @service declare store: Registry['store'];\n\n /** @override */\n routeId = EmberScheduleBuilder;\n\n model(params: { id_schedule: string }): ScheduleBuilderModel {\n const { store } = this;\n\n let schedule: Promise;\n if (params.id_schedule == 'new') {\n schedule = Promise.resolve(\n store.createRecord('automation/schedule-builder/schedule-builder', {\n scheduleEvents: [store.createRecord('automation/schedule-builder/schedule-event')]\n })\n );\n } else {\n schedule = store.findRecord('automation/schedule-builder/schedule-builder', params.id_schedule);\n }\n\n return {\n schedule: schedule,\n templates: store.findAll('automation/schedule-builder/template'),\n ruleTemplates: this.store.findAll('automation/rules-builder/template')\n };\n }\n}\n","import { tracked } from '@glimmer/tracking';\nimport Controller from '@ember/controller';\nimport { action, computed } from '@ember/object';\nimport { alias, mapBy, max, reads } from '@ember/object/computed';\nimport { service } from '@ember/service';\nimport { EmberScheduleBuilder } from 'customer-site/enums/CustomerPageUrl';\nimport {\n SUNDAY_INT,\n MONDAY_INT,\n TUESDAY_INT,\n WEDNESDAY_INT,\n THURSDAY_INT,\n FRIDAY_INT,\n SATURDAY_INT\n} from 'customer-site/utils/datetime';\nimport { intlPath } from '@adc/i18n/path';\nimport { BinaryListItem } from '@adc/ui-components/components/simple-binary/list';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { AsyncBelongsTo } from '@ember-data/model';\nimport type { Registry } from '@ember/service';\nimport type OccurrenceType from 'customer-site/models/automation/schedule-builder/occurrence-type';\nimport type ScheduleBuilder from 'customer-site/models/automation/schedule-builder/schedule-builder';\nimport type ScheduleEvent from 'customer-site/models/automation/schedule-builder/schedule-event';\nimport type TimeType from 'customer-site/models/automation/schedule-builder/time-type';\nimport type { ModelFrom, ResolvedModelFrom } from 'customer-site/utils/type-utils';\nimport type AutomationSchedulesBuilderTimeRoute from './route';\n\ninterface TimeSelectionInterface {\n timeType: TimeType;\n}\n\ninterface OccurrenceButtonInterface {\n occurrenceType: OccurrenceType;\n}\n\ninterface OccurrenceSpecificDaysValues {\n selectedDays?: number[];\n}\n\n@intlPath({ path: 'automation/schedules/builder/time' })\nexport default class AutomationScheduleBuilderTimeController extends Controller {\n declare model: ModelFrom;\n @tracked declare resolvedModel: ResolvedModelFrom;\n\n @service declare intl: ADCIntlService;\n @service declare store: Registry['store'];\n @service declare navigation: Registry['navigation'];\n\n @action dataLoaded(resolvedModel: ResolvedModelFrom): void {\n this.resolvedModel = resolvedModel;\n\n //Check if anything needs to be prepopulated\n if (resolvedModel.filteredOccurrenceTypeIds.length == 1) {\n const selectedId = resolvedModel.filteredOccurrenceTypeIds[0];\n this.selectedOccurrenceType = resolvedModel.allOccurrenceTypes.find(\n (occurrenceType) => occurrenceType.id == selectedId\n );\n }\n if (resolvedModel.filteredTimeTypesIds.length == 1) {\n const selectedId = resolvedModel.filteredTimeTypesIds[0];\n this.selectedTimeType = resolvedModel.allTimeTypes.find((timeType) => timeType.id == selectedId);\n }\n }\n\n @alias('resolvedModel.schedule')\n declare schedule: ScheduleBuilder;\n\n @computed('schedule.scheduleEvents.[]')\n get scheduleEvent(): ScheduleEvent | undefined {\n return this.schedule.scheduleEvents.objectAt(0);\n }\n\n // Time Selection\n @tracked selectedTimeType?: TimeType;\n @alias('resolvedModel.modelTimeType')\n declare modelTimeType: TimeType | undefined;\n @computed('modelTimeType', 'selectedTimeType')\n get currentTimeType(): TimeType | undefined {\n const { modelTimeType, selectedTimeType } = this;\n return selectedTimeType ?? modelTimeType ?? undefined;\n }\n\n // Time Specific Time\n @tracked declare selectedSpecificTime: Date | undefined;\n @alias('scheduleEvent.specificTime')\n declare modelSpecificTime: Date | undefined;\n @computed('modelSpecificTime', 'selectedSpecificTime')\n get currentSpecificTime() {\n const { modelSpecificTime, selectedSpecificTime } = this,\n defaultDate = new Date();\n defaultDate.setHours(defaultDate.getHours() + 1);\n defaultDate.setMinutes(Math.round(defaultDate.getMinutes() / 10) * 10);\n return selectedSpecificTime ?? modelSpecificTime ?? defaultDate;\n }\n\n // Occurrence\n @tracked declare selectedOccurrenceType?: OccurrenceType;\n @alias('resolvedModel.modelOccurrenceType')\n declare modelOccurrenceType: OccurrenceType | undefined;\n @computed('modelOccurrenceType', 'selectedOccurrenceType')\n get currentOccurrenceType(): OccurrenceType | undefined {\n const { modelOccurrenceType, selectedOccurrenceType } = this;\n return selectedOccurrenceType ?? modelOccurrenceType ?? undefined;\n }\n\n get getMaxDate(): Date {\n const defaultDate = new Date();\n return new Date(defaultDate.setFullYear(defaultDate.getFullYear() + 1));\n }\n get getMinDate(): Date {\n const defaultDate = new Date();\n return new Date(defaultDate.setMinutes(defaultDate.getMinutes() + 10));\n }\n\n @tracked declare selectedSpecificDays?: number[];\n @alias('schedule.selectedDays')\n declare modelSpecificDays?: number[];\n @computed('modelSpecificDays', 'selectedSpecificDays')\n get currentSpecificDays() {\n const { modelSpecificDays, selectedSpecificDays } = this;\n return (\n selectedSpecificDays ??\n modelSpecificDays ?? [\n SUNDAY_INT,\n MONDAY_INT,\n TUESDAY_INT,\n WEDNESDAY_INT,\n THURSDAY_INT,\n FRIDAY_INT,\n SATURDAY_INT\n ]\n );\n }\n\n @computed('currentOccurrenceType.showSpecificDaysComponent', 'currentSpecificDays.length')\n get isCurrentSpecificDaysValid(): boolean {\n return this.currentSpecificDays.length != 0;\n }\n\n // What to show\n @mapBy('resolvedModel.filteredTemplates', 'minuteInterval')\n declare allMinuteInvervals: number[];\n @max('allMinuteInvervals')\n declare minuteInterval: number;\n\n @reads('currentTimeType.showSpecificTimeComponent')\n declare showSpecificTimeOption: boolean;\n @reads('currentOccurrenceType.showSpecificDaysComponent')\n declare showSpecificDays: boolean;\n @reads('currentOccurrenceType.showSpecificDateComponent')\n declare showSpecificDateOption: boolean;\n\n @computed('resolvedModel.{allTimeTypes,filteredTemplates}', 'currentTimeType', 'currentOccurrenceType')\n get timeItems(): BinaryListItem[] {\n const { allTimeTypes, filteredTemplates } = this.resolvedModel,\n { currentTimeType, currentOccurrenceType } = this;\n\n const enabledTimeTypeIds = filteredTemplates\n .filter((template) =>\n currentOccurrenceType\n ? template.belongsTo('occurrenceType').id() == currentOccurrenceType?.id\n : template\n )\n .flatMap((template) => template.belongsTo('timeType').id())\n .uniq();\n\n return allTimeTypes.map(\n (timeType) =>\n new BinaryListItem({\n label: timeType.name,\n icon: timeType.icon.icon,\n state: timeType.id == currentTimeType?.id,\n disabled: !enabledTimeTypeIds.includes(timeType.id),\n props: { timeType }\n })\n );\n }\n\n @computed('resolvedModel.{allOccurrenceTypes,filteredTemplates}', 'currentOccurrenceType', 'currentTimeType')\n get occurrenceItems(): BinaryListItem[] {\n const { allOccurrenceTypes, filteredTemplates } = this.resolvedModel,\n { currentOccurrenceType, currentTimeType } = this;\n\n const enabledOccurenceTypeIds = filteredTemplates\n .filter((template) =>\n currentTimeType ? template.belongsTo('timeType').id() == currentTimeType?.id : template\n )\n .flatMap((template) => template.belongsTo('occurrenceType').id())\n .uniq();\n\n return allOccurrenceTypes.map(\n (occurrenceType) =>\n new BinaryListItem({\n label: occurrenceType.name,\n icon: occurrenceType.icon.icon,\n state: occurrenceType.id == currentOccurrenceType?.id,\n disabled: !enabledOccurenceTypeIds.includes(occurrenceType.id),\n props: { occurrenceType }\n })\n );\n }\n\n @action updateTimeSelection(items: BinaryListItem[]): void {\n const selectedTimeItem = items.find(({ state }) => state === true);\n this.selectedTimeType = selectedTimeItem?.props.timeType;\n }\n\n /**\n * Updates the hour/minute of the execution time.\n * Since the user may have already choosen a date to execute, we need to make sure to perverse the date after saving.\n * That's why we call setFullYear before saving the new hour/minute.\n * @param updateSpecificTime - The hour/minute to update to\n */\n @action updateTimeSpecificTime(updateSpecificTime: Date): void {\n if (this.currentSpecificTime) {\n updateSpecificTime.setFullYear(\n this.currentSpecificTime.getFullYear(),\n this.currentSpecificTime.getMonth(),\n this.currentSpecificTime.getDate()\n );\n }\n this.selectedSpecificTime = updateSpecificTime;\n }\n\n /**\n * Updates the day/month/year of the execution time.\n * Need to perserve the hour/minute even through day lights saving.\n * For example, if the user selects a specificTime first for 8AM on 1/1/25 and\n * then selects a specific date for 8/1/25. We need to have the time segment\n * stay as 8AM and not update to 9AM for the time change\n * @param updateSpecificDate - The day/month/year to update to\n */\n @action updateTimeSpecificDate(updateSpecificDate: Date): void {\n if (this.currentSpecificTime) {\n updateSpecificDate.setHours(this.currentSpecificTime.getHours(), this.currentSpecificTime.getMinutes());\n }\n this.selectedSpecificTime = updateSpecificDate;\n }\n\n @action updateOccurrence(items: BinaryListItem[]): void {\n const selectedOccurrenceItem = items.find(({ state }) => state === true);\n if (!selectedOccurrenceItem?.props.occurrenceType.showSpecificDaysComponent) {\n this.updateOccurrenceSpecificDays({\n selectedDays: [\n SUNDAY_INT,\n MONDAY_INT,\n TUESDAY_INT,\n WEDNESDAY_INT,\n THURSDAY_INT,\n FRIDAY_INT,\n SATURDAY_INT\n ]\n });\n }\n this.selectedOccurrenceType = selectedOccurrenceItem?.props.occurrenceType;\n }\n\n @action updateOccurrenceSpecificDays({ selectedDays }: OccurrenceSpecificDaysValues): void {\n this.selectedSpecificDays = selectedDays;\n }\n\n @computed('currentTimeType', 'currentOccurrenceType', 'isCurrentSpecificDaysValid')\n get confirmButtonDisabled() {\n const { currentTimeType, currentOccurrenceType } = this;\n return (\n (currentTimeType?.isEmpty ?? true) ||\n (currentOccurrenceType?.isEmpty ?? true) ||\n !this.isCurrentSpecificDaysValid\n );\n }\n\n @action saveDataToModel() {\n const {\n navigation,\n schedule,\n currentTimeType,\n showSpecificTimeOption,\n currentSpecificTime,\n showSpecificDateOption,\n currentOccurrenceType,\n currentSpecificDays,\n scheduleEvent\n } = this;\n\n // Time\n scheduleEvent!.timeType = currentTimeType as unknown as AsyncBelongsTo;\n scheduleEvent!.specificTime = undefined;\n\n if (showSpecificTimeOption || showSpecificDateOption) {\n scheduleEvent!.specificTime = currentSpecificTime;\n }\n\n // Occurrence\n schedule.occurrenceType = currentOccurrenceType as unknown as AsyncBelongsTo;\n schedule.selectedDays = currentSpecificDays;\n\n // Transition to Summary Page\n return navigation.transitionToRouteId(EmberScheduleBuilder);\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 'automation/schedules/builder/time': AutomationScheduleBuilderTimeController;\n }\n}\n","import AdcBaseRoute from 'customer-site/classes/base-route';\nimport { EmberScheduleBuilderTime } from '../../../../enums/CustomerPageUrl';\n\nimport type OccurrenceType from 'customer-site/models/automation/schedule-builder/occurrence-type';\nimport type ScheduleBuilder from 'customer-site/models/automation/schedule-builder/schedule-builder';\nimport type ScheduleTemplate from 'customer-site/models/automation/schedule-builder/template';\nimport type TimeType from 'customer-site/models/automation/schedule-builder/time-type';\nimport type { ScheduleBuilderModel } from '../route';\nimport type AutomationScheduleBuilderTimeController from './controller';\n\ninterface SchedulesBuilderTimeModel {\n schedule: Promise;\n modelTimeType: Promise;\n modelOccurrenceType: Promise;\n allTimeTypes: Promise;\n filteredTimeTypesIds: Promise;\n allOccurrenceTypes: Promise;\n filteredOccurrenceTypeIds: Promise;\n filteredTemplates: Promise;\n}\n\n/**\n * @classdesc\n * Schedule builder time route.\n *\n * @class automation.schedules.builder.action.AutomationSchedulesBuilderTimeRoute\n */\nexport default class AutomationSchedulesBuilderTimeRoute extends AdcBaseRoute {\n /** @override */\n routeId = EmberScheduleBuilderTime;\n\n model(): SchedulesBuilderTimeModel {\n const { templates, schedule } = this.modelFor('automation.schedules.builder');\n\n const filteredTemplates = schedule.then((resolvedSchedule) => {\n const scheduleActionType = resolvedSchedule.belongsTo('actionType').id(),\n allEvents = resolvedSchedule.scheduleEvents.toArray();\n let firstEventId: string | undefined = undefined,\n followUpEventId: string | undefined = undefined,\n followUpTimeTypeId: string | undefined = undefined;\n\n if (allEvents.length >= 1) {\n firstEventId = allEvents[0].belongsTo('actionEvent').id();\n }\n if (allEvents.length >= 2) {\n followUpTimeTypeId = allEvents[1].belongsTo('timeType').id();\n followUpEventId = allEvents[1].belongsTo('actionEvent').id();\n }\n\n return templates.then((resolvedTemplates) =>\n resolvedTemplates\n .filter((template) => {\n const templateActionType = template.belongsTo('actionType').id();\n return scheduleActionType == undefined || scheduleActionType == templateActionType;\n })\n //Filter Event\n .filter((template) =>\n firstEventId ? template.belongsTo('actionEvent').id() == firstEventId : true\n )\n //Filter for followups\n .filter((template) => {\n if (followUpTimeTypeId == undefined || followUpEventId == undefined) {\n return true;\n }\n return template.followUpOptions.any((followUpOption) => {\n const selectedEventId = followUpOption.belongsTo('selectedEvent').id(),\n availableEventIds = followUpOption.hasMany('availableEvents').ids(),\n availableTimeTypes = followUpOption.hasMany('availableTimeTypes').ids();\n\n return (\n selectedEventId == firstEventId &&\n availableEventIds.includes(followUpEventId!) &&\n availableTimeTypes.includes(followUpTimeTypeId!)\n );\n });\n })\n );\n });\n\n const allTimeTypes = templates.then((resolvedFilteredTemplates) =>\n Promise.all(resolvedFilteredTemplates.map(({ timeType }) => timeType).toArray()).then(\n (resolvedTimeTypeArray) => resolvedTimeTypeArray.uniqBy('id')\n )\n ),\n filteredTimeTypesIds = filteredTemplates.then((resolvedFilteredTempaltes) =>\n resolvedFilteredTempaltes.map((resolvedFilteredTemplate) =>\n resolvedFilteredTemplate.belongsTo('timeType').id()\n )\n );\n\n const allOccurrenceTypes = templates.then((resolvedFilteredTemplates) =>\n Promise.all(resolvedFilteredTemplates.map(({ occurrenceType }) => occurrenceType).toArray()).then(\n (resolvedOccurrenceTypeArrays) => resolvedOccurrenceTypeArrays.uniqBy('id')\n )\n ),\n filteredOccurrenceTypeIds = filteredTemplates.then((resolvedFilteredTempaltes) =>\n resolvedFilteredTempaltes.map((resolvedFilteredTemplate) =>\n resolvedFilteredTemplate.belongsTo('occurrenceType').id()\n )\n );\n\n return {\n schedule,\n modelTimeType: schedule.then((resolvedSchedule) => resolvedSchedule.scheduleEvents.objectAt(0)!.timeType),\n modelOccurrenceType: schedule.then((resolvedSchedule) => resolvedSchedule.occurrenceType),\n allTimeTypes,\n filteredTimeTypesIds,\n allOccurrenceTypes,\n filteredOccurrenceTypeIds,\n filteredTemplates\n };\n }\n\n /** @override */\n resetController(controller: AutomationScheduleBuilderTimeController): void {\n controller.selectedOccurrenceType = undefined;\n controller.selectedSpecificDays = undefined;\n controller.selectedSpecificTime = undefined;\n controller.selectedTimeType = undefined;\n }\n}\n","import { getObjProperties } from '@adc/ember-utils/utils/ember-helpers';\nimport { computed, get, action } from '@ember/object';\nimport { and, reads } from '@ember/object/computed';\nimport { inject as service } from '@ember/service';\nimport { isPresent } from '@ember/utils';\nimport DropdownActionItem from '@adc/ui-components/utils/dropdown-action-item';\nimport {\n ScheduleRuleEdit,\n VideoAddSvrRecordingSchedule,\n AccessControlScheduleEdit,\n EmberVideoSdCardSchedule,\n EmberEditWifiSchedules,\n EmberScheduleBuilder as EmberScheduleBuilderPageUrl\n} from '../../../enums/CustomerPageUrl';\nimport {\n LightSchedule,\n ShadeSchedule,\n VideoSchedule,\n AccessControlLockUnlockSchedule,\n WifiSchedule,\n EmberScheduleBuilder\n} from '../../../enums/RuleDisplayType';\nimport { Light, Shade, Video, AccessControlDoor, Router } from '../../../enums/WebDeviceType';\nimport { videoScheduleTransitionFunction } from '../../../utils/video/general';\nimport BaseAutomationController from '../../base-automation-controller';\n\n/**\n * Links to create schedule routes.\n *\n * @type {Array|function|Array>}\n *\n * @private\n * @memberof automation.schedules.index.IndexController\n */\nconst newScheduleItems = [\n ['builder', EmberScheduleBuilder, Light, [EmberScheduleBuilderPageUrl], null, null, 'new'],\n ['light', LightSchedule, Light, [ScheduleRuleEdit]],\n ['shade', ShadeSchedule, Shade, [ScheduleRuleEdit], null, null, { queryParams: { scheduleGroup: 4 } }],\n [\n 'video',\n VideoSchedule,\n Video,\n [VideoAddSvrRecordingSchedule, EmberVideoSdCardSchedule],\n videoScheduleTransitionFunction,\n ['contextManager', 'modals', 'model.svrs', 'model.sdCardCameras', 'model.videoScheduleSuggestions']\n ],\n ['lockUnlock', AccessControlLockUnlockSchedule, AccessControlDoor, [AccessControlScheduleEdit]],\n ['wifi', WifiSchedule, Router, [EmberEditWifiSchedules], null, null, 'new']\n];\n\n/**\n * @classdesc\n * Automation schedules index route controller.\n */\nexport default class SchedulesIndexController extends BaseAutomationController {\n @service contextManager;\n @service modals;\n @service intl;\n @service navigation;\n\n @and('canCreateEmberSchedules', 'contextManager.identityModel.isMobileApp')\n useNativeAddButton;\n\n /**\n * If the user has camera arming access\n */\n @reads('model.permissions.hasCameraArmingAccess')\n hasCameraArmingAccess;\n\n /**\n * Return true when the customer is able to create rules through ember schedule builder.\n *\n * @returns {Promise}\n */\n @computed('model.permissions.allowedRuleDisplays')\n get canCreateEmberSchedules() {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-get\n const allowedRules = get(this, 'model.permissions.allowedRuleDisplays') ?? [];\n return allowedRules.includes(EmberScheduleBuilder);\n }\n\n /**\n * Create a new schedule via the Ember Schedule Builder.\n */\n @action createNewSchedule() {\n this.navigation.transitionToRouteId(EmberScheduleBuilderPageUrl, 'new');\n }\n\n /** @override */\n @computed(\n 'deviceType',\n 'model.{permissions.allowedRuleDisplays,svrs.isFulfilled,sdCardCameras.isFulfilled,videoScheduleSuggestions.isFulfilled}'\n )\n get newAutomationItems() {\n const { navigation, contextManager, deviceType = -1 } = this,\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-get\n allowedSchedules = get(this, 'model.permissions.allowedRuleDisplays') ?? [];\n\n // Iterate possible schedule routes.\n return newScheduleItems.reduce(\n (\n schedules,\n [key, displayType, scheduleDeviceType, routeIds, transitionFn, transitionFnArgs, queryParams]\n ) => {\n // Is there a specified device type AND does this schedule type NOT support it?\n if (deviceType > -1 && scheduleDeviceType !== deviceType) {\n // Don't need this type.\n return schedules;\n }\n\n // Is this display type allowed?\n if (allowedSchedules.includes(displayType)) {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line @adc/ember/no-context-manager-get-route\n const routes = routeIds.filter((routeId) => contextManager.getRouteItem(routeId));\n\n // Does the user have access to any of the new schedule routes?\n if (isPresent(routes)) {\n // We transition to the first route ID by default if there's no transition function defined\n const args = getObjProperties(this, ...(transitionFnArgs || [])),\n itemFn = transitionFn\n ? transitionFn.call(this, routes, ...args)\n : () => navigation.transitionToRouteId(routes[0], queryParams);\n\n // You are allowed to created the schedule, but if there's no transition route, we have to disable it.\n schedules.push(\n DropdownActionItem.create({\n name: this.intl.tc(this, `new.${key}`),\n disabled: !itemFn,\n action: itemFn\n })\n );\n }\n }\n\n return schedules;\n },\n []\n );\n }\n}\n","import { inject as service } from '@ember/service';\nimport { isFullTransition } from '../../../utils/ember';\nimport {\n EmberAutomationSchedules,\n EmberLightsSchedules,\n EmberShadesSchedules,\n EmberVideoSchedules\n} from '../../../enums/CustomerPageUrl';\nimport { VideoSchedule } from '../../../enums/RuleDisplayType';\nimport { Light, Shade, Video } from '../../../enums/WebDeviceType';\nimport BaseAutomationRoute from '../../base-automation-route';\n\nconst DEVICE_TYPE_MAP = {\n [Light]: EmberLightsSchedules,\n [Shade]: EmberShadesSchedules,\n [Video]: EmberVideoSchedules\n};\n\n/**\n * @classdesc\n * Automation schedules index route.\n */\nexport default class SchedulesIndexRoute extends BaseAutomationRoute {\n @service store;\n\n /** @override */\n beforeModel() {\n // Update route ID for device type (if any).\n const { deviceType } = this.paramsFor(this.routeName);\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/classic-decorator-no-classic-methods\n this.set('routeId', DEVICE_TYPE_MAP[deviceType] || EmberAutomationSchedules);\n\n return super.beforeModel(...arguments);\n }\n\n /** @override */\n get itemModelPath() {\n return 'automation/schedules/schedule';\n }\n\n /** @override */\n model(params, transition) {\n const { store } = this,\n { svrs, sdCardCameras, videoScheduleSuggestions } = !isFullTransition(transition)\n ? this.currentModel ?? {}\n : {};\n\n return {\n ...super.model(params, transition),\n svrs: svrs ?? store.findAll('video/devices/svr'),\n sdCardCameras: sdCardCameras ?? store.findAll('video/devices/sd-card-camera'),\n videoScheduleSuggestions:\n videoScheduleSuggestions ??\n store.query('automation/rules/ruleSuggestion', {\n type: VideoSchedule\n })\n };\n }\n}\n","import { tracked } from '@glimmer/tracking';\nimport Controller from '@ember/controller';\nimport { action } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { EmberAutomationSchedules } from 'customer-site/enums/CustomerPageUrl';\nimport DropdownSelectItem from '@adc/ui-components/utils/dropdown-select-item';\n\nimport type { SchedulePickerSignature } from '@adc/ui-components/components/schedule-picker';\nimport type { Registry as ServiceRegistry } from '@ember/service';\nimport type { ModelFrom, ResolvedModelFrom } from 'customer-site/utils/type-utils';\nimport type EmberEditWifiSchedulesRoute from './route';\n\ntype ResolvedModel = ResolvedModelFrom;\n\n/**\n * Controller for interacting with the Wifi schedule edit form.\n */\nexport default class EditSchedulesController extends Controller {\n @service declare modals: ServiceRegistry['modals'];\n @service declare router: ServiceRegistry['router'];\n @service declare navigation: ServiceRegistry['navigation'];\n @service declare intl: ServiceRegistry['adc-intl'];\n @service declare contextManager: ServiceRegistry['context-manager'];\n @service declare identityManager: ServiceRegistry['identity-manager'];\n\n declare model: ModelFrom;\n @tracked resolvedModel?: Pick & {\n new: ResolvedModel['isNew'];\n };\n\n // Generate a list of options for the profile dropdown\n get dropdownOptions(): DropdownSelectItem[] {\n const { profiles } = this.resolvedModel ?? {};\n if (!profiles) {\n return [];\n }\n\n return profiles\n .filter((p) => p.isManagedProfile !== true)\n .map(({ id, name }) => DropdownSelectItem.create({ name, value: id }));\n }\n\n get canSaveSchedule(): boolean {\n const { daysActive, name, startTime, endTime } = this.resolvedModel?.schedule ?? {};\n return !!(\n daysActive?.length &&\n name?.length &&\n startTime &&\n endTime &&\n !this.identityManager.isLoginAsLoginRep\n );\n }\n\n @action\n changeProfile(newProfile: string): void {\n const model = this.resolvedModel;\n if (model?.schedule) {\n model.schedule.set(\n 'profile',\n model.profiles.find((item) => item.id === newProfile)\n );\n }\n }\n\n // Update the days in the weekly schedule\n @action\n updateWeeklySchedule({ selectedDays }: Parameters[0]): void {\n const schedule = this.resolvedModel?.schedule;\n if (schedule) {\n schedule.daysActive = selectedDays ?? [];\n }\n }\n\n // Open the delete modal\n @action\n openDeleteModal(): void {\n if (!this.resolvedModel?.schedule.isNew) {\n this.modals.showDeleteModal({\n message: this.intl.tc(this, 'wifiDeleteMessage'),\n delete: () => this.deleteSchedule(),\n title: this.intl.tc(this, 'wifiDeleteText')\n });\n }\n }\n\n // Save the Wifi schedule\n @action\n async saveWifiSchedule(buttonAnimation: Promise): Promise {\n const model = this.resolvedModel;\n if (model?.schedule) {\n const profile = await model.schedule.profile;\n if (!profile?.id) {\n model.schedule.set('profile', model.profiles.filter((p) => p.isManagedProfile !== true)[0]);\n }\n await model.schedule.save();\n buttonAnimation.then(() => this.transitionBack());\n }\n }\n\n // Delete the schedule\n @action\n async deleteSchedule(): Promise {\n await this.resolvedModel?.schedule.destroyRecord();\n this.transitionBack();\n }\n\n // Transition back to the previous route\n @action\n transitionBack(): void {\n this.contextManager.transitionToPreviousRoute(EmberAutomationSchedules);\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 'automation/schedules/edit/wifi': EditSchedulesController;\n }\n}\n","import { inject as service } from '@ember/service';\nimport AdcBaseRoute from '../../../classes/base-route';\nimport { EmberEditWifiSchedules } from '../../../enums/CustomerPageUrl';\n\nimport type Store from '@ember-data/store';\nimport type WifiDetailedSchedule from 'customer-site/models/automation/schedules/wifi-detailed-schedule';\nimport type DeviceProfile from 'customer-site/models/wifi/device-profile';\n\n/**\n * Displays a list of configured schedules.\n */\nexport default class EmberEditWifiSchedulesRoute extends AdcBaseRoute {\n @service declare store: Store;\n\n routeId = EmberEditWifiSchedules;\n\n isMediumWidthPage = true;\n\n model(params: { id_schedule: string }): {\n profiles: ADCAsyncStoreFindAll;\n schedule: ADCAsyncStoreFindRecord | WifiDetailedSchedule;\n isNew: boolean;\n } {\n const profiles = this.store.findAll('wifi/device-profile');\n\n params.id_schedule = params.id_schedule ?? 'new';\n\n if (params.id_schedule === 'new') {\n return {\n schedule: this.store.createRecord('automation/schedules/wifi-detailed-schedule', {\n isActive: true\n }),\n isNew: true,\n profiles\n };\n }\n\n return {\n schedule: this.store.findRecord('automation/schedules/wifi-detailed-schedule', params.id_schedule),\n profiles,\n isNew: false\n };\n }\n}\n","import Controller from '@ember/controller';\n\nimport type { ModelFrom } from 'customer-site/utils/type-utils';\nimport type ParentRoute from '../route';\n\n/**\n * @classdesc\n * Edit page for goodnight smart arming rules\n */\nexport default class SmartArmingNightEdit extends Controller {\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 'automation/smart-arming/arm-edit': SmartArmingNightEdit;\n }\n}\n","import AdcBaseRoute from 'customer-site/classes/base-route';\nimport { EmberSmartArmingArmEdit } from 'customer-site/enums/CustomerPageUrl';\n\n/**\n * @classdesc\n *\n * Edit the configuration for the arm stay Smart Arming rule\n */\nexport default class Route extends AdcBaseRoute {\n /** @override */\n routeId = EmberSmartArmingArmEdit;\n}\n","import Controller from '@ember/controller';\n\nimport type { ModelFrom } from 'customer-site/utils/type-utils';\nimport type Route from './route';\n\n/**\n * Controller to define queryParams for Smart Arming routes\n */\nexport default class SmartArmingController extends Controller {\n declare model: ModelFrom;\n\n queryParams = ['nav'];\n\n nav?: string;\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 'automation/smart-arming': SmartArmingController;\n }\n}\n","import Controller from '@ember/controller';\n\nimport type { ModelFrom } from 'customer-site/utils/type-utils';\nimport type ParentRoute from '../route';\n\n/**\n * @classdesc\n * Edit page for wake up smart arming rules\n */\nexport default class SmartArmingMorningEdit extends Controller {\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 'automation/smart-arming/disarm-edit': SmartArmingMorningEdit;\n }\n}\n","import AdcBaseRoute from 'customer-site/classes/base-route';\nimport { EmberSmartArmingDisarmEdit } from 'customer-site/enums/CustomerPageUrl';\n\n/**\n * @classdesc\n *\n * Edit the configuration for the disarm Smart Arming rule\n */\nexport default class Route extends AdcBaseRoute {\n /** @override */\n routeId = EmberSmartArmingDisarmEdit;\n}\n","import Controller from '@ember/controller';\nimport { computed, action } from '@ember/object';\n\nimport type SmartArming from '@adc/common-models/models/automation/rules/smart-arming';\nimport type ParentRoute from 'customer-site/automation/smart-arming/route';\nimport type { ModelFrom } from 'customer-site/utils/type-utils';\n\n/**\n * @classdesc\n * Landing page for Smart Arming config\n */\nexport default class SmartArmingIndexController extends Controller {\n declare model: ModelFrom;\n\n /**\n * Build the list of Smart Arming Rules\n */\n @computed('model.{disarmRule,armRule}')\n get smartArmingRules(): Promise {\n // @todo This should be `return Promise.all([this.model.disarmRule, this.model.armRule])`;\n return (async () => {\n return [await this.model.disarmRule, await this.model.armRule];\n })();\n }\n\n /**\n * Enable the given Smart Arming rule\n */\n @action\n toggleEnabled(rule: SmartArming): void {\n rule.isEnabled = !rule.isEnabled;\n rule.save();\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 'automation/smart-arming/index': SmartArmingIndexController;\n }\n}\n","import { set } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport AdcBaseRoute from 'customer-site/classes/base-route';\nimport { EmberPartitionsSmartArming, EmberSmartArming } from 'customer-site/enums/CustomerPageUrl';\nimport { getQueryParam } from '@adc/app-infrastructure/routes/base-route';\n\nimport type SmartArming from '@adc/common-models/models/automation/rules/smart-arming';\nimport type Store from '@ember-data/store';\nimport type Transition from '@ember/routing/transition';\nimport type Sensor from 'customer-site/models/devices/sensor';\nimport type SmartArmingController from './controller';\n\ninterface SmartArmingModel {\n disarmRule: ADCAsyncStoreFindRecord;\n armRule: ADCAsyncStoreFindRecord;\n sensors: ADCAsyncStoreFindAll;\n}\n\nexport const queryParamConfig = {\n deviceType: getQueryParam('string')\n};\n\n/**\n * @classdesc\n *\n * Landing page for Smart Arming Schedules\n */\nexport default class SmartArmingRoute extends AdcBaseRoute {\n @service declare store: Store;\n\n /** @override */\n routeId = EmberSmartArming;\n\n /** @override */\n queryParams = queryParamConfig;\n\n /** @override */\n beforeModel(transition: Transition): Promise | void {\n const { nav } = this.paramsFor(this.routeName) as { nav: string };\n set(this, 'routeId', nav === 'security' ? EmberPartitionsSmartArming : EmberSmartArming);\n return super.beforeModel(transition);\n }\n\n model(): SmartArmingModel {\n return {\n disarmRule: this.store.findRecord('automation/rules/smart-arming', 'disarm'),\n armRule: this.store.findRecord('automation/rules/smart-arming', 'arm'),\n sensors: this.store.findAll('devices/sensor')\n };\n }\n\n /** @override */\n resetController(controller: SmartArmingController, isExiting: boolean, transition: Transition): void {\n if (isExiting) {\n set(controller, 'nav', undefined);\n }\n\n return super.resetController(controller, isExiting, transition);\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n {{#if @instructions}}\\n
{{@instructions}}
\\n {{/if}}\\n
\\n \\n {{#if (and @disabledDetailWarning (is-mobile-app))}}\\n \\n

{{@disabledDetailWarning}}

\\n
\\n {{/if}}\\n {{!-- @glint-expect-error: @items types don\\'t match, please fix this. --}}\\n \\n
\\n \\n {{yield}}\\n \\n
\\n \\n \\n
\\n\",{ moduleName: \"customer-site/components/automation/rules/builder/feature-details/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport './_style.scss';\nimport Component from '@glimmer/component';\nimport { computed } from '@ember/object';\n\nimport type { ActionButtonsSignature } from '@adc/ui-components/components/action-buttons';\nimport type { AutomationRulesBuilderMessageSignature } from 'customer-site/components/automation/rules/builder/message';\nimport type { RBButtonItemComponentSignature } from 'customer-site/components/automation/shared/button-item';\nimport type BaseRuleFeatureType from 'customer-site/models/automation/rules-builder/base-rule-feature-type';\n\ntype ActionButtonArgs = ActionButtonsSignature['Args'];\n\ninterface RulesBuilderFeatureDetailsSignature {\n Element: HTMLDivElement;\n Args: Pick &\n Pick & {\n instructions?: string;\n disabledDetailWarning?: string;\n isFeatureConfigured?: boolean;\n confirmButtonText?: string;\n warningMessage: Promise;\n selectTitle: string;\n devices: Promise;\n saveFeature: ActionButtonArgs['confirm-action'];\n selectedFeatureType: BaseRuleFeatureType;\n };\n Blocks: {\n default: [];\n };\n}\n\nexport default class RulesBuilderFeatureDetails extends Component {\n @computed('args.devices')\n get sortedDevices(): Promise {\n return (async () => {\n return (await this.args.devices).sort((a, b) => a.label.toString().localeCompare(b.label.toString()));\n })();\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Automation::Rules::Builder::FeatureDetails': typeof RulesBuilderFeatureDetails;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#each this.computedMessageGroups as |messageGroup|}}\\n
\\n

{{messageGroup.header}}

\\n {{#each messageGroup.messages as |message|}}\\n
\\n
\\n \\n

{{message.header}} {{message.desc}}

\\n
\\n {{#if message.imageUrl}}\\n {{tc\\n {{/if}}\\n
\\n {{/each}}\\n
\\n{{/each}}\\n\\n\",{ moduleName: \"customer-site/components/automation/rules/builder/message/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { computed } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { intlPath } from '@adc/i18n/path';\n\nimport type Message from 'customer-site/models/automation/rules-builder/message';\nimport type MessageGroup from 'customer-site/models/automation/rules-builder/message-group';\nimport './_style.scss';\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type ContextManager from 'customer-site/services/context-manager';\n\nexport interface AutomationRulesBuilderMessageSignature {\n Args: {\n messageGroups?: MessageGroup[];\n };\n}\n\n@intlPath({ path: 'automation/rules/builder/message' })\nexport default class AutomationRulesBuilderMessage extends Component {\n @service declare contextManager: ContextManager;\n @service declare intl: ADCIntlService;\n\n @computed('args.messageGroups')\n get computedMessageGroups(): MessageGroup[] {\n if (this.args.messageGroups) {\n const messageGroup = this.args.messageGroups.map((mg) => {\n const messages = mg.messages.map((m) => {\n return { header: m.header, desc: m.desc, imageUrl: this.staticImagePath(m.imageUrl) } as Message;\n });\n // DO NOT COPY THIS, PLEASE IMPLEMENT THE SUGGESTION AND TEST.\n // @ts-expect-error MessageGroup is an ember data model, we are not returning a MessageGroup here, this needs to be fixed.\n return { icon: mg.icon, header: mg.header, messages } as MessageGroup;\n });\n return messageGroup;\n }\n return [];\n }\n\n staticImagePath(imageUrl: string | undefined): string | undefined {\n if (!imageUrl) {\n return undefined;\n }\n return this.contextManager.getStaticResourcePath(imageUrl!);\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Automation::Rules::Builder::Message': typeof AutomationRulesBuilderMessage;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n
\\n {{#if (eq @minuteInterval 1)}}\\n \\n {{else}}\\n \\n \\n {{/if}}\\n
\\n
\",{ moduleName: \"customer-site/components/automation/schedules/builder/time-selector/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { action, computed } from '@ember/object';\n\nimport './_style.scss';\nimport type { InsetGroupSignature } from '@adc/ui-components/components/inset-group';\nimport type { SegmentedTimeModel } from '@adc/ui-components/components/segmented-time-picker';\n\ninterface ScheduleBuilderTimeSelectorSignature {\n Element: InsetGroupSignature['Element'];\n Args: {\n date: Date;\n onChange: (newDate: Date) => void;\n header: InsetGroupSignature['Args']['title'];\n minuteInterval?: number;\n label: string;\n };\n}\n\nexport default class ScheduleBuilderTimeSelector extends Component {\n @action\n segmentTimeChanged(newTimeSegment: SegmentedTimeModel): void {\n this.args.onChange(new Date(2020, 1, 1, newTimeSegment.hour, newTimeSegment.min));\n }\n\n @computed('args.date')\n get selectedSegmentTime(): SegmentedTimeModel {\n return {\n hour: this.args.date.getHours(),\n min: this.args.date.getMinutes()\n };\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Automation::Schedules::Builder::TimeSelector': typeof ScheduleBuilderTimeSelector;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n
\\n \\n \\n \\n
\\n
\\n {{@sliderValueTitle}}\\n
\\n
\",{ moduleName: \"customer-site/components/automation/shared/action/slider/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport templateOnlyComponent from '@ember/component/template-only';\n\nimport './_style.scss';\n\ninterface AutomationSharedActionSliderComponentSignature {\n Element: HTMLDivElement;\n Args: {\n leftIcon: string;\n leftIconTitle?: string;\n rightIcon: string;\n rightIconTitle?: string;\n minLevel?: number;\n maxLevel?: number;\n sliderValue: number;\n sliderValueTitle: string;\n sliderValueText: string;\n 'value-change': (newLightLevel: number) => void;\n };\n}\n\n/**\n * @classdesc\n * Renders a single non-selected button list item if there is only one item, or yields if there are zero or more than one items.\n */\nconst AutomationSharedActionSlider = templateOnlyComponent();\n\nexport default AutomationSharedActionSlider;\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Automation::Shared::Action::Slider': typeof AutomationSharedActionSlider;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n
\\n {{#if @item.icon}}\\n \\n {{/if}}\\n {{@item.label}}\\n
\\n
\\n {{#if @item.props.detailTitle}}\\n
\\n {{@item.props.detailTitle}}\\n
\\n {{/if}}\\n {{#each @item.props.details as |detail|}}\\n {{#let (concat detail.id \\'-isTooltipVisible\\') as |tooltipVisibility|}}\\n \\n {{#if detail.icon.icon}}\\n \\n {{/if}}\\n {{detail.description}}\\n
\\n {{#if (and detail.tooltip (not (is-mobile-app)))}}\\n \\n {{detail.tooltip}}\\n \\n {{/if}}\\n {{/let}}\\n {{/each}}\\n
\\n\",{ moduleName: \"customer-site/components/automation/rules/builder/extra-option-details/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\n\nimport type { BinaryListItem } from '@adc/ui-components/components/simple-binary/list';\nimport type { PropsType } from 'customer-site/automation/rules/builder/action/details/controller';\nimport './_style.scss';\n\ninterface ExtraOptionDetailsSignature {\n Element: HTMLDivElement;\n Args: { item: BinaryListItem };\n}\n\nexport default class ExtraOptionDetails extends Component {\n @tracked tooltipVisibility: { [key: string]: boolean } = {};\n\n constructor(owner: unknown, args: ExtraOptionDetailsSignature['Args']) {\n super(owner, args);\n this.initializeTooltipVisibility();\n }\n\n initializeTooltipVisibility() {\n this.args.item.props.details?.forEach((detail) => {\n this.tooltipVisibility[`${detail.id}-isTooltipVisible`] = false;\n });\n }\n\n @action\n setTooltipVisibility(detailId: string, isVisible: boolean) {\n this.tooltipVisibility[`${detailId}-isTooltipVisible`] = isVisible;\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Automation::Rules::Builder::ExtraOptionDetails': typeof ExtraOptionDetails;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if this.shouldRenderSingleButton}}\\n
\\n \\n

{{this.firstItem.label}}

\\n
\\n{{else}}\\n {{#if @hasExtraOptionDetails}}\\n \\n \\n \\n {{else}}\\n \\n {{/if}}\\n{{/if}}\\n\",{ moduleName: \"customer-site/components/automation/shared/button-item/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { computed } from '@ember/object';\nimport { equal } from '@ember/object/computed';\nimport { htmlSafe } from '@ember/template';\nimport { ADC_SVG_FILL_COLORS } from 'customer-site/utils/colors';\n\nimport type { PropsType } from 'customer-site/automation/rules/builder/action/details/controller';\nimport type { ADCSvgFillColorsType } from 'customer-site/utils/colors';\nimport './_style.scss';\nimport type { BinaryListItem } from '@adc/ui-components/components/simple-binary/list';\nimport type { SafeString } from 'handlebars';\n\nexport interface RBButtonItemComponentSignature {\n Element: HTMLDivElement;\n Args:\n | {\n items: BinaryListItem[];\n isMultiSelect?: boolean;\n hasExtraOptionDetails?: undefined | false;\n selectAction: (items: BinaryListItem[]) => void;\n }\n | {\n items: BinaryListItem[];\n isMultiSelect?: boolean;\n hasExtraOptionDetails: true;\n selectAction: (items: BinaryListItem[]) => void;\n };\n}\n\n/**\n * @classdesc\n * Renders a single non-selected button list item if there is only one item, or yields if there are zero or more than one items.\n */\nexport default class RBButtonItem extends Component {\n /**\n * Indicates this component should render a single button item, rather than yielding.\n */\n @equal('args.items.length', 1)\n declare shouldRenderSingleButton: boolean;\n\n /**\n * The computed component style.\n */\n @computed('args.items.firstObject.color')\n get style(): SafeString {\n const color = this.args.items[0]?.color;\n return htmlSafe(color ? `fill:${color};` : '');\n }\n\n get firstItem(): BinaryListItem {\n return this.args.items[0];\n }\n\n get firstItemIcon(): string {\n return this.firstItem.icon ?? '';\n }\n\n get fillColor(): ADCSvgFillColorsType | undefined {\n return ADC_SVG_FILL_COLORS.includes(this.firstItem.color as ADCSvgFillColorsType)\n ? (this.firstItem.color as ADCSvgFillColorsType)\n : undefined;\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Automation::Shared::ButtonItem': typeof RBButtonItem;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n \\n
\\n \\n \\n
\\n
\\n
\",{ moduleName: \"customer-site/components/automation/shared/edit-title/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\n\nimport './_style.scss';\n\ninterface AutomationSharedEditTitleSignature {\n Element: HTMLDivElement;\n Args: {\n name: string | undefined;\n editName: ((internalValue?: string | undefined, value?: string | undefined) => any) | undefined;\n placeholder: string | undefined;\n errorMessage?: string;\n titleMaxLength?: number;\n };\n}\n\nexport default class AutomationSharedEditTitle extends Component {\n @action\n focusInput() {\n document.getElementById('automation-edit-title')?.focus();\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Automation::Shared::EditTitle': typeof AutomationSharedEditTitle;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n
\\n {{#if (is-fulfilled this.showDescription)}}\\n {{#if this.showDescription}}\\n

{{@title}}

\\n {{/if}}\\n {{/if}}\\n
\\n
\\n \\n
\\n {{#if (is-fulfilled this.iconName)}}\\n {{#if this.iconName}}\\n\\n \\n\\n {{#if this.subIconColor}}\\n \\n \\n \\n {{/if}}\\n {{else}}\\n
\\n {{/if}}\\n {{/if}}\\n
\\n \\n\\n
\\n
\\n {{#if this.showDescription}}\\n

{{this.displayDescription}}

\\n
\\n

{{@subDescription}}

\\n {{else}}\\n

{{@title}}

\\n {{/if}}\\n
\\n
\\n {{#if @isEnabled}}\\n {{#if this.isFeaturePopulated}}\\n \\n {{else}}\\n \\n {{/if}}\\n {{/if}}\\n
\\n
\",{ moduleName: \"customer-site/components/automation/shared/feature-summary/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { computed } from '@ember/object';\nimport { alias, and } from '@ember/object/computed';\nimport { isPresent } from '@ember/utils';\n\nimport type IconData from 'customer-site/utils/transforms-objects/icon-data';\nimport './_style.scss';\n\ninterface FeatureSummaryComponentSignature {\n Element: HTMLDivElement;\n Args: {\n icon: IconData;\n subIcon?: IconData;\n description?: string;\n extraDescription?: string;\n subDescription?: string;\n editFeature: () => void;\n title: string;\n\n isEnabled: boolean;\n isCompact: boolean;\n alwaysEditIcon: boolean;\n };\n}\n/** A component for rendering the summary of an automation event */\nexport default class FeatureSummary extends Component {\n /** Indicates the edit icon should always display regardless of completeness */\n @computed('args.alwaysEditIcon')\n get alwaysEditIcon(): boolean {\n return this.args.alwaysEditIcon ?? false;\n }\n\n /**\n * The feature has already been populated.\n *\n * @function\n * @returns {boolean}\n */\n @computed('alwaysEditIcon', 'args.{description,icon,subDescription}')\n get isFeaturePopulated(): boolean {\n return (\n ((isPresent(this.args.description) || isPresent(this.args.subDescription)) && isPresent(this.args.icon)) ||\n this.alwaysEditIcon\n );\n }\n\n @and('args.description', 'args.subDescription')\n declare showDescription: boolean;\n\n /**\n * The description of the feature. */\n @computed('args.{description,extraDescription}')\n get displayDescription(): string {\n return `${this.args.description ?? ''} ${this.args.extraDescription ?? ''}`.trim();\n }\n\n /** The icon name. */\n @alias('args.icon.icon')\n declare iconName: string;\n\n /** The icon color. */\n @alias('args.icon.color')\n declare iconColor: string;\n\n /** The icon css class */\n @alias('args.icon.cssClass')\n declare iconCssClass: string;\n\n @alias('args.subIcon.icon')\n declare subIconName: string;\n\n @alias('args.subIcon.color')\n declare subIconColor: string;\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Automation::Shared::FeatureSummary': typeof FeatureSummary;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n
\\n

{{@description}}

\\n

{{@subDescription}}

\\n
\\n
\",{ moduleName: \"customer-site/components/automation/shared/mobile-no-support/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport templateOnlyComponent from '@ember/component/template-only';\n\nimport './_style.scss';\n\ninterface MobileNoSupportSignature {\n Element: HTMLDivElement;\n Args: { title: string; description: string; subDescription: string };\n}\n\nconst MobileNoSupport = templateOnlyComponent();\n\nexport default MobileNoSupport;\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Automation::Shared::MobileNoSupport': typeof MobileNoSupport;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n <:default as |PageViewContainer|>\\n \\n <:loading as |PageViewLoading|>\\n \\n \\n\\n <:default>\\n
    \\n {{#each this.featureItems as |item|}}\\n
  • \\n \\n
  • \\n {{/each}}\\n
\\n \\n
\\n \\n
\",{ moduleName: \"customer-site/components/automation/shared/select-feature/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { computed } from '@ember/object';\nimport { empty } from '@ember/object/computed';\nimport { inject as service } from '@ember/service';\nimport { intlPath } from '@adc/i18n/path';\nimport { BinaryListItem } from '@adc/ui-components/components/simple-binary/list';\n\nimport './_style.scss';\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type BaseRuleComponentTypeModel from 'customer-site/models/automation/rules-builder/base-rule-feature-type';\nimport type ContextManager from 'customer-site/services/context-manager';\n\ninterface RulesBuilderSelectFeatureModel {\n allFeatures: BaseRuleComponentTypeModel[];\n enabledFeatures: BaseRuleComponentTypeModel[];\n partiallyEnabledFeatures: BaseRuleComponentTypeModel[];\n selectedFeatureType: BaseRuleComponentTypeModel;\n}\n\ninterface RulesBuilderSelectFeatureSignature {\n Args: RulesBuilderSelectFeatureModel & {\n updateSelectedFeature: (items: BinaryListItem<{ id: string }>[]) => Promise | void;\n exitToBuilder: () => void;\n editDetails: () => unknown;\n };\n}\n\n/**\n * @classdesc\n * A component for selecting rules builder component features for actions and triggers.\n */\n@intlPath({ path: 'automation/shared/select-feature' })\nexport default class SelectFeatureComponent extends Component {\n @service declare contextManager: ContextManager;\n @service declare intl: ADCIntlService;\n\n /**\n * The resolved features and selected feature type.\n */\n resolvedModel: RulesBuilderSelectFeatureModel = {} as RulesBuilderSelectFeatureModel;\n\n /**\n * Indicates the current feature configuration is invalid.\n */\n @empty('resolvedModel.selectedFeatureType')\n declare isFeatureInvalid: boolean;\n\n /**\n * The collection of feature types to output.\n */\n @computed('resolvedModel.{allFeatures,enabledFeatures,selectedFeatureType}')\n get featureItems(): BinaryListItem<{\n id: string;\n isSupported: boolean;\n isSelected: boolean;\n onClick: () => void;\n }>[] {\n const { allFeatures, enabledFeatures, selectedFeatureType } = this.resolvedModel;\n return allFeatures\n .map(\n (feature) =>\n new BinaryListItem({\n icon: feature.icon.icon,\n label: feature.description,\n props: {\n id: feature.id,\n isSupported:\n // using .get() is necessary as this is a proxy object\n enabledFeatures?.some((enabledFeature) => enabledFeature.get('id') === feature.id) ??\n false,\n isSelected: feature.id === selectedFeatureType?.id,\n onClick: () => this.updateSelection(feature.id)\n }\n })\n )\n .sort((a, b) => {\n return (\n (a.props.isSupported === b.props.isSupported ? 0 : a.props.isSupported ? -1 : 1) ||\n a.label.toString().localeCompare(b.label.toString())\n );\n });\n }\n\n updateSelection(selectedId: string): void {\n const { updateSelectedFeature } = this.args,\n { featureItems } = this;\n\n featureItems.forEach((f) => (f.state = f.props.id == selectedId));\n updateSelectedFeature(featureItems);\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Automation::Shared::SelectFeature': typeof SelectFeatureComponent;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n <:default as |data|>\\n
\\n
\\n \\n
\\n \\n <:label as |item|>\\n

\\n {{tc this (if (eq item.props.type this.sensorBasedScheduleConst) (if data.rule.isDisarm \\'disarmActivity\\' \\'armActivity\\') (if data.rule.isDisarm \\'disarmAtTime\\' \\'armAtTime\\')) startTime=this.startTime endTime=this.endTime duration=data.rule.duration}}\\n

\\n \\n <:content as |item|>\\n {{#if (eq item.props.type this.sensorBasedScheduleConst)}}\\n

{{tc this \\'timeFrame\\'}}

\\n \\n \\n {{#unless data.rule.isDisarm}}\\n \\n \\n \\n \\n {{/unless}}\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
\\n {{tc this \\'duration\\'}}\\n \\n \\n
\\n {{tc this \\'startTime\\'}}\\n \\n \\n
\\n {{tc this \\'endTime\\'}}\\n \\n \\n
\\n {{#if data.rule.isDisarm}}\\n \\n {{/if}}\\n {{#if this.isMobile}}\\n \\n {{else}}\\n

{{tc this \\'includedSensors\\'}}

\\n {{#if this.resolvedModel.rule.isDisarm}}\\n

{{safe-html (tc this \\'sensorSelectionInfo\\')}}

\\n {{/if}}\\n \\n {{/if}}\\n {{else}}\\n \\n {{/if}}\\n \\n \\n
\\n
\\n
\\n \\n\\n\\n\",{ moduleName: \"customer-site/components/automation/smart-arming/edit-page/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { computed, action, set, setProperties } from '@ember/object';\nimport { alias, or } from '@ember/object/computed';\nimport { inject as service } from '@ember/service';\nimport CheckboxModal from 'customer-site/components/modals/app/checkbox-dialog/index';\nimport { Contact, Motion, ClimaxPIRCamera, DSCPIRCamera, PowerGPIRCamera } from 'customer-site/enums/DeviceType';\nimport { getDateForTime } from '@adc/common-models/models/automation/rules/smart-arming';\nimport { intlPath } from '@adc/i18n/path';\nimport { BinaryListItem } from '@adc/ui-components/components/simple-binary/list';\nimport DropdownSelectItem, { SELECTED, UNSELECTED } from '@adc/ui-components/utils/dropdown-select-item';\n\nimport './_style.scss';\nimport type SmartArming from '@adc/common-models/models/automation/rules/smart-arming';\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { SegmentedTimeModel } from '@adc/ui-components/components/segmented-time-picker';\nimport type ModalService from '@adc/ui-components/services/modals';\nimport type NotificationManager from '@adc/ui-components/services/notification-manager';\nimport type Sensor from 'customer-site/models/devices/sensor';\nimport type ContextManager from 'customer-site/services/context-manager';\n\ninterface EditPageSignature {\n Args: {\n rule: ADCAsyncStoreFindRecord;\n sensors: ADCAsyncStoreFindAll;\n };\n}\n\ntype SmartArmingItemProps = {\n type: number;\n};\n\n/**\n * ID for the sensor based schedule radio button item\n */\nconst SensorBasedSchedule = 1;\n\n/**\n * ID for the time based schedule radio button item\n */\nconst TimeBasedSchedule = 2;\n\n/**\n * Maximum duration time in minutes\n */\nconst MaxDurationMin = 240;\n\n/**\n * Increment in minutes between duration time options\n */\nconst DurationIncrement = 30;\n\n/**\n * @classdesc\n * Component for editing the configuration of a smart arming rule\n */\n@intlPath({ path: 'automation/smart-arming/edit-page' })\nexport default class EditPage extends Component {\n @service declare intl: ADCIntlService;\n @service declare contextManager: ContextManager;\n @service declare notificationManager: NotificationManager;\n @service declare media: ADCResponsiveMediaService;\n @service declare modals: ModalService;\n\n /**\n * Resolved model from the route\n */\n @tracked declare resolvedModel: {\n rule: Awaited;\n sensors: Awaited;\n };\n\n /**\n * The sensors the user has selected to store if they select the scheduled option\n * so we can populate them if the smart option is re-selected\n */\n storedSensorSelection?: number[];\n\n /**\n * Whether the rule has cutoff time applied to store if they select the scheduled option\n */\n storedHasCutoffTime?: boolean;\n\n /**\n * Does this account have access to sensor based Smart Arming schedules?\n */\n @alias('contextManager.identityModel.hasSmartArmingSensorBased')\n declare hasSensorBased: boolean;\n\n /**\n * Does this account have access to create Smart disarming rules?\n */\n @alias('contextManager.identityModel.isSmartDisarmEligible')\n declare hasSmartDisarmOption: boolean;\n\n /**\n * Is this being viewed on mobile?\n */\n @or('media.{isMobile,isTabletPortrait}', 'contextManager.isMobileApp')\n declare isMobile: boolean;\n\n /**\n * Hand the sensor based schedule constant to the template\n */\n get sensorBasedScheduleConst(): number {\n return SensorBasedSchedule;\n }\n\n /**\n * Get the formatted end time\n */\n @computed('resolvedModel.rule.localizedEndTime')\n get endTime(): string {\n return this.resolvedModel.rule.localizedEndTime;\n }\n\n /**\n * Get the formatted start time\n */\n @computed('resolvedModel.rule.localizedStartTime')\n get startTime(): string {\n return this.resolvedModel.rule.localizedStartTime;\n }\n\n /**\n * Segmented time picker model for start time\n */\n @computed('resolvedModel.rule.segmentedStartTime')\n get startTimeModel(): SegmentedTimeModel {\n return this.resolvedModel.rule.segmentedStartTime;\n }\n\n /**\n * Segmented time picker model for end time\n */\n @computed('resolvedModel.rule.segmentedEndTime')\n get endTimeModel(): SegmentedTimeModel {\n return this.resolvedModel.rule.segmentedEndTime;\n }\n\n /**\n * Get sensors valid for Smart Arming configuration\n */\n @computed('resolvedModel.{sensors,rule.isDisarm}')\n get validSensors(): Sensor[] {\n return this.resolvedModel.sensors.filter(\n ({ deviceType }) =>\n [Motion, ClimaxPIRCamera, PowerGPIRCamera, DSCPIRCamera].includes(deviceType) ||\n (!this.resolvedModel.rule.isDisarm ? deviceType === Contact : false)\n );\n }\n\n /**\n * Get the list of sensor devices\n */\n @computed('resolvedModel.{sensors,rule.triggers}', 'validSensors')\n get sensorsList(): BinaryListItem[] {\n return this.validSensors.map((sensor) => {\n const id = sensor.id.split('-')[1];\n return new BinaryListItem({\n label: sensor.description,\n state: this.resolvedModel.rule.triggers.includes(Number(id)),\n props: { id: id }\n });\n });\n }\n\n /**\n * Get the list of duration options\n * Generates a list of times between 30 minutes and 4 hours in 30 minute increments\n */\n @computed('resolvedModel.rule.{duration,localizedDuration}')\n get durationItems(): DropdownSelectItem[] {\n const timeList = [];\n for (let time = DurationIncrement; time <= MaxDurationMin; time += DurationIncrement) {\n timeList.push(time);\n }\n\n return timeList.map((time) =>\n DropdownSelectItem.create({\n name: this.resolvedModel.rule.parseDuration(time),\n value: String(time),\n state: this.resolvedModel.rule.duration === time ? SELECTED : UNSELECTED\n })\n );\n }\n\n /**\n * Get the items for the radio buttons\n */\n @computed(\n 'hasSensorBased',\n 'resolvedModel.rule.{isSensorBased,isDisarm}',\n 'sensorsList.length',\n 'hasSmartDisarmOption'\n )\n get radioItems(): BinaryListItem[] {\n const radioItems = [\n new BinaryListItem({\n label: '',\n state: !this.resolvedModel.rule.isSensorBased,\n props: { type: TimeBasedSchedule }\n })\n ];\n\n if (\n this.sensorsList.length > 0 &&\n this.hasSensorBased &&\n !(this.resolvedModel.rule.isDisarm && !this.hasSmartDisarmOption)\n ) {\n radioItems.push(\n new BinaryListItem({\n label: '',\n state: this.resolvedModel.rule.isSensorBased,\n props: { type: SensorBasedSchedule }\n })\n );\n }\n\n return radioItems;\n }\n\n /**\n * Validate the current start and end times in relation with the duration\n */\n private isTimeSelectionValid(): boolean {\n const { rule } = this.resolvedModel;\n if (rule.isSensorBased) {\n if (rule.isDisarm) {\n return rule.startTime !== rule.endTime;\n }\n\n const startTime = getDateForTime(rule.startTime),\n endTime = getDateForTime(rule.endTime),\n newTime = new Date(startTime.getTime() + rule.duration * 60000);\n\n if (startTime > endTime) {\n // If the user selected end time is set for the next day, we want the date to reflect that\n endTime.setDate(endTime.getDate() + 1);\n }\n\n return newTime <= endTime;\n }\n\n return true;\n }\n\n /**\n * Change the schedule type of the smart arming rule\n */\n @action\n scheduleTypeChange(items: BinaryListItem[]): void {\n const { rule } = this.resolvedModel;\n if (this.sensorsList.length > 0 && this.hasSensorBased) {\n const isSensorBased = set(this.resolvedModel.rule, 'isSensorBased', !!items[1].state);\n if (!isSensorBased) {\n setProperties(this, {\n storedHasCutoffTime: rule.cutoffTime,\n storedSensorSelection: rule.triggers\n });\n setProperties(rule, {\n triggers: [],\n cutoffTime: false\n });\n } else {\n setProperties(rule, {\n triggers: this.storedSensorSelection ?? [],\n cutoffTime: this.storedHasCutoffTime ?? false\n });\n }\n } else {\n set(this.resolvedModel.rule, 'isSensorBased', false);\n }\n }\n\n /**\n * Change a given property of the rule\n */\n @action\n changeRuleValue(key: keyof SmartArming, newValue: string): void {\n set(this.resolvedModel.rule, key, Number(newValue));\n }\n\n /**\n * Change start or end time of the rule\n */\n @action\n changeStartEndTime(key: 'startTime' | 'endTime', value: SegmentedTimeModel): void {\n const time = value.min + value.hour * 60;\n this.changeRuleValue(key, String(time));\n }\n\n /**\n * Set the rule's trigger sensors\n */\n @action\n setActiveSensors(sensors: (BinaryListItem & { props: { id: string } })[]): void {\n set(this.resolvedModel.rule, 'triggers', []);\n sensors.forEach((sensor) => {\n if (sensor.state) {\n this.resolvedModel.rule.triggers.push(Number(sensor.props.id));\n }\n });\n }\n\n /**\n * Open the checkbox modal to display on mobile\n */\n @action\n openCheckboxModal(): void {\n this.modals.showModal(CheckboxModal, {\n title: this.intl.tc(this, 'includedSensors'),\n topText: this.intl.tc(\n this,\n this.resolvedModel.rule.isDisarm ? 'sensorSelectionInfo' : 'sensorsUsedToDetect'\n ),\n css: 'smartarming-checkbox-modal',\n checkboxItems: this.sensorsList,\n valueChange: this.setActiveSensors\n });\n }\n\n /**\n * Save the current rule\n */\n @action\n async save(): Promise {\n const { rule } = this.resolvedModel;\n if (rule.triggers.length === 0 && rule.isSensorBased) {\n this.notificationManager.addError(this.intl.tc(this, 'noSensorsSelected'));\n return Promise.reject();\n }\n\n if (!this.isTimeSelectionValid()) {\n this.notificationManager.addError(\n this.intl.tc(this, rule.isDisarm ? 'invalidTimeDisarm' : 'invalidTimeArm')\n );\n return Promise.reject();\n }\n\n // Automatically enable the rule when saving config changes\n rule.isEnabled = true;\n await rule.save();\n this.notificationManager.addSuccess(this.intl.tc(this, 'saveSuccess'));\n }\n\n /**\n * Cancel and roll-back the current rule\n */\n @action cancel(): void {\n this.resolvedModel.rule.rollbackAttributes();\n this.contextManager.transitionToPreviousRoute();\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Automation::SmartArming::EditPage': typeof EditPage;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n
\\n

{{t (concat \\'components.automation.smart-arming.header-bar.\\' (if @isMorning \\'wakeUp\\' \\'goodNight\\'))}}

\\n {{#unless (or @disableToggle @isDefault (not @toggleEnabled))}}\\n {{#if @toggleEnabled}}\\n \\n {{/if}}\\n {{/unless}}\\n {{#if @isDefault}}\\n \\n {{/if}}\\n
\\n

{{t (concat \\'components.automation.smart-arming.header-bar.\\' (if @isMorning \\'morningDesc\\' \\'nightDesc\\'))}}

\\n
\",{ moduleName: \"customer-site/components/automation/smart-arming/header-bar/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport templateOnlyComponent from '@ember/component/template-only';\n\nimport './_style.scss';\n\nexport interface SmartArmingHeaderBarSignature {\n Args: {\n isDefault?: boolean;\n isEnabled?: boolean;\n isMorning?: boolean;\n disableToggle?: boolean;\n editRule?: () => void;\n toggleEnabled?: () => void;\n };\n}\n\nconst SmartArmingHeaderBar = templateOnlyComponent();\nexport default SmartArmingHeaderBar;\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Automation::SmartArming::HeaderBar': typeof SmartArmingHeaderBar;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n
\\n \\n \\n {{yield device to=\\'above-device-name\\'}}\\n \\n \\n \\n \\n\\n {{yield device to=\\'settings\\'}}\\n\\n \\n \\n \\n \\n
\",{ moduleName: \"customer-site/components/home/edit-device-view/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { inject as service } from '@ember/service';\n\nimport './_style.scss';\nimport type NotificationManager from '@adc/ui-components/services/notification-manager';\nimport type BaseDevice from 'customer-site/models/devices/base-device';\nimport type ContextManager from 'customer-site/services/context-manager';\n\ninterface EditDeviceViewSignature {\n Element: HTMLDivElement;\n Args: {\n successNotification: string;\n model: Promise;\n beforeDeviceSaved?: () => Promise;\n deviceSaved?: VoidFunction;\n deviceHasChanges?: boolean;\n };\n Blocks: {\n 'above-device-name': [T];\n settings: [T];\n };\n}\n\n/**\n * Edit page component for base device settings.\n */\nexport default class EditDeviceView extends Component> {\n @service declare contextManager: ContextManager;\n @service declare notificationManager: NotificationManager;\n\n @action\n async saveDevice(device: T) {\n const { successNotification } = this.args;\n\n try {\n await this.args.beforeDeviceSaved?.();\n await device.save();\n this.args.deviceSaved?.();\n this.notificationManager.addSuccess(successNotification, 15000);\n this.contextManager.transitionToPreviousRoute();\n return Promise.resolve();\n } catch (error) {\n this.notificationManager.addError(error.errors[0].detail);\n return Promise.reject();\n }\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Home::EditDeviceView': typeof EditDeviceView;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n
\\n {{!-- @glint-expect-error topText can be undefined, so we either need to change that, or make sure it exists before we use it. --}}\\n

{{html-safe @model.topText}}

\\n \\n \\n
\\n\",{ moduleName: \"customer-site/components/modals/app/checkbox-dialog/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\n\nimport './_style.scss';\nimport type { BinaryListItem } from '@adc/ui-components/components/simple-binary/list';\n\ninterface CheckboxModalArgs {\n model: CheckboxModalModel;\n}\n\ninterface CheckboxModalModel {\n title: string;\n css?: string;\n topText?: string;\n disableFooterClose?: boolean;\n footerCloseText?: string;\n checkboxItems: BinaryListItem[];\n valueChange: (items: BinaryListItem[]) => any;\n}\n\n/**\n * @classdesc\n * Modal for rendering a checkbox group\n */\nexport default class CheckboxModal extends Component {\n /**\n * Select all items in the checkbox group\n */\n @action\n selectAll(): void {\n const { checkboxItems, valueChange } = this.args.model;\n checkboxItems.setEach('state', true);\n\n valueChange(checkboxItems);\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Modals::App::CheckboxDialog': typeof CheckboxModal;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n \\n
\",{ moduleName: \"customer-site/components/ui/connector/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport templateOnlyComponent from '@ember/component/template-only';\n\nimport './_style.scss';\n\nexport interface UiConnectorSignature {\n Args: {\n style: string;\n };\n}\n\nconst UiConnector = templateOnlyComponent();\nexport default UiConnector;\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Ui::Connector': typeof UiConnector;\n }\n}\n","import { isHTMLSafe } from '@ember/template';\n\nexport default function(stringFunction) {\n return function([string]) {\n if (isHTMLSafe(string)) {\n string = string.string;\n }\n\n string = string || '';\n return stringFunction(string);\n };\n}\n","import { helper } from '@ember/component/helper';\nimport { htmlSafe as _htmlSafe } from '@ember/template';\nimport createStringHelperFunction from '../-private/create-string-helper';\n\nexport const htmlSafe = createStringHelperFunction(_htmlSafe);\nexport default helper(htmlSafe);\n"],"names":["createTemplateFactory","scope","modalsDialogModalsSimpleSimpleDialog_","tc_","buttonSimple_","not_","on","ChangePresenceStateModal","intlPath","path","_dec","_class2","Component","constructor","arguments","_initializerDefineProperty","_descriptor","_descriptor2","_descriptor3","runScene","name","scene","currentState","presenceState","this","args","model","execute","notificationManager","addSuccess","intl","tc","presenceStateId","ex","addError","modals","closeModal","changeStatus","oldStateId","save","_applyDecoratedDescriptor","prototype","service","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","_class","setComponentTemplate","TEMPLATE","simpleBinary_","or_","dropdownSelectSingleSelect_","toString_","PresenceStateSettingSensorTriggerSuboptionRow","_dec2","alias","_dec3","computed","_dec4","notEmpty","dropdownItems","defaultDropdownValue","suboption","durationDropdownOptions","selectedDurationDropdownValue","activeValue","map","dropdownOption","DropdownSelectItem","create","description","value","toString","state","SELECTED","UNSELECTED","updateIsSelected","evt","hasDurationDropdownOptions","sensorTriggerOption","isChecked","target","checked","isSelected","sensorSuboptions","every","s","forEach","isEditable","updateDropdownValue","Number","tracked","automationPresenceStateSettingSensorTriggerOptionSuboptionRow_","smartTime_","PresenceStateSettingSensorTriggerOptionSubsection","subsectionIsDisabled","statusCanBeEdited","sleepTimeIsDisabled","todaysSleepTime","midnightTodayLocal","Date","setHours","midnightTodayUtc","zonedTimeToUtc","timeZone","addMinutes","sleepTimeMinutesAfterMidnight","updateMinutesAfterMidnight","selectedTime","timeChangeMs","getTime","timeChangeMinutes","Math","floor","NUM_MILLISECONDS_IN_MINUTE","showSleepTime","undefined","selectSleepTimeText","PresenceStateSettingTriggerOptionRow","gt","dropdownOptions","selectedDropdownValue","triggerOption","_this$triggerOption$d","_this$triggerOption$d2","hasDropdownOptions","set","svgSymbol_","and_","await_","automationPresenceStateSettingSensorTriggerOptionSubsection_","automationPresenceStateSettingTriggerOptionRow_","PresenceStateSettingStateSettingItem","allTriggerOptions","getAllTriggersFromPromises","triggerOptions","then","triggers","allTriggersWithType","generateTriggerWithType","sort","a","b","sortOrder","showCheckmark","_this$args$currentSta","openChangeStateModal","showModal","triggerOptionsPromise","sensorTriggerOptionPromise","to","push","trigger","triggerWithType","isSensor","PresenceStateSensorTriggerOption","pageViewEdit_","promiseHashTracked_","fn","hash","buttonIcon_","tc_0","didInsert_","automationPresenceStateSettingStateSettingItem_","insetGroup_","DeviceResourceInfoInset","goToDocumentation","window","location","assign","deviceResourceInfo","knowledgeBaseLinkUrl","inlineAlert_","simpleList_","simpleListItem_","iconFill_","t_","SceneRuleList","hasSuggestedSceneRules","_this$args$sceneRuleL","sceneRuleListItems","some","listItem","props","isSuggested","hasAnySceneRules","_this$args$sceneRuleL2","transitionToExistingRule","ruleId","navigation","transitionToRouteId","EmberRulesBuilder","queryParams","returnToAfterSave","EmberRemotesEdit","returnToAfterSaveSlug","deviceId","transitionToNewRule","buttonNumber","triggerType","Remote","triggerDevices","triggerEvent","pageView_","homeEditDeviceView_","asyncLoader_","homeDeviceResourceInfoInset_","automationRemotesSceneRuleList_","rowItem_","sliderAdc_","buttonAsync_","ChimeActionConfigurationComponent","reads","_dec5","_dec6","_dec7","_dec8","mapBy","_dec9","_dec10","_dec11","_dec12","_descriptor4","_descriptor5","_descriptor6","_descriptor7","_descriptor8","_descriptor9","_descriptor10","_descriptor11","_descriptor12","showVolumeSetting","_this$args$showVolume","showDisableSliderCheckbox","_this$args$showDisabl","sliderVolume","_this$volume","volume","defaultVolume","updateForDevices","tones","selectedTone","String","tone","keys","setProperties","isPresent","setTone","setVolume","min","max","actionTypeData","minVolume","maxVolume","playRingtone","selectedIds","testTonesEndpoint","length","response","ajax","apiRequestForValue","POST","success","error","errors","detail","toggleVolumeSlider","event","automationRulesActionsChimes_","automationSharedButtonItem_","automationSharedActionSlider_","circleIcon_","htmlSafe_","concat","lightbulbColorPicker_","automationRulesBuilderFeatureDetails_","coalesce_","automationSharedSelectFeature_","simpleBinaryList_","AdditionalOption","selectedOption","_this$args$selectedOp","selectedOptions","options","o","checkboxItems","option","BinaryListItem","label","includes","updateDropdownSelection","newValue","valueChanged","filter","_ref","updateCheckboxSelection","selectedItems","_ref2","automationSharedAdditionalOption_","actionButtons_","betaFeatureUnderConstruction_","automationSharedEditTitle_","uiConnector_","automationSharedFeatureSummary_","automationRulesBuilderMessage_","LinkTo","buttonNative_","automationSharedMobileNoSupport_","uiNotificationList_","createDropdownItems_","formGroup_","guidFor_","textInput_","noop_","AddMobileComponent","updateNumber","number","validatePhoneNumber","invalidNumber","updateCountry","country","selectedCountry","parseInt","countries","countriesList","id","countryName","providers","getCarriersForSelectedCountry","disableProviders","RegExp","test","AddEmailComponent","updateEmailAddress","emailAddressInput","validateEmail","invalidEmail","emailAddress","appLanguageSelect_","automationRulesBuilderNotificationsAddMobile_","automationRulesBuilderNotificationsAddEmail_","navigateToRouteName_","automationScheduleInput_","automationRulesRuleList_","searchToolbar_","emberDragula_","emberDragulaContainer_","array","didUpdate_","navigateToRouteId_","automationSchedulesBuilderTimeSelector_","get","schedulePicker_","smartDate_","handleBinaryChange_","automationSmartArmingEditPage_","automationSmartArmingHeaderBar_","ListItem","startTime","localizedStartTime","endTime","localizedEndTime","duration","localizedDuration","editConfig","isMorning","EmberSmartArmingDisarmEdit","EmberSmartArmingArmEdit","automationSmartArmingListItem_","d","define","esc","require","visitedStatusSettingsPageStorageName","presenceStateActionSetTypeMap","Home","ComingHome","Away","GoingAway","Sleep","Goodnight","PresenceStateSettingsController","Controller","_defineProperty","_this$presenceStateAr","presenceStateArray","firstObject","settingsWithScenes","settings","relatedScene","getSceneFromPresenceStateId","allStatusesCannotBeEdited","_this$settings$every","_this$settings","canBeEdited","_this$resolvedModel","resolvedModel","scenes","findBy","openExplainerModal","explainer","PresenceStateExplainerModal","titleText","infoTitleText","bodyMainText","infoBodyMainText","bodySubText","infoBodySubText","closeButtonText","infoButtonText","imagePath","contextManager","getStaticResourcePath","infoImagePath","showCloseButton","Promise","all","invoke","catch","cancel","transitionToPreviousRoute","launchModalOnFirstVisit","localStorage","getItem","setItem","PresenceStateSettingsRoute","AdcBaseRoute","EmberPresenceStateSettings","store","identityManager","system","getSelectedSystem","partitions","validArmingStates","Set","partition","add","isArmOnly","size","has","ARMED_AWAY","queryRecord","query","isArmingAvailable","supportsSecureArming","peekAll","presenceStateSettings","presenceStateExplainer","darkMode","isDarkModeEnabled","findAll","rollbackModelOnTransition","currentModel","slice","setting","isSaving","hasDirtyAttributes","rollbackAttributes","RemotesEditController","existingSceneRuleDisplays","remote","device","listItems","numberOfButtons","sceneRule","actionType","SinglePress","button","SimpleListItem","getTriggerDescription","t","bind","sceneRuleDisplay","icon","triggerDescription","sortSceneRuleListItems","transitionToRulesPage","EmberRules","filterTags","RemotesFilter","RemoteTriggerType","RemotesEditRoute","BaseEditDeviceRoute","id_device","findRecord","sceneRules","buttonResourceInfo","AutomationRemotesController","navigateToRemotesEdit","remoteId","getActionItems","EditActionItem","AutomationRemotesRoute","EmberRemotes","remotes","AutomationRulesBuilderActionDetailsChimes","Route","RulesBuilderActionDetailsController","RulesBuilderBaseFeatureDetailsController","dataLoaded","checkActionForPrePopulation","supportsMultipleDevices","supportsMultiSelect","validActionTemplates","rule","enabledDevices","getTemplateDevicesIds","enabledExtraOptions","getTemplateExtraOptionIds","getInstructions","actionEvent","WarningSoundStarted","hasExtraOptionDetails","async","allActionExtraDeviceOptions","_allActionExtraDevice","details","disabledDetailWarning","actionExtraDeviceOption","result","_actionExtraDeviceOpt","disabled","availableDevices","selectedDevices","hasMany","ids","selectedExtraOptions","fnGetListItem","isExtraOption","detailTitle","color","_objectSpread","allActionDevices","deviceIcon","selectActionDevices","items","changes","selectDevice","setObjects","extraOption","actionDevices","devices","AutomationRulesBuilderActionDetailsIndex","enabledStatus","getTemplateStatuses","availableStatus","availableStatuses","allActionEvents","belongsTo","selectActionStatus","selectStatus","AutomationRulesBuilderFeatureDetailsIndexRoute","getFeatureRoute","actionStatusRoute","_actionType$extraData","extraData","ruleDetailsRoute","getFeatureRouteSlugs","_model$id","DEFAULT_LIGHT_COLOR","AutomationRulesBuilderLights","equal","SwitchLevelChanged","HeatingCoolingIssue","TemperatureAlert","or","_dec13","_dec14","_dec15","_descriptor13","_descriptor14","_descriptor15","_descriptor16","sliderValue","lightPercentLevel","setDimLevel","newLightLevel","eventType","Manual","RGBW","lightColor","hslColor","hexToHSL","hue","saturation","lightness","WarmToCool","lightPercentWarmth","showDimSlider","showColorPickers","isColorPickerShown","cpAnchorId","colorPresetsBackground","colorChanged","values","percentWarmth","_objectWithoutProperties","_excluded","isPercentWarmth","hexColor","hslToHex","getWarmth","computedColor","lightColorFormat","percentWarmthToHexString","AutomationRulesBuilderActionDetailsLights","ActionDetailsRoute","BaseFeatureDetailsRoute","EmberRulesBuilderActionDetails","modelFor","actionTypeId","availableTemplates","ruleTemplates","filterBy","uniqBy","toArray","flat","validateRuleModel","selectedType","isEmpty","EmberRulesBuilderAction","RulesBuilderActionIndexController","RulesBuilderBaseFeatureController","enabledActionTypes","getEnabledTypes","incompatibleMessage","selectedId","key","find","item","updateActionType","updateType","allActionTypes","triggerExtraDeviceOption","restrictions","createRecord","editDetails","transitionToBuilderRoute","RulesBuilderActionIndexRoute","RuleBuilderActionRoute","afterModel","types","slug","paramsFor","ExtraRuleOptionController","BaseController","useSuffix","extraRuleOption","ruleOptionSuffix","title","replace","filteredExtraRuleOptionItems","triggerDeviceIds","actionDeviceIds","extraRuleOptionItems","i","deviceIdsFilter","updateSelection","saveConditions","isSingleSelect","extraRuleOptions","removeObjects","EmberRulesBuilderExtraRuleOption","id_option","setupController","controller","super","optionItems","selectedOptionsItems","isDefault","RulesBuilderController","_dec16","_dec17","_dec18","_dec19","_dec20","_dec21","_dec22","_dec23","_dec24","_dec25","_dec26","_dec27","_dec28","_dec29","_dec30","_dec31","_dec32","_dec33","_dec34","_dec35","EmberRulesBuilderTrigger","EmberRulesBuilderRestrictions","notifications","EmberRulesBuilderNotifications","_descriptor17","_descriptor18","_descriptor19","resetData","showUnderConstructionBanner","_this$ruleTemplates","isAny","actionEventIcon","_await$actionType$ext","extraActionDescription","actionHasTriggerDependentOptions","extraActionSubIcon","subIcon","extraTriggerDescription","confirmButtonDisabled","hasEditRulesPermission","isRuleValid","_this$singleValidTemp","singleValidTemplate","extraActionOptionsEnabled","actionOptionsDescription","_actionType$extraData2","actionOptionIcon","_actionType$extraData3","_actionType$extraData4","displayLegacyEditLink","_contextManager$getRo","_this$singleValidTemp2","isMobileApp","getRouteItem","editPage","url","displayLegacyEditParams","_this$rule$editPageQu","_this$singleValidTemp3","editPageQueryParameters","entries","v","join","isTriggerConfigured","isActionConfigured","possibleTemplates","any","reduce","acc","template","rank","_this$singleValidTemp4","ruleOptions","selectChoiceMessage","_await$extraRuleOptio","_selectedTitles$","selectedTitles","choice","hasDefault","extraRuleIcon","allowEdit","showAfterTrigger","triggerExtraRuleOptions","actionExtraRuleOptions","restrictionDescription","_this$rule$restrictio","ScheduleRestrictionType","notificationDescription","notificationContactAddresses","contactAddresses","isNameInvalid","isDetached","checkTriggerForPrePopulation","reset","isNew","triggerDuration","reload","_rule$name","_rule$name2","saveInProgress","fnSave","_await$this$singleVal","_await$this$singleVal2","_this$singleValidTemp5","saveMessage","customSaveMessage","ruleEngine","validExtraRuleOptions","_option$optionItems","replaceAll","ruleName","clearVisitedRoutesStack","_ex$errors","err","_this$singleValidTemp6","_this$singleValidTemp7","trim","editNameEnabled","showRenameModal","maxLength","message","output","rename","editRuleAction","editRoutes","transitionToExtraRuleOptionRoute","extraRuleOptionId","getOwner","lookup","backButton","nativeBridge","getButtonTypeBack","goBackToSpecifiedPage","triggerDeviceDescription","actionDeviceDescription","RulesBuilderIndexRoute","AutomationRulesBuilderMobileNoSupportController","RulesBuilderMobileNoSupportRoute","EmberRulesBuilderMobileNoSupport","NotificationGroupItem","contact","NotificationsController","notificationGroups","groups","contacts","group","addressType","type","text","header","_notificationContactA","hasOptions","compact","notificationRecipientsChanged","address","addressId","removeObject","addObject","contactAddress","notificationOptionChanged","saveNotifications","_a$id","alreadyExists","peekRecord","createNewContact","EmberRulesBuilderNotificationsNewContact","NotificationsRoute","fnGetModels","triggerTypeId","triggerEventId","actionEventId","ContactTypeEnum","IPhonePush","Mobile","onlyTwoFactorAddresses","Email","NewContactController","EmberController","getFirstContact","newContactModel","models","hasValidEmail","hasValidMobile","provider","disableAddContact","_this$resolvedModel2","firstName","lastName","addContactModel","_this$resolvedModel3","m","singularize","saveNewContact","_this$resolvedModel4","deleteEmail","_this$resolvedModel5","emails","email","deleteMobile","_this$resolvedModel6","mobiles","mobile","NewContactRoute","RestrictionsController","not","MINUTES_IN_DAY","WEEK_DAYS","getDefaultValues","dayBits","EVERY_DAY_BITS","beginTime","isDark","scheduleRestriction","tempSchedule","pushObject","defaultValues","resetControllerProperties","_this$defaultValues","scheduleChanged","updateScheduleRestrictions","isAllDay","RestrictionsRoute","resetController","isExiting","RulesBuilderRoute","getQueryParam","params","id_rule","populateRuleFromQueryParams","editRuleId","populateTriggerFromQueryParams","populateActionFromQueryParams","triggerPromises","deviceIdsArray","Array","isArray","resolvedDevices","resolvedType","resolvedEvent","actionPromises","lastRoute","visitedRoutesStack","routeItem","isValidForEmberRuleBuilder","addWarning","transitionToLegacy","isNative","transitionToRoute","identityModel","router","transitionTo","isDestroyed","defaultQueryParams","indexController","controllerFor","AutomationRulesBuilderTriggerDetailsAccessControl","AutomationRulesBuilderTriggerDetails","validTriggerTemplates","allTriggerDevices","allTriggerExtraDeviceOptions","notSupported","allTriggerEvents","selectTriggerDevices","selectTriggerStatus","AutomationRulesBuilderTriggerDetailsGeoLocation","availableGeoFences","geoFences","_this$geoFences","fenceId","geoFence","selectGeoFence","_items$findBy","geoFenceKeys","AutomationRulesBuilderTriggerDetailsIndex","triggerStatusRoute","_triggerType$extraDat","ScheduleExtraData","TriggerDetailsRoute","EmberRulesBuilderTriggerDetails","RulesBuilderTriggerIndexController","enabledTriggerTypes","updateTriggerType","allTriggerTypes","RulesBuilderTriggerIndexRoute","NewImageSensorRuleModal","NewRules","getRuleItem","daily","smartRules","DailyView","ActivityAlert","basicRules","createRule","TypeID","DailyRuleTypeID","transitionToCreateRule","ImageSensorRulesEdit","spinnerSvg_","NewThermostatRuleModal","owner","_buildTask","context","generator","thermostats","rejectBy","selectedThermostat","showSelectBox","loadThermostats","perform","thermostatDropdownItems","_this$thermostats$map","_this$thermostats","selectThermostat","_this$thermostats2","thermostat","ruleSuggestion","addEditRouteId","r","ThermostatSchedule","getRouteTransitionAction","slugs","route","getOpenModalAction","modal","modalPath","modelProp","NewImageSensorRule","NewVideoRule","NewThermostatRule","NewVideoSchedule","newRuleItems","EmberRulesBuilderRules","Partition","Lock","GarageDoor","AccessControlDoor","Light","SecuritySensor","ImageSensorDevice","VideoCamera","ChimeDevice","SmartChime","WaterValve","EventTriggered","Gate","EventTriggeredRuleEdit","ImageSensor","VideoRule","VideoEditEventTriggeredRecordingSchedule","VideoAddCloudRecordingSchedule","Thermostat","ThermostatDevice","ThermostatRuleEdit","Chime","RuleIndexController","and","canCreateEmberRules","_get","createNewRuleWithEmberRulesBuilder","canDisplayRuleScheduleDropdown","_get2","EmberScheduleBuilder","newAutomationItems","_get3","deviceType","allowedRules","rules","displayType","deviceTypes","routeIDs","fnGetAction","DropdownActionItem","call","DEVICE_TYPE_MAP","EmberPartitionsRules","EmberLocksRules","EmberGarageDoorsRules","EmberGatesRules","EmberLightsRules","EmberThermostatsRules","EmberWaterRules","EmberSensorsRules","EmberImageSensorRules","Video","EmberVideoRules","EmberAccessControlDoorRules","RulesIndexRoute","BaseAutomationRoute","beforeModel","routeName","itemModelPath","transition","_this$currentModel","_currentModel$videoRu","_currentModel$videoUs","_currentModel$aiDeter","isFullTransition","videoRules","videoUsage","isCloudRecordingAllowed","getSelectedSystemId","aiDeterrenceUsage","canUseAIDeterrence","ScenesController","dragCardsConfig","_document$querySelect","copy","direction","revertOnSpill","removeOnSpill","mirrorContainer","document","querySelector","moves","_el","_container","handle","isReordering","classList","contains","toggleReorder","container","nodes","from","children","childEl","_childEl$querySelecto","getAttribute","sortedScenes","appendChild","saveReorder","_buttonAnimation","_closest$querySelecto","_evt$target","closest","querySelectorAll","el","idx","dataset","sceneId","finally","confirmAction","failure","css","getText","tokens","getTextName","showConfirmationDialog","editScene","SceneEdit","deleteScene","destroyRecord","ScenesIndexRoute","EmberScenes","console","deactivate","AutomationSchedulesBuilderActionDetails","scheduleEvent","schedule","scheduleEvents","followUpEvent","at","actionSelectionType","MultipleDevices","_scheduleEvent$belong","allDevices","selectedDeviceIds","selectedEventId","enabledDeviceIds","flatMap","localeCompare","availableExtraDevices","allExtraDeviceOptions","selectedExtraDeviceOptionIds","extraDeviceOption","availableActions","allEvents","enabledEventIds","allTemplateDeviceIds","selectedDeviceId","hasExtraDeviceOptions","hasDevices","updateActionDevices","updateActionExtraDeviceOptions","updateActionEvent","_items$filter$","scheduleEventsCount","updateFollowUpEventData","nextButtonDisabled","scheduleDevices","currentScheduleFollowUpOptions","availableEvents","currentTemplate","availableFollowUpOptions","followUpOptions","AutomationSchedulesBuilderActionDetailsLights","firstEvent","objectAt","updateExtraData","showDimmerSelection","setLevel","newLevel","AutomationSchedulesBuilderActionDetailsLightsRoute","AutomationSchedulesBuilderActionDetailsRoute","EmberScheduleBuilderActionDetails","templates","resolvedTemplates","resolvedSchedule","resolvedAvailableTemplates","actionDevicesArrays","actionExtraDeviceOptions","actionExtraDeviceOptionsArrays","_ref3","actionEvents","_extraAction$schedule","extraAction","indexRouteId","scheduleDetailsRoute","EmberScheduleBuilderAction","AutomationSchedulesBuilderActionIndex","allRuleActionTypes","allScheduleActionTypes","enabledFeatures","filteredScheduleActionTypeIds","_schedule$actionType","_items$find","currentScheduleActionTypeId","_schedule$scheduleEve","_schedule$scheduleEve2","occurrenceType","selectedDays","AutomationSchedulesBuilderActionRoute","resolvedSchedules","_resolvedSchedules$sc","occurrenceTypeId","timeTypeId","resolvedTemplate","resolvedFilteredScheduleTemplates","uniq","resolvedTempaltes","AutomationSchedulesBuilderAdditionalOptionRoute","EmberScheduleBuilderAdditionalOption","AutomationScheduleBuilderFollowUpController","specificTime","followUpScheduleEvent","selectedSpecificTime","timeType","modelTimeType","selectedTimeType","selectedEvent","modelFollowupEvent","timeTypeItems","allTimeTypes","timeItem","followUpEventItems","validEvents","timeTypeUpdated","_ref4","specificTimeUpdated","updatedSelectedTime","followUpEventUpdated","_items$find2","_ref5","saveAndTransition","showTimeOfDayPicker","newFollowUpScheduleEvent","AutomationSchedulesBuilderFollowUpRoute","EmberScheduleBuilderFollowUp","filteredTemplates","resolvedFilteredTemplates","previousEvent","previousEventId","previousTimeTypeId","followUp","resolvedFollowUpOption","resolvedEvents","events","availableTimeTypes","resolvedTimeTypes","SchedulesBuilderController","EmberScheduleBuilderTime","followUps","firstScheduleEvent","followupEvents","triggerData","IconData","timeDescription","dateDescription","localizeAndFormatTime","isSpecificDay","showSpecificDateComponent","localizeAndFormatDate","subDescription","scheduledDays","extraDescription","sortedDays","weekends","SUNDAY_INT","SATURDAY_INT","weekdays","MONDAY_INT","TUESDAY_INT","WEDNESDAY_INT","THURSDAY_INT","FRIDAY_INT","everyday","num","actionData","actionDevicesArray","concatenatedDeviceNames","extraDeviceOptionNames","ed","followUpEventData","returnData","_followupEvents$lengt","fu","scheduleTime","displayTime","formattedTime","format","time","e","scheduleDate","displayDate","formattedDate","date","defaultFollowUpIcon","canCreateAdditionalFollowUps","maxFollowUps","isSavable","canUserCreate","_schedule$name","EmberAutomationSchedules","_err$","_schedule$name2","defaultName","rollbackScheduleAttributes","AutomationSchedulesBuilderIndexRoute","AutomationSchedulesBuilderMobileNoSupportController","AutomationSchedulesBuilderMobileNoSupportRoute","EmberScheduleBuilderMobileNoSupport","AutomationSchedulesBuilderRoute","id_schedule","resolve","AutomationScheduleBuilderTimeController","filteredOccurrenceTypeIds","selectedOccurrenceType","allOccurrenceTypes","filteredTimeTypesIds","currentTimeType","currentSpecificTime","modelSpecificTime","defaultDate","getHours","setMinutes","round","getMinutes","currentOccurrenceType","modelOccurrenceType","getMaxDate","setFullYear","getFullYear","getMinDate","currentSpecificDays","modelSpecificDays","selectedSpecificDays","isCurrentSpecificDaysValid","timeItems","enabledTimeTypeIds","occurrenceItems","enabledOccurenceTypeIds","updateTimeSelection","selectedTimeItem","updateTimeSpecificTime","updateSpecificTime","getMonth","getDate","updateTimeSpecificDate","updateSpecificDate","updateOccurrence","selectedOccurrenceItem","_ref6","showSpecificDaysComponent","updateOccurrenceSpecificDays","_ref7","_currentTimeType$isEm","_currentOccurrenceTyp","saveDataToModel","showSpecificTimeOption","showSpecificDateOption","AutomationSchedulesBuilderTimeRoute","scheduleActionType","firstEventId","followUpEventId","followUpTimeTypeId","templateActionType","followUpOption","availableEventIds","resolvedTimeTypeArray","resolvedFilteredTempaltes","resolvedFilteredTemplate","resolvedOccurrenceTypeArrays","newScheduleItems","EmberScheduleBuilderPageUrl","LightSchedule","ScheduleRuleEdit","ShadeSchedule","Shade","scheduleGroup","VideoSchedule","VideoAddSvrRecordingSchedule","EmberVideoSdCardSchedule","videoScheduleTransitionFunction","AccessControlLockUnlockSchedule","AccessControlScheduleEdit","WifiSchedule","Router","EmberEditWifiSchedules","SchedulesIndexController","BaseAutomationController","canCreateEmberSchedules","createNewSchedule","allowedSchedules","schedules","scheduleDeviceType","routeIds","transitionFn","transitionFnArgs","routes","routeId","getObjProperties","itemFn","EmberLightsSchedules","EmberShadesSchedules","EmberVideoSchedules","SchedulesIndexRoute","svrs","sdCardCameras","videoScheduleSuggestions","EditSchedulesController","profiles","p","isManagedProfile","canSaveSchedule","_this$resolvedModel$s","daysActive","isLoginAsLoginRep","changeProfile","newProfile","updateWeeklySchedule","openDeleteModal","showDeleteModal","delete","deleteSchedule","saveWifiSchedule","buttonAnimation","profile","transitionBack","EmberEditWifiSchedulesRoute","_params$id_schedule","isActive","SmartArmingNightEdit","SmartArmingController","SmartArmingMorningEdit","SmartArmingIndexController","smartArmingRules","disarmRule","armRule","toggleEnabled","isEnabled","queryParamConfig","SmartArmingRoute","EmberSmartArming","nav","EmberPartitionsSmartArming","sensors","isMobileApp_","RulesBuilderFeatureDetails","sortedDevices","AutomationRulesBuilderMessage","computedMessageGroups","messageGroups","mg","messages","desc","imageUrl","staticImagePath","eq_","segmentedTimePicker_","ScheduleBuilderTimeSelector","segmentTimeChanged","newTimeSegment","onChange","hour","selectedSegmentTime","AutomationSharedActionSlider","templateOnlyComponent","toolTip_","ExtraOptionDetails","initializeTooltipVisibility","_this$args$item$props","tooltipVisibility","setTooltipVisibility","detailId","isVisible","simpleBinaryButtonList_","automationRulesBuilderExtraOptionDetails_","RBButtonItem","style","_this$args$items$","htmlSafe","firstItem","firstItemIcon","_this$firstItem$icon","fillColor","ADC_SVG_FILL_COLORS","AutomationSharedEditTitle","focusInput","_document$getElementB","getElementById","focus","isFulfilled_","safeHtml_","FeatureSummary","alwaysEditIcon","_this$args$alwaysEdit","isFeaturePopulated","displayDescription","_this$args$descriptio","_this$args$extraDescr","MobileNoSupport","SelectFeatureComponent","empty","featureItems","allFeatures","selectedFeatureType","feature","_enabledFeatures$some","isSupported","enabledFeature","onClick","updateSelectedFeature","f","EditPage","sensorBasedScheduleConst","startTimeModel","segmentedStartTime","endTimeModel","segmentedEndTime","validSensors","Motion","ClimaxPIRCamera","PowerGPIRCamera","DSCPIRCamera","isDisarm","Contact","sensorsList","sensor","split","durationItems","timeList","parseDuration","radioItems","isSensorBased","hasSensorBased","hasSmartDisarmOption","isTimeSelectionValid","getDateForTime","newTime","setDate","scheduleTypeChange","_this$storedSensorSel","_this$storedHasCutoff","storedSensorSelection","cutoffTime","storedHasCutoffTime","changeRuleValue","changeStartEndTime","setActiveSensors","openCheckboxModal","CheckboxModal","topText","valueChange","reject","t_0","SmartArmingHeaderBar","validationError_","EditDeviceView","saveDevice","successNotification","_this$args$beforeDevi","_this$args","_this$args$deviceSave","_this$args2","beforeDeviceSaved","deviceSaved","selectAll","setEach","UiConnector","stringFunction","string","isHTMLSafe","createStringHelperFunction","_htmlSafe","helper"],"sourceRoot":""}