mirror of
				https://github.com/Mastermindzh/react-cookie-consent.git
				synced 2025-11-04 02:38:50 +01:00 
			
		
		
		
	Compare commits
	
		
			14 Commits
		
	
	
		
			6.2.1
			...
			7136086602
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 7136086602 | |||
| 
						 | 
					c3ba87e62f | ||
| 239001cb19 | |||
| e024961eae | |||
| a19649bbcf | |||
| 696200262e | |||
| e52811b3a8 | |||
| 
						 | 
					814202780b | ||
| 
						 | 
					d01995e3b4 | ||
| 56de263dce | |||
| 
						 | 
					0228e7f32c | ||
| 50216eec3c | |||
| 3e9e988e96 | |||
| 1c6f335500 | 
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -1,2 +1,3 @@
 | 
				
			|||||||
node_modules
 | 
					node_modules
 | 
				
			||||||
build/index.js.LICENSE.txt
 | 
					build/index.js.LICENSE.txt
 | 
				
			||||||
 | 
					example/*
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										20
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								CHANGELOG.md
									
									
									
									
									
								
							@@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
 | 
				
			|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 | 
					The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 | 
				
			||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 | 
					and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## [[6.3.0](https://github.com/Mastermindzh/react-cookie-consent/releases/tag/6.2.3))]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Added the (optional) scrolling effect back in as it is declared legal in some countries now.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## [6.2.4]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- version bumps :)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## [[6.2.3](https://github.com/Mastermindzh/react-cookie-consent/releases/tag/6.2.3)]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Added support for IE11, the webpack generated runtime-code should not use arrow functions
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## [[6.2.2](https://github.com/Mastermindzh/react-cookie-consent/releases/tag/6.2.2)]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Fixed the return type of getCookieConsentValue in the dts file.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## [[6.2.1](https://github.com/Mastermindzh/react-cookie-consent/releases/tag/6.2.1)]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Added the `getCookieConsentValue` to the dts file.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## [[6.2.0](https://github.com/Mastermindzh/react-cookie-consent/releases/tag/6.2.0)]
 | 
					## [[6.2.0](https://github.com/Mastermindzh/react-cookie-consent/releases/tag/6.2.0)]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Added the exported function `getCookieConsentValue` to get the cookie value from custom code
 | 
					Added the exported function `getCookieConsentValue` to get the cookie value from custom code
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										48
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										48
									
								
								README.md
									
									
									
									
									
								
							@@ -20,6 +20,7 @@ Example branch: https://github.com/Mastermindzh/react-cookie-consent/tree/exampl
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
- [Installation](#installation)
 | 
					- [Installation](#installation)
 | 
				
			||||||
- [Using it](#using-it)
 | 
					- [Using it](#using-it)
 | 
				
			||||||
 | 
					  - [getting the cookies value in your own code](#getting-the-cookies-value-in-your-own-code)
 | 
				
			||||||
- [Props](#props)
 | 
					- [Props](#props)
 | 
				
			||||||
- [Debugging it](#debugging-it)
 | 
					- [Debugging it](#debugging-it)
 | 
				
			||||||
- [Why are there two cookies? One of which named "Legacy"](#why-are-there-two-cookies-one-of-which-named-legacy)
 | 
					- [Why are there two cookies? One of which named "Legacy"](#why-are-there-two-cookies-one-of-which-named-legacy)
 | 
				
			||||||
@@ -28,9 +29,11 @@ Example branch: https://github.com/Mastermindzh/react-cookie-consent/tree/exampl
 | 
				
			|||||||
    - [Changing the bar background to red](#changing-the-bar-background-to-red)
 | 
					    - [Changing the bar background to red](#changing-the-bar-background-to-red)
 | 
				
			||||||
    - [Changing the button font-weight to bold](#changing-the-button-font-weight-to-bold)
 | 
					    - [Changing the button font-weight to bold](#changing-the-button-font-weight-to-bold)
 | 
				
			||||||
    - [Using predefined CSS classes](#using-predefined-css-classes)
 | 
					    - [Using predefined CSS classes](#using-predefined-css-classes)
 | 
				
			||||||
 | 
					    - [Accept on scroll](#accept-on-scroll)
 | 
				
			||||||
    - [Flipping the buttons](#flipping-the-buttons)
 | 
					    - [Flipping the buttons](#flipping-the-buttons)
 | 
				
			||||||
    - [Extra cookie options](#extra-cookie-options)
 | 
					    - [Extra cookie options](#extra-cookie-options)
 | 
				
			||||||
    - [Rainbows!](#rainbows)
 | 
					    - [Rainbows!](#rainbows)
 | 
				
			||||||
 | 
					    - [Overlay](#overlay)
 | 
				
			||||||
- [Contributor information](#contributor-information)
 | 
					- [Contributor information](#contributor-information)
 | 
				
			||||||
- [Projects using react-cookie-consent](#projects-using-react-cookie-consent)
 | 
					- [Projects using react-cookie-consent](#projects-using-react-cookie-consent)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -84,12 +87,17 @@ You can optionally set some props like this (next chapter will show all props):
 | 
				
			|||||||
</CookieConsent>
 | 
					</CookieConsent>
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
One of the props (onAccept) is a function, this function will be called after the user has clicked the accept button. You can provide a function like so:
 | 
					One of the props (onAccept) is a function, this function will be called after the user has clicked the accept button. It is called with an object containing a boolean property `acceptedByScrolling` to indicate if the acceptance was triggered by the user scrolling You can provide a function like so:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```js
 | 
					```js
 | 
				
			||||||
<CookieConsent
 | 
					<CookieConsent
 | 
				
			||||||
  onAccept={() => {
 | 
					  onAccept={(acceptedByScrolling) => {
 | 
				
			||||||
 | 
					    if (acceptedByScrolling) {
 | 
				
			||||||
 | 
					      // triggered if user scrolls past threshold
 | 
				
			||||||
 | 
					      alert("Accept was triggered by user scrolling");
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
      alert("Accept was triggered by clicking the Accept button");
 | 
					      alert("Accept was triggered by clicking the Accept button");
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
  }}
 | 
					  }}
 | 
				
			||||||
></CookieConsent>
 | 
					></CookieConsent>
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
@@ -115,11 +123,24 @@ import CookieConsent, { Cookies, getCookieConsentValue } from "react-cookie-cons
 | 
				
			|||||||
console.log(getCookieConsentValue());
 | 
					console.log(getCookieConsentValue());
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### reset the cookies value in your own code
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					react-cookie-consent exports a function called `resetCookieConsentValue`. You can use it in order to remove cookie in client-site:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```js
 | 
				
			||||||
 | 
					import CookieConsent, { Cookies, resetCookieConsentValue } from "react-cookie-consent";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					console.log(resetCookieConsentValue());
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					That option would be interesting if you want to allow user to change their consent. If you want to show again the consent bar, you must force "visible" prop to show again the bar.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Props
 | 
					## Props
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| Prop                     |               Type                | Default value                        | Description                                                                                                                             |
 | 
					| Prop                     |               Type                | Default value                        | Description                                                                                                                             |
 | 
				
			||||||
| -------------------- | :-------------------------------: | ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
 | 
					| ------------------------ | :-----------------------------------------: | ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
 | 
				
			||||||
| location                 |      string, "top", "bottom" or "none"      | "bottom"                             | Syntactic sugar to easily enable you to place the bar at the top or the bottom of the browser window. Use "none" to disable.            |
 | 
					| location                 |      string, "top", "bottom" or "none"      | "bottom"                             | Syntactic sugar to easily enable you to place the bar at the top or the bottom of the browser window. Use "none" to disable.            |
 | 
				
			||||||
 | 
					| visible                  | string, "show", "hidden" or "byCookieValue" | "byCookieValue"                      | Force the consent bar visibility. If "byCookieValue", visibility are defined by cookie consent existence.                            |
 | 
				
			||||||
| children                 |          string or React component          |                                      | Content to appear inside the bar                                                                                                        |
 | 
					| children                 |          string or React component          |                                      | Content to appear inside the bar                                                                                                        |
 | 
				
			||||||
| disableStyles            |                   boolean                   | false                                | If enabled the component will have no default style. (you can still supply style through props)                                         |
 | 
					| disableStyles            |                   boolean                   | false                                | If enabled the component will have no default style. (you can still supply style through props)                                         |
 | 
				
			||||||
| hideOnAccept             |                   boolean                   | true                                 | If disabled the component will not hide it self after the accept button has been clicked. You will need to hide yourself (see onAccept) |
 | 
					| hideOnAccept             |                   boolean                   | true                                 | If disabled the component will not hide it self after the accept button has been clicked. You will need to hide yourself (see onAccept) |
 | 
				
			||||||
@@ -153,9 +174,11 @@ console.log(getCookieConsentValue());
 | 
				
			|||||||
| flipButtons              |                   boolean                   | false                                | If enabled the accept and decline buttons will be flipped                                                                               |
 | 
					| flipButtons              |                   boolean                   | false                                | If enabled the accept and decline buttons will be flipped                                                                               |
 | 
				
			||||||
| ButtonComponent          |               React component               | button                               | React Component to render as a button.                                                                                                  |
 | 
					| ButtonComponent          |               React component               | button                               | React Component to render as a button.                                                                                                  |
 | 
				
			||||||
| sameSite                 | string, "strict", "lax" or "none" | none                                 | Cookies sameSite attribute value                                                                                                        |
 | 
					| sameSite                 | string, "strict", "lax" or "none" | none                                 | Cookies sameSite attribute value                                                                                                        |
 | 
				
			||||||
| cookieSecurity       |              boolean              | undefined                            | Cookie security level. Defaults to true unless running on http.                                                                         |
 | 
					| cookieSecurity           |                   boolean                    ¡| undefined                            | Cookie security level. Defaults to true unless running on http.                                                                         |
 | 
				
			||||||
| ariaAcceptLabel          |                   string                    | Accept cookies                       | Aria label to set on the accept button                                                                                                  |
 | 
					| ariaAcceptLabel          |                   string                    | Accept cookies                       | Aria label to set on the accept button                                                                                                  |
 | 
				
			||||||
| ariaDeclineLabel         |                   string                    | Decline cookies                      | Aria label to set on the decline button                                                                                                 |
 | 
					| ariaDeclineLabel         |                   string                    | Decline cookies                      | Aria label to set on the decline button                                                                                                 |
 | 
				
			||||||
 | 
					| acceptOnScroll           |                   boolean                   | false                                | Defines whether "accept" should be fired after the user scrolls a certain distance (see acceptOnScrollPercentage)                       |
 | 
				
			||||||
 | 
					| acceptOnScrollPercentage |                   number                    | 25                                   | Percentage of the page height the user has to scroll to trigger the accept function if acceptOnScroll is enabled                        |
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Debugging it
 | 
					## Debugging it
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -229,6 +252,23 @@ Which results in:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||

 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#### Accept on scroll
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					You can make the cookiebar disappear after scrolling a certain percentage using acceptOnScroll and acceptOnScrollPercentage.
 | 
				
			||||||
 | 
					It is legal in some use-cases, [Italy](https://www.garanteprivacy.it/web/guest/home/docweb/-/docweb-display/docweb/9679893) being one of them. Consult your legislation on whether this is allowed.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```js
 | 
				
			||||||
 | 
					<CookieConsent
 | 
				
			||||||
 | 
					  acceptOnScroll={true}
 | 
				
			||||||
 | 
					  acceptOnScrollPercentage={50}
 | 
				
			||||||
 | 
					  onAccept={(byScroll) => {
 | 
				
			||||||
 | 
					    alert(`consent given. \n\n By scrolling? ${byScroll}`);
 | 
				
			||||||
 | 
					  }}
 | 
				
			||||||
 | 
					>
 | 
				
			||||||
 | 
					  Hello scroller :)
 | 
				
			||||||
 | 
					</CookieConsent>
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#### Flipping the buttons
 | 
					#### Flipping the buttons
 | 
				
			||||||
 | 
					
 | 
				
			||||||
If you enable the decline button you can pass along the "flipButtons" property to turn the buttons around:
 | 
					If you enable the decline button you can pass along the "flipButtons" property to turn the buttons around:
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										12
									
								
								build/index.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								build/index.d.ts
									
									
									
									
										vendored
									
									
								
							@@ -12,7 +12,7 @@ export interface CookieConsentProps {
 | 
				
			|||||||
  children?: React.ReactNode;
 | 
					  children?: React.ReactNode;
 | 
				
			||||||
  disableStyles?: boolean;
 | 
					  disableStyles?: boolean;
 | 
				
			||||||
  hideOnAccept?: boolean;
 | 
					  hideOnAccept?: boolean;
 | 
				
			||||||
  onAccept?: Function;
 | 
					  onAccept?: (acceptedByScrolling?: boolean) => void;
 | 
				
			||||||
  onDecline?: Function;
 | 
					  onDecline?: Function;
 | 
				
			||||||
  buttonText?: Function | React.ReactNode;
 | 
					  buttonText?: Function | React.ReactNode;
 | 
				
			||||||
  declineButtonText?: Function | React.ReactNode;
 | 
					  declineButtonText?: Function | React.ReactNode;
 | 
				
			||||||
@@ -39,8 +39,18 @@ export interface CookieConsentProps {
 | 
				
			|||||||
  overlayStyle?: object;
 | 
					  overlayStyle?: object;
 | 
				
			||||||
  ariaAcceptLabel?: string;
 | 
					  ariaAcceptLabel?: string;
 | 
				
			||||||
  ariaDeclineLabel?: string;
 | 
					  ariaDeclineLabel?: string;
 | 
				
			||||||
 | 
					  acceptOnScroll?: boolean;
 | 
				
			||||||
 | 
					  acceptOnScrollPercentage?: number;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default class CookieConsent extends React.Component<CookieConsentProps, {}> {}
 | 
					export default class CookieConsent extends React.Component<CookieConsentProps, {}> {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Returns the value of the consent cookie
 | 
				
			||||||
 | 
					 * Retrieves the regular value first and if not found the legacy one according
 | 
				
			||||||
 | 
					 * to: https://web.dev/samesite-cookie-recipes/#handling-incompatible-clients
 | 
				
			||||||
 | 
					 * @param {*} name optional name of the cookie
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					export function getCookieConsentValue(name?: string): string;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export { Cookies };
 | 
					export { Cookies };
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										810
									
								
								build/index.js
									
									
									
									
									
								
							
							
						
						
									
										810
									
								
								build/index.js
									
									
									
									
									
								
							@@ -1,24 +1,210 @@
 | 
				
			|||||||
/*! For license information please see index.js.LICENSE.txt */
 | 
					/*! For license information please see index.js.LICENSE.txt */
 | 
				
			||||||
module.exports = (() => {
 | 
					!(function () {
 | 
				
			||||||
  var e = {
 | 
					  var e = {
 | 
				
			||||||
      866: (e, t, n) => {
 | 
					      808: function (e, t, n) {
 | 
				
			||||||
 | 
					        var o, r, i;
 | 
				
			||||||
 | 
					        void 0 ===
 | 
				
			||||||
 | 
					          (r =
 | 
				
			||||||
 | 
					            "function" ==
 | 
				
			||||||
 | 
					            typeof (o = i =
 | 
				
			||||||
 | 
					              function () {
 | 
				
			||||||
 | 
					                function e() {
 | 
				
			||||||
 | 
					                  for (var e = 0, t = {}; e < arguments.length; e++) {
 | 
				
			||||||
 | 
					                    var n = arguments[e];
 | 
				
			||||||
 | 
					                    for (var o in n) t[o] = n[o];
 | 
				
			||||||
 | 
					                  }
 | 
				
			||||||
 | 
					                  return t;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                function t(e) {
 | 
				
			||||||
 | 
					                  return e.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                return (function n(o) {
 | 
				
			||||||
 | 
					                  function r() {}
 | 
				
			||||||
 | 
					                  function i(t, n, i) {
 | 
				
			||||||
 | 
					                    if ("undefined" != typeof document) {
 | 
				
			||||||
 | 
					                      "number" == typeof (i = e({ path: "/" }, r.defaults, i)).expires &&
 | 
				
			||||||
 | 
					                        (i.expires = new Date(1 * new Date() + 864e5 * i.expires)),
 | 
				
			||||||
 | 
					                        (i.expires = i.expires ? i.expires.toUTCString() : "");
 | 
				
			||||||
 | 
					                      try {
 | 
				
			||||||
 | 
					                        var c = JSON.stringify(n);
 | 
				
			||||||
 | 
					                        /^[\{\[]/.test(c) && (n = c);
 | 
				
			||||||
 | 
					                      } catch (e) {}
 | 
				
			||||||
 | 
					                      (n = o.write
 | 
				
			||||||
 | 
					                        ? o.write(n, t)
 | 
				
			||||||
 | 
					                        : encodeURIComponent(String(n)).replace(
 | 
				
			||||||
 | 
					                            /%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,
 | 
				
			||||||
 | 
					                            decodeURIComponent
 | 
				
			||||||
 | 
					                          )),
 | 
				
			||||||
 | 
					                        (t = encodeURIComponent(String(t))
 | 
				
			||||||
 | 
					                          .replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
 | 
				
			||||||
 | 
					                          .replace(/[\(\)]/g, escape));
 | 
				
			||||||
 | 
					                      var l = "";
 | 
				
			||||||
 | 
					                      for (var a in i)
 | 
				
			||||||
 | 
					                        i[a] && ((l += "; " + a), !0 !== i[a] && (l += "=" + i[a].split(";")[0]));
 | 
				
			||||||
 | 
					                      return (document.cookie = t + "=" + n + l);
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                  }
 | 
				
			||||||
 | 
					                  function c(e, n) {
 | 
				
			||||||
 | 
					                    if ("undefined" != typeof document) {
 | 
				
			||||||
 | 
					                      for (
 | 
				
			||||||
 | 
					                        var r = {}, i = document.cookie ? document.cookie.split("; ") : [], c = 0;
 | 
				
			||||||
 | 
					                        c < i.length;
 | 
				
			||||||
 | 
					                        c++
 | 
				
			||||||
 | 
					                      ) {
 | 
				
			||||||
 | 
					                        var l = i[c].split("="),
 | 
				
			||||||
 | 
					                          a = l.slice(1).join("=");
 | 
				
			||||||
 | 
					                        n || '"' !== a.charAt(0) || (a = a.slice(1, -1));
 | 
				
			||||||
 | 
					                        try {
 | 
				
			||||||
 | 
					                          var s = t(l[0]);
 | 
				
			||||||
 | 
					                          if (((a = (o.read || o)(a, s) || t(a)), n))
 | 
				
			||||||
 | 
					                            try {
 | 
				
			||||||
 | 
					                              a = JSON.parse(a);
 | 
				
			||||||
 | 
					                            } catch (e) {}
 | 
				
			||||||
 | 
					                          if (((r[s] = a), e === s)) break;
 | 
				
			||||||
 | 
					                        } catch (e) {}
 | 
				
			||||||
 | 
					                      }
 | 
				
			||||||
 | 
					                      return e ? r[e] : r;
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                  }
 | 
				
			||||||
 | 
					                  return (
 | 
				
			||||||
 | 
					                    (r.set = i),
 | 
				
			||||||
 | 
					                    (r.get = function (e) {
 | 
				
			||||||
 | 
					                      return c(e, !1);
 | 
				
			||||||
 | 
					                    }),
 | 
				
			||||||
 | 
					                    (r.getJSON = function (e) {
 | 
				
			||||||
 | 
					                      return c(e, !0);
 | 
				
			||||||
 | 
					                    }),
 | 
				
			||||||
 | 
					                    (r.remove = function (t, n) {
 | 
				
			||||||
 | 
					                      i(t, "", e(n, { expires: -1 }));
 | 
				
			||||||
 | 
					                    }),
 | 
				
			||||||
 | 
					                    (r.defaults = {}),
 | 
				
			||||||
 | 
					                    (r.withConverter = n),
 | 
				
			||||||
 | 
					                    r
 | 
				
			||||||
 | 
					                  );
 | 
				
			||||||
 | 
					                })(function () {});
 | 
				
			||||||
 | 
					              })
 | 
				
			||||||
 | 
					              ? o.call(t, n, t, e)
 | 
				
			||||||
 | 
					              : o) || (e.exports = r),
 | 
				
			||||||
 | 
					          (e.exports = i());
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      703: function (e, t, n) {
 | 
				
			||||||
        "use strict";
 | 
					        "use strict";
 | 
				
			||||||
        n.r(t),
 | 
					        var o = n(414);
 | 
				
			||||||
          n.d(t, {
 | 
					        function r() {}
 | 
				
			||||||
            Cookies: () => s(),
 | 
					        function i() {}
 | 
				
			||||||
            OPTIONS: () => h,
 | 
					        (i.resetWarningCache = r),
 | 
				
			||||||
            SAME_SITE_OPTIONS: () => m,
 | 
					          (e.exports = function () {
 | 
				
			||||||
            default: () => j,
 | 
					            function e(e, t, n, r, i, c) {
 | 
				
			||||||
            getCookieConsentValue: () => g,
 | 
					              if (c !== o) {
 | 
				
			||||||
 | 
					                var l = new Error(
 | 
				
			||||||
 | 
					                  "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
 | 
				
			||||||
 | 
					                );
 | 
				
			||||||
 | 
					                throw ((l.name = "Invariant Violation"), l);
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            function t() {
 | 
				
			||||||
 | 
					              return e;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            e.isRequired = e;
 | 
				
			||||||
 | 
					            var n = {
 | 
				
			||||||
 | 
					              array: e,
 | 
				
			||||||
 | 
					              bool: e,
 | 
				
			||||||
 | 
					              func: e,
 | 
				
			||||||
 | 
					              number: e,
 | 
				
			||||||
 | 
					              object: e,
 | 
				
			||||||
 | 
					              string: e,
 | 
				
			||||||
 | 
					              symbol: e,
 | 
				
			||||||
 | 
					              any: e,
 | 
				
			||||||
 | 
					              arrayOf: t,
 | 
				
			||||||
 | 
					              element: e,
 | 
				
			||||||
 | 
					              elementType: e,
 | 
				
			||||||
 | 
					              instanceOf: t,
 | 
				
			||||||
 | 
					              node: e,
 | 
				
			||||||
 | 
					              objectOf: t,
 | 
				
			||||||
 | 
					              oneOf: t,
 | 
				
			||||||
 | 
					              oneOfType: t,
 | 
				
			||||||
 | 
					              shape: t,
 | 
				
			||||||
 | 
					              exact: t,
 | 
				
			||||||
 | 
					              checkPropTypes: i,
 | 
				
			||||||
 | 
					              resetWarningCache: r,
 | 
				
			||||||
 | 
					            };
 | 
				
			||||||
 | 
					            return (n.PropTypes = n), n;
 | 
				
			||||||
          });
 | 
					          });
 | 
				
			||||||
        const o = require("react");
 | 
					      },
 | 
				
			||||||
        var r = n.n(o),
 | 
					      697: function (e, t, n) {
 | 
				
			||||||
          i = n(697),
 | 
					        e.exports = n(703)();
 | 
				
			||||||
          c = n.n(i),
 | 
					      },
 | 
				
			||||||
          a = n(808),
 | 
					      414: function (e) {
 | 
				
			||||||
          s = n.n(a);
 | 
					        "use strict";
 | 
				
			||||||
        function l(e) {
 | 
					        e.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
 | 
				
			||||||
          return (l =
 | 
					      },
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    t = {};
 | 
				
			||||||
 | 
					  function n(o) {
 | 
				
			||||||
 | 
					    var r = t[o];
 | 
				
			||||||
 | 
					    if (void 0 !== r) return r.exports;
 | 
				
			||||||
 | 
					    var i = (t[o] = { exports: {} });
 | 
				
			||||||
 | 
					    return e[o](i, i.exports, n), i.exports;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  (n.n = function (e) {
 | 
				
			||||||
 | 
					    var t =
 | 
				
			||||||
 | 
					      e && e.__esModule
 | 
				
			||||||
 | 
					        ? function () {
 | 
				
			||||||
 | 
					            return e.default;
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        : function () {
 | 
				
			||||||
 | 
					            return e;
 | 
				
			||||||
 | 
					          };
 | 
				
			||||||
 | 
					    return n.d(t, { a: t }), t;
 | 
				
			||||||
 | 
					  }),
 | 
				
			||||||
 | 
					    (n.d = function (e, t) {
 | 
				
			||||||
 | 
					      for (var o in t)
 | 
				
			||||||
 | 
					        n.o(t, o) && !n.o(e, o) && Object.defineProperty(e, o, { enumerable: !0, get: t[o] });
 | 
				
			||||||
 | 
					    }),
 | 
				
			||||||
 | 
					    (n.o = function (e, t) {
 | 
				
			||||||
 | 
					      return Object.prototype.hasOwnProperty.call(e, t);
 | 
				
			||||||
 | 
					    }),
 | 
				
			||||||
 | 
					    (n.r = function (e) {
 | 
				
			||||||
 | 
					      "undefined" != typeof Symbol &&
 | 
				
			||||||
 | 
					        Symbol.toStringTag &&
 | 
				
			||||||
 | 
					        Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }),
 | 
				
			||||||
 | 
					        Object.defineProperty(e, "__esModule", { value: !0 });
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					  var o = {};
 | 
				
			||||||
 | 
					  !(function () {
 | 
				
			||||||
 | 
					    "use strict";
 | 
				
			||||||
 | 
					    n.r(o),
 | 
				
			||||||
 | 
					      n.d(o, {
 | 
				
			||||||
 | 
					        Cookies: function () {
 | 
				
			||||||
 | 
					          return l();
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        OPTIONS: function () {
 | 
				
			||||||
 | 
					          return m;
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        SAME_SITE_OPTIONS: function () {
 | 
				
			||||||
 | 
					          return g;
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        VISIBLE_OPTIONS: function () {
 | 
				
			||||||
 | 
					          return S;
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        default: function () {
 | 
				
			||||||
 | 
					          return B;
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        getCookieConsentValue: function () {
 | 
				
			||||||
 | 
					          return C;
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        resetCookieConsentValue: function () {
 | 
				
			||||||
 | 
					          return k;
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    const e = require("react");
 | 
				
			||||||
 | 
					    var t = n.n(e),
 | 
				
			||||||
 | 
					      r = n(697),
 | 
				
			||||||
 | 
					      i = n.n(r),
 | 
				
			||||||
 | 
					      c = n(808),
 | 
				
			||||||
 | 
					      l = n.n(c);
 | 
				
			||||||
 | 
					    function a(e) {
 | 
				
			||||||
 | 
					      return (a =
 | 
				
			||||||
        "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
 | 
					        "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
 | 
				
			||||||
          ? function (e) {
 | 
					          ? function (e) {
 | 
				
			||||||
              return typeof e;
 | 
					              return typeof e;
 | 
				
			||||||
@@ -32,6 +218,7 @@ module.exports = (() => {
 | 
				
			|||||||
                : typeof e;
 | 
					                : typeof e;
 | 
				
			||||||
            })(e);
 | 
					            })(e);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    var s = ["children"];
 | 
				
			||||||
    function u() {
 | 
					    function u() {
 | 
				
			||||||
      return (u =
 | 
					      return (u =
 | 
				
			||||||
        Object.assign ||
 | 
					        Object.assign ||
 | 
				
			||||||
@@ -60,7 +247,7 @@ module.exports = (() => {
 | 
				
			|||||||
        var n = null != arguments[t] ? arguments[t] : {};
 | 
					        var n = null != arguments[t] ? arguments[t] : {};
 | 
				
			||||||
        t % 2
 | 
					        t % 2
 | 
				
			||||||
          ? p(Object(n), !0).forEach(function (t) {
 | 
					          ? p(Object(n), !0).forEach(function (t) {
 | 
				
			||||||
                  b(e, t, n[t]);
 | 
					              h(e, t, n[t]);
 | 
				
			||||||
            })
 | 
					            })
 | 
				
			||||||
          : Object.getOwnPropertyDescriptors
 | 
					          : Object.getOwnPropertyDescriptors
 | 
				
			||||||
          ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n))
 | 
					          ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n))
 | 
				
			||||||
@@ -70,7 +257,41 @@ module.exports = (() => {
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
      return e;
 | 
					      return e;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
        function b(e, t, n) {
 | 
					    function d(e, t) {
 | 
				
			||||||
 | 
					      for (var n = 0; n < t.length; n++) {
 | 
				
			||||||
 | 
					        var o = t[n];
 | 
				
			||||||
 | 
					        (o.enumerable = o.enumerable || !1),
 | 
				
			||||||
 | 
					          (o.configurable = !0),
 | 
				
			||||||
 | 
					          "value" in o && (o.writable = !0),
 | 
				
			||||||
 | 
					          Object.defineProperty(e, o.key, o);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    function b(e, t) {
 | 
				
			||||||
 | 
					      return (b =
 | 
				
			||||||
 | 
					        Object.setPrototypeOf ||
 | 
				
			||||||
 | 
					        function (e, t) {
 | 
				
			||||||
 | 
					          return (e.__proto__ = t), e;
 | 
				
			||||||
 | 
					        })(e, t);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    function y(e, t) {
 | 
				
			||||||
 | 
					      if (t && ("object" === a(t) || "function" == typeof t)) return t;
 | 
				
			||||||
 | 
					      if (void 0 !== t)
 | 
				
			||||||
 | 
					        throw new TypeError("Derived constructors may only return object or undefined");
 | 
				
			||||||
 | 
					      return v(e);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    function v(e) {
 | 
				
			||||||
 | 
					      if (void 0 === e)
 | 
				
			||||||
 | 
					        throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
 | 
				
			||||||
 | 
					      return e;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    function O(e) {
 | 
				
			||||||
 | 
					      return (O = Object.setPrototypeOf
 | 
				
			||||||
 | 
					        ? Object.getPrototypeOf
 | 
				
			||||||
 | 
					        : function (e) {
 | 
				
			||||||
 | 
					            return e.__proto__ || Object.getPrototypeOf(e);
 | 
				
			||||||
 | 
					          })(e);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    function h(e, t, n) {
 | 
				
			||||||
      return (
 | 
					      return (
 | 
				
			||||||
        t in e
 | 
					        t in e
 | 
				
			||||||
          ? Object.defineProperty(e, t, {
 | 
					          ? Object.defineProperty(e, t, {
 | 
				
			||||||
@@ -83,79 +304,50 @@ module.exports = (() => {
 | 
				
			|||||||
        e
 | 
					        e
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
        function y(e, t) {
 | 
					    var m = { TOP: "top", BOTTOM: "bottom", NONE: "none" },
 | 
				
			||||||
          for (var n = 0; n < t.length; n++) {
 | 
					      g = { STRICT: "strict", LAX: "lax", NONE: "none" },
 | 
				
			||||||
            var o = t[n];
 | 
					      S = { HIDDEN: "hidden", SHOW: "show", BY_COOKIE_VALUE: "byCookieValue" },
 | 
				
			||||||
            (o.enumerable = o.enumerable || !1),
 | 
					      C = function () {
 | 
				
			||||||
              (o.configurable = !0),
 | 
					        var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : w,
 | 
				
			||||||
              "value" in o && (o.writable = !0),
 | 
					          t = l().get(e);
 | 
				
			||||||
              Object.defineProperty(e, o.key, o);
 | 
					        return void 0 === t && (t = l().get(x(e))), t;
 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        function d(e, t) {
 | 
					 | 
				
			||||||
          return (d =
 | 
					 | 
				
			||||||
            Object.setPrototypeOf ||
 | 
					 | 
				
			||||||
            function (e, t) {
 | 
					 | 
				
			||||||
              return (e.__proto__ = t), e;
 | 
					 | 
				
			||||||
            })(e, t);
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        function v(e, t) {
 | 
					 | 
				
			||||||
          return !t || ("object" !== l(t) && "function" != typeof t)
 | 
					 | 
				
			||||||
            ? (function (e) {
 | 
					 | 
				
			||||||
                if (void 0 === e)
 | 
					 | 
				
			||||||
                  throw new ReferenceError(
 | 
					 | 
				
			||||||
                    "this hasn't been initialised - super() hasn't been called"
 | 
					 | 
				
			||||||
                  );
 | 
					 | 
				
			||||||
                return e;
 | 
					 | 
				
			||||||
              })(e)
 | 
					 | 
				
			||||||
            : t;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        function O(e) {
 | 
					 | 
				
			||||||
          return (O = Object.setPrototypeOf
 | 
					 | 
				
			||||||
            ? Object.getPrototypeOf
 | 
					 | 
				
			||||||
            : function (e) {
 | 
					 | 
				
			||||||
                return e.__proto__ || Object.getPrototypeOf(e);
 | 
					 | 
				
			||||||
              })(e);
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        var h = { TOP: "top", BOTTOM: "bottom", NONE: "none" },
 | 
					 | 
				
			||||||
          m = { STRICT: "strict", LAX: "lax", NONE: "none" },
 | 
					 | 
				
			||||||
          g = function () {
 | 
					 | 
				
			||||||
            var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : C,
 | 
					 | 
				
			||||||
              t = s().get(e);
 | 
					 | 
				
			||||||
            return void 0 === t && (t = s().get(S(e))), t;
 | 
					 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
          S = function (e) {
 | 
					      k = function () {
 | 
				
			||||||
 | 
					        var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : w;
 | 
				
			||||||
 | 
					        l().remove(e);
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      x = function (e) {
 | 
				
			||||||
        return "".concat(e, "-legacy");
 | 
					        return "".concat(e, "-legacy");
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
          C = "CookieConsent",
 | 
					      w = "CookieConsent",
 | 
				
			||||||
          k = function (e) {
 | 
					      j = function (e) {
 | 
				
			||||||
        var t = e.condition,
 | 
					        var t = e.condition,
 | 
				
			||||||
          n = e.wrapper,
 | 
					          n = e.wrapper,
 | 
				
			||||||
          o = e.children;
 | 
					          o = e.children;
 | 
				
			||||||
        return t ? n(o) : o;
 | 
					        return t ? n(o) : o;
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
          x = (function (e) {
 | 
					      T = (function (e) {
 | 
				
			||||||
        !(function (e, t) {
 | 
					        !(function (e, t) {
 | 
				
			||||||
          if ("function" != typeof t && null !== t)
 | 
					          if ("function" != typeof t && null !== t)
 | 
				
			||||||
            throw new TypeError("Super expression must either be null or a function");
 | 
					            throw new TypeError("Super expression must either be null or a function");
 | 
				
			||||||
          (e.prototype = Object.create(t && t.prototype, {
 | 
					          (e.prototype = Object.create(t && t.prototype, {
 | 
				
			||||||
            constructor: { value: e, writable: !0, configurable: !0 },
 | 
					            constructor: { value: e, writable: !0, configurable: !0 },
 | 
				
			||||||
          })),
 | 
					          })),
 | 
				
			||||||
                t && d(e, t);
 | 
					            t && b(e, t);
 | 
				
			||||||
        })(a, e);
 | 
					        })(a, e);
 | 
				
			||||||
            var t,
 | 
					        var n,
 | 
				
			||||||
              n,
 | 
					 | 
				
			||||||
          o,
 | 
					          o,
 | 
				
			||||||
 | 
					          r,
 | 
				
			||||||
          i,
 | 
					          i,
 | 
				
			||||||
          c =
 | 
					          c =
 | 
				
			||||||
                ((o = a),
 | 
					            ((r = a),
 | 
				
			||||||
            (i = (function () {
 | 
					            (i = (function () {
 | 
				
			||||||
              if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
 | 
					              if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
 | 
				
			||||||
              if (Reflect.construct.sham) return !1;
 | 
					              if (Reflect.construct.sham) return !1;
 | 
				
			||||||
              if ("function" == typeof Proxy) return !0;
 | 
					              if ("function" == typeof Proxy) return !0;
 | 
				
			||||||
              try {
 | 
					              try {
 | 
				
			||||||
                return (
 | 
					                return (
 | 
				
			||||||
                      Date.prototype.toString.call(Reflect.construct(Date, [], function () {})), !0
 | 
					                  Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})), !0
 | 
				
			||||||
                );
 | 
					                );
 | 
				
			||||||
              } catch (e) {
 | 
					              } catch (e) {
 | 
				
			||||||
                return !1;
 | 
					                return !1;
 | 
				
			||||||
@@ -163,12 +355,12 @@ module.exports = (() => {
 | 
				
			|||||||
            })()),
 | 
					            })()),
 | 
				
			||||||
            function () {
 | 
					            function () {
 | 
				
			||||||
              var e,
 | 
					              var e,
 | 
				
			||||||
                    t = O(o);
 | 
					                t = O(r);
 | 
				
			||||||
              if (i) {
 | 
					              if (i) {
 | 
				
			||||||
                var n = O(this).constructor;
 | 
					                var n = O(this).constructor;
 | 
				
			||||||
                e = Reflect.construct(t, arguments, n);
 | 
					                e = Reflect.construct(t, arguments, n);
 | 
				
			||||||
              } else e = t.apply(this, arguments);
 | 
					              } else e = t.apply(this, arguments);
 | 
				
			||||||
                  return v(this, e);
 | 
					              return y(this, e);
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
        function a(e) {
 | 
					        function a(e) {
 | 
				
			||||||
          var t;
 | 
					          var t;
 | 
				
			||||||
@@ -176,7 +368,18 @@ module.exports = (() => {
 | 
				
			|||||||
            (function (e, t) {
 | 
					            (function (e, t) {
 | 
				
			||||||
              if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
 | 
					              if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
 | 
				
			||||||
            })(this, a),
 | 
					            })(this, a),
 | 
				
			||||||
                ((t = c.call(this, e)).state = {
 | 
					            h(v((t = c.call(this, e))), "handleScroll", function () {
 | 
				
			||||||
 | 
					              var e = t.props.acceptOnScrollPercentage,
 | 
				
			||||||
 | 
					                n = document.documentElement,
 | 
				
			||||||
 | 
					                o = document.body,
 | 
				
			||||||
 | 
					                r = "scrollTop",
 | 
				
			||||||
 | 
					                i = "scrollHeight";
 | 
				
			||||||
 | 
					              ((n[r] || o[r]) / ((n[i] || o[i]) - n.clientHeight)) * 100 > e && t.accept(!0);
 | 
				
			||||||
 | 
					            }),
 | 
				
			||||||
 | 
					            h(v(t), "removeScrollListener", function () {
 | 
				
			||||||
 | 
					              t.props.acceptOnScroll && window.removeEventListener("scroll", t.handleScroll);
 | 
				
			||||||
 | 
					            }),
 | 
				
			||||||
 | 
					            (t.state = {
 | 
				
			||||||
              visible: !1,
 | 
					              visible: !1,
 | 
				
			||||||
              style: {
 | 
					              style: {
 | 
				
			||||||
                alignItems: "baseline",
 | 
					                alignItems: "baseline",
 | 
				
			||||||
@@ -227,24 +430,36 @@ module.exports = (() => {
 | 
				
			|||||||
          );
 | 
					          );
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        return (
 | 
					        return (
 | 
				
			||||||
              (t = a),
 | 
					          (n = a),
 | 
				
			||||||
              (n = [
 | 
					          (o = [
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
              key: "componentDidMount",
 | 
					              key: "componentDidMount",
 | 
				
			||||||
              value: function () {
 | 
					              value: function () {
 | 
				
			||||||
                var e = this.props.debug;
 | 
					                var e = this.props.debug;
 | 
				
			||||||
                    (void 0 === this.getCookieValue() || e) && this.setState({ visible: !0 });
 | 
					                (void 0 === this.getCookieValue() || e) &&
 | 
				
			||||||
 | 
					                  (this.setState({ visible: !0 }),
 | 
				
			||||||
 | 
					                  this.props.acceptOnScroll &&
 | 
				
			||||||
 | 
					                    window.addEventListener("scroll", this.handleScroll, { passive: !0 }));
 | 
				
			||||||
 | 
					              },
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					              key: "componentWillUnmount",
 | 
				
			||||||
 | 
					              value: function () {
 | 
				
			||||||
 | 
					                this.removeScrollListener();
 | 
				
			||||||
              },
 | 
					              },
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
              key: "accept",
 | 
					              key: "accept",
 | 
				
			||||||
              value: function () {
 | 
					              value: function () {
 | 
				
			||||||
                    var e = this.props,
 | 
					                var e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0],
 | 
				
			||||||
                      t = e.cookieName,
 | 
					                  t = this.props,
 | 
				
			||||||
                      n = e.cookieValue,
 | 
					                  n = t.cookieName,
 | 
				
			||||||
                      o = e.hideOnAccept,
 | 
					                  o = t.cookieValue,
 | 
				
			||||||
                      r = e.onAccept;
 | 
					                  r = t.hideOnAccept,
 | 
				
			||||||
                    this.setCookie(t, n), r(), o && this.setState({ visible: !1 });
 | 
					                  i = t.onAccept;
 | 
				
			||||||
 | 
					                this.setCookie(n, o),
 | 
				
			||||||
 | 
					                  i(null != e && e),
 | 
				
			||||||
 | 
					                  r && (this.setState({ visible: !1 }), this.removeScrollListener());
 | 
				
			||||||
              },
 | 
					              },
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
@@ -270,79 +485,84 @@ module.exports = (() => {
 | 
				
			|||||||
                  c = this.props.cookieSecurity;
 | 
					                  c = this.props.cookieSecurity;
 | 
				
			||||||
                void 0 === c && (c = !location || "https:" === location.protocol);
 | 
					                void 0 === c && (c = !location || "https:" === location.protocol);
 | 
				
			||||||
                var a = f(f({ expires: r }, o), {}, { sameSite: i, secure: c });
 | 
					                var a = f(f({ expires: r }, o), {}, { sameSite: i, secure: c });
 | 
				
			||||||
                    i === m.NONE && s().set(S(e), t, a), s().set(e, t, a);
 | 
					                i === g.NONE && l().set(x(e), t, a), l().set(e, t, a);
 | 
				
			||||||
              },
 | 
					              },
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
              key: "getCookieValue",
 | 
					              key: "getCookieValue",
 | 
				
			||||||
              value: function () {
 | 
					              value: function () {
 | 
				
			||||||
                var e = this.props.cookieName;
 | 
					                var e = this.props.cookieName;
 | 
				
			||||||
                    return g(e);
 | 
					                return C(e);
 | 
				
			||||||
              },
 | 
					              },
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
              key: "render",
 | 
					              key: "render",
 | 
				
			||||||
              value: function () {
 | 
					              value: function () {
 | 
				
			||||||
                var e = this;
 | 
					                var e = this;
 | 
				
			||||||
 | 
					                switch (this.props.visible) {
 | 
				
			||||||
 | 
					                  case S.HIDDEN:
 | 
				
			||||||
 | 
					                    return null;
 | 
				
			||||||
 | 
					                  case S.BY_COOKIE_VALUE:
 | 
				
			||||||
                    if (!this.state.visible) return null;
 | 
					                    if (!this.state.visible) return null;
 | 
				
			||||||
                    var t = this.props,
 | 
					 | 
				
			||||||
                      n = t.location,
 | 
					 | 
				
			||||||
                      o = t.style,
 | 
					 | 
				
			||||||
                      i = t.buttonStyle,
 | 
					 | 
				
			||||||
                      c = t.declineButtonStyle,
 | 
					 | 
				
			||||||
                      a = t.contentStyle,
 | 
					 | 
				
			||||||
                      s = t.disableStyles,
 | 
					 | 
				
			||||||
                      l = t.buttonText,
 | 
					 | 
				
			||||||
                      p = t.declineButtonText,
 | 
					 | 
				
			||||||
                      b = t.containerClasses,
 | 
					 | 
				
			||||||
                      y = t.contentClasses,
 | 
					 | 
				
			||||||
                      d = t.buttonClasses,
 | 
					 | 
				
			||||||
                      v = t.buttonWrapperClasses,
 | 
					 | 
				
			||||||
                      O = t.declineButtonClasses,
 | 
					 | 
				
			||||||
                      m = t.buttonId,
 | 
					 | 
				
			||||||
                      g = t.declineButtonId,
 | 
					 | 
				
			||||||
                      S = t.disableButtonStyles,
 | 
					 | 
				
			||||||
                      C = t.enableDeclineButton,
 | 
					 | 
				
			||||||
                      x = t.flipButtons,
 | 
					 | 
				
			||||||
                      j = t.ButtonComponent,
 | 
					 | 
				
			||||||
                      T = t.overlay,
 | 
					 | 
				
			||||||
                      w = t.overlayClasses,
 | 
					 | 
				
			||||||
                      B = t.overlayStyle,
 | 
					 | 
				
			||||||
                      P = t.ariaAcceptLabel,
 | 
					 | 
				
			||||||
                      D = t.ariaDeclineLabel,
 | 
					 | 
				
			||||||
                      E = {},
 | 
					 | 
				
			||||||
                      I = {},
 | 
					 | 
				
			||||||
                      N = {},
 | 
					 | 
				
			||||||
                      _ = {},
 | 
					 | 
				
			||||||
                      R = {};
 | 
					 | 
				
			||||||
                    switch (
 | 
					 | 
				
			||||||
                      (s
 | 
					 | 
				
			||||||
                        ? ((E = u({}, o)),
 | 
					 | 
				
			||||||
                          (I = u({}, i)),
 | 
					 | 
				
			||||||
                          (N = u({}, c)),
 | 
					 | 
				
			||||||
                          (_ = u({}, a)),
 | 
					 | 
				
			||||||
                          (R = u({}, B)))
 | 
					 | 
				
			||||||
                        : ((E = u({}, f(f({}, this.state.style), o))),
 | 
					 | 
				
			||||||
                          (_ = u({}, f(f({}, this.state.contentStyle), a))),
 | 
					 | 
				
			||||||
                          (R = u({}, f(f({}, this.state.overlayStyle), B))),
 | 
					 | 
				
			||||||
                          S
 | 
					 | 
				
			||||||
                            ? ((I = u({}, i)), (N = u({}, c)))
 | 
					 | 
				
			||||||
                            : ((I = u({}, f(f({}, this.state.buttonStyle), i))),
 | 
					 | 
				
			||||||
                              (N = u({}, f(f({}, this.state.declineButtonStyle), c))))),
 | 
					 | 
				
			||||||
                      n)
 | 
					 | 
				
			||||||
                    ) {
 | 
					 | 
				
			||||||
                      case h.TOP:
 | 
					 | 
				
			||||||
                        E.top = "0";
 | 
					 | 
				
			||||||
                        break;
 | 
					 | 
				
			||||||
                      case h.BOTTOM:
 | 
					 | 
				
			||||||
                        E.bottom = "0";
 | 
					 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                    var A = [];
 | 
					                var n = this.props,
 | 
				
			||||||
 | 
					                  o = n.location,
 | 
				
			||||||
 | 
					                  r = n.style,
 | 
				
			||||||
 | 
					                  i = n.buttonStyle,
 | 
				
			||||||
 | 
					                  c = n.declineButtonStyle,
 | 
				
			||||||
 | 
					                  l = n.contentStyle,
 | 
				
			||||||
 | 
					                  a = n.disableStyles,
 | 
				
			||||||
 | 
					                  s = n.buttonText,
 | 
				
			||||||
 | 
					                  p = n.declineButtonText,
 | 
				
			||||||
 | 
					                  d = n.containerClasses,
 | 
				
			||||||
 | 
					                  b = n.contentClasses,
 | 
				
			||||||
 | 
					                  y = n.buttonClasses,
 | 
				
			||||||
 | 
					                  v = n.buttonWrapperClasses,
 | 
				
			||||||
 | 
					                  O = n.declineButtonClasses,
 | 
				
			||||||
 | 
					                  h = n.buttonId,
 | 
				
			||||||
 | 
					                  g = n.declineButtonId,
 | 
				
			||||||
 | 
					                  C = n.disableButtonStyles,
 | 
				
			||||||
 | 
					                  k = n.enableDeclineButton,
 | 
				
			||||||
 | 
					                  x = n.flipButtons,
 | 
				
			||||||
 | 
					                  w = n.ButtonComponent,
 | 
				
			||||||
 | 
					                  T = n.overlay,
 | 
				
			||||||
 | 
					                  B = n.overlayClasses,
 | 
				
			||||||
 | 
					                  E = n.overlayStyle,
 | 
				
			||||||
 | 
					                  P = n.ariaAcceptLabel,
 | 
				
			||||||
 | 
					                  D = n.ariaDeclineLabel,
 | 
				
			||||||
 | 
					                  I = {},
 | 
				
			||||||
 | 
					                  _ = {},
 | 
				
			||||||
 | 
					                  N = {},
 | 
				
			||||||
 | 
					                  A = {},
 | 
				
			||||||
 | 
					                  L = {};
 | 
				
			||||||
 | 
					                switch (
 | 
				
			||||||
 | 
					                  (a
 | 
				
			||||||
 | 
					                    ? ((I = u({}, r)),
 | 
				
			||||||
 | 
					                      (_ = u({}, i)),
 | 
				
			||||||
 | 
					                      (N = u({}, c)),
 | 
				
			||||||
 | 
					                      (A = u({}, l)),
 | 
				
			||||||
 | 
					                      (L = u({}, E)))
 | 
				
			||||||
 | 
					                    : ((I = u({}, f(f({}, this.state.style), r))),
 | 
				
			||||||
 | 
					                      (A = u({}, f(f({}, this.state.contentStyle), l))),
 | 
				
			||||||
 | 
					                      (L = u({}, f(f({}, this.state.overlayStyle), E))),
 | 
				
			||||||
 | 
					                      C
 | 
				
			||||||
 | 
					                        ? ((_ = u({}, i)), (N = u({}, c)))
 | 
				
			||||||
 | 
					                        : ((_ = u({}, f(f({}, this.state.buttonStyle), i))),
 | 
				
			||||||
 | 
					                          (N = u({}, f(f({}, this.state.declineButtonStyle), c))))),
 | 
				
			||||||
 | 
					                  o)
 | 
				
			||||||
 | 
					                ) {
 | 
				
			||||||
 | 
					                  case m.TOP:
 | 
				
			||||||
 | 
					                    I.top = "0";
 | 
				
			||||||
 | 
					                    break;
 | 
				
			||||||
 | 
					                  case m.BOTTOM:
 | 
				
			||||||
 | 
					                    I.bottom = "0";
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                var R = [];
 | 
				
			||||||
                return (
 | 
					                return (
 | 
				
			||||||
                      C &&
 | 
					                  k &&
 | 
				
			||||||
                        A.push(
 | 
					                    R.push(
 | 
				
			||||||
                          r().createElement(
 | 
					                      t().createElement(
 | 
				
			||||||
                            j,
 | 
					                        w,
 | 
				
			||||||
                        {
 | 
					                        {
 | 
				
			||||||
                          key: "declineButton",
 | 
					                          key: "declineButton",
 | 
				
			||||||
                          style: N,
 | 
					                          style: N,
 | 
				
			||||||
@@ -356,39 +576,39 @@ module.exports = (() => {
 | 
				
			|||||||
                        p
 | 
					                        p
 | 
				
			||||||
                      )
 | 
					                      )
 | 
				
			||||||
                    ),
 | 
					                    ),
 | 
				
			||||||
                      A.push(
 | 
					                  R.push(
 | 
				
			||||||
                        r().createElement(
 | 
					                    t().createElement(
 | 
				
			||||||
                          j,
 | 
					                      w,
 | 
				
			||||||
                      {
 | 
					                      {
 | 
				
			||||||
                        key: "acceptButton",
 | 
					                        key: "acceptButton",
 | 
				
			||||||
                            style: I,
 | 
					                        style: _,
 | 
				
			||||||
                            className: d,
 | 
					                        className: y,
 | 
				
			||||||
                            id: m,
 | 
					                        id: h,
 | 
				
			||||||
                        "aria-label": P,
 | 
					                        "aria-label": P,
 | 
				
			||||||
                        onClick: function () {
 | 
					                        onClick: function () {
 | 
				
			||||||
                          e.accept();
 | 
					                          e.accept();
 | 
				
			||||||
                        },
 | 
					                        },
 | 
				
			||||||
                      },
 | 
					                      },
 | 
				
			||||||
                          l
 | 
					                      s
 | 
				
			||||||
                    )
 | 
					                    )
 | 
				
			||||||
                  ),
 | 
					                  ),
 | 
				
			||||||
                      x && A.reverse(),
 | 
					                  x && R.reverse(),
 | 
				
			||||||
                      r().createElement(
 | 
					                  t().createElement(
 | 
				
			||||||
                        k,
 | 
					                    j,
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
                      condition: T,
 | 
					                      condition: T,
 | 
				
			||||||
                      wrapper: function (e) {
 | 
					                      wrapper: function (e) {
 | 
				
			||||||
                            return r().createElement("div", { style: R, className: w }, e);
 | 
					                        return t().createElement("div", { style: L, className: B }, e);
 | 
				
			||||||
                      },
 | 
					                      },
 | 
				
			||||||
                    },
 | 
					                    },
 | 
				
			||||||
                        r().createElement(
 | 
					                    t().createElement(
 | 
				
			||||||
                      "div",
 | 
					                      "div",
 | 
				
			||||||
                          { className: "".concat(b), style: E },
 | 
					                      { className: "".concat(d), style: I },
 | 
				
			||||||
                          r().createElement("div", { style: _, className: y }, this.props.children),
 | 
					                      t().createElement("div", { style: A, className: b }, this.props.children),
 | 
				
			||||||
                          r().createElement(
 | 
					                      t().createElement(
 | 
				
			||||||
                        "div",
 | 
					                        "div",
 | 
				
			||||||
                        { className: "".concat(v) },
 | 
					                        { className: "".concat(v) },
 | 
				
			||||||
                            A.map(function (e) {
 | 
					                        R.map(function (e) {
 | 
				
			||||||
                          return e;
 | 
					                          return e;
 | 
				
			||||||
                        })
 | 
					                        })
 | 
				
			||||||
                      )
 | 
					                      )
 | 
				
			||||||
@@ -397,66 +617,74 @@ module.exports = (() => {
 | 
				
			|||||||
                );
 | 
					                );
 | 
				
			||||||
              },
 | 
					              },
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
              ]) && y(t.prototype, n),
 | 
					          ]) && d(n.prototype, o),
 | 
				
			||||||
          a
 | 
					          a
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
          })(o.Component);
 | 
					      })(e.Component);
 | 
				
			||||||
        (x.propTypes = {
 | 
					    (T.propTypes = {
 | 
				
			||||||
          location: c().oneOf(
 | 
					      location: i().oneOf(
 | 
				
			||||||
            Object.keys(h).map(function (e) {
 | 
					 | 
				
			||||||
              return h[e];
 | 
					 | 
				
			||||||
            })
 | 
					 | 
				
			||||||
          ),
 | 
					 | 
				
			||||||
          sameSite: c().oneOf(
 | 
					 | 
				
			||||||
        Object.keys(m).map(function (e) {
 | 
					        Object.keys(m).map(function (e) {
 | 
				
			||||||
          return m[e];
 | 
					          return m[e];
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
      ),
 | 
					      ),
 | 
				
			||||||
          style: c().object,
 | 
					      visible: i().oneOf(
 | 
				
			||||||
          buttonStyle: c().object,
 | 
					        Object.keys(S).map(function (e) {
 | 
				
			||||||
          declineButtonStyle: c().object,
 | 
					          return S[e];
 | 
				
			||||||
          contentStyle: c().object,
 | 
					        })
 | 
				
			||||||
          children: c().any,
 | 
					      ),
 | 
				
			||||||
          disableStyles: c().bool,
 | 
					      sameSite: i().oneOf(
 | 
				
			||||||
          hideOnAccept: c().bool,
 | 
					        Object.keys(g).map(function (e) {
 | 
				
			||||||
          hideOnDecline: c().bool,
 | 
					          return g[e];
 | 
				
			||||||
          onAccept: c().func,
 | 
					        })
 | 
				
			||||||
          onDecline: c().func,
 | 
					      ),
 | 
				
			||||||
          buttonText: c().oneOfType([c().string, c().func, c().element]),
 | 
					      style: i().object,
 | 
				
			||||||
          declineButtonText: c().oneOfType([c().string, c().func, c().element]),
 | 
					      buttonStyle: i().object,
 | 
				
			||||||
          cookieName: c().string,
 | 
					      declineButtonStyle: i().object,
 | 
				
			||||||
          cookieValue: c().oneOfType([c().string, c().bool, c().number]),
 | 
					      contentStyle: i().object,
 | 
				
			||||||
          declineCookieValue: c().oneOfType([c().string, c().bool, c().number]),
 | 
					      children: i().any,
 | 
				
			||||||
          setDeclineCookie: c().bool,
 | 
					      disableStyles: i().bool,
 | 
				
			||||||
          debug: c().bool,
 | 
					      hideOnAccept: i().bool,
 | 
				
			||||||
          expires: c().number,
 | 
					      hideOnDecline: i().bool,
 | 
				
			||||||
          containerClasses: c().string,
 | 
					      onAccept: i().func,
 | 
				
			||||||
          contentClasses: c().string,
 | 
					      onDecline: i().func,
 | 
				
			||||||
          buttonClasses: c().string,
 | 
					      buttonText: i().oneOfType([i().string, i().func, i().element]),
 | 
				
			||||||
          buttonWrapperClasses: c().string,
 | 
					      declineButtonText: i().oneOfType([i().string, i().func, i().element]),
 | 
				
			||||||
          declineButtonClasses: c().string,
 | 
					      cookieName: i().string,
 | 
				
			||||||
          buttonId: c().string,
 | 
					      cookieValue: i().oneOfType([i().string, i().bool, i().number]),
 | 
				
			||||||
          declineButtonId: c().string,
 | 
					      declineCookieValue: i().oneOfType([i().string, i().bool, i().number]),
 | 
				
			||||||
          extraCookieOptions: c().object,
 | 
					      setDeclineCookie: i().bool,
 | 
				
			||||||
          disableButtonStyles: c().bool,
 | 
					      debug: i().bool,
 | 
				
			||||||
          enableDeclineButton: c().bool,
 | 
					      expires: i().number,
 | 
				
			||||||
          flipButtons: c().bool,
 | 
					      containerClasses: i().string,
 | 
				
			||||||
          ButtonComponent: c().elementType,
 | 
					      contentClasses: i().string,
 | 
				
			||||||
          cookieSecurity: c().bool,
 | 
					      buttonClasses: i().string,
 | 
				
			||||||
          overlay: c().bool,
 | 
					      buttonWrapperClasses: i().string,
 | 
				
			||||||
          overlayClasses: c().string,
 | 
					      declineButtonClasses: i().string,
 | 
				
			||||||
          overlayStyle: c().object,
 | 
					      buttonId: i().string,
 | 
				
			||||||
          ariaAcceptLabel: c().string,
 | 
					      declineButtonId: i().string,
 | 
				
			||||||
          ariaDeclineLabel: c().string,
 | 
					      extraCookieOptions: i().object,
 | 
				
			||||||
 | 
					      disableButtonStyles: i().bool,
 | 
				
			||||||
 | 
					      enableDeclineButton: i().bool,
 | 
				
			||||||
 | 
					      flipButtons: i().bool,
 | 
				
			||||||
 | 
					      ButtonComponent: i().elementType,
 | 
				
			||||||
 | 
					      cookieSecurity: i().bool,
 | 
				
			||||||
 | 
					      overlay: i().bool,
 | 
				
			||||||
 | 
					      overlayClasses: i().string,
 | 
				
			||||||
 | 
					      overlayStyle: i().object,
 | 
				
			||||||
 | 
					      ariaAcceptLabel: i().string,
 | 
				
			||||||
 | 
					      ariaDeclineLabel: i().string,
 | 
				
			||||||
 | 
					      acceptOnScroll: i().bool,
 | 
				
			||||||
 | 
					      acceptOnScrollPercentage: i().number,
 | 
				
			||||||
    }),
 | 
					    }),
 | 
				
			||||||
          (x.defaultProps = {
 | 
					      (T.defaultProps = {
 | 
				
			||||||
        disableStyles: !1,
 | 
					        disableStyles: !1,
 | 
				
			||||||
        hideOnAccept: !0,
 | 
					        hideOnAccept: !0,
 | 
				
			||||||
        hideOnDecline: !0,
 | 
					        hideOnDecline: !0,
 | 
				
			||||||
            location: h.BOTTOM,
 | 
					        location: m.BOTTOM,
 | 
				
			||||||
 | 
					        visible: S.BY_COOKIE_VALUE,
 | 
				
			||||||
        onAccept: function () {},
 | 
					        onAccept: function () {},
 | 
				
			||||||
        onDecline: function () {},
 | 
					        onDecline: function () {},
 | 
				
			||||||
            cookieName: C,
 | 
					        cookieName: w,
 | 
				
			||||||
        cookieValue: !0,
 | 
					        cookieValue: !0,
 | 
				
			||||||
        declineCookieValue: !1,
 | 
					        declineCookieValue: !1,
 | 
				
			||||||
        setDeclineCookie: !0,
 | 
					        setDeclineCookie: !0,
 | 
				
			||||||
@@ -475,10 +703,10 @@ module.exports = (() => {
 | 
				
			|||||||
        disableButtonStyles: !1,
 | 
					        disableButtonStyles: !1,
 | 
				
			||||||
        enableDeclineButton: !1,
 | 
					        enableDeclineButton: !1,
 | 
				
			||||||
        flipButtons: !1,
 | 
					        flipButtons: !1,
 | 
				
			||||||
            sameSite: m.LAX,
 | 
					        sameSite: g.LAX,
 | 
				
			||||||
        ButtonComponent: function (e) {
 | 
					        ButtonComponent: function (e) {
 | 
				
			||||||
              var t = e.children,
 | 
					          var n = e.children,
 | 
				
			||||||
                n = (function (e, t) {
 | 
					            o = (function (e, t) {
 | 
				
			||||||
              if (null == e) return {};
 | 
					              if (null == e) return {};
 | 
				
			||||||
              var n,
 | 
					              var n,
 | 
				
			||||||
                o,
 | 
					                o,
 | 
				
			||||||
@@ -499,175 +727,17 @@ module.exports = (() => {
 | 
				
			|||||||
                      (Object.prototype.propertyIsEnumerable.call(e, n) && (r[n] = e[n]));
 | 
					                      (Object.prototype.propertyIsEnumerable.call(e, n) && (r[n] = e[n]));
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
              return r;
 | 
					              return r;
 | 
				
			||||||
                })(e, ["children"]);
 | 
					            })(e, s);
 | 
				
			||||||
              return r().createElement("button", n, t);
 | 
					          return t().createElement("button", o, n);
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        overlay: !1,
 | 
					        overlay: !1,
 | 
				
			||||||
        overlayClasses: "",
 | 
					        overlayClasses: "",
 | 
				
			||||||
        ariaAcceptLabel: "Accept cookies",
 | 
					        ariaAcceptLabel: "Accept cookies",
 | 
				
			||||||
        ariaDeclineLabel: "Decline cookies",
 | 
					        ariaDeclineLabel: "Decline cookies",
 | 
				
			||||||
 | 
					        acceptOnScroll: !1,
 | 
				
			||||||
 | 
					        acceptOnScrollPercentage: 25,
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
        const j = x;
 | 
					    const B = T;
 | 
				
			||||||
      },
 | 
					  })(),
 | 
				
			||||||
      808: (e, t, n) => {
 | 
					    (module.exports = o);
 | 
				
			||||||
        var o, r, i;
 | 
					 | 
				
			||||||
        void 0 ===
 | 
					 | 
				
			||||||
          (r =
 | 
					 | 
				
			||||||
            "function" ==
 | 
					 | 
				
			||||||
            typeof (o = i = function () {
 | 
					 | 
				
			||||||
              function e() {
 | 
					 | 
				
			||||||
                for (var e = 0, t = {}; e < arguments.length; e++) {
 | 
					 | 
				
			||||||
                  var n = arguments[e];
 | 
					 | 
				
			||||||
                  for (var o in n) t[o] = n[o];
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
                return t;
 | 
					 | 
				
			||||||
              }
 | 
					 | 
				
			||||||
              function t(e) {
 | 
					 | 
				
			||||||
                return e.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
 | 
					 | 
				
			||||||
              }
 | 
					 | 
				
			||||||
              return (function n(o) {
 | 
					 | 
				
			||||||
                function r() {}
 | 
					 | 
				
			||||||
                function i(t, n, i) {
 | 
					 | 
				
			||||||
                  if ("undefined" != typeof document) {
 | 
					 | 
				
			||||||
                    "number" == typeof (i = e({ path: "/" }, r.defaults, i)).expires &&
 | 
					 | 
				
			||||||
                      (i.expires = new Date(1 * new Date() + 864e5 * i.expires)),
 | 
					 | 
				
			||||||
                      (i.expires = i.expires ? i.expires.toUTCString() : "");
 | 
					 | 
				
			||||||
                    try {
 | 
					 | 
				
			||||||
                      var c = JSON.stringify(n);
 | 
					 | 
				
			||||||
                      /^[\{\[]/.test(c) && (n = c);
 | 
					 | 
				
			||||||
                    } catch (e) {}
 | 
					 | 
				
			||||||
                    (n = o.write
 | 
					 | 
				
			||||||
                      ? o.write(n, t)
 | 
					 | 
				
			||||||
                      : encodeURIComponent(String(n)).replace(
 | 
					 | 
				
			||||||
                          /%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,
 | 
					 | 
				
			||||||
                          decodeURIComponent
 | 
					 | 
				
			||||||
                        )),
 | 
					 | 
				
			||||||
                      (t = encodeURIComponent(String(t))
 | 
					 | 
				
			||||||
                        .replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
 | 
					 | 
				
			||||||
                        .replace(/[\(\)]/g, escape));
 | 
					 | 
				
			||||||
                    var a = "";
 | 
					 | 
				
			||||||
                    for (var s in i)
 | 
					 | 
				
			||||||
                      i[s] && ((a += "; " + s), !0 !== i[s] && (a += "=" + i[s].split(";")[0]));
 | 
					 | 
				
			||||||
                    return (document.cookie = t + "=" + n + a);
 | 
					 | 
				
			||||||
                  }
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
                function c(e, n) {
 | 
					 | 
				
			||||||
                  if ("undefined" != typeof document) {
 | 
					 | 
				
			||||||
                    for (
 | 
					 | 
				
			||||||
                      var r = {}, i = document.cookie ? document.cookie.split("; ") : [], c = 0;
 | 
					 | 
				
			||||||
                      c < i.length;
 | 
					 | 
				
			||||||
                      c++
 | 
					 | 
				
			||||||
                    ) {
 | 
					 | 
				
			||||||
                      var a = i[c].split("="),
 | 
					 | 
				
			||||||
                        s = a.slice(1).join("=");
 | 
					 | 
				
			||||||
                      n || '"' !== s.charAt(0) || (s = s.slice(1, -1));
 | 
					 | 
				
			||||||
                      try {
 | 
					 | 
				
			||||||
                        var l = t(a[0]);
 | 
					 | 
				
			||||||
                        if (((s = (o.read || o)(s, l) || t(s)), n))
 | 
					 | 
				
			||||||
                          try {
 | 
					 | 
				
			||||||
                            s = JSON.parse(s);
 | 
					 | 
				
			||||||
                          } catch (e) {}
 | 
					 | 
				
			||||||
                        if (((r[l] = s), e === l)) break;
 | 
					 | 
				
			||||||
                      } catch (e) {}
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                    return e ? r[e] : r;
 | 
					 | 
				
			||||||
                  }
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
                return (
 | 
					 | 
				
			||||||
                  (r.set = i),
 | 
					 | 
				
			||||||
                  (r.get = function (e) {
 | 
					 | 
				
			||||||
                    return c(e, !1);
 | 
					 | 
				
			||||||
                  }),
 | 
					 | 
				
			||||||
                  (r.getJSON = function (e) {
 | 
					 | 
				
			||||||
                    return c(e, !0);
 | 
					 | 
				
			||||||
                  }),
 | 
					 | 
				
			||||||
                  (r.remove = function (t, n) {
 | 
					 | 
				
			||||||
                    i(t, "", e(n, { expires: -1 }));
 | 
					 | 
				
			||||||
                  }),
 | 
					 | 
				
			||||||
                  (r.defaults = {}),
 | 
					 | 
				
			||||||
                  (r.withConverter = n),
 | 
					 | 
				
			||||||
                  r
 | 
					 | 
				
			||||||
                );
 | 
					 | 
				
			||||||
              })(function () {});
 | 
					 | 
				
			||||||
            })
 | 
					 | 
				
			||||||
              ? o.call(t, n, t, e)
 | 
					 | 
				
			||||||
              : o) || (e.exports = r),
 | 
					 | 
				
			||||||
          (e.exports = i());
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      703: (e, t, n) => {
 | 
					 | 
				
			||||||
        "use strict";
 | 
					 | 
				
			||||||
        var o = n(414);
 | 
					 | 
				
			||||||
        function r() {}
 | 
					 | 
				
			||||||
        function i() {}
 | 
					 | 
				
			||||||
        (i.resetWarningCache = r),
 | 
					 | 
				
			||||||
          (e.exports = function () {
 | 
					 | 
				
			||||||
            function e(e, t, n, r, i, c) {
 | 
					 | 
				
			||||||
              if (c !== o) {
 | 
					 | 
				
			||||||
                var a = new Error(
 | 
					 | 
				
			||||||
                  "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
 | 
					 | 
				
			||||||
                );
 | 
					 | 
				
			||||||
                throw ((a.name = "Invariant Violation"), a);
 | 
					 | 
				
			||||||
              }
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            function t() {
 | 
					 | 
				
			||||||
              return e;
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            e.isRequired = e;
 | 
					 | 
				
			||||||
            var n = {
 | 
					 | 
				
			||||||
              array: e,
 | 
					 | 
				
			||||||
              bool: e,
 | 
					 | 
				
			||||||
              func: e,
 | 
					 | 
				
			||||||
              number: e,
 | 
					 | 
				
			||||||
              object: e,
 | 
					 | 
				
			||||||
              string: e,
 | 
					 | 
				
			||||||
              symbol: e,
 | 
					 | 
				
			||||||
              any: e,
 | 
					 | 
				
			||||||
              arrayOf: t,
 | 
					 | 
				
			||||||
              element: e,
 | 
					 | 
				
			||||||
              elementType: e,
 | 
					 | 
				
			||||||
              instanceOf: t,
 | 
					 | 
				
			||||||
              node: e,
 | 
					 | 
				
			||||||
              objectOf: t,
 | 
					 | 
				
			||||||
              oneOf: t,
 | 
					 | 
				
			||||||
              oneOfType: t,
 | 
					 | 
				
			||||||
              shape: t,
 | 
					 | 
				
			||||||
              exact: t,
 | 
					 | 
				
			||||||
              checkPropTypes: i,
 | 
					 | 
				
			||||||
              resetWarningCache: r,
 | 
					 | 
				
			||||||
            };
 | 
					 | 
				
			||||||
            return (n.PropTypes = n), n;
 | 
					 | 
				
			||||||
          });
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      697: (e, t, n) => {
 | 
					 | 
				
			||||||
        e.exports = n(703)();
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      414: (e) => {
 | 
					 | 
				
			||||||
        "use strict";
 | 
					 | 
				
			||||||
        e.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    t = {};
 | 
					 | 
				
			||||||
  function n(o) {
 | 
					 | 
				
			||||||
    if (t[o]) return t[o].exports;
 | 
					 | 
				
			||||||
    var r = (t[o] = { exports: {} });
 | 
					 | 
				
			||||||
    return e[o](r, r.exports, n), r.exports;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  return (
 | 
					 | 
				
			||||||
    (n.n = (e) => {
 | 
					 | 
				
			||||||
      var t = e && e.__esModule ? () => e.default : () => e;
 | 
					 | 
				
			||||||
      return n.d(t, { a: t }), t;
 | 
					 | 
				
			||||||
    }),
 | 
					 | 
				
			||||||
    (n.d = (e, t) => {
 | 
					 | 
				
			||||||
      for (var o in t)
 | 
					 | 
				
			||||||
        n.o(t, o) && !n.o(e, o) && Object.defineProperty(e, o, { enumerable: !0, get: t[o] });
 | 
					 | 
				
			||||||
    }),
 | 
					 | 
				
			||||||
    (n.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t)),
 | 
					 | 
				
			||||||
    (n.r = (e) => {
 | 
					 | 
				
			||||||
      "undefined" != typeof Symbol &&
 | 
					 | 
				
			||||||
        Symbol.toStringTag &&
 | 
					 | 
				
			||||||
        Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }),
 | 
					 | 
				
			||||||
        Object.defineProperty(e, "__esModule", { value: !0 });
 | 
					 | 
				
			||||||
    }),
 | 
					 | 
				
			||||||
    n(866)
 | 
					 | 
				
			||||||
  );
 | 
					 | 
				
			||||||
})();
 | 
					})();
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										1
									
								
								example
									
									
									
									
									
										Submodule
									
								
							
							
								
								
								
								
								
							
						
						
									
										1
									
								
								example
									
									
									
									
									
										Submodule
									
								
							 Submodule example added at bff8dd76c5
									
								
							
							
								
								
									
										12952
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										12952
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -4,7 +4,7 @@
 | 
				
			|||||||
    "name": "Rick van Lieshout",
 | 
					    "name": "Rick van Lieshout",
 | 
				
			||||||
    "email": "info@rickvanlieshout.com"
 | 
					    "email": "info@rickvanlieshout.com"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "version": "6.2.0",
 | 
					  "version": "6.4.0",
 | 
				
			||||||
  "description": "A small, simple and customizable cookie consent bar for use in React applications.",
 | 
					  "description": "A small, simple and customizable cookie consent bar for use in React applications.",
 | 
				
			||||||
  "main": "build/index.js",
 | 
					  "main": "build/index.js",
 | 
				
			||||||
  "types": "build/index.d.ts",
 | 
					  "types": "build/index.d.ts",
 | 
				
			||||||
@@ -22,7 +22,7 @@
 | 
				
			|||||||
    "minor": "npm --no-git-tag-version version minor",
 | 
					    "minor": "npm --no-git-tag-version version minor",
 | 
				
			||||||
    "major": "npm --no-git-tag-version version major",
 | 
					    "major": "npm --no-git-tag-version version major",
 | 
				
			||||||
    "preversion": "grep \"\\[$npm_package_version\\]\" CHANGELOG.md > /dev/null || ( echo 'You need to add an entry in CHANGELOG.md for this version.' && false )",
 | 
					    "preversion": "grep \"\\[$npm_package_version\\]\" CHANGELOG.md > /dev/null || ( echo 'You need to add an entry in CHANGELOG.md for this version.' && false )",
 | 
				
			||||||
    "release": "npm run build && git add -A && git tag $npm_package_version && git commit -m 'release $npm_package_version' && git push && git push --tags && npm publish",
 | 
					    "release": "npm run build && git add -A && git tag $npm_package_version && git commit -m \"release $npm_package_version\" && git push && git push --tags && npm publish",
 | 
				
			||||||
    "release-patch": "npm run patch && npm run release",
 | 
					    "release-patch": "npm run patch && npm run release",
 | 
				
			||||||
    "release-minor": "npm run minor && npm run release",
 | 
					    "release-minor": "npm run minor && npm run release",
 | 
				
			||||||
    "release-major": "npm run major && npm run release"
 | 
					    "release-major": "npm run major && npm run release"
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										12
									
								
								src/index.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								src/index.d.ts
									
									
									
									
										vendored
									
									
								
							@@ -12,7 +12,7 @@ export interface CookieConsentProps {
 | 
				
			|||||||
  children?: React.ReactNode;
 | 
					  children?: React.ReactNode;
 | 
				
			||||||
  disableStyles?: boolean;
 | 
					  disableStyles?: boolean;
 | 
				
			||||||
  hideOnAccept?: boolean;
 | 
					  hideOnAccept?: boolean;
 | 
				
			||||||
  onAccept?: Function;
 | 
					  onAccept?: (acceptedByScrolling?: boolean) => void;
 | 
				
			||||||
  onDecline?: Function;
 | 
					  onDecline?: Function;
 | 
				
			||||||
  buttonText?: Function | React.ReactNode;
 | 
					  buttonText?: Function | React.ReactNode;
 | 
				
			||||||
  declineButtonText?: Function | React.ReactNode;
 | 
					  declineButtonText?: Function | React.ReactNode;
 | 
				
			||||||
@@ -39,8 +39,18 @@ export interface CookieConsentProps {
 | 
				
			|||||||
  overlayStyle?: object;
 | 
					  overlayStyle?: object;
 | 
				
			||||||
  ariaAcceptLabel?: string;
 | 
					  ariaAcceptLabel?: string;
 | 
				
			||||||
  ariaDeclineLabel?: string;
 | 
					  ariaDeclineLabel?: string;
 | 
				
			||||||
 | 
					  acceptOnScroll?: boolean;
 | 
				
			||||||
 | 
					  acceptOnScrollPercentage?: number;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default class CookieConsent extends React.Component<CookieConsentProps, {}> {}
 | 
					export default class CookieConsent extends React.Component<CookieConsentProps, {}> {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Returns the value of the consent cookie
 | 
				
			||||||
 | 
					 * Retrieves the regular value first and if not found the legacy one according
 | 
				
			||||||
 | 
					 * to: https://web.dev/samesite-cookie-recipes/#handling-incompatible-clients
 | 
				
			||||||
 | 
					 * @param {*} name optional name of the cookie
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					export function getCookieConsentValue(name?: string): string;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export { Cookies };
 | 
					export { Cookies };
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										81
									
								
								src/index.js
									
									
									
									
									
								
							
							
						
						
									
										81
									
								
								src/index.js
									
									
									
									
									
								
							@@ -14,6 +14,12 @@ export const SAME_SITE_OPTIONS = {
 | 
				
			|||||||
  NONE: "none",
 | 
					  NONE: "none",
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export const VISIBLE_OPTIONS = {
 | 
				
			||||||
 | 
					  HIDDEN: 'hidden',
 | 
				
			||||||
 | 
					  SHOW: 'show',
 | 
				
			||||||
 | 
					  BY_COOKIE_VALUE: 'byCookieValue'
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Returns the value of the consent cookie
 | 
					 * Returns the value of the consent cookie
 | 
				
			||||||
 * Retrieves the regular value first and if not found the legacy one according
 | 
					 * Retrieves the regular value first and if not found the legacy one according
 | 
				
			||||||
@@ -30,6 +36,15 @@ export const getCookieConsentValue = (name = defaultCookieConsentName) => {
 | 
				
			|||||||
  return cookieValue;
 | 
					  return cookieValue;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Reset the consent cookie
 | 
				
			||||||
 | 
					 * Remove the cookie on browser in order to allow user to change their consent
 | 
				
			||||||
 | 
					 * @param {*} name optional name of the cookie
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					export const resetCookieConsentValue = (name = defaultCookieConsentName) => {
 | 
				
			||||||
 | 
					  Cookies.remove(name);
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Get the legacy cookie name by the regular cookie name
 | 
					 * Get the legacy cookie name by the regular cookie name
 | 
				
			||||||
 * @param {string} name of cookie to get
 | 
					 * @param {string} name of cookie to get
 | 
				
			||||||
@@ -116,21 +131,31 @@ class CookieConsent extends Component {
 | 
				
			|||||||
    // if cookie undefined or debug
 | 
					    // if cookie undefined or debug
 | 
				
			||||||
    if (this.getCookieValue() === undefined || debug) {
 | 
					    if (this.getCookieValue() === undefined || debug) {
 | 
				
			||||||
      this.setState({ visible: true });
 | 
					      this.setState({ visible: true });
 | 
				
			||||||
 | 
					      // if acceptOnScroll is set to true and (cookie is undefined or debug is set to true), add a listener.
 | 
				
			||||||
 | 
					      if (this.props.acceptOnScroll) {
 | 
				
			||||||
 | 
					        window.addEventListener("scroll", this.handleScroll, { passive: true });
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  componentWillUnmount() {
 | 
				
			||||||
 | 
					    // remove listener if still set
 | 
				
			||||||
 | 
					    this.removeScrollListener();
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /**
 | 
					  /**
 | 
				
			||||||
   * Set a persistent accept cookie
 | 
					   * Set a persistent accept cookie
 | 
				
			||||||
   */
 | 
					   */
 | 
				
			||||||
  accept() {
 | 
					  accept(acceptedByScrolling = false) {
 | 
				
			||||||
    const { cookieName, cookieValue, hideOnAccept, onAccept } = this.props;
 | 
					    const { cookieName, cookieValue, hideOnAccept, onAccept } = this.props;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    this.setCookie(cookieName, cookieValue);
 | 
					    this.setCookie(cookieName, cookieValue);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    onAccept();
 | 
					    onAccept(acceptedByScrolling ?? false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (hideOnAccept) {
 | 
					    if (hideOnAccept) {
 | 
				
			||||||
      this.setState({ visible: false });
 | 
					      this.setState({ visible: false });
 | 
				
			||||||
 | 
					      this.removeScrollListener();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -138,13 +163,8 @@ class CookieConsent extends Component {
 | 
				
			|||||||
   * Set a persistent decline cookie
 | 
					   * Set a persistent decline cookie
 | 
				
			||||||
   */
 | 
					   */
 | 
				
			||||||
  decline() {
 | 
					  decline() {
 | 
				
			||||||
    const {
 | 
					    const { cookieName, declineCookieValue, hideOnDecline, onDecline, setDeclineCookie } =
 | 
				
			||||||
      cookieName,
 | 
					      this.props;
 | 
				
			||||||
      declineCookieValue,
 | 
					 | 
				
			||||||
      hideOnDecline,
 | 
					 | 
				
			||||||
      onDecline,
 | 
					 | 
				
			||||||
      setDeclineCookie,
 | 
					 | 
				
			||||||
    } = this.props;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (setDeclineCookie) {
 | 
					    if (setDeclineCookie) {
 | 
				
			||||||
      this.setCookie(cookieName, declineCookieValue);
 | 
					      this.setCookie(cookieName, declineCookieValue);
 | 
				
			||||||
@@ -191,11 +211,48 @@ class CookieConsent extends Component {
 | 
				
			|||||||
    return getCookieConsentValue(cookieName);
 | 
					    return getCookieConsentValue(cookieName);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /**
 | 
				
			||||||
 | 
					   * checks whether scroll has exceeded set amount and fire accept if so.
 | 
				
			||||||
 | 
					   */
 | 
				
			||||||
 | 
					  handleScroll = () => {
 | 
				
			||||||
 | 
					    const { acceptOnScrollPercentage } = this.props;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // (top / height) - height * 100
 | 
				
			||||||
 | 
					    let rootNode = document.documentElement,
 | 
				
			||||||
 | 
					      body = document.body,
 | 
				
			||||||
 | 
					      top = "scrollTop",
 | 
				
			||||||
 | 
					      height = "scrollHeight";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    let percentage =
 | 
				
			||||||
 | 
					      ((rootNode[top] || body[top]) /
 | 
				
			||||||
 | 
					        ((rootNode[height] || body[height]) - rootNode.clientHeight)) *
 | 
				
			||||||
 | 
					      100;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (percentage > acceptOnScrollPercentage) {
 | 
				
			||||||
 | 
					      this.accept(true);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  removeScrollListener = () => {
 | 
				
			||||||
 | 
					    const { acceptOnScroll } = this.props;
 | 
				
			||||||
 | 
					    if (acceptOnScroll) {
 | 
				
			||||||
 | 
					      window.removeEventListener("scroll", this.handleScroll);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  render() {
 | 
					  render() {
 | 
				
			||||||
    // If the bar shouldn't be visible don't render anything.
 | 
					    // If the bar shouldn't be visible don't render anything.
 | 
				
			||||||
 | 
					    switch (this.props.visible) {
 | 
				
			||||||
 | 
					      case VISIBLE_OPTIONS.HIDDEN:
 | 
				
			||||||
 | 
					        return null;
 | 
				
			||||||
 | 
					      case VISIBLE_OPTIONS.BY_COOKIE_VALUE:
 | 
				
			||||||
        if (!this.state.visible) {
 | 
					        if (!this.state.visible) {
 | 
				
			||||||
          return null;
 | 
					          return null;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        break;
 | 
				
			||||||
 | 
					      default:
 | 
				
			||||||
 | 
					        break;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const {
 | 
					    const {
 | 
				
			||||||
      location,
 | 
					      location,
 | 
				
			||||||
@@ -332,6 +389,7 @@ class CookieConsent extends Component {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
CookieConsent.propTypes = {
 | 
					CookieConsent.propTypes = {
 | 
				
			||||||
  location: PropTypes.oneOf(Object.keys(OPTIONS).map((key) => OPTIONS[key])),
 | 
					  location: PropTypes.oneOf(Object.keys(OPTIONS).map((key) => OPTIONS[key])),
 | 
				
			||||||
 | 
					  visible: PropTypes.oneOf(Object.keys(VISIBLE_OPTIONS).map((key) => VISIBLE_OPTIONS[key])),
 | 
				
			||||||
  sameSite: PropTypes.oneOf(Object.keys(SAME_SITE_OPTIONS).map((key) => SAME_SITE_OPTIONS[key])),
 | 
					  sameSite: PropTypes.oneOf(Object.keys(SAME_SITE_OPTIONS).map((key) => SAME_SITE_OPTIONS[key])),
 | 
				
			||||||
  style: PropTypes.object,
 | 
					  style: PropTypes.object,
 | 
				
			||||||
  buttonStyle: PropTypes.object,
 | 
					  buttonStyle: PropTypes.object,
 | 
				
			||||||
@@ -369,6 +427,8 @@ CookieConsent.propTypes = {
 | 
				
			|||||||
  overlayStyle: PropTypes.object,
 | 
					  overlayStyle: PropTypes.object,
 | 
				
			||||||
  ariaAcceptLabel: PropTypes.string,
 | 
					  ariaAcceptLabel: PropTypes.string,
 | 
				
			||||||
  ariaDeclineLabel: PropTypes.string,
 | 
					  ariaDeclineLabel: PropTypes.string,
 | 
				
			||||||
 | 
					  acceptOnScroll: PropTypes.bool,
 | 
				
			||||||
 | 
					  acceptOnScrollPercentage: PropTypes.number,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CookieConsent.defaultProps = {
 | 
					CookieConsent.defaultProps = {
 | 
				
			||||||
@@ -376,6 +436,7 @@ CookieConsent.defaultProps = {
 | 
				
			|||||||
  hideOnAccept: true,
 | 
					  hideOnAccept: true,
 | 
				
			||||||
  hideOnDecline: true,
 | 
					  hideOnDecline: true,
 | 
				
			||||||
  location: OPTIONS.BOTTOM,
 | 
					  location: OPTIONS.BOTTOM,
 | 
				
			||||||
 | 
					  visible: VISIBLE_OPTIONS.BY_COOKIE_VALUE,
 | 
				
			||||||
  onAccept: () => {},
 | 
					  onAccept: () => {},
 | 
				
			||||||
  onDecline: () => {},
 | 
					  onDecline: () => {},
 | 
				
			||||||
  cookieName: defaultCookieConsentName,
 | 
					  cookieName: defaultCookieConsentName,
 | 
				
			||||||
@@ -403,6 +464,8 @@ CookieConsent.defaultProps = {
 | 
				
			|||||||
  overlayClasses: "",
 | 
					  overlayClasses: "",
 | 
				
			||||||
  ariaAcceptLabel: "Accept cookies",
 | 
					  ariaAcceptLabel: "Accept cookies",
 | 
				
			||||||
  ariaDeclineLabel: "Decline cookies",
 | 
					  ariaDeclineLabel: "Decline cookies",
 | 
				
			||||||
 | 
					  acceptOnScroll: false,
 | 
				
			||||||
 | 
					  acceptOnScrollPercentage: 25,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default CookieConsent;
 | 
					export default CookieConsent;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,6 +7,9 @@ module.exports = {
 | 
				
			|||||||
    path: path.resolve(__dirname, "build"),
 | 
					    path: path.resolve(__dirname, "build"),
 | 
				
			||||||
    filename: "index.js",
 | 
					    filename: "index.js",
 | 
				
			||||||
    libraryTarget: "commonjs2", // THIS IS THE MOST IMPORTANT LINE! :mindblow: I wasted more than 2 days until realize this was the line most important in all this guide.
 | 
					    libraryTarget: "commonjs2", // THIS IS THE MOST IMPORTANT LINE! :mindblow: I wasted more than 2 days until realize this was the line most important in all this guide.
 | 
				
			||||||
 | 
					    environment: {
 | 
				
			||||||
 | 
					      arrowFunction: false, // the generated runtime-code should not use arrow functions
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  module: {
 | 
					  module: {
 | 
				
			||||||
    rules: [
 | 
					    rules: [
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user