!function(e){"use strict";e(".close-btn").click(function(){if(e(".custom-model-main").length>0){e(".custom-model-main").removeClass("model-open");const t=e(".pop-up-content-wrap iframe");t.attr("src","");const n=t.clone();t.replaceWith(n)}}),document.addEventListener("DOMContentLoaded",()=>{const e=document.getElementById("video-ss");function t(){const e=document.querySelector(".playButton");e&&e.remove()}function n(){e.paused||e.pause()}function o(){e.paused&&e.play().catch(e=>{console.error("Failed to play video:",e)})}e&&(e&&e.play().catch(n=>{e.muted=!0,e.play().catch(n=>{const o=document.createElement("button");o.className="playButton",o.textContent="Play Video",o.style.position="absolute",o.style.top="50%",o.style.left="50%",o.style.transform="translate(-50%, -50%)",o.style.zIndex="1000",o.addEventListener("click",()=>{e.play(),t()});const c=document.querySelector(".home-media-banner__content-section");c?c.appendChild(o):(console.error('Element with class "home-media-banner__content-section" not found'),document.body.appendChild(o))})}),document.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState?n():"visible"===document.visibilityState&&o()}),window.addEventListener("blur",()=>{n()}),window.addEventListener("focus",()=>{o()}),e.addEventListener("play",t))})}(jQuery);; (()=>{function t(){var t=jQuery(".load-more-button-insights"),e=t.find(".spinner"),i=t.find(".button-text");e.addClass("d-none"),i.text("Load More"),t.prop("disabled",!1)}!function(e){"use strict";function i(i,n){i.find(".insights-results-main").addClass("insight-loading");let s=i.attr("data-settings"),a=e.map(e('input[name="type"]:checked'),function(t){return t.value}),o=e.map(e('input[name="service"]:checked'),function(t){return t.value}),l=e.map(e('input[name="industry"]:checked'),function(t){return t.value});jQuery.ajax({type:"POST",dataType:"json",data:{action:"insight_posts_list",insight_settings:s,insight_tax_type:a,insight_tax_service:o,insight_tax_industry:l,paged:n,ajax_nonce:siteConfig.ajax_nonce},url:siteConfig.ajaxUrl,success:function(e){let n=e.data.result_post,s=e.data.total_result;if(n){t(),i.find(".sutherland-insights-pagination").remove(),i.find(".insights-filter-results span").text(s);const e=jQuery.parseHTML(n);i.find(".insights-results-main").append(e),r(),i.find(".insights-results-main").removeClass("insight-loading")}else t(),i.find(".sutherland-insights-pagination").remove(),i.find(".insights-results-main").removeClass("insight-loading")}})}function n(i){i.find(".insights-results-main").addClass("insight-loading");let n=i.attr("data-settings"),s=e.map(e('input[name="type"]:checked'),function(t){return t.value}),a=e.map(e('input[name="service"]:checked'),function(t){return t.value}),o=e.map(e('input[name="industry"]:checked'),function(t){return t.value});jQuery.ajax({type:"POST",dataType:"json",data:{action:"insight_posts_list_with_filter",insight_settings:n,insight_tax_type:s,insight_tax_service:a,insight_tax_industry:o,paged:1,ajax_nonce:siteConfig.ajax_nonce},url:siteConfig.ajaxUrl,success:function(e){let n=e.data.result_post,s=e.data.filter_post,a=e.data.total_result_count;n?(i.find(".insights-filter-tag").html(s),i.find(".insights-results-main").html(n),i.find(".insights-filter-results").html(a),r(),i.find(".insights-results-main").removeClass("insight-loading"),t()):(t(),i.find(".sutherland-insights-pagination").remove(),i.find(".insights-results-main").removeClass("insight-loading"))}})}function s(){var t=e(".category-filter-wrapper");e.each(t,function(t,i){var n=!0,s=e(i).find(".ckkBox"),a=e(i).find(".checkboxes").attr("id"),r="";if(e.each(s,function(t,s){var o=e(i).find("button");if(1==e(s).prop("checked")){var l=e(s).next().html(),c=r+l,d=e(i).find("input.val:checkbox:checked").length;d>=2&&(c=d+" "+a+" selected"),e(o).text(c.replace(/&/g,"&")),r=c+", ",n=!1}}),!0===n){var o=e(i).find("button");e(o).text(o.attr("data-label"))}})}function a(t){e(t).closest(".category-filter-wrapper").find(".apply-selection").fadeIn("slow"),e(t).closest(".checkboxes").find(".val");var i=e(t).closest(".checkboxes").find(".all"),n=e(t).closest(".checkboxes").find(".ckkBox"),s=e(t).is(":checked");e(t).hasClass("all")&&n.prop("checked",s),s?n.length===n.filter(":checked").length&&i.prop("checked",!0):i.prop("checked",!1)}function r(){let t=!!e("body").hasClass("rtl");e(".popular-insights-section-slider").slick({centerMode:!0,centerPadding:"250px",focusOnSelect:!0,slidesToShow:1,slidesToScroll:1,dots:!1,infinite:!0,rtl:t,prevArrow:e(".popular-insights-section .prev"),nextArrow:e(".popular-insights-section .next"),responsive:[{breakpoint:1599,settings:{centerPadding:"150px"}},{breakpoint:1399,settings:{centerPadding:"110px"}},{breakpoint:991,settings:{centerPadding:"80px"}},{breakpoint:768,settings:{dots:!0,arrow:!1,prevArrow:"",nextArrow:"",centerPadding:"40px"}}]}).on("beforeChange",function(t,{slideCount:i},n,s){let a=[s,s-i,s+i].map(t=>`[data-slick-index="${t}"]`).join(", ");e(".popular-insights-section-slider .slick-now").removeClass("slick-now"),e(".popular-insights-section-slider").find(a).addClass("slick-now")})}if(e(document).ready(function(){function t(){var t={},i={};e('.category-filter-wrapper input[type="checkbox"]').each(function(e){this.checked&&(t.hasOwnProperty(this.name)||(t[this.name]=[]),t[this.name].push(this.getAttribute("data-slug")))}),e.each(t,function(t,e){i[t]=e.join(",")}),history.pushState&&(jQuery.isEmptyObject(i)?history.pushState(null,null,window.location.href.split("?")[0]):history.pushState(null,null,"?"+decodeURIComponent(e.param(i))))}e('.category-filter-wrapper input[type="checkbox"]').on("change",function(t){var i={},n={};e('.category-filter-wrapper input[type="checkbox"]').each(function(t){this.checked&&(i.hasOwnProperty(this.name)||(i[this.name]=[]),i[this.name].push(this.getAttribute("data-slug")))}),e.each(i,function(t,e){n[t]=e.join(",")}),history.pushState&&(jQuery.isEmptyObject(n)?history.pushState(null,null,window.location.href.split("?")[0]):history.pushState(null,null,"?"+decodeURIComponent(e.param(n))))}),r(),s(),e(document).on("click",".toggle-next",function(){e(this).parents(".category-filter-wrapper").siblings(".category-filter-wrapper").find(".form-control.toggle-next").removeClass("open"),e(this).parents(".category-filter-wrapper").siblings(".category-filter-wrapper").find(".checkboxes").hide(),e(this).next(".checkboxes").slideToggle(400),e(this).toggleClass("open")}),e(document).on("change",".ckkBox",function(){var t=e(this).parents(".insights-filter-main");a(this),n(t),s()}),e(document).on("change",".all",function(){var i=e(this).parents(".insights-filter-main");a(this),n(i),s(),t()}),e(document).on("click",".sutherland-insights-pagination .load-more-button-insights",function(){var t=jQuery(this),e=t.find(".spinner"),n=t.find(".button-text");e.removeClass("d-none"),n.text("Load More"),t.prop("disabled",!0),i(t.parents(".insights-filter-main"),t.attr("data-paged"))}),jQuery(document).on("click",".insights-filter-selected-tags .show-all-hidden-items-btn",function(){jQuery(".insights-filter-selected-tags li").removeClass("hidden").addClass("show"),jQuery(this).addClass("hidden")}),e(document).on("click",".filter-tag.is-closeable span, .filter-tag.is-closeable svg",function(){var n=e(this).parents(".insights-filter-main"),r=e(this).parents(".filter-tag").attr("data-tax_id"),o=e(document).find("[value="+r+"]"),l=e(".sutherland-insights-pagination").find(".page-numbers.current").text();e(document).find("[value="+r+"]").prop("checked",!1),i(n,l),s(),t(),a(o),jQuery(this).closest("li").addClass("hidden").removeClass("show")}),e(document).on("click",function(t){e(t.target).parents(".category-filter-wrapper").length<=0&&(e(".category-filter-wrapper .form-control.toggle-next").removeClass("open"),e(".category-filter-wrapper .checkboxes").hide())}),e(document).on("click",".insights-filter-tag .clear-all-btn",function(){var i=e(this).parents(".insights-filter-main");i.find("input:checkbox").prop("checked",!1),n(i),s(),t()})}),jQuery(".insights-block-row").length>0){let t=!!jQuery("body").hasClass("rtl");jQuery(".insights-block-row").not(".slick-initialized").slick({slidesToShow:1,slidesToScroll:1,dots:!0,centerPadding:"60px",autoplay:!0,autoplaySpeed:2e3,rtl:t,mobileFirst:!0,responsive:[{breakpoint:767,settings:"unslick"}]})}if(jQuery(".related-insights-row").length>0){let t=!!jQuery("body").hasClass("rtl");jQuery(".related-insights-row").not(".slick-initialized").slick({slidesToShow:1,slidesToScroll:1,dots:!0,centerPadding:"60px",autoplay:!0,autoplaySpeed:2e3,mobileFirst:!0,rtl:t,responsive:[{breakpoint:767,settings:"unslick"}]})}}(jQuery)})();;