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Ae,iEAAmE,CAC1Fb,EAAGA,IAAMC,EAAQ,MACjBa,GAAI,wCAEpBJ,OAAOC,aAAeD,OAAOC,cAAgB,GAC7CD,OAAOC,aAAaE,eAAcD,EAAAA,EAAA,GACPF,OAAOC,aAAaE,gBAAkB,IACtCA,UCtC3BE,EAAOC,QAAU9C,cCAjB6C,EAAOC,QAAUC","sources":["webpack://henrys-ecommerce/./src/modules/hei-html-snippet/hei-html-snippet.tsx?a063","webpack://henrys-ecommerce/./src/modules/hei-html-snippet/hei-html-snippet.view.tsx?8128","webpack://henrys-ecommerce/./lib/hei-html-snippet/module-registration.js?2414","webpack://henrys-ecommerce/external var \"React\"?0d3b","webpack://henrys-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\nimport * as React from 'react';\r\n\r\nimport { IHeiHtmlSnippetProps } from './hei-html-snippet.props.autogenerated';\r\n\r\ntype IHeiHtmlSnippetData = {};\r\n\r\nexport interface IHeiHtmlSnippetViewProps extends IHeiHtmlSnippetProps {}\r\n\r\n/**\r\n *\r\n * HeiHtmlSnippet component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass HeiHtmlSnippet extends React.PureComponent> {\r\n public render(): JSX.Element | null {\r\n return this.props.renderView(this.props);\r\n }\r\n}\r\n\r\nexport default HeiHtmlSnippet;\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 React from 'react';\r\nimport { IHeiHtmlSnippetViewProps } from './hei-html-snippet';\r\nimport MsDyn365 from '@msdyn365-commerce/core';\r\n\r\nexport default ({ config, id }: IHeiHtmlSnippetViewProps) => {\r\n const { externalScripts, htmlContent, className } = config;\r\n const divRef = React.useRef(null);\r\n const [initialized, setInitialized] = React.useState(false);\r\n\r\n const isBrowser = MsDyn365.isBrowser;\r\n React.useEffect(() => {\r\n const div = divRef.current;\r\n if (!initialized && isBrowser && div) {\r\n setInitialized(true);\r\n\r\n for (const uri of (externalScripts ?? '').split(';')) {\r\n if (uri) {\r\n const script = document.createElement('script');\r\n script.src = uri;\r\n div.appendChild(script);\r\n }\r\n }\r\n\r\n div.innerHTML = htmlContent ?? '';\r\n }\r\n }, [isBrowser, initialized, htmlContent, externalScripts, divRef]);\r\n\r\n return (\r\n
\r\n
\r\n
\r\n );\r\n};\r\n","const binding = { modules: {}, dataActions: {} };\n\n (binding.modules['hei-html-snippet'] = {\n c: () => require('partner/modules/hei-html-snippet/hei-html-snippet.tsx'),\n $type: 'contentModule',\n da: [],\n \n iNM: false,\n ns: '__local__',\n n: 'hei-html-snippet',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/hei-html-snippet'\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 export const viewDictionary = {};\n viewDictionary['__local__|__local__|modules|hei-html-snippet|hei-html-snippet'] = {\n c: () => require('partner/modules/hei-html-snippet/hei-html-snippet.view.tsx'),\n cn: '__local__-__local__-hei-html-snippet'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["HeiHtmlSnippet","React","render","this","props","renderView","_ref","config","id","externalScripts","htmlContent","className","divRef","initialized","setInitialized","isBrowser","MsDyn365","div","current","uri","split","script","document","createElement","src","appendChild","innerHTML","ref","binding","modules","dataActions","c","require","$type","da","iNM","ns","n","p","pdp","md","window","__bindings__","_objectSpread","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}