var EasyAffiliateLinks;
(()=> {
var __webpack_modules__=({
4181:
(function(){
var _this=this;
function _createForOfIteratorHelper(o, allowArrayLike){ var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"]; if(!it){ if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o && typeof o.length==="number"){ if(it) o=it; var i=0; var F=function F(){}; return { s: F, n: function n(){ if(i >=o.length) return { done: true }; return { done: false, value: o[i++] };}, e: function e(_e){ throw _e; }, f: F };} throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion=true, didErr=false, err; return { s: function s(){ it=it.call(o); }, n: function n(){ var step=it.next(); normalCompletion=step.done; return step; }, e: function e(_e2){ didErr=true; err=_e2; }, f: function f(){ try { if(!normalCompletion&&it["return"]!=null) it["return"](); } finally { if(didErr) throw err; }} };}
function _toConsumableArray(arr){ return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread(); }
function _nonIterableSpread(){ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen){ if(!o) return; if(typeof o==="string") return _arrayLikeToArray(o, minLen); var n=Object.prototype.toString.call(o).slice(8, -1); if(n==="Object"&&o.constructor) n=o.constructor.name; if(n==="Map"||n==="Set") return Array.from(o); if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _iterableToArray(iter){ if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null) return Array.from(iter); }
function _arrayWithoutHoles(arr){ if(Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _arrayLikeToArray(arr, len){ if(len==null||len > arr.length) len=arr.length; for (var i=0, arr2=new Array(len); i < len; i++){ arr2[i]=arr[i]; } return arr2; }
window.EasyAffiliateLinks=window.EasyAffiliateLinks||{};
window.EasyAffiliateLinks.clicks={
init: function init(){
document.addEventListener('click', function (e){
for (var target=e.target; target&&target!=_this; target=target.parentNode){
if(target.classList&&target.classList.contains('eafl-link-direct')){
window.EasyAffiliateLinks.clicks.onClickDirectLink(target, e);
break;
}}
}, false);
var htmlLinks=_toConsumableArray(document.querySelectorAll('.eafl-link-html'));
var _iterator=_createForOfIteratorHelper(htmlLinks),
_step;
try {
for (_iterator.s(); !(_step=_iterator.n()).done;){
var htmlLink=_step.value;
window.EasyAffiliateLinks.clicks.initHtmlLink(htmlLink);
}} catch (err){
_iterator.e(err);
} finally {
_iterator.f();
}},
initHtmlLink: function initHtmlLink(container){
var eaflId=parseInt(container.dataset.eaflId);
if(0 < eaflId){
var links=_toConsumableArray(container.querySelectorAll('a'));
if(0 < links.length){
var _iterator2=_createForOfIteratorHelper(links),
_step2;
try {
for (_iterator2.s(); !(_step2=_iterator2.n()).done;){
var link=_step2.value;
link.addEventListener('click', function (e){
window.EasyAffiliateLinks.clicks.register(eaflId);
});
}} catch (err){
_iterator2.e(err);
} finally {
_iterator2.f();
}}else{
var iframes=_toConsumableArray(container.querySelectorAll('iframe'));
var _iterator3=_createForOfIteratorHelper(iframes),
_step3;
try {
for (_iterator3.s(); !(_step3=_iterator3.n()).done;){
var iframe=_step3.value;
window.EasyAffiliateLinks.clicks.iframeListen(eaflId, iframe);
}} catch (err){
_iterator3.e(err);
} finally {
_iterator3.f();
}}
}},
iframeElems: [],
iframeIds: [],
iframeLastClicked: false,
iframeTimeout: false,
iframeListen: function iframeListen(eaflId, elem){
var clicks=window.EasyAffiliateLinks.clicks;
if(false===clicks.iframeTimeout){
clicks.iframeTimeout=setInterval(function (){
var elem=document.activeElement;
if(elem&&elem.tagName=='IFRAME'&&clicks.iframeElems.includes(elem)){
var index=clicks.iframeElems.indexOf(elem);
var eaflIdClicked=clicks.iframeIds[index];
if(eaflIdClicked&&eaflIdClicked!==clicks.iframeLastClicked){
clicks.register(eaflIdClicked);
clicks.iframeLastClicked=eaflIdClicked;
}}
}, 250);
}
clicks.iframeElems.push(elem);
clicks.iframeIds.push(eaflId);
},
onClickDirectLink: function onClickDirectLink(elem, e){
var id=elem.dataset.eaflId;
if(!id){
id=elem.dataset.eaflGridId;
}
if(id){
window.EasyAffiliateLinks.clicks.register(id);
}},
register: function register(id){
id=parseInt(id);
if(0 < id){
fetch(eafl_public.ajax_url, {
method: 'POST',
credentials: 'same-origin',
body: 'action=eafl_register_click&link=' + id + '&security=' + eafl_public.nonce,
headers: {
'Accept': 'application/json, text/plain, * })
});
var __webpack_module_cache__={};
function __webpack_require__(moduleId){
var cachedModule=__webpack_module_cache__[moduleId];
if(cachedModule!==undefined){
return cachedModule.exports;
}
var module=__webpack_module_cache__[moduleId]={
exports: {}
};
__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
return module.exports;
}
(()=> {
__webpack_require__.r=(exports)=> {
if(typeof Symbol!=='undefined'&&Symbol.toStringTag){
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
}
Object.defineProperty(exports, '__esModule', { value: true });
};
})();
var __webpack_exports__={};
(()=> {
"use strict";
__webpack_require__.r(__webpack_exports__);
;
var global =
(typeof globalThis!=='undefined'&&globalThis) ||
(typeof self!=='undefined'&&self) ||
(typeof global!=='undefined'&&global)
var support={
searchParams: 'URLSearchParams' in global,
iterable: 'Symbol' in global&&'iterator' in Symbol,
blob:
'FileReader' in global &&
'Blob' in global &&
(function(){
try {
new Blob()
return true
} catch (e){
return false
}})(),
formData: 'FormData' in global,
arrayBuffer: 'ArrayBuffer' in global
}
function isDataView(obj){
return obj&&DataView.prototype.isPrototypeOf(obj)
}
if(support.arrayBuffer){
var viewClasses=[
'[object Int8Array]',
'[object Uint8Array]',
'[object Uint8ClampedArray]',
'[object Int16Array]',
'[object Uint16Array]',
'[object Int32Array]',
'[object Uint32Array]',
'[object Float32Array]',
'[object Float64Array]'
]
var isArrayBufferView =
ArrayBuffer.isView ||
function(obj){
return obj&&viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1
}}
function normalizeName(name){
if(typeof name!=='string'){
name=String(name)
}
if(/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(name)||name===''){
throw new TypeError('Invalid character in header field name: "' + name + '"')
}
return name.toLowerCase()
}
function normalizeValue(value){
if(typeof value!=='string'){
value=String(value)
}
return value
}
function iteratorFor(items){
var iterator={
next: function(){
var value=items.shift()
return {done: value===undefined, value: value}}
}
if(support.iterable){
iterator[Symbol.iterator]=function(){
return iterator
}}
return iterator
}
function Headers(headers){
this.map={}
if(headers instanceof Headers){
headers.forEach(function(value, name){
this.append(name, value)
}, this)
}else if(Array.isArray(headers)){
headers.forEach(function(header){
this.append(header[0], header[1])
}, this)
}else if(headers){
Object.getOwnPropertyNames(headers).forEach(function(name){
this.append(name, headers[name])
}, this)
}}
Headers.prototype.append=function(name, value){
name=normalizeName(name)
value=normalizeValue(value)
var oldValue=this.map[name]
this.map[name]=oldValue ? oldValue + ', ' + value:value
}
Headers.prototype['delete']=function(name){
delete this.map[normalizeName(name)]
}
Headers.prototype.get=function(name){
name=normalizeName(name)
return this.has(name) ? this.map[name]:null
}
Headers.prototype.has=function(name){
return this.map.hasOwnProperty(normalizeName(name))
}
Headers.prototype.set=function(name, value){
this.map[normalizeName(name)]=normalizeValue(value)
}
Headers.prototype.forEach=function(callback, thisArg){
for (var name in this.map){
if(this.map.hasOwnProperty(name)){
callback.call(thisArg, this.map[name], name, this)
}}
}
Headers.prototype.keys=function(){
var items=[]
this.forEach(function(value, name){
items.push(name)
})
return iteratorFor(items)
}
Headers.prototype.values=function(){
var items=[]
this.forEach(function(value){
items.push(value)
})
return iteratorFor(items)
}
Headers.prototype.entries=function(){
var items=[]
this.forEach(function(value, name){
items.push([name, value])
})
return iteratorFor(items)
}
if(support.iterable){
Headers.prototype[Symbol.iterator]=Headers.prototype.entries
}
function consumed(body){
if(body.bodyUsed){
return Promise.reject(new TypeError('Already read'))
}
body.bodyUsed=true
}
function fileReaderReady(reader){
return new Promise(function(resolve, reject){
reader.onload=function(){
resolve(reader.result)
}
reader.onerror=function(){
reject(reader.error)
}})
}
function readBlobAsArrayBuffer(blob){
var reader=new FileReader()
var promise=fileReaderReady(reader)
reader.readAsArrayBuffer(blob)
return promise
}
function readBlobAsText(blob){
var reader=new FileReader()
var promise=fileReaderReady(reader)
reader.readAsText(blob)
return promise
}
function readArrayBufferAsText(buf){
var view=new Uint8Array(buf)
var chars=new Array(view.length)
for (var i=0; i < view.length; i++){
chars[i]=String.fromCharCode(view[i])
}
return chars.join('')
}
function bufferClone(buf){
if(buf.slice){
return buf.slice(0)
}else{
var view=new Uint8Array(buf.byteLength)
view.set(new Uint8Array(buf))
return view.buffer
}}
function Body(){
this.bodyUsed=false
this._initBody=function(body){
this.bodyUsed=this.bodyUsed
this._bodyInit=body
if(!body){
this._bodyText=''
}else if(typeof body==='string'){
this._bodyText=body
}else if(support.blob&&Blob.prototype.isPrototypeOf(body)){
this._bodyBlob=body
}else if(support.formData&&FormData.prototype.isPrototypeOf(body)){
this._bodyFormData=body
}else if(support.searchParams&&URLSearchParams.prototype.isPrototypeOf(body)){
this._bodyText=body.toString()
}else if(support.arrayBuffer&&support.blob&&isDataView(body)){
this._bodyArrayBuffer=bufferClone(body.buffer)
this._bodyInit=new Blob([this._bodyArrayBuffer])
}else if(support.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(body)||isArrayBufferView(body))){
this._bodyArrayBuffer=bufferClone(body)
}else{
this._bodyText=body=Object.prototype.toString.call(body)
}
if(!this.headers.get('content-type')){
if(typeof body==='string'){
this.headers.set('content-type', 'text/plain;charset=UTF-8')
}else if(this._bodyBlob&&this._bodyBlob.type){
this.headers.set('content-type', this._bodyBlob.type)
}else if(support.searchParams&&URLSearchParams.prototype.isPrototypeOf(body)){
this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')
}}
}
if(support.blob){
this.blob=function(){
var rejected=consumed(this)
if(rejected){
return rejected
}
if(this._bodyBlob){
return Promise.resolve(this._bodyBlob)
}else if(this._bodyArrayBuffer){
return Promise.resolve(new Blob([this._bodyArrayBuffer]))
}else if(this._bodyFormData){
throw new Error('could not read FormData body as blob')
}else{
return Promise.resolve(new Blob([this._bodyText]))
}}
this.arrayBuffer=function(){
if(this._bodyArrayBuffer){
var isConsumed=consumed(this)
if(isConsumed){
return isConsumed
}
if(ArrayBuffer.isView(this._bodyArrayBuffer)){
return Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,
this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength
)
)
}else{
return Promise.resolve(this._bodyArrayBuffer)
}}else{
return this.blob().then(readBlobAsArrayBuffer)
}}
}
this.text=function(){
var rejected=consumed(this)
if(rejected){
return rejected
}
if(this._bodyBlob){
return readBlobAsText(this._bodyBlob)
}else if(this._bodyArrayBuffer){
return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))
}else if(this._bodyFormData){
throw new Error('could not read FormData body as text')
}else{
return Promise.resolve(this._bodyText)
}}
if(support.formData){
this.formData=function(){
return this.text().then(decode)
}}
this.json=function(){
return this.text().then(JSON.parse)
}
return this
}
var methods=['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']
function normalizeMethod(method){
var upcased=method.toUpperCase()
return methods.indexOf(upcased) > -1 ? upcased:method
}
function Request(input, options){
if(!(this instanceof Request)){
throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')
}
options=options||{}
var body=options.body
if(input instanceof Request){
if(input.bodyUsed){
throw new TypeError('Already read')
}
this.url=input.url
this.credentials=input.credentials
if(!options.headers){
this.headers=new Headers(input.headers)
}
this.method=input.method
this.mode=input.mode
this.signal=input.signal
if(!body&&input._bodyInit!=null){
body=input._bodyInit
input.bodyUsed=true
}}else{
this.url=String(input)
}
this.credentials=options.credentials||this.credentials||'same-origin'
if(options.headers||!this.headers){
this.headers=new Headers(options.headers)
}
this.method=normalizeMethod(options.method||this.method||'GET')
this.mode=options.mode||this.mode||null
this.signal=options.signal||this.signal
this.referrer=null
if((this.method==='GET'||this.method==='HEAD')&&body){
throw new TypeError('Body not allowed for GET or HEAD requests')
}
this._initBody(body)
if(this.method==='GET'||this.method==='HEAD'){
if(options.cache==='no-store'||options.cache==='no-cache'){
var reParamSearch=/([?&])_=[^&]*/
if(reParamSearch.test(this.url)){
this.url=this.url.replace(reParamSearch, '$1_=' + new Date().getTime())
}else{
var reQueryString=/\?/
this.url +=(reQueryString.test(this.url) ? '&':'?') + '_=' + new Date().getTime()
}}
}}
Request.prototype.clone=function(){
return new Request(this, {body: this._bodyInit})
}
function decode(body){
var form=new FormData()
body
.trim()
.split('&')
.forEach(function(bytes){
if(bytes){
var split=bytes.split('=')
var name=split.shift().replace(/\+/g, ' ')
var value=split.join('=').replace(/\+/g, ' ')
form.append(decodeURIComponent(name), decodeURIComponent(value))
}})
return form
}
function parseHeaders(rawHeaders){
var headers=new Headers()
var preProcessedHeaders=rawHeaders.replace(/\r?\n[\t ]+/g, ' ')
preProcessedHeaders
.split('\r')
.map(function(header){
return header.indexOf('\n')===0 ? header.substr(1, header.length):header
})
.forEach(function(line){
var parts=line.split(':')
var key=parts.shift().trim()
if(key){
var value=parts.join(':').trim()
headers.append(key, value)
}})
return headers
}
Body.call(Request.prototype)
function Response(bodyInit, options){
if(!(this instanceof Response)){
throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')
}
if(!options){
options={}}
this.type='default'
this.status=options.status===undefined ? 200:options.status
this.ok=this.status >=200&&this.status < 300
this.statusText=options.statusText===undefined ? '':'' + options.statusText
this.headers=new Headers(options.headers)
this.url=options.url||''
this._initBody(bodyInit)
}
Body.call(Response.prototype)
Response.prototype.clone=function(){
return new Response(this._bodyInit, {
status: this.status,
statusText: this.statusText,
headers: new Headers(this.headers),
url: this.url
})
}
Response.error=function(){
var response=new Response(null, {status: 0, statusText: ''})
response.type='error'
return response
}
var redirectStatuses=[301, 302, 303, 307, 308]
Response.redirect=function(url, status){
if(redirectStatuses.indexOf(status)===-1){
throw new RangeError('Invalid status code')
}
return new Response(null, {status: status, headers: {location: url}})
}
var DOMException=global.DOMException
try {
new DOMException()
} catch (err){
DOMException=function(message, name){
this.message=message
this.name=name
var error=Error(message)
this.stack=error.stack
}
DOMException.prototype=Object.create(Error.prototype)
DOMException.prototype.constructor=DOMException
}
function fetch(input, init){
return new Promise(function(resolve, reject){
var request=new Request(input, init)
if(request.signal&&request.signal.aborted){
return reject(new DOMException('Aborted', 'AbortError'))
}
var xhr=new XMLHttpRequest()
function abortXhr(){
xhr.abort()
}
xhr.onload=function(){
var options={
status: xhr.status,
statusText: xhr.statusText,
headers: parseHeaders(xhr.getAllResponseHeaders()||'')
}
options.url='responseURL' in xhr ? xhr.responseURL:options.headers.get('X-Request-URL')
var body='response' in xhr ? xhr.response:xhr.responseText
setTimeout(function(){
resolve(new Response(body, options))
}, 0)
}
xhr.onerror=function(){
setTimeout(function(){
reject(new TypeError('Network request failed'))
}, 0)
}
xhr.ontimeout=function(){
setTimeout(function(){
reject(new TypeError('Network request failed'))
}, 0)
}
xhr.onabort=function(){
setTimeout(function(){
reject(new DOMException('Aborted', 'AbortError'))
}, 0)
}
function fixUrl(url){
try {
return url===''&&global.location.href ? global.location.href:url
} catch (e){
return url
}}
xhr.open(request.method, fixUrl(request.url), true)
if(request.credentials==='include'){
xhr.withCredentials=true
}else if(request.credentials==='omit'){
xhr.withCredentials=false
}
if('responseType' in xhr){
if(support.blob){
xhr.responseType='blob'
}else if(support.arrayBuffer &&
request.headers.get('Content-Type') &&
request.headers.get('Content-Type').indexOf('application/octet-stream')!==-1
){
xhr.responseType='arraybuffer'
}}
if(init&&typeof init.headers==='object'&&!(init.headers instanceof Headers)){
Object.getOwnPropertyNames(init.headers).forEach(function(name){
xhr.setRequestHeader(name, normalizeValue(init.headers[name]))
})
}else{
request.headers.forEach(function(value, name){
xhr.setRequestHeader(name, value)
})
}
if(request.signal){
request.signal.addEventListener('abort', abortXhr)
xhr.onreadystatechange=function(){
if(xhr.readyState===4){
request.signal.removeEventListener('abort', abortXhr)
}}
}
xhr.send(typeof request._bodyInit==='undefined' ? null:request._bodyInit)
})
}
fetch.polyfill=true
if(!global.fetch){
global.fetch=fetch
global.Headers=Headers
global.Request=Request
global.Response=Response
}
var clicks=__webpack_require__(4181);
;
})();
(EasyAffiliateLinks=typeof EasyAffiliateLinks==="undefined" ? {}:EasyAffiliateLinks)["public"]=__webpack_exports__;
})()
;
jQuery(document).ready(function($){
$('.eic-image').hover(function(){
$(this).find('[data-pin-log="button_pinit"]').show();
$(this).find('.eic-image-caption-hover').show();
}, function(){
$(this).find('[data-pin-log="button_pinit"]').hide();
$(this).find('.eic-image-caption-hover').hide();
});
});
const responsive_breakpoint=parseInt(eic_public.responsive_breakpoint);
const responsive_layout='1'===eic_public.responsive_layout ? true:false;
var EIC_Responsive={
elementsSelector: '.eic-container',
maxRefreshRate: 5,
init: function(){
var self=this;
jQuery(function(){
self.el={
window: jQuery(window),
responsive_elements: jQuery(self.elementsSelector)
};
self.events();
});
},
checkBreakpointOfAllElements: function(){
var self=EIC_Responsive;
self.el.responsive_elements.each(function(i, _el){
var container=jQuery(_el);
self.checkBreakpointOfElement(container);
if(container.width() < responsive_breakpoint){
container.removeClass('eic-container-desktop');
container.addClass('eic-container-mobile');
if(responsive_layout){
container.addClass('eic-container-mobile-regular');
}}else{
container.addClass('eic-container-desktop');
container.removeClass('eic-container-mobile');
container.removeClass('eic-container-mobile-regular');
}});
},
checkBreakpointOfElement: function(_el){
var frame=_el.find('.eic-frame');
var container_width=_el.width();
var frame_width=frame.outerWidth();
var orig_frame_width=frame.data('orig-width');
var frame_ratio=frame.data('ratio');
if(container_width < frame_width||frame_width < orig_frame_width){
var new_frame_width=container_width;
if(new_frame_width > orig_frame_width){
new_frame_width=orig_frame_width;
}
var change_ratio=new_frame_width / orig_frame_width;
var orig_border=frame.data('orig-border');
var border=Math.ceil(orig_border * change_ratio);
var orig_radius=frame.data('orig-radius')||0;
var radius=Math.ceil(orig_radius * change_ratio);
var image_radius=Math.max(0, radius - border);
frame
.css('width', new_frame_width + 'px')
.css('height', new_frame_width / frame_ratio + 'px')
.css('border-width', border + 'px')
.css('border-radius', radius + 'px')
.css('overflow', 'hidden');
frame.find('.eic-image')
.css('border-top-left-radius', '')
.css('border-top-right-radius', '')
.css('border-bottom-left-radius', '')
.css('border-bottom-right-radius', '');
frame.find('.eic-corner-top-left').css('border-top-left-radius', image_radius + 'px');
frame.find('.eic-corner-top-right').css('border-top-right-radius', image_radius + 'px');
frame.find('.eic-corner-bottom-left').css('border-bottom-left-radius', image_radius + 'px');
frame.find('.eic-corner-bottom-right').css('border-bottom-right-radius', image_radius + 'px');
_el.find('.eic-image').each(function(){
var image=jQuery(this);
if(image.data('frame-type')==='text'){
image.css('border-width', border + 'px');
return;
}
if(responsive_layout&&container_width < responsive_breakpoint){
image.find('img')
.style('position', 'static', 'important')
.style('width', '100%', 'important')
.style('height', 'auto', 'important')
.style('left', '0', 'important')
.style('top', '0', 'important');
}else{
var size_x=Math.ceil(image.data('size-x') * change_ratio);
var size_y=Math.ceil(image.data('size-y') * change_ratio);
var pos_x=Math.ceil(image.data('pos-x') * change_ratio);
var pos_y=Math.ceil(image.data('pos-y') * change_ratio);
image
.css('background-size', '' + size_x + 'px ' + size_y + 'px')
.css('background-position', '' + pos_x + 'px ' + pos_y + 'px')
.css('border-width', border + 'px');
image.find('img')
.style('position', 'absolute', 'important')
.style('width', '' + size_x + 'px', 'important')
.style('height', '' + size_y + 'px', 'important')
.style('left', '' + pos_x + 'px', 'important')
.style('top', '' + pos_y + 'px', 'important');
}});
}},
events: function(){
this.checkBreakpointOfAllElements();
this.el.window.bind('resize', this.debounce(this.checkBreakpointOfAllElements, this.maxRefreshRate));
},
debounce: function(func, wait, immediate){
var result;
var timeout=null;
return function(){
var context=this,
args=arguments;
var later=function(){
timeout=null;
if(!immediate) result=func.apply(context, args);
};
var callNow=immediate&&!timeout;
clearTimeout(timeout);
timeout=setTimeout(later, wait);
if(callNow) result=func.apply(context, args);
return result;
};}};
(function($){
if($.fn.style){
return;
}
var escape=function(text){
return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
};
var isStyleFuncSupported = !!CSSStyleDeclaration.prototype.getPropertyValue;
if(!isStyleFuncSupported){
CSSStyleDeclaration.prototype.getPropertyValue=function(a){
return this.getAttribute(a);
};
CSSStyleDeclaration.prototype.setProperty=function(styleName, value, priority){
this.setAttribute(styleName, value);
var priority=typeof priority!='undefined' ? priority:'';
if(priority!=''){
var rule=new RegExp(escape(styleName) + '\\s*:\\s*' + escape(value) +
'(\\s*;)?', 'gmi');
this.cssText =
this.cssText.replace(rule, styleName + ': ' + value + ' !' + priority + ';');
}};
CSSStyleDeclaration.prototype.removeProperty=function(a){
return this.removeAttribute(a);
};
CSSStyleDeclaration.prototype.getPropertyPriority=function(styleName){
var rule=new RegExp(escape(styleName) + '\\s*:\\s*[^\\s]*\\s*!important(\\s*;)?',
'gmi');
return rule.test(this.cssText) ? 'important':'';
}}
$.fn.style=function(styleName, value, priority){
var node=this.get(0);
if(typeof node=='undefined'){
return this;
}
var style=this.get(0).style;
if(typeof styleName!='undefined'){
if(typeof value!='undefined'){
priority=typeof priority!='undefined' ? priority:'';
style.setProperty(styleName, value, priority);
return this;
}else{
return style.getPropertyValue(styleName);
}}else{
return style;
}};})(jQuery);
EIC_Responsive.init();
(()=>{var e={799(){window.WPConsent={displayChecks:[],checksPassed:!0,settingsHooks:[],settingsProcessed:!1,listeners:[],lastPreferences:null,cssPromise:null,registerListener:function(e){if(this.listeners.push(e),this.lastPreferences)try{e(this.lastPreferences)}catch(e){console.error("Error in WPConsent listener:",e)}},registerDisplayCheck:function(e){this.displayChecks.push(e),this.checksPassed=!1},registerSettingsHook:function(e){this.settingsHooks.push(e),this.settingsProcessed=!1},runDisplayChecks:function(){return 0===this.displayChecks.length?(this.checksPassed=!0,Promise.resolve()):Promise.all(this.displayChecks.map(e=>e())).then(()=>(this.checksPassed=!0,Promise.resolve())).catch(e=>(console.error("Error in WPConsent display check:",e),this.checksPassed=!0,Promise.resolve()))},runSettingsHooks:function(){return 0===this.settingsHooks.length?(this.settingsProcessed=!0,Promise.resolve()):Promise.all(this.settingsHooks.map(e=>e(window.wpconsent))).then(()=>(this.settingsProcessed=!0,Promise.resolve())).catch(e=>(console.error("Error in WPConsent settings hook:",e),this.settingsProcessed=!0,Promise.resolve()))},hooks:{beforeShowPreferences:[],afterShowPreferences:[],beforeHideBanner:[],afterHideBanner:[],beforeShowBanner:[],afterShowBanner:[],accordionToggled:[]},addHook:function(e,t){this.hooks[e]&&this.hooks[e].push(t)},runHooks:function(e,...t){this.hooks[e]&&this.hooks[e].length>0&&this.hooks[e].forEach(n=>{try{n(...t)}catch(t){console.error(`Error in WPConsent hook ${e}:`,t)}})},showToast:function(e,t=2500){this.ensureCSS().then(()=>{const n=this.shadowRoot.querySelector("#wpconsent-gpc-toast");if(!n)return;const o=n.querySelector(".wpconsent-toast-message");o&&e&&(o.textContent=e),n.style.display="block",setTimeout(()=>{n.classList.add("wpconsent-toast-visible")},10);const s=()=>{n.classList.remove("wpconsent-toast-visible"),setTimeout(()=>{n.style.display="none"},300)},c=setTimeout(s,t),r=n.querySelector(".wpconsent-toast-close");r&&(r.onclick=()=>{clearTimeout(c),s()})})},highlightGPCOverride:function(){const e=this.shadowRoot.querySelector("#wpconsent-gpc-override-toggle-label"),t=this.shadowRoot.querySelector("#wpconsent-gpc-override-checkbox"),n=this.shadowRoot.querySelector("#wpconsent-gpc-override-container");e&&(e.classList.add("wpconsent-gpc-override-error"),e.classList.add("wpconsent-shake"),setTimeout(()=>{e.classList.remove("wpconsent-shake")},300),t&&t.focus(),n&&setTimeout(()=>{n.scrollIntoView({behavior:"smooth",block:"center"})},100),t&&t.addEventListener("change",function(){t.checked&&e.classList.remove("wpconsent-gpc-override-error")},{once:!0}))},acceptAll:function(){const e={};Array.isArray(wpconsent.slugs)&&wpconsent.slugs.forEach(t=>{e[t]=!0}),this.savePreferences(e),this.closePreferences()},checkGPC:function(){if(!wpconsent.respect_gpc||!0!==navigator.globalPrivacyControl)return;const e=this.getCookie("wpconsent_preferences");let t={};if(e)try{t=JSON.parse(e)}catch(e){console.error("WPConsent: Error parsing existing preferences:",e)}if(t.hasOwnProperty("respect_gpc"))return;const n={};if(wpconsent.slugs.forEach(e=>{const t=this.shadowRoot?.querySelector(`#wpconsent-preferences-modal input[type="checkbox"][id="cookie-service-${e}"]`);t&&t.disabled?n[e]=!0:n[e]=!1}),n.essential=!0,n.respect_gpc=!0,this.savePreferences(n,!0),!1!==wpconsent.gpc_toast_enabled){const e=wpconsent.gpc_toast_message||"GPC Signal Honored",t=wpconsent.gpc_toast_duration||1e4;this.showToast(e,t)}this.checksPassed=!1},savePreferences:function(e,t=!1){const n=this.getCookie("wpconsent_preferences");let o=!1,s=null;if(n)try{s=JSON.parse(n)}catch(e){console.error("WPConsent: Error parsing existing preferences:",e)}if(wpconsent.respect_gpc&&!t&&s){const t=!0===navigator.globalPrivacyControl,n=!0===s.respect_gpc;if(t&&n){const t=this.shadowRoot.querySelector("#wpconsent-gpc-override-checkbox");if(t&&!t.checked)return void this.highlightGPCOverride();e.respect_gpc=!1}}t||(s&&JSON.stringify(s)!==JSON.stringify(e)||wpconsent.default_allow&&Object.values(e).some(e=>!1===e))&&(this.clearCookies(),o=!0),wpconsent.respect_gpc&&!t&&s&&s.hasOwnProperty("respect_gpc")&&(e.respect_gpc=!1),this.setCookie("wpconsent_preferences",JSON.stringify(e),wpconsent.consent_duration),this.hideBanner(),this.closePreferences(),this.unlockScripts(e),this.unlockIframes(e),this.showFloatingButtonIfEnabled(),this.updateWordPressConsent(e),window.dispatchEvent(new CustomEvent("wpconsent_consent_saved",{detail:e})),n&&window.dispatchEvent(new CustomEvent("wpconsent_consent_updated",{detail:e})),o&&(Object.defineProperty(document,"cookie",{get:function(){return""},set:function(e){}}),window.location.reload())},showPreferences:function(){return this.ensureCSS().then(()=>{const e=this.shadowRoot?.querySelector("#wpconsent-preferences-modal");if(e){e.style.display="flex",this.setupFocusTrap(e),this.runHooks("afterShowPreferences");const t=this.shadowRoot?.querySelector("#wpconsent-preferences-title");t&&setTimeout(()=>{t.focus({preventScroll:!0}),this.lastFocusedElement=t},100);const n=this.getCookie("wpconsent_preferences");if(n)try{const e=JSON.parse(n);this.shadowRoot.querySelectorAll('#wpconsent-preferences-modal input[type="checkbox"]').forEach(t=>{let n=null;n=t.id.startsWith("cookie-category-")?t.id.replace("cookie-category-",""):t.id.startsWith("cookie-service-")?t.id.replace("cookie-service-",""):t.value,n&&n in e&&(t.checked=e[n])});const t=this.shadowRoot.querySelector("#wpconsent-gpc-override-container");if(t){const n=!0===navigator.globalPrivacyControl,o=e&&!0===e.respect_gpc;t.style.display=n&&o?"block":"none"}}catch(e){console.error("Error parsing WPConsent preferences:",e)}}})},closePreferences:function(){const e=this.shadowRoot?.querySelector("#wpconsent-preferences-modal");e&&(e.style.display="none",this.removeFocusTrap(),this.previouslyFocusedElement&&(this.previouslyFocusedElement.focus({preventScroll:!0}),this.previouslyFocusedElement=null))},showBanner:function(){if(!wpconsent.enable_consent_banner)return;const e=this.shadowRoot?.querySelector("#wpconsent-banner-holder");e&&this.ensureCSS().then(()=>{this.runHooks("beforeShowBanner"),e.classList.add("wpconsent-banner-visible"),this.updateButtonVisibility(wpconsent),this.setupFocusTrap(e),this.runHooks("afterShowBanner")})},hideBanner:function(){const e=this.shadowRoot?.querySelector("#wpconsent-banner-holder");e&&(this.runHooks("beforeHideBanner"),e.classList.remove("wpconsent-banner-visible"),this.removeFocusTrap(),this.previouslyFocusedElement&&(this.previouslyFocusedElement.focus({preventScroll:!0}),this.previouslyFocusedElement=null),this.runHooks("afterHideBanner"))},setCookie:function(e,t,n){let o="";if(n>0){const e=new Date;e.setTime(e.getTime()+24*n*60*60*1e3),o="expires="+e.toUTCString()+";"}const s=this.getCookieDomain();document.cookie=e+"="+t+";"+o+s+"path=/"},getCookieDomain:function(){return wpconsent.enable_shared_consent&&wpconsent.cookie_domain&&""!==wpconsent.cookie_domain?"domain="+(wpconsent.cookie_domain.startsWith(".")?wpconsent.cookie_domain:"."+wpconsent.cookie_domain)+";":""},getCookie:function(e){const t=`; ${document.cookie}`.split(`; ${e}=`);if(2===t.length)return t.pop().split(";").shift()},hasConsent:function(e){const t=this.getCookie("wpconsent_preferences");if(!t)return!1;try{const n=JSON.parse(t);return"essential"===e||!0===n[e]}catch(e){return console.error("Error parsing WPConsent preferences:",e),!1}},shouldUnlockContent:function(e,t,n){return"essential"===n||(wpconsent.manual_toggle_services?!(!t||void 0===e[t])&&e[t]:!0===e[n])},unlockScripts:function(e){this.lastPreferences=e,this.listeners&&this.listeners.length>0&&this.listeners.forEach(t=>{try{t(e)}catch(e){console.error("Error in WPConsent listener:",e)}}),document.querySelectorAll('script[type="text/plain"]').forEach(t=>{const n=t.getAttribute("data-wpconsent-category"),o=t.getAttribute("data-wpconsent-name");if(this.shouldUnlockContent(e,o,n)){const e=document.createElement("script");t.getAttributeNames().forEach(n=>{"type"!==n&&e.setAttribute(n,t.getAttribute(n))});const n=t.getAttribute("data-wpconsent-src");n?e.src=n:e.text=t.text,t.parentNode.replaceChild(e,t)}}),document.dispatchEvent(new CustomEvent("wpconsent_consent_processed",{detail:e})),WPConsent.localGtag("set","developer_id.dMmRkYz",!0),WPConsent.localGtag("consent","update",{ad_storage:e.marketing?"granted":"denied",analytics_storage:e.statistics?"granted":"denied",ad_user_data:e.marketing?"granted":"denied",ad_personalization:e.marketing?"granted":"denied",personalization_storage:e.marketing?"granted":"denied"}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"wpconsent_consent_processed",wpconsentPreferences:e})},unlockIframes:function(e){document.querySelectorAll("iframe[data-wpconsent-src]").forEach(t=>{const n=t.getAttribute("data-wpconsent-category"),o=t.getAttribute("data-wpconsent-name");if(this.shouldUnlockContent(e,o,n)){const e=t.getAttribute("data-wpconsent-src");e&&(t.src=e),t.removeAttribute("data-wpconsent-src"),t.removeAttribute("data-wpconsent-name"),t.removeAttribute("data-wpconsent-category")}}),document.querySelectorAll(".wpconsent-iframe-placeholder").forEach(t=>{const n=t.getAttribute("data-wpconsent-category"),o=t.getAttribute("data-wpconsent-name");if(this.shouldUnlockContent(e,o,n)){const e=t.querySelector(".wpconsent-iframe-thumbnail"),n=t.querySelector(".wpconsent-iframe-overlay-content");e&&e.remove(),n&&n.remove(),t.classList.remove("wpconsent-iframe-placeholder")}})},init:function(){this.runSettingsHooks().then(()=>{this.initWordPress(),this.updateButtonVisibility(wpconsent);const e=document.getElementById("wpconsent-container"),t=document.getElementById("wpconsent-template");if(e&&t)if(this.shadowRoot=e.shadowRoot,this.shadowRoot)this.runDisplayChecks().then(()=>{this.processBannerDisplay()});else{this.shadowRoot=e.attachShadow({mode:"open"});const n=t.content.cloneNode(!0);this.shadowRoot.appendChild(n),t.remove(),this.initializeEventListeners(),this.initializeAccordions(),this.initializeKeyboardHandlers(),this.runDisplayChecks().then(()=>{this.processBannerDisplay()})}})},processBannerDisplay:function(){this.checkGPC();const e=this.getCookie("wpconsent_preferences");if(e){let t={};try{if(t=JSON.parse(e),wpconsent.slugs&&Array.isArray(wpconsent.slugs)&&!wpconsent.slugs.every(e=>t.hasOwnProperty(e)))return this.setCookie("wpconsent_preferences","",-1),void(this.checksPassed&&this.showBanner());this.unlockScripts(t),this.unlockIframes(t)}catch(e){console.error("Error parsing WPConsent preferences:",e)}this.showFloatingButtonIfEnabled()}else if(this.checksPassed&&this.showBanner(),wpconsent.default_allow||!wpconsent.enable_script_blocking){const e={};wpconsent.slugs.forEach(t=>{e[t]=!0}),this.unlockScripts(e),this.unlockIframes(e)}else if(!wpconsent.enable_content_blocking){const e={};wpconsent.slugs.forEach(t=>{e[t]=!0}),this.unlockIframes(e)}document.querySelectorAll(".wpconsent-iframe-overlay-content.wpconsent-content-hidden").forEach(function(e){e.classList.remove("wpconsent-content-hidden")}),window.dispatchEvent(new CustomEvent("wpconsent_banner_initialized"))},ensureCSS:function(){if(this.cssPromise)return this.cssPromise;const e=document.getElementById("wpconsent-container");return this.cssPromise=this.loadExternalCSS(e),this.cssPromise},revealContainer:function(e){e&&(e.style.display="block")},loadExternalCSS:function(e){return new Promise(t=>{if(this.shadowRoot&&this.shadowRoot.querySelector("link[data-wpconsent-css]"))return this.revealContainer(e),void t();if(!this.shadowRoot)return void t();const n=`${wpconsent.css_url}?ver=${wpconsent.css_version}`;let o=!1;const s=()=>{o||(o=!0,t())},c=t=>{let o=null;const r=document.createElement("link");r.rel="stylesheet",r.href=1===t?n:`${n}&wpcretry=${t}`,r.setAttribute("data-wpconsent-css","");const i=()=>{o&&(clearTimeout(o),o=null),r.onload=null,r.onerror=null},a=o=>{i(),r.parentNode&&r.parentNode.removeChild(r),t<2&&!o?c(t+1):(this.applyCSSFallback(e,n),s())};r.onload=()=>{i(),this.revealContainer(e),s()},r.onerror=()=>a(!1),o=setTimeout(()=>a(!0),5e3);try{this.shadowRoot.appendChild(r)}catch(e){console.error("WPConsent: failed to inject stylesheet link:",e),a()}};c(1)})},applyCSSFallback:function(e,t){if(this.shadowRoot&&!this.shadowRoot.querySelector("style[data-wpconsent-css-fallback]")){const e=document.createElement("style");e.setAttribute("data-wpconsent-css-fallback",""),e.textContent="\n#wpconsent-banner-holder {\n\tdisplay: none;\n\tposition: fixed;\n\tleft: 0;\n\tright: 0;\n\tbottom: 0;\n\tz-index: var(--wpconsent-z-index, 900000);\n}\n#wpconsent-banner-holder.wpconsent-banner-visible {\n\tdisplay: block;\n}\n#wpconsent-banner-holder .wpconsent-banner {\n\tbox-sizing: border-box;\n\tmargin: 10px;\n\tpadding: var(--wpconsent-padding, 15px 20px);\n\tbackground: var(--wpconsent-background, #ffffff);\n\tcolor: var(--wpconsent-text, #1a1a1a);\n\tborder-radius: 10px;\n\tbox-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);\n\tfont-size: var(--wpconsent-font-size, 14px);\n\tline-height: 1.4;\n}\n#wpconsent-banner-holder .wpconsent-banner-footer {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 8px;\n\tmargin-top: 12px;\n}\n#wpconsent-banner-holder button,\n#wpconsent-preferences-modal button {\n\tcursor: pointer;\n\tpadding: 8px 16px;\n\tborder: 1px solid rgba(0, 0, 0, 0.2);\n\tborder-radius: 4px;\n\tfont-size: inherit;\n}\n#wpconsent-banner-holder .wpconsent-accept-all,\n#wpconsent-preferences-modal .wpconsent-accept-all {\n\tbackground: var(--wpconsent-accept-bg, #2563eb);\n\tcolor: var(--wpconsent-accept-color, #ffffff);\n\tborder-color: transparent;\n}\n#wpconsent-banner-holder .wpconsent-cancel-cookies,\n#wpconsent-preferences-modal .wpconsent-cancel-cookies {\n\tbackground: var(--wpconsent-cancel-bg, #f3f4f6);\n\tcolor: var(--wpconsent-cancel-color, #1a1a1a);\n}\n#wpconsent-preferences-modal {\n\tposition: fixed;\n\ttop: 0;\n\tleft: 0;\n\twidth: 100%;\n\theight: 100%;\n\tbackground-color: rgba(0, 0, 0, 0.5);\n\tz-index: 10202020;\n\talign-items: center;\n\tjustify-content: center;\n}\n#wpconsent-preferences-modal .wpconsent-preferences-content {\n\tbox-sizing: border-box;\n\twidth: 800px;\n\tmax-width: 90%;\n\tmax-height: 90vh;\n\tmargin: auto;\n\tpadding: 20px;\n\toverflow: auto;\n\tbackground: var(--wpconsent-background, #ffffff);\n\tcolor: var(--wpconsent-text, #1a1a1a);\n\tborder-radius: 10px;\n\tbox-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);\n}\n#wpconsent-consent-floating {\n\tdisplay: none;\n\tposition: fixed;\n\tbottom: 20px;\n\tleft: 20px;\n\tz-index: 9999;\n\tcursor: pointer;\n}\n#wpconsent-gpc-toast {\n\tposition: fixed;\n\tbottom: 20px;\n\tright: 20px;\n\tmax-width: 280px;\n\tpadding: 10px 14px;\n\tz-index: calc(var(--wpconsent-z-index, 900000) + 1);\n\tbackground: var(--wpconsent-background, #ffffff);\n\tcolor: var(--wpconsent-text, #1a1a1a);\n\tborder-radius: 8px;\n\tbox-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n}\n",this.shadowRoot.appendChild(e)}this.revealContainer(e),console.error(`WPConsent: failed to load styles from ${t}; showing the consent UI with fallback styling.`),window.dispatchEvent(new CustomEvent("wpconsent_css_failed",{detail:{url:t}}))},initializeEventListeners:function(){this.shadowRoot.querySelectorAll(".wpconsent-accept-all").forEach(e=>e.addEventListener("click",()=>this.acceptAll())),this.shadowRoot.querySelectorAll(".wpconsent-cancel-cookies").forEach(e=>e.addEventListener("click",()=>{const e={};wpconsent.slugs.forEach(t=>{const n=this.shadowRoot.querySelector(`#wpconsent-preferences-modal input[type="checkbox"][id="cookie-service-${t}"]`);n&&n.disabled?e[t]=!0:e[t]=!1}),e.essential=!0,this.savePreferences(e)})),this.shadowRoot.querySelector("#wpconsent-banner-close")?.addEventListener("click",()=>this.hideBanner()),this.shadowRoot.querySelector("#wpconsent-preferences-all")?.addEventListener("click",()=>this.showPreferences());const e=this.shadowRoot.querySelector("#wpconsent-consent-floating");e&&e.addEventListener("click",()=>this.showPreferences()),this.initializeCheckboxListeners(),document.addEventListener("click",e=>{const t=e.target.closest(".wpconsent-iframe-accept-button");if(t){const e=t.getAttribute("data-category"),n=t.closest(".wpconsent-iframe-placeholder"),o=n?.getAttribute("data-wpconsent-name");if(e){let t={};try{t=JSON.parse(this.getCookie("wpconsent_preferences")||"{}")}catch(e){console.error("Failed to parse wpconsent_preferences cookie:",e)}const n=!0===navigator.globalPrivacyControl,s=!0===t.respect_gpc;if(wpconsent.respect_gpc&&n&&s)this.showPreferences().then(()=>{const t=this.shadowRoot.querySelector(`#cookie-category-${e}`);if(t&&(t.checked=!0),o){const e=this.shadowRoot.querySelector(`#cookie-service-${o}`);e&&(e.checked=!0)}const n=this.shadowRoot.querySelector("#wpconsent-gpc-override-container");n&&(n.style.display="block"),this.highlightGPCOverride()});else{const n={...t,essential:!0,[e]:!0};o&&(n[o]=!0),this.savePreferences(n)}}}}),document.addEventListener("click",e=>{e.target.closest(".wpconsent-open-preferences")&&(e.preventDefault(),this.showPreferences())}),this.shadowRoot.querySelector(".wpconsent-preferences-header-close")?.addEventListener("click",()=>this.closePreferences()),this.shadowRoot.querySelector(".wpconsent-save-preferences")?.addEventListener("click",()=>{const e=this.shadowRoot.querySelectorAll('#wpconsent-preferences-modal input[type="checkbox"]'),t=Array.from(e).filter(e=>e.checked).map(e=>e.value),n={};wpconsent.slugs.forEach(e=>{n[e]=t.includes(e)}),n.essential=!0,this.savePreferences(n)}),this.shadowRoot.querySelector(".wpconsent-close-preferences")?.addEventListener("click",()=>this.closePreferences()),window.addEventListener("wpconsent_consent_saved",function(e){if("function"!=typeof window.clarity)return;const t=e.detail;window.clarity("consentv2",{ad_Storage:t.marketing?"granted":"denied",analytics_Storage:t.statistics?"granted":"denied"})})},localGtag:function(){window.dataLayer=window.dataLayer||[],function(){dataLayer.push(arguments)}.apply(window,arguments)},initializeCheckboxListeners:function(){this.shadowRoot.querySelectorAll('#wpconsent-preferences-modal input[type="checkbox"][id^="cookie-category-"]').forEach(e=>{e.addEventListener("change",e=>{this.handleCategoryCheckboxChange(e.target)})}),this.shadowRoot.querySelectorAll('#wpconsent-preferences-modal input[type="checkbox"][id^="cookie-service-"]').forEach(e=>{e.addEventListener("change",e=>{this.handleServiceCheckboxChange(e.target)})})},handleCategoryCheckboxChange:function(e){const t=e.id.replace("cookie-category-","");this.shadowRoot.querySelectorAll('#wpconsent-preferences-modal input[type="checkbox"][id^="cookie-service-"]').forEach(n=>{n.closest(`.wpconsent-cookie-category-${t}`)&&(n.checked=e.checked)})},handleServiceCheckboxChange:function(e){const t=e.closest(".wpconsent-cookie-category");if(!t)return;const n=t.querySelector('input[type="checkbox"][id^="cookie-category-"]');if(!n)return;const o=t.querySelectorAll('input[type="checkbox"][id^="cookie-service-"]');let s=!1;o.forEach(e=>{e.checked&&(s=!0)}),n.checked=s},initializeAccordions(){this.shadowRoot.querySelectorAll(".wpconsent-preferences-accordion-item").forEach(e=>{const t=e.querySelector(".wpconsent-preferences-accordion-header"),n=e.querySelector(".wpconsent-preferences-accordion-content");t&&n&&t.addEventListener("click",t=>{t.target.closest(".wpconsent-preferences-checkbox-toggle")||this.toggleAccordion(e,n)})})},toggleAccordion(e,t){e.classList.contains("active");const n=e.parentElement,o=e.classList.contains("wpconsent-cookie-service"),s=e.classList.contains("wpconsent-cookie-category");s?n&&n.querySelectorAll(":scope > .wpconsent-preferences-accordion-item.wpconsent-cookie-category").forEach(t=>{if(t!==e){t.classList.remove("active");const e=t.querySelector(".wpconsent-preferences-accordion-toggle");e&&e.setAttribute("aria-expanded","false"),t.querySelectorAll(".wpconsent-cookie-service").forEach(e=>{e.classList.remove("active");const t=e.querySelector(".wpconsent-preferences-accordion-toggle");t&&t.setAttribute("aria-expanded","false"),this.runHooks("accordionToggled",{accordion:e,content:e.querySelector(".wpconsent-preferences-accordion-content"),isActive:!1,isService:!0,isCategory:!1})})}}):o&&n&&n.querySelectorAll(":scope > .wpconsent-preferences-accordion-item.wpconsent-cookie-service").forEach(t=>{if(t!==e){t.classList.remove("active");const e=t.querySelector(".wpconsent-preferences-accordion-toggle");e&&e.setAttribute("aria-expanded","false"),this.runHooks("accordionToggled",{accordion:t,content:t.querySelector(".wpconsent-preferences-accordion-content"),isActive:!1,isService:!0,isCategory:!1})}}),e.classList.toggle("active");const c=e.querySelector(".wpconsent-preferences-accordion-toggle");if(c){const t=e.classList.contains("active");c.setAttribute("aria-expanded",t?"true":"false")}const r=e.classList.contains("active");this.runHooks("accordionToggled",{accordion:e,content:t,isActive:r,isService:o,isCategory:s})},initializeKeyboardHandlers:function(){document.addEventListener("keydown",e=>{"Tab"===e.key?this.handleTabKey(e):"Escape"===e.key&&this.handleEscapeKey(e)})},handleEscapeKey:function(e){const t=this.shadowRoot?.querySelector("#wpconsent-preferences-modal"),n=this.shadowRoot?.querySelector("#wpconsent-banner-holder");t&&"flex"===t.style.display?this.closePreferences():n&&n.classList.contains("wpconsent-banner-visible")&&this.hideBanner()},handleTabKey:function(e){const t=this.shadowRoot?.querySelector("#wpconsent-banner-holder"),n=this.shadowRoot?.querySelector("#wpconsent-preferences-modal"),o=t&&t.classList.contains("wpconsent-banner-visible"),s=n&&"flex"===n.style.display;if(!o&&!s)return;const c=s?n:t,r=this.getFocusableElements(c);if(0===r.length)return;e.preventDefault();const i=r[0],a=r[r.length-1];let l;this.lastFocusedElement&&r.includes(this.lastFocusedElement)?l=this.lastFocusedElement:(l=i,this.lastFocusedElement=l);const d=r.indexOf(l);let p;p=e.shiftKey?d<=0?a:r[d-1]:d>=r.length-1?i:r[d+1],p.focus({preventScroll:!0}),this.lastFocusedElement=p},setupFocusTrap:function(e){this.previouslyFocusedElement=document.activeElement,this.lastFocusedElement=null},removeFocusTrap:function(){this.lastFocusedElement=null},setInitialFocus:function(e){const t=this.getFocusableElements(e);t.length>0&&setTimeout(()=>{t[0].focus({preventScroll:!0}),this.lastFocusedElement=t[0]},100)},getFocusableElements:function(e){return Array.from(e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(t=>{let n=t;for(;n&&n!==e;){const e=window.getComputedStyle(n);if("none"===e.display||"hidden"===e.visibility||"0"===e.opacity||n.disabled||"true"===n.getAttribute("aria-hidden"))return!1;n=n.parentElement}return!0})},isElementInContainer:function(e,t){return!(!e||!t)&&(t.shadowRoot?t.shadowRoot.contains(e):t.contains(e))},clearCookies:function(){for(var e=document.cookie.split("; "),t=0;t<e.length;t++)for(var n=window.location.hostname.split(".");n.length>0;){var o=encodeURIComponent(e[t].split(";")[0].split("=")[0])+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain="+n.join(".")+" ;path=",s=location.pathname.split("/");for(document.cookie=o+"/";s.length>0;)document.cookie=o+s.join("/"),s.pop();n.shift()}},initWordPress:function(){window.wp_consent_type=wpconsent.consent_type;let e=new CustomEvent("wp_consent_type_defined");document.dispatchEvent(e)},showFloatingButtonIfEnabled:function(){wpconsent.enable_consent_floating&&this.ensureCSS().then(()=>{const e=this.shadowRoot?.querySelector("#wpconsent-consent-floating");e&&(e.style.display="block")})},updateButtonVisibility:function(e){this.shadowRoot&&["accept","cancel","preferences"].forEach(t=>{const n=this.shadowRoot.querySelector(`#wpconsent-${t}-all`);n&&(e[`${t}_button_enabled`]?(n.classList.remove("wpconsent-button-disabled"),n.removeAttribute("data-disabled")):(n.classList.add("wpconsent-button-disabled"),n.setAttribute("data-disabled","true")))})},updateWordPressConsent:function(e){"function"==typeof wp_set_consent&&(wp_set_consent("functional","allow"),wp_set_consent("preferences","allow"),wp_set_consent("statistics",e.statistics?"allow":"deny"),wp_set_consent("statistics-anonymous",e.statistics?"allow":"deny"),wp_set_consent("marketing",e.marketing?"allow":"deny"))}},document.addEventListener("DOMContentLoaded",()=>WPConsent.init())}},t={};function n(o){var s=t[o];if(void 0!==s)return s.exports;var c=t[o]={exports:{}};return e[o](c,c.exports,n),c.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";n(799)})()})();
jQuery(document)
.ready(function($){
$(".primary-navigation").append('<div id="mobile-menu-overlay" />');
$(".toggle-mobile-menu").on("click focus", function(e){
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
clearTimeout(awaitMenu);
awaitMenu=setTimeout(function(){
toggleMobileMenu();
}, 200);
});
$("#accessibility-close-mobile-menu").focusin(e=> {
jQuery("body").removeClass("mobile-menu-active");
jQuery("html").removeClass("noscroll");
jQuery("#mobile-menu-overlay").fadeOut();
});
var awaitMenu;
function toggleMobileMenu(){
$("body").toggleClass("mobile-menu-active");
if($("body").hasClass("mobile-menu-active")){
if($(document).height() > $(window).height()){
var scrollTop=$("html").scrollTop()
? $("html").scrollTop()
: $("body").scrollTop();
$("html")
.addClass("noscroll")
.css("top", -scrollTop);
}
$("#mobile-menu-overlay").fadeIn();
}else{
var scrollTop=parseInt($("html").css("top"));
$("html").removeClass("noscroll");
$("html,body").scrollTop(-scrollTop);
$("#mobile-menu-overlay").fadeOut();
}}
})
.on("click", function(event){
var $target=jQuery(event.target);
if(($target.hasClass("customizable-icon") &&
$target.parent().hasClass("toggle-caret")) ||
$target.hasClass("toggle-caret")
){
return;
}
jQuery("body").removeClass("mobile-menu-active");
jQuery("html").removeClass("noscroll");
jQuery("#mobile-menu-overlay").fadeOut();
});
jQuery(document).ready(function($){
$(".widget_nav_menu, #navigation .menu").addClass("toggle-menu");
$(".toggle-menu ul.sub-menu, .toggle-menu ul.children").addClass("toggle-submenu"
);
$(".toggle-menu ul.sub-menu")
.parent()
.addClass("toggle-menu-item-parent");
$(".toggle-menu .toggle-menu-item-parent").append('<span class="toggle-caret"><i class="customizable-icon icon-plus"></i></span>'
);
$(".toggle-caret").click(function(e){
e.preventDefault();
$(this)
.parent()
.toggleClass("active")
.children(".toggle-submenu")
.slideToggle("fast");
});
});
jQuery(document).ready(function($){
jQuery('a[href="#top"]').click(function(){
jQuery("html, body").animate({ scrollTop: 0 }, "slow");
return false;
});
});
!function(){function t(){var t,e=document.createElement("script");return e.src=_zxcvbnSettings.src,e.type="text/javascript",e.async=!0,(t=document.getElementsByTagName("script")[0]).parentNode.insertBefore(e,t)}null!=window.attachEvent?window.attachEvent("onload",t):window.addEventListener("load",t,!1)}.call(this);