PageSourceSearch

https://www.silverstonemuseum.co.uk/app/brands/default/3916.9cbab6db81ae86429bcb.js

js silverstonemuseum.co.uk collected 2026-09-24 20:11:49 UTC 10,556 bytes, 1 lines download raw bytes

1(globalThis.webpackChunkloop_web=globalThis.webpackChunkloop_web||[]).push([[3916],{8418(t,e,i){"use strict";i.d(e,{Mc:()=>d,R9:()=>c,YB:()=>u,fs:()=>a,ss:()=>h});const s=window.matchMedia("(prefers-reduced-motion: reduce)");let n=!1,o=null,l=!1;try{var r=Object.defineProperty({},"passive",{get:function(){l=!0}});window.addEventListener("testPassive",null,r),window.removeEventListener("testPassive",null,r)}catch(t){}const a={supportsPassive:l,reducedMotionPref:s.matches,desktopSideHeaderLayout:null!=document.querySelector("body.site-layout.side-header-layout"),fx:[],fxAdd:(t,e,i=null)=>{let s=!1;if(a.fx.forEach(e=>{e.type==t&&(s=!0)}),!s){a.fx.push({type:t,enabled:e,callback:i,controller:document.createElement("div")});let s=a.fx.length-1,n=a.fx[s];n.controller.setAttribute("class","form-check form-switch");let o=document.createElement("input");o.setAttribute("id",`site-settings--fx--${s}`),o.setAttribute("class","form-check-input"),o.setAttribute("type","checkbox"),o.setAttribute("role","switch"),e&&o.setAttribute("checked",!0),o.addEventListener("click",()=>{a.fxToggle(n.type,o.checked)}),n.controller.appendChild(o);let l=document.createElement("label");l.setAttribute("for",`site-settings--fx--${s}`),l.setAttribute("class","form-check-label"),l.innerHTML=n.type,n.controller.appendChild(l)}i&&i(e),n||(()=>{if(null!=document.body.querySelector("#top-utility-bar")){let t=document.body.querySelector("#top-utility-bar--icon-links ul");if(null!=t){let e=document.createElement("li");e.classList.add("list-inline-item"),e.innerHTML='<button class="btn btn-link p-0" data-bs-toggle="modal" data-bs-target="#site-settings"><i class="fa-solid fa-cog" aria-hidden="true" title="Site settings"></i><span class="sr-only">Site settings</span></button>',t.appendChild(e)}else{let t=document.body.querySelector("#top-utility-bar--content"),e=document.createElement("div");e.setAttribute("id","top-utility-bar--icon-links"),e.innerHTML='<ul class="list-inline m-0"><li class="list-inline-item"><button class="btn btn-link p-0" data-bs-toggle="modal" data-bs-target="#site-settings"><i class="fa-solid fa-cog" aria-hidden="true" title="Site settings"></i><span class="sr-only">Site settings</span></button></li></ul>',t.appendChild(e)}}else{let t=document.body.querySelector("#main-header--content");if(null!=t){let e=document.createElement("button");e.setAttribute("id","main-header--content--site-settings-btn"),e.setAttribute("class","btn btn-link"),e.setAttribute("data-bs-toggle","modal"),e.setAttribute("data-bs-target","#site-settings"),e.innerHTML='<i class="fa-solid fa-cog" aria-hidden="true" title="Site settings"></i><span class="side-menu-layout--label">Site settings</span>',t.appendChild(e)}}let t=document.body.querySelector("#main-footer--mid-section--links ul");if(null!=t){let e=document.createElement("li");e.innerHTML='<a href="#site-settings" data-bs-toggle="modal" data-bs-target="#site-settings">Site settings</a>',t.appendChild(e)}n=!0})(),(()=>{if(!o){let t=document.createElement("div");t.setAttribute("id","site-settings"),t.setAttribute("class","modal fade"),t.setAttribute("data-bs-backdrop","static"),t.setAttribute("data-bs-keyboard","false"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true"),t.innerHTML='<div class="modal-dialog"><div class="modal-content theme--default"><div class="modal-header"><h1 class="modal-title h5 m-0">Site Settings</h1><button type="button" class="btn btn-link p-0" data-bs-dismiss="modal" aria-label="Close"><i class="fa-regular fa-times" aria-hidden="true" title="Close"></i></button></div><div class="modal-body"></div></div>',document.body.appendChild(t),o=document.body.querySelector("#site-settings .modal-body")}a.fx.length>0&&(o.innerHTML="<p>Manage the visual effects on this site:</p>",a.fx.forEach(t=>{o.appendChild(t.controller)}))})()},fxToggle:(t,e)=>{a.fx.forEach(i=>{i.type==t&&(i.enabled=e,i.callback&&i.callback(e))})}},c={vw:0,vh:0,setVw:t=>{c.vw=t},setVh:t=>{c.vh=t}},h={active:!1,setActive:t=>{h.active=t}},d={mobileActive:!1,setMobileActive:t=>{d.mobileActive=t},desktopActive:!1,setDesktopActive:t=>{d.desktopActive=t}},u={active:!1,setActive:t=>{u.active=t}}},3916(t,e,i){"use strict";
1i.r(e),i.d(e,{createFrom:()=>a});var s=i(8418),n=i(7819),o=i.n(n);const l=(t,e,i)=>t<e?e:t>i?i:t;class r{constructor(t,e){this.el=t,this.index=e,this.inView=!1,this.elInner=t.querySelector(".scroll-content--inner"),this.sections=[],this.containerHeight=0,this.offsetTop=0,this.scrollY=0,this.activeIndex=0;let i=t.querySelectorAll(".scroll-content--section");if(null!=i&&i.forEach(t=>{this.sections.push({el:t,inner:t.querySelector(".scroll-content--section--inner")})}),this.updateSizes(),this.withIndicators=this.el.classList.contains("scroll-content--with-indicators"),this.withIndicators){this.indicators={},this.indicators.wrapper=document.createElement("DIV"),this.indicators.wrapper.classList.add("scroll-content--indicators"),this.indicators.wrapper.setAttribute("aria-hidden","true"),this.indicators.items=[];for(let t=0,e=this.sections.length;t<e;t++)this.indicators.items[t]=document.createElement("DIV"),this.indicators.items[t].inner=document.createElement("SPAN"),this.indicators.items[t].appendChild(this.indicators.items[t].inner),t==this.activeIndex&&this.indicators.items[t].classList.add("active"),this.indicators.items[t].onclick=()=>{this.setSection(t)},this.indicators.wrapper.appendChild(this.indicators.items[t]);this.elInner.appendChild(this.indicators.wrapper)}let n=this;this.hunt=new(o())(this.el,{leave:function(){n.inView=!1},enter:function(){n.inView=!0},persist:!0}),window.addEventListener("scroll",()=>{this.inView&&this.updateScroll()},!!s.fs.supportsPassive&&{passive:!0}),window.addEventListener("window-resize",()=>{this.updateSizes()}),this.ro=new ResizeObserver(()=>{this.updateSizes()}),this.ro.observe(this.el),this.el.classList.add("ready"),window.dispatchEvent(new Event("scroll"))}updateSizes(){this.containerHeight=this.elInner.offsetHeight,this.offsetTop=this.el.getBoundingClientRect().top+window.scrollY;let t=0;for(let e=0,i=this.sections.length;e<i;e++){let i=this.sections[e].el.offsetHeight;this.sections[e].h=i,this.sections[e].threshold=t,this.sections[e].overflow=i>this.containerHeight,this.sections[e].travel=i-this.containerHeight,this.sections[e].progressStart=t+this.containerHeight/2,this.sections[e].progressEnd=t+i-this.containerHeight/2,this.sections[e].progressDistance=this.sections[e].progressEnd-this.sections[e].progressStart,t+=i+100}t+=this.containerHeight,this.el.style.height=`${t}px`,this.updateScroll()}updateScroll(){if(this.inView){let t=window.scrollY-this.offsetTop;this.scrollY=t>0?t:0;let e=0;for(let t=this.sections.length-1;t>=0;t--)if(this.scrollY>=this.sections[t].threshold){e=t;break}if(e!=this.activeIndex){if(this.withIndicators)for(let t=0,i=this.sections.length;t<i;t++)this.indicators.items[t].classList.toggle("active",t==e);let t=this.sections[this.activeIndex];t.el.classList.remove("show"),t.el.setAttribute("aria-hidden","true"),t.el.ontransitionend=()=>{this.activeIndex=e,this.sections[this.activeIndex].el.classList.add("show"),this.sections[this.activeIndex].el.removeAttribute("aria-hidden"),t.el.ontransitionend=null}}let i=0;if(this.withIndicators&&(i=this.activeIndex<this.sections.length-1?(this.scrollY-this.sections[this.activeIndex].threshold)/(this.sections[this.activeIndex+1].threshold-this.sections[this.activeIndex].threshold):(this.scrollY-this.sections[this.activeIndex].threshold)/this.sections[this.activeIndex].h,i=l(i,0,1),this.indicators.items[this.activeIndex].inner.style.transform=`scaleY(${i})`),this.sections[this.activeIndex].overflow){i=(this.scrollY-this.sections[this.activeIndex].progressStart)/this.sections[this.activeIndex].progressDistance,i=l(i,0,1);let t=this.sections[this.activeIndex].travel*i;this.sections[this.activeIndex].inner.style.transform=`translateY(-${t}px)`}}}setSection(t){t!=this.activeIndex&&window.scrollTo({top:this.offsetTop+this.sections[t].threshold,left:0,behavior:"instant"})}}function a(t){t.forEach((t,e)=>{1===t.nodeType&&new r(t,e)})}},7819(t){t.exports=function(){var t=function(){},e=100;function i(t,i){var s,n,o;return void 0===i&&(i=e),function(){!0===s?(clearTimeout(n),n=setTimeout(function(){Date.now()-o>=i&&(t.apply(this,arguments),o=Date.now())},i-(Date.now()-o))):(t.apply(this,arguments),o=Date.now(),s=!0)}}var s=function(t,e){for(var i in this.element=t,this.visible=!1,e)Object.hasOwnProperty.call(e,i)&&(this[i]=e[i]);if(void 0!==t.dataset){if(void 0!==t.dataset.huntPersist)try{this.persist=JSON.parse(t.dataset.huntPersist)}catch(t){}if(void 0!==t.dataset.huntOffset)try{this.offset=JSON.parse(t.dataset.huntOffset)}catch(t){}}};s.prototype.offset=0,s.prototype.persist=!1,s.prototype.enter=t,s.prototype.leave=t;var n=function(t,e){if(!(t&&1===t.nodeType||"number"==typeof t.length))throw new TypeError("hunt: observer first argument should be a node or a list of nodes");if("object"!=typeof e)throw new TypeError("hunt: observer second argument should be an object");
1if(1===t.nodeType)this.__huntedElements__=[new s(t,e)];else{var i=[].slice.call(t);this.__huntedElements__=i.map(function(t){return new s(t,e)})}this.__viewportHeight__=window.innerHeight,this.__connect__(e.throttleInterval)};return n.prototype.__connect__=function(t){this.__throttledHuntElements__=i(this.__huntElements__.bind(this),t),this.__throttledUpdateMetrics__=i(this.__updateMetrics__.bind(this),t),window.addEventListener("scroll",this.__throttledHuntElements__),window.addEventListener("resize",this.__throttledUpdateMetrics__),this.__huntElements__()},n.prototype.__huntElements__=function(){for(var e=this.__huntedElements__.length;e;){var i=this.__huntedElements__[--e],s=i.element.getBoundingClientRect(),n=s.top-i.offset<this.__viewportHeight__&&s.top>=-(s.height+i.offset);!1===i.visible&&!0===n&&(i.enter.call(null,i.element),i.visible=!0,i.leave===t&&!0!==i.persist&&(this.__huntedElements__.splice(e,1),0===this.__huntedElements__.length&&this.disconnect())),!0===i.visible&&!1===n&&(i.leave.call(null,i.element),i.visible=!1,!0!==i.persist&&(this.__huntedElements__.splice(e,1),0===this.__huntedElements__.length&&this.disconnect()))}},n.prototype.__updateMetrics__=function(){this.__viewportHeight__=window.innerHeight,this.__huntElements__()},n.prototype.disconnect=function(){window.removeEventListener("scroll",this.__throttledHuntElements__),window.removeEventListener("resize",this.__throttledUpdateMetrics__)},n.prototype.trigger=function(){this.__huntElements__()},n}()}}]);

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.