{
  "version": 3,
  "sources": ["/cdn/shop/t/174/assets/prepaid-price-offer-v16.js?fs_theme=20260730-34"],
  "sourcesContent": ["(() => {\n  const formatMoney = (cents) => {\n    const currency = window.Shopify?.currency?.active || 'INR';\n    const locale = document.documentElement.lang || 'en-IN';\n    return new Intl.NumberFormat(locale, {\n      style: 'currency',\n      currency,\n      maximumFractionDigits: 2,\n    }).format(cents / 100);\n  };\n\n  const initialise = (offer) => {\n    if (!offer || offer.dataset.initialised === 'true') return;\n    offer.dataset.initialised = 'true';\n\n    const form = offer.closest('.product-info')?.querySelector('[data-product-form]');\n    const quantityInput = form?.querySelector('input[name=\"quantity\"]');\n    const title = offer.querySelector('[data-prepaid-offer-title]');\n    const detail = offer.querySelector('[data-prepaid-offer-detail]');\n    let unitPrice = Number(offer.dataset.unitPrice || 0);\n\n    const discounts = [\n      Number(offer.getAttribute('data-discount-2-4') || 0),\n      Number(offer.getAttribute('data-discount-5-9') || 0),\n      Number(offer.getAttribute('data-discount-10-plus') || 0),\n    ];\n\n    const update = () => {\n      const quantity = Math.max(1, Number(quantityInput?.value || 1));\n      const tierIndex = quantity >= 10 ? 2 : quantity >= 5 ? 1 : quantity >= 2 ? 0 : -1;\n      const discount = tierIndex >= 0 ? discounts[tierIndex] : 0;\n      const regularTotal = unitPrice * quantity;\n      const prepaidTotal = Math.round(regularTotal * (100 - discount) / 100);\n      const saving = regularTotal - prepaidTotal;\n\n      if (tierIndex === -1) {\n        const tierPrices = discounts.map((rate) => Math.round(unitPrice * (100 - rate) / 100));\n        title.textContent = `Get it at ${formatMoney(tierPrices[2])} per packet with prepaid payment`;\n        detail.textContent = `Pay via UPI, Debit or Credit Card \u00B7 2\u20134 packets: ${formatMoney(tierPrices[0])} each \u00B7 5\u20139 packets: ${formatMoney(tierPrices[1])} each \u00B7 10+ packets: ${formatMoney(tierPrices[2])} each`;\n        return;\n      }\n\n      const packetLabel = quantity === 1 ? 'packet' : 'packets';\n      title.textContent = `Get ${quantity} ${packetLabel} at ${formatMoney(prepaidTotal)} with prepaid payment`;\n      detail.textContent = `${formatMoney(Math.round(prepaidTotal / quantity))} per packet \u00B7 You save ${formatMoney(saving)} (${discount}%) \u00B7 Pay via UPI, Debit or Credit Card`;\n    };\n\n    quantityInput?.addEventListener('input', update);\n    quantityInput?.addEventListener('change', update);\n    form?.addEventListener('variant:change', (event) => {\n      if (event.detail?.variant?.price != null) unitPrice = Number(event.detail.variant.price);\n      update();\n    });\n    update();\n  };\n\n  const boot = () => document.querySelectorAll('[data-prepaid-price-offer]').forEach(initialise);\n  document.addEventListener('DOMContentLoaded', boot);\n  document.addEventListener('shopify:section:load', boot);\n})();\n"],
  "mappings": "CAAC,IAAM,CACL,MAAM,YAAe,OAAU,CAC7B,MAAM,SAAW,OAAO,SAAS,UAAU,QAAU,MAC/C,OAAS,SAAS,gBAAgB,MAAQ,QAChD,OAAO,IAAI,KAAK,aAAa,OAAQ,CACnC,MAAO,WACP,SACA,sBAAuB,CACzB,CAAC,EAAE,OAAO,MAAQ,GAAG,CACvB,EAEM,WAAc,OAAU,CAC5B,GAAI,CAAC,OAAS,MAAM,QAAQ,cAAgB,OAAQ,OACpD,MAAM,QAAQ,YAAc,OAE5B,MAAM,KAAO,MAAM,QAAQ,eAAe,GAAG,cAAc,qBAAqB,EAC1E,cAAgB,MAAM,cAAc,wBAAwB,EAC5D,MAAQ,MAAM,cAAc,4BAA4B,EACxD,OAAS,MAAM,cAAc,6BAA6B,EAChE,IAAI,UAAY,OAAO,MAAM,QAAQ,WAAa,CAAC,EAEnD,MAAM,UAAY,CAChB,OAAO,MAAM,aAAa,mBAAmB,GAAK,CAAC,EACnD,OAAO,MAAM,aAAa,mBAAmB,GAAK,CAAC,EACnD,OAAO,MAAM,aAAa,uBAAuB,GAAK,CAAC,CACzD,EAEM,OAAS,IAAM,CACnB,MAAM,SAAW,KAAK,IAAI,EAAG,OAAO,eAAe,OAAS,CAAC,CAAC,EACxD,UAAY,UAAY,GAAK,EAAI,UAAY,EAAI,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