var e,t;"function"==typeof(e=globalThis.define)&&(t=e,e=null),function(t,r,n,i,o){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof a[i]&&a[i],c=s.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(e,r){if(!c[e]){if(!t[e]){var n="function"==typeof a[i]&&a[i];if(!r&&n)return n(e,!0);if(s)return s(e,!0);if(l&&"string"==typeof e)return l(e);var o=Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}h.resolve=function(r){var n=t[e][1][r];return null!=n?n:r},h.cache={};var u=c[e]=new d.Module(e);t[e][0].call(u.exports,h,u,u.exports,this)}return c[e].exports;function h(e){var t=h.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=t,d.cache=c,d.parent=s,d.register=function(e,r){t[e]=[function(e,t){t.exports=r},{}]},Object.defineProperty(d,"root",{get:function(){return a[i]}}),a[i]=d;for(var u=0;u<r.length;u++)d(r[u]);if(n){var h=d(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=h:"function"==typeof e&&e.amd?e(function(){return h}):o&&(this[o]=h)}}({hKWAb:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"config",()=>o);var i=e("~utils/settings");let o={matches:["https://www.woolworths.com.au/*","https://www.coles.com.au/*"],run_at:"document_start"},a="order-bot-hide-savings-badges",CSS=`
  .badge.yellow,
  [data-testid="badge-wrapper"]:not(.coles-targeting-NavLinkEndWrapper *),
  [data-testid="every-day"],
  /* Coles roundels on tiles/PDPs \u2014 same misleading-discount genre as the
     yellow Save $X badges. We hide the testid-anchored variants AND the
     class-anchored ones as belt-and-braces against testid drift.
     Variants observed in the wild:
       - "1/2 PRICE"   \u2192 data-testid="simple-fixed-price-specials" + .is-half-price
       - "SPECIAL"     \u2192 data-testid="simple-fixed-price-specials" (no .is-half-price)
       - "DOWN DOWN"   \u2192 data-testid="down-down" + .roundel-text.down-down
     "EVERY DAY" already hidden via [data-testid="every-day"] above. */
  [data-testid="simple-fixed-price-specials"],
  [data-testid="down-down"],
  .roundel-text.is-half-price,
  .roundel-text.down-down,
  .roundel-text.simple-fixed-price-specials,
  span.product__badge:has(.is-half-price),
  span.product__badge:has(.down-down),
  span.product__badge:has(.simple-fixed-price-specials),
  /* Woolworths search/browse tile "SAVE $X" pill (the .special variant)
     and "EVERYDAY LOW PRICE" pill (the .lowPrice variant) \u2014 both are
     framed as a "you saved" / "this is cheap" claim by the retailer
     even though the per-unit price often beats it elsewhere. */
  .product-tile-label.special,
  .product-tile-label.lowPrice,
  /* Woolworths PDP "Save $X" pill \u2014 CSS-module hash changes between builds,
     so we match the stable "_special" segment. */
  [class*="product-label_component_special"],
  [class*="product-labels-group_component_product-labels-group"],
  /* Woolworths tile roundel images \u2014 only the discount-flavoured ones.
     Match by half-price substring so roundel-better-than-half-price-...
     and roundel-half-price-... both hit. Other roundels (e.g. bonus
     credit) stay visible since they are promotional but not a savings-lie
     claim. We hide just the img, not the parent .roundel-image, because
     that wrapper also contains the product photo.

     pf-roundel.png "Price Freeze": Woolworths' marketing claim that the
     price won't go up \u2014 same retailer-lie genre as the others, since
     the per-unit price still varies pack-by-pack and competitors are
     usually cheaper anyway. */
  img.product-tile-roundel-image[src*="half-price"],
  img.product-tile-roundel-image[src*="roundel-special"],
  img.product-tile-roundel-image[src*="-percent-off"],
  img.product-tile-roundel-image[src*="pf-roundel"],
  img.product-tile-roundel-image[alt="Price Freeze" i] {
    display: none !important;
  }
`;function s(e,t){let r=e instanceof Document?e.head??e.documentElement:e;if(!r)return;let n=e.getElementById?.(a)??r.querySelector?.(`#${a}`)??null;if(t){if(n)return;let e=document.createElement("style");e.id=a,e.textContent=CSS,r.appendChild(e)}else n&&n.remove()}let c=!0;function l(e){for(let t of(c=e,s(document,e),d()))s(t,e)}function d(e=document){let t=[];for(let r of Array.from(e.querySelectorAll("*"))){let e=r.shadowRoot;e&&(t.push(e),t.push(...d(e)))}return t}let u=new MutationObserver(e=>{if(!c)return;let t=!1;for(let r of e)if("childList"===r.type){for(let e of Array.from(r.addedNodes))if(e.nodeType===Node.ELEMENT_NODE&&(e.shadowRoot||e.querySelector?.("*"))){t=!0;break}if(t)break}if(t)for(let e of d())s(e,!0)});l(!0),document.documentElement&&u.observe(document.documentElement,{childList:!0,subtree:!0}),(0,i.getSettings)().then(e=>l(e.hideSavingsBadges)).catch(()=>{});try{(0,i.subscribeToSettings)(e=>l(e.hideSavingsBadges))}catch{}},{"~utils/settings":"UXaVc","@parcel/transformer-js/src/esmodule-helpers.js":"cHUbl"}],UXaVc:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"DEFAULT_SETTINGS",()=>a),n.export(r,"getSettings",()=>u),n.export(r,"setHideSavingsBadges",()=>p),n.export(r,"setMatchStrictness",()=>f),n.export(r,"subscribeToSettings",()=>g);var i=e("~services/orderBotApi");let o="extSettings:v1",a={hideSavingsBadges:!0,matchStrictness:"loose"};async function s(){try{let e=await chrome.storage.local.get(o);return e?.[o]??null}catch{return null}}async function c(e){try{await chrome.storage.local.set({[o]:e})}catch{}}let l=null;async function d(){return l||(l=(async()=>{let e=await (0,i.orderBotApi).fetchExtSettings();e.ok?await c({hideSavingsBadges:e.hideSavingsBadges,matchStrictness:e.matchStrictness,fetchedAt:Date.now(),fromServer:!0}):e.reason})().finally(()=>{l=null}))}async function u(){let e=await s(),t=!e||Date.now()-e.fetchedAt>36e5;return(t&&d(),e)?{hideSavingsBadges:e.hideSavingsBadges,matchStrictness:e.matchStrictness}:a}async function h(e){var t;let r=await s(),n=r??{...a,fetchedAt:0,fromServer:!1},o={hideSavingsBadges:"boolean"==typeof(t={...n,...e}).hideSavingsBadges?t.hideSavingsBadges:a.hideSavingsBadges,matchStrictness:"strict"===t.matchStrictness?"strict":a.matchStrictness,fetchedAt:Date.now(),fromServer:!1};await c(o);let l=await (0,i.orderBotApi).saveExtSettings(e);l.ok&&await c({hideSavingsBadges:l.hideSavingsBadges,matchStrictness:l.matchStrictness,fetchedAt:Date.now(),fromServer:!0})}async function p(e){await h({hideSavingsBadges:e})}async function f(e){await h({matchStrictness:e})}function g(e){let t=(t,r)=>{if("local"!==r||!(o in t))return;let n=t[o]?.newValue;n&&e({hideSavingsBadges:n.hideSavingsBadges,matchStrictness:n.matchStrictness})};try{chrome.storage.onChanged.addListener(t)}catch{return()=>{}}return()=>{try{chrome.storage.onChanged.removeListener(t)}catch{}}}},{"~services/orderBotApi":"jmhLE","@parcel/transformer-js/src/esmodule-helpers.js":"cHUbl"}],jmhLE:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){return new Promise((t,r)=>{chrome.runtime.sendMessage(e,e=>{let n=chrome?.runtime?.lastError;if(n){r(Error(n.message??"chrome.runtime.sendMessage failed"));return}if(void 0===e){r(Error("Empty response from extension SW (likely terminated mid-request)"));return}t(e)})})}n.defineInteropFlag(r),n.export(r,"orderBotApi",()=>o);let o={checkAuthStatus:()=>i({action:"checkAuthStatus"}),signOut:()=>i({action:"signOut"}),lookupByUrl:e=>i({action:"lookupByUrl",url:e}),lookupBatch:e=>i({action:"lookupBatch",urls:e}),priceHistoryByUrl:(e,t)=>i({action:"priceHistoryByUrl",url:e,postcode:t}),priceHistoryBatch:(e,t)=>i({action:"priceHistoryBatch",urls:e,postcode:t}),ingestScraped:e=>i({action:"ingestScraped",payload:e}),fetchMe:()=>i({action:"fetchMe"}),fetchExtSettings:()=>i({action:"fetchExtSettings"}),saveExtSettings:e=>i({action:"saveExtSettings",patch:e})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"cHUbl"}],cHUbl:[function(e,t,r){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||t.hasOwnProperty(r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}]},["hKWAb"],"hKWAb","parcelRequireeee3"),globalThis.define=t;