import { S as On, b as Rn, s as xn, f as X, c as Nn, e as le, t as pe, g as ae, k as cn, l as un, m as ce, x as fn, w as zt, H as Mn, U as kn, d as Je, r as vn, R as Ht, F as Zt, y as je, u as Ve, h as Ge, j as qe, o as x, T as Dn, B as Wt, p as F, z as Xe, q as Pe, v as d, A as Ft, n as ut, N as Bt, C as ft, E as Ln } from "./CashierConfirmModal-4RYp7Eiq.js";
import { f as _t } from "./CashierModal-ZfKvGxFq.js";
import { a as Pn, i as In, $ as Un, b as zn } from "./CashierError-DUzkCsXh.js";
import { d as Jt, u as Hn, x as Vt } from "./CashierMethodDetails-CCXOr2gb.js";
function Gt(n, t) {
  Pn(n, t);
}
function Zn(n) {
  In({
    fallbackLocale: "en"
  }), Un.set(n);
}
const qt = {
  en: {
    sessionExpirationHeader: "Session Warning",
    sessionExpirationTitle: "Your session is about to expire!",
    sessionExpirationGeneralText: "Your session will automatically terminate in <b>{second} seconds</b>.",
    sessionExpirationGeneralButton: "CONTINUE",
    sessionExpirationLoadingButton: "PROCESSING..."
  },
  tr: {
    sessionExpirationHeader: "Oturum Uyarısı",
    sessionExpirationTitle: "Oturumunuzun süresi dolmak üzere!",
    sessionExpirationGeneralText: "Oyun seansınız <b>{second} saniye</b> içinde otomatik olarak sonuçlandırılacaktır",
    sessionExpirationGeneralButton: "DEVAM ET",
    sessionExpirationLoadingButton: "İŞLEME..."
  },
  "en-us": {
    sessionExpirationHeader: "Session Warning",
    sessionExpirationTitle: "Your session is about to expire!",
    sessionExpirationGeneralText: "Your session will automatically terminate in <b>{second} seconds</b>.",
    sessionExpirationGeneralButton: "CONTINUE",
    sessionExpirationLoadingButton: "PROCESSING..."
  }
};
/*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE */
const {
  entries: mn,
  setPrototypeOf: Yt,
  isFrozen: Wn,
  getPrototypeOf: Fn,
  getOwnPropertyDescriptor: Bn
} = Object;
let {
  freeze: B,
  seal: K,
  create: pn
} = Object, {
  apply: mt,
  construct: pt
} = typeof Reflect != "undefined" && Reflect;
B || (B = function(t) {
  return t;
});
K || (K = function(t) {
  return t;
});
mt || (mt = function(t, i, o) {
  return t.apply(i, o);
});
pt || (pt = function(t, i) {
  return new t(...i);
});
const Be = Y(Array.prototype.forEach), jt = Y(Array.prototype.pop), Me = Y(Array.prototype.push), Ye = Y(String.prototype.toLowerCase), st = Y(String.prototype.toString), Xt = Y(String.prototype.match), ke = Y(String.prototype.replace), _n = Y(String.prototype.indexOf), Jn = Y(String.prototype.trim), $ = Y(Object.prototype.hasOwnProperty), W = Y(RegExp.prototype.test), ve = Vn(TypeError);
function Y(n) {
  return function(t) {
    for (var i = arguments.length, o = new Array(i > 1 ? i - 1 : 0), r = 1; r < i; r++)
      o[r - 1] = arguments[r];
    return mt(n, t, o);
  };
}
function Vn(n) {
  return function() {
    for (var t = arguments.length, i = new Array(t), o = 0; o < t; o++)
      i[o] = arguments[o];
    return pt(n, i);
  };
}
function f(n, t) {
  let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ye;
  Yt && Yt(n, null);
  let o = t.length;
  for (; o--; ) {
    let r = t[o];
    if (typeof r == "string") {
      const l = i(r);
      l !== r && (Wn(t) || (t[o] = l), r = l);
    }
    n[r] = !0;
  }
  return n;
}
function Gn(n) {
  for (let t = 0; t < n.length; t++)
    $(n, t) || (n[t] = null);
  return n;
}
function Ee(n) {
  const t = pn(null);
  for (const [i, o] of mn(n))
    $(n, i) && (Array.isArray(o) ? t[i] = Gn(o) : o && typeof o == "object" && o.constructor === Object ? t[i] = Ee(o) : t[i] = o);
  return t;
}
function De(n, t) {
  for (; n !== null; ) {
    const o = Bn(n, t);
    if (o) {
      if (o.get)
        return Y(o.get);
      if (typeof o.value == "function")
        return Y(o.value);
    }
    n = Fn(n);
  }
  function i() {
    return null;
  }
  return i;
}
const Kt = B(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), rt = B(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), at = B(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), qn = B(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), lt = B(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Yn = B(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Qt = B(["#text"]), $t = B(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), ct = B(["accent-height", "accumulate", "additive", "alignment-baseline", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), en = B(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), _e = B(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), jn = K(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Xn = K(/<%[\w\W]*|[\w\W]*%>/gm), Kn = K(/\${[\w\W]*}/gm), Qn = K(/^data-[\-\w.\u00B7-\uFFFF]/), $n = K(/^aria-[\-\w]+$/), dn = K(
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
  // eslint-disable-line no-useless-escape
), ei = K(/^(?:\w+script|data):/i), ti = K(
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
  // eslint-disable-line no-control-regex
), hn = K(/^html$/i), ni = K(/^[a-z][.\w]*(-[.\w]+)+$/i);
var tn = /* @__PURE__ */ Object.freeze({
  __proto__: null,
  MUSTACHE_EXPR: jn,
  ERB_EXPR: Xn,
  TMPLIT_EXPR: Kn,
  DATA_ATTR: Qn,
  ARIA_ATTR: $n,
  IS_ALLOWED_URI: dn,
  IS_SCRIPT_OR_DATA: ei,
  ATTR_WHITESPACE: ti,
  DOCTYPE_NAME: hn,
  CUSTOM_ELEMENT: ni
});
const Le = {
  element: 1,
  text: 3,
  // Deprecated
  progressingInstruction: 7,
  comment: 8,
  document: 9
}, ii = function() {
  return typeof window == "undefined" ? null : window;
}, oi = function(t, i) {
  if (typeof t != "object" || typeof t.createPolicy != "function")
    return null;
  let o = null;
  const r = "data-tt-policy-suffix";
  i && i.hasAttribute(r) && (o = i.getAttribute(r));
  const l = "dompurify" + (o ? "#" + o : "");
  try {
    return t.createPolicy(l, {
      createHTML(p) {
        return p;
      },
      createScriptURL(p) {
        return p;
      }
    });
  } catch (p) {
    return console.warn("TrustedTypes policy " + l + " could not be created."), null;
  }
};
function gn() {
  let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ii();
  const t = (u) => gn(u);
  if (t.version = "3.1.6", t.removed = [], !n || !n.document || n.document.nodeType !== Le.document)
    return t.isSupported = !1, t;
  let {
    document: i
  } = n;
  const o = i, r = o.currentScript, {
    DocumentFragment: l,
    HTMLTemplateElement: p,
    Node: P,
    Element: I,
    NodeFilter: b,
    NamedNodeMap: N = n.NamedNodeMap || n.MozNamedAttrMap,
    HTMLFormElement: de,
    DOMParser: he,
    trustedTypes: j
  } = n, A = I.prototype, M = De(A, "cloneNode"), v = De(A, "remove"), ue = De(A, "nextSibling"), _ = De(A, "childNodes"), m = De(A, "parentNode");
  if (typeof p == "function") {
    const u = i.createElement("template");
    u.content && u.content.ownerDocument && (i = u.content.ownerDocument);
  }
  let w, G = "";
  const {
    implementation: q,
    createNodeIterator: Q,
    createDocumentFragment: R,
    getElementsByTagName: fe
  } = i, {
    importNode: ee
  } = o;
  let h = {};
  t.isSupported = typeof mn == "function" && typeof m == "function" && q && q.createHTMLDocument !== void 0;
  const {
    MUSTACHE_EXPR: te,
    ERB_EXPR: ne,
    TMPLIT_EXPR: D,
    DATA_ATTR: we,
    ARIA_ATTR: z,
    IS_SCRIPT_OR_DATA: ge,
    ATTR_WHITESPACE: g,
    CUSTOM_ELEMENT: S
  } = tn;
  let {
    IS_ALLOWED_URI: me
  } = tn, C = null;
  const Ie = f({}, [...Kt, ...rt, ...at, ...lt, ...Qt]);
  let O = null;
  const Ue = f({}, [...$t, ...ct, ...en, ..._e]);
  let y = Object.seal(pn(null, {
    tagNameCheck: {
      writable: !0,
      configurable: !1,
      enumerable: !0,
      value: null
    },
    attributeNameCheck: {
      writable: !0,
      configurable: !1,
      enumerable: !0,
      value: null
    },
    allowCustomizedBuiltInElements: {
      writable: !0,
      configurable: !1,
      enumerable: !0,
      value: !1
    }
  })), a = null, T = null, J = !0, H = !0, dt = !1, ht = !0, Se = !1, Ke = !0, Te = !1, Qe = !1, $e = !1, ye = !1, ze = !1, He = !1, gt = !0, Tt = !1;
  const Tn = "user-content-";
  let et = !0, Re = !1, be = {}, Ae = null;
  const Et = f({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
  let wt = null;
  const St = f({}, ["audio", "video", "img", "source", "image", "track"]);
  let tt = null;
  const yt = f({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Ze = "http://www.w3.org/1998/Math/MathML", We = "http://www.w3.org/2000/svg", se = "http://www.w3.org/1999/xhtml";
  let Ce = se, nt = !1, it = null;
  const En = f({}, [Ze, We, se], st);
  let xe = null;
  const wn = ["application/xhtml+xml", "text/html"], Sn = "text/html";
  let k = null, Oe = null;
  const yn = i.createElement("form"), bt = function(e) {
    return e instanceof RegExp || e instanceof Function;
  }, ot = function() {
    let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
    if (!(Oe && Oe === e)) {
      if ((!e || typeof e != "object") && (e = {}), e = Ee(e), xe = // eslint-disable-next-line unicorn/prefer-includes
      wn.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? Sn : e.PARSER_MEDIA_TYPE, k = xe === "application/xhtml+xml" ? st : Ye, C = $(e, "ALLOWED_TAGS") ? f({}, e.ALLOWED_TAGS, k) : Ie, O = $(e, "ALLOWED_ATTR") ? f({}, e.ALLOWED_ATTR, k) : Ue, it = $(e, "ALLOWED_NAMESPACES") ? f({}, e.ALLOWED_NAMESPACES, st) : En, tt = $(e, "ADD_URI_SAFE_ATTR") ? f(
        Ee(yt),
        // eslint-disable-line indent
        e.ADD_URI_SAFE_ATTR,
        // eslint-disable-line indent
        k
        // eslint-disable-line indent
      ) : yt, wt = $(e, "ADD_DATA_URI_TAGS") ? f(
        Ee(St),
        // eslint-disable-line indent
        e.ADD_DATA_URI_TAGS,
        // eslint-disable-line indent
        k
        // eslint-disable-line indent
      ) : St, Ae = $(e, "FORBID_CONTENTS") ? f({}, e.FORBID_CONTENTS, k) : Et, a = $(e, "FORBID_TAGS") ? f({}, e.FORBID_TAGS, k) : {}, T = $(e, "FORBID_ATTR") ? f({}, e.FORBID_ATTR, k) : {}, be = $(e, "USE_PROFILES") ? e.USE_PROFILES : !1, J = e.ALLOW_ARIA_ATTR !== !1, H = e.ALLOW_DATA_ATTR !== !1, dt = e.ALLOW_UNKNOWN_PROTOCOLS || !1, ht = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Se = e.SAFE_FOR_TEMPLATES || !1, Ke = e.SAFE_FOR_XML !== !1, Te = e.WHOLE_DOCUMENT || !1, ye = e.RETURN_DOM || !1, ze = e.RETURN_DOM_FRAGMENT || !1, He = e.RETURN_TRUSTED_TYPE || !1, $e = e.FORCE_BODY || !1, gt = e.SANITIZE_DOM !== !1, Tt = e.SANITIZE_NAMED_PROPS || !1, et = e.KEEP_CONTENT !== !1, Re = e.IN_PLACE || !1, me = e.ALLOWED_URI_REGEXP || dn, Ce = e.NAMESPACE || se, y = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && bt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (y.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && bt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (y.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (y.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Se && (H = !1), ze && (ye = !0), be && (C = f({}, Qt), O = [], be.html === !0 && (f(C, Kt), f(O, $t)), be.svg === !0 && (f(C, rt), f(O, ct), f(O, _e)), be.svgFilters === !0 && (f(C, at), f(O, ct), f(O, _e)), be.mathMl === !0 && (f(C, lt), f(O, en), f(O, _e))), e.ADD_TAGS && (C === Ie && (C = Ee(C)), f(C, e.ADD_TAGS, k)), e.ADD_ATTR && (O === Ue && (O = Ee(O)), f(O, e.ADD_ATTR, k)), e.ADD_URI_SAFE_ATTR && f(tt, e.ADD_URI_SAFE_ATTR, k), e.FORBID_CONTENTS && (Ae === Et && (Ae = Ee(Ae)), f(Ae, e.FORBID_CONTENTS, k)), et && (C["#text"] = !0), Te && f(C, ["html", "head", "body"]), C.table && (f(C, ["tbody"]), delete a.tbody), e.TRUSTED_TYPES_POLICY) {
        if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function")
          throw ve('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
        if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function")
          throw ve('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
        w = e.TRUSTED_TYPES_POLICY, G = w.createHTML("");
      } else
        w === void 0 && (w = oi(j, r)), w !== null && typeof G == "string" && (G = w.createHTML(""));
      B && B(e), Oe = e;
    }
  }, At = f({}, ["mi", "mo", "mn", "ms", "mtext"]), Ct = f({}, ["foreignobject", "annotation-xml"]), bn = f({}, ["title", "style", "font", "a", "script"]), Ot = f({}, [...rt, ...at, ...qn]), Rt = f({}, [...lt, ...Yn]), An = function(e) {
    let s = m(e);
    (!s || !s.tagName) && (s = {
      namespaceURI: Ce,
      tagName: "template"
    });
    const c = Ye(e.tagName), E = Ye(s.tagName);
    return it[e.namespaceURI] ? e.namespaceURI === We ? s.namespaceURI === se ? c === "svg" : s.namespaceURI === Ze ? c === "svg" && (E === "annotation-xml" || At[E]) : !!Ot[c] : e.namespaceURI === Ze ? s.namespaceURI === se ? c === "math" : s.namespaceURI === We ? c === "math" && Ct[E] : !!Rt[c] : e.namespaceURI === se ? s.namespaceURI === We && !Ct[E] || s.namespaceURI === Ze && !At[E] ? !1 : !Rt[c] && (bn[c] || !Ot[c]) : !!(xe === "application/xhtml+xml" && it[e.namespaceURI]) : !1;
  }, ie = function(e) {
    Me(t.removed, {
      element: e
    });
    try {
      m(e).removeChild(e);
    } catch (s) {
      v(e);
    }
  }, Fe = function(e, s) {
    try {
      Me(t.removed, {
        attribute: s.getAttributeNode(e),
        from: s
      });
    } catch (c) {
      Me(t.removed, {
        attribute: null,
        from: s
      });
    }
    if (s.removeAttribute(e), e === "is" && !O[e])
      if (ye || ze)
        try {
          ie(s);
        } catch (c) {
        }
      else
        try {
          s.setAttribute(e, "");
        } catch (c) {
        }
  }, xt = function(e) {
    let s = null, c = null;
    if ($e)
      e = "<remove></remove>" + e;
    else {
      const L = Xt(e, /^[\r\n\t ]+/);
      c = L && L[0];
    }
    xe === "application/xhtml+xml" && Ce === se && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
    const E = w ? w.createHTML(e) : e;
    if (Ce === se)
      try {
        s = new he().parseFromString(E, xe);
      } catch (L) {
      }
    if (!s || !s.documentElement) {
      s = q.createDocument(Ce, "template", null);
      try {
        s.documentElement.innerHTML = nt ? G : E;
      } catch (L) {
      }
    }
    const U = s.body || s.documentElement;
    return e && c && U.insertBefore(i.createTextNode(c), U.childNodes[0] || null), Ce === se ? fe.call(s, Te ? "html" : "body")[0] : Te ? s.documentElement : U;
  }, Nt = function(e) {
    return Q.call(
      e.ownerDocument || e,
      e,
      // eslint-disable-next-line no-bitwise
      b.SHOW_ELEMENT | b.SHOW_COMMENT | b.SHOW_TEXT | b.SHOW_PROCESSING_INSTRUCTION | b.SHOW_CDATA_SECTION,
      null
    );
  }, Mt = function(e) {
    return e instanceof de && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof N) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
  }, kt = function(e) {
    return typeof P == "function" && e instanceof P;
  }, re = function(e, s, c) {
    h[e] && Be(h[e], (E) => {
      E.call(t, s, c, Oe);
    });
  }, vt = function(e) {
    let s = null;
    if (re("beforeSanitizeElements", e, null), Mt(e))
      return ie(e), !0;
    const c = k(e.nodeName);
    if (re("uponSanitizeElement", e, {
      tagName: c,
      allowedTags: C
    }), e.hasChildNodes() && !kt(e.firstElementChild) && W(/<[/\w]/g, e.innerHTML) && W(/<[/\w]/g, e.textContent) || e.nodeType === Le.progressingInstruction || Ke && e.nodeType === Le.comment && W(/<[/\w]/g, e.data))
      return ie(e), !0;
    if (!C[c] || a[c]) {
      if (!a[c] && Lt(c) && (y.tagNameCheck instanceof RegExp && W(y.tagNameCheck, c) || y.tagNameCheck instanceof Function && y.tagNameCheck(c)))
        return !1;
      if (et && !Ae[c]) {
        const E = m(e) || e.parentNode, U = _(e) || e.childNodes;
        if (U && E) {
          const L = U.length;
          for (let V = L - 1; V >= 0; --V) {
            const oe = M(U[V], !0);
            oe.__removalCount = (e.__removalCount || 0) + 1, E.insertBefore(oe, ue(e));
          }
        }
      }
      return ie(e), !0;
    }
    return e instanceof I && !An(e) || (c === "noscript" || c === "noembed" || c === "noframes") && W(/<\/no(script|embed|frames)/i, e.innerHTML) ? (ie(e), !0) : (Se && e.nodeType === Le.text && (s = e.textContent, Be([te, ne, D], (E) => {
      s = ke(s, E, " ");
    }), e.textContent !== s && (Me(t.removed, {
      element: e.cloneNode()
    }), e.textContent = s)), re("afterSanitizeElements", e, null), !1);
  }, Dt = function(e, s, c) {
    if (gt && (s === "id" || s === "name") && (c in i || c in yn))
      return !1;
    if (!(H && !T[s] && W(we, s))) {
      if (!(J && W(z, s))) {
        if (!O[s] || T[s]) {
          if (
            // First condition does a very basic check if a) it's basically a valid custom element tagname AND
            // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
            // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
            !(Lt(e) && (y.tagNameCheck instanceof RegExp && W(y.tagNameCheck, e) || y.tagNameCheck instanceof Function && y.tagNameCheck(e)) && (y.attributeNameCheck instanceof RegExp && W(y.attributeNameCheck, s) || y.attributeNameCheck instanceof Function && y.attributeNameCheck(s)) || // Alternative, second condition checks if it's an `is`-attribute, AND
            // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
            s === "is" && y.allowCustomizedBuiltInElements && (y.tagNameCheck instanceof RegExp && W(y.tagNameCheck, c) || y.tagNameCheck instanceof Function && y.tagNameCheck(c)))
          )
            return !1;
        } else if (!tt[s]) {
          if (!W(me, ke(c, g, ""))) {
            if (!((s === "src" || s === "xlink:href" || s === "href") && e !== "script" && _n(c, "data:") === 0 && wt[e])) {
              if (!(dt && !W(ge, ke(c, g, "")))) {
                if (c)
                  return !1;
              }
            }
          }
        }
      }
    }
    return !0;
  }, Lt = function(e) {
    return e !== "annotation-xml" && Xt(e, S);
  }, Pt = function(e) {
    re("beforeSanitizeAttributes", e, null);
    const {
      attributes: s
    } = e;
    if (!s)
      return;
    const c = {
      attrName: "",
      attrValue: "",
      keepAttr: !0,
      allowedAttributes: O
    };
    let E = s.length;
    for (; E--; ) {
      const U = s[E], {
        name: L,
        namespaceURI: V,
        value: oe
      } = U, Ne = k(L);
      let Z = L === "value" ? oe : Jn(oe);
      if (c.attrName = Ne, c.attrValue = Z, c.keepAttr = !0, c.forceKeepAttr = void 0, re("uponSanitizeAttribute", e, c), Z = c.attrValue, Ke && W(/((--!?|])>)|<\/(style|title)/i, Z)) {
        Fe(L, e);
        continue;
      }
      if (c.forceKeepAttr || (Fe(L, e), !c.keepAttr))
        continue;
      if (!ht && W(/\/>/i, Z)) {
        Fe(L, e);
        continue;
      }
      Se && Be([te, ne, D], (Ut) => {
        Z = ke(Z, Ut, " ");
      });
      const It = k(e.nodeName);
      if (Dt(It, Ne, Z)) {
        if (Tt && (Ne === "id" || Ne === "name") && (Fe(L, e), Z = Tn + Z), w && typeof j == "object" && typeof j.getAttributeType == "function" && !V)
          switch (j.getAttributeType(It, Ne)) {
            case "TrustedHTML": {
              Z = w.createHTML(Z);
              break;
            }
            case "TrustedScriptURL": {
              Z = w.createScriptURL(Z);
              break;
            }
          }
        try {
          V ? e.setAttributeNS(V, L, Z) : e.setAttribute(L, Z), Mt(e) ? ie(e) : jt(t.removed);
        } catch (Ut) {
        }
      }
    }
    re("afterSanitizeAttributes", e, null);
  }, Cn = function u(e) {
    let s = null;
    const c = Nt(e);
    for (re("beforeSanitizeShadowDOM", e, null); s = c.nextNode(); )
      re("uponSanitizeShadowNode", s, null), !vt(s) && (s.content instanceof l && u(s.content), Pt(s));
    re("afterSanitizeShadowDOM", e, null);
  };
  return t.sanitize = function(u) {
    let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = null, c = null, E = null, U = null;
    if (nt = !u, nt && (u = "<!-->"), typeof u != "string" && !kt(u))
      if (typeof u.toString == "function") {
        if (u = u.toString(), typeof u != "string")
          throw ve("dirty is not a string, aborting");
      } else
        throw ve("toString is not a function");
    if (!t.isSupported)
      return u;
    if (Qe || ot(e), t.removed = [], typeof u == "string" && (Re = !1), Re) {
      if (u.nodeName) {
        const oe = k(u.nodeName);
        if (!C[oe] || a[oe])
          throw ve("root node is forbidden and cannot be sanitized in-place");
      }
    } else if (u instanceof P)
      s = xt("<!---->"), c = s.ownerDocument.importNode(u, !0), c.nodeType === Le.element && c.nodeName === "BODY" || c.nodeName === "HTML" ? s = c : s.appendChild(c);
    else {
      if (!ye && !Se && !Te && // eslint-disable-next-line unicorn/prefer-includes
      u.indexOf("<") === -1)
        return w && He ? w.createHTML(u) : u;
      if (s = xt(u), !s)
        return ye ? null : He ? G : "";
    }
    s && $e && ie(s.firstChild);
    const L = Nt(Re ? u : s);
    for (; E = L.nextNode(); )
      vt(E) || (E.content instanceof l && Cn(E.content), Pt(E));
    if (Re)
      return u;
    if (ye) {
      if (ze)
        for (U = R.call(s.ownerDocument); s.firstChild; )
          U.appendChild(s.firstChild);
      else
        U = s;
      return (O.shadowroot || O.shadowrootmode) && (U = ee.call(o, U, !0)), U;
    }
    let V = Te ? s.outerHTML : s.innerHTML;
    return Te && C["!doctype"] && s.ownerDocument && s.ownerDocument.doctype && s.ownerDocument.doctype.name && W(hn, s.ownerDocument.doctype.name) && (V = "<!DOCTYPE " + s.ownerDocument.doctype.name + `>
` + V), Se && Be([te, ne, D], (oe) => {
      V = ke(V, oe, " ");
    }), w && He ? w.createHTML(V) : V;
  }, t.setConfig = function() {
    let u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
    ot(u), Qe = !0;
  }, t.clearConfig = function() {
    Oe = null, Qe = !1;
  }, t.isValidAttribute = function(u, e, s) {
    Oe || ot({});
    const c = k(u), E = k(e);
    return Dt(c, E, s);
  }, t.addHook = function(u, e) {
    typeof e == "function" && (h[u] = h[u] || [], Me(h[u], e));
  }, t.removeHook = function(u) {
    if (h[u])
      return jt(h[u]);
  }, t.removeHooks = function(u) {
    h[u] && (h[u] = []);
  }, t.removeAllHooks = function() {
    h = {};
  }, t;
}
var nn = gn();
const si = "data:image/png;base64, ";
function ri(n) {
  Nn(n, "svelte-h8zhj8", "*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}@keyframes loading-spinner{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.CashierSessionExpirationModalWindow{display:flex;position:absolute;align-items:center;justify-content:center;width:100%;height:100%;z-index:5;top:0;left:0;background-color:var(--mmw--color-black-transparency-20, rgba(0, 0, 0, 0.2));container-type:inline-size;container-name:session-expiration-modal-window}.CashierSessionExpirationModalWrapper{background:var(--emw--color-white, #fff);border-radius:var(--emw--border-radius-medium, 4px);width:400px}.CashierSessionExpirationModalHeader{display:flex;align-items:center;position:relative;height:var(--mmw--header-height, 40px);background-color:var(--mmw--color-grey-10, rgba(17, 17, 17, 0.0666666667));width:100%;border-radius:var(--emw--border-radius-medium, 4px) var(--emw--border-radius-medium, 4px) 0 0}.CashierSessionExpirationModalHeaderTitle{display:flex;text-align:center;color:var(--mmw--color-grey-10, #111);font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-semibold, 500);margin:auto;max-width:calc(100% - 150px);overflow:hidden;text-overflow:ellipsis;line-height:calc(var(--emw--font-size-medium, 16px) + 2px)}.CashierSessionExpirationModalContainer{padding:var(--emw--spacing-large, 20px)}.CashierSessionExpirationModalCloseBtn{position:absolute;display:flex;align-items:center;justify-content:center;top:10px;right:10px;padding:var(--emw--spacing-small-minus, 10px);border-radius:50%;color:var(--emw--color-white, #fff);background:var(--mmw--color-gray-transparency-85, rgba(255, 255, 255, 0.85));cursor:pointer;transition:all 150ms ease-in-out}.CashierSessionExpirationModalCloseBtn svg{width:32px;height:32px}.CashierSessionExpirationModalCloseBtn:hover{background:var(--emw--color-gray-transparency-20, rgba(255, 255, 255, 0.2))}.CashierSessionExpiration{width:100%;display:flex;flex-direction:column;align-items:center;gap:var(--emw--spacing-large, 20px)}.CashierSessionExpirationTitle{color:var(--emw--color-black, #000);font-weight:var(--emw--font-weight-semibold, 500);font-size:var(--emw--font-size-small, 14px);line-height:120%;text-align:center}.CashierSessionExpirationText{color:var(--mmw--color-grey-290, #666);font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-small, 14px);line-height:120%;text-align:center}.CashierSessionExpirationButton{display:flex;width:100%;height:36px;flex-direction:column;justify-content:center;align-items:center;flex-shrink:0;color:var(--emw--color-white, #FFF);cursor:pointer;text-align:center;font-style:normal;font-weight:var(--emw--font-weight-semibold, 500);line-height:36px;border-radius:var(--emw--border-radius-medium, 4px);background:var(--emw--color-primary, #7EC51E);border:none}.CashierSessionExpirationButton:hover{background:var(--mmw--color-main-button-hover, #71B11B)}.CashierSessionExpirationButton:active{background:var(--mmw--color-main-button-active, #5C950F)}.CashierSessionExpirationButton:disabled{background:var(--mmw--color-main-button-disabled, #5C950F)}.CashierSessionExpirationButtonText{font-size:var(--emw--font-size-medium, 16px);font-family:inherit}.CashierSessionExpirationButtonSpinner{animation:loading-spinner 1s linear infinite}@container session-expiration-modal-window (max-width:750px){.CashierSessionExpirationModalWindow .CashierSessionExpirationModalWrapper{width:90%;max-width:400px}}");
}
const ai = (n) => ({}), on = (n) => ({}), li = (n) => ({}), sn = (n) => ({}), ci = (n) => ({}), rn = (n) => ({}), ui = (n) => ({}), an = (n) => ({ class: "CashierSessionExpirationIcon" });
function ln(n) {
  let t, i, o, r, l, p = (
    /*$_*/
    n[8]("sessionExpirationHeader") + ""
  ), P, I, b, N, de, he, j, A, M, v, ue, _, m, w, G;
  const q = (
    /*#slots*/
    n[21].icon
  ), Q = Je(
    q,
    n,
    /*$$scope*/
    n[20],
    an
  ), R = Q || pi(n), fe = (
    /*#slots*/
    n[21].title
  ), ee = Je(
    fe,
    n,
    /*$$scope*/
    n[20],
    rn
  ), h = ee || di(n), te = (
    /*#slots*/
    n[21].text
  ), ne = Je(
    te,
    n,
    /*$$scope*/
    n[20],
    sn
  ), D = ne || hi(n), we = [Ti, gi], z = [];
  function ge(g, S) {
    return (
      /*showLoaderButton*/
      g[6] ? 0 : 1
    );
  }
  return M = ge(n), v = z[M] = we[M](n), {
    c() {
      t = F("div"), i = F("div"), o = F("div"), r = F("div"), l = F("div"), P = Xe(p), I = Pe(), b = F("div"), N = F("div"), R && R.c(), de = Pe(), h && h.c(), he = Pe(), D && D.c(), j = Pe(), A = F("button"), v.c(), d(l, "class", "CashierSessionExpirationModalHeaderTitle"), d(r, "class", "CashierSessionExpirationModalHeader"), d(A, "type", "button"), A.disabled = /*showLoaderButton*/
      n[6], d(A, "class", "CashierSessionExpirationButton"), d(N, "class", "CashierSessionExpiration"), d(b, "class", "CashierSessionExpirationModalContainer"), d(b, "part", "CashierSessionExpirationModalContainer"), d(o, "class", "CashierSessionExpirationModalWrapper"), d(o, "part", "CashierSessionExpirationModalWrapper"), d(i, "class", "CashierSessionExpirationModalWindow"), d(i, "part", "CashierSessionExpirationModalWindow"), d(i, "id", "CashierSessionExpirationModal"), Zt(() => (
        /*div5_elementresize_handler*/
        n[23].call(i)
      )), d(t, "part", "CustomStylingContainer");
    },
    m(g, S) {
      ce(g, t, S), x(t, i), x(i, o), x(o, r), x(r, l), x(l, P), x(o, I), x(o, b), x(b, N), R && R.m(N, null), x(N, de), h && h.m(N, null), x(N, he), D && D.m(N, null), x(N, j), x(N, A), z[M].m(A, null), n[22](N), ue = Dn(
        i,
        /*div5_elementresize_handler*/
        n[23].bind(i)
      ), n[24](t), m = !0, w || (G = [
        Wt(
          A,
          "click",
          /*renewSession*/
          n[9]
        ),
        Wt(
          i,
          "click",
          /*outOfModalClick*/
          n[10]
        )
      ], w = !0);
    },
    p(g, S) {
      n = g, (!m || S[0] & /*$_*/
      256) && p !== (p = /*$_*/
      n[8]("sessionExpirationHeader") + "") && je(P, p), Q ? Q.p && (!m || S[0] & /*$$scope*/
      1048576) && Ve(
        Q,
        q,
        n,
        /*$$scope*/
        n[20],
        m ? qe(
          q,
          /*$$scope*/
          n[20],
          S,
          ui
        ) : Ge(
          /*$$scope*/
          n[20]
        ),
        an
      ) : R && R.p && (!m || S[0] & /*assetsurl*/
      8) && R.p(n, m ? S : [-1, -1]), ee ? ee.p && (!m || S[0] & /*$$scope*/
      1048576) && Ve(
        ee,
        fe,
        n,
        /*$$scope*/
        n[20],
        m ? qe(
          fe,
          /*$$scope*/
          n[20],
          S,
          ci
        ) : Ge(
          /*$$scope*/
          n[20]
        ),
        rn
      ) : h && h.p && (!m || S[0] & /*$_*/
      256) && h.p(n, m ? S : [-1, -1]), ne ? ne.p && (!m || S[0] & /*$$scope*/
      1048576) && Ve(
        ne,
        te,
        n,
        /*$$scope*/
        n[20],
        m ? qe(
          te,
          /*$$scope*/
          n[20],
          S,
          li
        ) : Ge(
          /*$$scope*/
          n[20]
        ),
        sn
      ) : D && D.p && (!m || S[0] & /*$_, timeLeft*/
      384) && D.p(n, m ? S : [-1, -1]);
      let me = M;
      M = ge(n), M === me ? z[M].p(n, S) : (cn(), pe(z[me], 1, 1, () => {
        z[me] = null;
      }), un(), v = z[M], v ? v.p(n, S) : (v = z[M] = we[M](n), v.c()), ae(v, 1), v.m(A, null)), (!m || S[0] & /*showLoaderButton*/
      64) && (A.disabled = /*showLoaderButton*/
      n[6]);
    },
    i(g) {
      m || (ae(R, g), ae(h, g), ae(D, g), ae(v), g && Zt(() => {
        m && (_ || (_ = Ht(i, _t, { duration: (
          /*duration*/
          n[2]
        ) }, !0)), _.run(1));
      }), m = !0);
    },
    o(g) {
      pe(R, g), pe(h, g), pe(D, g), pe(v), g && (_ || (_ = Ht(i, _t, { duration: (
        /*duration*/
        n[2]
      ) }, !1)), _.run(0)), m = !1;
    },
    d(g) {
      g && le(t), R && R.d(g), h && h.d(g), D && D.d(g), z[M].d(), n[22](null), ue(), g && _ && _.end(), n[24](null), w = !1, vn(G);
    }
  };
}
function fi(n) {
  let t, i;
  return {
    c() {
      t = F("img"), ft(t.src, i = si) || d(t, "src", i), d(t, "width", "300px"), d(t, "alt", "error");
    },
    m(o, r) {
      ce(o, t, r);
    },
    p: ut,
    d(o) {
      o && le(t);
    }
  };
}
function mi(n) {
  let t, i;
  return {
    c() {
      t = F("img"), ft(t.src, i = `${/*assetsurl*/
      n[3]}/set-timeout-icon.png`) || d(t, "src", i), d(t, "width", "300px"), d(t, "alt", "error");
    },
    m(o, r) {
      ce(o, t, r);
    },
    p(o, r) {
      r[0] & /*assetsurl*/
      8 && !ft(t.src, i = `${/*assetsurl*/
      o[3]}/set-timeout-icon.png`) && d(t, "src", i);
    },
    d(o) {
      o && le(t);
    }
  };
}
function pi(n) {
  let t;
  function i(l, p) {
    return (
      /*assetsurl*/
      l[3] ? mi : fi
    );
  }
  let o = i(n), r = o(n);
  return {
    c() {
      r.c(), t = fn();
    },
    m(l, p) {
      r.m(l, p), ce(l, t, p);
    },
    p(l, p) {
      o === (o = i(l)) && r ? r.p(l, p) : (r.d(1), r = o(l), r && (r.c(), r.m(t.parentNode, t)));
    },
    d(l) {
      l && le(t), r.d(l);
    }
  };
}
function di(n) {
  let t, i = (
    /*$_*/
    n[8]("sessionExpirationTitle") + ""
  ), o;
  return {
    c() {
      t = F("span"), o = Xe(i), d(t, "class", "CashierSessionExpirationTitle");
    },
    m(r, l) {
      ce(r, t, l), x(t, o);
    },
    p(r, l) {
      l[0] & /*$_*/
      256 && i !== (i = /*$_*/
      r[8]("sessionExpirationTitle") + "") && je(o, i);
    },
    d(r) {
      r && le(t);
    }
  };
}
function hi(n) {
  let t, i = nn.sanitize(
    /*$_*/
    n[8]("sessionExpirationGeneralText", { values: { second: (
      /*timeLeft*/
      n[7]
    ) } })
  ) + "";
  return {
    c() {
      t = F("span"), d(t, "class", "CashierSessionExpirationText");
    },
    m(o, r) {
      ce(o, t, r), t.innerHTML = i;
    },
    p(o, r) {
      r[0] & /*$_, timeLeft*/
      384 && i !== (i = nn.sanitize(
        /*$_*/
        o[8]("sessionExpirationGeneralText", { values: { second: (
          /*timeLeft*/
          o[7]
        ) } })
      ) + "") && (t.innerHTML = i);
    },
    d(o) {
      o && le(t);
    }
  };
}
function gi(n) {
  let t;
  const i = (
    /*#slots*/
    n[21].button
  ), o = Je(
    i,
    n,
    /*$$scope*/
    n[20],
    on
  ), r = o || Ei(n);
  return {
    c() {
      r && r.c();
    },
    m(l, p) {
      r && r.m(l, p), t = !0;
    },
    p(l, p) {
      o ? o.p && (!t || p[0] & /*$$scope*/
      1048576) && Ve(
        o,
        i,
        l,
        /*$$scope*/
        l[20],
        t ? qe(
          i,
          /*$$scope*/
          l[20],
          p,
          ai
        ) : Ge(
          /*$$scope*/
          l[20]
        ),
        on
      ) : r && r.p && (!t || p[0] & /*$_*/
      256) && r.p(l, t ? p : [-1, -1]);
    },
    i(l) {
      t || (ae(r, l), t = !0);
    },
    o(l) {
      pe(r, l), t = !1;
    },
    d(l) {
      r && r.d(l);
    }
  };
}
function Ti(n) {
  let t, i, o, r, l, p = (
    /*$_*/
    n[8]("sessionExpirationLoadingButton") + ""
  ), P;
  return {
    c() {
      t = F("div"), i = Bt("svg"), o = Bt("path"), r = Pe(), l = F("span"), P = Xe(p), d(o, "d", "M14.0282 6.58425C13.9037 4.05374 12.3688 1.68916 10.0872 0.61058C7.59818 -0.509483 4.56986 -0.0531603 2.49567 1.68916C0.504443 3.34851 -0.408201 6.04496 0.172573 8.57547C0.711862 11.0645 2.6616 13.0972 5.10915 13.7609C8.0545 14.5906 10.7509 13.1802 12.4103 10.7741C10.9169 12.7653 8.63527 14.0928 6.10476 13.6365C3.57424 13.1802 1.50005 11.2719 0.919281 8.78289C0.297024 6.12793 1.54154 3.34851 3.90612 1.97955C6.35366 0.569097 9.79682 1.10839 11.4147 3.51445C11.8295 4.09522 12.1199 4.80045 12.2444 5.50567C12.3688 6.08644 12.3273 6.7087 12.4103 7.28947C12.4933 7.82876 12.9496 8.53399 13.5718 8.16063C14.1111 7.82876 14.0696 7.12354 14.0282 6.58425C14.0696 6.87464 14.0282 6.41831 14.0282 6.58425Z"), d(o, "fill", "white"), d(i, "class", "CashierSessionExpirationButtonSpinner"), d(i, "xmlns", "http://www.w3.org/2000/svg"), d(i, "width", "15"), d(i, "height", "14"), d(i, "viewBox", "0 0 15 14"), d(i, "fill", "none"), d(l, "class", "CashierSessionExpirationButtonText");
    },
    m(I, b) {
      ce(I, t, b), x(t, i), x(i, o), x(t, r), x(t, l), x(l, P);
    },
    p(I, b) {
      b[0] & /*$_*/
      256 && p !== (p = /*$_*/
      I[8]("sessionExpirationLoadingButton") + "") && je(P, p);
    },
    i: ut,
    o: ut,
    d(I) {
      I && le(t);
    }
  };
}
function Ei(n) {
  let t, i = (
    /*$_*/
    n[8]("sessionExpirationGeneralButton") + ""
  ), o;
  return {
    c() {
      t = F("span"), o = Xe(i), d(t, "class", "CashierSessionExpirationButtonText");
    },
    m(r, l) {
      ce(r, t, l), x(t, o);
    },
    p(r, l) {
      l[0] & /*$_*/
      256 && i !== (i = /*$_*/
      r[8]("sessionExpirationGeneralButton") + "") && je(o, i);
    },
    d(r) {
      r && le(t);
    }
  };
}
function wi(n) {
  let t, i, o = (
    /*show*/
    n[5] && ln(n)
  );
  return {
    c() {
      o && o.c(), t = fn();
    },
    m(r, l) {
      o && o.m(r, l), ce(r, t, l), i = !0;
    },
    p(r, l) {
      /*show*/
      r[5] ? o ? (o.p(r, l), l[0] & /*show*/
      32 && ae(o, 1)) : (o = ln(r), o.c(), ae(o, 1), o.m(t.parentNode, t)) : o && (cn(), pe(o, 1, 1, () => {
        o = null;
      }), un());
    },
    i(r) {
      i || (ae(o), i = !0);
    },
    o(r) {
      pe(o), i = !1;
    },
    d(r) {
      r && le(t), o && o.d(r);
    }
  };
}
const Si = 90;
function yi(n, t, i) {
  let o, r;
  zt(n, Vt, (a) => i(19, o = a)), zt(n, zn, (a) => i(8, r = a));
  let { $$slots: l = {}, $$scope: p } = t;
  Jt.extend(Hn);
  let { clientstyling: P = "" } = t, { clientstylingurl: I = "" } = t, { width: b } = t, { height: N } = t, { duration: de = 200 } = t, { assetsurl: he = "" } = t, { lang: j = "en" } = t, { translationurl: A = "" } = t, { endpoint: M } = t, { currency: v } = t, { customerid: ue } = t, { selectedpaymentmethodname: _ } = t, m, w = !1, G = !1, q, Q, R, fe, ee;
  var h;
  (function(a) {
    a.PlayerSessionIsNotValid = "PlayerSessionIsNotValid", a.Success = "Success", a.JwtTokenError = "JwtTokenError";
  })(h || (h = {}));
  const te = (a) => {
    a.data.type === "StartSessionCountdown" && (fe = a.data.paymentMethodName);
  }, ne = (a) => {
    try {
      return JSON.parse(atob(a.split(".")[1]));
    } catch (T) {
      return null;
    }
  }, D = () => {
    window.postMessage(
      {
        type: "ErrorResponseCode",
        errorResponseCode: ee
      },
      window.location.href
    );
  }, we = (a) => {
    i(5, w = !1);
    const T = ne(a);
    T && (Q = T == null ? void 0 : T.exp, i(7, q = Q), R && clearInterval(R), R = setInterval(
      () => {
        const J = Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3);
        i(7, q = Q - J), q <= Si && i(5, w = !0), J >= Q && (z(), window.postMessage({ type: "SessionExpired" }, window.location.href));
      },
      1e3
    ));
  }, z = () => {
    i(7, q = 0), i(5, w = !1), clearInterval(R);
  }, ge = () => {
    if (G)
      return;
    const a = new URL(`${M}/v1/player/${ue}/payment/GetPaymentMethod`), T = new Headers();
    i(6, G = !0), T.append("accept", "application/json"), T.append("Content-Type", "application/json"), T.append("X-Client-Request-Timestamp", Jt.utc().format("YYYY-MM-DD HH:mm:ss.SSS"));
    const J = {
      method: "POST",
      mode: "cors",
      headers: T,
      body: JSON.stringify({
        PaymentMethodName: fe || _,
        Currency: v,
        XPaymentSessionToken: o
      })
    };
    fetch(a, J).then((H) => H.json()).then((H) => {
      if (H.error) {
        window.postMessage(
          {
            type: "ShowSessionError",
            error: H.error
          },
          window.location.href
        ), z();
        return;
      }
      if (H.ResponseCode === h.PlayerSessionIsNotValid || H.ResponseCode === h.JwtTokenError) {
        ee = H.ResponseCode, z(), D();
        return;
      }
      if (H.ResponseCode !== h.Success) {
        ee = H.ResponseCode, z();
        return;
      }
      H.XPaymentSessionToken && Vt.set(H.XPaymentSessionToken);
    }).finally(() => i(6, G = !1));
  }, g = (a) => {
    const T = a.currentTarget;
    a.target === T && ge();
  }, S = () => {
    fetch(A).then((T) => T.json()).then((T) => {
      Object.keys(T).forEach((J) => {
        Gt(J, T[J]);
      });
    }).catch((T) => {
      console.log(T);
    });
  };
  Object.keys(qt).forEach((a) => {
    Gt(a, qt[a]);
  });
  const me = () => {
    Zn(j);
  }, C = () => {
    let a = document.createElement("style");
    a.innerHTML = P, m.appendChild(a);
  }, Ie = () => {
    let a = new URL(I), T = document.createElement("style");
    fetch(a.href).then((J) => J.text()).then((J) => {
      T.innerHTML = J, setTimeout(
        () => {
          m.appendChild(T);
        },
        1
      );
    });
  };
  Mn(() => (window.addEventListener("message", te, !1), () => {
    window.removeEventListener("message", te);
  })), kn(() => {
    clearInterval(R);
  });
  function O(a) {
    Ft[a ? "unshift" : "push"](() => {
      m = a, i(4, m);
    });
  }
  function Ue() {
    b = this.clientWidth, N = this.clientHeight, i(0, b), i(1, N);
  }
  function y(a) {
    Ft[a ? "unshift" : "push"](() => {
      m = a, i(4, m);
    });
  }
  return n.$$set = (a) => {
    "clientstyling" in a && i(11, P = a.clientstyling), "clientstylingurl" in a && i(12, I = a.clientstylingurl), "width" in a && i(0, b = a.width), "height" in a && i(1, N = a.height), "duration" in a && i(2, de = a.duration), "assetsurl" in a && i(3, he = a.assetsurl), "lang" in a && i(13, j = a.lang), "translationurl" in a && i(14, A = a.translationurl), "endpoint" in a && i(15, M = a.endpoint), "currency" in a && i(16, v = a.currency), "customerid" in a && i(17, ue = a.customerid), "selectedpaymentmethodname" in a && i(18, _ = a.selectedpaymentmethodname), "$$scope" in a && i(20, p = a.$$scope);
  }, n.$$.update = () => {
    n.$$.dirty[0] & /*$xPaymentSessionToken*/
    524288 && we(o), n.$$.dirty[0] & /*lang*/
    8192 && j && me(), n.$$.dirty[0] & /*clientstyling, customStylingContainer*/
    2064 && P && m && C(), n.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
    4112 && I && m && Ie(), n.$$.dirty[0] & /*translationurl*/
    16384 && A && S();
  }, [
    b,
    N,
    de,
    he,
    m,
    w,
    G,
    q,
    r,
    ge,
    g,
    P,
    I,
    j,
    A,
    M,
    v,
    ue,
    _,
    o,
    p,
    l,
    O,
    Ue,
    y
  ];
}
class bi extends On {
  constructor(t) {
    super(), Rn(
      this,
      t,
      yi,
      wi,
      xn,
      {
        clientstyling: 11,
        clientstylingurl: 12,
        width: 0,
        height: 1,
        duration: 2,
        assetsurl: 3,
        lang: 13,
        translationurl: 14,
        endpoint: 15,
        currency: 16,
        customerid: 17,
        selectedpaymentmethodname: 18
      },
      ri,
      [-1, -1]
    );
  }
  get clientstyling() {
    return this.$$.ctx[11];
  }
  set clientstyling(t) {
    this.$$set({ clientstyling: t }), X();
  }
  get clientstylingurl() {
    return this.$$.ctx[12];
  }
  set clientstylingurl(t) {
    this.$$set({ clientstylingurl: t }), X();
  }
  get width() {
    return this.$$.ctx[0];
  }
  set width(t) {
    this.$$set({ width: t }), X();
  }
  get height() {
    return this.$$.ctx[1];
  }
  set height(t) {
    this.$$set({ height: t }), X();
  }
  get duration() {
    return this.$$.ctx[2];
  }
  set duration(t) {
    this.$$set({ duration: t }), X();
  }
  get assetsurl() {
    return this.$$.ctx[3];
  }
  set assetsurl(t) {
    this.$$set({ assetsurl: t }), X();
  }
  get lang() {
    return this.$$.ctx[13];
  }
  set lang(t) {
    this.$$set({ lang: t }), X();
  }
  get translationurl() {
    return this.$$.ctx[14];
  }
  set translationurl(t) {
    this.$$set({ translationurl: t }), X();
  }
  get endpoint() {
    return this.$$.ctx[15];
  }
  set endpoint(t) {
    this.$$set({ endpoint: t }), X();
  }
  get currency() {
    return this.$$.ctx[16];
  }
  set currency(t) {
    this.$$set({ currency: t }), X();
  }
  get customerid() {
    return this.$$.ctx[17];
  }
  set customerid(t) {
    this.$$set({ customerid: t }), X();
  }
  get selectedpaymentmethodname() {
    return this.$$.ctx[18];
  }
  set selectedpaymentmethodname(t) {
    this.$$set({ selectedpaymentmethodname: t }), X();
  }
}
Ln(bi, { clientstyling: {}, clientstylingurl: {}, width: {}, height: {}, duration: {}, assetsurl: {}, lang: {}, translationurl: {}, endpoint: {}, currency: {}, customerid: {}, selectedpaymentmethodname: {} }, ["icon", "title", "text", "button"], [], !0);
export {
  bi as default
};
