PageSourceSearch

https://www.vallenevado.com/wp-content/plugins/cwicly/assets/js/cc-modal.min.js?ver=1.4.4

js vallenevado.com collected 2026-09-24 18:56:00 UTC 11,129 bytes, 1 lines download raw bytes

1class CCModal{constructor(t,e){this.$el=t,this.modalID=t.id,this.$closeOverlay=this.$el.querySelector('.cc-mdl-close[aria-hidden="true"]'),this.$container=this.$el.querySelector(".cc-modaler"),this.disableScroll=!!this.$el.getAttribute("data-preventpagescroll")&&"true"===this.$el.getAttribute("data-preventpagescroll"),this.disableEsc=!!this.$el.getAttribute("data-preventesc")&&"true"===this.$el.getAttribute("data-preventesc"),this.resetScrollPosition=!!this.$el.getAttribute("data-resetscrollposition")&&"true"===this.$el.getAttribute("data-resetscrollposition"),this.closeOnOverlay=!!this.$el.getAttribute("data-closeoverlay")&&"true"===this.$el.getAttribute("data-closeoverlay"),this.isOpen=!1,this.duration=this.$el.getAttribute("data-modalduration")?this.$el.getAttribute("data-modalduration"):.4,this.disableFocus=!1,this.currentTime=(new Date).getTime(),this.lastShownTime=!(!localStorage||!localStorage["cc-"+this.modalID+"-last-shown-time"])&&JSON.parse(localStorage["cc-"+this.modalID+"-last-shown-time"]),this.numberShownTime=!(!localStorage||!localStorage["cc-"+this.modalID+"-number-shown-time"])&&JSON.parse(localStorage["cc-"+this.modalID+"-number-shown-time"]),this.settingDays=!!this.$el.getAttribute("data-after")&&this.$el.getAttribute("data-after"),this.actualDays=(this.currentTime-this.lastShownTime)/864e5,this.every=!!this.$el.getAttribute("data-every")&&this.$el.getAttribute("data-every"),this.upto=!!this.$el.getAttribute("data-upto")&&this.$el.getAttribute("data-upto"),this.never=!!this.$el.getAttribute("data-never")&&this.$el.getAttribute("data-never"),this.$lastFocus=null,this.onClick=this.handleCloseOverlay.bind(this),this.onKeydown=this.handleKey.bind(this),this.onHashClick=this.handleClickLink.bind(this),this.setFocusToFirst=this.setFocusToFirst.bind(this)}addEventListeners(){this.$closeOverlay.addEventListener("touchstart",this.onClick),this.$closeOverlay.addEventListener("click",this.onClick),document.addEventListener("keydown",this.onKeydown,!1),this.$container.addEventListener("click",this.onHashClick)}removeEventListeners(){document.removeEventListener("keydown",this.onKeydown,!1),this.$container.removeEventListener("click",this.onHashClick)}handleClickLink(t){("a"===t.target.tagName.toLowerCase()&&t.target.hasAttribute("href")&&/^#/.test(t.target.getAttribute("href"))||t.target.closest("a")&&t.target.closest("a").hasAttribute("href")&&/^#/.test(t.target.closest("a").getAttribute("href")))&&this.close()}handleCloseOverlay(t){t.preventDefault(),this.isOpen&&this.closeOnOverlay&&this.close()}handleKey(t){27===t.keyCode&&window.CCOpenModals&&window.CCOpenModals[window.CCOpenModals.length-1]===this.$el.id&&!this.disableEsc&&this.close(t),9===t.keyCode&&this.retainFocus(t)}open(t=null){!1===this.isOpen&&((!this.lastShownTime&&this.never||this.upto&&this.numberShownTime<this.upto||this.settingDays&&this.actualDays>this.settingDays||this.every)&&(document.body.classList.add("cc-modal--open"),this.$el.classList.add("active"),this.addEventListeners(),this.scrollBehaviour("disable"),window.CCOpenModals?window.CCOpenModals.push(this.$el.id):window.CCOpenModals=[this.$el.id],window.CCOpenModals?window.CCOpenModals.push(this.$el.id):window.CCOpenModals=[this.$el.id],document.activeElement&&document.activeElement!==document.body&&(this.$lastFocus=document.activeElement),0!==this.duration&&"0"!==this.duration?this.$container.addEventListener("transitionend",this.setFocusToFirst):setTimeout(()=>{this.setFocusToFirstNode()},0),this.isOpen=!0,this.setStateForTriggers(!0)),(this.never||this.settingDays)&&(this.settingDays&&this.actualDays>this.settingDays||this.never)&&localStorage&&(localStorage["cc-"+this.modalID+"-last-shown-time"]=JSON.stringify(this.currentTime)),this.upto&&localStorage&&(localStorage["cc-"+this.modalID+"-number-shown-time"]=this.numberShownTime?this.numberShownTime+1:1))}setFocusToFirst(t){"transform"===t.propertyName&&t.target===this.$container&&!0===this.isOpen&&(this.setFocusToFirstNode(),this.$container.removeEventListener("transitionend",this.setFocusToFirst))}close(t=null){if(!0===this.isOpen){if(document.body.classList.remove("cc-modal--open"),this.$el.classList.remove("active"),this.removeEventListeners(),this.scrollBehaviour("enable"),window.CCOpenModals&&(window.CCOpenModals=window.CCOpenModals.filter(t=>t!==this.$el.id)),this.setStateForTriggers(!1),this.isOpen=!1,this.$lastFocus&&this.$lastFocus.focus(),this.resetScrollPosition&&setTimeout(()=>{this.$el.scrollTop=0;const t=this.$el.getElementsByTagName("*");for(let e=0;e<t.length;e++)t[e].scrollTop=0},1e3*this.duration),0===this.$el.querySelectorAll("iframe").length&&0===this.$el.querySelectorAll("video").length)return;setTimeout(()=>{this.$el.querySelectorAll('iframe[src*="youtube.com"]').forEach(t=>{t.hasAttribute("srcdoc")||t.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}),this.$el.querySelectorAll('iframe[src*="vimeo.com"]').forEach(t=>{t.hasAttribute("srcdoc")||t.contentWindow.postMessage('{"method":"pause"}',"*")}),this.$el.querySelectorAll("video").forEach(t=>{t.pause()})},1e3*this.duration)}}toggle(t=null){!1===this.isOpen?this.open():!0===this.isOpen&&this.close()}setStateForTriggers(t){const e=document.querySelectorAll(`[data-modalid="${this.$el.id}"]`);
1e&&e.forEach(e=>{t?e.setAttribute("modal-open",t):e.removeAttribute("modal-open")})}scrollBehaviour(t){if(!this.disableScroll)return;document.querySelector("body");switch(t){case"enable":document.body.classList.remove("cc-modal--hs");break;case"disable":document.body.classList.add("cc-modal--hs")}}getFocusableNodes(){const t=this.$container.querySelectorAll(["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex^="-"])']);return Array(...t)}retainFocus(t){if(this.disableFocus)return;let e=this.getFocusableNodes();if(0!==e.length)if(e=e.filter(t=>null!==t.offsetParent),this.$el.contains(document.activeElement)){const o=e.indexOf(document.activeElement);t.shiftKey&&0===o&&(e[e.length-1].focus(),t.preventDefault()),!t.shiftKey&&e.length>0&&o===e.length-1&&(e[0].focus(),t.preventDefault())}else t.preventDefault(),e[0].focus()}setFocusToFirstNode(){if(this.disableFocus)return;const t=this.getFocusableNodes();if(0===t.length)return;const e=t.filter(t=>!t.classList.contains("cc-mdl-close"));e.length>0&&e[0].focus(),0===e.length&&t[0].focus()}}function cc_open_modal(t){t&&window[`cc-modal-${t}`]&&window[`cc-modal-${t}`].open()}function cc_modal_triggers(t,e,o){const i=document.getElementById(t);if("click"===e){let e=0;document.addEventListener("click",function i(){(e+=1)===parseInt(o)&&(cc_open_modal(t),document.removeEventListener("click",i))},!1)}if("load"===e&&setTimeout(function(){cc_open_modal(t)},1e3*parseInt(o)),"exit"===e&&(window["cc-"+t+"-onExit"]=function(e){e.toElement||e.relatedTarget||(cc_open_modal(t),document.removeEventListener("mouseout",window["cc-"+t+"-onExit"]))},document.addEventListener("mouseout",window["cc-"+t+"-onExit"])),"inactivity"===e&&cc_modal_idle_activity(t,o),"url"===e&&(document.referrer===o&&"show"===i.dataset.urlcondition&&cc_open_modal(t),document.referrer!=o&&"hide"===i.dataset.urlcondition&&cc_open_modal(t)),"scroll"===e){let e=0,s=window.scrollY;window["cc-"+t+"-onScroll"]=function(){let n=s>window.scrollY;s=window.scrollY;let l=document.documentElement,a=document.body,c="scrollTop",d="scrollHeight";(l[c]||a[c])/((l[d]||a[d])-l.clientHeight)*100>=o&&0===e&&"down"===i.dataset.scrolldirection&&!n&&(e+=1,cc_open_modal(t),document.removeEventListener("scroll",window["cc-"+t+"-onScroll"])),0===e&&"up"===i.dataset.scrolldirection&&n&&(e+=1,cc_open_modal(t),document.removeEventListener("scroll",window["cc-"+t+"-onScroll"]))},document.addEventListener("scroll",window["cc-"+t+"-onScroll"])}if("addedtocart"===e&&jQuery("body").on("added_to_cart",function(){cc_open_modal(t)}),"scrollelement"===e){const e=document.querySelector(i.dataset.scrollelement);if(e){const o=e.getBoundingClientRect();if(o.top>=0&&o.bottom<=window.innerHeight)return void setTimeout(()=>{cc_open_modal(t)},0)}window["cc-"+t+"-onScrollElement"]=function(){const e=document.querySelector(i.dataset.scrollelement);if(e){const o=e.getBoundingClientRect();o.top>=0&&o.bottom<=window.innerHeight&&(cc_open_modal(t),document.removeEventListener("scroll",window["cc-"+t+"-onScrollElement"]))}},document.addEventListener("scroll",window["cc-"+t+"-onScrollElement"])}}function cc_modal_idle_activity(t,e){let o,i=0;function s(){0===i&&(cc_open_modal(t),i=1)}function n(){clearTimeout(o),o=setTimeout(s,1e3*e)}window.onload=n,window.onmousemove=n,window.onmousedown=n,window.ontouchstart=n,window.onclick=n,window.onkeydown=n,window.addEventListener("scroll",n,!0)}function cc_closeAllModals(){window.CCOpenModals&&window.CCOpenModals.forEach(t=>{window[`cc-modal-${t}`]&&window[`cc-modal-${t}`].close()})}function cc_modal_open(t){const e=document.querySelectorAll("[data-modal]");e.length&&e.forEach(function(e){if((e===t.target||e.contains(t.target))&&e.dataset.modalid){t.preventDefault();var o=!(!e.dataset||!e.dataset.modalid)&&e.dataset.modalid;o&&window[`cc-modal-${o}`]&&window[`cc-modal-${o}`].open()}})}function cc_modal_close(t){const e=document.querySelectorAll('[data-modalclose], .cc-mdl-close:not([aria-hidden="true"])');e.length&&e.forEach(function(e){if(e===t.target||e.contains(t.target))if(t.preventDefault(),e.dataset.modalid){var o=!(!e.dataset||!e.dataset.modalid)&&e.dataset.modalid;o&&window[`cc-modal-${o}`]&&window[`cc-modal-${o}`].close()}else{const t=e.closest(".cc-mdl");t&&window[`cc-modal-${t.id}`]&&window[`cc-modal-${t.id}`].close()}})}function cc_modal_toggle(t){const e=document.querySelectorAll("[data-modaltoggle]");e.length&&e.forEach(function(e){if((e===t.target||e.contains(t.target))&&e.dataset.modalid){t.preventDefault();var o=!(!e.dataset||!e.dataset.modalid)&&e.dataset.modalid;o&&window[`cc-modal-${o}`]&&window[`cc-modal-${o}`].toggle()}})}window.addEventListener("DOMContentLoaded",function(){document.querySelectorAll("[data-ccself]").length&&document.querySelectorAll("[data-ccself]").forEach(function(t){t.dataset.hidelogged&&CCers.loggedIn||(t.dataset.openclick&&cc_modal_triggers(t.id,"click",t.dataset.openclick),t.dataset.onload&&cc_modal_triggers(t.id,"load",t.dataset.onload),t.dataset.onscroll&&cc_modal_triggers(t.id,"scroll",t.dataset.onscroll),t.dataset.exitintent&&cc_modal_triggers(t.id,"exit"),t.dataset.inactive&&cc_modal_triggers(t.id,"inactivity",t.dataset.inactive),t.dataset.url&&cc_modal_triggers(t.id,"url",t.dataset.url),t.dataset.addedtocart&&cc_modal_triggers(t.id,"addedtocart"),t.dataset.scrollelement&&cc_modal_triggers(t.id,"scrollelement"))})}),window.addEventListener("DOMContentLoaded",function(){const t=document.querySelectorAll(".cc-mdl");if(t){const e=document.querySelector(".wp-site-blocks");t.forEach(t=>{e.insertAdjacentElement("afterend",t),window[`cc-modal-${t.id}`]=new CCModal(t)})}});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.