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,EAAAA,EAAAA,GAAAD,EAAAE,UAAA,qBAEjCG,EAAAA,EAAAA,UAAS,4BASRJ,EAAAA,EAAAA,GAAAD,EAAAE,UAED,aAAAI,EAAAA,EAAAA,IAAG,iBAAkB,6BAatBC,EAAAA,EAAAA,GAAAP,EAAAE,UAVC,YAAAM,EAAAA,EAAAA,UAAS,kBAAmB,eA+B7BD,EAAAA,EAAAA,GAAAP,EAAAE,UAAA,UAlBCO,EAAAA,UA8BAF,EAAAA,EAAAA,GAAAP,EAAAE,UAAA,UATAO,EAAAA,UAyBJrF,EAAAA,EAAAA,sBAAAG,EAhFoB2B,E,qHCzDrB,IAAA3B,GAAAC,E,SAAAA,uBAAA,6YAAAC,IAAA,CAAAG,EAAAA,GAAA,kBAA0L8E,EAAA,IAAA9D,QCc3K,MAAM+D,UAAoBxD,EAAAA,EAAgCC,WAAAA,G,UAAA,SAAAC,W,EAC7C,K,EAAAqD,E,OAAAnD,EAAAA,EAAAA,GAAA,gB,gIAAA,CAKxB,UAAIqD,GACA,OAAOC,SAAShB,cAAc7B,KAAKC,KAAK6C,aAC5C,CAEQC,cAAAA,IAGJC,EAAAA,EAAAA,cAAa,cAAehD,KAAMA,KAAKiD,cAC3C,CAEQA,aAAAA,GACJjD,KAAKkD,SAAU,CACnB,EACJC,EAnBqBR,GAAoDV,EAAAA,EAAAA,GAAAkB,EAAAjB,UAAA,WACpEE,EAAAA,UAAO,kBAAW,CAAK,KAavBG,EAAAA,EAAAA,GAAAY,EAAAjB,UAAA,kBAJAO,EAAAA,UASJrF,EAAAA,EAAAA,sBAAAG,EAnBoBoF,E","sources":["engines/network-config-engine/components/action-sheets/wireless-connection-instructions/template.hbs/..%2Fcomponent.js-embroider-pair-component","engines/network-config-engine/components/signal-strength-icon/template.hbs/..%2Fcomponent.js-embroider-pair-component","engines/network-config-engine/components/wireless-networks-card/template.hbs/..%2Fcomponent.js-embroider-pair-component","src/components/action-sheet.hbs","src/components/action-sheet.ts","src/components/element-host.hbs","src/components/element-host.ts"],"sourcesContent":["\nimport { setComponentTemplate } from \"@ember/component\";\nimport template from \"../template.hbs\";\nimport { deprecate } from \"@ember/debug\";\n\n\ndeprecate(\"Components with separately resolved templates are deprecated. Migrate to either co-located js/ts + hbs files or to gjs/gts. Tried to lookup 'template'.\",\n false, {\n id: 'component-template-resolving',\n url: 'https://deprecations.emberjs.com/id/component-template-resolving',\n until: '6.0.0',\n for: 'ember-source',\n since: {\n available: '5.10.0',\n enabled: '5.10.0',\n },\n }\n);\n\nimport component from \"../component.js\";\nexport default setComponentTemplate(template, component);\n","\nimport { setComponentTemplate } from \"@ember/component\";\nimport template from \"../template.hbs\";\nimport { deprecate } from \"@ember/debug\";\n\n\ndeprecate(\"Components with separately resolved templates are deprecated. Migrate to either co-located js/ts + hbs files or to gjs/gts. Tried to lookup 'template'.\",\n false, {\n id: 'component-template-resolving',\n url: 'https://deprecations.emberjs.com/id/component-template-resolving',\n until: '6.0.0',\n for: 'ember-source',\n since: {\n available: '5.10.0',\n enabled: '5.10.0',\n },\n }\n);\n\nimport component from \"../component.js\";\nexport default setComponentTemplate(template, component);\n","\nimport { setComponentTemplate } from \"@ember/component\";\nimport template from \"../template.hbs\";\nimport { deprecate } from \"@ember/debug\";\n\n\ndeprecate(\"Components with separately resolved templates are deprecated. Migrate to either co-located js/ts + hbs files or to gjs/gts. Tried to lookup 'template'.\",\n false, {\n id: 'component-template-resolving',\n url: 'https://deprecations.emberjs.com/id/component-template-resolving',\n until: '6.0.0',\n for: 'ember-source',\n since: {\n available: '5.10.0',\n enabled: '5.10.0',\n },\n }\n);\n\nimport component from \"../component.js\";\nexport default setComponentTemplate(template, component);\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if (has-block \\\"trigger\\\")}}\\n {{yield to=\\\"trigger\\\"}}\\n{{/if}}\\n{{#if @isActive}}\\n <ElementHost @hostSelector=\\\"#action-sheet-host\\\">\\n <div\\n class=\\\"action-sheet surface style-body {{if this.isDocked \\'is-docked is-open\\'}}\\\"\\n {{add-delayed-css \\\"is-open\\\"}}\\n {{did-insert this.opened}}\\n {{on-click-outside (unless this.areAnyModalsOpen (prevent-default (stop-propagation @close))) capture=true}}\\n {{on \\\"transitionend\\\" (fn (mut this.isFocusTrapActive) true)}}\\n {{will-destroy this.closed}}\\n {{focus-trap\\n isActive=(and (not this.areAnyModalsOpen) this.isFocusTrapActive)\\n focusTrapOptions=this.focusTrapOptions\\n }}\\n ...attributes\\n >\\n <div class=\\\"action-sheet-header\\\">\\n <div class=\\\"action-sheet-title {{if @title \\'simple-title\\'}}\\\">\\n {{#if @title}}\\n <h4>{{@title}}</h4>\\n {{else if (has-block \\\"header\\\")}}\\n {{yield to=\\\"header\\\"}}\\n {{/if}}\\n </div>\\n <Button::Icon\\n @buttonColor=\\\"stealth\\\"\\n @icon=\\\"close\\\"\\n @iconOnly={{true}}\\n @text={{t \\\"@adc/ui-components.close\\\"}}\\n class=\\\"close-btn\\\"\\n {{on \\\"click\\\" @close}}\\n />\\n </div>\\n {{#if (has-block \\\"subheader\\\")}}\\n <div class=\\\"action-sheet-subheader\\\">\\n {{yield to=\\\"subheader\\\"}}\\n </div>\\n {{/if}}\\n <ScrollContainer>\\n <div class=\\\"body\\\">\\n {{yield}}\\n\\n <AsyncLoader @promise={{this.buttons}} as |buttons|>\\n {{#if buttons}}\\n <div class=\\\"action-sheet-button-stack passed\\\">\\n {{#each buttons as |btn|}}\\n <Button::Async\\n @text={{btn.text}}\\n @buttonAction={{btn.fn}}\\n @buttonColor={{btn.color}}\\n disabled={{btn.disabled}}\\n />\\n {{/each}}\\n </div>\\n {{/if}}\\n </AsyncLoader>\\n </div>\\n </ScrollContainer>\\n {{#if (has-block \\\"footer\\\")}}\\n {{yield to=\\\"footer\\\"}}\\n {{/if}}\\n {{#if (and @imageSrc @imageAlt)}}\\n <img class=\\\"action-sheet-logo\\\" src={{@imageSrc}} alt={{@imageAlt}} />\\n {{/if}}\\n </div>\\n </ElementHost>\\n{{/if}}\")","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { isEscapeCode } from '@adc/ember-utils/utils/a11y';\nimport { A } from '@ember/array';\nimport { assert } from '@ember/debug';\nimport { action, computed } from '@ember/object';\nimport { notEmpty } from '@ember/object/computed';\nimport { or } from '@ember/object/computed';\nimport { inject as service } from '@ember/service';\nimport { toggleBodyScroll } from '../utils/general.ts';\n\nimport type DomService from '@adc/ember-utils/services/dom';\nimport type ModalService from '../services/modals.ts';\nimport type { ButtonSimpleSignature } from './button/simple';\n\nexport interface ActionSheetButton {\n text: string;\n fn: VoidFunction;\n disabled?: boolean;\n color?: ButtonSimpleSignature['Args']['buttonColor'];\n}\n\nexport interface ActionSheetSignature {\n Element: HTMLDivElement;\n Args: {\n /** Indicates the action sheet is open. */\n isActive: boolean;\n /** Triggered when the user wants to close the action sheet. */\n close(): void;\n /** Optional title for the action sheet. */\n title?: string;\n /** Optional URI for the image to be displayed at the bottom of the action sheet. */\n imageSrc?: string;\n /** Alt text for the bottom image (must be provided if the image src is). */\n imageAlt?: string;\n /** Collection of buttons to render at the bottom of the body of the action sheet. When docked the buttons will appear stacked, 100% width, with primary buttons sorted to the top. When not docked the buttons will appear at the bottom, right aligned, with primary buttons sorted to the right. */\n buttons?: ActionSheetButton[] | Promise<ActionSheetButton[]>;\n };\n Blocks: {\n /** Optional block for rendering a trigger element. */\n trigger: [];\n /** Will render into the action sheet header, but only if a `@title` was not provided. */\n header: [];\n /** Will render into a space just below the action sheet header. */\n subheader: [];\n /** The body of the action sheet. */\n default: [];\n /** Will render below the body. */\n footer: [];\n };\n}\n\n/**\n * @classdesc\n * A popup container with a customizable title, sub-header, footer and content. Renders as a popup on large screens, and docked to the bottom of the screen with a max height slightly shorter than the screen on small screens. The main content will scroll if it overflows the action sheet.\n *\n * @see https://bitbucket.corp.adcinternal.com/projects/FALCOR/repos/adc-web-frontend/browse/addons/adc-ui-components/package/doc/action-sheet.md\n */\nexport default class ActionSheet extends Component<ActionSheetSignature> {\n @service declare media: ADCResponsiveMediaService;\n @service declare modals: ModalService;\n @service declare dom: DomService;\n\n @tracked isFocusTrapActive = false;\n\n @notEmpty('modals.modalsToRender')\n declare areAnyModalsOpen: boolean;\n\n curtain?: Element | null;\n closeListener?: string;\n\n focusTrapOptions = {\n allowOutsideClick: true,\n escapeDeactivates: false\n };\n\n @or('media.isMobile', 'media.isTabletPortrait')\n declare isDocked: boolean;\n\n @computed('args.buttons.[]', 'isDocked')\n get buttons(): Promise<ActionSheetButton[]> {\n return (async () => {\n const all = A((await this.args.buttons) ?? []),\n buttons = [...all.filterBy('color', 'primary'), ...all.rejectBy('color', 'primary')];\n\n return this.isDocked ? buttons : buttons.reverse();\n })();\n }\n\n /**\n * Called when the action sheet element is inserted.\n */\n @action opened(el: Element): void {\n // Cache curtain so we can access in closed.\n this.curtain = this.toggleCurtain(true, el);\n\n // Is the sheet NOT docked?\n if (!this.isDocked) {\n // Need to set focus trap here because element will not transition.\n this.isFocusTrapActive = true;\n\n const { close } = this.args;\n this.closeListener = this.dom.addListener(this, el, 'keyup', (evt: KeyboardEvent & { target: Element }) => {\n if (isEscapeCode(evt.code) && evt.target.tagName.toLowerCase() !== 'input') {\n close();\n }\n });\n }\n }\n\n /**\n * Called when the action sheet element is about to be removed.\n */\n @action closed(): void {\n const { closeListener } = this;\n if (closeListener) {\n this.dom.removeListener(this, closeListener);\n }\n\n this.toggleCurtain(false);\n this.isFocusTrapActive = false;\n this.curtain = null;\n }\n\n private toggleCurtain(isOpen: boolean, el = this.curtain): Element {\n assert('[@adc/ui-components] Action sheet element not found', el);\n\n toggleBodyScroll(isOpen);\n\n const curtain = el.closest('.action-sheet-host')?.querySelector('.curtain');\n assert(\n '[@adc/ui-components] Action sheet found no host or curtain, are you sure the action-sheet-host is rendered?',\n curtain\n );\n\n curtain.classList.toggle('is-open', isOpen);\n return curtain;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<div {{did-insert this.scheduleRender}}></div>\\n{{#if this.isReady}}\\n {{#in-element this.hostEl}}\\n {{yield}}\\n {{/in-element}}\\n{{/if}}\")","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\nimport { scheduleOnce } from '@ember/runloop';\n\nexport interface ElementHostSignature {\n Args: {\n /** A valid CSS selector to the element that should host the yielded content. */\n hostSelector: string;\n };\n Blocks: {\n default: [];\n };\n}\n\nexport default class ElementHost extends Component<ElementHostSignature> {\n @tracked isReady = false;\n\n /**\n * Returns the target host element.\n */\n get hostEl(): HTMLElement {\n return document.querySelector(this.args.hostSelector)!;\n }\n\n @action scheduleRender(): void {\n // Do not copy this deprecated usage. If you see this, please fix it\n // eslint-disable-next-line ember/no-runloop\n scheduleOnce('afterRender', this, this.updateIsReady);\n }\n\n private updateIsReady(): void {\n this.isReady = true;\n }\n}\n"],"names":["setComponentTemplate","template","component","TEMPLATE","createTemplateFactory","scope","elementHost_","addDelayedCss_","didInsert_","onClickOutside_","preventDefault_","stopPropagation_","on","fn","willDestroy_","focusTrap_","and_","not_","buttonIcon_","t_","scrollContainer_","asyncLoader_","buttonAsync_","_media","WeakMap","_modals","_dom","_isFocusTrapActive","_areAnyModalsOpen","_isDocked","ActionSheet","Component","constructor","arguments","_classPrivateFieldInitSpec","i","_defineProperty","allowOutsideClick","escapeDeactivates","buttons","async","all","A","_await$this$args$butt","this","args","filterBy","rejectBy","isDocked","reverse","opened","el","curtain","toggleCurtain","isFocusTrapActive","close","closeListener","dom","addListener","evt","isEscapeCode","code","target","tagName","toLowerCase","closed","removeListener","isOpen","_el$closest","length","undefined","toggleBodyScroll","closest","querySelector","classList","toggle","_ActionSheet","g","prototype","inject","tracked","notEmpty","or","n","computed","action","_isReady","ElementHost","hostEl","document","hostSelector","scheduleRender","scheduleOnce","updateIsReady","isReady","_ElementHost"],"sourceRoot":""}