import { b as ae, p as oe, r as se, h as b, H as de } from "./index-1ef3a64c-DmcPUbic.js";
import { c as ue } from "./app-globals-0f993ce5-DzSE6TtH.js";
var le = () => {
  const n = import.meta.url, c = {};
  return n !== "" && (c.resourcesUrl = new URL(".", n).href), oe(c);
};
le().then(async (n) => (await ue(), ae([["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 ce = "en", he = ["ro", "en", "fr", "hr", "en-us", "es-mx", "pt-br", "es", "de", "pt", "tr"], ee = {
  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"
  }
}, fe = (n) => new Promise((c) => {
  fetch(n).then((u) => u.json()).then((u) => {
    Object.keys(u).forEach((l) => {
      for (let m in u[l])
        ee[l][m] = u[l][m];
    }), c(!0);
  });
}), H = (n, c) => {
  const u = c;
  return ee[u !== void 0 && he.includes(u) ? u : ce][n];
};
function K(n, c) {
  if (n) {
    const u = document.createElement("style");
    u.innerHTML = c, n.appendChild(u);
  }
}
function X(n, c) {
  const u = new URL(c);
  fetch(u.href).then((l) => l.text()).then((l) => {
    const m = document.createElement("style");
    m.innerHTML = l, n && n.appendChild(m);
  }).catch((l) => {
    console.error("There was an error while trying to load client styling from URL", l);
  });
}
function pe(n, c, u) {
  if (window.emMessageBus) {
    const l = document.createElement("style");
    window.emMessageBus.subscribe(c, (m) => {
      l.innerHTML = m, n && n.appendChild(l);
    });
  }
}
const me = (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 te = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, re = { exports: {} };
(function(n, c) {
  (function(u, l) {
    n.exports = l();
  })(te, function() {
    var u = 1e3, l = 6e4, m = 36e5, T = "millisecond", v = "second", g = "minute", h = "hour", z = "day", P = "week", D = "month", N = "quarter", k = "year", L = "date", o = "Invalid Date", M = /^(\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]) + "]";
    } }, U = function(a, r, e) {
      var i = String(a);
      return !i || i.length >= r ? a : "" + Array(r + 1 - i.length).join(e) + a;
    }, G = { s: U, z: function(a) {
      var r = -a.utcOffset(), e = Math.abs(r), i = Math.floor(e / 60), t = e % 60;
      return (r <= 0 ? "+" : "-") + U(i, 2, "0") + ":" + U(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, D), s = e - t < 0, d = r.clone().add(i + (s ? -1 : 1), D);
      return +(-(i + (e - t) / (s ? t - d : d - t)) || 0);
    }, a: function(a) {
      return a < 0 ? Math.ceil(a) || 0 : Math.floor(a);
    }, p: function(a) {
      return { M: D, y: k, w: P, d: z, D: L, h, m: g, s: v, 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 s = r.toLowerCase();
        E[s] && (t = s), e && (E[s] = e, t = s);
        var d = r.split("-");
        if (!t && d.length > 1)
          return a(d[0]);
      } else {
        var p = r.name;
        E[p] = r, t = p;
      }
      return !i && t && (x = t), t || !i && x;
    }, w = 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 w(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, s = 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 d = t.match(M);
            if (d) {
              var p = d[2] - 1 || 0, y = (d[7] || "0").substring(0, 3);
              return s ? new Date(Date.UTC(d[1], p, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, y)) : new Date(d[1], p, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, y);
            }
          }
          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 = w(e);
        return this.startOf(i) <= t && t <= this.endOf(i);
      }, r.isAfter = function(e, i) {
        return w(e) < this.startOf(i);
      }, r.isBefore = function(e, i) {
        return this.endOf(i) < w(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, s = !!f.u(i) || i, d = f.p(e), p = function(R, S) {
          var j = f.w(t.$u ? Date.UTC(t.$y, S, R) : new Date(t.$y, S, R), t);
          return s ? j : j.endOf(z);
        }, y = function(R, S) {
          return f.w(t.toDate()[R].apply(t.toDate("s"), (s ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(S)), t);
        }, C = this.$W, $ = this.$M, W = this.$D, Y = "set" + (this.$u ? "UTC" : "");
        switch (d) {
          case k:
            return s ? p(1, 0) : p(31, 11);
          case D:
            return s ? p(1, $) : p(0, $ + 1);
          case P:
            var _ = this.$locale().weekStart || 0, A = (C < _ ? C + 7 : C) - _;
            return p(s ? W - A : W + (6 - A), $);
          case z:
          case L:
            return y(Y + "Hours", 0);
          case h:
            return y(Y + "Minutes", 1);
          case g:
            return y(Y + "Seconds", 2);
          case v:
            return y(Y + "Milliseconds", 3);
          default:
            return this.clone();
        }
      }, r.endOf = function(e) {
        return this.startOf(e, !1);
      }, r.$set = function(e, i) {
        var t, s = f.p(e), d = "set" + (this.$u ? "UTC" : ""), p = (t = {}, t[z] = d + "Date", t[L] = d + "Date", t[D] = d + "Month", t[k] = d + "FullYear", t[h] = d + "Hours", t[g] = d + "Minutes", t[v] = d + "Seconds", t[T] = d + "Milliseconds", t)[s], y = s === z ? this.$D + (i - this.$W) : i;
        if (s === D || s === k) {
          var C = this.clone().set(L, 1);
          C.$d[p](y), C.init(), this.$d = C.set(L, Math.min(this.$D, C.daysInMonth())).$d;
        } else
          p && this.$d[p](y);
        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, s = this;
        e = Number(e);
        var d = f.p(i), p = function($) {
          var W = w(s);
          return f.w(W.date(W.date() + Math.round($ * e)), s);
        };
        if (d === D)
          return this.set(D, this.$M + e);
        if (d === k)
          return this.set(k, this.$y + e);
        if (d === z)
          return p(1);
        if (d === P)
          return p(7);
        var y = (t = {}, t[g] = l, t[h] = m, t[v] = u, t)[d] || 1, C = this.$d.getTime() + e * y;
        return f.w(C, 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 s = e || "YYYY-MM-DDTHH:mm:ssZ", d = f.z(this), p = this.$H, y = this.$m, C = this.$M, $ = t.weekdays, W = t.months, Y = t.meridiem, _ = function(S, j, V, J) {
          return S && (S[j] || S(i, s)) || V[j].slice(0, J);
        }, A = function(S) {
          return f.s(p % 12 || 12, S, "0");
        }, R = Y || function(S, j, V) {
          var J = S < 12 ? "AM" : "PM";
          return V ? J.toLowerCase() : J;
        };
        return s.replace(F, function(S, 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 C + 1;
              case "MM":
                return f.s(C + 1, 2, "0");
              case "MMM":
                return _(t.monthsShort, C, W, 3);
              case "MMMM":
                return _(W, C);
              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(p);
              case "HH":
                return f.s(p, 2, "0");
              case "h":
                return A(1);
              case "hh":
                return A(2);
              case "a":
                return R(p, y, !0);
              case "A":
                return R(p, y, !1);
              case "m":
                return String(y);
              case "mm":
                return f.s(y, 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 d;
            }
            return null;
          }(S) || d.replace(":", "");
        });
      }, r.utcOffset = function() {
        return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
      }, r.diff = function(e, i, t) {
        var s, d = this, p = f.p(i), y = w(e), C = (y.utcOffset() - this.utcOffset()) * l, $ = this - y, W = function() {
          return f.m(d, y);
        };
        switch (p) {
          case k:
            s = W() / 12;
            break;
          case D:
            s = W();
            break;
          case N:
            s = W() / 3;
            break;
          case P:
            s = ($ - C) / 6048e5;
            break;
          case z:
            s = ($ - C) / 864e5;
            break;
          case h:
            s = $ / m;
            break;
          case g:
            s = $ / l;
            break;
          case v:
            s = $ / u;
            break;
          default:
            s = $;
        }
        return t ? s : f.a(s);
      }, r.daysInMonth = function() {
        return this.endOf(D).$D;
      }, r.$locale = function() {
        return E[this.$L];
      }, r.locale = function(e, i) {
        if (!e)
          return this.$L;
        var t = this.clone(), s = O(e, i, !0);
        return s && (t.$L = s), 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;
    }(), Q = Z.prototype;
    return w.prototype = Q, [["$ms", T], ["$s", v], ["$m", g], ["$H", h], ["$W", z], ["$M", D], ["$y", k], ["$D", L]].forEach(function(a) {
      Q[a[1]] = function(r) {
        return this.$g(r, a[0], a[1]);
      };
    }), w.extend = function(a, r) {
      return a.$i || (a(r, Z, w), a.$i = !0), w;
    }, w.locale = O, w.isDayjs = B, w.unix = function(a) {
      return w(1e3 * a);
    }, w.en = E[x], w.Ls = E, w.p = {}, w;
  });
})(re);
const ne = re.exports;
var ie = { exports: {} };
(function(n, c) {
  (function(u, l) {
    n.exports = l();
  })(te, function() {
    var u = "minute", l = /[+-]\d\d(?::?\d\d)?/g, m = /([+-]|\d\d)/g;
    return function(T, v, g) {
      var h = v.prototype;
      g.utc = function(o) {
        var M = { date: o, utc: !0, args: arguments };
        return new v(M);
      }, h.utc = function(o) {
        var M = g(this.toDate(), { locale: this.$L, utc: !0 });
        return o ? M.add(this.utcOffset(), u) : M;
      }, h.local = function() {
        return g(this.toDate(), { locale: this.$L, utc: !1 });
      };
      var z = h.parse;
      h.parse = function(o) {
        o.utc && (this.$u = !0), this.$utils().u(o.$offset) || (this.$offset = o.$offset), z.call(this, o);
      };
      var P = h.init;
      h.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 D = h.utcOffset;
      h.utcOffset = function(o, M) {
        var F = this.$utils().u;
        if (F(o))
          return this.$u ? 0 : F(this.$offset) ? D.call(this) : this.$offset;
        if (typeof o == "string" && (o = function(x) {
          x === void 0 && (x = "");
          var E = x.match(l);
          if (!E)
            return null;
          var q = ("" + E[0]).match(m) || ["-", 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, U = this;
        if (M)
          return U.$offset = I, U.$u = o === 0, U;
        if (o !== 0) {
          var G = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
          (U = this.local().add(I + G, u)).$offset = I, U.$x.$localOffset = G;
        } else
          U = this.utc();
        return U;
      };
      var N = h.format;
      h.format = function(o) {
        var M = o || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
        return N.call(this, M);
      }, h.valueOf = function() {
        var o = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
        return this.$d.valueOf() - 6e4 * o;
      }, h.isUTC = function() {
        return !!this.$u;
      }, h.toISOString = function() {
        return this.toDate().toISOString();
      }, h.toString = function() {
        return this.toDate().toUTCString();
      };
      var k = h.toDate;
      h.toDate = function(o) {
        return o === "s" && this.$offset ? g(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : k.call(this);
      };
      var L = h.diff;
      h.diff = function(o, M, F) {
        if (o && this.$u === o.$u)
          return L.call(this, o, M, F);
        var I = this.local(), U = g(o).local();
        return L.call(I, U, M, F);
      };
    };
  });
})(ie);
const ye = ie.exports, ge = `: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;
  }
}`, we = ge;
ne.extend(ye);
const Ce = () => {
}, ve = class {
  constructor(n) {
    se(this, n), this.bindedHandler = this.handleMessage.bind(this), this.userAgent = window.navigator.userAgent, this.isMobile = me(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 = Ce, this.dynamicHeight = void 0, this.cashierInfoUrl = void 0;
  }
  get typeParameter() {
    if (this.type === "deposit")
      return "Deposit";
    if (this.type === "withdraw")
      return "Withdraw";
  }
  handleClientStylingChange(n, c) {
    n != c && K(this.stylingContainer, this.clientStyling);
  }
  handleClientStylingChangeURL(n, c) {
    n != c && this.clientStylingUrl && X(this.stylingContainer, this.clientStylingUrl);
  }
  async componentWillLoad() {
    if (await this.loadWidget(), this.translationUrl)
      return fe(this.translationUrl);
  }
  componentDidLoad() {
    this.stylingContainer && (window.emMessageBus != null ? pe(this.stylingContainer, `${this.mbSource}.Style`) : (this.clientStyling && K(this.stylingContainer, this.clientStyling), this.clientStylingUrl && X(this.stylingContainer, this.clientStylingUrl))), window.addEventListener("message", this.bindedHandler, !1);
  }
  disconnectedCallback() {
    window.removeEventListener("message", this.bindedHandler, !1), this.stylingSubscription && this.stylingSubscription.unsubscribe();
  }
  render() {
    return b(de, { key: "4c6783c9cccc65e31901eb8755729147da7c3771" }, b("div", { key: "cceae92ea2c7fb63f2de79e0d8748b7847c67842", ref: (n) => this.stylingContainer = n, class: "" }, b("div", { key: "5171e7159682058314022e47d93d4d20b377d7e1", class: `DepositWithdrawalWrapper ${this.isShortCashier ? "ShortCashier" : ""}` }, !(this.isMobile && !this.isShortCashier) && b("h2", { key: "9d517ae70d3f6a654ffaff66d86d19c4259fa679", class: "CategoryTitle" }, H(this.typeParameter === "Withdraw" ? "Withdraw" : "Deposit", this.language)), b("div", { key: "97c991c8a18e44e50307a9bd3de11f446783a630", style: { marginTop: this.isShortCashier ? "30px" : "0" } }, this.isMobile && !this.isShortCashier ? b("div", { class: "MenuReturnButton", onClick: this.toggleScreen }, b("svg", { xmlns: "http://www.w3.org/2000/svg", width: "15", height: "15", viewBox: "0 0 15 15" }, b("defs", null), b("g", { transform: "translate(-20 -158)" }, b("g", { transform: "translate(20 158)" }, b("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)" })))), b("h2", { class: "CategoryTitleMobile" }, H(this.typeParameter === "Withdraw" ? "Withdraw" : "Deposit", this.language))) : null), this.cashierInfoUrl ? b("iframe", { width: "100%", allow: "payment", height: this.dynamicHeight, src: this.cashierInfoUrl }) : b("h3", { innerHTML: this.type === "deposit" ? H("denyDeposit", this.language) : H("denyWithdrawal", this.language), class: "ErrorMessage" }))));
  }
  async loadWidget() {
    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((c) => c === void 0) || !this.endpoint))
      try {
        const c = `${this.endpoint}/v1/player/${this.userId}/payment/GetPaymentSession`, u = await fetch(c, {
          method: "POST",
          headers: {
            "X-Sessionid": this.session,
            "Content-Type": "application/json",
            "X-Client-Request-Timestamp": ne.utc().format("YYYY-MM-DD HH:mm:ss.SSS")
          },
          body: JSON.stringify(n)
        });
        if (!u.ok) {
          const m = await u.text();
          throw new Error(m);
        }
        const l = await u.json();
        if (l.CashierInfo)
          this.cashierInfoUrl = l.CashierInfo.Url;
        else {
          let m;
          if (l.ResponseMessage) {
            let v = this.errorCodes.find((g) => l.ResponseMessage.includes(g)) || null;
            v ? m = H(`errorCode${v}`, this.language) : m = H("notFoundErrorCode", this.language);
          } else
            m = this.type === "deposit" ? H("denyDeposit", this.language) : H("denyWithdrawal", this.language);
          const T = { type: "error", message: m };
          window.postMessage({ type: "DenyDepositOrWithdrawal", data: T }, window.location.href);
        }
      } catch (c) {
        console.error(c);
      }
  }
  handleMessage(n) {
    var c, u, l, m, T, v, g, h;
    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"), ((c = n.data) === null || c === void 0 ? void 0 : c.type) === "mm-hcback-to-merchant" && this.doRedirect(n.data.type, this.homeUrl), ((u = n.data) === null || u === void 0 ? void 0 : u.redirect) === "mm-hc-back-tomerchant" && this.doRedirect(n.data.redirect, this.homeUrl), ((l = n.data) === null || l === void 0 ? void 0 : l.redirect) === "mm-hc-sports" && this.doRedirect((m = n.data) === null || m === void 0 ? void 0 : m.redirect, this.sportsUrl), ((T = n.data) === null || T === void 0 ? void 0 : T.redirect) === "mm-hc-casino" && this.doRedirect(window.location.href, this.casinoUrl), ((v = n.data) === null || v === void 0 ? void 0 : v.redirect) === "mm-hc-contact" && (window.postMessage({ type: "CloseShortCashier" }, window.location.href), this.doRedirect(window.location.href, this.contactUrl)), (((g = n.data) === null || g === void 0 ? void 0 : g.redirect) === "mm-wm-hc-init-deposit" || ((h = n.data) === null || h === void 0 ? void 0 : h.redirect) === "mm-wm-hc-init-deposit-quick") && (window.postMessage({ type: "CloseShortCashier" }, window.location.href), this.doRedirect(window.location.href, this.depositUrl));
  }
  doRedirect(n, c) {
    const u = { reason: n, url: c, cancel: !1 };
    if (this.beforeRedirect(u), !u.cancel) {
      if (!u.url) {
        window.location.href = "/";
        return;
      }
      window.location.href = u.url;
    }
  }
  static get watchers() {
    return {
      clientStyling: ["handleClientStylingChange"],
      clientStylingUrl: ["handleClientStylingChangeURL"]
    };
  }
};
ve.style = we;
export {
  ve as user_deposit_withdrawal
};
