var Q = (n, h, s) => new Promise((c, p) => {
  var T = (l) => {
    try {
      y(s.next(l));
    } catch (S) {
      p(S);
    }
  }, w = (l) => {
    try {
      y(s.throw(l));
    } catch (S) {
      p(S);
    }
  }, y = (l) => l.done ? c(l.value) : Promise.resolve(l.value).then(T, w);
  y((s = s.apply(n, h)).next());
});
import { b as oe, p as se, r as de, h as D, H as ue } from "./index-1ef3a64c-CIXVl92j.js";
import { c as le } from "./app-globals-0f993ce5-DzSE6TtH.js";
var ce = () => {
  const n = import.meta.url, h = {};
  return n !== "" && (h.resourcesUrl = new URL(".", n).href), se(h);
};
ce().then((n) => Q(void 0, null, function* () {
  return yield le(), oe([["user-deposit-withdrawal", [[1, "user-deposit-withdrawal", { mbSource: [513, "mb-source"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], endpoint: [513], type: [513], channel: [513], language: [513], productType: [513, "product-type"], userId: [513, "user-id"], session: [513], successUrl: [513, "success-url"], cancelUrl: [513, "cancel-url"], failUrl: [513, "fail-url"], sportsUrl: [513, "sports-url"], casinoUrl: [513, "casino-url"], contactUrl: [513, "contact-url"], depositUrl: [513, "deposit-url"], currency: [513], showBonusSelectionInput: [513, "show-bonus-selection-input"], isShortCashier: [516, "is-short-cashier"], homeUrl: [513, "home-url"], beforeRedirect: [16], dynamicHeight: [32], cashierInfoUrl: [32] }, null, { clientStyling: ["handleClientStylingChange"], clientStylingUrl: ["handleClientStylingChangeURL"] }]]]], n);
}));
const he = "en", fe = ["ro", "en", "fr", "hr", "en-us", "es-mx", "pt-br", "es", "de", "pt", "tr"], te = {
  en: {
    Deposit: "Deposit",
    Withdraw: "Withdraw",
    denyDeposit: "Please be informed that currently you are not allowed to initiate deposit transactions.",
    denyWithdrawal: "Please be informed that currently you are not allowed to initiate withdrawal transactions.",
    notFoundErrorCode: "Not found error code",
    errorCode21121: "Dear Player! Please be informed that currently you are allowed to initiate only withdrawal transactions from your player account. Error Code: 21121",
    errorCode21122: "Dear player! Please be informed that currently you are not allowed to initiate withdrawal transaction from your player account. Error Code: 21122",
    errorCode21123: "Dear player! Please be informed that currently you are not allowed to make a deposit to your player account. Error Code:21123"
  },
  "en-us": {
    Deposit: "Deposit",
    Withdraw: "Withdraw",
    denyDeposit: "Please be informed that currently you are not allowed to initiate deposit transactions.",
    denyWithdrawal: "Please be informed that currently you are not allowed to initiate withdrawal transactions.",
    notFoundErrorCode: "Not found error code",
    errorCode21121: "Dear Player! Please be informed that currently you are allowed to initiate only withdrawal transactions from your player account. Error Code: 21121",
    errorCode21122: "Dear player! Please be informed that currently you are not allowed to initiate withdrawal transaction from your player account. Error Code: 21122",
    errorCode21123: "Dear player! Please be informed that currently you are not allowed to make a deposit to your player account. Error Code:21123"
  },
  ro: {
    Deposit: "Depunere",
    Withdraw: "Retragere",
    denyDeposit: "Vă informăm că în prezent nu aveți permisiunea de a iniția tranzacții de depunere.",
    denyWithdrawal: "Vă informăm că în prezent nu aveți permisiunea de a iniția tranzacții de retragere.",
    notFoundErrorCode: "Cod de eroare negăsit",
    errorCode21122: "Stimate jucător! Vă informăm că în prezent nu aveți permisiunea de a iniția o tranzacție de retragere din contul dvs. de jucător. Cod de eroare: 21122",
    errorCode21123: "Stimate jucător! Vă informăm că în prezent nu aveți permisiunea de a efectua o depunere în contul dvs. de jucător. Cod de eroare: 21123"
  },
  fr: {
    Deposit: "Dépôt",
    Withdraw: "Retrait",
    denyDeposit: "Veuillez noter qu’actuellement vous n’êtes pas autorisé à initier des transactions de dépôt.",
    denyWithdrawal: "Veuillez noter qu’actuellement vous n’êtes pas autorisé à initier des transactions de retrait.",
    notFoundErrorCode: "Code d’erreur introuvable",
    errorCode21122: "Cher joueur ! Veuillez noter qu’actuellement vous n’êtes pas autorisé à initier une transaction de retrait depuis votre compte joueur. Code d’erreur : 21122",
    errorCode21123: "Cher joueur ! Veuillez noter qu’actuellement vous n’êtes pas autorisé à effectuer un dépôt sur votre compte joueur. Code d’erreur : 21123"
  },
  hr: {
    Deposit: "Uplata",
    Withdraw: "Isplata",
    denyDeposit: "Obavještavamo Vas da trenutno nemate mogućnost uplata.",
    denyWithdrawal: "Obavještavamo vas da trenutno niste ovlašteni za pokretanje transakcija isplate.",
    notFoundErrorCode: "Not found error code",
    errorCode21122: "Poštovani, trenutno nije moguće izvršiti isplatu sa Vašeg računa. Error Code: 21122",
    errorCode21123: "Poštovani, trenutno nije moguće izvršiti uplatu na Vaš račun. Error Code:21123"
  },
  de: {
    Deposit: "Einzahlung",
    Withdraw: "Abhebung",
    denyDeposit: "Bitte beachten Sie, dass Sie derzeit keine Einzahlungs-Transaktionen durchführen dürfen.",
    denyWithdrawal: "Bitte beachten Sie, dass Sie derzeit keine Abhebungs-Transaktionen durchführen dürfen.",
    notFoundErrorCode: "Fehlercode nicht gefunden",
    errorCode21122: "Sehr geehrter Spieler! Bitte beachten Sie, dass Sie derzeit keine Abhebung von Ihrem Spielerkonto durchführen dürfen. Fehlercode: 21122",
    errorCode21123: "Sehr geehrter Spieler! Bitte beachten Sie, dass Sie derzeit keine Einzahlung auf Ihr Spielerkonto durchführen dürfen. Fehlercode: 21123"
  },
  es: {
    Deposit: "Depósito",
    Withdraw: "Retiro",
    denyDeposit: "Le informamos que actualmente no tiene permitido iniciar transacciones de depósito.",
    denyWithdrawal: "Le informamos que actualmente no tiene permitido iniciar transacciones de retiro.",
    notFoundErrorCode: "Código de error no encontrado",
    errorCode21122: "¡Estimado jugador! Le informamos que actualmente no tiene permitido iniciar una transacción de retiro desde su cuenta de jugador. Código de error: 21122",
    errorCode21123: "¡Estimado jugador! Le informamos que actualmente no tiene permitido realizar un depósito en su cuenta de jugador. Código de error: 21123"
  },
  pt: {
    Deposit: "Depósito",
    Withdraw: "Levantamento",
    denyDeposit: "Informamos que atualmente não tem permissão para iniciar transações de depósito.",
    denyWithdrawal: "Informamos que atualmente não tem permissão para iniciar transações de levantamento.",
    notFoundErrorCode: "Código de erro não encontrado",
    errorCode21122: "Caro jogador! Informamos que atualmente não tem permissão para iniciar uma transação de levantamento na sua conta de jogador. Código de erro: 21122",
    errorCode21123: "Caro jogador! Informamos que atualmente não tem permissão para realizar um depósito na sua conta de jogador. Código de erro: 21123"
  },
  "es-mx": {
    Deposit: "Depósito",
    Withdraw: "Retiro",
    denyDeposit: "Le informamos que actualmente no tiene permitido iniciar transacciones de depósito.",
    denyWithdrawal: "Le informamos que actualmente no tiene permitido iniciar transacciones de retiro.",
    notFoundErrorCode: "Código de error no encontrado",
    errorCode21122: "¡Estimado jugador! Le informamos que actualmente no tiene permitido iniciar una transacción de retiro desde su cuenta de jugador. Código de error: 21122",
    errorCode21123: "¡Estimado jugador! Le informamos que actualmente no tiene permitido realizar un depósito en su cuenta de jugador. Código de error: 21123"
  },
  "pt-br": {
    Deposit: "Depósito",
    Withdraw: "Saque",
    denyDeposit: "Informamos que atualmente você não tem permissão para iniciar transações de depósito.",
    denyWithdrawal: "Informamos que atualmente você não tem permissão para iniciar transações de saque.",
    notFoundErrorCode: "Código de erro não encontrado",
    errorCode21122: "Caro jogador! Informamos que atualmente você não tem permissão para iniciar uma transação de saque em sua conta de jogador. Código de erro: 21122",
    errorCode21123: "Caro jogador! Informamos que atualmente você não tem permissão para realizar um depósito em sua conta de jogador. Código de erro: 21123"
  },
  tr: {
    Deposit: "Para Yatırma",
    Withdraw: "Para Çekme",
    denyDeposit: "Lütfen şu anda para yatırma işlemi başlatamayacağınızı bilgilerinize sunarız.",
    denyWithdrawal: "Lütfen şu anda para çekme işlemi başlatamayacağınızı bilgilerinize sunarız.",
    notFoundErrorCode: "Hata kodu bulunamadı",
    errorCode21122: "Değerli oyuncumuz! Lütfen şu anda oyuncu hesabınızdan para çekme işlemi başlatamayacağınızı bilgilerinize sunarız. Hata Kodu: 21122",
    errorCode21123: "Değerli oyuncumuz! Lütfen şu anda oyuncu hesabınıza para yatırma işlemi yapamayacağınızı bilgilerinize sunarız. Hata Kodu: 21123"
  }
}, pe = (n) => new Promise((h) => {
  fetch(n).then((s) => s.json()).then((s) => {
    Object.keys(s).forEach((c) => {
      for (let p in s[c])
        te[c][p] = s[c][p];
    }), h(!0);
  });
}), H = (n, h) => {
  const s = h;
  return te[s !== void 0 && fe.includes(s) ? s : he][n];
};
function X(n, h) {
  if (n) {
    const s = document.createElement("style");
    s.innerHTML = h, n.appendChild(s);
  }
}
function ee(n, h) {
  const s = new URL(h);
  fetch(s.href).then((c) => c.text()).then((c) => {
    const p = document.createElement("style");
    p.innerHTML = c, n && n.appendChild(p);
  }).catch((c) => {
    console.error("There was an error while trying to load client styling from URL", c);
  });
}
function me(n, h, s) {
  if (window.emMessageBus) {
    const c = document.createElement("style");
    window.emMessageBus.subscribe(h, (p) => {
      c.innerHTML = p, n && n.appendChild(c);
    });
  }
}
const ye = (n) => !!(n.toLowerCase().match(/android/i) || n.toLowerCase().match(/blackberry|bb/i) || n.toLowerCase().match(/iphone|ipad|ipod/i) || n.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
var re = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {}, ne = { exports: {} };
(function(n, h) {
  (function(s, c) {
    n.exports = c();
  })(re, function() {
    var s = 1e3, c = 6e4, p = 36e5, T = "millisecond", w = "second", y = "minute", l = "hour", S = "day", P = "week", M = "month", N = "quarter", k = "year", L = "date", o = "Invalid Date", U = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, F = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, I = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(a) {
      var r = ["th", "st", "nd", "rd"], e = a % 100;
      return "[" + a + (r[(e - 20) % 10] || r[e] || r[0]) + "]";
    } }, W = function(a, r, e) {
      var i = String(a);
      return !i || i.length >= r ? a : "" + Array(r + 1 - i.length).join(e) + a;
    }, G = { s: W, z: function(a) {
      var r = -a.utcOffset(), e = Math.abs(r), i = Math.floor(e / 60), t = e % 60;
      return (r <= 0 ? "+" : "-") + W(i, 2, "0") + ":" + W(t, 2, "0");
    }, m: function a(r, e) {
      if (r.date() < e.date())
        return -a(e, r);
      var i = 12 * (e.year() - r.year()) + (e.month() - r.month()), t = r.clone().add(i, M), d = e - t < 0, u = r.clone().add(i + (d ? -1 : 1), M);
      return +(-(i + (e - t) / (d ? t - u : u - t)) || 0);
    }, a: function(a) {
      return a < 0 ? Math.ceil(a) || 0 : Math.floor(a);
    }, p: function(a) {
      return { M, y: k, w: P, d: S, D: L, h: l, m: y, s: w, ms: T, Q: N }[a] || String(a || "").toLowerCase().replace(/s$/, "");
    }, u: function(a) {
      return a === void 0;
    } }, x = "en", E = {};
    E[x] = I;
    var q = "$isDayjsObject", B = function(a) {
      return a instanceof Z || !(!a || !a[q]);
    }, O = function a(r, e, i) {
      var t;
      if (!r)
        return x;
      if (typeof r == "string") {
        var d = r.toLowerCase();
        E[d] && (t = d), e && (E[d] = e, t = d);
        var u = r.split("-");
        if (!t && u.length > 1)
          return a(u[0]);
      } else {
        var m = r.name;
        E[m] = r, t = m;
      }
      return !i && t && (x = t), t || !i && x;
    }, C = function(a, r) {
      if (B(a))
        return a.clone();
      var e = typeof r == "object" ? r : {};
      return e.date = a, e.args = arguments, new Z(e);
    }, f = G;
    f.l = O, f.i = B, f.w = function(a, r) {
      return C(a, { locale: r.$L, utc: r.$u, x: r.$x, $offset: r.$offset });
    };
    var Z = function() {
      function a(e) {
        this.$L = O(e.locale, null, !0), this.parse(e), this.$x = this.$x || e.x || {}, this[q] = !0;
      }
      var r = a.prototype;
      return r.parse = function(e) {
        this.$d = function(i) {
          var t = i.date, d = i.utc;
          if (t === null)
            return /* @__PURE__ */ new Date(NaN);
          if (f.u(t))
            return /* @__PURE__ */ new Date();
          if (t instanceof Date)
            return new Date(t);
          if (typeof t == "string" && !/Z$/i.test(t)) {
            var u = t.match(U);
            if (u) {
              var m = u[2] - 1 || 0, g = (u[7] || "0").substring(0, 3);
              return d ? new Date(Date.UTC(u[1], m, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, g)) : new Date(u[1], m, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, g);
            }
          }
          return new Date(t);
        }(e), this.init();
      }, r.init = function() {
        var e = this.$d;
        this.$y = e.getFullYear(), this.$M = e.getMonth(), this.$D = e.getDate(), this.$W = e.getDay(), this.$H = e.getHours(), this.$m = e.getMinutes(), this.$s = e.getSeconds(), this.$ms = e.getMilliseconds();
      }, r.$utils = function() {
        return f;
      }, r.isValid = function() {
        return this.$d.toString() !== o;
      }, r.isSame = function(e, i) {
        var t = C(e);
        return this.startOf(i) <= t && t <= this.endOf(i);
      }, r.isAfter = function(e, i) {
        return C(e) < this.startOf(i);
      }, r.isBefore = function(e, i) {
        return this.endOf(i) < C(e);
      }, r.$g = function(e, i, t) {
        return f.u(e) ? this[i] : this.set(t, e);
      }, r.unix = function() {
        return Math.floor(this.valueOf() / 1e3);
      }, r.valueOf = function() {
        return this.$d.getTime();
      }, r.startOf = function(e, i) {
        var t = this, d = !!f.u(i) || i, u = f.p(e), m = function(R, b) {
          var j = f.w(t.$u ? Date.UTC(t.$y, b, R) : new Date(t.$y, b, R), t);
          return d ? j : j.endOf(S);
        }, g = function(R, b) {
          return f.w(t.toDate()[R].apply(t.toDate("s"), (d ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(b)), t);
        }, v = this.$W, $ = this.$M, z = this.$D, Y = "set" + (this.$u ? "UTC" : "");
        switch (u) {
          case k:
            return d ? m(1, 0) : m(31, 11);
          case M:
            return d ? m(1, $) : m(0, $ + 1);
          case P:
            var _ = this.$locale().weekStart || 0, A = (v < _ ? v + 7 : v) - _;
            return m(d ? z - A : z + (6 - A), $);
          case S:
          case L:
            return g(Y + "Hours", 0);
          case l:
            return g(Y + "Minutes", 1);
          case y:
            return g(Y + "Seconds", 2);
          case w:
            return g(Y + "Milliseconds", 3);
          default:
            return this.clone();
        }
      }, r.endOf = function(e) {
        return this.startOf(e, !1);
      }, r.$set = function(e, i) {
        var t, d = f.p(e), u = "set" + (this.$u ? "UTC" : ""), m = (t = {}, t[S] = u + "Date", t[L] = u + "Date", t[M] = u + "Month", t[k] = u + "FullYear", t[l] = u + "Hours", t[y] = u + "Minutes", t[w] = u + "Seconds", t[T] = u + "Milliseconds", t)[d], g = d === S ? this.$D + (i - this.$W) : i;
        if (d === M || d === k) {
          var v = this.clone().set(L, 1);
          v.$d[m](g), v.init(), this.$d = v.set(L, Math.min(this.$D, v.daysInMonth())).$d;
        } else
          m && this.$d[m](g);
        return this.init(), this;
      }, r.set = function(e, i) {
        return this.clone().$set(e, i);
      }, r.get = function(e) {
        return this[f.p(e)]();
      }, r.add = function(e, i) {
        var t, d = this;
        e = Number(e);
        var u = f.p(i), m = function($) {
          var z = C(d);
          return f.w(z.date(z.date() + Math.round($ * e)), d);
        };
        if (u === M)
          return this.set(M, this.$M + e);
        if (u === k)
          return this.set(k, this.$y + e);
        if (u === S)
          return m(1);
        if (u === P)
          return m(7);
        var g = (t = {}, t[y] = c, t[l] = p, t[w] = s, t)[u] || 1, v = this.$d.getTime() + e * g;
        return f.w(v, this);
      }, r.subtract = function(e, i) {
        return this.add(-1 * e, i);
      }, r.format = function(e) {
        var i = this, t = this.$locale();
        if (!this.isValid())
          return t.invalidDate || o;
        var d = e || "YYYY-MM-DDTHH:mm:ssZ", u = f.z(this), m = this.$H, g = this.$m, v = this.$M, $ = t.weekdays, z = t.months, Y = t.meridiem, _ = function(b, j, V, J) {
          return b && (b[j] || b(i, d)) || V[j].slice(0, J);
        }, A = function(b) {
          return f.s(m % 12 || 12, b, "0");
        }, R = Y || function(b, j, V) {
          var J = b < 12 ? "AM" : "PM";
          return V ? J.toLowerCase() : J;
        };
        return d.replace(F, function(b, j) {
          return j || function(V) {
            switch (V) {
              case "YY":
                return String(i.$y).slice(-2);
              case "YYYY":
                return f.s(i.$y, 4, "0");
              case "M":
                return v + 1;
              case "MM":
                return f.s(v + 1, 2, "0");
              case "MMM":
                return _(t.monthsShort, v, z, 3);
              case "MMMM":
                return _(z, v);
              case "D":
                return i.$D;
              case "DD":
                return f.s(i.$D, 2, "0");
              case "d":
                return String(i.$W);
              case "dd":
                return _(t.weekdaysMin, i.$W, $, 2);
              case "ddd":
                return _(t.weekdaysShort, i.$W, $, 3);
              case "dddd":
                return $[i.$W];
              case "H":
                return String(m);
              case "HH":
                return f.s(m, 2, "0");
              case "h":
                return A(1);
              case "hh":
                return A(2);
              case "a":
                return R(m, g, !0);
              case "A":
                return R(m, g, !1);
              case "m":
                return String(g);
              case "mm":
                return f.s(g, 2, "0");
              case "s":
                return String(i.$s);
              case "ss":
                return f.s(i.$s, 2, "0");
              case "SSS":
                return f.s(i.$ms, 3, "0");
              case "Z":
                return u;
            }
            return null;
          }(b) || u.replace(":", "");
        });
      }, r.utcOffset = function() {
        return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
      }, r.diff = function(e, i, t) {
        var d, u = this, m = f.p(i), g = C(e), v = (g.utcOffset() - this.utcOffset()) * c, $ = this - g, z = function() {
          return f.m(u, g);
        };
        switch (m) {
          case k:
            d = z() / 12;
            break;
          case M:
            d = z();
            break;
          case N:
            d = z() / 3;
            break;
          case P:
            d = ($ - v) / 6048e5;
            break;
          case S:
            d = ($ - v) / 864e5;
            break;
          case l:
            d = $ / p;
            break;
          case y:
            d = $ / c;
            break;
          case w:
            d = $ / s;
            break;
          default:
            d = $;
        }
        return t ? d : f.a(d);
      }, r.daysInMonth = function() {
        return this.endOf(M).$D;
      }, r.$locale = function() {
        return E[this.$L];
      }, r.locale = function(e, i) {
        if (!e)
          return this.$L;
        var t = this.clone(), d = O(e, i, !0);
        return d && (t.$L = d), t;
      }, r.clone = function() {
        return f.w(this.$d, this);
      }, r.toDate = function() {
        return new Date(this.valueOf());
      }, r.toJSON = function() {
        return this.isValid() ? this.toISOString() : null;
      }, r.toISOString = function() {
        return this.$d.toISOString();
      }, r.toString = function() {
        return this.$d.toUTCString();
      }, a;
    }(), K = Z.prototype;
    return C.prototype = K, [["$ms", T], ["$s", w], ["$m", y], ["$H", l], ["$W", S], ["$M", M], ["$y", k], ["$D", L]].forEach(function(a) {
      K[a[1]] = function(r) {
        return this.$g(r, a[0], a[1]);
      };
    }), C.extend = function(a, r) {
      return a.$i || (a(r, Z, C), a.$i = !0), C;
    }, C.locale = O, C.isDayjs = B, C.unix = function(a) {
      return C(1e3 * a);
    }, C.en = E[x], C.Ls = E, C.p = {}, C;
  });
})(ne);
const ie = ne.exports;
var ae = { exports: {} };
(function(n, h) {
  (function(s, c) {
    n.exports = c();
  })(re, function() {
    var s = "minute", c = /[+-]\d\d(?::?\d\d)?/g, p = /([+-]|\d\d)/g;
    return function(T, w, y) {
      var l = w.prototype;
      y.utc = function(o) {
        var U = { date: o, utc: !0, args: arguments };
        return new w(U);
      }, l.utc = function(o) {
        var U = y(this.toDate(), { locale: this.$L, utc: !0 });
        return o ? U.add(this.utcOffset(), s) : U;
      }, l.local = function() {
        return y(this.toDate(), { locale: this.$L, utc: !1 });
      };
      var S = l.parse;
      l.parse = function(o) {
        o.utc && (this.$u = !0), this.$utils().u(o.$offset) || (this.$offset = o.$offset), S.call(this, o);
      };
      var P = l.init;
      l.init = function() {
        if (this.$u) {
          var o = this.$d;
          this.$y = o.getUTCFullYear(), this.$M = o.getUTCMonth(), this.$D = o.getUTCDate(), this.$W = o.getUTCDay(), this.$H = o.getUTCHours(), this.$m = o.getUTCMinutes(), this.$s = o.getUTCSeconds(), this.$ms = o.getUTCMilliseconds();
        } else
          P.call(this);
      };
      var M = l.utcOffset;
      l.utcOffset = function(o, U) {
        var F = this.$utils().u;
        if (F(o))
          return this.$u ? 0 : F(this.$offset) ? M.call(this) : this.$offset;
        if (typeof o == "string" && (o = function(x) {
          x === void 0 && (x = "");
          var E = x.match(c);
          if (!E)
            return null;
          var q = ("" + E[0]).match(p) || ["-", 0, 0], B = q[0], O = 60 * +q[1] + +q[2];
          return O === 0 ? 0 : B === "+" ? O : -O;
        }(o), o === null))
          return this;
        var I = Math.abs(o) <= 16 ? 60 * o : o, W = this;
        if (U)
          return W.$offset = I, W.$u = o === 0, W;
        if (o !== 0) {
          var G = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
          (W = this.local().add(I + G, s)).$offset = I, W.$x.$localOffset = G;
        } else
          W = this.utc();
        return W;
      };
      var N = l.format;
      l.format = function(o) {
        var U = o || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
        return N.call(this, U);
      }, l.valueOf = function() {
        var o = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
        return this.$d.valueOf() - 6e4 * o;
      }, l.isUTC = function() {
        return !!this.$u;
      }, l.toISOString = function() {
        return this.toDate().toISOString();
      }, l.toString = function() {
        return this.toDate().toUTCString();
      };
      var k = l.toDate;
      l.toDate = function(o) {
        return o === "s" && this.$offset ? y(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : k.call(this);
      };
      var L = l.diff;
      l.diff = function(o, U, F) {
        if (o && this.$u === o.$u)
          return L.call(this, o, U, F);
        var I = this.local(), W = y(o).local();
        return L.call(I, W, U, F);
      };
    };
  });
})(ae);
const ge = ae.exports, we = `:host {
  font: inherit;
  display: block;
  height: 100%;
  container-type: inline-size;
}

.DepositWithdrawalContainer {
  container-type: inline-size;
  container-name: deposit-container;
}

.CategoryTitle {
  font-size: var(--emw--font-size-x-large, 26px);
  color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));
}

.MenuReturnButton {
  font: inherit;
  color: var(--emw--color-gray-300, #58586B);
  display: inline-flex;
  align-items: center;
  column-gap: 10px;
  margin-bottom: 10px;
}
.MenuReturnButton svg {
  fill: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));
}
.MenuReturnButton h2.CategoryTitleMobile {
  font-size: 16px;
  color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));
}

.ErrorMessage {
  color: var(--emw--pam-color-typography, var(--emw--color-typography, #FFFFFF));
}

.DepositWithdrawalWrapper {
  width: 100%;
  margin: 0;
  padding: 50px;
  box-sizing: border-box;
  overflow-y: scroll;
}
.DepositWithdrawalWrapper iframe {
  border-width: 0;
}

.ShortCashier.DepositWithdrawalWrapper {
  height: 500px;
}
.ShortCashier.CategoryTitle.CategoryTitle {
  margin-right: 20px;
  padding-top: 20px;
  color: var(--emw--color-black, #000000);
}
.ShortCashier .ErrorMessage {
  margin: auto;
  width: 90%;
  margin-top: 70px;
  text-align: center;
  color: var(--emw--color-black, #000000);
}

@container (max-width: 768px) {
  .DepositWithdrawalWrapper {
    padding: 20px 15px;
  }
  .DepositWithdrawalWrapper:not(.ShortCashier) {
    overflow: visible;
  }
}`, Ce = we;
ie.extend(ge);
const ve = () => {
}, $e = class {
  constructor(n) {
    de(this, n), this.bindedHandler = this.handleMessage.bind(this), this.userAgent = window.navigator.userAgent, this.isMobile = ye(this.userAgent), this.errorCodes = ["21123", "21122", "21121"], this.toggleScreen = () => {
      window.postMessage({ type: "PlayerAccountMenuActive", isMobile: this.isMobile }, window.location.href);
    }, this.mbSource = void 0, this.clientStyling = "", this.clientStylingUrl = "", this.translationUrl = "", this.endpoint = void 0, this.type = void 0, this.channel = void 0, this.language = void 0, this.productType = "", this.userId = void 0, this.session = void 0, this.successUrl = void 0, this.cancelUrl = void 0, this.failUrl = void 0, this.sportsUrl = void 0, this.casinoUrl = void 0, this.contactUrl = void 0, this.depositUrl = void 0, this.currency = "", this.showBonusSelectionInput = "true", this.isShortCashier = !1, this.homeUrl = void 0, this.beforeRedirect = ve, this.dynamicHeight = void 0, this.cashierInfoUrl = void 0;
  }
  get typeParameter() {
    if (this.type === "deposit")
      return "Deposit";
    if (this.type === "withdraw")
      return "Withdraw";
  }
  handleClientStylingChange(n, h) {
    n != h && X(this.stylingContainer, this.clientStyling);
  }
  handleClientStylingChangeURL(n, h) {
    n != h && this.clientStylingUrl && ee(this.stylingContainer, this.clientStylingUrl);
  }
  componentWillLoad() {
    return Q(this, null, function* () {
      if (yield this.loadWidget(), this.translationUrl)
        return pe(this.translationUrl);
    });
  }
  componentDidLoad() {
    this.stylingContainer && (window.emMessageBus != null ? me(this.stylingContainer, `${this.mbSource}.Style`) : (this.clientStyling && X(this.stylingContainer, this.clientStyling), this.clientStylingUrl && ee(this.stylingContainer, this.clientStylingUrl))), window.addEventListener("message", this.bindedHandler, !1);
  }
  disconnectedCallback() {
    window.removeEventListener("message", this.bindedHandler, !1), this.stylingSubscription && this.stylingSubscription.unsubscribe();
  }
  render() {
    return D(ue, { key: "4c6783c9cccc65e31901eb8755729147da7c3771" }, D("div", { key: "cceae92ea2c7fb63f2de79e0d8748b7847c67842", ref: (n) => this.stylingContainer = n, class: "" }, D("div", { key: "5171e7159682058314022e47d93d4d20b377d7e1", class: `DepositWithdrawalWrapper ${this.isShortCashier ? "ShortCashier" : ""}` }, !(this.isMobile && !this.isShortCashier) && D("h2", { key: "9d517ae70d3f6a654ffaff66d86d19c4259fa679", class: "CategoryTitle" }, H(this.typeParameter === "Withdraw" ? "Withdraw" : "Deposit", this.language)), D("div", { key: "97c991c8a18e44e50307a9bd3de11f446783a630", style: { marginTop: this.isShortCashier ? "30px" : "0" } }, this.isMobile && !this.isShortCashier ? D("div", { class: "MenuReturnButton", onClick: this.toggleScreen }, D("svg", { xmlns: "http://www.w3.org/2000/svg", width: "15", height: "15", viewBox: "0 0 15 15" }, D("defs", null), D("g", { transform: "translate(-20 -158)" }, D("g", { transform: "translate(20 158)" }, D("path", { class: "aaa", d: "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z", transform: "translate(15 15) rotate(180)" })))), D("h2", { class: "CategoryTitleMobile" }, H(this.typeParameter === "Withdraw" ? "Withdraw" : "Deposit", this.language))) : null), this.cashierInfoUrl ? D("iframe", { width: "100%", allow: "payment", height: this.dynamicHeight, src: this.cashierInfoUrl }) : D("h3", { innerHTML: this.type === "deposit" ? H("denyDeposit", this.language) : H("denyWithdrawal", this.language), class: "ErrorMessage" }))));
  }
  loadWidget() {
    return Q(this, null, function* () {
      const n = {
        Channel: this.channel,
        Type: this.typeParameter,
        SuccessUrl: this.successUrl,
        CancelUrl: this.cancelUrl,
        FailUrl: this.failUrl,
        Language: this.language,
        productType: this.productType,
        isShortCashier: this.isShortCashier,
        currency: this.currency,
        showBonusSelectionInput: this.showBonusSelectionInput
      };
      if (!(Object.values(n).some((h) => h === void 0) || !this.endpoint))
        try {
          const h = `${this.endpoint}/v1/player/${this.userId}/payment/GetPaymentSession`, s = yield fetch(h, {
            method: "POST",
            headers: {
              "X-Sessionid": this.session,
              "Content-Type": "application/json",
              "X-Client-Request-Timestamp": ie.utc().format("YYYY-MM-DD HH:mm:ss.SSS")
            },
            body: JSON.stringify(n)
          });
          if (!s.ok) {
            const p = yield s.text();
            throw new Error(p);
          }
          const c = yield s.json();
          if (c.CashierInfo)
            this.cashierInfoUrl = c.CashierInfo.Url;
          else {
            let p;
            if (c.ResponseMessage) {
              let w = this.errorCodes.find((y) => c.ResponseMessage.includes(y)) || null;
              w ? p = H(`errorCode${w}`, this.language) : p = H("notFoundErrorCode", this.language);
            } else
              p = this.type === "deposit" ? H("denyDeposit", this.language) : H("denyWithdrawal", this.language);
            const T = { type: "error", message: p };
            window.postMessage({ type: "DenyDepositOrWithdrawal", data: T }, window.location.href);
          }
        } catch (h) {
          console.error(h);
        }
    });
  }
  handleMessage(n) {
    var h, s, c, p, T, w, y, l;
    n.data["MMFE:openFullCashier"] === "true" && (window.postMessage({ type: "GoToDeposit" }, window.location.href), window.postMessage({ type: "CloseShortCashier" }, window.location.href)), n.data["MMFE:setQuickDepositHeight"] && this.isShortCashier && (this.dynamicHeight = n.data["MMFE:setQuickDepositHeight"].toString() + "px"), n.data["MMFE:setIFrameHeight"] && (this.dynamicHeight = n.data["MMFE:setIFrameHeight"].toString() + "px"), ((h = n.data) === null || h === void 0 ? void 0 : h.type) === "mm-hcback-to-merchant" && this.doRedirect(n.data.type, this.homeUrl), ((s = n.data) === null || s === void 0 ? void 0 : s.redirect) === "mm-hc-back-tomerchant" && this.doRedirect(n.data.redirect, this.homeUrl), ((c = n.data) === null || c === void 0 ? void 0 : c.redirect) === "mm-hc-sports" && this.doRedirect((p = n.data) === null || p === void 0 ? void 0 : p.redirect, this.sportsUrl), ((T = n.data) === null || T === void 0 ? void 0 : T.redirect) === "mm-hc-casino" && this.doRedirect(window.location.href, this.casinoUrl), ((w = n.data) === null || w === void 0 ? void 0 : w.redirect) === "mm-hc-contact" && (window.postMessage({ type: "CloseShortCashier" }, window.location.href), this.doRedirect(window.location.href, this.contactUrl)), (((y = n.data) === null || y === void 0 ? void 0 : y.redirect) === "mm-wm-hc-init-deposit" || ((l = n.data) === null || l === void 0 ? void 0 : l.redirect) === "mm-wm-hc-init-deposit-quick") && (window.postMessage({ type: "CloseShortCashier" }, window.location.href), this.doRedirect(window.location.href, this.depositUrl));
  }
  doRedirect(n, h) {
    const s = { reason: n, url: h, cancel: !1 };
    if (this.beforeRedirect(s), !s.cancel) {
      if (!s.url) {
        window.location.href = "/";
        return;
      }
      window.location.href = s.url;
    }
  }
  static get watchers() {
    return {
      clientStyling: ["handleClientStylingChange"],
      clientStylingUrl: ["handleClientStylingChangeURL"]
    };
  }
};
$e.style = Ce;
export {
  $e as user_deposit_withdrawal
};
