1 line
5.2 KiB
JavaScript
1 line
5.2 KiB
JavaScript
|
|
"use strict";(globalThis.webpackChunkcomplianz_gdpr=globalThis.webpackChunkcomplianz_gdpr||[]).push([[1239,5683,8895],{35683:(e,t,a)=>{a.r(t),a.d(t,{default:()=>n});var s=a(81621),o=a(9588);const n=(0,s.vt)(((e,t)=>({licenseStatus:cmplz_settings.licenseStatus,processing:!1,licenseNotices:[],noticesLoaded:!1,getLicenseNotices:async()=>{const{licenseStatus:t,notices:a}=await o.doAction("license_notices",{}).then((e=>e));e((e=>({noticesLoaded:!0,licenseNotices:a,licenseStatus:t})))},activateLicense:async t=>{let a={};a.license=t,e({processing:!0});const{licenseStatus:s,notices:n}=await o.doAction("activate_license",a);e((e=>({processing:!1,licenseNotices:n,licenseStatus:s})))},deactivateLicense:async()=>{e({processing:!0});const{licenseStatus:t,notices:a}=await o.doAction("deactivate_license");e((e=>({processing:!1,licenseNotices:a,licenseStatus:t})))}})))},61239:(e,t,a)=>{a.r(t),a.d(t,{default:()=>r});var s=a(51609),o=a(4219),n=a(88895),i=a(86087),l=a(35683);const r=(0,i.memo)((()=>{const{fields:e,getFieldValue:t}=(0,o.default)(),[r,c]=(0,i.useState)(!1),[d,g]=(0,i.useState)(!1),{consentType:b,setConsentType:u,statisticsData:p,emptyStatisticsData:f,consentTypes:m,loaded:h,fetchStatisticsData:C,statisticsLoading:k}=(0,n.default)(),[y,T]=(0,i.useState)(null),{licenseStatus:_}=(0,l.default)();(0,i.useEffect)((()=>{a.e(2262).then(a.bind(a,92262)).then((({Chart:e,CategoryScale:t,LinearScale:a,BarElement:s,Title:o,Tooltip:n,Legend:i})=>{e.register(t,a,s,o,n,i)})),Promise.all([a.e(2262),a.e(4731)]).then(a.bind(a,44731)).then((({Bar:e})=>{T((()=>e))}))}),[]),(0,i.useEffect)((()=>{!h&&r&&C()}),[h,r]),(0,i.useEffect)((()=>{1==t("a_b_testing")?c(!0):c(!1)}),[e]),(0,i.useEffect)((()=>{"valid"===_&&r?f.hasOwnProperty(b)&&g(f[b]):p.hasOwnProperty(b)&&g(p[b])}),[]),(0,i.useEffect)((()=>{r&&g(p[b])}),[b,r,h]);const D=k?"cmplz-loading":"";return(0,s.createElement)(s.Fragment,null,m.length>1&&(0,s.createElement)("select",{value:b,onChange:e=>u(e.target.value)},m.map(((e,t)=>(0,s.createElement)("option",{key:t,value:e.id},e.label)))),d&&y&&(0,s.createElement)(y,{className:`cmplz-loading-container ${D}`,options:{responsive:!0,plugins:{legend:{position:"top"}}},data:d}))}))},88895:(e,t,a)=>{a.r(t),a.d(t,{default:()=>l});var s=a(81621),o=a(9588);const n={optin:{labels:["Functional","Statistics","Marketing","Do Not Track","No Choice","No Warning"],categories:["functional","statistics","marketing","do_not_track","no_choice","no_warning"],datasets:[{data:["0","0","0","0","0","0"],backgroundColor:"rgba(46, 138, 55, 1)",borderColor:"rgba(46, 138, 55, 1)",label:"A (default)",fill:"false",borderDash:[0,0]},{data:["0","0","0","0","0","0"],backgroundColor:"rgba(244, 191, 62, 1)",borderColor:"rgba(244, 191, 62, 1)",label:"B",fill:"false",borderDash:[0,0]}],max:5},optout:{labels:["Functional","Statistics","Marketing","Do Not Track","No Choice","No Warning"],categories:["functional","statistics","marketing","do_not_track","no_choice","no_warning"],datasets:[{data:["0","0","0","0","0","0"],backgroundColor:"rgba(46, 138, 55, 1)",borderColor:"rgba(46, 138, 55, 1)",label:"A (default)",fill:"false",borderDash:[0,0]},{data:["0","0","0","0","0","0"],backgroundColor:"rgba(244, 191, 62, 1)",borderColor:"rgba(244, 191, 62, 1)",label:"B",fill:"false",borderDash:[0,0]}],max:5}},i={optin:{labels:["Functional","Statistics","Marketing","Do Not Track","No Choice","No Warning"],categories:["functional","statistics","marketing","do_not_track","no_choice","no_warning"],datasets:[{data:["29","747","174","292","30","10"],backgroundColor:"rgba(46, 138, 55, 1)",borderColor:"rgba(46, 138, 55, 1)",label:"Demo A (default)",fill:"false",borderDash:[0,0]},{data:["3","536","240","389","45","32"],backgroundColor:"rgba(244, 191, 62, 1)",borderColor:"rgba(244, 191, 62, 1)",label:"Demo B",fill:"false",borderDash:[0,0]}],max:5},optout:{labels:["Functional","Statistics","Marketing","Do Not Track","No Choice","No Warning"],categories:["functional","statistics","marketing","do_not_track","no_choice","no_warning"],datasets:[{data:["29","747","174","292","30","10"],backgroundColor:"rgba(46, 13
|