PageSourceSearch

https://www.inclasstomorrow.co.uk/storefront/theme/dist/js/theme.min.js

js inclasstomorrow.co.uk collected 2026-10-08 12:17:32 UTC 15,492 bytes, 10 lines download raw bytes

1function ownKeys(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(r),!0).forEach(function(e){_defineProperty(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"===_typeof(e)?e:String(e)}function _toPrimitive(e,t){if("object"!==_typeof(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
2/**
3 * Cartzilla | Bootstrap E-Commerce Template
4 * Copyright 2023 Createx Studio
5 * Theme core scripts
6 * 
7 * @author Createx Studio
8 * @version 2.5.1
9 */
10!function(){"use strict";var t,r,n,o,a,l,e;null!=(r=document.querySelector(".navbar-sticky"))&&(r.classList,t=r.offsetHeight,window.addEventListener("scroll",function(e){r.classList.contains("position-absolute")?500<e.currentTarget.pageYOffset?r.classList.add("navbar-stuck"):r.classList.remove("navbar-stuck"):500<e.currentTarget.pageYOffset?(document.body.style.paddingTop=t+"px",r.classList.add("navbar-stuck")):(document.body.style.paddingTop="",r.classList.remove("navbar-stuck"))})),e=document.querySelector(".navbar-stuck-toggler"),n=document.querySelector(".navbar-stuck-menu"),null!=e&&e.addEventListener("click",function(e){n.classList.toggle("show"),e.preventDefault()}),function(){var e,t=document.querySelectorAll(".masonry-grid");if(null!==t)for(var r=0;r<t.length;r++)e=new Shuffle(t[r],{itemSelector:".masonry-grid-item",sizer:".masonry-grid-item"}),imagesLoaded(t[r]).on("progress",function(){e.layout()})}(),function(){for(var e=document.querySelectorAll(".password-toggle"),r=0;r<e.length;r++)!function(){var t=e[r].querySelector(".form-control");e[r].querySelector(".password-toggle-btn").addEventListener("click",function(e){"checkbox"===e.target.type&&(e.target.checked?t.type="text":t.type="password")},!1)}()}(),function(){for(var e=document.querySelectorAll(".file-drop-area"),t=0;t<e.length;t++)!function(){var n=e[t].querySelector(".file-drop-input"),o=e[t].querySelector(".file-drop-message"),a=e[t].querySelector(".file-drop-icon");e[t].querySelector(".file-drop-btn").addEventListener("click",function(){n.click()}),n.addEventListener("change",function(){var e;n.files&&n.files[0]&&((e=new FileReader).onload=function(e){var t,e=e.target.result,r=n.files[0].name;o.innerHTML=r,e.startsWith("data:image")?((t=new Image).src=e,t.onload=function(){a.className="file-drop-preview img-thumbnail rounded",a.innerHTML='<img src="'+t.src+'" alt="'+r+'">'}):e.startsWith("data:video")?(a.innerHTML="",a.className="",a.className="file-drop-icon ci-video"):(a.innerHTML="",a.className="",a.className="file-drop-icon ci-document")},e.readAsDataURL(n.files[0]))})}()}(),window.addEventListener("load",function(){var e=document.getElementsByClassName("needs-validation");Array.prototype.filter.call(e,function(t){t.addEventListener("submit",function(e){!1===t.checkValidity()&&(e.preventDefault(),e.stopPropagation()),t.classList.add("was-validated")},!1)})},!1),new SmoothScroll("[data-scroll]",{speed:800,speedAsDuration:!0,offset:40,header:"[data-scroll-header]",updateURL:!1}),null!=(a=document.querySelector(".btn-scroll-top"))&&(o=parseInt(600,10),window.addEventListener("scroll",function(e){e.currentTarget.pageYOffset>o?a.classList.add("show"):a.classList.remove("show")})),[].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')).map(function(e){return new bootstrap.Tooltip(e,{trigger:"hover"})}),[].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]')).map(function(e){return new bootstrap.Popover(e)}),[].slice.call(document.querySelectorAll(".toast")).map(function(e){return new bootstrap.Toast(e)}),function(){for(var e=document.querySelectorAll(".disable-autohide .form-select"),t=0;t<e.length;t++)e[t].addEventListener("click",function(e){e.stopPropagation()})}(),function(){for(var e=document.querySelectorAll(".tns-carousel .tns-carousel-inner"),t=function(e,t){var r,n={container:t,controlsText:['<i class="ci-arrow-left"></i>','<i class="ci-arrow-right"></i>'],navPosition:"bottom",mouseDrag:!0,speed:500,autoplayHoverPause:!0,autoplayButtonOutput:!1},t=(null!=t.dataset.carouselOptions&&(r=JSON.parse(t.dataset.carouselOptions)),Object.assign({},n,r));tns(t)},r=void 0,n=0;n<e.length;n++)t.call(r,n,e[n])}(),function(){var e=document.querySelectorAll(".gallery");if(e.length)for(var t=0;t<e.length;t++){var r=!!e[t].dataset.thumbnails,n=!!e[t].dataset.video,o=[lgZoom,lgFullscreen],n=n?[lgVideo]:[],r=r?[lgThumbnail]:[],o=[].concat(o,n,r);lightGallery(e[t],{selector:".gallery-item",plugins:o,licenseKey:"D4194FDD-48924833-A54AECA3-D6F8E646",download:!1,autoplayVideoOnSlide:!0,zoomFromOrigin:!1,youtubePlayerParams:{modestbranding:1,showinfo:0,rel:0},vimeoPlayerParams:{byline:0,portrait:0,color:"6366f1"}})}}(),function(){var i=document.querySelectorAll(".product-gallery");if(i.length)for(var e=0;e<i.length;e++)!function(r){for(var n=i[r].querySelectorAll(".product-gallery-thumblist-item:not(.video-item)"),o=i[r].querySelectorAll(".product-gallery-preview-item"),e=i[r].querySelectorAll(".product-gallery-thumblist-item.video-item"),t=0;t<n.length;t++)n[t].addEventListener("click",a);function a(e){e.preventDefault();for(var t=0;t<n.length;t++)o[t].classList.remove("active"),n[t].classList.remove("active");this.classList.add("active"),i[r].querySelector(this.getAttribute("href")).classList.add("active")}for(var l=0;l<e.length;l++)lightGallery(e[l],{selector:"this",plugins:[lgVideo],licenseKey:"D4194FDD-48924833-A54AECA3-D6F8E646",download:!1,autoplayVideoOnSlide:!0,zoomFromOrigin:!1,youtubePlayerParams:{modestbranding:1,showinfo:0,rel:0,controls:0},vimeoPlayerParams:{byline:0,portrait:0,color:"fe696a"}})}(e)}(),function(){for(var e=document.querySelectorAll(".image-zoom"),t=0;t<e.length;t++)new Drift(e[t],{paneContainer:e[t].parentElement.querySelector(".image-zoom-pane"),hoverDelay:1200,touchDelay:1200})}(),function(){var e=document.querySelectorAll(".countdown");if(null!=e)for(var t=function(){var t,r,n,o,a=e[u].dataset.countdown,l=e[u].querySelector(".countdown-days .countdown-value"),i=e[u].querySelector(".countdown-hours .countdown-value"),c=e[u].querySelector(".countdown-minutes .countdown-value"),s=e[u].querySelector(".countdown-seconds .countdown-value"),a=new Date(a).getTime();if(isNaN(a))return{v:void 0};setInterval(function(){var e=(new Date).getTime(),e=parseInt((a-e)/1e3);0<=e&&(t=parseInt(e/86400),e%=86400,r=parseInt(e/3600),e%=3600,n=parseInt(e/60),e%=60,o=parseInt(e),null!=l&&(l.innerHTML=parseInt(t,10)),null!=i&&(i.innerHTML=r<10?"0"+r:r),null!=c&&(c.innerHTML=n<10?"0"+n:n),null!=s&&(s.innerHTML=o<10?"0"+o:o))},1e3)},u=0;u<e.length;u++){var r=t();if("object"===_typeof(r))return r.v}}(),function(){function o(e,t){return e+t}var e=document.querySelectorAll("[data-line-chart]"),t=document.querySelectorAll("[data-bar-chart]"),a=document.querySelectorAll("[data-pie-chart]");if(0!==e.length||0!==t.length||0!==a.length){var l,r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");r.appendChild(i);for(var n=0;n<e.length;n++){var c=JSON.parse(e[n].dataset.lineChart),s=null!=e[n].dataset.options?JSON.parse(e[n].dataset.options):"",u=e[n].dataset.seriesColor;if(e[n].classList.add("line-chart-"+n),null!=u)for(var d=JSON.parse(u),f=0;f<d.colors.length;f++)l="\n          .line-chart-".concat(n," .ct-series:nth-child(").concat(f+1,") .ct-line,\n          .line-chart-").concat(n," .ct-series:nth-child(").concat(f+1,") .ct-point {\n            stroke: ").concat(d.colors[f]," !important;\n          }\n        "),i.appendChild(document.createTextNode(l));new Chartist.Line(e[n],c,s)}for(var p=0;p<t.length;p++){var m=JSON.parse(t[p].dataset.barChart),v=null!=t[p].dataset.options?JSON.parse(t[p].dataset.options):"",g=t[p].dataset.seriesColor;if(t[p].classList.add("bar-chart-"+p),null!=g)for(var y=JSON.parse(g),h=0;h<y.colors.length;h++)l="\n        .bar-chart-".concat(p," .ct-series:nth-child(").concat(h+1,") .ct-bar {\n            stroke: ").concat(y.colors[h]," !important;\n          }\n        "),i.appendChild(document.createTextNode(l));new Chartist.Bar(t[p],m,v)}for(var b=0;b<a.length;b++)!function(){var t=JSON.parse(a[b].dataset.pieChart),e=a[b].dataset.seriesColor;if(a[b].classList.add("cz-pie-chart-"+b),null!=e)for(var r=JSON.parse(e),n=0;n<r.colors.length;n++)l="\n        .cz-pie-chart-".concat(b," .ct-series:nth-child(").concat(n+1,") .ct-slice-pie {\n            fill: ").concat(r.colors[n]," !important;\n          }\n        "),i.appendChild(document.createTextNode(l));new Chartist.Pie(a[b],t,{labelInterpolationFnc:function(e){return Math.round(e/t.series.reduce(o)*100)+"%"}})}()}}(),function(){var e=document.querySelectorAll('[data-bs-toggle="video"]');if(e.length)for(var t=0;t<e.length;t++)lightGallery(e[t],{selector:"this",plugins:[lgVideo],licenseKey:"D4194FDD-48924833-A54AECA3-D6F8E646",download:!1,youtubePlayerParams:{modestbranding:1,showinfo:0,rel:0},vimeoPlayerParams:{byline:0,portrait:0,color:"6366f1"}})}(),function(){var e=document.querySelectorAll(".subscription-form");if(null!==e){for(var l=0;l<e.length;l++)!function(){var t=e[l].querySelector('button[type="submit"]'),r=t.innerHTML,n=e[l].querySelector(".form-control"),o=e[l].querySelector(".subscription-form-antispam"),a=e[l].querySelector(".subscription-status");e[l].addEventListener("submit",function(e){e&&e.preventDefault(),""===o.value&&i(this,t,n,r,a)})}();var i=function(e,t,r,n,o){t.innerHTML="Sending...";var e=e.action.replace("/post?","/post-json?"),a="&"+r.name+"="+encodeURIComponent(r.value),l=document.createElement("script"),i=(l.src=e+"&c=callback"+a,document.body.appendChild(l),"callback");window[i]=function(e){delete window[i],document.body.removeChild(l),t.innerHTML=n,"success"==e.result?(r.classList.remove("is-invalid"),r.classList.add("is-valid"),o.classList.remove("status-error"),o.classList.add("status-success"),o.innerHTML=e.msg,setTimeout(function(){r.classList.remove("is-valid"),o.innerHTML="",o.classList.remove("status-success")},6e3)):(r.classList.remove("is-valid"),r.classList.add("is-invalid"),o.classList.remove("status-success"),o.classList.add("status-error"),o.innerHTML=e.msg.substring(4),setTimeout(function(){r.classList.remove("is-invalid"),o.innerHTML="",o.classList.remove("status-error")},6e3))}}}}(),function(){for(var a=document.querySelectorAll(".range-slider"),l=0;l<a.length;l++)!function(){var e=a[l].querySelector(".range-slider-ui"),r=a[l].querySelector(".range-slider-value-min"),n=a[l].querySelector(".range-slider-value-max"),t={dataStartMin:parseInt(a[l].dataset.startMin,10),dataStartMax:parseInt(a[l].dataset.startMax,10),dataMin:parseInt(a[l].dataset.min,10),dataMax:parseInt(a[l].dataset.max,10),dataStep:parseInt(a[l].dataset.step,10)},o=a[l].dataset.currency;noUiSlider.create(e,{start:[t.dataStartMin,t.dataStartMax],connect:!0,step:t.dataStep,pips:{mode:"count",values:5},tooltips:!0,range:{min:t.dataMin,max:t.dataMax},format:{to:function(e){return"".concat(o||"$").concat(parseInt(e,10))},from:function(e){return Number(e)}}}),e.noUiSlider.on("update",function(e,t){e=(e=e[t]).replace(/\D/g,"");t?n.value=Math.round(e):r.value=Math.round(e)}),r.addEventListener("change",function(){e.noUiSlider.set([this.value,
10null])}),n.addEventListener("change",function(){e.noUiSlider.set([null,this.value])})}()}(),function(){for(var e=document.querySelectorAll(".widget-filter"),t=function(){var r=e[o].querySelector(".widget-filter-search"),n=e[o].querySelector(".widget-filter-list").querySelectorAll(".widget-filter-item");if(!r)return"continue";r.addEventListener("keyup",function(){for(var e=r.value.toLowerCase(),t=0;t<n.length;t++)-1<n[t].querySelector(".widget-filter-item-text").innerHTML.toLowerCase().indexOf(e)?n[t].classList.remove("d-none"):n[t].classList.add("d-none")})},o=0;o<e.length;o++)t()}(),e=document.querySelector("[data-filter-trigger]"),l=document.querySelectorAll("[data-filter-target]"),null!==e&&e.addEventListener("change",function(){var e=this.options[this.selectedIndex].value.toLowerCase();if("all"===e)for(var t=0;t<l.length;t++)l[t].classList.remove("d-none");else{for(var r=0;r<l.length;r++)l[r].classList.add("d-none");document.querySelector("#"+e).classList.remove("d-none")}}),function(){for(var e=document.querySelectorAll("[data-bs-label]"),t=0;t<e.length;t++)e[t].addEventListener("change",function(){var e=this.dataset.bsLabel;try{document.getElementById(e).textContent=this.value}catch(e){e.message="Cannot set property 'textContent' of null",console.error("Make sure the [data-label] matches with the id of the target element you want to change text of!")}})}(),function(){for(var e=document.querySelectorAll('[data-bs-toggle="radioTab"]'),t=0;t<e.length;t++)e[t].addEventListener("click",function(){var e=this.dataset.bsTarget;document.querySelector(this.dataset.bsParent).querySelectorAll(".radio-tab-pane").forEach(function(e){e.classList.remove("active")}),document.querySelector(e).classList.add("active")})}(),null!==(e=document.querySelector(".credit-card-form"))&&new Card({form:e,container:".credit-card-wrapper"}),function(){var e=document.querySelectorAll("[data-master-checkbox-for]");if(0!==e.length)for(var t=0;t<e.length;t++)e[t].addEventListener("change",function(){var e=document.querySelector(this.dataset.masterCheckboxFor).querySelectorAll('input[type="checkbox"]');if(this.checked)for(var t=0;t<e.length;t++)e[t].checked=!0,e[t].dataset.checkboxToggleClass&&document.querySelector(e[t].dataset.target).classList.add(e[t].dataset.checkboxToggleClass);else for(var r=0;r<e.length;r++)e[r].checked=!1,e[r].dataset.checkboxToggleClass&&document.querySelector(e[r].dataset.target).classList.remove(e[r].dataset.checkboxToggleClass)})}(),function(){var e=document.querySelectorAll(".date-picker");if(0!==e.length)for(var t=0;t<e.length;t++){var r=void 0,n=(null!=e[t].dataset.datepickerOptions&&(r=JSON.parse(e[t].dataset.datepickerOptions)),e[t].classList.contains("date-range")?{plugins:[new rangePlugin({input:e[t].dataset.linkedInput})]}:"{}"),n=_objectSpread(_objectSpread(_objectSpread({},{disableMobile:"true"}),n),r);flatpickr(e[t],n)}}(),function(){for(var o=document.querySelectorAll('[data-bs-toggle="select"]'),a=0;a<o.length;a++)!function(){for(var e=o[a].querySelectorAll(".dropdown-item"),t=o[a].querySelector(".dropdown-toggle-label"),r=o[a].querySelector('input[type="hidden"]'),n=0;n<e.length;n++)e[n].addEventListener("click",function(e){e.preventDefault();e=this.querySelector(".dropdown-item-label").innerText;t.innerText=e,null!==r&&(r.value=e)})}()}()}();

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.