window._ASP_load=function(){let e=WPD.dom;window.ASP.instances={instances:[],get:function(a,b){this.clean();if("undefined"===typeof a||0==a)return this.instances;if("undefined"===typeof b){b=[];for(var c=0;c<this.instances.length;c++)this.instances[c].o.id==a&&b.push(this.instances[c]);return 0<b.length?b:!1}for(c=0;c<this.instances.length;c++)if(this.instances[c].o.id==a&&this.instances[c].o.iid==b)return this.instances[c];return!1},set:function(a){if(this.exist(a.o.id,a.o.iid))return!1;this.instances.push(a);
return!0},exist:function(a,b){this.clean();for(let c=0;c<this.instances.length;c++)if(this.instances[c].o.id==a&&("undefined"===typeof b||this.instances[c].o.iid==b))return!0;return!1},clean:function(){let a=[],b=this;this.instances.forEach(function(c,d){0==e(".asp_m_"+c.o.rid).length&&a.push(d)});a.forEach(function(c){"undefined"!==typeof b.instances[c]&&(b.instances[c].destroy(),b.instances.splice(c,1))})},destroy:function(a,b){let c=this.get(a,b);if(!1!==c)if(Array.isArray(c))c.forEach(function(d){d.destroy()}),
this.instances=[];else{let d=0;this.instances.forEach(function(f,g){f.o.id==a&&f.o.iid==b&&(d=g)});c.destroy();this.instances.splice(d,1)}}};window.ASP.initialized=!1;window.ASP.initializeSearchByID=function(a){let b=ASP.getInstances();if("undefined"!==typeof a&&"object"!=typeof a)if("undefined"!==typeof b[a]){let c=[];c[a]=b[a];b=c}else return!1;b.forEach(function(c,d){e.fn._(".asp_m_"+d).forEach(function(f){if("undefined"!=typeof f.hasAsp)return!0;f.hasAsp=!0;return e(f).ajaxsearchpro(c)})})};window.ASP.getInstances=
function(){window.ASP_INSTANCES="undefined"!==typeof window.ASP_INSTANCES?window.ASP_INSTANCES:[];let a=window.ASP_INSTANCES;e.fn._(".asp_init_data").forEach(function(b){let c=b.dataset.aspId,d;"undefined"!=typeof b.dataset.aspdata&&(d=WPD.Base64.decode(b.dataset.aspdata));if("undefined"===typeof d||""==d)return!0;a[c]=JSON.parse(d)});return a};window.ASP.initialize=function(a){if("undefined"==typeof ASP.version)return!1;if(window.IntersectionObserver)if(ASP.script_async_load||ASP.init_only_in_viewport){a=
document.querySelectorAll(".asp_w_container, .asp_m");if(a.length){let b=new IntersectionObserver(function(c){c.forEach(function(d){d.isIntersecting&&(ASP.initializeSearchByID(d.target.dataset.id),b.unobserve(d.target))})});a.forEach(function(c){b.observe(c)})}ASP.getInstances().forEach(function(b,c){1==b.compact.enabled&&"fixed"==b.compact.position&&ASP.initializeSearchByID(c)})}else ASP.initializeSearchByID(a);else ASP.initializeSearchByID(a);ASP.initializeMutateDetector();ASP.initializeHighlight();
ASP.initializeOtherEvents();ASP.initialized=!0};window.ASP.initializeHighlight=function(){if(this.highlight.enabled){let c=this.highlight.data;var a=""!=c.selector&&0<e(c.selector).length?c.selector:"article";a=0<e(a).length?a:"body";var b=new URLSearchParams(location.search);b=b.get("s")||b.get("asp_highlight");e(a).unhighlight({className:"asp_single_highlighted_"+c.id});null!==b&&""!=b.trim()&&(e(a).highlight(b.trim().split(" "),{element:"span",className:"asp_single_highlighted_"+c.id,wordsOnly:c.whole,
excludeParents:".asp_w, .asp-try"}),a=e(".asp_single_highlighted_"+c.id),c.scroll&&0<a.length&&(a=a.offset().top-120,b=e("#wpadminbar"),0<b.length&&(a-=b.height()),a+=c.scroll_offset,a=0>a?0:a,e("html").animate({scrollTop:a},500)));return!1}};window.ASP.initializeOtherEvents=function(){let a,b=this;e("body").on("click touchend","#menu-item-search, .fa-search, .fa, .fas, .fusion-flyout-menu-toggle, .fusion-main-menu-search-open, #search_button, .mini-search.popup-search, .icon-search, .menu-item-search-dropdown, .mobile-menu-button, .td-icon-search, .tdb-search-icon, .side_menu_button, .search_button, .raven-search-form-toggle, [data-elementor-open-lightbox], .elementor-button-link, .elementor-button, i[class*=-search], a[class*=-search]",
function(){clearTimeout(a);a=setTimeout(function(){b.initializeSearchByID()},300)});if("undefined"!=typeof jQuery)jQuery(document).on("elementor/popup/show",function(){setTimeout(function(){b.initializeSearchByID()},10)})};window.ASP.initializeMutateDetector=function(){let a;"undefined"!=typeof ASP.detect_ajax&&1==ASP.detect_ajax&&(new MutationObserver(function(){clearTimeout(a);a=setTimeout(function(){ASP.initializeSearchByID()},500)})).observe(document.querySelector("body"),{subtree:!0,childList:!0})};
window.ASP.ready=function(){if("complete"===document.readyState||"loaded"===document.readyState||"interactive"===document.readyState)this.initialize();else e(document).on("DOMContentLoaded",this.initialize)};window.ASP.loadScriptStack=function(a){let b;0<a.length&&(b=document.createElement("script"),b.src=a.shift().src,b.onload=function(){0<a.length?window.ASP.loadScriptStack(a):window.ASP.ready()},document.body.appendChild(b))};window.ASP.init=function(){ASP.script_async_load?window.ASP.loadScriptStack(ASP.additional_scripts):
"undefined"!==typeof WPD.ajaxsearchpro&&window.ASP.ready()};window.WPD.intervalUntilExecute(window.ASP.init,function(){return"undefined"!=typeof window.ASP.version&&"undefined"!=e.fn.ajaxsearchpro})};(function(){-1===navigator.userAgent.indexOf("Chrome-Lighthouse")&&("undefined"!=typeof WPD&&"undefined"!=typeof WPD.dom?window._ASP_load():document.addEventListener("wpd-dom-core-loaded",window._ASP_load))})();
