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-finland/webpack/runtime/chunk loaded","webpack://business-finland/./wwwroot/js/marketOpportunitiesPage.js","webpack://business-finland/./node_modules/expose-loader/dist/runtime/getGlobalThis.js","webpack://business-finland/webpack/bootstrap","webpack://business-finland/webpack/runtime/compat get default export","webpack://business-finland/webpack/runtime/define property getters","webpack://business-finland/webpack/runtime/global","webpack://business-finland/webpack/runtime/hasOwnProperty shorthand","webpack://business-finland/webpack/runtime/make namespace object","webpack://business-finland/webpack/runtime/jsonp chunk loading","webpack://business-finland/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"MarketOpportunitiesScripts\"] = factory();\n\telse\n\t\troot[\"MarketOpportunitiesScripts\"] = factory();\n})(self, () => {\nreturn ","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","$(function () {\r\n if (!$('.market-opportunity-page').length && !$('.market-opportunity-landing-page').length) {\r\n return;\r\n }\r\n \r\n $('#mo-search-button').on('click', function (e) {\r\n e.preventDefault();\r\n var form = $('#mo-search');\r\n if (form.length > 0) {\r\n var formData = new FormData(form[0]);\r\n var sectionUrl = formData.get('section-url');\r\n var url = (sectionUrl?.length > 0 ? sectionUrl : form.attr(\"action\")) + \"?\" + form.serialize();\r\n window.location.href = url;\r\n }\r\n return false;\r\n });\r\n\r\n const interestedInBtn = $(\"#interestedInBtn\");\r\n const interestedInSpinner = $(\"#interestedInSpinner\");\r\n const interestedInThankYou = $(\"#interestedInThankYou\");\r\n const interestedInError = $(\"#interestedInError\");\r\n\r\n interestedInBtn.on('click', function () {\r\n\r\n if (window.dataLayer) {\r\n window.dataLayer.push({\r\n 'event': 'InterestedIn',\r\n 'digitalService': 'MarketOpportunities',\r\n 'signedIn': true\r\n });\r\n }\r\n\r\n interestedInError.toggleClass(\"d-none\", true);\r\n interestedInSpinner.toggleClass(\"d-none\", false);\r\n let onError = () => {\r\n interestedInSpinner.toggleClass(\"d-none\", true);\r\n interestedInError.toggleClass(\"d-none\", false);\r\n interestedInBtn.prop(\"disabled\", false);\r\n };\r\n\r\n let marketOpportunityId = interestedInBtn.attr('data-marketOpportunityId');\r\n if (!interestedInBtn.prop(\"disabled\")) {\r\n interestedInBtn.prop(\"disabled\", true);\r\n interestedInSpinner.show();\r\n $.get(`/api/v1/mo/AddMarketOpportunityAssociation?marketOpportunityId=${marketOpportunityId}`)\r\n .done(function (result) {\r\n if (result.toString().toLowerCase() === (true).toString().toLowerCase())\r\n {\r\n interestedInSpinner.toggleClass(\"d-none\", true);\r\n interestedInThankYou.toggleClass(\"d-none\", false);\r\n interestedInBtn.html(interestedInBtn.attr('data-text-success'));\r\n }\r\n else\r\n {\r\n onError();\r\n }\r\n })\r\n .fail(onError);\r\n }\r\n });\r\n\r\n $(\"#mo-deny-terms-button\").on('click', function () {\r\n // Let's disable the modal buttons since the logout process can take time...\r\n $(\"#mo-deny-terms-button\").prop(\"disabled\", true);\r\n $(\"#mo-deny-terms-button\").addClass(\"disabled\");\r\n $(\"#mo-accept-terms-button\").prop(\"disabled\", true);\r\n $(\"#mo-accept-terms-button\").addClass(\"disabled\");\r\n window.location.href = \"/login/logout\";\r\n });\r\n\r\n $(\"#mo-accept-terms-button\").on('click', function () {\r\n $(\".modal.show\").removeClass(\"show\").addClass(\"fade\").hide();\r\n $(\".modal-backdrop\").remove();\r\n const d = new Date();\r\n d.setTime(d.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30 days\r\n let expires = \"expires=\" + d.toUTCString();\r\n document.cookie = \"MO-AcceptTerms=true; \" + expires + \"; path=/\"; \r\n });\r\n})","\"use strict\";\n\n// eslint-disable-next-line func-names\nmodule.exports = function () {\n if (typeof globalThis === \"object\") {\n return globalThis;\n }\n var g;\n try {\n // This works if eval is allowed (see CSP)\n // eslint-disable-next-line no-new-func\n g = this || new Function(\"return this\")();\n } catch (e) {\n // This works if the window reference is available\n if (typeof window === \"object\") {\n return window;\n }\n\n // This works if the self reference is available\n if (typeof self === \"object\") {\n return self;\n }\n\n // This works if the global reference is available\n if (typeof global !== \"undefined\") {\n return global;\n }\n }\n return g;\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].call(module.exports, 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","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\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__.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};","// 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\t311: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\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\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkbusiness_finland\"] = self[\"webpackChunkbusiness_finland\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [729], () => (__webpack_require__(5662)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["root","factory","exports","module","define","amd","self","deferred","$","length","on","e","preventDefault","form","sectionUrl","FormData","get","url","attr","serialize","window","location","href","interestedInBtn","interestedInSpinner","interestedInThankYou","interestedInError","dataLayer","push","toggleClass","onError","prop","marketOpportunityId","show","done","result","toString","toLowerCase","html","fail","addClass","removeClass","hide","remove","d","Date","setTime","getTime","expires","toUTCString","document","cookie","globalThis","g","this","Function","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","call","m","O","chunkIds","fn","priority","notFulfilled","Infinity","i","fulfilled","j","Object","keys","every","key","splice","r","n","getter","__esModule","a","definition","o","defineProperty","enumerable","obj","prototype","hasOwnProperty","Symbol","toStringTag","value","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","data","moreModules","runtime","some","id","chunkLoadingGlobal","forEach","bind","__webpack_exports__"],"sourceRoot":""}