OwlCyberSecurity - MANAGER
Edit File: ai-rotation.q.min.js
jQuery(function(b){function x(){b("div.ai-rotate.ai-rotation-groups").each(function(d,k){b(this).addClass("ai-timer");ai_process_rotation(this)})}var q=[];ai_process_rotation=function(d){if(b(d).hasClass("ai-unprocessed")||b(d).hasClass("ai-timer")){b(d).removeClass("ai-unprocessed").removeClass("ai-timer");var k=!1;if("undefined"!=typeof b(d).data("info")){var f="div.ai-rotate.ai-"+JSON.parse(atob(b(d).data("info")))[0];q.includes(f)&&(q.splice(q.indexOf(f),1),k=!0)}if("number"==typeof d.length)for(k= 0;k<d.length;k++)0==k?ai_process_single_rotation(d[k],!0):ai_process_single_rotation(d[k],!1);else ai_process_single_rotation(d,!k)}};ai_process_single_rotation=function(d,k){var f=b(d).children(".ai-rotate-option");if(0!=f.length){f.hide();if("undefined"==typeof b(d).data("next"))if("undefined"!=typeof b(f[0]).data("group")){var h=-1,t=[];b("span[data-ai-groups]").each(function(p){(b(this)[0].offsetWidth||b(this)[0].offsetHeight||b(this)[0].getClientRects().length)&&t.push(this)});1<=t.length&&(groups= [],t.forEach(function(p,y){active_groups=JSON.parse(b64d(b(p).data("ai-groups")));active_groups.forEach(function(u,w){groups.push(u)})}),groups.forEach(function(p,y){-1==h&&f.each(function(u){option_group_items=b64d(b(this).data("group")).split(",");option_group_items.forEach(function(w,z){-1==h&&w.trim()==p&&(h=u)})})}))}else{var g=b(d).data("shares");if("string"===typeof g){g=JSON.parse(atob(g));for(var e=Math.round(100*Math.random()),a=0;a<g.length&&(h=a,0>g[a]||!(e<=g[a]));a++);}else g=b(d).hasClass("ai-unique"), e=new Date,g?("number"!=typeof ai_rotation_seed&&(ai_rotation_seed=(Math.floor(1E3*Math.random())+e.getMilliseconds())%f.length),g=ai_rotation_seed,g>f.length&&(g%=f.length),e=b(d).data("counter"),e<=f.length?(h=g+e-1,h>=f.length&&(h-=f.length)):h=f.length):(h=Math.floor(Math.random()*f.length),e.getMilliseconds()%2&&(h=f.length-h-1))}else h=parseInt(b(d).attr("data-next")),a=b(f[h]),"undefined"!=typeof a.data("code")&&(a=b(b64d(a.data("code")))),0!=a.find("span[data-ai-groups]").addBack("span[data-ai-groups]").length&& 0!=b(".ai-rotation-groups").length&&setTimeout(function(){x()},5);if(b(d).hasClass("ai-rotation-scheduling"))for(h=-1,g=0;g<f.length;g++)if(a=b(f[g]),e=a.data("scheduling"),"undefined"!=typeof e){a=b64d(e);e=!0;0==a.indexOf("^")&&(e=!1,a=a.substring(1));var m=a.split("="),c=-1!=a.indexOf("%")?m[0].split("%"):[m[0]];a=c[0].trim().toLowerCase();c="undefined"!=typeof c[1]?c[1].trim():0;m=m[1].replace(" ","");var n=(new Date).getTime();n=new Date(n);var l=0;switch(a){case "s":l=n.getSeconds();break;case "i":l= n.getMinutes();break;case "h":l=n.getHours();break;case "d":l=n.getDate();break;case "m":l=n.getMonth();break;case "y":l=n.getFullYear();break;case "w":l=n.getDay(),l=0==l?6:l-1}a=0!=c?l%c:l;c=m.split(",");m=!e;for(n=0;n<c.length;n++)if(l=c[n],-1!=l.indexOf("-")){if(l=l.split("-"),a>=l[0]&&a<=l[1]){m=e;break}}else if(a==l){m=e;break}if(m){h=g;break}}if(!(0>h||h>=f.length)){a=b(f[h]);e="";var v=!1;f.each(function(p){p=b(this).attr("data-time");"undefined"!==typeof p&&!1!==p&&(v=!0)});if("undefined"!= typeof a.data("time")){g=atob(a.data("time"));if(0==g&&1<f.length){c=h;do{c++;c>=f.length&&(c=0);m=b(f[c]);if("undefined"==typeof m.data("time")){h=c;a=b(f[h]);g=0;break}m=atob(m.data("time"))}while(0==m&&c!=h);0!=g&&(h=c,a=b(f[h]),g=atob(a.data("time")))}if(0<g&&(c=h+1,c>=f.length&&(c=0),"undefined"!=typeof b(d).data("info"))){e=JSON.parse(atob(b(d).data("info")))[0];b(d).attr("data-next",c);var r="div.ai-rotate.ai-"+e;q.includes(r)&&(k=!1);k&&(q.push(r),setTimeout(function(){b(r).addClass("ai-timer"); ai_process_rotation(b(r))},1E3*g));e=" ("+g+" s)"}}else"undefined"==typeof a.data("group")&&f.each(function(p){p!=h&&b(this).remove()});a.css({display:"",visibility:"",position:"",width:"",height:"",top:"",left:""}).removeClass("ai-rotate-hidden").removeClass("ai-rotate-hidden-2");b(d).css({position:""});"undefined"!=typeof a.data("code")&&(f.empty(),k=b64d(a.data("code")),a.append(k),ai_process_elements());g=a.data("index");k=b64d(a.data("name"));c=b(d).closest(".ai-debug-block");0!=c.length&&(a= c.find("kbd.ai-option-name"),c=c.find(".ai-debug-block"),"undefined"!=typeof c&&(c=c.find("kbd.ai-option-name"),a=a.slice(0,a.length-c.length)),"undefined"!=typeof a&&(c=a.first().data("separator"),"undefined"==typeof c&&(c=""),a.html(c+k+e)));a=!1;c=b(d).closest(".ai-adb-show");0!=c.length&&c.attr("data-ai-tracking")&&(e=JSON.parse(b64d(c.attr("data-ai-tracking"))),"undefined"!==typeof e&&e.constructor===Array&&(e[1]=g,e[3]=k,c.attr("data-ai-tracking",b64e(JSON.stringify(e))),c.addClass("ai-track"), v&&ai_tracking_finished&&c.addClass("ai-no-pageview"),a=!0));a||(d=b(d).closest("div[data-ai]"),"undefined"!=typeof d.attr("data-ai")&&(e=JSON.parse(b64d(d.attr("data-ai"))),"undefined"!==typeof e&&e.constructor===Array&&(e[1]=g,e[3]=k,d.attr("data-ai",b64e(JSON.stringify(e))),d.addClass("ai-track"),v&&ai_tracking_finished&&d.addClass("ai-no-pageview"))))}}};ai_process_rotations=function(){b("div.ai-rotate").each(function(d,k){ai_process_rotation(this)})};ai_process_rotations_in_element=function(d){b("div.ai-rotate", d).each(function(k,f){ai_process_rotation(this)})};b(document).ready(function(d){setTimeout(function(){ai_process_rotations()},10)})});ai_process_elements_active=!1; function ai_process_elements(){ai_process_elements_active||setTimeout(function(){ai_process_elements_active=!1;"function"==typeof ai_process_rotations&&ai_process_rotations();"function"==typeof ai_process_lists&&ai_process_lists(jQuery(".ai-list-data"));"function"==typeof ai_process_ip_addresses&&ai_process_ip_addresses(jQuery(".ai-ip-data"));"function"==typeof ai_process_filter_hooks&&ai_process_filter_hooks(jQuery(".ai-filter-check"));"function"==typeof ai_adb_process_blocks&&ai_adb_process_blocks(); "function"==typeof ai_process_impressions&&1==ai_tracking_finished&&ai_process_impressions();"function"==typeof ai_install_click_trackers&&1==ai_tracking_finished&&ai_install_click_trackers();"function"==typeof ai_install_close_buttons&&ai_install_close_buttons(document)},5);ai_process_elements_active=!0};