import { S as An, b as Cn, s as On, f as X, c as Rn, e as ue, t as de, g as ce, C as an, k as ln, l as fe, w as cn, v as xn, H as Nn, V as Mn, d as Je, r as kn, T as zt, F as Ht, x as je, u as Ve, h as Ge, j as qe, m as x, U as vn, A as Zt, o as F, y as Xe, p as Pe, q as p, z as Wt, n as ut, N as Ft, B as ft, D as Dn } from "./CashierConfirmModal-CtWSrqbM.js";
import { f as Bt } from "./CashierModal-DV8aj-PX.js";
import { a as Ln, i as Pn, $ as In, b as Un } from "./CashierError-Bxt3Xw3q.js";
import { d as _t, u as zn } from "./CashierMethodDetails-B8L97B6K.js";
function Jt(n, t) {
  Ln(n, t);
}
function Hn(n) {
  Pn({
    fallbackLocale: "en"
  }), In.set(n);
}
const Vt = {
  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: un,
  setPrototypeOf: Gt,
  isFrozen: Zn,
  getPrototypeOf: Wn,
  getOwnPropertyDescriptor: Fn
} = Object;
let {
  freeze: B,
  seal: K,
  create: fn
} = Object, {
  apply: mt,
  construct: pt
} = typeof Reflect < "u" && 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 = G(Array.prototype.forEach), qt = G(Array.prototype.pop), Me = G(Array.prototype.push), Ye = G(String.prototype.toLowerCase), st = G(String.prototype.toString), Yt = G(String.prototype.match), ke = G(String.prototype.replace), Bn = G(String.prototype.indexOf), _n = G(String.prototype.trim), $ = G(Object.prototype.hasOwnProperty), W = G(RegExp.prototype.test), ve = Jn(TypeError);
function G(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 Jn(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;
  Gt && Gt(n, null);
  let o = t.length;
  for (; o--; ) {
    let r = t[o];
    if (typeof r == "string") {
      const l = i(r);
      l !== r && (Zn(t) || (t[o] = l), r = l);
    }
    n[r] = !0;
  }
  return n;
}
function Vn(n) {
  for (let t = 0; t < n.length; t++)
    $(n, t) || (n[t] = null);
  return n;
}
function we(n) {
  const t = fn(null);
  for (const [i, o] of un(n))
    $(n, i) && (Array.isArray(o) ? t[i] = Vn(o) : o && typeof o == "object" && o.constructor === Object ? t[i] = we(o) : t[i] = o);
  return t;
}
function De(n, t) {
  for (; n !== null; ) {
    const o = Fn(n, t);
    if (o) {
      if (o.get)
        return G(o.get);
      if (typeof o.value == "function")
        return G(o.value);
    }
    n = Wn(n);
  }
  function i() {
    return null;
  }
  return i;
}
const jt = 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"]), Gn = 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"]), qn = B(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Xt = B(["#text"]), Kt = 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"]), Qt = 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"]), Yn = K(/\{\{[\w\W]*|[\w\W]*\}\}/gm), jn = K(/<%[\w\W]*|[\w\W]*%>/gm), Xn = K(/\${[\w\W]*}/gm), Kn = K(/^data-[\-\w.\u00B7-\uFFFF]/), Qn = K(/^aria-[\-\w]+$/), mn = K(
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
  // eslint-disable-line no-useless-escape
), $n = K(/^(?:\w+script|data):/i), ei = K(
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
  // eslint-disable-line no-control-regex
), pn = K(/^html$/i), ti = K(/^[a-z][.\w]*(-[.\w]+)+$/i);
var $t = /* @__PURE__ */ Object.freeze({
  __proto__: null,
  MUSTACHE_EXPR: Yn,
  ERB_EXPR: jn,
  TMPLIT_EXPR: Xn,
  DATA_ATTR: Kn,
  ARIA_ATTR: Qn,
  IS_ALLOWED_URI: mn,
  IS_SCRIPT_OR_DATA: $n,
  ATTR_WHITESPACE: ei,
  DOCTYPE_NAME: pn,
  CUSTOM_ELEMENT: ti
});
const Le = {
  element: 1,
  text: 3,
  // Deprecated
  progressingInstruction: 7,
  comment: 8,
  document: 9
}, ni = function() {
  return typeof window > "u" ? null : window;
}, ii = 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(m) {
        return m;
      },
      createScriptURL(m) {
        return m;
      }
    });
  } catch {
    return console.warn("TrustedTypes policy " + l + " could not be created."), null;
  }
};
function dn() {
  let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ni();
  const t = (u) => dn(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: m,
    Node: L,
    Element: P,
    NodeFilter: b,
    NamedNodeMap: I = n.NamedNodeMap || n.MozNamedAttrMap,
    HTMLFormElement: he,
    DOMParser: re,
    trustedTypes: q
  } = n, R = P.prototype, N = De(R, "cloneNode"), k = De(R, "remove"), me = De(R, "nextSibling"), A = De(R, "childNodes"), d = De(R, "parentNode");
  if (typeof m == "function") {
    const u = i.createElement("template");
    u.content && u.content.ownerDocument && (i = u.content.ownerDocument);
  }
  let E, _ = "";
  const {
    implementation: Y,
    createNodeIterator: j,
    createDocumentFragment: U,
    getElementsByTagName: ee
  } = i, {
    importNode: te
  } = o;
  let h = {};
  t.isSupported = typeof un == "function" && typeof d == "function" && Y && Y.createHTMLDocument !== void 0;
  const {
    MUSTACHE_EXPR: ne,
    ERB_EXPR: ie,
    TMPLIT_EXPR: v,
    DATA_ATTR: ge,
    ARIA_ATTR: H,
    IS_SCRIPT_OR_DATA: Te,
    ATTR_WHITESPACE: g,
    CUSTOM_ELEMENT: S
  } = $t;
  let {
    IS_ALLOWED_URI: pe
  } = $t, C = null;
  const Ie = f({}, [...jt, ...rt, ...at, ...lt, ...Xt]);
  let O = null;
  const Ue = f({}, [...Kt, ...ct, ...Qt, ..._e]);
  let y = Object.seal(fn(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, w = null, Q = !0, J = !0, dt = !1, ht = !0, Se = !1, Ke = !0, Ee = !1, Qe = !1, $e = !1, ye = !1, ze = !1, He = !1, gt = !0, Tt = !1;
  const hn = "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", ae = "http://www.w3.org/1999/xhtml";
  let Ce = ae, nt = !1, it = null;
  const gn = f({}, [Ze, We, ae], st);
  let xe = null;
  const Tn = ["application/xhtml+xml", "text/html"], En = "text/html";
  let M = null, Oe = null;
  const wn = 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 = we(e), xe = // eslint-disable-next-line unicorn/prefer-includes
      Tn.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? En : e.PARSER_MEDIA_TYPE, M = xe === "application/xhtml+xml" ? st : Ye, C = $(e, "ALLOWED_TAGS") ? f({}, e.ALLOWED_TAGS, M) : Ie, O = $(e, "ALLOWED_ATTR") ? f({}, e.ALLOWED_ATTR, M) : Ue, it = $(e, "ALLOWED_NAMESPACES") ? f({}, e.ALLOWED_NAMESPACES, st) : gn, tt = $(e, "ADD_URI_SAFE_ATTR") ? f(
        we(yt),
        // eslint-disable-line indent
        e.ADD_URI_SAFE_ATTR,
        // eslint-disable-line indent
        M
        // eslint-disable-line indent
      ) : yt, wt = $(e, "ADD_DATA_URI_TAGS") ? f(
        we(St),
        // eslint-disable-line indent
        e.ADD_DATA_URI_TAGS,
        // eslint-disable-line indent
        M
        // eslint-disable-line indent
      ) : St, Ae = $(e, "FORBID_CONTENTS") ? f({}, e.FORBID_CONTENTS, M) : Et, a = $(e, "FORBID_TAGS") ? f({}, e.FORBID_TAGS, M) : {}, w = $(e, "FORBID_ATTR") ? f({}, e.FORBID_ATTR, M) : {}, be = $(e, "USE_PROFILES") ? e.USE_PROFILES : !1, Q = e.ALLOW_ARIA_ATTR !== !1, J = 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, Ee = 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, pe = e.ALLOWED_URI_REGEXP || mn, Ce = e.NAMESPACE || ae, 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 && (J = !1), ze && (ye = !0), be && (C = f({}, Xt), O = [], be.html === !0 && (f(C, jt), f(O, Kt)), 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, Qt), f(O, _e))), e.ADD_TAGS && (C === Ie && (C = we(C)), f(C, e.ADD_TAGS, M)), e.ADD_ATTR && (O === Ue && (O = we(O)), f(O, e.ADD_ATTR, M)), e.ADD_URI_SAFE_ATTR && f(tt, e.ADD_URI_SAFE_ATTR, M), e.FORBID_CONTENTS && (Ae === Et && (Ae = we(Ae)), f(Ae, e.FORBID_CONTENTS, M)), et && (C["#text"] = !0), Ee && 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.');
        E = e.TRUSTED_TYPES_POLICY, _ = E.createHTML("");
      } else
        E === void 0 && (E = ii(q, r)), E !== null && typeof _ == "string" && (_ = E.createHTML(""));
      B && B(e), Oe = e;
    }
  }, At = f({}, ["mi", "mo", "mn", "ms", "mtext"]), Ct = f({}, ["foreignobject", "annotation-xml"]), Sn = f({}, ["title", "style", "font", "a", "script"]), Ot = f({}, [...rt, ...at, ...Gn]), Rt = f({}, [...lt, ...qn]), yn = function(e) {
    let s = d(e);
    (!s || !s.tagName) && (s = {
      namespaceURI: Ce,
      tagName: "template"
    });
    const c = Ye(e.tagName), T = Ye(s.tagName);
    return it[e.namespaceURI] ? e.namespaceURI === We ? s.namespaceURI === ae ? c === "svg" : s.namespaceURI === Ze ? c === "svg" && (T === "annotation-xml" || At[T]) : !!Ot[c] : e.namespaceURI === Ze ? s.namespaceURI === ae ? c === "math" : s.namespaceURI === We ? c === "math" && Ct[T] : !!Rt[c] : e.namespaceURI === ae ? s.namespaceURI === We && !Ct[T] || s.namespaceURI === Ze && !At[T] ? !1 : !Rt[c] && (Sn[c] || !Ot[c]) : !!(xe === "application/xhtml+xml" && it[e.namespaceURI]) : !1;
  }, oe = function(e) {
    Me(t.removed, {
      element: e
    });
    try {
      d(e).removeChild(e);
    } catch {
      k(e);
    }
  }, Fe = function(e, s) {
    try {
      Me(t.removed, {
        attribute: s.getAttributeNode(e),
        from: s
      });
    } catch {
      Me(t.removed, {
        attribute: null,
        from: s
      });
    }
    if (s.removeAttribute(e), e === "is" && !O[e])
      if (ye || ze)
        try {
          oe(s);
        } catch {
        }
      else
        try {
          s.setAttribute(e, "");
        } catch {
        }
  }, xt = function(e) {
    let s = null, c = null;
    if ($e)
      e = "<remove></remove>" + e;
    else {
      const D = Yt(e, /^[\r\n\t ]+/);
      c = D && D[0];
    }
    xe === "application/xhtml+xml" && Ce === ae && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
    const T = E ? E.createHTML(e) : e;
    if (Ce === ae)
      try {
        s = new re().parseFromString(T, xe);
      } catch {
      }
    if (!s || !s.documentElement) {
      s = Y.createDocument(Ce, "template", null);
      try {
        s.documentElement.innerHTML = nt ? _ : T;
      } catch {
      }
    }
    const z = s.body || s.documentElement;
    return e && c && z.insertBefore(i.createTextNode(c), z.childNodes[0] || null), Ce === ae ? ee.call(s, Ee ? "html" : "body")[0] : Ee ? s.documentElement : z;
  }, Nt = function(e) {
    return j.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 he && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof I) || 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 L == "function" && e instanceof L;
  }, le = function(e, s, c) {
    h[e] && Be(h[e], (T) => {
      T.call(t, s, c, Oe);
    });
  }, vt = function(e) {
    let s = null;
    if (le("beforeSanitizeElements", e, null), Mt(e))
      return oe(e), !0;
    const c = M(e.nodeName);
    if (le("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 oe(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 T = d(e) || e.parentNode, z = A(e) || e.childNodes;
        if (z && T) {
          const D = z.length;
          for (let V = D - 1; V >= 0; --V) {
            const se = N(z[V], !0);
            se.__removalCount = (e.__removalCount || 0) + 1, T.insertBefore(se, me(e));
          }
        }
      }
      return oe(e), !0;
    }
    return e instanceof P && !yn(e) || (c === "noscript" || c === "noembed" || c === "noframes") && W(/<\/no(script|embed|frames)/i, e.innerHTML) ? (oe(e), !0) : (Se && e.nodeType === Le.text && (s = e.textContent, Be([ne, ie, v], (T) => {
      s = ke(s, T, " ");
    }), e.textContent !== s && (Me(t.removed, {
      element: e.cloneNode()
    }), e.textContent = s)), le("afterSanitizeElements", e, null), !1);
  }, Dt = function(e, s, c) {
    if (gt && (s === "id" || s === "name") && (c in i || c in wn))
      return !1;
    if (!(J && !w[s] && W(ge, s))) {
      if (!(Q && W(H, s))) {
        if (!O[s] || w[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(pe, ke(c, g, ""))) {
            if (!((s === "src" || s === "xlink:href" || s === "href") && e !== "script" && Bn(c, "data:") === 0 && wt[e])) {
              if (!(dt && !W(Te, ke(c, g, "")))) {
                if (c)
                  return !1;
              }
            }
          }
        }
      }
    }
    return !0;
  }, Lt = function(e) {
    return e !== "annotation-xml" && Yt(e, S);
  }, Pt = function(e) {
    le("beforeSanitizeAttributes", e, null);
    const {
      attributes: s
    } = e;
    if (!s)
      return;
    const c = {
      attrName: "",
      attrValue: "",
      keepAttr: !0,
      allowedAttributes: O
    };
    let T = s.length;
    for (; T--; ) {
      const z = s[T], {
        name: D,
        namespaceURI: V,
        value: se
      } = z, Ne = M(D);
      let Z = D === "value" ? se : _n(se);
      if (c.attrName = Ne, c.attrValue = Z, c.keepAttr = !0, c.forceKeepAttr = void 0, le("uponSanitizeAttribute", e, c), Z = c.attrValue, Ke && W(/((--!?|])>)|<\/(style|title)/i, Z)) {
        Fe(D, e);
        continue;
      }
      if (c.forceKeepAttr || (Fe(D, e), !c.keepAttr))
        continue;
      if (!ht && W(/\/>/i, Z)) {
        Fe(D, e);
        continue;
      }
      Se && Be([ne, ie, v], (Ut) => {
        Z = ke(Z, Ut, " ");
      });
      const It = M(e.nodeName);
      if (Dt(It, Ne, Z)) {
        if (Tt && (Ne === "id" || Ne === "name") && (Fe(D, e), Z = hn + Z), E && typeof q == "object" && typeof q.getAttributeType == "function" && !V)
          switch (q.getAttributeType(It, Ne)) {
            case "TrustedHTML": {
              Z = E.createHTML(Z);
              break;
            }
            case "TrustedScriptURL": {
              Z = E.createScriptURL(Z);
              break;
            }
          }
        try {
          V ? e.setAttributeNS(V, D, Z) : e.setAttribute(D, Z), Mt(e) ? oe(e) : qt(t.removed);
        } catch {
        }
      }
    }
    le("afterSanitizeAttributes", e, null);
  }, bn = function u(e) {
    let s = null;
    const c = Nt(e);
    for (le("beforeSanitizeShadowDOM", e, null); s = c.nextNode(); )
      le("uponSanitizeShadowNode", s, null), !vt(s) && (s.content instanceof l && u(s.content), Pt(s));
    le("afterSanitizeShadowDOM", e, null);
  };
  return t.sanitize = function(u) {
    let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = null, c = null, T = null, z = 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 se = M(u.nodeName);
        if (!C[se] || a[se])
          throw ve("root node is forbidden and cannot be sanitized in-place");
      }
    } else if (u instanceof L)
      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 && !Ee && // eslint-disable-next-line unicorn/prefer-includes
      u.indexOf("<") === -1)
        return E && He ? E.createHTML(u) : u;
      if (s = xt(u), !s)
        return ye ? null : He ? _ : "";
    }
    s && $e && oe(s.firstChild);
    const D = Nt(Re ? u : s);
    for (; T = D.nextNode(); )
      vt(T) || (T.content instanceof l && bn(T.content), Pt(T));
    if (Re)
      return u;
    if (ye) {
      if (ze)
        for (z = U.call(s.ownerDocument); s.firstChild; )
          z.appendChild(s.firstChild);
      else
        z = s;
      return (O.shadowroot || O.shadowrootmode) && (z = te.call(o, z, !0)), z;
    }
    let V = Ee ? s.outerHTML : s.innerHTML;
    return Ee && C["!doctype"] && s.ownerDocument && s.ownerDocument.doctype && s.ownerDocument.doctype.name && W(pn, s.ownerDocument.doctype.name) && (V = "<!DOCTYPE " + s.ownerDocument.doctype.name + `>
` + V), Se && Be([ne, ie, v], (se) => {
      V = ke(V, se, " ");
    }), E && He ? E.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 = M(u), T = M(e);
    return Dt(c, T, 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 qt(h[u]);
  }, t.removeHooks = function(u) {
    h[u] && (h[u] = []);
  }, t.removeAllHooks = function() {
    h = {};
  }, t;
}
var en = dn();
const oi = "data:image/png;base64, ";
function si(n) {
  Rn(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 ri = (n) => ({}), tn = (n) => ({}), ai = (n) => ({}), nn = (n) => ({}), li = (n) => ({}), on = (n) => ({}), ci = (n) => ({}), sn = (n) => ({ class: "CashierSessionExpirationIcon" });
function rn(n) {
  let t, i, o, r, l, m = (
    /*$_*/
    n[8]("sessionExpirationHeader") + ""
  ), L, P, b, I, he, re, q, R, N, k, me, A, d, E, _;
  const Y = (
    /*#slots*/
    n[20].icon
  ), j = Je(
    Y,
    n,
    /*$$scope*/
    n[19],
    sn
  ), U = j || mi(n), ee = (
    /*#slots*/
    n[20].title
  ), te = Je(
    ee,
    n,
    /*$$scope*/
    n[19],
    on
  ), h = te || pi(n), ne = (
    /*#slots*/
    n[20].text
  ), ie = Je(
    ne,
    n,
    /*$$scope*/
    n[19],
    nn
  ), v = ie || di(n), ge = [gi, hi], H = [];
  function Te(g, S) {
    return (
      /*showLoaderButton*/
      g[6] ? 0 : 1
    );
  }
  return N = Te(n), k = H[N] = ge[N](n), {
    c() {
      t = F("div"), i = F("div"), o = F("div"), r = F("div"), l = F("div"), L = Xe(m), P = Pe(), b = F("div"), I = F("div"), U && U.c(), he = Pe(), h && h.c(), re = Pe(), v && v.c(), q = Pe(), R = F("button"), k.c(), p(l, "class", "CashierSessionExpirationModalHeaderTitle"), p(r, "class", "CashierSessionExpirationModalHeader"), p(R, "type", "button"), R.disabled = /*showLoaderButton*/
      n[6], p(R, "class", "CashierSessionExpirationButton"), p(I, "class", "CashierSessionExpiration"), p(b, "class", "CashierSessionExpirationModalContainer"), p(b, "part", "CashierSessionExpirationModalContainer"), p(o, "class", "CashierSessionExpirationModalWrapper"), p(o, "part", "CashierSessionExpirationModalWrapper"), p(i, "class", "CashierSessionExpirationModalWindow"), p(i, "part", "CashierSessionExpirationModalWindow"), p(i, "id", "CashierSessionExpirationModal"), Ht(() => (
        /*div5_elementresize_handler*/
        n[22].call(i)
      )), p(t, "part", "CustomStylingContainer");
    },
    m(g, S) {
      fe(g, t, S), x(t, i), x(i, o), x(o, r), x(r, l), x(l, L), x(o, P), x(o, b), x(b, I), U && U.m(I, null), x(I, he), h && h.m(I, null), x(I, re), v && v.m(I, null), x(I, q), x(I, R), H[N].m(R, null), n[21](I), me = vn(
        i,
        /*div5_elementresize_handler*/
        n[22].bind(i)
      ), n[23](t), d = !0, E || (_ = [
        Zt(
          R,
          "click",
          /*renewSession*/
          n[9]
        ),
        Zt(
          i,
          "click",
          /*outOfModalClick*/
          n[10]
        )
      ], E = !0);
    },
    p(g, S) {
      n = g, (!d || S[0] & /*$_*/
      256) && m !== (m = /*$_*/
      n[8]("sessionExpirationHeader") + "") && je(L, m), j ? j.p && (!d || S[0] & /*$$scope*/
      524288) && Ve(
        j,
        Y,
        n,
        /*$$scope*/
        n[19],
        d ? qe(
          Y,
          /*$$scope*/
          n[19],
          S,
          ci
        ) : Ge(
          /*$$scope*/
          n[19]
        ),
        sn
      ) : U && U.p && (!d || S[0] & /*assetsurl*/
      8) && U.p(n, d ? S : [-1, -1]), te ? te.p && (!d || S[0] & /*$$scope*/
      524288) && Ve(
        te,
        ee,
        n,
        /*$$scope*/
        n[19],
        d ? qe(
          ee,
          /*$$scope*/
          n[19],
          S,
          li
        ) : Ge(
          /*$$scope*/
          n[19]
        ),
        on
      ) : h && h.p && (!d || S[0] & /*$_*/
      256) && h.p(n, d ? S : [-1, -1]), ie ? ie.p && (!d || S[0] & /*$$scope*/
      524288) && Ve(
        ie,
        ne,
        n,
        /*$$scope*/
        n[19],
        d ? qe(
          ne,
          /*$$scope*/
          n[19],
          S,
          ai
        ) : Ge(
          /*$$scope*/
          n[19]
        ),
        nn
      ) : v && v.p && (!d || S[0] & /*$_, timeLeft*/
      384) && v.p(n, d ? S : [-1, -1]);
      let pe = N;
      N = Te(n), N === pe ? H[N].p(n, S) : (an(), de(H[pe], 1, 1, () => {
        H[pe] = null;
      }), ln(), k = H[N], k ? k.p(n, S) : (k = H[N] = ge[N](n), k.c()), ce(k, 1), k.m(R, null)), (!d || S[0] & /*showLoaderButton*/
      64) && (R.disabled = /*showLoaderButton*/
      n[6]);
    },
    i(g) {
      d || (ce(U, g), ce(h, g), ce(v, g), ce(k), g && Ht(() => {
        d && (A || (A = zt(i, Bt, { duration: (
          /*duration*/
          n[2]
        ) }, !0)), A.run(1));
      }), d = !0);
    },
    o(g) {
      de(U, g), de(h, g), de(v, g), de(k), g && (A || (A = zt(i, Bt, { duration: (
        /*duration*/
        n[2]
      ) }, !1)), A.run(0)), d = !1;
    },
    d(g) {
      g && ue(t), U && U.d(g), h && h.d(g), v && v.d(g), H[N].d(), n[21](null), me(), g && A && A.end(), n[23](null), E = !1, kn(_);
    }
  };
}
function ui(n) {
  let t, i;
  return {
    c() {
      t = F("img"), ft(t.src, i = oi) || p(t, "src", i), p(t, "width", "300px"), p(t, "alt", "error");
    },
    m(o, r) {
      fe(o, t, r);
    },
    p: ut,
    d(o) {
      o && ue(t);
    }
  };
}
function fi(n) {
  let t, i;
  return {
    c() {
      t = F("img"), ft(t.src, i = `${/*assetsurl*/
      n[3]}/set-timeout-icon.png`) || p(t, "src", i), p(t, "width", "300px"), p(t, "alt", "error");
    },
    m(o, r) {
      fe(o, t, r);
    },
    p(o, r) {
      r[0] & /*assetsurl*/
      8 && !ft(t.src, i = `${/*assetsurl*/
      o[3]}/set-timeout-icon.png`) && p(t, "src", i);
    },
    d(o) {
      o && ue(t);
    }
  };
}
function mi(n) {
  let t;
  function i(l, m) {
    return (
      /*assetsurl*/
      l[3] ? fi : ui
    );
  }
  let o = i(n), r = o(n);
  return {
    c() {
      r.c(), t = cn();
    },
    m(l, m) {
      r.m(l, m), fe(l, t, m);
    },
    p(l, m) {
      o === (o = i(l)) && r ? r.p(l, m) : (r.d(1), r = o(l), r && (r.c(), r.m(t.parentNode, t)));
    },
    d(l) {
      l && ue(t), r.d(l);
    }
  };
}
function pi(n) {
  let t, i = (
    /*$_*/
    n[8]("sessionExpirationTitle") + ""
  ), o;
  return {
    c() {
      t = F("span"), o = Xe(i), p(t, "class", "CashierSessionExpirationTitle");
    },
    m(r, l) {
      fe(r, t, l), x(t, o);
    },
    p(r, l) {
      l[0] & /*$_*/
      256 && i !== (i = /*$_*/
      r[8]("sessionExpirationTitle") + "") && je(o, i);
    },
    d(r) {
      r && ue(t);
    }
  };
}
function di(n) {
  let t, i = en.sanitize(
    /*$_*/
    n[8]("sessionExpirationGeneralText", { values: { second: (
      /*timeLeft*/
      n[7]
    ) } })
  ) + "";
  return {
    c() {
      t = F("span"), p(t, "class", "CashierSessionExpirationText");
    },
    m(o, r) {
      fe(o, t, r), t.innerHTML = i;
    },
    p(o, r) {
      r[0] & /*$_, timeLeft*/
      384 && i !== (i = en.sanitize(
        /*$_*/
        o[8]("sessionExpirationGeneralText", { values: { second: (
          /*timeLeft*/
          o[7]
        ) } })
      ) + "") && (t.innerHTML = i);
    },
    d(o) {
      o && ue(t);
    }
  };
}
function hi(n) {
  let t;
  const i = (
    /*#slots*/
    n[20].button
  ), o = Je(
    i,
    n,
    /*$$scope*/
    n[19],
    tn
  ), r = o || Ti(n);
  return {
    c() {
      r && r.c();
    },
    m(l, m) {
      r && r.m(l, m), t = !0;
    },
    p(l, m) {
      o ? o.p && (!t || m[0] & /*$$scope*/
      524288) && Ve(
        o,
        i,
        l,
        /*$$scope*/
        l[19],
        t ? qe(
          i,
          /*$$scope*/
          l[19],
          m,
          ri
        ) : Ge(
          /*$$scope*/
          l[19]
        ),
        tn
      ) : r && r.p && (!t || m[0] & /*$_*/
      256) && r.p(l, t ? m : [-1, -1]);
    },
    i(l) {
      t || (ce(r, l), t = !0);
    },
    o(l) {
      de(r, l), t = !1;
    },
    d(l) {
      r && r.d(l);
    }
  };
}
function gi(n) {
  let t, i, o, r, l, m = (
    /*$_*/
    n[8]("sessionExpirationLoadingButton") + ""
  ), L;
  return {
    c() {
      t = F("div"), i = Ft("svg"), o = Ft("path"), r = Pe(), l = F("span"), L = Xe(m), p(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"), p(o, "fill", "white"), p(i, "class", "CashierSessionExpirationButtonSpinner"), p(i, "xmlns", "http://www.w3.org/2000/svg"), p(i, "width", "15"), p(i, "height", "14"), p(i, "viewBox", "0 0 15 14"), p(i, "fill", "none"), p(l, "class", "CashierSessionExpirationButtonText");
    },
    m(P, b) {
      fe(P, t, b), x(t, i), x(i, o), x(t, r), x(t, l), x(l, L);
    },
    p(P, b) {
      b[0] & /*$_*/
      256 && m !== (m = /*$_*/
      P[8]("sessionExpirationLoadingButton") + "") && je(L, m);
    },
    i: ut,
    o: ut,
    d(P) {
      P && ue(t);
    }
  };
}
function Ti(n) {
  let t, i = (
    /*$_*/
    n[8]("sessionExpirationGeneralButton") + ""
  ), o;
  return {
    c() {
      t = F("span"), o = Xe(i), p(t, "class", "CashierSessionExpirationButtonText");
    },
    m(r, l) {
      fe(r, t, l), x(t, o);
    },
    p(r, l) {
      l[0] & /*$_*/
      256 && i !== (i = /*$_*/
      r[8]("sessionExpirationGeneralButton") + "") && je(o, i);
    },
    d(r) {
      r && ue(t);
    }
  };
}
function Ei(n) {
  let t, i, o = (
    /*show*/
    n[5] && rn(n)
  );
  return {
    c() {
      o && o.c(), t = cn();
    },
    m(r, l) {
      o && o.m(r, l), fe(r, t, l), i = !0;
    },
    p(r, l) {
      /*show*/
      r[5] ? o ? (o.p(r, l), l[0] & /*show*/
      32 && ce(o, 1)) : (o = rn(r), o.c(), ce(o, 1), o.m(t.parentNode, t)) : o && (an(), de(o, 1, 1, () => {
        o = null;
      }), ln());
    },
    i(r) {
      i || (ce(o), i = !0);
    },
    o(r) {
      de(o), i = !1;
    },
    d(r) {
      r && ue(t), o && o.d(r);
    }
  };
}
const wi = 90;
function Si(n, t, i) {
  let o;
  xn(n, Un, (a) => i(8, o = a));
  let { $$slots: r = {}, $$scope: l } = t;
  _t.extend(zn);
  let { clientstyling: m = "" } = t, { clientstylingurl: L = "" } = t, { width: P } = t, { height: b } = t, { duration: I = 200 } = t, { assetsurl: he = "" } = t, { lang: re = "en" } = t, { translationurl: q = "" } = t, { endpoint: R } = t, { currency: N } = t, { customerid: k } = t, { selectedpaymentmethodname: me } = t, A, d = !1, E = !1, _, Y, j, U, ee, te;
  var h;
  (function(a) {
    a.PlayerSessionIsNotValid = "PlayerSessionIsNotValid", a.Success = "Success", a.JwtTokenError = "JwtTokenError";
  })(h || (h = {}));
  const ne = (a) => {
    a.data.type === "StartSessionCountdown" && (ee = a.data.xPaymentSessionToken, U = a.data.paymentMethodName, ge());
  }, ie = (a) => {
    try {
      return JSON.parse(atob(a.split(".")[1]));
    } catch {
      return null;
    }
  }, v = () => {
    window.postMessage(
      {
        type: "ErrorResponseCode",
        errorResponseCode: te
      },
      window.location.href
    );
  }, ge = () => {
    i(5, d = !1);
    const a = ie(ee);
    a && (Y = a?.exp, i(7, _ = Y), j && clearInterval(j), j = setInterval(
      () => {
        const w = Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3);
        i(7, _ = Y - w), _ <= wi && i(5, d = !0), w >= Y && (H(), window.postMessage({ type: "SessionExpired" }, window.location.href));
      },
      1e3
    ));
  }, H = () => {
    i(7, _ = 0), i(5, d = !1), clearInterval(j);
  }, Te = () => {
    if (E)
      return;
    const a = new URL(`${R}/v1/player/${k}/payment/GetPaymentMethod`), w = new Headers();
    i(6, E = !0), w.append("accept", "application/json"), w.append("Content-Type", "application/json"), w.append("X-Client-Request-Timestamp", _t.utc().format("YYYY-MM-DD HH:mm:ss.SSS"));
    const Q = {
      method: "POST",
      mode: "cors",
      headers: w,
      body: JSON.stringify({
        PaymentMethodName: U || me,
        Currency: N,
        XPaymentSessionToken: ee
      })
    };
    fetch(a, Q).then((J) => J.json()).then((J) => {
      if (J.error) {
        window.postMessage(
          {
            type: "ShowSessionError",
            error: J.error
          },
          window.location.href
        ), H();
        return;
      }
      if (J.ResponseCode === h.PlayerSessionIsNotValid || J.ResponseCode === h.JwtTokenError) {
        te = J.ResponseCode, H(), v();
        return;
      }
      if (J.ResponseCode !== h.Success) {
        te = J.ResponseCode, H();
        return;
      }
      ee = J.XPaymentSessionToken, ge();
    }).finally(() => i(6, E = !1));
  }, g = (a) => {
    const w = a.currentTarget;
    a.target === w && Te();
  }, S = () => {
    fetch(q).then((w) => w.json()).then((w) => {
      Object.keys(w).forEach((Q) => {
        Jt(Q, w[Q]);
      });
    }).catch((w) => {
      console.log(w);
    });
  };
  Object.keys(Vt).forEach((a) => {
    Jt(a, Vt[a]);
  });
  const pe = () => {
    Hn(re);
  }, C = () => {
    let a = document.createElement("style");
    a.innerHTML = m, A.appendChild(a);
  }, Ie = () => {
    let a = new URL(L), w = document.createElement("style");
    fetch(a.href).then((Q) => Q.text()).then((Q) => {
      w.innerHTML = Q, setTimeout(
        () => {
          A.appendChild(w);
        },
        1
      );
    });
  };
  Nn(() => (window.addEventListener("message", ne, !1), () => {
    window.removeEventListener("message", ne);
  })), Mn(() => {
    clearInterval(j);
  });
  function O(a) {
    Wt[a ? "unshift" : "push"](() => {
      A = a, i(4, A);
    });
  }
  function Ue() {
    P = this.clientWidth, b = this.clientHeight, i(0, P), i(1, b);
  }
  function y(a) {
    Wt[a ? "unshift" : "push"](() => {
      A = a, i(4, A);
    });
  }
  return n.$$set = (a) => {
    "clientstyling" in a && i(11, m = a.clientstyling), "clientstylingurl" in a && i(12, L = a.clientstylingurl), "width" in a && i(0, P = a.width), "height" in a && i(1, b = a.height), "duration" in a && i(2, I = a.duration), "assetsurl" in a && i(3, he = a.assetsurl), "lang" in a && i(13, re = a.lang), "translationurl" in a && i(14, q = a.translationurl), "endpoint" in a && i(15, R = a.endpoint), "currency" in a && i(16, N = a.currency), "customerid" in a && i(17, k = a.customerid), "selectedpaymentmethodname" in a && i(18, me = a.selectedpaymentmethodname), "$$scope" in a && i(19, l = a.$$scope);
  }, n.$$.update = () => {
    n.$$.dirty[0] & /*lang*/
    8192 && re && pe(), n.$$.dirty[0] & /*clientstyling, customStylingContainer*/
    2064 && m && A && C(), n.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
    4112 && L && A && Ie(), n.$$.dirty[0] & /*translationurl*/
    16384 && q && S();
  }, [
    P,
    b,
    I,
    he,
    A,
    d,
    E,
    _,
    o,
    Te,
    g,
    m,
    L,
    re,
    q,
    R,
    N,
    k,
    me,
    l,
    r,
    O,
    Ue,
    y
  ];
}
class yi extends An {
  constructor(t) {
    super(), Cn(
      this,
      t,
      Si,
      Ei,
      On,
      {
        clientstyling: 11,
        clientstylingurl: 12,
        width: 0,
        height: 1,
        duration: 2,
        assetsurl: 3,
        lang: 13,
        translationurl: 14,
        endpoint: 15,
        currency: 16,
        customerid: 17,
        selectedpaymentmethodname: 18
      },
      si,
      [-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();
  }
}
Dn(yi, { clientstyling: {}, clientstylingurl: {}, width: {}, height: {}, duration: {}, assetsurl: {}, lang: {}, translationurl: {}, endpoint: {}, currency: {}, customerid: {}, selectedpaymentmethodname: {} }, ["icon", "title", "text", "button"], [], !0);
export {
  yi as default
};
