File: /home/salamatk/takarzan.ir/wp-content/themes/xts-luman/js/scripts/helpers.min.js
var XTSThemeModule={};(o=>{XTSThemeModule.supports_html5_storage=!1;try{XTSThemeModule.supports_html5_storage="sessionStorage"in window&&null!==window.sessionStorage,window.sessionStorage.setItem("xts","test"),window.sessionStorage.removeItem("xts")}catch(e){XTSThemeModule.supports_html5_storage=!1}XTSThemeModule.isDesktop=function(){return 1024<XTSThemeModule.$window.width()},XTSThemeModule.isTablet=function(){return XTSThemeModule.$window.width()<=1024},XTSThemeModule.isMobile=function(){return XTSThemeModule.$window.width()<=767},XTSThemeModule.removeURLParameter=function(e,t){var n=e.split("?");if(2<=n.length){for(var o=encodeURIComponent(t)+"=",d=n[1].split(/[&;]/g),i=d.length;0<i--;)-1!==d[i].lastIndexOf(o,0)&&d.splice(i,1);return n[0]+(0<d.length?"?"+d.join("&"):"")}return e},XTSThemeModule.debounce=function(o,d,i){var r;return function(){var e=this,t=arguments,n=i&&!r;clearTimeout(r),r=setTimeout(function(){r=null,i||o.apply(e,t)},d),n&&o.apply(e,t)}},XTSThemeModule.$window=o(window),XTSThemeModule.$document=o(document),XTSThemeModule.$body=o("body"),XTSThemeModule.windowWidth=XTSThemeModule.$window.width(),XTSThemeModule.isDesktopSize=1024<XTSThemeModule.windowWidth,XTSThemeModule.isTabletSize=XTSThemeModule.windowWidth<=1024,XTSThemeModule.isMobileSize=XTSThemeModule.windowWidth<=767,XTSThemeModule.isSuperMobile=XTSThemeModule.windowWidth<=575,XTSThemeModule.xtsElementorAddAction=function(e,t){XTSThemeModule.$window.on("elementor/frontend/init",function(){elementorFrontend.isEditMode()&&elementorFrontend.hooks.addAction(e,t)})},XTSThemeModule.xtsElementorAddAction("frontend/element_ready/section",function(e){e.removeClass("xts-animated"),e.data("xts-waypoint",""),e.removeClass("xts-anim-ready"),XTSThemeModule.$document.trigger("xtsElementorSectionReady")}),XTSThemeModule.xtsElementorAddAction("frontend/element_ready/global",function(e){e.attr("style")&&0===e.attr("style").indexOf("transform:translate3d")&&!e.hasClass("xts-parallax-on-scroll")&&e.attr("style",""),e.removeClass("xts-animated"),e.data("xts-waypoint",""),e.removeClass("xts-anim-ready"),XTSThemeModule.$document.trigger("xtsElementorGlobalReady")}),o.each(["frontend/element_ready/column","frontend/element_ready/container"],function(e,t){XTSThemeModule.xtsElementorAddAction(t,function(e){e.attr("style")&&0===e.attr("style").indexOf("transform:translate3d")&&!e.hasClass("xts-parallax-on-scroll")&&e.attr("style",""),e.removeClass("xts-animated"),e.data("xts-waypoint",""),e.removeClass("xts-anim-ready"),XTSThemeModule.$document.trigger("xtsElementorColumnReady")})}),XTSThemeModule.$window.on("elementor/frontend/init",function(){elementorFrontend.isEditMode()&&"enabled"===xts_settings.elementor_no_gap&&(o.each(["frontend/element_ready/section","frontend/element_ready/container"],function(e,t){elementorFrontend.hooks.addAction(t,function(e){var t=e.data("model-cid"),n="";void 0!==elementorFrontend.config.elements.data[t]&&("container"===elementorFrontend.config.elements.data[t].attributes.elType?n=elementorFrontend.config.elements.data[t].attributes.boxed_width.size:"section"===elementorFrontend.config.elements.data[t].attributes.elType&&(n=elementorFrontend.config.elements.data[t].attributes.content_width.size),n||e.addClass("xts-negative-gap"))})}),elementor.channels.editor.on("change:section change:container",function(e){var t,n=e.elementSettingsModel.changed;void 0===n.content_width&&void 0===n.boxed_width||(t=[],void 0!==n.content_width?t=n.content_width.size:void 0!==n.boxed_width&&(t=n.boxed_width.size),n=e._parent.model.id,e=o(".elementor-element-"+n),t?e.removeClass("xts-negative-gap"):e.addClass("xts-negative-gap"))}))})})(jQuery),window.addEventListener("load",function(){var e=["keydown","scroll","mouseover","touchmove","touchstart","mousedown","mousemove"],t=function(e){XTSThemeModule.$window.trigger("xtsEventStarted"),n()},n=function(){e.forEach(function(e){window.removeEventListener(e,t)})};e.forEach(function(e){window.addEventListener(e,t)})});