@stormid/cookie-banner
Advanced tools
Comparing version 1.0.0-alpha.18 to 1.0.0-alpha.19
@@ -1,2 +0,2 @@ | ||
var e=["click","keydown"],n=[13,32],t={ec:"Banner",ea:"Displays",cm1:1},s={ec:"Save preferences",ea:"Banner",cm2:1,cm3:1},i={ec:"Banner",ea:"Clicks",el:"Edit preferences",cm4:1},r={ec:"CookiePrefsWidget",ea:"Displays",cm5:1},a={ec:"Save preferences",ea:"CookiePrefs"},c=function(e){document.cookie=[e.settings.name+"="+btoa(JSON.stringify({consent:e.consent,cid:e.persistentMeasurementParams.cid}))+";","expires="+new Date((new Date).getTime()+24*e.settings.expiry*60*60*1e3).toGMTString()+";",e.settings.path?"path="+e.settings.path+";":"",e.settings.domain?"domain="+e.settings.domain+";":"",e.settings.samesite?"SameSite="+e.settings.samesite+";":"",e.settings.secure?"secure":""].join("")},o=function(e){document.cookie.split("; ").map(function(e){return{name:e.split("=")[0],value:e.split("=")[1],expiry:"Thu, 01 Jan 1970 00:00:01 GMT"}}).map(function(e){return function(n){return document.cookie=[n.name+"="+n.value+";","expires="+n.expiry+";","path="+e.settings.path+";",e.settings.domain?"domain="+e.settings.domain+";":"",e.settings.samesite?"SameSite="+e.settings.samesite+";":"",e.settings.secure?"secure":""].join("")}}(e))},l=function(e){return function(n,t){return n[t]=n[t]?Object.assign({},n[t],{fns:n[t].fns.concat(e.types[t].fns)}):e.types[t],n}},u=function(){},d=function(e){return/radio|checkbox/i.test(e.type)},p=function(e,n){return!d(n)&&function(e){return null!=e.value&&e.value.length>0}(n)&&(e=n.value),d(n)&&n.checked&&(Array.isArray(e)?e.push(n.value):e=[n.value]),e},m="ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|be|bf|bg|bh|bi|bj|bm|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|cl|cm|cn|co|cr|cu|cv|cw|cx|cz|de|dj|dk|dm|do|dz|ec|ee|eg|es|et|eu|fi|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|im|in|io|iq|ir|is|it|je|jo|jp|kg|ki|km|kn|kp|kr|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|na|nc|ne|nf|ng|nl|no|nr|nu|nz|om|pa|pe|pf|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|yt".split("|"),g="netlify|azurewebsites|com|edu|gov|net|mil|org|nom|sch|caa|res|off|gob|int|tur|ip6|uri|urn|asn|act|nsw|qld|tas|vic|pro|biz|adm|adv|agr|arq|art|ato|bio|bmd|cim|cng|cnt|ecn|eco|emp|eng|esp|etc|eti|far|fnd|fot|fst|g12|ggf|imb|ind|inf|jor|jus|leg|lel|mat|med|mus|not|ntr|odo|ppg|psc|psi|qsl|rec|slg|srv|teo|tmp|trd|vet|zlg|web|ltd|sld|pol|fin|k12|lib|pri|aip|fie|eun|sci|prd|cci|pvt|mod|idv|rel|sex|gen|nic|abr|bas|cal|cam|emr|fvg|laz|lig|lom|mar|mol|pmn|pug|sar|sic|taa|tos|umb|vao|vda|ven|mie|北海道|和歌山|神奈川|鹿児島|ass|rep|tra|per|ngo|soc|grp|plc|its|air|and|bus|can|ddr|jfk|mad|nrw|nyc|ski|spy|tcm|ulm|usa|war|fhs|vgs|dep|eid|fet|fla|flå|gol|hof|hol|sel|vik|cri|iwi|ing|abo|fam|gok|gon|gop|gos|aid|atm|gsm|sos|elk|waw|est|aca|bar|cpa|jur|law|sec|plo|www|bir|cbg|jar|khv|msk|nov|nsk|ptz|rnd|spb|stv|tom|tsk|udm|vrn|cmw|kms|nkz|snz|pub|fhv|red|ens|nat|rns|rnu|bbs|tel|bel|kep|nhs|dni|fed|isa|nsn|gub|e12|tec|орг|обр|упр|alt|nis|jpn|mex|ath|iki|nid|gda|inc".split("|"),f=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)})},b={name:".CookiePreferences",path:"/",domain:"localhost"===window.location.hostname?"":"."+function(e){for(var n=(e=e.replace(/^www\./,"")).split(".");n.length>3;)n.shift();return 3===n.length&&-1===g.indexOf(n[1])&&-1===m.indexOf(n[2])&&n.shift(),n.join(".")}(window.location.hostname),secure:!0,samesite:"strict",expiry:365,types:{},necessary:[],policyURL:"/cookie-policy/#preferences",classNames:{banner:"privacy-banner",acceptBtn:"privacy-banner__accept",submitBtn:"privacy-banner__submit",optionsBtn:"privacy-banner__options",field:"privacy-banner__field",form:"privacy-banner__form",fieldset:"privacy-banner__fieldset",legend:"privacy-banner__legend",formContainer:"privacy-banner__form-container",formMessage:"privacy-banner__form-msg",title:"privacy-banner__form-title",description:"privacy-banner__form-description"},hideBannerOnFormPage:!0,savedMessage:"Your settings have been saved.",bannerTemplate:function(e){return'<section role="dialog" aria-live="polite" aria-label="Your privacy" class="'+e.classNames.banner+'">\n <div class="privacy-content">\n <div class="wrap">\n \x3c!--googleoff: all--\x3e\n <div class="privacy-banner__title">Cookies</div>\n <p>We use cookies to improve your experience on our site and show you personalised advertising.</p>\n <p>Find out more from our <a class="privacy-banner__link" rel="noopener noreferrer nofollow" href="/privacy-policy">privacy policy</a> and <a class="privacy-banner__link" rel="noopener noreferrer nofollow" href="'+e.policyURL+'">cookie policy</a>.</p>\n <button type="button" class="btn btn--primary '+e.classNames.acceptBtn+'">Accept and close</button>\n <a class="privacy-banner__link '+e.classNames.optionsBtn+'" rel="noopener noreferrer nofollow" href="'+e.policyURL+'">Your options</a>\n \x3c!--googleon: all--\x3e\n </div>\n </div>\n </section>'},messageTemplate:function(e){return'<div class="'+e.settings.classNames.formMessage+'" aria-role="alert">'+e.settings.savedMessage+"</div>"},formTemplate:function(e){return'<form id="preferences" class="'+e.settings.classNames.form+'" novalidate>\n '+Object.keys(e.settings.types).map(function(n){return'<fieldset class="'+e.settings.classNames.fieldset+'">\n <legend class="'+e.settings.classNames.legend+'">\n <span class="'+e.settings.classNames.title+'">'+e.settings.types[n].title+'</span>\n <span class="'+e.settings.classNames.description+'">'+e.settings.types[n].description+'</span>\n </legend>\n <div class="form-row">\n <div class="relative">\n <label class="privacy-banner__label">\n <input\n class="'+e.settings.classNames.field+'"\n type="radio"\n name="privacy-'+n.split(" ")[0].replace(" ","-")+'"\n value="1"\n '+(1===e.consent[n]?"checked":"")+'>\n <span class="privacy-banner__label-text">I am OK with this</span>\n <span class="privacy-banner__label-description">'+e.settings.types[n].labels.yes+'</span>\n </label> \n </div>\n </div>\n <div class="form-row">\n <div class="relative">\n <label class="privacy-banner__label">\n <input\n class="'+e.settings.classNames.field+'"\n type="radio"\n name="privacy-'+n.split(" ")[0].replace(" ","-")+'"\n value="0"\n '+(0===e.consent[n]?"checked":"")+'>\n <span class="privacy-banner__label-text">No thank you</span>\n <span class="privacy-banner__label-description">'+e.settings.types[n].labels.no+"</span>\n </label> \n </div>\n </div>\n </fieldset>"}).join("")+'\n <button class="'+e.settings.classNames.submitBtn+'"'+(Object.keys(e.consent).length!==Object.keys(e.settings.types).length?" disabled":"")+">Save my settings</button>\n </form>"}};function v(){return v=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},v.apply(this,arguments)}var y=function(e,n){return n},h=function(e,n){return Object.assign({},e,{consent:Object.assign({},e.consent,n)})},k=function(e,n){return Object.assign({},e,{settings:Object.assign({},e.settings,{types:Object.assign({},e.settings.types,n)})})},w=function(e){return function(n){Object.keys(n.consent).forEach(function(e){n.settings.types[e]&&!0!==n.settings.types[e].executed&&n.consent[e]&&Boolean(n.consent[e])&&n.settings.types[e].fns.forEach(function(e){return e(n)})}),e.update(k,Object.keys(n.settings.types).reduce(function(e,t){return e[t]=Object.assign({},n.settings.types[t],{executed:n.settings.types[t].executed||n.consent[t]&&Boolean(n.consent[t])}),e},{}))}},x=function(e){e.settings.necessary.forEach(function(n){return n(e)})},j=function(e){return Object.keys(e).filter(function(n){return e[n]}).join(",")},_=function(){try{var e=new Uint32Array(1);return window.crypto.getRandomValues(e),2147483647&e[0]}catch(e){return Math.round(2147483647*Math.random())}},O=function(e,n,t){return void 0===t&&(t="collect"),function(e){if(!navigator.sendBeacon){var n=document.createElement("img");return n.width=1,n.height=1,n.src=e,n}navigator.sendBeacon(e)}(function(e,n){return"https://www.google-analytics.com/"+n+"?"+function(e){return Object.keys(e).reduce(function(n,t){return null!==e[t]&&n.push(t+"="+encodeURIComponent(e[t])),n},[]).join("&")}(e)}(v({},e.persistentMeasurementParams,n,e.settings.debug?{}:{z:_()}),t))},N=function(e){e.settings.hideBannerOnFormPage&&document.querySelector("."+e.settings.classNames.formContainer)||(document.body.firstElementChild.insertAdjacentHTML("beforebegin",e.settings.bannerTemplate(e.settings)),e.settings.tid&&O(e,t))},S=function(t){return function(r){var a=document.querySelector("."+r.settings.classNames.banner);if(a){var o=[].slice.call(document.querySelectorAll("."+r.settings.classNames.acceptBtn)),l=document.querySelector("."+r.settings.classNames.optionsBtn);e.forEach(function(e){o.forEach(function(i){i.addEventListener(e,function(e){(function(e){return!!e.keyCode&&!~n.indexOf(e.keyCode)||e.which&&3===e.which})(e)||t.update(h,Object.keys(r.settings.types).reduce(function(e,n){return e[n]=1,e},{}),[c,w(t),B(a),q(t,!1),function(e){e.settings.tid&&O(e,v({},s,{cd2:j(t.getState().consent)}))}])})}),l&&r.settings.tid&&l.addEventListener(e,function(e){return O(r,i)})})}}},B=function(e){return function(){return e&&e.parentNode&&e.parentNode.removeChild(e)}},q=function(e,n){return void 0===n&&(n=!0),function(t){var s=document.querySelector("."+t.settings.classNames.formContainer);if(s){s.innerHTML=t.settings.formTemplate(function(e){return Object.keys(e.consent).length>0?e:Object.assign({},e,{consent:Object.keys(e.settings.types).reduce(function(n,t){return e.settings.types[t].suggested&&(n[t]=1),n},{})})}(t)),t.settings.tid&&n&&O(t,r);var i=document.querySelector("."+t.settings.classNames.form),l=document.querySelector("."+t.settings.classNames.banner),u=document.querySelector("."+t.settings.classNames.submitBtn),d=[].slice.call(document.querySelectorAll("."+t.settings.classNames.field)).reduce(function(e,n){var t=n.getAttribute("name").replace("privacy-","");return e[t]?e[t].push(n):e[t]=[n],e},{}),m=function(){return Object.keys(d).reduce(function(e,n){var t=d[n].reduce(p,"");return t&&(e[n]=parseInt(t,10)),e},{})};u.hasAttribute("disabled")&&i.addEventListener("change",function e(n){Object.keys(m()).length===Object.keys(d).length&&(u.removeAttribute("disabled"),i.removeEventListener("change",e))}),i.addEventListener("submit",function(n){n.preventDefault(),e.update(h,m(),[o,c,w(e),B(l),T(u),function(e){if(e.settings.tid){var n=j(e.consent);O(e,v({},a,{cd2:""===n?"None":n,cm2:e.consent.performance?e.consent.performance:0,cm3:e.consent.thirdParty?e.consent.thirdParty:0}))}}])}),window.location.hash.substring(1)===i.id&&window.scrollTo(0,i.getBoundingClientRect().top+window.scrollY)}}},T=function(e){return function(n){e.insertAdjacentHTML("afterend",n.settings.messageTemplate(n)),e.setAttribute("disabled","disabled"),window.setTimeout(function(){e.parentNode.removeChild(e.nextElementSibling),e.removeAttribute("disabled")},3e3)}};module.exports=function(e){return function(e){if(function(){try{document.cookie="cookietest=1";var e=-1!==document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}catch(e){return!1}}()){var n,t=(n={},{update:function(e,t,s){n=e(n,t),s&&s.forEach(function(e){return e(n)})},getState:function(){return n}});e.tid||console.warn("The tid setting is missing. A tid is required for banner measurements.");var s=function(e){try{var n=function(e){for(var n=document.cookie.split("; "),t=0;t<=n.length;t++){if(!n[t])return!1;var s=n[t].split("=");if(s[0]===e.name)return window.atob(s[1])}return!1}(e);if(!n)return[!1,f(),{}];var t=JSON.parse(n),s=t.consent;return[void 0!==s,t.cid||f(),s||{}]}catch(e){return[!1,f(),{}]}}(e),i=s[0];return t.update(y,{settings:e,persistentMeasurementParams:!!e.tid&&(r=s[1],a=e.tid,{tid:a,v:1,t:"event",ds:"cookiebanner",dh:location.hostname,uip:"0.0.0.0",sr:window.screen?window.screen.width+"x"+window.screen.height:null,vp:document.documentElement.clientWidth+"x"+document.documentElement.clientHeight,cid:r,cd1:r,cd3:location.hostname,cd4:"consentAPI"}),consent:s[2]},[x,w(t),i?u:N,q(t),S(t)]),{getState:t.getState}}var r,a}(Object.assign({},b,e,{types:Object.keys(e.types).reduce(l(e),b.types)}))}; | ||
var e=["click","keydown"],n=[13,32],t=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex="-1"])'],s={ec:"Banner",ea:"Displays",cm1:1},i={ec:"Save preferences",ea:"Banner",cm2:1,cm3:1},a={ec:"Banner",ea:"Clicks",el:"Edit preferences",cm4:1},r={ec:"CookiePrefsWidget",ea:"Displays",cm5:1},c={ec:"Save preferences",ea:"CookiePrefs"},o=function(e){document.cookie=[e.settings.name+"="+btoa(JSON.stringify({consent:e.consent,cid:e.persistentMeasurementParams.cid}))+";","expires="+new Date((new Date).getTime()+24*e.settings.expiry*60*60*1e3).toGMTString()+";",e.settings.path?"path="+e.settings.path+";":"",e.settings.domain?"domain="+e.settings.domain+";":"",e.settings.samesite?"SameSite="+e.settings.samesite+";":"",e.settings.secure?"secure":""].join("")},l=function(e){document.cookie.split("; ").map(function(e){return{name:e.split("=")[0],value:e.split("=")[1],expiry:"Thu, 01 Jan 1970 00:00:01 GMT"}}).map(function(e){return function(n){return document.cookie=[n.name+"="+n.value+";","expires="+n.expiry+";","path="+e.settings.path+";",e.settings.domain?"domain="+e.settings.domain+";":"",e.settings.samesite?"SameSite="+e.settings.samesite+";":"",e.settings.secure?"secure":""].join("")}}(e))},u=function(e){return function(n,t){return n[t]=n[t]?Object.assign({},n[t],{fns:n[t].fns.concat(e.types[t].fns)}):e.types[t],n}},d=function(){},p=function(e){return/radio|checkbox/i.test(e.type)},m=function(e,n){return!p(n)&&function(e){return null!=e.value&&e.value.length>0}(n)&&(e=n.value),p(n)&&n.checked&&(Array.isArray(e)?e.push(n.value):e=[n.value]),e},g="ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|be|bf|bg|bh|bi|bj|bm|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|cl|cm|cn|co|cr|cu|cv|cw|cx|cz|de|dj|dk|dm|do|dz|ec|ee|eg|es|et|eu|fi|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|im|in|io|iq|ir|is|it|je|jo|jp|kg|ki|km|kn|kp|kr|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|na|nc|ne|nf|ng|nl|no|nr|nu|nz|om|pa|pe|pf|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|yt".split("|"),f="netlify|azurewebsites|com|edu|gov|net|mil|org|nom|sch|caa|res|off|gob|int|tur|ip6|uri|urn|asn|act|nsw|qld|tas|vic|pro|biz|adm|adv|agr|arq|art|ato|bio|bmd|cim|cng|cnt|ecn|eco|emp|eng|esp|etc|eti|far|fnd|fot|fst|g12|ggf|imb|ind|inf|jor|jus|leg|lel|mat|med|mus|not|ntr|odo|ppg|psc|psi|qsl|rec|slg|srv|teo|tmp|trd|vet|zlg|web|ltd|sld|pol|fin|k12|lib|pri|aip|fie|eun|sci|prd|cci|pvt|mod|idv|rel|sex|gen|nic|abr|bas|cal|cam|emr|fvg|laz|lig|lom|mar|mol|pmn|pug|sar|sic|taa|tos|umb|vao|vda|ven|mie|北海道|和歌山|神奈川|鹿児島|ass|rep|tra|per|ngo|soc|grp|plc|its|air|and|bus|can|ddr|jfk|mad|nrw|nyc|ski|spy|tcm|ulm|usa|war|fhs|vgs|dep|eid|fet|fla|flå|gol|hof|hol|sel|vik|cri|iwi|ing|abo|fam|gok|gon|gop|gos|aid|atm|gsm|sos|elk|waw|est|aca|bar|cpa|jur|law|sec|plo|www|bir|cbg|jar|khv|msk|nov|nsk|ptz|rnd|spb|stv|tom|tsk|udm|vrn|cmw|kms|nkz|snz|pub|fhv|red|ens|nat|rns|rnu|bbs|tel|bel|kep|nhs|dni|fed|isa|nsn|gub|e12|tec|орг|обр|упр|alt|nis|jpn|mex|ath|iki|nid|gda|inc".split("|"),b=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)})},v={name:".CookiePreferences",path:"/",domain:"localhost"===window.location.hostname?"":"."+function(e){for(var n=(e=e.replace(/^www\./,"")).split(".");n.length>3;)n.shift();return 3===n.length&&-1===f.indexOf(n[1])&&-1===g.indexOf(n[2])&&n.shift(),n.join(".")}(window.location.hostname),secure:!0,samesite:"strict",expiry:365,types:{},necessary:[],policyURL:"/cookie-policy/#preferences",classNames:{banner:"privacy-banner",acceptBtn:"privacy-banner__accept",submitBtn:"privacy-banner__submit",optionsBtn:"privacy-banner__options",field:"privacy-banner__field",form:"privacy-banner__form",fieldset:"privacy-banner__fieldset",legend:"privacy-banner__legend",formContainer:"privacy-banner__form-container",formMessage:"privacy-banner__form-msg",title:"privacy-banner__form-title",description:"privacy-banner__form-description"},hideBannerOnFormPage:!0,savedMessage:"Your settings have been saved.",bannerTemplate:function(e){return'<section role="dialog" aria-live="polite" aria-label="Your privacy" class="'+e.classNames.banner+'">\n <div class="privacy-content">\n <div class="wrap">\n \x3c!--googleoff: all--\x3e\n <div class="privacy-banner__title">Cookies</div>\n <p>We use cookies to improve your experience on our site and show you personalised advertising.</p>\n <p>Find out more from our <a class="privacy-banner__link" rel="noopener noreferrer nofollow" href="/privacy-policy">privacy policy</a> and <a class="privacy-banner__link" rel="noopener noreferrer nofollow" href="'+e.policyURL+'">cookie policy</a>.</p>\n <button type="button" class="btn btn--primary '+e.classNames.acceptBtn+'">Accept and close</button>\n <a class="privacy-banner__link '+e.classNames.optionsBtn+'" rel="noopener noreferrer nofollow" href="'+e.policyURL+'">Your options</a>\n \x3c!--googleon: all--\x3e\n </div>\n </div>\n </section>'},messageTemplate:function(e){return'<div class="'+e.settings.classNames.formMessage+'" aria-role="alert">'+e.settings.savedMessage+"</div>"},formTemplate:function(e){return'<form id="preferences" class="'+e.settings.classNames.form+'" novalidate>\n '+Object.keys(e.settings.types).map(function(n){return'<fieldset class="'+e.settings.classNames.fieldset+'">\n <legend class="'+e.settings.classNames.legend+'">\n <span class="'+e.settings.classNames.title+'">'+e.settings.types[n].title+'</span>\n <span class="'+e.settings.classNames.description+'">'+e.settings.types[n].description+'</span>\n </legend>\n <div class="form-row">\n <div class="relative">\n <label class="privacy-banner__label">\n <input\n class="'+e.settings.classNames.field+'"\n type="radio"\n name="privacy-'+n.split(" ")[0].replace(" ","-")+'"\n value="1"\n '+(1===e.consent[n]?"checked":"")+'>\n <span class="privacy-banner__label-text">I am OK with this</span>\n <span class="privacy-banner__label-description">'+e.settings.types[n].labels.yes+'</span>\n </label> \n </div>\n </div>\n <div class="form-row">\n <div class="relative">\n <label class="privacy-banner__label">\n <input\n class="'+e.settings.classNames.field+'"\n type="radio"\n name="privacy-'+n.split(" ")[0].replace(" ","-")+'"\n value="0"\n '+(0===e.consent[n]?"checked":"")+'>\n <span class="privacy-banner__label-text">No thank you</span>\n <span class="privacy-banner__label-description">'+e.settings.types[n].labels.no+"</span>\n </label> \n </div>\n </div>\n </fieldset>"}).join("")+'\n <button class="'+e.settings.classNames.submitBtn+'"'+(Object.keys(e.consent).length!==Object.keys(e.settings.types).length?" disabled":"")+">Save my settings</button>\n </form>"}};function y(){return y=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},y.apply(this,arguments)}var h=function(e,n){return n},k=function(e,n){return Object.assign({},e,{bannerOpen:n})},w=function(e,n){return Object.assign({},e,{consent:Object.assign({},e.consent,n)})},x=function(e,n){return Object.assign({},e,{settings:Object.assign({},e.settings,{types:Object.assign({},e.settings.types,n)})})},j=function(e){return function(n){Object.keys(n.consent).forEach(function(e){n.settings.types[e]&&!0!==n.settings.types[e].executed&&n.consent[e]&&Boolean(n.consent[e])&&n.settings.types[e].fns.forEach(function(e){return e(n)})}),e.update(x,Object.keys(n.settings.types).reduce(function(e,t){return e[t]=Object.assign({},n.settings.types[t],{executed:n.settings.types[t].executed||n.consent[t]&&Boolean(n.consent[t])}),e},{}))}},_=function(e){e.settings.necessary.forEach(function(n){return n(e)})},O=function(e){return Object.keys(e).filter(function(n){return e[n]}).join(",")},S=function(){try{var e=new Uint32Array(1);return window.crypto.getRandomValues(e),2147483647&e[0]}catch(e){return Math.round(2147483647*Math.random())}},N=function(e,n,t){return void 0===t&&(t="collect"),function(e){if(!navigator.sendBeacon){var n=document.createElement("img");return n.width=1,n.height=1,n.src=e,n}navigator.sendBeacon(e)}(function(e,n){return"https://www.google-analytics.com/"+n+"?"+function(e){return Object.keys(e).reduce(function(n,t){return null!==e[t]&&n.push(t+"="+encodeURIComponent(e[t])),n},[]).join("&")}(e)}(y({},e.persistentMeasurementParams,n,e.settings.debug?{}:{z:S()}),t))},B=function(e){return function(){var n=e.getState();n.bannerOpen||n.settings.hideBannerOnFormPage&&document.querySelector("."+n.settings.classNames.formContainer)||(document.body.firstElementChild.insertAdjacentHTML("beforebegin",n.settings.bannerTemplate(n.settings)),n.settings.tid&&N(n,s),e.update(k,!0))}},q=function(t){return function(){var s=t.getState(),r=document.querySelector("."+s.settings.classNames.banner);if(r){var c=[].slice.call(document.querySelectorAll("."+s.settings.classNames.acceptBtn)),l=document.querySelector("."+s.settings.classNames.optionsBtn);e.forEach(function(e){c.forEach(function(a){a.addEventListener(e,function(e){(function(e){return!!e.keyCode&&!~n.indexOf(e.keyCode)||e.which&&3===e.which})(e)||t.update(w,Object.keys(s.settings.types).reduce(function(e,n){return e[n]=1,e},{}),[o,j(t),E(t,r),T(t,!1),function(e){e.settings.tid&&N(e,y({},i,{cd2:O(t.getState().consent)}))}])})}),l&&s.settings.tid&&l.addEventListener(e,function(e){return N(s,a)})})}}},E=function(e,n){return function(){n&&n.parentNode&&(n.parentNode.removeChild(n),e.update(k,!1))}},T=function(e,n){return void 0===n&&(n=!0),function(){var t=e.getState(),s=document.querySelector("."+t.settings.classNames.formContainer);if(s){s.innerHTML=t.settings.formTemplate(function(e){return Object.keys(e.consent).length>0?e:Object.assign({},e,{consent:Object.keys(e.settings.types).reduce(function(n,t){return e.settings.types[t].suggested&&(n[t]=1),n},{})})}(t)),t.settings.tid&&n&&N(t,r);var i=document.querySelector("."+t.settings.classNames.form),a=document.querySelector("."+t.settings.classNames.banner),u=document.querySelector("."+t.settings.classNames.submitBtn),d=[].slice.call(document.querySelectorAll("."+t.settings.classNames.field)).reduce(function(e,n){var t=n.getAttribute("name").replace("privacy-","");return e[t]?e[t].push(n):e[t]=[n],e},{}),p=function(){return Object.keys(d).reduce(function(e,n){var t=d[n].reduce(m,"");return t&&(e[n]=parseInt(t,10)),e},{})};u.hasAttribute("disabled")&&i.addEventListener("change",function e(n){Object.keys(p()).length===Object.keys(d).length&&(u.removeAttribute("disabled"),i.removeEventListener("change",e))}),i.addEventListener("submit",function(n){n.preventDefault(),e.update(w,p(),[l,o,j(e),E(e,a),z(u),function(e){if(e.settings.tid){var n=O(e.consent);N(e,y({},c,{cd2:""===n?"None":n,cm2:e.consent.performance?e.consent.performance:0,cm3:e.consent.thirdParty?e.consent.thirdParty:0}))}}])}),window.location.hash.substring(1)===i.id&&window.scrollTo(0,i.getBoundingClientRect().top+window.scrollY)}}},z=function(e){return function(n){e.insertAdjacentHTML("afterend",n.settings.messageTemplate(n)),e.setAttribute("disabled","disabled"),window.setTimeout(function(){e.parentNode.removeChild(e.nextElementSibling),e.removeAttribute("disabled")},3e3)}};module.exports=function(e){return function(e){if(function(){try{document.cookie="cookietest=1";var e=-1!==document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}catch(e){return!1}}()){var n,s=(n={},{update:function(e,t,s){n=e(n,t),s&&s.forEach(function(e){return e(n)})},getState:function(){return n}});e.tid||console.warn("The tid setting is missing. A tid is required for banner measurements.");var i=function(e){try{var n=function(e){for(var n=document.cookie.split("; "),t=0;t<=n.length;t++){if(!n[t])return!1;var s=n[t].split("=");if(s[0]===e.name)return window.atob(s[1])}return!1}(e);if(!n)return[!1,b(),{}];var t=JSON.parse(n),s=t.consent;return[void 0!==s,t.cid||b(),s||{}]}catch(e){return[!1,b(),{}]}}(e),a=i[0];return s.update(h,{settings:e,bannerOpen:!1,persistentMeasurementParams:!!e.tid&&(r=i[1],c=e.tid,{tid:c,v:1,t:"event",ds:"cookiebanner",dh:location.hostname,uip:"0.0.0.0",sr:window.screen?window.screen.width+"x"+window.screen.height:null,vp:document.documentElement.clientWidth+"x"+document.documentElement.clientHeight,cid:r,cd1:r,cd3:location.hostname,cd4:"consentAPI"}),consent:i[2]},[_,j(s),a?d:B(s),T(s),q(s)]),{getState:s.getState,showBanner:function(e){(function(e){return function(n){if(B(e)(),e.getState().bannerOpen){var s,i=(s=document.body.firstElementChild,[].slice.call(s.querySelectorAll(t.join(","))));i.length>0&&i[0].focus(),n&&n.call&&n(e.getState())}}})(s)(e),q(s)()},renderForm:T(s)}}var r,c}(Object.assign({},v,e,{types:Object.keys(e.types).reduce(u(e),v.types)}))}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
const e=["click","keydown"],t=[13,32],s={ec:"Banner",ea:"Displays",cm1:1},n={ec:"Save preferences",ea:"Banner",cm2:1,cm3:1},a={ec:"Banner",ea:"Clicks",el:"Edit preferences",cm4:1},i={ec:"CookiePrefsWidget",ea:"Displays",cm5:1},r={ec:"Save preferences",ea:"CookiePrefs"},c=e=>{document.cookie=[`${e.settings.name}=${btoa(JSON.stringify({consent:e.consent,cid:e.persistentMeasurementParams.cid}))};`,`expires=${new Date((new Date).getTime()+24*e.settings.expiry*60*60*1e3).toGMTString()};`,e.settings.path?`path=${e.settings.path};`:"",e.settings.domain?`domain=${e.settings.domain};`:"",e.settings.samesite?`SameSite=${e.settings.samesite};`:"",e.settings.secure?"secure":""].join("")},o=e=>{document.cookie.split("; ").map(e=>({name:e.split("=")[0],value:e.split("=")[1],expiry:"Thu, 01 Jan 1970 00:00:01 GMT"})).map((e=>t=>document.cookie=[`${t.name}=${t.value};`,`expires=${t.expiry};`,`path=${e.settings.path};`,e.settings.domain?`domain=${e.settings.domain};`:"",e.settings.samesite?`SameSite=${e.settings.samesite};`:"",e.settings.secure?"secure":""].join(""))(e))},l=e=>(t,s)=>(t[s]=t[s]?Object.assign({},t[s],{fns:t[s].fns.concat(e.types[s].fns)}):e.types[s],t),d=()=>{},p=e=>/radio|checkbox/i.test(e.type),m=(e,t)=>(!p(t)&&(e=>null!=e.value&&e.value.length>0)(t)&&(e=t.value),p(t)&&t.checked&&(Array.isArray(e)?e.push(t.value):e=[t.value]),e),g="ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|be|bf|bg|bh|bi|bj|bm|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|cl|cm|cn|co|cr|cu|cv|cw|cx|cz|de|dj|dk|dm|do|dz|ec|ee|eg|es|et|eu|fi|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|im|in|io|iq|ir|is|it|je|jo|jp|kg|ki|km|kn|kp|kr|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|na|nc|ne|nf|ng|nl|no|nr|nu|nz|om|pa|pe|pf|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|yt".split("|"),u="netlify|azurewebsites|com|edu|gov|net|mil|org|nom|sch|caa|res|off|gob|int|tur|ip6|uri|urn|asn|act|nsw|qld|tas|vic|pro|biz|adm|adv|agr|arq|art|ato|bio|bmd|cim|cng|cnt|ecn|eco|emp|eng|esp|etc|eti|far|fnd|fot|fst|g12|ggf|imb|ind|inf|jor|jus|leg|lel|mat|med|mus|not|ntr|odo|ppg|psc|psi|qsl|rec|slg|srv|teo|tmp|trd|vet|zlg|web|ltd|sld|pol|fin|k12|lib|pri|aip|fie|eun|sci|prd|cci|pvt|mod|idv|rel|sex|gen|nic|abr|bas|cal|cam|emr|fvg|laz|lig|lom|mar|mol|pmn|pug|sar|sic|taa|tos|umb|vao|vda|ven|mie|北海道|和歌山|神奈川|鹿児島|ass|rep|tra|per|ngo|soc|grp|plc|its|air|and|bus|can|ddr|jfk|mad|nrw|nyc|ski|spy|tcm|ulm|usa|war|fhs|vgs|dep|eid|fet|fla|flå|gol|hof|hol|sel|vik|cri|iwi|ing|abo|fam|gok|gon|gop|gos|aid|atm|gsm|sos|elk|waw|est|aca|bar|cpa|jur|law|sec|plo|www|bir|cbg|jar|khv|msk|nov|nsk|ptz|rnd|spb|stv|tom|tsk|udm|vrn|cmw|kms|nkz|snz|pub|fhv|red|ens|nat|rns|rnu|bbs|tel|bel|kep|nhs|dni|fed|isa|nsn|gub|e12|tec|орг|обр|упр|alt|nis|jpn|mex|ath|iki|nid|gda|inc".split("|"),b=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)});var y={name:".CookiePreferences",path:"/",domain:"localhost"===window.location.hostname?"":`.${(e=>{let t=(e=e.replace(/^www\./,"")).split(".");for(;t.length>3;)t.shift();return 3===t.length&&-1===u.indexOf(t[1])&&-1===g.indexOf(t[2])&&t.shift(),t.join(".")})(window.location.hostname)}`,secure:!0,samesite:"strict",expiry:365,types:{},necessary:[],policyURL:"/cookie-policy/#preferences",classNames:{banner:"privacy-banner",acceptBtn:"privacy-banner__accept",submitBtn:"privacy-banner__submit",optionsBtn:"privacy-banner__options",field:"privacy-banner__field",form:"privacy-banner__form",fieldset:"privacy-banner__fieldset",legend:"privacy-banner__legend",formContainer:"privacy-banner__form-container",formMessage:"privacy-banner__form-msg",title:"privacy-banner__form-title",description:"privacy-banner__form-description"},hideBannerOnFormPage:!0,savedMessage:"Your settings have been saved.",bannerTemplate:e=>`<section role="dialog" aria-live="polite" aria-label="Your privacy" class="${e.classNames.banner}">\n <div class="privacy-content">\n <div class="wrap">\n \x3c!--googleoff: all--\x3e\n <div class="privacy-banner__title">Cookies</div>\n <p>We use cookies to improve your experience on our site and show you personalised advertising.</p>\n <p>Find out more from our <a class="privacy-banner__link" rel="noopener noreferrer nofollow" href="/privacy-policy">privacy policy</a> and <a class="privacy-banner__link" rel="noopener noreferrer nofollow" href="${e.policyURL}">cookie policy</a>.</p>\n <button type="button" class="btn btn--primary ${e.classNames.acceptBtn}">Accept and close</button>\n <a class="privacy-banner__link ${e.classNames.optionsBtn}" rel="noopener noreferrer nofollow" href="${e.policyURL}">Your options</a>\n \x3c!--googleon: all--\x3e\n </div>\n </div>\n </section>`,messageTemplate:e=>`<div class="${e.settings.classNames.formMessage}" aria-role="alert">${e.settings.savedMessage}</div>`,formTemplate:e=>`<form id="preferences" class="${e.settings.classNames.form}" novalidate>\n ${Object.keys(e.settings.types).map(t=>`<fieldset class="${e.settings.classNames.fieldset}">\n <legend class="${e.settings.classNames.legend}">\n <span class="${e.settings.classNames.title}">${e.settings.types[t].title}</span>\n <span class="${e.settings.classNames.description}">${e.settings.types[t].description}</span>\n </legend>\n <div class="form-row">\n <div class="relative">\n <label class="privacy-banner__label">\n <input\n class="${e.settings.classNames.field}"\n type="radio"\n name="privacy-${t.split(" ")[0].replace(" ","-")}"\n value="1"\n ${1===e.consent[t]?"checked":""}>\n <span class="privacy-banner__label-text">I am OK with this</span>\n <span class="privacy-banner__label-description">${e.settings.types[t].labels.yes}</span>\n </label> \n </div>\n </div>\n <div class="form-row">\n <div class="relative">\n <label class="privacy-banner__label">\n <input\n class="${e.settings.classNames.field}"\n type="radio"\n name="privacy-${t.split(" ")[0].replace(" ","-")}"\n value="0"\n ${0===e.consent[t]?"checked":""}>\n <span class="privacy-banner__label-text">No thank you</span>\n <span class="privacy-banner__label-description">${e.settings.types[t].labels.no}</span>\n </label> \n </div>\n </div>\n </fieldset>`).join("")}\n <button class="${e.settings.classNames.submitBtn}"${Object.keys(e.consent).length!==Object.keys(e.settings.types).length?" disabled":""}>Save my settings</button>\n </form>`};function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},f.apply(this,arguments)}const v=(e,t)=>t,h=(e,t)=>Object.assign({},e,{consent:Object.assign({},e.consent,t)}),k=(e,t)=>Object.assign({},e,{settings:Object.assign({},e.settings,{types:Object.assign({},e.settings.types,t)})}),w=e=>t=>{Object.keys(t.consent).forEach(e=>{t.settings.types[e]&&!0!==t.settings.types[e].executed&&t.consent[e]&&Boolean(t.consent[e])&&t.settings.types[e].fns.forEach(e=>e(t))}),e.update(k,Object.keys(t.settings.types).reduce((e,s)=>(e[s]=Object.assign({},t.settings.types[s],{executed:t.settings.types[s].executed||t.consent[s]&&Boolean(t.consent[s])}),e),{}))},x=e=>{e.settings.necessary.forEach(t=>t(e))},$=(e,t)=>({tid:t,v:1,t:"event",ds:"cookiebanner",dh:location.hostname,uip:"0.0.0.0",sr:window.screen?`${window.screen.width}x${window.screen.height}`:null,vp:`${document.documentElement.clientWidth}x${document.documentElement.clientHeight}`,cid:e,cd1:e,cd3:location.hostname,cd4:"consentAPI"}),j=e=>Object.keys(e).filter(t=>e[t]).join(","),_=()=>{try{const e=new Uint32Array(1);return window.crypto.getRandomValues(e),2147483647&e[0]}catch(e){return Math.round(2147483647*Math.random())}},O=(e,t,s="collect")=>(e=>{if(navigator.sendBeacon)return void navigator.sendBeacon(e);const t=document.createElement("img");return t.width=1,t.height=1,t.src=e,t})(((e,t)=>`https://www.google-analytics.com/${t}?${(e=>Object.keys(e).reduce((t,s)=>(null!==e[s]&&t.push(`${s}=${encodeURIComponent(e[s])}`),t),[]).join("&"))(e)}`)(f({},e.persistentMeasurementParams,t,e.settings.debug?{}:{z:_()}),s)),N=e=>{e.settings.hideBannerOnFormPage&&document.querySelector(`.${e.settings.classNames.formContainer}`)||(document.body.firstElementChild.insertAdjacentHTML("beforebegin",e.settings.bannerTemplate(e.settings)),e.settings.tid&&O(e,s))},S=s=>i=>{const r=document.querySelector(`.${i.settings.classNames.banner}`);if(!r)return;const o=[].slice.call(document.querySelectorAll(`.${i.settings.classNames.acceptBtn}`)),l=document.querySelector(`.${i.settings.classNames.optionsBtn}`);e.forEach(e=>{o.forEach(a=>{a.addEventListener(e,e=>{(e=>!!e.keyCode&&!~t.indexOf(e.keyCode)||e.which&&3===e.which)(e)||s.update(h,Object.keys(i.settings.types).reduce((e,t)=>(e[t]=1,e),{}),[c,w(s),B(r),q(s,!1),e=>{e.settings.tid&&O(e,f({},n,{cd2:j(s.getState().consent)}))}])})}),l&&i.settings.tid&&l.addEventListener(e,e=>O(i,a))})},B=e=>()=>e&&e.parentNode&&e.parentNode.removeChild(e),q=(e,t=!0)=>s=>{const n=document.querySelector(`.${s.settings.classNames.formContainer}`);if(!n)return;n.innerHTML=s.settings.formTemplate((e=>Object.keys(e.consent).length>0?e:Object.assign({},e,{consent:Object.keys(e.settings.types).reduce((t,s)=>(e.settings.types[s].suggested&&(t[s]=1),t),{})}))(s)),s.settings.tid&&t&&O(s,i);const a=document.querySelector(`.${s.settings.classNames.form}`),l=document.querySelector(`.${s.settings.classNames.banner}`),d=document.querySelector(`.${s.settings.classNames.submitBtn}`),p=[].slice.call(document.querySelectorAll(`.${s.settings.classNames.field}`)).reduce((e,t)=>{const s=t.getAttribute("name").replace("privacy-","");return e[s]?e[s].push(t):e[s]=[t],e},{}),g=()=>Object.keys(p).reduce((e,t)=>{const s=p[t].reduce(m,"");return s&&(e[t]=parseInt(s,10)),e},{}),u=e=>{Object.keys(g()).length===Object.keys(p).length&&(d.removeAttribute("disabled"),a.removeEventListener("change",u))};d.hasAttribute("disabled")&&a.addEventListener("change",u),a.addEventListener("submit",t=>{t.preventDefault(),e.update(h,g(),[o,c,w(e),B(l),T(d),e=>{if(!e.settings.tid)return;const t=j(e.consent);O(e,f({},r,{cd2:""===t?"None":t,cm2:e.consent.performance?e.consent.performance:0,cm3:e.consent.thirdParty?e.consent.thirdParty:0}))}])}),window.location.hash.substring(1)===a.id&&window.scrollTo(0,a.getBoundingClientRect().top+window.scrollY)},T=e=>t=>{e.insertAdjacentHTML("afterend",t.settings.messageTemplate(t)),e.setAttribute("disabled","disabled"),window.setTimeout(()=>{e.parentNode.removeChild(e.nextElementSibling),e.removeAttribute("disabled")},3e3)};var z=e=>(e=>{if(!(()=>{try{document.cookie="cookietest=1";const e=-1!==document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}catch(e){return!1}})())return;const t=(()=>{let e={};return{update:(t,s,n)=>{e=t(e,s),n&&n.forEach(t=>t(e))},getState:()=>e}})();e.tid||console.warn("The tid setting is missing. A tid is required for banner measurements.");const[s,n,a]=(e=>{try{const t=(e=>{const t=document.cookie.split("; ");for(let s=0;s<=t.length;s++){if(!t[s])return!1;const[n,a]=t[s].split("=");if(n===e.name)return window.atob(a)}return!1})(e);if(!t)return[!1,b(),{}];const{cid:s,consent:n}=JSON.parse(t);return[void 0!==n,s||b(),n||{}]}catch(e){return[!1,b(),{}]}})(e);return t.update(v,{settings:e,persistentMeasurementParams:!!e.tid&&$(n,e.tid),consent:a},[x,w(t),s?d:N,q(t),S(t)]),{getState:t.getState}})(Object.assign({},y,e,{types:Object.keys(e.types).reduce(l(e),y.types)}));export{z as default}; | ||
const e=["click","keydown"],t=[13,32],n=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex="-1"])'],s={ec:"Banner",ea:"Displays",cm1:1},a={ec:"Save preferences",ea:"Banner",cm2:1,cm3:1},i={ec:"Banner",ea:"Clicks",el:"Edit preferences",cm4:1},r={ec:"CookiePrefsWidget",ea:"Displays",cm5:1},c={ec:"Save preferences",ea:"CookiePrefs"},o=e=>{document.cookie=[`${e.settings.name}=${btoa(JSON.stringify({consent:e.consent,cid:e.persistentMeasurementParams.cid}))};`,`expires=${new Date((new Date).getTime()+24*e.settings.expiry*60*60*1e3).toGMTString()};`,e.settings.path?`path=${e.settings.path};`:"",e.settings.domain?`domain=${e.settings.domain};`:"",e.settings.samesite?`SameSite=${e.settings.samesite};`:"",e.settings.secure?"secure":""].join("")},l=e=>{document.cookie.split("; ").map(e=>({name:e.split("=")[0],value:e.split("=")[1],expiry:"Thu, 01 Jan 1970 00:00:01 GMT"})).map((e=>t=>document.cookie=[`${t.name}=${t.value};`,`expires=${t.expiry};`,`path=${e.settings.path};`,e.settings.domain?`domain=${e.settings.domain};`:"",e.settings.samesite?`SameSite=${e.settings.samesite};`:"",e.settings.secure?"secure":""].join(""))(e))},d=e=>(t,n)=>(t[n]=t[n]?Object.assign({},t[n],{fns:t[n].fns.concat(e.types[n].fns)}):e.types[n],t),p=()=>{},m=e=>/radio|checkbox/i.test(e.type),g=(e,t)=>(!m(t)&&(e=>null!=e.value&&e.value.length>0)(t)&&(e=t.value),m(t)&&t.checked&&(Array.isArray(e)?e.push(t.value):e=[t.value]),e),u="ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|be|bf|bg|bh|bi|bj|bm|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|cl|cm|cn|co|cr|cu|cv|cw|cx|cz|de|dj|dk|dm|do|dz|ec|ee|eg|es|et|eu|fi|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|im|in|io|iq|ir|is|it|je|jo|jp|kg|ki|km|kn|kp|kr|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|na|nc|ne|nf|ng|nl|no|nr|nu|nz|om|pa|pe|pf|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|yt".split("|"),b="netlify|azurewebsites|com|edu|gov|net|mil|org|nom|sch|caa|res|off|gob|int|tur|ip6|uri|urn|asn|act|nsw|qld|tas|vic|pro|biz|adm|adv|agr|arq|art|ato|bio|bmd|cim|cng|cnt|ecn|eco|emp|eng|esp|etc|eti|far|fnd|fot|fst|g12|ggf|imb|ind|inf|jor|jus|leg|lel|mat|med|mus|not|ntr|odo|ppg|psc|psi|qsl|rec|slg|srv|teo|tmp|trd|vet|zlg|web|ltd|sld|pol|fin|k12|lib|pri|aip|fie|eun|sci|prd|cci|pvt|mod|idv|rel|sex|gen|nic|abr|bas|cal|cam|emr|fvg|laz|lig|lom|mar|mol|pmn|pug|sar|sic|taa|tos|umb|vao|vda|ven|mie|北海道|和歌山|神奈川|鹿児島|ass|rep|tra|per|ngo|soc|grp|plc|its|air|and|bus|can|ddr|jfk|mad|nrw|nyc|ski|spy|tcm|ulm|usa|war|fhs|vgs|dep|eid|fet|fla|flå|gol|hof|hol|sel|vik|cri|iwi|ing|abo|fam|gok|gon|gop|gos|aid|atm|gsm|sos|elk|waw|est|aca|bar|cpa|jur|law|sec|plo|www|bir|cbg|jar|khv|msk|nov|nsk|ptz|rnd|spb|stv|tom|tsk|udm|vrn|cmw|kms|nkz|snz|pub|fhv|red|ens|nat|rns|rnu|bbs|tel|bel|kep|nhs|dni|fed|isa|nsn|gub|e12|tec|орг|обр|упр|alt|nis|jpn|mex|ath|iki|nid|gda|inc".split("|"),y=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)});var f={name:".CookiePreferences",path:"/",domain:"localhost"===window.location.hostname?"":`.${(e=>{let t=(e=e.replace(/^www\./,"")).split(".");for(;t.length>3;)t.shift();return 3===t.length&&-1===b.indexOf(t[1])&&-1===u.indexOf(t[2])&&t.shift(),t.join(".")})(window.location.hostname)}`,secure:!0,samesite:"strict",expiry:365,types:{},necessary:[],policyURL:"/cookie-policy/#preferences",classNames:{banner:"privacy-banner",acceptBtn:"privacy-banner__accept",submitBtn:"privacy-banner__submit",optionsBtn:"privacy-banner__options",field:"privacy-banner__field",form:"privacy-banner__form",fieldset:"privacy-banner__fieldset",legend:"privacy-banner__legend",formContainer:"privacy-banner__form-container",formMessage:"privacy-banner__form-msg",title:"privacy-banner__form-title",description:"privacy-banner__form-description"},hideBannerOnFormPage:!0,savedMessage:"Your settings have been saved.",bannerTemplate:e=>`<section role="dialog" aria-live="polite" aria-label="Your privacy" class="${e.classNames.banner}">\n <div class="privacy-content">\n <div class="wrap">\n \x3c!--googleoff: all--\x3e\n <div class="privacy-banner__title">Cookies</div>\n <p>We use cookies to improve your experience on our site and show you personalised advertising.</p>\n <p>Find out more from our <a class="privacy-banner__link" rel="noopener noreferrer nofollow" href="/privacy-policy">privacy policy</a> and <a class="privacy-banner__link" rel="noopener noreferrer nofollow" href="${e.policyURL}">cookie policy</a>.</p>\n <button type="button" class="btn btn--primary ${e.classNames.acceptBtn}">Accept and close</button>\n <a class="privacy-banner__link ${e.classNames.optionsBtn}" rel="noopener noreferrer nofollow" href="${e.policyURL}">Your options</a>\n \x3c!--googleon: all--\x3e\n </div>\n </div>\n </section>`,messageTemplate:e=>`<div class="${e.settings.classNames.formMessage}" aria-role="alert">${e.settings.savedMessage}</div>`,formTemplate:e=>`<form id="preferences" class="${e.settings.classNames.form}" novalidate>\n ${Object.keys(e.settings.types).map(t=>`<fieldset class="${e.settings.classNames.fieldset}">\n <legend class="${e.settings.classNames.legend}">\n <span class="${e.settings.classNames.title}">${e.settings.types[t].title}</span>\n <span class="${e.settings.classNames.description}">${e.settings.types[t].description}</span>\n </legend>\n <div class="form-row">\n <div class="relative">\n <label class="privacy-banner__label">\n <input\n class="${e.settings.classNames.field}"\n type="radio"\n name="privacy-${t.split(" ")[0].replace(" ","-")}"\n value="1"\n ${1===e.consent[t]?"checked":""}>\n <span class="privacy-banner__label-text">I am OK with this</span>\n <span class="privacy-banner__label-description">${e.settings.types[t].labels.yes}</span>\n </label> \n </div>\n </div>\n <div class="form-row">\n <div class="relative">\n <label class="privacy-banner__label">\n <input\n class="${e.settings.classNames.field}"\n type="radio"\n name="privacy-${t.split(" ")[0].replace(" ","-")}"\n value="0"\n ${0===e.consent[t]?"checked":""}>\n <span class="privacy-banner__label-text">No thank you</span>\n <span class="privacy-banner__label-description">${e.settings.types[t].labels.no}</span>\n </label> \n </div>\n </div>\n </fieldset>`).join("")}\n <button class="${e.settings.classNames.submitBtn}"${Object.keys(e.consent).length!==Object.keys(e.settings.types).length?" disabled":""}>Save my settings</button>\n </form>`};function v(){return v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},v.apply(this,arguments)}const h=(e,t)=>t,k=(e,t)=>Object.assign({},e,{bannerOpen:t}),w=(e,t)=>Object.assign({},e,{consent:Object.assign({},e.consent,t)}),x=(e,t)=>Object.assign({},e,{settings:Object.assign({},e.settings,{types:Object.assign({},e.settings.types,t)})}),$=e=>t=>{Object.keys(t.consent).forEach(e=>{t.settings.types[e]&&!0!==t.settings.types[e].executed&&t.consent[e]&&Boolean(t.consent[e])&&t.settings.types[e].fns.forEach(e=>e(t))}),e.update(x,Object.keys(t.settings.types).reduce((e,n)=>(e[n]=Object.assign({},t.settings.types[n],{executed:t.settings.types[n].executed||t.consent[n]&&Boolean(t.consent[n])}),e),{}))},j=e=>{e.settings.necessary.forEach(t=>t(e))},_=(e,t)=>({tid:t,v:1,t:"event",ds:"cookiebanner",dh:location.hostname,uip:"0.0.0.0",sr:window.screen?`${window.screen.width}x${window.screen.height}`:null,vp:`${document.documentElement.clientWidth}x${document.documentElement.clientHeight}`,cid:e,cd1:e,cd3:location.hostname,cd4:"consentAPI"}),O=e=>Object.keys(e).filter(t=>e[t]).join(","),S=()=>{try{const e=new Uint32Array(1);return window.crypto.getRandomValues(e),2147483647&e[0]}catch(e){return Math.round(2147483647*Math.random())}},N=(e,t,n="collect")=>(e=>{if(navigator.sendBeacon)return void navigator.sendBeacon(e);const t=document.createElement("img");return t.width=1,t.height=1,t.src=e,t})(((e,t)=>`https://www.google-analytics.com/${t}?${(e=>Object.keys(e).reduce((t,n)=>(null!==e[n]&&t.push(`${n}=${encodeURIComponent(e[n])}`),t),[]).join("&"))(e)}`)(v({},e.persistentMeasurementParams,t,e.settings.debug?{}:{z:S()}),n)),B=e=>()=>{const t=e.getState();t.bannerOpen||t.settings.hideBannerOnFormPage&&document.querySelector(`.${t.settings.classNames.formContainer}`)||(document.body.firstElementChild.insertAdjacentHTML("beforebegin",t.settings.bannerTemplate(t.settings)),t.settings.tid&&N(t,s),e.update(k,!0))},q=n=>()=>{const s=n.getState(),r=document.querySelector(`.${s.settings.classNames.banner}`);if(!r)return;const c=[].slice.call(document.querySelectorAll(`.${s.settings.classNames.acceptBtn}`)),l=document.querySelector(`.${s.settings.classNames.optionsBtn}`);e.forEach(e=>{c.forEach(i=>{i.addEventListener(e,e=>{(e=>!!e.keyCode&&!~t.indexOf(e.keyCode)||e.which&&3===e.which)(e)||n.update(w,Object.keys(s.settings.types).reduce((e,t)=>(e[t]=1,e),{}),[o,$(n),E(n,r),T(n,!1),e=>{e.settings.tid&&N(e,v({},a,{cd2:O(n.getState().consent)}))}])})}),l&&s.settings.tid&&l.addEventListener(e,e=>N(s,i))})},E=(e,t)=>()=>{t&&t.parentNode&&(t.parentNode.removeChild(t),e.update(k,!1))},T=(e,t=!0)=>()=>{const n=e.getState(),s=document.querySelector(`.${n.settings.classNames.formContainer}`);if(!s)return;s.innerHTML=n.settings.formTemplate((e=>Object.keys(e.consent).length>0?e:Object.assign({},e,{consent:Object.keys(e.settings.types).reduce((t,n)=>(e.settings.types[n].suggested&&(t[n]=1),t),{})}))(n)),n.settings.tid&&t&&N(n,r);const a=document.querySelector(`.${n.settings.classNames.form}`),i=document.querySelector(`.${n.settings.classNames.banner}`),d=document.querySelector(`.${n.settings.classNames.submitBtn}`),p=[].slice.call(document.querySelectorAll(`.${n.settings.classNames.field}`)).reduce((e,t)=>{const n=t.getAttribute("name").replace("privacy-","");return e[n]?e[n].push(t):e[n]=[t],e},{}),m=()=>Object.keys(p).reduce((e,t)=>{const n=p[t].reduce(g,"");return n&&(e[t]=parseInt(n,10)),e},{}),u=e=>{Object.keys(m()).length===Object.keys(p).length&&(d.removeAttribute("disabled"),a.removeEventListener("change",u))};d.hasAttribute("disabled")&&a.addEventListener("change",u),a.addEventListener("submit",t=>{t.preventDefault(),e.update(w,m(),[l,o,$(e),E(e,i),z(d),e=>{if(!e.settings.tid)return;const t=O(e.consent);N(e,v({},c,{cd2:""===t?"None":t,cm2:e.consent.performance?e.consent.performance:0,cm3:e.consent.thirdParty?e.consent.thirdParty:0}))}])}),window.location.hash.substring(1)===a.id&&window.scrollTo(0,a.getBoundingClientRect().top+window.scrollY)},z=e=>t=>{e.insertAdjacentHTML("afterend",t.settings.messageTemplate(t)),e.setAttribute("disabled","disabled"),window.setTimeout(()=>{e.parentNode.removeChild(e.nextElementSibling),e.removeAttribute("disabled")},3e3)};var A=e=>(e=>{if(!(()=>{try{document.cookie="cookietest=1";const e=-1!==document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}catch(e){return!1}})())return;const t=(()=>{let e={};return{update:(t,n,s)=>{e=t(e,n),s&&s.forEach(t=>t(e))},getState:()=>e}})();e.tid||console.warn("The tid setting is missing. A tid is required for banner measurements.");const[s,a,i]=(e=>{try{const t=(e=>{const t=document.cookie.split("; ");for(let n=0;n<=t.length;n++){if(!t[n])return!1;const[s,a]=t[n].split("=");if(s===e.name)return window.atob(a)}return!1})(e);if(!t)return[!1,y(),{}];const{cid:n,consent:s}=JSON.parse(t);return[void 0!==s,n||y(),s||{}]}catch(e){return[!1,y(),{}]}})(e);return t.update(h,{settings:e,bannerOpen:!1,persistentMeasurementParams:!!e.tid&&_(a,e.tid),consent:i},[j,$(t),s?p:B(t),T(t),q(t)]),{getState:t.getState,showBanner(e){(e=>t=>{B(e)();const{bannerOpen:s}=e.getState();if(!s)return;const a=(i=document.body.firstElementChild,[].slice.call(i.querySelectorAll(n.join(","))));var i;a.length>0&&a[0].focus(),t&&t.call&&t(e.getState())})(t)(e),q(t)()},renderForm:T(t)}})(Object.assign({},f,e,{types:Object.keys(e.types).reduce(d(e),f.types)}));export{A as default}; | ||
//# sourceMappingURL=index.modern.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e||self).CookieBanner=n()}(this,function(){var e=["click","keydown"],n=[13,32],t={ec:"Banner",ea:"Displays",cm1:1},s={ec:"Save preferences",ea:"Banner",cm2:1,cm3:1},i={ec:"Banner",ea:"Clicks",el:"Edit preferences",cm4:1},r={ec:"CookiePrefsWidget",ea:"Displays",cm5:1},a={ec:"Save preferences",ea:"CookiePrefs"},c=function(e){document.cookie=[e.settings.name+"="+btoa(JSON.stringify({consent:e.consent,cid:e.persistentMeasurementParams.cid}))+";","expires="+new Date((new Date).getTime()+24*e.settings.expiry*60*60*1e3).toGMTString()+";",e.settings.path?"path="+e.settings.path+";":"",e.settings.domain?"domain="+e.settings.domain+";":"",e.settings.samesite?"SameSite="+e.settings.samesite+";":"",e.settings.secure?"secure":""].join("")},o=function(e){document.cookie.split("; ").map(function(e){return{name:e.split("=")[0],value:e.split("=")[1],expiry:"Thu, 01 Jan 1970 00:00:01 GMT"}}).map(function(e){return function(n){return document.cookie=[n.name+"="+n.value+";","expires="+n.expiry+";","path="+e.settings.path+";",e.settings.domain?"domain="+e.settings.domain+";":"",e.settings.samesite?"SameSite="+e.settings.samesite+";":"",e.settings.secure?"secure":""].join("")}}(e))},l=function(e){return function(n,t){return n[t]=n[t]?Object.assign({},n[t],{fns:n[t].fns.concat(e.types[t].fns)}):e.types[t],n}},u=function(){},d=function(e){return/radio|checkbox/i.test(e.type)},p=function(e,n){return!d(n)&&function(e){return null!=e.value&&e.value.length>0}(n)&&(e=n.value),d(n)&&n.checked&&(Array.isArray(e)?e.push(n.value):e=[n.value]),e},m="ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|be|bf|bg|bh|bi|bj|bm|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|cl|cm|cn|co|cr|cu|cv|cw|cx|cz|de|dj|dk|dm|do|dz|ec|ee|eg|es|et|eu|fi|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|im|in|io|iq|ir|is|it|je|jo|jp|kg|ki|km|kn|kp|kr|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|na|nc|ne|nf|ng|nl|no|nr|nu|nz|om|pa|pe|pf|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|yt".split("|"),f="netlify|azurewebsites|com|edu|gov|net|mil|org|nom|sch|caa|res|off|gob|int|tur|ip6|uri|urn|asn|act|nsw|qld|tas|vic|pro|biz|adm|adv|agr|arq|art|ato|bio|bmd|cim|cng|cnt|ecn|eco|emp|eng|esp|etc|eti|far|fnd|fot|fst|g12|ggf|imb|ind|inf|jor|jus|leg|lel|mat|med|mus|not|ntr|odo|ppg|psc|psi|qsl|rec|slg|srv|teo|tmp|trd|vet|zlg|web|ltd|sld|pol|fin|k12|lib|pri|aip|fie|eun|sci|prd|cci|pvt|mod|idv|rel|sex|gen|nic|abr|bas|cal|cam|emr|fvg|laz|lig|lom|mar|mol|pmn|pug|sar|sic|taa|tos|umb|vao|vda|ven|mie|北海道|和歌山|神奈川|鹿児島|ass|rep|tra|per|ngo|soc|grp|plc|its|air|and|bus|can|ddr|jfk|mad|nrw|nyc|ski|spy|tcm|ulm|usa|war|fhs|vgs|dep|eid|fet|fla|flå|gol|hof|hol|sel|vik|cri|iwi|ing|abo|fam|gok|gon|gop|gos|aid|atm|gsm|sos|elk|waw|est|aca|bar|cpa|jur|law|sec|plo|www|bir|cbg|jar|khv|msk|nov|nsk|ptz|rnd|spb|stv|tom|tsk|udm|vrn|cmw|kms|nkz|snz|pub|fhv|red|ens|nat|rns|rnu|bbs|tel|bel|kep|nhs|dni|fed|isa|nsn|gub|e12|tec|орг|обр|упр|alt|nis|jpn|mex|ath|iki|nid|gda|inc".split("|"),g=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)})},b={name:".CookiePreferences",path:"/",domain:"localhost"===window.location.hostname?"":"."+function(e){for(var n=(e=e.replace(/^www\./,"")).split(".");n.length>3;)n.shift();return 3===n.length&&-1===f.indexOf(n[1])&&-1===m.indexOf(n[2])&&n.shift(),n.join(".")}(window.location.hostname),secure:!0,samesite:"strict",expiry:365,types:{},necessary:[],policyURL:"/cookie-policy/#preferences",classNames:{banner:"privacy-banner",acceptBtn:"privacy-banner__accept",submitBtn:"privacy-banner__submit",optionsBtn:"privacy-banner__options",field:"privacy-banner__field",form:"privacy-banner__form",fieldset:"privacy-banner__fieldset",legend:"privacy-banner__legend",formContainer:"privacy-banner__form-container",formMessage:"privacy-banner__form-msg",title:"privacy-banner__form-title",description:"privacy-banner__form-description"},hideBannerOnFormPage:!0,savedMessage:"Your settings have been saved.",bannerTemplate:function(e){return'<section role="dialog" aria-live="polite" aria-label="Your privacy" class="'+e.classNames.banner+'">\n <div class="privacy-content">\n <div class="wrap">\n \x3c!--googleoff: all--\x3e\n <div class="privacy-banner__title">Cookies</div>\n <p>We use cookies to improve your experience on our site and show you personalised advertising.</p>\n <p>Find out more from our <a class="privacy-banner__link" rel="noopener noreferrer nofollow" href="/privacy-policy">privacy policy</a> and <a class="privacy-banner__link" rel="noopener noreferrer nofollow" href="'+e.policyURL+'">cookie policy</a>.</p>\n <button type="button" class="btn btn--primary '+e.classNames.acceptBtn+'">Accept and close</button>\n <a class="privacy-banner__link '+e.classNames.optionsBtn+'" rel="noopener noreferrer nofollow" href="'+e.policyURL+'">Your options</a>\n \x3c!--googleon: all--\x3e\n </div>\n </div>\n </section>'},messageTemplate:function(e){return'<div class="'+e.settings.classNames.formMessage+'" aria-role="alert">'+e.settings.savedMessage+"</div>"},formTemplate:function(e){return'<form id="preferences" class="'+e.settings.classNames.form+'" novalidate>\n '+Object.keys(e.settings.types).map(function(n){return'<fieldset class="'+e.settings.classNames.fieldset+'">\n <legend class="'+e.settings.classNames.legend+'">\n <span class="'+e.settings.classNames.title+'">'+e.settings.types[n].title+'</span>\n <span class="'+e.settings.classNames.description+'">'+e.settings.types[n].description+'</span>\n </legend>\n <div class="form-row">\n <div class="relative">\n <label class="privacy-banner__label">\n <input\n class="'+e.settings.classNames.field+'"\n type="radio"\n name="privacy-'+n.split(" ")[0].replace(" ","-")+'"\n value="1"\n '+(1===e.consent[n]?"checked":"")+'>\n <span class="privacy-banner__label-text">I am OK with this</span>\n <span class="privacy-banner__label-description">'+e.settings.types[n].labels.yes+'</span>\n </label> \n </div>\n </div>\n <div class="form-row">\n <div class="relative">\n <label class="privacy-banner__label">\n <input\n class="'+e.settings.classNames.field+'"\n type="radio"\n name="privacy-'+n.split(" ")[0].replace(" ","-")+'"\n value="0"\n '+(0===e.consent[n]?"checked":"")+'>\n <span class="privacy-banner__label-text">No thank you</span>\n <span class="privacy-banner__label-description">'+e.settings.types[n].labels.no+"</span>\n </label> \n </div>\n </div>\n </fieldset>"}).join("")+'\n <button class="'+e.settings.classNames.submitBtn+'"'+(Object.keys(e.consent).length!==Object.keys(e.settings.types).length?" disabled":"")+">Save my settings</button>\n </form>"}};function v(){return v=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},v.apply(this,arguments)}var y=function(e,n){return n},h=function(e,n){return Object.assign({},e,{consent:Object.assign({},e.consent,n)})},k=function(e,n){return Object.assign({},e,{settings:Object.assign({},e.settings,{types:Object.assign({},e.settings.types,n)})})},w=function(e){return function(n){Object.keys(n.consent).forEach(function(e){n.settings.types[e]&&!0!==n.settings.types[e].executed&&n.consent[e]&&Boolean(n.consent[e])&&n.settings.types[e].fns.forEach(function(e){return e(n)})}),e.update(k,Object.keys(n.settings.types).reduce(function(e,t){return e[t]=Object.assign({},n.settings.types[t],{executed:n.settings.types[t].executed||n.consent[t]&&Boolean(n.consent[t])}),e},{}))}},x=function(e){e.settings.necessary.forEach(function(n){return n(e)})},j=function(e){return Object.keys(e).filter(function(n){return e[n]}).join(",")},_=function(){try{var e=new Uint32Array(1);return window.crypto.getRandomValues(e),2147483647&e[0]}catch(e){return Math.round(2147483647*Math.random())}},O=function(e,n,t){return void 0===t&&(t="collect"),function(e){if(!navigator.sendBeacon){var n=document.createElement("img");return n.width=1,n.height=1,n.src=e,n}navigator.sendBeacon(e)}(function(e,n){return"https://www.google-analytics.com/"+n+"?"+function(e){return Object.keys(e).reduce(function(n,t){return null!==e[t]&&n.push(t+"="+encodeURIComponent(e[t])),n},[]).join("&")}(e)}(v({},e.persistentMeasurementParams,n,e.settings.debug?{}:{z:_()}),t))},N=function(e){e.settings.hideBannerOnFormPage&&document.querySelector("."+e.settings.classNames.formContainer)||(document.body.firstElementChild.insertAdjacentHTML("beforebegin",e.settings.bannerTemplate(e.settings)),e.settings.tid&&O(e,t))},S=function(t){return function(r){var a=document.querySelector("."+r.settings.classNames.banner);if(a){var o=[].slice.call(document.querySelectorAll("."+r.settings.classNames.acceptBtn)),l=document.querySelector("."+r.settings.classNames.optionsBtn);e.forEach(function(e){o.forEach(function(i){i.addEventListener(e,function(e){(function(e){return!!e.keyCode&&!~n.indexOf(e.keyCode)||e.which&&3===e.which})(e)||t.update(h,Object.keys(r.settings.types).reduce(function(e,n){return e[n]=1,e},{}),[c,w(t),B(a),T(t,!1),function(e){e.settings.tid&&O(e,v({},s,{cd2:j(t.getState().consent)}))}])})}),l&&r.settings.tid&&l.addEventListener(e,function(e){return O(r,i)})})}}},B=function(e){return function(){return e&&e.parentNode&&e.parentNode.removeChild(e)}},T=function(e,n){return void 0===n&&(n=!0),function(t){var s=document.querySelector("."+t.settings.classNames.formContainer);if(s){s.innerHTML=t.settings.formTemplate(function(e){return Object.keys(e.consent).length>0?e:Object.assign({},e,{consent:Object.keys(e.settings.types).reduce(function(n,t){return e.settings.types[t].suggested&&(n[t]=1),n},{})})}(t)),t.settings.tid&&n&&O(t,r);var i=document.querySelector("."+t.settings.classNames.form),l=document.querySelector("."+t.settings.classNames.banner),u=document.querySelector("."+t.settings.classNames.submitBtn),d=[].slice.call(document.querySelectorAll("."+t.settings.classNames.field)).reduce(function(e,n){var t=n.getAttribute("name").replace("privacy-","");return e[t]?e[t].push(n):e[t]=[n],e},{}),m=function(){return Object.keys(d).reduce(function(e,n){var t=d[n].reduce(p,"");return t&&(e[n]=parseInt(t,10)),e},{})};u.hasAttribute("disabled")&&i.addEventListener("change",function e(n){Object.keys(m()).length===Object.keys(d).length&&(u.removeAttribute("disabled"),i.removeEventListener("change",e))}),i.addEventListener("submit",function(n){n.preventDefault(),e.update(h,m(),[o,c,w(e),B(l),q(u),function(e){if(e.settings.tid){var n=j(e.consent);O(e,v({},a,{cd2:""===n?"None":n,cm2:e.consent.performance?e.consent.performance:0,cm3:e.consent.thirdParty?e.consent.thirdParty:0}))}}])}),window.location.hash.substring(1)===i.id&&window.scrollTo(0,i.getBoundingClientRect().top+window.scrollY)}}},q=function(e){return function(n){e.insertAdjacentHTML("afterend",n.settings.messageTemplate(n)),e.setAttribute("disabled","disabled"),window.setTimeout(function(){e.parentNode.removeChild(e.nextElementSibling),e.removeAttribute("disabled")},3e3)}};return function(e){return function(e){if(function(){try{document.cookie="cookietest=1";var e=-1!==document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}catch(e){return!1}}()){var n,t=(n={},{update:function(e,t,s){n=e(n,t),s&&s.forEach(function(e){return e(n)})},getState:function(){return n}});e.tid||console.warn("The tid setting is missing. A tid is required for banner measurements.");var s=function(e){try{var n=function(e){for(var n=document.cookie.split("; "),t=0;t<=n.length;t++){if(!n[t])return!1;var s=n[t].split("=");if(s[0]===e.name)return window.atob(s[1])}return!1}(e);if(!n)return[!1,g(),{}];var t=JSON.parse(n),s=t.consent;return[void 0!==s,t.cid||g(),s||{}]}catch(e){return[!1,g(),{}]}}(e),i=s[0];return t.update(y,{settings:e,persistentMeasurementParams:!!e.tid&&(r=s[1],a=e.tid,{tid:a,v:1,t:"event",ds:"cookiebanner",dh:location.hostname,uip:"0.0.0.0",sr:window.screen?window.screen.width+"x"+window.screen.height:null,vp:document.documentElement.clientWidth+"x"+document.documentElement.clientHeight,cid:r,cd1:r,cd3:location.hostname,cd4:"consentAPI"}),consent:s[2]},[x,w(t),i?u:N,T(t),S(t)]),{getState:t.getState}}var r,a}(Object.assign({},b,e,{types:Object.keys(e.types).reduce(l(e),b.types)}))}}); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e||self).CookieBanner=n()}(this,function(){var e=["click","keydown"],n=[13,32],t=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex="-1"])'],s={ec:"Banner",ea:"Displays",cm1:1},i={ec:"Save preferences",ea:"Banner",cm2:1,cm3:1},a={ec:"Banner",ea:"Clicks",el:"Edit preferences",cm4:1},r={ec:"CookiePrefsWidget",ea:"Displays",cm5:1},c={ec:"Save preferences",ea:"CookiePrefs"},o=function(e){document.cookie=[e.settings.name+"="+btoa(JSON.stringify({consent:e.consent,cid:e.persistentMeasurementParams.cid}))+";","expires="+new Date((new Date).getTime()+24*e.settings.expiry*60*60*1e3).toGMTString()+";",e.settings.path?"path="+e.settings.path+";":"",e.settings.domain?"domain="+e.settings.domain+";":"",e.settings.samesite?"SameSite="+e.settings.samesite+";":"",e.settings.secure?"secure":""].join("")},l=function(e){document.cookie.split("; ").map(function(e){return{name:e.split("=")[0],value:e.split("=")[1],expiry:"Thu, 01 Jan 1970 00:00:01 GMT"}}).map(function(e){return function(n){return document.cookie=[n.name+"="+n.value+";","expires="+n.expiry+";","path="+e.settings.path+";",e.settings.domain?"domain="+e.settings.domain+";":"",e.settings.samesite?"SameSite="+e.settings.samesite+";":"",e.settings.secure?"secure":""].join("")}}(e))},u=function(e){return function(n,t){return n[t]=n[t]?Object.assign({},n[t],{fns:n[t].fns.concat(e.types[t].fns)}):e.types[t],n}},d=function(){},p=function(e){return/radio|checkbox/i.test(e.type)},m=function(e,n){return!p(n)&&function(e){return null!=e.value&&e.value.length>0}(n)&&(e=n.value),p(n)&&n.checked&&(Array.isArray(e)?e.push(n.value):e=[n.value]),e},f="ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|be|bf|bg|bh|bi|bj|bm|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|cl|cm|cn|co|cr|cu|cv|cw|cx|cz|de|dj|dk|dm|do|dz|ec|ee|eg|es|et|eu|fi|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|im|in|io|iq|ir|is|it|je|jo|jp|kg|ki|km|kn|kp|kr|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|na|nc|ne|nf|ng|nl|no|nr|nu|nz|om|pa|pe|pf|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|yt".split("|"),g="netlify|azurewebsites|com|edu|gov|net|mil|org|nom|sch|caa|res|off|gob|int|tur|ip6|uri|urn|asn|act|nsw|qld|tas|vic|pro|biz|adm|adv|agr|arq|art|ato|bio|bmd|cim|cng|cnt|ecn|eco|emp|eng|esp|etc|eti|far|fnd|fot|fst|g12|ggf|imb|ind|inf|jor|jus|leg|lel|mat|med|mus|not|ntr|odo|ppg|psc|psi|qsl|rec|slg|srv|teo|tmp|trd|vet|zlg|web|ltd|sld|pol|fin|k12|lib|pri|aip|fie|eun|sci|prd|cci|pvt|mod|idv|rel|sex|gen|nic|abr|bas|cal|cam|emr|fvg|laz|lig|lom|mar|mol|pmn|pug|sar|sic|taa|tos|umb|vao|vda|ven|mie|北海道|和歌山|神奈川|鹿児島|ass|rep|tra|per|ngo|soc|grp|plc|its|air|and|bus|can|ddr|jfk|mad|nrw|nyc|ski|spy|tcm|ulm|usa|war|fhs|vgs|dep|eid|fet|fla|flå|gol|hof|hol|sel|vik|cri|iwi|ing|abo|fam|gok|gon|gop|gos|aid|atm|gsm|sos|elk|waw|est|aca|bar|cpa|jur|law|sec|plo|www|bir|cbg|jar|khv|msk|nov|nsk|ptz|rnd|spb|stv|tom|tsk|udm|vrn|cmw|kms|nkz|snz|pub|fhv|red|ens|nat|rns|rnu|bbs|tel|bel|kep|nhs|dni|fed|isa|nsn|gub|e12|tec|орг|обр|упр|alt|nis|jpn|mex|ath|iki|nid|gda|inc".split("|"),b=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)})},v={name:".CookiePreferences",path:"/",domain:"localhost"===window.location.hostname?"":"."+function(e){for(var n=(e=e.replace(/^www\./,"")).split(".");n.length>3;)n.shift();return 3===n.length&&-1===g.indexOf(n[1])&&-1===f.indexOf(n[2])&&n.shift(),n.join(".")}(window.location.hostname),secure:!0,samesite:"strict",expiry:365,types:{},necessary:[],policyURL:"/cookie-policy/#preferences",classNames:{banner:"privacy-banner",acceptBtn:"privacy-banner__accept",submitBtn:"privacy-banner__submit",optionsBtn:"privacy-banner__options",field:"privacy-banner__field",form:"privacy-banner__form",fieldset:"privacy-banner__fieldset",legend:"privacy-banner__legend",formContainer:"privacy-banner__form-container",formMessage:"privacy-banner__form-msg",title:"privacy-banner__form-title",description:"privacy-banner__form-description"},hideBannerOnFormPage:!0,savedMessage:"Your settings have been saved.",bannerTemplate:function(e){return'<section role="dialog" aria-live="polite" aria-label="Your privacy" class="'+e.classNames.banner+'">\n <div class="privacy-content">\n <div class="wrap">\n \x3c!--googleoff: all--\x3e\n <div class="privacy-banner__title">Cookies</div>\n <p>We use cookies to improve your experience on our site and show you personalised advertising.</p>\n <p>Find out more from our <a class="privacy-banner__link" rel="noopener noreferrer nofollow" href="/privacy-policy">privacy policy</a> and <a class="privacy-banner__link" rel="noopener noreferrer nofollow" href="'+e.policyURL+'">cookie policy</a>.</p>\n <button type="button" class="btn btn--primary '+e.classNames.acceptBtn+'">Accept and close</button>\n <a class="privacy-banner__link '+e.classNames.optionsBtn+'" rel="noopener noreferrer nofollow" href="'+e.policyURL+'">Your options</a>\n \x3c!--googleon: all--\x3e\n </div>\n </div>\n </section>'},messageTemplate:function(e){return'<div class="'+e.settings.classNames.formMessage+'" aria-role="alert">'+e.settings.savedMessage+"</div>"},formTemplate:function(e){return'<form id="preferences" class="'+e.settings.classNames.form+'" novalidate>\n '+Object.keys(e.settings.types).map(function(n){return'<fieldset class="'+e.settings.classNames.fieldset+'">\n <legend class="'+e.settings.classNames.legend+'">\n <span class="'+e.settings.classNames.title+'">'+e.settings.types[n].title+'</span>\n <span class="'+e.settings.classNames.description+'">'+e.settings.types[n].description+'</span>\n </legend>\n <div class="form-row">\n <div class="relative">\n <label class="privacy-banner__label">\n <input\n class="'+e.settings.classNames.field+'"\n type="radio"\n name="privacy-'+n.split(" ")[0].replace(" ","-")+'"\n value="1"\n '+(1===e.consent[n]?"checked":"")+'>\n <span class="privacy-banner__label-text">I am OK with this</span>\n <span class="privacy-banner__label-description">'+e.settings.types[n].labels.yes+'</span>\n </label> \n </div>\n </div>\n <div class="form-row">\n <div class="relative">\n <label class="privacy-banner__label">\n <input\n class="'+e.settings.classNames.field+'"\n type="radio"\n name="privacy-'+n.split(" ")[0].replace(" ","-")+'"\n value="0"\n '+(0===e.consent[n]?"checked":"")+'>\n <span class="privacy-banner__label-text">No thank you</span>\n <span class="privacy-banner__label-description">'+e.settings.types[n].labels.no+"</span>\n </label> \n </div>\n </div>\n </fieldset>"}).join("")+'\n <button class="'+e.settings.classNames.submitBtn+'"'+(Object.keys(e.consent).length!==Object.keys(e.settings.types).length?" disabled":"")+">Save my settings</button>\n </form>"}};function y(){return y=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},y.apply(this,arguments)}var h=function(e,n){return n},k=function(e,n){return Object.assign({},e,{bannerOpen:n})},w=function(e,n){return Object.assign({},e,{consent:Object.assign({},e.consent,n)})},x=function(e,n){return Object.assign({},e,{settings:Object.assign({},e.settings,{types:Object.assign({},e.settings.types,n)})})},j=function(e){return function(n){Object.keys(n.consent).forEach(function(e){n.settings.types[e]&&!0!==n.settings.types[e].executed&&n.consent[e]&&Boolean(n.consent[e])&&n.settings.types[e].fns.forEach(function(e){return e(n)})}),e.update(x,Object.keys(n.settings.types).reduce(function(e,t){return e[t]=Object.assign({},n.settings.types[t],{executed:n.settings.types[t].executed||n.consent[t]&&Boolean(n.consent[t])}),e},{}))}},_=function(e){e.settings.necessary.forEach(function(n){return n(e)})},O=function(e){return Object.keys(e).filter(function(n){return e[n]}).join(",")},S=function(){try{var e=new Uint32Array(1);return window.crypto.getRandomValues(e),2147483647&e[0]}catch(e){return Math.round(2147483647*Math.random())}},N=function(e,n,t){return void 0===t&&(t="collect"),function(e){if(!navigator.sendBeacon){var n=document.createElement("img");return n.width=1,n.height=1,n.src=e,n}navigator.sendBeacon(e)}(function(e,n){return"https://www.google-analytics.com/"+n+"?"+function(e){return Object.keys(e).reduce(function(n,t){return null!==e[t]&&n.push(t+"="+encodeURIComponent(e[t])),n},[]).join("&")}(e)}(y({},e.persistentMeasurementParams,n,e.settings.debug?{}:{z:S()}),t))},B=function(e){return function(){var n=e.getState();n.bannerOpen||n.settings.hideBannerOnFormPage&&document.querySelector("."+n.settings.classNames.formContainer)||(document.body.firstElementChild.insertAdjacentHTML("beforebegin",n.settings.bannerTemplate(n.settings)),n.settings.tid&&N(n,s),e.update(k,!0))}},T=function(t){return function(){var s=t.getState(),r=document.querySelector("."+s.settings.classNames.banner);if(r){var c=[].slice.call(document.querySelectorAll("."+s.settings.classNames.acceptBtn)),l=document.querySelector("."+s.settings.classNames.optionsBtn);e.forEach(function(e){c.forEach(function(a){a.addEventListener(e,function(e){(function(e){return!!e.keyCode&&!~n.indexOf(e.keyCode)||e.which&&3===e.which})(e)||t.update(w,Object.keys(s.settings.types).reduce(function(e,n){return e[n]=1,e},{}),[o,j(t),q(t,r),E(t,!1),function(e){e.settings.tid&&N(e,y({},i,{cd2:O(t.getState().consent)}))}])})}),l&&s.settings.tid&&l.addEventListener(e,function(e){return N(s,a)})})}}},q=function(e,n){return function(){n&&n.parentNode&&(n.parentNode.removeChild(n),e.update(k,!1))}},E=function(e,n){return void 0===n&&(n=!0),function(){var t=e.getState(),s=document.querySelector("."+t.settings.classNames.formContainer);if(s){s.innerHTML=t.settings.formTemplate(function(e){return Object.keys(e.consent).length>0?e:Object.assign({},e,{consent:Object.keys(e.settings.types).reduce(function(n,t){return e.settings.types[t].suggested&&(n[t]=1),n},{})})}(t)),t.settings.tid&&n&&N(t,r);var i=document.querySelector("."+t.settings.classNames.form),a=document.querySelector("."+t.settings.classNames.banner),u=document.querySelector("."+t.settings.classNames.submitBtn),d=[].slice.call(document.querySelectorAll("."+t.settings.classNames.field)).reduce(function(e,n){var t=n.getAttribute("name").replace("privacy-","");return e[t]?e[t].push(n):e[t]=[n],e},{}),p=function(){return Object.keys(d).reduce(function(e,n){var t=d[n].reduce(m,"");return t&&(e[n]=parseInt(t,10)),e},{})};u.hasAttribute("disabled")&&i.addEventListener("change",function e(n){Object.keys(p()).length===Object.keys(d).length&&(u.removeAttribute("disabled"),i.removeEventListener("change",e))}),i.addEventListener("submit",function(n){n.preventDefault(),e.update(w,p(),[l,o,j(e),q(e,a),z(u),function(e){if(e.settings.tid){var n=O(e.consent);N(e,y({},c,{cd2:""===n?"None":n,cm2:e.consent.performance?e.consent.performance:0,cm3:e.consent.thirdParty?e.consent.thirdParty:0}))}}])}),window.location.hash.substring(1)===i.id&&window.scrollTo(0,i.getBoundingClientRect().top+window.scrollY)}}},z=function(e){return function(n){e.insertAdjacentHTML("afterend",n.settings.messageTemplate(n)),e.setAttribute("disabled","disabled"),window.setTimeout(function(){e.parentNode.removeChild(e.nextElementSibling),e.removeAttribute("disabled")},3e3)}};return function(e){return function(e){if(function(){try{document.cookie="cookietest=1";var e=-1!==document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}catch(e){return!1}}()){var n,s=(n={},{update:function(e,t,s){n=e(n,t),s&&s.forEach(function(e){return e(n)})},getState:function(){return n}});e.tid||console.warn("The tid setting is missing. A tid is required for banner measurements.");var i=function(e){try{var n=function(e){for(var n=document.cookie.split("; "),t=0;t<=n.length;t++){if(!n[t])return!1;var s=n[t].split("=");if(s[0]===e.name)return window.atob(s[1])}return!1}(e);if(!n)return[!1,b(),{}];var t=JSON.parse(n),s=t.consent;return[void 0!==s,t.cid||b(),s||{}]}catch(e){return[!1,b(),{}]}}(e),a=i[0];return s.update(h,{settings:e,bannerOpen:!1,persistentMeasurementParams:!!e.tid&&(r=i[1],c=e.tid,{tid:c,v:1,t:"event",ds:"cookiebanner",dh:location.hostname,uip:"0.0.0.0",sr:window.screen?window.screen.width+"x"+window.screen.height:null,vp:document.documentElement.clientWidth+"x"+document.documentElement.clientHeight,cid:r,cd1:r,cd3:location.hostname,cd4:"consentAPI"}),consent:i[2]},[_,j(s),a?d:B(s),E(s),T(s)]),{getState:s.getState,showBanner:function(e){(function(e){return function(n){if(B(e)(),e.getState().bannerOpen){var s,i=(s=document.body.firstElementChild,[].slice.call(s.querySelectorAll(t.join(","))));i.length>0&&i[0].focus(),n&&n.call&&n(e.getState())}}})(s)(e),T(s)()},renderForm:E(s)}}var r,c}(Object.assign({},v,e,{types:Object.keys(e.types).reduce(u(e),v.types)}))}}); | ||
//# sourceMappingURL=index.umd.js.map |
{ | ||
"name": "@stormid/cookie-banner", | ||
"version": "1.0.0-alpha.18", | ||
"version": "1.0.0-alpha.19", | ||
"description": "GDPR compliant cookie banner", | ||
@@ -31,3 +31,3 @@ "author": "stormid", | ||
}, | ||
"gitHead": "5a78d93bb9f509d1af5dcf4d3b3f30bb2cd1583f" | ||
"gitHead": "9042db4005411c4360ba3e8188e03333c10098f2" | ||
} |
@@ -159,3 +159,5 @@ # Cookie banner | ||
{ | ||
getState, a Function that returns the current state Object | ||
getState, Function that returns the current state Object | ||
showBanner, Function to show the banner, accepts a callback function | ||
renderForm, Function to render the consent form | ||
} | ||
@@ -162,0 +164,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
221137
206
172
12
1