{
  "version": 3,
  "sources": ["/cdn/shop/t/75/assets/product-form.js"],
  "sourcesContent": ["if (!customElements.get('product-form')) {\n  class ProductForm extends HTMLElement {\n    constructor() {\n      super();\n      this.submitListener = this.handleSubmit.bind(this);\n      this.quantityChangeListener = this.handleChange.bind(this);\n      this.variantChangeListener = this.setMaximumInputQuantity.bind(this);\n      if (this.hasChildNodes()) this.init();\n    }\n\n    connectedCallback() {\n      this.init();\n      this.attachVariantListener();\n      this.hydrateSharedQuantity();\n      if (this.compactQuantityMode) this.collapseQuantitySelector();\n\n      if (!this.initialized) {\n        this.initFrame = window.requestAnimationFrame(() => {\n          this.init();\n          this.attachVariantListener();\n          this.hydrateSharedQuantity();\n          if (this.compactQuantityMode) this.collapseQuantitySelector();\n        });\n      }\n    }\n\n    init() {\n      if (this.initialized) return;\n      this.form = this.querySelector('.js-product-form');\n      if (this.form) {\n        this.initialized = true;\n        this.form.querySelector('[name=\"id\"]').disabled = false;\n        this.cartDrawer = document.querySelector('cart-drawer');\n        this.form.addEventListener('submit', this.submitListener);\n\n        if (this.hasAttribute('data-show-quantity-selector')) {\n          this.quantitySelector = this.querySelector('quantity-input');\n        }\n        if (this.quantitySelector) {\n          this.quantityInput = this.quantitySelector.querySelector('.qty-input__input');\n          this.lastConfirmedQuantity = parseInt(this.quantityInput.value, 10) || 0;\n          this.compactQuantityMode = Boolean(this.querySelector('[data-quick-add-count]'));\n          if (this.compactQuantityMode) {\n            this.updateCartCountBadge(this.lastConfirmedQuantity);\n            this.collapseQuantitySelector();\n          }\n          this.quantitySelector.addEventListener('change', this.quantityChangeListener);\n        }\n\n        this.setMaximumInputQuantity();\n        this.handleQuantityButtonState();\n      }\n    }\n\n    attachVariantListener() {\n      if (this.variantListenerAttached) return;\n      if (!this.closest('.product-info') && !this.closest('quick-add-drawer')) return;\n      document.addEventListener('on:variant:change', this.variantChangeListener);\n      this.variantListenerAttached = true;\n    }\n\n    hydrateSharedQuantity() {\n      if (!this.quantitySelector || !ProductForm.quantitiesByVariant) return;\n      const quantity = ProductForm.quantitiesByVariant.get(String(this.dataset.variantId));\n      if (quantity === undefined) return;\n      this.lastConfirmedQuantity = quantity;\n      this.updateQuantityState(quantity);\n    }\n\n    disconnectedCallback() {\n      if (this.initFrame) window.cancelAnimationFrame(this.initFrame);\n      if (this.quantityRevealTimer) window.clearTimeout(this.quantityRevealTimer);\n      window.clearTimeout(this.submitFeedbackTimer);\n      if (this.variantListenerAttached) {\n        document.removeEventListener('on:variant:change', this.variantChangeListener);\n        this.variantListenerAttached = false;\n      }\n    }\n\n    /**\n     * Sets the max attribute of the quantity input\n     */\n    setMaximumInputQuantity() {\n      const productInfo = this.closest('.product-info') || this.closest('quick-add-drawer');\n      if (productInfo) {\n        const quantitySelector = this.querySelector('quantity-input');\n        if (quantitySelector) {\n          const quantityInput = quantitySelector.querySelector('.qty-input__input');\n          quantityInput.removeAttribute('max');\n          const dataEl = productInfo.querySelector('.js-inventory-data');\n          if (dataEl) {\n            const inventory = JSON.parse(dataEl.textContent);\n\n            if (inventory) {\n              if (inventory.inventory_management && inventory.inventory_quantity > 0 && inventory.inventory_policy !== 'continue') {\n                quantityInput.max = inventory.inventory_quantity;\n\n                const currentQuantity = Number(quantityInput.value);\n                if (currentQuantity > 1 && currentQuantity > inventory.inventory_quantity) {\n                  quantityInput.value = quantityInput.max;\n                }\n              }\n            }\n          }\n\n          const minusButton = quantitySelector.querySelector('.btn--minus');\n          const plusButton = quantitySelector.querySelector('.btn--plus');\n          ProductForm.setQuantityButtonState(null, quantityInput, minusButton, plusButton);\n        }\n      }\n    }\n\n    /**\n     * Sets the max attribute of the quantity input\n     */\n    handleQuantityButtonState() {\n      const productInfo = this.closest('.product-info') || this.closest('quick-add-drawer');\n      if (productInfo) {\n        const quantitySelector = this.querySelector('quantity-input');\n        if (quantitySelector) {\n          const quantityInput = quantitySelector.querySelector('.qty-input__input');\n          const minusButton = quantitySelector.querySelector('.btn--minus');\n          const plusButton = quantitySelector.querySelector('.btn--plus');\n\n          plusButton.addEventListener('click', () => {\n            ProductForm.setQuantityButtonState('up', quantityInput, minusButton, plusButton);\n          });\n\n          minusButton.addEventListener('click', () => {\n            ProductForm.setQuantityButtonState('down', quantityInput, minusButton, plusButton);\n          });\n\n          ProductForm.setQuantityButtonState(null, quantityInput, minusButton, plusButton);\n        }\n      }\n    }\n\n    static setQuantityButtonState(direction, quantityInput, minusButton, plusButton) {\n      const currentQuantity = Number(quantityInput.value);\n      const max = Number(quantityInput.max);\n      const min = Number(quantityInput.min);\n\n      let newQuantity = currentQuantity;\n\n      if (direction === 'up') {\n        newQuantity = currentQuantity + 1;\n      } else if (direction === 'down') {\n        newQuantity = currentQuantity - 1;\n      }\n\n      // Enable or disable buttons based on the newQuantity relative to max and min\n      minusButton.disabled = newQuantity <= min;\n      plusButton.disabled = max > 0 && newQuantity >= max;\n    }\n\n    /**\n     * Handles 'change' events on the line item (dispatched by the theme).\n     * @param {object} evt - Event object.\n     */\n    applyLineItemChange(detail) {\n      if (String(detail.variantId) === this.dataset.variantId) {\n        if (!this.quantitySelector || !this.quantityInput) return;\n        if (\n          detail.quantityRevision\n          && !ProductForm.isLatestQuantityRevision(this.dataset.variantId, detail.quantityRevision)\n        ) return;\n        this.lastConfirmedQuantity = parseInt(detail.newQuantity, 10) || 0;\n        this.updateQuantityState(detail.newQuantity);\n      }\n    }\n\n    /**\n     * Handles 'change' events on the quantity-input element.\n     * @param {object} evt - Event object.\n     */\n    handleChange(evt) {\n      const requestedQuantity = parseInt(evt.target.value, 10) || 0;\n      const quantityRevision = ProductForm.beginQuantityMutation(this.dataset.variantId);\n      // Keep the pill and collapsed badge on the shopper's latest intent while\n      // Shopify confirms it. A slow response must never reveal the old count\n      // when the 2.5-second morph retracts.\n      this.updateQuantityState(requestedQuantity);\n      this.revealQuantitySelector();\n      this.queueQuantityUpdate(requestedQuantity, quantityRevision);\n    }\n\n    /**\n     * Handles submission of the product form.\n     * @param {object} evt - Event object.\n     */\n    async handleSubmit(evt) {\n      if (evt.target.id === 'product-signup_form') return;\n\n      evt.preventDefault();\n\n      this.submitBtn = this.querySelector('[name=\"add\"]');\n      const activeSubmitBtn = evt.submitter || this.submitBtn;\n      const submitButtons = this.getSubmitButtons();\n\n      if (!this.submitBtn || activeSubmitBtn?.getAttribute('aria-disabled') === 'true') return;\n\n      if (theme.settings.vibrateOnATC && window.navigator.vibrate) {\n        window.navigator.vibrate(100);\n      }\n\n      this.errorMsg = null;\n      this.setErrorMsgState();\n\n      // Match fast grocery interfaces: show the quantity control immediately and\n      // reconcile it with Shopify after the request completes.\n      const previousQuantity = this.quantityInput ? parseInt(this.quantityInput.value, 10) || 0 : 0;\n      const isOptimisticAdd = Boolean(\n        this.quantitySelector\n        && this.quantityInput\n        && this.dataset.showQuantitySelector !== 'true'\n      );\n      const quantityRevision = this.quantitySelector\n        ? ProductForm.beginQuantityMutation(this.dataset.variantId)\n        : null;\n\n      if (isOptimisticAdd) {\n        this.updateQuantityState(previousQuantity + 1);\n        this.revealQuantitySelector();\n        this.setAttribute('aria-busy', 'true');\n      }\n\n      // Disable \"Add to Cart\" button until submission is complete.\n      window.clearTimeout(this.submitFeedbackTimer);\n      submitButtons.forEach((button) => {\n        button.setAttribute('aria-disabled', 'true');\n        button.classList.remove('is-success');\n        button.classList.add('is-loading');\n      });\n\n      const formData = new FormData(this.form);\n      if (isOptimisticAdd) formData.set('quantity', '1');\n      let sections = 'cart-icon-bubble';\n      const shouldOpenCartDrawer = Boolean(\n        this.cartDrawer\n        && (theme.settings.afterAtc === 'drawer'\n          || (theme.settings.afterAtc === 'drawer_desktop' && theme.mediaMatches.md))\n      );\n      if (shouldOpenCartDrawer) {\n        sections += `,${this.cartDrawer.closest('.shopify-section').id.replace('shopify-section-', '')}`;\n      }\n\n      // Get all quick order lists on the page\n      const quickOrderSections = [];\n      document.querySelectorAll('quick-order-list').forEach((quickOrderList) => {\n        const closestSection = quickOrderList.closest('.shopify-section');\n        if (closestSection) {\n          const sectionId = closestSection.id.replace('shopify-section-', '');\n          // sections.push({\n          //   id: `quick-order-list_${sectionId}`,\n          //   section: sectionId,\n          //   selector: `#quick-order-list_${sectionId}`\n          // });\n          sections += `,${sectionId}`;\n        }\n      });\n\n      formData.append('sections_url', window.location.pathname);\n      formData.append('sections', sections);\n\n      const fetchRequestOpts = {\n        method: 'POST',\n        headers: {\n          Accept: 'application/javascript',\n          'X-Requested-With': 'XMLHttpRequest'\n        },\n        body: formData\n      };\n\n      let addSucceeded = false;\n      try {\n        this.pendingAddRequest = fetch(theme.routes.cartAdd, fetchRequestOpts);\n        const response = await this.pendingAddRequest;\n        const data = await response.json();\n        let error = typeof data.description === 'string' ? data.description : data.message;\n        if (data.errors && typeof data.errors === 'object') {\n          error = Object.entries(data.errors).map((item) => item[1].join(', '));\n        }\n\n        if (data.status) this.setErrorMsgState(error);\n\n        if (!response.ok) throw new Error(response.status);\n        addSucceeded = true;\n        this.lastConfirmedQuantity = previousQuantity + 1;\n\n        if (isOptimisticAdd) {\n          this.removeAttribute('aria-busy');\n        }\n\n        if (theme.settings.afterAtc === 'page') {\n          window.location.href = theme.routes.cart;\n        } else {\n          // Update cart icon count.\n          if (\n            !quantityRevision\n            || ProductForm.isLatestQuantityRevision(this.dataset.variantId, quantityRevision)\n          ) ProductForm.updateCartIcon(data);\n\n          // If item was added from Quick Add drawer, show \"Added to cart\" message.\n          const quickAddDrawer = this.closest('quick-add-drawer');\n          if (quickAddDrawer) quickAddDrawer.addedToCart();\n\n          // Update cart drawer contents.\n          if (this.cartDrawer && shouldOpenCartDrawer) {\n            this.cartDrawer.renderContents(\n              data,\n              !quickAddDrawer\n            );\n\n            // Update the quick order lists on the page\n            if (quickOrderSections.length) {\n              quickOrderSections.forEach((quickOrderSection) => {\n                const sectionEl = document.getElementById(quickOrderSection.id);\n                if (!sectionEl) return;\n\n                const el = sectionEl.querySelector(quickOrderSection.selector) || sectionEl;\n                el.innerHTML = ProductForm.getElementHTML(\n                  data.sections[quickOrderSection.section],\n                  quickOrderSection.selector\n                );\n              });\n            }\n          } else if (this.cartDrawer) {\n            // Keep the drawer accurate without making the Add interaction wait\n            // for its much larger rendered section.\n            this.cartDrawer.refreshCartDrawer();\n          } else if (window.location.pathname === theme.routes.cart) {\n            const cartItems = document.querySelector('cart-items');\n            if (cartItems) {\n              if (cartItems.dataset.empty === 'true') {\n                window.location.reload();\n              } else {\n                cartItems.refreshCartItems();\n              }\n            }\n          }\n        }\n\n        // Cart JSON is useful for cross-card synchronisation, but it must not\n        // delay the visible Add response or re-enable the control.\n        fetch(`${theme.routes.cart}.js`)\n          .then((cartResponse) => {\n            if (!cartResponse.ok) throw new Error(cartResponse.status);\n            return cartResponse.json();\n          })\n          .then((newCartData) => {\n            if (\n              quantityRevision\n              && !ProductForm.isLatestQuantityRevision(this.dataset.variantId, quantityRevision)\n            ) return;\n            const confirmedQuantity = newCartData.items.reduce((total, item) => (\n              item.variant_id === data.variant_id ? total + item.quantity : total\n            ), 0) || (previousQuantity + 1);\n            this.lastConfirmedQuantity = confirmedQuantity;\n            ProductForm.updateCartItemCount(newCartData.item_count);\n\n            document.dispatchEvent(new CustomEvent('on:line-item:change', {\n              detail: {\n                cart: newCartData,\n                variantId: data.variant_id,\n                oldQuantity: previousQuantity,\n                newQuantity: confirmedQuantity,\n                quantityRevision\n              }\n            }));\n\n            this.dispatchEvent(new CustomEvent('on:cart:add', {\n              bubbles: true,\n              detail: {\n                cart: newCartData,\n                variantId: data.variant_id\n              }\n            }));\n            ProductForm.announce(\n              `Added ${this.dataset.productTitle || 'item'}; ${confirmedQuantity} in basket.`\n            );\n            if (this.quantityInput && activeSubmitBtn === document.activeElement) {\n              window.requestAnimationFrame(() => this.quantityInput.focus({ preventScroll: true }));\n            }\n          })\n          .catch((error) => console.log(error)); // eslint-disable-line\n      } catch (error) {\n        console.log(error); // eslint-disable-line\n\n        if (\n          isOptimisticAdd\n          && ProductForm.isLatestQuantityRevision(this.dataset.variantId, quantityRevision)\n        ) {\n          this.updateQuantityState(previousQuantity);\n          this.removeAttribute('aria-busy');\n        }\n\n        this.dispatchEvent(new CustomEvent('on:cart:error', {\n          bubbles: true,\n          detail: {\n            error: this.errorMsg ? this.errorMsg.textContent : error.message\n          }\n        }));\n\n        if (this.cartDrawer) this.cartDrawer.refreshCartDrawer();\n      } finally {\n        // Re-enable 'Add to Cart' button.\n        submitButtons.forEach((button) => {\n          if (addSucceeded) button.classList.add('is-success');\n          else button.classList.remove('is-loading');\n          button.removeAttribute('aria-disabled');\n        });\n        this.pendingAddRequest = null;\n        if (isOptimisticAdd) {\n          this.removeAttribute('aria-busy');\n        }\n        this.submitFeedbackTimer = window.setTimeout(() => {\n          submitButtons.forEach((button) => {\n            button.classList.remove('is-loading');\n            button.classList.remove('is-success');\n          });\n        }, 250);\n      }\n    }\n\n    getSubmitButtons() {\n      const buttons = [this.submitBtn];\n      if (this.form?.id) {\n        document.querySelectorAll(`[name=\"add\"][form=\"${CSS.escape(this.form.id)}\"]`)\n          .forEach((button) => buttons.push(button));\n      }\n      return [...new Set(buttons.filter(Boolean))];\n    }\n\n    /**\n     * Updates the cart icon count in the header.\n     * @param {object} response - Response JSON.\n     */\n    static updateCartIcon(response) {\n      const cartIconBubble = document.getElementById('cart-icon-bubble');\n      if (cartIconBubble) {\n        cartIconBubble.innerHTML = response.sections['cart-icon-bubble'];\n      }\n    }\n\n    static updateCartItemCount(count) {\n      if (typeof count !== 'number') return;\n      const label = `${count} ${count === 1 ? 'item' : 'items'}`;\n      document.querySelectorAll('.js-cart-item-count').forEach((element) => {\n        element.textContent = label;\n      });\n    }\n\n    static announce(message) {\n      let region = document.getElementById('product-form-status');\n      if (!region) {\n        region = document.createElement('div');\n        region.id = 'product-form-status';\n        region.className = 'visually-hidden';\n        region.setAttribute('role', 'status');\n        region.setAttribute('aria-live', 'polite');\n        region.setAttribute('aria-atomic', 'true');\n        document.body.appendChild(region);\n      }\n\n      region.textContent = '';\n      window.requestAnimationFrame(() => { region.textContent = message; });\n    }\n\n    static beginQuantityMutation(variantId) {\n      if (!ProductForm.quantityRevisions) ProductForm.quantityRevisions = new Map();\n      const key = String(variantId);\n      const revision = (ProductForm.quantityRevisions.get(key) || 0) + 1;\n      ProductForm.quantityRevisions.set(key, revision);\n      return revision;\n    }\n\n    static isLatestQuantityRevision(variantId, revision) {\n      if (!revision || !ProductForm.quantityRevisions) return true;\n      return ProductForm.quantityRevisions.get(String(variantId)) === revision;\n    }\n\n    updateQuantityState(newQuantity) {\n      this.quantityInput.value = newQuantity;\n      this.quantitySelector.currentQty = newQuantity;\n      if (this.compactQuantityMode) {\n        this.updateCartCountBadge(newQuantity);\n        if (newQuantity <= 0) this.collapseQuantitySelector();\n      } else {\n        this.setAttribute('data-show-quantity-selector', newQuantity > 0 ? 'true' : 'false');\n      }\n\n      const minusButton = this.quantitySelector.querySelector('.btn--minus');\n      const plusButton = this.quantitySelector.querySelector('.btn--plus');\n      if (minusButton && plusButton) {\n        ProductForm.setQuantityButtonState(null, this.quantityInput, minusButton, plusButton);\n      }\n    }\n\n    updateCartCountBadge(quantity) {\n      const badge = this.querySelector('[data-quick-add-count]');\n      if (!badge) return;\n\n      const count = parseInt(quantity, 10) || 0;\n      badge.textContent = count;\n      badge.hidden = count <= 0;\n    }\n\n    revealQuantitySelector() {\n      if (\n        !this.compactQuantityMode\n        || !this.quantitySelector\n        || (parseInt(this.quantityInput.value, 10) || 0) <= 0\n      ) return;\n      window.clearTimeout(this.quantityRevealTimer);\n      this.setAttribute('data-show-quantity-selector', 'true');\n      this.scheduleQuantitySelectorCollapse();\n    }\n\n    scheduleQuantitySelectorCollapse() {\n      if (!this.compactQuantityMode) return;\n      window.clearTimeout(this.quantityRevealTimer);\n      this.quantityRevealTimer = window.setTimeout(() => {\n        this.collapseQuantitySelector();\n      }, 2500);\n    }\n\n    collapseQuantitySelector() {\n      if (!this.compactQuantityMode) return;\n      window.clearTimeout(this.quantityRevealTimer);\n      this.setAttribute('data-show-quantity-selector', 'false');\n    }\n\n    queueQuantityUpdate(quantity, quantityRevision) {\n      this.queuedQuantityUpdate = { quantity, quantityRevision };\n      if (this.quantityUpdatePromise) return this.quantityUpdatePromise;\n\n      this.quantityUpdatePromise = (async () => {\n        while (this.queuedQuantityUpdate) {\n          const nextUpdate = this.queuedQuantityUpdate;\n          this.queuedQuantityUpdate = null;\n          await this.updateQuantity(nextUpdate.quantity, nextUpdate.quantityRevision);\n        }\n      })().finally(() => {\n        this.quantityUpdatePromise = null;\n      });\n\n      return this.quantityUpdatePromise;\n    }\n\n    async updateQuantity(quantity, quantityRevision) {\n      this.quantitySelector.setAttribute('aria-disabled', 'true');\n      const lineErrors = this.querySelector('.js-product-form-errors');\n      let updateSucceeded = false;\n      let previousConfirmedQuantity = this.lastConfirmedQuantity;\n\n      const fetchRequestOpts = {\n        method: 'POST',\n        headers: {\n          Accept: 'application/json',\n          'Content-Type': 'application/json'\n        }\n      };\n\n      fetchRequestOpts.body = JSON.stringify({\n        id: this.dataset.variantId,\n        quantity,\n        sections: 'cart-icon-bubble',\n        sections_url: window.location.pathname\n      });\n\n      try {\n        // A shopper can adjust the optimistic quantity immediately; queue the\n        // cart change behind the still-running Add request when necessary.\n        if (this.pendingAddRequest) {\n          const addResponse = await this.pendingAddRequest;\n          if (!addResponse.ok) throw new Error(addResponse.status);\n          previousConfirmedQuantity = this.lastConfirmedQuantity;\n        }\n\n        const response = await fetch(theme.routes.cartChange, fetchRequestOpts);\n        const data = await response.json();\n\n        if (!response.ok) throw new Error(data.errors || response.status);\n        updateSucceeded = true;\n        const confirmedQuantity = (data.items || []).reduce((sum, item) => (\n          String(item.variant_id) === String(this.dataset.variantId)\n            ? sum + Number(item.quantity)\n            : sum\n        ), 0);\n        // Always retain the newest server-confirmed value. A later queued\n        // request may fail and must roll back to this quantity, not the value\n        // from before the queue started.\n        this.lastConfirmedQuantity = confirmedQuantity;\n\n        if (ProductForm.isLatestQuantityRevision(this.dataset.variantId, quantityRevision)) {\n          if (data.sections && data.sections['cart-icon-bubble']) {\n            ProductForm.updateCartIcon(data);\n          }\n          ProductForm.updateCartItemCount(data.item_count);\n          document.dispatchEvent(new CustomEvent('on:line-item:change', {\n            detail: {\n              cart: data,\n              variantId: Number(this.dataset.variantId),\n              oldQuantity: previousConfirmedQuantity,\n              newQuantity: confirmedQuantity,\n              quantityRevision\n            }\n          }));\n          ProductForm.announce(\n            `${this.dataset.productTitle || 'Item'} quantity updated to ${confirmedQuantity}.`\n          );\n        }\n\n        if (\n          ProductForm.isLatestQuantityRevision(this.dataset.variantId, quantityRevision)\n          && window.location.pathname === theme.routes.cart\n        ) {\n          const cartItems = document.querySelector('cart-items');\n          if (cartItems && cartItems.dataset.empty !== 'true') cartItems.refreshCartItems();\n        }\n\n        if (lineErrors) {\n          lineErrors.innerHTML = '';\n          lineErrors.hidden = true;\n        }\n      } catch (error) {\n        const formattedError = /^[0-9]+$/.test(error.message)\n          ? theme.strings.cartError\n          : ProductForm.formatErrorMessage(error.message);\n\n        if (this.closest('.card--product')) {\n          ProductForm.showGlobalError(formattedError);\n          if (lineErrors) lineErrors.hidden = true;\n        } else if (lineErrors) {\n          lineErrors.textContent = formattedError;\n          lineErrors.hidden = false;\n          window.clearTimeout(this.quantityErrorTimer);\n          this.quantityErrorTimer = window.setTimeout(() => {\n            lineErrors.hidden = true;\n          }, 7500);\n        }\n        console.log(error); // eslint-disable-line\n\n        if (ProductForm.isLatestQuantityRevision(this.dataset.variantId, quantityRevision)) {\n          this.updateQuantityState(this.lastConfirmedQuantity);\n        }\n      } finally {\n        if (\n          updateSucceeded\n          && ProductForm.isLatestQuantityRevision(this.dataset.variantId, quantityRevision)\n        ) this.updateQuantityState(this.lastConfirmedQuantity);\n        if (ProductForm.isLatestQuantityRevision(this.dataset.variantId, quantityRevision)) {\n          this.quantitySelector.removeAttribute('aria-disabled');\n        }\n        if (\n          this.cartDrawer\n          && ProductForm.isLatestQuantityRevision(this.dataset.variantId, quantityRevision)\n        ) this.cartDrawer.refreshCartDrawer();\n      }\n    }\n\n    /**\n     * Gets the innerHTML of an element.\n     * @param {string} html - Section HTML.\n     * @param {string} selector - CSS selector for the element to get the innerHTML of.\n     * @returns {string}\n     */\n    static getElementHTML(html, selector) {\n      const tmpl = document.createElement('template');\n      tmpl.innerHTML = html;\n\n      const el = tmpl.content.querySelector(selector);\n      return el ? el.innerHTML : '';\n    }\n\n    static formatErrorMessage(error) {\n      const message = String(error || '').trim();\n      const availabilityMatch = message.match(\n        /^Only\\s+(\\d+)\\s+items?\\s+was added to your cart due to availability\\.?$/i\n      );\n\n      if (!availabilityMatch) return message;\n\n      const availableCount = Number(availabilityMatch[1]);\n      return `Only ${availableCount} ${availableCount === 1 ? 'item is' : 'items are'} available. Your cart has been updated.`;\n    }\n\n    static showGlobalError(error) {\n      let toast = document.querySelector('.product-card-error-toast');\n      if (!toast) {\n        toast = document.createElement('div');\n        toast.className = 'product-card-error-toast';\n        toast.setAttribute('role', 'alert');\n        toast.setAttribute('aria-live', 'assertive');\n        document.body.appendChild(toast);\n      }\n\n      toast.textContent = ProductForm.formatErrorMessage(error);\n      toast.hidden = false;\n      window.clearTimeout(ProductForm.errorToastTimer);\n      ProductForm.errorToastTimer = window.setTimeout(() => {\n        toast.hidden = true;\n      }, 7500);\n    }\n\n    /**\n     * Shows/hides an error message.\n     * @param {string} [error=false] - Error to show a message for.\n     */\n    setErrorMsgState(error = false) {\n      this.errorMsg = this.errorMsg || this.querySelector('.js-form-error');\n      if (!this.errorMsg) return;\n\n      window.clearTimeout(this.errorMsgTimer);\n      this.errorMsg.hidden = !error;\n      if (error) {\n        const errorArray = Array.isArray(error) ? error : [error];\n        if (this.closest('.card--product')) {\n          this.errorMsg.hidden = true;\n          ProductForm.showGlobalError(errorArray.map((err) => ProductForm.formatErrorMessage(err)).join(' '));\n          return;\n        }\n\n        this.errorMsg.innerHTML = '';\n        errorArray.forEach((err, index) => {\n          if (index > 0) this.errorMsg.insertAdjacentHTML('beforeend', '<br>');\n          this.errorMsg.insertAdjacentText('beforeend', ProductForm.formatErrorMessage(err));\n        });\n\n        this.errorMsgTimer = window.setTimeout(() => {\n          this.errorMsg.hidden = true;\n        }, 7500);\n      }\n    }\n  }\n\n  ProductForm.quantitiesByVariant = new Map();\n  document.addEventListener('on:line-item:change', (evt) => {\n    const detail = evt.detail || {};\n    if (detail.variantId === undefined) return;\n    const variantId = String(detail.variantId);\n    const quantity = parseInt(detail.newQuantity, 10) || 0;\n    ProductForm.quantitiesByVariant.set(variantId, quantity);\n    document.querySelectorAll(`product-form[data-variant-id=\"${CSS.escape(variantId)}\"]`)\n      .forEach((form) => form.applyLineItemChange(detail));\n  });\n\n  customElements.define('product-form', ProductForm);\n}\n"],
  "mappings": "AAAA,GAAI,CAAC,eAAe,IAAI,cAAc,EAAG,CACvC,MAAM,oBAAoB,WAAY,CACpC,aAAc,CACZ,MAAM,EACN,KAAK,eAAiB,KAAK,aAAa,KAAK,IAAI,EACjD,KAAK,uBAAyB,KAAK,aAAa,KAAK,IAAI,EACzD,KAAK,sBAAwB,KAAK,wBAAwB,KAAK,IAAI,EAC/D,KAAK,cAAc,GAAG,KAAK,KAAK,CACtC,CAEA,mBAAoB,CAClB,KAAK,KAAK,EACV,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EACvB,KAAK,qBAAqB,KAAK,yBAAyB,EAEvD,KAAK,cACR,KAAK,UAAY,OAAO,sBAAsB,IAAM,CAClD,KAAK,KAAK,EACV,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EACvB,KAAK,qBAAqB,KAAK,yBAAyB,CAC9D,CAAC,EAEL,CAEA,MAAO,CACD,KAAK,cACT,KAAK,KAAO,KAAK,cAAc,kBAAkB,EAC7C,KAAK,OACP,KAAK,YAAc,GACnB,KAAK,KAAK,cAAc,aAAa,EAAE,SAAW,GAClD,KAAK,WAAa,SAAS,cAAc,aAAa,EACtD,KAAK,KAAK,iBAAiB,SAAU,KAAK,cAAc,EAEpD,KAAK,aAAa,6BAA6B,IACjD,KAAK,iBAAmB,KAAK,cAAc,gBAAgB,GAEzD,KA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