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AA,IAAa9B,EAAUC,gBAEzC,GAAIuB,EACA,OAAO,IAAID,GAAmCC,GAAYxB,EAAUC,eAAejB,YAAYyC,eAAWM,EAAWJ,GAEzH,MAAM,IAAIrE,MAAM,gGASbgC,eAAe0C,EAClBxC,EACAyC,GAEA,OAAOC,QAAQC,UACVC,MAAK,KACF,MAAMC,EAA2C7C,EAAMkC,gBAEvD,IAAKW,EAAe,CAChB,MAAMC,EAAuB,IAAIC,EAAAA,qBAC7B/C,EAAMgC,UACNhC,EAAMiC,eACNM,OACAA,EACAE,EAAQhC,gBAGZ,OAAOuC,EAAAA,EAAAA,oBAAmBF,EAAsBL,GAGpD,OAAOI,KAEVD,MAA+BK,IAC5B,MAAMJ,EAAsEI,EAE5E,OAAIJ,EACOK,EAAAA,oBAAAA,wBACH,CACI/C,cAAesC,EACfrC,oBAAqByB,EAAAA,yBAAyBC,qCAAqCW,IAEvFI,EAAcM,SACdnD,EAAMiC,UACNjC,EAAMmC,WAIP,QAEVS,MAAK9C,MAAAA,IAKK,CAAEsD,gBAAAA,EAAiBC,oCAJkBC,EAAAA,2BAAAA,+BAA0D,CAClGnD,cAAesC,QAKtBG,MAAKW,IACKC,EAAAA,EAAAA,mCAAkCD,EAAOH,gBAAiBG,EAAOF,iCAE3EI,OAAOC,IAEJ,MADAjB,EAAQkB,MAAMD,EAAME,SACd,IAAI9F,MAAM,+DAI5B,SAAewC,EAAAA,EAAAA,IAA2B,CACtCrC,GAAI,8EACJsC,OAAmCiC,EACnCxC,MAAOoC,wBC/HXyB,EAAOC,QAAUxG,2BCAjBuG,EAAOC,QAAUC","sources":["webpack://morland-ecommerce/./src/themes/morland/morland.tsx?ce30","webpack://morland-ecommerce/./lib/morland/module-registration.js?b818","webpack://morland-ecommerce/./src/actions/get-country-regions.ts?9431","webpack://morland-ecommerce/./src/actions/get-country-state.ts?3ecd","webpack://morland-ecommerce/./src/actions/get-state-provinces.ts?554d","webpack://morland-ecommerce/./src/dataActions/get-attributes-for-selected-variant.ts?e4b6","webpack://morland-ecommerce/external var \"React\"?0d3b","webpack://morland-ecommerce/external var \"ReactDOM\"?853b"],"sourcesContent":["/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as React from 'react';\r\n\r\n// TODO: Current build require at least one tsx file\r\nexport default () =>
;\r\n","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['morland'] = {\n c: () => require('partner/themes/morland/morland.tsx'),\n $type: 'themeModule',\n da: [{name:'cart', path:'@msdyn365-commerce/global-state/dist/lib/data-actions/get-cart-state-data-action', moduleName: 'checkout',runOn: 1},{name:'countryRegions', path:'@msdyn365-commerce-modules/address/dist/lib/actions/get-country-regions', moduleName: 'cart',runOn: 0},{name:'countryStates', path:'@msdyn365-commerce-modules/address/dist/lib/actions/get-country-state', moduleName: 'cart',runOn: 0},{name:'mediaLocations', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-media-locations-by-id', moduleName: 'buybox',runOn: 0},{name:'mediaLocationsForSelectedVariant', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-media-locations-for-selected-variant', moduleName: 'buybox',runOn: 0},{name:'productSpecificationData', path:'@msdyn365-commerce-modules/product-specification/dist/lib/dataActions/get-attributes-for-selected-variant', moduleName: 'buybox',runOn: 0}],\n definitionExtensions: ['buybox','cart','checkout','content-block','media-gallery','navigation-menu','promo-banner','search-result-container','text-block'],\n iNM: false,\n ns: '__local__',\n n: 'morland',\n p: '__local__',\n \n pdp: '',\n \n themeSettings: 'morland.theme.settings.json',\n md: 'src/themes/morland'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/address/dist/lib/actions/get-country-regions';\n let dataAction = require('@msdyn365-commerce-modules/address/dist/lib/actions/get-country-regions');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/address/dist/lib/actions/get-country-state';\n let dataAction = require('@msdyn365-commerce-modules/address/dist/lib/actions/get-country-state');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/product-specification/dist/lib/dataActions/get-attributes-for-selected-variant';\n let dataAction = require('@msdyn365-commerce-modules/product-specification/dist/lib/dataActions/get-attributes-for-selected-variant');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-media-locations-by-id';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-media-locations-by-id');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-media-locations-for-selected-variant';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-media-locations-for-selected-variant');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce/global-state/dist/lib/data-actions/get-cart-state-data-action';\n let dataAction = require('@msdyn365-commerce/global-state/dist/lib/data-actions/get-cart-state-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n CacheType,\n createObservableDataAction,\n IAction,\n IActionContext,\n IActionInput,\n IAny,\n ICommerceApiSettings,\n ICreateActionContext,\n IGeneric\n} from '@msdyn365-commerce/core';\nimport { getCountryRegionsByLanguageIdAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\nimport { CountryRegionInfo } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { buildCacheKey } from '@msdyn365-commerce-modules/retail-actions';\n\n/**\n * Input class for get country regions data action.\n */\nexport class GetCountryRegionsInput implements IActionInput {\n public locale: string;\n\n private readonly apiSettings: ICommerceApiSettings;\n\n constructor(locale: string, apiSettings: ICommerceApiSettings) {\n this.locale = locale;\n this.apiSettings = apiSettings;\n }\n\n public getCacheKey = () => buildCacheKey(`CountryRegionInfo-${this.locale}`, this.apiSettings);\n\n public getCacheObjectType = () => 'CountryRegionInfo';\n\n public dataCacheType = (): CacheType => 'application';\n}\n\n/**\n * Creates the input required to make the retail api call.\n * @param inputData\n */\nconst createInput = (inputData: ICreateActionContext>): GetCountryRegionsInput => {\n if (!(inputData.requestContext && inputData.requestContext.locale)) {\n throw new Error('Unable to create country regions input. Locale is not provided.');\n }\n\n return new GetCountryRegionsInput(inputData.requestContext.locale, inputData.requestContext.apiSettings);\n};\n\nexport async function getCountryRegionsAction(input: GetCountryRegionsInput, ctx: IActionContext): Promise {\n // This API is returning more that 100 records. So, can't use the default page size for this.\n // Removing the query result setting.\n return getCountryRegionsByLanguageIdAsync({ callerContext: ctx, queryResultSettings: {} }, input.locale);\n}\n\nexport const getCountryRegionsActionDataAction = createObservableDataAction({\n action: >getCountryRegionsAction,\n input: createInput\n});\n\nexport default getCountryRegionsActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n CacheType,\n createObservableDataAction,\n IAction,\n IActionContext,\n IActionInput,\n IAny,\n ICommerceApiSettings,\n ICreateActionContext,\n IGeneric\n} from '@msdyn365-commerce/core';\nimport { CountryRegionInfo, StateProvinceInfo } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { buildCacheKey } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { getCountryRegionsAction, GetCountryRegionsInput } from './get-country-regions';\nimport { getStateProvinceAction, GetStateProvincesInput } from './get-state-provinces';\n\n/**\n * Input class for get country regions data action.\n */\nexport class GetCountryStateInput implements IActionInput {\n public locale: string;\n\n public apiSettings: ICommerceApiSettings;\n\n constructor(locale: string, apiSettings: ICommerceApiSettings) {\n this.locale = locale;\n this.apiSettings = apiSettings;\n }\n\n public getCacheKey = () => buildCacheKey(`CountryStateInfo-${this.locale}`, this.apiSettings);\n\n public getCacheObjectType = () => 'StateProvinceInfo';\n\n public dataCacheType = (): CacheType => 'application';\n}\n\n/**\n * Creates the input required to make the retail api call.\n * @param inputData\n */\nconst createInput = (inputData: ICreateActionContext>): GetCountryStateInput => {\n const { locale, apiSettings } = inputData.requestContext;\n if (!(inputData.requestContext && locale)) {\n throw new Error('Unable to create country regions input. Locale is not provided.');\n }\n return new GetCountryStateInput(locale, apiSettings);\n};\n\nexport async function getCountryStateAction(input: GetCountryStateInput, ctx: IActionContext): Promise {\n const countryInput = new GetCountryRegionsInput(input.locale, input.apiSettings);\n const countryRegionsInfo = await getCountryRegionsAction(countryInput, ctx);\n\n const channelConfiguration = ctx.requestContext.channel;\n\n const marketISOCode = (channelConfiguration && channelConfiguration.ChannelCountryRegionISOCode) || 'US';\n const currentCountryRegion = countryRegionsInfo.find(countryRegion => (countryRegion.ISOCode || '') === marketISOCode);\n const countryRegionId = (currentCountryRegion && currentCountryRegion.CountryRegionId) || 'USA';\n\n const stateInput = new GetStateProvincesInput(countryRegionId, input.apiSettings);\n return getStateProvinceAction(stateInput, ctx);\n}\n\nexport const getCountryStateActionDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/address/get-country-state',\n action: >getCountryStateAction,\n input: createInput\n});\n\nexport default getCountryStateActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n CacheType,\n createObservableDataAction,\n IAction,\n IActionContext,\n IActionInput,\n ICommerceApiSettings\n} from '@msdyn365-commerce/core';\nimport { getStateProvincesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\nimport { StateProvinceInfo } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { buildCacheKey, QueryResultSettingsProxy } from '@msdyn365-commerce-modules/retail-actions';\n\n/**\n * Input class for get state provinces data action.\n */\nexport class GetStateProvincesInput implements IActionInput {\n public countryRegionId: string;\n\n private readonly apiSettings: ICommerceApiSettings;\n\n constructor(countryRegionId: string, apiSettings: ICommerceApiSettings) {\n this.countryRegionId = countryRegionId;\n this.apiSettings = apiSettings;\n }\n\n public getCacheKey = () => buildCacheKey(`StateProvinceInfo-${this.countryRegionId}`, this.apiSettings);\n\n public getCacheObjectType = () => 'StateProvinceInfo';\n\n public dataCacheType = (): CacheType => 'request';\n}\n\nexport async function getStateProvinceAction(input: GetStateProvincesInput, ctx: IActionContext): Promise {\n return getStateProvincesAsync(\n {\n callerContext: ctx,\n queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(ctx)\n },\n input.countryRegionId\n );\n}\n\nexport const getStateProvinceActionDataAction = createObservableDataAction({\n action: >getStateProvinceAction\n});\n\nexport default getStateProvinceActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n CacheType,\n createObservableDataAction,\n getCatalogId,\n IAction,\n IActionContext,\n IActionInput,\n IAny,\n ICreateActionContext,\n IGeneric\n} from '@msdyn365-commerce/core';\nimport { AttributeValue, ProductsDataActions, SimpleProduct, StoreOperationsDataActions } from '@msdyn365-commerce/retail-proxy';\nimport {\n getAttributeValuesByConfiguration,\n getSelectedProductIdFromActionInput,\n getSelectedVariant,\n QueryResultSettingsProxy,\n SelectedVariantInput\n} from '@msdyn365-commerce-modules/retail-actions';\n\n/**\n * Chains getting the SelectedVariant with GetActivePrice.\n */\nexport class AttributesForSelectedVariantInput implements IActionInput {\n public productId: number;\n\n public channelId: number;\n\n public catalogId: number;\n\n public selectedProduct: SimpleProduct | undefined;\n\n constructor(productId: number, channelId: number, selectedProduct?: SimpleProduct, catalogId?: number) {\n this.productId = productId;\n this.channelId = channelId;\n this.selectedProduct = selectedProduct;\n this.catalogId = catalogId || 0;\n }\n\n public getCacheKey = () => 'AttributesForSelectedVariant';\n\n public getCacheObjectType = () => 'ProductAttributeValue';\n\n public dataCacheType = (): CacheType => 'none';\n}\n\nexport const createAttributesForSelectedVariantInput = (\n inputData: ICreateActionContext>\n): AttributesForSelectedVariantInput => {\n const productId = getSelectedProductIdFromActionInput(inputData);\n const catalogId = getCatalogId(inputData.requestContext);\n\n if (productId) {\n return new AttributesForSelectedVariantInput(+productId, +inputData.requestContext.apiSettings.channelId, undefined, catalogId);\n }\n throw new Error('Unable to create PriceForSelectedVariantInput, no productId found on module config or query');\n};\n\n/**\n * Calls the Retail API a get a list of dimension values for a given product.\n * @param input - The input.\n * @param context - The context.\n * @returns The attribute values.\n */\nexport async function getAttributesForSelectedVariantAction(\n input: AttributesForSelectedVariantInput,\n context: IActionContext\n): Promise {\n return Promise.resolve()\n .then(() => {\n const activeProduct: SimpleProduct | undefined = input.selectedProduct;\n\n if (!activeProduct) {\n const selectedVariantInput = new SelectedVariantInput(\n input.productId,\n input.channelId,\n undefined,\n undefined,\n context.requestContext\n );\n\n return getSelectedVariant(selectedVariantInput, context);\n }\n\n return activeProduct;\n })\n .then((productResult: SimpleProduct | null) => {\n const activeProduct: SimpleProduct | undefined = productResult;\n\n if (activeProduct) {\n return ProductsDataActions.getAttributeValuesAsync(\n {\n callerContext: context,\n queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(context)\n },\n activeProduct.RecordId,\n input.channelId,\n input.catalogId\n );\n }\n\n return null;\n })\n .then(async (attributeValues: AttributeValue[] | null) => {\n const channelInventoryConfiguration = await StoreOperationsDataActions.getInventoryConfigurationAsync({\n callerContext: context\n });\n\n return { attributeValues, channelInventoryConfiguration };\n })\n .then(result => {\n return getAttributeValuesByConfiguration(result.attributeValues, result.channelInventoryConfiguration);\n })\n .catch((error: Error) => {\n context.trace(error.message);\n throw new Error('[getPriceForSelectedVariantAction]Error executing action');\n });\n}\n\nexport default createObservableDataAction({\n id: '@msdyn365-commerce-modules/product-info/get-attributes-for-selected-variant',\n action: >getAttributesForSelectedVariantAction,\n input: createAttributesForSelectedVariantInput\n});\n","module.exports = React;","module.exports = ReactDOM;"],"names":["React","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","id","c","require","$type","da","name","path","moduleName","runOn","definitionExtensions","iNM","ns","n","p","pdp","themeSettings","md","window","__bindings__","_objectSpread","GetCountryRegionsInput","constructor","locale","apiSettings","getCacheKey","buildCacheKey","this","getCacheObjectType","dataCacheType","async","getCountryRegionsAction","input","ctx","getCountryRegionsByLanguageIdAsync","callerContext","queryResultSettings","getCountryRegionsActionDataAction","createObservableDataAction","action","inputData","requestContext","GetCountryStateInput","getCountryStateAction","countryInput","countryRegionsInfo","channelConfiguration","channel","marketISOCode","ChannelCountryRegionISOCode","currentCountryRegion","find","countryRegion","ISOCode","countryRegionId","CountryRegionId","stateInput","GetStateProvincesInput","getStateProvinceAction","getCountryStateActionDataAction","getStateProvincesAsync","QueryResultSettingsProxy","getPagingFromInputDataOrDefaultValue","AttributesForSelectedVariantInput","productId","channelId","selectedProduct","catalogId","createAttributesForSelectedVariantInput","getSelectedProductIdFromActionInput","getCatalogId","undefined","getAttributesForSelectedVariantAction","context","Promise","resolve","then","activeProduct","selectedVariantInput","SelectedVariantInput","getSelectedVariant","productResult","ProductsDataActions","RecordId","attributeValues","channelInventoryConfiguration","StoreOperationsDataActions","result","getAttributeValuesByConfiguration","catch","error","trace","message","module","exports","ReactDOM"],"sourceRoot":""}