D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
aramrprl
/
www
/
wp-content
/
plugins
/
complianz-gdpr
/
settings
/
build
/
Filename :
1239.56caf61c6b09a3e11412.js
back
Copy
"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:()=>l});var s=a(4219),o=a(88895),n=a(86087),i=a(35683),r=a(10790);const l=(0,n.memo)(()=>{const{fields:e,getFieldValue:t}=(0,s.default)(),[l,c]=(0,n.useState)(!1),[d,g]=(0,n.useState)(!1),{consentType:b,setConsentType:u,statisticsData:p,emptyStatisticsData:f,consentTypes:h,loaded:m,fetchStatisticsData:C,statisticsLoading:k}=(0,o.default)(),[y,T]=(0,n.useState)(null),{licenseStatus:_}=(0,i.default)();(0,n.useEffect)(()=>{a.e(106).then(a.bind(a,70106)).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(106),a.e(4731)]).then(a.bind(a,44731)).then(({Bar:e})=>{T(()=>e)})},[]),(0,n.useEffect)(()=>{!m&&l&&C()},[m,l]),(0,n.useEffect)(()=>{1==t("a_b_testing")?c(!0):c(!1)},[e]),(0,n.useEffect)(()=>{"valid"===_&&l?f.hasOwnProperty(b)&&g(f[b]):p.hasOwnProperty(b)&&g(p[b])},[]),(0,n.useEffect)(()=>{l&&g(p[b])},[b,l,m]);const D=k?"cmplz-loading":"";return(0,r.jsxs)(r.Fragment,{children:[h.length>1&&(0,r.jsx)("select",{value:b,onChange:e=>u(e.target.value),children:h.map((e,t)=>(0,r.jsx)("option",{value:e.id,children:e.label},t))}),d&&y&&(0,r.jsx)(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:()=>r});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, 138, 55, 1)",borderColor:"rgba(46, 138, 55, 1)",label:"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}},r=(0,s.vt)((e,t)=>({consentType:"optin",setConsentType:t=>{e({consentType:t})},statisticsLoading:!1,consentTypes:[],regions:[],defaultConsentType:"optin",loaded:!1,statisticsData:n,emptyStatisticsData:n,bestPerformerEnabled:!1,daysLeft:"",abTrackingCompleted:!1,labels:[],setLabels:t=>{e({labels:t})},fetchStatisticsData:async()=>{if(!cmplz_settings.is_premium)return void e({saving:!1,loaded:!0,consentType:"optin",consentTypes:["optin","optout"],statisticsData:i,defaultConsentType:"optin",bestPerformerEnabled:!1,regions:"eu",daysLeft:11,abTrackingCompleted:!1});if(e({saving:!0}),t().loaded)return;const{daysLeft:a,abTrackingCompleted:s,consentTypes:n,statisticsData:r,defaultConsentType:l,regions:c,bestPerformerEnabled:d}=await o.doAction("get_statistics_data",{}).then(e=>e).catch(e=>{console.error(e)});e({saving:!1,loaded:!0,consentType:l,consentTypes:n,statisticsData:r,defaultConsentType:l,bestPerformerEnabled:d,regions:c,daysLeft:a,abTrackingCompleted:s})}}))}}]);