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ACpG,GAOHxC,IAAAiF,EAAAA,EAAAA,GAAAtF,GAAAuF,UAAA,QAnCIC,EAAAA,SAAO,CAAAC,cAAA,EAAAC,YAAA,EAAAC,UAAA,EAAAC,YAAA,QAAAN,EAAAA,EAAAA,GAAAtF,GAAAuF,UAAA,mBAAArG,IAAA2G,OAAAC,yBAAA9F,GAAAuF,UAAA,mBAAAvF,GAAAuF,WAAAjF,IAAAgF,EAAAA,EAAAA,GAAAtF,GAAAuF,UAAA,sBAAAnG,IAAA,CAAAqG,cAAA,EAAAC,YAAA,EAAAC,UAAA,EAAAC,YAAA,OAAA5F,KAD6B8G,EAAAA,EAAAA,sBAAAC,GAAA6I,I,wCCtBzC,UAAA7J,EAAAA,EAAAA,uBAAA,67EAAAC,IAAA,CAAAG,EAAAA,EAAA+J,GAAAA,EAAAC,GAAAA,EAAA/J,EAAAA,EAAAlD,EAAAA,OAAAkN,GAAAA,GAAA,kBCaMC,GAA+BC,MACrC,IAAAxJ,EAAAA,EAAAA,sBAAAC,GAAesJ,ICdf,IAAAtK,EAAAA,EAAAA,uBAAA,87QAAAC,IAAA,CAAAuK,GAAAvJ,GAAAA,EAAAK,EAAAA,GAAAJ,GAAAA,EAAAkJ,GAAAA,EAAA5I,GAAAA,EAAAJ,GAAAA,EAAAM,GAAAA,EAAA+I,GAAAlJ,GAAAA,EAAAlB,EAAAA,EAAAsB,GAAAA,EAAA+I,GAAAA,EAAArJ,GAAAA,GAAAsJ,GAAAlJ,GAAAA,EAAAmJ,EAAAA,OAAA,kB,OCKA,IAKqB1R,IADpBkP,EAAAA,EAAAA,GAAS,CAAEC,KAAM,oCAAqClP,CAAAc,GAAvD,cAC6C4Q,MAAqB5Q,IAA9B8G,EAAAA,EAAAA,sBAAAC,GAAA9H,G","sources":["./components/automation/rules/rule-collection/base-rule-collection.js","./components/automation/rules/rule-collection/rule-subsections/index.hbs","./components/automation/rules/rule-collection/rule-subsections/index.ts","./components/automation/rules/rule-collection/camera-rule-collection/index.hbs","./components/automation/rules/rule-collection/camera-rule-collection/index.ts","./components/automation/rules/rule-collection/edit-and-delete-buttons/index.hbs","./components/automation/rules/rule-collection/edit-and-delete-buttons/index.ts","./components/automation/rules/rule-collection/rule-item/index.hbs","./components/automation/rules/rule-collection/rule-item/index.ts","./components/automation/rules/rule-collection/index.hbs","./components/automation/rules/rule-collection/index.js"],"sourcesContent":["// Do not copy this deprecated usage. If you see this, please fix it\n// eslint-disable-next-line ember/no-classic-components\nimport Component from '@ember/component';\nimport { action, computed, get, set, setProperties } from '@ember/object';\nimport { alias, or } from '@ember/object/computed';\nimport { inject as service } from '@ember/service';\nimport { task } from 'ember-concurrency';\nimport { Disconnected, Initializing } from 'customer-site/enums/ConnectionState';\nimport { editItem } from 'customer-site/utils/video/rules-edit-transition';\n\n/**\n * Resets the properties related to displaying the schedule's recording status\n * for when the status is being loaded (for the first time or subsequent times),\n * and then calls the task to get the recording status.\n *\n * @param {models.automation.BaseAutomationItem} item The schedule to set the properties on.\n */\nfunction resetAndLoadRecordingStatusProperties(item) {\n setProperties(item, {\n statusMessageText: '',\n isRecordingStatusError: false,\n isRecordingStatusWarning: false,\n isRecordingStatusLoading: true\n });\n\n this.getRecordingStatusTask.perform(item);\n}\n\n/**\n * @classdesc\n * Base Rule Collection\n */\nexport default class RulesCollection extends Component {\n @service contextManager;\n @service intl;\n @service media;\n @service modals;\n @service navigation;\n @service notificationManager;\n @service store;\n\n tagName = '';\n\n /**\n * The (localized) text to describe each item in this collection (e.g. \"rule\", \"schedule\").\n *\n * @type {String}\n */\n typeText = '';\n\n /**\n * Indicates the host device has a wide screen.\n *\n * @type {boolean}\n */\n @or('media.{isDesktop,isDesktopLarge,isDesktopGiant}')\n isWideScreen;\n\n /**\n * Whether or not we should check whether the rules/schedules are currently recording.\n *\n * @type {boolean}\n */\n checkRecordingStatus = false;\n\n /**\n * The items for this automation items collection.\n *\n * @type {Array}\n */\n items = [];\n\n /**\n * Whether or not the camera-rules-collection has loaded all of the rules' data.\n *\n * @type {boolean}\n */\n cameraGroupsLoaded = false;\n\n /**\n * Whether or not the rule item is a VOD rule or supports Third Party Analytics.\n *\n * @param {models.automation.BaseAutomationItem} item\n * @returns True if the item isVODRule or supportsThirdPartyAnalytics, false otherwise.\n */\n isVODOrAnalytics(item) {\n return item.isVODRule || item.supportsThirdPartyAnalytics;\n }\n\n /**\n * A task that gets the recording status of a rule/schedule.\n * Only 4 requests will be processed at a time to avoid blocking the site.\n * All other requests will be enqueued until everything is resolved.\n *\n * @param {models.automation.BaseAutomationItem} item\n *\n * @returns {Generator<*, void, *>}\n */\n @task({ enqueue: true, maxConcurrency: 4 }) *getRecordingStatusTask(item) {\n const recordingStatus = item.recordingStatus.isFulfilled\n ? yield item.recordingStatus.reload()\n : yield item.recordingStatus;\n\n const isRecordingStatusLoading = false;\n let isRecordingStatusError = false,\n isRecordingStatusWarning = false,\n statusMessageText = '';\n\n if (recordingStatus) {\n statusMessageText = get(recordingStatus, 'statusMessageText');\n const connectionState = get(recordingStatus, 'connectionState');\n if (connectionState === Disconnected) {\n isRecordingStatusError = true;\n } else if (connectionState === Initializing) {\n isRecordingStatusWarning = true;\n }\n } else {\n // If there is no recording status, but we are missing the status response\n // Then just assume it was an error due to failing to get status.\n isRecordingStatusError = true;\n }\n\n setProperties(item, {\n statusMessageText,\n isRecordingStatusError,\n isRecordingStatusWarning,\n isRecordingStatusLoading\n });\n }\n\n /**\n * Computes to an object of rule items.\n *\n * @type {Array}\n */\n @computed('checkRecordingStatus', 'getRecordingStatusTask', 'items')\n get ruleItems() {\n const items = this.items,\n checkRecordingStatus = this.checkRecordingStatus;\n\n if (!checkRecordingStatus) {\n // Resetting the css class so that the error doesn't display on pages it wasn't intended to be displayed on.\n items.forEach((item) => set(item, 'cssClass', ''));\n return items;\n }\n\n items.forEach((item) => {\n // We only want to get status if we support it for this rule.\n if (!item.hasRecordingStatus) {\n return;\n }\n\n resetAndLoadRecordingStatusProperties.call(this, item, false);\n });\n\n return items;\n }\n\n /**\n * Computes to an array of Stories cameras.\n *\n * @type {Array}\n */\n @computed()\n get ovCameras() {\n return (async () => {\n const cams = await this.store.findAll('video/devices/ov-ready-camera');\n return cams.filter((cam) => cam.supportsStories);\n })();\n }\n\n /**\n * Alias to validate if the page is being displayed in a mobile app.\n *\n * @type {boolean}\n */\n @alias('contextManager.identityModel.isMobileApp')\n isMobileApp;\n\n /**\n * Contact service provider message (alias)\n *\n * @type {String}\n */\n @alias('contextManager.identityModel.dealer.contactServiceProviderMessage')\n contactServiceProviderMessage;\n\n /**\n * The header text for the trigger section.\n *\n * @type {String}\n */\n triggerText = '';\n\n /**\n * The header text for the time section.\n *\n * @type {String}\n */\n timeText = '';\n\n /**\n * The hover text for the lock icon on a dealer locked rule.\n *\n * @type {String}\n */\n @computed('contactServiceProviderMessage')\n get dealerLockedRuleText() {\n return (\n this.intl.t('generic.rules.ruleHasBeenLockedByServiceProvider') + ' ' + this.contactServiceProviderMessage\n );\n }\n\n /**\n * The pause button's aria label to use for screen readers\n *\n * @param {models.automation.BaseAutomationItem} item\n */\n @action ariaLabelPauseText(item) {\n return this.intl.t('components.automation.rules.rule-collection.pauseButton', { ruleName: item.name });\n }\n\n /**\n * The hover text for the icon for a remote monitoring rule.\n *\n * @type {String}\n */\n @computed('contactServiceProviderMessage')\n get remoteMonitoringRuleText() {\n return this.intl.tc(this, 'remoteMonitoringMessage', {\n contactServiceProviderMessage: this.contactServiceProviderMessage\n });\n }\n\n /**\n * The function to call when the rule is toggled.\n *\n * @param item\n * @returns {Promise}\n */\n @action async statusToggled(item) {\n // Toggle rule on/off.\n await item\n .submitCustomApiCall(`${item.isOn ? 'pause' : 'resume'}Rule`)\n .then(() => (item.isPaused = !item.isPaused));\n }\n\n /**\n * Redirects to the edit page for the specified automation item.\n *\n * @param {models.automation.BaseAutomationItem} item\n */\n @action editItem(item, queryParams) {\n editItem(item, this.contextManager, this.navigation, queryParams);\n }\n\n /**\n * Deletes the given automation item if confirmed by the user.\n *\n * @param {models.automation.BaseAutomationItem} item\n */\n @action deleteItem(item) {\n const itemName = item.name,\n { intl } = this,\n deleteType = item.isSchedule ? 'schedule' : 'rule';\n\n const disableToggleEditButtons = (isProcessing) => {\n setProperties(item, {\n isDetached: isProcessing,\n editProcessing: isProcessing\n });\n };\n\n const deleteText = intl.t(`components.automation.rules.rule-collection.delete.${deleteType}`),\n deleteBody = intl.t(`components.automation.rules.rule-collection.confirmDelete.${deleteType}`, {\n itemName,\n showWarning: item.editPageQueryParameters.svr_device_id !== undefined\n });\n\n // Create confirmation dialog promise\n this.modals.showConfirmationDialog(deleteText, deleteBody, {\n text: deleteText,\n css: 'btn-color-danger',\n action: async () => {\n // Make toggle switch and edit button unusable if user confirms deletion.\n disableToggleEditButtons(true);\n\n try {\n await item.destroyRecord();\n\n this.notificationManager.addSuccess(\n intl.t(`components.automation.rules.rule-collection.successDelete.${deleteType}`, {\n itemName\n })\n );\n\n if (item) {\n // Refresh to re-run route hooks for updating ruleSuggestions.\n this.onRefreshModel?.();\n }\n } catch (ex) {\n item.rollback();\n\n // If delete fails, make buttons usable and set rule/schedule to no longer be detached.\n disableToggleEditButtons(false);\n }\n }\n });\n }\n\n /**\n * Refreshes the recording status of a rule/schedule.\n *\n * @param {models.automation.BaseAutomationItem} item\n */\n @action refresh(item) {\n resetAndLoadRecordingStatusProperties.call(this, item);\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n \\n \\n <:value>\\n {{#each subsection.rightIcons as |icon|}}\\n \\n {{/each}}\\n \\n \\n \\n
\",{ moduleName: \"customer-site/components/automation/rules/rule-collection/rule-subsections/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport { tracked } from '@glimmer/tracking';\nimport templateOnly from '@ember/component/template-only';\nimport SimpleListItem from '@adc/ui-components/components/simple-list/list-item';\n\nimport './_style.scss';\n\nexport class RuleSubsectionListItem extends SimpleListItem {\n @tracked rightIcons?: string[];\n @tracked disabled?: boolean;\n\n constructor(args: Partial) {\n super(args);\n this.rightIcons = args.rightIcons;\n this.disabled = args.disabled;\n }\n}\n\ninterface RuleSubsectionsSignature {\n Args: {\n subsections: RuleSubsectionListItem[];\n };\n}\n\nconst RuleSubsections = templateOnly();\n\n/**\n * @classdesc\n *\n * Component for displaying subsections of an automation rule.\n */\nexport default RuleSubsections;\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Automation::Rules::RuleCollection::RuleSubsections': typeof RuleSubsections;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck: Glint doesn\\'t seem to understand the map iteration, probably want to add a getter to convert the map to something glint understands. }}\\n{{#each-in (await this.groups) as |camera rules|}}\\n \\n
\\n
\\n
\\n {{#if (eq rules.length 0)}}\\n

{{camera.description}}

\\n {{else}}\\n

{{camera.description}}

\\n {{/if}}\\n
\\n {{#unless camera.hasMaxRules}}\\n \\n {{/unless}}\\n
\\n {{#if (eq rules.length 0)}}\\n
\\n

{{tc this \\'noRuleCreated.title\\'}}

\\n
\\n
\\n

{{tc this \\'noRuleCreated.details\\'}}

\\n
\\n {{/if}}\\n {{#each rules as |item|}}\\n
\\n
\\n
\\n \\n {{#if item.isDealerLocked}}\\n \\n {{/if}}\\n
\\n
\\n

\\n {{t \\'generic.video.checkingConnection\\'}}\\n \\n

\\n \\n
\\n
\\n
\\n

{{item.timeframe.description}}

\\n
\\n {{#each item.ruleIcons as |icon|}}\\n \\n {{/each}}\\n
\\n
\\n {{#if item.tooltipForDisabledEditAndToggle}}\\n
\\n {{item.tooltipForDisabledEditAndToggle}}\\n
\\n {{/if}}\\n
\\n \\n {{#if item.isRecordingStatusWarning}}\\n
\\n \\n
\\n {{/if}}\\n {{item.statusMessageText}}\\n
\\n
\\n \\n
\\n {{/each}}\\n
\\n
\\n{{/each-in}}\",{ moduleName: \"customer-site/components/automation/rules/rule-collection/camera-rule-collection/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport { tracked } from '@glimmer/tracking';\nimport { action, computed, get } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { TextToSpeechWithImage } from 'customer-site/enums/AIPerimeterGuardType';\nimport { EmberAutomationSchedules, EmberOvReadyRuleSelect, EmberRules } from 'customer-site/enums/CustomerPageUrl';\nimport { PackageDeliveryAlert, PackageRetrievalAlert } from 'customer-site/enums/EventType';\nimport { VideoCameras } from 'customer-site/enums/RuleFilter';\nimport {\n Person,\n Animal,\n Vehicle,\n Other,\n DeliveryVehicle,\n AnyUnfamiliarVehicle,\n SpecificFamiliarVehicle,\n Package\n} from 'customer-site/enums/SavedClipFilterOption';\nimport { BUSINESS_ACTIVITY_ANALYTICS_RULE_TYPES } from 'customer-site/models/video/devices/ov-ready-camera';\nimport { intlPath } from '@adc/i18n/path';\nimport RulesCollection from '../base-rule-collection';\nimport { RuleSubsectionListItem } from './../rule-subsections/index';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type BaseAutomationItem from 'customer-site/models/automation/base-automation-item';\nimport type AiDeterrenceUsageModel from 'customer-site/models/video/ai-deterrence-usage';\nimport type OvReadyCamera from 'customer-site/models/video/devices/ov-ready-camera';\nimport type OvRule from 'customer-site/models/video/ov-rule';\nimport type ContextManager from 'customer-site/services/context-manager';\nimport type IdentityManager from 'customer-site/services/identity-manager';\nimport type NavigationService from 'customer-site/services/navigation';\n\n/**\n * Takes an array of filter enums and returns an array of strings for the corresponding icons to display.\n */\nfunction createIconArrayFromFilter(filters: number[]): string[] {\n const iconFilters = new Map([\n [Person, 'va-person'],\n [Animal, 'va-animal'],\n [Vehicle, 'va-vehicle'],\n [Other, 'other-obj'],\n [Package, 'box-delivery'],\n [PackageDeliveryAlert, 'package-delivery'],\n [PackageRetrievalAlert, 'package-retrieval'],\n [DeliveryVehicle, 'truck'],\n [AnyUnfamiliarVehicle, 'va-vehicle'],\n [SpecificFamiliarVehicle, 'va-vehicle']\n ]),\n icons = filters.map((f) => iconFilters.get(f)) as string[];\n\n // Remove duplicates if Familiar Vehicle settings have been selected.\n return [...new Set(icons)];\n}\n\n/**\n * The formatted text to display the lights to turn on and the timeframe for the light rule.\n */\nfunction getLightRuleDetails(this: CameraRulesCollection, lights: string[], rule: OvRule): string {\n let details = '';\n\n if (lights.length == 1) {\n details += lights[0];\n } else if (lights.length == 2) {\n details += this.intl.t('generic.commaSeparatedString', {\n first: lights[0],\n second: lights[1]\n });\n } else {\n details += this.intl.tc(this, 'moreLights', {\n lightOne: lights[0],\n lightTwo: lights[1],\n additionalLights: lights.length - 2\n });\n }\n\n return this.intl.t('generic.pipeSeparatedString', {\n first: details,\n second: rule.scheduleIsDark\n ? this.intl.t('components.automation.schedule-input.onlySunset')\n : rule.lightRuleTimeframeDescription\n });\n}\n\n/**\n * Takes the list of notification addresses and returns the text to display.\n */\nfunction getNotificationsDetails(this: CameraRulesCollection, notifications: string[]): string {\n switch (notifications.length) {\n case 1:\n return this.intl.tc(this, 'recipients.oneRecipient', { recipientOne: notifications[0] });\n case 2:\n return this.intl.tc(this, 'recipients.twoRecipients', {\n recipientOne: notifications[0],\n recipientTwo: notifications[1]\n });\n default:\n return this.intl.tc(this, 'recipients.moreRecipients', {\n recipientOne: notifications[0],\n recipientTwo: notifications[1],\n additionalRecipients: notifications.length - 2\n });\n }\n}\n\n/**\n * Whether or not the card for cameras with no rules should be shown.\n */\nfunction showEmptyGroupCard(this: CameraRulesCollection): boolean {\n const routeId = this.contextManager.currentRouteData?.routeItem?.routeId as number,\n filterTags = this.contextManager.currentRouteData?.queryParams?.['filterTags'] as number[];\n\n // Don't show on Automation Schedules page, Local Recordings page,\n // or Automation rules page with other filters selected.\n return (\n (filterTags.includes(VideoCameras) && routeId != EmberAutomationSchedules) ||\n (routeId == EmberRules && filterTags.length == 0)\n );\n}\n\n/**\n * Creates a list of the OvRules for a Stories camera and their RuleSubsectionListItems to display.\n */\nasync function createCameraGroups(this: CameraRulesCollection, camera: OvReadyCamera): Promise {\n if (!camera.supportsStories) {\n return;\n }\n\n const rules = await camera.ovRules;\n if (rules.length == 0) {\n // The camera has no rules, but we don't always want to display the empty camera group card.\n if (showEmptyGroupCard.call(this)) {\n this.cameraGroups.set(camera, []);\n }\n return;\n }\n\n // Business analytics rules are not included in this view, so\n // return early if the camera has no traditional OV rules.\n const numNonBAARules = rules.filter((r) => !BUSINESS_ACTIVITY_ANALYTICS_RULE_TYPES.includes(r.ruleType)).length;\n if (numNonBAARules == 0) {\n return;\n }\n\n const { intl } = this,\n off = intl.t('components.automation.rules.rule-collection.statusOff');\n let rulesFiltered = false;\n\n const items = (await Promise.all(\n rules.map(async (rule) => {\n const [lights, perimeterGuard, item] = await Promise.all([\n rule.lightsSelected,\n rule.perimeterGuardConfig,\n rule.ruleItem\n ]);\n\n // Check if the item has been filtered out by tags or by search.\n if (!this.items.includes(item)) {\n rulesFiltered = true;\n return;\n }\n\n const detectionTypeIcons = createIconArrayFromFilter(rule.ruleClassificationFilters),\n notificationIcons = createIconArrayFromFilter(\n rule.notificationFilters.concat(rule.activeParcelDetectionEvents)\n ),\n ruleSubsectionListItems = [],\n timeframe = get(item.timeframe, 'description') as string,\n isClipUploadActive = rule.isClipUploadActive,\n // Clip upload is always supported.\n recordAClipListItem = new RuleSubsectionListItem({\n description: intl.t('video.rules.analytics.draw.recordAClipTitle'),\n icon: 'video-record',\n // Details and icons are not shown for disabled sections.\n details: isClipUploadActive ? timeframe : off,\n rightIcons: isClipUploadActive ? detectionTypeIcons : [],\n disabled: !isClipUploadActive\n });\n ruleSubsectionListItems.push(recordAClipListItem);\n\n if (camera.supportsLurkerDetection) {\n const perimeterGuardTimeframe = camera.supportsPerimeterGuardSubSchedule\n ? rule.perimeterGuardTimeframeDescription\n : timeframe,\n perimeterGuardTitle = intl.t('components.video.perimeter-guard-rule.perimeterGuard'),\n perimeterGuardIcons = createIconArrayFromFilter(\n rule.notificationFilters.concat(rule.activeParcelDetectionEvents.length ? [Package] : [])\n ),\n aiDeterrenceEnabled =\n perimeterGuard.aIPerimeterGuardType === TextToSpeechWithImage && perimeterGuard.enabled,\n showAIDWarning = aiDeterrenceEnabled && this.isAIDOverQuota,\n perimeterGuardListItem = new RuleSubsectionListItem({\n description: aiDeterrenceEnabled\n ? intl.t('generic.pipeSeparatedString', {\n first: perimeterGuardTitle,\n second: intl.t('components.video.perimeter-guard-rule.aiDeterrenceEnabled')\n })\n : perimeterGuardTitle,\n icon: showAIDWarning ? 'issue' : 'alarm',\n details: showAIDWarning\n ? intl.t('components.video.perimeter-guard-rule.aiDeterrencePaused')\n : perimeterGuard.enabled\n ? perimeterGuardTimeframe\n : off,\n rightIcons: perimeterGuard.enabled ? perimeterGuardIcons : [],\n disabled: !perimeterGuard.enabled\n });\n ruleSubsectionListItems.push(perimeterGuardListItem);\n }\n\n if (rule.canCreateLightRule) {\n const lightAutomationConfigured = lights.length > 0,\n lightAutomationListItem = new RuleSubsectionListItem({\n description: intl.t('components.video.analytics-light-rule.lightAutomationHeader'),\n icon: 'feature-lights',\n details: lightAutomationConfigured\n ? getLightRuleDetails.call(\n this,\n lights.map((l) => l.description),\n rule\n )\n : off,\n rightIcons: lightAutomationConfigured ? createIconArrayFromFilter(rule.lightRuleFilters) : [],\n disabled: !lightAutomationConfigured\n });\n ruleSubsectionListItems.push(lightAutomationListItem);\n }\n\n // Notifications are always supported.\n const notificationsConfigured = rule.hasSelectedRecipients,\n notificationsDetails = notificationsConfigured\n ? getNotificationsDetails.call(this, rule.selectedNotifications)\n : off,\n notificationsListItem = new RuleSubsectionListItem({\n description: intl.t('generic.notifications'),\n icon: 'feature-notifications',\n details: notificationsDetails,\n rightIcons: notificationsConfigured ? notificationIcons : [],\n disabled: !notificationsConfigured\n });\n ruleSubsectionListItems.push(notificationsListItem);\n\n item.set('subsections', ruleSubsectionListItems);\n item.set('ruleIcons', detectionTypeIcons);\n return item;\n })\n )) as unknown as (OvRule | undefined)[];\n\n // Remove filtered out rules and sort alphabetically.\n const filteredItems = items.filter((item) => item != undefined) as OvRule[];\n filteredItems.sort((ruleA, ruleB) => ruleA.name.localeCompare(ruleB.name));\n\n // We will want to add this camera group unless all of its rules have been filtered out.\n if (!rulesFiltered || filteredItems.length > 0) {\n this.cameraGroups.set(camera, filteredItems as unknown as BaseAutomationItem[]);\n }\n}\n\n@intlPath({ path: 'automation/rules/rule-collection/camera-rule-collection' })\nexport default class CameraRulesCollection extends RulesCollection {\n @service declare contextManager: ContextManager;\n @service declare identityManager: IdentityManager;\n @service declare intl: ADCIntlService;\n @service declare navigation: NavigationService;\n\n @tracked aiDeterrenceUsage: AiDeterrenceUsageModel;\n @tracked cameraGroups: Map;\n @tracked cameras: OvReadyCamera[];\n @tracked items: BaseAutomationItem[];\n\n onCameraGroupsLoaded: (value: boolean) => void;\n\n constructor(args: CameraRulesCollection) {\n super(args);\n this.aiDeterrenceUsage = args.aiDeterrenceUsage;\n this.cameraGroups = new Map();\n this.cameras = args.cameras;\n this.items = args.items;\n this.onCameraGroupsLoaded = args.onCameraGroupsLoaded;\n }\n\n /**\n * Is this customer over their AI Deterrence event quota?\n */\n @computed('aiDeterrenceUsage.{eventsThisMonth,maxEventQuota}', 'identityManager.identityModel.canUseAIDeterrence')\n get isAIDOverQuota(): boolean {\n return (\n (this.identityManager.identityModel?.canUseAIDeterrence ?? false) &&\n this.aiDeterrenceUsage.eventsThisMonth >= this.aiDeterrenceUsage.maxEventQuota\n );\n }\n\n /**\n * Returns a map of Stories OvReadyCameras to their BaseAutomationItems to display on the rules page.\n */\n @computed('cameras', 'cameraGroups', 'items')\n get groups(): Promise> {\n return (async () => {\n await Promise.all(this.cameras.map((camera) => createCameraGroups.call(this, camera)));\n\n // Sort the cameras alphabetically by name.\n const cameraGroups = new Map(\n [...this.cameraGroups.entries()].sort((a, b) => {\n const nameA = get(a[0], 'description') as string,\n nameB = get(b[0], 'description') as string;\n return nameA.localeCompare(nameB);\n })\n );\n this.onCameraGroupsLoaded(true);\n return cameraGroups;\n })();\n }\n\n /**\n * Takes the user to the analytics select page with the camera already selected.\n */\n @action addRule(cameraId: string): void {\n this.navigation.transitionToRouteId(EmberOvReadyRuleSelect, 'new', {\n queryParams: {\n deviceId: cameraId\n }\n });\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"
\\n {{#if @item.canBeEdited}}\\n {{#if @item.displayViewButtonInsteadOfEdit}}\\n \\n {{else}}\\n \\n {{/if}}\\n {{/if}}\\n {{#if @item.canBeDeleted}}\\n \\n {{/if}}\\n
\",{ moduleName: \"customer-site/components/automation/rules/rule-collection/edit-and-delete-buttons/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { computed } from '@ember/object';\nimport { or } from '@ember/object/computed';\nimport { service } from '@ember/service';\n\nimport './_style.scss';\nimport type { Registry as ServiceRegistry } from '@ember/service';\nimport type BaseAutomationItem from 'customer-site/models/automation/base-automation-item';\n\nexport interface EditAndDeleteButtonsSignature {\n Args: {\n item: BaseAutomationItem & { editProcessing?: boolean };\n editItem: VoidFunction;\n deleteItem: VoidFunction;\n dealerLockedRuleText: string;\n };\n}\n\n/**\n * @classdesc\n * The edit and delete icon buttons for an automation item.\n */\nexport default class EditAndDeleteButtons extends Component {\n @service declare intl: ServiceRegistry['adc-intl'];\n\n /**\n * The text to use for the edit button tooltip.\n */\n @computed('args.dealerLockedRuleText', 'args.item.{isDealerLocked,tooltipForDisabledEditAndToggle}')\n get editTooltipText(): string {\n const { item, dealerLockedRuleText } = this.args;\n\n return item.isDealerLocked\n ? dealerLockedRuleText\n : item.tooltipForDisabledEditAndToggle || this.intl.t('generic.edit');\n }\n\n /**\n * The edit button's aria label to use for screen readers\n */\n get ariaLabelEditText(): string {\n const { item } = this.args;\n return this.intl.t('components.automation.rules.rule-collection.editButton', { ruleName: item.name });\n }\n\n /**\n * The delete button's aria label to use for screen readers\n */\n get ariaLabelDeleteText(): string {\n const { item } = this.args;\n return this.intl.t('components.automation.rules.rule-collection.deleteButton', { ruleName: item.name });\n }\n\n /**\n * Indicates whether the edit button should be disabled.\n */\n @or('args.item.editProcessing', 'args.item.isEditButtonDisabled')\n declare editButtonDisabled: boolean;\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Automation::Rules::RuleCollection::EditAndDeleteButtons': typeof EditAndDeleteButtons;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck: Looks like `@items` can be multiple things, which glint doesn\\'t like much. }}\\n
\\n \\n\\n
\\n {{#each @items as |condition index|}}\\n
\\n
\\n {{#if (eq index 0)}}\\n \\n {{/if}}\\n

{{safe-html condition.description}}

\\n {{#if (and @subItem (eq index 0))}}\\n
\\n

{{@subItem.description}}

\\n {{#if @subItem.hasIcon}}\\n \\n {{/if}}\\n
\\n {{/if}}\\n
\\n {{#if condition.hasIcon}}\\n
\\n \\n {{#if condition.hasSecondaryIcon}}\\n \\n \\n \\n {{/if}}\\n
\\n
\\n
\\n
\\n {{/if}}\\n
\\n {{/each}}\\n
\\n
\",{ moduleName: \"customer-site/components/automation/rules/rule-collection/rule-item/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport templateOnlyComponent from '@ember/component/template-only';\n\nimport './_style.scss';\n\ninterface RulesRulesCollectionRuleItemSignature {\n Args: {\n className: string;\n label: string;\n items: unknown[];\n subItem?: unknown;\n };\n}\n\nconst RulesRulesCollectionRuleItem = templateOnlyComponent();\nexport default RulesRulesCollectionRuleItem;\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Automation::Rules::RulesCollection::RuleItem': typeof RulesRulesCollectionRuleItem;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n{{#if this.cameraGroupsLoaded}}\\n {{#each this.ruleItems as |item|}}\\n {{#unless item.subsections}}\\n \\n
\\n
\\n
\\n

{{item.name}}

\\n {{#if item.isDealerLocked}}\\n \\n {{/if}}\\n {{#if (and @hasCameraArmingAccess item.isEscalatedEvent)}}\\n \\n {{/if}}\\n
\\n
\\n

\\n {{t \\'generic.video.checkingConnection\\'}}\\n \\n

\\n {{#unless this.isWideScreen}}\\n \\n {{/unless}}\\n {{#if item.isSuggested}}\\n

\\n {{tc this (if item.isOn \\'statusOn\\' \\'statusOff\\')}}\\n

\\n {{else if item.canBePaused}}\\n {{#if item.warningTextForRestrictedRule}}\\n
\\n \\n

{{item.warningTextForRestrictedRule}}

\\n
\\n {{/if}}\\n {{#if (and (this.isVODOrAnalytics item) this.isWideScreen)}}\\n \\n
\\n \\n
\\n {{/if}}\\n {{#unless (this.isVODOrAnalytics item)}}\\n {{#if item.toggleText}}\\n

{{item.toggleText}}

\\n {{/if}}\\n \\n {{/unless}}\\n {{else}}\\n {{#if item.warningTextForRestrictedRule}}\\n
\\n \\n

{{item.warningTextForRestrictedRule}}

\\n
\\n {{/if}}\\n

\\n {{tc this (if item.isOn \\'statusOn\\' \\'statusOff\\')}}\\n

\\n {{/if}}\\n
\\n
\\n
\\n {{#unless this.isWideScreen}}\\n {{#if (and item.canBePaused (this.isVODOrAnalytics item))}}\\n \\n {{/if}}\\n {{/unless}}\\n
\\n {{#if item.tooltipForDisabledEditAndToggle}}\\n
\\n {{item.tooltipForDisabledEditAndToggle}}\\n
\\n {{/if}}\\n
\\n \\n \\n \\n
\\n {{#unless (this.isVODOrAnalytics item)}}\\n {{#if this.isWideScreen}}\\n \\n {{/if}}\\n {{/unless}}\\n
\\n
\\n
\\n \\n {{#if item.isRecordingStatusWarning}}\\n
\\n \\n
\\n {{/if}}\\n {{item.statusMessageText}}\\n
\\n
\\n
\\n {{/unless}}\\n {{/each}}\\n{{else}}\\n \\n{{/if}}\",{ moduleName: \"customer-site/components/automation/rules/rule-collection/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport { intlPath } from '@adc/i18n/path';\nimport BaseRuleCollection from './base-rule-collection';\n\nimport './_style.scss';\n\n/**\n * @classdesc\n * The UI to represent a collection of automation rules.\n */\n@intlPath({ path: 'automation.rules.rule-collection' })\nexport default class RulesCollection extends BaseRuleCollection {}\n"],"names":["resetAndLoadRecordingStatusProperties","item","setProperties","statusMessageText","isRecordingStatusError","isRecordingStatusWarning","isRecordingStatusLoading","this","getRecordingStatusTask","perform","RulesCollection","_dec","or","_dec2","task","enqueue","maxConcurrency","_dec3","computed","_dec4","_dec5","alias","_dec6","_dec7","_dec8","_class","Component","constructor","arguments","_initializerDefineProperty","_descriptor","_descriptor2","_descriptor3","_descriptor4","_descriptor5","_descriptor6","_descriptor7","_defineProperty","_descriptor8","_descriptor9","_descriptor10","isVODOrAnalytics","isVODRule","supportsThirdPartyAnalytics","recordingStatus","isFulfilled","reload","get","connectionState","Disconnected","Initializing","ruleItems","items","checkRecordingStatus","forEach","hasRecordingStatus","call","set","ovCameras","store","findAll","filter","cam","supportsStories","dealerLockedRuleText","intl","t","contactServiceProviderMessage","ariaLabelPauseText","ruleName","name","remoteMonitoringRuleText","tc","statusToggled","submitCustomApiCall","concat","isOn","then","isPaused","editItem","queryParams","contextManager","navigation","deleteItem","itemName","deleteType","isSchedule","disableToggleEditButtons","isProcessing","isDetached","editProcessing","deleteText","deleteBody","showWarning","undefined","editPageQueryParameters","svr_device_id","modals","showConfirmationDialog","text","css","action","async","_this$onRefreshModel","destroyRecord","notificationManager","addSuccess","onRefreshModel","ex","rollback","refresh","_applyDecoratedDescriptor","prototype","service","configurable","enumerable","writable","initializer","Object","getOwnPropertyDescriptor","createTemplateFactory","scope","simpleList_","simpleListItem_","eq_","svgSymbol_","RuleSubsectionListItem","SimpleListItem","args","super","rightIcons","disabled","tracked","RuleSubsections","templateOnly","setComponentTemplate","TEMPLATE","await_","listRowItem_","buttonIcon_","t_","on","fn","tc_","uiIconTooltip_","t_0","spinnerSvg_","automationRulesRuleCollectionPauseBar_","automationRulesRuleCollectionRuleSubsections_","createIconArrayFromFilter","filters","iconFilters","Map","Person","Animal","Vehicle","Other","Package","PackageDeliveryAlert","PackageRetrievalAlert","DeliveryVehicle","AnyUnfamiliarVehicle","SpecificFamiliarVehicle","icons","map","f","Set","getLightRuleDetails","lights","rule","details","length","first","second","lightOne","lightTwo","additionalLights","scheduleIsDark","lightRuleTimeframeDescription","getNotificationsDetails","notifications","recipientOne","recipientTwo","additionalRecipients","showEmptyGroupCard","_this$contextManager$","_this$contextManager$2","routeId","currentRouteData","routeItem","filterTags","includes","VideoCameras","EmberAutomationSchedules","EmberRules","createCameraGroups","camera","rules","ovRules","cameraGroups","r","BUSINESS_ACTIVITY_ANALYTICS_RULE_TYPES","ruleType","off","rulesFiltered","Promise","all","perimeterGuard","lightsSelected","perimeterGuardConfig","ruleItem","detectionTypeIcons","ruleClassificationFilters","notificationIcons","notificationFilters","activeParcelDetectionEvents","ruleSubsectionListItems","timeframe","isClipUploadActive","recordAClipListItem","description","icon","push","supportsLurkerDetection","perimeterGuardTimeframe","supportsPerimeterGuardSubSchedule","perimeterGuardTimeframeDescription","perimeterGuardTitle","perimeterGuardIcons","aiDeterrenceEnabled","aIPerimeterGuardType","TextToSpeechWithImage","enabled","showAIDWarning","isAIDOverQuota","perimeterGuardListItem","canCreateLightRule","lightAutomationConfigured","lightAutomationListItem","l","lightRuleFilters","notificationsConfigured","hasSelectedRecipients","notificationsDetails","selectedNotifications","notificationsListItem","filteredItems","sort","ruleA","ruleB","localeCompare","CameraRulesCollection","intlPath","path","_class2","aiDeterrenceUsage","cameras","onCameraGroupsLoaded","_this$identityManager","_this$identityManager2","identityManager","identityModel","canUseAIDeterrence","eventsThisMonth","maxEventQuota","groups","entries","a","b","nameA","nameB","addRule","cameraId","transitionToRouteId","EmberOvReadyRuleSelect","deviceId","buttonSimple_","EditAndDeleteButtons","editTooltipText","isDealerLocked","tooltipForDisabledEditAndToggle","ariaLabelEditText","ariaLabelDeleteText","safeHtml_","and_","iconFill_","RulesRulesCollectionRuleItem","templateOnlyComponent","automationRulesRuleCollectionCameraRuleCollection_","automationRulesRuleCollectionEditAndDeleteButtons_","simpleBinary_","automationRulesRuleCollectionRuleItem_","array","BaseRuleCollection"],"sourceRoot":""}