!function(){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(e){var o=function(e){if("object"!=t(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,"string");if("object"!=t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(o)?o:o+""}function o(t,o){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:1e3/60,n=arguments.length>2?arguments[2]:void 0,r=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(t){return setTimeout(t,o)},i=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelAnimationFrame||window.msCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||function(t){clearTimeout(t)};return function(){var o=this,s=arguments,c=n&&!e;i.call(window,e),e=r.call(window,(function(){e=null,n||t.apply(o,s)})),c&&t.apply(o,s)}}var r,i,s,c=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.initialize()}return e=t,r=[{key:"initialize",value:function(){var t=document.querySelector(".custom-cursor__outer"),e=document.querySelector(".custom-cursor__inner");t||e||(this.outerCursor=document.createElement("div"),this.outerCursor.classList.add("custom-cursor__outer"),this.outerCursor.classList.add("custom-cursor"),this.innerCursor=document.createElement("div"),this.innerCursor.classList.add("custom-cursor__inner"),this.innerCursor.classList.add("custom-cursor"),this.clientX=-100,this.clientY=-100)}},{key:"init",value:function(){if(!t.initStatus){t.initStatus=!0;var e=this;e.supportsPassive=!1;try{var o=Object.defineProperty({},"passive",{get:function(){e.supportsPassive=!0}});"createEvent"in document?window.addEventListener("test",null,o):"fireEvent"in document&&window.attachEvent("test",null)}catch(t){}e.passiveOption=!!e.supportsPassive&&{passive:!0},e.initCursor(),e.initActive(),elementorFrontend.isEditMode()&&e.backendActive()}}},{key:"getSettings",value:function(t){var e,o="profecient_custom_cursor_";if(void 0!==t)if(null!==(e=elementorFrontend)&&void 0!==e&&e.isEditMode()&&"undefined"!=typeof elementor){var n;if(null!==(n=elementor)&&void 0!==n&&null!==(n=n.panel)&&void 0!==n&&null!==(n=n.currentView)&&void 0!==n&&null!==(n=n.currentPageView)&&void 0!==n&&n.content){var r;if("yes"===(null===(r=elementor)||void 0===r||null===(r=r.settings)||void 0===r||null===(r=r.page)||void 0===r||null===(r=r.model)||void 0===r||null===(r=r.attributes)||void 0===r?void 0:r[o+"toggle"]))return elementor.settings.page.model.attributes[o+t]}else{var i,s;if("yes"===(null===(i=elementor)||void 0===i||null===(i=i.settings)||void 0===i||null===(i=i.page)||void 0===i||null===(i=i.model)||void 0===i||null===(i=i.attributes)||void 0===i?void 0:i[o+"toggle"]))return elementor.settings.page.model.attributes[o+t];if("yes"===(null===(s=elementorFrontendConfig)||void 0===s||null===(s=s.kit)||void 0===s?void 0:s[o+"toggle"]))return elementorFrontendConfig.kit[o+t]}}else{var c,a;if("yes"===(null===(c=elementorFrontendConfig)||void 0===c||null===(c=c.settings)||void 0===c||null===(c=c.page)||void 0===c?void 0:c[o+"toggle"]))return elementorFrontendConfig.settings.page[o+t];if("yes"===(null===(a=elementorFrontendConfig)||void 0===a||null===(a=a.kit)||void 0===a?void 0:a[o+"toggle"]))return elementorFrontendConfig.kit[o+t]}return!1}},{key:"parseTypography",value:function(t){var e=this,o=[];return["font_family","font_size","font_weight","text_transform","font_style","text_decoration","line_height","letter_spacing","word_spacing"].forEach((function(n){if(["font_size","line_height","letter_spacing","word_spacing"].includes(n)){var r=e.getSettings(t+"_typography_content_typography_"+n,!0);o[n]=r&&""!==r.size?r.size+r.unit:void 0}else o[n]=e.getSettings(t+"_typography_content_typography_"+n)})),o}},{key:"parseBackdropFilter",value:function(t){var e=this,o=[];return["blur","brightness","contrast","grayscale","hue_rotate","opacity","sepia","saturate"].forEach((function(n){if("blur"===n){var r=e.getSettings(t+"_backdrop_filter_"+n);o[n]=r&&""!==r.size?r.size+r.unit:void 0}else if("hue_rotate"===n){var i=e.getSettings(t+"_backdrop_filter_"+n);o[n]=i&&""!==i.size?i.size+"deg":void 0}else{var s=e.getSettings(t+"_backdrop_filter_"+n);o[n]=s&&""!==s.size?s.size:void 0}})),o}},{key:"initActive",value:function(){var t=this;t.hoverState={inner:{},outer:{}},t.getSettings("toggle")&&"yes"===t.getSettings("toggle")&&(t.outerCursor.classList.add("is-active"),t.innerCursor.classList.add("is-active"),t.outerCursor.classList.add("custom-cursor__outer--global"),t.innerCursor.classList.add("custom-cursor__inner--global"),["outer","inner"].forEach((function(e){t.hoverState[e].global={background:t.parseBgColorData({type:t.getSettings("".concat(e,"_type")),color:t.getSettings("".concat(e,"_color"))}),blend:t.getSettings("".concat(e,"_blend")),border:t.parseBorderData({type:t.getSettings("".concat(e,"_type")),width:t.getSettings("".concat(e,"_border_width")),color:t.getSettings("".concat(e,"_color"))}),size:t.parseSliderData(t.getSettings("".concat(e,"_size"))),text:t.getSettings("".concat(e,"_text")),typography:t.parseTypography(e),text_color:t.getSettings("".concat(e,"_text_color")),backdrop_filter:t.parseBackdropFilter(e)}})))}},{key:"backendActive",value:function(){var t=this;elementorFrontend.isEditMode()&&"undefined"!=typeof elementor&&elementor.settings.page.model.on("change",(function(e){t.refreshBackend(e)}))}},{key:"refreshBackend",value:function(t){if(t){var e=this;Object.keys(t.changed).some((function(t){return t.includes("profecient_custom_cursor_")}))&&n((function(){e.getSettings("toggle")&&"yes"===e.getSettings("toggle")?(e.outerCursor.classList.add("is-active"),e.innerCursor.classList.add("is-active"),e.outerCursor.classList.add("custom-cursor__outer--global"),e.innerCursor.classList.add("custom-cursor__inner--global"),["outer","inner"].forEach((function(t){e.hoverState[t].global={background:e.parseBgColorData({type:e.getSettings("".concat(t,"_type")),color:e.getSettings("".concat(t,"_color"))}),blend:e.getSettings("".concat(t,"_blend")),border:e.parseBorderData({type:e.getSettings("".concat(t,"_type")),width:e.getSettings("".concat(t,"_border_width")),color:e.getSettings("".concat(t,"_color"))}),size:e.parseSliderData(e.getSettings("".concat(t,"_size"))),text:e.getSettings("".concat(t,"_text")),typography:e.parseTypography(t),text_color:e.getSettings("".concat(t,"_text_color")),backdrop_filter:e.parseBackdropFilter(t)},e.updateStyles(t,e.hoverState[t].global),n((function(){"inner"===t?(e.innerCursorToX(e.clientX),e.innerCursorToY(e.clientY)):(e.outerCursorToX(e.clientX),e.outerCursorToY(e.clientY))}))()}))):(e.outerCursor.classList.remove("is-active"),e.innerCursor.classList.remove("is-active"),e.outerCursor.classList.remove("custom-cursor__outer--global"),e.innerCursor.classList.remove("custom-cursor__inner--global"))}))()}}},{key:"parseBgColorData",value:function(t){return"none"!=t.type?null:t.color}},{key:"parseBorderData",value:function(t){if("none"!=t.type&&t.type){var e=t.type.replace("border-","");return"".concat(this.parseSliderData(t.width)," ").concat(e," ").concat(t.color)}return"none"}},{key:"parseSliderData",value:function(t){return"".concat(t.size).concat(t.unit)}},{key:"resetStyles",value:function(){var t=this;t.getSettings("toggle")&&["outer","inner"].forEach((function(e){var o={background:t.parseBgColorData({type:t.getSettings("".concat(e,"_type"))?t.getSettings("".concat(e,"_type")):"inner"===customCursor?"none":"solid",color:t.getSettings("".concat(e,"_color"))?t.getSettings("".concat(e,"_color")):"#FFFFFF"}),blend:t.getSettings("".concat(e,"_blend"))?t.getSettings("".concat(e,"_blend")):"difference",border:t.parseBorderData({type:t.getSettings("".concat(e,"_type"))?t.getSettings("".concat(e,"_type")):"inner"===customCursor?"none":"solid",width:t.getSettings("".concat(e,"_border_width"))?t.getSettings("".concat(e,"_border_width")):{size:1,unit:"px"},color:t.getSettings("".concat(e,"_color"))?t.getSettings("".concat(e,"_color")):"#FFFFFF"}),size:t.getSettings("".concat(e,"_size"))?t.getSettings("".concat(e,"_size")):"inner"===customCursor?{size:15,unit:"px"}:{size:40,unit:"px"},text:t.getSettings("".concat(e,"_text"))};t.updateStyles(e,o)}))}},{key:"updatePosition",value:function(t,e,o){return this.updateStyles(e,Object.values(this.hoverState[e])[Object.keys(this.hoverState[e]).length-1]),!!t&&!!o&&(o.x&&t.style.setProperty("--".concat(e,"-x"),o.x),void(o.y&&t.style.setProperty("--".concat(e,"-y"),o.y)))}},{key:"updateStyles",value:function(t,e){var o,n,r,i,s,c,a,u,l,d;switch(t){case"inner":default:d=this.innerCursor;break;case"outer":d=this.outerCursor}return!!d&&!!e&&(e.background?d.style.setProperty("--".concat(t,"-background"),e.background):d.style.removeProperty("--".concat(t,"-background")),e.blend?d.style.setProperty("--".concat(t,"-blend"),e.blend):d.style.removeProperty("--".concat(t,"-blend")),e.border?d.style.setProperty("--".concat(t,"-border"),e.border):d.style.removeProperty("--".concat(t,"-border")),e.size?d.style.setProperty("--".concat(t,"-size"),e.size):d.style.removeProperty("--".concat(t,"-size")),e.text?d.style.setProperty("--".concat(t,"-text"),'"'.concat(e.text,'"')):d.style.removeProperty("--".concat(t,"-text")),null!==(o=e.typography)&&void 0!==o&&o.font_family?d.style.setProperty("--".concat(t,"-font-family"),"".concat(e.typography.font_family)):d.style.removeProperty("--".concat(t,"-font-family")),null!==(n=e.typography)&&void 0!==n&&n.font_size?d.style.setProperty("--".concat(t,"-font-size"),"".concat(e.typography.font_size)):d.style.removeProperty("--".concat(t,"-font-size")),null!==(r=e.typography)&&void 0!==r&&r.font_weight?d.style.setProperty("--".concat(t,"-font-weight"),"".concat(e.typography.font_weight)):d.style.removeProperty("--".concat(t,"-font-weight")),null!==(i=e.typography)&&void 0!==i&&i.text_transform?d.style.setProperty("--".concat(t,"-text-transform"),"".concat(e.typography.text_transform)):d.style.removeProperty("--".concat(t,"-text-transform")),null!==(s=e.typography)&&void 0!==s&&s.font_style?d.style.setProperty("--".concat(t,"-font-style"),"".concat(e.typography.font_style)):d.style.removeProperty("--".concat(t,"-font-style")),null!==(c=e.typography)&&void 0!==c&&c.text_decoration?d.style.setProperty("--".concat(t,"-text-decoration"),"".concat(e.typography.text_decoration)):d.style.removeProperty("--".concat(t,"-text-decoration")),null!==(a=e.typography)&&void 0!==a&&a.line_height?d.style.setProperty("--".concat(t,"-line-height"),"".concat(e.typography.line_height)):d.style.removeProperty("--".concat(t,"-line-height")),null!==(u=e.typography)&&void 0!==u&&u.letter_spacing?d.style.setProperty("--".concat(t,"-letter-spacing"),"".concat(e.typography.letter_spacing)):d.style.removeProperty("--".concat(t,"-letter-spacing")),null!==(l=e.typography)&&void 0!==l&&l.word_spacing?d.style.setProperty("--".concat(t,"-word-spacing"),"".concat(e.typography.word_spacing)):d.style.removeProperty("--".concat(t,"-word-spacing")),e.text_color?d.style.setProperty("--".concat(t,"-text-color"),"".concat(e.text_color)):d.style.removeProperty("--".concat(t,"-text-color")),void["blur","brightness","contrast","grayscale","hue_rotate","opacity","sepia","saturate"].forEach((function(o){var n,r,i=o.replace("_","-");null!==(n=e.backdrop_filter)&&void 0!==n&&n[o]?d.style.setProperty("--".concat(t,"-bf-").concat(i),"".concat(null===(r=e.backdrop_filter)||void 0===r?void 0:r[o])):d.style.removeProperty("--".concat(t,"-bf-").concat(i))})))}},{key:"updateOnHover",value:function(){var t=this;["outer","inner"].forEach((function(e){Object.keys(t.hoverState[e]).length>0&&t.updateStyles(e,Object.values(t.hoverState[e])[Object.keys(t.hoverState[e]).length-1])}))}},{key:"goToAnimation",value:function(t,e){var o=this,n=t.classList.contains("custom-cursor__inner")?"inner":"outer";return function(r){var i=t.offsetWidth?parseInt(t.offsetWidth/2):0,s=t.offsetHeight?parseInt(t.offsetHeight/2):0;"x"===e?o.updatePosition(t,n,{x:"".concat(r-i,"px"),y:"".concat(o.clientY-s,"px")}):"y"===e&&o.updatePosition(t,n,{x:"".concat(o.clientX-i,"px"),y:"".concat(r-s,"px")})}}},{key:"onMouseMove",value:function(t){var e=this;"touch"!==t.pointerType&&n((function(){e.clientX=t.clientX,e.clientY=t.clientY}))()}},{key:"onMouseMoveUpdate",value:function(){var t=this;n((function(){t.outerCursorToX(t.clientX),t.outerCursorToY(t.clientY),t.innerCursorToX(t.clientX),t.innerCursorToY(t.clientY),t.onMouseMoveUpdate()}))()}},{key:"initCursor",value:function(){var t=this;document.body.append(this.outerCursor),document.body.append(this.innerCursor),this.outerCursor=document.body.querySelector(".custom-cursor__outer"),this.innerCursor=document.body.querySelector(".custom-cursor__inner"),this.outerCursorToX=this.goToAnimation(this.outerCursor,"x",{duration:.2}),this.outerCursorToY=this.goToAnimation(this.outerCursor,"y",{duration:.2}),this.innerCursorToX=this.goToAnimation(this.innerCursor,"x",{duration:.1}),this.innerCursorToY=this.goToAnimation(this.innerCursor,"y",{duration:.1}),document.addEventListener("pointermove",t.onMouseMove.bind(t)),t.onMouseMoveUpdate()}}],r&&o(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r}();r=c,s=!1,(i=e(i="initStatus"))in r?Object.defineProperty(r,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):r[i]=s,window.customCursor=new c,t(window).on("elementor/frontend/init",(function(){var e,o=elementorModules.frontend.handlers.Base,r={getDefaultElements:function(){return{options:this.getElementSettings()}},bindEvents:function(){this.run()},getDefaultSettings:function(){return{media:!1,easing:0,viewport:1,start:"100% - 100vh",end:"100% - 100vh"}},onElementChange:n((function(t){var e=this;if(e.elements.options=e.getElementSettings(),-1!==t.indexOf("profecient_custom_cursor")){var o=e.$element.get(0).dataset.id;["outer","inner"].forEach((function(t){e.getSettings("toggle")?window.customCursor.hoverState[t][o]={background:window.customCursor.parseBgColorData({type:e.settings("".concat(t,"_type")),color:e.settings("".concat(t,"_color"))}),blend:e.settings("".concat(t,"_blend")),border:window.customCursor.parseBorderData({type:e.settings("".concat(t,"_type")),width:e.settings("".concat(t,"_border_width")),color:e.settings("".concat(t,"_color"))}),size:window.customCursor.parseSliderData(e.settings("".concat(t,"_size"))),text:e.settings("".concat(t,"_text")),typography:e.parseTypography(t),text_color:e.settings("".concat(t,"_text_color")),backdrop_filter:e.parseBackdropFilter(t)}:delete window.customCursor.hoverState[t][o]})),e.run()}})),settings:function(t,e){var o=this;if(e){var n=elementorFrontend.getCurrentDeviceMode(),r={desktop:o.elements.options["profecient_custom_cursor_"+t]||""},i=Object.keys(elementorFrontend.breakpoints.responsiveConfig.activeBreakpoints);i.reverse(),i.forEach((function(e){r[e]=o.elements.options["profecient_custom_cursor_"+t+"_"+e]}));for(var s=r.desktop,c=0;c