PageSourceSearch

https://www.showcase.ca/wp-content/themes/corus-wpt-template-b/dist/js/script.min.js?ver=1.2.7

js showcase.ca collected 2026-10-02 05:44:40 UTC 11,690 bytes, 2 lines download raw bytes

1!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("theme",[],e):"object"==typeof exports?exports.theme=e():t.theme=e()}(self,(()=>(()=>{var t={959:()=>{var t=document.getElementsByClassName("faq__question");if(t.length>0)for(i=0;i<t.length;i++)t[i].addEventListener("click",(function(){this.classList.toggle("active");var t=this.nextElementSibling;t.style.maxHeight?(this.setAttribute("aria-expanded","false"),t.style.maxHeight=null):(this.setAttribute("aria-expanded","true"),t.style.maxHeight=t.scrollHeight+"px")}))},521:()=>{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(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,n)}return o}function o(t){for(var o=1;o<arguments.length;o++){var n=null!=arguments[o]?arguments[o]:{};o%2?e(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function n(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function r(t,e,o){return(e=i(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function i(e){var o=function(e,o){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,o||"default");if("object"!=t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(e)}(e,"string");return"symbol"==t(o)?o:o+""}var s=function(){return t=function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),r(this,"debounce",(function(t,e){var o;return function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];clearTimeout(o),o=setTimeout((function(){t.apply(n,i)}),e)}})),r(this,"debouncedResizeHandler",this.debounce((function(){n.updateSlider(),n.resizeSlider()}),200)),r(this,"nextAutoSlide",(function(){n.rotator.children.length<=1||(n.slideIndex=(n.slideIndex+1)%n.rotator.children.length,n.wrapper.style.scrollBehavior="smooth",n.updateSlider())})),this.options=o(o({},{container:".rotator",containerWrapper:".rotator__slider-wrapper",rotatorSelector:".rotator__slider",slideSelector:".rotator__slide",controlSelector:".rotator__controls",prevBtnSelector:".rotator__nav-btn--prev",nextBtnSelector:".rotator__nav-btn--next",autoRotate:"data-auto-rotation",intervalTime:6e3,isDown:!1,swipePointX:0,swipePointY:0,swipeLeft:0}),e),this.container=document.querySelector(this.options.container),this.container&&(this.rotator=this.container.querySelector(this.options.rotatorSelector),this.wrapper=this.container.querySelector(this.options.containerWrapper),this.slides=this.rotator.querySelectorAll(this.options.slideSelector),this.options.controlSelector&&(this.controls=this.container.querySelector(this.options.controlSelector)),this.controls&&(this.prevBtn=this.controls.querySelector(this.options.prevBtnSelector),this.nextBtn=this.controls.querySelector(this.options.nextBtnSelector)),this.autoRotation=this.rotator.getAttribute(this.options.autoRotate),this.intervalTime=this.options.intervalTime,this.slideIndex=0,this.interval=null,this.slideWidth=this.slides[0].offsetWidth),this.rotator&&this.slides.length>1&&this.init()},e=[{key:"init",value:function(){var t=this;this.startAutoRotation(),this.rotator.addEventListener("mouseenter",(function(){t.stopAutoRotation()})),this.rotator.addEventListener("mouseleave",(function(){t.startAutoRotation()})),this.rotator.addEventListener("touchstart",(function(e){t.rotator.children.length<=1||(t.stopAutoRotation(),t.isDown=!0,t.wrapper.style.scrollBehavior="auto",t.swipePointX=e.touches[0].pageX-t.rotator.offsetLeft,t.swipePointY=e.touches[0].pageY,t.swipeLeft=t.wrapper.scrollLeft)})),this.rotator.addEventListener("touchmove",(function(e){if(t.stopAutoRotation(),t.isDown){var o=e.touches[0].pageX-t.rotator.offsetLeft,n=e.touches[0].pageY,r=3*(o-t.swipePointX),i=Math.abs(o-t.swipePointX);Math.abs(n-t.swipePointY)>i?t.isDown=!1:(e.preventDefault(),t.wrapper.scrollLeft=t.swipeLeft-r)}})),this.rotator.addEventListener("touchend",(function(){if(t.isDown){t.stopAutoRotation(),t.isDown=!1;var e=t.wrapper.scrollLeft,o=Math.round(e/t.slideWidth);t.slideIndex=o,t.wrapper.style.scrollBehavior="smooth",t.updateSlider()}})),this.prevBtn&&this.prevBtn.addEventListener("click",(function(){t.rotator.children.length<=1||(t.stopAutoRotation(),t.slideIndex=Math.max(t.slideIndex-1,0),t.wrapper.style.scrollBehavior="smooth",t.updateSlider())})),this.nextBtn&&this.nextBtn.addEventListener("click",(function(){t.rotator.children.length<=1||(t.stopAutoRotation(),t.slideIndex=(t.slideIndex+1)%t.rotator.children.length,t.wrapper.style.scrollBehavior="smooth",t.updateSlider())})),window.addEventListener("resize",(function(){t.slideWidth=t.rotator.clientWidth,t.updateSlider(),t.debouncedResizeHandler}))}},{key:"updateSlider",value:function(){if(this.rotator){var t=this.rotator.clientWidth;this.wrapper.scrollLeft=t*this.slideIndex}}},{key:"startAutoRotation",value:function(){"1"===this.autoRotation&&this.rotator.children.length>1&&(this.interval=setInterval(this.nextAutoSlide,this.intervalTime))}},{key:"stopAutoRotation",value:function(){clearInterval(this.interval)}},{key:"resizeSlider",value:function(){this.updateSlider()}}],e&&n(t.prototype,e),i&&n(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,i}();document.addEventListener("DOMContentLoaded",(function(){new s}))},643:()=>{var t="header-mobile-nav-active",e="header__menu-toggle--is-active",o=document.querySelector(".header__menu-toggle"),n=document.querySelectorAll(".header__mobile-nav-menu .menu-item");function r(){document.body.classList.remove(t),o&&o.classList.remove(e)}function i(){window.innerWidth>=1366&&document.body.classList.contains(t)&&r()}n.length>
10&&n.forEach((function(t){t.addEventListener("click",(function(t){r()}))})),document.addEventListener("keydown",(function(t){"Escape"===t.key&&r()})),o&&o.addEventListener("click",(function(){o.classList.toggle(e),document.body.classList.toggle(t),i()})),window.addEventListener("resize",i)},333:()=>{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(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,o(r.key),r)}}function o(e){var o=function(e,o){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,o||"default");if("object"!=t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(e)}(e,"string");return"symbol"==t(o)?o:o+""}var n=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.container=document.getElementById("lightbox-container"),this.template=document.getElementById("lightbox-template"),this.body=document.body},o=[{key:"populate",value:function(t){var e=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.template.content.cloneNode(!0).querySelector(".lightbox"),i=r.querySelector(".lightbox__video-wrapper"),s=r.querySelector(".lightbox__title");s&&o&&(s.textContent=o);var a=r.querySelector(".lightbox__description");a&&n&&(a.textContent=n);var l=document.createElement("iframe");l.src=t,l.frameBorder="0",l.scrolling="no",l.allowFullscreen=!0,this.body.classList.add("lightbox-open"),i.appendChild(l),r.querySelector(".lightbox__close-btn").addEventListener("click",(function(){e.body.classList.remove("lightbox-open"),e.container.innerHTML="",r.style.display="none"})),document.addEventListener("keydown",(function(t){"Escape"===t.key&&(e.body.classList.remove("lightbox-open"),e.container.innerHTML="",r.style.display="none")})),this.container.innerHTML="",this.container.appendChild(r),r.style.display="block"}}],o&&e(t.prototype,o),n&&e(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,o,n}();window.lightboxManager=new n},837:()=>{document.addEventListener("DOMContentLoaded",(function(){var t,e,o=document.querySelector("#notificationBar");t=localStorage.getItem("ceNotificationBarClosedTime"),e=(new Date).getTime(),null!==o&&(!t||e-t>864e5)&&o.classList.remove("hidden");null!==o&&document.querySelector(".notification-bar__close").addEventListener("click",(function(){o.classList.add("hidden");var t=(new Date).getTime();localStorage.setItem("ceNotificationBarClosedTime",t)}))}))},719:()=>{document.addEventListener("DOMContentLoaded",(function(){var t=document.getElementById("ce-popup-modal");if(t){var e=document.body,o="cePopupModalShownDate",n=document.getElementById("ce-popup-modal__close"),r=localStorage.getItem(o),i=new Date,s=i.getTimezoneOffset(),a=(i=new Date(i.getTime()-60*s*1e3)).toISOString().split("T")[0],l=function(){t.classList.add("hidden"),e.classList.remove("no-scroll")};r&&r===a?l():(t.classList.remove("hidden"),e.classList.add("no-scroll")),n&&n.addEventListener("click",(function(){l(),function(t){localStorage.setItem(o,t)}(a)}))}}))}},e={};function o(n){var r=e[n];if(void 0!==r)return r.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,o),i.exports}o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";o.r(n);o(643),o(959),o(521),o(333),o(837),o(719);var t=function(t){if(!t)return!1;var e="string"==typeof t?t:t.value;return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)};(function(){var e=document.querySelector(".newsletter"),o=document.querySelector(".newsletter__form .newsletter__input"),n=document.querySelector(".newsletter__form .button--newsletter");if(e&&o&&n){var r=function(e){document.querySelector(".newsletter__invalid-wrapper").classList.contains("active")&&t(e.target.value)&&document.querySelector(".newsletter__invalid-wrapper").classList.remove("active")};n.addEventListener("click",(function(e){e.preventDefault();var n=document.querySelector(".newsletter__form"),r=document.querySelector(".newsletter__form-content"),i=document.querySelector(".newsletter__success-message");if(t(o.value)){var s=new FormData(n).entries(),a=Object.fromEntries(s),l={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)};fetch("/wp-json/newsletter/v1/form",l).then((function(t){200===t.status&&(r.classList.add("hidden"),i.classList.add("active"),"function"==typeof handleSuccessMessageAnalytics&&handleSuccessMessageAnalytics())})).catch((function(t){console.warn(t)}))}else n.querySelector(".newsletter__invalid-wrapper").classList.add("active")})),o.addEventListener("keyup",r),o.addEventListener("change",r)}})()})(),n})()));
2//# sourceMappingURL=script.min.js.map

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.