1(function( $ ) { 2 'use strict'; 3 var CCPA = { 4 ccpaOptedOut: false, 5 ccpaOptOutConfirmationOpen: false, 6 set: function() { 7 this.setCheckboxState(); 8 jQuery(document).on('click','.wt-cli-ccpa-opt-out-checkbox',function() { 9 CCPA.ccpaOptedOut = false; 10 if(this.checked === true ) { 11 CCPA.ccpaOptedOut = true; 12 } 13 CCPA.optOutCcpa(); 14 }); 15 jQuery(document).on('click','.wt-cli-ccpa-opt-out:not(.wt-cli-ccpa-opt-out-checkbox)',function(){ 16 CCPA.showCcpaOptOutConfirmBox(); 17 }) 18 }, 19 setCheckboxState : function() { 20 var cliConsent = {}; 21 var preferenceCookie = CLI_Cookie.read(CLI_PREFERNCE_COOKIE); 22 if( preferenceCookie !== null ) { 23 cliConsent = CCPA.parseCookie(preferenceCookie); 24 if( typeof( cliConsent.ccpaOptout ) !== 'undefined') { 25 26 if( cliConsent.ccpaOptout === true ) { 27 jQuery('.wt-cli-ccpa-opt-out-checkbox').prop('checked',true); 28 } 29 else { 30 jQuery('.wt-cli-ccpa-opt-out-checkbox').prop('checked',false); 31 } 32 } 33 34 } 35 }, 36 optOutCcpa: function() { 37 var preferenceCookie = CLI_Cookie.read(CLI_PREFERNCE_COOKIE); 38 var cliConsent = {}; 39 if( preferenceCookie !== null ) { 40 cliConsent = CCPA.parseCookie(preferenceCookie); 41 } 42 cliConsent.ccpaOptout = this.ccpaOptedOut; 43 cliConsent = JSON.stringify(cliConsent); 44 cliConsent = window.btoa(cliConsent); 45 CLI_Cookie.set(CLI_PREFERNCE_COOKIE,cliConsent,CLI_ACCEPT_COOKIE_EXPIRE); 46 this.setCheckboxState(); 47 }, 48 parseCookie: function( preferenceCookie ) { 49 var cliConsent = {}; 50 cliConsent = window.atob(preferenceCookie); 51 cliConsent = JSON.parse(cliConsent); 52 return cliConsent; 53 }, 54 toggleCCPA: function() { 55 56 }, 57 checkAuthentication: function() { 58 59 }, 60 showCcpaOptOutConfirmBox: function() { 61 62 var css = '.cli-alert-dialog-buttons button {\ 63 -webkit-box-flex: 1!important;\ 64 -ms-flex: 1!important;\ 65 flex: 1!important;\ 66 -webkit-appearance: none!important;\ 67 -moz-appearance: none!important;\ 68 appearance: none!important;\ 69 margin: 4px!important;\ 70 padding: 8px 16px!important;\ 71 border-radius: 64px!important;\ 72 cursor: pointer!important;\ 73 font-weight: 700!important;\ 74 font-size: 12px !important;\ 75 color: #fff;\ 76 text-align: center!important;\ 77 text-transform: capitalize;\ 78 border: 2px solid #61a229;\ 79 } #cLiCcpaOptoutPrompt .cli-modal-dialog{\ 80 max-width: 320px;\ 81 }\ 82 #cLiCcpaOptoutPrompt .cli-modal-content {\ 83 box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);\ 84 -webkit-box-shadow:0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);\ 85 -moz-box-shadow0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);\ 86 }\ 87 .cli-alert-dialog-content {\ 88 font-size: 14px;\ 89 }\ 90 .cli-alert-dialog-buttons {\ 91 padding-top:5px;\ 92 }\ 93 button.cli-ccpa-button-cancel {\ 94 background: transparent !important;\ 95 color: #61a229;\ 96 }\ 97 button.cli-ccpa-button-confirm {\ 98 background-color:#61a229;\ 99 color:#ffffff;\ 100 }'; 101 var head = document.head || document.getElementsByTagName('head')[0]; 102 var style = document.createElement('style'); 103 var primaryColor = CLI.settings.button_1_button_colour; 104 var primaryLinkColor = CLI.settings.button_1_link_colour; 105 var backgroundColor = CLI.settings.background; 106 var textColor = CLI.settings.text; 107 CCPA.ccpaOptOutConfirmationOpen = false;
108 var ccpaPrompt, 109 $this = this; 110 (ccpaPrompt = document.createElement("div")).classList.add("cli-modal", "cli-show", "cli-blowup"); 111 ccpaPrompt.id = "cLiCcpaOptoutPrompt"; 112 var t = document.createElement("div"); 113 t.className = "cli-modal-dialog"; 114 var n=document.createElement("div"); 115 n.classList.add("cli-modal-content","cli-bar-popup"); 116 var o = document.createElement("div"); 117 o.className="cli-modal-body"; 118 var p = document.createElement("div"); 119 p.classList.add("wt-cli-element", "cli-container-fluid", "cli-tab-container"); 120 var q = document.createElement("div"); 121 q.className="cli-row"; 122 var r = document.createElement("div"); 123 r.classList.add("cli-col-12"); 124 var x = document.createElement("div"); 125 x.classList.add("cli-modal-backdrop", "cli-fade", "cli-settings-overlay", "cli-show"); 126 var a = document.createElement("button"); 127 var b = document.createElement("button"); 128 var c = document.createElement("div"); 129 var d = document.createElement("div"); 130 d.className = "cli-alert-dialog-content", 131 d.innerText = ccpa_data.opt_out_prompt, 132 c.className = "cli-alert-dialog-buttons"; 133 a.className = "cli-ccpa-button-confirm", 134 a.innerText = ccpa_data.opt_out_confirm, 135 a.addEventListener("click", 136 function() { 137 CCPA.ccpaOptedOut = true, 138 CCPA.optOutCcpa(), 139 document.body.removeChild(ccpaPrompt), 140 document.body.removeChild(x), 141 document.body.classList.remove("cli-modal-open"); 142 head.removeChild(style); 143 if( Cli_Data.ccpaType === 'ccpa' ){ 144 CLI.enableAllCookies(); 145 CLI.accept_close(); 146 } 147 } 148 ), 149 b.className="cli-ccpa-button-cancel", 150 b.innerText = ccpa_data.opt_out_cancel, 151 b.addEventListener("click", 152 function() { 153 CCPA.ccpaOptedOut = false, 154 CCPA.optOutCcpa(), 155 document.body.removeChild(ccpaPrompt), 156 document.body.removeChild(x), 157 document.body.classList.remove("cli-modal-open"); 158 head.removeChild(style); 159 if( Cli_Data.ccpaType === 'ccpa' ){ 160 CLI.enableAllCookies(); 161 CLI.accept_close(); 162 } 163 } 164 ), 165 ccpaPrompt.addEventListener("click", 166 function( event ) { 167 event.stopPropagation(); 168 if ( ccpaPrompt !== event.target) return; 169 document.body.removeChild(ccpaPrompt), 170 document.body.removeChild(x), 171 document.body.classList.remove("cli-modal-open"); 172 head.removeChild(style); 173 174 }), 175 ccpaPrompt.appendChild(t), 176 t.appendChild(n), 177 n.appendChild(o), 178 o.appendChild(p), 179 p.appendChild(q), 180 q.appendChild(r), 181 r.appendChild(d), 182 r.appendChild(c), 183 c.appendChild(b), 184 c.appendChild(a), 185 186 head.appendChild(style); 187 style.type = 'text/css'; 188 if (style.styleSheet){ 189 // This is required for IE8 and below. 190 style.styleSheet.cssText = css; 191 } else { 192 style.appendChild(document.createTextNode(css)); 193 } 194 document.body.appendChild(ccpaPrompt); 195 document.body.appendChild(x); 196 document.body.classList.add("cli-modal-open"); 197 198 }, 199 } 200 jQuery(document).ready(function() { 201 CCPA.set(); 202 }); 203 204})( jQuery );
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.