{
  "version": 3,
  "sources": ["/cdn/shop/t/13/assets/custom.js?cb=15326"],
  "sourcesContent": ["/**\n * ----------------------------------------------------------------------------------------------------------------------\n * CLOSE BUTTONS INSIDE DRAWER / POPOVER SHADOW ROOTS (Safari)\n * ----------------------------------------------------------------------------------------------------------------------\n *\n * Impact's close buttons are customized built-ins (<button is=\"close-button\">). Safari doesn't support those natively,\n * so Impact relies on the custom-elements polyfill in vendor.min.js, which hooks Element.prototype.attachShadow to\n * upgrade buttons inside shadow roots. The iubenda autoblocking script (Complianz cookie app) replaces\n * HTMLElement.prototype.attachShadow with a wrapper that calls the native method directly, so the polyfill never sees\n * the drawers' shadow roots: the \"x\" of the cart notification, menu and search drawers does nothing on iPhones.\n *\n * Fallback: on click, a close button that was not upgraded dispatches the same event Impact's CloseButton dispatches.\n * Upgraded buttons (all other browsers, or Safari without iubenda) are left alone.\n */\ndocument.addEventListener(\n  'click',\n  (event) => {\n    const CloseButton = window.customElements.get('close-button');\n\n    if (!CloseButton) {\n      return;\n    }\n\n    const button = event.composedPath().find((node) => node instanceof Element && node.localName === 'button' && node.getAttribute('is') === 'close-button');\n\n    if (!button || button instanceof CloseButton) {\n      return;\n    }\n\n    button.dispatchEvent(new CustomEvent('dialog:force-close', { bubbles: true, cancelable: true, composed: true }));\n  },\n  { capture: true },\n);\n"],
  "mappings": "AAcA,SAAS,iBACP,QACC,OAAU,CACT,MAAM,YAAc,OAAO,eAAe,IAAI,cAAc,EAE5D,GAAI,CAAC,YACH,OAGF,MAAM,OAAS,MAAM,aAAa,EAAE,KAAM,MAAS,gBAAgB,SAAW,KAAK,YAAc,UAAY,KAAK,aAAa,IAAI,IAAM,cAAc,EAEnJ,CAAC,QAAU,kBAAkB,aAIjC,OAAO,cAAc,IAAI,YAAY,qBAAsB,CAAE,QAAS,GAAM,WAAY,GAAM,SAAU,EAAK,CAAC,CAAC,CACjH,EACA,CAAE,QAAS,EAAK,CAClB",
  "names": []
}
