PageSourceSearch

https://niallhoran.com/cdn/shop/t/56/assets/theme.bundle.js?v=157328288128894087361789132637

js niallhoran.com collected 2026-09-24 21:08:49 UTC 16,169 bytes, 1 lines download raw bytes

1(self.webpackChunkgcom_rhythm=self.webpackChunkgcom_rhythm||[]).push([[3930,6694,7642],{7223(e,t,i){"use strict";i.d(t,{U:()=>c});var s=i(5805);const n=Object.freeze({none:"none",static:"static",sticky:"sticky",fixed:"fixed",dynamic:"dynamic",siteHeader:"site-header",dynamicHidden:"dynamic_hidden",umgSticky:"umg-sticky",headerGroupSelector:".shopify-section-group-header-group"});class r{constructor(e){this.element=e,this.isSiteHeader=!1,this.computedStyle=window.getComputedStyle(this.element),this.isSticky=this.computedStyle.position===n.sticky,this.isFixed=this.computedStyle.position===n.fixed,this.isHidden=this.computedStyle.display===n.none,this.isDynamicHidden=!1,this.resetStyles(),this.resetVars()}resetStyles(){this.element.classList.remove(n.dynamicHidden),this.element.style.transform="",this.element.style.top="",this.element.classList.add(n.umgSticky,"transition-[transform]")}resetVars(){this.computedStyle=window.getComputedStyle(this.element),this.isSticky=this.computedStyle.position===n.sticky,this.isFixed=this.computedStyle.position===n.fixed,this.isHidden=this.computedStyle.display===n.none,this.isDyanmicHidden=!1}dynamicShow(){!this.isSiteHeader&&this.isSticky||(this.element.classList.remove(n.dynamicHidden),this.element.style.transform="none",this.isDynamicHidden=!1)}dynamicHide(){!this.isSiteHeader&&this.isSticky||(this.element.classList.add(n.dynamicHidden),this.element.style.transform="translateY(calc(-1 * var(--header-group-height)))",this.isDynamicHidden=!0)}}class o extends r{constructor(e){super(e),this.isSiteHeader=!0,this.wrapper=this.element.querySelector(".header__wrapper"),this.isMd=null!==this.wrapper&&this.wrapper.classList.contains("header__wrapper--md"),this.behaviors=this.setBehaviors(),this.updateHeaderPositions(),this.resetVars()}setBehaviors(){const e={dynamic:!1,headerPosition:n.static,groupPosition:n.static},t=this.wrapper?.dataset.position??null,[i,s]=t?.split("_")??[null,null];return i&&s?(e.dynamic=i===n.dynamic,e.headerPosition=s,e.groupPosition=s===n.fixed?n.fixed:n.static,e):e}updateHeaderPositions(){const e=this.isMd?"-md":"";document.body.style.setProperty(`--header-group-header-position${e}`,this.behaviors.headerPosition),document.body.style.setProperty(`--header-group-position${e}`,this.behaviors.groupPosition)}}class a{constructor(e){this.element=e,this.computedStyle=window.getComputedStyle(this.element),this.isHidden=this.computedStyle.display===n.none,this.isSticky=this.computedStyle.position===n.sticky,this.isFixed=this.computedStyle.position===n.fixed}}class d{constructor(e){this.headers=e,this.siteHeaders=this.headers.filter(e=>e.isSiteHeader),this.stickyElements=[],this.fixedGroup=this.siteHeadersBehave("headerPosition","fixed"),this.hasDynamicHeaders=this.siteHeadersBehave("dynamic",!0),this.dynamicTargets=[],this.scrollEventCallback=null}siteHeadersBehave(e,t){for(const i of this.siteHeaders)if(!i.isHidden&&i.behaviors[e]===t)return!0;return!1}hideDynamicTargets(){for(const e of this.dynamicTargets)e.dynamicHide(),this.updateMeasurements()}showDynamicTargets(){for(const e of this.dynamicTargets)e.dynamicShow(),this.updateMeasurements()}updateInitialMeasurements(){return this.updateMeasurements(!0)}updateMeasurements(e=!1){let t=0,i=0,s=0,n=0;const r=[];for(const e of this.headers){if(!e.isHidden){let r=e.element.offsetHeight;0===r&&(r=e.element.querySelector("div")?.offsetHeight??0),t+=r,e.isDynamicHidden||(i+=r,(e.isSticky||e.isFixed)&&(s+=r)),document.body.style.setProperty(`--header-item-height-${n}`,i+"px"),document.body.style.setProperty(`--header-item-sticky-height-${n}`,s+"px"),e.element.style.top=0===n?"0":e.isSticky?`var(--header-item-sticky-height-${n-1})`:`var(--header-item-height-${n-1})`,n++}r.push(e.element)}for(const e of this.stickyElements)if(!r.includes(e.element)){if(!e.isHidden){let t=e.element.offsetHeight;0===t&&(t=e.element.querySelector("div")?.offsetHeight??0),(e.isSticky||e.isFixed)&&(s+=t),document.body.style.setProperty(`--header-item-sticky-height-${n}`,s+"px"),e.element.style.top=0===n?"0":`var(--header-item-sticky-height-${n-1})`,n++}r.push(e.element)}document.body.style.setProperty("--header-group-height",t+"px"),document.body.style.setProperty("--header-sticky-height",s+"px"),e&&document.body.style.setProperty("--header-group-height-init",t+"px")}setScrollListener(){const e=window.scrollY;for(const t of this.siteHeaders){const i=t.isSiteHeader&&t.behaviors.dynamic;!t.isHidden&&i&&(this.dynamicTargets=t.isFixed?this.headers:[t],this.scrollEventCallback=l(e,this),window.addEventListener("scroll",this.scrollEventCallback,{passive:!0}))}}}class c{constructor(){this.headerGroup=null,this.stickyElements=[],this.resizeObserver=null,this.resizeObserverFrame=null,document.addEventListener("DOMContentLoaded",()=>this.buildInitialHeaders()),window.addEventListener("resize",(0,s.sg)(()=>this.buildHeaders(!1),100)),Shopify.designMode&&(document.addEventListener("shopify:section:load",()=>this.buildInitialHeaders()),document.addEventListener("shopify:section:unload",()=>this.buildInitialHeaders()),document.addEventListener("shopify:section:reorder",()=>this.buildInitialHeaders()))}static getInstance(){return c.instance||(c.instance=new c),c.instance}buildInitialHeaders(){return this.buildHeaders(!0)}buildHeaders(e=!1){this.headerGroup?.scrollEventCallback&&window.removeEventListener("scroll",this.headerGroup.scrollEventCallback),this.disconnectResizeObserver();const t=document.querySelectorAll(n.headerGroupSelector),i=[];for(const[s,a]of t.entries()){const t=a.classList.contains(n.siteHeader)?new o(a):new r(a);e&&(t.element.dataset.initialIndex=s.toString()),i.push(t)}const s=new d(i);this.stickyHeaderOrderManager(s),this.headerGroup=s,this.setStickyElements(),this.headerGroup.stickyElements=this.stickyElements,s.updateInitialMeasurements(),s.hasDynamicHeaders&&s.setScrollListener(),this.setResizeObserver()}setStickyElements(){const e=Array.from(document.querySelectorAll("."+n.umgSticky)).filter(e=>window.getComputedStyle(e).position===n.sticky),t=[];for(const i of e)t.push(new a(i));this.stickyElements=t}setResizeObserver(){if(!window.ResizeObserver||!this.headerGroup)return;this.resizeObserver=new ResizeObserver(()=>{null===this.resizeObserverFrame&&(this.resizeObserverFrame=window.requestAnimationFrame(()=>{this.resizeObserverFrame=null,this.updateMeasurements()}))});const e=new Set([...this.headerGroup.headers.map(e=>e.element),...this.stickyElements.map(e=>e.element)]);for(const t of e)this.resizeObserver.observe(t)}disconnectResizeObserver(){this.resizeObserver?.disconnect(),this.resizeObserver=null,null!==this.resizeObserverFrame&&(window.cancelAnimationFrame(this.resizeObserverFrame),this.resizeObserverFrame=null)}stickyHeaderOrderManager(e){if(null!=e){let t=0;for(const i of[...e.headers].reverse())if(e.headers.splice(e.headers.indexOf(i),1),e.fixedGroup&&i.isSticky)e.headers.unshift(i),t+=1;else{const s=i.element.dataset.initialIndex;if(!s)return;e.headers.splice(parseInt(s,10)+t,0,i)}}}updateMeasurements(){return this.headerGroup?.updateMeasurements()}}c.instance=null;const l=(e,t)=>
1{let i=e;return()=>{const e=window.scrollY,s=i>e;document.body.dataset.scrolled=String(window.scrollY>0);const r=document.querySelectorAll("."+n.siteHeader+" predictive-search");for(const e of r)e.close();if(s&&"up"!==document.body.dataset.scrollDirection)t.showDynamicTargets(),document.body.dataset.scrollDirection="up";else if(!s&&"down"!==document.body.dataset.scrollDirection){if(window.scrollY<=0)return;t.hideDynamicTargets(),document.body.dataset.scrollDirection="down"}i=e}}},6036(){window.addEventListener("load",()=>{const e=document.querySelector(".shopify-section.hero-banner");if(null!==e){const t=e.querySelectorAll(".hero-cta"),s=document.getElementById("sticky-nav");if(null!==t)for(const e of t){const t=document.getElementById(e.dataset.id);e.addEventListener("click",()=>{if(null!==t){t.scrollIntoView({block:"center",behavior:"smooth"});const e=window.scrollY;e&&window.scroll(0,e-s.getBoundingClientRect().height),i(t)}})}}const t=document.querySelectorAll('[href^="#"]');if(t.length>0)for(const e of t)if(void 0!==e.href){const t=new URL(e.href).hash;t&&e.addEventListener("click",e=>{e.preventDefault();const s=t.replace("#",""),n=document.getElementById(s);if(null===n)return;const r=document.querySelector("header"),o=window.getComputedStyle(r).getPropertyValue("--header-sticky-height").replace(/[^\d]/g,"");var a,d;a=n,d=o,window.scrollTo({behavior:"smooth",top:a.getBoundingClientRect().top-document.body.getBoundingClientRect().top-d}),i(n)})}function i(e){e.tabIndex<0&&(e.setAttribute("tabindex","-1"),e.classList.add("focus-visible:outline-none")),e.focus({preventScroll:!0})}})},7487(e,t,i){"use strict";i(7223),i(6036);(window.location.pathname.includes("collections")||window.location.pathname.includes("search"))&&(i.e(196).then(i.bind(i,2153)).then(e=>{customElements.define("side-drawer",e.SideDrawer)}),i.e(6893).then(i.bind(i,3616)).then(e=>{customElements.define("facets-filters",e.FacetsFilters)})),document.querySelector("collection-view-more")&&i.e(7667).then(i.bind(i,768)).then(e=>{customElements.define("collection-view-more",e.CollectionViewMore)}),document.querySelector("visual-pagination")&&i.e(2340).then(i.bind(i,1777)).then(e=>{customElements.get("visual-pagination")||customElements.define("visual-pagination",e.VisualPagination)}),document.querySelector("product-gating-info")&&i.e(9738).then(i.t.bind(i,4979,23));const s=document.getElementById("particle-animation-container");s&&Promise.all([i.e(5593),i.e(3096)]).then(i.bind(i,7509)).then(({ParticleAnimation:e})=>e.init(s)),document.querySelector(".product_card")&&i.e(2388).then(i.bind(i,9883)).then(e=>{e.attachProductCardSelectedListeners()});document.querySelectorAll('.swiper__parent, [data-items-element="swiper__parent"]').length>0&&Promise.all([Promise.all([i.e(496),i.e(1413),i.e(3125)]).then(i.bind(i,5854)),i.e(2388).then(i.bind(i,9883))]).then(([e,t])=>{e.carouselInit(),t.initCarouselProductCardImpressions()});const n=()=>{document.querySelector("iframe[lazy-iframe][data-src]")&&i.e(9170).then(i.bind(i,6471)).then(e=>e.initLazyIframes())};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",n):n(),document.addEventListener("DOMContentLoaded",function(){const e=Array.from(document.querySelectorAll("video.lazy-video")),t={root:null,rootMargin:"30px",threshold:.2},i=(e,t)=>{Array.from(e.children).forEach(e=>{"SOURCE"===e.tagName&&(e.src=e.dataset.src)}),e.load(),t&&(e.play(),e.setAttribute("data-play-press",!0))},s=(e,t)=>{const s=e.previousElementSibling;s&&"BUTTON"===s.tagName?s.addEventListener("click",()=>{i(e,!0)}):i(e,!t)};e.forEach(e=>{const i=e.getAttribute("autoplay");"IntersectionObserver"in window?((e,i)=>{new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&(s(e.target,i),e.target.classList.remove("lazy-video"),t.unobserve(e.target))})},t).observe(e)})(e,i):s(e)})})},5805(e,t,i){"use strict";function s(e,t=100){let i=null;return function(...s){null===i&&(i=setTimeout(()=>{e.apply(this,s),i=null},t))}}function n(e,t){let i;return(...s)=>{clearTimeout(i),i=setTimeout(()=>e.apply(this,s),t)}}i.d(t,{DT:()=>v,Dz:()=>r,aM:()=>g,nF:()=>s,oM:()=>a,qF:()=>d,sg:()=>n,up:()=>w});function r(e="json"){return{method:"POST",headers:{"Content-Type":"application/json",Accept:`application/${e}`}}}const o={};function a(e,t=e){const i=function(e){return Array.from(e.querySelectorAll('summary, a[href], button:enabled, [tabindex]:not
1([tabindex^="-"]), [draggable], area, input:not([type=hidden]):enabled, select:enabled, textarea:enabled, object, iframe'))}(e),s=i[0],n=i[i.length-1];d(),o.focusin=t=>{t.target!==e&&t.target!==n&&t.target!==s||document.addEventListener("keydown",o.keydown)},o.focusout=function(){document.removeEventListener("keydown",o.keydown)},o.keydown=function(t){"TAB"===t.code.toUpperCase()&&(t.target!==n||t.shiftKey||(t.preventDefault(),s.focus()),t.target!==e&&t.target!==s||!t.shiftKey||(t.preventDefault(),n.focus()))},document.addEventListener("focusout",o.focusout),document.addEventListener("focusin",o.focusin),t.focus()}function d(e=null){document.removeEventListener("focusin",o.focusin),document.removeEventListener("focusout",o.focusout),document.removeEventListener("keydown",o.keydown),e&&e.focus()}let c,l=0,u=[];function h(e){return function(e){let t="string"!=typeof e?JSON.stringify(e):e;try{t=JSON.parse(t)}catch(e){return!1}return"object"==typeof t&&null!==t}(e)?"string"!=typeof e?e:JSON.parse(e):null}function m(e){return"group_purchase_limits"===e?.errorSource}function p(){return window.refreshSections([{id:"cart-drawer"},{id:"header-cart-count"},{id:"header-cart-count_md"}])}function y(e){const t=Number(e.getAttribute("qty"));return Number.isNaN(t)?0:t}function f(e,t={}){const i=new URLSearchParams;let s=!1;e.forEach(e=>{const n=Number(e.limit),r=(o=e.handle,Array.from(document.querySelectorAll("[data-group-handle]")).filter(e=>e.dataset.groupHandle===o));var o;let a=r.reduce((e,t)=>e+y(t),0)-n;if(Number.isNaN(n)||a<=0)return;const d=r.find(e=>function(e,t){return t?.editedLineKey&&e.dataset.lineKey===t.editedLineKey||t?.editedVariantId&&e.getAttribute("variant_id")===t.editedVariantId}(e,t));(d?[d,...r.filter(e=>e!==d)]:r).forEach(e=>{if(a<=0)return;const t=function(e){return e.dataset.lineKey||e.getAttribute("variant_id")}(e),n=y(e),r=Math.max(n-a,0),o=n-r;!t||o<=0||(a-=o,s=!0,i.append(`updates[${t}]`,String(r)))})}),s&&fetch("/cart/update.js",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},credentials:"same-origin",body:i.toString()}).then(e=>e.json()).then(p)}function g(e,t){const i=[],s=h(t.errors?t.errors:t.message);if(s){const t=s;let n=[];const r=t.filter(m),o=t.filter(e=>!m(e));r.length&&f(r,e),o.length&&function(e){let t=e;0===l&&(c=e),1===l&&(u=[...c,...e],t=u);const i=new URLSearchParams;let s=!1;t.forEach(e=>{const t=e.productLevelLimit;let n=t;const r=e.variants;Array.isArray(r)&&r.forEach(e=>{const r=e.id;if(!r)return;const o="cart-item--"+r,a=document.getElementById(o)?.getAttribute("qty"),d=e.maxVariantLimit;let c=t;(null===c||null!==d&&d<c)&&(c=d);const l=null===c?-1:Number(c);let u;u=a<=l||-1===l?a:l,-1!==n&&(u>n&&(u=n),n&&(n<u?n=0:n-=u)),u!==a&&(s=!0),i.append(`updates[${r}]`,String(u))})}),s&&fetch("/cart/update.js",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},credentials:"same-origin",body:i.toString()}).then(e=>e.json()).then(e=>{422===e.status&&0===l&&(l++,g(null,e)),p()})}(o),e?.component_ids?n=[...e.component_ids]:e?.id&&n.push(e.id);let a=!1;t.forEach(e=>
1{e.variants?.length&&e.variants.forEach(t=>{null!==t.maxVariantLimit&&""!==t.error&&""!==t.cartLevelError&&(a=!0,n.includes(e.id)?i.push(t.error):i.push(t.cartLevelError))}),null===e.productLevelLimit||""===e.error||""===e.cartLevelError||a||(n.includes(e.id)?i.push(e.error):i.push(e.cartLevelError))})}else i.push(t.errors?t.errors:t.description);throw i}function v(e){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 w(e){const t=window.shopCurrencyFormat;if(isNaN(e)||!t)return"";const i=parseFloat((e/100).toString()),s=t.includes("amount")&&!t.includes("amount_")||t.includes("amount_with_comma_separator")||t.includes("amount_with_apostrophe_separator")||t.includes("amount_with_space_separator")||t.includes("amount_with_period_and_space_separator")?2:0,n=(e,t=",")=>e.replace(/\B(?=(\d{3})+(?!\d))/g,t);let r=i.toFixed(s);return r=t.includes("amount_with_comma_separator")?n(r.replace(".",","),"."):t.includes("amount_no_decimals_with_comma_separator")?n(parseInt(i).toString(),"."):t.includes("amount_with_apostrophe_separator")?n(r,"'"):t.includes("amount_no_decimals_with_space_separator")?n(parseInt(i).toString()," "):t.includes("amount_with_space_separator")?n(r," "):t.includes("amount_with_period_and_space_separator")?n(r.replace("."," ")," "):t.includes("amount_no_decimals")?parseInt(i).toString():n(r),((e,t)=>t.replace(/{{\s*amount.*?\s*}}/,e))(r,t)}}},e=>{var t;t=7487,e(e.s=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.