{
  "version": 3,
  "sources": ["/cdn/shop/t/40/assets/eg-one-button.js?cb=1794350613953"],
  "sourcesContent": ["/* EG TIER-1 POP-UP, ONE BUTTON - the script of snippets/eg-one-button.liquid (RFC 0007 S75), version 1.2.1.\n *\n * WHAT IT DOES. On EG's tier-1 pop-up it puts one \"Add To Cart\" button inside EG's dialog, just above EG's\n * \"No thanks\", in place of EG's per-card \"Add to cart\" buttons. A click presses EG's own buttons for the\n * shopper, each press only after EG has shown its result on the one before:\n * - Canada and the US: two cards, the Water Bottle Filter and the Stainless Steel Tumbler with EG's colour\n *   menu. EG's two buttons are pressed one after the other, the Tumbler first (the item more likely to fail,\n *   on colour stock), then the filter.\n * - The UK: one card, the Water Bottle Filter, offered twice. EG adds one unit per press, so its one button\n *   is pressed twice. EG takes the second press as soon as its tick shows: it clears its busy flag in the same\n *   step that draws the tick, and the tick's 3 s timer only puts its words back, or closes the pop-up once\n *   its count is 0 (st() in EG's build of 22 Oct 2026).\n * EG does every add itself, exactly as presses by the shopper: its own cart/add.js request, its _Gifted line\n * property and its discount. This file never writes to the cart and never changes EG's buttons (their\n * content, name and classes): it reads them, presses them, and on a hand-back gives them an aria-describedby\n * naming their product. Under the button: a visible \"Tumbler colour\" line (Canada and the US) and a\n * role=status line. There is no \"just one\" choice: the shopper takes the offer or \"No thanks\", and after any\n * hand-back EG's own buttons are there.\n *\n * WHY. EG has no \"add every product\" button, and one press adds one unit. Pressing EG's buttons from code in\n * the obvious way fails twice over: a .click() (or a keyboard click) carries clientX/clientY 0,0, which EG's\n * \"Close popup when clicking outside it\" listener (a capture listener on #aca-modal) reads as a click outside\n * its box, so it closes the pop-up; and a press sent while an add is in flight is dropped by EG's busy flag.\n * So each press here is a MouseEvent placed at the centre of EG's dialog box, the next only after the result\n * of the one before, and a click on this file's own button is caught by one window-level capture listener\n * that stops it there, before EG's closer sees it.\n *\n * WHEN IT TAKES OVER. Only on an exact match for the market the loader names, checked on the pop-up EG has\n * just drawn: #aca-modal holding an open dialog#aca-modal-container whose #aca-products-container holds, in\n * Canada and the US, exactly two cards: one the filter (its button's name is the filter's variant id, no\n * menu), the other the Tumbler (select.aca-product-variants listing only Tumbler ids, with the button's name\n * equal to the selected value, or one Tumbler card with no menu when one colour is left); in the UK exactly\n * one card, the filter. So a one-card filter pop-up in Canada or the US (the Tumbler sold out) is EG's, and\n * so is a two-card pop-up in the UK. Also: no selling-plan or subscription control; EG's buttons enabled,\n * unlocked and showing text; EG's custom CSS has not set the off line; EG's own rule data, when the page\n * carries it (meta#easygift-rules), keeps \"Allow multiple additions\" on with at least 2 for the market's\n * tier-1 rules (EG's own reading: no number counts as 1) and holds no other live pop-up rule for this\n * country offering the same products. Anything else (another EG pop-up, a changed EG) is left exactly as EG\n * drew it.\n * Then EG's buttons stay on screen while ONE read of cart.js answers (no-store, READ_LIMIT ms). EG keeps its\n * buttons when: a reward line of one of the market's tier-1 rules is already in the cart (EG's own count: the\n * quantities of the lines whose _Gifted is one of those rule names); any filter or Tumbler line carries\n * _Gifted, whatever its rule name (the stricter check: the UK rule's name comes from the setup guide); the\n * read fails; EG's button changed meanwhile (a press); the shopper pressed, tapped or typed anything since\n * the pop-up appeared, or moved focus onto one of EG's controls (a screen reader can do that without a key);\n * or the read answered more than LATE ms after it appeared. A change of layout any later could put \"Add To\n * Cart\" under a press meant for one of EG's own buttons (they sit where \"Add To Cart\" lands). A pop-up\n * already on screen when this file starts is EG's too: how long it has been seen is unknown.\n * The takeover is then laid out and measured in the same task, before anything is painted, and undone unseen\n * if \"Add To Cart\" and \"No thanks\" (or, on a phone, EG's X) do not both fit on screen, or if a mouse pointer\n * rests on or next to the new button. A press of the new button in its first ARM ms, or one that began\n * then, is not taken: it was aimed at what was there before. For a tap, the press begins when the finger\n * goes down; the browser's compatibility mousedown when it lifts is not a new press. So there is no flash of\n * this button on a top-up, and no press meant for one of EG's buttons can add the whole offer.\n *\n * THE CART IS THE SOURCE OF TRUTH. EG shows its tick for any answer but 422 and 404 whose body is JSON (a 400\n * or a JSON 429 among them), so a tick proves nothing. After the presses, and after a timeout, an ignored\n * press, a cross or a closed pop-up, the script reads cart.js and says what is ACTUALLY there: in Canada and\n * the US by name and colour (both; one of the two, and either that the other could not be added - EG's\n * cross, after which EG labels that button with its sold-out words, or EG has locked its buttons - or that\n * it has not been added yet - its press still out - or that it has its own button; or nothing); in the UK\n * by count (both; one, and either that the second could not be added, that it has not been added yet, or\n * that the button above adds it; or nothing). A press EG has not answered when the script hands back\n * (\"Nothing was added yet.\") is watched, and the message is brought up to date from the cart when EG\n * answers (an ignored press is read again after RECHECK ms). EG closes its pop-up when the 3 s timer of one\n * of its ticks finds its count at 0: 3 s after the first tick when the last add answered within those 3 s,\n * else 3 s after the last tick. So the success message is short.\n *\n * HAND-BACK. EG's buttons come back (the mark is removed) and this file's box keeps, for the rest of that\n * opening, the height that puts \"No thanks\" back where it was, or as near as it can below it: with EG's\n * buttons back in their cards and only the status line left in the box, there is not always the room\n * (measured on laptops and phones: up to 16 px lower in Canada and the US, 28 px in the UK). \"No thanks\"\n * never moves up, so it never comes under a second press on the spot \"Add To Cart\" left. The box holds the\n * status line. Focus goes to the EG button of the item still missing if it can be pressed now (not crossed\n * or locked) and no press of the run is still out (EG's one busy flag covers all its buttons, and its 3 s\n * timer can put its words back on a busy button), else to the status line. A press of EG's own buttons\n * after a hand-back that EG takes (its spinner replaces what the button showed) empties the status line (it\n * described the cart before it); a press EG drops (busy, or on its tick or cross icon) leaves it.\n *\n * FAIL-OPEN. Every unexpected thing hands back to EG's own pop-up: the style hides EG's buttons only while\n * #aca-modal carries data-sv-one-button, which is set only after this file's elements exist and is removed\n * on any hand-back; an exception removes the marks and the elements altogether. After an opening whose run\n * did not end with the whole offer in the cart, the script stands aside for the rest of the page view. While\n * a run is on (data-sv-one-button-running), the colour menu takes no input and \"No thanks\" and EG's X are\n * hidden; Escape and a click outside EG's box are held back too, and once the offer is added\n * (data-sv-one-button-done) the menu stays locked. A close request without a key press (the Android back\n * gesture: the dialog's cancel event) is NOT held back, on purpose: a browser closes a dialog on the next\n * such request without asking EG, which would leave EG's full-screen wrapper over the page. So it can close\n * the pop-up between the two adds, as \"No thanks\" would; the cart stays valid (one reward), and EG's reminder\n * banner offers the rest. On a very slow store the run can last up to about 24 s (two STEP_LIMIT steps and a\n * READ_LIMIT read), with \"No thanks\" hidden all that time.\n *\n * THE OFF LINE. #aca-modal{--sv-one-button:off} in EG's Customised Popup CSS (EG > Design > Popup) switches\n * this off from EG's admin, with no theme change: EG shows its own buttons. EG syncs a saved design a few\n * minutes after Save, and a page already open keeps what it had until it is reloaded.\n *\n * ITS DATA come from the loader tag's attributes (the snippet): data-eg-one-market (CA, US or GB: which shape\n * to take), -wbf, -tumblers (and -colours, in the same order, for the one-card Tumbler case), -prop (_Gifted)\n * and -rules (the market's tier-1 rule names, \"|\" separated; a name is matched ignoring capitals and extra\n * spaces, in EG's rule data and in _Gifted, so a rule saved with a stray space or capital is still the market's\n * tier-1 rule and not \"another live pop-up rule\"). The words are English only, as EG's pop-up is on\n * every locale; the pop-up's title and sub-title are EG's own rule settings, never touched here. For a\n * console check, window.egOneButton: version, market, openings() and last() (each opening's state and\n * reasons). Analytics: custom events santevia_eg_one_button (shown, add_both, done, hand_back with a reason;\n * each with the market) through Shopify.analytics.publish when the page has it.\n */\n(function () {\n  'use strict';\n  try {\n    if (window.egOneButton) return;\n    var loader = document.querySelector('script[data-eg-one-wbf]');\n    if (!loader || typeof window.MutationObserver !== 'function' || typeof window.WeakMap !== 'function' ||\n      typeof window.Promise !== 'function' || typeof window.fetch !== 'function' || typeof window.MouseEvent !== 'function') return;\n    var isId = function (s) { return /^\\d+$/.test(s) && s !== '0'; };\n    var attr = function (name) { return String(loader.getAttribute('data-eg-one-' + name) || '').trim(); };\n    var split = function (value, sep) { return value.split(sep).map(function (s) { return s.trim(); }).filter(Boolean); };\n    var MARKET = attr('market').toUpperCase();\n    var WBF = attr('wbf');\n    var TUMBLERS = split(attr('tumblers'), ',');\n    var COLOURS = split(attr('colours'), ',');\n    var PROP = attr('prop');\n    var RULES = split(attr('rules'), '|');\n    if (['CA', 'US', 'GB'].indexOf(MARKET) < 0 || !isId(WBF) || !TUMBLERS.length || !TUMBLERS.every(isId) || !PROP || !RULES.length) return;\n    var UK = MARKET === 'GB'; /* the UK: one card, the filter, pressed twice; else the filter and Tumbler pair */\n    /* A rule name as compared here: capitals and extra spaces do not count. */\n    var nameKey = function (s) { return String(s === null || s === undefined ? '' : s).replace(/\\s+/g, ' ').trim().toLowerCase(); };\n    var RULE_KEYS = RULES.map(nameKey);\n    var tier1 = function (name) { var k = nameKey(name); return k !== '' && RULE_KEYS.indexOf(k) > -1; };\n\n    var VERSION = '1.2.1';\n    var MARK = 'data-sv-one-button';\n    var RUN = 'data-sv-one-button-running';\n    var DONE = 'data-sv-one-button-done';\n    var FIT = 'data-sv-one-button-compact'; // the snippet's tighter layout; stays for the rest of a taken-over opening\n    var UNITS = 2;           // the UK offer: two filters, one per press\n    var READ_LIMIT = 4000;   // the cart.js read (before takeover and after a run)\n    var LATE = 700;          // the read before takeover must answer this soon after the pop-up appeared\n    var ARM = 500;           // a press of this file's button that comes, or began, this soon after it appeared is not taken\n    var TOUCH_MOUSE = 800;   // a mousedown this soon after a touch is that touch's own compatibility event, not a new press\n    var NEAR = 16;           // a mouse pointer resting this close to it at takeover: EG keeps its buttons\n    var STEP_LIMIT = 10000;  // EG's result on one pressed button\n    var GRACE = 1500;        // a press EG has not taken by then counts as ignored (its spinner is synchronous today)\n    var RECHECK = 3000;      // an ignored press: the cart is read again after this if EG has still not answered\n    var SETTLE = 3500;       // EG closes ~3 s after its first add once its count is 0; still open after this, hand back\n    var CLOSED_READ = 1200;  // a pop-up closed mid-run: read the cart after EG's own adds have had their moment\n    var LATE_LIMIT = 60000;  // how long a press still out at hand-back is watched for EG's answer\n    var TEXT = {\n      add: 'Add To Cart',\n      adding: 'Adding\\u2026',\n      added: 'Both added to your cart',\n      colour: 'Tumbler colour: ',\n      none: 'Nothing was added. Please use the buttons above.', /* EG's buttons are above this line */\n      noneUK: 'Nothing was added. Please use the button above.', /* the UK: EG's one button */\n      noneShort: 'Nothing was added.',\n      notYet: 'Nothing was added yet.',\n      unknown: 'Please check your cart before adding more.'\n    };\n    var NAMES = { wbf: 'Water Bottle Filter', tumbler: 'Stainless Steel Tumbler' };\n\n    var states = new WeakMap(); // #aca-modal -> its opening's record\n    var log = [];               // the latest openings, for window.egOneButton\n    var count = 0;\n    var current = null;         // the record of the pop-up on screen\n    var standAside = '';        // set after an opening whose run did not end with the whole offer in the cart\n    var initial = true;         // true during the first scan, when a pop-up found is already on screen\n    var input = { x: 0, y: 0, mouse: false, press: 0, key: 0, touch: 0 }; // the last mouse position; the last press, key and touch times\n\n    var warn = function (e) { try { if (window.console) console.warn('[eg-one-button]', e); } catch (x) { /* nothing */ } };\n    var now = function () { return Date.now(); }; /* one clock (the page's Date) for every time kept here */\n    var root = function () {\n      var r = window.Shopify && window.Shopify.routes && window.Shopify.routes.root;\n      r = typeof r === 'string' && r ? r : '/';\n      return r.charAt(r.length - 1) === '/' ? r : r + '/';\n    };\n    var text = function (node) { return node ? String(node.textContent || '').replace(/\\s+/g, ' ').trim() : ''; };\n    var focusOn = function (node) { try { node.focus({ preventScroll: true }); } catch (e) { try { node.focus(); } catch (x) { /* nothing */ } } };\n    var el = function (tag, cls, words) {\n      var e = document.createElement(tag);\n      e.className = cls;\n      if (words) e.textContent = words;\n      return e;\n    };\n    var drop = function (node) { if (node && node.parentNode) node.parentNode.removeChild(node); };\n    var rect = function (node) { try { return node && node.getBoundingClientRect ? node.getBoundingClientRect() : null; } catch (e) { return null; } };\n    var inPageOrder = function (p, q) { return p.compareDocumentPosition(q) & 4 ? -1 : 1; };\n\n    function publish(action, extra) {\n      try {\n        var a = window.Shopify && window.Shopify.analytics;\n        if (!a || typeof a.publish !== 'function') return;\n        var data = { action: action, version: VERSION, market: MARKET };\n        for (var k in extra) if (Object.prototype.hasOwnProperty.call(extra, k)) data[k] = extra[k];\n        a.publish('santevia_eg_one_button', data);\n      } catch (e) { /* analytics never matter more than the pop-up */ }\n    }\n\n    /* An EG button a shopper (or this file) can press now: enabled, not EG's sold-out button, not locked by\n     * EG after its last allowed add (cursor not-allowed), and showing its words (a text node, not EG's\n     * spinner, tick or cross). */\n    function pressable(b) {\n      if (!b || !b.isConnected || b.disabled || b.getAttribute('aria-disabled') === 'true') return false;\n      return !b.classList.contains('aca-product-out-of-stock-button') && b.style.cursor !== 'not-allowed';\n    }\n    function usable(b) {\n      return pressable(b) && b.childNodes.length === 1 && b.firstChild.nodeType === 3 && text(b) !== '';\n    }\n    function result(b) {\n      var f = b && b.firstChild;\n      if (!f || f.nodeType !== 1) return '';\n      if (f.classList.contains('aca-button-tick')) return 'tick';\n      if (f.classList.contains('aca-button-cross')) return 'cross';\n      return '';\n    }\n    /* The UK's second press: EG's one button, unlocked, still showing the tick of the first press (or its\n     * words again). EG's busy flag is clear by then: EG clears it in the same step that draws the tick. */\n    function canPressAgain(b) {\n      return pressable(b) && (usable(b) || result(b) === 'tick');\n    }\n    function shown(node) {\n      try { return window.getComputedStyle(node).display !== 'none'; } catch (e) { return true; }\n    }\n    function alive(rec) { return !!rec.dialog && rec.modal.isConnected && rec.dialog.isConnected && !!rec.dialog.open; }\n\n    /* The off line in EG's custom CSS. Tolerant of how it is typed (spaces, quotes, capitals); if the\n     * style cannot be read at all, leave EG alone. */\n    function offLine(modal) {\n      try {\n        var v = window.getComputedStyle(modal).getPropertyValue('--sv-one-button');\n        return String(v || '').replace(/[\"'\\s]/g, '').toLowerCase() === 'off';\n      } catch (e) {\n        return true;\n      }\n    }\n\n    /* EG's own rule data, when the page carries it (all the shop's saved rules, every market's). A tier-1\n     * rule of this market whose \"Allow multiple additions\" is off, or whose number is missing or under 2,\n     * cannot take the offer: EG counts (persistPopup && rewardQuantity != null) ? rewardQuantity : 1. A live\n     * pop-up rule of another name offering the same products for this country (the filter in the UK; the\n     * filter and the Tumbler elsewhere) could be the one on screen, with its own count: EG's then. So a\n     * tier-1 rule saved under another name (not just other capitals or spaces) turns this off once it is\n     * live: the names in the snippet must be the rules' own. Any doubt (no meta, unreadable, the rules\n     * absent, as in EG's test mode) is not a reason to stand aside. */\n    function ruleSettings() {\n      try {\n        var meta = document.getElementById('easygift-rules');\n        var rules = meta ? JSON.parse(meta.getAttribute('content') || '[]') : [];\n        if (!Array.isArray(rules)) return '';\n        var country = String((window.Shopify && window.Shopify.country) || '').toUpperCase();\n        for (var i = 0; i < rules.length; i++) {\n          var r = rules[i];\n          if (!r || !r.action) continue;\n          if (!tier1(r.name)) {\n            if (r.active === true && r.testMode !== true && r.action.type === 'offerToCustomer' && offersOurs(r.action.products) && forCountry(r, country)) return 'other-rule';\n            continue;\n          }\n          var po = r.action.popupOptions;\n          if (!po) continue;\n          if (!po.persistPopup) return 'rule-one-addition';\n          var q = po.rewardQuantity === null || po.rewardQuantity === undefined ? 1 : Number(po.rewardQuantity);\n          if (!(q >= 2)) return 'rule-quantity';\n        }\n      } catch (e) { /* unreadable: no finding */ }\n      return '';\n    }\n    function offersOurs(products) {\n      var ids = [];\n      (Array.isArray(products) ? products : []).forEach(function (p) {\n        (p && Array.isArray(p.variants) ? p.variants : []).forEach(function (v) { if (v) ids.push(String(v.id).replace(/^gid:\\/\\/shopify\\/ProductVariant\\//, '')); });\n      });\n      return ids.indexOf(WBF) > -1 && (UK || TUMBLERS.some(function (t) { return ids.indexOf(t) > -1; }));\n    }\n    function forCountry(r, country) {\n      var geo = r.targeting && r.targeting.additionalCriteria && r.targeting.additionalCriteria.geo;\n      var up = function (list) { return (Array.isArray(list) ? list : []).map(function (c) { return String(c).toUpperCase(); }); };\n      if (!geo || !country) return true;\n      if (up(geo.exclude).indexOf(country) > -1) return false;\n      var inc = up(geo.include);\n      return !inc.length || inc.indexOf(country) > -1;\n    }\n\n    /* The exact shape for the market, or the reason it is not: in the UK one card, the filter; elsewhere two,\n     * the filter and the Tumbler. */\n    function identify(modal) {\n      var dialog = modal.querySelector('dialog#aca-modal-container');\n      if (!dialog || !dialog.open) return { why: 'dialog' };\n      var list = dialog.querySelector('#aca-products-container');\n      var close = dialog.querySelector('#aca-bottom-close');\n      if (!list || !close || list.parentNode !== dialog || close.parentNode !== dialog) return { why: 'markup' };\n      if (dialog.querySelector('select.aca-variant-subscriptions, .aca-subscription-label, .aca-subscription-name, [selling-plan]')) return { why: 'plan' };\n      var cards = Array.prototype.slice.call(list.children);\n      if (cards.length !== (UK ? 1 : 2)) return { why: 'cards' };\n      var wbf = null;\n      var tum = null;\n      var sel = null;\n      for (var i = 0; i < cards.length; i++) {\n        var card = cards[i];\n        var b = card.querySelector('button.aca-product-button');\n        var menus = card.querySelectorAll('select');\n        if (!card.classList.contains('aca-product') || !b || b.parentNode !== card || card.querySelectorAll('button').length !== 1 || menus.length > 1) return { why: 'card' };\n        var name = String(b.getAttribute('name') || '');\n        var menu = menus[0] || null;\n        if (!menu && name === WBF && !wbf) { wbf = b; continue; }\n        if (!UK && TUMBLERS.indexOf(name) > -1 && !tum) {\n          if (menu && !(menu.classList.contains('aca-product-variants') && menu.value === name && menu.options.length > 0 &&\n            Array.prototype.every.call(menu.options, function (o) { return TUMBLERS.indexOf(String(o.value)) > -1; }))) return { why: 'menu' };\n          tum = b;\n          sel = menu;\n          continue;\n        }\n        return { why: 'product' };\n      }\n      if (!wbf || (!UK && !tum)) return { why: 'product' };\n      if (!usable(wbf) || (tum && !usable(tum))) return { why: 'buttons' };\n      return { dialog: dialog, close: close, wbf: wbf, tum: tum, sel: sel };\n    }\n\n    /* The cart, read once (no-store, READ_LIMIT ms): the cart object, or null when it could not be read. */\n    function readCart() {\n      return new Promise(function (resolve) {\n        var settled = false;\n        var ctl = typeof window.AbortController === 'function' ? new window.AbortController() : null;\n        var timer = window.setTimeout(function () {\n          try { if (ctl) ctl.abort(); } catch (e) { /* nothing */ }\n          done(null);\n        }, READ_LIMIT);\n        function done(value) {\n          if (settled) return;\n          settled = true;\n          window.clearTimeout(timer);\n          resolve(value);\n        }\n        var init = { cache: 'no-store', credentials: 'same-origin', headers: { Accept: 'application/json' } };\n        if (ctl) init.signal = ctl.signal;\n        try {\n          window.fetch(root() + 'cart.js', init)\n            .then(function (r) { return r && r.ok ? r.json() : null; })\n            .then(function (cart) { done(cart && Array.isArray(cart.items) ? cart : null); }, function () { done(null); });\n        } catch (e) {\n          done(null);\n        }\n      });\n    }\n\n    /* EG's count of the market's tier-1 reward units (lines whose _Gifted is one of its tier-1 rule names),\n     * and the filter and Tumbler lines carrying _Gifted at all, with the filter units on them (the UK's\n     * count, whatever the rule name EG wrote). */\n    function classify(cart) {\n      var out = { units: 0, gifted: false, wbf: null, tum: null, filters: 0 };\n      cart.items.forEach(function (line) {\n        if (!line || typeof line !== 'object') return;\n        var props = line.properties && typeof line.properties === 'object' ? line.properties : {};\n        var raw = props[PROP] === null || props[PROP] === undefined ? '' : String(props[PROP]);\n        var tag = raw.trim();\n        var v = String(line.variant_id !== undefined && line.variant_id !== null ? line.variant_id : line.id);\n        if (tag && tier1(raw)) out.units += Number(line.quantity) || 0;\n        if (!tag) return;\n        if (v === WBF) { out.gifted = true; out.wbf = out.wbf || line; out.filters += Number(line.quantity) || 0; }\n        if (TUMBLERS.indexOf(v) > -1) { out.gifted = true; out.tum = out.tum || line; }\n      });\n      return out;\n    }\n    function lineColour(line) {\n      var v = line && line.variant_title ? String(line.variant_title).trim() : '';\n      if (v && v !== 'Default Title') return v;\n      var i = line ? TUMBLERS.indexOf(String(line.variant_id)) : -1;\n      return i > -1 && COLOURS[i] ? COLOURS[i] : '';\n    }\n\n    function cardName(b, fallback) {\n      var card = b && b.closest ? b.closest('.aca-product') : null;\n      return text(card && card.querySelector('.aca-product-name')) || fallback;\n    }\n    /* The filter's name as EG's card shows it, and its plural for the UK's words. */\n    function filterNames(rec) {\n      var one = cardName(rec.wbf, NAMES.wbf);\n      return { one: one, many: /s$/i.test(one) ? one : one + 's' };\n    }\n    function menuColour(rec) {\n      if (!rec.tum) return '';\n      if (rec.sel) {\n        var o = rec.sel.options[rec.sel.selectedIndex];\n        if (o && text(o)) return text(o);\n      }\n      var card = rec.tum.closest('.aca-product');\n      var shownName = text(card && card.querySelector('.aca-product-variant-name'));\n      if (shownName) return shownName;\n      var i = TUMBLERS.indexOf(String(rec.tum.getAttribute('name')));\n      return i > -1 && COLOURS[i] ? COLOURS[i] : '';\n    }\n    function tumblerWords(colour) { return 'the ' + (colour ? colour + ' ' : '') + 'tumbler'; }\n    function refresh(rec) {\n      if (UK) {\n        rec.desc.textContent = 'Adds ' + UNITS + ' ' + filterNames(rec).many + ' to your cart.';\n        return;\n      }\n      var colour = menuColour(rec);\n      rec.colourLine.textContent = colour ? TEXT.colour + colour : '';\n      rec.colourLine.hidden = !colour;\n      rec.desc.textContent = 'Adds the ' + cardName(rec.wbf, NAMES.wbf) + ' and the ' + cardName(rec.tum, NAMES.tumbler) +\n        (colour ? ' in ' + colour : '') + ' to your cart.';\n    }\n\n    /* A press still out at the hand-back (EG took it and is busy, or has not taken it) is answered once\n     * EG's tick or cross replaces what the button showed when it was pressed (in the UK the second press\n     * goes to a button still showing the first press's tick). */\n    function answered(rec) {\n      var b = rec.pending;\n      return !b || (b.firstChild !== rec.pendingChild && !!result(b));\n    }\n\n    /* What the cart holds, in words, for the status line. An item whose own press ended in EG's cross\n     * \"couldn't be added\" (EG labels that button with its sold-out words 3 s later, so no pointer to it), and\n     * so does one whose EG button cannot be pressed any more (EG has locked it after its last allowed add,\n     * as after a tick for a 400/429 answer, or it is sold out): this pop-up will not add it. One whose press\n     * is still out \"has not been added yet\" (no pointer to a button EG is busy on). */\n    function message(rec, cart) {\n      if (!cart) return TEXT.unknown;\n      var c = classify(cart);\n      var tried = rec.results || {};\n      var waiting = !!rec.pending && !answered(rec);\n      if (UK) {\n        var f = filterNames(rec);\n        if (c.filters >= UNITS) return TEXT.added;\n        if (c.filters > 0) {\n          var one = 'One ' + f.one + ' is in your cart.';\n          if (tried.second === 'cross') return one + ' The second couldn\\'t be added.';\n          if (waiting) return one + ' The second has not been added yet.';\n          return one + (pressable(rec.wbf) ? ' Add the second with the button above.' : ' The second couldn\\'t be added.');\n        }\n        if (waiting) return TEXT.notYet;\n        if (tried.first === 'cross') return 'The ' + f.many + ' couldn\\'t be added.';\n        return pressable(rec.wbf) ? TEXT.noneUK : TEXT.noneShort;\n      }\n      var filter = cardName(rec.wbf, NAMES.wbf);\n      if (c.wbf && c.tum) return TEXT.added;\n      if (c.tum) {\n        var has = 'The ' + (lineColour(c.tum) ? lineColour(c.tum) + ' ' : '') + 'tumbler is in your cart.';\n        if (tried.wbf === 'cross') return has + ' The ' + filter + ' couldn\\'t be added.';\n        if (waiting) return has + ' The ' + filter + ' has not been added yet.';\n        return has + (pressable(rec.wbf) ? ' Add the ' + filter + ' with its own button.' : ' The ' + filter + ' couldn\\'t be added.');\n      }\n      if (c.wbf) {\n        var has2 = 'The ' + filter + ' is in your cart.';\n        if (tried.tum === 'cross') return has2 + ' The tumbler couldn\\'t be added.';\n        return has2 + (pressable(rec.tum) ? ' Add the tumbler with its own button.' : ' The tumbler couldn\\'t be added.');\n      }\n      if (waiting) return TEXT.notYet;\n      if (tried.tum === 'cross') {\n        var lost = 'The ' + (rec.triedColour ? rec.triedColour + ' ' : '') + 'tumbler couldn\\'t be added.';\n        if (!pressable(rec.wbf)) return lost;\n        return lost + (rec.sel ? ' Choose another colour, or add the ' + filter + ' with its own button.' : ' You can still add the ' + filter + ' with its own button.');\n      }\n      return pressable(rec.wbf) || pressable(rec.tum) ? TEXT.none : TEXT.noneShort;\n    }\n\n    function consider(modal, already) {\n      var rec = { n: ++count, modal: modal, state: 'checking', reasons: [], dialog: null, seenAt: now(), results: {} };\n      states.set(modal, rec);\n      current = rec;\n      var shape = identify(modal);\n      if (offLine(modal)) { skip(rec, 'off', !!shape.dialog); return; }\n      if (!shape.dialog) { skip(rec, 'shape-' + shape.why, false); return; }\n      rec.dialog = shape.dialog;\n      rec.close = shape.close;\n      rec.wbf = shape.wbf;\n      rec.tum = shape.tum;\n      rec.sel = shape.sel;\n      var settings = ruleSettings();\n      if (settings) { skip(rec, settings, true); return; }\n      if (standAside) { skip(rec, 'stood-aside', true); return; }\n      if (already) { skip(rec, 'already-open', true); return; }\n      /* On a desktop the dialog's own focus (showModal) is already on EG's first control by now, so EG's\n       * own focus on it 10 ms later fires no event: that initial focus is EG's (see the focusin listener). */\n      if (document.activeElement && document.activeElement === egFirst(rec)) rec.egFocused = true;\n      /* EG's buttons stay theirs until the read answers; a press of one meanwhile (EG puts its spinner in\n       * it) means this opening is EG's. Any other press, tap or key of the shopper's: see noteInput. */\n      rec.watch = new MutationObserver(function (list) {\n        list.forEach(function (m) {\n          Array.prototype.forEach.call(m.addedNodes, function (node) { if (node.nodeType === 1) rec.touched = true; });\n        });\n      });\n      rec.watch.observe(rec.wbf, { childList: true });\n      if (rec.tum) rec.watch.observe(rec.tum, { childList: true });\n      readCart().then(function (cart) { guard(rec, function () { decide(rec, cart); }); });\n    }\n\n    function skip(rec, why, ours) {\n      rec.state = 'skipped';\n      rec.reasons.push(why);\n      if (rec.watch) rec.watch.disconnect();\n      remember(rec);\n      if (ours) publish('hand_back', { reason: why, opening: rec.n });\n    }\n\n    function decide(rec, cart) {\n      if (rec.state !== 'checking') return;\n      if (rec.watch) rec.watch.disconnect();\n      if (!alive(rec)) { skip(rec, 'closed', true); return; }\n      if (!cart) { skip(rec, 'read-failed', true); return; }\n      var c = classify(cart);\n      if (c.units > 0) { skip(rec, 'topup', true); return; }\n      if (c.gifted) { skip(rec, 'reward-line', true); return; }\n      if (rec.touched) { skip(rec, 'eg-pressed', true); return; }\n      if (rec.active) { skip(rec, 'shopper-active', true); return; }\n      if (now() - rec.seenAt > LATE) { skip(rec, 'late-read', true); return; }\n      var shape = identify(rec.modal);\n      if (!shape.dialog || shape.wbf !== rec.wbf || shape.tum !== rec.tum || offLine(rec.modal)) { skip(rec, 'changed', true); return; }\n      rec.sel = shape.sel;\n      takeOver(rec);\n    }\n\n    /* Fully on screen: inside the viewport and inside EG's dialog box (it scrolls inside itself). */\n    function onScreen(node, box) {\n      var r = rect(node);\n      var vh = window.innerHeight || document.documentElement.clientHeight || 0;\n      if (!r || !box || !(r.width > 0) || !(r.height > 0)) return false;\n      return r.top >= Math.max(0, box.top) - 1 && r.bottom <= Math.min(vh, box.bottom) + 1;\n    }\n    function nearTo(node) {\n      var r = rect(node);\n      return !!r && input.x >= r.left - NEAR && input.x <= r.right + NEAR && input.y >= r.top - NEAR && input.y <= r.bottom + NEAR;\n    }\n    /* Measured in the same task as the takeover, before any paint: why it must be undone, or ''. */\n    function unfit(rec) {\n      var box = rect(rec.dialog);\n      var x = rec.dialog.querySelector('#aca-close-icon-container');\n      if (!onScreen(rec.add, box) || !(onScreen(rec.close, box) || (x && shown(x) && onScreen(x, box)))) return 'no-room';\n      if (input.mouse && nearTo(rec.add)) return 'pointer-over';\n      return '';\n    }\n\n    function takeOver(rec) {\n      rec.box = el('div', 'sv-one-button');\n      rec.box.setAttribute('lang', 'en');\n      if (!UK) rec.colourLine = el('p', 'sv-one-button__colour'); /* the Tumbler's colour: none in the UK */\n      rec.add = el('button', 'sv-one-button__add', TEXT.add);\n      rec.add.type = 'button';\n      rec.add.setAttribute('data-sv1-add', '');\n      rec.desc = el('span', 'sv-one-button__sr');\n      rec.desc.id = 'sv-one-button-desc-' + rec.n;\n      rec.desc.hidden = true; /* read as the button's description only */\n      rec.add.setAttribute('aria-describedby', rec.desc.id);\n      rec.status = el('p', 'sv-one-button__status');\n      rec.status.setAttribute('role', 'status');\n      rec.status.setAttribute('tabindex', '-1');\n      [rec.colourLine, rec.add, rec.desc, rec.status].forEach(function (node) { if (node) rec.box.appendChild(node); });\n      refresh(rec);\n      rec.dialog.insertBefore(rec.box, rec.close);\n      rec.modal.setAttribute(FIT, '');\n      rec.modal.setAttribute(MARK, '');\n      /* The style must have taken (EG's buttons hidden now); if not, the snippet's style is missing or EG's\n       * markup has moved: leave EG's pop-up as it was. */\n      if (shown(rec.wbf) || (rec.tum && shown(rec.tum))) { cleanup(rec, 'style'); return; }\n      var why = unfit(rec);\n      if (why) {\n        rec.modal.removeAttribute(MARK);\n        rec.modal.removeAttribute(FIT);\n        drop(rec.box);\n        skip(rec, why, true);\n        return;\n      }\n      if (rec.sel) {\n        rec.onChange = function () { guard(rec, function () { if (rec.state === 'ready') refresh(rec); }); };\n        rec.sel.addEventListener('change', rec.onChange);\n      }\n      rec.state = 'ready';\n      rec.shownAt = now();\n      remember(rec);\n      placeFocus(rec);\n      window.setTimeout(function () { guard(rec, function () { placeFocus(rec); }); }, 50);\n      window.setTimeout(function () { guard(rec, function () { placeFocus(rec); }); }, 250);\n      publish('shown', { opening: rec.n });\n    }\n\n    /* EG focuses the first control in page order (its colour menu when the Tumbler card is first; that is\n     * left alone). Its X, one of its now hidden buttons, or nothing in the dialog: move to \"Add To Cart\". */\n    function placeFocus(rec) {\n      if (rec.state !== 'ready' || !alive(rec)) return;\n      var a = document.activeElement;\n      var x = rec.dialog.querySelector('#aca-close-icon-container');\n      if (!a || a === document.body || a === document.documentElement || a === rec.dialog || !rec.dialog.contains(a) ||\n        a === x || a === rec.wbf || a === rec.tum) focusOn(rec.add);\n    }\n\n    /* A press of this file's button is taken only once it has been on screen ARM ms, and only if it did not\n     * begin before that (a pointer press, or the key of a keyboard press). */\n    function armed(rec, event) {\n      var since = now() - rec.shownAt;\n      var began = event.detail > 0 ? input.press : input.key;\n      if (since < ARM) return false;\n      return !(began >= rec.shownAt && began - rec.shownAt < ARM);\n    }\n\n    /* One press of an EG button, placed at the centre of EG's box. Resolves 'tick' or 'cross' (EG's\n     * result), 'timeout' (EG took it - any change of the button's first child - but gave no result in\n     * STEP_LIMIT), 'ignored' (no change in GRACE), 'closed' (the pop-up went away) or 'not-ready'. repeat:\n     * the UK's second press of the same button, which still shows the tick of the first; a result counts\n     * only once EG has taken the press, so that old tick is never read as the answer. key: the run's result\n     * name for this press, for the watch on a press still out at hand-back. */\n    function step(rec, b, repeat, key) {\n      return new Promise(function (resolve) {\n        if (!alive(rec)) { resolve('closed'); return; }\n        if (!(repeat ? canPressAgain(b) : usable(b))) { resolve('not-ready'); return; }\n        var first = b.firstChild;\n        var taken = false;\n        var settled = false;\n        var mo = null;\n        var limit = null;\n        var grace = null;\n        var poll = null;\n        function end(why) {\n          if (settled) return;\n          settled = true;\n          if (mo) mo.disconnect();\n          window.clearTimeout(limit);\n          window.clearTimeout(grace);\n          window.clearInterval(poll);\n          /* A press still out (EG took it and is busy) or not taken yet (EG may still take it late) is\n           * watched after the hand-back. */\n          rec.pending = why === 'timeout' || why === 'ignored' ? b : null;\n          rec.pendingChild = rec.pending ? first : null;\n          rec.pendingKey = rec.pending ? key : null;\n          rec.ignored = why === 'ignored';\n          /* Resolved on a fresh task, so EG's own step (it clears its busy flag right after its tick) is done. */\n          window.setTimeout(function () { resolve(why); }, 0);\n        }\n        function look() {\n          if (b.firstChild !== first) taken = true;\n          var r = taken ? result(b) : '';\n          if (r) end(r);\n        }\n        mo = new MutationObserver(function () { guard(rec, look); });\n        mo.observe(b, { childList: true });\n        poll = window.setInterval(function () { if (!alive(rec)) end('closed'); }, 200);\n        limit = window.setTimeout(function () { end(taken ? 'timeout' : 'ignored'); }, STEP_LIMIT);\n        var box = rect(rec.dialog);\n        if (!box || !(box.width > 1 && box.height > 1)) { end('not-ready'); return; }\n        var x = box.left + box.width / 2;\n        var y = box.top + box.height / 2;\n        b.dispatchEvent(new window.MouseEvent('click', { bubbles: true, cancelable: true, composed: true, view: window, detail: 1,\n          button: 0, clientX: x, clientY: y, screenX: x, screenY: y }));\n        look();\n        if (!taken && !settled) grace = window.setTimeout(function () { if (!taken) end('ignored'); }, GRACE);\n      });\n    }\n\n    function run(rec) {\n      if (rec.state !== 'ready' || !alive(rec)) return;\n      rec.state = 'running';\n      rec.results = {};\n      if (!UK) rec.triedColour = menuColour(rec);\n      rec.add.textContent = TEXT.adding;\n      rec.add.setAttribute('aria-disabled', 'true');\n      rec.box.className = 'sv-one-button sv-one-button--busy';\n      rec.status.textContent = UK ? 'Adding ' + UNITS + ' ' + filterNames(rec).many + '\\u2026' :\n        'Adding ' + tumblerWords(rec.triedColour) + ' and the ' + cardName(rec.wbf, NAMES.wbf) + '\\u2026';\n      rec.modal.setAttribute(RUN, '');\n      publish('add_both', { opening: rec.n });\n      if (UK) { presses(rec, rec.wbf, rec.wbf); return; }\n      if (rec.sel && rec.tum.getAttribute('name') !== rec.sel.value) { finish(rec, 'colour-mismatch'); return; }\n      presses(rec, rec.tum, rec.wbf);\n    }\n\n    /* The two presses, the second only after EG's answer to the first: the Tumbler, then the filter (results\n     * tum and wbf; reasons tumbler-<result>, filter-locked, filter-<result>, pair); in the UK the filter twice\n     * (results first and second; reasons first-<result>, second-locked, second-<result>, pair). */\n    function presses(rec, b1, b2) {\n      var k1 = UK ? 'first' : 'tum';\n      var k2 = UK ? 'second' : 'wbf';\n      var n1 = UK ? 'first' : 'tumbler';\n      var n2 = UK ? 'second' : 'filter';\n      step(rec, b1, false, k1).then(function (first) {\n        rec.results[k1] = first;\n        if (rec.state !== 'running') return null;\n        if (first !== 'tick') { finish(rec, n1 + '-' + first); return null; }\n        if (!alive(rec)) { finish(rec, 'closed'); return null; }\n        if (!(UK ? canPressAgain(b2) : usable(b2))) { finish(rec, n2 + '-locked'); return null; }\n        return step(rec, b2, UK, k2).then(function (second) {\n          rec.results[k2] = second;\n          if (rec.state !== 'running') return;\n          finish(rec, second === 'tick' ? 'pair' : n2 + '-' + second);\n        });\n      }).then(null, function (e) { warn(e); cleanup(rec, 'error'); });\n    }\n\n    function finish(rec, why) {\n      rec.reasons.push(why);\n      var closed = !alive(rec);\n      window.setTimeout(function () {\n        readCart().then(function (cart) { guard(rec, function () { report(rec, cart, why); }); });\n      }, closed ? CLOSED_READ : 0);\n    }\n\n    function report(rec, cart, why) {\n      if (rec.state !== 'running') return;\n      var c = cart ? classify(cart) : null;\n      rec.cart = c ? (UK ? { filters: c.filters } : { filter: !!c.wbf, tumbler: c.tum ? lineColour(c.tum) || 'yes' : '' }) : null;\n      if (c && (UK ? c.filters >= UNITS : c.wbf && c.tum)) {\n        rec.state = 'done';\n        remember(rec);\n        publish('done', { opening: rec.n, reason: why });\n        if (!alive(rec)) return;\n        rec.modal.removeAttribute(RUN);\n        rec.modal.setAttribute(DONE, '');\n        rec.box.className = 'sv-one-button sv-one-button--busy sv-one-button--done';\n        rec.add.textContent = TEXT.added;\n        /* What is in the cart, whatever the menu shows now (the colour line is visible; the status line is\n         * for screen readers while the button shows the same news). */\n        if (UK) rec.status.textContent = TEXT.added + ': ' + c.filters + ' ' + filterNames(rec).many + '.';\n        else {\n          var colour = lineColour(c.tum);\n          if (colour) { rec.colourLine.textContent = TEXT.colour + colour; rec.colourLine.hidden = false; }\n          rec.status.textContent = TEXT.added + ': ' + tumblerWords(colour) + ' and the ' + cardName(rec.wbf, NAMES.wbf) + '.';\n        }\n        /* EG closes the pop-up itself once its count is 0; open after SETTLE (it allows more), EG's buttons. */\n        window.setTimeout(function () { guard(rec, function () { if (rec.state === 'done' && alive(rec)) handBack(rec, TEXT.added, 'still-open', null); }); }, SETTLE);\n        return;\n      }\n      standAside = standAside || why;\n      if (!alive(rec)) {\n        rec.state = 'back';\n        remember(rec);\n        publish('hand_back', { reason: why, opening: rec.n });\n        return;\n      }\n      handBack(rec, message(rec, cart), why, { cart: c });\n      if (rec.pending) lateWatch(rec, rec.pending);\n    }\n\n    /* A press EG took but had not answered at hand-back (or had not taken yet): when EG's tick or cross\n     * comes, the message is read again from the cart; an ignored press is read again after RECHECK ms if\n     * EG has still not touched it. Quiet once the shopper presses EG's buttons. */\n    function lateWatch(rec, b) {\n      var before = rec.pendingChild;\n      var key = rec.pendingKey;\n      var stop = null;\n      var recheck = null;\n      var write = function () {\n        readCart().then(function (cart) {\n          guard(rec, function () {\n            if (rec.quiet) return;\n            rec.pending = null;\n            if (alive(rec) && rec.status && rec.status.isConnected) rec.status.textContent = message(rec, cart);\n          });\n        });\n      };\n      var mo = new MutationObserver(function () {\n        guard(rec, function () {\n          var r = result(b);\n          if (!r || b.firstChild === before) return;\n          mo.disconnect();\n          window.clearTimeout(stop);\n          window.clearTimeout(recheck);\n          if (key) rec.results[key] = r;\n          window.setTimeout(write, 150);\n        });\n      });\n      mo.observe(b, { childList: true });\n      stop = window.setTimeout(function () { mo.disconnect(); window.clearTimeout(recheck); }, LATE_LIMIT);\n      if (rec.ignored) {\n        recheck = window.setTimeout(function () {\n          guard(rec, function () {\n            var f = b.firstChild;\n            if (!f || (f !== before && f.nodeType !== 3)) return; /* EG has started on it: its result will tell */\n            mo.disconnect();\n            window.clearTimeout(stop);\n            write();\n          });\n        }, RECHECK);\n      }\n    }\n\n    /* The box keeps the height that puts \"No thanks\" back where it was. EG centres its dialog on screen\n     * (or scrolls inside it), so a change of height moves \"No thanks\" by only part of it, or all of it: a\n     * few secant steps find the height (each step is one layout read). Best effort: if no height can hold\n     * it, \"No thanks\" moves down, away from a second press. */\n    function pin(rec, keep) {\n      var place = function (h) {\n        rec.box.style.minHeight = Math.max(0, Math.min(keep.h + 200, h)) + 'px';\n        return rect(rec.close).top - keep.top;\n      };\n      var d0 = 0;\n      var f0 = place(keep.h);\n      if (Math.abs(f0) > 1) {\n        var d1 = f0;\n        var f1 = place(keep.h - d1);\n        for (var k = 0; k < 4 && Math.abs(f1) > 1 && f1 !== f0; k++) {\n          var d2 = d1 - (f1 * (d1 - d0)) / (f1 - f0);\n          d0 = d1;\n          f0 = f1;\n          d1 = d2;\n          f1 = place(keep.h - d1);\n        }\n      }\n    }\n\n    /* EG's buttons back, for the rest of the opening; this file's box stays as the status line, at the\n     * height that keeps \"No thanks\" in place. EG's identical \"Add to cart\" buttons get an aria-describedby\n     * naming their product; nothing else of theirs is touched. how: { cart } (classified) after a run that\n     * did not end with the whole offer in the cart; null when EG left the pop-up open after it. */\n    function handBack(rec, words, why, how) {\n      if (rec.state === 'back') return;\n      var a = document.activeElement;\n      var ours = !a || a === document.body || a === rec.dialog || rec.box.contains(a);\n      var keep = { h: rect(rec.box).height, top: rect(rec.close).top };\n      rec.state = 'back';\n      if (rec.reasons[rec.reasons.length - 1] !== why) rec.reasons.push(why);\n      rec.modal.removeAttribute(RUN);\n      rec.modal.removeAttribute(DONE);\n      rec.modal.removeAttribute(MARK);\n      if (rec.sel && rec.onChange) rec.sel.removeEventListener('change', rec.onChange);\n      [rec.colourLine, rec.add, rec.desc].forEach(drop);\n      rec.box.className = 'sv-one-button sv-one-button--back';\n      rec.status.textContent = words || '';\n      label(rec);\n      pin(rec, keep);\n      if (ours) {\n        var target = null;\n        if (how && how.cart !== undefined) {\n          /* After a run: the missing item's button, if it can still be pressed; else (or when the cart could\n           * not be read) the status line. Never while a press of the run is still out: EG's one busy flag\n           * covers all its buttons (a keyboard press there would be dropped), and its 3 s timer can put its\n           * words back on a button that is still busy. */\n          var c = how.cart;\n          if (!c || rec.pending) target = rec.status;\n          else if (UK) target = usable(rec.wbf) && c.filters < UNITS ? rec.wbf : rec.status;\n          else target = [rec.tum, rec.wbf].filter(function (b) { return usable(b) && !(b === rec.tum ? c.tum : c.wbf); }).sort(inPageOrder)[0] || rec.status;\n        } else {\n          target = [rec.wbf, rec.tum].filter(usable).sort(inPageOrder)[0] || rec.status;\n        }\n        focusOn(target);\n      }\n      remember(rec);\n      publish('hand_back', { reason: why, opening: rec.n });\n    }\n\n    /* The shopper pressed one of EG's buttons after a hand-back and EG took the press: what the status line\n     * said may be out of date, so it goes quiet (its height kept). */\n    function quiet(rec) {\n      if (rec.quiet || !rec.status || !rec.status.isConnected) return;\n      rec.quiet = true;\n      if (text(rec.status)) {\n        var h = rect(rec.box).height;\n        if (h > 0) rec.box.style.minHeight = h + 'px';\n        rec.status.textContent = '';\n      }\n    }\n\n    function label(rec) {\n      [[rec.wbf, cardName(rec.wbf, NAMES.wbf)], [rec.tum, cardName(rec.tum, NAMES.tumbler)]].forEach(function (item, i) {\n        var b = item[0];\n        if (!b || !b.isConnected) return;\n        var id = 'sv-one-button-eg-' + rec.n + '-' + i;\n        if (!document.getElementById(id)) {\n          var s = el('span', 'sv-one-button__sr', item[1]);\n          s.id = id;\n          s.hidden = true; /* read as that button's description only */\n          rec.box.appendChild(s);\n        }\n        var ids = String(b.getAttribute('aria-describedby') || '').split(/\\s+/).filter(Boolean);\n        if (ids.indexOf(id) < 0) b.setAttribute('aria-describedby', ids.concat(id).join(' '));\n      });\n    }\n\n    /* An exception: no mark, no element of this file, no label of ours left on EG's buttons. */\n    function cleanup(rec, why) {\n      try {\n        rec.state = 'back';\n        rec.reasons.push(why);\n        standAside = standAside || why;\n        rec.modal.removeAttribute(RUN);\n        rec.modal.removeAttribute(DONE);\n        rec.modal.removeAttribute(MARK);\n        rec.modal.removeAttribute(FIT);\n        if (rec.watch) rec.watch.disconnect();\n        if (rec.sel && rec.onChange) rec.sel.removeEventListener('change', rec.onChange);\n        [rec.wbf, rec.tum].forEach(function (b, i) {\n          if (!b) return;\n          var mine = 'sv-one-button-eg-' + rec.n + '-' + i;\n          var ids = String(b.getAttribute('aria-describedby') || '').split(/\\s+/).filter(function (t) { return t && t !== mine; });\n          if (ids.length) b.setAttribute('aria-describedby', ids.join(' '));\n          else b.removeAttribute('aria-describedby');\n        });\n        drop(rec.box);\n        remember(rec);\n        publish('hand_back', { reason: why, opening: rec.n });\n      } catch (e) { warn(e); }\n    }\n\n    function guard(rec, fn) {\n      try { fn(); } catch (e) { warn(e); if (rec) cleanup(rec, 'error'); }\n    }\n\n    function remember(rec) {\n      if (log.indexOf(rec) < 0) log.push(rec);\n      if (log.length > 10) log.shift();\n    }\n\n    function recordOf(node) {\n      var modal = node.closest ? node.closest('#aca-modal') : null;\n      return modal ? states.get(modal) || null : null;\n    }\n\n    /* The shopper's input, seen first at the window: the last mouse position, the time of the last press\n     * and key, and, while the cart read is out, that the shopper is already using the pop-up. */\n    function noteMove(event) {\n      input.mouse = event.pointerType === 'mouse' || event.pointerType === 'pen';\n      input.x = event.clientX;\n      input.y = event.clientY;\n    }\n    /* When a finger lifts, the browser fires a compatibility mousedown. It is not a new press: the press began\n     * when the finger went down. Chrome says which is which (sourceCapabilities.firesTouchEvents), so a real\n     * mouse there is never mistaken for it; Safari and Firefox don't, so there a mousedown within TOUCH_MOUSE ms\n     * of a touch starting or ending counts as part of that touch. */\n    function fromTouch(event, t) {\n      if (event.type !== 'mousedown') return false;\n      var source = event.sourceCapabilities;\n      if (source) return !!source.firesTouchEvents;\n      return input.touch > 0 && t - input.touch < TOUCH_MOUSE;\n    }\n    function noteInput(event) {\n      var t = now();\n      if (event.type === 'touchend') { input.touch = t; return; }\n      if (event.type === 'keydown') input.key = t;\n      else if (!fromTouch(event, t)) {\n        input.press = t;\n        if (event.type === 'touchstart' || event.pointerType === 'touch') input.touch = t;\n      }\n      if (event.type === 'pointerdown') noteMove(event);\n      var r = current;\n      if (r && r.state === 'checking' && (event.type === 'keydown' || (event.target && event.target.nodeType === 1 && r.modal.contains(event.target)))) r.active = true;\n    }\n    window.addEventListener('pointermove', function (event) { try { noteMove(event); } catch (e) { warn(e); } }, { capture: true, passive: true });\n    ['pointerdown', 'mousedown', 'touchstart', 'touchend'].forEach(function (type) {\n      window.addEventListener(type, function (event) { try { noteInput(event); } catch (e) { warn(e); } }, { capture: true, passive: true });\n    });\n\n    /* While the read is out, focus moving onto one of EG's controls means the shopper is using EG's pop-up\n     * (a screen reader can move focus without any key), so the opening stays EG's. EG's own focus, about\n     * 10 ms after it opens, on its first control in page order, does not count, and neither does the\n     * dialog's own focus already there when the opening is first seen; moving off it and back does (in the\n     * UK that first control is EG's only button). */\n    function egFirst(r) {\n      return [r.wbf, r.tum, r.sel].filter(function (n) {\n        return n && !(n.classList && n.classList.contains('aca-product-out-of-stock-button'));\n      }).reduce(function (a, b) { return a && (a.compareDocumentPosition(b) & 4) ? a : b; }, null);\n    }\n    window.addEventListener('focusin', function (event) {\n      try {\n        var r = current;\n        var t = event.target;\n        if (!r || r.state !== 'checking' || !t || t.nodeType !== 1 || !r.modal || !r.modal.contains(t)) return;\n        if (t !== r.wbf && t !== r.tum && t !== r.sel) { if (r.egFocused) r.movedAway = true; return; }\n        if (!r.egFocused && !r.movedAway && t === egFirst(r)) { r.egFocused = true; return; }\n        r.active = true;\n      } catch (e) { warn(e); }\n    }, true);\n\n    /* Clicks on this file's button, caught at the window before anything else (EG's closer included). */\n    window.addEventListener('click', function (event) {\n      try {\n        var t = event.target;\n        var mine = t && t.closest ? t.closest('[data-sv1-add]') : null;\n        if (mine) {\n          event.stopPropagation();\n          event.preventDefault();\n          var rec = recordOf(mine);\n          if (!rec) return;\n          guard(rec, function () {\n            if (rec.state !== 'ready') return; /* running, done or handed back: one run per opening */\n            if (!armed(rec, event)) {\n              if (rec.reasons.indexOf('early-press') < 0) rec.reasons.push('early-press');\n              return;\n            }\n            run(rec);\n          });\n          return;\n        }\n        var r = current;\n        /* After a hand-back, a press of EG's own buttons quiets the status line once EG has taken it: EG's\n         * handler (inside this dispatch) replaces what the button showed with its spinner. A press EG drops\n         * (busy, or on its tick or cross icon, which carries no variant) leaves the words, and the watch on a\n         * press still out can still bring them up to date. */\n        var egb = r && r.state === 'back' && event.isTrusted && t ? (r.wbf && r.wbf.contains(t) ? r.wbf : r.tum && r.tum.contains(t) ? r.tum : null) : null;\n        if (egb) {\n          var was = egb.firstChild;\n          window.setTimeout(function () { guard(r, function () { if (egb.firstChild !== was) quiet(r); }); }, 0);\n        }\n        /* While a run is on, a shopper's click outside EG's box (EG would close) is held back. */\n        if (r && r.state === 'running' && event.isTrusted && t && r.modal.contains(t)) {\n          var box = r.dialog.getBoundingClientRect();\n          if (!r.dialog.contains(t) || event.clientX < box.left || event.clientX > box.right || event.clientY < box.top || event.clientY > box.bottom) {\n            event.stopPropagation();\n            event.preventDefault();\n          }\n        }\n      } catch (e) { warn(e); }\n    }, true);\n\n    /* While a run is on: Escape (EG closes on it) and keys on the colour menu are held back; once the\n     * offer is added, the menu keys still are. */\n    window.addEventListener('keydown', function (event) {\n      try {\n        noteInput(event);\n        var r = current;\n        if (!r || (r.state !== 'running' && r.state !== 'done') || !alive(r)) return;\n        if (r.state === 'running' && (event.key === 'Escape' || event.key === 'Esc' || event.keyCode === 27)) {\n          event.preventDefault();\n          event.stopPropagation();\n          return;\n        }\n        if (r.sel && event.target === r.sel && event.key !== 'Tab') {\n          event.preventDefault();\n          event.stopPropagation();\n        }\n      } catch (e) { warn(e); }\n    }, true);\n\n    var scan = function () {\n      var modal = document.getElementById('aca-modal');\n      if (!modal || states.has(modal)) return;\n      try {\n        consider(modal, initial);\n      } catch (e) {\n        warn(e);\n        var rec = states.get(modal);\n        if (rec) cleanup(rec, 'error');\n        else { modal.removeAttribute(MARK); modal.removeAttribute(RUN); modal.removeAttribute(DONE); modal.removeAttribute(FIT); }\n      }\n    };\n    var start = function () {\n      new MutationObserver(scan).observe(document.body, { childList: true });\n      scan();\n      initial = false;\n    };\n    if (document.body) start();\n    else document.addEventListener('DOMContentLoaded', start, { once: true });\n\n    var summary = function (rec) {\n      var cart = null;\n      if (rec.cart) cart = UK ? { filters: rec.cart.filters } : { filter: rec.cart.filter, tumbler: rec.cart.tumbler };\n      return { opening: rec.n, state: rec.state, reasons: rec.reasons.slice(), cart: cart };\n    };\n    window.egOneButton = {\n      version: VERSION,\n      market: MARKET,\n      openings: function () { return log.map(summary); },\n      last: function () { return log.length ? summary(log[log.length - 1]) : null; },\n      standingAside: function () { return standAside; }\n    };\n  } catch (error) {\n    if (window.console) console.warn('[eg-one-button] not started', error);\n  }\n})();\n"],
  "mappings": "CA0GC,UAAY,CACX,aACA,GAAI,CA8EF,IAAS,QAAT,SAAiB,OAAQ,MAAO,CAC9B,GAAI,CACF,IAAI,EAAI,OAAO,SAAW,OAAO,QAAQ,UACzC,GAAI,CAAC,GAAK,OAAO,EAAE,SAAY,WAAY,OAC3C,IAAI,KAAO,CAAE,OAAQ,OAAQ,QAAS,QAAS,OAAQ,MAAO,EAC9D,QAAS,KAAK,MAAW,OAAO,UAAU,eAAe,KAAK,MAAO,CAAC,IAAG,KAAK,CAAC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