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,EAAQC,SAGXyB,OAAOC,aAAazB,YAAW0B,EAAAA,EAAA,GAC5BF,OAAOC,aAAazB,aAAe,IACnCF,EAAQE,iCCvFnB2B,EAAOC,QAAUlC,2BCAjBiC,EAAOC,QAAUC","sources":["webpack://sheikh-zayed-festival/./src/actions/get-categories.action.ts?9592","webpack://sheikh-zayed-festival/./src/actions/get-crm-token.action.ts?4b61","webpack://sheikh-zayed-festival/./src/actions/get-fatoorah-payment-state.action.ts?3e35","webpack://sheikh-zayed-festival/./src/themes/sheikhzayedfestival/sheikhzayedfestival.tsx?709c","webpack://sheikh-zayed-festival/./lib/sheikhzayedfestival/module-registration.js?f9ba","webpack://sheikh-zayed-festival/external var \"React\"?0d3b","webpack://sheikh-zayed-festival/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\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { getCategoriesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CategoriesDataActions.g';\r\nimport { Category } from '@msdyn365-commerce/retail-proxy';\r\n\r\nexport class GetCategoriesInput implements Msdyn365.IActionInput {\r\n constructor() {}\r\n public getCacheKey = () => `Get-Categories`;\r\n public getCacheObjectType = () => 'Get-Categories';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n}\r\nexport interface IGetCategoriesData {\r\n filteredCategories: Category[];\r\n parentCategory?: Category | undefined;\r\n}\r\n\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new GetCategoriesInput();\r\n};\r\n\r\nasync function action(input: GetCategoriesInput, ctx: Msdyn365.IActionContext): Promise {\r\n const recId = Number(ctx.requestContext.urlTokens.recordId);\r\n const getCategories: Category[] = await getCategoriesAsync(\r\n { callerContext: ctx },\r\n ctx.requestContext.apiSettings.channelId\r\n );\r\n\r\n const filteredCategories = recId ? getCategories.filter((item: Category) => item.ParentCategory === recId) : getCategories;\r\n const category = getCategories.find((item: Category) => item.RecordId === recId);\r\n\r\n return { filteredCategories: filteredCategories, parentCategory: category };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n id: 'GetCategories',\r\n input: createInput\r\n});\r\n","/*!\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\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport qs from 'querystring';\r\n/**\r\n * GetCrmToken Input Action\r\n */\r\n\r\n export interface IToken {\r\n token_type: string;\r\n expires_in: string;\r\n ext_expires_in: string;\r\n expires_on: string;\r\n not_before: string;\r\n resource: string;\r\n access_token: string;\r\n}\r\n\r\nexport class GetCrmTokenInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n constructor() {}\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `CRMTOKEN`;\r\n public getCacheObjectType = () => 'CRMTOKEN';\r\n public dataCacheType = (): Msdyn365.CacheType => 'none';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IGetCrmTokenData {\r\n token: string;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new GetCrmTokenInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: GetCrmTokenInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n const { szfCRMDomain, szfCRMClientSecret} = ctx.requestContext.app.config;\r\n const data = qs.stringify({\r\n 'resource': `${szfCRMDomain}`,\r\n 'client_id': '1d4d5b5c-c710-472d-b8ac-104788da8da1',\r\n 'client_secret': `${szfCRMClientSecret}`,\r\n 'grant_type': 'client_credentials'\r\n });\r\n const response = await Msdyn365.sendRequest(\"https://login.microsoftonline.com/c03a7c9b-0691-48f2-a884-93fe49a74786/oauth2/token\", \"post\", data, {\r\n headers: {\r\n 'Content-Type': 'application/x-www-form-urlencoded',\r\n 'Cookie': 'fpc=AopThjyphGZIqV8tMvZOskskZZdbAQAAAETfudgOAAAA; stsservicecookie=estsfd; x-ms-gateway-slice=estsfd'\r\n }\r\n });\r\n if(response && response.status===200){\r\n return {\r\n token : response.data.access_token\r\n };\r\n }else{\r\n return {token : ''};\r\n }\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'GetCrmToken',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\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\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * GetFatoorahPaymentState Input Action\r\n */\r\nexport class GetFatoorahPaymentStateInput implements Msdyn365.IActionInput {\r\n // TODO: Construct the input needed to run the action\r\n constructor() {}\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `FATOORAHPAYMENTSTATE`;\r\n public getCacheObjectType = () => 'FATOORAHPAYMENTSTATE';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IGetFatoorahPaymentStateData {\r\n paymentState: boolean;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new GetFatoorahPaymentStateInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: GetFatoorahPaymentStateInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n return { paymentState: false };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // TODO: Give your data action a unique id\r\n id: 'GetFatoorahPaymentState',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\n/**\n * CoreComponent component\n * @extends {React.PureComponent}\n */\n\nclass Sheikhzayedfestival extends React.PureComponent {\n constructor(props: {}) {\n super(props);\n }\n\n public render(): JSX.Element | null {\n return