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,GACtFD,EAAmBrC,QAAQ6B,EAAqB1B,KAAK,KAAM,IAC3DkC,EAAmB5D,KAAOoD,EAAqB1B,KAAK,KAAMkC,EAAmB5D,KAAK0B,KAAKkC,G,kBC9EvF,MAAM3D,EAAS6D,MAAMC,KAAK5G,SAASgD,SAAS6D,MAAKzD,GAAKA,EAAEM,IAAIrG,SAAS,eAC/DV,EAAMmG,EAAOO,aAAa,YAC1ByD,EAAShE,EAAOO,aAAa,gBAEnC,iBACI,KACE,gBACsB,QAAY1G,EAAKmK,IAGrC,kDACA,6DACA,6DACA,qDAEAxI,QAAQyI,IAAI,sCAEhB,CAAE,MAAO1I,GACPC,QAAQD,MAAM,+BAAgCA,EAChD,CACD,CAhBH,E","sources":["webpack://webpack/webpack/runtime/load script","webpack://webpack/./src/widget/shared/helpers.js","webpack://webpack/webpack/bootstrap","webpack://webpack/webpack/runtime/define property getters","webpack://webpack/webpack/runtime/ensure chunk","webpack://webpack/webpack/runtime/get javascript chunk filename","webpack://webpack/webpack/runtime/get mini-css chunk filename","webpack://webpack/webpack/runtime/global","webpack://webpack/webpack/runtime/hasOwnProperty shorthand","webpack://webpack/webpack/runtime/make namespace object","webpack://webpack/webpack/runtime/publicPath","webpack://webpack/webpack/runtime/jsonp chunk loading","webpack://webpack/./src/index.js"],"sourcesContent":["var inProgress = {};\nvar dataWebpackPrefix = \"webpack:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","// validation.js\r\n\r\nlet key = null;\r\nlet tenantId = null;\r\nlet baseUrl = '/';\r\nlet baseApiUrl = 'https://api.local.myhomeadvantage.com:44301/';\r\n\r\nconst headers = new Headers({\r\n 'Abp.TenantId': tenantId,\r\n 'X-API-Key': key,\r\n 'User-Agent': 'WidgetClient'\r\n});\r\n\r\nconst setBaseUrl = () => {\r\n const currentUrl = window.location.host;\r\n\r\n if (!currentUrl.includes('localhost')) {\r\n baseUrl = 'https://assets.myhomeadvantage.com/';\r\n baseApiUrl = 'https://myha-api-prod.azurewebsites.net/';\r\n }\r\n};\r\n\r\nconst validateKey = async (inputKey, inputTenantId) => {\r\n try {\r\n const endpoint = 'api/services/app/ApiKeys/ValidateApiKey';\r\n const queryParams = { apiKey: inputKey };\r\n const url = `${baseApiUrl}${endpoint}?${serializeParams(queryParams)}`;\r\n\r\n const response = await fetch(url, {\r\n method: 'POST',\r\n headers: new Headers({\r\n 'User-Agent': 'WidgetClient',\r\n 'Abp.TenantId': inputTenantId,\r\n 'X-API-Key': inputKey\r\n })\r\n });\r\n\r\n if (!response.ok) {\r\n throw new Error('Network response was not ok');\r\n }\r\n\r\n const data = await response.json();\r\n if (data.result) {\r\n key = inputKey;\r\n tenantId = inputTenantId;\r\n headers.set('Abp.TenantId', tenantId);\r\n headers.set('X-API-Key', key);\r\n return true;\r\n }\r\n } catch (error) {\r\n console.error('Fetch error:', error);\r\n }\r\n return false;\r\n};\r\n\r\nconst serializeParams = (params) => {\r\n return Object.keys(params)\r\n .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`)\r\n .join('&');\r\n};\r\n\r\nconst hexToRgb = (hex) => {\r\n hex = hex.replace(/^#/, '');\r\n\r\n const bigint = parseInt(hex, 16);\r\n const r = (bigint >> 16) & 255;\r\n const g = (bigint >> 8) & 255;\r\n const b = bigint & 255;\r\n\r\n return `${r}, ${g}, ${b}`;\r\n};\r\n\r\nexport function closeAllLists(widget) {\r\n const autocompleteItems = widget.shadowRoot.getElementById('autocomplete-items');\r\n autocompleteItems.style.display = 'none';\r\n autocompleteItems.innerHTML = '';\r\n}\r\n\r\nexport function setColors(widget) {\r\n widget.shadowRoot.host.style.setProperty('--ha-primary', widget.primaryColor);\r\n widget.shadowRoot.host.style.setProperty('--ha-primary-rgb', hexToRgb(widget.primaryColor));\r\n\r\n widget.shadowRoot.host.style.setProperty('--ha-secondary', widget.secondaryColor);\r\n widget.shadowRoot.host.style.setProperty('--ha-secondary-rgb', hexToRgb(widget.secondaryColor));\r\n\r\n if (widget.fontUrl) {\r\n const link = document.createElement('link');\r\n link.rel = 'stylesheet';\r\n link.href = widget.fontUrl;\r\n widget.shadowRoot.appendChild(link);\r\n \r\n widget.shadowRoot.host.style.setProperty('--bs-font-sans-serif', widget.fontFamily);\r\n widget.shadowRoot.host.style.setProperty('--bs-body-font-family', widget.fontFamily);\r\n }\r\n}\r\n\r\n// Export the functions and variables you want to use in other modules\r\nexport {\r\n validateKey,\r\n serializeParams,\r\n setBaseUrl,\r\n hexToRgb,\r\n getBaseUrl,\r\n getBaseApiUrl,\r\n getHeaders,\r\n getKey,\r\n getTenantId\r\n};\r\n\r\n// Additional getters for baseUrl, baseApiUrl, headers, key, and tenantId\r\nconst getBaseUrl = () => baseUrl;\r\nconst getBaseApiUrl = () => baseApiUrl;\r\nconst getHeaders = () => headers;\r\nconst getKey = () => key;\r\nconst getTenantId = () => tenantId;\r\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".ha-widget.bundle.js\";\n};","// This function allow to reference async chunks\n__webpack_require__.miniCssF = (chunkId) => {\n\t// return url for filenames based on template\n\treturn undefined;\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t792: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkwebpack\"] = self[\"webpackChunkwebpack\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// src/index.js\r\nimport { validateKey, setBaseUrl } from './widget/shared/helpers';\r\n\r\nif (module.hot) {\r\n module.hot.accept();\r\n}\r\n\r\nconst script = Array.from(document.scripts).find(s => s.src.includes('bundle.js'));\r\nconst key = script.getAttribute('data-key');\r\nconst tenant = script.getAttribute('data-tenant');\r\n\r\n(async function() {\r\n try {\r\n setBaseUrl();\r\n const isValid = await validateKey(key, tenant);\r\n\r\n if (isValid) {\r\n import('./widget/home-search/hs-widget');\r\n import('./widget/home-valuation/hv-widget');\r\n import('./widget/market-trend/mt-widget');\r\n import('./widget/agent-search/as-widget');\r\n } else {\r\n console.log('Invalid key. Widgets not available.');\r\n }\r\n } catch (error) {\r\n console.error('Error during key validation:', error);\r\n }\r\n })();"],"names":["inProgress","dataWebpackPrefix","key","tenantId","baseUrl","baseApiUrl","headers","Headers","setBaseUrl","window","location","host","includes","validateKey","async","inputKey","inputTenantId","url","serializeParams","apiKey","response","fetch","method","ok","Error","json","result","set","error","console","params","Object","keys","map","encodeURIComponent","join","hexToRgb","hex","replace","bigint","parseInt","closeAllLists","widget","autocompleteItems","shadowRoot","getElementById","style","display","innerHTML","setColors","setProperty","primaryColor","secondaryColor","fontUrl","link","document","createElement","rel","href","appendChild","fontFamily","getBaseUrl","getBaseApiUrl","getHeaders","getTenantId","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","m","d","definition","o","defineProperty","enumerable","get","f","e","chunkId","Promise","all","reduce","promises","u","miniCssF","g","globalThis","this","Function","obj","prop","prototype","hasOwnProperty","call","l","done","push","script","needAttach","scripts","getElementsByTagName","i","length","s","getAttribute","charset","timeout","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","forEach","fn","setTimeout","bind","type","target","head","r","Symbol","toStringTag","value","scriptUrl","importScripts","currentScript","tagName","toUpperCase","test","p","installedChunks","j","installedChunkData","promise","resolve","reject","errorType","realSrc","message","name","request","webpackJsonpCallback","parentChunkLoadingFunction","data","chunkIds","moreModules","runtime","some","id","chunkLoadingGlobal","self","Array","from","find","tenant","log"],"sourceRoot":""}