chefcookie 2.3.4 → 2.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2020 David Vielhuber
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1
+ MIT License
2
+
3
+ Copyright (c) 2020 David Vielhuber
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # 👻 chefcookie 👻
2
2
 
3
+ [![NPM](https://img.shields.io/npm/v/chefcookie.svg)](https://www.npmjs.com/package/chefcookie)
4
+
3
5
  chefcookie is a gdpr cookie solution without compromises.
4
6
 
5
7
  ## features
@@ -74,6 +76,7 @@ const cc = new chefcookie({
74
76
  debug_log: false,
75
77
  consent_tracking: null, // '/wp-json/v1/track-consent.php'
76
78
  expiration: 7, // in days
79
+ cookie_prefix: 'cc_', // switch cookie prefix (e.g. for different pages on the same top level domain)
77
80
  exclude_google_pagespeed: true,
78
81
  style: {
79
82
  layout: 'overlay', // overlay|bottombar|topbar
package/_build/script.js CHANGED
@@ -344,7 +344,7 @@ var chefcookie = /*#__PURE__*/function () {
344
344
  value: function addStyle() {
345
345
  var _this$config$style$co, _this$config$style$co2, _ref, _this$config$style$co3, _this$config$style$co4, _this$config$style$co5, _this$config$style$co6, _this$config$style$co7, _this$config$style$co8, _this$config$style$co9, _this$config$style$co10, _this$config$style$co11, _this$config$style$co12, _this$config$style$co13, _this$config$style$co14, _this$config$style$co15, _this$config$style$co16, _this$config$style$co17, _this$config$style$co18, _this$config$style$co19;
346
346
 
347
- var css = "\n .chefcookie, .chefcookie *\n {\n box-sizing: border-box;\n margin:0;\n padding:0;\n }\n /* try to reset styles */\n .chefcookie h2,\n .chefcookie a:link, a:hover, a:visited\n {\n color:inherit;\n }\n .chefcookie\n {\n position: fixed;\n z-index: 2147483647;\n left: 0;\n right: 0;\n bottom: 0;\n transform: translateZ(0); \n }\n .chefcookie--hidden\n {\n opacity: 0;\n pointer-events:none;\n }\n .chefcookie__inner\n {\n width:100%;\n height:100%;\n text-align: center;\n white-space: nowrap;\n font-size: 0;\n overflow-y:auto;\n overflow-x:hidden;\n max-height:100vh;\n }\n .chefcookie__box\n {\n font-size: ".concat(15 + (this.config.style.size - 3), "px;\n line-height:1.6;\n color:").concat((_this$config$style$co = this.config.style.color_text) !== null && _this$config$style$co !== void 0 ? _this$config$style$co : '#595f60', ";\n width: 100%;\n margin: 0 auto;\n display: inline-block;\n vertical-align: middle;\n white-space: normal;\n border-radius: 0;\n padding-top: 2em;\n padding-bottom: 2em;\n padding-left: 3em;\n padding-right: 3em;\n text-align: left;\n }\n .chefcookie__message\n {\n margin-bottom:1.5em;\n text-align:justify;\n }\n .chefcookie__message h2\n {\n margin-bottom:0.5em;\n font-size:2em;\n line-height:1.4;\n text-transform:uppercase;\n font-weight:700;\n text-align:left;\n }\n .chefcookie__message p {\n font-size: 1em;\n line-height:1.6;\n }\n .chefcookie__message a,\n .chefcookie__message a:focus\n {\n color:inherit;\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n text-decoration:underline;\n font-size: 1em;\n line-height:1.6;\n }\n .chefcookie__message a:focus\n {\n outline:none;\n }\n @media (hover: hover) {\n .chefcookie__message a:hover\n {\n opacity: 0.5;\n color: inherit;\n }\n }\n .chefcookie__message a:active\n {\n opacity: 0.1;\n color: inherit;\n }\n .chefcookie__buttons\n {\n margin-top:0.5em;\n }\n .chefcookie__button,\n .chefcookie__button:focus\n {\n padding: 1em 0.5em;\n border: 2px solid ").concat((_this$config$style$co2 = this.config.style.color_text) !== null && _this$config$style$co2 !== void 0 ? _this$config$style$co2 : '#595f60', ";\n font-weight: bold;\n display: block;\n color: inherit;\n text-decoration: none;\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n text-transform: uppercase;\n float: left;\n text-align: center;\n min-width: 21em;\n margin-right:3em;\n }\n .chefcookie__buttons--count-3 .chefcookie__button,\n .chefcookie__buttons--count-3 .chefcookie__button:focus {\n min-width:15rem;\n margin-right:1em;\n }\n .chefcookie__button:last-child\n {\n margin-right:0;\n }\n .chefcookie__button:focus\n {\n outline:none;\n }\n @media (hover: hover) {\n .chefcookie__button:hover\n {\n opacity: 0.5;\n text-decoration:none;\n color: inherit;\n }\n }\n .chefcookie__button:active\n {\n opacity: 0.1;\n color: inherit;\n }\n .chefcookie__buttons:after\n { \n clear:both;\n display:table;\n content:\"\";\n }\n ").concat(this.config.style.highlight_accept === undefined || this.config.style.highlight_accept === true ? "\n .chefcookie__button--accept\n { \n background-color:".concat((_ref = (_this$config$style$co3 = this.config.style.color_highlight) !== null && _this$config$style$co3 !== void 0 ? _this$config$style$co3 : this.config.style.color) !== null && _ref !== void 0 ? _ref : '#ff0000', ";\n border-color:transparent;\n }\n .chefcookie__button--accept.chefcookie__button--accept,\n .chefcookie__button--accept.chefcookie__button--accept:hover,\n .chefcookie__button--accept.chefcookie__button--accept:focus,\n .chefcookie__button--accept.chefcookie__button--accept:link,\n .chefcookie__button--accept.chefcookie__button--accept:visited\n {\n color:").concat((_this$config$style$co4 = this.config.style.color_background) !== null && _this$config$style$co4 !== void 0 ? _this$config$style$co4 : '#eeeeee', ";\n }\n ") : "", "\n .chefcookie__settings-container\n {\n height:0;\n overflow:hidden;\n transition: height ").concat(this.animationSpeed / 1000, "s ease-out;\n }\n .chefcookie__groups\n {\n list-style-type:none;\n }\n .chefcookie__groups:after\n {\n clear:both;\n display:table;\n content:\"\";\n }\n .chefcookie__group\n {\n float: left;\n }\n .chefcookie__group-title\n {\n float:left;\n width:70%;\n min-height: 1.66em;\n line-height: 1.66;\n display: block;\n font-weight:bold;\n font-size:1.2em;\n line-height:1.7;\n text-transform:uppercase;\n }\n .chefcookie__group-label\n {\n cursor: pointer;\n display:block;\n width:100%;\n height:100%;\n font-size:1em;\n line-height:1.6;\n }\n .chefcookie__group-label:after\n {\n clear:both;\n display:table;\n content:\"\"\n }\n .chefcookie__group--disabled .chefcookie__group-label\n {\n cursor:default;\n }\n .chefcookie__group-checkbox\n {\n opacity: 0;\n position:absolute;\n display: block;\n pointer-events:none;\n }\n .chefcookie__group--disabled .chefcookie__group-checkbox-icon\n {\n ").concat(this.config.style.show_disabled_checkbox === undefined || this.config.style.show_disabled_checkbox === false ? "display:none;" : "opacity: 0.75 !important;", "\n }\n .chefcookie__group-checkbox-icon\n {\n line-height:2;\n display: block;\n width: 4em;\n height: 2em;\n background-color: ").concat((_this$config$style$co5 = this.config.style.color_background) !== null && _this$config$style$co5 !== void 0 ? _this$config$style$co5 : '#eeeeee', ";\n border: 2px solid ").concat((_this$config$style$co6 = this.config.style.color_text) !== null && _this$config$style$co6 !== void 0 ? _this$config$style$co6 : '#595f60', ";\n margin: 0;\n padding: 0;\n position: relative;\n border-radius: 2em;\n float: right;\n }\n .chefcookie__group-checkbox-icon:before\n {\n content: \"0\";\n position: absolute;\n top: 0;\n left: 45%;\n width: 50%;\n bottom: 0;\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n text-align: center;\n font-weight: bold;\n font-size: 1em; \n line-height: 2;\n opacity: 0.25;\n color: ").concat((_this$config$style$co7 = this.config.style.color_text) !== null && _this$config$style$co7 !== void 0 ? _this$config$style$co7 : '#595f60', ";\n }\n .chefcookie__group-checkbox-icon:after\n {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n width: 50%;\n bottom: 0;\n box-shadow: 0 0 0px 1px ").concat((_this$config$style$co8 = this.config.style.color_text) !== null && _this$config$style$co8 !== void 0 ? _this$config$style$co8 : '#595f60', ";\n background-color: ").concat((_this$config$style$co9 = this.config.style.color_text) !== null && _this$config$style$co9 !== void 0 ? _this$config$style$co9 : '#595f60', ";\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n border-radius: 50%;\n }\n .chefcookie__group-checkbox ~ *\n { \n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n }\n .chefcookie__group-checkbox[data-status=\"0\"] ~ *\n {\n opacity: 0.75;\n }\n .chefcookie__group-checkbox[data-status=\"1\"] ~ .chefcookie__group-checkbox-icon\n {\n opacity: 0.85;\n }\n .chefcookie__group-checkbox[data-status=\"1\"] ~ .chefcookie__group-checkbox-icon:after\n {\n left:25%;\n }\n .chefcookie__group-checkbox[data-status=\"2\"] ~ .chefcookie__group-checkbox-icon:after\n {\n left:50%;\n }\n .chefcookie__group-checkbox[data-status=\"1\"] ~ .chefcookie__group-checkbox-icon:before,\n .chefcookie__group-checkbox[data-status=\"2\"] ~ .chefcookie__group-checkbox-icon:before\n {\n content: \"\";\n background-color: ").concat((_this$config$style$co10 = this.config.style.color_text) !== null && _this$config$style$co10 !== void 0 ? _this$config$style$co10 : '#595f60', ";\n top: 30%;\n bottom: 30%;\n left: 27%;\n width: 3px;\n }\n .chefcookie__group-description\n {\n width:100%;\n clear:both;\n padding-top:1em;\n display: block;\n font-size:0.9em;\n line-height:1.5;\n text-align:justify;\n font-weight: normal;\n }\n .chefcookie__group-collapse,\n .chefcookie__group-collapse:focus {\n color:inherit;\n text-decoration:underline;\n padding-top: 0.5em;\n display: block;\n }\n @media (hover: hover) {\n .chefcookie__group-collapse:hover\n {\n opacity: 0.9;\n color: inherit;\n text-decoration:underline;\n }\n }\n .chefcookie__scripts\n {\n list-style-type:none;\n height:0;\n overflow:hidden;\n transition: height ").concat(this.animationSpeed / 1000, "s ease-out;\n }\n .chefcookie__scripts--visible {\n height:auto;\n }\n .chefcookie__script {\n margin-bottom:0.5em;\n }\n .chefcookie__script:first-child {\n margin-top:1em;\n }\n .chefcookie__script:last-child {\n margin-bottom:0;\n }\n .chefcookie__script-title\n {\n float:left;\n width:70%;\n min-height: 1.66em;\n line-height: 1.66;\n display: block;\n }\n .chefcookie__script-label\n {\n cursor: pointer;\n display:block;\n width:100%;\n height:100%;\n }\n .chefcookie__script-label:after\n {\n clear:both;\n display:table;\n content:\"\"\n }\n .chefcookie__script--disabled .chefcookie__script-label\n {\n cursor:default;\n }\n .chefcookie__script-checkbox\n {\n opacity: 0;\n position:absolute;\n display: block;\n pointer-events:none;\n }\n .chefcookie__script--disabled .chefcookie__script-checkbox-icon\n {\n ").concat(this.config.style.show_disabled_checkbox === undefined || this.config.style.show_disabled_checkbox === false ? "display:none;" : "opacity: 0.75 !important;", "\n }\n .chefcookie__script-checkbox-icon\n {\n line-height:1.5;\n display: block;\n width: 3em;\n height: 1.5em;\n background-color: ").concat((_this$config$style$co11 = this.config.style.color_background) !== null && _this$config$style$co11 !== void 0 ? _this$config$style$co11 : '#eeeeee', ";\n border: 1px solid ").concat((_this$config$style$co12 = this.config.style.color_text) !== null && _this$config$style$co12 !== void 0 ? _this$config$style$co12 : '#595f60', ";\n margin: 0;\n padding: 0;\n position: relative;\n border-radius: 2em;\n float: right;\n }\n .chefcookie__script-checkbox-icon:before\n {\n content: \"0\";\n position: absolute;\n top: 0;\n left: 45%;\n width: 50%;\n bottom: 0;\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n text-align: center;\n font-size: 0.7em;\n line-height: 2;\n opacity: 0.25;\n color: ").concat((_this$config$style$co13 = this.config.style.color_text) !== null && _this$config$style$co13 !== void 0 ? _this$config$style$co13 : '#595f60', ";\n }\n .chefcookie__script-checkbox-icon:after\n {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n width: 50%;\n bottom: 0;\n box-shadow: 0 0 0px 1px ").concat((_this$config$style$co14 = this.config.style.color_text) !== null && _this$config$style$co14 !== void 0 ? _this$config$style$co14 : '#595f60', ";\n background-color: ").concat((_this$config$style$co15 = this.config.style.color_text) !== null && _this$config$style$co15 !== void 0 ? _this$config$style$co15 : '#595f60', ";\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n border-radius: 50%;\n }\n .chefcookie__script-checkbox ~ *\n {\n opacity: 0.75;\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n }\n .chefcookie__script-checkbox:checked ~ *\n {\n opacity:1;\n }\n .chefcookie__script-checkbox:checked ~ .chefcookie__script-checkbox-icon:after\n {\n left:50%;\n }\n .chefcookie__script-checkbox:checked ~ .chefcookie__script-checkbox-icon:before\n {\n content: \"\";\n background-color: ").concat((_this$config$style$co16 = this.config.style.color_text) !== null && _this$config$style$co16 !== void 0 ? _this$config$style$co16 : '#595f60', ";\n top: 30%;\n bottom: 30%;\n left: 27%;\n width: 2px;\n }\n\n .chefcookie__script-description\n {\n width: 100%;\n clear: both;\n padding-top: 0.5em;\n padding-bottom: 0.5em;\n display: block;\n font-size: 0.8em;\n line-height:1.4;\n text-align: justify;\n }\n .chefcookie__script-description-collapse,\n .chefcookie__script-description-collapse:focus {\n color:inherit;\n text-decoration:underline;\n padding-top: 0.25em;\n padding-bottom: 0.5em;\n display: block;\n }\n @media (hover: hover) {\n .chefcookie__script-description-collapse:hover\n {\n opacity: 0.9;\n color: inherit;\n text-decoration:underline;\n }\n }\n .chefcookie__script-description-content {\n height:0;\n overflow:hidden;\n transition: height ").concat(this.animationSpeed / 1000, "s ease-out;\n }\n .chefcookie__script-description-content > *:not(:last-child) {\n margin-bottom:0.5em;\n }\n .chefcookie__script-description-content table {\n width:100%;\n border-collapse: collapse;\n table-layout: fixed;\n }\n .chefcookie__script-description-content table td {\n border:1px solid ").concat(this.hexToRgbaStr((_this$config$style$co17 = this.config.style.color_text) !== null && _this$config$style$co17 !== void 0 ? _this$config$style$co17 : '#595f60', 0.1), ";\n padding: 0.3em 0.5em;\n vertical-align:top;\n }\n\n .chefcookie--noscroll body\n {\n position:fixed;\n width: 100%;\n overflow:hidden;\n }\n .chefcookie--fade body:after,\n .chefcookie--blur body:after\n {\n content:\"\";\n position:fixed;\n z-index: 2147483644;\n top:0;\n left:0;\n width:100%;\n height:100%;\n }\n .chefcookie--fade body:after\n {\n background-color: rgba(0, 0, 0, 0.65);\n }\n .chefcookie--blur body:after\n {\n backdrop-filter: grayscale(50%) blur(5px);\n }\n .chefcookie--overlay\n {\n top: 0;\n }\n .chefcookie--overlay .chefcookie__inner:before\n {\n content: '';\n display: inline-block;\n height: 100%;\n vertical-align: middle;\n }\n .chefcookie--overlay .chefcookie__box\n {\n width: 95%;\n max-width: 60em;\n box-shadow: 0 1em 5em -0.5em #000;\n background-color: ").concat((_this$config$style$co18 = this.config.style.color_background) !== null && _this$config$style$co18 !== void 0 ? _this$config$style$co18 : '#eeeeee', ";\n }\n .chefcookie--overlay .chefcookie__group\n {\n height: 13em;\n margin-bottom: 4%;\n background-color: rgba(").concat(this.config.style.color_background != '' && ['#000', '#000000', 'black'].indexOf(this.config.style.color_background) > -1 ? '255, 255, 255' : '0, 0, 0', ", 0.05);\n border: 1px solid rgba(").concat(this.config.style.color_background != '' && ['#000', '#000000', 'black'].indexOf(this.config.style.color_background) > -1 ? '255, 255, 255' : '0, 0, 0', ", 0.01);\n width: 48%;\n margin-right: 4%;\n }\n .chefcookie--overlay .chefcookie__group:nth-child(2n)\n {\n margin-right:0;\n }\n .chefcookie--overlay.chefcookie--has-scripts .chefcookie__group\n {\n height:auto;\n width: 100%;\n margin-right: 0;\n margin-bottom: 1em;\n }\n .chefcookie--overlay .chefcookie__group\n {\n padding: 1em 1.25em;\n }\n .chefcookie--bottombar,\n .chefcookie--topbar\n {\n background-color:").concat((_this$config$style$co19 = this.config.style.color_background) !== null && _this$config$style$co19 !== void 0 ? _this$config$style$co19 : '#eeeeee', ";\n box-shadow: 0 1em 5em -0.5em #000;\n }\n .chefcookie--bottombar\n {\n bottom:0;\n top:auto;\n }\n .chefcookie--topbar\n {\n bottom:auto;\n top:0;\n position:relative;\n }\n .chefcookie--bottombar .chefcookie__box,\n .chefcookie--topbar .chefcookie__box\n {\n max-width: 1280px;\n }\n .chefcookie--bottombar .chefcookie__group,\n .chefcookie--topbar .chefcookie__group\n {\n margin-bottom: 40px;\n margin-top: 40px;\n width: 22%;\n margin-right: 4%;\n }\n .chefcookie--bottombar .chefcookie__group:last-child,\n .chefcookie--topbar .chefcookie__group:last-child\n {\n margin-right:0;\n }\n .chefcookie--bottombar .chefcookie__groups--count-9 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-9 .chefcookie__group { width: 7.55%; }\n .chefcookie--bottombar .chefcookie__groups--count-8 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-8 .chefcookie__group { width: 9.00%; }\n .chefcookie--bottombar .chefcookie__groups--count-7 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-7 .chefcookie__group { width: 10.85%; }\n .chefcookie--bottombar .chefcookie__groups--count-6 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-6 .chefcookie__group { width: 13.33%; }\n .chefcookie--bottombar .chefcookie__groups--count-5 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-5 .chefcookie__group { width: 16.80%; }\n .chefcookie--bottombar .chefcookie__groups--count-4 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-4 .chefcookie__group { width: 22.00%; }\n .chefcookie--bottombar .chefcookie__groups--count-3 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-3 .chefcookie__group { width: 30.66%; }\n .chefcookie--bottombar .chefcookie__groups--count-2 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-2 .chefcookie__group { width: 48%; }\n .chefcookie--bottombar .chefcookie__groups--count-1 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-1 .chefcookie__group { width: 100%; }\n @media screen and (max-width: 940px)\n {\n .chefcookie__button,\n .chefcookie__button:focus\n {\n float: none;\n margin: 0 0 1em;\n text-align: center;\n width: 100%;\n min-width:0;\n }\n }\n @media screen and (max-width: 840px)\n {\n .chefcookie__box\n {\n padding:1em;\n }\n .chefcookie__message h2\n {\n font-size:1.5em;\n line-height:1.4;\n }\n .chefcookie .chefcookie__group,\n .chefcookie--overlay .chefcookie__group,\n .chefcookie--bottombar .chefcookie__group,\n .chefcookie--topbar .chefcookie__group\n {\n float:none;\n margin-right:0;\n width:100% !important;\n height:auto;\n }\n }\n ");
347
+ var css = "\n .chefcookie, .chefcookie *\n {\n box-sizing: border-box;\n margin:0;\n padding:0;\n }\n /* try to reset styles */\n .chefcookie h2,\n .chefcookie a:link, \n .chefcookie a:hover, \n .chefcookie a:visited\n {\n color:inherit;\n }\n .chefcookie\n {\n position: fixed;\n z-index: 2147483647;\n left: 0;\n right: 0;\n bottom: 0;\n transform: translateZ(0);\n }\n .chefcookie--hidden\n {\n opacity: 0;\n pointer-events:none;\n }\n .chefcookie__inner\n {\n width:100%;\n height:100%;\n text-align: center;\n white-space: nowrap;\n font-size: 0;\n overflow-y:auto;\n overflow-x:hidden;\n max-height:100vh;\n }\n .chefcookie__box\n {\n font-size: ".concat(15 + (this.config.style.size - 3), "px;\n line-height:1.6;\n color:").concat((_this$config$style$co = this.config.style.color_text) !== null && _this$config$style$co !== void 0 ? _this$config$style$co : '#595f60', ";\n width: 100%;\n margin: 0 auto;\n display: inline-block;\n vertical-align: middle;\n white-space: normal;\n border-radius: 0;\n padding-top: 2em;\n padding-bottom: 2em;\n padding-left: 3em;\n padding-right: 3em;\n text-align: left;\n }\n .chefcookie__message\n {\n margin-bottom:1.5em;\n text-align:justify;\n }\n .chefcookie__message h2\n {\n margin-bottom:0.5em;\n font-size:2em;\n line-height:1.4;\n text-transform:uppercase;\n font-weight:700;\n text-align:left;\n }\n .chefcookie__message p {\n font-size: 1em;\n line-height:1.6;\n }\n .chefcookie__message a,\n .chefcookie__message a:focus\n {\n color:inherit;\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n text-decoration:underline;\n font-size: 1em;\n line-height:1.6;\n }\n .chefcookie__message a:focus\n {\n outline:none;\n }\n @media (hover: hover) {\n .chefcookie__message a:hover\n {\n opacity: 0.5;\n color: inherit;\n }\n }\n .chefcookie__message a:active\n {\n opacity: 0.1;\n color: inherit;\n }\n .chefcookie__buttons\n {\n margin-top:0.5em;\n }\n .chefcookie__button,\n .chefcookie__button:focus\n {\n padding: 1em 0.5em;\n border: 2px solid ").concat((_this$config$style$co2 = this.config.style.color_text) !== null && _this$config$style$co2 !== void 0 ? _this$config$style$co2 : '#595f60', ";\n font-weight: bold;\n display: block;\n color: inherit;\n text-decoration: none;\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n text-transform: uppercase;\n float: left;\n text-align: center;\n min-width: 21em;\n margin-right:3em;\n }\n .chefcookie__buttons--count-3 .chefcookie__button,\n .chefcookie__buttons--count-3 .chefcookie__button:focus {\n min-width:15rem;\n margin-right:1em;\n }\n .chefcookie__button:last-child\n {\n margin-right:0;\n }\n .chefcookie__button:focus\n {\n outline:none;\n }\n @media (hover: hover) {\n .chefcookie__button:hover\n {\n opacity: 0.5;\n text-decoration:none;\n color: inherit;\n }\n }\n .chefcookie__button:active\n {\n opacity: 0.1;\n color: inherit;\n }\n .chefcookie__buttons:after\n {\n clear:both;\n display:table;\n content:\"\";\n }\n ").concat(this.config.style.highlight_accept === undefined || this.config.style.highlight_accept === true ? "\n .chefcookie__button--accept\n {\n background-color:".concat((_ref = (_this$config$style$co3 = this.config.style.color_highlight) !== null && _this$config$style$co3 !== void 0 ? _this$config$style$co3 : this.config.style.color) !== null && _ref !== void 0 ? _ref : '#ff0000', ";\n border-color:transparent;\n }\n .chefcookie__button--accept.chefcookie__button--accept,\n .chefcookie__button--accept.chefcookie__button--accept:hover,\n .chefcookie__button--accept.chefcookie__button--accept:focus,\n .chefcookie__button--accept.chefcookie__button--accept:link,\n .chefcookie__button--accept.chefcookie__button--accept:visited\n {\n color:").concat((_this$config$style$co4 = this.config.style.color_background) !== null && _this$config$style$co4 !== void 0 ? _this$config$style$co4 : '#eeeeee', ";\n }\n ") : "", "\n .chefcookie__settings-container\n {\n height:0;\n overflow:hidden;\n transition: height ").concat(this.animationSpeed / 1000, "s ease-out;\n }\n .chefcookie__groups\n {\n list-style-type:none;\n }\n .chefcookie__groups:after\n {\n clear:both;\n display:table;\n content:\"\";\n }\n .chefcookie__group\n {\n float: left;\n }\n .chefcookie__group-title\n {\n float:left;\n width:70%;\n min-height: 1.66em;\n line-height: 1.66;\n display: block;\n font-weight:bold;\n font-size:1.2em;\n line-height:1.7;\n text-transform:uppercase;\n }\n .chefcookie__group-label\n {\n cursor: pointer;\n display:block;\n width:100%;\n height:100%;\n font-size:1em;\n line-height:1.6;\n }\n .chefcookie__group-label:after\n {\n clear:both;\n display:table;\n content:\"\"\n }\n .chefcookie__group--disabled .chefcookie__group-label\n {\n cursor:default;\n }\n .chefcookie__group-checkbox\n {\n opacity: 0;\n position:absolute;\n display: block;\n pointer-events:none;\n }\n .chefcookie__group--disabled .chefcookie__group-checkbox-icon\n {\n ").concat(this.config.style.show_disabled_checkbox === undefined || this.config.style.show_disabled_checkbox === false ? "display:none;" : "opacity: 0.75 !important;", "\n }\n .chefcookie__group-checkbox-icon\n {\n line-height:2;\n display: block;\n width: 4em;\n height: 2em;\n background-color: ").concat((_this$config$style$co5 = this.config.style.color_background) !== null && _this$config$style$co5 !== void 0 ? _this$config$style$co5 : '#eeeeee', ";\n border: 2px solid ").concat((_this$config$style$co6 = this.config.style.color_text) !== null && _this$config$style$co6 !== void 0 ? _this$config$style$co6 : '#595f60', ";\n margin: 0;\n padding: 0;\n position: relative;\n border-radius: 2em;\n float: right;\n }\n .chefcookie__group-checkbox-icon:before\n {\n content: \"0\";\n position: absolute;\n top: 0;\n left: 45%;\n width: 50%;\n bottom: 0;\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n text-align: center;\n font-weight: bold;\n font-size: 1em;\n line-height: 2;\n opacity: 0.25;\n color: ").concat((_this$config$style$co7 = this.config.style.color_text) !== null && _this$config$style$co7 !== void 0 ? _this$config$style$co7 : '#595f60', ";\n }\n .chefcookie__group-checkbox-icon:after\n {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n width: 50%;\n bottom: 0;\n box-shadow: 0 0 0px 1px ").concat((_this$config$style$co8 = this.config.style.color_text) !== null && _this$config$style$co8 !== void 0 ? _this$config$style$co8 : '#595f60', ";\n background-color: ").concat((_this$config$style$co9 = this.config.style.color_text) !== null && _this$config$style$co9 !== void 0 ? _this$config$style$co9 : '#595f60', ";\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n border-radius: 50%;\n }\n .chefcookie__group-checkbox ~ *\n {\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n }\n .chefcookie__group-checkbox[data-status=\"0\"] ~ *\n {\n opacity: 0.75;\n }\n .chefcookie__group-checkbox[data-status=\"1\"] ~ .chefcookie__group-checkbox-icon\n {\n opacity: 0.85;\n }\n .chefcookie__group-checkbox[data-status=\"1\"] ~ .chefcookie__group-checkbox-icon:after\n {\n left:25%;\n }\n .chefcookie__group-checkbox[data-status=\"2\"] ~ .chefcookie__group-checkbox-icon:after\n {\n left:50%;\n }\n .chefcookie__group-checkbox[data-status=\"1\"] ~ .chefcookie__group-checkbox-icon:before,\n .chefcookie__group-checkbox[data-status=\"2\"] ~ .chefcookie__group-checkbox-icon:before\n {\n content: \"\";\n background-color: ").concat((_this$config$style$co10 = this.config.style.color_text) !== null && _this$config$style$co10 !== void 0 ? _this$config$style$co10 : '#595f60', ";\n top: 30%;\n bottom: 30%;\n left: 27%;\n width: 3px;\n }\n .chefcookie__group-description\n {\n width:100%;\n clear:both;\n padding-top:1em;\n display: block;\n font-size:0.9em;\n line-height:1.5;\n text-align:justify;\n font-weight: normal;\n }\n .chefcookie__group-collapse,\n .chefcookie__group-collapse:focus {\n color:inherit;\n text-decoration:underline;\n padding-top: 0.5em;\n display: block;\n }\n @media (hover: hover) {\n .chefcookie__group-collapse:hover\n {\n opacity: 0.9;\n color: inherit;\n text-decoration:underline;\n }\n }\n .chefcookie__scripts\n {\n list-style-type:none;\n height:0;\n overflow:hidden;\n transition: height ").concat(this.animationSpeed / 1000, "s ease-out;\n }\n .chefcookie__scripts--visible {\n height:auto;\n }\n .chefcookie__script {\n margin-bottom:0.5em;\n }\n .chefcookie__script:first-child {\n margin-top:1em;\n }\n .chefcookie__script:last-child {\n margin-bottom:0;\n }\n .chefcookie__script-title\n {\n float:left;\n width:70%;\n min-height: 1.66em;\n line-height: 1.66;\n display: block;\n }\n .chefcookie__script-label\n {\n cursor: pointer;\n display:block;\n width:100%;\n height:100%;\n }\n .chefcookie__script-label:after\n {\n clear:both;\n display:table;\n content:\"\"\n }\n .chefcookie__script--disabled .chefcookie__script-label\n {\n cursor:default;\n }\n .chefcookie__script-checkbox\n {\n opacity: 0;\n position:absolute;\n display: block;\n pointer-events:none;\n }\n .chefcookie__script--disabled .chefcookie__script-checkbox-icon\n {\n ").concat(this.config.style.show_disabled_checkbox === undefined || this.config.style.show_disabled_checkbox === false ? "display:none;" : "opacity: 0.75 !important;", "\n }\n .chefcookie__script-checkbox-icon\n {\n line-height:1.5;\n display: block;\n width: 3em;\n height: 1.5em;\n background-color: ").concat((_this$config$style$co11 = this.config.style.color_background) !== null && _this$config$style$co11 !== void 0 ? _this$config$style$co11 : '#eeeeee', ";\n border: 1px solid ").concat((_this$config$style$co12 = this.config.style.color_text) !== null && _this$config$style$co12 !== void 0 ? _this$config$style$co12 : '#595f60', ";\n margin: 0;\n padding: 0;\n position: relative;\n border-radius: 2em;\n float: right;\n }\n .chefcookie__script-checkbox-icon:before\n {\n content: \"0\";\n position: absolute;\n top: 0;\n left: 45%;\n width: 50%;\n bottom: 0;\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n text-align: center;\n font-size: 0.7em;\n line-height: 2;\n opacity: 0.25;\n color: ").concat((_this$config$style$co13 = this.config.style.color_text) !== null && _this$config$style$co13 !== void 0 ? _this$config$style$co13 : '#595f60', ";\n }\n .chefcookie__script-checkbox-icon:after\n {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n width: 50%;\n bottom: 0;\n box-shadow: 0 0 0px 1px ").concat((_this$config$style$co14 = this.config.style.color_text) !== null && _this$config$style$co14 !== void 0 ? _this$config$style$co14 : '#595f60', ";\n background-color: ").concat((_this$config$style$co15 = this.config.style.color_text) !== null && _this$config$style$co15 !== void 0 ? _this$config$style$co15 : '#595f60', ";\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n border-radius: 50%;\n }\n .chefcookie__script-checkbox ~ *\n {\n opacity: 0.75;\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n }\n .chefcookie__script-checkbox:checked ~ *\n {\n opacity:1;\n }\n .chefcookie__script-checkbox:checked ~ .chefcookie__script-checkbox-icon:after\n {\n left:50%;\n }\n .chefcookie__script-checkbox:checked ~ .chefcookie__script-checkbox-icon:before\n {\n content: \"\";\n background-color: ").concat((_this$config$style$co16 = this.config.style.color_text) !== null && _this$config$style$co16 !== void 0 ? _this$config$style$co16 : '#595f60', ";\n top: 30%;\n bottom: 30%;\n left: 27%;\n width: 2px;\n }\n\n .chefcookie__script-description\n {\n width: 100%;\n clear: both;\n padding-top: 0.5em;\n padding-bottom: 0.5em;\n display: block;\n font-size: 0.8em;\n line-height:1.4;\n text-align: justify;\n }\n .chefcookie__script-description-collapse,\n .chefcookie__script-description-collapse:focus {\n color:inherit;\n text-decoration:underline;\n padding-top: 0.25em;\n padding-bottom: 0.5em;\n display: block;\n }\n @media (hover: hover) {\n .chefcookie__script-description-collapse:hover\n {\n opacity: 0.9;\n color: inherit;\n text-decoration:underline;\n }\n }\n .chefcookie__script-description-content {\n height:0;\n overflow:hidden;\n transition: height ").concat(this.animationSpeed / 1000, "s ease-out;\n }\n .chefcookie__script-description-content > *:not(:last-child) {\n margin-bottom:0.5em;\n }\n .chefcookie__script-description-content table {\n width:100%;\n border-collapse: collapse;\n table-layout: fixed;\n }\n .chefcookie__script-description-content table td {\n border:1px solid ").concat(this.hexToRgbaStr((_this$config$style$co17 = this.config.style.color_text) !== null && _this$config$style$co17 !== void 0 ? _this$config$style$co17 : '#595f60', 0.1), ";\n padding: 0.3em 0.5em;\n vertical-align:top;\n }\n\n .chefcookie--noscroll body\n {\n position:fixed;\n width: 100%;\n overflow:hidden;\n }\n .chefcookie--fade body:after,\n .chefcookie--blur body:after\n {\n content:\"\";\n position:fixed;\n z-index: 2147483644;\n top:0;\n left:0;\n width:100%;\n height:100%;\n }\n .chefcookie--fade body:after\n {\n background-color: rgba(0, 0, 0, 0.65);\n }\n .chefcookie--blur body:after\n {\n backdrop-filter: grayscale(50%) blur(5px);\n }\n .chefcookie--overlay\n {\n top: 0;\n }\n .chefcookie--overlay .chefcookie__inner:before\n {\n content: '';\n display: inline-block;\n height: 100%;\n vertical-align: middle;\n }\n .chefcookie--overlay .chefcookie__box\n {\n width: 95%;\n max-width: 60em;\n box-shadow: 0 1em 5em -0.5em #000;\n background-color: ").concat((_this$config$style$co18 = this.config.style.color_background) !== null && _this$config$style$co18 !== void 0 ? _this$config$style$co18 : '#eeeeee', ";\n }\n .chefcookie--overlay .chefcookie__group\n {\n height: 13em;\n margin-bottom: 4%;\n background-color: rgba(").concat(this.config.style.color_background != '' && ['#000', '#000000', 'black'].indexOf(this.config.style.color_background) > -1 ? '255, 255, 255' : '0, 0, 0', ", 0.05);\n border: 1px solid rgba(").concat(this.config.style.color_background != '' && ['#000', '#000000', 'black'].indexOf(this.config.style.color_background) > -1 ? '255, 255, 255' : '0, 0, 0', ", 0.01);\n width: 48%;\n margin-right: 4%;\n }\n .chefcookie--overlay .chefcookie__group:nth-child(2n)\n {\n margin-right:0;\n }\n .chefcookie--overlay.chefcookie--has-scripts .chefcookie__group\n {\n height:auto;\n width: 100%;\n margin-right: 0;\n margin-bottom: 1em;\n }\n .chefcookie--overlay .chefcookie__group\n {\n padding: 1em 1.25em;\n }\n .chefcookie--bottombar,\n .chefcookie--topbar\n {\n background-color:").concat((_this$config$style$co19 = this.config.style.color_background) !== null && _this$config$style$co19 !== void 0 ? _this$config$style$co19 : '#eeeeee', ";\n box-shadow: 0 1em 5em -0.5em #000;\n }\n .chefcookie--bottombar\n {\n bottom:0;\n top:auto;\n }\n .chefcookie--topbar\n {\n bottom:auto;\n top:0;\n position:relative;\n }\n .chefcookie--bottombar .chefcookie__box,\n .chefcookie--topbar .chefcookie__box\n {\n max-width: 1280px;\n }\n .chefcookie--bottombar .chefcookie__group,\n .chefcookie--topbar .chefcookie__group\n {\n margin-bottom: 40px;\n margin-top: 40px;\n width: 22%;\n margin-right: 4%;\n }\n .chefcookie--bottombar .chefcookie__group:last-child,\n .chefcookie--topbar .chefcookie__group:last-child\n {\n margin-right:0;\n }\n .chefcookie--bottombar .chefcookie__groups--count-9 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-9 .chefcookie__group { width: 7.55%; }\n .chefcookie--bottombar .chefcookie__groups--count-8 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-8 .chefcookie__group { width: 9.00%; }\n .chefcookie--bottombar .chefcookie__groups--count-7 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-7 .chefcookie__group { width: 10.85%; }\n .chefcookie--bottombar .chefcookie__groups--count-6 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-6 .chefcookie__group { width: 13.33%; }\n .chefcookie--bottombar .chefcookie__groups--count-5 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-5 .chefcookie__group { width: 16.80%; }\n .chefcookie--bottombar .chefcookie__groups--count-4 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-4 .chefcookie__group { width: 22.00%; }\n .chefcookie--bottombar .chefcookie__groups--count-3 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-3 .chefcookie__group { width: 30.66%; }\n .chefcookie--bottombar .chefcookie__groups--count-2 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-2 .chefcookie__group { width: 48%; }\n .chefcookie--bottombar .chefcookie__groups--count-1 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-1 .chefcookie__group { width: 100%; }\n @media screen and (max-width: 940px)\n {\n .chefcookie__button,\n .chefcookie__button:focus\n {\n float: none;\n margin: 0 0 1em;\n text-align: center;\n width: 100%;\n min-width:0;\n }\n }\n @media screen and (max-width: 840px)\n {\n .chefcookie__box\n {\n padding:1em;\n }\n .chefcookie__message h2\n {\n font-size:1.5em;\n line-height:1.4;\n }\n .chefcookie .chefcookie__group,\n .chefcookie--overlay .chefcookie__group,\n .chefcookie--bottombar .chefcookie__group,\n .chefcookie--topbar .chefcookie__group\n {\n float:none;\n margin-right:0;\n width:100% !important;\n height:auto;\n }\n }\n ");
348
348
 
349
349
  if ('css_replace' in this.config.style && this.config.style.css_replace !== undefined && this.config.style.css_replace !== null && this.config.style.css_replace !== '') {
350
350
  css = this.config.style.css_replace;
@@ -385,7 +385,7 @@ var chefcookie = /*#__PURE__*/function () {
385
385
  var _this5 = this;
386
386
 
387
387
  document.body.insertAdjacentHTML('afterbegin', "\n <div class=\"chefcookie chefcookie--".concat(this.config.style.layout, " chefcookie--columns-").concat('columns' in this.config.style ? this.config.style.columns : 'auto').concat('scripts_selection' in this.config && this.config.scripts_selection !== false ? " chefcookie--has-scripts" : "", " chefcookie--hidden\">\n <div class=\"chefcookie__inner\">\n <div class=\"chefcookie__box\">\n <div class=\"chefcookie__message\">").concat(this.translate(this.config.message), "</div>\n <div class=\"chefcookie__settings-container\">\n <ul class=\"chefcookie__groups chefcookie__groups--count-").concat(this.config.settings.length, "\">\n ").concat(this.config.settings.map(function (group, i) {
388
- return "\n <li class=\"chefcookie__group".concat(group.cannot_be_modified ? " chefcookie__group--disabled" : "", "\"> \n <label class=\"chefcookie__group-label\" for=\"chefcookie_group_").concat(i, "\">\n <input").concat(group.cannot_be_modified ? " disabled=\"disabled\"" : "", " class=\"chefcookie__group-checkbox\" data-status=\"").concat(_this5.isCheckboxActiveForGroup(i), "\" id=\"chefcookie_group_").concat(i, "\" type=\"checkbox\" name=\"chefcookie_group[]\" value=\"").concat(i, "\"").concat(_this5.isCheckboxActiveForGroup(i) === 2 ? " checked=\"checked\"" : "", " />\n <span class=\"chefcookie__group-title\">").concat(_this5.translate(group.title), "</span>\n <span class=\"chefcookie__group-checkbox-icon\"></span>\n ").concat('description' in group && group.description != '' ? " \n <span class=\"chefcookie__group-description\">".concat(_this5.translate(group.description), "</span>\n ") : "", "\n ").concat('scripts_selection' in _this5.config && _this5.config.scripts_selection === 'collapse' && 'scripts' in group && Object.keys(group.scripts).length > 0 && Object.keys(group.scripts)[0].indexOf('dummy_') === -1 ? "\n <a href=\"#\" class=\"chefcookie__group-collapse\">".concat(_this5.getLabel('group_open') != '' ? _this5.getLabel('group_open') : _this5.getLabel('settings_open'), "</a>\n ") : "", "\n </label>\n ").concat('scripts_selection' in _this5.config && _this5.config.scripts_selection !== false && 'scripts' in group && Object.keys(group.scripts).length > 0 && Object.keys(group.scripts)[0].indexOf('dummy_') === -1 ? "\n <ul class=\"chefcookie__scripts chefcookie__scripts--count-".concat(Object.keys(group.scripts).length).concat(_this5.config.scripts_selection !== 'collapse' ? " chefcookie__scripts--visible" : "", "\">\n ").concat(Object.keys(group.scripts).map(function (j) {
388
+ return "\n <li class=\"chefcookie__group".concat(group.cannot_be_modified ? " chefcookie__group--disabled" : "", "\">\n <label class=\"chefcookie__group-label\" for=\"chefcookie_group_").concat(i, "\">\n <input").concat(group.cannot_be_modified ? " disabled=\"disabled\"" : "", " class=\"chefcookie__group-checkbox\" data-status=\"").concat(_this5.isCheckboxActiveForGroup(i), "\" id=\"chefcookie_group_").concat(i, "\" type=\"checkbox\" name=\"chefcookie_group[]\" value=\"").concat(i, "\"").concat(_this5.isCheckboxActiveForGroup(i) === 2 ? " checked=\"checked\"" : "", " />\n <span class=\"chefcookie__group-title\">").concat(_this5.translate(group.title), "</span>\n <span class=\"chefcookie__group-checkbox-icon\"></span>\n ").concat('description' in group && group.description != '' ? "\n <span class=\"chefcookie__group-description\">".concat(_this5.translate(group.description), "</span>\n ") : "", "\n ").concat('scripts_selection' in _this5.config && _this5.config.scripts_selection === 'collapse' && 'scripts' in group && Object.keys(group.scripts).length > 0 && Object.keys(group.scripts)[0].indexOf('dummy_') === -1 ? "\n <a href=\"#\" class=\"chefcookie__group-collapse\">".concat(_this5.getLabel('group_open') != '' ? _this5.getLabel('group_open') : _this5.getLabel('settings_open'), "</a>\n ") : "", "\n </label>\n ").concat('scripts_selection' in _this5.config && _this5.config.scripts_selection !== false && 'scripts' in group && Object.keys(group.scripts).length > 0 && Object.keys(group.scripts)[0].indexOf('dummy_') === -1 ? "\n <ul class=\"chefcookie__scripts chefcookie__scripts--count-".concat(Object.keys(group.scripts).length).concat(_this5.config.scripts_selection !== 'collapse' ? " chefcookie__scripts--visible" : "", "\">\n ").concat(Object.keys(group.scripts).map(function (j) {
389
389
  return "\n <li class=\"chefcookie__script".concat(group.cannot_be_modified ? " chefcookie__script--disabled" : "", "\">\n <label class=\"chefcookie__script-label\" for=\"chefcookie_script_").concat(i, "_").concat(j, "\">\n <input").concat(group.cannot_be_modified ? " disabled=\"disabled\"" : "", " class=\"chefcookie__script-checkbox\" id=\"chefcookie_script_").concat(i, "_").concat(j, "\" type=\"checkbox\" name=\"chefcookie_script[]\" value=\"").concat(i, "|").concat(j, "\"").concat(_this5.isCheckboxActiveForProvider(i, j) ? " checked=\"checked\"" : "", " />\n <span class=\"chefcookie__script-title\">").concat((0, _typeof2.default)(group.scripts[j]) === 'object' && group.scripts[j] !== null && 'title' in group.scripts[j] && group.scripts[j].title != '' ? _this5.translate(group.scripts[j].title) : j, "</span>\n <span class=\"chefcookie__script-checkbox-icon\"></span>\n </label>\n ").concat((0, _typeof2.default)(group.scripts[j]) === 'object' && group.scripts[j] !== null && 'description' in group.scripts[j] && group.scripts[j].description != '' ? '<div class="chefcookie__script-description">' + '<a href="#" class="chefcookie__script-description-collapse">' + _this5.getLabel('details_open') + '</a>' + '<div class="chefcookie__script-description-content">' + _this5.translate(group.scripts[j].description) + '</div>' + '</div>' : '', "\n </li>\n ");
390
390
  }).join(''), "\n </ul>\n ") : "", "\n </li>\n ");
391
391
  }).join(''), "\n </ul>\n </div>\n <div class=\"chefcookie__buttons chefcookie__buttons--count-").concat('show_decline_button' in this.config && this.config.show_decline_button === true ? '3' : '2', "\">\n <a href=\"#chefcookie__settings\" class=\"chefcookie__button chefcookie__button--settings\">").concat(this.getLabel('settings_open'), "</a>\n <a href=\"#chefcookie__accept\" class=\"chefcookie__button chefcookie__button--accept\">").concat(this.getLabel(this.config.accept_all_if_settings_closed === undefined || this.config.accept_all_if_settings_closed === false ? 'accept' : 'accept_all'), "</a>\n ").concat('show_decline_button' in this.config && this.config.show_decline_button === true ? "\n <a href=\"#chefcookie__decline\" class=\"chefcookie__button chefcookie__button--decline\">".concat(this.getLabel('decline'), "</a>\n ") : '', "\n </div>\n </div>\n </div>\n </div>\n "));
@@ -656,12 +656,12 @@ var chefcookie = /*#__PURE__*/function () {
656
656
  }, {
657
657
  key: "setCookieToHideOverlay",
658
658
  value: function setCookieToHideOverlay() {
659
- _helper.default.cookieSet('cc_hide_prompt', '1', this.getCookieExpiration());
659
+ _helper.default.cookieSet(this.getCookieName('hide_prompt'), '1', this.getCookieExpiration());
660
660
  }
661
661
  }, {
662
662
  key: "isCookieSetToHideOverlay",
663
663
  value: function isCookieSetToHideOverlay() {
664
- return _helper.default.cookieExists('cc_hide_prompt');
664
+ return _helper.default.cookieExists(this.getCookieName('hide_prompt'));
665
665
  }
666
666
  }, {
667
667
  key: "saveInCookie",
@@ -697,33 +697,33 @@ var chefcookie = /*#__PURE__*/function () {
697
697
  providers.push('null');
698
698
  }
699
699
 
700
- _helper.default.cookieSet('cc_accepted_providers', providers.join(','), this.getCookieExpiration());
700
+ _helper.default.cookieSet(this.getCookieName('accepted_providers'), providers.join(','), this.getCookieExpiration());
701
701
  }
702
702
  }, {
703
703
  key: "addToCookie",
704
704
  value: function addToCookie(provider) {
705
705
  var providers;
706
706
 
707
- if (!_helper.default.cookieExists('cc_accepted_providers') || _helper.default.cookieGet('cc_accepted_providers') === 'null') {
707
+ if (!_helper.default.cookieExists(this.getCookieName('accepted_providers')) || _helper.default.cookieGet(this.getCookieName('accepted_providers')) === 'null') {
708
708
  providers = [];
709
709
  } else {
710
- providers = _helper.default.cookieGet('cc_accepted_providers').split(',');
710
+ providers = _helper.default.cookieGet(this.getCookieName('accepted_providers')).split(',');
711
711
  }
712
712
 
713
713
  if (providers.indexOf(provider) === -1) {
714
714
  providers.push(provider);
715
715
 
716
- _helper.default.cookieSet('cc_accepted_providers', providers.join(','), this.getCookieExpiration());
716
+ _helper.default.cookieSet(this.getCookieName('accepted_providers'), providers.join(','), this.getCookieExpiration());
717
717
  }
718
718
  }
719
719
  }, {
720
720
  key: "deleteFromCookie",
721
721
  value: function deleteFromCookie(provider) {
722
- if (!_helper.default.cookieExists('cc_accepted_providers')) {
722
+ if (!_helper.default.cookieExists(this.getCookieName('accepted_providers'))) {
723
723
  return;
724
724
  }
725
725
 
726
- var providers = _helper.default.cookieGet('cc_accepted_providers').split(',');
726
+ var providers = _helper.default.cookieGet(this.getCookieName('accepted_providers')).split(',');
727
727
 
728
728
  var index = providers.indexOf(provider);
729
729
 
@@ -732,9 +732,9 @@ var chefcookie = /*#__PURE__*/function () {
732
732
  }
733
733
 
734
734
  if (providers.length > 0) {
735
- _helper.default.cookieSet('cc_accepted_providers', providers.join(','), this.getCookieExpiration());
735
+ _helper.default.cookieSet(this.getCookieName('accepted_providers'), providers.join(','), this.getCookieExpiration());
736
736
  } else {
737
- _helper.default.cookieSet('cc_accepted_providers', 'null', this.getCookieExpiration());
737
+ _helper.default.cookieSet(this.getCookieName('accepted_providers'), 'null', this.getCookieExpiration());
738
738
  }
739
739
  }
740
740
  }, {
@@ -748,6 +748,11 @@ var chefcookie = /*#__PURE__*/function () {
748
748
 
749
749
  return expiration;
750
750
  }
751
+ }, {
752
+ key: "getCookieName",
753
+ value: function getCookieName(cookieName) {
754
+ return (this.config.cookie_prefix || 'cc_') + cookieName;
755
+ }
751
756
  }, {
752
757
  key: "addEnabledScripts",
753
758
  value: function addEnabledScripts() {
@@ -755,11 +760,11 @@ var chefcookie = /*#__PURE__*/function () {
755
760
 
756
761
  var isInit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
757
762
 
758
- if (!_helper.default.cookieExists('cc_accepted_providers')) {
763
+ if (!_helper.default.cookieExists(this.getCookieName('accepted_providers'))) {
759
764
  return;
760
765
  }
761
766
 
762
- var settings = _helper.default.cookieGet('cc_accepted_providers');
767
+ var settings = _helper.default.cookieGet(this.getCookieName('accepted_providers'));
763
768
 
764
769
  if (settings == 'null') {
765
770
  return;
@@ -794,11 +799,11 @@ var chefcookie = /*#__PURE__*/function () {
794
799
 
795
800
  var isInit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
796
801
 
797
- if (!_helper.default.cookieExists('cc_accepted_providers')) {
802
+ if (!_helper.default.cookieExists(this.getCookieName('accepted_providers'))) {
798
803
  return;
799
804
  }
800
805
 
801
- var settings = _helper.default.cookieGet('cc_accepted_providers');
806
+ var settings = _helper.default.cookieGet(this.getCookieName('accepted_providers'));
802
807
 
803
808
  if (settings == 'null') {
804
809
  return;
@@ -1047,11 +1052,11 @@ var chefcookie = /*#__PURE__*/function () {
1047
1052
  }, {
1048
1053
  key: "isAccepted",
1049
1054
  value: function isAccepted(provider) {
1050
- if (!_helper.default.cookieExists('cc_accepted_providers')) {
1055
+ if (!_helper.default.cookieExists(this.getCookieName('accepted_providers'))) {
1051
1056
  return false;
1052
1057
  }
1053
1058
 
1054
- return _helper.default.cookieGet('cc_accepted_providers').split(',').indexOf(provider) > -1;
1059
+ return _helper.default.cookieGet(this.getCookieName('accepted_providers')).split(',').indexOf(provider) > -1;
1055
1060
  }
1056
1061
  }, {
1057
1062
  key: "isLoaded",