(function(){
var supportsPassive=false;
try {
var opts=Object.defineProperty({}, 'passive', {
get:function(){
supportsPassive=true;
}});
window.addEventListener('testPassive', null, opts);
window.removeEventListener('testPassive', null, opts);
} catch(e){}
function init(){
var input_begin='';
var keydowns={};
var lastKeyup=null;
var lastKeydown=null;
var keypresses=[];
var modifierKeys=[];
var correctionKeys=[];
var lastMouseup=null;
var lastMousedown=null;
var mouseclicks=[];
var mouseclickCoordinates=[];
var mousemoveTimer=null;
var lastMousemoveX=null;
var lastMousemoveY=null;
var mousemoveStart=null;
var mousemoves=[];
var touchmoveCountTimer=null;
var touchmoveCount=0;
var lastTouchEnd=null;
var lastTouchStart=null;
var touchEvents=[];
var scrollCountTimer=null;
var scrollCount=0;
var correctionKeyCodes=[ 'Backspace', 'Delete', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'Home', 'End', 'PageUp', 'PageDown' ];
var modifierKeyCodes=[ 'Shift', 'CapsLock' ];
var forms=document.querySelectorAll('form[method=post]');
for(var i=0; i < forms.length; i++){
var form=forms[i];
var formAction=form.getAttribute('action');
if(formAction){
if(formAction.indexOf('http://')==0||formAction.indexOf('https://')==0){
if(formAction.indexOf('http://' + window.location.hostname + '/')!=0&&formAction.indexOf('https://' + window.location.hostname + '/')!=0){
continue;
}}
}
form.addEventListener('submit', function (){
var ak_bkp=prepare_array_for_request(keypresses);
var ak_bmc=prepare_array_for_request(mouseclicks);
var ak_bte=prepare_array_for_request(touchEvents);
var ak_bmm=prepare_array_for_request(mousemoves);
var ak_bcc=prepare_array_for_request(mouseclickCoordinates);
var input_fields={
'bib': input_begin,
'bfs': Date.now(),
'bkpc': keypresses.length,
'bkp': ak_bkp,
'bmc': ak_bmc,
'bmcc': mouseclicks.length,
'bmk': modifierKeys.join(';'),
'bck': correctionKeys.join(';'),
'bmmc': mousemoves.length,
'btmc': touchmoveCount,
'bsc': scrollCount,
'bte': ak_bte,
'btec':touchEvents.length,
'bmm':ak_bmm,
'bcc':ak_bcc
};
var akismet_field_prefix='ak_';
if(this.getElementsByClassName){
var possible_akismet_containers=this.getElementsByClassName('akismet-fields-container');
for(var containerIndex=0; containerIndex < possible_akismet_containers.length; containerIndex++){
var container=possible_akismet_containers.item(containerIndex);
if(container.getAttribute('data-prefix') ){
akismet_field_prefix=container.getAttribute('data-prefix');
break;
}}
}
for(var field_name in input_fields){
var field=document.createElement('input');
field.setAttribute('type', 'hidden');
field.setAttribute('name', akismet_field_prefix + field_name);
field.setAttribute('value', input_fields[ field_name ]);
this.appendChild(field);
}}, supportsPassive ? { passive: true }:false);
form.addEventListener('keydown', function(e){
if(e.key in keydowns){
return;
}
var keydownTime=(new Date()).getTime();
keydowns[ e.key ]=[ keydownTime ];
if(! input_begin){
input_begin=keydownTime;
}
var lastKeyEvent=Math.max(lastKeydown, lastKeyup);
if(lastKeyEvent){
keydowns[ e.key ].push(keydownTime - lastKeyEvent);
}
lastKeydown=keydownTime;
}, supportsPassive ? { passive: true }:false);
form.addEventListener('keyup', function(e){
if(!(e.key in keydowns) ){
return;
}
var keyupTime=(new Date()).getTime();
if('TEXTAREA'===e.target.nodeName||'INPUT'===e.target.nodeName){
if(-1!==modifierKeyCodes.indexOf(e.key) ){
modifierKeys.push(keypresses.length - 1);
}else if(-1!==correctionKeyCodes.indexOf(e.key) ){
correctionKeys.push(keypresses.length - 1);
}else{
var keydownTime=keydowns[ e.key ][0];
var keypress=[];
keypress.push(keyupTime - keydownTime);
if(keydowns[ e.key ].length > 1){
keypress.push(keydowns[ e.key ][1]);
}
keypresses.push(keypress);
}}
delete keydowns[ e.key ];
lastKeyup=keyupTime;
}, supportsPassive ? { passive: true }:false);
form.addEventListener("focusin", function(e){
lastKeydown=null;
lastKeyup=null;
keydowns={};}, supportsPassive ? { passive: true }:false);
form.addEventListener("focusout", function(e){
lastKeydown=null;
lastKeyup=null;
keydowns={};}, supportsPassive ? { passive: true }:false);
}
document.addEventListener('mousedown', function(e){
lastMousedown=(new Date()).getTime();
var mouseclickCoordinate=[];
var rect=e.target.getBoundingClientRect();
var relativeX=e.clientX - rect.left;
var relativeY=e.clientY - rect.top;
mouseclickCoordinate.push(Math.round(relativeX) );
mouseclickCoordinate.push(Math.round(relativeY) );
mouseclickCoordinate.push(rect.width > 0 ? Math.round(relativeX / rect.width * 100):0);
mouseclickCoordinate.push(rect.height > 0 ? Math.round(relativeY / rect.height * 100):0);
mouseclickCoordinates.push(mouseclickCoordinate);
}, supportsPassive ? { passive: true }:false);
document.addEventListener('mouseup', function(e){
if(! lastMousedown){
return;
}
var now=(new Date()).getTime();
var mouseclick=[];
mouseclick.push(now - lastMousedown);
if(lastMouseup){
mouseclick.push(lastMousedown - lastMouseup);
}
mouseclicks.push(mouseclick);
lastMouseup=now;
lastKeydown=null;
lastKeyup=null;
keydowns={};}, supportsPassive ? { passive: true }:false);
document.addEventListener('mousemove', function(e){
if(mousemoveTimer){
clearTimeout(mousemoveTimer);
mousemoveTimer=null;
}else{
mousemoveStart=(new Date()).getTime();
lastMousemoveX=e.offsetX;
lastMousemoveY=e.offsetY;
}
mousemoveTimer=setTimeout(function(theEvent, originalMousemoveStart){
var now=(new Date()).getTime() - 500;
var mousemove=[];
mousemove.push(now - originalMousemoveStart);
mousemove.push(Math.round(Math.sqrt(Math.pow(theEvent.offsetX - lastMousemoveX, 2) +
Math.pow(theEvent.offsetY - lastMousemoveY, 2)
)
)
);
if(mousemove[1] > 0){
mousemoves.push(mousemove);
}
mousemoveStart=null;
mousemoveTimer=null;
}, 500, e, mousemoveStart);
}, supportsPassive ? { passive: true }:false);
document.addEventListener('touchmove', function(e){
if(touchmoveCountTimer){
clearTimeout(touchmoveCountTimer);
}
touchmoveCountTimer=setTimeout(function (){
touchmoveCount++;
}, 500);
}, supportsPassive ? { passive: true }:false);
document.addEventListener('touchstart', function(e){
lastTouchStart=(new Date()).getTime();
}, supportsPassive ? { passive: true }:false);
document.addEventListener('touchend', function(e){
if(! lastTouchStart){
return;
}
var now=(new Date()).getTime();
var touchEvent=[];
touchEvent.push(now - lastTouchStart);
if(lastTouchEnd){
touchEvent.push(lastTouchStart - lastTouchEnd);
}
touchEvents.push(touchEvent);
lastTouchEnd=now;
lastKeydown=null;
lastKeyup=null;
keydowns={};}, supportsPassive ? { passive: true }:false);
document.addEventListener('scroll', function(e){
if(scrollCountTimer){
clearTimeout(scrollCountTimer);
}
scrollCountTimer=setTimeout(function (){
scrollCount++;
}, 500);
}, supportsPassive ? { passive: true }:false);
}
function prepare_array_for_request(a, limit){
if(! limit){
limit=100;
}
var rv='';
if(a.length > 0){
var random_starting_point=Math.max(0, Math.floor(Math.random() * a.length - limit) );
for(var i=0; i < limit&&i < a.length; i++){
var entry=a[ random_starting_point + i ];
rv +=entry.join(',') + ';';
}}
return rv;
}
if(document.readyState!=='loading'){
init();
}else{
document.addEventListener('DOMContentLoaded', init);
}})();
var paoc_ideal_timer=0;
(function($){
"use strict";
$('.paoc-popup iframe[src*="vimeo.com"]').wrap('<div class="paoc-iframe-wrap" />');
$('.paoc-popup iframe[src*="dailymotion.com"]').wrap('<div class="paoc-iframe-wrap" />');
$('.paoc-popup iframe[src*="youtube.com"]').wrap('<div class="paoc-iframe-wrap" />');
$('.paoc-popup iframe[src*="m.youtube.com"]').wrap('<div class="paoc-iframe-wrap" />');
$('.paoc-popup iframe[src*="youtu.be"]').wrap('<div class="paoc-iframe-wrap" />');
$('.paoc-popup iframe[src*="screencast-o-matic.com"]').wrap('<div class="paoc-iframe-wrap" />');
$('.paoc-popup iframe[src*="videopress.com"]').wrap('<div class="paoc-iframe-wrap" />');
$('.paoc-popup iframe[src*="video.wordpress.com"]').wrap('<div class="paoc-iframe-wrap" />');
$('.paoc-popup iframe[src*="fast.wistia.net"]').wrap('<div class="paoc-iframe-wrap" />');
$(document).on('mousemove keypress scroll click touchstart touchmove', function(){
paoc_ideal_timer=0;
});
$('.paoc-popup-page-load.paoc-popup-js').each(function(index){
var target=$(this).attr('id');
if(typeof(target)!=='undefined'){
var options=$('#'+target).data('popup-conf');
var data_opts=$('#'+target).data('conf');
var paoc_active_flag=popupaoc_popup_active_flag(index, target, data_opts, options);
if(paoc_active_flag==1){
setTimeout(function(){
popupaoc_open_popup(target, options, data_opts);
}, data_opts.open_delay);
}
return false;
}});
$(document).on('click', '[class*="paoc-popup-cust-"]', function(){
var html_classes=$(this).attr("class").split(' ');
$.each(html_classes, function(class_key, class_val){
var normal_cls_pos=class_val.indexOf('paoc-popup-cust-');
if(normal_cls_pos < 0){
return;
}
var target=class_val.replace("paoc-popup-cust-", "paoc-popup-");
target=target.trim();
var popup_ele=$('.'+target).attr('id');
var options=$('#'+ popup_ele).data('popup-conf');
var data_opts=$('#'+ popup_ele).data('conf');
if(typeof(popup_ele)!=='undefined'&&(data_opts.popup_type=='simple_link'||data_opts.popup_type=='button'||data_opts.popup_type=='image') ){
var paoc_active_flag=popupaoc_popup_active_flag(class_key, popup_ele, data_opts, options);
if(paoc_active_flag==1){
setTimeout(function(){
popupaoc_open_popup(popup_ele, options, data_opts);
}, data_opts.open_delay);
}}
});
return false;
});
$(document).on('click', '.paoc-popup-close', function(){
$('.custombox-content').removeClass('paoc-cb-popup-complete');
$('html').removeClass('custombox-lock');
Custombox.modal.close();
});
})(jQuery);
function popupaoc_open_popup(target, options, data_opts){
var paoc_popup_open=1;
if(typeof popupaoc_popup_befoer_open==="function"){
paoc_popup_open=popupaoc_popup_befoer_open(paoc_popup_open, target, options, data_opts);
}
if(paoc_popup_open!=1){
return;
}
popupaoc_set_popup_events(target, options, data_opts);
new Custombox.modal(options).open();
}
function popupaoc_set_popup_events(target, options, data_opts){
options.content.onOpen=function(){
jQuery('html').addClass('custombox-lock');
jQuery('.custombox-overlay, .custombox-content').removeClass('paoc-popup-active');
jQuery('.custombox-overlay').not('.paoc-popup-overlay').addClass('paoc-popup-active paoc-popup-overlay paoc-popup-overlay-'+ data_opts.id);
jQuery('.custombox-content').not('.paoc-cb-popup').addClass('paoc-popup-active paoc-cb-popup paoc-cb-popup-'+data_opts.id+' paoc-popup-'+options.content.positionX+'-'+options.content.positionY);
if(options.overlay.active==false&&options.content.fullscreen==false){
jQuery('.custombox-content.paoc-popup-active').addClass('paoc-hide-overlay');
}
if(options.overlay.active==false){
jQuery('html').css({'overflow':'auto', 'margin-right':'0'});
}
var slick_slider_id=jQuery('.slick-slider').attr('id');
if(typeof(slick_slider_id)!=='undefined'&&slick_slider_id!=''){
jQuery('#'+slick_slider_id).slick('setPosition');
}
jQuery(document.body).trigger('paoc_popup_open', [target, options]);
};
options.content.onComplete=function(){
jQuery('.custombox-content').addClass('paoc-cb-popup-complete');
if(data_opts.disappear!=0){
if(data_opts.disappear_mode=='normal'){
var IdleInterval=setInterval(function(){
paoc_ideal_timer=paoc_ideal_timer + 1;
if(paoc_ideal_timer >=data_opts.disappear){
Custombox.modal.close();
clearInterval(IdleInterval);
}}, 1000);
}else if(data_opts.disappear_mode=='force'){
setTimeout(function(){
Custombox.modal.close();
},(data_opts.disappear * 1000) );
}}
jQuery(window).trigger('resize');
jQuery(document.body).trigger('paoc_popup_complete', [target, options]);
};
options.content.onClose=function(){
jQuery('html').removeClass('custombox-lock');
var cookie_name=data_opts.cookie_prefix +'_'+ data_opts.id;
if(data_opts.cookie_expire!==''){
popupaoc_create_cookie(cookie_name, 1, data_opts.cookie_expire, data_opts.cookie_unit, 'Lax');
}
jQuery(document.body).trigger('paoc_popup_close', [target, options]);
};}
function popupaoc_popup_active_flag(index, $this, data_opts, options){
var paoc_check_active=false;
if(typeof(data_opts.cookie_expire)!=='undefined'&&data_opts.cookie_expire!==''&&popupaoc_get_cookie_value(data_opts.cookie_prefix +'_'+ data_opts.id)!=null){
return 0;
}
paoc_check_active=1;
return paoc_check_active;
}
function popupaoc_create_cookie(name, value, time_val, type, samesite){
var date, expires, expire_time, samesite;
time_val=time_val	? time_val:false;
type=type		? type:'day';
samesite=samesite	? ";SameSite="+samesite:'';
if(type=='hour'){
expire_time=(time_val * 60 * 60 * 1000);
}else if(type=='minutes'){
expire_time=(time_val * 60 * 1000);
}else{
expire_time=(time_val * 24 * 60 * 60 * 1000);
}
if(time_val){
date=new Date();
date.setTime(date.getTime() + expire_time);
expires="; expires="+date.toGMTString();
}else{
expires="";
}
document.cookie=encodeURIComponent(name) + "=" + value + expires + "; path=/"+samesite;
}
function popupaoc_get_cookie_value(cookie_name){
var result=null;
var nameEQ=cookie_name + "=";
var get_cookie=document.cookie.split(';');
for (var i=0; i < get_cookie.length; i++){
var c=get_cookie[i];
while (c.charAt(0)==' '){
c=c.substring(1, c.length);
}
if(c.indexOf(nameEQ)==0){
result=c.substring(nameEQ.length,c.length);
}}
return result;
};
(()=>{"use strict";const t=window.wp.hooks,e=(t,e)=>{const a={id:"gla_"+t.id,quantity:e,google_business_vertical:"retail"};return t.name&&(a.name=t.name),t?.categories?.length&&(a.category=t.categories[0].name),t?.prices?.price&&(a.price=parseInt(t.prices.price,10)/10**t.prices.currency_minor_unit),a},a=(t,a=1)=>{((t,e)=>{if("function"!=typeof gtag)throw new Error("Function gtag not implemented.");window.gtag("event","add_to_cart",{send_to:"GLA",...e})})(0,{ecomm_pagetype:"cart",event_category:"ecommerce",items:[e(t,a)]})},n=t=>{var e;return glaGtagData.products[t.id]&&(t.name=glaGtagData.products[t.id].name,t.prices=(e=glaGtagData.products[t.id].price,{price:Math.round(e*10**glaGtagData.currency_minor_unit),currency_minor_unit:glaGtagData.currency_minor_unit})),t};(0,t.addAction)("experimental__woocommerce_blocks-cart-add-item","google-listings-and-ads",({product:t,quantity:e=1})=>{a(t,e)});const r=function(t){const e=t.currentTarget.dataset,r=n({id:e.product_id});a(r,e.quantity||1)},o=function(t){const e=t.target.closest("form.cart");if(!e)return;const r=e.querySelector("[name=add-to-cart]");if(!r)return;const o=e.querySelector("[name=variation_id]"),c=e.querySelector("[name=quantity]"),i=n({id:parseInt(o?o.value:r.value,10)});a(i,c?parseInt(c.value,10):1)};document.defaultView.addEventListener("DOMContentLoaded",function(){document.querySelectorAll(".add_to_cart_button:not(.product_type_variable):not(.product_type_grouped):not(.wc-block-components-product-button__button)").forEach(t=>{t.addEventListener("click",r)}),document.querySelectorAll('[data-block-name="woocommerce/product-button"] > .add_to_cart_button:not(.product_type_variable):not(.product_type_grouped)').forEach(t=>{t.addEventListener("click",r)}),document.querySelectorAll(".single_add_to_cart_button").forEach(t=>{t.addEventListener("click",o)})}),"function"==typeof jQuery&&jQuery(document).on("found_variation","form.cart",function(t,e){(t=>{t?.variation_id&&(glaGtagData.products[t.variation_id]={name:t.display_name,price:t.display_price})})(e)})})();