1import{l as e,u as o}from"./_scroll_helpers-CoEZCvLz.js";function t(e,o={}){try{const e=window.innerWidth,o=document.getElementById("desktopShowReelVideo");e<576&&o&&o.setAttribute("data-preloader-ignore","true")}catch(d){console.error("Preloader: Error filtering videos.",d)}const t={resourceQuery:["img:not([data-preloader-ignore])",'link[rel="stylesheet"]',"video:not([data-preloader-ignore])","audio","iframe","lottie-player",`script[src]:not([data-preloader-ignore])${["@vite/client","livewire.js","app.js","_preloader.js"].map(e=>`:not([src*="${e}"])`).join("")}`].join(","),logDetails:!1,...o};let n=0,a=0,l=!1;function r(){if(l&&a<n)return;let o=0;if(n>0?o=Math.min(100,Math.round(a/n*100)):"complete"===document.readyState&&(o=100),100===o){if(l)return;l=!0}"function"==typeof e&&e(o),t.logDetails&&console.log(`Page Load Progress: ${a}/${n} (${o}%)`)}function i(e){l||(a++,t.logDetails&&console.log(`Loaded resource (${a}/${n}): ${e}`),r())}function s(){t.logDetails&&console.log("Initializing page load percentage tracking...");const e=document.querySelectorAll(t.resourceQuery);n=e.length,document.fonts&&(n++,document.fonts.ready.then(()=>{i("document.fonts.ready (event)")}).catch(e=>{t.logDetails&&console.warn("Font loading failed (counted as handled):",e),i("document.fonts.ready (error)")})),t.logDetails&&console.log(`Found ${n} trackable resources (including fonts).`),0!==n?(e.forEach(e=>{let o="load",n=!1;const a=e.src||e.href||e.tagName;if("IMG"===e.tagName)e.complete&&(t.logDetails&&console.log("Image already complete:",a),i(a+" (already complete)"),n=!0);else if("VIDEO"===e.tagName||"AUDIO"===e.tagName)o="loadeddata",e.readyState>=3&&(t.logDetails&&console.log("Media already loaded:",a),i(a+" (already loaded)"),n=!0);else if("LINK"===e.tagName)e.sheet&&(t.logDetails&&console.log("Stylesheet already loaded from cache:",a),i(a+" (already loaded)"),n=!0);else if("IFRAME"===e.tagName)try{e.contentWindow&&"complete"===e.contentWindow.document.readyState&&(t.logDetails&&console.log("Iframe already loaded from cache:",a),i(a+" (already loaded)"),n=!0)}catch(l){t.logDetails&&console.log("Cannot check cross-origin iframe state, relying on event listener.")}else if("LOTTIE-PLAYER"===e.tagName)try{e.getLottie()&&(n=!0,i(a+" (already loaded)"))}catch(d){t.logDetails&&console.log("Error handling LOTTIE-PLAYER resource.")}if(!n){const n=()=>{i(a+" (event)"),r()},l=()=>{t.logDetails&&console.warn("Failed to load (counted as handled):",a),i(a+" (error)"),r()},r=()=>{e.removeEventListener(o,n),e.removeEventListener("error",l)};e.addEventListener(o,n),e.addEventListener("error",l)}}),r()):r()}window.addEventListener("load",function(){function e(){if(l)return;!function(e,o){e.forEach(e=>{let t=!0;const n=e.src||e.href||e.tagName;if("IMG"===e.tagName)e.complete||(t=!1);else if("VIDEO"===e.tagName||"AUDIO"===e.tagName)e.readyState>=3||(t=!1);else if("LINK"===e.tagName)e.sheet||(t=!1);else if("IFRAME"===e.tagName)try{e.contentWindow&&"complete"===e.contentWindow.document.readyState||(t=!1)}catch(a){o.logDetails&&console.log("Cannot check cross-origin iframe state, relying on event listener.")}else if("LOTTIE-PLAYER"===e.tagName)try{e.getLottie()||(t=!1)}catch(d){o.logDetails&&console.log("Error handling LOTTIE-PLAYER resource.")}t||o.logDetails&&console.error(`Resource tracked unsuccessfully: ${n}`)})}(document.querySelectorAll(t.resourceQuery),t),t.logDetails&&console.log("Preloader is forcing 100% completion."),n>0?a=n:(n=1,a=1),r()}const o=document.querySelectorAll("video, audio");let i=!1;o.forEach(e=>{!e.hasAttribute("data-preloader-ignore")&&e.readyState<3&&(i=!0)}),i?(t.logDetails&&console.log('Window "load" fired but media is pending. Starting a 1-second grace period.'),setTimeout(e,1e3)):setTimeout(e,250)}),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",s):s()}!function(){const n=window.innerWidth;let a=.6;n>=576&&(a=.44),n>=1200&&(a=.34);const l=n*a,r=document.documentElement,i=document.body;let s=i.classList.contains("quick_preloader");const d=i.classList.contains("is_testing_env");s?history.scrollRestoration="auto":(history.scrollRestoration&&(history.scrollRestoration="manual"),window.scrollTo(0,0)),e(r,i);let c=0,u=0,m=null,g=!1,y=null,f=!1;if(i.classList.contains("preloader_disabled"))return;const h=document.querySelector("#s_preloader");if(!h)return void console.error("Preloader container #s_preloader not found.");const p=h.querySelector(".loader"),w=h.querySelector(".loader_text_ctn"),v=h.querySelector(".loader_text");let E=!1;function L(){if(E)return;E=!0,y&&clearTimeout(y),p&&!s&&(p.classList.add("animate"),p.style.left=0,p.style.width="100%",setTimeout(()=>{p.style.top=0,p.style.height="100vh"},400));setTimeout(()=>{h.style.opacity=0,i.classList.remove("preloader_active"),setTimeout(()=>{h.style.display="none",o(r,i),window.dispatchEvent(new CustomEvent("preloader-loaded"))},500)},s?0:820)}function D(){if(u>=100&&!g)return g=!0,v&&(v.textContent="100%"),p&&(p.style.width=l+"px"),L(),void(m&&(cancelAnimationFrame(m),m=null));if(c>=u&&u>0)return void(m=null);c+=.08*(u-c);const e=Math.min(100,Math.round(c));if(v&&(v.textContent=e+"%"),p){const e=Math.min(c,100)/100*l;p.style.width=e+"px"}m=requestAnimationFrame(D)}function S(e){u=Math.max(u,e),m||g||(m=requestAnimationFrame(D)),clearTimeout(y),f=!1,e>=82&&!f&&!g&&(f=!0,d&&console.log("Preloader at 82%+. Starting 3-second failsafe timer."),y=setTimeout(()=>{d&&console.warn("Preloader appears stuck near completion. Forcing end via smart timeout."),m&&(cancelAnimationFrame(m),m=null),u=100,D()},3e3))}if(d&&t(e=>{},{logDetails:!0}),window.innerWidth<576&&document.querySelector("#s_projects_overview")&&(s=!0,i.classList.add("quick_preloader")),s)L();else if(window.innerWidth<576&&document.querySelector("#home #s_hero")){const e=document.getElementById("mobileShowReelVideo");e?function(e){const o=()=>{const o=e.play();void 0!==o?o.then(()=>{L()}).catch(()=>{console.warn("Autoplay failed. Initialise manual page load..."),t(S)}
1):(console.warn("Autoplay playPromise returned undefined. Initialise manual page load..."),t(S))};e.readyState>=4?(d&&console.log("Video already playable. Attempting to play immediately."),o()):(d&&console.log('Video not ready. Waiting for the "canplay" event.'),e.addEventListener("canplay",o,{once:!0}))}(e):(console.error("The mobile ShowReel video could not be found in the DOM. Therefore we will end the preloader."),L())}else setTimeout(()=>{w.style.display="block",t(S)},320)}();
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.