/
home
/
faureele
/
cars
/
wp-content
/
plugins
/
complianz-gdpr
/
settings
/
build
/
Upload File
HOME
"use strict";(globalThis.webpackChunkcomplianz_gdpr=globalThis.webpackChunkcomplianz_gdpr||[]).push([[2010,4337,5228,5256,5875,6729,7102,8985,9091,9758],{7102:(e,a,t)=>{t.r(a),t.d(a,{default:()=>m});var s=t(45111),o=t(27723),n=t(52010),l=t(15139),i=t(4219),c=t(86087),r=t(81366),d=t(25228),u=t(10790);const p=e=>{const{getFieldValue:a,showSavedSettingsNotice:t}=(0,i.default)(),{language:s,saving:n,purposesOptions:p,services:m,updateCookie:h,toggleDeleteCookie:_,saveCookie:g}=(0,l.default)(),[f,b]=(0,c.useState)(""),[v,x]=(0,c.useState)(""),[k,j]=(0,c.useState)(""),[z,y]=(0,c.useState)([]);let C="no"!==a("use_cdb_api"),w=!!C&&1==e.sync,N=w;n&&(N=!0);let S=!1;e.slug.length>0&&(S="https://cookiedatabase.org/cookie/"+(e.service?e.service:"unknown-service")+"/"+e.slug),(0,c.useEffect)(()=>{e&&e.cookieFunction&&j(e.cookieFunction)},[e]);const D=(e,a,t)=>{h(a,t,e)};(0,c.useEffect)(()=>{e&&e.name&&b(e.name)},[e.name]),(0,c.useEffect)(()=>{if(!e)return;if(e.name===f)return;const a=setTimeout(()=>{h(e.ID,"name",f)},500);return()=>{clearTimeout(a)}},[f]),(0,c.useEffect)(()=>{if(!e)return;if(e.cookieFunction===k)return;const a=setTimeout(()=>{h(e.ID,"cookieFunction",k)},500);return()=>{clearTimeout(a)}},[k]),(0,c.useEffect)(()=>{e&&e.retention&&x(e.retention)},[e.retention]),(0,c.useEffect)(()=>{if(!e)return;if(e.retention===v)return;const a=setTimeout(()=>{h(e.ID,"retention",v)},500);return()=>{clearTimeout(a)}},[v]),(0,c.useEffect)(()=>{let e=p&&p.hasOwnProperty(s)?p[s]:[];e=e.map(e=>({label:e.label,value:e.label})),y(e)},[s,p]);const I=(e,a,t)=>{h(a,t,e)};if(!e)return null;let P=-1!==e.name.indexOf("cmplz_")||w,E=1!=e.deleted?"cmplz-reset-button":"",O=m.map((e,a)=>({value:e.ID,label:e.name})),T=!1,L="Marketing";z.forEach(function(e,a){e.value&&-1!==e.value.indexOf("/")&&(T=!0,L=e.value,L=L.substring(0,L.indexOf("/")))});let F=e.purpose&&-1!==e.purpose.indexOf("/");F&&(L=e.purpose.substring(0,e.purpose.indexOf("/"))),T&&!F&&z.forEach(function(e,a){e.value&&-1!==e.value.indexOf("/")&&(e.value=L,e.label=L,z[a]=e)});let A=e.purpose;return!T&&F&&(A=L),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:"cmplz-details-row cmplz-details-row__checkbox",children:(0,u.jsx)(r.default,{id:e.ID+"_cdb_api",disabled:!C,value:w,onChange:a=>I(a,e.ID,"sync"),options:{true:(0,o.__)("Sync cookie with cookiedatabase.org","complianz-gdpr")}})}),(0,u.jsx)("div",{className:"cmplz-details-row cmplz-details-row__checkbox",children:(0,u.jsx)(r.default,{id:e.ID+"showOnPolicy",disabled:N,value:e.showOnPolicy,onChange:a=>I(a,e.ID,"showOnPolicy"),options:{true:(0,o.__)("Show cookie on Cookie Policy","complianz-gdpr")}})}),(0,u.jsxs)("div",{className:"cmplz-details-row",children:[(0,u.jsx)("label",{children:(0,o.__)("Name","complianz-gdpr")}),(0,u.jsx)("input",{disabled:N,onChange:e=>b(e.target.value),type:"text",placeholder:(0,o.__)("Name","complianz-gdpr"),value:f})]}),(0,u.jsxs)("div",{className:"cmplz-details-row",children:[(0,u.jsx)("label",{children:(0,o.__)("Service","complianz-gdpr")}),(0,u.jsx)(d.default,{disabled:N,value:e.serviceID,options:O,onChange:a=>D(a,e.ID,"serviceID")})]}),(0,u.jsxs)("div",{className:"cmplz-details-row",children:[(0,u.jsx)("label",{children:(0,o.__)("Expiration","complianz-gdpr")}),(0,u.jsx)("input",{disabled:P,onChange:e=>x(e.target.value),type:"text",placeholder:(0,o.__)("1 year","complianz-gdpr"),value:v})]}),(0,u.jsxs)("div",{className:"cmplz-details-row",children:[(0,u.jsx)("label",{children:(0,o.__)("Cookie function","complianz-gdpr")}),(0,u.jsx)("input",{disabled:N,onChange:e=>j(e.target.value),type:"text",placeholder:(0,o.__)("e.g. store user ID","complianz-gdpr"),value:k})]}),(0,u.jsxs)("div",{className:"cmplz-details-row",children:[(0,u.jsx)("label",{children:(0,o.__)("Purpose","complianz-gdpr")}),(0,u.jsx)(d.default,{disabled:N,value:A,options:z,onChange:a=>D(a,e.ID,"purpose")})]}),S&&(0,u.jsx)("div",{className:"cmplz-details-row",children:(0,u.jsx)("a",{href:S,target:"_blank",rel:"noopener noreferrer",children:(0,o.__)("View cookie on cookiedatabase.org","complianz-gdpr")})}),(0,u.jsxs)("div",{className:"cmplz-details-row cmplz-details-row__buttons",children:[(0,u.jsx)("button",{disabled:n,onClick:a=>(async e=>{await g(e),t((0,o.__)("Saved cookie","complianz-gdpr"))})(e.ID),className:"button button-default",children:(0,o.__)("Save","complianz-gdpr")}),(0,u.jsxs)("button",{className:"button button-default "+E,onClick:a=>(async e=>{await _(e)})(e.ID),children:[1==e.deleted&&(0,o.__)("Restore","complianz-gdpr"),1!=e.deleted&&(0,o.__)("Delete","complianz-gdpr")]})]})]})},m=(0,c.memo)(({cookie:e,id:a})=>{let t="";e.deleted?t=" | "+(0,o.__)("Deleted","complianz-gdpr"):e.showOnPolicy?e.isMembersOnly&&(t=" | "+(0,o.__)("Logged in users only, ignored","complianz-gdpr")):t=" | "+(0,o.__)("Admin, ignored","complianz-gdpr");let l=e.name;return(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(n.default,{id:a,summary:l,comment:t,icons:(0,u.jsxs)(u.Fragment,{children:[e.complete&&(0,u.jsx)(s.default,{tooltip:(0,o.__)("The data for this cookie is complete","complianz-gdpr"),name:"success",color:"green"}),!e.complete&&(0,u.jsx)(s.default,{tooltip:(0,o.__)("This cookie has missing fields","complianz-gdpr"),name:"times",color:"red"}),e.sync&&e.synced&&(0,u.jsx)(s.default,{name:"rotate",color:"green"}),!e.synced||!e.sync&&(0,u.jsx)(s.default,{tooltip:(0,o.__)("This cookie is not synchronized with cookiedatabase.org.","complianz-gdpr"),name:"rotate-error",color:"red"}),e.showOnPolicy&&(0,u.jsx)(s.default,{tooltip:(0,o.__)("This cookie will be on your Cookie Policy","complianz-gdpr"),name:"file",color:"green"}),!e.showOnPolicy&&(0,u.jsx)(s.default,{tooltip:(0,o.__)("This cookie is not shown on the Cookie Policy","complianz-gdpr"),name:"file-disabled",color:"grey"}),e.old&&(0,u.jsx)(s.default,{tooltip:(0,o.__)("This cookie has not been detected on your site in the last three months","complianz-gdpr"),name:"calendar-error",color:"red"}),!e.old&&(0,u.jsx)(s.default,{tooltip:(0,o.__)("This cookie has recently been detected","complianz-gdpr"),name:"calendar",color:"green"})]}),details:p(e),style:(()=>{if(e.deleted)return Object.assign({},{backgroundColor:"var(--rsp-red-faded)"})})()})})})},15256:(e,a,t)=>{t.r(a),t.d(a,{default:()=>l});var s=t(45111),o=t(4219),n=t(10790);const l=({title:e,subtitle:a,body:t,icon:l="warning",iconColor:i="orange",ctaLabel:c,ctaUrl:r,ctaFieldId:d="",onCtaClick:u})=>{const p=r?o.default.getState().getReferralUrl("warnings",d,r):null;return(0,n.jsxs)("div",{className:"cmplz-wscscan-alert",children:[(0,n.jsx)(s.default,{name:l,color:i,size:48}),(0,n.jsxs)("div",{className:"cmplz-wscscan-alert-group",children:[(0,n.jsx)("div",{className:"cmplz-wscscan-alert-group-title",children:e}),a&&(0,n.jsx)("div",{className:"cmplz-wscscan-alert-group-desc",children:a})]}),t&&(0,n.jsx)("div",{className:"cmplz-wscscan-alert-desc-long",children:t}),(p||u)&&c&&(0,n.jsx)("div",{children:p?(0,n.jsx)("a",{href:p,target:"_blank",rel:"noopener noreferrer",className:"button button-default",children:c}):(0,n.jsx)("button",{type:"button",onClick:u,className:"button button-default",children:c})})]})}},25228:(e,a,t)=>{t.r(a),t.d(a,{default:()=>c});var s=t(86087),o=t(21366),n=t(45111),l=t(27723),i=t(10790);const c=(0,s.memo)(({value:e=!1,onChange:a,required:t,defaultValue:s,disabled:c,options:r={},canBeEmpty:d=!0,label:u})=>{if(Array.isArray(r)){let e={};r.map(a=>{e[a.value]=a.label}),r=e}return d?(""===e||!1===e||0===e)&&(e="0",r={0:(0,l.__)("Select an option","complianz-gdpr"),...r}):e||(e=Object.keys(r)[0]),(0,i.jsx)("div",{className:"cmplz-input-group cmplz-select-group",children:(0,i.jsxs)(o.bL,{value:e,defaultValue:s,onValueChange:a,required:t,disabled:c&&!Array.isArray(c),children:[(0,i.jsxs)(o.l9,{className:"cmplz-select-group__trigger",children:[(0,i.jsx)(o.WT,{}),(0,i.jsx)(n.default,{name:"chevron-down"})]}),(0,i.jsxs)(o.UC,{className:"cmplz-select-group__content",position:"popper",children:[(0,i.jsx)(o.PP,{className:"cmplz-select-group__scroll-button",children:(0,i.jsx)(n.default,{name:"chevron-up"})}),(0,i.jsx)(o.LM,{className:"cmplz-select-group__viewport",children:(0,i.jsx)(o.YJ,{children:Object.entries(r).map(([e,a])=>(0,i.jsx)(o.q7,{disabled:Array.isArray(c)&&c.includes(e),className:"cmplz-select-group__item",value:e,children:(0,i.jsx)(o.p4,{children:a})},e))})}),(0,i.jsx)(o.wn,{className:"cmplz-select-group__scroll-button",children:(0,i.jsx)(n.default,{name:"chevron-down"})})]})]})},u)})},36729:(e,a,t)=>{t.r(a),t.d(a,{default:()=>h});var s=t(7102),o=t(52010),n=t(15139),l=t(27723),i=t(45111),c=t(4219),r=t(81366),d=t(25228),u=t(86087),p=t(10790);const m=e=>{const{getFieldValue:a,showSavedSettingsNotice:t}=(0,c.default)(),[s,o]=(0,u.useState)(""),[i,m]=(0,u.useState)(""),{language:h,saving:_,deleteService:g,serviceTypeOptions:f,updateService:b,saveService:v}=(0,n.default)(),x="yes"===a("use_cdb_api"),[k,j]=(0,u.useState)([]);(0,u.useEffect)(()=>{let e=f&&f.hasOwnProperty(h)?f[h]:[];e=e.map(e=>({label:e.label,value:e.label})),j(e)},[h,f]);const z=(e,a,t)=>{b(a,t,e)},y=(e,a,t)=>{b(a,t,e)};if((0,u.useEffect)(()=>{e&&e.name&&o(e.name)},[e]),(0,u.useEffect)(()=>{if(!e)return;if(e.name===s)return;if(s.length<2)return;const a=setTimeout(()=>{z(s,e.ID,"name")},500);return()=>{clearTimeout(a)}},[s]),(0,u.useEffect)(()=>{e&&e.privacyStatementURL&&m(e.privacyStatementURL)},[e]),(0,u.useEffect)(()=>{if(!e)return;if(e.privacyStatementURL===i)return;if(0===i.length)return;const a=setTimeout(()=>{z(i,e.ID,"privacyStatementURL")},400);return()=>{clearTimeout(a)}},[i]),!e)return null;const C=!!x&&1==e.sync;let w=C;_&&(w=!0);let N=!1;return e.slug.length>0&&(N="https://cookiedatabase.org/service/"+e.slug),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{className:"cmplz-details-row cmplz-details-row__checkbox",children:(0,p.jsx)(r.default,{id:e.ID+"sharesData",disabled:w,value:1==e.sharesData,onChange:a=>y(a,e.ID,"sharesData"),options:{true:(0,l.__)("Data is shared with this service","complianz-gdpr")}})}),(0,p.jsx)("div",{className:"cmplz-details-row cmplz-details-row__checkbox",children:(0,p.jsx)(r.default,{id:e.ID+"sync",disabled:!x,value:C,onChange:a=>y(a,e.ID,"sync"),options:{true:(0,l.__)("Sync service with cookiedatabase.org","complianz-gdpr")}})}),(0,p.jsxs)("div",{className:"cmplz-details-row",children:[(0,p.jsx)("label",{children:(0,l.__)("Name","complianz-gdpr")}),(0,p.jsx)("input",{disabled:w,onChange:e=>o(e.target.value),type:"text",placeholder:(0,l.__)("Name","complianz-gdpr"),value:s})]}),(0,p.jsxs)("div",{className:"cmplz-details-row",children:[(0,p.jsx)("label",{children:(0,l.__)("Service Types","complianz-gdpr")}),(0,p.jsx)(d.default,{disabled:w,value:e.serviceType,options:k,onChange:a=>z(a,e.ID,"serviceType")})]}),(0,p.jsxs)("div",{className:"cmplz-details-row",children:[(0,p.jsx)("label",{children:(0,l.__)("Privacy Statement URL","complianz-gdpr")}),(0,p.jsx)("input",{disabled:w,onChange:e=>m(e.target.value),type:"text",value:i})]}),N&&(0,p.jsx)("div",{className:"cmplz-details-row",children:(0,p.jsx)("a",{href:N,target:"_blank",rel:"noopener noreferrer",children:(0,l.__)("View service on cookiedatabase.org","complianz-gdpr")})}),(0,p.jsxs)("div",{className:"cmplz-details-row cmplz-details-row__buttons",children:[(0,p.jsx)("button",{disabled:_,onClick:a=>(async e=>{await v(e),t((0,l.__)("Saved service","complianz-gdpr"))})(e.ID),className:"button button-default",children:(0,l.__)("Save","complianz-gdpr")}),(0,p.jsx)("button",{className:"button button-default cmplz-reset-button",onClick:a=>(async e=>{await g(e)})(e.ID),children:(0,l.__)("Delete Service","complianz-gdpr")})]})]})},h=(0,u.memo)(e=>{const{adding:a}=(0,n.default)(),t=e.service&&e.service.ID>0&&e.service.hasOwnProperty("name"),c=!e.service||e.service.ID<=0,r=e.service&&e.service.name?e.service.name:(0,l.__)("New Service","complianz-gdpr");return(0,p.jsx)(p.Fragment,{children:(0,p.jsx)(o.default,{id:e.id,summary:e.name,icons:e.service?(0,p.jsxs)(p.Fragment,{children:[e.service.complete&&(0,p.jsx)(i.default,{tooltip:(0,l.__)("The data for this service is complete","complianz-gdpr"),name:"success",color:"green"}),!e.service.complete&&(0,p.jsx)(i.default,{tooltip:(0,l.__)("This service has missing fields","complianz-gdpr"),name:"times",color:"red"}),e.service.synced&&(0,p.jsx)(i.default,{tooltip:(0,l.__)("This service has been synchronized with cookiedatabase.org","complianz-gdpr"),name:"rotate",color:"green"}),!e.service.synced&&(0,p.jsx)(i.default,{tooltip:(0,l.__)("This service is not synchronized with cookiedatabase.org","complianz-gdpr"),name:"rotate-error",color:"red"})]}):(0,p.jsx)(p.Fragment,{}),details:(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{children:m(e.service)}),e.cookies&&e.cookies.length>0&&(0,p.jsx)("div",{className:"cmplz-panel__cookie_list",children:e.cookies.map((e,a)=>(0,p.jsx)(s.default,{cookie:e},a))}),!c&&(0,p.jsxs)("div",{children:[(0,p.jsxs)("button",{disabled:a||!t,onClick:a=>((a,t)=>{e.addCookie(a,t)})(e.service.ID,r),className:"button button-default",children:[(0,l.__)("Add cookie to %s","complianz-gdpr").replace("%s",r),a&&(0,p.jsx)(i.default,{name:"loading",color:"grey"})]}),!t&&(0,p.jsx)("div",{className:"cmplz-comment",children:(0,l.__)("Save service to be able to add cookies","complianz-gdpr")})]})]})})})})},45875:(e,a,t)=>{t.r(a),t.d(a,{default:()=>m});var s=t(86087),o=t(15139),n=t(36729),l=t(27723),i=t(4219),c=t(81366),r=t(66087),d=t(15256),u=t(94337),p=t(10790);const m=(0,s.memo)(()=>{const{filterAndSort:e,showDeletedCookies:a,setShowDeletedCookies:t,syncDataLoaded:m,loadingSyncData:h,language:_,setLanguage:g,languages:f,fCookies:b,cookieCount:v,addCookie:x,addService:k,fServices:j,syncProgress:z,curlExists:y,hasSyncableData:C,setSyncProgress:w,restart:N,fetchSyncProgressData:S,errorMessage:D}=(0,o.default)(),{addHelpNotice:I,removeHelpNotice:P,getFieldValue:E}=(0,i.default)(),O=!cmplz_settings.wsc_is_authenticated,[T,L]=(0,s.useState)(!1),[F,A]=(0,s.useState)(!1),[R,U]=(0,s.useState)([]);(0,s.useEffect)(()=>{!h&&z<100&&S()},[z]),(0,s.useEffect)(()=>{S()},[_]),(0,s.useEffect)(()=>{if("no"!==E("use_cdb_api"))if(y)if(""!==D)L(!0),I("cookiedatabase_sync","warning",D,"Cookiedatabase","complianz-gdpr");else if(C){if(m)if(L(!1),0===v){A(!0);const e=(0,l.__)("No cookies have been found currently. Please try another site scan, or check the most common causes in the article below","complianz-gdpr");I("cookiedatabase_sync","warning",e,(0,l.__)("No cookies found","complianz-gdpr"),"https://complianz.io/cookie-scan-results/")}else F&&P("cookiedatabase_sync")}else{L(!0);const e=(0,l.__)("Synchronization disabled: All detected cookies and services have been synchronised.","complianz-gdpr");I("cookiedatabase_sync","warning",e,"Cookiedatabase","complianz-gdpr")}else{L(!0);const e=(0,l.__)("CURL is not enabled on your site, which is required for the Cookiedatabase sync to function.","complianz-gdpr");I("cookiedatabase_sync","warning",e,"Cookiedatabase","complianz-gdpr")}else{L(!0);const e=(0,l.__)("You have opted out of the use of the Cookiedatabase.org synchronization.","complianz-gdpr");I("cookiedatabase_sync","warning",e,"Cookiedatabase","complianz-gdpr")}},[E("use_cdb_api"),y,D,C,R,m,b]),(0,s.useEffect)(()=>{z<100&&z>0?L(!0):100===z&&L(!1)},[z]),(0,s.useEffect)(()=>{e()},[a]);const q=(0,r.memoize)(()=>{const e=[...b],a={};[...j].forEach(function(e){a[e.ID]={id:e.ID,name:e.name,service:e,cookies:[]}}),e.forEach(function(e){const t=e.service?e.serviceID:0;a[t]||(a[t]={id:t,name:e.service?e.service:(0,l.__)("Unknown Service","complianz-gdpr"),service:j.filter(e=>e.ID===t)[0],cookies:[]}),a[t].cookies.push(e)}),U(Object.values(a))});(0,s.useEffect)(()=>{q()},[j,b]);const M=(0,u.getScanUpsellAlertProps)();return(0,p.jsxs)(p.Fragment,{children:[O&&(0,p.jsx)(d.default,{title:(0,l.__)("Cookiedatabase Sync Unavailable","complianz-gdpr"),subtitle:(0,l.__)("We need to authenticate this domain.","complianz-gdpr"),body:(0,l.__)("The cookiedatabase.org sync requires Website Scan authentication. It only takes a second!","complianz-gdpr"),ctaLabel:(0,l.__)("Start","complianz-gdpr"),onCtaClick:u.startWscOnboarding}),!O&&M&&(0,p.jsx)(d.default,{...M}),(0,p.jsxs)("div",{className:"cmplz-cookiedatabase-controls",children:[(0,p.jsx)("button",{disabled:T||h,className:"button button-default",onClick:e=>(w(1),void N()),children:(0,l.__)("Sync","complianz-gdpr")}),f.length>1&&(0,p.jsx)("select",{disabled:h,value:_,onChange:e=>g(e.target.value),children:f.map((e,a)=>(0,p.jsx)("option",{value:e,children:e},a))}),(0,p.jsx)(c.default,{id:"show_deleted_cookies",disabled:O,value:a,onChange:e=>t(e),options:{true:(0,l.__)("Show deleted cookies","complianz-gdpr")}})]}),(0,p.jsx)("div",{id:"cmplz-scan-progress",children:(0,p.jsx)("div",{className:"cmplz-progress-bar",style:Object.assign({},{width:(O?0:z)+"%"})})}),(0,p.jsx)("div",{className:"cmplz-panel__list",children:R.map((e,a)=>(0,p.jsx)(n.default,{addCookie:x,id:e.id,cookies:e.cookies,name:e.name,service:e.service},a))}),(0,p.jsx)("div",{className:"cmplz-panel__buttons",children:(0,p.jsx)("button",{disabled:h,onClick:e=>{k()},className:"button button-default",children:(0,l.__)("Add service","complianz-gdpr")})})]})})},52010:(e,a,t)=>{t.r(a),t.d(a,{default:()=>l});var s=t(45111),o=t(86087),n=t(10790);const l=e=>{const[a,t]=(0,o.useState)(!1);return(0,n.jsx)("div",{className:"cmplz-panel__list__item",style:e.style?e.style:{},children:(0,n.jsxs)("details",{open:a,children:[(0,n.jsxs)("summary",{onClick:e=>(e=>{e.preventDefault(),t(!a)})(e),children:[e.icon&&(0,n.jsx)(s.default,{name:e.icon}),(0,n.jsx)("h5",{className:"cmplz-panel__list__item__title",children:e.summary}),(0,n.jsx)("div",{className:"cmplz-panel__list__item__comment",children:e.comment}),(0,n.jsx)("div",{className:"cmplz-panel__list__item__icons",children:e.icons}),(0,n.jsx)(s.default,{name:"chevron-down",size:18})]}),(0,n.jsx)("div",{className:"cmplz-panel__list__item__details",children:a&&e.details})]})})}},79758:(e,a,t)=>{t.r(a),t.d(a,{default:()=>u});var s=t(86087),o=t(9588),n=t(4219),l=t(52043),i=t(56427),c=t(99091),r=t(32828),d=t(10790);const u=(0,s.memo)(({type:e="action",style:a="tertiary",label:t,onClick:u,href:p="",target:m="",disabled:h,action:_,field:g,children:f})=>{if(!t&&!f)return null;const b=(g&&g.button_text?g.button_text:t)||f,{fetchFieldsData:v,showSavedSettingsNotice:x}=(0,n.default)(),{setInitialLoadCompleted:k,setProgress:j}=(0,c.UseCookieScanData)(),{setProgressLoaded:z}=(0,r.default)(),{selectedSubMenuItem:y}=(0,l.default)(),[C,w]=(0,s.useState)(!1),N=`button cmplz-button button--${a} button-${e}`,S=async e=>{await o.doAction(g.action,{}).then(e=>{e.success&&(v(y),"reset_settings"===e.id&&(k(!1),j(0),z(!1)),x(e.message))})},D=g&&g.warn?g.warn:"";return"action"===e?(0,d.jsxs)(d.Fragment,{children:[i.__experimentalConfirmDialog&&(0,d.jsx)(i.__experimentalConfirmDialog,{isOpen:C,onConfirm:async()=>{w(!1),await S()},onCancel:()=>{w(!1)},children:D}),(0,d.jsx)("button",{className:N,onClick:async a=>{if("action"!==e||!u)return"action"===e&&_?i.__experimentalConfirmDialog?void(g&&g.warn?w(!0):await S()):void await S():void(window.location.href=g.url);u(a)},disabled:h,children:b})]}):"link"===e?(0,d.jsx)("a",{className:N,href:p,target:m,children:b}):void 0})},81366:(e,a,t)=>{t.r(a),t.d(a,{default:()=>O});var s=t(51609),o=t(91071),n=t(62133),l=t(9957),i=t(81351),c=t(85357),r=t(54150),d=t(7971),u=t(12579),p=t(10790),m="Checkbox",[h,_]=(0,n.A)(m),[g,f]=h(m);function b(e){const{__scopeCheckbox:a,checked:t,children:o,defaultChecked:n,disabled:l,form:c,name:r,onCheckedChange:d,required:u,value:h="on",internal_do_not_use_render:_}=e,[f,b]=(0,i.i)({prop:t,defaultProp:n??!1,onChange:d,caller:m}),[v,x]=s.useState(null),[k,j]=s.useState(null),z=s.useRef(!1),y=!v||!!c||!!v.closest("form"),C={checked:f,disabled:l,setChecked:b,control:v,setControl:x,name:r,form:c,value:h,hasConsumerStoppedPropagationRef:z,required:u,defaultChecked:!N(n)&&n,isFormControl:y,bubbleInput:k,setBubbleInput:j};return(0,p.jsx)(g,{scope:a,...C,children:w(_)?_(C):o})}var v="CheckboxTrigger",x=s.forwardRef(({__scopeCheckbox:e,onKeyDown:a,onClick:t,...n},i)=>{const{control:c,value:r,disabled:d,checked:m,required:h,setControl:_,setChecked:g,hasConsumerStoppedPropagationRef:b,isFormControl:x,bubbleInput:k}=f(v,e),j=(0,o.s)(i,_),z=s.useRef(m);return s.useEffect(()=>{const e=c?.form;if(e){const a=()=>g(z.current);return e.addEventListener("reset",a),()=>e.removeEventListener("reset",a)}},[c,g]),(0,p.jsx)(u.sG.button,{type:"button",role:"checkbox","aria-checked":N(m)?"mixed":m,"aria-required":h,"data-state":S(m),"data-disabled":d?"":void 0,disabled:d,value:r,...n,ref:j,onKeyDown:(0,l.m)(a,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:(0,l.m)(t,e=>{g(e=>!!N(e)||!e),k&&x&&(b.current=e.isPropagationStopped(),b.current||e.stopPropagation())})})});x.displayName=v;var k=s.forwardRef((e,a)=>{const{__scopeCheckbox:t,name:s,checked:o,defaultChecked:n,required:l,disabled:i,value:c,onCheckedChange:r,form:d,...u}=e;return(0,p.jsx)(b,{__scopeCheckbox:t,checked:o,defaultChecked:n,disabled:i,required:l,onCheckedChange:r,name:s,form:d,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(x,{...u,ref:a,__scopeCheckbox:t}),e&&(0,p.jsx)(C,{__scopeCheckbox:t})]})})});k.displayName=m;var j="CheckboxIndicator",z=s.forwardRef((e,a)=>{const{__scopeCheckbox:t,forceMount:s,...o}=e,n=f(j,t);return(0,p.jsx)(d.C,{present:s||N(n.checked)||!0===n.checked,children:(0,p.jsx)(u.sG.span,{"data-state":S(n.checked),"data-disabled":n.disabled?"":void 0,...o,ref:a,style:{pointerEvents:"none",...e.style}})})});z.displayName=j;var y="CheckboxBubbleInput",C=s.forwardRef(({__scopeCheckbox:e,...a},t)=>{const{control:n,hasConsumerStoppedPropagationRef:l,checked:i,defaultChecked:d,required:m,disabled:h,name:_,value:g,form:b,bubbleInput:v,setBubbleInput:x}=f(y,e),k=(0,o.s)(t,x),j=(0,c.Z)(i),z=(0,r.X)(n);s.useEffect(()=>{const e=v;if(!e)return;const a=window.HTMLInputElement.prototype,t=Object.getOwnPropertyDescriptor(a,"checked").set,s=!l.current;if(j!==i&&t){const a=new Event("click",{bubbles:s});e.indeterminate=N(i),t.call(e,!N(i)&&i),e.dispatchEvent(a)}},[v,j,i,l]);const C=s.useRef(!N(i)&&i);return(0,p.jsx)(u.sG.input,{type:"checkbox","aria-hidden":!0,defaultChecked:d??C.current,required:m,disabled:h,name:_,value:g,form:b,...a,tabIndex:-1,ref:k,style:{...a.style,...z,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function w(e){return"function"==typeof e}function N(e){return"indeterminate"===e}function S(e){return N(e)?"indeterminate":e?"checked":"unchecked"}C.displayName=y;var D=t(27723),I=t(45111),P=t(86087),E=t(79758);const O=(0,P.memo)(({indeterminate:e,label:a,value:t,id:s,onChange:o,required:n,disabled:l,options:i={}})=>{const[c,r]=(0,P.useState)(!1),[d,u]=(0,P.useState)(!1);let m=t;Array.isArray(m)||(m=""===m?[]:[m]),(0,P.useEffect)(()=>{let e=1===Object.keys(i).length&&"true"===Object.keys(i)[0];r(e)},[]),e&&(t=!0);const h=m;let _=!1;Object.keys(i).length>10&&(_=!0);const g=e=>c?t:h.includes(""+e)||h.includes(parseInt(e)),f=()=>{u(!d)};let b=l&&!Array.isArray(l);return 0===Object.keys(i).length?(0,p.jsx)(p.Fragment,{children:(0,D.__)("No options found","complianz-gdpr")}):(0,p.jsxs)("div",{className:"cmplz-checkbox-group",children:[Object.entries(i).map(([i,r],u)=>(0,p.jsxs)("div",{className:"cmplz-checkbox-group__item"+(!d&&u>9?" cmplz-hidden":""),children:[(0,p.jsx)(k,{className:"cmplz-checkbox-group__checkbox",id:s+"_"+i,checked:g(i),"aria-label":a,disabled:b||Array.isArray(l)&&l.includes(i),required:n,onCheckedChange:e=>((e,a)=>{if(c)o(!t);else{const e=h.includes(""+a)||h.includes(parseInt(a))?h.filter(e=>e!==""+a&&e!==parseInt(a)):[...h,a];o(e)}})(0,i),children:(0,p.jsx)(z,{className:"cmplz-checkbox-group__indicator",children:(0,p.jsx)(I.default,{name:e?"indeterminate":"check",size:14,color:"dark-blue"})})}),(0,p.jsx)("label",{className:"cmplz-checkbox-group__label",htmlFor:s+"_"+i,children:r})]},i)),!d&&_&&(0,p.jsx)(E.default,{onClick:()=>f(),children:(0,D.__)("Show more","complianz-gdpr")}),d&&_&&(0,p.jsx)(E.default,{onClick:()=>f(),children:(0,D.__)("Show less","complianz-gdpr")})]})})},85357:(e,a,t)=>{t.d(a,{Z:()=>o});var s=t(51609);function o(e){const a=s.useRef({value:e,previous:e});return s.useMemo(()=>(a.current.value!==e&&(a.current.previous=a.current.value,a.current.value=e),a.current.previous),[e])}},94337:(e,a,t)=>{t.r(a),t.d(a,{getScanUpsellAlertProps:()=>o,startWscOnboarding:()=>s});const s=()=>{const e=new URL(cmplz_settings.dashboard_url);e.searchParams.set("websitescan",""),setTimeout(()=>{window.location.href=e.href},500)},o=()=>{const e=cmplz_settings.scan_upsell;return e?{title:e.title,subtitle:e.subtitle,body:e.body,icon:e.icon,iconColor:e.icon_color,ctaLabel:e.cta_label,ctaUrl:e.cta_url,ctaFieldId:e.cta_field_id}:null}},99091:(e,a,t)=>{t.r(a),t.d(a,{UseCookieScanData:()=>n});var s=t(81621),o=t(9588);const n=(0,s.vt)((e,a)=>({initialLoadCompleted:!1,setInitialLoadCompleted:a=>e({initialLoadCompleted:a}),iframeLoaded:!1,loading:!1,nextPage:!1,progress:0,cookies:[],lastLoadedIframe:"",setIframeLoaded:a=>e({iframeLoaded:a}),setLastLoadedIframe:a=>e({lastLoadedIframe:a}),setProgress:a=>e({progress:a}),fetchProgress:()=>a().loading?Promise.resolve(null):(e({loading:!0}),o.doAction("get_scan_progress",{}).then(a=>(e({initialLoadCompleted:!0,loading:!1,nextPage:a.next_page,progress:a.progress,cookies:a.cookies}),a)))}))}}]);