{"version":3,"file":"js/resources_src_js_share_components__cookie_bar_js.min.js","mappings":";;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;ACAwD;AACjC;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,KAAK;AACL;AACA;AACO;AACP;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,gEAAgE;AAChE;AACA;AACO;AACP;AACA,qCAAqC;AACrC,oBAAoB,eAAe;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,6CAAC;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":["webpack://laravel/./resources/src/css/share/components/_cookie_bar.scss?8dfd","webpack://laravel/./resources/src/js/share/components/_cookie_bar.js"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport {};","import '../../../css/share/components/_cookie_bar.scss';\r\nimport $ from \"jquery\";\r\n\r\nfunction pureFadeIn(elem, display) {\r\n var el = document.getElementById(elem);\r\n el.style.opacity = 0;\r\n el.style.display = display || \"block\";\r\n\r\n (function fade() {\r\n var val = parseFloat(el.style.opacity);\r\n if (!((val += .05) > 1)) {\r\n el.style.opacity = val;\r\n requestAnimationFrame(fade);\r\n }\r\n })();\r\n};\r\n\r\nfunction pureFadeOut(elem) {\r\n var el = document.getElementById(elem);\r\n el.style.opacity = 1;\r\n\r\n (function fade() {\r\n if ((el.style.opacity -= .04) < 0) {\r\n el.style.display = \"none\";\r\n } else {\r\n requestAnimationFrame(fade);\r\n }\r\n })();\r\n};\r\n\r\nexport const setCookie = function setCookie(name, value, days) {\r\n var expires = \"\";\r\n if (days) {\r\n var date = new Date();\r\n date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));\r\n expires = \"; expires=\" + date.toUTCString();\r\n }\r\n document.cookie = name + \"=\" + (value || \"\") + expires + \"; path=/\";\r\n}\r\n\r\nexport const getCookie = function getCookie(name) {\r\n var nameEQ = name + \"=\";\r\n var ca = document.cookie.split(';');\r\n for (var i = 0; i < ca.length; i++) {\r\n var c = ca[i];\r\n while (c.charAt(0) == ' ') c = c.substring(1, c.length);\r\n if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);\r\n }\r\n return null;\r\n}\r\n\r\nfunction cookieConsent() {\r\n\r\n if (!getCookie('purecookieDismiss')) {\r\n pureFadeIn(\"cookieConsentContainer\");\r\n }\r\n $('.cookieButton').click(function() {\r\n purecookieDismiss();\r\n });\r\n}\r\n\r\nfunction purecookieDismiss() {\r\n setCookie('purecookieDismiss', '1', 7);\r\n pureFadeOut(\"cookieConsentContainer\");\r\n}\r\n\r\nwindow.onload = function() {\r\n cookieConsent();\r\n};"],"names":[],"sourceRoot":""}