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,UAAA,cA3CImD,EAAAA,QAAO,CAAAjD,cAAA,EAAAC,YAAA,EAAAC,UAAA,EAAAC,YAAA,OAAAI,E,2HCZZ,IAKqB+J,GAAa/J,EAAnB,cAA4BmJ,EAAAA,QAAazK,WAAAA,GAAA,SAAAC,YAAAC,EAAAA,EAAAA,GAAA,aAAAC,EAAA,OAAAD,EAAAA,EAAAA,GAAA,kBAAAiF,EAAA,OAAAuF,EAAAA,EAAAA,GAAA,eAI1CY,EAAAA,cAAa,CAEvB9F,KAAAA,GACI,MAAM,WAAE1C,EAAU,MAAE8H,GAAUnK,KAC1B8K,EAAwBzI,EAAWoI,cAAcf,EAAAA,iBAKrD,MAAO,CACHqB,cAJkBZ,EACjBa,YAAY,yCAA0C,CAAEC,mBAAmB,IAC3EC,MAAMC,GAAWA,EAAOC,mBAGzBC,gCAAiCP,EAC3BX,EACKa,YAAY,yCAA0C,CAAC,GACvDE,MAAMC,GAAWA,EAAOG,2BAC7B9B,EAEd,GACH9J,GAAAS,EAAAA,EAAAA,GAAAU,EAAAT,UAAA,SArBImD,EAAAA,QAAO,CAAAjD,cAAA,EAAAC,YAAA,EAAAC,UAAA,EAAAC,YAAA,OAAAiE,GAAAvE,EAAAA,EAAAA,GAAAU,EAAAT,UAAA,cACPmD,EAAAA,QAAO,CAAAjD,cAAA,EAAAC,YAAA,EAAAC,UAAA,EAAAC,YAAA,OAAAI,E","sources":["./components/ui/read-more-panel/index.hbs","./components/ui/read-more-panel/index.ts","./helpers/split.ts","./discover/content/template.hbs","./components/discover/card/index.hbs","./components/discover/card/index.ts","./discover/index/template.hbs","./assets/_route_/discover.content.js","./discover/content/controller.ts","./discover/content/route.ts","./discover/index/route.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n \\n {{yield}}\\n \\n\\n \\n\",{ moduleName: \"customer-site/components/ui/read-more-panel/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';\n\ninterface ReadMorePanelSignature {\n Element: HTMLDivElement;\n Args: {\n collapsedHeight: number;\n };\n Blocks: {\n default: [];\n };\n}\n\n/**\n * @classdesc\n * Panel that truncates contents vertically with a button to expand/collapse to a certain height.\n */\n@intlPath({ path: 'ui/read-more-panel' })\nexport default class ReadMorePanel extends Component {\n /**\n * The current state of the panel (collapsed or expanded)\n */\n @tracked collapsed = true;\n\n /**\n * Determines whether the panel has content that would be truncated when the panel is collapsed.\n */\n @action\n toggleHasOverflowCss(content: HTMLElement): void {\n const { classList, scrollHeight } = content;\n\n classList.toggle('has-overflow', scrollHeight > this.args.collapsedHeight);\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Ui::ReadMorePanel': typeof ReadMorePanel;\n }\n}\n","import Helper from '@ember/component/helper';\n\nexport interface SplitSignature {\n Args: {\n Positional: [string, string?];\n };\n Return: string[];\n}\n\nexport default class Split extends Helper {\n compute([text, delimiter = '|']: SplitSignature['Args']['Positional']): SplitSignature['Return'] {\n return text?.split(delimiter ?? '|') ?? [];\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n split: typeof Split;\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 as |data|>\\n
\\n

{{data.title}}

\\n
\\n {{#each data.content as |group|}}\\n {{#if (and this.isUpsell group.isBodyText)}}\\n \\n {{#each group.contentBlocks as |block|}}\\n
\\n {{#if block.isParagraph}}\\n

{{block.data}}

\\n {{else if block.isBulletedList}}\\n
    \\n {{#each (split block.data) as |item|}}\\n {{#if item}}\\n
  • {{item}}
  • \\n {{/if}}\\n {{/each}}\\n
\\n {{/if}}\\n
\\n {{/each}}\\n
\\n {{else}}\\n {{#each group.contentBlocks as |block|}}\\n
\\n {{#if block.isTitle}}\\n

{{block.data}}

\\n {{else if block.isParagraph}}\\n

{{block.data}}

\\n {{else if block.isBulletedList}}\\n
    \\n {{#each (split block.data) as |item|}}\\n {{#if item}}\\n
  • {{item}}
  • \\n {{/if}}\\n {{/each}}\\n
\\n {{else if block.isImage}}\\n \\n\\n {{!-- Display content pricing and hardware name next to the stock image --}}\\n {{#if (and block.isUpsellProductStockImage data.upsell.campaign)}}\\n
\\n

{{get data.upsell.campaign \\'hardwareName\\'}}

\\n\\n {{#if (get data.upsell.campaign \\'supportsHardwarePricing\\')}}\\n

{{get data.upsell.campaign \\'oneTimeFeeText\\'}}

\\n {{/if}}\\n\\n {{#if (get data.upsell.campaign \\'supportsServicePackagePricing\\')}}\\n

{{get data.upsell.campaign \\'monthlyFeeText\\'}}

\\n {{/if}}\\n
\\n {{/if}}\\n\\n {{else if block.isVideo}}\\n \\n {{/if}}\\n
\\n {{/each}}\\n {{/if}}\\n {{/each}}\\n\\n {{#if data.featureList.features}}\\n {{!-- TODO: Display features --}}\\n {{/if}}\\n\\n {{#if data.actions}}\\n
\\n {{#each data.actions as |actionButton|}}\\n \\n {{/each}}\\n
\\n {{/if}}\\n \\n\\n <:error as |PageViewError|>\\n \\n \\n
\\n \\n\",{ moduleName: \"customer-site/discover/content/template.hbs\" })","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n \\n
\\n

{{t \\\"generic.new\\\"}}

\\n

{{@article.title}}

\\n
\\n\",{ moduleName: \"customer-site/components/discover/card/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { isEnterOrSpaceCode } from '@adc/ember-utils/utils/a11y';\nimport { action } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { EmberDiscoverContent, UpsellOfferDetail2 } from 'customer-site/enums/CustomerPageUrl';\n\nimport './_style.scss';\nimport type DiscoverArticleItem from 'customer-site/models/discover/discover-article-item';\nimport type NavigationService from 'customer-site/services/navigation';\n\ninterface DiscoverCardArgs {\n Element: HTMLDivElement;\n Args: {\n article: DiscoverArticleItem;\n };\n Blocks: [];\n}\n\n/**\n * @classdesc\n * Component for a card that represents a Discover article.\n */\nexport default class DiscoverCard extends Component {\n @service declare navigation: NavigationService;\n\n /**\n * Navigates to the content page for the article\n */\n @action\n transitionToContentRoute(): void {\n const { navigation } = this,\n { article } = this.args,\n { articleId } = article;\n\n if (article.hasLegacyUpsellOffer) {\n const ids = articleId.split('-'),\n upsellPart_id = ids[0],\n upsellOffer_id = ids[1],\n params =\n upsellOffer_id !== '0'\n ? {\n queryParams: {\n upsellOffer_id,\n from_dashboard: true,\n src: 'DiscoverWeb'\n }\n }\n : {\n queryParams: {\n upsellPart_id,\n src: 'DiscoverWeb'\n }\n };\n\n navigation.transitionToRouteId(UpsellOfferDetail2, params);\n return;\n }\n\n navigation.transitionToRouteId(EmberDiscoverContent, articleId);\n }\n\n /**\n * Navigates to the content page for the article when enter or space key are pressed.\n */\n @action\n keyPressed(evt: KeyboardEvent): void {\n if (isEnterOrSpaceCode(evt.code)) {\n this.transitionToContentRoute();\n }\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Discover::Card': typeof DiscoverCard;\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 as |data|>\\n {{#if (math \\'gt\\' data.numberOfUpsellShoppingCartItems 0)}}\\n \\n \\n \\n {{/if}}\\n\\n {{#each data.articleGroups as |group|}}\\n
\\n

{{group.sectionName}}

\\n \\n \\n \\n
\\n {{/each}}\\n \\n\\n <:no-results as |PageViewNoResults|>\\n \\n \\n \\n \\n\\n <:error as |PageViewError|>\\n \\n \\n
\\n \\n\",{ moduleName: \"customer-site/discover/index/template.hbs\" })","\nimport { importSync as i } from '@embroider/macros';\nlet d = window.define;\nd(\"customer-site/discover/content/template\", function(){ return i(\"customer-site/discover/content/template.hbs\");});\nd(\"customer-site/discover/content/controller\", function(){ return i(\"customer-site/discover/content/controller.ts\");});\nd(\"customer-site/discover/content/route\", function(){ return i(\"customer-site/discover/content/route.ts\");});\nd(\"customer-site/discover/index/template\", function(){ return i(\"customer-site/discover/index/template.hbs\");});\nd(\"customer-site/discover/index/route\", function(){ return i(\"customer-site/discover/index/route.ts\");});\n","import Controller from '@ember/controller';\nimport { computed } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { UpsellOfferCart, UpsellOfferContact } from 'customer-site/enums/CustomerPageUrl';\nimport { POST } from '@adc/ajax/services/adc-ajax';\nimport {\n ExternalURL,\n FeatureLink,\n ConfigurationMobile,\n ConfigurationEmber,\n LearnMoreKBCID,\n LearnMoreKBSegments\n} from '../../enums/DiscoverActionType';\n\nimport type NativeBridge from '@adc/app-infrastructure/services/native-bridge';\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { ButtonAsyncSignature } from '@adc/ui-components/components/button/async';\nimport type DiscoverContentAction from 'customer-site/models/discover/discover-content-action';\nimport type DiscoverContentBlock from 'customer-site/models/discover/discover-content-block';\nimport type AjaxService from 'customer-site/services/ajax';\nimport type IdentityManager from 'customer-site/services/identity-manager';\nimport type NavigationService from 'customer-site/services/navigation';\nimport type { ModelFrom } from 'customer-site/utils/type-utils';\nimport type Route from './route';\n\ninterface ContentBlockGroup {\n isBodyText: boolean;\n contentBlocks: DiscoverContentBlock[];\n}\n\ninterface FeatureList {\n title: string;\n features: DiscoverContentAction[];\n}\n\ntype ActionButton = Pick;\n\n/**\n * @classdesc\n *\n * The controller for the page that displays a Discover article\n */\nexport default class DiscoverContentController extends Controller {\n @service declare ajax: AjaxService;\n @service declare identityManager: IdentityManager;\n @service declare intl: ADCIntlService;\n @service declare nativeBridge: NativeBridge;\n @service declare navigation: NavigationService;\n\n declare model: ModelFrom;\n\n /**\n * Returns true if displaying an upsell article\n */\n get isUpsell(): boolean {\n return !!this.model.upsell;\n }\n\n /**\n * Organizes the article content blocks into groups based on type.\n * Contiguous body text should be grouped together and truncated\n * with the option to \"Read More\".\n */\n @computed('model.content.blocks')\n get contentGroups(): Promise {\n return (async () => {\n const blocks = (await this.model.content).blocks,\n firstBlock = blocks.firstObject,\n groups = [];\n\n if (firstBlock) {\n let group = { isBodyText: firstBlock.isBodyText, contentBlocks: [firstBlock] };\n\n blocks.slice(1).forEach((block) => {\n if (group.isBodyText && block.isBodyText) {\n group.contentBlocks.push(block);\n } else {\n groups.push(group);\n group = { isBodyText: block.isBodyText, contentBlocks: [block] };\n }\n });\n\n groups.push(group);\n }\n\n return groups;\n })();\n }\n\n /**\n * Returns the list of feature links associated with the article\n */\n @computed('model.content.actions')\n get featureList(): Promise {\n const { intl } = this;\n\n return (async () => {\n const features = (await this.model.content).actions.filter((item) => item.actionType === FeatureLink);\n\n return {\n title: intl.t('generic.features'),\n features\n };\n })();\n }\n\n /**\n * Returns the actions associated with the article (will be rendered as buttons)\n */\n @computed(\n 'identityManager.identityModel.{profile.locale.language,isMobileApp}',\n 'model.content.actions',\n 'model.upsell.{hardwarePartId,campaign}',\n 'nativeBridge.doesSupportLaunchBrowser'\n )\n get actionButtons(): Promise {\n const { ajax, identityManager, intl, model, nativeBridge, navigation } = this;\n\n return (async () => {\n const isMobileApp = identityManager.isMobileApp,\n content = await model.content,\n hardwarePartId = model.upsell?.hardwarePartId,\n upsellCampaign = await model.upsell?.campaign,\n actions = content.actions?.filter(\n ({ actionType }) =>\n actionType !== FeatureLink &&\n (!isMobileApp || actionType !== ConfigurationEmber) &&\n (isMobileApp || actionType !== ConfigurationMobile)\n ),\n configActions = actions\n .filter(({ actionType }) => actionType === ConfigurationEmber || actionType === ConfigurationMobile)\n .map(({ actionType, pageId, isNativeView }) => {\n let buttonAction = undefined;\n\n if (isNativeView && nativeBridge.doesSupportTransitionToNativeViewWithId(pageId)) {\n buttonAction = async () => {\n await content.recordAction(actionType);\n nativeBridge.transitionToNativeView(pageId);\n };\n } else if (!isNativeView) {\n const routeItem = navigation.getRouteItem(pageId);\n\n if (routeItem) {\n buttonAction = async () => {\n await content.recordAction(actionType);\n navigation.transitionToRoute(routeItem);\n };\n }\n }\n\n return {\n text: intl.tc(this, 'setUp'),\n buttonAction\n };\n })\n .filter(({ buttonAction }) => buttonAction),\n linkActions = actions\n .filter(\n ({ actionType }) =>\n actionType === ExternalURL ||\n actionType === LearnMoreKBCID ||\n actionType === LearnMoreKBSegments\n )\n .map(({ actionType, data }) => ({\n text: intl.t('generic.learnMore'),\n buttonAction: async () => {\n let url = data;\n const language = identityManager.identityModel?.profile?.locale.language;\n if (actionType === LearnMoreKBSegments && language!.length > 0 && language !== 'en') {\n url = url + (data.indexOf('?') !== -1 ? '&' : '?') + 'mt-language=' + language;\n }\n await content.recordAction(actionType);\n navigation.transitionToUrlInNewBrowserWindow(url);\n }\n }));\n\n const upsellActions: ActionButton[] = [];\n if (hardwarePartId) {\n const src = isMobileApp ? 'DiscoverMobile' : 'DiscoverWeb';\n\n if (upsellCampaign && upsellCampaign.isOrderable) {\n upsellActions.push({\n text: intl.tc(this, 'addToCart'),\n buttonAction: async () => {\n await ajax.apiRequest(\n `api/upsell/upsellCampaigns/${upsellCampaign.id}/add-to-cart?src=${src}`,\n undefined,\n null,\n POST\n );\n\n navigation.transitionToRouteId(UpsellOfferCart, { queryParams: { src } });\n }\n });\n }\n\n upsellActions.push({\n text: intl.tc(this, 'requestMoreInfo'),\n buttonAction: async () => {\n const queryParams: Record = { src };\n if (upsellCampaign?.id) {\n queryParams.upsellOffer_id = upsellCampaign.id;\n } else {\n queryParams.upsellPart_id = hardwarePartId;\n }\n\n navigation.transitionToRouteId(UpsellOfferContact, {\n queryParams\n });\n }\n });\n }\n\n return [...configActions, ...linkActions, ...upsellActions].map(\n ({ text, buttonAction }, index) =>\n ({\n text,\n buttonAction,\n buttonColor: index === 0 ? 'primary' : undefined\n } as ActionButton)\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 'home/discover/content': DiscoverContentController;\n }\n}\n","import { inject as service } from '@ember/service';\nimport AdcBaseRoute from 'customer-site/classes/base-route';\nimport { EmberDiscoverContent } from 'customer-site/enums/CustomerPageUrl';\nimport { EmberSsoShop } from 'customer-site/enums/CustomerPageUrl';\n\nimport type Transition from '@ember/routing/transition';\nimport type GetDiscoverArticleContentResult from 'customer-site/models/discover/get-discover-article-content-result';\nimport type UpsellCampaign from 'customer-site/models/upsell/upsell-campaign';\nimport type NavigationService from 'customer-site/services/navigation';\nimport type { ModelFrom } from 'customer-site/utils/type-utils';\n\nexport interface DiscoverContentModel {\n content: ADCAsyncStoreFindRecord;\n upsell?: {\n hardwarePartId: string;\n campaign?: ADCAsyncStoreFindRecord;\n };\n}\n\n/**\n * @classdesc\n *\n * The route for the page that displays a Discover article\n */\nexport default class DiscoverContentRoute extends AdcBaseRoute {\n @service declare navigation: NavigationService;\n\n routeId = EmberDiscoverContent;\n\n skipAddingRootRouteOnFirstLoadMobile = true;\n\n model({ id_document }: { id_document: string }): DiscoverContentModel {\n const ids = id_document.split('-');\n\n const upsell =\n ids.length === 3\n ? {\n hardwarePartId: ids[1],\n campaign: ids[2] !== '0' ? this.store.findRecord('upsell/upsell-campaign', ids[2]) : undefined\n }\n : undefined;\n\n return {\n content: this.store.findRecord('discover/get-discover-article-content-result', ids[0]),\n upsell\n };\n }\n\n /** @override */\n async afterModel(model: ModelFrom, transition: Transition): Promise {\n const { navigation } = this,\n { hardwarePartId, campaign } = model.upsell ?? {},\n queryParams =\n hardwarePartId && campaign\n ? {\n offer_id: (await campaign).id,\n offer_hardware_type: hardwarePartId\n }\n : {};\n\n if (navigation.userHasAccess(EmberSsoShop)) {\n navigation.transitionToRouteId(EmberSsoShop, {\n queryParams\n });\n }\n\n super.afterModel(model, transition);\n }\n}\n","import { inject as service } from '@ember/service';\nimport AdcBaseRoute from 'customer-site/classes/base-route';\nimport { EmberDiscover, UpsellOfferCart } from 'customer-site/enums/CustomerPageUrl';\n\nimport type Store from '@ember-data/store';\nimport type DiscoverArticleGroupItem from 'customer-site/models/discover/discover-article-group-item';\nimport type NavigationService from 'customer-site/services/navigation';\n\nexport interface DiscoverModel {\n articleGroups: ADCAsyncStoreQueryRecord;\n numberOfUpsellShoppingCartItems?: ADCAsyncStoreQueryRecord;\n}\n\n/**\n * @classdesc\n *\n * The route for the dashboard page of all Discover content\n */\nexport default class DiscoverRoute extends AdcBaseRoute {\n @service declare store: Store;\n @service declare navigation: NavigationService;\n\n routeId = EmberDiscover;\n\n model(): DiscoverModel {\n const { navigation, store } = this,\n hasAccessToUpsellCart = navigation.userHasAccess(UpsellOfferCart);\n\n const articleGroups = store\n .queryRecord('discover/get-discover-dashboard-result', { returnAllArticles: true })\n .then((result) => result.articleGroupList);\n return {\n articleGroups,\n numberOfUpsellShoppingCartItems: hasAccessToUpsellCart\n ? store\n .queryRecord('upsell/get-upsell-shopping-cart-result', {})\n .then((result) => result.numberOfItemsInCart)\n : undefined\n };\n }\n}\n"],"names":["createTemplateFactory","scope","safeHtml_","concat","didInsert_","didUpdate_","didResize_","buttonSimple_","tc_","fn","not_","ReadMorePanel","intlPath","path","_dec","_class2","Component","constructor","arguments","_initializerDefineProperty","_descriptor","toggleHasOverflowCss","content","classList","scrollHeight","toggle","this","args","collapsedHeight","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","_class","setComponentTemplate","TEMPLATE","Split","Helper","compute","_ref","_text$split","text","delimiter","split","pageView_","promiseHashTracked_","get","and_","uiReadMorePanel_","split_","uiImagesStateImage_","buttonAsync_","guidFor_","on","t_","DiscoverCard","transitionToContentRoute","navigation","article","articleId","hasLegacyUpsellOffer","ids","upsellPart_id","upsellOffer_id","params","queryParams","from_dashboard","src","transitionToRouteId","UpsellOfferDetail2","EmberDiscoverContent","keyPressed","evt","isEnterOrSpaceCode","code","service","hash","await_","math_","navigateToRouteName_","statusToggle_","uiHorizontalList_","discoverCard_","inlineAlert_","d","window","define","esc","require","DiscoverContentController","computed","_dec2","_dec3","Controller","_descriptor2","_descriptor3","_descriptor4","_descriptor5","isUpsell","model","upsell","contentGroups","blocks","firstBlock","firstObject","groups","group","isBodyText","contentBlocks","slice","forEach","block","push","featureList","intl","features","actions","filter","item","actionType","FeatureLink","title","t","actionButtons","ajax","identityManager","nativeBridge","_model$upsell","_model$upsell2","_content$actions","isMobileApp","hardwarePartId","upsellCampaign","campaign","ConfigurationEmber","ConfigurationMobile","configActions","_ref2","map","_ref3","buttonAction","pageId","isNativeView","doesSupportTransitionToNativeViewWithId","async","recordAction","transitionToNativeView","routeItem","getRouteItem","transitionToRoute","tc","_ref4","linkActions","_ref5","ExternalURL","LearnMoreKBCID","LearnMoreKBSegments","_ref6","data","_identityManager$iden","url","language","identityModel","profile","locale","length","indexOf","transitionToUrlInNewBrowserWindow","upsellActions","isOrderable","apiRequest","id","undefined","POST","UpsellOfferCart","UpsellOfferContact","_ref7","index","buttonColor","DiscoverContentRoute","AdcBaseRoute","_defineProperty","id_document","store","findRecord","afterModel","transition","offer_id","offer_hardware_type","userHasAccess","EmberSsoShop","super","DiscoverRoute","EmberDiscover","hasAccessToUpsellCart","articleGroups","queryRecord","returnAllArticles","then","result","articleGroupList","numberOfUpsellShoppingCartItems","numberOfItemsInCart"],"sourceRoot":""}