{
  "version": 3,
  "sources": ["/cdn/shop/t/25/assets/header-hero-overlay.js?ctx=v1"],
  "sourcesContent": ["/**\n * Header context: transparent header only when overlapping a hero.\n * - Sets body.header-over-hero for homepage and templates whose first section is a hero.\n * - Measures --wt-header-overlap when the header sits over a hero.\n */\n(function () {\n  const HERO_CLASS = \"header-over-hero\";\n\n  function firstMainSection() {\n    const main = document.getElementById(\"root\");\n    if (!main) return null;\n    return main.querySelector(\":scope > .shopify-section\");\n  }\n\n  function sectionQualifiesAsHero(section) {\n    if (!section) return false;\n\n    if (section.classList.contains(\"slideshow-section\")) return true;\n\n    if (\n      section.querySelector(\n        \"slideshow-section, [data-scroll-slideshow], [data-native-scroll-slideshow], .wt-slider__container--hero, .hero__pic-container, .hero\",\n      )\n    ) {\n      return true;\n    }\n\n    return Array.from(section.classList).some((className) =>\n      /slideshow|image-banner|page-header-image|page-header-logo|video-banner|hero/i.test(\n        className,\n      ),\n    );\n  }\n\n  function pageHasHeroUnderHeader() {\n    if (document.body.classList.contains(\"template-index\")) return true;\n    return sectionQualifiesAsHero(firstMainSection());\n  }\n\n  function syncHeaderOverHeroClass() {\n    const shouldOverlay = pageHasHeroUnderHeader();\n    document.body.classList.toggle(HERO_CLASS, shouldOverlay);\n    if (!shouldOverlay) {\n      document.documentElement.style.removeProperty(\"--wt-header-overlap\");\n    }\n    return shouldOverlay;\n  }\n\n  function measureOverlap() {\n    if (!document.body.classList.contains(HERO_CLASS)) return;\n    const headerSection = document.querySelector(\".shopify-section.page-header\");\n    if (!headerSection) return;\n    const h = headerSection.offsetHeight;\n    if (h < 1) return;\n    document.documentElement.style.setProperty(\"--wt-header-overlap\", h + \"px\");\n  }\n\n  function init() {\n    syncHeaderOverHeroClass();\n    measureOverlap();\n  }\n\n  init();\n\n  window.addEventListener(\"resize\", measureOverlap, { passive: true });\n  if (document.fonts?.ready) {\n    document.fonts.ready.then(measureOverlap);\n  }\n\n  const ro = new ResizeObserver(measureOverlap);\n  const headerSection = document.querySelector(\".shopify-section.page-header\");\n  const ann = document.querySelector(\".shopify-section.wt-announcement\");\n  if (headerSection) ro.observe(headerSection);\n  if (ann) ro.observe(ann);\n\n  document.addEventListener(\"shopify:section:load\", init);\n  document.addEventListener(\"shopify:section:reorder\", init);\n\n  window.addEventListener(\n    \"pageshow\",\n    () => {\n      init();\n      requestAnimationFrame(() => {\n        const ph = document.querySelector(\"page-header.wt-header\");\n        if (ph) void ph.offsetHeight;\n      });\n    },\n    { passive: true },\n  );\n\n  window.__syncHeaderOverHero = syncHeaderOverHeroClass;\n})();\n"],
  "mappings": "CAKC,UAAY,CACX,MAAM,WAAa,mBAEnB,SAAS,kBAAmB,CAC1B,MAAM,KAAO,SAAS,eAAe,MAAM,EAC3C,OAAK,KACE,KAAK,cAAc,2BAA2B,EADnC,IAEpB,CAEA,SAAS,uBAAuB,QAAS,CACvC,OAAK,QAED,QAAQ,UAAU,SAAS,mBAAmB,GAGhD,QAAQ,cACN,sIACF,EAEO,GAGF,MAAM,KAAK,QAAQ,SAAS,EAAE,KAAM,WACzC,+EAA+E,KAC7E,SACF,CACF,EAhBqB,EAiBvB,CAEA,SAAS,wBAAyB,CAChC,OAAI,SAAS,KAAK,UAAU,SAAS,gBAAgB,EAAU,GACxD,uBAAuB,iBAAiB,CAAC,CAClD,CAEA,SAAS,yBAA0B,CACjC,MAAM,cAAgB,uBAAuB,EAC7C,gBAAS,KAAK,UAAU,OAAO,WAAY,aAAa,EACnD,eACH,SAAS,gBAAgB,MAAM,eAAe,qBAAqB,EAE9D,aACT,CAEA,SAAS,gBAAiB,CACxB,GAAI,CAAC,SAAS,KAAK,UAAU,SAAS,UAAU,EAAG,OACnD,MAAMA,eAAgB,SAAS,cAAc,8BAA8B,EAC3E,GAAI,CAACA,eAAe,OACpB,MAAM,EAAIA,eAAc,aACpB,EAAI,GACR,SAAS,gBAAgB,MAAM,YAAY,sBAAuB,EAAI,IAAI,CAC5E,CAEA,SAAS,MAAO,CACd,wBAAwB,EACxB,eAAe,CAC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