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,mBAAmB,EACtCsH,EAAgBtH,EAAG,oBAAoB,EAE7C,SAASgD,EAAOC,EAAe,CAC7B,MAAM/C,EAAS+C,EAAE,OACX,CAAE,MAAA4C,CAAM,EAAI3F,EAAO,QAEzBA,GAAQ,UAAU,OAAO,OAAO,EAEhCoH,GACEA,EAAc,OAAOzB,CAAK,GAAK,CAAC,EAAE,UAAU,OAAO,OAAO,CAC9D,CAEAwB,GAAe,QAASzE,GAAWvC,EAAGuC,EAAQ,QAASI,CAAM,CAAC,CAChE,CAGkD,EClBlD,MAAMuE,EAAgB,GAChBC,EAAoB,qBAE1B,SAASC,GAAqB,CAC1B,MAAMC,EAAS7H,EAAE,gBAAgB,EACjC,GAAI,CAAC6H,EAAQ,OAEU,IAAI,eAAgBC,GAAY,CACnD,UAAWC,KAASD,EAChB,GAAIC,EAAM,eAAgB,CACtB,KAAM,CAACC,CAAa,EAAID,EAAM,eACxBE,EAAgBD,EAAc,UAAYN,EAC1CQ,EAAgB,iBAAiB,SAAS,IAAI,EAAE,iBAAiBP,CAAiB,GAAG,QAAQ,MAAO,EAAE,EAE5G,GAAI,CAACO,GAAiB,OAAOA,CAAa,IAAMD,EAC5C,OAAO,SAAS,gBAAgB,MAAM,YAAYN,EAAmBM,EAAgB,IAAI,CAEjG,CAER,CAAC,EAEc,QAAQJ,CAAM,CACjC,CAEO,MAAM,EAAkB,IAAY,CACvCD,EAAmB,CACvB,EAGI,SAAS,iBAAiB,mBAAoB,CAAe,C","sources":["webpack://falck.frontend/./src/utils/dom.ts","webpack://falck.frontend/./src/atoms/forms/fileUpload.ts","webpack://falck.frontend/./src/atoms/button/button.ts","webpack://falck.frontend/./src/molecules/alertMessage/alertMessage.ts","webpack://falck.frontend/./src/utils/plugin.ts","webpack://falck.frontend/./src/plugins/DropDown/reducer.ts","webpack://falck.frontend/./src/plugins/DropDown/view.ts","webpack://falck.frontend/./src/plugins/DropDown/index.ts","webpack://falck.frontend/./src/molecules/authNavigation/authNavigation.ts","webpack://falck.frontend/./src/molecules/dialog/dialog.ts","webpack://falck.frontend/./src/molecules/navigation/navigation.ts","webpack://falck.frontend/./src/molecules/navigationList/navigationList.ts","webpack://falck.frontend/./src/molecules/serviceCard/serviceCard.ts","webpack://falck.frontend/./src/molecules/servicesNeue/servicesNeue.ts","webpack://falck.frontend/./src/molecules/table/table.ts","webpack://falck.frontend/./src/organisms/siteHeader/siteHeader.ts"],"sourcesContent":["// shorthand for querySelector\nexport const $ = (\n selector: string,\n context: HTMLElement | HTMLDocument = document\n): HTMLElement | null => context.querySelector(selector);\n\n// shorthand for querySelectorAll\nexport const $$ = (\n selector: string,\n context: HTMLElement | HTMLDocument = document\n): NodeListOf | null => context.querySelectorAll(selector);\n\n// shorthand for classList.toggle\nexport const toggleClass = (\n target: HTMLElement | Element | null,\n className: string,\n toggler: boolean\n): void => {\n if (target) {\n target.classList.toggle(className, toggler);\n }\n};\n\n// short hand for addEventListener\nexport const on = (\n target: HTMLElement | HTMLDocument | null,\n type: string,\n listener: EventListener,\n useCapture: boolean = false\n): void => {\n if (target) {\n target.addEventListener(type, listener, useCapture);\n }\n};\n\n// short hand for removeEventListener\nexport const off = (\n target: HTMLElement | HTMLDocument | null,\n type: string,\n listener: EventListener\n): void => {\n if (target) {\n target.removeEventListener(type, listener);\n }\n};\n\n// a function that adds an event and then removes that event when the\n// event has been triggered\nexport const onOff = (\n target: HTMLElement | Document,\n type: string,\n listener: EventListener,\n useCapture: boolean = false\n) => {\n const eventListener = (event: Event) => {\n listener(event);\n off(target, type, eventListener);\n };\n on(target, type, eventListener, useCapture);\n};\n\n// check if the event happened outside of a target element\nexport const isClickOutside = (target: HTMLElement, event: Event) => {\n if (event.target) {\n let node: HTMLElement | null = event.target as HTMLElement;\n\n do {\n // tslint:disable triple-equals\n if (node == target) {\n return false;\n }\n // tslint:enable tripe-equals\n node = node.parentNode as HTMLElement;\n } while (node);\n\n return true;\n }\n\n return true;\n};\n\n// Set attributes on HTML elements, as an example `aria` rules.\nexport const setAttr = (\n target: HTMLElement,\n attribute: string,\n value: string = \"\"\n): void => {\n target.setAttribute(attribute, value);\n};\n\n// Remove attributes from HTML elements\nexport const removeAttr = (target: HTMLElement, attribute: string): void => {\n target.removeAttribute(attribute);\n};\n\n// Get custom property values set on `:root {}`\nexport const getCustomProperty = (name: string): string =>\n window.getComputedStyle(document.documentElement).getPropertyValue(name);\n\n// Helper function to set cookie.\nexport const setCookie = (\n name: string,\n value: string,\n days: number = 7,\n path: string = \"/\"\n) =>\n (document.cookie = `${name}=${encodeURIComponent(value)}; expires=${new Date(\n Date.now() + days * 864e5\n ).toUTCString()}; path=${path}`);\n\n// Helper function to read cookies\nexport const getCookie = (name: string) =>\n document.cookie.split(\"; \").reduce((cookieValue, cookie) => {\n const [key, value] = cookie.split(\"=\");\n return key === name ? decodeURIComponent(value) : cookieValue;\n }, \"\");\n\nexport const toggleDetailsOpen = (\n detailsElements: NodeListOf | null,\n isTablet: boolean\n) => {\n if (detailsElements) {\n detailsElements.forEach((detailsElement: HTMLDetailsElement) => {\n if (detailsElement) {\n if (isTablet) {\n setAttr(detailsElement, \"open\");\n } else {\n removeAttr(detailsElement, \"open\");\n }\n }\n });\n }\n};\n","import { $$, on } from \"../../utils/dom\";\n\ninterface HTMLInputEvent extends Event {\n target: HTMLInputElement & EventTarget;\n}\n\nconst removeFile = (messageContainer: HTMLCollectionOf, li: HTMLLIElement, input:HTMLInputElement, fileName:string) => {\n const attachments = input.files;\n var fileBuffer = new DataTransfer();\n if (attachments !== null)\n {\n for (let i = 0; i < attachments.length; i++) {\n if (fileName !== attachments[i].name)\n fileBuffer.items.add(attachments[i]);\n }\n\n input.files = fileBuffer.files;\n if(input.files.length === 0)\n {\n li.parentElement?.remove();\n messageContainer[0].classList.remove(\"-active\");\n }\n else\n {\n li.parentNode?.removeChild(li);\n }\n }\n \n return null;\n}\n\nconst showUploadedFileName = (event: HTMLInputEvent) => {\n\n if (event.target.files) {\n const files: File[] = Array.from(event.target?.files);\n const fileNames: string[] = files.map((file: File) => file.name);\n \n const messageContainer = event.target.parentElement?.getElementsByClassName(\n \"FormFileUpload__PostedFile\"\n );\n\n if (messageContainer?.length) {\n messageContainer[0].classList.add(\"-active\"); \n let ul = messageContainer[0].querySelector('ul');\n if (!ul || ul === null) {\n ul = document.createElement('ul');\n ul.className = \"-plain\";\n messageContainer[0].appendChild(ul);\n }\n\n fileNames.forEach((fileName: string) => {\n let li = document.createElement('li');\n let span :HTMLSpanElement = document.createElement('span');\n span.className = \"selected-file\";\n span.innerHTML = fileName;\n\n let button:HTMLButtonElement = document.createElement('button');\n button.type = 'button';\n button.className = \"a-link\"\n button.innerHTML = \"x\";\n button.onclick = () => removeFile(messageContainer, li, event.target, fileName);\n \n li.appendChild(span);\n li.appendChild(button);\n ul!.appendChild(li); \n });\n }\n }\n};\n\nexport const onContentLoaded = (): void => {\n const fileUploadInputs = $$('input[type=\"file\"]');\n\n if (fileUploadInputs?.length) {\n Array.from(fileUploadInputs).forEach((uploadInput) => {\n on(uploadInput, \"change\", showUploadedFileName);\n });\n }\n};\n\nif (process.env.NODE_ENV !== \"development\") {\n document.addEventListener(\"DOMContentLoaded\", onContentLoaded);\n}\n","import { $$, on, setAttr } from \"../../utils/dom\";\n\nexport const onContentLoaded = (): void => {\n function toggle(e: Event) {\n const toggleButton = e.target as HTMLButtonElement;\n\n if (toggleButton) {\n const toggleState =\n toggleButton.getAttributeNode(\"aria-pressed\")?.value === \"false\"\n ? \"true\"\n : \"false\";\n\n setAttr(toggleButton, \"aria-pressed\", toggleState);\n setAttr(toggleButton, \"js-open-all\", toggleState);\n }\n }\n\n const toggleButtons = $$(\".js-toggle-button\");\n toggleButtons?.forEach((button) => on(button, \"click\", toggle));\n};\n\nif (process.env.NODE_ENV !== \"development\") {\n on(document, \"DOMContentLoaded\", onContentLoaded);\n}\n","import { $$, on, setCookie, getCookie } from \"../../utils/dom\";\n\nexport const onContentLoaded = (): void => {\n const closeButtons = $$(\".js-alertMessage__close\");\n\n const handleCloseAlert = (\n key: string,\n value: string,\n messageContainer: HTMLElement\n ) => {\n if (process.env.NODE_ENV === \"production\") setCookie(key, value);\n\n return messageContainer.classList.add(\"is-hidden\");\n };\n\n if (closeButtons) {\n closeButtons.forEach((button: HTMLElement) => {\n const { lang = \"sv\", sysMess, isCookie } = button.dataset;\n\n const messageContainer: HTMLElement =\n (button.closest(\".js-alertMessage\") as HTMLElement) ||\n button.parentElement?.parentElement;\n\n if (isCookie) {\n const isCookieSet = getCookie(\"cookie-consent-is-given\");\n\n if (isCookieSet) {\n messageContainer.classList.add(\"is-hidden\");\n return;\n }\n\n messageContainer?.classList.remove(\"is-hidden\");\n\n return (button.onclick = () =>\n handleCloseAlert(\n \"cookie-consent-is-given\",\n \"true\",\n messageContainer\n ));\n }\n\n if (sysMess) {\n const closedMessage = getCookie(lang);\n\n if (closedMessage === sysMess) return;\n\n messageContainer?.classList.remove(\"is-hidden\");\n\n return (button.onclick = () =>\n handleCloseAlert(lang, sysMess, messageContainer));\n }\n\n return (button.onclick = () => messageContainer?.remove());\n });\n }\n};\n\nif (process.env.NODE_ENV !== \"development\") {\n on(document, \"DOMContentLoaded\", onContentLoaded);\n}\n","export interface IAction {\n type: string;\n}\n\nexport type DispatchFunction = (action: IAction) => void;\n\ntype CreatePlugin = (\n defaultProps: object,\n view: (dispatch: DispatchFunction, model: object) => () => void,\n reducer: (action: IAction, model: object) => object\n) => (props: object) => void;\n\n// High order function to create a Plugin, that takes `props`, `view`, `reducer`\n// props: is the internal state\n// view: is the render\n// reducer: which is a reducer that modifies the state\nexport const createPlugin: CreatePlugin = (defaultProps, view, reducer) => (\n props: object\n): void => {\n let model: object = {\n ...defaultProps,\n ...props,\n };\n let cleanup: () => void;\n // create our dispatch function that will update the model and\n // run the view function after each dispatch\n const dispatch: DispatchFunction = (action) => {\n // clean up the view first\n if (cleanup) {\n cleanup();\n }\n\n // Update the model based on the current action\n model = reducer(action, model);\n\n // Update the view and pass along the dispatch function and model\n // and recieve the cleanup method\n cleanup = view(dispatch, model);\n };\n\n // Update the view and pass along the dispatch function and model\n // and recieve the cleanup method\n cleanup = view(dispatch, model);\n};\n","import { IAction } from \"../../utils/plugin\";\nimport { IDropDownModel } from \"./\";\n\nexport type ReducerFunction = (\n action: IAction,\n model: IDropDownModel\n) => IDropDownModel;\n\nconst TOGGLE = \"dropDown/TOGGLE\";\n\nconst dropDownReducer: ReducerFunction = (action, model) => {\n switch (action.type) {\n case TOGGLE:\n return { ...model, isClosed: !model.isClosed };\n default:\n return model;\n }\n};\n\nexport const toggleDropDown = () => ({ type: TOGGLE });\n\nexport default dropDownReducer;\n","import {\n $,\n isClickOutside,\n off,\n on,\n setAttr,\n toggleClass,\n} from \"../../utils/dom\";\nimport { DispatchFunction } from \"../../utils/plugin\";\nimport { IDropDownModel } from \"./\";\nimport { toggleDropDown } from \"./reducer\";\n\ntype DropDownView = (\n dispatch: DispatchFunction,\n model: IDropDownModel\n) => () => void;\n\ninterface IViewModel extends IDropDownModel {\n buttonEl: HTMLElement;\n}\n\ntype ViewComponent = (model: IViewModel) => void;\ntype ViewDispatchComponent = (\n dispatch: DispatchFunction,\n model: IViewModel\n) => () => void;\n\n// Component that adds events and returns cleanup function for those\nconst events: ViewDispatchComponent = (\n dispatch,\n { el, buttonEl, isClosed }\n) => {\n const onButtonClick = (event: Event) => {\n event.preventDefault();\n dispatch(toggleDropDown());\n };\n // when the dropdown is open we want to close it on clicks outside\n // of the main element\n const onDocumentClick = (event: Event) => {\n if (isClickOutside(el, event)) {\n dispatch(toggleDropDown());\n }\n };\n\n on(buttonEl, \"click\", onButtonClick);\n if (!isClosed) {\n on(document, \"click\", onDocumentClick);\n }\n\n return () => {\n off(buttonEl, \"click\", onButtonClick);\n off(document, \"click\", onDocumentClick);\n };\n};\n\n// Component used to update the DOM according to state\nconst ui: ViewComponent = ({\n el,\n closedClass,\n isClosed,\n openButtonClass,\n closedButtonClass,\n buttonEl,\n}) => {\n toggleClass(el, closedClass, isClosed);\n\n // if we want a class to change on the button depending on if dropDown is visible or not\n if (openButtonClass) {\n toggleClass(buttonEl, openButtonClass, !isClosed);\n }\n if (closedButtonClass) {\n toggleClass(buttonEl, closedButtonClass, isClosed);\n }\n};\n\nconst accessability: ViewComponent = ({ buttonEl, isClosed, contentId }) => {\n const expanded = !isClosed;\n setAttr(buttonEl, \"aria-expanded\", expanded.toString());\n\n if (contentId) {\n setAttr(buttonEl, \"aria-controls\", contentId);\n }\n};\n\nconst dropDownView: DropDownView = (dispatch, model) => {\n const buttonEl = $(model.buttonSelector, model.el);\n\n if (model.el && buttonEl) {\n // create our ViewModel\n const viewModel: IViewModel = { ...model, buttonEl };\n\n // add our events and recieve cleanup function for those\n const cleanupEvents = events(dispatch, viewModel);\n\n // update the dom according to our state/model\n ui(viewModel);\n\n // update the accessability attributes\n accessability(viewModel);\n\n // return our cleanup function, that removes our event listeners\n return cleanupEvents;\n } else {\n // Warn the user if we cannot find the button or the content within our DropDown\n // and fail silently\n if (!buttonEl) {\n // tslint:disable no-console\n console.warn(\n `DropDown: Could not find \"button element\" with selector ${model.buttonSelector} in ${model.el}`\n );\n // tslint:enable no-console\n }\n\n return () => ({});\n }\n};\n\nexport default dropDownView;\n","import { createPlugin } from \"../../utils/plugin\";\nimport reducer from \"./reducer\";\nimport view from \"./view\";\n\n// hur få den att kunna ha fler knappar\n\ninterface IOptionalProps {\n openButtonClass?: string;\n closedButtonClass?: string;\n contentId?: string;\n}\n\nexport interface IDropDownProps extends IOptionalProps {\n el: HTMLElement;\n closedClass?: string;\n buttonSelector?: string;\n}\n\ninterface IDropDownDefaultProps extends IOptionalProps {\n closedClass: string;\n buttonSelector: string;\n isClosed: boolean;\n}\n\nexport interface IDropDownModel extends IDropDownDefaultProps {\n el: HTMLElement;\n}\n\ntype DropDown = (props: IDropDownProps) => void;\n\nconst DEFAULT_PROPS: IDropDownDefaultProps = {\n buttonSelector: \".js-dropDown__button\",\n closedClass: \"-isClosed\",\n isClosed: true,\n};\n\nconst DropDown = createPlugin(DEFAULT_PROPS, view, reducer) as DropDown;\n\nexport default DropDown;\n","import DropDown, { IDropDownProps } from \"../../plugins/DropDown\";\nimport { $, on } from \"../../utils/dom\";\n\nexport const onContentLoaded = (): void => {\n const el = $(\".js-dropDown__auth\");\n if (el) {\n const dropDownConfig: IDropDownProps = {\n contentId: \"header-nav-auth\",\n el,\n openButtonClass: \"-iconArrowUp\",\n closedButtonClass: \"-iconArrowDown\",\n };\n DropDown(dropDownConfig);\n }\n};\n\nif (process.env.NODE_ENV !== \"development\") {\n on(document, \"DOMContentLoaded\", onContentLoaded);\n}\n","\nimport { $$, on } from \"../../utils/dom\";\n\nexport const onContentLoaded = (): void => {\n const dialogs = $$('[js-dialog]') as NodeListOf;\n\n dialogs?.forEach(function (dialog) {\n const openButton = dialog.querySelector('button[js-dialog__open]');\n const closeButtons = dialog.querySelectorAll('button[js-dialog__close]');\n\n openButton?.addEventListener('click', function () {\n dialog.showModal();\n });\n\n closeButtons?.forEach(function (button) {\n // Find all close buttons and add click event listener\n button.addEventListener('click', function () {\n dialog.close();\n });\n });\n });\n};\n\nif (process.env.NODE_ENV !== \"development\") {\n on(document, \"DOMContentLoaded\", onContentLoaded);\n}\n","import {\n $,\n $$,\n on,\n off,\n isClickOutside,\n toggleDetailsOpen,\n} from \"../../utils/dom\";\n\nimport { customJsMedia } from \"../../variables/mediaQueries.json\";\n\nconst ACTIVE_CLASSNAME = \"-visible\";\n\nfunction navigation() {\n const nav = $(\".js-navigation\");\n const navItems = $$(\".js-navigationItem\");\n const navContents = $$(\".js-navigationContent\");\n const burger = $(\".js-burger\");\n const mediaQuery = matchMedia(customJsMedia[\"--tablet\"]);\n\n const handleNavItemClick = (index: number) => (e: Event) => {\n const content = navContents?.[index];\n const clickedItem = e.currentTarget as HTMLButtonElement;\n if (clickedItem.classList.contains(\"-visible\")) {\n // if click on nav-link again, close all and return.\n return closeAll();\n }\n\n // First close the old one\n closeAll();\n\n // Then open the clicked one\n clickedItem.classList.toggle(ACTIVE_CLASSNAME);\n content?.classList.toggle(ACTIVE_CLASSNAME);\n content?.setAttribute(\"open\", \"\");\n\n // Set aria expanded\n clickedItem.setAttribute(\"aria-expanded\", \"true\");\n\n /* on(clickedItem, \"click\", closeAll) */\n // Add clickOustide listener\n on(document, \"click\", handleDocumentClick);\n };\n\n const toggleMobileNav = () => {\n nav?.classList.toggle(ACTIVE_CLASSNAME);\n burger?.classList.toggle(\"-iconClose\");\n };\n\n // If clicked outside, close all nav thingies + remove eventlistner\n const closeAll = () => {\n navItems?.forEach((item) => {\n item.classList.remove(ACTIVE_CLASSNAME);\n item.setAttribute(\"aria-expanded\", \"false\");\n });\n\n navContents?.forEach((item) => {\n item.classList.remove(ACTIVE_CLASSNAME);\n item.removeAttribute(\"open\");\n });\n\n nav?.classList.remove(ACTIVE_CLASSNAME);\n burger?.classList.remove(\"-iconClose\");\n\n off(document, \"click\", handleDocumentClick);\n };\n\n const handleDocumentClick = (e: Event) => {\n if (nav && isClickOutside(nav, e)) {\n closeAll();\n }\n };\n\n // Add eventlistener to all navitems + mobile nav icon\n navItems?.forEach((item, index) => {\n on(item, \"click\", handleNavItemClick(index), true);\n });\n on(burger, \"click\", toggleMobileNav);\n\n // Collapse dropdowns on mobile, expand on desktop. Also close all opened modals.\n const handleMatchMedia = (event: MediaQueryListEvent) => {\n toggleDetailsOpen(navContents, event.matches);\n closeAll();\n };\n mediaQuery.addEventListener(\"change\", handleMatchMedia);\n}\n\nexport const onContentLoaded = (): void => {\n navigation();\n};\n\nif (process.env.NODE_ENV !== \"development\") {\n document.addEventListener(\"DOMContentLoaded\", onContentLoaded);\n}\n","import { $$, on, removeAttr, setAttr } from \"../../utils/dom\";\nimport { customJsMedia } from \"../../variables/mediaQueries.json\";\n\n// Our navigationLists should always be expanded in any viewport larger\n// than --tablet, so as soon as the viewport switches between mobile / tablet\n// we expand / contract them.\n\nconst mediaQuery = matchMedia(customJsMedia[\"--tablet\"]);\n\n// TODO: refactor this to use the toggleDetailsOpen-function in the utils file instead\nconst toggleDetailsOpen = (isTablet: boolean) => {\n const navigationLists = $$(\".js-navigationList\");\n if (navigationLists) {\n navigationLists.forEach((navigationList: HTMLElement) => {\n const details = $$(\"details\", navigationList);\n if (details) {\n details.forEach((item: HTMLElement) => {\n if (isTablet) {\n setAttr(item, \"open\");\n } else {\n removeAttr(item, \"open\");\n }\n });\n }\n });\n }\n};\n\nconst onMatchMedia = (event: MediaQueryListEvent) =>\n toggleDetailsOpen(event.matches);\n\nexport const onContentLoaded = () => {\n toggleDetailsOpen(mediaQuery.matches);\n mediaQuery.addListener(onMatchMedia);\n};\n\nif (process.env.NODE_ENV !== \"development\") {\n on(document, \"DOMContentLoaded\", onContentLoaded);\n}\n","import { $$, on, toggleClass } from \"../../utils/dom\";\n\nfunction handleHover(popup: HTMLElement, active: boolean): void {\n toggleClass(popup, \"-isClosed\", active);\n}\n\nexport const onContentLoaded = (): void => {\n const cards = $$(\".m-serviceCard\");\n\n if (cards)\n cards.forEach((card) => {\n const popup: HTMLElement | null = card.querySelector(\".a-popup\");\n if (popup) {\n on(card, \"mouseenter\", () => handleHover(popup, false));\n on(card, \"mouseleave\", () => handleHover(popup, true));\n }\n });\n};\n\nif (process.env.NODE_ENV !== \"development\") {\n on(document, \"DOMContentLoaded\", onContentLoaded);\n}\n","import { $, $$, on, setAttr, removeAttr } from \"../../utils/dom\";\n\nexport const onContentLoaded = (): void => {\n const servicesWrapper = $(\".m-services\");\n const toggleButton = $(\".js-toggle-button\");\n const services = $$(\".m-services__category\");\n\n if (toggleButton && services) {\n new MutationObserver(function (mutationList) {\n for (const mutation of mutationList) {\n const target = mutation.target as HTMLElement;\n\n target.getAttribute(\"js-open-all\") === \"true\"\n ? services.forEach(function (accordion) {\n setAttr(accordion, \"open\", \"\");\n })\n : services.forEach(function (accordion) {\n removeAttr(accordion, \"open\");\n });\n }\n }).observe(toggleButton, {\n attributes: true,\n attributeFilter: [\"js-open-all\"],\n });\n\n servicesWrapper &&\n new MutationObserver(function (mutationList) {\n for (const mutation of mutationList) {\n const target = mutation.target as HTMLElement;\n const mutationIsOpenDetails = target.getAttribute(\"open\") !== null;\n\n if (!mutationIsOpenDetails) {\n return setAttr(toggleButton, \"aria-pressed\", \"false\");\n }\n\n if (\n mutationIsOpenDetails &&\n toggleButton.getAttribute(\"aria-pressed\") === \"false\"\n ) {\n Array.from(services).every(\n (service) => service.getAttribute(\"open\") === \"\"\n ) && setAttr(toggleButton, \"aria-pressed\", \"true\");\n }\n }\n }).observe(servicesWrapper, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: [\"open\"],\n });\n }\n};\n\nif (process.env.NODE_ENV !== \"development\") {\n on(document, \"DOMContentLoaded\", onContentLoaded);\n}\n","import { $$, on } from \"../../utils/dom\";\n\nexport const onContentLoaded = (): void => {\n const toggleButtons = $$(\".js-table__toggle\");\n const toggleDetails = $$(\".js-table__details\");\n\n function toggle(e: MouseEvent) {\n const target = e.target as HTMLTableRowElement;\n const { index } = target.dataset;\n\n target?.classList.toggle(\"-open\");\n\n toggleDetails &&\n toggleDetails[Number(index) || 0].classList.toggle(\"-open\");\n }\n\n toggleButtons?.forEach((button) => on(button, \"click\", toggle));\n};\n\nif (process.env.NODE_ENV !== \"development\") {\n on(document, \"DOMContentLoaded\", onContentLoaded);\n}\n","import { $ } from \"../../utils/dom\";\n\nconst EXTRA_PADDING = 20;\nconst HEADER_HEIGHT_VAR = \"--js-header-height\";\n\nfunction handleHeaderHeight() {\n const header = $('.js-siteHeader')\n if (!header) return;\n\n const resizeObserver = new ResizeObserver((entries) => {\n for (const entry of entries) {\n if (entry.contentBoxSize) {\n const [headerBoxSize] = entry.contentBoxSize;\n const scrollPadding = headerBoxSize.blockSize + EXTRA_PADDING;\n const currentHeight = getComputedStyle(document.body).getPropertyValue(HEADER_HEIGHT_VAR)?.replace(/\\D/g, '');\n\n if (!currentHeight || Number(currentHeight) !== scrollPadding) {\n return document.documentElement.style.setProperty(HEADER_HEIGHT_VAR, scrollPadding + 'px')\n }\n }\n }\n })\n\n resizeObserver.observe(header);\n}\n\nexport const onContentLoaded = (): void => {\n handleHeaderHeight();\n};\n\nif (process.env.NODE_ENV !== \"development\") {\n document.addEventListener(\"DOMContentLoaded\", onContentLoaded);\n}\n"],"names":["$","selector","context","$$","toggleClass","target","className","toggler","on","type","listener","useCapture","off","onOff","eventListener","event","isClickOutside","node","setAttr","attribute","value","removeAttr","getCustomProperty","name","setCookie","days","path","getCookie","cookieValue","cookie","key","toggleDetailsOpen","detailsElements","isTablet","detailsElement","removeFile","messageContainer","li","input","fileName","attachments","fileBuffer","showUploadedFileName","fileNames","file","ul","span","button","onContentLoaded","fileUploadInputs","uploadInput","toggle","e","toggleButton","toggleState","closeButtons","handleCloseAlert","lang","sysMess","isCookie","createPlugin","defaultProps","view","reducer","props","model","cleanup","dispatch","action","TOGGLE","dropDownReducer","toggleDropDown","events","el","buttonEl","isClosed","onButtonClick","onDocumentClick","ui","closedClass","openButtonClass","closedButtonClass","accessability","contentId","viewModel","cleanupEvents","dialog","openButton","ACTIVE_CLASSNAME","navigation","nav","navItems","navContents","burger","mediaQuery","handleNavItemClick","index","content","clickedItem","closeAll","handleDocumentClick","toggleMobileNav","item","handleMatchMedia","navigationLists","navigationList","details","onMatchMedia","handleHover","popup","active","cards","card","servicesWrapper","services","mutationList","mutation","accordion","mutationIsOpenDetails","service","toggleButtons","toggleDetails","EXTRA_PADDING","HEADER_HEIGHT_VAR","handleHeaderHeight","header","entries","entry","headerBoxSize","scrollPadding","currentHeight"],"sourceRoot":""}