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,GAAK,EACxD,CAAK,EACMT,CACX,MAAU,CACN,OAAOA,CACR,CACH","names":["initGdpr","gdprCookieNotice","gdprCookieName","cookiesEnabledEventName","gdprCookie","getCookie","trackingPreferences","getTrackingPreferences","cookiesAcceptedEvent","__vitePreload","cookieName","name","ca","c","data","category"],"ignoreList":[],"sources":["../../../_frontend/entrypoints/compliance.js"],"sourcesContent":["function initGdpr(gdprCookieNotice) {\n gdprCookieNotice({\n locale: \"en\", //This is the default value\n timeout: 500, //Time until the cookie bar appears\n expiration: 30, //This is the default value, in days\n // domain: \".127.0.0.1\",\n domain: \".endatix.com\", //If you run the same cookie notice on all subdomains, define the main domain starting with a .\n implicit: true, //Accept cookies on scroll\n statement: \"https://google.com\", //Link to your cookie statement page\n performance: [\"JSESSIONID\"], //Cookies in the performance category.\n analytics: [\"ga\"], //Cookies in the analytics category.\n marketing: [\"SSID\"], //Cookies in the marketing category.\n });\n}\n\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n const gdprCookieName = \"gdprcookienotice\";\n const cookiesEnabledEventName = \"gdprCookiesEnabled\";\n const gdprCookie = getCookie(gdprCookieName);\n if (gdprCookie) {\n const trackingPreferences = getTrackingPreferences(gdprCookie);\n const cookiesAcceptedEvent = new CustomEvent(cookiesEnabledEventName, {\n detail: trackingPreferences,\n });\n document.dispatchEvent(cookiesAcceptedEvent);\n } else {\n import(\"@/js/gdpr-dialog\").then(({ gdprCookieNotice }) => {\n initGdpr(gdprCookieNotice);\n });\n }\n});\n\nconst getCookie = (cookieName) => {\n let name = cookieName + \"=\";\n let decodedCookie = decodeURIComponent(document.cookie);\n let ca = decodedCookie.split(\";\");\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) == \" \") {\n c = c.substring(1);\n }\n if (c.indexOf(name) == 0) {\n return c.substring(name.length, c.length);\n }\n }\n return \"\";\n};\n\nconst getTrackingPreferences = (gdprCookie) => {\n let trackingPreferences = {};\n const minimumViableLength = 52;\n if (!gdprCookie || gdprCookie.length < minimumViableLength) {\n return trackingPreferences;\n }\n\n try {\n var data = JSON.parse(gdprCookie);\n const categories = [\"necessary\", \"performance\", \"analytics\", \"marketing\"];\n categories.forEach((category) => {\n trackingPreferences[category] = data[category] ?? false;\n });\n return trackingPreferences;\n } catch {\n return trackingPreferences;\n }\n};\n"],"file":"assets/compliance-CNFrNGFu.js"}