{"version":3,"file":"utils.min.js","sources":["../../../ClientSrc/careers-page/utils.js"],"sourcesContent":["if ('MutationObserver' in window) {\r\n const nonceElement = document.querySelector('input[name=\"__uiid\"]');\r\n\r\n if (nonceElement != null) {\r\n const nonce = nonceElement.value;\r\n const targetNode = document.querySelector('html');\r\n const config = { attributes: false, childList: true, subtree: false };\r\n\r\n const callback = function (mutationsList, observer) {\r\n mutationsList.forEach(function (mutation) {\r\n if (mutation.type === 'childList') {\r\n if (mutation.addedNodes && mutation.addedNodes.length) {\r\n let nodes = mutation.addedNodes;\r\n for (var i = 0; i < nodes.length; i++) {\r\n if (nodes[i].nodeName.toLowerCase() === 'script' && !nodes[i].attributes.nonce && nodes[i].attributes.src && nodes[i].attributes.src.length > 0) {\r\n nodes[i].setAttribute('nonce', nonce);\r\n }\r\n }\r\n }\r\n }\r\n })\r\n };\r\n const observer = new MutationObserver(callback);\r\n observer.observe(targetNode, config);\r\n }\r\n}\r\n\r\nsetTimeout(function () {\r\n const nonceNode = document.querySelector('input[name=\"__uiid\"]');\r\n if (nonceNode != null)\r\n nonceNode.parentNode.removeChild(nonceNode);\r\n}, 3000);\r\n\r\n// Handle job search form here\r\nconst jobSearchForm = document.querySelector('#form');\r\n\r\nif (jobSearchForm != null) {\r\n function handleFormSubmit(event) {\r\n event.currentTarget.querySelector('button').disabled = true;\r\n event.currentTarget.querySelector('button').classList.add('loading');\r\n }\r\n\r\n jobSearchForm.addEventListener('submit', handleFormSubmit);\r\n jobSearchForm.querySelectorAll('select')\r\n\r\n var selectControls = jobSearchForm.querySelectorAll('select');\r\n\r\n [].forEach.call(selectControls, function (select) {\r\n select.addEventListener(\"change\", () => {\r\n\r\n let event;\r\n if (window.CustomEvent) {\r\n event = new CustomEvent('submit', {});\r\n } else {\r\n event = document.createEvent('CustomEvent');\r\n event.initCustomEvent('submit', true, true, {});\r\n }\r\n\r\n jobSearchForm.dispatchEvent(event);\r\n jobSearchForm.submit();\r\n })\r\n });\r\n}"],"names":["window","nonceElement","document","querySelector","nonce","value","targetNode","MutationObserver","mutationsList","observer","forEach","mutation","type","addedNodes","length","nodes","i","nodeName","toLowerCase","attributes","src","setAttribute","observe","childList","subtree","setTimeout","nonceNode","parentNode","removeChild","jobSearchForm","handleFormSubmit","event","currentTarget","disabled","classList","add","addEventListener","querySelectorAll","selectControls","call","select","CustomEvent","createEvent","initCustomEvent","dispatchEvent","submit"],"mappings":"AAAA,GAAI,qBAAsBA,OAAQ,CAC9B,IAAMC,EAAeC,SAASC,cAAc,wBAE5C,GAAoB,MAAhBF,EAAsB,CACtB,IAAMG,EAAQH,EAAaI,MACrBC,EAAaJ,SAASC,cAAc,QAiBzB,IAAII,kBAdJ,SAAUC,EAAeC,GACtCD,EAAcE,SAAQ,SAAUC,GAC5B,GAAsB,cAAlBA,EAASC,MACLD,EAASE,YAAcF,EAASE,WAAWC,OAE3C,IADA,IAAIC,EAAQJ,EAASE,WACZG,EAAI,EAAGA,EAAID,EAAMD,OAAQE,IACU,WAApCD,EAAMC,GAAGC,SAASC,gBAA+BH,EAAMC,GAAGG,WAAWf,OAASW,EAAMC,GAAGG,WAAWC,KAAOL,EAAMC,GAAGG,WAAWC,IAAIN,OAAS,GAC1IC,EAAMC,GAAGK,aAAa,QAASjB,EAKnD,OAGKkB,QAAQhB,EAjBF,CAAEa,YAAY,EAAOI,WAAW,EAAMC,SAAS,GAkBlE,CACJ,CAEAC,YAAW,WACP,IAAMC,EAAYxB,SAASC,cAAc,wBACxB,MAAbuB,GACAA,EAAUC,WAAWC,YAAYF,EACzC,GAAG,KAGH,IAAMG,EAAgB3B,SAASC,cAAc,SAE7C,GAAqB,MAAjB0B,EAAuB,CACvB,SAASC,EAAiBC,GACtBA,EAAMC,cAAc7B,cAAc,UAAU8B,UAAW,EACvDF,EAAMC,cAAc7B,cAAc,UAAU+B,UAAUC,IAAI,UAC9D,CAEAN,EAAcO,iBAAiB,SAAUN,GACzCD,EAAcQ,iBAAiB,UAE/B,IAAIC,EAAiBT,EAAcQ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