HEX
Server: Apache
System: Linux webd006.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: zwafgyp (177615)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/zwafgyp/lacalita/wp-content/plugins/rey-core/inc/modules/offcanvas-panels/script.js
!function(){"use strict";var t=function(t){this.isOpen=null,this.panel=!1,this.entryTimeline=!1,this.settings={},this.lazyLoaded=!1,this.btn=!1,this.init=function(){if(this.args=Object.assign({panel_id:!1,btn:!1,legacySettings:{}},t),this.body=rey.elements.body,this.args.panel_id){if(this.id=this.args.panel_id,!this.id)return void console.info("Missing Global Section ID.");if(this.btn=this.args.btn,this.panel=document.querySelector('.rey-offcanvas-wrapper[data-gs-id="'+this.id+'"]'),!this.panel)return void this.lazyLoadPanel();this.makeSettings()}else if(Object.keys(this.args.legacySettings).length){if(this.btn=this.args.btn,this.trigger=this.btn.getAttribute("data-trigger")||"click",rey.vars.is_desktop||(this.trigger="click"),"click"===this.trigger?this.btn.addEventListener("click",(t=>{t.preventDefault(),this.isOpen?this.close():this.open()})):"hover"===this.trigger&&(this.btn.addEventListener("mouseenter",(t=>{this.open()})),this.btn.addEventListener("mouseleave",(t=>{this.close()}))),this.settings=this.args.legacySettings,!this.args.legacySettings.id)return void console.info("Missing GSID.");if(this.id=this.args.legacySettings.id,this.panel=document.querySelector(`.rey-offcanvas-wrapper[data-gs-id="${this.id}"], .rey-offcanvas-wrapper[data-legacy-id="${this.id}"]`),!this.panel)return void console.info("No public offcanvas sections.");this.makeLegacySettings()}return this.panelContent(),this.events(),this.open(),this},this.makeSettings=function(){Object.keys(this.args.legacySettings).length||(this.settings.position=this.panel.getAttribute("data-position")||"left",this.settings.transition=this.panel.getAttribute("data-transition")||"",this.settings.transition_duration=this.panel.getAttribute("data-transition-duration")||"700",this.settings.shift="yes"===this.panel.getAttribute("data-shift"),this.settings.animate_inside="yes"===this.panel.getAttribute("data-animate-cols"),this.settings.close_position=this.panel.getAttribute("data-close-position")||"inside",this.settings.close_rotate="yes"===this.panel.getAttribute("data-close-rotate"))},this.makeLegacySettings=function(){if(Object.keys(this.args.legacySettings).length){var t={"data-id":this.settings.id,"data-transition":this.settings.transition,"data-transition-duration":this.settings.transition_duration,"data-position":this.settings.position,"data-close-position":this.settings.close_position,"data-close-rotate":this.settings.close_rotate,"data-animate-cols":this.settings.animate_inside,"data-shift":this.settings.shift,"data-legacy-id":this.id};Object.keys(t).forEach((e=>{this.panel.setAttribute(e,t[e])})),this.panel.removeAttribute("data-gs-id");var e=this.panel.querySelector(".rey-offcanvas-closeText");e&&(e.textContent=this.settings.close_text)}},this.events=function(){this.panel.querySelectorAll('a[href*="#"]:not([href$="#"]), .rey-offcanvas-close').forEach((t=>{t.addEventListener("click",(t=>{t.preventDefault(),this.close()}))}))},this.panelContent=function(){this.contentWrapper=this.panel.querySelector(".rey-offcanvas-contentWrapper"),this.content=this.panel.querySelector(".rey-offcanvas-content"),this.closeBtn=this.panel.querySelector(".rey-offcanvas-close"),this.settings.animate_inside&&(this.panel.querySelectorAll(".elementor-column-wrap.elementor-element-populated, .elementor-widget-wrap.elementor-element-populated").forEach(((t,e)=>{t.style.transitionDelay=75*e+"ms"})),this.panel.classList.add("--animate-inside")),this.settings.close_rotate&&this.closeBtn.classList.add("--close-rotate")},this.create_anime=function(){if(!this.timelineExists&&"undefined"!=typeof anime&&"basic"!==this.settings.transition){switch(this.entryTimeline=anime.timeline({easing:"easeInOutQuart",duration:parseInt(this.settings.transition_duration),autoplay:!1,begin:()=>{this.isOpen=!0,this.body.classList.add("--offcanvas-active"),rey.hooks.doAction("offcanvas_panel/open",this)},complete:()=>{this.panel.classList.add("--active"),rey.hooks.doAction("offcanvas_panel/open/complete",this)}}),this.settings.transition){default:var t={left:{translateX:["-100%","0%"]},right:{translateX:["100%","0%"]},top:{translateY:["-100%","0%"]},bottom:{translateY:["100%","-100%"]}};this.entryTimeline.add(Object.assign({targets:this.contentWrapper},t[this.settings.position]));break;case"slideskew":t={left:{opacity:[0,1],translateX:["-120%","0%"],skewX:["-7deg","0deg"]},right:{opacity:[0,1],translateX:["120%","0%"],skewX:["7deg","0deg"]},top:{opacity:[0,1],translateY:["-120%","0%"],skewY:["-7deg","0deg"]},bottom:{opacity:[0,1],translateY:["120%","-120%"],skewY:["7deg","0deg"]}};this.entryTimeline.add(Object.assign({targets:this.contentWrapper},t[this.settings.position]));break;case"curtain":var e=this.panel.querySelector(".rey-offcanvas-mask.--m1");e||(this.contentWrapper.prepend(rey.dom.createElementFromHTML('<div class="rey-offcanvas-mask --m1" />')),e=this.panel.querySelector(".rey-offcanvas-mask.--m1"));var s=this.panel.querySelector(".rey-offcanvas-mask.--m2");s||(s=this.contentWrapper.prepend(rey.dom.createElementFromHTML('<div class="rey-offcanvas-mask --m2" />')),s=this.panel.querySelector(".rey-offcanvas-mask.--m2"));t={left:{c:{scaleX:[0,1]},m:{scaleX:[1,0]}},right:{c:{scaleX:[0,1]},m:{scaleX:[1,0]}},top:{c:{scaleY:[0,1]},m:{scaleY:[1,0]}},bottom:{c:{scaleY:[0,1]},m:{scaleY:[1,0]}}};var i={m1:"-="+.75*parseInt(this.settings.transition_duration),m2:"-="+.4*parseInt(this.settings.transition_duration)};this.entryTimeline.add(Object.assign({targets:this.contentWrapper},t[this.settings.position].c)).add(Object.assign({targets:e},t[this.settings.position].m),i.m1).add(Object.assign({targets:s},t[this.settings.position].m),i.m2)}this.timelineExists=!0}},this.refreshScroll=function(){this.content&&"undefined"!=typeof SimpleScrollbar&&SimpleScrollbar.initEl(this.content)},this.animate_panel=function(){"undefined"!=typeof anime&&this.entryTimeline&&this.entryTimeline.play()},this.open=function(){if(this.panel){if(this.panel.classList.remove("--hidden"),this.refreshScroll(),this.create_anime(),rey.frontend.panels.init(this.close.bind(this)),rey.frontend.overlay.open("site"),rey.frontend.scroll.disable(),this.settings.shift&&this.body.classList.add("--offcanvas-shift","--offcanvas-shift--"+this.settings.position),this.btn&&this.btn.classList.add("--active"),this.runFocus(),"basic"===this.settings.transition)return this.isOpen=!0,this.body.classList.add("--offcanvas-active"),this.panel.classList.add("--active"),void rey.hooks.doAction("offcanvas_panel/open",this);this.animate_panel()}else console.info("Panel does not exist.")},this.close=function(){if(this.panel&&this.isOpen){rey.frontend.panels.reset();var t=()=>{this.body.classList.remove("--offcanvas-active","--offcanvas-shift","--offcanvas-shift--"+this.settings.position),this.panel.classList.remove("--active"),this.btn&&(this.btn.classList.remove("--active"),this.btn.focus()),rey.frontend.overlay.close(),rey.frontend.scroll.enable(),rey.hooks.doAction("offcanvas_panel/close",this)};if("basic"===this.settings.transition)t();else{anime(Object.assign({easing:"easeInOutQuart",duration:parseInt(this.settings.transition_duration)/2,targets:this.contentWrapper,complete:t},{left:{translateX:["0%","-100%"]},right:{translateX:["0%","100%"]},top:{translateY:["0%","-100%"]},bottom:{translateY:["-100%","100%"]}}[this.settings.position]))}this.isOpen=!1}},this.runFocus=function(){var t=this.panel.querySelector(':is(a[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, [tabindex], [contentEditable=true]):not([tabindex="-1"])');t&&(t.dispatchEvent(new Event("focus")),t.style.outline="none")},this.lazyLoadPanel=function(){if(this.panel)return this.open();if(this.id){var t=!1;if(this.btn&&(this.btn.classList.add("--loading"),!t)){t=rey.dom.createElementFromHTML('<em class="__loader"></em>');this.btn.append(t)}"undefined"!=typeof offcanvasUncached&&-1!==offcanvasUncached.indexOf(this.id)&&(this.args.cache=!1);var e={};reyParams.lang&&(e.lang=reyParams.lang),rey.ajax.request("get_offcanvas_panel",{ss:"get_offcanvas_panel_"+this.id,data:{panel_id:this.args.panel_id},formData:e,cb:t=>{t&&t.success&&t.data?(this.lazyLoaded=!0,rey.elements.body.append(rey.dom.createElementFromHTML(t.data)),this.panel=document.querySelector('.rey-offcanvas-wrapper[data-gs-id="'+this.id+'"]'),this.panel?(this.makeSettings(),this.makeLegacySettings(),this.panelContent(),this.events(),rey.hooks.doAction("elementor/content/lazy_loaded",this.panel),this.btn&&this.btn.classList.remove("--loading"),this.open()):console.log("Panel is missing after ajax request.")):console.log("Empty response.")}})}},this.init()};document.addEventListener("reycore/offcanvas/open",(function(e){new t({panel_id:e.detail.panel_id}).open()}));var e=!1,s=function(){e||(e=!0,rey.components.offcanvasPanels={},document.querySelectorAll(".js-triggerBtn[data-offcanvas-settings]").forEach((e=>{var s={};e.addEventListener("click",(i=>{if(i.preventDefault(),rey.validation.isEmptyObject(s)){var n=JSON.parse(e.getAttribute("data-offcanvas-settings")||"{}");if(!n.id||isNaN(n.id))return;s={id:n.id,btn:e,legacySettings:Object.assign({id:parseInt(n.id),gs:"",shift:!0,trigger:"click",position:"left",transition:"",transition_duration:700,animate_inside:!0,close_position:"inside",close_text:"",close_rotate:!1},n)}}if(s.id)return void 0!==rey.components.offcanvasPanels[s.id]?rey.components.offcanvasPanels[id].isOpen?rey.components.offcanvasPanels[id].close():rey.components.offcanvasPanels[s.id].open():void(rey.components.offcanvasPanels[s.id]=new t(s))}))})),document.querySelectorAll(".js-triggerBtn[data-offcanvas-id]").forEach((e=>{var s;e.addEventListener("click",(i=>{if(i.preventDefault(),s||(s=e.getAttribute("data-offcanvas-id"))&&!isNaN(s))return void 0!==rey.components.offcanvasPanels[s]?rey.components.offcanvasPanels[s].isOpen?rey.components.offcanvasPanels[s].close():rey.components.offcanvasPanels[s].open():void(rey.components.offcanvasPanels[s]=new t({panel_id:parseInt(s),btn:e}))}))})),document.addEventListener("click",(function(e){let s=e.target.closest("a[href^='#offcanvas-']");if(e.target&&s){e.preventDefault();var i=s.getAttribute("href").split("-");if(i.length){var n=i[1];if(n&&!isNaN(n))return void 0!==rey.components.offcanvasPanels[n]?rey.components.offcanvasPanels[n].isOpen?rey.components.offcanvasPanels[n].close():rey.components.offcanvasPanels[n].open():void(rey.components.offcanvasPanels[n]=new t({panel_id:parseInt(n),btn:s}))}}})))};if("complete"===document.readyState)return s();document.addEventListener("rey-DOMContentLoaded",s)}();