{
  "version": 3,
  "sources": ["/cdn/shop/t/64/assets/mk-visually-pdp-card-polish.js?mk_vsly_card_polish_v=20260619"],
  "sourcesContent": ["/* Marah Kids PDP Visually recommendation card polish. */\n(function () {\n  if (window.__mkVslyPdpCardPolishV1) return;\n  window.__mkVslyPdpCardPolishV1 = true;\n\n  var STYLE_ID = \"mk-vsly-pdp-card-polish-v1\";\n  var PRICE_SELECTOR = \".vsly-product-tile.recs .vsly-product-prices-section\";\n  var ROOT_SELECTOR = [\n    '.section-recommendation [id^=\"_loomi_addon\"]',\n    \".section-recommendation [lmw][lmwv]\",\n    \".section-recommendation\",\n  ].join(\",\");\n  var refreshTimer = null;\n\n  function injectStyle() {\n    if (document.getElementById(STYLE_ID)) return;\n    var style = document.createElement(\"style\");\n    style.id = STYLE_ID;\n    style.textContent = [\n      \".section-recommendation .vsly-product-tile.recs{justify-content:flex-start!important;height:auto!important;min-height:0!important;}\",\n      \".section-recommendation .vsly-product-tile.recs .vsly-product-content-section{justify-content:flex-start!important;gap:0!important;height:auto!important;min-height:0!important;flex:0 0 auto!important;}\",\n      \".section-recommendation .vsly-product-tile.recs .eid-delivery--app{margin-bottom:8px!important;}\",\n      \".section-recommendation .vsly-product-tile.recs .vsly-product-title-section{height:auto!important;min-height:0!important;margin:8px 0 0!important;line-height:1.35!important;-webkit-line-clamp:3!important;overflow:hidden!important;}\",\n      \".section-recommendation .vsly-product-tile.recs .vsly-product-prices-section{height:auto!important;min-height:0!important;margin:10px 0 8px!important;display:flex!important;align-items:center!important;justify-content:center!important;flex-wrap:wrap!important;gap:0 7px!important;line-height:1.2!important;}\",\n      \".section-recommendation .vsly-product-tile.recs .vsly-product-price-section,.section-recommendation .vsly-product-tile.recs .vsly-product-compare-price-section{height:auto!important;min-height:0!important;line-height:1.2!important;}\",\n      \".section-recommendation .vsly-product-tile.recs .vsly-product-prices-section.mk-vsly-on-sale .vsly-product-price-section{color:#ff0000!important;font-weight:800!important;}\",\n      \".section-recommendation .vsly-product-tile.recs .vsly-product-prices-section.mk-vsly-on-sale .vsly-product-compare-price-section{color:#8d8d8d!important;text-decoration:line-through!important;}\",\n      \".section-recommendation .vsly-product-tile.recs .mk-vsly-discount-percent{flex:0 0 100%;margin-top:3px;color:#ff0000;font-size:13px;font-weight:800;line-height:1.2;text-align:center;}\",\n      \".section-recommendation .vsly-product-tile.recs .vsly-product-atc-section{margin-top:0!important;}\",\n      \"@media(max-width:749px){.section-recommendation .vsly-product-tile.recs .vsly-product-title-section{font-size:13px!important;min-height:40px!important;}.section-recommendation .vsly-product-tile.recs .vsly-product-prices-section{margin-top:8px!important;margin-bottom:8px!important;}.section-recommendation .vsly-product-tile.recs .mk-vsly-discount-percent{font-size:13px!important;}}\",\n      \"@media(min-width:750px){.section-recommendation .vsly-product-tile.recs .vsly-product-title-section{min-height:36px!important;}.section-recommendation .vsly-product-tile.recs .mk-vsly-discount-percent{font-size:13px!important;}}\",\n    ].join(\"\\n\");\n    document.head.appendChild(style);\n  }\n\n  function parseMoney(text) {\n    var value = String(text || \"\").replace(/,/g, \"\").match(/(\\d+(?:\\.\\d+)?)/);\n    return value ? parseFloat(value[1]) : NaN;\n  }\n\n  function annotateDiscounts(scope) {\n    var root = scope && scope.querySelectorAll ? scope : document;\n    root.querySelectorAll(PRICE_SELECTOR).forEach(function (row) {\n      var priceEl = row.querySelector(\".vsly-product-price-section\");\n      var compareEl = row.querySelector(\".vsly-product-compare-price-section\");\n      var price = parseMoney(priceEl && priceEl.textContent);\n      var compare = parseMoney(compareEl && compareEl.textContent);\n      var existing = row.querySelector(\".mk-vsly-discount-percent\");\n\n      if (!Number.isFinite(price) || !Number.isFinite(compare) || compare <= price) {\n        row.classList.remove(\"mk-vsly-on-sale\");\n        if (existing) existing.remove();\n        return;\n      }\n\n      var percent = Math.max(1, Math.round(((compare - price) / compare) * 100));\n      row.classList.add(\"mk-vsly-on-sale\");\n      if (!existing) {\n        existing = document.createElement(\"span\");\n        existing.className = \"mk-vsly-discount-percent\";\n        row.appendChild(existing);\n      }\n      var discountText = \"(\" + percent + \"% off)\";\n      if (existing.textContent !== discountText) existing.textContent = discountText;\n    });\n  }\n\n  function enhanceAll() {\n    injectStyle();\n    document.querySelectorAll(ROOT_SELECTOR).forEach(annotateDiscounts);\n  }\n\n  function scheduleEnhance() {\n    window.clearTimeout(refreshTimer);\n    refreshTimer = window.setTimeout(enhanceAll, 150);\n  }\n\n  if (document.readyState === \"loading\") {\n    document.addEventListener(\"DOMContentLoaded\", enhanceAll);\n  } else {\n    enhanceAll();\n  }\n  window.addEventListener(\"load\", enhanceAll);\n  window.setTimeout(enhanceAll, 1000);\n  window.setTimeout(enhanceAll, 3000);\n  new MutationObserver(scheduleEnhance).observe(document.documentElement, {\n    childList: true,\n    subtree: true,\n  });\n})();\n"],
  "mappings": "CACC,UAAY,CACX,GAAI,OAAO,wBAAyB,OACpC,OAAO,wBAA0B,GAEjC,IAAI,SAAW,6BACX,eAAiB,uDACjB,cAAgB,CAClB,+CACA,sCACA,yBACF,EAAE,KAAK,GAAG,EACN,aAAe,KAEnB,SAAS,aAAc,CACrB,GAAI,UAAS,eAAe,QAAQ,EACpC,KAAI,MAAQ,SAAS,cAAc,OAAO,EAC1C,MAAM,GAAK,SACX,MAAM,YAAc,CAClB,sIACA,4MACA,mGACA,0OACA,sTACA,2OACA,+KACA,oMACA,0LACA,qGACA,mYACA,sOACF,EAAE,KAAK,IAAI,EACX,SAAS,KAAK,YAAY,KAAK,EACjC,CAEA,SAAS,WAAW,KAAM,CACxB,IAAI,MAAQ,OAAO,MAAQ,EAAE,EAAE,QAAQ,KAAM,EAAE,EAAE,MAAM,iBAAiB,EACxE,OAAO,MAAQ,WAAW,MAAM,CAAC,CAAC,EAAI,GACxC,CAEA,SAAS,kBAAkB,MAAO,CAChC,IAAI,KAAO,OAAS,MAAM,iBAAmB,MAAQ,SACrD,KAAK,iBAAiB,cAAc,EAAE,QAAQ,SAAU,IAAK,CAC3D,IAAI,QAAU,IAAI,cAAc,6BAA6B,EACz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