{
  "version": 3,
  "sources": ["/cdn/shop/t/23/assets/main-product.js?x=1791030452239"],
  "sourcesContent": ["import { LazyLoader } from \"@NextSkyTheme/lazy-load\";\n\ndocument.addEventListener(\"DOMContentLoaded\", function () {\n  function addProductEntry(productJson, storedProducts) {\n    if (storedProducts === null) storedProducts = [];\n    const currentProductID = productJson.toString();\n    if (!storedProducts.includes(currentProductID)) {\n      storedProducts.unshift(currentProductID);\n      if (storedProducts.length > 25) {\n        storedProducts.pop();\n      }\n      localStorage.setItem(\n        \"recently-viewed-products\",\n        JSON.stringify(storedProducts)\n      );\n    } else {\n      const index = storedProducts.indexOf(currentProductID);\n      if (index > -1) {\n        storedProducts.splice(index, 1);\n      }\n      storedProducts.unshift(currentProductID);\n      localStorage.setItem(\n        \"recently-viewed-products\",\n        JSON.stringify(storedProducts)\n      );\n    }\n  }\n\n  const prodData = document.querySelector(\"[data-product-json]\");\n  if (prodData != null) {\n    const productJson = JSON.parse(prodData.innerHTML);\n    const storedProducts = JSON.parse(\n      localStorage.getItem(\"recently-viewed-products\")\n    );\n    addProductEntry(productJson, storedProducts);\n  }\n});\n\nclass ProductRecommendations extends HTMLElement {\n  constructor() {\n    super();\n  }\n  init() {\n    this.connectedCallback();\n  }\n  connectedCallback() {\n    const handleIntersection = (entries, observer) => {\n      if (!entries[0].isIntersecting) return;\n      observer.unobserve(this);\n      fetch(this.dataset.url)\n        .then((response) => response.text())\n        .then((text) => {\n          const html = document.createElement(\"div\");\n          html.innerHTML = text;\n          const recommendations = html.querySelector(\"product-recommendations\");\n          if (recommendations && recommendations.innerHTML.trim().length) {\n            this.innerHTML = recommendations.innerHTML;\n          }\n          new LazyLoader(\".image-lazy-load\");\n        })\n        .finally(() => {})\n        .catch((e) => {\n          console.error(e);\n        });\n    };\n\n    new IntersectionObserver(handleIntersection.bind(this), {\n      rootMargin: \"0px 0px 400px 0px\",\n    }).observe(this);\n  }\n}\ncustomElements.define(\"product-recommendations\", ProductRecommendations);\n\nclass StickyAddCart extends HTMLElement {\n  constructor() {\n    super();\n    this.init();\n  }\n  init() {\n    const _this = this;\n    this.main = document.querySelector(\".main-product-section\");\n    if (!this.main) return;\n    const primaryBtn = this.main.querySelector(\".block-product__buttons\");\n    const footer = document.querySelector(\"footer\");\n    if (!primaryBtn) return;\n    var isVisible = true;\n    window.addEventListener(\"scroll\", function () {\n      const buttonRect = primaryBtn.getBoundingClientRect();\n      const viewportHeight = window.innerHeight;\n      if (footer) {\n        const footerRect = footer.getBoundingClientRect();\n        if (footerRect.top < window.innerHeight - 100) {\n          _this.classList.remove(\"show-sticky-cart\");\n          document.documentElement.classList.remove(\"show-sticky-cart-active\");\n          isVisible = true;\n        } else {\n          if (\n            !isVisible &&\n            buttonRect.top < viewportHeight &&\n            buttonRect.bottom > 0\n          ) {\n            isVisible = true;\n            _this.classList.remove(\"show-sticky-cart\");\n            document.documentElement.classList.remove(\n              \"show-sticky-cart-active\"\n            );\n          } else if (isVisible && buttonRect.bottom <= 0) {\n            isVisible = false;\n            _this.classList.add(\"show-sticky-cart\");\n            document.documentElement.classList.add(\"show-sticky-cart-active\");\n          }\n        }\n      } else {\n        if (\n          !isVisible &&\n          buttonRect.top < viewportHeight &&\n          buttonRect.bottom > 0\n        ) {\n          isVisible = true;\n          _this.classList.remove(\"show-sticky-cart\");\n          document.documentElement.classList.remove(\"show-sticky-cart-active\");\n        } else if (isVisible && buttonRect.bottom <= 0) {\n          isVisible = false;\n          _this.classList.add(\"show-sticky-cart\");\n          document.documentElement.classList.add(\"show-sticky-cart-active\");\n        }\n      }\n    });\n  }\n}\ncustomElements.define(\"sticky-add-cart\", StickyAddCart);\n\nconst infoGallerySlide = () => {\n  const gallery = document.querySelectorAll(\".info-gallery__card\");\n  gallery.forEach((e) => {\n    e.addEventListener(\"mouseover\", (event) => {\n      const currentTarget = event.currentTarget;\n      if (!currentTarget.classList.contains(\"active\")) {\n        gallery.forEach((el) => {\n          el.classList.remove(\"active\");\n        });\n        currentTarget.classList.add(\"active\");\n      }\n    });\n  });\n};\ndocument.addEventListener(\"shopify:section:load\", function () {\n  infoGallerySlide();\n});\ninfoGallerySlide();\n\n/* Tipo workshop widget fixes: (1) rename the service label, (2) keep the notes field readable */\n(function () {\n  try {\n    var st = document.createElement(\"style\");\n    st.textContent =\n      \".tpb-booking-form textarea, .tpb-form-control.booking-note, textarea.booking-note { background-color: #fff !important; color: #1d1d1f !important; -webkit-text-fill-color: #1d1d1f !important; caret-color: #1d1d1f !important; opacity: 1 !important; }\";\n    document.head.appendChild(st);\n\n    var FROM = /make it low (and|&) slow/i;\n    var TO = \"Bedrijfs workshop op maat\";\n    var busy = false;\n    var run = function () {\n      if (busy || !document.body) return;\n      busy = true;\n      var w = document.createTreeWalker(document.body, NodeFilter.SHOW_TEXT);\n      var n;\n      while ((n = w.nextNode())) {\n        var p = n.parentNode;\n        if (!p || /^(SCRIPT|STYLE|TEXTAREA|NOSCRIPT)$/.test(p.nodeName)) continue;\n        if (FROM.test(n.nodeValue)) n.nodeValue = n.nodeValue.replace(FROM, TO);\n      }\n      /* inline !important beats any stylesheet rule the booking app injects */\n      var areas = document.querySelectorAll(\".tpb-booking-form textarea, .tpb-form-control.booking-note, textarea.booking-note\");\n      for (var i = 0; i < areas.length; i++) {\n        var s = areas[i].style;\n        s.setProperty(\"color\", \"#1d1d1f\", \"important\");\n        s.setProperty(\"-webkit-text-fill-color\", \"#1d1d1f\", \"important\");\n        s.setProperty(\"background-color\", \"#ffffff\", \"important\");\n        s.setProperty(\"caret-color\", \"#1d1d1f\", \"important\");\n      }\n      busy = false;\n    };\n    var t = null;\n    var obs = new MutationObserver(function () {\n      clearTimeout(t);\n      t = setTimeout(run, 80);\n    });\n    var start = function () {\n      run();\n      obs.observe(document.body, { childList: true, subtree: true, characterData: true });\n    };\n    if (document.readyState === \"loading\") {\n      document.addEventListener(\"DOMContentLoaded\", start);\n    } else {\n      start();\n    }\n  } catch (e) {}\n})();\n"],
  "mappings": "AAAA,OAAS,eAAkB,0BAE3B,SAAS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