{
  "version": 3,
  "sources": ["/cdn/shop/t/116/assets/custom.js?cb=12620"],
  "sourcesContent": ["// Galore perf: the free-shipping progress bar was retired (Jan 2026). Its\n// entire DOMContentLoaded block \u2014 the bar updater, a /cart.js fetch fired on\n// every cart:update, and a sessionStorage cache \u2014 has been removed, along with\n// its markup (cart-drawer.liquid / cart-summary.liquid) and CSS. The\n// cart-drawer rescue listener below is a separate concern and stays.\n\n\n\n// Galore: cart drawer rescue. Horizon's morphSection() wasn't reliably\n// applying the AJAX response to the cart-items-component when the cart\n// transitioned from empty (server-rendered empty branch in cart-drawer.liquid)\n// to populated. The result: drawer auto-opens after add but still shows\n// \"Add items to your cart\". Verified via Chrome MCP that the response has\n// the right HTML; just the morph isn't writing it through.\n//\n// This listener mirrors the same cart:update event the cart-items-component\n// listens to, but does a direct innerHTML replace of the cart-items-component\n// using the new HTML extracted from the response \u2014 which works regardless of\n// whether morph succeeds. Also clears the .cart-drawer--empty class on the\n// dialog so the empty-cart styling stops applying.\ndocument.addEventListener(\"cart:update\", (event) => {\n  const sections = event?.detail?.data?.sections;\n  if (!sections) return;\n\n  document.querySelectorAll(\"cart-items-component\").forEach((ci) => {\n    const sectionId = ci.dataset.sectionId;\n    const html = sections[sectionId];\n    if (!html) return;\n\n    // Pull the new cart-items-component out of the response HTML and\n    // copy its inner content into our existing element in place. We keep\n    // the SAME outer element so refs and event listeners stay attached.\n    let parsed;\n    try {\n      parsed = new DOMParser().parseFromString(html, \"text/html\");\n    } catch (e) {\n      return;\n    }\n    const newCi = parsed.querySelector(\n      `cart-items-component[data-section-id=\"${sectionId}\"]`\n    );\n    if (!newCi) return;\n    if (newCi.innerHTML === ci.innerHTML) return;\n    ci.innerHTML = newCi.innerHTML;\n  });\n\n  // Galore fix (Claude, 2026-10-14): on a brand-new visit (bag empty when the page\n  // loaded) component-cart-items.js was never loaded, because cart-products.liquid\n  // only writes its <script type=\"module\"> when the cart has items. The swap above\n  // brings that <script> in with the new HTML, but scripts added this way never run,\n  // so <cart-items-component> stays an undefined element: the bag's +, - and Remove\n  // did nothing (the box changed, the cart did not, and Check out sent the box's\n  // number). Import the swapped-in module scripts ourselves so the element upgrades.\n  // Does nothing once the element is defined, which is every returning visit.\n  if (!customElements.get(\"cart-items-component\")) {\n    document\n      .querySelectorAll('cart-items-component script[type=\"module\"][src]')\n      .forEach((script) => {\n        import(script.src).catch(() => {});\n      });\n  }\n\n  // Sync the .cart-drawer--empty class on the dialog. The class is what\n  // makes the drawer center its empty CTA full-height; it's a stale class\n  // when the cart is no longer empty.\n  document.querySelectorAll(\"cart-drawer-component\").forEach((drawer) => {\n    const dialog = drawer.querySelector(\".cart-drawer__dialog\");\n    if (!dialog) return;\n    const ci = drawer.querySelector(\"cart-items-component\");\n    if (!ci) return;\n    const looksEmpty = ci.innerHTML.includes(\"cart-drawer__empty-state\");\n    dialog.classList.toggle(\"cart-drawer--empty\", looksEmpty);\n  });\n});\n\n// Galore fix (Claude, 2026-10-14): typing a quantity above the stock (say 999 when 9 are\n// left) makes Shopify set that line to what is in stock and answer 422 with only\n// {\"errors\": \"Only 9 items were added to your cart due to availability.\"} - no cart and\n// no section HTML. Horizon's cart-items-component shows that text and puts the OLD\n// quantity back but never redraws, so the bag kept the old quantity, total and header\n// count while the cart (and Check out) held the new amount. When a line's error box\n// appears, fetch the bag fresh, announce it with a normal cart:update and redraw it the\n// way every successful +, - or Remove does, then put the message back (the redraw\n// clears it). Any failure here leaves the old behaviour in place.\n(() => {\n  let busy = false;\n  const watched = new WeakSet();\n\n  const resync = async (ci, box) => {\n    const ref = box.getAttribute(\"ref\");\n    const slot = box.querySelector('[ref^=\"cartItemError-\"]');\n    const message = slot ? slot.textContent : \"\";\n    const sectionId = ci.dataset.sectionId;\n    const [{ CartUpdateEvent }, { sectionRenderer, morphSection }] = await Promise.all([\n      import(\"@theme/events\"),\n      import(\"@theme/section-renderer\"),\n    ]);\n    const ids = [\n      ...new Set(\n        [...document.querySelectorAll(\"cart-items-component\")].map((el) => el.dataset.sectionId)\n      ),\n    ].filter(Boolean);\n    const html = await Promise.all(ids.map((id) => sectionRenderer.getSectionHTML(id, false)));\n    const sections = Object.fromEntries(ids.map((id, i) => [id, html[i]]));\n    const count = new DOMParser()\n      .parseFromString(sections[sectionId], \"text/html\")\n      .querySelector('[ref=\"cartItemCount\"]');\n    ci.dispatchEvent(\n      new CartUpdateEvent({}, sectionId, {\n        itemCount: count ? parseInt(count.textContent, 10) : 0,\n        source: \"cart-items-component\",\n        sections,\n      })\n    );\n    await morphSection(sectionId, sections[sectionId]);\n\n    const fresh = ci.querySelector(`[ref=\"${ref}\"]`);\n    const freshSlot = fresh && fresh.querySelector('[ref^=\"cartItemError-\"]');\n    if (!freshSlot) return;\n    freshSlot.textContent = message;\n    fresh.classList.remove(\"hidden\");\n  };\n\n  const watch = (ci) => {\n    if (watched.has(ci)) return;\n    watched.add(ci);\n    const observer = new MutationObserver((records) => {\n      if (busy) return;\n      const box = records\n        .map((record) => record.target)\n        .find((el) => el.classList.contains(\"cart-items__error\") && !el.classList.contains(\"hidden\"));\n      if (!box) return;\n      busy = true;\n      resync(ci, box)\n        .catch(() => {})\n        .finally(() => {\n          observer.takeRecords();\n          busy = false;\n        });\n    });\n    observer.observe(ci, { subtree: true, attributes: true, attributeFilter: [\"class\"] });\n  };\n\n  const watchAll = () => document.querySelectorAll(\"cart-items-component\").forEach(watch);\n  watchAll();\n  document.addEventListener(\"cart:update\", watchAll);\n})();\n\n// Swiper-powered product media slideshow\nlet swiperInstance = null;\n\nfunction debounceSwiper(fn, delay) {\n  let timeout;\n  return (...args) => {\n    clearTimeout(timeout);\n    timeout = setTimeout(() => fn(...args), delay);\n  };\n}\n\nfunction initializeSwiper() {\n  if (typeof Swiper === \"undefined\") {\n    setTimeout(initializeSwiper, 50);\n    return;\n  }\n\n  const slideshow = document.querySelector(\n    \".product-information__grid slideshow-component\"\n  );\n  if (!slideshow) return;\n\n  if (swiperInstance) {\n    swiperInstance.destroy(true, true);\n    swiperInstance = null;\n  }\n\n  slideshow.classList.add(\"swiper\");\n\n  let wrapper = slideshow.querySelector(\".swiper-wrapper\");\n  if (!wrapper) {\n    wrapper = document.createElement(\"div\");\n    wrapper.classList.add(\"swiper-wrapper\");\n    slideshow.appendChild(wrapper);\n  }\n\n  const slides = Array.from(slideshow.querySelectorAll(\"slideshow-slide\"));\n  slides.forEach((slide) => {\n    slide.classList.add(\"swiper-slide\");\n    if (slide.parentElement !== wrapper) {\n      wrapper.appendChild(slide);\n    }\n  });\n\n  // Create scrollbar element if it doesn't exist\n  let scrollbar = slideshow.querySelector(\".swiper-scrollbar\");\n  if (!scrollbar) {\n    scrollbar = document.createElement(\"div\");\n    scrollbar.classList.add(\"swiper-scrollbar\", \"swiper-scrollbar-horizontal\");\n    slideshow.appendChild(scrollbar);\n  }\n\n  swiperInstance = new Swiper(slideshow, {\n    loop: false,\n    slidesPerView: 1,\n    grabCursor: true,\n    scrollbar: {\n      el: \".swiper-scrollbar\",\n      draggable: false,\n      hide: false,\n    },\n  });\n  // \uD83D\uDD27 force correct sizing\n  swiperInstance.update();\n  swiperInstance.scrollbar.updateSize();\n}\n\nfunction updateSwiperOnResize() {\n  if (swiperInstance && swiperInstance.scrollbar) {\n    swiperInstance.update();\n    swiperInstance.scrollbar.updateSize();\n  }\n}\n\n// Debounce resize handler to avoid too many updates\nconst debouncedSwiperUpdate = debounceSwiper(updateSwiperOnResize, 150);\n\n// Handle window resize and orientation change\nwindow.addEventListener(\"resize\", debouncedSwiperUpdate);\nwindow.addEventListener(\"orientationchange\", () => {\n  setTimeout(updateSwiperOnResize, 200);\n});\n\ndocument.addEventListener(\"DOMContentLoaded\", initializeSwiper);\ndocument.addEventListener(\"variant:update\", () => {\n  setTimeout(initializeSwiper, 100);\n});\n\n// Galore: stop slideshow autoplay once the visitor manually changes slides via a\n// pagination dot. Drag-to-pause is already wired up inside slideshow.js (pointermove\n// path calls this.pause()), so this handler only needs to cover dot clicks.\ndocument.addEventListener(\"click\", (event) => {\n  const dotButton = event.target.closest(\".slideshow-controls__dots .slideshow-control\");\n  if (!dotButton) return;\n  const slideshow = dotButton.closest(\"slideshow-component\");\n  if (slideshow && typeof slideshow.pause === \"function\") {\n    slideshow.pause();\n  }\n});\n\n// Galore perf: hero slide videos ship <source data-src> (blocks/_slide.liquid) holding\n// Shopify's 1080p MP4. When the slide also exposes the video's HLS playlist, read it\n// to pick the MP4 rendition that suits the screen and connection: phones get 480p\n// (the 720p rendition of a client master ran 12 MB+ on the homepage, and a phone-width\n// hero doesn't show the difference); larger screens get 720p, or 1080p when the slide\n// needs that many device pixels.\n// Shopify names each MP4 after its HLS variant, e.g.\n// ID.HD-720p.4.5Mbps.hls.123_.m3u8 -> ID.HD-720p-4.5Mbps-123.mp4. Any failure keeps\n// the 1080p MP4. Resolves once the sources are attached; false if there were none.\n// A slide's optional mobile video (data-mobile-src/-hls) replaces the main one on phones.\n// It's already cut for phones; they take its 720p (478x720) unless the connection is slow. Tested 2026-11-13: same start as 1080p on 4G, 6 s sooner on slow 4G.\nconst galoreIsPhone = () => window.matchMedia(\"(max-width: 749px)\").matches;\nconst galoreUsesMobileVideo = (video) => galoreIsPhone() && !!video.dataset.mobileSrc;\n\nfunction galoreRenditionFor(video) {\n  if (galoreIsPhone()) {\n    const connection = navigator.connection;\n    const slow = connection && (connection.saveData || connection.effectiveType !== \"4g\");\n    if (galoreUsesMobileVideo(video)) return slow ? 480 : 720;\n    return 480;\n  }\n  const needed = Math.max(video.clientWidth * 9 / 16, video.clientHeight) * window.devicePixelRatio;\n  return needed > 900 ? 1080 : 720;\n}\n\nasync function galorePickRenditionUrl(video, hls) {\n  const response = await fetch(hls);\n  if (!response.ok) return null;\n  const variants = [];\n  for (const line of (await response.text()).split(\"\\n\")) {\n    const match = line.trim().match(/^(.+)\\.([A-Z]+-(\\d+)p)\\.([\\d.]+Mbps)\\.hls\\.(\\d+)_\\.m3u8$/);\n    if (match) variants.push({ height: +match[3], file: `${match[1]}.${match[2]}-${match[4]}-${match[5]}.mp4` });\n  }\n  if (!variants.length) return null;\n  variants.sort((a, b) => a.height - b.height);\n  const wanted = galoreRenditionFor(video);\n  const chosen = variants.filter((v) => v.height <= wanted).pop() || variants[0];\n  return new URL(chosen.file, response.url).href;\n}\n\nfunction galoreAttachVideoSources(video) {\n  if (video._galoreAttach) return video._galoreAttach;\n  const sources = video.querySelectorAll(\"source[data-src]\");\n  if (!sources.length) return Promise.resolve(false);\n  const mobile = galoreUsesMobileVideo(video);\n  const hls = mobile ? video.dataset.mobileHls : video.dataset.hls;\n  const fallback = mobile ? video.dataset.mobileSrc : sources[0].dataset.src;\n  const pick = hls ? galorePickRenditionUrl(video, hls).catch(() => null) : Promise.resolve(null);\n  video._galoreAttach = pick.then((url) => {\n    // Set src on the <video> itself, as the Mondain hero does: Safari is unreliable\n    // about <source> children whose src is filled in after the page has parsed.\n    video.src = url || fallback;\n    sources.forEach((source) => source.removeAttribute(\"data-src\"));\n    video.load();\n    return true;\n  });\n  return video._galoreAttach;\n}\n\n// Attach, then call play() rather than trusting the autoplay attribute: iOS doesn't\n// reliably autoplay a source attached after the page has parsed.\nfunction galoreStartVideo(video) {\n  galoreAttachVideoSources(video)\n    .then((attached) => {\n      if (attached && !video.dataset.userPaused && !video.dataset.offscreen) {\n        video.muted = true;\n        return video.play();\n      }\n    })\n    .catch(() => {});\n}\n\n// Galore: per-video-slide controls on the hero slideshow.\n// The mute and play/pause buttons are rendered INSIDE the slide's HTML\n// (see blocks/_slide.liquid) so they survive the slideshow's loop-back\n// DOM trick. JS only attaches handlers and keeps icons in sync with the\n// actual <video> state.\n(() => {\n  // Click delegation \u2014 works for any current and future slides.\n  document.addEventListener(\"click\", (event) => {\n    const muteBtn = event.target.closest(\".galore-slide-mute-btn\");\n    if (muteBtn) {\n      event.preventDefault();\n      event.stopPropagation();\n      const video = muteBtn.closest(\"slideshow-slide\")?.querySelector(\"video\");\n      if (!video) return;\n      video.muted = !video.muted;\n      muteBtn.classList.toggle(\"is-muted\", video.muted);\n      if (!video.muted) {\n        galoreAttachVideoSources(video).then(() => video.play()).catch(() => {});\n      }\n      return;\n    }\n\n    const playBtn = event.target.closest(\".galore-slide-play-btn\");\n    if (playBtn) {\n      event.preventDefault();\n      event.stopPropagation();\n      const video = playBtn.closest(\"slideshow-slide\")?.querySelector(\"video\");\n      if (!video) return;\n      if (video.paused || video.ended) {\n        delete video.dataset.userPaused;\n        galoreAttachVideoSources(video).then(() => video.play()).catch(() => {});\n      } else {\n        video.dataset.userPaused = \"1\";\n        video.pause();\n      }\n    }\n  });\n\n  // For each video on the page, keep the play/pause icon and mute icon in\n  // sync with the <video> element (handles the case where it pauses on its own).\n  document.querySelectorAll(\"slideshow-slide video\").forEach((video) => {\n    const slide = video.closest(\"slideshow-slide\");\n    const playBtn = slide?.querySelector(\".galore-slide-play-btn\");\n    const muteBtn = slide?.querySelector(\".galore-slide-mute-btn\");\n    if (!playBtn && !muteBtn) return;\n\n    function sync() {\n      if (playBtn) {\n        playBtn.classList.toggle(\"is-playing\", !video.paused && !video.ended);\n      }\n      if (muteBtn) {\n        muteBtn.classList.toggle(\"is-muted\", video.muted);\n      }\n    }\n\n    video.addEventListener(\"play\", sync);\n    video.addEventListener(\"pause\", sync);\n    video.addEventListener(\"ended\", sync);\n    video.addEventListener(\"volumechange\", sync);\n    sync();\n  });\n})();\n\n// Galore perf: attach deferred hero slide images (slides 2+, see blocks/_slide.liquid)\n// 1.5s after the first slide's image loads, at window load, or on the first touch of\n// the slideshow, whichever comes first.\n(() => {\n  const deferred = document.querySelectorAll(\".slide__image-container img[data-srcset], .slide__image-container img[data-src]\");\n  if (!deferred.length) return;\n  let done = false;\n  function attach() {\n    if (done) return;\n    done = true;\n    deferred.forEach((img) => {\n      if (img.dataset.srcset) img.srcset = img.dataset.srcset;\n      if (img.dataset.src) img.src = img.dataset.src;\n      img.removeAttribute(\"data-srcset\");\n      img.removeAttribute(\"data-src\");\n    });\n  }\n  window.addEventListener(\"load\", attach, { once: true });\n  const slideshow = deferred[0].closest(\"slideshow-component\");\n  [\"pointerdown\", \"focusin\", \"keydown\"].forEach((type) =>\n    slideshow?.addEventListener(type, attach, { once: true, capture: true, passive: true })\n  );\n  const first = slideshow?.querySelector(\"slideshow-slide .slide__image-container img:not([data-srcset]):not([data-src])\");\n  const later = () => setTimeout(attach, 1500);\n  if (!first || first.complete) later();\n  else {\n    first.addEventListener(\"load\", later, { once: true });\n    first.addEventListener(\"error\", later, { once: true });\n  }\n})();\n\n// Galore perf: start hero slide videos after the page has loaded.\n// blocks/_slide.liquid renders <source data-src> so the MP4 doesn't compete with\n// the poster (the LCP image) or the rest of the page for bandwidth. Visible videos\n// start 200ms after window load, or 3s after the first poster loads if the page is\n// slower than that; other slides' videos start when they scroll into view, and\n// videos never start once scrolled past. With Data Saver or a 2g connection they\n// stay on the poster until the play or sound button is used.\n// Videos pause while offscreen and resume when back, unless the visitor paused\n// them. A video with data-reveal-at stays hidden over its poster until playback\n// reaches that time (the hero film's opening leader).\n(() => {\n  const videos = [...document.querySelectorAll(\"video.slide__video\")];\n  if (!videos.length) return;\n\n  const connection = navigator.connection;\n  // Reduced motion doesn't hold the poster: the hero is a muted ambient loop with a\n  // pause button, and Mondain's hero plays regardless too.\n  const stayOnPoster = connection?.saveData || /2g$/.test(connection?.effectiveType || \"\");\n\n  videos.forEach((video) => {\n    const at = parseFloat(video.dataset.revealAt);\n    if (Number.isNaN(at)) return;\n    const reveal = () => {\n      if (video.currentTime < at) return;\n      video.closest(\".slide__image-container\")?.classList.add(\"is-video-revealed\");\n      video.removeEventListener(\"timeupdate\", reveal);\n    };\n    video.addEventListener(\"timeupdate\", reveal);\n  });\n\n  let ready = false;\n  const visible = new Set();\n  const io = new IntersectionObserver((entries) => {\n    entries.forEach(({ target: video, isIntersecting }) => {\n      if (isIntersecting) {\n        visible.add(video);\n        delete video.dataset.offscreen;\n        if (ready && !stayOnPoster) galoreStartVideo(video);\n        if (video.dataset.resumeOnScreen) {\n          delete video.dataset.resumeOnScreen;\n          video.play().catch(() => {});\n        }\n      } else {\n        visible.delete(video);\n        video.dataset.offscreen = \"1\";\n        if (!video.paused) {\n          video.dataset.resumeOnScreen = \"1\";\n          video.pause();\n        }\n      }\n    });\n  });\n  videos.forEach((video) => io.observe(video));\n\n  function go() {\n    if (ready) return;\n    ready = true;\n    if (!stayOnPoster) visible.forEach(galoreStartVideo);\n  }\n  const afterLoad = () => setTimeout(go, 200);\n  if (document.readyState === \"complete\") afterLoad();\n  else window.addEventListener(\"load\", afterLoad, { once: true });\n\n  const poster = videos[0].closest(\".slide__image-container\")?.querySelector(\".slide__video-poster\");\n  const fallback = () => go();\n  if (!poster || poster.complete) fallback();\n  else {\n    poster.addEventListener(\"load\", fallback, { once: true });\n    poster.addEventListener(\"error\", fallback, { once: true });\n  }\n})();\n\n// Galore: iOS autoplay safety-net for the hero video.\n// iOS Safari can refuse autoplay even for muted, playsinline video (Low Power Mode\n// always does), leaving the poster up. Retry play() whenever data arrives, and on\n// every tap or click: iOS only treats touchend/click as the user activation that\n// lets media start (touchstart can still become a scroll, so it doesn't count).\n// Retries only touch an on-screen video whose sources are attached and that the\n// visitor hasn't paused; taps on the video controls are left to their own handler.\n(() => {\n  const vids = document.querySelectorAll(\n    'slideshow-slide video[autoplay], video.slide__video[autoplay]'\n  );\n  if (!vids.length) return;\n\n  function nudge(video) {\n    if (!video || !video.paused || video.dataset.offscreen || video.dataset.userPaused) return;\n    if (!video.getAttribute(\"src\") && video.querySelector(\"source[data-src]\")) return;\n    video.muted = true;\n    const p = video.play();\n    if (p && typeof p.catch === \"function\") p.catch(() => {});\n  }\n\n  vids.forEach((video) => {\n    [\"loadeddata\", \"canplay\", \"canplaythrough\"].forEach((type) =>\n      video.addEventListener(type, () => nudge(video))\n    );\n  });\n\n  function retry(event) {\n    if (event.target.closest?.(\".galore-slide-video-controls\")) return;\n    vids.forEach(nudge);\n  }\n  window.addEventListener(\"touchend\", retry, { passive: true });\n  window.addEventListener(\"click\", retry);\n})();\n\n// Galore: per-slide \"Show on device\" toggle.\n// A slide can be flagged mobile-only or desktop-only via its block setting\n// (rendered as `.galore-slide-mobile-only` / `.galore-slide-desktop-only`\n// on the <slideshow-slide>). This function mirrors that into the `hidden`\n// attribute on the slide AND its matching pagination dot, so Horizon's\n// slideshow.js filters the slide out of next() / select() and the dot\n// disappears too \u2014 not just visually hidden via CSS.\n(() => {\n  const mobileQuery = window.matchMedia(\"(max-width: 749px)\");\n\n  function syncSlideDeviceVisibility() {\n    const isMobile = mobileQuery.matches;\n    document.querySelectorAll(\"slideshow-component\").forEach((slideshow) => {\n      const slides = slideshow.querySelectorAll(\":scope slideshow-slides > slideshow-slide\");\n      const dots = slideshow.querySelectorAll(\".slideshow-controls__dots > li\");\n      slides.forEach((slide, i) => {\n        const cls = slide.classList;\n        let hide = false;\n        if (cls.contains(\"galore-slide-mobile-only\") && !isMobile) hide = true;\n        if (cls.contains(\"galore-slide-desktop-only\") && isMobile) hide = true;\n        slide.toggleAttribute(\"hidden\", hide);\n        const dot = dots[i];\n        if (dot) dot.toggleAttribute(\"hidden\", hide);\n      });\n    });\n  }\n\n  mobileQuery.addEventListener(\"change\", syncSlideDeviceVisibility);\n  syncSlideDeviceVisibility();\n})();\n\n// Galore: prefetch /collections/shop-all when the empty-cart \"Start Shopping\"\n// CTA shows intent. The empty cart drawer is the only path to that link from\n// inside the drawer, and the page is heavyweight (collection grid + Depict),\n// so a click-then-wait felt sluggish. We inject `<link rel=\"prefetch\">` once,\n// triggered by either:\n//   (a) the cart drawer dialog opening while the cart is empty, OR\n//   (b) the user hovering / focusing the Start Shopping button.\n// Whichever fires first wins; subsequent triggers are ignored.\n(() => {\n  const PREFETCH_URL = \"/collections/shop-all\";\n  let prefetched = false;\n\n  function prefetchShopAll() {\n    if (prefetched) return;\n    // Don't bother if we're already on the destination page.\n    try {\n      if (window.location.pathname.replace(/\\/+$/, \"\") === PREFETCH_URL) {\n        prefetched = true;\n        return;\n      }\n    } catch (e) {\n      /* ignore */\n    }\n    prefetched = true;\n    const link = document.createElement(\"link\");\n    link.rel = \"prefetch\";\n    link.as = \"document\";\n    link.href = PREFETCH_URL;\n    document.head.appendChild(link);\n  }\n\n  // (a) Prefetch as soon as the cart drawer opens in its empty state.\n  document.querySelectorAll(\"cart-drawer-component\").forEach((drawer) => {\n    drawer.addEventListener(\"dialog:open\", () => {\n      if (drawer.querySelector(\".cart-drawer__empty-cta\")) prefetchShopAll();\n    });\n  });\n\n  // (b) Hover/focus on the button itself \u2014 also catches the case where the\n  // drawer is already open and the cart transitions to empty mid-session.\n  // Event delegation on document means we don't need to re-bind every time\n  // the cart re-renders (which used to require a MutationObserver), and\n  // works for the button whether it was in the initial HTML or swapped in\n  // by the Section Rendering API.\n  // pointerover bubbles (unlike pointerenter), so a single document-level\n  // listener catches hover on the button no matter when it was added to\n  // the DOM. focusin bubbles too \u2014 covers keyboard nav.\n  function maybePrefetchFromEvent(event) {\n    const btn = event.target.closest?.(\".cart-drawer__empty-cta\");\n    if (btn) prefetchShopAll();\n  }\n  document.addEventListener(\"pointerover\", maybePrefetchFromEvent);\n  document.addEventListener(\"focusin\", maybePrefetchFromEvent);\n})();\n\n// Galore Wholesale \u2014 B2B isolation strip\n// ============================================================================\n// When a logged-in B2B customer is browsing any page OTHER than the wholesale\n// portal home (the collection.wholesale.json template, served at\n// /collections/shop-all?view=wholesale), inject a minimal sticky header at the\n// top of the page so they have nav back to the portal + cart/sign-out.\n//\n// The marker `<span class=\"galore-b2b-marker\">` is rendered by\n// snippets/header-actions.liquid for `customer.b2b?` pages. The marker carries\n// `data-show-strip=\"true\"` on every non-portal page; the wholesale portal\n// pages render their own embedded header inside the wholesale-portal-home\n// section, so this script skips injection there to avoid duplicate chrome.\n//\n// CSS in assets/custom.css uses :has(.galore-b2b-marker) to hide the\n// regular DTC header / announcement bar / footer storefront-wide; this JS\n// is purely about giving B2B customers a nav surface on the non-portal\n// pages.\n// ============================================================================\n(() => {\n  function injectStrip() {\n    const marker = document.querySelector(\".galore-b2b-marker\");\n    if (!marker) return;\n    if (marker.dataset.showStrip !== \"true\") return;\n    if (document.querySelector(\".galore-b2b-strip\")) return; // already injected\n\n    // Server-rendered on the marker; window.Shopify.cart is not defined in this theme.\n    const cartCount = Number(marker.dataset.cartCount) || 0;\n\n    const strip = document.createElement(\"div\");\n    strip.className = \"galore-b2b-strip\";\n    strip.setAttribute(\"role\", \"navigation\");\n    strip.setAttribute(\"aria-label\", \"Wholesale portal\");\n    strip.innerHTML = `\n      <a href=\"/collections/shop-all?view=wholesale\" class=\"galore-b2b-strip__logo\" aria-label=\"Galore Wholesale \u2014 return to portal\">\n        <img src=\"https://galoreyyz.com/cdn/shop/files/Galore_Logo_-_2026_PNG.png?v=1759948025&width=480\" alt=\"Galore\" width=\"120\" height=\"18\">\n        <span class=\"galore-b2b-strip__logo-tag\">Wholesale</span>\n      </a>\n      <nav class=\"galore-b2b-strip__nav\" aria-label=\"Wholesale portal navigation\">\n        <a href=\"/collections/shop-all?view=wholesale\" class=\"galore-b2b-strip__nav-link\">Shop</a>\n      </nav>\n      <div class=\"galore-b2b-strip__actions\">\n        <a href=\"/cart\" class=\"galore-b2b-strip__action galore-b2b-strip__action--cart\">Cart${cartCount ? ` <span class=\"galore-b2b-strip__cart-count\">(${cartCount})</span>` : \"\"}</a>\n        <a href=\"/account\" class=\"galore-b2b-strip__action galore-b2b-strip__action--quiet\">Account</a>\n        <a href=\"/account/logout\" class=\"galore-b2b-strip__action galore-b2b-strip__action--quiet\">Sign out</a>\n      </div>\n    `;\n    document.body.insertBefore(strip, document.body.firstChild);\n  }\n\n  // Galore: inject a matching wholesale footer at the bottom of the same B2B\n  // non-portal pages (product, cart). The wholesale footer otherwise only\n  // exists as a section on the portal-home template, so product/cart pages had\n  // NO footer once the DTC footer is hidden for B2B. Mirrors the\n  // wholesale-portal-footer section; styled by .galore-b2b-footer in custom.css.\n  function injectFooter() {\n    const marker = document.querySelector(\".galore-b2b-marker\");\n    if (!marker) return;\n    if (marker.dataset.showStrip !== \"true\") return; // skip on the portal home\n    if (document.querySelector(\".galore-b2b-footer\")) return; // already injected\n\n    const year = new Date().getFullYear();\n    // Galore: quiet display of the account's locked currency (B2B currency is\n    // set by the company's market, not switchable). The flag is Shopify's own\n    // country-flag SVG \u2014 the SAME images the DTC footer uses\n    // (cdn.shopify.com/static/images/flags/<cc>.svg) \u2014 built from the currency's\n    // country code. This is reliable for B2B, where localization.country is nil\n    // (so the DTC image_url path can't be reused). Allowlist keeps it to\n    // currencies whose flag definitely exists (no broken images).\n    // Source currency from the marker's data-currency, which Liquid sets to\n    // cart.currency.iso_code \u2014 the SAME authoritative source as the on-page\n    // Liquid wholesale footer. window.Shopify.currency / \"USD\" are only\n    // last-ditch fallbacks (leading with them could show \"USD\" to a non-CAD\n    // B2B buyer whose prices weren't USD).\n    const cur =\n      marker.dataset.currency ||\n      (window.Shopify && window.Shopify.currency && window.Shopify.currency.active) ||\n      \"USD\";\n    const FLAG_CCS = { CAD: \"ca\", USD: \"us\", GBP: \"gb\", EUR: \"eu\", AUD: \"au\", NZD: \"nz\", JPY: \"jp\", CHF: \"ch\", MXN: \"mx\" };\n    const cc = FLAG_CCS[cur];\n    const flag = cc\n      ? `<img class=\"galore-b2b-footer__flag\" src=\"https://cdn.shopify.com/static/images/flags/${cc}.svg\" alt=\"\" width=\"20\" height=\"14\" loading=\"lazy\">`\n      : \"\";\n\n    const footer = document.createElement(\"footer\");\n    footer.className = \"galore-b2b-footer\";\n    footer.setAttribute(\"role\", \"contentinfo\");\n    footer.innerHTML = `\n      <div class=\"galore-b2b-footer__inner\">\n        <div class=\"galore-b2b-footer__brand\">\n          <p class=\"galore-b2b-footer__name\">Galore Wholesale</p>\n          <p class=\"galore-b2b-footer__line\">Premium blanks &middot; Made for retailers, brands, and creative teams.</p>\n        </div>\n        <div class=\"galore-b2b-footer__contact\">\n          <p class=\"galore-b2b-footer__label\">Questions?</p>\n          <a href=\"mailto:wholesale@galoreyyz.com\" class=\"galore-b2b-footer__link\">wholesale@galoreyyz.com</a>\n        </div>\n      </div>\n      <div class=\"galore-b2b-footer__utility\">\n        <div class=\"galore-b2b-footer__utility-left\">\n          <span class=\"galore-b2b-footer__currency\">\n            <span class=\"galore-b2b-footer__currency-label\">Region</span>\n            <span class=\"galore-b2b-footer__currency-sep\" aria-hidden=\"true\">|</span>\n            ${flag}\n            <span class=\"galore-b2b-footer__currency-code\">${cur}</span>\n          </span>\n          <span class=\"galore-b2b-footer__util-divider\" aria-hidden=\"true\"></span>\n          <nav class=\"galore-b2b-footer__links\" aria-label=\"Wholesale policies\">\n            <a href=\"/pages/wholesale-refund-policy\" class=\"galore-b2b-footer__link-item\">Refund policy</a>\n            <a href=\"/pages/wholesale-policies\" class=\"galore-b2b-footer__link-item\">Wholesale info</a>\n            <a href=\"/pages/wholesale-terms-of-service\" class=\"galore-b2b-footer__link-item\">Terms of service</a>\n          </nav>\n        </div>\n        <p class=\"galore-b2b-footer__copyright\">&copy; ${year} Galore Apparel Inc &middot; Toronto, ON</p>\n      </div>\n    `;\n    document.body.appendChild(footer);\n  }\n\n  function injectChrome() {\n    injectStrip();\n    injectFooter();\n  }\n\n  if (document.readyState === \"loading\") {\n    document.addEventListener(\"DOMContentLoaded\", injectChrome);\n  } else {\n    injectChrome();\n  }\n})();\n// Galore perf: country selectors render inside <template data-galore-deferred-localization>\n// (header dropdown, mobile drawer, footer). Each holds every available country\n// (~240), so three copies were ~520 KB of HTML and ~2,000 DOM nodes on every page.\n// Stamp a selector into place on the first sign of intent, in the capture phase so\n// it exists before the selector's own click/toggle handlers run.\n(() => {\n  // Also used for the Shop login button in the account popover/drawer (snippets/account-actions.liquid).\n  const HOSTS =\n    \"dropdown-localization-component, drawer-localization-component, .footer-utilities__locale, .account-popover, .account-drawer\";\n\n  // The stamped selectors arrive with empty country lists (`defer_countries`); their\n  // rows come from sections/galore-localization-countries.liquid, fetched once per page.\n  let countryRows;\n  function fetchCountryRows() {\n    countryRows ??= fetch(`${window.Shopify?.routes?.root || \"/\"}?section_id=galore-localization-countries`)\n      .then((response) => (response.ok ? response.text() : Promise.reject(response.status)))\n      .then((html) => new DOMParser().parseFromString(html, \"text/html\"))\n      .catch((error) => {\n        countryRows = undefined;\n        throw error;\n      });\n    return countryRows;\n  }\n\n  function fillCountryRows(host) {\n    const lists = host.querySelectorAll(\"[data-galore-country-rows]:not([data-galore-filled])\");\n    if (!lists.length) return;\n    fetchCountryRows()\n      .then((doc) => {\n        lists.forEach((list) => {\n          const rows = doc.querySelector(`template[data-galore-country-rows=\"${list.dataset.galoreCountryRows}\"]`);\n          if (!rows || list.hasAttribute(\"data-galore-filled\")) return;\n          list.append(rows.content.cloneNode(true));\n          list.setAttribute(\"data-galore-filled\", \"\");\n          // Galore fix (Claude, 2026-10-13): if the header dropdown was already open when the\n          // rows arrived (slow connection), localization.js had locked its width (--width) to\n          // the empty form, about 83 px instead of 378, and country names stayed cut off\n          // until reload. Measure again now that the rows are in.\n          const dropdown = list.closest(\"dropdown-localization-component\");\n          if (dropdown?.style.getPropertyValue(\"--width\")) {\n            dropdown.style.removeProperty(\"--width\");\n            const width = dropdown.querySelector(\"localization-form-component\")?.offsetWidth;\n            if (width) dropdown.style.setProperty(\"--width\", `${width}px`);\n          }\n          // Galore fix (Claude, 2026-10-14): Horizon's Component collects its refs when it\n          // connects and only starts watching for new ones in an idle callback. When these rows\n          // land first, refs.countryListItems stays undefined and typing in the country search\n          // filters nothing (\"countryListItems is not iterable\"; Android, busy desktops).\n          // Refresh the refs now.\n          list.closest(\"localization-form-component\")?.updatedCallback?.();\n          // Re-apply a filter typed before the rows arrived (after the form's refs update).\n          const form = list.closest(\"localization-form-component\");\n          if (form?.querySelector(\".country-filter__input\")?.value) queueMicrotask(() => form.filterCountries?.());\n        });\n      })\n      .catch(() => {});\n  }\n\n  function stamp(event) {\n    const host = event.target instanceof Element && event.target.closest(HOSTS);\n    if (!host) return;\n    host.querySelectorAll(\"template[data-galore-deferred-localization], template[data-galore-deferred]\").forEach((template) => {\n      template.replaceWith(template.content.cloneNode(true));\n    });\n    fillCountryRows(host);\n  }\n\n  [\"pointerover\", \"pointerdown\", \"focusin\", \"click\"].forEach((type) =>\n    document.addEventListener(type, stamp, { capture: true, passive: true })\n  );\n})();\n// Galore perf: sections/product-list.liquid renders below-the-fold lists as an empty\n// <galore-deferred-section>. Fetch the real section HTML (Section Rendering API) when\n// it comes within ~1.5 viewports, then swap it in; the card components upgrade on\n// insertion because their modules already load globally.\nif (!customElements.get(\"galore-deferred-section\")) {\n  const observer = new IntersectionObserver(\n    (entries) => {\n      entries.forEach((entry) => {\n        if (!entry.isIntersecting) return;\n        observer.unobserve(entry.target);\n        entry.target.load();\n      });\n    },\n    { rootMargin: \"150% 0px\" }\n  );\n\n  customElements.define(\n    \"galore-deferred-section\",\n    class extends HTMLElement {\n      connectedCallback() {\n        observer.observe(this);\n      }\n\n      disconnectedCallback() {\n        observer.unobserve(this);\n      }\n\n      async load(retry = true) {\n        const id = this.dataset.sectionId;\n        const url = new URL(location.href);\n        url.hash = \"\";\n        url.searchParams.set(\"section_id\", id);\n        try {\n          const response = await fetch(url);\n          if (!response.ok) throw new Error(String(response.status));\n          const doc = new DOMParser().parseFromString(await response.text(), \"text/html\");\n          const section = doc.getElementById(`shopify-section-${id}`);\n          if (!section || !this.isConnected) return;\n          section.querySelectorAll(\"script\").forEach((old) => {\n            if (old.type === \"application/json\" || old.type === \"application/ld+json\") return;\n            const script = document.createElement(\"script\");\n            [...old.attributes].forEach(({ name, value }) => script.setAttribute(name, value));\n            script.textContent = old.textContent;\n            old.replaceWith(script);\n          });\n          this.replaceWith(...section.childNodes);\n        } catch (error) {\n          if (retry) setTimeout(() => this.load(false), 1500);\n        }\n      }\n    }\n  );\n}\n\n// Galore: flag when Postscript's \"15% OFF\" teaser is showing so custom.css\n// can restyle the chat launcher, and stack the teaser 9 px above the launcher\n// with their right edges aligned. Postscript renders the popup and the teaser\n// in the same iframe (#ps__widget): full-screen for the popup, a small\n// bottom-right box for the teaser, hidden once dismissed. The teaser's black\n// block sits PS_MARGIN / 2 inside the iframe's edges. Measuring, rather than\n// fixed offsets, keeps it right when the launcher is lifted by the theme\n// preview bar (inside Shopify's shadow DOM) or the sticky add-to-cart bar.\n// It also sets html[data-float-hidden] while the launcher or teaser sits over\n// the hero buttons or the PDP colour swatches, so custom.css can hide them.\n(() => {\n  const GAP = 9;\n  const PS_MARGIN = 30.5;\n  const AVOID = \".slide__content .button, .slide__content a[class*='button'], variant-picker .variant-option--swatches\";\n  const root = document.documentElement;\n  let frame = null;\n  let activator = null;\n  let offset = [0, 0];\n  let queued = false;\n\n  // Galore 2026-10-09 (chat keyboard fix; log in Website > Northstar Relaunch >\n  // 2026-10-09 Chat keyboard fix - change log.md): on phones the chat stays\n  // full screen (custom.css fallbacks: top 0, height 100dvh) and iOS scrolls\n  // it to show the text box while the keyboard is up. Moving it with the\n  // keyboard (--galore-chat-top / --galore-chat-height from visualViewport)\n  // made it drop down the screen for about half a second after each send,\n  // with a grey flash, because iOS reports the keyboard closing late. Checked\n  // on Ethan's iPhone. The viewport listeners below only re-place the teaser.\n  window.visualViewport?.addEventListener(\"resize\", queueViewport);\n  window.visualViewport?.addEventListener(\"scroll\", queueViewport);\n  let viewportFrame = null;\n  function queueViewport() {\n    if (viewportFrame !== null) return;\n    viewportFrame = requestAnimationFrame(() => {\n      viewportFrame = null;\n      queuePlace();\n    });\n  }\n  addEventListener(\"resize\", queueViewport);\n\n  const resizeObserver = new ResizeObserver(() => queuePlace());\n  const findIn = (node) => {\n    for (const el of node.querySelectorAll(\"*\")) {\n      if (el.part?.contains(\"activator\")) return el;\n      const found = el.shadowRoot && findIn(el.shadowRoot);\n      if (found) return found;\n    }\n    return null;\n  };\n  const findActivator = () => {\n    if (activator?.isConnected) return activator;\n    const host = document.querySelector(\"shopify-chat\");\n    activator = host?.shadowRoot ? findIn(host.shadowRoot) : null;\n    if (activator) {\n      resizeObserver.observe(activator);\n      muteNudge(activator.getRootNode());\n      queuePlace();\n    }\n    return activator;\n  };\n  // Stop Inbox's launcher bounce (nudge-bounce, every 10 s). It runs on the\n  // launcher's wrapper, which Shopify doesn't expose as a ::part, so the rule\n  // is adopted into that shadow root.\n  const nudgeSheet = new CSSStyleSheet();\n  nudgeSheet.replaceSync(\".activator-nudge--active { animation: none !important; }\");\n  const muteNudge = (shadowRoot) => {\n    if (!shadowRoot.adoptedStyleSheets.includes(nudgeSheet)) {\n      shadowRoot.adoptedStyleSheets = [...shadowRoot.adoptedStyleSheets, nudgeSheet];\n      // Inbox scales the launcher back in when chat closes. ResizeObserver\n      // doesn't report transforms, and these events don't cross the shadow\n      // boundary, so align again after the launcher finishes moving.\n      shadowRoot.addEventListener(\"transitionend\", queuePlace);\n      shadowRoot.addEventListener(\"animationend\", queuePlace);\n    }\n  };\n  // The launcher renders after the page, so look for it until it appears.\n  let tries = 0;\n  const waitForActivator = setInterval(() => {\n    if (findActivator() || ++tries > 60) clearInterval(waitForActivator);\n  }, 500);\n\n  const setOffset = (x, y) => {\n    offset = [x, y];\n    root.style.setProperty(\"--ps-teaser-x\", `${x}px`);\n    root.style.setProperty(\"--ps-teaser-y\", `${y}px`);\n  };\n  const overlaps = (a, b) => a.left < b.right && b.left < a.right && a.top < b.bottom && b.top < a.bottom;\n  const avoid = () => {\n    const boxes = [];\n    const chat = findActivator()?.getBoundingClientRect();\n    if (chat?.width) boxes.push(chat);\n    if (root.hasAttribute(\"data-ps-teaser\")) boxes.push(frame.getBoundingClientRect());\n    const covered = boxes.length > 0 && [...document.querySelectorAll(AVOID)].some((el) => {\n      const rect = el.getBoundingClientRect();\n      return rect.width > 0 && boxes.some((box) => overlaps(box, rect));\n    });\n    if (covered !== root.hasAttribute(\"data-float-hidden\")) root.toggleAttribute(\"data-float-hidden\", covered);\n  };\n  // Postscript declares its teaser iframe as the black block plus PS_MARGIN,\n  // so the block's size is the declared size minus that (the theme no longer\n  // forces the iframe's width, so declared is what's shown). A size outside a\n  // one-line teaser's range (e.g. \"15% OFF\" wrapped) keeps the CSS default.\n  const matchTeaserSize = () => {\n    const copy = (name, value, min, max) => {\n      const px = parseFloat(value) - PS_MARGIN;\n      if (px >= min && px <= max) root.style.setProperty(name, `${px}px`);\n      else root.style.removeProperty(name);\n    };\n    copy(\"--ps-teaser-w\", frame.style.width, 70, 140);\n    copy(\"--ps-teaser-h\", frame.style.height, 28, 42);\n  };\n  const place = () => {\n    queued = false;\n    // The launcher is hidden/scaled while open; retain its last good position.\n    if (document.querySelector(\"shopify-chat[open]\")) return;\n    if (root.hasAttribute(\"data-ps-teaser\")) {\n      matchTeaserSize();\n      const chat = findActivator()?.getBoundingClientRect();\n      if (chat?.width) {\n        const box = frame.getBoundingClientRect();\n        const x = chat.right + PS_MARGIN / 2 - (box.right - offset[0]);\n        const y = chat.top - GAP + PS_MARGIN / 2 - (box.bottom - offset[1]);\n        if (Math.abs(x - offset[0]) > 0.5 || Math.abs(y - offset[1]) > 0.5) setOffset(Math.round(x), Math.round(y));\n      }\n    }\n    avoid();\n  };\n  const queuePlace = () => {\n    if (queued) return;\n    queued = true;\n    requestAnimationFrame(place);\n  };\n\n  const sync = () => {\n    const style = frame?.isConnected && getComputedStyle(frame);\n    const width = style ? frame.getBoundingClientRect().width : 0;\n    const teaser =\n      !!style &&\n      style.display !== \"none\" &&\n      // Inline only: custom.css hides the teaser itself (chat open, menu open),\n      // which mustn't read as Postscript dismissing it.\n      frame.style.visibility !== \"hidden\" &&\n      style.opacity !== \"0\" &&\n      width > 0 &&\n      width < innerWidth / 2;\n    if (teaser === root.hasAttribute(\"data-ps-teaser\")) return teaser && queuePlace();\n    root.toggleAttribute(\"data-ps-teaser\", teaser);\n    if (!teaser) return setOffset(0, 0);\n    queuePlace();\n    // The launcher can settle after the teaser (late render, preview bar).\n    setTimeout(queuePlace, 1000);\n  };\n  const styleObserver = new MutationObserver(sync);\n  const attach = () => {\n    const next = document.getElementById(\"ps__widget\");\n    if (next === frame) return;\n    styleObserver.disconnect();\n    frame = next;\n    if (frame) styleObserver.observe(frame, { attributes: true, attributeFilter: [\"style\"] });\n    sync();\n  };\n  new MutationObserver((records) => {\n    attach();\n    if (records.some((record) => record.type === \"attributes\")) queuePlace();\n  }).observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: [\"data-active\", \"open\"] });\n  document.addEventListener(\"transitionend\", (event) => {\n    if (event.target.localName === \"shopify-chat\") queuePlace();\n  });\n  addEventListener(\"resize\", queuePlace);\n  addEventListener(\"scroll\", queuePlace, { passive: true });\n  attach();\n})();\n\n// Galore 2026-10-09: full-screen phone chat fixes (log in Website > Northstar\n// Relaunch > 2026-10-09 Chat keyboard fix - change log.md).\n// 1. Freeze the page while the chat is open on a phone. When the keyboard\n//    opened or closed, iOS scrolled the page under the chat, so the page showed\n//    under the text box (Ethan's iPhone videos, 4:20 to 5:02 PM). Pinning the\n//    body at the current scroll position leaves iOS nothing to scroll; the page\n//    goes back to the same spot when the chat closes.\n// 2. Clear Shopify's backdrop. While open, the chat lays a 40% black backdrop\n//    (.backdrop in its shadow DOM, opacity 1 under :host([open])) across the\n//    whole screen, under the white panel. Each time the keyboard opened or\n//    closed it showed through for 2-3 frames as a grey band at the top\n//    (videos 4:20 to 5:48 PM). A full-screen chat has nothing to dim, so on\n//    phones it is made clear.\n(() => {\n  const phone = matchMedia(\"(max-width: 767px)\");\n  const body = document.body;\n  const html = document.documentElement;\n  let lockedAt = null;\n  let restoring = null;\n\n  const runtimeRoot = () =>\n    document.querySelector(\"shopify-chat\")?.shadowRoot?.querySelector(\"shopify-agent-runtime\")?.shadowRoot;\n  const clearSheet = new CSSStyleSheet();\n  clearSheet.replaceSync(\n    \"@media (max-width: 767px) { .backdrop { background: none !important; opacity: 0 !important; } }\"\n  );\n  const clearBackdrop = () => {\n    const root = runtimeRoot();\n    if (root && !root.adoptedStyleSheets.includes(clearSheet)) {\n      root.adoptedStyleSheets = [...root.adoptedStyleSheets, clearSheet];\n    }\n  };\n  // On some pages Shopify only builds the chat window (shopify-agent-runtime)\n  // after the chat is opened, so it isn't there yet when the open attribute\n  // appears, and the backdrop stayed dark (Safari engine, homepage, 3 of 3\n  // first opens). Watch the chat's shadow DOM and add the sheet the moment the\n  // window exists: a MutationObserver runs before the next paint, so the dark\n  // layer never shows. The sheet only applies on phones.\n  customElements.whenDefined(\"shopify-chat\").then(() => {\n    const shadow = document.querySelector(\"shopify-chat\")?.shadowRoot;\n    if (shadow) new MutationObserver(clearBackdrop).observe(shadow, { childList: true, subtree: true });\n    clearBackdrop();\n  });\n\n  const scrollBack = (y) => {\n    // The theme scrolls smoothly; jump straight back instead.\n    const behavior = html.style.scrollBehavior;\n    html.style.scrollBehavior = \"auto\";\n    scrollTo(0, y);\n    html.style.scrollBehavior = behavior;\n  };\n  const lock = () => {\n    if (lockedAt !== null || !phone.matches) return;\n    clearBackdrop();\n    // If the chat reopens while the page is still going back, keep that spot.\n    lockedAt = restoring ? restoring.y : scrollY;\n    restoring = null;\n    body.style.position = \"fixed\";\n    body.style.top = `${-lockedAt}px`;\n    body.style.left = \"0\";\n    body.style.right = \"0\";\n  };\n  const unlock = () => {\n    if (lockedAt === null) return;\n    const y = lockedAt;\n    lockedAt = null;\n    for (const name of [\"position\", \"top\", \"left\", \"right\"]) body.style.removeProperty(name);\n    // iOS can ignore a scroll made in the same moment the page gets its height\n    // back (Ethan's 5:15 PM video: closing the chat left the homepage at the\n    // top), so check again over the next few frames.\n    const state = (restoring = { y });\n    const attempt = (left) => {\n      if (restoring !== state) return;\n      if (Math.abs(scrollY - y) > 1) scrollBack(y);\n      if (left > 0) requestAnimationFrame(() => attempt(left - 1));\n      else restoring = null;\n    };\n    attempt(6);\n  };\n  const sync = () => (document.querySelector(\"shopify-chat[open]\") ? lock() : unlock());\n  new MutationObserver(sync).observe(body, { subtree: true, attributes: true, attributeFilter: [\"open\"] });\n  sync();\n})();\n\n// Galore fix (Claude, 2026-10-14): on a touch screen that gets the desktop-style header (iPad, Android tablet,\n// touch laptop) the SHOP menu could not be opened: tapping SHOP followed its link (the homepage) and reloaded the\n// page. Horizon opens a header sub-menu on pointerenter and closes it on pointerleave, and a finger \"enters\" and\n// \"leaves\" within one tap (about 65 ms), so the pending open was cancelled before it ran. For touch pointers only:\n// the first tap on an item that has a sub-menu now opens it (the header menu's own activate()), a second tap on\n// the same item follows its link as before, and a tap anywhere else closes it (the menu's own Escape handling).\n// Mouse, pen and keyboard behaviour is untouched, and so is the phone menu drawer (it has no <header-menu>).\n(() => {\n  const ITEM = \"header-menu .menu-list__list-item\";\n  const LINK = \"header-menu a[ref='menuitem'][aria-haspopup='true']\";\n  let touch = null; // the tap in progress: the sub-menu link it started on, and whether that menu was already open\n\n  // Keep Horizon's hover wiring from seeing touch pointers. A window capture listener runs before Horizon's\n  // document capture listener, so stopping the event here means it never reaches it.\n  for (const type of [\"pointerenter\", \"pointerleave\"]) {\n    window.addEventListener(type, (event) => {\n      if (event.pointerType === \"touch\" && event.target.matches?.(ITEM)) event.stopPropagation();\n    }, true);\n  }\n\n  window.addEventListener(\"pointerdown\", (event) => {\n    if (event.pointerType !== \"touch\") return;\n    const link = event.target.closest?.(LINK);\n    touch = link ? { link, wasOpen: link.getAttribute(\"aria-expanded\") === \"true\", at: event.timeStamp } : null;\n    // A tap outside the open item closes its menu.\n    for (const open of document.querySelectorAll(\"header-menu [ref='menuitem'][aria-expanded='true']\")) {\n      if (open.closest(\".menu-list__list-item\")?.contains(event.target)) continue;\n      open.dispatchEvent(new KeyboardEvent(\"keydown\", { key: \"Escape\", bubbles: true, cancelable: true }));\n    }\n  }, true);\n\n  window.addEventListener(\"click\", (event) => {\n    const link = event.target.closest?.(LINK);\n    if (!link || !touch || touch.link !== link || event.timeStamp - touch.at > 1500) return;\n    const { wasOpen } = touch;\n    touch = null;\n    const menu = link.closest(\"header-menu\");\n    if (wasOpen || typeof menu?.activate !== \"function\") return; // second tap: follow the link\n    event.preventDefault();\n    menu.activate(event);\n  }, true);\n})();\n"],
  "mappings": "AAoBA,SAAS,iBAAiB,cAAgB,OAAU,CAClD,MAAM,SAAW,OAAO,QA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